qdosmsq:traps:trap_3:defw

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

qdosmsq:traps:trap_3:defw [2009/05/19 15:19] (current)
george.gwilt created
Line 1: Line 1:
 +====== 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.
 +
 +<code>
 +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
 +</code>
 +
  
  • qdosmsq/traps/trap_3/defw.txt
  • Last modified: 2009/05/19 15:19
  • by george.gwilt