package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Shortcut_controller

type t = [ `shortcut_controller | `event_controller | `object_ ] Gobject.obj
val new_ : unit -> t

Create a new ShortcutController

val new_for_model : Ocgtk_gio.Gio.Wrappers.List_model.t -> t

Create a new ShortcutController

val set_scope : t -> Gtk_enums.shortcutscope -> unit

Sets 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 -> unit

Sets 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 -> unit

Removes @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.shortcutscope

Gets 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.modifiertype

Gets the mnemonics modifiers for when this controller activates its shortcuts.

val add_shortcut : t -> [ `shortcut | `object_ ] Gobject.obj -> unit

Adds @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.t

Get property: item-type

val get_mnemonic_modifiers : t -> Ocgtk_gdk.Gdk.modifiertype

Get property: mnemonic-modifiers

val set_mnemonic_modifiers : t -> Ocgtk_gdk.Gdk.modifiertype -> unit

Set property: mnemonic-modifiers

val get_n_items : t -> int

Get property: n-items