[gtkmm] gdkmm: Added some methods.



commit 2c6eb3e2e3fa1f999691d9d72c8096e2de43f6ca
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Jan 11 23:10:56 2011 +0100

    gdkmm: Added some methods.
    
    * gdk/src/display.hg: Added has_pending() and notify_startup_complete().
    * gdk/src/displaymanager.hg: Added open_display().
    * gdk/src/dragcontext.[hg|ccg]: find_window_for_screen(): Use a reference
    for the protocol parameter, instead of a pointer.
    Added get_dest_window() and get_protocol().

 ChangeLog                 |   10 ++++++++++
 gdk/src/display.hg        |    4 ++++
 gdk/src/displaymanager.hg |    2 ++
 gdk/src/dragcontext.ccg   |    6 ++++--
 gdk/src/dragcontext.hg    |    5 ++++-
 5 files changed, 24 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e12f0d1..a37ce57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2011-01-11  Murray Cumming  <murrayc murrayc com>
 
+	gdkmm: Added some methods.
+
+	* gdk/src/display.hg: Added has_pending() and notify_startup_complete().
+	* gdk/src/displaymanager.hg: Added open_display().
+	* gdk/src/dragcontext.[hg|ccg]: find_window_for_screen(): Use a reference 
+	for the protocol parameter, instead of a pointer.
+	Added get_dest_window() and get_protocol().
+
+2011-01-11  Murray Cumming  <murrayc murrayc com>
+
 	Window: Added get_device_cursor().
 
 	* gdk/src/device.[hg|ccg]: Move the EventMask and GrabStatus enums here 
diff --git a/gdk/src/display.hg b/gdk/src/display.hg
index 6e3ba7a..6d8cb7a 100644
--- a/gdk/src/display.hg
+++ b/gdk/src/display.hg
@@ -79,6 +79,7 @@ public:
   _WRAP_METHOD(GdkEvent* peek_event(), gdk_display_peek_event)
   _WRAP_METHOD(GdkEvent* peek_event() const, gdk_display_peek_event, constversion)
   _WRAP_METHOD(void put_event(GdkEvent* event), gdk_display_put_event)
+  _WRAP_METHOD(bool has_pending() const, gdk_display_has_pending)
 
   //TODO: Use a slot here, though this is probably never used anyway:
   //Find out whether we can use a string representation for the atom - look for examples of this function's use.
@@ -161,10 +162,13 @@ public:
   _WRAP_METHOD(bool supports_shapes() const, gdk_display_supports_shapes)
   _WRAP_METHOD(bool supports_input_shapes() const, gdk_display_supports_input_shapes)
   _WRAP_METHOD(bool supports_composite() const, gdk_display_supports_composite)
+  _WRAP_METHOD(void notify_startup_complete(const Glib::ustring& startup_id), gdk_display_notify_startup_complete)
 
   _WRAP_METHOD(Glib::RefPtr<DeviceManager> get_device_manager(), gdk_display_get_device_manager, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const DeviceManager> get_device_manager() const, gdk_display_get_device_manager, refreturn, constversion)
 
+  //TODO: Wrap GdkAppLaunchContext: _WRAP_METHOD(GdkAppLaunchContext* get_app_launch_context(), gdk_display_get_app_launch_context)
+
 
   //We use no_default_handler because GdkDisplayClass is private.
   
diff --git a/gdk/src/displaymanager.hg b/gdk/src/displaymanager.hg
index 2944004..603442d 100644
--- a/gdk/src/displaymanager.hg
+++ b/gdk/src/displaymanager.hg
@@ -47,6 +47,8 @@ public:
 
   _WRAP_METHOD(Glib::SListHandle< Glib::RefPtr<Display> > list_displays(), gdk_display_manager_list_displays)
 
+  _WRAP_METHOD(Glib::RefPtr<Display> open_display(const Glib::ustring& name), gdk_display_manager_open_display, refreturn)
+
   _WRAP_PROPERTY("default-display", Glib::RefPtr<Display>)
   
 
diff --git a/gdk/src/dragcontext.ccg b/gdk/src/dragcontext.ccg
index cf5ce05..f6e57b1 100644
--- a/gdk/src/dragcontext.ccg
+++ b/gdk/src/dragcontext.ccg
@@ -28,11 +28,13 @@
 namespace Gdk
 {
 
-void DragContext::find_window_for_screen(const Glib::RefPtr<Window>& drag_window, const Glib::RefPtr<Screen>& screen, int x_root, int y_root, Glib::RefPtr<Window>& dest_window, DragProtocol* protocol) const
+void DragContext::find_window_for_screen(const Glib::RefPtr<Window>& drag_window, const Glib::RefPtr<Screen>& screen, int x_root, int y_root, Glib::RefPtr<Window>& dest_window, DragProtocol& protocol) const
 {
   GdkWindow* cWindow = 0;
-  gdk_drag_find_window_for_screen(const_cast<GdkDragContext*>(gobj()), drag_window->gobj(), screen->gobj(), x_root, y_root, &cWindow, (GdkDragProtocol*)(protocol));
+  GdkDragProtocol cprotocol = 0;
+  gdk_drag_find_window_for_screen(const_cast<GdkDragContext*>(gobj()), drag_window->gobj(), screen->gobj(), x_root, y_root, &cWindow, &cprotocol));
   dest_window = Glib::wrap(cWindow);
+  protocol = cprotocol;
 }
 
 void DragContext::drag_refuse(guint32 time)
diff --git a/gdk/src/dragcontext.hg b/gdk/src/dragcontext.hg
index ca6efee..cceef3e 100644
--- a/gdk/src/dragcontext.hg
+++ b/gdk/src/dragcontext.hg
@@ -89,6 +89,9 @@ public:
 
   _WRAP_METHOD(Glib::RefPtr<Window> get_source_window(), gdk_drag_context_get_source_window, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Window> get_source_window() const, gdk_drag_context_get_source_window, refreturn, constversion)
+  _WRAP_METHOD(Glib::RefPtr<Window> get_dest_window(), gdk_drag_context_get_dest_window, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Window> get_dest_window() const, gdk_drag_context_get_dest_window, refreturn, constversion)
+  _WRAP_METHOD(DragProtocol get_protocol() const, gdk_drag_context_get_protocol)
 
 
   _WRAP_METHOD(void set_device(const Glib::RefPtr<Device>& device), gdk_drag_context_set_device)
@@ -106,7 +109,7 @@ public:
   _WRAP_METHOD(DragAction get_selected_action() const, gdk_drag_context_get_selected_action)
 
   _WRAP_METHOD_DOCS_ONLY(gdk_drag_find_window_for_screen)
-  void find_window_for_screen(const Glib::RefPtr<Window>& drag_window, const Glib::RefPtr<Screen>& screen, int x_root, int y_root, Glib::RefPtr<Window>& dest_window, DragProtocol* protocol) const;
+  void find_window_for_screen(const Glib::RefPtr<Window>& drag_window, const Glib::RefPtr<Screen>& screen, int x_root, int y_root, Glib::RefPtr<Window>& dest_window, DragProtocol& protocol) const;
   _IGNORE(gdk_drag_find_window_for_screen)
 };
 



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