gtk4/auto/
mnemonic_action.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, ShortcutAction};
6use glib::translate::*;
7
8glib::wrapper! {
9    /// A [`ShortcutAction`][crate::ShortcutAction] that calls gtk_widget_mnemonic_activate().
10    ///
11    /// # Implements
12    ///
13    /// [`ShortcutActionExt`][trait@crate::prelude::ShortcutActionExt], [`trait@glib::ObjectExt`]
14    #[doc(alias = "GtkMnemonicAction")]
15    pub struct MnemonicAction(Object<ffi::GtkMnemonicAction, ffi::GtkMnemonicActionClass>) @extends ShortcutAction;
16
17    match fn {
18        type_ => || ffi::gtk_mnemonic_action_get_type(),
19    }
20}
21
22impl MnemonicAction {
23    /// Gets the mnemonic action.
24    ///
25    /// This is an action that calls gtk_widget_mnemonic_activate()
26    /// on the given widget upon activation.
27    ///
28    /// # Returns
29    ///
30    /// The mnemonic action
31    #[doc(alias = "gtk_mnemonic_action_get")]
32    pub fn get() -> MnemonicAction {
33        assert_initialized_main_thread!();
34        unsafe { from_glib_none(ffi::gtk_mnemonic_action_get()) }
35    }
36}