Compilation Units
Tagged Types
Provides information about supported DMA buffer formats.
You can query whether a given format is supported with [methodGdk.DmabufFormats.contains] and you can iterate over the list of all supported formats with [methodGdk.DmabufFormats.get_n_formats] and [methodGdk.DmabufFormats.get_format].
The list of supported formats is sorted by preference, with the best formats coming first.
The list may contains (format, modifier) pairs where the modifier is DMA_FORMAT_MOD_INVALID, indicating that implicit modifiers may be used with this format.
See [classGdk.DmabufTextureBuilder] for more information about DMA buffers.
Note that DMA buffers only exist on Linux.
function Contains
(Self : Gdk_Dmabuf_Formats;
Fourcc : Guint32;
Modifier : Guint64) return Boolean
Returns whether a given format is contained in Formats. Since: gtk+ 4.14
a format code
a format modifier
TRUE if the format specified by the arguments is part of Formats
function Equal
(Self : Gdk_Dmabuf_Formats;
Formats2 : Gdk_Dmabuf_Formats) return Boolean
Returns whether Formats1 and Formats2 contain the same dmabuf formats, in the same order. Since: gtk+ 4.14
another GdkDmabufFormats
TRUE if Formats1 and Formats2 are equal
function From_Object (Object : System.Address) return Gdk_Dmabuf_Formats
function From_Object_Free (B : access Gdk_Dmabuf_Formats'Class) return Gdk_Dmabuf_Formats
type Gdk_Dmabuf_Formats is new Glib.C_Boxed with null record;
procedure Get_Format
(Self : Gdk_Dmabuf_Formats;
Idx : Gsize;
Fourcc : out Guint32;
Modifier : out Guint64)
Gets the fourcc code and modifier for a format that is contained in Formats. Since: gtk+ 4.14
the index of the format to return
return location for the format code
return location for the format modifier
function Get_N_Formats (Self : Gdk_Dmabuf_Formats) return Gsize
Returns the number of formats that the Formats object contains. Note that DMA buffers are a Linux concept, so on other platforms, [methodGdk.DmabufFormats.get_n_formats] will always return zero. Since: gtk+ 4.14
the number of formats
function Get_Type return Glib.GType
Null_Gdk_Dmabuf_Formats : constant Gdk_Dmabuf_Formats;
function Ref (Self : Gdk_Dmabuf_Formats) return Gdk_Dmabuf_Formats
Increases the reference count of Formats. Since: gtk+ 4.14
the passed-in object. Has transfer-ownership='full'.
procedure Unref (Self : Gdk_Dmabuf_Formats)
Decreases the reference count of Formats. When the reference count reaches zero, the object is freed. Since: gtk+ 4.14