diff options
author | Daniel Kochmański <daniel@turtleware.eu> | 2022-10-12 21:31:03 +0200 |
---|---|---|
committer | Daniel Kochmański <daniel@turtleware.eu> | 2022-10-14 21:26:22 +0200 |
commit | aa844940a093c3d33a884ebaea0987b2d7b0d6ad (patch) | |
tree | 4e7f1207bb4fc11aa3c8310a4cb99d0bbcad1b65 /Libraries | |
parent | 86aa9d156b749ff9d844a5be816511f75838eb62 (diff) |
core: remodel the input and repaint handling
Previously we had conflated both event-queue and repaint-queue. This commit
changes how the repaint protocol works; other changes are made to fit this
model. Conceptually the port dispatches the event, and the event handler or user
code dispatches the repaint.
1. All repaint protocol functions operate on regions (and not events)
This is for consistency and to emphasize the difference between repaint and
ordinary input. The function QUEUE-REPAINT (in the spec) doesn't make much
sense because it basically replicates QUEUE-EVENT functionality. Now it
accepts the region instead of an event.
2. Handling the repaint is always done by calling REPAINT-SHEET
Repaint sheet is always called when the sheet is about to be repainted. This
is to account for possible transparent inks (i.e antialiasing in text).
HANDLE-REPAINT is a method responsible for drawing on a particular sheet,
REPAINT-SHEET is responsible for calling it (and REPAINT-SHEET on children).
3. DISPATCH-REPAINT is responsible for "refreshing" the output
When a code i.e in the event handler or in the command wants some part of the
screen to be redrawn, then they should always call DISPATCH-REPAINT; this
method is responsible for calling either QUEUE-REPAINT or REPAINT-SHEET based
on the drawing model (i.e the repainting mixin). User code should never call
neither QUEUE-REPAINT nor REPAINT-SHEET directly.
4. {STANDARD,IMMEDIATE}-SHEET-REPAINTING-MIXIN reorientation
Previously in STANDARD-SHEET-REPAINTING-MIXIN the method DISPATCH-REPAINT
called QUEUE-REPAINT that called QUEUE-EVENT basically populating the event
queue and treating it the same as the repaint queue. Currently it is expected
to populate a separate queue for repaints.
handle-event sheet repaint-event
dispatch-repaint sheet region
queue-repaint sheet region
The role of what previously STANDARD-SHEET-REPAINTING-MIXIN did is taken by
the IMMEDIATE-SHEET-REPAINTING-MIXIN.
handle-event sheet repaint-event
dispatch-repaint sheet region
repaint-sheet sheet region
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/ESA/esa.lisp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/ESA/esa.lisp b/Libraries/ESA/esa.lisp index 99940c70..2242c103 100644 --- a/Libraries/ESA/esa.lisp +++ b/Libraries/ESA/esa.lisp @@ -117,7 +117,7 @@ current message was set.")) (defun display-minibuffer (frame pane) (declare (ignore frame)) - (handle-repaint pane +everywhere+)) + (dispatch-repaint pane +everywhere+)) (defmethod stream-accept :around ((pane minibuffer-pane) type &rest args) (declare (ignore args)) |