[gtkmm] Gdk::Event: Add EventTouchpadSwipe and 4 other subclasses



commit 9411320cc513c1adaefc9a2b5a43aa72fff26988
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date:   Fri May 26 17:04:01 2017 +0200

    Gdk::Event: Add EventTouchpadSwipe and 4 other subclasses
    
    * gdk/src/enums.hg: Wrap GdkTouchpadGesturePhase.
    * gdk/src/event.[ccg|hg]: Add EventTouchpadSwipe, EventTouchpadPinch,
    EventPadButton, EventPadAxis and EventPadGroupMode classes.
    Add Event::get_seat(), EventKey::get_scancode(), EventButton::get_click_count(),
    EventButton::shall_trigger_context_menu(), EventScroll::is_scroll_stop_event().
    EventWindowState::get_name() returns Glib::ustring. Fix some  comments.
    * gdk/src/gdk_docs_override.xml: Add some substitute_enumerator_name elements.
    * tools/m4/convert_gdk.m4: Add conversions for GdkTouchpadGesturePhase.
    Bug 135978

 gdk/src/enums.hg              |    2 +
 gdk/src/event.ccg             |  100 +++++++-----
 gdk/src/event.hg              |  359 ++++++++++++++++++++++++++++++++++++++---
 gdk/src/gdk_docs_override.xml |    3 +
 tools/m4/convert_gdk.m4       |    1 +
 5 files changed, 403 insertions(+), 62 deletions(-)
---
diff --git a/gdk/src/enums.hg b/gdk/src/enums.hg
index 278a64e..99ca946 100644
--- a/gdk/src/enums.hg
+++ b/gdk/src/enums.hg
@@ -14,6 +14,7 @@
  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <glibmm/value.h>
 #include <gdk/gdk.h>
 
 _DEFS(gdkmm,gdk)
@@ -31,5 +32,6 @@ _WRAP_ENUM(ScrollDirection, GdkScrollDirection)
 _WRAP_ENUM(SettingAction, GdkSettingAction)
 // GdkEventVisibility is deprecated and not wrapped in gtkmm.
 //_WRAP_ENUM(VisibilityState, GdkVisibilityState)
+_WRAP_ENUM(TouchpadGesturePhase, GdkTouchpadGesturePhase)
 
 } //namespace Gdk
diff --git a/gdk/src/event.ccg b/gdk/src/event.ccg
index 6e551b7..246c070 100644
--- a/gdk/src/event.ccg
+++ b/gdk/src/event.ccg
@@ -15,54 +15,76 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <gdkmm/device.h>
+#include <gdkmm/seat.h>
+
 namespace Gdk
 {
-  bool Event::is_send_event() const
-  {
-    return gobj()->any.send_event;
-  }
+bool Event::is_send_event() const
+{
+  return gobj()->any.send_event;
+}
+
+int EventKey::get_scancode() const
+{
+  return gdk_event_get_scancode(const_cast<GdkEvent*>(Event::gobj()));
+}
+
+guint EventButton::get_click_count() const
+{
+  guint click_count = 0;
+  gdk_event_get_click_count(Event::gobj(), &click_count);
+  return click_count;
+}
+
+bool EventButton::shall_trigger_context_menu() const
+{
+  return gdk_event_triggers_context_menu(Event::gobj());
+}
+
+bool EventButton::get_axis(Gdk::AxisUse axis_use, double& value) const
+{
+  return gdk_event_get_axis(Event::gobj(), static_cast<GdkAxisUse>(axis_use), &value);
+}
 
-  bool EventButton::get_axis(Gdk::AxisUse axis_use, double& value) const
-  {
-    return gdk_event_get_axis(Event::gobj(), static_cast<GdkAxisUse>(axis_use),
-                              &value);
-  }
+bool EventMotion::get_axis(Gdk::AxisUse axis_use, double& value) const
+{
+  return gdk_event_get_axis(Event::gobj(), static_cast<GdkAxisUse>(axis_use), &value);
+}
 
-  bool EventMotion::get_axis(Gdk::AxisUse axis_use, double& value) const
-  {
-    return gdk_event_get_axis(Event::gobj(), static_cast<GdkAxisUse>(axis_use),
-                              &value);
-  }
+bool EventTouch::get_axis(Gdk::AxisUse axis_use, double& value) const
+{
+  return gdk_event_get_axis(Event::gobj(), static_cast<GdkAxisUse>(axis_use), &value);
+}
 
-  bool EventTouch::get_axis(Gdk::AxisUse axis_use, double& value) const
-  {
-    return gdk_event_get_axis(Event::gobj(), static_cast<GdkAxisUse>(axis_use),
-                              &value);
-  }
+bool EventScroll::is_scroll_stop_event() const
+{
+  return gobj()->is_stop;
+}
 
-  bool EventSelection::has_requestor() const
-  {
-    return gobj()->requestor != nullptr;
-  }
+bool EventSelection::has_requestor() const
+{
+  return gobj()->requestor != nullptr;
+}
 
-  bool EventOwnerChange::has_owner() const
-  {
-    return gobj()->owner != nullptr;
-  }
+bool EventOwnerChange::has_owner() const
+{
+  return gobj()->owner != nullptr;
+}
 
-  bool EventGrabBroken::is_keyboard() const
-  {
-    return gobj()->keyboard;
-  }
+bool EventGrabBroken::is_keyboard() const
+{
+  return gobj()->keyboard;
+}
 
-  bool EventGrabBroken::is_implicit() const
-  {
-    return gobj()->implicit;
-  }
+bool EventGrabBroken::is_implicit() const
+{
+  return gobj()->implicit;
+}
 
-  bool EventGrabBroken::has_grab_window() const
-  {
-    return gobj()->grab_window != nullptr;
-  }
+bool EventGrabBroken::has_grab_window() const
+{
+  return gobj()->grab_window != nullptr;
+}
 
 } //namespace Gdk
diff --git a/gdk/src/event.hg b/gdk/src/event.hg
index b50d477..6fd025c 100644
--- a/gdk/src/event.hg
+++ b/gdk/src/event.hg
@@ -21,7 +21,6 @@ _CC_INCLUDE(gdk/gdk.h)
 #include <glibmm/refptr.h>
 #include <gdkmm/types.h>
 #include <gdkmm/enums.h>
-#include <gdkmm/device.h>
 #include <gdkmm/screen.h>
 #include <gdkmm/window.h>
 
@@ -42,6 +41,9 @@ extern "C" { typedef union _GdkEvent GdkEvent; }
 namespace Gdk
 {
 
+class Device;
+class Seat;
+
 /** Representing an event sequence.
  * Used to differentiate between multiple touches on multitouch touchscreens.
  */
@@ -52,7 +54,7 @@ struct EventSequence;
 class Event
 {
   _CLASS_GDKEVENT(Event, GdkEvent)
-  _IGNORE(gdk_event_copy, gdk_event_free)
+  _IGNORE(gdk_event_new, gdk_event_copy, gdk_event_free)
 public:
 
   _WRAP_ENUM(Type, GdkEventType,
@@ -62,15 +64,13 @@ public:
     s#^3BUTTON_PRESS#TRIPLE_BUTTON_PRESS#
   )
 
-  /**
-   * Returns the type of the event
-   */
-  _MEMBER_GET(event_type, type, Event::Type, GdkEventType)
+  _WRAP_METHOD(Event::Type get_event_type() const, gdk_event_get_event_type)
 
   /**
    * Returns the window which received the event
    */
   _MEMBER_GET_GOBJECT(window, any.window, Gdk::Window, GdkWindow*)
+  _IGNORE(gdk_event_get_window)
 
   /**
    * Returns @c true if the event was sent explicitly (e.g. using @c XSendEvent)
@@ -86,13 +86,24 @@ public:
   _WRAP_METHOD(Glib::RefPtr<Screen> get_screen(), gdk_event_get_screen, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Screen> get_screen() const, gdk_event_get_screen, refreturn, constversion)
 
+  _WRAP_METHOD(Glib::RefPtr<Seat> get_seat(), gdk_event_get_seat, refreturn, newin "3,90")
+  _WRAP_METHOD(Glib::RefPtr<const Seat> get_seat() const, gdk_event_get_seat, refreturn, constversion, newin 
"3,90")
+
   _WRAP_METHOD(static Event get(), gdk_event_get)
   _WRAP_METHOD(static Event peek(), gdk_event_peek)
   _WRAP_METHOD(void put(), gdk_event_put)
   _WRAP_METHOD(static bool events_pending(), gdk_events_pending)
+
+  //TODO: If GdkDeviceTool is wrapped in gtkmm, wrap gdk_event_get_device_tool().
+  _IGNORE(gdk_event_set_device_tool) // "Should be rarely used"
 };
 
 /** 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
 {
@@ -104,23 +115,31 @@ public:
    * Returns the timestamp of the event in milliseconds
    */
   _MEMBER_GET(time, time, guint32, guint32)
+  _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.
    */
   _MEMBER_GET(state, state, ModifierType, GdkModifierType)
+  _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.
    */
   _MEMBER_GET(keyval, keyval, guint, guint)
+  _IGNORE(gdk_event_get_keyval)
 
   /**
    * Returns the raw code of the key that was pressed or released.
    */
   _MEMBER_GET(hardware_keycode, hardware_keycode, guint16, guint16)
+  _IGNORE(gdk_event_get_keycode)
+
+  _WRAP_METHOD_DOCS_ONLY(gdk_event_get_scancode)
+  int get_scancode() const;
+  _IGNORE(gdk_event_get_scancode)
 
   /**
    * Returns the keyboard group
@@ -172,6 +191,8 @@ public:
  * For a double click to occur, the second button press must occur within 1/4 of
  * a second of the first. For a triple click to occur, the third button press
  * must also occur within 1/2 second of the first button press.
+ *
+ * @newin{3,90}
  */
 class EventButton : public Event
 {
@@ -194,6 +215,7 @@ public:
    * Returns the X coordinate of the pointer relative to the window.
    */
   _MEMBER_GET(x, x, double, gdouble)
+  _IGNORE(gdk_event_get_coords)
 
   /**
    * Returns the Y coordinate of the pointer relative to the window.
@@ -204,6 +226,7 @@ public:
    * Returns the X coordinate of the pointer relative to the root screen.
    */
   _MEMBER_GET(root_x, x_root, double, gdouble)
+  _IGNORE(gdk_event_get_root_coords)
 
   /**
    * Returns the Y coordinate of the pointer relative to the root screen.
@@ -220,11 +243,22 @@ public:
    * often be simulated by pressing both mouse buttons together
    */
   _MEMBER_GET(button, button, guint, guint)
+  _IGNORE(gdk_event_get_button)
 
   /**
    * Returns the device where the event originated from.
    */
   _MEMBER_GET_GOBJECT(device, device, Gdk::Device, GdkDevice*)
+  _IGNORE(gdk_event_get_device)
+
+  /** Extracts the click count from an event.
+   * @return The click count (0..3).
+   */
+  guint get_click_count() const;
+  _IGNORE(gdk_event_get_click_count)
+
+  _WRAP_METHOD_DOCS_ONLY(gdk_event_triggers_context_menu)
+  bool shall_trigger_context_menu() const;
 };
 
 /** Generated when the mouse is scrolled.
@@ -238,6 +272,8 @@ public:
  * 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
 {
@@ -281,6 +317,7 @@ public:
    * returns Gdk::ScrollDirection::SMOOTH
    */
   _MEMBER_GET(delta_x, delta_x, double, gdouble)
+  _IGNORE(gdk_event_get_scroll_deltas)
 
   /**
    * Returns the scroll delta in the Y axis. Meaningful only if get_direction()
@@ -292,6 +329,10 @@ public:
    * Returns the direction of the scroll.
    */
   _MEMBER_GET(direction, direction, ScrollDirection, GdkScrollDirection)
+  _IGNORE(gdk_event_get_scroll_direction)
+
+  _WRAP_METHOD_DOCS_ONLY(gdk_event_is_scroll_stop_event)
+  bool is_scroll_stop_event() const;
 
   /**
    * Returns the device where the event originated from.
@@ -302,6 +343,8 @@ public:
 /** Generated when a mouse pointer is moved.
  *
  * get_event_type() will return Gdk::Event::Type::MOTION_NOTIFY.
+ *
+ * @newin{3,90}
  */
 class EventMotion : public Event
 {
@@ -379,6 +422,8 @@ public:
  * 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
 {
@@ -425,11 +470,13 @@ public:
    * Returns the event sequence that the event belongs to
    */
   _MEMBER_GET(event_sequence, sequence, const Gdk::EventSequence*, const GdkEventSequence*)
+  _IGNORE(gdk_event_get_event_sequence)
 
   /**
    * Returns @c true if the event should be used for emulating pointer event
    */
   _MEMBER_GET(is_emulating_pointer, emulating_pointer, bool, gboolean)
+  _IGNORE(gdk_event_get_pointer_emulated)
 
   /**
    * Returns the device where the event originated from.
@@ -441,6 +488,8 @@ public:
  *
  * 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
 {
@@ -505,6 +554,8 @@ public:
  * redrawn.
  *
  * get_event_type() will return one of Gdk::Event::Type::EXPOSE, Gdk::Event::Type::DAMAGE.
+ *
+ * @newin{3,90}
  */
 class EventExpose : public Event
 {
@@ -534,22 +585,12 @@ public:
 };
 
 // GdkEventVisibility is deprecated. It's not used in gtk+ 4.
-/* Generated when the visibility status of a window changes.
- *
- * get_event_type() will return Gdk::Event::Type::VISIBILITY_NOTIFY.
- */
-//class EventVisibility : public Event
-//{
-//  _CLASS_GDKEVENT(EventVisibility, GdkEventVisibility, Event, GdkEvent)
-//public:
-  /* The new visibility state
-   */
-//  _MEMBER_GET(state, state, Gdk::VisibilityState, GdkVisibilityState)
-//};
 
 /** Generated when the keyboard focus changes.
  *
  * get_event_type() will return Gdk::Event::Type::FOCUS_CHANGE.
+ *
+ * @newin{3,90}
  */
 class EventFocus : public Event
 {
@@ -566,6 +607,8 @@ public:
 /** 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
 {
@@ -602,6 +645,8 @@ public:
 /** Rarely used event. Generated when a property of a window changes.
  *
  * get_event_type() will return Gdk::Event::Type::PROPERTY_NOTIFY.
+ *
+ * @newin{3,90}
  */
 class EventProperty : public Event
 {
@@ -630,7 +675,9 @@ public:
  * selection is taken over by another client application.
  *
  * get_event_type() will return one of Gdk::Event::Type::SELECTION_CLEAR,
- * Gdk::Event::Type::SELECTION_NOTIFY or Gdk::Event::Type::SELECTION_REQUEST).
+ * Gdk::Event::Type::SELECTION_NOTIFY or Gdk::Event::Type::SELECTION_REQUEST.
+ *
+ * @newin{3,90}
  */
 class EventSelection : public Event
 {
@@ -679,6 +726,8 @@ public:
  * extension.
  *
  * get_event_type() will return Gdk::Event::Type::OWNER_CHANGE.
+ *
+ * @newin{3,90}
  */
 class EventOwnerChange : public Event
 {
@@ -725,6 +774,8 @@ public:
  * 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
 {
@@ -765,6 +816,8 @@ public:
  *
  * get_event_type() will return one of Gdk::Event::Type::PROXIMITY_IN,
  * Gdk::Event::Type::PROXIMITY_OUT.
+ *
+ * @newin{3,90}
  */
 class EventProximity : public Event
 {
@@ -785,8 +838,9 @@ public:
 
 /** Generated when the state of the toplevel window changes.
  *
- * get_event_type() will return one of Gdk::Event::Type::WINDOW_STATE,
- * Gdk::Event::Type::PROXIMITY_OUT.
+ * get_event_type() will return Gdk::Event::Type::WINDOW_STATE.
+ *
+ * @newin{3,90}
  */
 class EventWindowState : public Event
 {
@@ -809,6 +863,8 @@ public:
 /** Generated when a setting is modified.
  *
  * get_event_type() will return Gdk::Event::Type::SETTING.
+ *
+ * @newin{3,90}
  */
 class EventSetting : public Event
 {
@@ -824,7 +880,7 @@ public:
   /**
    * Returns the name of the setting
    */
-  _MEMBER_GET(name, name, const char*, char*)
+  _MEMBER_GET(name, name, Glib::ustring, const char*)
 
 };
 
@@ -835,6 +891,8 @@ public:
  * cause Gdk::EventGrabBroken events.
  *
  * get_event_type() will return Gdk::Event::Type::GRAB_BROKEN.
+ *
+ * @newin{3,90}
  */
 class EventGrabBroken : public Event
 {
@@ -849,7 +907,7 @@ public:
   bool is_keyboard() const;
 
   /**
-   * @c true if a keyboard grab was broken, @c true if a pointer grab was broken
+   * @c true if the broken grab was implicit.
    */
   bool is_implicit() const;
 
@@ -868,4 +926,259 @@ public:
   _MEMBER_GET_GOBJECT(grab_window, grab_window, Gdk::Window, GdkWindow*)
 };
 
+/** 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
+   */
+  _MEMBER_GET(time, time, guint32, guint32)
+
+  /**
+   * Returns the current phase of the gesture.
+   */
+  _MEMBER_GET(phase, phase, TouchpadGesturePhase, GdkTouchpadGesturePhase)
+
+#m4 _CONVERSION(`gint8',`int',`$3')
+  /**
+   * Returns the number of fingers triggering the swipe.
+   */
+  _MEMBER_GET(n_fingers, n_fingers, int, gint8)
+
+  /**
+   * Returns a bit mask representing the state of the modifier keys (e.g.
+   * Control, Shift and Alt) and the pointer buttons.
+   */
+  _MEMBER_GET(state, state, ModifierType, GdkModifierType)
+
+  /**
+   * Returns the X coordinate of the pointer relative to the window.
+   */
+  _MEMBER_GET(x, x, double, gdouble)
+
+  /**
+   * Returns the Y coordinate of the pointer relative to the window.
+   */
+  _MEMBER_GET(y, y, double, gdouble)
+
+  /**
+   * Returns the movement delta in the X axis of the swipe focal point.
+   */
+  _MEMBER_GET(dx, dx, double, gdouble)
+
+  /**
+   * Returns the movement delta in the Y axis of the swipe focal point.
+   */
+  _MEMBER_GET(dy, dy, double, gdouble)
+
+  /**
+   * Returns the X coordinate of the pointer relative to the root of the screen.
+   */
+  _MEMBER_GET(root_x, x_root, double, gdouble)
+
+  /**
+   * Returns the Y coordinate of the pointer relative to the root of the screen.
+   */
+  _MEMBER_GET(root_y, y_root, double, gdouble)
+};
+
+/** 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
+   */
+  _MEMBER_GET(time, time, guint32, guint32)
+
+  /**
+   * Returns the current phase of the gesture.
+   */
+  _MEMBER_GET(phase, phase, TouchpadGesturePhase, GdkTouchpadGesturePhase)
+
+  /**
+   * Returns the number of fingers triggering the swipe.
+   */
+  _MEMBER_GET(n_fingers, n_fingers, int, gint8)
+
+  /**
+   * Returns a bit mask representing the state of the modifier keys (e.g.
+   * Control, Shift and Alt) and the pointer buttons.
+   */
+  _MEMBER_GET(state, state, ModifierType, GdkModifierType)
+
+  /**
+   * Returns the X coordinate of the pointer relative to the window.
+   */
+  _MEMBER_GET(x, x, double, gdouble)
+
+  /**
+   * Returns the Y coordinate of the pointer relative to the window.
+   */
+  _MEMBER_GET(y, y, double, gdouble)
+
+  /**
+   * Returns the movement delta in the X axis of the swipe focal point.
+   */
+  _MEMBER_GET(dx, dx, double, gdouble)
+
+  /**
+   * Returns the movement delta in the Y axis of the swipe focal point.
+   */
+  _MEMBER_GET(dy, dy, double, gdouble)
+
+  /**
+   * Returns the angle change in radians. Negative angles denote counter-
+   * clockwise movements.
+   */
+  _MEMBER_GET(angle_delta, angle_delta, double, gdouble)
+
+  /**
+   * Returns the current scale, relative to that at the time of the
+   * corresponding Gdk::TouchpadGesturePhase::BEGIN event.
+   */
+  _MEMBER_GET(scale, scale, double, gdouble)
+
+  /**
+   * Returns the X coordinate of the pointer relative to the root of the screen.
+   */
+  _MEMBER_GET(root_x, x_root, double, gdouble)
+
+  /**
+   * Returns the Y coordinate of the pointer relative to the root of the screen.
+   */
+  _MEMBER_GET(root_y, y_root, double, gdouble)
+};
+
+/** 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
+   */
+  _MEMBER_GET(time, time, guint32, guint32)
+
+  /**
+   * Returns 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.
+   */
+  _MEMBER_GET(group, group, guint, guint)
+
+  /**
+   * Returns the pad button that was pressed.
+   */
+  _MEMBER_GET(button, button, guint, guint)
+
+  /**
+   * Returns the current mode of @a group.
+   * Different groups in a Gdk::InputSource::TABLET_PAD device may have
+   * different current modes.
+   */
+  _MEMBER_GET(mode, mode, guint, guint)
+};
+
+/** 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
+   */
+  _MEMBER_GET(time, time, guint32, guint32)
+
+  /**
+   * Returns the pad group the ring/strip belongs to.
+   * A Gdk::InputSource::TABLET_PAD device may have one or more groups
+   * containing a set of buttons/rings/strips each.
+   */
+  _MEMBER_GET(group, group, guint, guint)
+
+  /**
+   * Returns the number of strip/ring that was interacted.
+   * This number is 0-indexed.
+   */
+  _MEMBER_GET(index, index, guint, guint)
+
+  /**
+   * Returns the current mode of @a group.
+   * Different groups in a Gdk::InputSource::TABLET_PAD device may have
+   * different current modes.
+   */
+  _MEMBER_GET(mode, mode, guint, guint)
+
+  /**
+   * Returns the current value for the given axis.
+   */
+  _MEMBER_GET(value, value, double, gdouble)
+};
+
+/** 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
+   */
+  _MEMBER_GET(time, time, guint32, guint32)
+
+  /**
+   * Returns the pad group that is switching mode.
+   * A Gdk::InputSource::TABLET_PAD device may have one or more groups
+   * containing a set of buttons/rings/strips each.
+   */
+  _MEMBER_GET(group, group, guint, guint)
+
+  /**
+   * Returns the new mode of @a group.
+   * Different groups in a Gdk::InputSource::TABLET_PAD device may have
+   * different current modes.
+   */
+  _MEMBER_GET(mode, mode, guint, guint)
+};
+
 } // namespace Gdk
diff --git a/gdk/src/gdk_docs_override.xml b/gdk/src/gdk_docs_override.xml
index 536adad..59da180 100644
--- a/gdk/src/gdk_docs_override.xml
+++ b/gdk/src/gdk_docs_override.xml
@@ -34,6 +34,8 @@
 <substitute_enumerator_name from_prefix="GDK_FUNC_" to_prefix="Gdk::WMFunction::" />
 <substitute_enumerator_name from_prefix="GDK_FULLSCREEN_" to_prefix="Gdk::FullscreenMode::" />
 <substitute_enumerator_name from_prefix="GDK_VISUAL_" to_prefix="Gdk::Visual::Type::" />
+<substitute_enumerator_name from_prefix="GDK_TOUCHPAD_GESTURE_PHASE_" 
to_prefix="Gdk::TouchpadGesturePhase::" />
+<substitute_enumerator_name from_prefix="GDK_MODIFIER_INTENT_" to_prefix="Gdk::ModifierIntent::" />
 <!-- Some enums have enumerators without unique prefixes. Handle these enumerators individually. -->
 <substitute_enumerator_name from="GDK_POINTER_MOTION_HINT_MASK" 
to="Gdk::EventMask::POINTER_MOTION_HINT_MASK" />
 <substitute_enumerator_name from="GDK_MOTION_NOTIFY" to="Gdk::Event::Type::MOTION_NOTIFY" />
@@ -61,6 +63,7 @@
 <substitute_enumerator_name from="GDK_PIXBUF_ERROR" to="GDK_PIXBUF_ERROR" />
 <substitute_enumerator_name from="G_FILE_ERROR" to="G_FILE_ERROR" />
 <substitute_enumerator_name from="G_IO_ERROR" to="G_IO_ERROR" />
+<substitute_enumerator_name from="GDK_BUTTON_SECONDARY" to="GDK_BUTTON_SECONDARY" />
 
 <function name="gdk_display_manager_list_displays">
 <return> a list of #GdkDisplay objects.
diff --git a/tools/m4/convert_gdk.m4 b/tools/m4/convert_gdk.m4
index 21149ea..5e39b11 100644
--- a/tools/m4/convert_gdk.m4
+++ b/tools/m4/convert_gdk.m4
@@ -66,6 +66,7 @@ _CONV_ENUM(Gdk,SettingAction)
 _CONV_ENUM(Gdk,Status)
 _CONV_ENUM(Gdk,SubpixelLayout)
 _CONV_ENUM(Gdk,SubwindowMode)
+_CONV_ENUM(Gdk,TouchpadGesturePhase)
 _CONV_INCLASS_ENUM(Gdk,Visual,Type)
 _CONV_ENUM(Gdk,WindowAttributesType)
 _CONV_ENUM(Gdk,WindowEdge)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]