class Gdk::DmabufFormats

Overview

Provides information about supported DMA buffer formats.

You can query whether a given format is supported with Gdk::DmabufFormats#contains and you can iterate over the list of all supported formats with Gdk::DmabufFormats#n_formats and Gdk::DmabufFormats#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 Gdk::DmabufTextureBuilder for more information about DMA buffers.

Note that DMA buffers only exist on Linux.

Defined in:

lib/gi-crystal/src/auto/gdk-4.0/dmabuf_formats.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(pointer : Pointer(Void), transfer : GICrystal::Transfer) #

Class Method Detail

def self.g_type : UInt64 #

Returns the type id (GType) registered in GLib type system.


Instance Method Detail

def contains(fourcc : UInt32, modifier : UInt64) : Bool #

def equal(formats2 : Gdk::DmabufFormats | Nil) : Bool #

def finalize #

def format(idx : UInt64, fourcc : UInt32, modifier : UInt64) : Nil #

def n_formats : UInt64 #

def ref : Gdk::DmabufFormats #

def to_unsafe : Pointer(Void) #

def unref : Nil #