pub struct DmabufFormats { /* private fields */ }
v4_14
only.Expand description
The DmabufFormats
struct 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
n_formats()
and
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 DmabufTextureBuilder
for more information
about DMA buffers.
Note that DMA buffers only exist on Linux.
GLib type: Shared boxed type with reference counted clone semantics.
Implementations§
Source§impl DmabufFormats
impl DmabufFormats
Sourcepub fn as_ptr(&self) -> *mut GdkDmabufFormats
pub fn as_ptr(&self) -> *mut GdkDmabufFormats
Return the inner pointer to the underlying C value.
Sourcepub unsafe fn from_glib_ptr_borrow(ptr: &*mut GdkDmabufFormats) -> &Self
pub unsafe fn from_glib_ptr_borrow(ptr: &*mut GdkDmabufFormats) -> &Self
Borrows the underlying C value.
Source§impl DmabufFormats
impl DmabufFormats
Sourcepub fn n_formats(&self) -> usize
pub fn n_formats(&self) -> usize
Returns the number of formats that the @self object contains.
Note that DMA buffers are a Linux concept, so on other
platforms, n_formats()
will
always return zero.
§Returns
the number of formats
Trait Implementations§
Source§impl Clone for DmabufFormats
impl Clone for DmabufFormats
Source§impl Debug for DmabufFormats
impl Debug for DmabufFormats
Source§impl From<DmabufFormats> for Value
impl From<DmabufFormats> for Value
Source§fn from(s: DmabufFormats) -> Self
fn from(s: DmabufFormats) -> Self
Source§impl HasParamSpec for DmabufFormats
impl HasParamSpec for DmabufFormats
type ParamSpec = ParamSpecBoxed
Source§type SetValue = DmabufFormats
type SetValue = DmabufFormats
type BuilderFn = fn(_: &str) -> ParamSpecBoxedBuilder<'_, DmabufFormats>
fn param_spec_builder() -> Self::BuilderFn
Source§impl Hash for DmabufFormats
impl Hash for DmabufFormats
Source§impl Ord for DmabufFormats
impl Ord for DmabufFormats
Source§fn cmp(&self, other: &DmabufFormats) -> Ordering
fn cmp(&self, other: &DmabufFormats) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for DmabufFormats
impl PartialEq for DmabufFormats
Source§impl PartialOrd for DmabufFormats
impl PartialOrd for DmabufFormats
Source§impl StaticType for DmabufFormats
impl StaticType for DmabufFormats
Source§fn static_type() -> Type
fn static_type() -> Type
Self
.