// This file was generated by gir (https://github.com/gtk-rs/gir)
// from
// from gir-files (https://github.com/gtk-rs/gir-files.git)
// DO NOT EDIT

use glib::translate::*;
use std::fmt;

glib::wrapper! {
    #[doc(alias = "HdyEnumValueObject")]
    pub struct EnumValueObject(Object<ffi::HdyEnumValueObject, ffi::HdyEnumValueObjectClass>);

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

impl EnumValueObject {
    //#[doc(alias = "hdy_enum_value_object_new")]
    //pub fn new(enum_value: /*Ignored*/&mut glib::EnumValue) -> EnumValueObject {
    //    unsafe { TODO: call ffi:hdy_enum_value_object_new() }
    //}

    #[doc(alias = "hdy_enum_value_object_get_name")]
    #[doc(alias = "get_name")]
    pub fn name(&self) -> Option<glib::GString> {
        unsafe { from_glib_none(ffi::hdy_enum_value_object_get_name(self.to_glib_none().0)) }
    }

    #[doc(alias = "hdy_enum_value_object_get_nick")]
    #[doc(alias = "get_nick")]
    pub fn nick(&self) -> Option<glib::GString> {
        unsafe { from_glib_none(ffi::hdy_enum_value_object_get_nick(self.to_glib_none().0)) }
    }

    #[doc(alias = "hdy_enum_value_object_get_value")]
    #[doc(alias = "get_value")]
    pub fn value(&self) -> i32 {
        unsafe { ffi::hdy_enum_value_object_get_value(self.to_glib_none().0) }
    }
}

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