Basics
Guides
API Reference
Basics
Guides
API Reference
[207:14] static extends: object
Generated metadata helpers for Renderer class surfaces.
properties ()
Returns property metadata for
Renderer.
A list.[18:7] extends: object
Renders a scene graph defined via a tree of [class@Gsk.RenderNode] instances.
Typically you will use a GskRenderer instance to repeatedly call
[method@Gsk.Renderer.render] to update the contents of its associated
[class@Gdk.Surface]. It is necessary to realize a GskRenderer instance
using [method@Gsk.Renderer.realize] before calling
[method@Gsk.Renderer.render], in order to create the appropriate windowing
system resources needed to render the scene.
Renderer (surface = null)
Creates an appropriate
GskRendererinstance for the given surface. If theGSK_RENDERERenvironment variable is set, GSK will try that renderer first, before trying the backend-specific default. The ultimate fallback is the cairo renderer. The renderer will be realized before it is returned.
surface is a surface.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asObject ()
Wraps this handle as
Object.
A Object object.get_surface ()
Retrieves the surface that the renderer is associated with. If the renderer has not been realized yet,
NULLwill be returned.
is_realized ()
Checks whether the renderer is realized or not.
realize (object surface)
Creates the resources needed by the renderer. Since GTK 4.6, the surface may be
NULL, which allows using renderers without having to create a surface. Since GTK 4.14, it is recommended to use [method@Gsk.Renderer.realize_for_display] for this case. Note that it is mandatory to call [method@Gsk.Renderer.unrealize] before destroying the renderer.
surface is the surface that renderer will be used on.realize_for_display (object display)
Creates the resources needed by the renderer. Note that it is mandatory to call [method@Gsk.Renderer.unrealize] before destroying the renderer.
display is the display that the renderer will be used on.render (object root, object region)
Renders the scene graph, described by a tree of
GskRenderNodeinstances to the renderer's surface, ensuring that the given region gets redrawn. If the renderer has no associated surface, this function does nothing. Renderers must ensure that changes of the contents given by the @root node as well as the area given by @region are redrawn. They are however free to not redraw any pixel outside of @region if they can guarantee that it didn't change. The renderer will acquire a reference on theGskRenderNodetree while the rendering is in progress.
root is the render node to render.region is the cairo_region_t that must be redrawn or NULL for the whole surface.None.render_texture (object root, object viewport)
Renders a scene graph, described by a tree of
GskRenderNodeinstances, to a texture. The renderer will acquire a reference on theGskRenderNodetree while the rendering is in progress. If you want to apply any transformations to @root, you should put it into a transform node and pass that node instead.
root is the render node to render.viewport is the section to draw or NULL to use @root's bounds.unrealize ()
Releases all the resources created by [method@Gsk.Renderer.realize].
None.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.