Page 70 Table of Contents Index Page 72
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 9. PORTS, GRAFTS, AND MIRRORED SHEETS

the port port. All pending input events are discarded. Server resources may or may not be
released and reallocated during or after this action.

=> destroy-port port [Generic Function]
Destroys the connection with the window server represented by the port port. All sheet hierar-
chies that are associated with port are forcibly degrafted by disowning the children of grafts on
port using sheet-disown-child. All server resources utilized by such hierarchies or by any graphics
objects on port are released as part of the connection shutdown.

=> add-watcher port watcher [Generic Function]
=> delete-watcher port watcher [Generic Function]
=> reset-watcher watcher how [Generic Function]
Watchers are a mechanism for clients to be notified when the port is destroyed or restarted. add-
watcher
and delete-watcher provide an interface for adding and removing watcher to the list of
watchers that the port port maintains. destroy-port and restart-port invoke reset-watcher
on each of these watchers with :destroy and :restart being passed in as how, respectively.

Minor issue: What exactly is a watcher? The above is not specific enough. | SWM

9.3 Grafts

A graft is a special sheet that is directly connected to a display server. Typically, a graft is the
CLIM sheet that represents the root window of the display. There may be several grafts that
are all attached to the same root window; these grafts may have differing coordinate systems.

To display a sheet on a display, it must have a graft for an ancestor. In addition, the sheet and
all of its ancestors must be enabled, including the graft. In general, a sheet becomes grafted
when it (or one of its ancestors) is adopted by a graft.

=> sheet-grafted-p sheet [Generic Function]
Returns true if any of the sheet's ancestors is a graft, otherwise returns false.

=> find-graft &key (port (find-port)) (server-path *default-server-path*) (orientation :default)
(units
:device) [Function]
Finds a graft that represents the display device on the port port that also matches the other
supplied parameters. If no such graft exists, a new graft is constructed and returned.

If server-path is supplied, find-graft finds a graft whose port provides a connection to the
window server addressed by server-path.

It is an error to provide both port and server-path in a call to find-graft.

orientation specifies the orientation of the graft's coordinate system. Supported values are
:default and :graphics, which have the meanings describe below:


Page 70 Table of Contents Index Page 72
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