W Wrapl, The Programming Language

Libraries:Gtk:Gtk:AccelGroup

Types

T

Inherits from:

Constants

Nil : T

Functions

FromAccelClosure(closure @ Gtk.GObject.Closure.T) : Gtk.Gtk.AccelGroup.T

Finds the T to which closure is connected; see Connect.

closure a GClosure
Returns the T to which closure is connected, or NULL. [transfer none]


GetType() : Gtk.GObject.Type.T



New() : Gtk.Gtk.AccelGroup.T

Creates a new T.

Returns a new T object


Methods

:Activate(self @ T, accel_quark @ Std.Integer.SmallT, acceleratable @ Gtk.GObject.Object.T, accel_key @ Std.Integer.SmallT, accel_mods @ Std.Integer.SmallT) : Std.Symbol.T

Finds the first accelerator in accel_group that matches accel_key and accel_mods, and activates it.

accel_group a T
accel_quark the quark for the accelerator name
acceleratable the GObject, usually a Gtk.Gtk.Window.T, on which to activate the accelerator.
accel_key accelerator keyval from a key event
accel_mods keyboard state mask from a key event
Returns TRUE if an accelerator was activated and handled this keypress


:Connect(self @ T, accel_key @ Std.Integer.SmallT, accel_mods @ Std.Integer.SmallT, accel_flags @ Std.Integer.SmallT, closure @ Gtk.GObject.Closure.T) : Std.Object.T

Installs an accelerator in this group. When accel_group is being activated in response to a call to Gtk.Gtk.Accel.GroupsActivate, closure will be invoked if the accel_key and accel_mods from Gtk.Gtk.Accel.GroupsActivate match those of this connection.

The signature used for the closure is that of Gtk.Gtk.AccelGroupActivate.

Note that, due to implementation details, a single closure can only be connected to one accelerator group.

accel_group the accelerator group to install an accelerator in
accel_key key value of the accelerator
accel_mods modifier combination of the accelerator
accel_flags a flag mask to configure this accelerator
closure closure to be executed upon accelerator activation


:ConnectByPath(self @ T, accel_path @ Std.String.T, closure @ Gtk.GObject.Closure.T) : Std.Object.T

Installs an accelerator in this group, using an accelerator path to look up the appropriate key and modifiers (see Gtk.Gtk.AccelMap.AddEntry). When accel_group is being activated in response to a call to Gtk.Gtk.Accel.GroupsActivate, closure will be invoked if the accel_key and accel_mods from Gtk.Gtk.Accel.GroupsActivate match the key and modifiers for the path.

The signature used for the closure is that of Gtk.Gtk.AccelGroupActivate.

Note that accel_path string will be stored in a GQuark. Therefore, if you pass a static string, you can save some memory by interning it first with g_intern_static_string().

accel_group the accelerator group to install an accelerator in
accel_path path used for determining key and modifiers.
closure closure to be executed upon accelerator activation


:Disconnect(self @ T, closure @ Gtk.GObject.Closure.T) : Std.Symbol.T

Removes an accelerator previously installed through Connect.

Since 2.20 closure can be NULL.

accel_group the accelerator group to remove an accelerator from
closure the closure to remove from this accelerator group, or NULL to remove all closures. [allow-none]
Returns TRUE if the closure was found and got disconnected


:DisconnectKey(self @ T, accel_key @ Std.Integer.SmallT, accel_mods @ Std.Integer.SmallT) : Std.Symbol.T

Removes an accelerator previously installed through Connect.

accel_group the accelerator group to install an accelerator in
accel_key key value of the accelerator
accel_mods modifier combination of the accelerator
Returns TRUE if there was an accelerator which could be removed, FALSE otherwise


:Find(self @ T, find_func @ Std.Function.T, data @ Std.Address.T) : Gtk.Gtk.AccelKey.T

Finds the first entry in an accelerator group for which find_func returns TRUE and returns its Gtk.Gtk.AccelKey.T.

accel_group a T
find_func a function to filter the entries of accel_group with
data data to pass to find_func
Returns the key of the first entry passing find_func. The key is owned by GTK+ and must not be freed. [transfer none]


:GetIsLocked(self @ T) : Std.Symbol.T

Locks are added and removed using Lock and Unlock.

accel_group a T
Returns TRUE if there are 1 or more locks on the accel_group, FALSE otherwise.


:GetModifierMask(self @ T) : Std.Integer.SmallT

Gets a Gtk.Gdk.ModifierType.T representing the mask for this accel_group. For example, Gtk.Gdk.ModifierType.ControlMask, Gtk.Gdk.ModifierType.ShiftMask, etc.

accel_group a T
Returns the modifier mask for this accel group.


:Lock(self @ T) : Std.Object.T

Locks the given accelerator group.

Locking an acelerator group prevents the accelerators contained within it to be changed during runtime. Refer to Gtk.Gtk.AccelMap.ChangeEntry about runtime accelerator changes.

If called more than once, accel_group remains locked until Unlock has been called an equivalent number of times.

accel_group a T


:Query(self @ T, accel_key @ Std.Integer.SmallT, accel_mods @ Std.Integer.SmallT, n_entries @ Std.Object.T) : Gtk.Gtk.AccelGroupEntry.T

Queries an accelerator group for all entries matching accel_key and accel_mods.

accel_group the accelerator group to query
accel_key key value of the accelerator
accel_mods modifier combination of the accelerator
n_entries location to return the number of entries found, or NULL. [allow-none]
Returns an array of n_entries GtkAccelGroupEntry elements, or NULL. The array is owned by GTK+ and must not be freed. [allow-none]


:Unlock(self @ T) : Std.Object.T

Undoes the last call to Lock on this accel_group.

accel_group a T