DmabufFormats

The gdk.dmabuf_formats.DmabufFormats struct provides information about supported DMA buffer formats.

You can query whether a given format is supported with gdk.dmabuf_formats.DmabufFormats.contains and you can iterate over the list of all supported formats with gdk.dmabuf_formats.DmabufFormats.getNFormats and gdk.dmabuf_formats.DmabufFormats.getFormat.

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 gdk.dmabuf_texture_builder.DmabufTextureBuilder for more information about DMA buffers.

Note that DMA buffers only exist on Linux.

Members

Functions

contains
bool contains(uint fourcc, ulong modifier)

Returns whether a given format is contained in formats.

equal
bool equal(gdk.dmabuf_formats.DmabufFormats formats2)

Returns whether formats1 and formats2 contain the same dmabuf formats, in the same order.

getFormat
void getFormat(size_t idx, uint fourcc, ulong modifier)

Gets the fourcc code and modifier for a format that is contained in formats.

getNFormats
size_t getNFormats()

Returns the number of formats that the formats object contains.

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.