It derives from <GObject>.
Renders a scene graph defined via a tree of
<GskRenderNode> instances.
Typically you will use a <GskRenderer> instance
to repeatedly call renderer:render to
update the contents of its associated
<GdkSurface>.
It is necessary to realize a <GskRenderer>
instance using renderer:realize? before
calling renderer:render, in order to
create the appropriate windowing system resources needed to render the
scene.
Whether the renderer has been associated with a surface or draw context.
Its value is a boolean.
It is read only.
The surface associated with renderer.
Its value is a <GdkSurface>, or #f.
It is read only.
Retrieves the surface that the renderer is associated with.
If the renderer has not been realized yet, NULL will be returned.
Passed: a <GskRenderer>.
a renderer
Returned: a <GdkSurface>, or #f.
the surface
Checks whether the renderer is realized or not.
Passed: a <GskRenderer>.
a renderer
Returned: a boolean.
true if the renderer was realized, false otherwise
Creates an appropriate <GskRenderer> instance for
the given surface.
If the GSK_RENDERER environment 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.
Passed: a <GdkSurface>.
a surface
Returned: a <GskRenderer>, or #f.
the realized renderer
Creates the resources needed by the renderer.
Note that it is mandatory to call renderer:unrealize before destroying the renderer.
Passed: a <GskRenderer>.
a renderer
Passed: a <GdkDisplay>.
the display that the renderer will be used on
Returned: a boolean.
whether the renderer was successfully realized
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 renderer:realize-for-display? for this case.
Note that it is mandatory to call renderer:unrealize before destroying the renderer.
Passed: a <GskRenderer>.
a renderer
Passed, or left out: a <GdkSurface>, or
#f.
the surface that renderer will be used on
Returned: a boolean.
whether the renderer was successfully realized
Renders the scene graph, described by a tree of
<GskRenderNode> instances 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 the
<GskRenderNode> tree while the rendering is in
progress.
Passed: a <GskRenderer>.
a realized renderer
Passed: a <GskRenderNode>.
the render node to render
Passed, or left out: a <CairoRegion>, or
#f.
the <CairoRegion> that must be redrawn or
NULL for the whole surface
Renders a scene graph, described by a tree of
<GskRenderNode> instances, to a texture.
The renderer will acquire a reference on the
<GskRenderNode> tree 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.
Passed: a <GskRenderer>.
a realized renderer
Passed: a <GskRenderNode>.
the render node to render
Passed, or left out: a <GrapheneRect>, or
#f.
the section to draw or NULL to use root’s bounds
Returned: a <GdkTexture>.
a texture with the rendered contents of root
Releases all the resources created by renderer:realize?.
Passed: a <GskRenderer>.
a renderer