Page 65 Table of Contents Index Page 67
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E



CHAPTER 8. SHEET PROTOCOLS

permanently associated medium can be much more lightweight than they otherwise would be.
For example, in a program that creates a sheet for the purpose of displaying a border for another
sheet, the border sheet receives output only when the window's shape is changed.

To associate a sheet with a medium, the macro with-sheet-medium is used.

=> with-sheet-medium (medium sheet) &body body [Macro]
Within the body, the variable medium is bound to the sheet's medium. If the sheet does not
have a medium permanently allocated, one will be allocated, associated with the sheet for the
duration of the body, and deallocated as the when the body has been exited. The values of the
last form of the body are returned as the values of with-sheet-medium.

The medium argument is not evaluated, and must be a symbol that is bound to a medium. body
may have zero or more declarations as its first forms.

=> with-sheet-medium-bound (sheet medium) &body body [Macro]
with-sheet-medium-bound is used to associate the specific medium medium with the sheet sheet
for the duration of the body body. Typically, a single medium will be allocated an passed to
several different sheets that can use the same medium.

If the sheet already has a medium allocated to it, the new medium will not be given to the sheet.
If the value of medium is nil, with-sheet-medium-bound is exactly equivalent to with-sheet-
medium
. The values of the last form of the body are returned as the values of with-sheet-
medium-bound
.

body may have zero or more declarations as its first forms.

=> sheet-medium sheet [Generic Function]
Returns the medium associated with the sheet sheet. If sheet does not have a medium allocated
to it, sheet-medium returns nil.

8.4 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 cause a repaint
to be executed for the newly-exposed region.


Page 65 Table of Contents Index Page 67
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E