[gtkmm] Gdk::Device: Add get_axes(), signal_changed() and many properties
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Gdk::Device: Add get_axes(), signal_changed() and many properties
- Date: Sat, 28 May 2016 07:37:47 +0000 (UTC)
commit a0ff8f409ecae9663820e56aa13836cb8726b0cc
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Sat May 28 09:35:17 2016 +0200
Gdk::Device: Add get_axes(), signal_changed() and many properties
* gdk/src/device.hg: Add get_axes(), signal_changed() and many properties,
both old ones and the new property_axes().
* gdk/src/event.hg: Add enum AxisFlags.
* tools/m4/convert_gdk.m4: Add conversions for enum AxisFlags.
gdk/src/device.hg | 23 ++++++++++++++++++++++-
gdk/src/event.hg | 1 +
tools/m4/convert_gdk.m4 | 1 +
3 files changed, 24 insertions(+), 1 deletions(-)
---
diff --git a/gdk/src/device.hg b/gdk/src/device.hg
index b4e000f..95aa178 100644
--- a/gdk/src/device.hg
+++ b/gdk/src/device.hg
@@ -171,7 +171,6 @@ _DEPRECATE_IFDEF_END
_IGNORE(gdk_device_get_position_double)
_WRAP_METHOD(Glib::RefPtr<Window> get_window_at_position(int& win_x, int& win_y),
gdk_device_get_window_at_position, refreturn)
-
_WRAP_METHOD(Glib::RefPtr<const Window> get_window_at_position(int& win_x, int& win_y) const,
gdk_device_get_window_at_position, refreturn, constversion)
//TODO: Would this be ambiguous? Test it.
@@ -213,6 +212,28 @@ _DEPRECATE_IFDEF_END
_WRAP_METHOD(Glib::RefPtr<Seat> get_seat(), gdk_device_get_seat, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Seat> get_seat() const, gdk_device_get_seat, refreturn, constversion)
+ _WRAP_METHOD(AxisFlags get_axes() const, gdk_device_get_axes)
+
+ // We use no_default_handler because _GdkDeviceClass is private.
+ _WRAP_SIGNAL(void changed(), "changed", no_default_handler, newin "3,22")
+
+ //TODO: Wrap or ignore the "device-manager" and "tool" properties and the
+ // "tool-changed" signal. GdkDeviceManager is not recommended for use in new code.
+ // GdkDeviceTool is not fully documented. It's not clear if it's meant to
+ // be used outside gtk+.
+ _WRAP_PROPERTY("display", Glib::RefPtr<Display>, newin "3,22")
+ _WRAP_PROPERTY("name", Glib::ustring, newin "3,22")
+ _WRAP_PROPERTY("type", DeviceType, newin "3,22")
+ _WRAP_PROPERTY("associated-device", Glib::RefPtr<Device>, newin "3,22")
+ _WRAP_PROPERTY("input-source", InputSource, newin "3,22")
+ _WRAP_PROPERTY("input-mode", InputMode, newin "3,22")
+ _WRAP_PROPERTY("has-cursor", bool, newin "3,22")
+ _WRAP_PROPERTY("n-axes", guint, newin "3,22")
+ _WRAP_PROPERTY("vendor-id", Glib::ustring, newin "3,22")
+ _WRAP_PROPERTY("product-id", Glib::ustring, newin "3,22")
+ _WRAP_PROPERTY("seat", Glib::RefPtr<Seat>, newin "3,22")
+ _WRAP_PROPERTY("num-touches", guint, newin "3,22")
+ _WRAP_PROPERTY("axes", AxisFlags)
};
} // namespace Gdk
diff --git a/gdk/src/event.hg b/gdk/src/event.hg
index c0f4931..e68ea2e 100644
--- a/gdk/src/event.hg
+++ b/gdk/src/event.hg
@@ -47,6 +47,7 @@ _WRAP_ENUM(EventType, GdkEventType,
)
_WRAP_ENUM(AxisUse, GdkAxisUse)
+_WRAP_ENUM(AxisFlags, GdkAxisFlags)
//TODO: Actually use this class instead of GdkEvent?
class Event
diff --git a/tools/m4/convert_gdk.m4 b/tools/m4/convert_gdk.m4
index 0661764..972460a 100644
--- a/tools/m4/convert_gdk.m4
+++ b/tools/m4/convert_gdk.m4
@@ -25,6 +25,7 @@ _EQUAL(guchar*,guint8*)
_EQUAL(gfloat,float)
# Enums
+_CONV_ENUM(Gdk,AxisFlags)
_CONV_ENUM(Gdk,AxisUse)
_CONV_ENUM(Gdk,ByteOrder)
_CONV_ENUM(Gdk,CapStyle)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]