QDOS Internals

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

User Tools

Site Tools


Window Definition - Fixed Part

The first part of any window definition is the fixed part. This defines the default dimensions, where the pointer will be initially placed when the window is active as well as the pointer sprite to be used.

Attributes for the window itself and all the loose items held within it, are also defined in this block.

Name       Off  Size      Description
wd_xsize   $00  Word      Default window x size (width) in pixels
wd_ysize   $02  Word      Default window y size (height) in pixels
wd_xorg    $04  Word      Pointer x origin (across) in window
wd_yorg    $06  Word      Pointer y origin (down) in window
wd_wattr   $08  8 bytes   Window attributes       
wd_psprt   $10  Word      Pointer to the pointer sprite for this window
wd_lattr   $12  28 bytes  Loose menu item attributes
wd_help    $2e  Word      Pointer to help window

wd_rbase   $30            Base of repeated part of window definition

Following on from the above is the repeated part of the window definition which can be found here.

Window Attributes

The window attributes define the colours used by the window and whether or not the window is to be cleared when drawn (or moved) as well as whether the cursor keys are allowed to be used to move the pointer around.

Loose Item and Menu Item Attributes

Every loose item in a window has the same set of attributes, so every one looks consistent with regard to the colours etc used when the item is available, selected or unavailable.

Name       Off  Size      Description
wda_curw   $00  Word      Current item border width
wda_curc   $02  Word      Current item border colour
wda_unav   $04  8 Bytes   Item unavailable attribute record
wda_aval   $0c  8 Bytes   Item available attribute record
wda_selc   $14  8 Bytes   Item selected attribute record

wda.elen   $1c            Menu item attribute entry length

Each of the item attribute lists in the above structure, are defined as follows:

Name       Off  Size      Description
wda_back   $00  Word      Item background colour
wda_ink    $02  Word      Text object ink colour
wda_blob   $04  Word      Pointer to blob for pattern
wda_patt   $06  Word      Pointer to pattern for blob
qdosmsq/pe/struct/winfxd.txt · Last modified: 2011/11/09 11:05 by george.gwilt