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