Signal
GdkWindow::create-surface
since: 3.0
Declaration
cairo_surface_t*
create_surface (
GdkWindow* self,
gint width,
gint height,
gpointer user_data
)
Description [src]
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
gdk_offscreen_window_get_surface()
will lead to a crash.
Default handler: The default handler is called after the handlers added via |
Available since: 3.0 |
Parameters
width
-
Type:
gint
The width of the offscreen surface to create.
height
-
Type:
gint
The height of the offscreen surface to create.
Return value
Type: cairo_surface_t
The newly created #cairo_surface_t for the offscreen window.
The caller of the function takes ownership of the data, and is responsible for freeing it. |