3.4 <GdkDmabufFormats>

Structure: <GdkDmabufFormats>

Provides information about supported DMA buffer formats.

You can query whether a given format is supported with dmabuf-formats:contains? and you can iterate over the list of all supported formats with dmabuf-formats:get-n-formats and dmabuf-formats: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 <GdkDmabufTextureBuilder> for more information about DMA buffers.

Note that DMA buffers only exist on Linux.

Procedures

Method: dmabuf-formats:contains? self fourcc modifier ⇒ %return
Method: contains? self fourcc modifier ⇒ %return

Returns whether a given format is contained in self.

self

Passed: a <GdkDmabufFormats>.

a <GdkDmabufFormats>

fourcc

Passed: an unsigned 32-bit integer.

a format code

modifier

Passed: an unsigned 64-bit integer.

a format modifier

%return

Returned: a boolean.

TRUE if the format specified by the arguments is part of self

Method: dmabuf-formats:equal? self [formats2] ⇒ %return
Method: equal? self [formats2] ⇒ %return

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

self

Passed: a <GdkDmabufFormats>.

a <GdkDmabufFormats>

formats2

Passed, or left out: a <GdkDmabufFormats>, or #f.

another <GdkDmabufFormats>

%return

Returned: a boolean.

TRUE if self and formats2 are equal

Method: dmabuf-formats:get-format self idx ⇒ fourcc modifier
Method: get-format self idx ⇒ fourcc modifier

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

self

Passed: a <GdkDmabufFormats>.

a <GdkDmabufFormats>

idx

Passed: an unsigned 64-bit integer.

the index of the format to return

fourcc

Returned: an unsigned 32-bit integer.

return location for the format code

modifier

Returned: an unsigned 64-bit integer.

return location for the format modifier

Method: dmabuf-formats:get-n-formats self ⇒ %return
Method: get-n-formats self ⇒ %return

Returns the number of formats that the self object contains.

Note that DMA buffers are a Linux concept, so on other platforms, dmabuf-formats:get-n-formats will always return zero.

self

Passed: a <GdkDmabufFormats>.

a <GdkDmabufFormats>

%return

Returned: an unsigned 64-bit integer.

the number of formats

Method: dmabuf-formats:ref self ⇒ %return
Method: ref self ⇒ %return

Increases the reference count of self.

self

Passed: a <GdkDmabufFormats>.

a <GdkDmabufFormats>

%return

Returned: a <GdkDmabufFormats>.

the passed-in object

Method: dmabuf-formats:unref self
Method: unref self

Decreases the reference count of self.

When the reference count reaches zero, the object is freed.

self

Passed: a <GdkDmabufFormats>.

a <GdkDmabufFormats>