This commit is contained in:
Joshua Bell 2017-09-24 16:16:36 -07:00
parent 1d51caeea0
commit bd667a7291

View File

@ -12,7 +12,7 @@ There are three distinct API classes that need to be used:
#### Box #### 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 .word left pixels from screen left edge
@ -51,7 +51,7 @@ optional _resize box_ and optional _scroll bars_.
* Create window (A2D_CREATE_WINDOW) * Create window (A2D_CREATE_WINDOW)
* Draw everything * Draw everything
* Call $2B (no idea what this does!) * Call $2B (no idea what this does!)
* Enter input loop (see below) * Enter [input loop](#input-loop)
* ... * ...
* Destroy window (A2D_DESTROY_WINDOW) * Destroy window (A2D_DESTROY_WINDOW)
* Redraw desktop icons (DESKTOP_REDRAW_ICONS) * Redraw desktop icons (DESKTOP_REDRAW_ICONS)
@ -61,10 +61,10 @@ optional _resize box_ and optional _scroll bars_.
* RTS * RTS
> NOTE: Movable windows must maintain an _offscreen_flag_. If a window is moved so that the > 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. > the window's box coordinates will not be set correctly.
#### Input Loop #### Input Loop {#input-loop}
* Call A2D_GET_INPUT. * Call A2D_GET_INPUT.
* If a key (A2D_INPUT_KEY), then check modifiers (Open/Closed Apple) and key code, ignore or take action. * 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 window id. If not a match, ignore.
* Check target element. * Check target element.
* If close box (A2D_ELEM_CLOSE) then call A2D_CLOSE_CLICK; if not aborted, exit the DA, otherwise ignore. * 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 title bar (A2D_ELEM_TITLE) then initiate [window drag](#drag).
* If resize box (A2D_ELEM_RESIZE) then initiate window resize (see below). * 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. * If not client area (A2D_ELEM_CLIENT) then it's either the desktop or menu; ignore.
* Call A2D_QUERY_CLIENT. * 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. * Handle a client click using custom logic.
#### Window Drag #### Window Drag {#drag}
* Call A2D_DRAG_WINDOW. * Call A2D_DRAG_WINDOW.
* Call JUMP_TABLE_REDRAW_ALL. * Call JUMP_TABLE_REDRAW_ALL.
@ -88,7 +88,7 @@ optional _resize box_ and optional _scroll bars_.
* If _offscreen flag_ is not set, redraw window. * If _offscreen flag_ is not set, redraw window.
#### Window Resize #### Window Resize {#resize}
* Call A2D_DRAG_RESIZE. * Call A2D_DRAG_RESIZE.
* Call JUMP_TABLE_REDRAW_ALL. * 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). * Call A2D_RESIZE_WINDOW if needed to adjust scroll bar settings. (Details TBD).
* Redraw window. * Redraw window.
#### Window Scroll #### Window Scroll {#scroll}
### Drawing Operations ### Drawing Operations