package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gsk/Ocgtk_gsk/Gsk/Wrappers/Renderer/index.html
Module Wrappers.Renderer
type t = [ `renderer | `object_ ] Gobject.objval new_for_surface : Ocgtk_gdk.Gdk.Wrappers.Surface.t -> tCreate a new Renderer
val unrealize : t -> unitReleases all the resources created by gsk_renderer_realize().
val render_texture :
t ->
[ `render_node ] Gobject.obj ->
Ocgtk_graphene.Graphene.Wrappers.Rect.t option ->
Ocgtk_gdk.Gdk.Wrappers.Texture.tRenders the scene graph, described by a tree of `GskRenderNode` instances, to a `GdkTexture`.
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.
val render :
t ->
[ `render_node ] Gobject.obj ->
Ocgtk_cairo.Cairo.Wrappers.Region.t option ->
unitRenders 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.
val realize_for_display :
t ->
Ocgtk_gdk.Gdk.Wrappers.Display.t ->
(bool, GError.t) resultCreates the resources needed by the @renderer to render the scene graph.
Note that it is mandatory to call method@Gsk.Renderer.unrealize before destroying the renderer.
val realize :
t ->
Ocgtk_gdk.Gdk.Wrappers.Surface.t option ->
(bool, GError.t) resultCreates the resources needed by the @renderer to render the scene graph.
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 instead.
Note that it is mandatory to call method@Gsk.Renderer.unrealize before destroying the renderer.
val is_realized : t -> boolChecks whether the @renderer is realized or not.
val get_surface : t -> Ocgtk_gdk.Gdk.Wrappers.Surface.t optionRetrieves the `GdkSurface` set using gsk_enderer_realize().
If the renderer has not been realized yet, %NULL will be returned.
val get_realized : t -> boolGet property: realized