Trait gtk4::prelude::ShortcutTriggerExtManual [−][src]
pub trait ShortcutTriggerExtManual {
fn compare<P: IsA<ShortcutTrigger>>(&self, trigger2: &P) -> Ordering;
fn equal<P: IsA<ShortcutTrigger>>(&self, trigger2: &P) -> bool;
fn hash(&self) -> u32;
fn trigger(&self, event: &Event, enable_mnemonics: bool) -> KeyMatch;
}
Required methods
The types of self
and trigger2
are gconstpointer
only to allow
use of this function as a GCompareFunc
.
They must each be a ShortcutTrigger
.
trigger2
Returns
An integer less than, equal to, or greater than zero if
self
is found, respectively, to be less than, to match,
or be greater than trigger2
.
Checks if self
and trigger2
trigger under the same conditions.
The types of one
and two
are gconstpointer
only to allow use of this
function with GHashTable
. They must each be a ShortcutTrigger
.
trigger2
Returns
true
if self
and trigger2
are equal
Generates a hash value for a ShortcutTrigger
.
The output of this function is guaranteed to be the same for a given value only per-process. It may change between different processor architectures or even different versions of GTK. Do not use this function as a basis for building protocols or file formats.
The types of self
is gconstpointer
only to allow use of this
function with GHashTable
. They must each be a ShortcutTrigger
.
Returns
a hash value corresponding to self
Checks if the given event
triggers self
.
event
the event to check
enable_mnemonics
true
if mnemonics should trigger. Usually the
value of this property is determined by checking that the passed
in event
is a Key event and has the right modifiers set.
Returns
Whether the event triggered the shortcut