package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Shortcut_controller/index.html
Module Wrappers.Shortcut_controller
type t = [ `shortcut_controller | `event_controller | `object_ ] Gobject.objval new_ : unit -> tCreate a new ShortcutController
val new_for_model : Ocgtk_gio.Gio.Wrappers.List_model.t -> tCreate a new ShortcutController
val set_scope : t -> Gtk_enums.shortcutscope -> unitSets the controller to have the given @scope.
The scope allows shortcuts to be activated outside of the normal event propagation. In particular, it allows installing global keyboard shortcuts that can be activated even when a widget does not have focus.
With %GTK_SHORTCUT_SCOPE_LOCAL, shortcuts will only be activated when the widget has focus.
val set_mnemonics_modifiers : t -> Ocgtk_gdk.Gdk.modifiertype -> unitSets the controller to use the given modifier for mnemonics.
The mnemonics modifiers determines which modifiers need to be pressed to allow activation of shortcuts with mnemonics triggers.
GTK normally uses the Alt modifier for mnemonics, except in `GtkPopoverMenu`s, where mnemonics can be triggered without any modifiers. It should be very rarely necessary to change this, and doing so is likely to interfere with other shortcuts.
This value is only relevant for local shortcut controllers. Global and managed shortcut controllers will have their shortcuts activated from other places which have their own modifiers for activating mnemonics.
val remove_shortcut : t -> [ `shortcut | `object_ ] Gobject.obj -> unitRemoves @shortcut from the list of shortcuts handled by @self.
If @shortcut had not been added to @controller or this controller uses an external shortcut list, this function does nothing.
val get_scope : t -> Gtk_enums.shortcutscopeGets the scope for when this controller activates its shortcuts.
See method@Gtk.ShortcutController.set_scope for details.
val get_mnemonics_modifiers : t -> Ocgtk_gdk.Gdk.modifiertypeGets the mnemonics modifiers for when this controller activates its shortcuts.
val add_shortcut : t -> [ `shortcut | `object_ ] Gobject.obj -> unitAdds @shortcut to the list of shortcuts handled by @self.
If this controller uses an external shortcut list, this function does nothing.
val get_item_type : t -> Gobject.Type.tGet property: item-type
val get_mnemonic_modifiers : t -> Ocgtk_gdk.Gdk.modifiertypeGet property: mnemonic-modifiers
val set_mnemonic_modifiers : t -> Ocgtk_gdk.Gdk.modifiertype -> unitSet property: mnemonic-modifiers
val get_n_items : t -> intGet property: n-items