Returns the relative angle from event1
to event2
.
The relative angle is the angle between the X axis and the line through both events' positions. The rotation direction for positive angles is from the positive X axis towards the positive Y axis.
This assumes that both events have X/Y information. If not, this function returns %FALSE.
Extracts all axis values from an event.
To find out which axes are used, use [methodGdk
.DeviceTool.get_axes]
on the device tool returned by [methodGdk
.Event.get_device_tool].
Extracts the consumed modifiers from a key event.
Returns a GdkDeviceTool
representing the tool that
caused the event.
If the was not generated by a device that supports different tools (such as a tablet), this function will return %NULL.
Note: the GdkDeviceTool
will be constant during
the application lifetime, if settings must be stored
persistently across runs, see [methodGdk
.DeviceTool.get_serial].
Retuns the event sequence to which the event belongs.
Related touch events are connected in a sequence. Other events typically don't have event sequence information.
Retrieves the history of the device that event
is for, as a list of
time and coordinates.
The history includes positions that are not delivered as separate events
to the application because they occurred in the same frame as event
.
Note that only motion and scroll events record history, and motion events do it only if one of the mouse buttons is down, or the device has a tool.
Extracts the keycode from a key event.
Extracts the keyval from a key event.
Extracts the layout from a key event.
Extracts the shift level from a key event.
Gets a keyval and modifier combination that will match the event.
See [methodGdk
.KeyEvent.matches].
Returns the modifier state field of an event.
Returns whether this event is an 'emulated' pointer event.
Emulated pointer events typically originate from a touch events.
Extract the event surface relative x/y coordinates from an event.
Returns the timestamp of event
.
Not all events have timestamps. In that case, this function returns %GDK_CURRENT_TIME.
Extracts whether the key event is for a modifier key.
Matches a key event against a keyval and modifiers.
This is typically used to trigger keyboard shortcuts such as Ctrl-C.
Partial matches are possible where the combination matches if the currently active group is ignored.
Note that we ignore Caps Lock for matching.
the keyval to match
the modifiers to match
Returns whether a GdkEvent
should trigger a context menu,
according to platform conventions.
The right mouse button typically triggers context menus.
This function should always be used instead of simply checking for event->button == %GDK_BUTTON_SECONDARY.
Decrease the ref count of event
.
If the last reference is dropped, the structure is freed.
An event related to a key-based device.