File: event_controller.rs

package info (click to toggle)
rust-gtk4 0.10.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,408 kB
  • sloc: makefile: 67
file content (24 lines) | stat: -rw-r--r-- 748 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Take a look at the license at the top of the repository in the LICENSE file.

#[cfg(feature = "v4_8")]
use glib::translate::*;

#[cfg(feature = "v4_8")]
use crate::ffi;
use crate::{prelude::*, EventController};

pub trait EventControllerExtManual: IsA<EventController> + 'static {
    #[cfg(feature = "v4_8")]
    #[cfg_attr(docsrs, doc(cfg(feature = "v4_8")))]
    #[doc(alias = "gtk_event_controller_set_static_name")]
    fn set_static_name(&self, name: Option<&'static glib::GStr>) {
        unsafe {
            ffi::gtk_event_controller_set_static_name(
                self.as_ref().to_glib_none().0,
                name.to_glib_none().0,
            );
        }
    }
}

impl<O: IsA<EventController>> EventControllerExtManual for O {}