Gjsify LogoGjsify Logo

An event caused by a pointing device moving between surfaces.

Hierarchy

Index

Constructors

Properties

name: string

Methods

  • _get_angle(event2: Gdk.Event): [boolean, number]
  • 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.

    Parameters

    Returns [boolean, number]

  • _get_center(event2: Gdk.Event): [boolean, number, number]
  • Returns the point halfway between the events' positions.

    This assumes that both events have X/Y information. If not, this function returns %FALSE.

    Parameters

    Returns [boolean, number, number]

  • _get_distance(event2: Gdk.Event): [boolean, number]
  • Returns the distance between the event locations.

    This assumes that both events have X/Y information. If not, this function returns %FALSE.

    Parameters

    Returns [boolean, number]

  • get_axes(): [boolean, number[]]
  • 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].

    Returns [boolean, number[]]

  • get_axis(axis_use: Gdk.AxisUse): [boolean, number]
  • Extract the axis value for a particular axis use from an event structure.

    To find out which axes are used, use [methodGdk.DeviceTool.get_axes] on the device tool returned by [methodGdk.Event.get_device_tool].

    Parameters

    Returns [boolean, number]

  • 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].

    Returns Gdk.DeviceTool

  • get_focus(): boolean
  • 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.

    Returns Gdk.TimeCoord[]

  • get_pointer_emulated(): boolean
  • get_position(): [boolean, number, number]
  • get_time(): number
  • triggers_context_menu(): boolean
  • 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.

    Returns boolean

  • unref(): void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method