Event
Object Hierarchy:
Description:
[ CCode ( type_id = "gdk_event_get_type ()" ) ]
public abstract class Event
public abstract class Event
The GdkEvent struct contains only private fields and should not be accessed directly.
All known sub-classes:
Namespace: Gdk
Package: gtk4
Content:
Static methods:
- public static bool get_angle (Event event1, Event event2, out double angle)
If both events contain X/Y information, this function will return true and return in
angle
the relative angle fromevent1
toevent2
. - public static bool get_center (Event event1, Event event2, out double x, out double y)
If both events contain X/Y information, the center of both coordinates will be returned in
x
andy
. - public static bool get_distance (Event event1, Event event2, out double distance)
If both events have X/Y information, the distance between both coordinates ( as in a straight line going from
event1
toevent2
) will be returned.
Creation methods:
- protected Event ()
Methods:
- public unowned Event @ref ()
Increase the ref count of this.
- public bool get_axes (out unowned double[] axes)
Extracts all axis values from an event.
- public bool get_axis (AxisUse axis_use, out double value)
Extract the axis value for a particular axis use from an event structure.
- public unowned Device? get_device ()
Returns the device of an event.
- public unowned DeviceTool? get_device_tool ()
If the event was generated by a device that supports different tools (eg.
- public unowned Display? get_display ()
Retrieves the Display associated to the this.
- public unowned EventSequence get_event_sequence ()
If this is a touch event, returns the EventSequence to which the event belongs.
- public EventType get_event_type ()
Retrieves the type of the event.
- public TimeCoord[]? get_history ()
Retrieves the history of the this, as a list of time and coordinates.
- public ModifierType get_modifier_state ()
Returns the modifier state field of an event.
- public bool get_pointer_emulated ()
Returns whether this event is an 'emulated' pointer event (typically from a touch event), as opposed to a real one.
- public bool get_position (out double x, out double y)
Extract the event surface relative x/y coordinates from an event.
- public unowned Seat? get_seat ()
Returns the seat that originated the event.
- public unowned Surface get_surface ()
Extracts the Surface associated with an event.
- public uint32 get_time ()
Returns the time stamp from this, if there is one; otherwise returns CURRENT_TIME.
- public bool triggers_context_menu ()
This function returns whether a Event should trigger a context menu, according to platform conventions.
- public void unref ()
Decrease the ref count of this, and free it if the last reference is dropped.