[gtkmm/local-gtkmm-3maybe: 2/2] Fixed build, plus some const changes.



commit 9fa420b287c1c9b5aa5da6f798a1f73e8291b384
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Apr 28 01:52:11 2009 +0200

    Fixed build, plus some const changes.
    
    * gdk/src/*.hg: Fixed build errors caused by previous changes.
    Some const changes that were not possible without breaking ABI.
    Not sure exactly what because I cannot get git to give me a diff.
---
 ChangeLog                 |    8 ++++++++
 gdk/src/drawable.hg       |    8 ++------
 gdk/src/gc.hg             |    6 ------
 gdk/src/region.hg         |    4 +---
 gdk/src/window.hg         |    4 +---
 gtk/src/entry.hg          |    4 ++--
 gtk/src/filechooser.hg    |   10 +++++-----
 gtk/src/iconview.hg       |    1 +
 gtk/src/notebook.hg       |    6 +++---
 gtk/src/paned.hg          |    1 +
 gtk/src/ruler.hg          |    1 +
 gtk/src/scalebutton.hg    |    1 +
 gtk/src/scrollbar.hg      |    4 ++--
 gtk/src/treeviewcolumn.hg |    1 +
 gtk/src/widget.hg         |   14 +++++++-------
 tools/m4/convert_gdk.m4   |    1 +
 16 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0b6de16..549cf46 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-04-28  Murray Cumming  <murrayc murrayc com>
+
+	Fixed build, plus some const changes.
+
+	* gdk/src/*.hg: Fixed build errors caused by previous changes.
+	Some const changes that were not possible without breaking ABI.
+	Not sure exactly what because I cannot get git to give me a diff.
+
 2009-04-27  Johannes Schmid <jschmid openismus com>
 
 	* gtk/src/statusicon.ccg:
diff --git a/gdk/src/drawable.hg b/gdk/src/drawable.hg
index 1b43441..0ba16cf 100644
--- a/gdk/src/drawable.hg
+++ b/gdk/src/drawable.hg
@@ -91,9 +91,7 @@ public:
   _WRAP_METHOD(void draw_image(const Glib::RefPtr<const GC>& gc, const Glib::RefPtr<const Image>& image, int xsrc, int ysrc, int xdest, int ydest, int width = -1, int height = -1), gdk_draw_image)
 
   //segs is an array, and this function will be used so little that it doesn't seem worth wrapping it to use a container of C++ types.
-  //Note: The segs 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(`GdkSegment*',`const GdkSegment*',`($3)')
-  _WRAP_METHOD(void draw_segments(const Glib::RefPtr<const GC>& gc, GdkSegment* segs, int nsegs), gdk_draw_segments) // TODO
+  _WRAP_METHOD(void draw_segments(const Glib::RefPtr<const GC>& gc, const GdkSegment* segs, int nsegs), gdk_draw_segments) // TODO
 
   //glyphs is not an array. I went down to pango_xft_render in pango and saw that PangoGlyphString here is not an array. -Bryan
   _WRAP_METHOD(void draw_glyphs(const Glib::RefPtr<const GC>& gc, const Glib::RefPtr<const Pango::Font>& font, int x, int y, const Pango::GlyphString& glyphs), gdk_draw_glyphs)
@@ -104,9 +102,7 @@ public:
   _WRAP_METHOD(void draw_layout(const Glib::RefPtr<const GC>& gc, int x, int y, const Glib::RefPtr<const Pango::Layout>& layout), gdk_draw_layout)
   _WRAP_METHOD(void draw_layout(const Glib::RefPtr<const GC>& gc, int x, int y, const Glib::RefPtr<const Pango::Layout>& layout, const Color& foreground, const Color& background), gdk_draw_layout_with_colors)
 
-//Note: The pixbuf 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(`const Glib::RefPtr<Pixbuf>&',`const GdkPixbuf*',`Glib::unwrap($3)')
-  _WRAP_METHOD(void draw_pixbuf(const Glib::RefPtr<const GC>& gc, const Glib::RefPtr<Pixbuf>& pixbuf,
+  _WRAP_METHOD(void draw_pixbuf(const Glib::RefPtr<const GC>& gc, const Glib::RefPtr<const Pixbuf>& pixbuf,
     int src_x, int src_y, int dest_x, int dest_y,
     int width, int height,
     RgbDither dither, int x_dither, int y_dither), gdk_draw_pixbuf)
diff --git a/gdk/src/gc.hg b/gdk/src/gc.hg
index fdf4577..6364294 100644
--- a/gdk/src/gc.hg
+++ b/gdk/src/gc.hg
@@ -77,12 +77,6 @@ public:
   _WRAP_METHOD(void set_clip_origin(int x, int y), gdk_gc_set_clip_origin)
   _WRAP_METHOD(void set_clip_mask(const Glib::RefPtr<Bitmap>& mask), gdk_gc_set_clip_mask)
 
-//Note: The rectangle 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(`Rectangle&',`const GdkRectangle*',`($3).gobj()')
-  /** @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)
diff --git a/gdk/src/region.hg b/gdk/src/region.hg
index 08bdec3..15988ae 100644
--- a/gdk/src/region.hg
+++ b/gdk/src/region.hg
@@ -64,9 +64,7 @@ public:
   _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)
+  _WRAP_METHOD(void spans_intersect_foreach(const GdkSpan* spans, int n_spans, bool sorted, GdkSpanFunc function, gpointer data), gdk_region_spans_intersect_foreach)
   
 #m4begin
   _WRAP_EQUAL(gdk_region_equal, unconst)
diff --git a/gdk/src/window.hg b/gdk/src/window.hg
index 12d6b2a..2588e7d 100644
--- a/gdk/src/window.hg
+++ b/gdk/src/window.hg
@@ -123,9 +123,7 @@ public:
   _WRAP_METHOD(static void set_sm_client_id(const Glib::ustring& sm_client_id), gdk_set_sm_client_id)
   static void unset_sm_client_id();
   
-  //Note: The rectangle 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(`Rectangle&',`const GdkRectangle*',`($3).gobj()')
-  _WRAP_METHOD(void begin_paint_rect(Rectangle& rectangle), gdk_window_begin_paint_rect)
+  _WRAP_METHOD(void begin_paint_rect(const Rectangle& rectangle), gdk_window_begin_paint_rect)
   _WRAP_METHOD(void begin_paint_region(const Region& region), gdk_window_begin_paint_region)
   _WRAP_METHOD(void end_paint(), gdk_window_end_paint)
   _WRAP_METHOD(void set_title(const Glib::ustring& title), gdk_window_set_title)
diff --git a/gtk/src/entry.hg b/gtk/src/entry.hg
index 6849efa..36d3457 100644
--- a/gtk/src/entry.hg
+++ b/gtk/src/entry.hg
@@ -176,8 +176,8 @@ public:
   // "activate is probably about the only exception"
   _WRAP_SIGNAL(void activate(), "activate")
   
-  _WRAP_SIGNAL(void icon_release(EntryIconPosition icon_position, const GdkEventButton* event), "icon-release")
-  _WRAP_SIGNAL(void icon_press(EntryIconPosition icon_position, const GdkEventButton* event), "icon-press")
+  _WRAP_SIGNAL(void icon_release(EntryIconPosition icon_position, const GdkEventButton* event), "icon-release", no_default_handler)
+  _WRAP_SIGNAL(void icon_press(EntryIconPosition icon_position, const GdkEventButton* event), "icon-press", no_default_handler)
 
   _IGNORE_SIGNAL("move_cursor")
   _IGNORE_SIGNAL("delete_from_cursor")
diff --git a/gtk/src/filechooser.hg b/gtk/src/filechooser.hg
index 27848a5..1f236aa 100644
--- a/gtk/src/filechooser.hg
+++ b/gtk/src/filechooser.hg
@@ -194,7 +194,7 @@ public:
    * @see set_current_folder(), get_current_folder(),
    * set_current_folder_uri(), get_current_folder_uri().
    */
-  _WRAP_SIGNAL(void current_folder_changed(), "current_folder_changed")
+  _WRAP_SIGNAL(void current_folder_changed(), "current_folder_changed", no_default_handler)
   
   /** This signal is emitted when there is a change in the set of selected files
    * in a #GtkFileChooser.  This can happen when the user modifies the selection
@@ -210,7 +210,7 @@ public:
    * unselect_uri(), get_uri(),
    * get_uris().
    */
-  _WRAP_SIGNAL(void selection_changed(), "selection_changed")
+  _WRAP_SIGNAL(void selection_changed(), "selection_changed", no_default_handler)
   
   /** This signal is emitted when the preview in a file chooser should be
    * regenerated.  For example, this can happen when the currently selected file
@@ -228,7 +228,7 @@ public:
    * @see set_preview_widget(), set_preview_widget_active(),
    * set_use_preview_label(), get_preview_filename(), get_preview_uri().
    */
-  _WRAP_SIGNAL(void update_preview(), "update_preview")
+  _WRAP_SIGNAL(void update_preview(), "update_preview", no_default_handler)
   
   /** This signal is emitted when the user "activates" a file in the file
    * chooser.  This can happen by double-clicking on a file in the file list, or
@@ -240,9 +240,9 @@ public:
    *
    * @see get_filename(), get_filenames(), get_uri(), get_uris().
    */
-  _WRAP_SIGNAL(void file_activated(), "file_activated")
+  _WRAP_SIGNAL(void file_activated(), "file_activated", no_default_handler)
 
-  _WRAP_SIGNAL(FileChooserConfirmation confirm_overwrite(), "confirm-overwrite")
+  _WRAP_SIGNAL(FileChooserConfirmation confirm_overwrite(), "confirm-overwrite", no_default_handler)
 
   _WRAP_PROPERTY("action", FileChooserAction)
   //TODO: _WRAP_PROPERTY("file-system", FileSystem) //FileSystem is not really public API.
diff --git a/gtk/src/iconview.hg b/gtk/src/iconview.hg
index db54716..43f06ba 100644
--- a/gtk/src/iconview.hg
+++ b/gtk/src/iconview.hg
@@ -23,6 +23,7 @@
 #include <gtkmm/container.h>
 #include <gtkmm/treemodel.h>
 #include <gtkmm/treepath.h>
+#include <gtkmm/celllayout.h>
 #include <gtkmm/cellrenderer.h>
 #include <gtkmm/tooltip.h>
 _DEFS(gtkmm,gtk)
diff --git a/gtk/src/notebook.hg b/gtk/src/notebook.hg
index b42e8cb..64c048c 100644
--- a/gtk/src/notebook.hg
+++ b/gtk/src/notebook.hg
@@ -398,9 +398,9 @@ public:
   const PageList& pages() const;
 
   _WRAP_SIGNAL(void switch_page(GtkNotebookPage* page, guint page_num), "switch_page")
-  _WRAP_SIGNAL(void page_reordered(Widget* page, guint page_num), "page_reordered")
-  _WRAP_SIGNAL(void page_removed(Widget* page, guint page_num), "page_removed")
-  _WRAP_SIGNAL(void page_added(Widget* page, guint page_num), "page_added")
+  _WRAP_SIGNAL(void page_reordered(Widget* page, guint page_num), "page_reordered", no_default_handler)
+  _WRAP_SIGNAL(void page_removed(Widget* page, guint page_num), "page_removed", no_default_handler)
+  _WRAP_SIGNAL(void page_added(Widget* page, guint page_num), "page_added", no_default_handler)
 
 
   //Key-binding signals:
diff --git a/gtk/src/paned.hg b/gtk/src/paned.hg
index 27a9691..6d0a9ad 100644
--- a/gtk/src/paned.hg
+++ b/gtk/src/paned.hg
@@ -21,6 +21,7 @@
  */
 
 #include <gtkmm/container.h>
+#include <gtkmm/orientable.h>
 #include <gtkmm/enums.h>
 
 _DEFS(gtkmm,gtk)
diff --git a/gtk/src/ruler.hg b/gtk/src/ruler.hg
index ff56b0e..914860e 100644
--- a/gtk/src/ruler.hg
+++ b/gtk/src/ruler.hg
@@ -19,6 +19,7 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include <gtkmm/orientable.h>
 #include <gtkmm/widget.h>
 
 _DEFS(gtkmm,gtk)
diff --git a/gtk/src/scalebutton.hg b/gtk/src/scalebutton.hg
index 975b483..3bf2c55 100644
--- a/gtk/src/scalebutton.hg
+++ b/gtk/src/scalebutton.hg
@@ -21,6 +21,7 @@
 
 #include <gtkmm/button.h>
 #include <gtkmm/adjustment.h>
+#include <gtkmm/orientable.h>
 #include <gtkmm/enums.h>
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/button_p.h)
diff --git a/gtk/src/scrollbar.hg b/gtk/src/scrollbar.hg
index 5f82360..ba84e17 100644
--- a/gtk/src/scrollbar.hg
+++ b/gtk/src/scrollbar.hg
@@ -20,8 +20,8 @@
  */
 
 #include <gtkmm/range.h>
-_DEFS(gtkmm,gtk)
-_DEFS(gtkmm,gtk)
+#include <gtkmm/orientable.h>
+
 _DEFS(gtkmm,gtk)
 _PINCLUDE(gtkmm/private/range_p.h)
 
diff --git a/gtk/src/treeviewcolumn.hg b/gtk/src/treeviewcolumn.hg
index 9b2e028..8847c3c 100644
--- a/gtk/src/treeviewcolumn.hg
+++ b/gtk/src/treeviewcolumn.hg
@@ -26,6 +26,7 @@ _CONFIGINCLUDE(gtkmmconfig.h)
 #include <gtkmm/widget.h>
 #include <gdkmm/window.h>
 #include <gtkmm/treemodel.h>
+#include <gtkmm/celllayout.h>
 #include <glibmm/listhandle.h>
 #include <gtkmm/cellrenderer_generation.h>
 _DEFS(gtkmm,gtk)
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index 115a610..2121050 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -684,7 +684,7 @@ public:
   _WRAP_SIGNAL(void grab_focus(), "grab_focus")
   _WRAP_SIGNAL(bool focus(DirectionType direction), "focus")
   _WRAP_SIGNAL(bool event(GdkEvent* event), "event")
-  _WRAP_SIGNAL(void event_after(GdkEvent* event), "event_after")
+  _WRAP_SIGNAL(void event_after(GdkEvent* event), "event_after", no_default_handler)
 
   //: Event triggered by user pressing button.
   _WRAP_SIGNAL(bool button_press_event(GdkEventButton* event),"button_press_event")
@@ -807,7 +807,7 @@ dnl
    */
   _WRAP_SIGNAL(void drag_data_delete(const Glib::RefPtr<Gdk::DragContext>& context), "drag_data_delete")
 
-  _WRAP_SIGNAL(bool drag_failed(const Glib::RefPtr<Gdk::DragContext>& context, DragResult result), "drag_failed")
+  _WRAP_SIGNAL(bool drag_failed(const Glib::RefPtr<Gdk::DragContext>& context, DragResult result), "drag_failed", no_default_handler)
   
   /**  The drag_leave signal is emitted on the drop site when the cursor leaves the widget.
    * A typical reason to connect to this signal is to undo things done in the drag_motion signal handler, 
@@ -887,12 +887,12 @@ dnl
   
   _WRAP_SIGNAL(void screen_changed(const Glib::RefPtr<Gdk::Screen>& previous_screen), "screen_changed")
 
-  _WRAP_SIGNAL(void composited_changed(), "composited_changed")
+  _WRAP_SIGNAL(void composited_changed(), "composited_changed", no_default_handler)
 
 //TODO: The signal_id is very C-like here:                                                                          
   //_WRAP_SIGNAL(bool can_activate_accel(guint signal_id), "can_activate_accel")
   
-  _WRAP_SIGNAL(bool popup_menu(), "popup_menu") //Note that popup-menu is a keybinding signal, but is really meant to be wrapped.
+  _WRAP_SIGNAL(bool popup_menu(), "popup_menu", no_default_handler) //Note that popup-menu is a keybinding signal, but is really meant to be wrapped.
 
   //Keybinding signals:
   _IGNORE_SIGNAL("show_help")
@@ -901,12 +901,12 @@ dnl
   _IGNORE_SIGNAL("destroy-event")
 
   // Tooltip signal
-  _WRAP_SIGNAL(bool query_tooltip(int x, int y, bool keyboard_tooltip, const Glib::RefPtr<Tooltip>& tooltip), "query_tooltip")
+  _WRAP_SIGNAL(bool query_tooltip(int x, int y, bool keyboard_tooltip, const Glib::RefPtr<Tooltip>& tooltip), "query_tooltip", no_default_handler)
 
   //(This was added to GTK+ 2.8 but forgotten by us until gtkmm 2.13/14):
-  _WRAP_SIGNAL(bool grab_broken_event(GdkEventGrabBroken* event), "grab_broken_event")
+  _WRAP_SIGNAL(bool grab_broken_event(GdkEventGrabBroken* event), "grab_broken_event", no_default_handler)
 
-  _WRAP_SIGNAL(bool damage_event(GdkEventExpose* event), "damage-event")
+  _WRAP_SIGNAL(bool damage_event(GdkEventExpose* event), "damage-event", no_default_handler)
 
   _WRAP_PROPERTY("name", Glib::ustring)
   _WRAP_PROPERTY("parent", Container*)
diff --git a/tools/m4/convert_gdk.m4 b/tools/m4/convert_gdk.m4
index 2c23287..4e6d145 100644
--- a/tools/m4/convert_gdk.m4
+++ b/tools/m4/convert_gdk.m4
@@ -101,6 +101,7 @@ _CONVERSION(`const Glib::RefPtr<Image>&',`GdkImage*',__CONVERT_REFPTR_TO_P)
 _CONVERSION(`const Glib::RefPtr<const Image>&',`GdkImage*',__CONVERT_CONST_REFPTR_TO_P_SUN(Image))
 _CONVERSION(`const Glib::RefPtr<Gdk::Image>&',`GdkImage*',__CONVERT_REFPTR_TO_P)
 _CONVERSION(`const Glib::RefPtr<Pixbuf>&',`GdkPixbuf*',__CONVERT_REFPTR_TO_P)
+_CONVERSION(`const Glib::RefPtr<const Pixbuf>&',`const GdkPixbuf*',__CONVERT_REFPTR_TO_P)
 _CONVERSION(`const Glib::RefPtr<const Pixbuf>&',`GdkPixbuf*',__CONVERT_CONST_REFPTR_TO_P_SUN(Pixbuf))
 _CONVERSION(`const Glib::RefPtr<Gdk::Pixbuf>&',`GdkPixbuf*',__CONVERT_REFPTR_TO_P)
 _CONVERSION(`Glib::RefPtr<Gdk::Pixbuf>',`GdkPixbuf*',__CONVERT_REFPTR_TO_P)



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