package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Dmabuf_texture_builder

type t = [ `dmabuf_texture_builder | `object_ ] Gobject.obj
val new_ : unit -> t

Create a new DmabufTextureBuilder

val set_width : t -> int -> unit

Sets the width of the texture.

The width must be set before calling method@Gdk.GLTextureBuilder.build.

val set_update_texture : t -> [ `texture | `object_ ] Gobject.obj option -> unit

Sets the texture to be updated by this texture. See method@Gdk.DmabufTextureBuilder.set_update_region for an explanation.

val set_update_region : t -> Ocgtk_cairo.Cairo.Wrappers.Region.t option -> unit

Sets the region to be updated by this texture. Together with property@Gdk.DmabufTextureBuilder:update-texture this describes an update of a previous texture.

When rendering animations of large textures, it is possible that consecutive textures are only updating contents in parts of the texture. It is then possible to describe this update via these two properties, so that GTK can avoid rerendering parts that did not change.

An example would be a screen recording where only the mouse pointer moves.

val set_stride : t -> int -> int -> unit

Sets the stride for a plane.

The stride must be set for all planes before calling method@Gdk.GLTextureBuilder.build.

val set_premultiplied : t -> bool -> unit

Sets whether the data is premultiplied.

Unless otherwise specified, all formats including alpha channels are assumed to be premultiplied.

val set_offset : t -> int -> int -> unit

Sets the offset for a plane.

val set_n_planes : t -> int -> unit

Sets the number of planes of the texture.

val set_modifier : t -> UInt64.t -> unit

Sets the modifier.

val set_height : t -> int -> unit

Sets the height of the texture.

The height must be set before calling method@Gdk.GLTextureBuilder.build.

val set_fourcc : t -> UInt32.t -> unit

Sets the format of the texture.

The format is specified as a fourcc code.

The format must be set before calling method@Gdk.GLTextureBuilder.build.

val set_fd : t -> int -> int -> unit

Sets the file descriptor for a plane.

val set_display : t -> [ `display | `object_ ] Gobject.obj -> unit

Sets the display that this texture builder is associated with.

The display is used to determine the supported dma-buf formats.

val get_width : t -> int

Gets the width previously set via gdk_dmabuf_texture_builder_set_width() or 0 if the width wasn't set.

val get_update_texture : t -> [ `texture | `object_ ] Gobject.obj option

Gets the texture previously set via gdk_dmabuf_texture_builder_set_update_texture() or %NULL if none was set.

val get_update_region : t -> Ocgtk_cairo.Cairo.Wrappers.Region.t option

Gets the region previously set via gdk_dmabuf_texture_builder_set_update_region() or %NULL if none was set.

val get_stride : t -> int -> int

Gets the stride value for a plane.

val get_premultiplied : t -> bool

Whether the data is premultiplied.

val get_offset : t -> int -> int

Gets the offset value for a plane.

val get_n_planes : t -> int

Gets the number of planes.

val get_modifier : t -> UInt64.t

Gets the modifier value.

val get_height : t -> int

Gets the height previously set via gdk_dmabuf_texture_builder_set_height() or 0 if the height wasn't set.

val get_fourcc : t -> UInt32.t

Gets the format previously set via gdk_dmabuf_texture_builder_set_fourcc() or 0 if the format wasn't set.

The format is specified as a fourcc code.

val get_fd : t -> int -> int

Gets the file descriptor for a plane.

val get_display : t -> [ `display | `object_ ] Gobject.obj

Returns the display that this texture builder is associated with.