[gtkmm/gtkmm-2-22] Fix the build with warnings-as-errors with the latest gtk+ 2.22.x.



commit 6fde9b65b549c2d8f6c2a02df489de43c0c4577d
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Jul 13 09:04:23 2010 +0200

    Fix the build with warnings-as-errors with the latest gtk+ 2.22.x.
    
    * gdk/src/gdk_methods.defs:
    * gdk/src/gdk_pixbuf_methods.defs: Regenerate with h2defs.py.
    
    * gdk/src/color.[hg|ccg]: Move ColorTraits implementations to the .ccg file.
    * gdk/src/screen.hg: get_name(), get_source(), get_mode(), get_has_cursor():
        Reimplement with the new C functions, instead of using direct struct access.
    * gdk/src/dragcontext.[hg|ccg]: get_source_window(),
        get_destination_window(), get_actions(), get_suggested_action(),
        get_action(): Reimplement with the new C functions, instead of using direct
        struct access.
        get_action(): Deprecate, replacing with get_selected_action().
        Temporarily undef GSEAL_ENABLE to allow use of struct members that that
        have no replacement, to avoid breaking our API.
    * gdk/src/image.hg: get_image_type(), get_visual(), get_width(),
        get_height(), get_bpp(), get_bpl(): Reimplement with the new C
        functions, instead of using direct struct access.
        get_bpp(), get_bpl(): Deprecate, replacing with get_bytes_per_pixel() and
        get_bytes_per_line().
        Addef get_depth().
    * gdk/src/region.hg: Temporarily undef GSEAL_ENABLE to allow use of
        the deprecated GdkSpanFunc type in our API, to avoid breaking our API.
    * gdk/src/bitmap[hg|ccg]:
    * gdk/src/cursor.hg:
    * gdk/src/device.hg:
    * gdk/src/drawable.hg:
    * gdk/src/gc.hg:
    * gdk/src/visual.hg:
    * gdk/src/window.hg: Rearrange includes to let our temporary undefs elsewhere work.
    
    * gtk/src/box.hg: Temporarily undef GTK_DISABLE_DEPRECATED, so we can
        still use _GtkBoxChild in our API, to avoid breaking our API.
    * gtk/src/activatable.hg:
    * gtk/src/bin.ccg:
    * gtk/src/editable.hg:
    * gtk/src/orientable.hg:
    * gtk/src/printoperationpreview.hg:
    * gtk/src/recentchooser.hg:
    * gtk/src/textiter.hg:
    * gtk/src/treesortable.hg:
    * gtk/src/toolshell.hg:
    * gtk/src/main.hg:
    Do not include gtk+.h. Add prototype declarations instead, as elsewhere.
        Rearrange includes to allow our undefs to work.

 ChangeLog                        |   50 +++
 gdk/src/bitmap.ccg               |    3 +-
 gdk/src/bitmap.hg                |    2 -
 gdk/src/color.ccg                |   21 +-
 gdk/src/color.hg                 |   15 +-
 gdk/src/cursor.hg                |    4 +-
 gdk/src/device.hg                |   27 +-
 gdk/src/display.hg               |   47 +--
 gdk/src/dragcontext.ccg          |    4 +-
 gdk/src/dragcontext.hg           |   52 +--
 gdk/src/drawable.hg              |   20 +-
 gdk/src/gc.hg                    |    6 +-
 gdk/src/gdk_methods.defs         |  835 ++++++++++++++++++++++++++++++++------
 gdk/src/gdk_pixbuf_methods.defs  |  115 ++++--
 gdk/src/image.hg                 |   28 +-
 gdk/src/region.hg                |   46 ++-
 gdk/src/screen.hg                |    6 +-
 gdk/src/visual.hg                |    1 -
 gdk/src/window.hg                |    5 +-
 gtk/src/activatable.hg           |    8 +-
 gtk/src/bin.ccg                  |    2 +-
 gtk/src/box.hg                   |   16 +-
 gtk/src/editable.hg              |   10 +-
 gtk/src/main.hg                  |   28 +-
 gtk/src/orientable.hg            |    9 +-
 gtk/src/printoperationpreview.hg |   11 +-
 gtk/src/recentchooser.hg         |    9 +-
 gtk/src/textiter.hg              |    2 +-
 gtk/src/toolshell.hg             |    8 +-
 gtk/src/treesortable.hg          |    9 +-
 30 files changed, 1096 insertions(+), 303 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f44b9f6..8705626 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,53 @@
+2010-07-13  Murray Cumming  <murrayc murrayc com>
+
+	Fix the build with warnings-as-errors with the latest gtk+ 2.22.x.
+
+	* gdk/src/gdk_methods.defs:
+	* gdk/src/gdk_pixbuf_methods.defs: Regenerate with h2defs.py.
+
+	* gdk/src/color.[hg|ccg]: Move ColorTraits implementations to the .ccg file.
+	* gdk/src/screen.hg: get_name(), get_source(), get_mode(), get_has_cursor():
+    Reimplement with the new C functions, instead of using direct struct access.
+	* gdk/src/dragcontext.[hg|ccg]: get_source_window(),
+    get_destination_window(), get_actions(), get_suggested_action(),
+    get_action(): Reimplement with the new C functions, instead of using direct
+    struct access.
+    get_action(): Deprecate, replacing with get_selected_action().
+    Temporarily undef GSEAL_ENABLE to allow use of struct members that that
+    have no replacement, to avoid breaking our API.
+	* gdk/src/image.hg: get_image_type(), get_visual(), get_width(),
+    get_height(), get_bpp(), get_bpl(): Reimplement with the new C
+    functions, instead of using direct struct access.
+    get_bpp(), get_bpl(): Deprecate, replacing with get_bytes_per_pixel() and
+    get_bytes_per_line().
+    Addef get_depth().
+	* gdk/src/region.hg: Temporarily undef GSEAL_ENABLE to allow use of
+    the deprecated GdkSpanFunc type in our API, to avoid breaking our API.
+	* gdk/src/bitmap[hg|ccg]:
+	* gdk/src/cursor.hg:
+	* gdk/src/device.hg:
+	* gdk/src/drawable.hg:
+	* gdk/src/gc.hg:
+	* gdk/src/visual.hg:
+	* gdk/src/window.hg: Rearrange includes to let our temporary undefs elsewhere work.
+
+	* gtk/src/box.hg: Temporarily undef GTK_DISABLE_DEPRECATED, so we can
+    still use _GtkBoxChild in our API, to avoid breaking our API.
+	* gtk/src/activatable.hg:
+	* gtk/src/bin.ccg:
+	* gtk/src/editable.hg:
+	* gtk/src/orientable.hg:
+	* gtk/src/printoperationpreview.hg:
+	* gtk/src/recentchooser.hg:
+	* gtk/src/textiter.hg:
+	* gtk/src/treesortable.hg:
+	* gtk/src/toolshell.hg:
+	* gtk/src/main.hg:
+Do not include gtk+.h. Add prototype declarations instead, as elsewhere.
+    Rearrange includes to allow our undefs to work.
+
+
+
 2010-07-06  Murray Cumming  <murrayc murrayc com>
 
 	Added copyright headers. Patch from Kalev Lember.
diff --git a/gdk/src/bitmap.ccg b/gdk/src/bitmap.ccg
index 364fe26..5d744da 100644
--- a/gdk/src/bitmap.ccg
+++ b/gdk/src/bitmap.ccg
@@ -18,9 +18,8 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <gdk/gdk.h>
 #include <gdkmm/window.h>
-
+#include <gdk/gdk.h>
 
 namespace Gdk
 {
diff --git a/gdk/src/bitmap.hg b/gdk/src/bitmap.hg
index c858277..07e2c5e 100644
--- a/gdk/src/bitmap.hg
+++ b/gdk/src/bitmap.hg
@@ -18,7 +18,6 @@
  */
 
 #include <gdkmm/pixmap.h>
-#include <gdk/gdk.h>
 
 _DEFS(gdkmm,gdk)
 _PINCLUDE(gdkmm/private/pixmap_p.h)
@@ -57,4 +56,3 @@ public:
 };
 
 } // namespace Gdk
-
diff --git a/gdk/src/color.ccg b/gdk/src/color.ccg
index 1632291..d7c2ba8 100644
--- a/gdk/src/color.ccg
+++ b/gdk/src/color.ccg
@@ -67,7 +67,7 @@ void Color::set_rgb_p(double red_, double green_, double blue_)
 void Color::set_hsv(double h, double s, double v)
 {
   //TODO: Comments/Documentation. I have no idea what this code does. murrayc.
-  
+
   h /= 60.0;
   int i = (int)h;
   double p = v * (1 - s);
@@ -212,5 +212,22 @@ Glib::ustring Color::to_string() const
   return Glib::convert_return_gchar_ptr_to_ustring( gdk_color_to_string(gobject_) );
 }
 
-} //namespace Gdk
+ColorTraits::CType ColorTraits::to_c_type(const CppType& obj)
+{
+  return *obj.gobj();
+}
+
+ColorTraits::CType ColorTraits::to_c_type(const CType&   obj)
+{
+  return obj;
+}
+
+ColorTraits::CppType ColorTraits::to_cpp_type(const CType& obj)
+{
+  return CppType(const_cast<CType*>(&obj), true);
+}
+
+void ColorTraits::release_c_type(const CType&)
+{}
 
+} //namespace Gdk
diff --git a/gdk/src/color.hg b/gdk/src/color.hg
index 176dbe5..fe277c7 100644
--- a/gdk/src/color.hg
+++ b/gdk/src/color.hg
@@ -21,8 +21,6 @@
 // the #ifndef GDKMM_DISABLE_DEPRECATED in deprecated classes) is generated:
 _CONFIGINCLUDE(gdkmmconfig.h)
 
-#include <gdk/gdk.h>
-
 _DEFS(gdkmm,gdk)
 
 namespace Gdk
@@ -91,7 +89,7 @@ public:
   bool set(const Glib::ustring& value);
 
   _DEPRECATE_IFDEF_START
-  /** 
+  /**
    * @deprecated See set().
    */
   bool parse(const Glib::ustring& spec);
@@ -158,7 +156,7 @@ public:
    */
   double get_blue_p() const;
 
-  /** Get a textual specification of color in the hexadecimal form #rrrrggggbbbb, 
+  /** Get a textual specification of color in the hexadecimal form #rrrrggggbbbb,
    * where r, g and b are hex digits representing the red, green and blue components respectively.
    *
    * @result The string representation.
@@ -182,14 +180,13 @@ struct ColorTraits
   typedef GdkColor    CType;
   typedef GdkColor    CTypeNonConst;
 
-  static CType   to_c_type      (const CppType& obj) { return *obj.gobj(); }
-  static CType   to_c_type      (const CType&   obj) { return obj; }
-  static CppType to_cpp_type    (const CType&   obj) { return CppType(const_cast<CType*>(&obj), true); }
-  static void    release_c_type (const CType&)       {}
+  static CType   to_c_type      (const CppType& obj);
+  static CType   to_c_type      (const CType&   obj);
+  static CppType to_cpp_type    (const CType&   obj);
+  static void    release_c_type (const CType&);
 };
 #endif //DOXYGEN_SHOULD_SKIP_THIS
 
 typedef Glib::ArrayHandle<Color,ColorTraits> ArrayHandle_Color;
 
 } // namespace Gdk
-
diff --git a/gdk/src/cursor.hg b/gdk/src/cursor.hg
index 2d155a1..e21a458 100644
--- a/gdk/src/cursor.hg
+++ b/gdk/src/cursor.hg
@@ -19,10 +19,10 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <gdkmm/color.h>
 #include <gdkmm/bitmap.h>
 #include <gdkmm/display.h>
 #include <gdkmm/pixbuf.h>
+#include <gdkmm/color.h>
 
 _DEFS(gdkmm,gdk)
 _PINCLUDE(glibmm/private/object_p.h)
@@ -57,5 +57,3 @@ public:
 };
 
 } //namespace Gdk
-
-
diff --git a/gdk/src/device.hg b/gdk/src/device.hg
index bae3197..ca41bb7 100644
--- a/gdk/src/device.hg
+++ b/gdk/src/device.hg
@@ -19,7 +19,6 @@
 
 #include <gdkmm/window.h>
 #include <gdkmm/event.h>
-#include <gdk/gdk.h>
 
 
 _DEFS(gdkmm,gdk)
@@ -51,33 +50,17 @@ public:
   _WRAP_METHOD(bool get_history(const Glib::RefPtr<Window>& window, guint32 start, guint32 stop, GdkTimeCoord**& events, int& n_events), gdk_device_get_history)
   _WRAP_METHOD(bool get_axis(double& axes, AxisUse use, double& value) const, gdk_device_get_axis)
 
-  /** Gets the name of this device.
-   * @result The name of this device.
-   */
-  _MEMBER_GET(name, name, Glib::ustring, gchar*)
-  
-  /** Gets the type of this device.
-   * @result The type of this device.
-   */
-  _MEMBER_GET(source, source, InputSource, GdkInputSource)
-
-  /** Gets the mode of this device.
-   * @result The mode of this device.
-   */
-  _MEMBER_GET(mode, mode, InputMode, GdkInputMode)
-    
-  /** Discover whether the pointer follows device motion.
-   * @result true if the pointer follows device motion.
-   */
-  _MEMBER_GET(has_cursor, has_cursor, bool, gboolean)
+  _WRAP_METHOD(Glib::ustring get_name() const, gdk_device_get_name)
+  _WRAP_METHOD(InputSource get_source() const, gdk_device_get_source)
+  _WRAP_METHOD(InputMode get_mode() const, gdk_device_get_mode)
+  _WRAP_METHOD(bool get_has_cursor() const, gdk_device_get_has_cursor)
 
   //TODO: Add suitable accessor for the information in these fields. For now, people must use gobj() and access them directly.
   //gint num_axes	the length of the axes array.
   //GdkDeviceAxis *axes	an array of GdkDeviceAxis, describing the axes of this device.
   //
   //gint num_keys	the length of the keys array.
-  //GdkDeviceKey *keys	an array of GdkDeviceKey, describing the mapped macro buttons of this device.      
+  //GdkDeviceKey *keys	an array of GdkDeviceKey, describing the mapped macro buttons of this device.
 };
 
 } // namespace Gdk
-
diff --git a/gdk/src/display.hg b/gdk/src/display.hg
index a02f5ca..fcc6529 100644
--- a/gdk/src/display.hg
+++ b/gdk/src/display.hg
@@ -56,10 +56,10 @@ public:
   _WRAP_METHOD(int get_n_screens() const, gdk_display_get_n_screens)
   _WRAP_METHOD(Glib::RefPtr<Screen> get_screen(int screen_num), gdk_display_get_screen, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Screen> get_screen(int screen_num) const, gdk_display_get_screen, refreturn, constversion)
-  
+
   _WRAP_METHOD(Glib::RefPtr<Screen> get_default_screen(), gdk_display_get_default_screen, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Screen> get_default_screen() const, gdk_display_get_default_screen, refreturn, constversion)
-  
+
   _WRAP_METHOD(void pointer_ungrab(guint32 timestamp), gdk_display_pointer_ungrab)
   _WRAP_METHOD(void keyboard_ungrab(guint32 timestamp), gdk_display_keyboard_ungrab)
   _WRAP_METHOD(bool pointer_is_grabbed() const, gdk_display_pointer_is_grabbed)
@@ -69,12 +69,12 @@ public:
 
   _WRAP_METHOD(Glib::ListHandle< Glib::RefPtr<Device> > list_devices(), gdk_display_list_devices)
   _WRAP_METHOD(Glib::ListHandle< Glib::RefPtr<const Device> > list_devices() const, gdk_display_list_devices)
-  
+
   //TODO: Use C++ Gdk::Event:
   //TODO: get_event() might remove the event - if so, then there should not be a const version:
   _WRAP_METHOD(GdkEvent* get_event(), gdk_display_get_event)
   _WRAP_METHOD(const GdkEvent* get_event() const, gdk_display_get_event, constversion)
-  
+
   _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)
@@ -113,9 +113,9 @@ public:
    * @param mask location to store current modifier mask.
    *
    **/
-  void get_pointer(int& x, int& y, ModifierType& mask); 
+  void get_pointer(int& x, int& y, ModifierType& mask);
   _IGNORE(gdk_display_get_pointer)
-  
+
   _WRAP_METHOD(Glib::RefPtr<Window> get_window_at_pointer(int& win_x, int& win_y), gdk_display_get_window_at_pointer, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Window> get_window_at_pointer(int& win_x, int& win_y) const, gdk_display_get_window_at_pointer, refreturn, constversion)
 
@@ -132,22 +132,22 @@ public:
    * @result The window underneath the mouse pointer.
    */
   Glib::RefPtr<const Window> get_window_at_pointer() const;
-  
+
   _WRAP_METHOD(void warp_pointer(const Glib::RefPtr<Screen>& screen, int x, int y), gdk_display_warp_pointer)
 
   _WRAP_METHOD(GdkDisplayPointerHooks* set_pointer_hooks(const GdkDisplayPointerHooks* new_hooks), gdk_display_set_pointer_hooks)
   GdkDisplayPointerHooks* unset_pointer_hooks();
-  
+
   _WRAP_METHOD(static Glib::RefPtr<Display> open_default_libgtk_only(), gdk_display_open_default_libgtk_only, refreturn)
 
 #ifdef G_OS_WIN32
   /** Finds out the DND protocol supported by a window.
-   * 
+   *
    * @newin{2,2}
    * @deprecated
    * @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 
+   * @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.
    *
@@ -168,7 +168,7 @@ public:
 
 #ifdef G_OS_WIN32
   /** Send a response to SelectionRequest event.
-   * 
+   *
    * @newin{2,2}
    * @param requestor Window to which to deliver response.
    * @param selection Selection that was requested.
@@ -185,7 +185,7 @@ public:
 #endif
 
   /** Send a response to SelectionRequest event.
-   * 
+   *
    * @newin{2,2}
    * @param requestor Window to which to deliver response.
    * @param selection Selection that was requested.
@@ -205,20 +205,20 @@ public:
   _WRAP_METHOD(guint get_default_cursor_size() const, gdk_display_get_default_cursor_size)
   _WRAP_METHOD(void get_maximal_cursor_size(guint& width, guint& height), gdk_display_get_maximal_cursor_size)
 
-  _WRAP_METHOD(Glib::RefPtr<Window> get_default_group(), gdk_display_get_default_group, refreturn) 
-  _WRAP_METHOD(Glib::RefPtr<const Window> get_default_group() const, gdk_display_get_default_group, refreturn, constversion)              
-      
+  _WRAP_METHOD(Glib::RefPtr<Window> get_default_group(), gdk_display_get_default_group, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Window> get_default_group() const, gdk_display_get_default_group, refreturn, constversion)
+
   //TODO: wrap the vfuncs, though they are not very useful because people will not derive from this class? murrayc.
-  
+
 
   _WRAP_METHOD(bool supports_selection_notification() const, gdk_display_supports_selection_notification)
   _WRAP_METHOD(bool request_selection_notification(const Glib::ustring& selection), gdk_display_request_selection_notification)
 
   _WRAP_METHOD(bool supports_clipboard_persistence() const, gdk_display_supports_clipboard_persistence)
 
-  /** Issues a request to the clipboard manager to store the clipboard data, 
+  /** Issues a request to the clipboard manager to store the clipboard data,
    * saving all available targets.
-   * On X11, this is a special program that works according to the freedesktop clipboard specification, 
+   * On X11, this is a special program that works according to the freedesktop clipboard specification,
    * available at http://www.freedesktop.org/Standards/clipboard-manager-spec.
    * @newin{2,6}
    *
@@ -226,22 +226,21 @@ public:
    * @param time_ A timestamp.
    */
   void store_clipboard(const Glib::RefPtr<Gdk::Window>& clipboard_window, guint32 time_);
-  
+
   void store_clipboard(const Glib::RefPtr<Gdk::Window>& clipboard_window, guint32 time_, const Glib::StringArrayHandle& targets);
-  _IGNORE(gdk_display_store_clipboard)      
+  _IGNORE(gdk_display_store_clipboard)
 
   _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)
-                                             
-  
+
+
   /** The closed signal is emitted when the connection to the windowing
    * system for this display is closed.
    *
    * @param is_error true if the display was closed due to an error
-   */  
+   */
   _WRAP_SIGNAL(void closed(bool is_error), closed)
 };
 
 } /* namespace Gdk */
-
diff --git a/gdk/src/dragcontext.ccg b/gdk/src/dragcontext.ccg
index fb738cb..1c500d3 100644
--- a/gdk/src/dragcontext.ccg
+++ b/gdk/src/dragcontext.ccg
@@ -42,8 +42,8 @@ void DragContext::drag_refuse(guint32 time)
 
 Gdk::ListHandle_AtomString DragContext::get_targets() const
 {
-  //Note that we don't free the GList* (or it's items), because we are accessing the struct directly:
-  return ListHandle_AtomString( gobj()->targets, Glib::OWNERSHIP_NONE);
+ //Note that we don't free the GList* (or it's items), because we are accessing the struct directly:
+  return ListHandle_AtomString( gdk_drag_context_list_targets(const_cast<GdkDragContext*>(gobj())), Glib::OWNERSHIP_NONE);
 }
 
 } /* namespace Gdk */
diff --git a/gdk/src/dragcontext.hg b/gdk/src/dragcontext.hg
index 37c9dd5..1b41b14 100644
--- a/gdk/src/dragcontext.hg
+++ b/gdk/src/dragcontext.hg
@@ -19,15 +19,19 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <gdkmm/color.h>
-#include <gdkmm/pixbuf.h>
-#include <gdkmm/bitmap.h>
+
 #include <glibmm/object.h>
-#include <gdk/gdk.h>
+#include <gdkmm/pixbuf.h>
+//#include <gdkmm/bitmap.h>
+#include <gdkmm/colormap.h>
 #include <glibmm/listhandle.h>
 _DEFS(gdkmm,gdk)
 _PINCLUDE(glibmm/private/object_p.h)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef GSEAL_ENABLED
+#m4 _POP()
+
 namespace Gdk
 {
 
@@ -55,9 +59,9 @@ public:
    * @param time The timestamp for this operation.
    */
   void drag_refuse(guint32 time);
-  
+
   _IGNORE(gdk_drag_motion) //gdk_drag_motion is only used in GDK internally.
-  
+
   _WRAP_METHOD(void drop_reply(bool ok, guint32 time), gdk_drop_reply)
   _WRAP_METHOD(void drop_finish(bool success, guint32 time), gdk_drop_finish)
   _WRAP_METHOD(Glib::ustring get_selection() const, gdk_drag_get_selection)
@@ -75,23 +79,19 @@ public:
   _WRAP_METHOD(void set_icon(const Glib::RefPtr<Gdk::Colormap>& colormap, const Glib::RefPtr<Gdk::Pixmap>& pixmap, const Glib::RefPtr<Gdk::Bitmap>& mask, int hot_x, int hot_y), gtk_drag_set_icon_pixmap)
   _WRAP_METHOD(void set_icon(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf, int hot_x, int hot_y), gtk_drag_set_icon_pixbuf)
 
-  // The first argument was changed from StockID to ustring to avoid 
+  // The first argument was changed from StockID to ustring to avoid
   // cross-dependence between gdkmm and gtkmm.
   // See http://bugzilla.gnome.org/show_bug.cgi?id=79124 for details
   _WRAP_METHOD(void set_icon(const Glib::ustring& stock_id, int hot_x, int hot_y), gtk_drag_set_icon_stock)
   _WRAP_METHOD(void set_icon_name(const Glib::ustring& name, int hot_x, int hot_y), gtk_drag_set_icon_name)
   _WRAP_METHOD(void set_icon(), gtk_drag_set_icon_default)
 
-  /** Get the the source window of this drag.
-   * @result the source window of this drag.
-   */
-  _MEMBER_GET_GOBJECT(source_window, source_window, Window, GdkWindow*)
+  _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_destination_window(), gdk_drag_context_get_destination_window, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Window> get_destination_window() const, gdk_drag_context_get_destination_window, refreturn, constversion)
 
-  /** Get the the source window of this drag.
-   * @result the source window of this drag.
-   */
-  _MEMBER_GET_GOBJECT(destination_window, dest_window, Window, GdkWindow*)
-    
   /** Get a list of targets offered by the source.
    * @result a list of targets offered by the source.
    */
@@ -101,26 +101,17 @@ public:
    * @result the DND protocol which governs this drag.
    */
   _MEMBER_GET(protocol, protocol, DragProtocol, GdkDragProtocol)
-  
+
   /** Discover whether the context is used on the source side.
    * @result true if the context is used on the source side.
    */
   _MEMBER_GET(is_source, is_source, bool, gboolean)
 
-  /** Get a bitmask of actions proposed by the source when the suggested_action is Gdk::ACTION_ASK
-   * @result a bitmask of actions proposed by the source when the suggested_action is Gdk::ACTION_ASK
-   */
-  _MEMBER_GET(actions, actions, DragAction, GdkDragAction)
+  _WRAP_METHOD(DragAction get_actions() const, gdk_drag_context_get_actions)
+  _WRAP_METHOD(DragAction get_suggested_action() const, gdk_drag_context_get_suggested_action)
 
-  /** Get the action suggested by the source.
-   * @result The action suggested by the source.
-   */
-  _MEMBER_GET(suggested_action, suggested_action, DragAction, GdkDragAction)
-
-  /** Get the action chosen by the destination.
-   * @result the action chosen byt the destination.
-   */
-  _MEMBER_GET(action, action, DragAction, GdkDragAction)
+  _WRAP_METHOD(DragAction get_action() const, gdk_drag_context_get_selected_action, deprecated "Use get_selected_action()")
+  _WRAP_METHOD(DragAction get_selected_action() const, gdk_drag_context_get_selected_action)
 
   /** Get a timestamp recording the start time of this drag.
    * @result a timestamp recording the start time of this drag.
@@ -133,4 +124,3 @@ public:
 };
 
 } /* namespace Gdk */
-
diff --git a/gdk/src/drawable.hg b/gdk/src/drawable.hg
index fb37e46..fc8ab03 100644
--- a/gdk/src/drawable.hg
+++ b/gdk/src/drawable.hg
@@ -17,15 +17,14 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <gdk/gdk.h>
 #include <pangomm/font.h>
 #include <pangomm/layout.h>
 #include <pangomm/layoutline.h>
 #include <pangomm/glyphstring.h>
+#include <gdkmm/region.h>
 #include <gdkmm/gc.h>
 #include <gdkmm/image.h>
 #include <gdkmm/color.h>
-#include <gdkmm/region.h>
 #include <gdkmm/rgbcmap.h>
 #include <gdkmm/types.h>
 #include <cairomm/context.h>
@@ -51,7 +50,7 @@ class Pixbuf;
  *
  * To use a drawable, create a concrete Drawable of the type you wish to use
  * and a Gdk::GC (graphics context) for that Drawable.  With the GC you can
- * draw lines, text, arcs and such. 
+ * draw lines, text, arcs and such.
  *
  * An alternative is to create a Cairo::Context with get_cairo_context()
  * while you handle the 'exposed' event of the drawable. For more about
@@ -113,19 +112,19 @@ public:
 
   /** Renders a rectangular portion of a pixbuf to a drawable.  The destination
    * drawable must have a colormap. All windows have a colormap, however, pixmaps
-   * only have colormap by default if they were created with a non-<tt>0</tt> window 
-   * argument. Otherwise a colormap must be set on them with 
+   * only have colormap by default if they were created with a non-<tt>0</tt> window
+   * argument. Otherwise a colormap must be set on them with
    * Gdk::Drawable::set_colormap().
-   * 
-   * On older X servers, rendering pixbufs with an alpha channel involves round 
+   *
+   * On older X servers, rendering pixbufs with an alpha channel involves round
    * trips to the X server, and may be somewhat slow.
-   * 
+   *
    * If GDK is built with the Sun mediaLib library, the gdk_draw_pixbuf
    * function is accelerated using mediaLib, which provides hardware
    * acceleration on Intel, AMD, and Sparc chipsets.  If desired, mediaLib
    * support can be turned off by setting the GDK_DISABLE_MEDIALIB environment
    * variable.
-   * 
+   *
    * @newin{2,16}
    * @param pixbuf A Gdk::Pixbuf.
    * @param src_x Source X coordinate within pixbuf.
@@ -150,7 +149,7 @@ public:
   // same as gdk_drawable_get_image().
   void copy_to_image(const Glib::RefPtr<Image>& image, int src_x, int src_y, int dest_x, int dest_y, int width, int height) const;
   _IGNORE(gdk_drawable_copy_to_image)
-  
+
   _WRAP_METHOD(Region get_clip_region() const, gdk_drawable_get_clip_region)
   _WRAP_METHOD(Region get_visible_region() const, gdk_drawable_get_visible_region)
 
@@ -207,4 +206,3 @@ public:
 };
 
 } // namespace Gdk
-
diff --git a/gdk/src/gc.hg b/gdk/src/gc.hg
index fdf4577..985257c 100644
--- a/gdk/src/gc.hg
+++ b/gdk/src/gc.hg
@@ -20,12 +20,11 @@
  */
 
 #include <glibmm/object.h>
+#include <gdkmm/region.h>
 #include <gdkmm/drawable.h>
 #include <gdkmm/types.h>
 #include <gdkmm/rectangle.h>
-#include <gdkmm/region.h>
 #include <gdkmm/screen.h>
-#include <gdk/gdk.h>
 _DEFS(gdkmm,gdk)
 _PINCLUDE(glibmm/private/object_p.h)
 
@@ -82,7 +81,7 @@ public:
   /** @deprecated Use set_clip_rectangle(const Rectangle& rectangle) instead.
    */
   _WRAP_METHOD(void set_clip_rectangle(Rectangle& rectangle), gdk_gc_set_clip_rectangle)
-  
+
   _WRAP_METHOD(void set_clip_rectangle(const Rectangle& rectangle), gdk_gc_set_clip_rectangle)
 
   _WRAP_METHOD(void set_clip_region(const Region& region), gdk_gc_set_clip_region)
@@ -101,4 +100,3 @@ public:
 };
 
 } /* namespace Gdk */
-
diff --git a/gdk/src/gdk_methods.defs b/gdk/src/gdk_methods.defs
index 9d8493f..b755ea5 100644
--- a/gdk/src/gdk_methods.defs
+++ b/gdk/src/gdk_methods.defs
@@ -49,12 +49,6 @@
   (gtype-id "GDK_TYPE_KEYMAP")
 )
 
-(define-object Paintable
-  (in-module "Gdk")
-  (c-name "GdkPaintable")
-  (gtype-id "GDK_TYPE_PAINTABLE")
-)
-
 (define-object PangoRenderer
   (in-module "Gdk")
   (parent "PangoRenderer")
@@ -76,12 +70,6 @@
   (gtype-id "GDK_TYPE_SCREEN")
 )
 
-(define-object WindowImpl
-  (in-module "Gdk")
-  (c-name "GdkWindowImpl")
-  (gtype-id "GDK_TYPE_WINDOW_IMPL")
-)
-
 (define-object WindowObject
   (in-module "Gdk")
   (parent "GdkDrawable")
@@ -483,61 +471,6 @@
   )
 )
 
-(define-flags ColorInfoFlags
-  (in-module "Gdk")
-  (c-name "GdkColorInfoFlags")
-  (gtype-id "GDK_TYPE_COLOR_INFO_FLAGS")
-  (values
-    '("writeable" "GDK_COLOR_WRITEABLE")
-  )
-)
-
-(define-flags DebugFlag
-  (in-module "Gdk")
-  (c-name "GdkDebugFlag")
-  (gtype-id "GDK_TYPE_DEBUG_FLAG")
-  (values
-    '("misc" "GDK_DEBUG_MISC")
-    '("events" "GDK_DEBUG_EVENTS")
-    '("dnd" "GDK_DEBUG_DND")
-    '("xim" "GDK_DEBUG_XIM")
-    '("nograbs" "GDK_DEBUG_NOGRABS")
-    '("colormap" "GDK_DEBUG_COLORMAP")
-    '("gdkrgb" "GDK_DEBUG_GDKRGB")
-    '("gc" "GDK_DEBUG_GC")
-    '("pixmap" "GDK_DEBUG_PIXMAP")
-    '("image" "GDK_DEBUG_IMAGE")
-    '("input" "GDK_DEBUG_INPUT")
-    '("cursor" "GDK_DEBUG_CURSOR")
-    '("multihead" "GDK_DEBUG_MULTIHEAD")
-    '("xinerama" "GDK_DEBUG_XINERAMA")
-    '("draw" "GDK_DEBUG_DRAW")
-    '("eventloop" "GDK_DEBUG_EVENTLOOP")
-  )
-)
-
-(define-enum ArgType
-  (in-module "Gdk")
-  (c-name "GdkArgType")
-  (gtype-id "GDK_TYPE_ARG_TYPE")
-  (values
-    '("string" "GDK_ARG_STRING")
-    '("int" "GDK_ARG_INT")
-    '("bool" "GDK_ARG_BOOL")
-    '("nobool" "GDK_ARG_NOBOOL")
-    '("callback" "GDK_ARG_CALLBACK")
-  )
-)
-
-(define-flags EventFlags
-  (in-module "Gdk")
-  (c-name "GdkEventFlags")
-  (gtype-id "GDK_TYPE_EVENT_FLAGS")
-  (values
-    '("pending" "GDK_EVENT_PENDING")
-  )
-)
-
 (define-enum PropMode
   (in-module "Gdk")
   (c-name "GdkPropMode")
@@ -813,10 +746,6 @@
 )
 
 
-;; From gdkalias.h
-
-
-
 ;; From gdkapplaunchcontext.h
 
 (define-function gdk_app_launch_context_get_type
@@ -1179,10 +1108,6 @@
 
 
 
-;; From gdkconfig.h
-
-
-
 ;; From gdkcursor.h
 
 (define-function gdk_cursor_get_type
@@ -1606,6 +1531,36 @@
   (return-type "GdkDragContext*")
 )
 
+(define-method list_targets
+  (of-object "GdkDragContext")
+  (c-name "gdk_drag_context_list_targets")
+  (return-type "GList*")
+)
+
+(define-method get_actions
+  (of-object "GdkDragContext")
+  (c-name "gdk_drag_context_get_actions")
+  (return-type "GdkDragAction")
+)
+
+(define-method get_suggested_action
+  (of-object "GdkDragContext")
+  (c-name "gdk_drag_context_get_suggested_action")
+  (return-type "GdkDragAction")
+)
+
+(define-method get_selected_action
+  (of-object "GdkDragContext")
+  (c-name "gdk_drag_context_get_selected_action")
+  (return-type "GdkDragAction")
+)
+
+(define-method get_source_window
+  (of-object "GdkDragContext")
+  (c-name "gdk_drag_context_get_source_window")
+  (return-type "GdkWindow*")
+)
+
 (define-method ref
   (of-object "GdkDragContext")
   (c-name "gdk_drag_context_ref")
@@ -3563,6 +3518,66 @@
   (return-type "GdkColormap*")
 )
 
+(define-method get_image_type
+  (of-object "GdkImage")
+  (c-name "gdk_image_get_image_type")
+  (return-type "GdkImageType")
+)
+
+(define-method get_visual
+  (of-object "GdkImage")
+  (c-name "gdk_image_get_visual")
+  (return-type "GdkVisual*")
+)
+
+(define-method get_byte_order
+  (of-object "GdkImage")
+  (c-name "gdk_image_get_byte_order")
+  (return-type "GdkByteOrder")
+)
+
+(define-method get_width
+  (of-object "GdkImage")
+  (c-name "gdk_image_get_width")
+  (return-type "gint")
+)
+
+(define-method get_height
+  (of-object "GdkImage")
+  (c-name "gdk_image_get_height")
+  (return-type "gint")
+)
+
+(define-method get_depth
+  (of-object "GdkImage")
+  (c-name "gdk_image_get_depth")
+  (return-type "guint16")
+)
+
+(define-method get_bytes_per_pixel
+  (of-object "GdkImage")
+  (c-name "gdk_image_get_bytes_per_pixel")
+  (return-type "guint16")
+)
+
+(define-method get_bytes_per_line
+  (of-object "GdkImage")
+  (c-name "gdk_image_get_bytes_per_line")
+  (return-type "guint16")
+)
+
+(define-method get_bits_per_pixel
+  (of-object "GdkImage")
+  (c-name "gdk_image_get_bits_per_pixel")
+  (return-type "guint16")
+)
+
+(define-method get_pixels
+  (of-object "GdkImage")
+  (c-name "gdk_image_get_pixels")
+  (return-type "gpointer")
+)
+
 (define-function gdk_image_new_bitmap
   (c-name "gdk_image_new_bitmap")
   (return-type "GdkImage*")
@@ -3588,6 +3603,50 @@
   (return-type "GList*")
 )
 
+(define-method get_name
+  (of-object "GdkDevice")
+  (c-name "gdk_device_get_name")
+  (return-type "const-gchar*")
+)
+
+(define-method get_source
+  (of-object "GdkDevice")
+  (c-name "gdk_device_get_source")
+  (return-type "GdkInputSource")
+)
+
+(define-method get_mode
+  (of-object "GdkDevice")
+  (c-name "gdk_device_get_mode")
+  (return-type "GdkInputMode")
+)
+
+(define-method get_has_cursor
+  (of-object "GdkDevice")
+  (c-name "gdk_device_get_has_cursor")
+  (return-type "gboolean")
+)
+
+(define-method get_key
+  (of-object "GdkDevice")
+  (c-name "gdk_device_get_key")
+  (return-type "none")
+  (parameters
+    '("guint" "index")
+    '("guint*" "keyval")
+    '("GdkModifierType*" "modifiers")
+  )
+)
+
+(define-method get_axis_use
+  (of-object "GdkDevice")
+  (c-name "gdk_device_get_axis_use")
+  (return-type "GdkAxisUse")
+  (parameters
+    '("guint" "index")
+  )
+)
+
 (define-method set_source
   (of-object "GdkDevice")
   (c-name "gdk_device_set_source")
@@ -3688,29 +3747,6 @@
 
 
 
-;; From gdkinternals.h
-
-(define-function gdk_synthesize_window_state
-  (c-name "gdk_synthesize_window_state")
-  (return-type "none")
-  (parameters
-    '("GdkWindow*" "window")
-    '("GdkWindowState" "unset_flags")
-    '("GdkWindowState" "set_flags")
-  )
-)
-
-(define-function gdk_offscreen_window_get_type
-  (c-name "gdk_offscreen_window_get_type")
-  (return-type "GType")
-)
-
-
-
-;; From gdkintl.h
-
-
-
 ;; From gdkkeys.h
 
 (define-function gdk_keymap_get_type
@@ -3894,14 +3930,6 @@
 
 
 
-;; From gdkmarshalers.h
-
-
-
-;; From gdkmedialib.h
-
-
-
 ;; From gdkpango.h
 
 (define-function gdk_pango_renderer_get_type
@@ -4292,10 +4320,6 @@
 
 
 
-;; From gdkpoly-generic.h
-
-
-
 ;; From gdkprivate.h
 
 (define-method destroy_notify
@@ -4507,10 +4531,6 @@
 
 
 
-;; From gdkregion-generic.h
-
-
-
 ;; From gdkregion.h
 
 (define-function gdk_region_new
@@ -5422,6 +5442,69 @@
   (return-type "GdkScreen*")
 )
 
+(define-method get_visual_type
+  (of-object "GdkVisual")
+  (c-name "gdk_visual_get_visual_type")
+  (return-type "GdkVisualType")
+)
+
+(define-method get_depth
+  (of-object "GdkVisual")
+  (c-name "gdk_visual_get_depth")
+  (return-type "gint")
+)
+
+(define-method get_byte_order
+  (of-object "GdkVisual")
+  (c-name "gdk_visual_get_byte_order")
+  (return-type "GdkByteOrder")
+)
+
+(define-method get_colormap_size
+  (of-object "GdkVisual")
+  (c-name "gdk_visual_get_colormap_size")
+  (return-type "gint")
+)
+
+(define-method get_bits_per_rgb
+  (of-object "GdkVisual")
+  (c-name "gdk_visual_get_bits_per_rgb")
+  (return-type "gint")
+)
+
+(define-method get_red_pixel_details
+  (of-object "GdkVisual")
+  (c-name "gdk_visual_get_red_pixel_details")
+  (return-type "none")
+  (parameters
+    '("guint32*" "mask")
+    '("gint*" "shift")
+    '("gint*" "precision")
+  )
+)
+
+(define-method get_green_pixel_details
+  (of-object "GdkVisual")
+  (c-name "gdk_visual_get_green_pixel_details")
+  (return-type "none")
+  (parameters
+    '("guint32*" "mask")
+    '("gint*" "shift")
+    '("gint*" "precision")
+  )
+)
+
+(define-method get_blue_pixel_details
+  (of-object "GdkVisual")
+  (c-name "gdk_visual_get_blue_pixel_details")
+  (return-type "none")
+  (parameters
+    '("guint32*" "mask")
+    '("gint*" "shift")
+    '("gint*" "precision")
+  )
+)
+
 
 
 ;; From gdkwindow.h
@@ -5614,6 +5697,12 @@
   )
 )
 
+(define-method get_accept_focus
+  (of-object "GdkWindow")
+  (c-name "gdk_window_get_accept_focus")
+  (return-type "gboolean")
+)
+
 (define-method set_accept_focus
   (of-object "GdkWindow")
   (c-name "gdk_window_set_accept_focus")
@@ -5623,6 +5712,12 @@
   )
 )
 
+(define-method get_focus_on_map
+  (of-object "GdkWindow")
+  (c-name "gdk_window_get_focus_on_map")
+  (return-type "gboolean")
+)
+
 (define-method set_focus_on_map
   (of-object "GdkWindow")
   (c-name "gdk_window_set_focus_on_map")
@@ -5707,6 +5802,12 @@
   (return-type "none")
 )
 
+(define-method get_composited
+  (of-object "GdkWindow")
+  (c-name "gdk_window_get_composited")
+  (return-type "gboolean")
+)
+
 (define-method set_composited
   (of-object "GdkWindow")
   (c-name "gdk_window_set_composited")
@@ -5768,6 +5869,18 @@
   (return-type "gboolean")
 )
 
+(define-method is_input_only
+  (of-object "GdkWindow")
+  (c-name "gdk_window_is_input_only")
+  (return-type "gboolean")
+)
+
+(define-method is_shaped
+  (of-object "GdkWindow")
+  (c-name "gdk_window_is_shaped")
+  (return-type "gboolean")
+)
+
 (define-method get_state
   (of-object "GdkWindow")
   (c-name "gdk_window_get_state")
@@ -5818,6 +5931,12 @@
   )
 )
 
+(define-method has_native
+  (of-object "GdkWindow")
+  (c-name "gdk_window_has_native")
+  (return-type "gboolean")
+)
+
 (define-method set_hints
   (of-object "GdkWindow")
   (c-name "gdk_window_set_hints")
@@ -5848,6 +5967,12 @@
   (return-type "GdkWindowTypeHint")
 )
 
+(define-method get_modal_hint
+  (of-object "GdkWindow")
+  (c-name "gdk_window_get_modal_hint")
+  (return-type "gboolean")
+)
+
 (define-method set_modal_hint
   (of-object "GdkWindow")
   (c-name "gdk_window_set_modal_hint")
@@ -5968,6 +6093,15 @@
   )
 )
 
+(define-method get_background
+  (of-object "GdkWindow")
+  (c-name "gdk_window_get_background")
+  (return-type "none")
+  (parameters
+    '("GdkColor*" "color")
+  )
+)
+
 (define-method set_background
   (of-object "GdkWindow")
   (c-name "gdk_window_set_background")
@@ -5977,6 +6111,16 @@
   )
 )
 
+(define-method get_back_pixmap
+  (of-object "GdkWindow")
+  (c-name "gdk_window_get_back_pixmap")
+  (return-type "none")
+  (parameters
+    '("GdkPixmap**" "pixmap")
+    '("gboolean*" "parent_relative")
+  )
+)
+
 (define-method set_back_pixmap
   (of-object "GdkWindow")
   (c-name "gdk_window_set_back_pixmap")
@@ -6056,6 +6200,30 @@
   )
 )
 
+(define-method coords_to_parent
+  (of-object "GdkWindow")
+  (c-name "gdk_window_coords_to_parent")
+  (return-type "none")
+  (parameters
+    '("gdouble" "x")
+    '("gdouble" "y")
+    '("gdouble*" "parent_x")
+    '("gdouble*" "parent_y")
+  )
+)
+
+(define-method coords_from_parent
+  (of-object "GdkWindow")
+  (c-name "gdk_window_coords_from_parent")
+  (return-type "none")
+  (parameters
+    '("gdouble" "parent_x")
+    '("gdouble" "parent_y")
+    '("gdouble*" "x")
+    '("gdouble*" "y")
+  )
+)
+
 (define-method get_deskrelative_origin
   (of-object "GdkWindow")
   (c-name "gdk_window_get_deskrelative_origin")
@@ -6108,6 +6276,18 @@
   (return-type "GdkWindow*")
 )
 
+(define-method get_effective_parent
+  (of-object "GdkWindow")
+  (c-name "gdk_window_get_effective_parent")
+  (return-type "GdkWindow*")
+)
+
+(define-method get_effective_toplevel
+  (of-object "GdkWindow")
+  (c-name "gdk_window_get_effective_toplevel")
+  (return-type "GdkWindow*")
+)
+
 (define-method get_children
   (of-object "GdkWindow")
   (c-name "gdk_window_get_children")
@@ -6508,11 +6688,430 @@
 
 
 
-;; From gdkwindowimpl.h
+;; From gdkx.h
 
-(define-function gdk_window_impl_get_type
-  (c-name "gdk_window_impl_get_type")
-  (return-type "GType")
+(define-function gdk_x11_drawable_get_xdisplay
+  (c-name "gdk_x11_drawable_get_xdisplay")
+  (return-type "Display*")
+  (parameters
+    '("GdkDrawable*" "drawable")
+  )
+)
+
+(define-function gdk_x11_drawable_get_xid
+  (c-name "gdk_x11_drawable_get_xid")
+  (return-type "XID")
+  (parameters
+    '("GdkDrawable*" "drawable")
+  )
 )
 
+(define-function gdk_x11_window_get_drawable_impl
+  (c-name "gdk_x11_window_get_drawable_impl")
+  (return-type "GdkDrawable*")
+  (parameters
+    '("GdkWindow*" "window")
+  )
+)
 
+(define-function gdk_x11_pixmap_get_drawable_impl
+  (c-name "gdk_x11_pixmap_get_drawable_impl")
+  (return-type "GdkDrawable*")
+  (parameters
+    '("GdkPixmap*" "pixmap")
+  )
+)
+
+(define-function gdk_x11_image_get_xdisplay
+  (c-name "gdk_x11_image_get_xdisplay")
+  (return-type "Display*")
+  (parameters
+    '("GdkImage*" "image")
+  )
+)
+
+(define-function gdk_x11_image_get_ximage
+  (c-name "gdk_x11_image_get_ximage")
+  (return-type "XImage*")
+  (parameters
+    '("GdkImage*" "image")
+  )
+)
+
+(define-function gdk_x11_colormap_get_xdisplay
+  (c-name "gdk_x11_colormap_get_xdisplay")
+  (return-type "Display*")
+  (parameters
+    '("GdkColormap*" "colormap")
+  )
+)
+
+(define-function gdk_x11_colormap_get_xcolormap
+  (c-name "gdk_x11_colormap_get_xcolormap")
+  (return-type "Colormap")
+  (parameters
+    '("GdkColormap*" "colormap")
+  )
+)
+
+(define-function gdk_x11_cursor_get_xdisplay
+  (c-name "gdk_x11_cursor_get_xdisplay")
+  (return-type "Display*")
+  (parameters
+    '("GdkCursor*" "cursor")
+  )
+)
+
+(define-function gdk_x11_cursor_get_xcursor
+  (c-name "gdk_x11_cursor_get_xcursor")
+  (return-type "Cursor")
+  (parameters
+    '("GdkCursor*" "cursor")
+  )
+)
+
+(define-function gdk_x11_display_get_xdisplay
+  (c-name "gdk_x11_display_get_xdisplay")
+  (return-type "Display*")
+  (parameters
+    '("GdkDisplay*" "display")
+  )
+)
+
+(define-function gdk_x11_visual_get_xvisual
+  (c-name "gdk_x11_visual_get_xvisual")
+  (return-type "Visual*")
+  (parameters
+    '("GdkVisual*" "visual")
+  )
+)
+
+(define-function gdk_x11_gc_get_xdisplay
+  (c-name "gdk_x11_gc_get_xdisplay")
+  (return-type "Display*")
+  (parameters
+    '("GdkGC*" "gc")
+  )
+)
+
+(define-function gdk_x11_gc_get_xgc
+  (c-name "gdk_x11_gc_get_xgc")
+  (return-type "GC")
+  (parameters
+    '("GdkGC*" "gc")
+  )
+)
+
+(define-function gdk_x11_screen_get_xscreen
+  (c-name "gdk_x11_screen_get_xscreen")
+  (return-type "Screen*")
+  (parameters
+    '("GdkScreen*" "screen")
+  )
+)
+
+(define-function gdk_x11_screen_get_screen_number
+  (c-name "gdk_x11_screen_get_screen_number")
+  (return-type "int")
+  (parameters
+    '("GdkScreen*" "screen")
+  )
+)
+
+(define-function gdk_x11_window_set_user_time
+  (c-name "gdk_x11_window_set_user_time")
+  (return-type "none")
+  (parameters
+    '("GdkWindow*" "window")
+    '("guint32" "timestamp")
+  )
+)
+
+(define-function gdk_x11_window_move_to_current_desktop
+  (c-name "gdk_x11_window_move_to_current_desktop")
+  (return-type "none")
+  (parameters
+    '("GdkWindow*" "window")
+  )
+)
+
+(define-function gdk_x11_screen_get_window_manager_name
+  (c-name "gdk_x11_screen_get_window_manager_name")
+  (return-type "const-char*")
+  (parameters
+    '("GdkScreen*" "screen")
+  )
+)
+
+(define-function gdk_x11_get_default_root_xwindow
+  (c-name "gdk_x11_get_default_root_xwindow")
+  (return-type "Window")
+)
+
+(define-function gdk_x11_get_default_xdisplay
+  (c-name "gdk_x11_get_default_xdisplay")
+  (return-type "Display*")
+)
+
+(define-function gdk_x11_get_default_screen
+  (c-name "gdk_x11_get_default_screen")
+  (return-type "gint")
+)
+
+(define-function gdk_x11_screen_lookup_visual
+  (c-name "gdk_x11_screen_lookup_visual")
+  (return-type "GdkVisual*")
+  (parameters
+    '("GdkScreen*" "screen")
+    '("VisualID" "xvisualid")
+  )
+)
+
+(define-function gdkx_visual_get
+  (c-name "gdkx_visual_get")
+  (return-type "GdkVisual*")
+  (parameters
+    '("VisualID" "xvisualid")
+  )
+)
+
+(define-function gdkx_colormap_get
+  (c-name "gdkx_colormap_get")
+  (return-type "GdkColormap*")
+  (parameters
+    '("Colormap" "xcolormap")
+  )
+)
+
+(define-function gdk_x11_colormap_foreign_new
+  (c-name "gdk_x11_colormap_foreign_new")
+  (is-constructor-of "GdkX11ColormapForeign")
+  (return-type "GdkColormap*")
+  (parameters
+    '("GdkVisual*" "visual")
+    '("Colormap" "xcolormap")
+  )
+)
+
+(define-function gdk_xid_table_lookup_for_display
+  (c-name "gdk_xid_table_lookup_for_display")
+  (return-type "gpointer")
+  (parameters
+    '("GdkDisplay*" "display")
+    '("XID" "xid")
+  )
+)
+
+(define-function gdk_x11_get_server_time
+  (c-name "gdk_x11_get_server_time")
+  (return-type "guint32")
+  (parameters
+    '("GdkWindow*" "window")
+  )
+)
+
+(define-function gdk_x11_display_get_user_time
+  (c-name "gdk_x11_display_get_user_time")
+  (return-type "guint32")
+  (parameters
+    '("GdkDisplay*" "display")
+  )
+)
+
+(define-function gdk_x11_display_get_startup_notification_id
+  (c-name "gdk_x11_display_get_startup_notification_id")
+  (return-type "const-gchar*")
+  (parameters
+    '("GdkDisplay*" "display")
+  )
+)
+
+(define-function gdk_x11_display_set_cursor_theme
+  (c-name "gdk_x11_display_set_cursor_theme")
+  (return-type "none")
+  (parameters
+    '("GdkDisplay*" "display")
+    '("const-gchar*" "theme")
+    '("const-gint" "size")
+  )
+)
+
+(define-function gdk_x11_display_broadcast_startup_message
+  (c-name "gdk_x11_display_broadcast_startup_message")
+  (return-type "none")
+  (parameters
+    '("GdkDisplay*" "display")
+    '("const-char*" "message_type")
+  )
+  (varargs #t)
+)
+
+(define-function gdk_x11_screen_supports_net_wm_hint
+  (c-name "gdk_x11_screen_supports_net_wm_hint")
+  (return-type "gboolean")
+  (parameters
+    '("GdkScreen*" "screen")
+    '("GdkAtom" "property")
+  )
+)
+
+(define-function gdk_x11_screen_get_monitor_output
+  (c-name "gdk_x11_screen_get_monitor_output")
+  (return-type "XID")
+  (parameters
+    '("GdkScreen*" "screen")
+    '("gint" "monitor_num")
+  )
+)
+
+(define-function gdk_xid_table_lookup
+  (c-name "gdk_xid_table_lookup")
+  (return-type "gpointer")
+  (parameters
+    '("XID" "xid")
+  )
+)
+
+(define-function gdk_net_wm_supports
+  (c-name "gdk_net_wm_supports")
+  (return-type "gboolean")
+  (parameters
+    '("GdkAtom" "property")
+  )
+)
+
+(define-function gdk_x11_grab_server
+  (c-name "gdk_x11_grab_server")
+  (return-type "none")
+)
+
+(define-function gdk_x11_ungrab_server
+  (c-name "gdk_x11_ungrab_server")
+  (return-type "none")
+)
+
+(define-function gdk_x11_lookup_xdisplay
+  (c-name "gdk_x11_lookup_xdisplay")
+  (return-type "GdkDisplay*")
+  (parameters
+    '("Display*" "xdisplay")
+  )
+)
+
+(define-function gdk_x11_atom_to_xatom_for_display
+  (c-name "gdk_x11_atom_to_xatom_for_display")
+  (return-type "Atom")
+  (parameters
+    '("GdkDisplay*" "display")
+    '("GdkAtom" "atom")
+  )
+)
+
+(define-function gdk_x11_xatom_to_atom_for_display
+  (c-name "gdk_x11_xatom_to_atom_for_display")
+  (return-type "GdkAtom")
+  (parameters
+    '("GdkDisplay*" "display")
+    '("Atom" "xatom")
+  )
+)
+
+(define-function gdk_x11_get_xatom_by_name_for_display
+  (c-name "gdk_x11_get_xatom_by_name_for_display")
+  (return-type "Atom")
+  (parameters
+    '("GdkDisplay*" "display")
+    '("const-gchar*" "atom_name")
+  )
+)
+
+(define-function gdk_x11_get_xatom_name_for_display
+  (c-name "gdk_x11_get_xatom_name_for_display")
+  (return-type "const-gchar*")
+  (parameters
+    '("GdkDisplay*" "display")
+    '("Atom" "xatom")
+  )
+)
+
+(define-function gdk_x11_atom_to_xatom
+  (c-name "gdk_x11_atom_to_xatom")
+  (return-type "Atom")
+  (parameters
+    '("GdkAtom" "atom")
+  )
+)
+
+(define-function gdk_x11_xatom_to_atom
+  (c-name "gdk_x11_xatom_to_atom")
+  (return-type "GdkAtom")
+  (parameters
+    '("Atom" "xatom")
+  )
+)
+
+(define-function gdk_x11_get_xatom_by_name
+  (c-name "gdk_x11_get_xatom_by_name")
+  (return-type "Atom")
+  (parameters
+    '("const-gchar*" "atom_name")
+  )
+)
+
+(define-function gdk_x11_get_xatom_name
+  (c-name "gdk_x11_get_xatom_name")
+  (return-type "const-gchar*")
+  (parameters
+    '("Atom" "xatom")
+  )
+)
+
+(define-function gdk_x11_display_grab
+  (c-name "gdk_x11_display_grab")
+  (return-type "none")
+  (parameters
+    '("GdkDisplay*" "display")
+  )
+)
+
+(define-function gdk_x11_display_ungrab
+  (c-name "gdk_x11_display_ungrab")
+  (return-type "none")
+  (parameters
+    '("GdkDisplay*" "display")
+  )
+)
+
+(define-function gdk_x11_register_standard_event_type
+  (c-name "gdk_x11_register_standard_event_type")
+  (return-type "none")
+  (parameters
+    '("GdkDisplay*" "display")
+    '("gint" "event_base")
+    '("gint" "n_events")
+  )
+)
+
+(define-function gdk_x11_font_get_xfont
+  (c-name "gdk_x11_font_get_xfont")
+  (return-type "gpointer")
+  (parameters
+    '("GdkFont*" "font")
+  )
+)
+
+(define-function gdk_x11_font_get_xdisplay
+  (c-name "gdk_x11_font_get_xdisplay")
+  (return-type "Display*")
+  (parameters
+    '("GdkFont*" "font")
+  )
+)
+
+(define-function gdk_x11_font_get_name
+  (c-name "gdk_x11_font_get_name")
+  (return-type "const-char*")
+  (parameters
+    '("GdkFont*" "font")
+  )
+)
diff --git a/gdk/src/gdk_pixbuf_methods.defs b/gdk/src/gdk_pixbuf_methods.defs
index 51d82af..c6b1c10 100644
--- a/gdk/src/gdk_pixbuf_methods.defs
+++ b/gdk/src/gdk_pixbuf_methods.defs
@@ -1,12 +1,5 @@
 ;; -*- scheme -*-
 ; object definitions ...
-(define-object Pixbuf
-  (in-module "Gdk")
-  (parent "GObject")
-  (c-name "GdkPixbuf")
-  (gtype-id "GDK_TYPE_PIXBUF")
-)
-
 (define-object PixbufAnimation
   (in-module "Gdk")
   (parent "GObject")
@@ -98,9 +91,37 @@
   )
 )
 
+(define-flags PixdataType
+  (in-module "Gdk")
+  (c-name "GdkPixdataType")
+  (gtype-id "GDK_TYPE_PIXDATA_TYPE")
+  (values
+    '("color-type-rgb" "GDK_PIXDATA_COLOR_TYPE_RGB")
+    '("color-type-rgba" "GDK_PIXDATA_COLOR_TYPE_RGBA")
+    '("color-type-mask" "GDK_PIXDATA_COLOR_TYPE_MASK")
+    '("sample-width-8" "GDK_PIXDATA_SAMPLE_WIDTH_8")
+    '("sample-width-mask" "GDK_PIXDATA_SAMPLE_WIDTH_MASK")
+    '("encoding-raw" "GDK_PIXDATA_ENCODING_RAW")
+    '("encoding-rle" "GDK_PIXDATA_ENCODING_RLE")
+    '("encoding-mask" "GDK_PIXDATA_ENCODING_MASK")
+  )
+)
 
-;; From gdk-pixbuf-alias.h
-
+(define-flags PixdataDumpType
+  (in-module "Gdk")
+  (c-name "GdkPixdataDumpType")
+  (gtype-id "GDK_TYPE_PIXDATA_DUMP_TYPE")
+  (values
+    '("pixdata-stream" "GDK_PIXDATA_DUMP_PIXDATA_STREAM")
+    '("pixdata-struct" "GDK_PIXDATA_DUMP_PIXDATA_STRUCT")
+    '("macros" "GDK_PIXDATA_DUMP_MACROS")
+    '("gtypes" "GDK_PIXDATA_DUMP_GTYPES")
+    '("ctypes" "GDK_PIXDATA_DUMP_CTYPES")
+    '("static" "GDK_PIXDATA_DUMP_STATIC")
+    '("const" "GDK_PIXDATA_DUMP_CONST")
+    '("rle-decoder" "GDK_PIXDATA_DUMP_RLE_DECODER")
+  )
+)
 
 
 ;; From gdk-pixbuf-animation.h
@@ -595,10 +616,6 @@
 
 
 
-;; From gdk-pixbuf-i18n.h
-
-
-
 ;; From gdk-pixbuf-io.h
 
 (define-function gdk_pixbuf_get_formats
@@ -770,24 +787,6 @@
 
 
 
-;; From gdk-pixbuf-private.h
-
-
-
-;; From gdk-pixbuf-scaled-anim.h
-
-(define-function gdk_pixbuf_scaled_anim_get_type
-  (c-name "gdk_pixbuf_scaled_anim_get_type")
-  (return-type "GType")
-)
-
-(define-function gdk_pixbuf_scaled_anim_iter_get_type
-  (c-name "gdk_pixbuf_scaled_anim_iter_get_type")
-  (return-type "GType")
-)
-
-
-
 ;; From gdk-pixbuf-simple-anim.h
 
 (define-function gdk_pixbuf_simple_anim_get_type
@@ -945,3 +944,57 @@
 )
 
 
+
+;; From gdk-pixdata.h
+
+(define-method serialize
+  (of-object "GdkPixdata")
+  (c-name "gdk_pixdata_serialize")
+  (return-type "guint8*")
+  (parameters
+    '("guint*" "stream_length_p")
+  )
+)
+
+(define-method deserialize
+  (of-object "GdkPixdata")
+  (c-name "gdk_pixdata_deserialize")
+  (return-type "gboolean")
+  (parameters
+    '("guint" "stream_length")
+    '("const-guint8*" "stream")
+    '("GError**" "error")
+  )
+)
+
+(define-method from_pixbuf
+  (of-object "GdkPixdata")
+  (c-name "gdk_pixdata_from_pixbuf")
+  (return-type "gpointer")
+  (parameters
+    '("const-GdkPixbuf*" "pixbuf")
+    '("gboolean" "use_rle")
+  )
+)
+
+(define-function gdk_pixbuf_from_pixdata
+  (c-name "gdk_pixbuf_from_pixdata")
+  (return-type "GdkPixbuf*")
+  (parameters
+    '("const-GdkPixdata*" "pixdata")
+    '("gboolean" "copy_pixels")
+    '("GError**" "error")
+  )
+)
+
+(define-method to_csource
+  (of-object "GdkPixdata")
+  (c-name "gdk_pixdata_to_csource")
+  (return-type "GString*")
+  (parameters
+    '("const-gchar*" "name")
+    '("GdkPixdataDumpType" "dump_type")
+  )
+)
+
+
diff --git a/gdk/src/image.hg b/gdk/src/image.hg
index 2ba3800..975b9b1 100644
--- a/gdk/src/image.hg
+++ b/gdk/src/image.hg
@@ -23,7 +23,10 @@
 #include <gdkmm/visual.h>
 #include <gdkmm/colormap.h>
 #include <gdkmm/types.h> //For ByteOrder.
-#include <gdk/gdk.h>
+
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef GSEAL_ENABLED
+#m4 _POP()
 
 _DEFS(gdkmm,gdk)
 _PINCLUDE(glibmm/private/object_p.h)
@@ -69,14 +72,21 @@ public:
   _WRAP_METHOD(Glib::RefPtr<Colormap> get_colormap(), gdk_image_get_colormap, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Colormap> get_colormap() const, gdk_image_get_colormap, refreturn, constversion)
 
-  _MEMBER_GET(image_type, type, ImageType, GdkImageType)
-  _MEMBER_GET_GOBJECT(visual, visual, Visual, GdkVisual*)
-  _MEMBER_GET(byte_order, byte_order, ByteOrder, GdkByteOrder)
-  _MEMBER_GET(width, width, int, gint)
-  _MEMBER_GET(height, height, int, gint)
-  _MEMBER_GET(bpp, bpp, guint16, guint16)
-  _MEMBER_GET(bpl, bpl, guint16, guint16)
-  _MEMBER_GET(bits_per_pixel, bits_per_pixel, guint16, guint16)
+  _WRAP_METHOD(ImageType get_image_type() const, gdk_image_get_image_type)
+  _WRAP_METHOD(Glib::RefPtr<Visual> get_visual(), gdk_image_get_visual)
+  _WRAP_METHOD(Glib::RefPtr<const Visual> get_visual() const, gdk_image_get_visual, constversion)
+  _WRAP_METHOD(ByteOrder get_byte_order() const, gdk_image_get_byte_order)
+  _WRAP_METHOD(int get_width() const, gdk_image_get_width)
+  _WRAP_METHOD(int get_height() const, gdk_image_get_height)
+  _WRAP_METHOD(guint16 get_depth() const, gdk_image_get_depth)
+
+  _WRAP_METHOD(guint16 get_bpp() const, gdk_image_get_bytes_per_pixel, deprecated "Use get_bytes_per_pixel()")
+  _WRAP_METHOD(guint16 get_bytes_per_pixel() const, gdk_image_get_bytes_per_pixel)
+
+  _WRAP_METHOD(guint16 get_bpl() const, gdk_image_get_bytes_per_line, deprecated "Use get_bytes_per_line()")
+  _WRAP_METHOD(guint16 get_bytes_per_line() const, gdk_image_get_bytes_per_line)
+
+  _WRAP_METHOD(guint16 get_bits_per_pixel() const, gdk_image_get_bits_per_pixel)
 
   //This memory block is not read-only, apparently:
   _MEMBER_GET_PTR(mem, mem, void*, gpointer)
diff --git a/gdk/src/region.hg b/gdk/src/region.hg
index 08bdec3..0c94bad 100644
--- a/gdk/src/region.hg
+++ b/gdk/src/region.hg
@@ -19,6 +19,40 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+// We use GdkSpanFunc in the (deprecated) API, so we must temporarily undef GDK_DISABLE_DEPRECATED.
+// We shouldn't have used that C type in the API anyway, but we can't break API.
+// Temporarily undef GDK_DISABLE_DEPRECATED, redefining it later if appropriate.
+// We need this to use _GtkBoxChild, which we use in our (deprecated) API.
+#if defined(GDK_DISABLE_DEPRECATED) && !defined(GTKMM_GDK_DISABLE_DEPRECATED_UNDEFED)
+#undef GDK_DISABLE_DEPRECATED
+#define GTKMM_GDK_DISABLE_DEPRECATED_UNDEFED 1
+#endif
+
+// This is for dragcontext which is often included after color.h, which we can't avoid.
+// We use GdkDragContext members in the (deprecated) API, for which there are no replacements,
+// so we must temporarily undef GSEAL_ENABLE.
+// Temporarily undef GSEAL_ENABLE, redefining it later if appropriate.
+#if defined(GSEAL_ENABLE) && !defined(GTKMM_GSEAL_ENABLE_UNDEFED)
+#undef GSEAL_ENABLE
+#define GTKMM_GSEAL_ENABLE_UNDEFED 1
+#endif
+
+#include <gdk/gdk.h>
+
+// Redefine GDK_DISABLE_DEPRECATED if it was defined before we temporarily undefed it:
+#if defined(GTKMM_GDK_DISABLE_DEPRECATED_UNDEFED)
+#define GDK_DISABLE_DEPRECATED 1
+#undef GTKMM_GDK_DISABLE_DEPRECATED_UNDEFED
+#endif
+
+// Redefine GSEAL_ENABLE if it was defined before we temporarily undefed it:
+#if defined(GTKMM_GSEAL_ENABLE_UNDEFED)
+#define GSEAL_ENABLE 1
+#undef GTKMM_GSEAL_ENABLE_UNDEFED
+#endif
+
+
+
 extern "C" { typedef struct _GdkRegion GdkRegion; }
 
 #include <glibmm/arrayhandle.h>
@@ -27,6 +61,10 @@ extern "C" { typedef struct _GdkRegion GdkRegion; }
 
 _DEFS(gdkmm,gdk)
 
+#m4 _PUSH(SECTION_CC_PRE_INCLUDES)
+#undef GDK_DISABLE_DEPRECATED
+#m4 _POP()
+
 namespace Gdk
 {
 
@@ -62,16 +100,16 @@ public:
   _WRAP_METHOD(void union_(const Region& source2), gdk_region_union) //union is a keyword.
   _WRAP_METHOD(void subtract(const Region& source2), gdk_region_subtract)
   _WRAP_METHOD(void xor_(const Region& source2), gdk_region_xor) //xor is a keyword
-  
-  
+
+
 //Note: The spans parameter was made const in GTK+ 2.16, but we can't change that in our C++ API. TODO: Change it when we can do an ABI break.
 #m4 _CONVERSION(`GdkSpan*',`const GdkSpan*',`($3)')
   _WRAP_METHOD(void spans_intersect_foreach(GdkSpan* spans, int n_spans, bool sorted, GdkSpanFunc function, gpointer data), gdk_region_spans_intersect_foreach)
-  
+
 #m4begin
   _WRAP_EQUAL(gdk_region_equal, unconst)
 #m4end
 };
 
-} //namespace Gdk
 
+} //namespace Gdk
diff --git a/gdk/src/screen.hg b/gdk/src/screen.hg
index e84dbe6..9ddde8a 100644
--- a/gdk/src/screen.hg
+++ b/gdk/src/screen.hg
@@ -21,6 +21,7 @@
 
 //#include <gdkmm/visual.h>
 //#include <gdkmm/window.h>
+#include <gdkmm/region.h> //Just to solve GDK_DISABLE_DEPRECATED problems when this header is included from elsewhere.
 #include <gdkmm/rectangle.h>
 #include <glibmm/object.h>
 #include <cairomm/fontoptions.h>
@@ -40,7 +41,7 @@ class Window;
  * Gdk::Screen objects are the GDK representation of a physical screen. It is used throughout GDK and GTK+ to specify
  * which screen the top level windows are to be displayed on. It is also used to query the screen specification and
  * default settings such as the default colormap (get_default_colormap()), the screen width (get_width()), etc.
- * Note that a screen may consist of multiple monitors which are merged to form a large screen area. 
+ * Note that a screen may consist of multiple monitors which are merged to form a large screen area.
  */
 class Screen : public Glib::Object
 {
@@ -125,7 +126,7 @@ public:
 #m4 _CONVERSION(`GList*',`Glib::ListHandle< Glib::RefPtr<Window> >',`$2($3, Glib::OWNERSHIP_DEEP)')
   _WRAP_METHOD(Glib::ListHandle< Glib::RefPtr<Window> > get_window_stack(), gdk_screen_get_window_stack)
 
-  /** The size_changed signal is emitted when the pixel width or 
+  /** The size_changed signal is emitted when the pixel width or
    * height of a screen changes.
    */
   _WRAP_SIGNAL(void size_changed(), size-changed)
@@ -144,4 +145,3 @@ bool Screen::get_setting(const Glib::ustring& name, ValueType& value) const
 }
 
 } /* namespace Gdk */
-
diff --git a/gdk/src/visual.hg b/gdk/src/visual.hg
index adcf91e..041c67b 100644
--- a/gdk/src/visual.hg
+++ b/gdk/src/visual.hg
@@ -21,7 +21,6 @@
 
 #include <glibmm/object.h>
 #include <gdkmm/screen.h>
-#include <gdk/gdk.h>
 
 _DEFS(gdkmm,gdk)
 _PINCLUDE(glibmm/private/object_p.h)
diff --git a/gdk/src/window.hg b/gdk/src/window.hg
index c65daec..a4a294b 100644
--- a/gdk/src/window.hg
+++ b/gdk/src/window.hg
@@ -20,12 +20,11 @@
 #m4 _POP()
 _CONFIGINCLUDE(gdkmmconfig.h)
 
+#include <gdkmm/region.h>
 #include <gdkmm/drawable.h>
 #include <gdkmm/bitmap.h>
 //#include <gdkmm/cursor.h>
 #include <gdkmm/types.h>
-#include <gdkmm/region.h>
-#include <gdk/gdk.h>
 
 _DEFS(gdkmm,gdk)
 _PINCLUDE(gdkmm/private/drawable_p.h)
@@ -301,7 +300,7 @@ public:
 
   _WRAP_METHOD(Glib::RefPtr<Window> get_offscreen_embedder(), gdk_offscreen_window_get_embedder, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Window> get_offscreen_embedder() const, gdk_offscreen_window_get_embedder, constversion, refreturn)
-  
+
    _WRAP_METHOD(void set_offscreen_embedder(const Glib::RefPtr<Window>& embedder), gdk_offscreen_window_set_embedder)
 
   _WRAP_METHOD(void redirect_to_drawable(const Glib::RefPtr<Drawable>& drawable, int src_x, int src_y, int dest_x, int dest_y, int width, int height), gdk_window_redirect_to_drawable)
diff --git a/gtk/src/activatable.hg b/gtk/src/activatable.hg
index 080dbe9..4cbbfd1 100644
--- a/gtk/src/activatable.hg
+++ b/gtk/src/activatable.hg
@@ -19,10 +19,16 @@
 
 #include <gtkmm/action.h>
 #include <glibmm/interface.h>
-#include <gtk/gtk.h>
 _DEFS(gtkmm,gtk)
 _PINCLUDE(glibmm/private/interface_p.h)
 
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+typedef struct _GtkActivatableIface GtkActivatableIface;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
 
 namespace Gtk
 {
diff --git a/gtk/src/bin.ccg b/gtk/src/bin.ccg
index 580bfe3..d625863 100644
--- a/gtk/src/bin.ccg
+++ b/gtk/src/bin.ccg
@@ -20,11 +20,11 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <gtk/gtk.h>
 #include <gtkmm/adjustment.h>
 #include <gtkmm/label.h>
 #include <gtkmm/box.h>
 #include <gtkmm/image.h>
+#include <gtk/gtk.h>
 
 namespace Gtk
 {
diff --git a/gtk/src/box.hg b/gtk/src/box.hg
index 0366f70..d29f3c7 100644
--- a/gtk/src/box.hg
+++ b/gtk/src/box.hg
@@ -28,8 +28,23 @@ _PINCLUDE(gtkmm/private/container_p.h)
 
 #include <gtkmm/container.h>
 #include <glibmm/helperlist.h>
+
+
+// Temporarily undef GTK_DISABLE_DEPRECATED, redefining it later if appropriate.
+// We need this to use _GtkBoxChild, which we use in our (deprecated) API.
+#if defined(GTK_DISABLE_DEPRECATED) && !defined(GTKMM_GTK_DISABLE_DEPRECATED_UNDEFED)
+#undef GTK_DISABLE_DEPRECATED
+#define GTKMM_GTK_DISABLE_DEPRECATED_UNDEFED 1
+#endif
+
 #include <gtk/gtk.h>  /* For _GtkBoxChild */
 
+// Redefine GTK_DISABLE_DEPRECATED if it was defined before we temporarily undefed it:
+#if defined(GTKMM_GTK_DISABLE_DEPRECATED_UNDEFED)
+#define GTK_DISABLE_DEPRECATED 1
+#undef GTKMM_GTK_DISABLE_DEPRECATED_UNDEFED
+#endif
+
 
 namespace Gtk
 {
@@ -49,7 +64,6 @@ class Box;
 namespace Box_Helpers
 {
 
-//TODO: We will need real iterator API in GTK+ soon: https://bugzilla.gnome.org/show_bug.cgi?id=613132
 //This may not have any data or virtual functions. See below.
 class Child : protected _GtkBoxChild
 {
diff --git a/gtk/src/editable.hg b/gtk/src/editable.hg
index c57180c..73268ab 100644
--- a/gtk/src/editable.hg
+++ b/gtk/src/editable.hg
@@ -18,10 +18,18 @@
  */
 
 #include <glibmm/interface.h>
-#include <gtk/gtk.h>
+
 _DEFS(gtkmm,gtk)
 _PINCLUDE(glibmm/private/interface_p.h)
 
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+typedef struct _GtkEditableClass GtkEditableClass;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
 
 namespace Gtk
 {
diff --git a/gtk/src/main.hg b/gtk/src/main.hg
index 44f12d7..21ab2ea 100644
--- a/gtk/src/main.hg
+++ b/gtk/src/main.hg
@@ -1,7 +1,7 @@
 /* $Id: main.hg,v 1.9 2005/02/13 20:48:35 murrayc Exp $ */
 
 /* main.h
- * 
+ *
  * Copyright (C) 1998-2003 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -20,13 +20,21 @@
  */
 
 
-#include <gtk/gtk.h>
+//#include <gtk/gtk.h>
 
 #include <sigc++/sigc++.h>
 #include <gdkmm/types.h>
 
 _DEFS(gtkmm,gtk)
 
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+typedef struct _GtkWidget GtkWidget;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
 namespace Gtk
 {
 
@@ -63,7 +71,6 @@ protected:
   static gboolean gtk_callback(gpointer data); //gtk+ calls this, which then calls our slot.
 };
 
-
 /// KeySnooper Signal Class (internal)
 class KeySnooperSig
 {
@@ -110,22 +117,22 @@ public:
 
   //This offers the same functionality as gtk_init_with_args():
   /** Scans the argument vector, and strips off all parameters parsed by GTK+ or your @a option_context.
-   * Add a Glib::OptionGroup to the Glib::OptionContext to parse your own command-line arguments.  
+   * Add a Glib::OptionGroup to the Glib::OptionContext to parse your own command-line arguments.
    *
    * Note:  The argument strings themself won't be modified, although the
    * pointers to them might change.  This makes it possible to create your
    * own argv of string literals, which have the type 'const char[]' in
    * standard C++.  (You might need to use const_cast<>, though.)
    *
-   * This function automatically generates nicely formatted 
+   * This function automatically generates nicely formatted
    * <option>--help</option> output. Note that your program will
    * be terminated after writing out the help output.
    *
    * @param argc a reference to the number of command line arguments.
    * @param argv a reference to the array of command line arguments.
-   * @parameter_string a string which is displayed in the first line of <option>--help</option> output, 
+   * @parameter_string a string which is displayed in the first line of <option>--help</option> output,
    * after <literal><replaceable>programname</replaceable> [OPTION...]</literal>
-   * @param option_context A Glib::OptionContext containing Glib::OptionGroups which described the command-line arguments taken by your program. 
+   * @param option_context A Glib::OptionContext containing Glib::OptionGroups which described the command-line arguments taken by your program.
    *
    * @throw Glib::OptionError
    */
@@ -144,7 +151,7 @@ public:
   /// See Main(int* argc, char*** argv, bool set_locale).
   Main(int& argc, char**& argv, bool set_locale = true);
 
- 
+
   virtual ~Main();
 
   /// Access to the one global instance of Gtk::Main.
@@ -173,10 +180,10 @@ public:
 
   //This attempts to provide the same functionality as gtk_get_option_group():
   /** Add a Glib::OptionGroup, for the commandline arguments recognized
-   * by GTK+ and GDK, to a Glib::OptionContext, so that these commandline arguments will 
+   * by GTK+ and GDK, to a Glib::OptionContext, so that these commandline arguments will
    * be processed in addition to the existing commandline arguments specified by the Glib::OptionContext.
    *
-   * You do not need to use this method if you pass your Glib::OptionContext to the Main constructor, because 
+   * You do not need to use this method if you pass your Glib::OptionContext to the Main constructor, because
    * it adds the gtk option group automatically.
    *
    * @param option_context Option Context to which the group will be added.
@@ -272,4 +279,3 @@ private:
 };
 
 } // namespace Gtk
-
diff --git a/gtk/src/orientable.hg b/gtk/src/orientable.hg
index 1368c1e..0c846e4 100644
--- a/gtk/src/orientable.hg
+++ b/gtk/src/orientable.hg
@@ -19,10 +19,17 @@
 
 #include <glibmm/interface.h>
 #include <gtkmm/enums.h>
-#include <gtk/gtk.h>
+
 _DEFS(gtkmm,gtk)
 _PINCLUDE(glibmm/private/interface_p.h)
 
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+typedef struct _GtkOrientableIface GtkOrientableIface;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
 
 namespace Gtk
 {
diff --git a/gtk/src/printoperationpreview.hg b/gtk/src/printoperationpreview.hg
index 4f8375e..917cb8b 100644
--- a/gtk/src/printoperationpreview.hg
+++ b/gtk/src/printoperationpreview.hg
@@ -15,8 +15,6 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <gtk/gtk.h>
-
 #include <glibmm/interface.h>
 
 #include <gtkmm/pagesetup.h>
@@ -25,6 +23,15 @@
 _DEFS(gtkmm,gtk)
 _PINCLUDE(glibmm/private/interface_p.h)
 
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+typedef struct _GtkPrintOperationPreviewIface GtkPrintOperationPreviewIface;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+
 namespace Gtk
 {
 
diff --git a/gtk/src/recentchooser.hg b/gtk/src/recentchooser.hg
index 3ddd7ae..f3b6653 100644
--- a/gtk/src/recentchooser.hg
+++ b/gtk/src/recentchooser.hg
@@ -15,7 +15,6 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <gtk/gtk.h>
 #include <glibmm/interface.h>
 #include <gtkmm/recentinfo.h>
 #include <gtkmm/recentfilter.h>
@@ -24,6 +23,14 @@
 _DEFS(gtkmm,gtk)
 _PINCLUDE(glibmm/private/interface_p.h)
 
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+typedef struct _GtkRecentChooserIface GtkRecentChooserIface;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
 namespace Gtk
 {
 
diff --git a/gtk/src/textiter.hg b/gtk/src/textiter.hg
index 0bdafd4..84b8086 100644
--- a/gtk/src/textiter.hg
+++ b/gtk/src/textiter.hg
@@ -23,7 +23,7 @@
 #include <gtkmm/texttag.h>
 #include <gtkmm/textchildanchor.h>
 #include <gtkmm/textattributes.h>
-#include <gtk/gtk.h> /* we need the definition of GtkTextIter */
+//#include <gtk/gtk.h> /* we need the definition of GtkTextIter */
 
 
 _DEFS(gtkmm,gtk)
diff --git a/gtk/src/toolshell.hg b/gtk/src/toolshell.hg
index 298f882..a780c5e 100644
--- a/gtk/src/toolshell.hg
+++ b/gtk/src/toolshell.hg
@@ -20,11 +20,17 @@
 #include <glibmm/interface.h>
 #include <gtkmm/enums.h>
 #include <gtkmm/sizegroup.h>
-#include <gtk/gtk.h>
 
 _DEFS(gtkmm,gtk)
 _PINCLUDE(glibmm/private/interface_p.h)
 
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+typedef struct _GtkToolShellIface GtkToolShellIface;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
 
 namespace Gtk
 {
diff --git a/gtk/src/treesortable.hg b/gtk/src/treesortable.hg
index 26ecd37..a4749ee 100644
--- a/gtk/src/treesortable.hg
+++ b/gtk/src/treesortable.hg
@@ -27,11 +27,18 @@ _CONFIGINCLUDE(gtkmmconfig.h)
 #include <gtkmm/treemodelcolumn.h>
 #include <gtkmm/treemodel.h>
 #include <gtkmm/treeiter.h>
-#include <gtk/gtk.h>
 
 _DEFS(gtkmm,gtk)
 _PINCLUDE(glibmm/private/interface_p.h)
 
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+typedef struct _GtkTreeSortableIface GtkTreeSortableIface;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
 namespace Gtk
 {
 



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