Struct for Event record

This commit is contained in:
Joshua Bell 2018-07-04 21:12:20 -07:00
parent 3b085738aa
commit c7c7d866e4
3 changed files with 31 additions and 24 deletions

View File

@ -491,9 +491,9 @@ handle_keydown:
jmp cmd_scroll jmp cmd_scroll
menu_accelerators: menu_accelerators:
lda event_params+1 lda event_key
sta LE25C sta LE25C
lda event_params+2 lda event_modifiers
beq L43A1 beq L43A1
lda #1 lda #1
L43A1: sta LE25D L43A1: sta LE25D
@ -2667,7 +2667,7 @@ L5584: jsr get_event
bne L5584 bne L5584
jmp L55D1 jmp L55D1
L5595: lda event_params+1 L5595: lda event_params+MGTK::Event::key
and #CHAR_MASK and #CHAR_MASK
cmp #CHAR_RETURN cmp #CHAR_RETURN
beq L55D1 beq L55D1
@ -4405,10 +4405,10 @@ L65D0: cmp16 grafport2::cliprect::x2, L7B63
L65E2: lsr16 L6602 L65E2: lsr16 L6602
lda L6602 lda L6602
L65EB: jsr L62BC L65EB: jsr L62BC
L65EE: sta event_params+1 L65EE: sta updatethumb_thumbpos
lda #$02 lda #MGTK::ctl_horizontal_scroll_bar
sta event_params sta updatethumb_which_ctl
MGTK_RELAY_CALL MGTK::UpdateThumb, event_params MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
rts rts
L6600: .word 0 L6600: .word 0
@ -4446,10 +4446,10 @@ L667B: lsr16 L66A0
lsr16 L66A0 lsr16 L66A0
lda L66A0 lda L66A0
L668A: jsr L62BC L668A: jsr L62BC
L668D: sta event_params+1 L668D: sta updatethumb_thumbpos
lda #$01 lda #MGTK::ctl_vertical_scroll_bar
sta event_params sta updatethumb_which_ctl
MGTK_RELAY_CALL MGTK::UpdateThumb, event_params MGTK_RELAY_CALL MGTK::UpdateThumb, updatethumb_params
rts rts
L669F: .byte 0 L669F: .byte 0

View File

@ -34,11 +34,11 @@ event_ycoord := event_params + 3
event_window_id := event_params + 1 event_window_id := event_params + 1
activatectl_params := * activatectl_params := *
activatectl_which_ctl := activatectl_params activatectl_which_ctl := activatectl_params + 0
activatectl_activate := activatectl_params + 1 activatectl_activate := activatectl_params + 1
trackthumb_params := * trackthumb_params := *
trackthumb_which_ctl := trackthumb_params trackthumb_which_ctl := trackthumb_params + 0
trackthumb_mousex := trackthumb_params + 1 trackthumb_mousex := trackthumb_params + 1
trackthumb_mousey := trackthumb_params + 3 trackthumb_mousey := trackthumb_params + 3
trackthumb_thumbpos := trackthumb_params + 5 trackthumb_thumbpos := trackthumb_params + 5

View File

@ -261,17 +261,24 @@ GetCursorAddr := $28 ; Get cursor definition
;;; -------------------------------------------------- ;;; --------------------------------------------------
;;; Event Manager Calls ;;; Event Manager Calls
;;; Event record: .struct Event
;;; kind .byte ; event_kind_*
;;; .byte kind event_kind_* .union
;;; if kind is event_kind_key_down: .struct ; event_kind_down
;;; .byte key (ASCII code; high bit clear) key .byte ; ASCII code; high bit clear
;;; .byte modifiers (0=none, 1=open-apple, 2=solid-apple, 3=both) modifiers .byte ; 0=none, 1=open-apple, 2=solid-apple, 3=both
;;; if kind is event_kind_update: .endstruct
;;; .byte window_id
;;; otherwise: .struct ; event_kind_update
;;; .word xcoord window_id .byte
;;; .word ycoord .endstruct
.struct ; otherwise
xcoord .word
ycoord .word
.endstruct
.endunion
.endstruct
CheckEvents := $29 ; Process mouse/kbd if GetEvent will be delayed. CheckEvents := $29 ; Process mouse/kbd if GetEvent will be delayed.
;;; (no parameters) ;;; (no parameters)