Event
Object Hierarchy:
Gdk.Event
Gdk.Event
Gdk.Event
Description:
[ CCode ( type_id = "gdk_event_get_type ()" ) ]public abstract class Event
`GdkEvent`s are immutable data structures, created by GDK to represent windowing system events.
In GTK applications the events are handled automatically by toplevel widgets and passed on to the event controllers of appropriate
widgets, so using `GdkEvent` and its related API is rarely needed.
Content:
Creation methods:
Methods:
public unowned Event @ref ()
Increase the ref count of this .
public bool get_angle (Event event2, out double angle)
Returns the relative angle from event1
to event2
.
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 bool get_center (Event event2, out double x, out double y)
Returns the point halfway between the events' positions.
public unowned Device ? get_device ()
Returns the device of an event.
public unowned DeviceTool ? get_device_tool ()
Returns a `GdkDeviceTool` representing the tool that caused the event.
public unowned Display ? get_display ()
Retrieves the display associated to the
this .
public bool get_distance (Event event2, out double distance)
Returns the distance between the event locations.
public unowned EventSequence get_event_sequence ()
Retuns the event sequence 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 device that
this is for, 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.
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 timestamp of this .
public bool triggers_context_menu ()
Returns whether a `GdkEvent` should trigger a context menu, according
to platform conventions.
public void unref ()
Decrease the ref count of this .