gtk/
enums.rs

1use glib::translate::{from_glib, ToGlib};
2use gtk_sys;
3use IconSize;
4use ResponseType;
5
6impl IconSize {
7    pub fn unscaled() -> IconSize {
8        skip_assert_initialized!();
9        IconSize::__Unknown(-1)
10    }
11}
12
13impl Into<i32> for IconSize {
14    fn into(self) -> i32 {
15        skip_assert_initialized!();
16        self.to_glib() as i32
17    }
18}
19
20impl From<i32> for IconSize {
21    fn from(val: i32) -> Self {
22        skip_assert_initialized!();
23        from_glib(val as gtk_sys::GtkIconSize)
24    }
25}
26
27impl Into<i32> for ResponseType {
28    fn into(self) -> i32 {
29        skip_assert_initialized!();
30        self.to_glib() as i32
31    }
32}
33
34impl From<i32> for ResponseType {
35    fn from(val: i32) -> Self {
36        skip_assert_initialized!();
37        from_glib(val as gtk_sys::GtkResponseType)
38    }
39}