/* Copyright (C) 2017 The gtkmm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 */

_DEFS(gdkmm,gdk)
_CC_INCLUDE(gdk/gdk.h)

#include <glibmm/refptr.h>
#include <gdkmm/event.h>
#include <gdkmm/enums.h>
#include <gdkmm/rectangle.h>
#include <gdkmm/types.h>
#include <gdkmm/window.h>

// All subclasses of Gdk::Event.
//
// Keeping the subclasses in a separate file makes it easier to avoid cyclic
// inclusions (where a.h includes b.h, and b.h includes a.h).
// One file per subclass would result in too many small files.

// _WRAP_METHOD() is not useful here. It generates code where the first parameter
// in the call to the C function is gobj() or const_cast<GdkEventSubclass*>(gobj).
// The C functions here require Event::gobj().

namespace Gdk
{
class DeviceTool;
class DragContext;

/** Representing an event sequence.
 * Used to differentiate between multiple touches on multitouch touchscreens.
 * It's a hidden struct. You can test %EventSequence pointers for equality,
 * but you can't do much more with them.
 */
struct EventSequence;

/** Generated when a key is pressed or released.
 *
 * get_event_type() will return Gdk::Event::Type::KEY_PRESS or
 * Gdk::Event::Type::KEY_RELEASE.
 *
 * @newin{3,90}
 */
class EventKey : public Event
{
  _CLASS_GDKEVENT(EventKey, GdkEventKey, Event, GdkEvent)
  _IGNORE(gdk_event_new, gdk_event_copy, gdk_event_free)
public:

  /**
   * Returns the timestamp of the event in milliseconds.
   */
  guint32 get_time() const;
  _IGNORE(gdk_event_get_time)

  /**
   * Returns a bit mask representing the state of the modifier keys (e.g.
   * Control, Shift and Alt) and the pointer buttons.
   */
  ModifierType get_state() const;
  _IGNORE(gdk_event_get_state)

  /**
   * Returns the key that was pressed or released. See the <gdk/gdkkeysyms.h>
   * header file for a complete list of GDK key codes.
   */
  guint get_keyval() const;
  _IGNORE(gdk_event_get_keyval)

  /**
   * Returns the raw code of the key that was pressed or released.
   */
  guint16 get_keycode() const;
  _IGNORE(gdk_event_get_keycode)

  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_scancode)
  int get_scancode() const;

  /**
   * Returns the keyboard group.
   */
  guint get_key_group() const;
  _IGNORE(gdk_event_get_key_group)

  /**
   * Returns @c true if the hardware keycode is mapped to a modifier key.
   */
  bool get_key_is_modifier() const;
  _IGNORE(gdk_event_get_key_is_modifier)

  _IGNORE(gdk_event_get_string) dnl// The retrieved struct member is deprecated.

  // Belong to the base class:
  _IGNORE(gdk_event_get_event_type, gdk_event_get_window, gdk_event_is_sent,
    gdk_event_get_seat, gdk_event_handler_set, gdk_event_set_device, gdk_event_get_device,
    gdk_event_set_source_device, gdk_event_get_source_device, gdk_event_set_display,
    gdk_event_get_display)
};

/** Represents a mouse button press or release event.
 *
 * get_event_type() will return Gdk::Event::Type::BUTTON_PRESS or
 * Gdk::Event::Type::BUTTON_RELEASE.
 *
 * @newin{3,90}
 */
class EventButton : public Event
{
  _CLASS_GDKEVENT(EventButton, GdkEventButton, Event, GdkEvent)

public:

  /**
   * Returns the timestamp of the event in milliseconds.
   */
  guint32 get_time() const;

  /**
   * Returns a bit mask representing the state of the modifier keys (e.g.
   * Control, Shift and Alt) and the pointer buttons.
   */
  ModifierType get_state() const;

  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_coords, voidreturn)
  void get_coords(double& x_win, double& y_win) const;

  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_root_coords, voidreturn)
  void get_root_coords(double& x_root, double& y_root) const;

  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_axis)
  bool get_axis(Gdk::AxisUse axis_use, double& value) const;

  /**
   * Returns the number of the button which was pressed or released, numbered
   * from 1 to 5. Normally button 1 is the left mouse button, 2 is the middle
   * button, and 3 is the right button. On 2-button mice, the middle button can
   * often be simulated by pressing both mouse buttons together.
   */
  guint get_button() const;
  _IGNORE(gdk_event_get_button)

  _IGNORE(gdk_event_get_click_count) dnl// Always returns 1 for an EventButton

  _WRAP_METHOD_DOCS_ONLY(gdk_event_triggers_context_menu)
  bool shall_trigger_context_menu() const;

  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_device_tool, newin "3,94")
  Glib::RefPtr<DeviceTool> get_device_tool();
  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_device_tool, newin "3,94")
  Glib::RefPtr<const DeviceTool> get_device_tool() const;
};

/** Generated when the mouse is scrolled.
 *
 * These events are from button presses for the buttons 4 to 7. Wheel mice are
 * usually configured to generate button press events for buttons 4 and 5 when
 * the wheel is turned.
 *
 * get_event_type() will return Gdk::Event::Type::SCROLL.
 *
 * Some GDK backends can also generate 'smooth' scroll events, which can be
 * recognized by the Gdk::ScrollDirection::SMOOTH scroll direction. For these,
 * scroll deltas can be obtained with get_delta_x() and get_delta_y().
 *
 * @newin{3,90}
 */
class EventScroll : public Event
{
  _CLASS_GDKEVENT(EventScroll, GdkEventScroll, Event, GdkEvent)

public:

  /**
   * Returns the timestamp of the event in milliseconds.
   */
  guint32 get_time() const;

  /**
   * Returns a bit mask representing the state of the modifier keys (e.g.
   * Control, Shift and Alt) and the pointer buttons.
   */
  ModifierType get_state() const;

  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_coords, voidreturn)
  void get_coords(double& x_win, double& y_win) const;

  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_root_coords, voidreturn)
  void get_root_coords(double& x_root, double& y_root) const;

  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_scroll_deltas)
  bool get_scroll_deltas(double& delta_x, double& delta_y) const;

  /**
   * Returns the direction of the scroll.
   */
  ScrollDirection get_scroll_direction() const;
  _IGNORE(gdk_event_get_scroll_direction)

  _WRAP_METHOD_DOCS_ONLY(gdk_event_is_scroll_stop_event)
  bool is_scroll_stop_event() const;
};

/** Generated when a mouse pointer is moved.
 *
 * get_event_type() will return Gdk::Event::Type::MOTION_NOTIFY.
 *
 * @newin{3,90}
 */
class EventMotion : public Event
{
  _CLASS_GDKEVENT(EventMotion, GdkEventMotion, Event, GdkEvent)

public:

  /**
   * Returns the timestamp of the event in milliseconds.
   */
  guint32 get_time() const;

  /**
   * Returns a bit mask representing the state of the modifier keys (e.g.
   * Control, Shift and Alt) and the pointer buttons.
   */
  ModifierType get_state() const;

  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_coords, voidreturn)
  void get_coords(double& x_win, double& y_win) const;

  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_root_coords, voidreturn)
  void get_root_coords(double& x_root, double& y_root) const;

  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_axis)
  bool get_axis(Gdk::AxisUse axis_use, double& value) const;

  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_device_tool, newin "3,94")
  Glib::RefPtr<DeviceTool> get_device_tool();
  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_device_tool, newin "3,94")
  Glib::RefPtr<const DeviceTool> get_device_tool() const;
};

/** Generated during an attached touchscreen is touched.
 *
 * get_event_type() will return one of Gdk::Event::Type::TOUCH_BEGIN,
 * Gdk::Event::Type::TOUCH_UPDATE, Gdk::Event::Type::TOUCH_END or
 * Gdk::Event::Type::TOUCH_CANCEL.
 *
 * Touch events are grouped into sequences by means of the sequence field, which
 * can also be obtained with get_event_sequence(). Each sequence
 * begins with a Gdk::Event::Type::TOUCH_BEGIN event, followed by any number of
 * Gdk::Event::Type::TOUCH_UPDATE events, and ends with a Gdk::Event::Type::TOUCH_END
 * (or Gdk::Event::Type::TOUCH_CANCEL) event. With multitouch devices, there may
 * be several active sequences at the same time.
 *
 * @newin{3,90}
 */
class EventTouch : public Event
{
  _CLASS_GDKEVENT(EventTouch, GdkEventTouch, Event, GdkEvent)

public:

  /**
   * Returns the timestamp of the event in milliseconds.
   */
  guint32 get_time() const;

  /**
   * Returns a bit mask representing the state of the modifier keys (e.g.
   * Control, Shift and Alt) and the pointer buttons.
   */
  ModifierType get_state() const;

  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_coords, voidreturn)
  void get_coords(double& x_win, double& y_win) const;

  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_root_coords, voidreturn)
  void get_root_coords(double& x_root, double& y_root) const;

  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_axis)
  bool get_axis(Gdk::AxisUse axis_use, double& value) const;

  /**
   * Returns the event sequence that the event belongs to
   */
  const EventSequence* get_event_sequence() const;
  _IGNORE(gdk_event_get_event_sequence)

  /**
   * Returns @c true if the event should be used for emulating pointer event.
   */
  bool get_touch_emulating_pointer() const;
  _IGNORE(gdk_event_get_touch_emulating_pointer)

  //TODO: In other subclasses as well?
  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_pointer_emulated)
  bool get_pointer_emulated() const;
};

/** Generated when the mouse pointer leaves or enters the window.
 *
 * get_event_type() will return one of Gdk::Event::Type::LEAVE_NOTIFY or
 * Gdk::Event::Type::ENTER_NOTIFY.
 *
 * @newin{3,90}
 */
class EventCrossing : public Event
{
  _CLASS_GDKEVENT(EventCrossing, GdkEventCrossing, Event, GdkEvent)

public:

  /**
   * Returns the timestamp of the event in milliseconds.
   */
  guint32 get_time() const;

  /*
   * Returns the window that was entered or left.
   */
  //Glib::RefPtr<Gdk::Window> get_subwindow(); //TODO: Remove? There is no corresponding gtk+ function.
  /*
   * Returns the window that was entered or left.
   */
  //Glib::RefPtr<const Gdk::Window> get_subwindow() const;

  /**
   * Returns a bit mask representing the state of the modifier keys (e.g.
   * Control, Shift and Alt) and the pointer buttons.
   */
  ModifierType get_state() const;

  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_coords, voidreturn)
  void get_coords(double& x_win, double& y_win) const;

  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_root_coords, voidreturn)
  void get_root_coords(double& x_root, double& y_root) const;

  /*** Returns the crossing mode.
   * Gdk::CrossingMode::GTK_GRAB, Gdk::CrossingMode::GTK_UNGRAB, and
   * Gdk::CrossingMode::STATE_CHANGED are always synthesized, never native.
   */
  CrossingMode get_crossing_mode() const;
  _IGNORE(gdk_event_get_crossing_mode)

  /**
   * Returns the kind of crossing that has been made.
   */
  NotifyType get_crossing_detail() const;
  _IGNORE(gdk_event_get_crossing_detail)

  /*
   * Returns @c true if the window was the focus window, @c false otherwise
   */
  //bool get_focus() const; //TODO: Remove? There is no corresponding gtk+ function.
};

/** Generated when all or part of a window becomes visible and needs to be
 * redrawn.
 *
 * get_event_type() will return one of Gdk::Event::Type::EXPOSE, Gdk::Event::Type::DAMAGE.
 *
 * @newin{3,90}
 */
class EventExpose : public Event
{
  _CLASS_GDKEVENT(EventExpose, GdkEventExpose, Event, GdkEvent)

public:

  /*
   * Returns the bounding box of the region to be redrawn
   */
  //Rectangle get_area() const; //TODO: Remove? There is no corresponding gtk+ function.

  /*
   * Returns the region to be redrawn
   */
  //::Cairo::RefPtr<const ::Cairo::Region> get_region() const; //TODO: Remove? There is no corresponding gtk+ function.

  /*
   * Returns the number of contiguous Gdk::Event::Type::EXPOSE events following this one.
   * The only use for this is "exposure compression", i.e. handling all contiguous
   * Gdk::Event::Type::EXPOSE events in one go, though GDK performs some exposure
   * compression so this is not normally needed.
   */
  //int get_count() const; //TODO: Remove? There is no corresponding gtk+ function.
};

// GdkEventVisibility is deprecated. It's not used in gtk+ 4.

/** Generated when the keyboard focus changes.
 *
 * get_event_type() will return Gdk::Event::Type::FOCUS_CHANGE.
 *
 * @newin{3,90}
 */
class EventFocus : public Event
{
  _CLASS_GDKEVENT(EventFocus, GdkEventFocus, Event, GdkEvent)

public:

  /**
   * @c true if the window gained focus, @c false if lost
   */
  bool get_focus_in() const;
  _IGNORE(gdk_event_get_focus_in)
};

/** Generated when the position or size of a window changes.
 *
 * get_event_type() will return Gdk::Event::Type::CONFIGURE.
 *
 * @newin{3,90}
 */
class EventConfigure : public Event
{
  _CLASS_GDKEVENT(EventConfigure, GdkEventConfigure, Event, GdkEvent)

public:

  /**
   * Extract the event window relative x/y coordinates from an event.
   * @param[out] x_win The new X coordinate of the window, relative to its parent.
   * @param[out] y_win The new Y coordinate of the window, relative to its parent.
   */
  void get_coords(double& x_win, double& y_win) const;

  /*
   * Returns the new width of the window
   */
  /*
   * Returns the new height of the window
   */
  //void get_size(int& width, int& Height) const; //TODO: Remove? There is no corresponding gtk+ function.

  /*
   * Convenience method to access all position and size information at once
   */
  //Gdk::Rectangle get_rect() const; //TODO: Remove? There is no corresponding gtk+ function.
};

/** Generated during Drag-and-Drop (DND) operations.
 *
 * get_event_type() will return one of Gdk::Event::Type::DRAG_ENTER,
 * Gdk::Event::Type::DRAG_LEAVE, Gdk::Event::Type::DRAG_MOTION,
 * Gdk::Event::Type::DRAG_STATUS, Gdk::Event::Type::DROP_START
 * or Gdk::Event::Type::DROP_FINISHED.
 *
 * @newin{3,90}
 */
class EventDND : public Event
{
  _CLASS_GDKEVENT(EventDND, GdkEventDND, Event, GdkEvent)

public:

  /**
   * Returns the timestamp of the event in milliseconds.
   */
  guint32 get_time() const;

  /** Extract the root window relative x/y coordinates from an event.
   * Only meaningful if get_event_type() returns Gdk::Event::Type::DRAG_MOTION
   * orGdk::Event::Type::DROP_START.
   *
   * @param[out] x_root Location to put root window x coordinate.
   * @param[out] y_root Location to put root window y coordinate.
   */
  void get_root_coords(double& x_root, double& y_root) const;

  /**
   * Returns the drag context.
   */
  Glib::RefPtr<Gdk::DragContext> get_drag_context();
  /**
   * Returns the drag context.
   */
  Glib::RefPtr<const Gdk::DragContext> get_drag_context() const;
  _IGNORE(gdk_event_get_drag_context)
};

/** Rarely used event. Generated when a stylus has moved in or out of contact
 * with the tablet, or perhaps that the user's finger has moved in or out of
 * contact with a touch screen.
 *
 * This event type will be used pretty rarely. It only is important for XInput
 * aware programs that are drawing their own cursor.
 *
 * get_event_type() will return one of Gdk::Event::Type::PROXIMITY_IN,
 * Gdk::Event::Type::PROXIMITY_OUT.
 *
 * @newin{3,90}
 */
class EventProximity : public Event
{
  _CLASS_GDKEVENT(EventProximity, GdkEventProximity, Event, GdkEvent)

public:

  /**
   * Returns the timestamp of the event in milliseconds.
   */
  guint32 get_time() const;
};

/** Generated when a pointer or keyboard grab is broken. On X11, this happens
 * when the grab window becomes unviewable (i.e. it or one of its ancestors is
 * unmapped), or if the same application grabs the pointer or keyboard again.
 * Note that implicit grabs (which are initiated by button presses) can also
 * cause Gdk::EventGrabBroken events.
 *
 * get_event_type() will return Gdk::Event::Type::GRAB_BROKEN.
 *
 * @newin{3,90}
 */
class EventGrabBroken : public Event
{
  _CLASS_GDKEVENT(EventGrabBroken, GdkEventGrabBroken, Event, GdkEvent)

public:

  /*
   * @c true if a keyboard grab was broken, @c false if a pointer grab was
   * broken.
   */
  //bool is_keyboard() const; //TODO Remove? There is no corresponding gtk+ function.

  /*
   * @c true if the broken grab was implicit.
   */
  //bool is_implicit() const; //TODO Remove? There is no corresponding gtk+ function.

  /** Gets the new grab window if this event is caused by another grab in
   * the same application.
   *
   * @returns If this event is caused by another grab in the same application
   *          then the new grab window, else Glib::RefPtr<Gdk::Window>(nullptr).
   */
  Glib::RefPtr<Gdk::Window> get_grab_window();
  /** Gets the new grab window if this event is caused by another grab in
   * the same application.
   *
   * @returns If this event is caused by another grab in the same application
   *          then the new grab window, else Glib::RefPtr<const Gdk::Window>(nullptr).
   */
  Glib::RefPtr<const Gdk::Window> get_grab_window() const;
  _IGNORE(gdk_event_get_grab_window)
};

/** Generated during touchpad swipe gestures.
 *
 * get_event_type() will return Gdk::Event::Type::TOUCHPAD_SWIPE.
 *
 * @newin{3,90}
 */
class EventTouchpadSwipe : public Event
{
  _CLASS_GDKEVENT(EventTouchpadSwipe, GdkEventTouchpadSwipe, Event, GdkEvent)

public:

  /**
   * Returns the timestamp of the event in milliseconds.
   */
  guint32 get_time() const;

  /**
   * Returns the current phase of the gesture.
   */
  TouchpadGesturePhase get_touchpad_gesture_phase() const;
   _IGNORE(gdk_event_get_touchpad_gesture_phase)

  /**
   * Returns the number of fingers triggering the swipe.
   */
  guint get_touchpad_gesture_n_fingers() const;
  _IGNORE(gdk_event_get_touchpad_gesture_n_fingers)

  /**
   * Returns a bit mask representing the state of the modifier keys (e.g.
   * Control, Shift and Alt) and the pointer buttons.
   */
  ModifierType get_state() const;

  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_coords, voidreturn)
  void get_coords(double& x_win, double& y_win) const;

  /**
   * @param[out] dx The movement delta in the X axis of the swipe focal point.
   * @param[out] dy The movement delta in the Y axis of the swipe focal point.
   */
  void get_touchpad_deltas(double& dx, double& dy) const;
  _IGNORE(gdk_event_get_touchpad_deltas)

  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_root_coords, voidreturn)
  void get_root_coords(double& x_root, double& y_root) const;
};

/** Generated during touchpad swipe gestures.
 *
 * get_event_type() will return Gdk::Event::Type::TOUCHPAD_PINCH.
 *
 * @newin{3,90}
 */
class EventTouchpadPinch : public Event
{
  _CLASS_GDKEVENT(EventTouchpadPinch, GdkEventTouchpadPinch, Event, GdkEvent)

public:

  /**
   * Returns the timestamp of the event in milliseconds.
   */
  guint32 get_time() const;

  /**
   * Returns the current phase of the gesture.
   */
  TouchpadGesturePhase get_touchpad_gesture_phase() const;

  /**
   * Returns the number of fingers triggering the swipe.
   */
  guint get_touchpad_gesture_n_fingers() const;

  /**
   * Returns a bit mask representing the state of the modifier keys (e.g.
   * Control, Shift and Alt) and the pointer buttons.
   */
  ModifierType get_state() const;

  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_coords, voidreturn)
  void get_coords(double& x_win, double& y_win) const;

  /**
   * @param[out] dx The movement delta in the X axis of the swipe focal point.
   * @param[out] dy The movement delta in the Y axis of the swipe focal point.
   */
  void get_touchpad_deltas(double& dx, double& dy) const;

  /**
   * Returns the angle change in radians. Negative angles denote counter-
   * clockwise movements.
   */
  double get_touchpad_angle_delta() const;
  _IGNORE(gdk_event_get_touchpad_angle_delta)

  /**
   * Returns the current scale, relative to that at the time of the
   * corresponding Gdk::TouchpadGesturePhase::BEGIN event.
   */
  double get_touchpad_scale() const;
  _IGNORE(gdk_event_get_touchpad_scale)

  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_root_coords, voidreturn)
  void get_root_coords(double& x_root, double& y_root) const;
};

/** Generated during Gdk::InputSource::TABLET_PAD button presses and releases.
 *
 * get_event_type() will return Gdk::Event::Type::PAD_BUTTON_PRESS or
 * Gdk::Event::Type::PAD_BUTTON_RELEASE.
 *
 * @newin{3,90}
 */
class EventPadButton : public Event
{
  _CLASS_GDKEVENT(EventPadButton, GdkEventPadButton, Event, GdkEvent)

public:

  /**
   * Returns the timestamp of the event in milliseconds.
   */
  guint32 get_time() const;

  /**
   * @param[out] group The pad group the button belongs to.
   *             A Gdk::InputSource::TABLET_PAD device may have one or more groups
   *             containing a set of buttons/rings/strips each.
   * @param[out] mode The current mode of @a group.
   *             Different groups in a Gdk::InputSource::TABLET_PAD device may have
   *             different current modes.
   */
  void get_pad_group_mode(guint& group, guint& mode) const;
  _IGNORE(gdk_event_get_pad_group_mode)

  /**
   * Returns the pad button that was pressed.
   */
  guint get_pad_button() const;
  _IGNORE(gdk_event_get_pad_button)
};

/** Generated during Gdk::InputSource::TABLET_PAD interaction with tactile sensors.
 *
 * get_event_type() will return Gdk::Event::Type::PAD_RING or
 * Gdk::Event::Type::PAD_STRIP.
 *
 * @newin{3,90}
 */
class EventPadAxis : public Event
{
  _CLASS_GDKEVENT(EventPadAxis, GdkEventPadAxis, Event, GdkEvent)

public:

  /**
   * Returns the timestamp of the event in milliseconds.
   */
  guint32 get_time() const;

  /**
   * @param[out] group The pad group the button belongs to.
   *             A Gdk::InputSource::TABLET_PAD device may have one or more groups
   *             containing a set of buttons/rings/strips each.
   * @param[out] mode The current mode of @a group.
   *             Different groups in a Gdk::InputSource::TABLET_PAD device may have
   *             different current modes.
   */
  void get_pad_group_mode(guint& group, guint& mode) const;

  /**
   * @param[out] index The number of the strip/ring that was interacted.
   *             This number is 0-indexed.
   * @param[out] value The current value for the given axis.
   */
  void get_pad_axis_value(guint& index, double& value) const;
  _IGNORE(gdk_event_get_pad_axis_value)
};

/** Generated during Gdk::InputSource::TABLET_PAD mode switches in a group.
 *
 * get_event_type() will return Gdk::Event::Type::PAD_GROUP_MODE.
 *
 * @newin{3,90}
 */
class EventPadGroupMode : public Event
{
  _CLASS_GDKEVENT(EventPadGroupMode, GdkEventPadGroupMode, Event, GdkEvent)

public:

  /**
   * Returns the timestamp of the event in milliseconds.
   */
  guint32 get_time() const;

  /**
   * @param[out] group The pad group the button belongs to.
   *             A Gdk::InputSource::TABLET_PAD device may have one or more groups
   *             containing a set of buttons/rings/strips each.
   * @param[out] mode The current mode of @a group.
   *             Different groups in a Gdk::InputSource::TABLET_PAD device may have
   *             different current modes.
   */
  void get_pad_group_mode(guint& group, guint& mode) const;
};

} // namespace Gdk
