gtkmm 4.14.0
Public Member Functions | Protected Member Functions | Related Symbols | List of all members
Gdk::DmabufFormats Class Referencefinal

Gdk::DmabufFormats provides information about supported DMA buffer formats. More...

#include <gdkmm/dmabufformats.h>

Public Member Functions

void reference () const
 Increment the reference count for this object.
 
void unreference () const
 Decrement the reference count for this object.
 
GdkDmabufFormats * gobj ()
 Provides access to the underlying C instance.
 
const GdkDmabufFormats * gobj () const
 Provides access to the underlying C instance.
 
GdkDmabufFormats * gobj_copy () const
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
 
 DmabufFormats ()=delete
 
 DmabufFormats (const DmabufFormats &)=delete
 
DmabufFormatsoperator= (const DmabufFormats &)=delete
 
gsize get_n_formats () const
 Returns the number of formats that the formats object contains.
 
std::pair< guint32, guint64 > get_format (gsize idx) const
 Gets the fourcc code and modifier for a format.
 
bool contains (guint32 fourcc, guint64 modifier) const
 Returns whether a given format is contained in formats.
 
bool equal (const Glib::RefPtr< const DmabufFormats > & formats2) const
 Returns whether formats1 and formats2 contain the same dmabuf formats, in the same order.
 

Protected Member Functions

void operator delete (void *, std::size_t)
 

Related Symbols

(Note that these are not member symbols.)

Glib::RefPtr< Gdk::DmabufFormatswrap (GdkDmabufFormats * object, bool take_copy=false)
 A Glib::wrap() method for this object.
 

Detailed Description

Gdk::DmabufFormats provides information about supported DMA buffer formats.

You can query whether a given format is supported with contains() and you can iterate over the list of all supported formats with get_n_formats() and get_format().

The list of supported formats is sorted by preference, with the best formats coming first.

See Gdk::DmabufTextureBuilder for more information about DMA buffers.

Get a DmabufFormats object with Gdk::Display::get_dmabuf_formats().

Note that DMA buffers only exist on Linux.

Since gtkmm 4.14:

Constructor & Destructor Documentation

◆ DmabufFormats() [1/2]

Gdk::DmabufFormats::DmabufFormats ( )
delete

◆ DmabufFormats() [2/2]

Gdk::DmabufFormats::DmabufFormats ( const DmabufFormats )
delete

Member Function Documentation

◆ contains()

bool Gdk::DmabufFormats::contains ( guint32  fourcc,
guint64  modifier 
) const

Returns whether a given format is contained in formats.

Since gtkmm 4.14:
Parameters
fourccA format code.
modifierA format modifier.
Returns
true if the format specified by the arguments is part of formats.

◆ equal()

bool Gdk::DmabufFormats::equal ( const Glib::RefPtr< const DmabufFormats > &  formats2) const

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

Since gtkmm 4.14:
Parameters
formats2Another Gdk::DmabufFormats.
Returns
true if formats1 and formats2 are equal.

◆ get_format()

std::pair< guint32, guint64 > Gdk::DmabufFormats::get_format ( gsize  idx) const

Gets the fourcc code and modifier for a format.

Since gtkmm 4.14:
Parameters
idxThe index of the format to return.
Returns
{fourcc, modifier} The format code and the format modifier.

◆ get_n_formats()

gsize Gdk::DmabufFormats::get_n_formats ( ) const

Returns the number of formats that the formats object contains.

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

Since gtkmm 4.14:
Returns
The number of formats.

◆ gobj() [1/2]

GdkDmabufFormats * Gdk::DmabufFormats::gobj ( )

Provides access to the underlying C instance.

◆ gobj() [2/2]

const GdkDmabufFormats * Gdk::DmabufFormats::gobj ( ) const

Provides access to the underlying C instance.

◆ gobj_copy()

GdkDmabufFormats * Gdk::DmabufFormats::gobj_copy ( ) const

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

◆ operator delete()

void Gdk::DmabufFormats::operator delete ( void *  ,
std::size_t   
)
protected

◆ operator=()

DmabufFormats & Gdk::DmabufFormats::operator= ( const DmabufFormats )
delete

◆ reference()

void Gdk::DmabufFormats::reference ( ) const

Increment the reference count for this object.

You should never need to do this manually - use the object via a RefPtr instead.

◆ unreference()

void Gdk::DmabufFormats::unreference ( ) const

Decrement the reference count for this object.

You should never need to do this manually - use the object via a RefPtr instead.

Friends And Related Symbol Documentation

◆ wrap()

Glib::RefPtr< Gdk::DmabufFormats > wrap ( GdkDmabufFormats *  object,
bool  take_copy = false 
)
related

A Glib::wrap() method for this object.

Parameters
objectThe C instance.
take_copyFalse if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns
A C++ instance that wraps this C instance.