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 /// An interface that is used to implement shortcut scopes.
10 ///
11 /// This is important for [`Native`][crate::Native] widgets that have their
12 /// own surface, since the event controllers that are used to implement
13 /// managed and global scopes are limited to the same native.
14 ///
15 /// Examples for widgets implementing [`ShortcutManager`][crate::ShortcutManager] are
16 /// [`Window`][crate::Window] and [`Popover`][crate::Popover].
17 ///
18 /// Every widget that implements [`ShortcutManager`][crate::ShortcutManager] will be used as a
19 /// `GTK_SHORTCUT_SCOPE_MANAGED`.
20 ///
21 /// # Implements
22 ///
23 /// [`ShortcutManagerExt`][trait@crate::prelude::ShortcutManagerExt]
24 #[doc(alias = "GtkShortcutManager")]
25 pub struct ShortcutManager(Interface<ffi::GtkShortcutManager, ffi::GtkShortcutManagerInterface>);
26
27 match fn {
28 type_ => || ffi::gtk_shortcut_manager_get_type(),
29 }
30}
31
32impl ShortcutManager {
33 pub const NONE: Option<&'static ShortcutManager> = None;
34}
35
36/// Trait containing all [`struct@ShortcutManager`] methods.
37///
38/// # Implementors
39///
40/// [`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]
41pub trait ShortcutManagerExt: IsA<ShortcutManager> + 'static {}
42
43impl<O: IsA<ShortcutManager>> ShortcutManagerExt for O {}