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
// This file was generated by gir (https://github.com/gtk-rs/gir)
// DO NOT EDIT

#[cfg(feature = "v0_4_2")]
#[cfg_attr(docsrs, doc(cfg(feature = "v0_4_2")))]
use glib::{translate::*};

glib::wrapper! {
    #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
    pub struct PropertiesItem(Shared<ffi::WpPropertiesItem>);

    match fn {
        ref => |ptr| ffi::wp_properties_item_ref(ptr),
        unref => |ptr| ffi::wp_properties_item_unref(ptr),
        type_ => || ffi::wp_properties_item_get_type(),
    }
}

impl PropertiesItem {
    #[cfg(feature = "v0_4_2")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_4_2")))]
    #[doc(alias = "wp_properties_item_get_key")]
    #[doc(alias = "get_key")]
    pub fn key(&self) -> Option<glib::GString> {
        unsafe {
            from_glib_none(ffi::wp_properties_item_get_key(self.to_glib_none().0))
        }
    }

    #[cfg(feature = "v0_4_2")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v0_4_2")))]
    #[doc(alias = "wp_properties_item_get_value")]
    #[doc(alias = "get_value")]
    pub fn value(&self) -> Option<glib::GString> {
        unsafe {
            from_glib_none(ffi::wp_properties_item_get_value(self.to_glib_none().0))
        }
    }
}