SD_WDEF/IOW_DEFW
This trap redefines a window.
Call Parameters | Return Parameters | ||
---|---|---|---|
D0.B | $0D | D0.L | Error return. |
D1.B | Border colour | D1.L | Corrupted. |
D2.W | Border width | D2.L | Preserved. |
D3.W | Timeout | D3.L | Preserved. |
A0.L | Channel ID | A0.L | Preserved. |
A1.L | Window block | A1.L | Corrupted. |
Errors
ERR_NC | Not complete. |
ERR_NO | Channel not open. |
Notes
- All registers not shown above are not used on entry and are preserved on exit.
- This call allows the size, position and border of a window to be redefined. The old window contents are not moved or modified, but the cursor is repositioned to the top left of the window.
- The size and position of the window are in the four word block to which A1 points:
- block+0 Window width
- block+2 Window height
- block+4 X origin
- block+6 Y origin
Example
The example below shows the use of this trap call. It is assumed that A0 contains the window's ID.
wndw moveq #sd_wdef,d0 ; $0D moveq #2,d1 ; Red border moveq #4,d2 ; Border size 4 moveq #-1,d3 ; Timeout lea neww,a1 ; -> New window trap #3 ; Alter window tst.l d0 ; OK? . . bne error ; . . no! neww dc.w 250,300 ; New size . . dc.w 10,20 ; . . and position