[gtkmm] Wrapped new API.



commit 46d2fd3eedc8cbc2a3ec3c387f1ddb9f7188aba2
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Nov 2 10:26:35 2010 +0100

    Wrapped new API.
    
    * gdk/src/gdk_methods.defs: Regenerated with h2defs.py.
    * gdk/src/gdk_extra.defs: Added gtk_drag_set_icon_surface.
    * gdk/src/dragcontext.hg: Add a conversion for Cairo::Surface.
    Remove get_destination_window() because it was removed from GTK+.
    
    * gtk/src/gtk_enums.defs: Regenerated with enums.pl.
    * gtk/src/gtk_methods.defs: Regenerated with h2defs.py.
    * gtk/src/assistant.hg: Added next_page() and previous_page().
    * gtk/src/box.hg: Added a public constructor.
    
    * gtk/src/recentinfo.hg: Added create_app_info().
    * gtk/src/scrollable.hg: Added get/set_h/vscroll_policy() and properties.
    * tools/m4/convert_gtk.m4: Mention ScrollablePolicy.
    * gtk/src/widget.hg: Remove get_snapshot() because it was removed from GTK+.
    Added in_destruction.

 ChangeLog                |   20 ++++++
 gdk/src/dragcontext.hg   |    5 +-
 gdk/src/gdk_extra.defs   |    9 +++
 gdk/src/gdk_methods.defs |   82 ++++++++++++++++++++++
 gdk/src/rgba.hg          |    1 +
 gtk/src/assistant.hg     |    8 ++-
 gtk/src/box.hg           |   18 ++---
 gtk/src/combobox.hg      |    2 +-
 gtk/src/gtk_enums.defs   |  168 ++++++----------------------------------------
 gtk/src/gtk_methods.defs |   68 ++++++++++++++++++-
 gtk/src/label.hg         |   12 ++--
 gtk/src/orientable.hg    |    9 +--
 gtk/src/recentinfo.hg    |    4 +
 gtk/src/scrollable.hg    |   20 ++++--
 gtk/src/viewport.hg      |    2 +-
 gtk/src/widget.hg        |    4 +-
 tools/m4/convert_gtk.m4  |    1 +
 17 files changed, 248 insertions(+), 185 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 1476dc9..bc59694 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2010-11-02  Murray Cumming  <murrayc murrayc com>
+
+	Wrapped new API.
+
+	* gdk/src/gdk_methods.defs: Regenerated with h2defs.py.
+	* gdk/src/gdk_extra.defs: Added gtk_drag_set_icon_surface.
+	* gdk/src/dragcontext.hg: Add a conversion for Cairo::Surface.
+	Remove get_destination_window() because it was removed from GTK+.
+
+	* gtk/src/gtk_enums.defs: Regenerated with enums.pl.
+	* gtk/src/gtk_methods.defs: Regenerated with h2defs.py.
+	* gtk/src/assistant.hg: Added next_page() and previous_page().
+	* gtk/src/box.hg: Added a public constructor.
+
+	* gtk/src/recentinfo.hg: Added create_app_info().
+	* gtk/src/scrollable.hg: Added get/set_h/vscroll_policy() and properties.
+	* tools/m4/convert_gtk.m4: Mention ScrollablePolicy.
+	* gtk/src/widget.hg: Remove get_snapshot() because it was removed from GTK+.
+	Added in_destruction.
+
 2010-11-01  José Alburquerque  <jaalburqu svn gnome org>
 
 	Style: Virtual Functions: Correct reference counting errors.
diff --git a/gdk/src/dragcontext.hg b/gdk/src/dragcontext.hg
index 0c50a07..bc26150 100644
--- a/gdk/src/dragcontext.hg
+++ b/gdk/src/dragcontext.hg
@@ -72,7 +72,10 @@ public:
   //Gtk::Widget* get_source_widget() - see Gtk::Widget::drag_get_source_widget()
 
   // void set_icon(Gtk::Widget* widget, int hot_x, int hot_y) - see Gtk::Widget::set_as_icon().
+
+  #m4 _CONVERSION(`const Cairo::RefPtr<Cairo::Surface>&',`cairo_surface_t*',`($3) ? const_cast<cairo_surface_t*>(($3)->cobj()) : 0')
   _WRAP_METHOD(void set_icon(const Cairo::RefPtr<Cairo::Surface>& surface), gtk_drag_set_icon_surface)
+
   _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
@@ -86,8 +89,6 @@ 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_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)
 
   _WRAP_METHOD(void set_device(const Glib::RefPtr<Device>& device), gdk_drag_context_set_device)
   _WRAP_METHOD(Glib::RefPtr<Device> get_device(), gdk_drag_context_get_device, refreturn)
diff --git a/gdk/src/gdk_extra.defs b/gdk/src/gdk_extra.defs
index d6655a9..3a19d2d 100644
--- a/gdk/src/gdk_extra.defs
+++ b/gdk/src/gdk_extra.defs
@@ -101,3 +101,12 @@
     '("GdkDragContext*" "context")
   )
 )
+
+(define-function gtk_drag_set_icon_surface
+  (c-name "gtk_drag_set_icon_surface")
+  (return-type "none")
+  (parameters
+    '("GdkDragContext*" "context")
+    '("cairo_surface_t*" "surface")
+  )
+)
diff --git a/gdk/src/gdk_methods.defs b/gdk/src/gdk_methods.defs
index 5b34844..5f1fe34 100644
--- a/gdk/src/gdk_methods.defs
+++ b/gdk/src/gdk_methods.defs
@@ -675,6 +675,15 @@
   )
 )
 
+(define-function gdk_cairo_set_source_rgba
+  (c-name "gdk_cairo_set_source_rgba")
+  (return-type "none")
+  (parameters
+    '("cairo_t*" "cr")
+    '("const-GdkRGBA*" "rgba")
+  )
+)
+
 (define-function gdk_cairo_set_source_pixbuf
   (c-name "gdk_cairo_set_source_pixbuf")
   (return-type "none")
@@ -2892,6 +2901,59 @@
 
 
 
+;; From gdkrgba.h
+
+(define-method copy
+  (of-object "GdkRGBA")
+  (c-name "gdk_rgba_copy")
+  (return-type "GdkRGBA*")
+)
+
+(define-method free
+  (of-object "GdkRGBA")
+  (c-name "gdk_rgba_free")
+  (return-type "none")
+)
+
+(define-function gdk_rgba_parse
+  (c-name "gdk_rgba_parse")
+  (return-type "gboolean")
+  (parameters
+    '("const-gchar*" "spec")
+    '("GdkRGBA*" "rgba")
+  )
+)
+
+(define-function gdk_rgba_hash
+  (c-name "gdk_rgba_hash")
+  (return-type "guint")
+  (parameters
+    '("gconstpointer" "p")
+  )
+)
+
+(define-function gdk_rgba_equal
+  (c-name "gdk_rgba_equal")
+  (return-type "gboolean")
+  (parameters
+    '("gconstpointer" "p1")
+    '("gconstpointer" "p2")
+  )
+)
+
+(define-method to_string
+  (of-object "GdkRGBA")
+  (c-name "gdk_rgba_to_string")
+  (return-type "gchar*")
+)
+
+(define-function gdk_rgba_get_type
+  (c-name "gdk_rgba_get_type")
+  (return-type "GType")
+)
+
+
+
 ;; From gdkscreen.h
 
 (define-function gdk_screen_get_type
@@ -4079,6 +4141,15 @@
   )
 )
 
+(define-method set_background_rgba
+  (of-object "GdkWindow")
+  (c-name "gdk_window_set_background_rgba")
+  (return-type "none")
+  (parameters
+    '("GdkRGBA*" "rgba")
+  )
+)
+
 (define-method set_background_pattern
   (of-object "GdkWindow")
   (c-name "gdk_window_set_background_pattern")
@@ -4846,6 +4917,15 @@
   )
 )
 
+(define-function gdk_x11_display_set_startup_notification_id
+  (c-name "gdk_x11_display_set_startup_notification_id")
+  (return-type "none")
+  (parameters
+    '("GdkDisplay*" "display")
+    '("const-gchar*" "startup_id")
+  )
+)
+
 (define-function gdk_x11_display_set_cursor_theme
   (c-name "gdk_x11_display_set_cursor_theme")
   (return-type "none")
@@ -5027,3 +5107,5 @@
     '("gint" "n_events")
   )
 )
+
+
diff --git a/gdk/src/rgba.hg b/gdk/src/rgba.hg
index de0b9bc..5aa0120 100644
--- a/gdk/src/rgba.hg
+++ b/gdk/src/rgba.hg
@@ -27,6 +27,7 @@ namespace Gdk
 class RGBA
 {
   _CLASS_BOXEDTYPE(RGBA, GdkRGBA, NONE, gdk_rgba_copy, gdk_rgba_free)
+  _IGNORE(gdk_rgba_copy, gdk_rgba_free)
 public:
 
   _CUSTOM_DEFAULT_CTOR
diff --git a/gtk/src/assistant.hg b/gtk/src/assistant.hg
index 8aa5387..09818a7 100644
--- a/gtk/src/assistant.hg
+++ b/gtk/src/assistant.hg
@@ -32,7 +32,7 @@ _WRAP_ENUM(AssistantPageType, GtkAssistantPageType)
 
 /** A widget used to guide users through multi-step operations.
  *
- * A Gtk::Assistant is a widget used to represent a generally complex 
+ * A Gtk::Assistant is a widget used to represent a generally complex
  * operation split into several steps, guiding the user through its
  * pages and controlling the page flow to collect the necessary data.
  *
@@ -46,6 +46,9 @@ class Assistant : public Window
 public:
   _CTOR_DEFAULT()
 
+  _WRAP_METHOD(void next_page(), gtk_assistant_next_page)
+  _WRAP_METHOD(void previous_page(), gtk_assistant_previous_page)
+
   _WRAP_METHOD(int get_current_page() const, gtk_assistant_get_current_page)
   _WRAP_METHOD(void set_current_page(int page_num), gtk_assistant_set_current_page)
   _WRAP_METHOD(int get_n_pages() const, gtk_assistant_get_n_pages)
@@ -54,7 +57,7 @@ public:
   _WRAP_METHOD(int prepend_page(Widget& page), gtk_assistant_prepend_page)
   _WRAP_METHOD(int append_page(Widget& page), gtk_assistant_append_page)
   _WRAP_METHOD(int insert_page(Widget& page, int position), gtk_assistant_insert_page)
-  
+
   typedef sigc::slot<int, int /* current_page */> SlotForwardPage;
 
   void set_forward_page_func(const SlotForwardPage& slot);
@@ -87,4 +90,3 @@ public:
 };
 
 } // namespace Gtk
-
diff --git a/gtk/src/box.hg b/gtk/src/box.hg
index cb82c21..5302399 100644
--- a/gtk/src/box.hg
+++ b/gtk/src/box.hg
@@ -84,9 +84,11 @@ class Box
   _IGNORE(gtk_box_pack_end_defaults, gtk_box_set_child_packing, gtk_box_pack_start_defaults, gtk_box_query_child_packing)
 public:
 
-protected:
-  _CTOR_DEFAULT
-public:
+  /** Creates a new horizontal box.
+   * @param orientation The box's orientation.
+   * @param spacing Determines the space in pixels between child widgets.
+   */
+  _WRAP_CTOR(Box(Orientation orientation = ORIENTATION_HORIZONTAL, int spacing = 0), gtk_box_new)
 
   _WRAP_METHOD(void pack_start(Widget& child, bool expand, bool fill, guint padding = 0), gtk_box_pack_start)
 
@@ -118,7 +120,7 @@ public:
   _WRAP_PROPERTY("homogeneous", bool)
 };
 
-
+//TODO: Remove HBox and VBox now that Box can be instantiated?
 /** Vertical Box for laying widgets in a vertical row.
  *
  * You should create these objects, but it is more confortable to pass
@@ -134,10 +136,8 @@ class VBox : public Box
   _CLASS_GTKOBJECT(VBox,GtkVBox,GTK_VBOX,Gtk::Box,GtkBox)
 public:
 
+  //TODO: Remove the homogoenous parameter as it was removed in gtk_box_new().
   /** Creates a new vertical box.
-   * @param homogeneous Whether each widget in the VBox should have the same
-   * height.  If set, a PACK_SHRINK argument to pack_start() or pack_end() is
-   * ignored.
    * @param spacing Determines the space in pixels between child widgets.
    */
   _WRAP_CTOR(VBox(bool homogeneous = false, int spacing = 0), gtk_vbox_new)
@@ -164,10 +164,8 @@ class HBox : public Box
   _CLASS_GTKOBJECT(HBox,GtkHBox,GTK_HBOX,Gtk::Box,GtkBox)
 public:
 
+  //TODO: Remove the homogoenous parameter as it was removed in gtk_box_new().
   /** Creates a new horizontal box.
-   * @param homogeneous Whether each widget in the HBox should have the same
-   * width.  If set, a PACK_SHRINK argument to pack_start() or pack_end() is
-   * ignored.
    * @param spacing Determines the space in pixels between child widgets.
    */
   _WRAP_CTOR(HBox(bool homogeneous = false, int spacing = 0), gtk_hbox_new)
diff --git a/gtk/src/combobox.hg b/gtk/src/combobox.hg
index 0d1cc97..51c6870 100644
--- a/gtk/src/combobox.hg
+++ b/gtk/src/combobox.hg
@@ -75,7 +75,7 @@ public:
    * @param has_entry If this is true then this will have an Entry widget.
    */
   explicit ComboBox(const Glib::RefPtr<TreeModel>& model, bool has_entry = false);
-  _IGNORE(gtk_combo_box_new_with_model)
+  _IGNORE(gtk_combo_box_new_with_model, gtk_combo_box_new_with_model_and_entry)
 
   _IGNORE(gtk_combo_box_new, gtk_combo_box_new_text) //See ComboBoxText for an equivalent of gtk_combo_box_new_text().
 
diff --git a/gtk/src/gtk_enums.defs b/gtk/src/gtk_enums.defs
index 53616ac..fe5fbd2 100644
--- a/gtk/src/gtk_enums.defs
+++ b/gtk/src/gtk_enums.defs
@@ -62,7 +62,8 @@
 ;;   GTK_ASSISTANT_PAGE_INTRO,
 ;;   GTK_ASSISTANT_PAGE_CONFIRM,
 ;;   GTK_ASSISTANT_PAGE_SUMMARY,
-;;   GTK_ASSISTANT_PAGE_PROGRESS
+;;   GTK_ASSISTANT_PAGE_PROGRESS,
+;;   GTK_ASSISTANT_PAGE_CUSTOM
 ;; } GtkAssistantPageType;
 
 (define-enum-extended AssistantPageType
@@ -74,6 +75,7 @@
     '("confirm" "GTK_ASSISTANT_PAGE_CONFIRM" "2")
     '("summary" "GTK_ASSISTANT_PAGE_SUMMARY" "3")
     '("progress" "GTK_ASSISTANT_PAGE_PROGRESS" "4")
+    '("custom" "GTK_ASSISTANT_PAGE_CUSTOM" "5")
   )
 )
 
@@ -1380,54 +1382,18 @@
 )
 
 ;; Original typedef:
-;; typedef enum {
-;;   GTK_WRAP_ALLOCATE_FREE = 0,
-;;   GTK_WRAP_ALLOCATE_ALIGNED,
-;;   GTK_WRAP_ALLOCATE_HOMOGENEOUS
-;; } GtkWrapAllocationMode;
-
-(define-enum-extended WrapAllocationMode
-  (in-module "Gtk")
-  (c-name "GtkWrapAllocationMode")
-  (values
-    '("free" "GTK_WRAP_ALLOCATE_FREE" "0")
-    '("aligned" "GTK_WRAP_ALLOCATE_ALIGNED" "1")
-    '("homogeneous" "GTK_WRAP_ALLOCATE_HOMOGENEOUS" "2")
-  )
-)
-
-;; Original typedef:
-;; typedef enum {
-;;   GTK_WRAP_BOX_SPREAD_START = 0,
-;;   GTK_WRAP_BOX_SPREAD_END,
-;;   GTK_WRAP_BOX_SPREAD_EVEN,
-;;   GTK_WRAP_BOX_SPREAD_EXPAND
-;; } GtkWrapBoxSpreading;
-
-(define-enum-extended WrapBoxSpreading
-  (in-module "Gtk")
-  (c-name "GtkWrapBoxSpreading")
-  (values
-    '("start" "GTK_WRAP_BOX_SPREAD_START" "0")
-    '("end" "GTK_WRAP_BOX_SPREAD_END" "1")
-    '("even" "GTK_WRAP_BOX_SPREAD_EVEN" "2")
-    '("expand" "GTK_WRAP_BOX_SPREAD_EXPAND" "3")
-  )
-)
-
-;; Original typedef:
 ;; typedef enum
 ;; {
-;;   GTK_WRAP_BOX_H_EXPAND = 1 << 0,
-;;   GTK_WRAP_BOX_V_EXPAND = 1 << 1
-;; } GtkWrapBoxPacking;
+;;   GTK_SCROLL_MINIMUM = 0,
+;;   GTK_SCROLL_NATURAL
+;; } GtkScrollablePolicy;
 
-(define-flags-extended WrapBoxPacking
+(define-enum-extended ScrollablePolicy
   (in-module "Gtk")
-  (c-name "GtkWrapBoxPacking")
+  (c-name "GtkScrollablePolicy")
   (values
-    '("h-expand" "GTK_WRAP_BOX_H_EXPAND" "1 << 0")
-    '("v-expand" "GTK_WRAP_BOX_V_EXPAND" "1 << 1")
+    '("minimum" "GTK_SCROLL_MINIMUM" "0")
+    '("natural" "GTK_SCROLL_NATURAL" "1")
   )
 )
 
@@ -1582,7 +1548,6 @@
 ;; typedef enum
 ;; {
 ;;   GTK_IMAGE_EMPTY,
-;;   GTK_IMAGE_PIXMAP,
 ;;   GTK_IMAGE_PIXBUF,
 ;;   GTK_IMAGE_STOCK,
 ;;   GTK_IMAGE_ICON_SET,
@@ -1596,13 +1561,12 @@
   (c-name "GtkImageType")
   (values
     '("empty" "GTK_IMAGE_EMPTY" "0")
-    '("pixmap" "GTK_IMAGE_PIXMAP" "1")
-    '("pixbuf" "GTK_IMAGE_PIXBUF" "2")
-    '("stock" "GTK_IMAGE_STOCK" "3")
-    '("icon-set" "GTK_IMAGE_ICON_SET" "4")
-    '("animation" "GTK_IMAGE_ANIMATION" "5")
-    '("icon-name" "GTK_IMAGE_ICON_NAME" "6")
-    '("gicon" "GTK_IMAGE_GICON" "7")
+    '("pixbuf" "GTK_IMAGE_PIXBUF" "1")
+    '("stock" "GTK_IMAGE_STOCK" "2")
+    '("icon-set" "GTK_IMAGE_ICON_SET" "3")
+    '("animation" "GTK_IMAGE_ANIMATION" "4")
+    '("icon-name" "GTK_IMAGE_ICON_NAME" "5")
+    '("gicon" "GTK_IMAGE_GICON" "6")
   )
 )
 
@@ -1759,48 +1723,6 @@
   )
 )
 
-;; From gtkprivate.h
-
-;; Original typedef:
-;; typedef enum
-;; {
-;;   PRIVATE_GTK_USER_STYLE            = 1 <<  0,
-;;   PRIVATE_GTK_RESIZE_PENDING        = 1 <<  2,
-;;   PRIVATE_GTK_HAS_POINTER           = 1 <<  3,   /* If the pointer is above a window belonging to the widget */
-;;   PRIVATE_GTK_SHADOWED		    = 1 <<  4,   /* If there is a grab in effect shadowing the widget */
-;;   PRIVATE_GTK_HAS_SHAPE_MASK	    = 1 <<  5,
-;;   PRIVATE_GTK_IN_REPARENT           = 1 <<  6,
-;;   PRIVATE_GTK_DIRECTION_SET         = 1 <<  7,   /* If the reading direction is not DIR_NONE */
-;;   PRIVATE_GTK_DIRECTION_LTR         = 1 <<  8,   /* If the reading direction is DIR_LTR */
-;;   PRIVATE_GTK_ANCHORED              = 1 <<  9,   /* If widget has a GtkWindow ancestor */
-;;   PRIVATE_GTK_CHILD_VISIBLE         = 1 <<  10,  /* If widget should be mapped when parent is mapped */
-;;   PRIVATE_GTK_REDRAW_ON_ALLOC       = 1 <<  11,  /* If we should queue a draw on the entire widget when it is reallocated */
-;;   PRIVATE_GTK_ALLOC_NEEDED          = 1 <<  12,  /* If we we should allocate even if the allocation is the same */
-;;   PRIVATE_GTK_WIDTH_REQUEST_NEEDED  = 1 <<  13,  /* Whether we need to call gtk_extended_layout_get_desired_width */
-;;   PRIVATE_GTK_HEIGHT_REQUEST_NEEDED = 1 <<  14   /* Whether we need to call gtk_extended_layout_get_desired_height */
-;; } GtkPrivateFlags;
-
-(define-flags-extended PrivateFlags
-  (in-module "Gtk")
-  (c-name "GtkPrivateFlags")
-  (values
-    '("user-style" "PRIVATE_GTK_USER_STYLE" "1 << 0")
-    '("resize-pending" "PRIVATE_GTK_RESIZE_PENDING" "1 << 2")
-    '("has-pointer" "PRIVATE_GTK_HAS_POINTER" "1 << 3")
-    '("shadowed" "PRIVATE_GTK_SHADOWED" "1 << 4")
-    '("has-shape-mask" "PRIVATE_GTK_HAS_SHAPE_MASK" "1 << 5")
-    '("in-reparent" "PRIVATE_GTK_IN_REPARENT" "1 << 6")
-    '("direction-set" "PRIVATE_GTK_DIRECTION_SET" "1 << 7")
-    '("direction-ltr" "PRIVATE_GTK_DIRECTION_LTR" "1 << 8")
-    '("anchored" "PRIVATE_GTK_ANCHORED" "1 << 9")
-    '("child-visible" "PRIVATE_GTK_CHILD_VISIBLE" "1 << 10")
-    '("redraw-on-alloc" "PRIVATE_GTK_REDRAW_ON_ALLOC" "1 << 11")
-    '("alloc-needed" "PRIVATE_GTK_ALLOC_NEEDED" "1 << 12")
-    '("width-request-needed" "PRIVATE_GTK_WIDTH_REQUEST_NEEDED" "1 << 13")
-    '("height-request-needed" "PRIVATE_GTK_HEIGHT_REQUEST_NEEDED" "1 << 14")
-  )
-)
-
 ;; From gtkrc.h
 
 ;; Original typedef:
@@ -2094,9 +2016,10 @@
 
 ;; Original typedef:
 ;; typedef enum {
-;;   GTK_TEXT_SEARCH_VISIBLE_ONLY = 1 << 0,
-;;   GTK_TEXT_SEARCH_TEXT_ONLY    = 1 << 1
-;;   /* Possible future plans: SEARCH_CASE_INSENSITIVE, SEARCH_REGEXP */
+;;   GTK_TEXT_SEARCH_VISIBLE_ONLY     = 1 << 0,
+;;   GTK_TEXT_SEARCH_TEXT_ONLY        = 1 << 1,
+;;   GTK_TEXT_SEARCH_CASE_INSENSITIVE = 1 << 2
+;;   /* Possible future plans: SEARCH_REGEXP */
 ;; } GtkTextSearchFlags;
 
 (define-flags-extended TextSearchFlags
@@ -2105,6 +2028,7 @@
   (values
     '("visible-only" "GTK_TEXT_SEARCH_VISIBLE_ONLY" "1 << 0")
     '("text-only" "GTK_TEXT_SEARCH_TEXT_ONLY" "1 << 1")
+    '("case-insensitive" "GTK_TEXT_SEARCH_CASE_INSENSITIVE" "1 << 2")
   )
 )
 
@@ -2277,56 +2201,6 @@
 ;; Original typedef:
 ;; typedef enum
 ;; {
-;;   GTK_TOPLEVEL         = 1 << 4,
-;;   GTK_NO_WINDOW        = 1 << 5,
-;;   GTK_REALIZED         = 1 << 6,
-;;   GTK_MAPPED           = 1 << 7,
-;;   GTK_VISIBLE          = 1 << 8,
-;;   GTK_SENSITIVE        = 1 << 9,
-;;   GTK_PARENT_SENSITIVE = 1 << 10,
-;;   GTK_CAN_FOCUS        = 1 << 11,
-;;   GTK_HAS_FOCUS        = 1 << 12,
-;;   GTK_CAN_DEFAULT      = 1 << 13,
-;;   GTK_HAS_DEFAULT      = 1 << 14,
-;;   GTK_HAS_GRAB	       = 1 << 15,
-;;   GTK_RC_STYLE	       = 1 << 16,
-;;   GTK_COMPOSITE_CHILD  = 1 << 17,
-;;   GTK_APP_PAINTABLE    = 1 << 18,
-;;   GTK_RECEIVES_DEFAULT = 1 << 19,
-;;   GTK_DOUBLE_BUFFERED  = 1 << 20,
-;;   GTK_NO_SHOW_ALL      = 1 << 21,
-;;   GTK_MULTIDEVICE      = 1 << 22
-;; } GtkWidgetFlags;
-
-(define-flags-extended WidgetFlags
-  (in-module "Gtk")
-  (c-name "GtkWidgetFlags")
-  (values
-    '("toplevel" "GTK_TOPLEVEL" "1 << 4")
-    '("no-window" "GTK_NO_WINDOW" "1 << 5")
-    '("realized" "GTK_REALIZED" "1 << 6")
-    '("mapped" "GTK_MAPPED" "1 << 7")
-    '("visible" "GTK_VISIBLE" "1 << 8")
-    '("sensitive" "GTK_SENSITIVE" "1 << 9")
-    '("parent-sensitive" "GTK_PARENT_SENSITIVE" "1 << 10")
-    '("can-focus" "GTK_CAN_FOCUS" "1 << 11")
-    '("has-focus" "GTK_HAS_FOCUS" "1 << 12")
-    '("can-default" "GTK_CAN_DEFAULT" "1 << 13")
-    '("has-default" "GTK_HAS_DEFAULT" "1 << 14")
-    '("has-grab" "GTK_HAS_GRAB" "1 << 15")
-    '("rc-style" "GTK_RC_STYLE" "1 << 16")
-    '("composite-child" "GTK_COMPOSITE_CHILD" "1 << 17")
-    '("app-paintable" "GTK_APP_PAINTABLE" "1 << 18")
-    '("receives-default" "GTK_RECEIVES_DEFAULT" "1 << 19")
-    '("double-buffered" "GTK_DOUBLE_BUFFERED" "1 << 20")
-    '("no-show-all" "GTK_NO_SHOW_ALL" "1 << 21")
-    '("multidevice" "GTK_MULTIDEVICE" "1 << 22")
-  )
-)
-
-;; Original typedef:
-;; typedef enum
-;; {
 ;;   GTK_WIDGET_HELP_TOOLTIP,
 ;;   GTK_WIDGET_HELP_WHATS_THIS
 ;; } GtkWidgetHelpType;
diff --git a/gtk/src/gtk_methods.defs b/gtk/src/gtk_methods.defs
index 09853cb..779278d 100644
--- a/gtk/src/gtk_methods.defs
+++ b/gtk/src/gtk_methods.defs
@@ -1245,6 +1245,7 @@
     '("confirm" "GTK_ASSISTANT_PAGE_CONFIRM")
     '("summary" "GTK_ASSISTANT_PAGE_SUMMARY")
     '("progress" "GTK_ASSISTANT_PAGE_PROGRESS")
+    '("custom" "GTK_ASSISTANT_PAGE_CUSTOM")
   )
 )
 
@@ -2003,6 +2004,16 @@
   )
 )
 
+(define-enum ScrollablePolicy
+  (in-module "Gtk")
+  (c-name "GtkScrollablePolicy")
+  (gtype-id "GTK_TYPE_SCROLLABLE_POLICY")
+  (values
+    '("minimum" "GTK_SCROLL_MINIMUM")
+    '("natural" "GTK_SCROLL_NATURAL")
+  )
+)
+
 (define-enum FileChooserAction
   (in-module "Gtk")
   (c-name "GtkFileChooserAction")
@@ -2356,6 +2367,7 @@
   (values
     '("visible-only" "GTK_TEXT_SEARCH_VISIBLE_ONLY")
     '("text-only" "GTK_TEXT_SEARCH_TEXT_ONLY")
+    '("case-insensitive" "GTK_TEXT_SEARCH_CASE_INSENSITIVE")
   )
 )
 
@@ -4021,6 +4033,18 @@
   (return-type "GtkWidget*")
 )
 
+(define-method next_page
+  (of-object "GtkAssistant")
+  (c-name "gtk_assistant_next_page")
+  (return-type "none")
+)
+
+(define-method previous_page
+  (of-object "GtkAssistant")
+  (c-name "gtk_assistant_previous_page")
+  (return-type "none")
+)
+
 (define-method get_current_page
   (of-object "GtkAssistant")
   (c-name "gtk_assistant_get_current_page")
@@ -4412,7 +4436,6 @@
   (return-type "GtkWidget*")
   (parameters
     '("GtkOrientation" "orientation")
-    '("gboolean" "homogeneous")
     '("gint" "spacing")
   )
 )
@@ -6566,6 +6589,14 @@
   )
 )
 
+(define-function gtk_combo_box_new_with_model_and_entry
+  (c-name "gtk_combo_box_new_with_model_and_entry")
+  (return-type "GtkWidget*")
+  (parameters
+    '("GtkTreeModel*" "model")
+  )
+)
+
 (define-method get_wrap_width
   (of-object "GtkComboBox")
   (c-name "gtk_combo_box_get_wrap_width")
@@ -17740,6 +17771,36 @@
   )
 )
 
+(define-method get_hscroll_policy
+  (of-object "GtkScrollable")
+  (c-name "gtk_scrollable_get_hscroll_policy")
+  (return-type "GtkScrollablePolicy")
+)
+
+(define-method set_hscroll_policy
+  (of-object "GtkScrollable")
+  (c-name "gtk_scrollable_set_hscroll_policy")
+  (return-type "none")
+  (parameters
+    '("GtkScrollablePolicy" "policy")
+  )
+)
+
+(define-method get_vscroll_policy
+  (of-object "GtkScrollable")
+  (c-name "gtk_scrollable_get_vscroll_policy")
+  (return-type "GtkScrollablePolicy")
+)
+
+(define-method set_vscroll_policy
+  (of-object "GtkScrollable")
+  (c-name "gtk_scrollable_set_vscroll_policy")
+  (return-type "none")
+  (parameters
+    '("GtkScrollablePolicy" "policy")
+  )
+)
+
 
 
 ;; From gtkscrollbar.h
@@ -26782,6 +26843,11 @@
   (return-type "GType")
 )
 
+(define-function gtk_scrollable_policy_get_type
+  (c-name "gtk_scrollable_policy_get_type")
+  (return-type "GType")
+)
+
 (define-function gtk_file_chooser_action_get_type
   (c-name "gtk_file_chooser_action_get_type")
   (return-type "GType")
diff --git a/gtk/src/label.hg b/gtk/src/label.hg
index bcde08d..73c2c99 100644
--- a/gtk/src/label.hg
+++ b/gtk/src/label.hg
@@ -83,6 +83,7 @@ public:
   _WRAP_METHOD(void set_attributes(Pango::AttrList& attrs), gtk_label_set_attributes)
   _WRAP_METHOD(Pango::AttrList get_attributes() const, gtk_label_get_attributes)
 
+  //TODO: Remove set_label() or set_text()?
   _WRAP_METHOD(void set_label(const Glib::ustring& str), gtk_label_set_label)
   _WRAP_METHOD(Glib::ustring get_label() const, gtk_label_get_label)
   _WRAP_METHOD(void set_markup(const Glib::ustring& str), gtk_label_set_markup)
@@ -128,16 +129,16 @@ public:
    * @param start_offset Start offset (in characters not bytes)
    */
   void select_region(int start_offset);
-  
+
   _WRAP_METHOD(bool get_selection_bounds(int& start, int& end) const, gtk_label_get_selection_bounds)
 
   _WRAP_METHOD(Glib::RefPtr<Pango::Layout> get_layout(), gtk_label_get_layout, refreturn)
   _WRAP_METHOD(Glib::RefPtr<const Pango::Layout> get_layout() const, gtk_label_get_layout, refreturn, constversion)
   _WRAP_METHOD(void get_layout_offsets(int& x, int& y) const, gtk_label_get_layout_offsets)
-  
+
   _WRAP_METHOD(void set_single_line_mode(bool single_line_mode = true), gtk_label_set_single_line_mode)
   _WRAP_METHOD(bool get_single_line_mode() const, gtk_label_get_single_line_mode)
-  
+
   _WRAP_METHOD(Glib::ustring get_current_uri() const, gtk_label_get_current_uri)
 
   _WRAP_METHOD(void set_track_visited_links(bool track_links = true), gtk_label_set_track_visited_links)
@@ -152,7 +153,7 @@ public:
   _IGNORE_SIGNAL("move_cursor")
   _IGNORE_SIGNAL("copy_clipboard")
   _IGNORE_SIGNAL("activate-current-link")
-  
+
   _WRAP_PROPERTY("label", Glib::ustring)
   _WRAP_PROPERTY("attributes", Pango::AttrList)
   _WRAP_PROPERTY("use-markup", bool)
@@ -167,7 +168,7 @@ public:
   _WRAP_PROPERTY("cursor-position", int)
   _WRAP_PROPERTY("selection-bound", int)
   _WRAP_PROPERTY("ellipsize", Pango::EllipsizeMode)
-  _WRAP_PROPERTY("width-chars", int)    
+  _WRAP_PROPERTY("width-chars", int)
   _WRAP_PROPERTY("single-line-mode", bool)
   _WRAP_PROPERTY("angle", double)
   _WRAP_PROPERTY("max_width_chars", int)
@@ -175,4 +176,3 @@ public:
 };
 
 }  // namespace Gtk
-
diff --git a/gtk/src/orientable.hg b/gtk/src/orientable.hg
index 1368c1e..000caa2 100644
--- a/gtk/src/orientable.hg
+++ b/gtk/src/orientable.hg
@@ -27,10 +27,10 @@ _PINCLUDE(glibmm/private/interface_p.h)
 namespace Gtk
 {
 
-/** This interface is implemented by all widgets that can be oriented 
- * horizontally or vertically. Historically, such widgets have been realized as 
- * subclasses of a common base class (e.g GtkBox/GtkHBox/GtkVBox and 
- * GtkScale/GtkHScale/GtkVScale). GtkOrientable is more flexible in that it 
+/** This interface is implemented by all widgets that can be oriented
+ * horizontally or vertically. Historically, such widgets have been realized as
+ * subclasses of a common base class (e.g GtkBox/GtkHBox/GtkVBox and
+ * GtkScale/GtkHScale/GtkVScale). GtkOrientable is more flexible in that it
  * allows the orientation to be changed at runtime, allowing the widgets to 'flip'.
  *
  * @newin{2,16}
@@ -47,4 +47,3 @@ public:
 };
 
 } // namespace Gtk
-
diff --git a/gtk/src/recentinfo.hg b/gtk/src/recentinfo.hg
index df1ee58..e86ba3e 100644
--- a/gtk/src/recentinfo.hg
+++ b/gtk/src/recentinfo.hg
@@ -17,6 +17,7 @@
 
 #include <gdkmm/pixbuf.h>
 #include <giomm/icon.h>
+#include <giomm/appinfo.h>
 #include <ctime>
 
 _DEFS(gtkmm,gtk)
@@ -65,6 +66,9 @@ public:
 
   _WRAP_METHOD(bool get_private_hint() const, gtk_recent_info_get_private_hint)
 
+  #m4 _CONVERSION(`GAppInfo*',`Glib::RefPtr<Gio::AppInfo>',`Glib::wrap($3)')
+  _WRAP_METHOD(Glib::RefPtr<Gio::AppInfo> create_app_info(const Glib::ustring& app_name), gtk_recent_info_create_app_info, errthrow)
+
   _WRAP_METHOD_DOCS_ONLY(gtk_recent_info_get_application_info)
   bool get_application_info(const Glib::ustring& app_name, std::string& app_exec,
                             guint& count, time_t& time_) const;
diff --git a/gtk/src/scrollable.hg b/gtk/src/scrollable.hg
index 5b3fd6d..675f9d2 100644
--- a/gtk/src/scrollable.hg
+++ b/gtk/src/scrollable.hg
@@ -18,7 +18,7 @@
 #include <gtkmm/adjustment.h>
 #include <glibmm/interface.h>
 #include <gtkmm/enums.h>
-#include <gtk/gtk.h> //TODO: Hide this?
+#include <gtk/gtk.h>
 _DEFS(gtkmm,gtk)
 _PINCLUDE(glibmm/private/interface_p.h)
 
@@ -26,11 +26,10 @@ _PINCLUDE(glibmm/private/interface_p.h)
 namespace Gtk
 {
 
-/** This interface is implemented by all widgets that can be oriented
- * horizontally or vertically. Historically, such widgets have been realized as
- * subclasses of a common base class (e.g GtkBox/GtkHBox/GtkVBox and
- * GtkScale/GtkHScale/GtkVScale). GtkScrollable is more flexible in that it
- * allows the orientation to be changed at runtime, allowing the widgets to 'flip'.
+_WRAP_ENUM(ScrollablePolicy, GtkScrollablePolicy)
+
+/** This interface is implemented by widgets with native
+ * scrolling ability.
  *
  * @newin{3,0}
  */
@@ -59,9 +58,16 @@ public:
    */
   void unset_vadjustment();
 
-  //TODO: Properties and signals.
+  _WRAP_METHOD(ScrollablePolicy get_hscroll_policy() const, gtk_scrollable_get_hscroll_policy)
+  _WRAP_METHOD(void set_hscroll_policy(ScrollablePolicy policy), gtk_scrollable_set_hscroll_policy)
+  _WRAP_METHOD(ScrollablePolicy get_vscroll_policy() const, gtk_scrollable_get_vscroll_policy)
+  _WRAP_METHOD(void set_vscroll_policy(ScrollablePolicy policy), gtk_scrollable_set_vscroll_policy)
+
+
   _WRAP_PROPERTY("hadjustment", Glib::RefPtr<Adjustment>)
   _WRAP_PROPERTY("vadjustment", Glib::RefPtr<Adjustment>)
+  _WRAP_PROPERTY("hscroll-policy", ScrollablePolicy)
+  _WRAP_PROPERTY("vscroll-policy", ScrollablePolicy)
 };
 
 } // namespace Gtk
diff --git a/gtk/src/viewport.hg b/gtk/src/viewport.hg
index 0664b5f..947552c 100644
--- a/gtk/src/viewport.hg
+++ b/gtk/src/viewport.hg
@@ -45,7 +45,7 @@ public:
 
 
   _IGNORE(gtk_viewport_get_hadjustment, gtk_viewport_get_vadjustment,
-    gtk_viewport_set_hadjustment, set_vadjustment) //deprecated
+    gtk_viewport_set_hadjustment, gtk_viewport_set_vadjustment) //deprecated
 
   _WRAP_METHOD(void set_shadow_type(ShadowType type),
                gtk_viewport_set_shadow_type)
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index a33ed73..0a75e99 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -318,8 +318,6 @@ public:
   _WRAP_METHOD(void queue_compute_expand(), gtk_widget_queue_compute_expand)
   _WRAP_METHOD(bool compute_expand(Orientation orientation), gtk_widget_compute_expand)
 
-  _WRAP_METHOD(Glib::RefPtr<Gdk::Pixmap> get_snapshot(Gdk::Rectangle& clip_rect) const, gtk_widget_get_snapshot)
-
   _WRAP_METHOD(bool get_support_multidevice() const, gtk_widget_get_support_multidevice)
   _WRAP_METHOD(void set_support_multidevice(bool support_multidevice = true), gtk_widget_set_support_multidevice)
 
@@ -602,6 +600,8 @@ public:
   Requisition get_requisition() const;
   _IGNORE(gtk_widget_get_requisition)
 
+  _WRAP_METHOD(bool in_destruction() const, gtk_widget_in_destruction)
+
 
   _WRAP_SIGNAL(void show(),"show")
   _WRAP_SIGNAL(void hide(),"hide")
diff --git a/tools/m4/convert_gtk.m4 b/tools/m4/convert_gtk.m4
index 633df2e..5179cbd 100644
--- a/tools/m4/convert_gtk.m4
+++ b/tools/m4/convert_gtk.m4
@@ -152,6 +152,7 @@ _CONV_ENUM(Gtk,WrapAllocationMode)
 _CONV_ENUM(Gtk,WrapBoxPacking)
 _CONV_ENUM(Gtk,WrapBoxSpreading)
 _CONV_ENUM(Gtk,SizeRequestMode)
+_CONV_ENUM(Gtk,ScrollablePolicy)
 
 _CONVERSION(`GtkIconSize',`IconSize',`IconSize(static_cast<int>($3))')
 _CONVERSION(`GtkIconSize',`Gtk::IconSize',`Gtk::IconSize(static_cast<int>($3))')



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