Grx.Event.prototype.get_coords

function get_coords(): [x: Number(gint), y: Number(gint)] {
    // Gjs wrapper for grx_event_get_coords()
}
  

Gets the screen coordinates of an event.

x and y are set to -1 if event is not a Grx.ButtonEvent, Grx.MotionEvent or Grx.TouchEvent.

x

the x coordinate

y

the y coordinate