8.4 Repaint Protocol

  • 8.4.1 Repaint Protocol Functions
  • 8.4.2 Repaint Protocol Classes
  • 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 cause a repaint to be executed for the newly-exposed region. [annotate]

    8.4.1 Repaint Protocol Functions

    queue-repaint  sheet repaint-event [Generic Function]
              

    Requests that the repaint event repaint-event 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 sheet using the repaint region gotten from repaint-event. [annotate]

    [annotate]

    Note: Passing the repaint-event as a region (in native coordinates), would be more consistent. Oh well. [edit]-- DK 2022-05-13 17:56Z
     
    Note:

    After another look - this queue-repaint method doesn't make any sense. It is specified to do exactly the same thing as queue-event does, except that it narrows further the specialization.

    It should be: [queue-repaint sheet region]

    Requests the repaint placed in the repaint queue of the sheet. A program that reads events out of the queue will be expected to call repaint-sheet.

    [edit]-- DK 2022-09-15 08:14Z
     

    handle-repaint  sheet region [Generic Function]
              

    Implements repainting for a given sheet class. sheet is the sheet to repaint and region is the region to repaint. [annotate]

    [annotate]

    repaint-sheet  sheet region [Generic Function]
              

    Recursively causes repainting of the sheet sheet and any of its descendants that overlap the region region. [annotate]

    All CLIM implementations must support repainting for regions that are rectangles or region sets composed entirely of rectangles. [annotate]

    [annotate]

    8.4.2 Repaint Protocol Classes

    The following classes implement the standard repaint protocols. None of the three following classes is instantiable. [annotate]

    standard-repainting-mixin   [Class]
              

    Defines a dispatch-repaint method that calls queue-repaint. [annotate]

    [annotate]

    immediate-repainting-mixin   [Class]
              

    Defines a dispatch-repaint method that calls handle-repaint. [annotate]

    [annotate]

    Note: s/handle-repaint/repaint-sheet/ [edit]-- DK 2022-09-15 07:59Z
     

    sheet-mute-repainting-mixin   [Class]
              

    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. [annotate]

    Note: Note that this implies that an :AROUND, :BEFORE, or :AFTER method on REPAINT-SHEET exists that arranges for child sheets to be repainted... Or that it really means a method on HANDLE-REPAINT that does nothing. [edit]-- Alastair Bridgewater 2015-06-27 14:27Z
     

    [annotate]