1 // This file was generated by gir (https://github.com/gtk-rs/gir) 2 // from gir-files (https://github.com/gtk-rs/gir-files) 3 // DO NOT EDIT 4 5 use glib::object::IsA; 6 use glib::translate::*; 7 use std::fmt; 8 9 glib::wrapper! { 10 #[doc(alias = "GSettingsBackend")] 11 pub struct SettingsBackend(Object<ffi::GSettingsBackend, ffi::GSettingsBackendClass>); 12 13 match fn { 14 type_ => || ffi::g_settings_backend_get_type(), 15 } 16 } 17 18 impl SettingsBackend { 19 //#[doc(alias = "g_settings_backend_flatten_tree")] 20 //pub fn flatten_tree(tree: /*Ignored*/&glib::Tree) -> (glib::GString, Vec<glib::GString>, Vec<glib::Variant>) { 21 // unsafe { TODO: call ffi:g_settings_backend_flatten_tree() } 22 //} 23 24 #[doc(alias = "g_settings_backend_get_default")] 25 #[doc(alias = "get_default")] default() -> SettingsBackend26 pub fn default() -> SettingsBackend { 27 unsafe { from_glib_full(ffi::g_settings_backend_get_default()) } 28 } 29 } 30 31 pub const NONE_SETTINGS_BACKEND: Option<&SettingsBackend> = None; 32 33 pub trait SettingsBackendExt: 'static { 34 //#[doc(alias = "g_settings_backend_changed")] 35 //fn changed(&self, key: &str, origin_tag: /*Unimplemented*/Option<Fundamental: Pointer>); 36 37 //#[doc(alias = "g_settings_backend_changed_tree")] 38 //fn changed_tree(&self, tree: /*Ignored*/&glib::Tree, origin_tag: /*Unimplemented*/Option<Fundamental: Pointer>); 39 40 //#[doc(alias = "g_settings_backend_keys_changed")] 41 //fn keys_changed(&self, path: &str, items: &[&str], origin_tag: /*Unimplemented*/Option<Fundamental: Pointer>); 42 43 //#[doc(alias = "g_settings_backend_path_changed")] 44 //fn path_changed(&self, path: &str, origin_tag: /*Unimplemented*/Option<Fundamental: Pointer>); 45 46 #[doc(alias = "g_settings_backend_path_writable_changed")] path_writable_changed(&self, path: &str)47 fn path_writable_changed(&self, path: &str); 48 49 #[doc(alias = "g_settings_backend_writable_changed")] writable_changed(&self, key: &str)50 fn writable_changed(&self, key: &str); 51 } 52 53 impl<O: IsA<SettingsBackend>> SettingsBackendExt for O { 54 //fn changed(&self, key: &str, origin_tag: /*Unimplemented*/Option<Fundamental: Pointer>) { 55 // unsafe { TODO: call ffi:g_settings_backend_changed() } 56 //} 57 58 //fn changed_tree(&self, tree: /*Ignored*/&glib::Tree, origin_tag: /*Unimplemented*/Option<Fundamental: Pointer>) { 59 // unsafe { TODO: call ffi:g_settings_backend_changed_tree() } 60 //} 61 62 //fn keys_changed(&self, path: &str, items: &[&str], origin_tag: /*Unimplemented*/Option<Fundamental: Pointer>) { 63 // unsafe { TODO: call ffi:g_settings_backend_keys_changed() } 64 //} 65 66 //fn path_changed(&self, path: &str, origin_tag: /*Unimplemented*/Option<Fundamental: Pointer>) { 67 // unsafe { TODO: call ffi:g_settings_backend_path_changed() } 68 //} 69 path_writable_changed(&self, path: &str)70 fn path_writable_changed(&self, path: &str) { 71 unsafe { 72 ffi::g_settings_backend_path_writable_changed( 73 self.as_ref().to_glib_none().0, 74 path.to_glib_none().0, 75 ); 76 } 77 } 78 writable_changed(&self, key: &str)79 fn writable_changed(&self, key: &str) { 80 unsafe { 81 ffi::g_settings_backend_writable_changed( 82 self.as_ref().to_glib_none().0, 83 key.to_glib_none().0, 84 ); 85 } 86 } 87 } 88 89 impl fmt::Display for SettingsBackend { fmt(&self, f: &mut fmt::Formatter) -> fmt::Result90 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { 91 f.write_str("SettingsBackend") 92 } 93 } 94