W Wrapl, The Programming Language

Libraries:Gtk:Gdk:Keyboard

Functions

Grab(window @ Gtk.Gdk.Window.T, owner_events @ Std.Symbol.T, time_ @ Std.Integer.SmallT) : Gtk.Gdk.GrabStatus.T

Grabs the keyboard so that all events are passed to this application until the keyboard is ungrabbed with Ungrab. This overrides any previous keyboard grab by this client.

If you set up anything at the time you take the grab that needs to be cleaned up when the grab ends, you should handle the Gtk.Gdk.EventGrabBroken.T events that are emitted when the grab ends unvoluntarily.

window the Gtk.Gdk.Window.T which will own the grab (the grab window).
owner_events if FALSE then all keyboard events are reported with respect to window. If TRUE then keyboard events for this application are reported as normal, but keyboard events outside this application are reported with respect to window. Both key press and key release events are always reported, independant of the event mask set by the application.
time_ a timestamp from a GdkEvent, or GDK_CURRENT_TIME if no timestamp is available.
Returns Gtk.Gdk.GrabStatus.Success if the grab was successful.


Ungrab(time_ @ Std.Integer.SmallT) : Std.Object.T

Ungrabs the keyboard on the default display, if it is grabbed by this application.

time_ a timestamp from a GdkEvent, or GDK_CURRENT_TIME if no timestamp is available.