Window.addOnCreateSurface

The ::create-surface signal is emitted when an offscreen window needs its surface (re)created, which happens either when the window is first drawn to, or when the window is being resized. The first signal handler that returns a non-NULL 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 OffscreenWindow.getSurface will lead to a crash.

class Window
gulong
addOnCreateSurface
(
Surface delegate
(
int
,
int
,)
dlg
,
ConnectFlags connectFlags = cast(ConnectFlags)0
)

Return Value

Type: gulong

the newly created cairo_surface_t for the offscreen window

Meta