qdosmsq:pe:struct:wstat

Window Status Area

The window status area provides communication between the application and the PE software. It includes:

  • The pointer record
  • The current sub-window and menu item
  • The pan and scroll control blocks
  • Tables giving the status of all menu items
Name     Off Length Item
---------------------------------------------------------------------
ws_work  $00 long   pointer to window working definition
ws_wdef  $04 long   pointer to window definition
---------------------------------------------------------------------
Name     Off Length Item
---------------------------------------------------------------------
ws_point $08 long   pointer record

wsp_chid $08 long   channel ID of window enclosing the pointer
wsp_swnr $0C word   app sub-window number enclosing the pointer or -1
wsp_xpos $0E word   relative pointer x pixel position in sub-window
wsp_ypos $10 word   relative pointer y pixel position in sub-window
wsp_kstr $12 byte   key stroke (or 0)
wsp_kprs $13 byte   key press (or 0)

wsp_evnt $14 long   event vector

pp_jevnt $14 byte   job events
wsp_weve $15 byte   window byte of event vector
wsp_seve $16 byte   sub-window byte of event vector
wsp_peve $17 byte   pointer byte of event vector

ws_subdf $18 quad   sub-window area definition

wsp_xsiz $18 word   sub-window width
wsp_ysiz $1A word   sub-window height
wsp_xorg $1C word   sub-window x origin absolute
wsp_yorg $1E word   sub-window y origin absolute

ws_ptpos $20 long   pointer position (absolute)
ws_wmode $24 word   display mode for this window
ws_scach $26 byte   last used sprite cache version
ws_ciact $2C long   pointer to current item action routine
ws_citem $30 word   current item in sub-window
ws_cibrw $32 word   current item border width
ws_cipap $34 word   paper colour behind current item
ws_cispr $36 word   spare

ws_cihit $38 quad   current item hit area

ws_cihxs $38 word   hit area x size
ws_cihys $3A word   hit area y size
ws_cihxo $3C word   hit area x origin absolute
ws_cihyo $3C word   hit area y origin absolute
---------------------------------------------------------------------
Name     Off Length Item
---------------------------------------------------------------------
ws_litem $40        one byte for each item - giving its status
---------------------------------------------------------------------

The remaining tables need not follow the above, though they may. They are each accessed by pointers from the window working definition.

Every menu item in an application sub-window menu must have a status byte in the menu's own status area.

In the following table, the offset is given as $00. When setting up the menu, the pointer to the menu status area is defined as being an offset from the Window's own status area, which itself is defined as a pointer.

Name     Off Length Item
---------------------------------------------------------------------
wss_item $00        one byte for each item - giving its status
---------------------------------------------------------------------

The meaning of the status byte is given below.

StatusNormalRedraw
unavailable$10$11
available$00$01
selected$80$81

For each application window there may be a pan or scroll control block. If there are both then the pan block comes first.

Control Block Header
Name     Off Length Item
---------------------------------------------------------------------
wss_nsec $00 word   number of sections currently displayed
---------------------------------------------------------------------
Control Block Record

There follows one control block record for each of the sections numbered above.

Name     Off Length Item
---------------------------------------------------------------------
wss_spos $00 word   section start pixel position
wss_sstt $02 word   section start column or row
wss_ssiz $04 word   section size (number of cols or rows on the page)
wss.ssln $06        status list entry length
---------------------------------------------------------------------
  • qdosmsq/pe/struct/wstat.txt
  • Last modified: 2013/03/13 15:09
  • by george.gwilt