gdk/event_setting.rs
1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use glib::translate::*;
4use glib::GString;
5
6/// Generated when a setting is modified.
7#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
8pub struct EventSetting(crate::Event);
9
10event_wrapper!(EventSetting, GdkEventSetting);
11event_subtype!(EventSetting, ffi::GDK_SETTING);
12
13impl EventSetting {
14 #[doc(alias = "get_name")]
15 pub fn name(&self) -> Option<GString> {
16 unsafe { from_glib_none(self.as_ref().name) }
17 }
18
19 #[doc(alias = "get_action")]
20 pub fn action(&self) -> crate::SettingAction {
21 unsafe { from_glib(self.as_ref().action) }
22 }
23}