[gtkmm] Device: Added grab() overload.



commit 20e8ce82f99b2789db5c1519feedc9276febf055
Author: Krzesimir Nowak <qdlacz gmail com>
Date:   Tue Jan 4 23:01:47 2011 +0100

    Device: Added grab() overload.
    
    * gdk/src/device.[hg|ccg]: Added an overload of grab() method, which
    does not take Gdk::Cursor as argument.

 ChangeLog          |    7 +++++++
 gdk/src/device.ccg |    4 ++++
 gdk/src/device.hg  |    3 +++
 3 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ddd8016..4f1108c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-01-04  Krzesimir Nowak  <qdlacz gmail com>
+
+	Device: Added grab() overload.
+
+	* gdk/src/device.[hg|ccg]: Added an overload of grab() method, which
+	does not take Gdk::Cursor as argument.
+
 2011-01-04  Murray Cumming  <murrayc murrayc com>
 
 	Device: Added get_window_at_position() with no parameters.
diff --git a/gdk/src/device.ccg b/gdk/src/device.ccg
index 46ac624..ec137d2 100644
--- a/gdk/src/device.ccg
+++ b/gdk/src/device.ccg
@@ -50,6 +50,10 @@ Glib::RefPtr<const Window> Device::get_window_at_position() const
   return const_cast<Device*>(this)->get_window_at_position();
 }
 
+GrabStatus Device::grab(const Glib::RefPtr<Window>& window, GrabOwnership grab_ownership, bool owner_events, EventMask event_mask, guint32 time_)
+{
+  return static_cast<GrabStatus>(gdk_device_grab(gobj(), Glib::unwrap(window), static_cast<GdkGrabOwnership>(grab_ownership), static_cast<int>(owner_events), static_cast<GdkEventMask>(event_mask), 0, time_));
+}
 
 } // namespace Gdk
 
diff --git a/gdk/src/device.hg b/gdk/src/device.hg
index 837aba9..10d54b3 100644
--- a/gdk/src/device.hg
+++ b/gdk/src/device.hg
@@ -81,6 +81,9 @@ public:
 
   _WRAP_METHOD(GrabStatus grab(const Glib::RefPtr<Window>& window, GrabOwnership grab_ownership, bool owner_events, EventMask event_mask, const Glib::RefPtr<Cursor>& cursor, guint32 time_), gdk_device_grab)
 
+  // TODO: docs.
+  GrabStatus grab(const Glib::RefPtr<Window>& window, GrabOwnership grab_ownership, bool owner_events, EventMask event_mask, guint32 time_);
+
   _WRAP_METHOD(void ungrab(guint32 time_), gdk_device_ungrab)
   _WRAP_METHOD(void warp(const Glib::RefPtr<Screen>&, int x, int y), gdk_device_warp)
 



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