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