gi-gdk4-4.0.10: Gdk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gdk.Structs.DmabufFormats

Description

Provides information about supported DMA buffer formats.

You can query whether a given format is supported with dmabufFormatsContains and you can iterate over the list of all supported formats with dmabufFormatsGetNFormats and dmabufFormatsGetFormat.

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

Note that DMA buffers only exist on Linux.

Since: 4.14

Synopsis

Exported types

Methods

Click to display all available methods, including inherited ones

Expand

Methods

contains, equal, ref, unref.

Getters

getFormat, getNFormats.

Setters

None.

contains

dmabufFormatsContains Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> DmabufFormats

formats: a GdkDmabufFormats

-> Word32

fourcc: a format code

-> Word64

modifier: a format modifier

-> m Bool

Returns: TRUE if the format specified by the arguments is part of formats

Returns whether a given format is contained in formats.

Since: 4.14

equal

dmabufFormatsEqual Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Maybe DmabufFormats

formats1: a GdkDmabufFormats

-> Maybe DmabufFormats

formats2: another GdkDmabufFormats

-> m Bool

Returns: TRUE if formats1 and formats2 are equal

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

Since: 4.14

getFormat

dmabufFormatsGetFormat Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> DmabufFormats

formats: a GdkDmabufFormats

-> CSize

idx: the index of the format to return

-> m (Word32, Word64) 

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

Since: 4.14

getNFormats

dmabufFormatsGetNFormats Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> DmabufFormats

formats: a GdkDmabufFormats

-> m CSize

Returns: the number of formats

Returns the number of formats that the formats object contains.

Note that DMA buffers are a Linux concept, so on other platforms, dmabufFormatsGetNFormats will always return zero.

Since: 4.14

ref

dmabufFormatsRef Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> DmabufFormats

formats: a GdkDmabufFormats

-> m DmabufFormats

Returns: the passed-in object

Increases the reference count of formats.

Since: 4.14

unref

dmabufFormatsUnref Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> DmabufFormats

formats: a GdkDmabufFormats

-> m () 

Decreases the reference count of formats.

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

Since: 4.14