mirror of
https://github.com/mi57730/a2d.git
synced 2025-02-18 02:30:50 +00:00
API docs
This commit is contained in:
parent
1d51caeea0
commit
bd667a7291
@ -12,7 +12,7 @@ There are three distinct API classes that need to be used:
|
||||
|
||||
#### Box
|
||||
|
||||
The _box_ block is reused in several places. It has the following structure
|
||||
The _box_ block is reused in several places. It has the following structure:
|
||||
|
||||
```
|
||||
.word left pixels from screen left edge
|
||||
@ -51,7 +51,7 @@ optional _resize box_ and optional _scroll bars_.
|
||||
* Create window (A2D_CREATE_WINDOW)
|
||||
* Draw everything
|
||||
* Call $2B (no idea what this does!)
|
||||
* Enter input loop (see below)
|
||||
* Enter [input loop](#input-loop)
|
||||
* ...
|
||||
* Destroy window (A2D_DESTROY_WINDOW)
|
||||
* Redraw desktop icons (DESKTOP_REDRAW_ICONS)
|
||||
@ -61,10 +61,10 @@ optional _resize box_ and optional _scroll bars_.
|
||||
* RTS
|
||||
|
||||
> NOTE: Movable windows must maintain an _offscreen_flag_. If a window is moved so that the
|
||||
> client area is entirely offscreen then various operations should be skiped because
|
||||
> client area is entirely offscreen then various operations should be skipped because
|
||||
> the window's box coordinates will not be set correctly.
|
||||
|
||||
#### Input Loop
|
||||
#### Input Loop {#input-loop}
|
||||
|
||||
* Call A2D_GET_INPUT.
|
||||
* If a key (A2D_INPUT_KEY), then check modifiers (Open/Closed Apple) and key code, ignore or take action.
|
||||
@ -72,14 +72,14 @@ optional _resize box_ and optional _scroll bars_.
|
||||
* Check target window id. If not a match, ignore.
|
||||
* Check target element.
|
||||
* If close box (A2D_ELEM_CLOSE) then call A2D_CLOSE_CLICK; if not aborted, exit the DA, otherwise ignore.
|
||||
* If title bar (A2D_ELEM_TITLE) then initiate window drag (see below).
|
||||
* If resize box (A2D_ELEM_RESIZE) then initiate window resize (see below).
|
||||
* If title bar (A2D_ELEM_TITLE) then initiate [window drag](#drag).
|
||||
* If resize box (A2D_ELEM_RESIZE) then initiate [window resize](#resize).
|
||||
* If not client area (A2D_ELEM_CLIENT) then it's either the desktop or menu; ignore.
|
||||
* Call A2D_QUERY_CLIENT.
|
||||
* If part is a scrollbar (A2D_VSCROLL or A2D_HSCROLL) then initiate a scroll (see below).
|
||||
* If part is a scrollbar (A2D_VSCROLL or A2D_HSCROLL) then initiate a [scroll](#scroll).
|
||||
* Handle a client click using custom logic.
|
||||
|
||||
#### Window Drag
|
||||
#### Window Drag {#drag}
|
||||
|
||||
* Call A2D_DRAG_WINDOW.
|
||||
* Call JUMP_TABLE_REDRAW_ALL.
|
||||
@ -88,7 +88,7 @@ optional _resize box_ and optional _scroll bars_.
|
||||
* If _offscreen flag_ is not set, redraw window.
|
||||
|
||||
|
||||
#### Window Resize
|
||||
#### Window Resize {#resize}
|
||||
|
||||
* Call A2D_DRAG_RESIZE.
|
||||
* Call JUMP_TABLE_REDRAW_ALL.
|
||||
@ -96,7 +96,7 @@ optional _resize box_ and optional _scroll bars_.
|
||||
* Call A2D_RESIZE_WINDOW if needed to adjust scroll bar settings. (Details TBD).
|
||||
* Redraw window.
|
||||
|
||||
#### Window Scroll
|
||||
#### Window Scroll {#scroll}
|
||||
|
||||
|
||||
### Drawing Operations
|
||||
|
Loading…
x
Reference in New Issue
Block a user