[gtkmm] gdkmm: Display: Added set/unset_device_hooks().



commit 7ccaa65d7909dfb12c1ffe92dac9db7edbc22df8
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Oct 26 10:07:15 2010 +0200

    gdkmm: Display: Added set/unset_device_hooks().
    
    	* gdk/src/pixbufformat.[hg|ccg]: Wrap gdk_display_set_device_hooks().

 ChangeLog           |    6 ++++++
 gdk/src/display.ccg |   31 +++++++++++++++++--------------
 gdk/src/display.hg  |    7 +++++++
 3 files changed, 30 insertions(+), 14 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 9935af5..6687b7c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2010-10-26  Murray Cumming  <murrayc murrayc com>
 
+	gdkmm: Display: Added set/unset_device_hooks().
+
+	* gdk/src/pixbufformat.[hg|ccg]: Wrap gdk_display_set_device_hooks().
+
+2010-10-26  Murray Cumming  <murrayc murrayc com>
+
 	gdkmm: PixbufFormat: Wrap as a boxed-type.
 
 	* gdk/src/pixbufformat.[hg|ccg]: Wrap this as a boxed-type, now that it is.
diff --git a/gdk/src/display.ccg b/gdk/src/display.ccg
index d982c57..1513807 100644
--- a/gdk/src/display.ccg
+++ b/gdk/src/display.ccg
@@ -56,7 +56,7 @@ void Display::get_device_state(const Glib::RefPtr<Device>& device, int& x, int&
   gdk_display_get_device_state(gobj(), Glib::unwrap(device), 0, &x, &y, &cMask);
   mask = (ModifierType)cMask;
 }
-   
+
 void Display::get_pointer(Glib::RefPtr<Screen>& screen, int& x, int& y, ModifierType& mask)
 {
   GdkScreen* cScreen = 0;
@@ -96,35 +96,38 @@ Glib::RefPtr<const Window> Display::get_window_at_pointer() const
 
 GdkDisplayPointerHooks*  Display::unset_pointer_hooks()
 {
-  return gdk_display_set_pointer_hooks(gobj(), 0 /* See GDK docs */);  
+  return gdk_display_set_pointer_hooks(gobj(), 0 /* See GDK docs */);
 }
 
- void Display::store_clipboard(const Glib::RefPtr<Gdk::Window>& clipboard_window, guint32 time_)
- {
-   gdk_display_store_clipboard(gobj(), clipboard_window->gobj(), time_, 0 /* see the C docs */, 0);
- }
-  
- void Display::store_clipboard(const Glib::RefPtr<Gdk::Window>& clipboard_window, guint32 time_, const Glib::StringArrayHandle& targets)
+GdkDisplayDeviceHooks*  Display::unset_device_hooks()
+{
+  return gdk_display_set_device_hooks(gobj(), 0 /* See GDK docs */);
+}
+
+void Display::store_clipboard(const Glib::RefPtr<Gdk::Window>& clipboard_window, guint32 time_)
+{
+  gdk_display_store_clipboard(gobj(), clipboard_window->gobj(), time_, 0 /* see the C docs */, 0);
+}
+
+void Display::store_clipboard(const Glib::RefPtr<Gdk::Window>& clipboard_window, guint32 time_, const Glib::StringArrayHandle& targets)
  {
    //Put it into a real container that we can use:
    std::vector<Glib::ustring> targets_copy = targets;
-   
+
    //Create array of target GdkAtoms from target strings:
    if(!targets_copy.empty())
    {
      GdkAtom* pAtoms = new GdkAtom[targets_copy.size()];
-     
+
      for(guint i = 0; i < targets_copy.size(); ++i)
      {
        *pAtoms = Gdk::AtomString::to_c_type(targets_copy[i]);
      }
- 
+
      gdk_display_store_clipboard(gobj(), clipboard_window->gobj(), time_, 0 /* see the C docs */, 0);
-     
+
      delete[] pAtoms;
    }
  }
 
 } //Gdk
-
-
diff --git a/gdk/src/display.hg b/gdk/src/display.hg
index 08a80b6..27c913a 100644
--- a/gdk/src/display.hg
+++ b/gdk/src/display.hg
@@ -148,9 +148,16 @@ public:
 
   _WRAP_METHOD(void warp_pointer(const Glib::RefPtr<Screen>& screen, int x, int y), gdk_display_warp_pointer)
 
+  //TODO: Wrap this array parameter as a vector?
   _WRAP_METHOD(GdkDisplayPointerHooks* set_pointer_hooks(const GdkDisplayPointerHooks* new_hooks), gdk_display_set_pointer_hooks)
+  //TODO: Documentation.
   GdkDisplayPointerHooks* unset_pointer_hooks();
 
+  //TODO: Wrap this array parameter as a vector?
+  _WRAP_METHOD(GdkDisplayDeviceHooks* set_device_hooks(const GdkDisplayDeviceHooks *new_hooks), gdk_display_set_device_hooks)
+  //TODO: Documentation.
+  GdkDisplayDeviceHooks* unset_device_hooks();
+
   _WRAP_METHOD(static Glib::RefPtr<Display> open_default_libgtk_only(), gdk_display_open_default_libgtk_only, refreturn)
 
   /** Finds out the DND protocol supported by a window.



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