( event_fields )

needs module: modules

: EventField ( 'get offset -- )
	create w, w,
does> ( base -- value )
	dup w@ rot +
	swap 2+ w@ execute
;

: f: 2dup EventField ;
: ;f 2drop ;

module: EventFields

' w@ 0 f: eType ;f
' c@ 2 f: penDown ;f
' c@ 3 f: tapCount ;f
' w@ 4 f: screenX ;f
' w@ 6 f: screenY ;f

' c@ 8 f: preventFieldButtons ;f

' w@ 8 f: controlID f: fieldID f: formID
f: gadgetID f: chr f: lst.listID f: itemID
f: menuRscID f: start.x f: scrollBarID
f: tableID ;f

' @ 8 f: pSelector f: dockH
f: enterWindow ;f

' w@ 10 f: recordNum f: updateCode
f: cause f: start.y ;f

' @ 10 f: pControl f: pField f: gadgetP
f: pList f: controlP f: pScrollBar
f: pTable ;f

' w@ 12 f: day.selection f: matchPos
f: modifiers f: end.x ;f

' @ 12 f: context f: exitWindow ;f

' c@ 14 f: on f: useThisDate ;f

' w@ 14 f: newHeight f: selector
f: matchLen f: lst.selection f: end.y
f: pop.listID f: scl.value f: row ;f

' c@ 16 f: inputReady ;f
' c@ 17 f: outputReady ;f

' w@ 16 f: ctlSelect.value
f: currentPos f: matchFieldNum
f: status f: newValue f: column ;f

' @ 16 f: dataP f: listP ;f

' w@ 18 f: cltRepeat.value f: sockErr ;f

' @ 18 f: matchCustom ;f

' w@ 20 f: pop.selection ;f

' w@ 22 f: priorSelection ;f

;module