alsactl/auto/elem_info_boolean.rs
1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from
3// from gir-files (https://github.com/gtk-rs/gir-files)
4// DO NOT EDIT
5
6use crate::{ffi, ElemInfoCommon, ElemInfoSingleArray};
7use glib::translate::*;
8
9glib::wrapper! {
10 /// An object to express information for boolean type of element.
11 ///
12 /// A `GObject::Object` derived object class for boolean type of element.
13 ///
14 /// The object wraps `struct snd_ctl_elem_info` in UAPI of Linux sound subsystem.
15 ///
16 /// # Implements
17 ///
18 /// [`ElemInfoCommonExt`][trait@crate::prelude::ElemInfoCommonExt], [`ElemInfoSingleArrayExt`][trait@crate::prelude::ElemInfoSingleArrayExt]
19 #[doc(alias = "ALSACtlElemInfoBoolean")]
20 pub struct ElemInfoBoolean(Object<ffi::ALSACtlElemInfoBoolean, ffi::ALSACtlElemInfoBooleanClass>) @implements ElemInfoCommon, ElemInfoSingleArray;
21
22 match fn {
23 type_ => || ffi::alsactl_elem_info_boolean_get_type(),
24 }
25}
26
27impl ElemInfoBoolean {
28 pub const NONE: Option<&'static ElemInfoBoolean> = None;
29
30 /// Allocate and return an instance of [`ElemInfoBoolean`][crate::ElemInfoBoolean].
31 ///
32 /// # Returns
33 ///
34 /// An instance of [`ElemInfoBoolean`][crate::ElemInfoBoolean].
35 #[doc(alias = "alsactl_elem_info_boolean_new")]
36 pub fn new() -> ElemInfoBoolean {
37 unsafe { from_glib_full(ffi::alsactl_elem_info_boolean_new()) }
38 }
39}
40
41impl Default for ElemInfoBoolean {
42 fn default() -> Self {
43 Self::new()
44 }
45}