gtk4/auto/nothing_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 does nothing.
10 ///
11 /// # Implements
12 ///
13 /// [`ShortcutActionExt`][trait@crate::prelude::ShortcutActionExt], [`trait@glib::ObjectExt`]
14 #[doc(alias = "GtkNothingAction")]
15 pub struct NothingAction(Object<ffi::GtkNothingAction, ffi::GtkNothingActionClass>) @extends ShortcutAction;
16
17 match fn {
18 type_ => || ffi::gtk_nothing_action_get_type(),
19 }
20}
21
22impl NothingAction {
23 /// Gets the nothing action.
24 ///
25 /// This is an action that does nothing and where
26 /// activating it always fails.
27 ///
28 /// # Returns
29 ///
30 /// The nothing action
31 #[doc(alias = "gtk_nothing_action_get")]
32 pub fn get() -> NothingAction {
33 assert_initialized_main_thread!();
34 unsafe { from_glib_none(ffi::gtk_nothing_action_get()) }
35 }
36}