gi-gdk-4.0.9: 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

The GdkDmabufFormats struct 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

newtype DmabufFormats Source #

Memory-managed wrapper type.

Instances

Instances details
Eq DmabufFormats Source # 
Instance details

Defined in GI.Gdk.Structs.DmabufFormats

GBoxed DmabufFormats Source # 
Instance details

Defined in GI.Gdk.Structs.DmabufFormats

ManagedPtrNewtype DmabufFormats Source # 
Instance details

Defined in GI.Gdk.Structs.DmabufFormats

TypedObject DmabufFormats Source # 
Instance details

Defined in GI.Gdk.Structs.DmabufFormats

Methods

glibType :: IO GType #

HasParentTypes DmabufFormats Source # 
Instance details

Defined in GI.Gdk.Structs.DmabufFormats

IsGValue (Maybe DmabufFormats) Source #

Convert DmabufFormats to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gdk.Structs.DmabufFormats

type ParentTypes DmabufFormats Source # 
Instance details

Defined in GI.Gdk.Structs.DmabufFormats

type ParentTypes DmabufFormats = '[] :: [Type]

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