Event

GdkEvents 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.

Constructors

this
this(GdkEvent* gdkEvent, bool ownedRef)

Sets our main struct and passes it to the parent class.

Destructor

~this
~this()
Undocumented in source.

Members

Aliases

doref
alias doref = ref_
Undocumented in source.

Functions

GetAngle
bool GetAngle(Event event2, double angle)

Returns the relative angle from @event1 to @event2.

GetCenter
bool GetCenter(Event event2, double x, double y)

Returns the point halfway between the events' positions.

GetDistance
bool GetDistance(Event event2, double distance)

Returns the distance between the event locations.

getAxes
bool getAxes(double[] axes)

Extracts all axis values from an event.

getAxis
bool getAxis(GdkAxisUse axisUse, double value)

Extract the axis value for a particular axis use from an event structure.

getDevice
Device getDevice()

Returns the device of an event.

getDeviceTool
DeviceTool getDeviceTool()

Returns a GdkDeviceTool representing the tool that caused the event.

getDisplay
Display getDisplay()

Retrieves the display associated to the @event.

getEventSequence
GdkEventSequence* getEventSequence()

Retuns the event sequence to which the event belongs.

getEventStruct
GdkEvent* getEventStruct(bool transferOwnership)

Get the main Gtk struct

getEventType
GdkEventType getEventType()

Retrieves the type of the event.

getHistory
GdkTimeCoord[] getHistory()

Retrieves the history of the device that @event is for, as a list of time and coordinates.

getModifierState
GdkModifierType getModifierState()

Returns the modifier state field of an event.

getPointerEmulated
bool getPointerEmulated()

Returns whether this event is an 'emulated' pointer event.

getPosition
bool getPosition(double x, double y)

Extract the event surface relative x/y coordinates from an event.

getSeat
Seat getSeat()

Returns the seat that originated the event.

getStruct
void* getStruct()

the main Gtk struct as a void*

getSurface
Surface getSurface()

Extracts the surface associated with an event.

getTime
uint getTime()

Returns the timestamp of @event.

ref_
Event ref_()

Increase the ref count of @event.

triggersContextMenu
bool triggersContextMenu()

Returns whether a GdkEvent should trigger a context menu, according to platform conventions.

unref
void unref()

Decrease the ref count of @event.

Static functions

getType
GType getType()

Variables

gdkEvent
GdkEvent* gdkEvent;

the main Gtk struct

ownedRef
bool ownedRef;
Undocumented in source.

Meta