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
53
54
55
56
57
58
59
// This file was generated by gir (4d68d19) from gir-files (11e0e6d)
// DO NOT EDIT
use StyleProvider;
use ffi;
use gdk;
use glib::translate::*;
glib_wrapper! {
pub struct Settings(Object<ffi::GtkSettings>): StyleProvider;
match fn {
get_type => || ffi::gtk_settings_get_type(),
}
}
impl Settings {
pub fn set_double_property(&self, name: &str, v_double: f64, origin: &str) {
unsafe {
ffi::gtk_settings_set_double_property(self.to_glib_none().0, name.to_glib_none().0, v_double, origin.to_glib_none().0);
}
}
//pub fn set_long_property(&self, name: &str, v_long: /*Unimplemented*/Fundamental: Long, origin: &str) {
// unsafe { TODO: call ffi::gtk_settings_set_long_property() }
//}
//pub fn set_property_value(&self, name: &str, svalue: /*Ignored*/&SettingsValue) {
// unsafe { TODO: call ffi::gtk_settings_set_property_value() }
//}
pub fn set_string_property(&self, name: &str, v_string: &str, origin: &str) {
unsafe {
ffi::gtk_settings_set_string_property(self.to_glib_none().0, name.to_glib_none().0, v_string.to_glib_none().0, origin.to_glib_none().0);
}
}
pub fn get_default() -> Option<Settings> {
assert_initialized_main_thread!();
unsafe {
from_glib_none(ffi::gtk_settings_get_default())
}
}
pub fn get_for_screen(screen: &gdk::Screen) -> Option<Settings> {
assert_initialized_main_thread!();
unsafe {
from_glib_none(ffi::gtk_settings_get_for_screen(screen.to_glib_none().0))
}
}
//pub fn install_property<T: IsA</*Ignored*/glib::ParamSpec>>(pspec: &T) {
// unsafe { TODO: call ffi::gtk_settings_install_property() }
//}
//pub fn install_property_parser<T: IsA</*Ignored*/glib::ParamSpec>>(pspec: &T, parser: /*Unknown conversion*//*Unimplemented*/RcPropertyParser) {
// unsafe { TODO: call ffi::gtk_settings_install_property_parser() }
//}
}