mirror of
https://github.com/mi57730/a2d.git
synced 2025-08-09 01:24:57 +00:00
docs
This commit is contained in:
@@ -396,9 +396,15 @@ param_lengths:
|
|||||||
.byte zp, ((length) | ((cursor) << 7))
|
.byte zp, ((length) | ((cursor) << 7))
|
||||||
.endmacro
|
.endmacro
|
||||||
|
|
||||||
|
;; ----------------------------------------
|
||||||
|
;; Graphics Primitives
|
||||||
PARAM_DEFN 0, $00, 0 ; $00 NoOp
|
PARAM_DEFN 0, $00, 0 ; $00 NoOp
|
||||||
PARAM_DEFN 0, $00, 0 ; $01
|
|
||||||
PARAM_DEFN 1, $82, 0 ; $02
|
;; Initialization
|
||||||
|
PARAM_DEFN 0, $00, 0 ; $01 InitGraf
|
||||||
|
PARAM_DEFN 1, $82, 0 ; $02 SetSwitches
|
||||||
|
|
||||||
|
;; GrafPort
|
||||||
PARAM_DEFN 0, $00, 0 ; $03 InitPort
|
PARAM_DEFN 0, $00, 0 ; $03 InitPort
|
||||||
PARAM_DEFN 36, current_grafport, 0 ; $04 SetPort
|
PARAM_DEFN 36, current_grafport, 0 ; $04 SetPort
|
||||||
PARAM_DEFN 0, $00, 0 ; $05 GetPort
|
PARAM_DEFN 0, $00, 0 ; $05 GetPort
|
||||||
@@ -409,6 +415,8 @@ param_lengths:
|
|||||||
PARAM_DEFN 2, current_pensize, 0 ; $0A SetPenSize
|
PARAM_DEFN 2, current_pensize, 0 ; $0A SetPenSize
|
||||||
PARAM_DEFN 0, $00, 0 ; $0B SetFont
|
PARAM_DEFN 0, $00, 0 ; $0B SetFont
|
||||||
PARAM_DEFN 1, current_textback, 0 ; $0C SetTextBG
|
PARAM_DEFN 1, current_textback, 0 ; $0C SetTextBG
|
||||||
|
|
||||||
|
;; Drawing
|
||||||
PARAM_DEFN 4, $A1, 0 ; $0D Move
|
PARAM_DEFN 4, $A1, 0 ; $0D Move
|
||||||
PARAM_DEFN 4, current_penloc, 0 ; $0E MoveTo
|
PARAM_DEFN 4, current_penloc, 0 ; $0E MoveTo
|
||||||
PARAM_DEFN 4, $A1, 1 ; $0F Line
|
PARAM_DEFN 4, $A1, 1 ; $0F Line
|
||||||
@@ -420,29 +428,44 @@ param_lengths:
|
|||||||
PARAM_DEFN 0, $00, 1 ; $15 PaintPoly
|
PARAM_DEFN 0, $00, 1 ; $15 PaintPoly
|
||||||
PARAM_DEFN 0, $00, 1 ; $16 FramePoly
|
PARAM_DEFN 0, $00, 1 ; $16 FramePoly
|
||||||
PARAM_DEFN 0, $00, 0 ; $17 InPoly
|
PARAM_DEFN 0, $00, 0 ; $17 InPoly
|
||||||
|
|
||||||
|
;; Text
|
||||||
PARAM_DEFN 3, $A1, 0 ; $18 TextWidth
|
PARAM_DEFN 3, $A1, 0 ; $18 TextWidth
|
||||||
PARAM_DEFN 3, $A1, 1 ; $19 DrawText
|
PARAM_DEFN 3, $A1, 1 ; $19 DrawText
|
||||||
|
|
||||||
|
;; Utility
|
||||||
PARAM_DEFN 1, $82, 0 ; $1A SetZP1
|
PARAM_DEFN 1, $82, 0 ; $1A SetZP1
|
||||||
PARAM_DEFN 1, $82, 0 ; $1B SetZP2
|
PARAM_DEFN 1, $82, 0 ; $1B SetZP2
|
||||||
PARAM_DEFN 0, $00, 0 ; $1C Version
|
PARAM_DEFN 0, $00, 0 ; $1C Version
|
||||||
|
|
||||||
|
;; ----------------------------------------
|
||||||
|
;; Mouse Graphics Tool Kit Calls
|
||||||
|
|
||||||
|
;; Initialization
|
||||||
PARAM_DEFN 12, $82, 0 ; $1D StartDeskTop
|
PARAM_DEFN 12, $82, 0 ; $1D StartDeskTop
|
||||||
PARAM_DEFN 0, $00, 0 ; $1E StopDeskTop
|
PARAM_DEFN 0, $00, 0 ; $1E StopDeskTop
|
||||||
PARAM_DEFN 3, $82, 0 ; $1F
|
PARAM_DEFN 3, $82, 0 ; $1F SetUserHook
|
||||||
PARAM_DEFN 2, $82, 0 ; $20 AttachDriver
|
PARAM_DEFN 2, $82, 0 ; $20 AttachDriver
|
||||||
PARAM_DEFN 2, $82, 0 ; $21 ScaleMouse
|
PARAM_DEFN 2, $82, 0 ; $21 ScaleMouse
|
||||||
PARAM_DEFN 1, $82, 0 ; $22 KeyboardMouse
|
PARAM_DEFN 1, $82, 0 ; $22 KeyboardMouse
|
||||||
PARAM_DEFN 0, $00, 0 ; $23 GetIntHandler
|
PARAM_DEFN 0, $00, 0 ; $23 GetIntHandler
|
||||||
|
|
||||||
|
;; Cursor Manager
|
||||||
PARAM_DEFN 0, $00, 0 ; $24 SetCursor
|
PARAM_DEFN 0, $00, 0 ; $24 SetCursor
|
||||||
PARAM_DEFN 0, $00, 0 ; $25 ShowCursor
|
PARAM_DEFN 0, $00, 0 ; $25 ShowCursor
|
||||||
PARAM_DEFN 0, $00, 0 ; $26 HideCursor
|
PARAM_DEFN 0, $00, 0 ; $26 HideCursor
|
||||||
PARAM_DEFN 0, $00, 0 ; $27 ObscureCursor
|
PARAM_DEFN 0, $00, 0 ; $27 ObscureCursor
|
||||||
PARAM_DEFN 0, $00, 0 ; $28 GetCursorAddr
|
PARAM_DEFN 0, $00, 0 ; $28 GetCursorAddr
|
||||||
|
|
||||||
|
;; Event Manager
|
||||||
PARAM_DEFN 0, $00, 0 ; $29 CheckEvents
|
PARAM_DEFN 0, $00, 0 ; $29 CheckEvents
|
||||||
PARAM_DEFN 0, $00, 0 ; $2A GetEvent
|
PARAM_DEFN 0, $00, 0 ; $2A GetEvent
|
||||||
PARAM_DEFN 0, $00, 0 ; $2B FlushEvents
|
PARAM_DEFN 0, $00, 0 ; $2B FlushEvents
|
||||||
PARAM_DEFN 0, $00, 0 ; $2C PeekEvent
|
PARAM_DEFN 0, $00, 0 ; $2C PeekEvent
|
||||||
PARAM_DEFN 5, $82, 0 ; $2D PostEvent
|
PARAM_DEFN 5, $82, 0 ; $2D PostEvent
|
||||||
PARAM_DEFN 1, $82, 0 ; $2E SetKeyEvent
|
PARAM_DEFN 1, $82, 0 ; $2E SetKeyEvent
|
||||||
|
|
||||||
|
;; Menu Manager
|
||||||
PARAM_DEFN 4, $82, 0 ; $2F InitMenu
|
PARAM_DEFN 4, $82, 0 ; $2F InitMenu
|
||||||
PARAM_DEFN 0, $00, 0 ; $30 SetMenu
|
PARAM_DEFN 0, $00, 0 ; $30 SetMenu
|
||||||
PARAM_DEFN 0, $00, 0 ; $31 MenuSelect
|
PARAM_DEFN 0, $00, 0 ; $31 MenuSelect
|
||||||
@@ -452,6 +475,8 @@ param_lengths:
|
|||||||
PARAM_DEFN 3, $C7, 0 ; $35 DisableItem
|
PARAM_DEFN 3, $C7, 0 ; $35 DisableItem
|
||||||
PARAM_DEFN 3, $C7, 0 ; $36 CheckItem
|
PARAM_DEFN 3, $C7, 0 ; $36 CheckItem
|
||||||
PARAM_DEFN 4, $C7, 0 ; $37 SetMark
|
PARAM_DEFN 4, $C7, 0 ; $37 SetMark
|
||||||
|
|
||||||
|
;; Window Manager
|
||||||
PARAM_DEFN 0, $00, 0 ; $38 OpenWindow
|
PARAM_DEFN 0, $00, 0 ; $38 OpenWindow
|
||||||
PARAM_DEFN 1, $82, 0 ; $39 CloseWindow
|
PARAM_DEFN 1, $82, 0 ; $39 CloseWindow
|
||||||
PARAM_DEFN 0, $00, 0 ; $3A CloseAll
|
PARAM_DEFN 0, $00, 0 ; $3A CloseAll
|
||||||
@@ -468,6 +493,8 @@ param_lengths:
|
|||||||
PARAM_DEFN 5, $82, 0 ; $45 GrowWindow
|
PARAM_DEFN 5, $82, 0 ; $45 GrowWindow
|
||||||
PARAM_DEFN 5, $82, 0 ; $46 ScreenToWindow
|
PARAM_DEFN 5, $82, 0 ; $46 ScreenToWindow
|
||||||
PARAM_DEFN 5, $82, 0 ; $47 WindowToScreen
|
PARAM_DEFN 5, $82, 0 ; $47 WindowToScreen
|
||||||
|
|
||||||
|
;; Control Manager
|
||||||
PARAM_DEFN 4, current_penloc, 0 ; $48 FindControl
|
PARAM_DEFN 4, current_penloc, 0 ; $48 FindControl
|
||||||
PARAM_DEFN 3, $82, 0 ; $49 SetCtlMax
|
PARAM_DEFN 3, $82, 0 ; $49 SetCtlMax
|
||||||
PARAM_DEFN 5, $82, 0 ; $4A TrackThumb
|
PARAM_DEFN 5, $82, 0 ; $4A TrackThumb
|
||||||
|
110
mgtk.inc
110
mgtk.inc
@@ -230,6 +230,7 @@ StartDeskTop := $1D ; Inits state, registers interrupt handler, draws deskto
|
|||||||
;; .addr sysfontptr
|
;; .addr sysfontptr
|
||||||
;; .addr savearea buffer for saving screen data (e.g. behind menus)
|
;; .addr savearea buffer for saving screen data (e.g. behind menus)
|
||||||
;; .word savesize bytes
|
;; .word savesize bytes
|
||||||
|
;; .byte ???
|
||||||
|
|
||||||
StopDeskTop := $1E ; Deallocates interrupt, hides cursor
|
StopDeskTop := $1E ; Deallocates interrupt, hides cursor
|
||||||
;; (no parameters)
|
;; (no parameters)
|
||||||
@@ -248,6 +249,7 @@ ScaleMouse := $21 ; Set mouse/screen scaling
|
|||||||
|
|
||||||
KeyboardMouse := $22 ; Next operation will be performed by keyboard
|
KeyboardMouse := $22 ; Next operation will be performed by keyboard
|
||||||
;; (no parameters)
|
;; (no parameters)
|
||||||
|
;; .byte ???
|
||||||
|
|
||||||
GetIntHandler := $23 ; Get address of interrupt handler
|
GetIntHandler := $23 ; Get address of interrupt handler
|
||||||
;; .addr handler (out) Address of interrupt handler (after cld)
|
;; .addr handler (out) Address of interrupt handler (after cld)
|
||||||
@@ -343,7 +345,6 @@ InitMenu := $2F
|
|||||||
;; .byte open_char char code to use for open apple glyph
|
;; .byte open_char char code to use for open apple glyph
|
||||||
;; .byte check_char char code to use for checkmark glyph
|
;; .byte check_char char code to use for checkmark glyph
|
||||||
;; .byte control_char char code to use for control key glyph
|
;; .byte control_char char code to use for control key glyph
|
||||||
;; .byte inactive_char (unused?)
|
|
||||||
|
|
||||||
SetMenu := $30 ; Configure (and draw) menu
|
SetMenu := $30 ; Configure (and draw) menu
|
||||||
;; (input is address of Menu Bar record)
|
;; (input is address of Menu Bar record)
|
||||||
@@ -419,100 +420,97 @@ GetWinPtr := $3B ; Get pointer to window params by id; A=0 on suc
|
|||||||
|
|
||||||
GetWinPort := $3C ; Get drawing state of window
|
GetWinPort := $3C ; Get drawing state of window
|
||||||
;; .byte window_id
|
;; .byte window_id
|
||||||
;; .addr port port definition to populate, like SetPort
|
;; .addr port (out) grafport address
|
||||||
|
|
||||||
SetWinPort := $3D ; Update port by passed window id
|
SetWinPort := $3D ; Update port of window
|
||||||
;; ** Implementation appears buggy - or maybe just really cryptic ??? **
|
;; .byte window_id
|
||||||
;; (input length 2 bytes)
|
;; .addr port GrafPort to copy from
|
||||||
;; .byte id window
|
|
||||||
;; .byte ???
|
|
||||||
|
|
||||||
|
BeginUpdate := $3E ; Respond to update event for window
|
||||||
BeginUpdate := $3E
|
;; .byte window_id
|
||||||
;; (input length 1 byte)
|
|
||||||
;; .byte id
|
|
||||||
|
|
||||||
EndUpdate := $3F
|
EndUpdate := $3F
|
||||||
|
;; (no paramters)
|
||||||
|
|
||||||
FindWindow := $40
|
FindWindow := $40
|
||||||
;; (input length 4 bytes)
|
;; .word mousex screen coordinates
|
||||||
;; .word queryx relative to screen
|
;; .word mousey
|
||||||
;; .word queryy
|
;; .byte which_area (out) area_*
|
||||||
;; .byte element (out) area_*
|
;; .byte window_id (out) of window
|
||||||
;; .byte id (out) of window
|
|
||||||
|
|
||||||
FrontWindow := $41 ; Get id of top window
|
FrontWindow := $41 ; Get id of top window
|
||||||
;; (input length 0 bytes)
|
;; .byte window_id (out) window, or 0 if none
|
||||||
;; (output length 1 byte)
|
|
||||||
;; .byte id (out) window, or 0 if none
|
|
||||||
|
|
||||||
SelectWindow := $42 ; Make window topmost
|
SelectWindow := $42 ; Make window topmost
|
||||||
;; (input length 1 byte)
|
;; .byte window_id
|
||||||
;; .byte id window
|
|
||||||
|
|
||||||
TrackGoAway := $43
|
TrackGoAway := $43
|
||||||
;; (input length 0 bytes)
|
;; .byte clicked (out) 0 = cancelled, 1 = close
|
||||||
;; .byte clicked (out) 0 = cancelled, 1 = clicked
|
;; .byte ?? (out)
|
||||||
;; .byte ?? (out)
|
;; .byte ?? (out)
|
||||||
;; .byte ?? (out)
|
|
||||||
|
|
||||||
DragWindow := $44
|
DragWindow := $44
|
||||||
;; (input length 5 bytes)
|
;; (input length 5 bytes)
|
||||||
;; .byte id window
|
;; .byte window_id
|
||||||
;; .word xcoord mouse coords
|
;; .word dragx mouse coords
|
||||||
;; .word ycoord
|
;; .word dragy
|
||||||
;; .byte moved high bit set if moved, clear if not
|
;; .byte moved high bit set if moved, clear if not
|
||||||
|
|
||||||
GrowWindow := $45
|
GrowWindow := $45
|
||||||
;; (input length 5 bytes)
|
;; .byte window_id
|
||||||
;; .byte id window
|
;; .word mousex
|
||||||
;; .word xcoord mouse coords
|
;; .word mousey
|
||||||
;; .word ycoord
|
;; .byte itgrew (out) 0 = no change, 1 = moved
|
||||||
;; .byte ?? likely: moved? 0 = no change, 1 = moved
|
|
||||||
|
|
||||||
ScreenToWindow := $46 ; Map screen coords to client coords
|
ScreenToWindow := $46 ; Map screen coords to client coords
|
||||||
;; (input length 5 bytes)
|
|
||||||
;; .byte window_id
|
;; .byte window_id
|
||||||
;; .word screenx
|
;; .word screenx
|
||||||
;; .word screeny
|
;; .word screeny
|
||||||
;; .word clientx
|
;; .word windowx (out)
|
||||||
;; .word clienty
|
;; .word windowy (out)
|
||||||
|
|
||||||
WindowToScreen := $47
|
WindowToScreen := $47
|
||||||
|
;; .byte window_id
|
||||||
|
;; .word windowx
|
||||||
|
;; .word windowy
|
||||||
|
;; .word screenx (out)
|
||||||
|
;; .word screeny (out)
|
||||||
|
|
||||||
;;; --------------------------------------------------
|
;;; --------------------------------------------------
|
||||||
;;; Control Manager Calls
|
;;; Control Manager Calls
|
||||||
|
|
||||||
FindControl := $48
|
FindControl := $48
|
||||||
;; (input length 4 bytes)
|
;; .word mousex
|
||||||
;; .word xcoord
|
;; .word mousey
|
||||||
;; .word ycoord
|
;; .byte which_ctl ctl_*
|
||||||
;; .byte part ctl_*
|
;; .byte which_part part_*
|
||||||
;; .byte scroll part_*
|
|
||||||
|
|
||||||
SetCtlMax := $49 ; ???
|
SetCtlMax := $49 ; ???
|
||||||
;; (input length 3 bytes)
|
;; .byte which_ctl ctl_*_scroll_bar
|
||||||
;; .byte ??? maybe part (i.e. HSCROLL or VSCROLL) ???
|
;; .byte ctlmax maximum value
|
||||||
;; .byte ??? width fraction ??
|
|
||||||
;; .byte ???
|
;; .byte ???
|
||||||
|
|
||||||
TrackThumb := $4A
|
TrackThumb := $4A
|
||||||
;; (input length 5 bytes)
|
;; .byte which_ctl ctl_*_scroll_bar
|
||||||
;; .byte type ctl_horizontal_scroll_bar or ctl_vertical_scroll_bar
|
;; .word mousex
|
||||||
;; .word mouse xcoord
|
;; .word mousey
|
||||||
;; .word mouse ycoord
|
;; .byte thumbpos (out) 0...255
|
||||||
;; .byte position 0...255
|
;; .byte thumbmobed (out) 0 = no change, 1 = moved
|
||||||
;; .byte moved 0 = no change, 1 = moved
|
|
||||||
|
|
||||||
UpdateThumb := $4B
|
UpdateThumb := $4B
|
||||||
;; (input length 3 bytes)
|
;; .byte which_ctl ctl_*_scroll_bar
|
||||||
;; .byte type ctl_horizontal_scroll_bar or ctl_vertical_scroll_bar
|
;; .byte thumbpos new position 0...250
|
||||||
;; .byte pos new position 0...250
|
|
||||||
;; .byte ???
|
;; .byte ???
|
||||||
|
|
||||||
ActivateCtl := $4C ; ???
|
ActivateCtl := $4C ; Activate/deactivate scroll bar
|
||||||
|
;; .byte which_ctl ctl_*_scroll_bar
|
||||||
|
;; .byte activate 0=deactivate, 1=activate
|
||||||
|
|
||||||
;;; $4E is last call
|
;;; $4D ???
|
||||||
|
;; (input length: 16 bytes)
|
||||||
|
|
||||||
|
;;; $4E ???
|
||||||
|
;; (input length: 2 bytes)
|
||||||
|
|
||||||
;;; ==================================================
|
;;; ==================================================
|
||||||
;;; Graphics Primitives Constants
|
;;; Graphics Primitives Constants
|
||||||
|
Reference in New Issue
Block a user