Package: gdk

Class gdk-window

Superclasses

g-object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

None

Direct Slots

cursor
The cursor property of type gdk-cursor (Read / Write)
The mouse pointer for a GDK window.

Details

Onscreen display areas in the target window system.

A gdk-window object is a usually rectangular region on the screen. It is a low-level object, used to implement high-level objects such as gtk-widget and gtk-window widgets on the GTK level. A gtk-window widget is a toplevel window, the thing a user might think of as a "window" with a titlebar and so on. A gtk-window widget may contain many gdk-window objects. For example, each gtk-button widget has a gdk-window object associated with it.

Composited Windows
Normally, the windowing system takes care of rendering the contents of a child window onto its parent window. This mechanism can be intercepted by calling the function gdk-window-composited on the child window. For a composited window it is the responsibility of the application to render the window contents at the right spot.

Offscreen Windows
Offscreen windows are more general than composited windows, since they allow not only to modify the rendering of the child window onto its parent, but also to apply coordinate transformations.

To integrate an offscreen window into a window hierarchy, one has to call the function gdk-offscreen-window-set-embedder and handle a number of signals. The "pick-embedded-child" signal on the embedder window is used to select an offscreen child at given coordinates, and the "to-embedder" and "from-embedder" signals on the offscreen window are used to translate coordinates between the embedder and the offscreen window.

For rendering an offscreen window onto its embedder, the contents of the offscreen window are available as a surface, via the function gdk-offscreen-window-surface.

Signal Details

The "create-surface" signal
 lambda (window width height)    : Run Last      
The "create-surface" signal is emitted when an offscreen window needs its surface (re)created, which happens either when the the window is first drawn to, or when the window is being resized. The first signal handler that returns a non-nil surface will stop any further signal emission, and its surface will be used. Note that it is not possible to access the window's previous surface from within any callback of this signal. Calling the function gdk-offscreen-window-surface will lead to a crash.
window
The gdk-window offscreen window on which the signal is emitted.
width
A :int with the width of the offscreen surface to create.
height
A :int with the height of the offscreen surface to create.
Returns
The newly created cairo-surface-t instance for the offscreen window.
The "from-embedder" signal
 lambda (window embedder-x embedder-y offscreen-x offscreen-y)    : Run Last      
The "from-embedder" signal is emitted to translate coordinates in the embedder of an offscreen window to the offscreen window. See also the "to-embedder" signal.
window
The gdk-window offscreen window on which the signal is emitted.
embedder-x
A :double with the x coordinate in the embedder window.
embedder-y
A :double with the y coordinate in the embedder window.
offscreen-x
Return location of type :double for the x coordinate in the offscreen window.
offscreen-y
Return location of type :double for the y coordinate in the offscreen window.
The "moved-to-rect" signal
 lambda (window flipped-rect final-rect flipped-x flipped-y)    : Run First      
Emitted when the position of window is finalized after being moved to a destination rectangle. window might be flipped over the destination rectangle in order to keep it on-screen, in which case flipped-x and flipped-y will be set to true accordingly. flipped-rect is the ideal position of window after any possible flipping, but before any possible sliding. final-rect is flipped-rect, but possibly translated in the case that flipping is still ineffective in keeping window on-screen. Since 3.22
window
The gdk-window object that moved.
flipped-rect
The position of window after any possible flipping or nil if the backend can't obtain it.
final-rect
The final position of window or NULL if the backend can't obtain it.
flipped-x
True if the anchors were flipped horizontally.
flipped-y
True if the anchors were flipped vertically.
The "pick-embedded-child" signal
 lambda (window x y)    : Run Last      
The "pick-embedded-child" signal is emitted to find an embedded child at the given position.
window
The gdk-window object on which the signal is emitted.
x
A :double with the x coordinate in the window.
y
A :douboe with the y coordinate in the window.
Returns
The gdk-window of the embedded child at x, y, or nil.
The "to-embedder" signal
 lambda (window offscreen-x offscreen-y embedder-x embedder-y)    : Run Last      
The "to-embedder" signal is emitted to translate coordinates in an offscreen window to its embedder. See also the "from-embedder" signal.
window
The gdk-window offscreen window on which the signal is emitted.
offscreen-x
A :double with the x coordinate in the offscreen window.
offscreen-y
A :double with the y coordinate in the offscreen window.
embedder-x
Return location of type :double for the x coordinate in the embedder window.
embedder-y
Return location of type :double for the y coordinate in the embedder window.
 

Slot Access Functions

Inherited Slot Access Functions

See also

2020-9-7