All Manuals > CLIM 2.0 User Guide > 18 Sheets

18.8 Repaint Protocol

The repaint protocol is the mechanism whereby a program keeps the display up-to-date, reflecting the results of both synchronous and asynchronous events. The repaint mechanism may be invoked by user programs each time through their top-level command loop. It may also be invoked directly or indirectly as a result of events received from the display server host. For example, if a window is on display with another window overlapping it and the second window is buried, a "damage notification" event may be sent by the server. CLIM would then cause a repaint to be executed for the newly-exposed region.

18.8.1 Repaint Protocol Functions

queue-repaint Generic Function

queue-repaint sheet region

Summary: Requests that a repaint event for the region region be placed in the input queue of the sheet sheet. A program that reads events out of the queue will be expected to call handle-event for the repaint region; the method for that generic function on repaint events will generally call repaint-sheet.

handle-repaint Generic Function

handle-repaint sheet region

Summary: Implements repainting for a given sheet class. It may only be called on a sheet that has an associated medium. sheet and region are as for dispatch-repaint.

repaint-sheet Generic Function

repaint-sheet sheet medium region

Summary: Recursively causes repainting of the sheet sheet and any of its children that overlap the region region. medium is the medium to use for the repainting; if it is nil, handle-repaint will allocate a medium and associate it with the sheet. handle-repaint will call repaint-sheet on sheet, and then call handle-repaint on all of the children of sheet.

18.8.2 Repaint Protocol Classes

standard-repainting-mixin Class

Summary: Defines a dispatch-repaint method that calls queue-repaint.

immediate-repainting-mixin Class

Summary: Defines a dispatch-repaint method that calls handle-repaint.

mute-repainting-mixin Class

Summary: Defines a dispatch-repaint method that calls queue-repaint, and a method on repaint-sheet that does nothing. This means that its children will be recursively repainted when the repaint event is handled.


CLIM 2.0 User Guide - 01 Dec 2021 19:39:01