[gtkmm] Fix the build against GTK+ from git master.
- From: murrayc src gnome org
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Fix the build against GTK+ from git master.
- Date: Wed, 2 Feb 2011 10:11:55 +0000 (UTC)
commit 9606fba06dd9ac744a4fa806da56024d5f1d4797
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Feb 2 10:40:18 2011 +0100
Fix the build against GTK+ from git master.
* gdk/src/gdk_methods.defs: Regenerated with h2defs.py.
* gdk/src/display.[hg|ccg]: selection_send_notify(): This now takes a
Gdk::Window instead of a (now removed) GdkNativeWindow.
Remove the use of gdk_drag_get_protocol_for_display(), which was removed
from GTK+.
* gdk/src/types.hg: Remove the mention of GdkNativeWindow.
ChangeLog | 11 +++++++++++
gdk/src/display.ccg | 4 ++--
gdk/src/display.hg | 13 +------------
gdk/src/gdk_methods.defs | 25 ++++++++++++-------------
gdk/src/types.hg | 1 -
5 files changed, 26 insertions(+), 28 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index daeecfb..1611d41 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2011-02-02 Murray Cumming <murrayc murrayc com>
+ Fix the build against GTK+ from git master.
+
+ * gdk/src/gdk_methods.defs: Regenerated with h2defs.py.
+ * gdk/src/display.[hg|ccg]: selection_send_notify(): This now takes a
+ Gdk::Window instead of a (now removed) GdkNativeWindow.
+ Remove the use of gdk_drag_get_protocol_for_display(), which was removed
+ from GTK+.
+ * gdk/src/types.hg: Remove the mention of GdkNativeWindow.
+
+2011-02-02 Murray Cumming <murrayc murrayc com>
+
Button: Restore the clicked() method.
* gtk/src/button.hg: gtk_button_clicked() is not deprecated. Fix that
diff --git a/gdk/src/display.ccg b/gdk/src/display.ccg
index 6078d51..6c21cd8 100644
--- a/gdk/src/display.ccg
+++ b/gdk/src/display.ccg
@@ -39,9 +39,9 @@ Glib::RefPtr<Window> Display::get_selection_owner(const Glib::ustring& selection
return Glib::wrap(gdk_selection_owner_get_for_display(gobj(), Gdk::AtomUstring::to_c_type(selection)) , true);
}
-void Display::selection_send_notify(GdkNativeWindow requestor, Glib::ustring& selection, Glib::ustring& target, Glib::ustring& property, guint32 time_)
+void Display::selection_send_notify(const Glib::RefPtr<Window>& requestor, Glib::ustring& selection, Glib::ustring& target, Glib::ustring& property, guint32 time_)
{
- gdk_selection_send_notify_for_display(gobj(), requestor, Gdk::AtomUstring::to_c_type(selection), Gdk::AtomUstring::to_c_type(target), Gdk::AtomUstring::to_c_type(property), time_);
+ gdk_selection_send_notify_for_display(gobj(), Glib::unwrap(requestor), Gdk::AtomUstring::to_c_type(selection), Gdk::AtomUstring::to_c_type(target), Gdk::AtomUstring::to_c_type(property), time_);
}
void Display::store_clipboard(const Glib::RefPtr<Gdk::Window>& clipboard_window, guint32 time_)
diff --git a/gdk/src/display.hg b/gdk/src/display.hg
index 87bfd56..2c26b27 100644
--- a/gdk/src/display.hg
+++ b/gdk/src/display.hg
@@ -97,17 +97,6 @@ public:
_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.
- *
- * @newin{2,2}
- * @param xid The X id of the destination window.
- * @param protocol Location where the supported DND protocol is returned.
- * @return The X id of the window where the drop should happen. This
- * may be @a xid or the X id of a proxy window, or None if @a xid doesn't
- * support Drag and Drop.
- */
- _WRAP_METHOD(GdkNativeWindow get_drag_protocol(GdkNativeWindow xid, GdkDragProtocol& protocol), gdk_drag_get_protocol_for_display)
-
_WRAP_METHOD(GdkKeymap* get_keymap(), gdk_keymap_get_for_display)
_WRAP_METHOD(const GdkKeymap* get_keymap() const, gdk_keymap_get_for_display, constversion)
@@ -124,7 +113,7 @@ public:
* or "None" to indicate that the request was rejected.
* @param time_ Timestamp.
*/
- void selection_send_notify(GdkNativeWindow requestor, Glib::ustring& selection, Glib::ustring& target, Glib::ustring& property, guint32 time_);
+ void selection_send_notify(const Glib::RefPtr<Window>& requestor, Glib::ustring& selection, Glib::ustring& target, Glib::ustring& property, guint32 time_);
_WRAP_METHOD(void flush(), gdk_display_flush)
//TODO: Read the docs to know what the types are really: _WRAP_METHOD(GdkDisplayDeviceHooks* set_device_hooks(const GdkDisplayDeviceHooks *new_hooks), gdk_display_set_device_hooks)
diff --git a/gdk/src/gdk_methods.defs b/gdk/src/gdk_methods.defs
index 448d002..ac5d9ee 100644
--- a/gdk/src/gdk_methods.defs
+++ b/gdk/src/gdk_methods.defs
@@ -83,10 +83,10 @@
(c-name "GdkDragProtocol")
(gtype-id "GDK_TYPE_DRAG_PROTOCOL")
(values
+ '("none" "GDK_DRAG_PROTO_NONE")
'("motif" "GDK_DRAG_PROTO_MOTIF")
'("xdnd" "GDK_DRAG_PROTO_XDND")
'("rootwin" "GDK_DRAG_PROTO_ROOTWIN")
- '("none" "GDK_DRAG_PROTO_NONE")
'("win32-dropfiles" "GDK_DRAG_PROTO_WIN32_DROPFILES")
'("ole2" "GDK_DRAG_PROTO_OLE2")
'("local" "GDK_DRAG_PROTO_LOCAL")
@@ -1555,16 +1555,6 @@
)
)
-(define-function gdk_drag_get_protocol_for_display
- (c-name "gdk_drag_get_protocol_for_display")
- (return-type "GdkNativeWindow")
- (parameters
- '("GdkDisplay*" "display")
- '("GdkNativeWindow" "xid")
- '("GdkDragProtocol*" "protocol")
- )
-)
-
(define-function gdk_drag_find_window_for_screen
(c-name "gdk_drag_find_window_for_screen")
(return-type "none")
@@ -2926,7 +2916,7 @@
(c-name "gdk_selection_send_notify")
(return-type "none")
(parameters
- '("GdkNativeWindow" "requestor")
+ '("GdkWindow*" "requestor")
'("GdkAtom" "selection")
'("GdkAtom" "target")
'("GdkAtom" "property")
@@ -2939,7 +2929,7 @@
(return-type "none")
(parameters
'("GdkDisplay*" "display")
- '("GdkNativeWindow" "requestor")
+ '("GdkWindow*" "requestor")
'("GdkAtom" "selection")
'("GdkAtom" "target")
'("GdkAtom" "property")
@@ -4180,6 +4170,15 @@
(return-type "none")
)
+(define-method get_drag_protocol
+ (of-object "GdkWindow")
+ (c-name "gdk_window_get_drag_protocol")
+ (return-type "GdkDragProtocol")
+ (parameters
+ '("GdkWindow**" "target")
+ )
+)
+
(define-method begin_resize_drag
(of-object "GdkWindow")
(c-name "gdk_window_begin_resize_drag")
diff --git a/gdk/src/types.hg b/gdk/src/types.hg
index 632535b..1e57570 100644
--- a/gdk/src/types.hg
+++ b/gdk/src/types.hg
@@ -62,7 +62,6 @@ _WRAP_ENUM(ModifierType, GdkModifierType)
_WRAP_ENUM(Status, GdkStatus)
typedef GdkGeometry Geometry; //It's not used enough to justify having a wrapper.
-typedef GdkNativeWindow NativeWindow;
/** This is a simple structure containing an x and y coordinate of a point.
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]