[go: up one dir, main page]

gtk4/
event_controller.rs

1// Take a look at the license at the top of the repository in the LICENSE file.
2
3#[cfg(feature = "v4_8")]
4use glib::translate::*;
5
6#[cfg(feature = "v4_8")]
7use crate::ffi;
8use crate::{prelude::*, EventController};
9
10pub trait EventControllerExtManual: IsA<EventController> + 'static {
11    #[cfg(feature = "v4_8")]
12    #[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
13    #[doc(alias = "gtk_event_controller_set_static_name")]
14    fn set_static_name(&self, name: Option<&'static glib::GStr>) {
15        unsafe {
16            ffi::gtk_event_controller_set_static_name(
17                self.as_ref().to_glib_none().0,
18                name.to_glib_none().0,
19            );
20        }
21    }
22}
23
24impl<O: IsA<EventController>> EventControllerExtManual for O {}