gtk4/auto/
shortcut_manager.rs

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
5use crate::ffi;
6use glib::prelude::*;
7
8glib::wrapper! {
9    /// The [`ShortcutManager`][crate::ShortcutManager] interface is used to implement
10    /// shortcut scopes.
11    ///
12    /// This is important for [`Native`][crate::Native] widgets that have their
13    /// own surface, since the event controllers that are used to implement
14    /// managed and global scopes are limited to the same native.
15    ///
16    /// Examples for widgets implementing [`ShortcutManager`][crate::ShortcutManager] are
17    /// [`Window`][crate::Window] and [`Popover`][crate::Popover].
18    ///
19    /// Every widget that implements [`ShortcutManager`][crate::ShortcutManager] will be used as a
20    /// [`ShortcutScope::Managed`][crate::ShortcutScope::Managed].
21    ///
22    /// # Implements
23    ///
24    /// [`ShortcutManagerExt`][trait@crate::prelude::ShortcutManagerExt]
25    #[doc(alias = "GtkShortcutManager")]
26    pub struct ShortcutManager(Interface<ffi::GtkShortcutManager, ffi::GtkShortcutManagerInterface>);
27
28    match fn {
29        type_ => || ffi::gtk_shortcut_manager_get_type(),
30    }
31}
32
33impl ShortcutManager {
34    pub const NONE: Option<&'static ShortcutManager> = None;
35}
36
37mod sealed {
38    pub trait Sealed {}
39    impl<T: super::IsA<super::ShortcutManager>> Sealed for T {}
40}
41
42/// Trait containing all [`struct@ShortcutManager`] methods.
43///
44/// # Implementors
45///
46/// [`AboutDialog`][struct@crate::AboutDialog], [`AppChooserDialog`][struct@crate::AppChooserDialog], [`ApplicationWindow`][struct@crate::ApplicationWindow], [`Assistant`][struct@crate::Assistant], [`ColorChooserDialog`][struct@crate::ColorChooserDialog], [`Dialog`][struct@crate::Dialog], [`EmojiChooser`][struct@crate::EmojiChooser], [`FileChooserDialog`][struct@crate::FileChooserDialog], [`FontChooserDialog`][struct@crate::FontChooserDialog], [`MessageDialog`][struct@crate::MessageDialog], [`PageSetupUnixDialog`][struct@crate::PageSetupUnixDialog], [`PopoverMenu`][struct@crate::PopoverMenu], [`Popover`][struct@crate::Popover], [`PrintUnixDialog`][struct@crate::PrintUnixDialog], [`ShortcutManager`][struct@crate::ShortcutManager], [`ShortcutsWindow`][struct@crate::ShortcutsWindow], [`Window`][struct@crate::Window]
47pub trait ShortcutManagerExt: IsA<ShortcutManager> + sealed::Sealed + 'static {}
48
49impl<O: IsA<ShortcutManager>> ShortcutManagerExt for O {}