Right then, after a bit of experimentation, I've come to the conclusion that it's pretty impossible to use IOP.SWDF for anything useful This, coincidentally is what Gerge Gwilt wrote about it on my QDOSMSQ web site!
If I open a console and OUTLN it then call SWDF with A1 pointing a zero long word, followed by 8 words and a long to define the main subwindow sizes and attributes, then as long as the main window sizes match the OUTLN size, then the sprite will be used, but none of the attributes will be used, no paper or border, only the sprite. Like this:
Code: Select all
lea swdfPntr,a1
moveq #-1,d3
moveq #iop.swdf,d0
; A0 is the channel id
trap #3
...
swdfPntr
dc.l 0
dc.w x,y,xorg,yorg
dc.w spare,bordw,bordc,paprc
dc.l $0A ; Use SLEEP pointer sprite.
Code: Select all
lea swdfPntr,a1
moveq #-1,d3
moveq #iop.swdf,d0
; A0 is the channel id
trap #3
...
swdfPntr
dc.l swdfList-*
dc.w x,y,xorg,yorg
dc.w spare,bordw,bordc,paprc
dc.l 0 ; Use default arrow pointer sprite.
swdfList
dc.l swdf_1-*
dc.l 0
swdf_1
; These are different from the main window!
dc.w x,y,xorg,yorg
dc.w spare,bordw,bordc,paprc
dc.l 0 ; Use default arrow pointer sprite.
If I replace the relative pointers with absolute pointers, I get the correct main window pointer sprite back again, but nothing changes regarding attributes for the main or the sub window. Plus, the subwindow doesn't use the defined pointer sprite either.
Code: Select all
lea swdfPntr,a1
move.l a1,a5
lea swdfList,a4
move.l a4,(a1)
lea swdf_1,a1
move.l a1,(a4)
move.l a5,a1
moveq #-1,d3
moveq #iop.swdf,d0
; A0 is the channel id
trap #3
...
swdfPntr
dc.l 0
dc.w x,y,xorg,yorg
dc.w spare,bordw,bordc,paprc
dc.l 0 ; Use default arrow pointer sprite.
swdfList
dc.l 0
dc.l 0
swdf_1
; These are different from the main window!
dc.w x,y,xorg,yorg
dc.w spare,bordw,bordc,paprc
dc.l 0 ; Use default arrow pointer sprite.
All of this experimenting is on QPC 5.01, with high colour mode (32) selected, if this makes any difference?
Cheers,
Norm.