1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

use crate::{ElemInfoCommon, ElemInfoSingleArray};
use glib::translate::*;
use std::fmt;

glib::wrapper! {
    /// An object to express information for bytes type of element.
    ///
    /// A `GObject::Object` derived object class for bytes type of element.
    ///
    /// The object wraps `struct snd_ctl_elem_info` in UAPI of Linux sound subsystem.
    ///
    /// # Implements
    ///
    /// [`ElemInfoCommonExt`][trait@crate::prelude::ElemInfoCommonExt], [`ElemInfoSingleArrayExt`][trait@crate::prelude::ElemInfoSingleArrayExt]
    #[doc(alias = "ALSACtlElemInfoBytes")]
    pub struct ElemInfoBytes(Object<ffi::ALSACtlElemInfoBytes, ffi::ALSACtlElemInfoBytesClass>) @implements ElemInfoCommon, ElemInfoSingleArray;

    match fn {
        type_ => || ffi::alsactl_elem_info_bytes_get_type(),
    }
}

impl ElemInfoBytes {
    pub const NONE: Option<&'static ElemInfoBytes> = None;

    /// Allocate and return an instance of [`ElemInfoBytes`][crate::ElemInfoBytes].
    ///
    /// # Returns
    ///
    /// An instance of [`ElemInfoBytes`][crate::ElemInfoBytes].
    #[doc(alias = "alsactl_elem_info_bytes_new")]
    pub fn new() -> ElemInfoBytes {
        unsafe { from_glib_full(ffi::alsactl_elem_info_bytes_new()) }
    }
}

impl Default for ElemInfoBytes {
    fn default() -> Self {
        Self::new()
    }
}

impl fmt::Display for ElemInfoBytes {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        f.write_str("ElemInfoBytes")
    }
}