QDOS Internals

Anything you never knew you wanted to know about the Sinclair QL.

User Tools

Site Tools


Window Working Definition

The window working definition contains the information about the window currently on the screen for a program. Usually this will have been set up from the window definition which has information about all the possible windows that could be used by the program. For example, for a resizable window the window definition would contain the maximum and minimum sizes as well as rules governing the positioning of sub-windows and objects for the different possible sizes. The window working definition gives information about the actual size currently used.

The form of the working definition follows that of the window definition with some differences. For example, all pointers are long word absolute and not word relative.

Header Block

Name     Off Size Item
ww_wstat $00 long pointer to window status area
ww_wdef  $04 long pointer to window definition
ww_chid  $08 long channel ID for window
ww_pprec $0C long pointer to pointer record
ww_psave $10 long saved pointer position (absolute coordinates)
ww_spar1 $14 long window spare 1
ww_spar2 $18 word window spare 2
ww_spar3 $1A byte window spare 3
ww_pulld $1B byte flag - non zero if pulled down
ww_splst $1C long pointer to app. list

Window Definition Block

Name     Off Size Item
ww_xsize $20 word window width in pixels
ww_ysize £22 word window height in pixels
ww_xorg  $24 word x origin
ww_yorg  $26 word y origin
ww_wattr $28      window attributes
ww_psprt $30 long pointer to sprite for this window
ww_lattr $34      loose item attributes   (See Note)
ww_help  $5C long not used
ww_ninfo $60 word number of information windows
ww_ninob $62 word number of information objects
ww_pinfo $64 long pointer to information sub-window list
ww_nlitm $68 word number of loose items
ww_plitm $6A long pointer to loose item list
ww_nappl $6E word number of application windows
ww_pappl $70 long pointer to application window list


The form of loose item attributes is given here.

Window Attributes

Name     Off Size Item
wwa_clfg $00 byte MS bit clear to clear window
wwa_kflg $00 byte bit 0 set to stop arrow keys moving the pointer
wwa_shdd $01 byte shadow depth
wwa_borw $02 word border width
wwa_borc $04 word border colour
wwa_papr $06 word paper colour
qdosmsq/pe/struct/wwdef.txt · Last modified: 2012/06/14 15:36 by george.gwilt