2017-08-29 15:07:02 +00:00
|
|
|
;;; ------------------------------
|
|
|
|
;;; A2Desktop
|
|
|
|
;;; ------------------------------
|
|
|
|
|
|
|
|
;;; Entry Points
|
|
|
|
A2D := $4000
|
|
|
|
UNKNOWN_CALL := $8E00
|
|
|
|
|
2017-08-31 03:30:46 +00:00
|
|
|
A2D_DRAW_TEXT := $19
|
|
|
|
;; .addr data
|
|
|
|
;; .byte length
|
|
|
|
|
|
|
|
A2D_GET_BUTTON := $2A
|
2017-09-01 02:05:41 +00:00
|
|
|
;; .byte state (0=up, 1=pressed, 2=held???)
|
|
|
|
|
|
|
|
A2D_CREATE_WINDOW := $38
|
|
|
|
;; .byte id
|
2017-09-01 05:12:02 +00:00
|
|
|
;; 0 = desktop
|
|
|
|
;; 1, 2, ... = file windows
|
|
|
|
;; 100 = DA (for example)
|
2017-09-01 02:05:41 +00:00
|
|
|
;; .byte ???
|
|
|
|
|
|
|
|
A2D_DESTROY_WINDOW := $39
|
|
|
|
;; .byte id
|
|
|
|
;; .byte ???
|
2017-08-31 03:30:46 +00:00
|
|
|
|
|
|
|
A2D_GET_MOUSE := $40
|
|
|
|
;; .word x
|
|
|
|
;; .word y
|
|
|
|
;; .word element
|
|
|
|
;; 0 = ??
|
|
|
|
;; 1 = ??
|
|
|
|
;; 2 = client area/scroll bar
|
|
|
|
;; 3 = title bar
|
|
|
|
;; 4 = ??? (but tested for?)
|
|
|
|
;; 5 = close box
|
|
|
|
;; .word window
|
|
|
|
;; $0 = outside window
|
|
|
|
;; $64 = in window
|
|
|
|
|
|
|
|
A2D_BTN_CLICK := $43
|
|
|
|
;; .byte clicked (0 = cancelled, 1 = clicked)
|
|
|
|
;; .byte ??
|
|
|
|
;; .byte ??
|
|
|
|
|
|
|
|
A2D_QUERY_CLIENT:= $48
|
|
|
|
;; .word xcoord of query
|
|
|
|
;; .word ycoord of query
|
2017-09-01 05:39:06 +00:00
|
|
|
;; .byte part (0 = client, 1 = vscroll, 2 = hscroll)
|
2017-09-01 05:12:02 +00:00
|
|
|
;; .byte scroll (1 = up/left, 2 = down/right, 3 = above/before, 4 = below/after, 5 = thumb)
|
|
|
|
|
2017-09-01 05:39:06 +00:00
|
|
|
A2D_DRAG_SCROLL:= $4A
|
|
|
|
;; .byte type (1 = vscroll, 2 = hscroll)
|
2017-09-01 05:12:02 +00:00
|
|
|
;; .word xcoord of mouse
|
|
|
|
;; .word ycoord of mouse
|
|
|
|
;; .byte position (0...255)
|
|
|
|
;; .byte moved (0 = no change, 1 = moved)
|
2017-08-31 03:30:46 +00:00
|
|
|
|
2017-08-31 15:10:51 +00:00
|
|
|
A2D_UPDATE_SCROLL:= $4B
|
|
|
|
;; .byte type (1 = vertical, 2 = horizontal)
|
|
|
|
;; .byte pos (new position 0...250)
|
2017-08-29 15:07:02 +00:00
|
|
|
|
2017-09-01 05:39:06 +00:00
|
|
|
;;; Used in A2D_GET_MOUSE
|
|
|
|
A2D_ELEM_CLIENT := 2
|
|
|
|
A2D_ELEM_TITLE := 3
|
|
|
|
A2D_ELEM_TBD := 4 ; ???
|
|
|
|
A2D_ELEM_CLOSE := 5
|
|
|
|
|
|
|
|
;;; Used in A2D_QUERY_CLIENT, A2D_DRAG_SCROLL, A2D_UPDATE_SCROLL
|
|
|
|
A2D_CLIENT := 0
|
|
|
|
A2D_VSCROLL := 1
|
|
|
|
A2D_HSCROLL := 2
|
|
|
|
|
|
|
|
;;; Used in A2D_QUERY_CLIENT
|
|
|
|
A2D_SCROLL_PART_UP := 1
|
|
|
|
A2D_SCROLL_PART_LEFT := 1
|
|
|
|
A2D_SCROLL_PART_DOWN := 2
|
|
|
|
A2D_SCROLL_PART_RIGHT := 2
|
|
|
|
A2D_SCROLL_PART_ABOVE := 3
|
|
|
|
A2D_SCROLL_PART_BEFORE := 3
|
|
|
|
A2D_SCROLL_PART_BELOW := 4
|
|
|
|
A2D_SCROLL_PART_AFTER := 4
|
|
|
|
A2D_SCROLL_PART_THUMB := 5
|
|
|
|
|
|
|
|
|
2017-08-29 15:07:02 +00:00
|
|
|
;;; Macros
|
|
|
|
.macro A2D_CALL op, addr
|
|
|
|
jsr A2D
|
|
|
|
.byte op
|
|
|
|
.addr addr
|
|
|
|
.endmacro
|
|
|
|
|
|
|
|
.macro A2D_DEFSTRING str ; String definition, for use with A2D_TEXT
|
|
|
|
.local data
|
|
|
|
.addr data
|
|
|
|
.byte .strlen(str)
|
|
|
|
data: .byte str
|
|
|
|
.endmacro
|