gtk4/
label.rs

1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use glib::translate::*;
4
5use crate::Label;
6
7impl Label {
8    /// Return the mnemonic accelerator.
9    ///
10    /// If the label has been set so that it has a mnemonic key this function
11    /// returns the keyval used for the mnemonic accelerator. If there is no
12    /// mnemonic set up it returns `GDK_KEY_VoidSymbol`.
13    ///
14    /// # Returns
15    ///
16    /// GDK keyval usable for accelerators, or `GDK_KEY_VoidSymbol`
17    #[doc(alias = "gtk_label_get_mnemonic_keyval")]
18    #[doc(alias = "get_mnemonic_keyval")]
19    pub fn mnemonic_keyval(&self) -> gdk::Key {
20        unsafe {
21            from_glib(crate::ffi::gtk_label_get_mnemonic_keyval(
22                self.to_glib_none().0,
23            ))
24        }
25    }
26}