Event
Object Hierarchy:
Description:
[ CCode ( copy_function = "g_boxed_copy" , free_function = "g_boxed_free" , type_id = "gdk_event_get_type ()" ) ]
[ Compact ]
public class Event
Represents 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.
`GdkEvent` structs are immutable.
Content:
Properties:
Static methods:
Creation methods:
Methods:
- public Event copy ()
Copies a Event, copying or incrementing the
reference count of the resources associated with it (e.
- public void free ()
Frees a Event, freeing or decrementing any
resources associated with it.
- 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_button (out uint button)
Extract the button number from an event.
- public bool get_click_count (out uint click_count)
Extracts the click count from an event.
- public bool get_coords (out double x_win, out double y_win)
Extract the event window relative x/y coordinates from an event.
- 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 EventSequence get_event_sequence ()
Returns the event sequence to which the event belongs.
- public EventType get_event_type ()
Retrieves the type of the event.
- public bool get_keycode (out uint16 keycode)
Extracts the hardware keycode from an event.
- public bool get_keyval (out uint keyval)
Extracts the keyval from an event.
- public bool get_pointer_emulated ()
Returns whether this event is an 'emulated' pointer event.
- public bool get_root_coords (out double x_root, out double y_root)
Extract the root window relative x/y coordinates from an event.
- public int get_scancode ()
Gets the keyboard low-level scancode of a key event.
- public unowned Screen get_screen ()
Returns the screen for the event.
- public bool get_scroll_deltas (out double delta_x, out double delta_y)
Retrieves the scroll deltas from a Event
- public bool get_scroll_direction (out ScrollDirection direction)
Extracts the scroll direction from an event.
- public unowned Seat get_seat ()
Returns the seat that originated the event.
- public unowned Device? get_source_device ()
This function returns the hardware (slave)
Device that has triggered the event, falling back to the virtual (master) device
(as in get_device) if the event wasn’t caused by interaction with a hardware
device.
- public bool get_state (out ModifierType state)
If the event contains a “state” field, puts that field in
state.
- public uint32 get_time ()
Returns the timestamp of this.
- public unowned Window get_window ()
Extracts the Window
associated with an event.
- public bool is_scroll_stop_event ()
Check whether a scroll event is a stop scroll event.
- public void put ()
Appends a copy of the given event onto the front of the event queue
for event->any.
- public void set_device (Device device)
Sets the device for this to
device.
- public void set_device_tool (DeviceTool? tool)
Sets the device tool for this event, should be rarely used.
- public void set_screen (Screen screen)
Sets the screen for this to
screen.
- public void set_source_device (Device device)
Sets the slave device for this to
device.
- public bool triggers_context_menu ()
Returns whether a `GdkEvent` should trigger a context menu, according
to platform conventions.
Fields: