Trait gtk4::prelude::ShortcutTriggerExtManual
source · pub trait ShortcutTriggerExtManual {
// Required methods
fn compare(&self, trigger2: &impl IsA<ShortcutTrigger>) -> Ordering;
fn equal(&self, trigger2: &impl IsA<ShortcutTrigger>) -> bool;
fn hash(&self) -> u32;
fn trigger(&self, event: &Event, enable_mnemonics: bool) -> KeyMatch;
}
Expand description
Trait containing manually implemented methods of ShortcutTrigger
.
Required Methods§
fn compare(&self, trigger2: &impl IsA<ShortcutTrigger>) -> Ordering
fn equal(&self, trigger2: &impl IsA<ShortcutTrigger>) -> bool
fn hash(&self) -> u32
sourcefn trigger(&self, event: &Event, enable_mnemonics: bool) -> KeyMatch
fn trigger(&self, event: &Event, enable_mnemonics: bool) -> KeyMatch
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