org.gnome.gdk

## Class EventButton

- Object
- - org.freedesktop.bindings.Pointer
  - - org.gnome.glib.Boxed
    - - org.gnome.gdk.Event
      - - org.gnome.gdk.EventButton

-     public final class EventButton
      extends Event

  Event data describing a button on a pointing device that was pressed or released. Notably, you can find out which button on the device was clicked with `getButton()`, and whether any modifier keys were being held down by the user with `getState()`.
  Since:
    4.0.6
  Author:
    Andrew Cowie, Srichand Pendyala

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `MouseButton` | `getButton()` Which button on the pointing device was pressed?
    `ModifierType` | `getState()` Get the state of the modifier keys.
    `double` | `getX()` Get the horizontal location that this Event occured at, relative to the `[org.gnome.gdk]` Window.
    `double` | `getY()` Get the vertical location that this Event occured at, relative to the `[org.gnome.gdk]` Window.

    - ### Methods inherited from class org.gnome.gdk.Event

      `getType, getWindow`

    - ### Methods inherited from class org.freedesktop.bindings.Pointer

      `toString`

    - ### Methods inherited from class Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### getButton

          public MouseButton getButton()

      Which button on the pointing device was pressed?
      Since:
        4.0.6

    - #### getState

          public ModifierType getState()

      Get the state of the modifier keys. This will be `NONE` if no modifiers are being held down. See EventKey's `getState()` and `ModifierType` for usage details.
      Since:
        4.0.6

    - #### getX

          public double getX()

      Get the horizontal location that this Event occured at, relative to the `[org.gnome.gdk]` Window. In most cases you will get an integral return; in any case, most usages of this return value will want a whole number of pixels, so cast to `int` as necessary.
      Since:
        4.0.9

    - #### getY

          public double getY()

      Get the vertical location that this Event occured at, relative to the `[org.gnome.gdk]` Window.
      Since:
        4.0.9