| Copyright | Will Thompson and Iñaki García Etxebarria |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
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
- newtype DmabufFormats = DmabufFormats (ManagedPtr DmabufFormats)
- dmabufFormatsContains :: (HasCallStack, MonadIO m) => DmabufFormats -> Word32 -> Word64 -> m Bool
- dmabufFormatsEqual :: (HasCallStack, MonadIO m) => Maybe DmabufFormats -> Maybe DmabufFormats -> m Bool
- dmabufFormatsGetFormat :: (HasCallStack, MonadIO m) => DmabufFormats -> CSize -> m (Word32, Word64)
- dmabufFormatsGetNFormats :: (HasCallStack, MonadIO m) => DmabufFormats -> m CSize
- dmabufFormatsRef :: (HasCallStack, MonadIO m) => DmabufFormats -> m DmabufFormats
- dmabufFormatsUnref :: (HasCallStack, MonadIO m) => DmabufFormats -> m ()
Exported types
newtype DmabufFormats Source #
Memory-managed wrapper type.
Constructors
| DmabufFormats (ManagedPtr DmabufFormats) |
Instances
| Eq DmabufFormats Source # | |
Defined in GI.Gdk.Structs.DmabufFormats Methods (==) :: DmabufFormats -> DmabufFormats -> Bool # (/=) :: DmabufFormats -> DmabufFormats -> Bool # | |
| GBoxed DmabufFormats Source # | |
Defined in GI.Gdk.Structs.DmabufFormats | |
| ManagedPtrNewtype DmabufFormats Source # | |
Defined in GI.Gdk.Structs.DmabufFormats Methods toManagedPtr :: DmabufFormats -> ManagedPtr DmabufFormats | |
| TypedObject DmabufFormats Source # | |
Defined in GI.Gdk.Structs.DmabufFormats | |
| HasParentTypes DmabufFormats Source # | |
Defined in GI.Gdk.Structs.DmabufFormats | |
| IsGValue (Maybe DmabufFormats) Source # | Convert |
Defined in GI.Gdk.Structs.DmabufFormats Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe DmabufFormats -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe DmabufFormats) | |
| type ParentTypes DmabufFormats Source # | |
Defined in GI.Gdk.Structs.DmabufFormats | |
Methods
Click to display all available methods, including inherited ones
contains
dmabufFormatsContains Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => DmabufFormats |
|
| -> Word32 |
|
| -> Word64 |
|
| -> m Bool | Returns: |
Returns whether a given format is contained in formats.
Since: 4.14
equal
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Maybe DmabufFormats |
|
| -> Maybe DmabufFormats |
|
| -> m Bool | Returns: |
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 |
|
| -> CSize |
|
| -> 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 |
|
| -> 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
Arguments
| :: (HasCallStack, MonadIO m) | |
| => DmabufFormats |
|
| -> m DmabufFormats | Returns: the passed-in object |
Increases the reference count of formats.
Since: 4.14
unref
Arguments
| :: (HasCallStack, MonadIO m) | |
| => DmabufFormats |
|
| -> m () |
Decreases the reference count of formats.
When the reference count reaches zero, the object is freed.
Since: 4.14