[gtkmm] Wrap GtkFlowBox



commit 90b428ce053df4cab411c9417912e32e02857e3f
Author: Juan R. GarcĂ­a Blanco <juanrgar gmail com>
Date:   Sat Feb 8 13:23:16 2014 +0100

    Wrap GtkFlowBox

 gtk/gtkmm.h                               |    2 +
 gtk/src/filelist.am                       |    2 +
 gtk/src/flowbox.ccg                       |  125 ++++++++++++++
 gtk/src/flowbox.hg                        |  232 ++++++++++++++++++++++++++
 gtk/src/flowboxchild.ccg                  |   21 +++
 gtk/src/flowboxchild.hg                   |   49 ++++++
 gtk/src/gtk_signals.defs                  |  251 ++++++++++++++++++++++++++---
 tools/extra_defs_gen/generate_defs_gtk.cc |    2 +
 tools/m4/convert_gtk.m4                   |    6 +
 9 files changed, 669 insertions(+), 21 deletions(-)
---
diff --git a/gtk/gtkmm.h b/gtk/gtkmm.h
index 5081fa8..6b662dd 100644
--- a/gtk/gtkmm.h
+++ b/gtk/gtkmm.h
@@ -155,6 +155,8 @@ extern const int gtkmm_micro_version;
 #include <gtkmm/filechooserwidget.h>
 #include <gtkmm/filefilter.h>
 #include <gtkmm/fixed.h>
+#include <gtkmm/flowbox.h>
+#include <gtkmm/flowboxchild.h>
 #include <gtkmm/fontbutton.h>
 #include <gtkmm/fontchooser.h>
 #include <gtkmm/fontchooserdialog.h>
diff --git a/gtk/src/filelist.am b/gtk/src/filelist.am
index 0d60c2c..cd5de02 100644
--- a/gtk/src/filelist.am
+++ b/gtk/src/filelist.am
@@ -79,6 +79,8 @@ gtkmm_files_any_hg =          \
        filechooserwidget.hg    \
        filefilter.hg           \
        fixed.hg                \
+       flowbox.hg              \
+       flowboxchild.hg         \
        fontbutton.hg           \
        fontchooser.hg          \
        fontchooserdialog.hg    \
diff --git a/gtk/src/flowbox.ccg b/gtk/src/flowbox.ccg
new file mode 100644
index 0000000..06301fb
--- /dev/null
+++ b/gtk/src/flowbox.ccg
@@ -0,0 +1,125 @@
+/* Copyright (C) 2014 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gtk/gtk.h>
+#include <gtkmm/adjustment.h>
+
+namespace
+{
+
+static void FuncProxy_Foreach_gtk_callback(GtkFlowBox* box, GtkFlowBoxChild* child, void* data)
+{
+  Gtk::FlowBox::SlotSelectedForeach* the_slot = static_cast<Gtk::FlowBox::SlotSelectedForeach*>(data);
+
+  try
+  {
+    (*the_slot)(Glib::wrap(box), Glib::wrap(child));
+  }
+  catch(...)
+  {
+    Glib::exception_handlers_invoke();
+  }
+}
+
+static gboolean SignalProxy_Filter_gtk_callback(GtkFlowBoxChild* child, void* data)
+{
+  Gtk::FlowBox::SlotFilter* the_slot = static_cast<Gtk::FlowBox::SlotFilter*>(data);
+
+  try
+  {
+    return (*the_slot)(Glib::wrap(child));
+  }
+  catch(...)
+  {
+    Glib::exception_handlers_invoke();
+    return FALSE;
+  }
+}
+
+static void SignalProxy_Filter_gtk_callback_destroy(void* data)
+{
+  delete static_cast<Gtk::FlowBox::SlotFilter*>(data);
+}
+
+static gint SignalProxy_Sort_gtk_callback(GtkFlowBoxChild* child1, GtkFlowBoxChild* child2, void* data)
+{
+  Gtk::FlowBox::SlotSort* the_slot = static_cast<Gtk::FlowBox::SlotSort*>(data);
+
+  try
+  {
+    return (*the_slot)(Glib::wrap(child1), Glib::wrap(child2));
+  }
+  catch(...)
+  {
+    Glib::exception_handlers_invoke();
+    return 0;
+  }
+}
+
+static void SignalProxy_Sort_gtk_callback_destroy(void* data)
+{
+  delete static_cast<Gtk::FlowBox::SlotSort*>(data);
+}
+
+} // anonymous namespace
+
+namespace Gtk
+{
+
+void FlowBox::selected_foreach(const SlotSelectedForeach& slot)
+{
+  SlotSelectedForeach slot_local_copy(slot);
+
+  gtk_flow_box_selected_foreach(gobj(),
+    &FuncProxy_Foreach_gtk_callback, &slot_local_copy);
+}
+
+void FlowBox::set_filter_func(const SlotFilter& slot)
+{
+  // Create a copy of the slot object. A pointer to this will be passed
+  // through the callback's data parameter. It will be deleted
+  // when SignalProxy_Filter_gtk_callback_destroy() is called.
+  SlotFilter* slot_copy = new SlotFilter(slot);
+
+  gtk_flow_box_set_filter_func(gobj(),
+    &SignalProxy_Filter_gtk_callback, slot_copy,
+    &SignalProxy_Filter_gtk_callback_destroy);
+}
+
+void FlowBox::unset_filter_func()
+{
+  gtk_flow_box_set_filter_func(gobj(), 0, 0, 0);
+}
+
+void FlowBox::set_sort_func(const SlotSort& slot)
+{
+  // Create a copy of the slot object. A pointer to this will be passed
+  // through the callback's data parameter. It will be deleted
+  // when SignalProxy_Sort_gtk_callback_destroy() is called.
+  SlotSort* slot_copy = new SlotSort(slot);
+
+  gtk_flow_box_set_sort_func(gobj(),
+    &SignalProxy_Sort_gtk_callback, slot_copy,
+    &SignalProxy_Sort_gtk_callback_destroy);
+}
+
+void FlowBox::unset_sort_func()
+{
+  gtk_flow_box_set_sort_func(gobj(), 0, 0, 0);
+}
+
+} //namespace Gtk
+
diff --git a/gtk/src/flowbox.hg b/gtk/src/flowbox.hg
new file mode 100644
index 0000000..69d4505
--- /dev/null
+++ b/gtk/src/flowbox.hg
@@ -0,0 +1,232 @@
+/* Copyright (C) 2014 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gtkmm/container.h>
+#include <gtkmm/orientable.h>
+#include <gtkmm/flowboxchild.h>
+#include <vector>
+
+_DEFS(gtkmm,gtk)
+_PINCLUDE(gtkmm/private/container_p.h)
+
+namespace Gtk
+{
+
+/** A container that allows reflowing its children.
+ *
+ * A FlowBox positions child widgets in sequence according to its
+ * orientation.
+ *
+ * For instance, with the horizontal orientation, the widgets will be
+ * arranged from left to right, starting a new row under the previous
+ * row when necessary. Reducing the width in this case will require more
+ * rows, so a larger height will be requested.
+ *
+ * Likewise, with the vertical orientation, the widgets will be arranged
+ * from top to bottom, starting a new column to the right when necessary.
+ * Reducing the height will require more columns, so a larger width will
+ * be requested.
+ *
+ * The children of a FlowBox can be dynamically sorted and filtered.
+ *
+ * Although a FlowBox must have only FlowBoxChild children,
+ * you can add any kind of widget to it via Container::add(), and
+ * a FlowBoxChild widget will automatically be inserted between
+ * the box and the widget.
+ *
+ * Also see ListBox.
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ *
+ * @newin{3,12}
+ */
+class FlowBox
+  : public Container,
+    public Orientable
+{
+  _CLASS_GTKOBJECT(FlowBox, GtkFlowBox, GTK_FLOW_BOX, Gtk::Container, GtkContainer)
+  _IMPLEMENTS_INTERFACE(Orientable)
+public:
+
+  /** Creates a FlowBox.
+   */
+  _CTOR_DEFAULT
+
+  /** For instance: void foreach_child(FlowBox* box, FlowBoxChild* child);
+   *
+   * A function used by FlowBox::selected_foreach().
+   * It will be called on every selected child of the @a box.
+   *
+   * @param box FlowBox containing the selected children
+   * @param child Each selected FlowBoxChild
+   *
+   * @newin{3,12}
+   */
+  typedef sigc::slot<void, FlowBox*, FlowBoxChild*> SlotSelectedForeach;
+
+  /** For instance: bool on_filter(FlowBoxChild* child);
+   *
+   * Will be called for each child after a call to FlowBox::set_filter_func(),
+   * and it will continue to be called each time a child changes (via
+   * FlowBoxChild::changed()) or when FlowBox::invalidate_filter()
+   * is called.
+   *
+   * @param child A FlowBoxChild that may be filtered
+   * @returns <tt>true</tt> if the child should be visible, <tt>false</tt> otherwise
+   *
+   * @newin{3,12}
+   */
+  typedef sigc::slot<bool, FlowBoxChild*> SlotFilter;
+
+  /** For instance: int on_sort(FlowBoxChild* child1, FlowBoxChild* child2)
+   *
+   * Will be called for each child after a call to FlowBox::set_sort_func(),
+   * and will continue to be called each time a child changes (via
+   * FlowBoxChild::changed()) and when FlowBox::invalidate_sort()
+   * is called.
+   *
+   * @param child1 The first child.
+   * @param child2 The second child.
+   * @returns < 0 if @a child1 should be before @a child2, 0 if
+   * they are equal, and > 0 otherwise
+   *
+   * @newin{3,12}
+   */
+  typedef sigc::slot<int, FlowBoxChild*, FlowBoxChild*> SlotSort;
+
+  _WRAP_METHOD(void set_homogeneous(bool homogeneous = true), gtk_flow_box_set_homogeneous)
+  _WRAP_METHOD(bool get_homogeneous() const, gtk_flow_box_get_homogeneous)
+
+  _WRAP_METHOD(void set_row_spacing(guint spacing), gtk_flow_box_set_row_spacing)
+  _WRAP_METHOD(guint get_row_spacing() const, gtk_flow_box_get_row_spacing)
+
+  _WRAP_METHOD(void set_column_spacing(guint spacing), gtk_flow_box_set_column_spacing)
+  _WRAP_METHOD(guint get_column_spacing() const, gtk_flow_box_get_column_spacing)
+
+  _WRAP_METHOD(void set_min_children_per_line(guint n_children), gtk_flow_box_set_min_children_per_line)
+  _WRAP_METHOD(guint get_min_children_per_line() const, gtk_flow_box_get_min_children_per_line)
+
+  _WRAP_METHOD(void set_max_children_per_line(guint n_children), gtk_flow_box_set_max_children_per_line)
+  _WRAP_METHOD(guint get_max_children_per_line() const, gtk_flow_box_get_max_children_per_line)
+
+  _WRAP_METHOD(void set_activate_on_single_click(bool single = true), 
gtk_flow_box_set_activate_on_single_click)
+  _WRAP_METHOD(bool get_activate_on_single_click() const, gtk_flow_box_get_activate_on_single_click)
+
+  _WRAP_METHOD(void insert(Widget& widget, int position), gtk_flow_box_insert)
+
+  _WRAP_METHOD(FlowBoxChild* get_child_at_index(int idx), gtk_flow_box_get_child_at_index)
+  _WRAP_METHOD(const FlowBoxChild* get_child_at_index(int idx) const, gtk_flow_box_get_child_at_index, 
constversion)
+
+  /** Calls a function for each selected child.
+   *
+   * Note that the selection cannot be modified from within
+   * this function.
+   *
+   * @param slot The function to call for each selected child
+   *
+   * @newin{3,12}
+   */
+  void selected_foreach(const SlotSelectedForeach& slot);
+  _IGNORE(gtk_flow_box_selected_foreach)
+
+  // transfer container
+#m4 _CONVERSION(`GList*',`std::vector< Gtk::FlowBoxChild*>',`Glib::ListHandler< Gtk::FlowBoxChild* 
::list_to_vector($3, Glib::OWNERSHIP_SHALLOW)')
+  _WRAP_METHOD(std::vector< Gtk::FlowBoxChild*> get_selected_children(), gtk_flow_box_get_selected_children)
+#m4 _CONVERSION(`GList*',`std::vector< const Gtk::FlowBoxChild*>',`Glib::ListHandler< const 
Gtk::FlowBoxChild* >::list_to_vector($3, Glib::OWNERSHIP_SHALLOW)')
+  _WRAP_METHOD(std::vector< const Gtk::FlowBoxChild*> get_selected_children() const, 
gtk_flow_box_get_selected_children)
+
+  _WRAP_METHOD(void select_child(FlowBoxChild& child), gtk_flow_box_select_child)
+  _WRAP_METHOD(void unselect_child(FlowBoxChild& child), gtk_flow_box_unselect_child)
+
+  _WRAP_METHOD(void select_all(), gtk_flow_box_select_all)
+  _WRAP_METHOD(void unselect_all(), gtk_flow_box_unselect_all)
+
+  _WRAP_METHOD(void set_selection_mode(SelectionMode mode = SELECTION_NONE), gtk_flow_box_set_selection_mode)
+  _WRAP_METHOD(SelectionMode get_selection_mode() const, gtk_flow_box_get_selection_mode)
+
+  _WRAP_METHOD(void set_hadjustment(const Glib::RefPtr<Adjustment>& adjustment), 
gtk_flow_box_set_hadjustment)
+  _WRAP_METHOD(void set_vadjustment(const Glib::RefPtr<Adjustment>& adjustment), 
gtk_flow_box_set_vadjustment)
+
+  /** Sets a filter function.
+   *
+   * By setting a filter function on the FlowBox one can decide dynamically
+   * which of the children to show. For instance, to implement a search
+   * function that only shows the children matching the search terms.
+   *
+   * The @a slot will be called for ach child after the call, and
+   * it will continue to be called each time a child changes (via
+   * FlowBoxChild::changed()) or when FlowBox::invalidate_filter()
+   * is called.
+   *
+   * @param slot Callback that lets you filter which children to show
+   *
+   * @newin{3,12}
+   */
+  void set_filter_func(const SlotFilter& slot);
+  _IGNORE(gtk_flow_box_set_filter_func)
+
+  /** Removes the filter function, if any.
+   *
+   * @newin{3,12}
+   */
+  void unset_filter_func();
+
+  _WRAP_METHOD(void invalidate_filter(), gtk_flow_box_invalidate_filter)
+
+  /** Sets a sort function.
+   *
+   * By setting a sort function on the FlowBox, one can dynamically
+   * reorder the children of the box, based on the contents of
+   * the children.
+   *
+   * The @a slot will be called for each child after the call,
+   * and will continue to be called each time a child changes (via
+   * FlowBoxChild::changed()) and when FlowBox::invalidate_sort()
+   * is called.
+   *
+   * @param slot The sort function
+   *
+   * @newin{3,12}
+   */
+  void set_sort_func(const SlotSort& slot);
+  _IGNORE(gtk_flow_box_set_sort_func)
+
+  /** Removes the sort function, if any.
+   *
+   * @newin{3,12}
+   */
+  void unset_sort_func();
+
+  _WRAP_METHOD(void invalidate_sort(), gtk_flow_box_invalidate_sort)
+
+
+  _WRAP_PROPERTY("selection-mode", SelectionMode)
+  _WRAP_PROPERTY("activate-on-single-click", bool)
+  _WRAP_PROPERTY("homogeneous", bool)
+  _WRAP_PROPERTY("min-children-per-line", guint)
+  _WRAP_PROPERTY("max-children-per-line", guint)
+  _WRAP_PROPERTY("row-spacing", guint)
+  _WRAP_PROPERTY("column-spacing", guint)
+
+
+  _WRAP_SIGNAL(void child_activated(FlowBoxChild*), "child-activated")
+  _WRAP_SIGNAL(void selected_children_changed(), "selected-children-changed")
+  _IGNORE("activate-cursor-child", "toggle-cursor-child", "move-cursor", "select-all", "unselect-all") // 
Action signals
+};
+
+} // namespace Gtk
+
diff --git a/gtk/src/flowboxchild.ccg b/gtk/src/flowboxchild.ccg
new file mode 100644
index 0000000..c82c7e7
--- /dev/null
+++ b/gtk/src/flowboxchild.ccg
@@ -0,0 +1,21 @@
+/* Copyright (C) 2014 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gtk/gtk.h>
+
+namespace Gtk
+{
+} // namespace Gtk
diff --git a/gtk/src/flowboxchild.hg b/gtk/src/flowboxchild.hg
new file mode 100644
index 0000000..d1f2948
--- /dev/null
+++ b/gtk/src/flowboxchild.hg
@@ -0,0 +1,49 @@
+/* Copyright (C) 2014 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gtkmm/bin.h>
+
+_DEFS(gtkmm,gtk)
+_PINCLUDE(gtkmm/private/bin_p.h)
+
+namespace Gtk
+{
+
+/** See the description of FlowBox.
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ *
+ * @newin{3,12}
+ */
+class FlowBoxChild
+  : public Bin
+{
+  _CLASS_GTKOBJECT(FlowBoxChild, GtkFlowBoxChild, GTK_FLOW_BOX_CHILD, Gtk::Bin, GtkBin)
+public:
+
+  /** Creates a new FlowBoxChild, to be used as a child of a FlowBox.
+   */
+  _CTOR_DEFAULT()
+
+  _WRAP_METHOD(int get_index() const, gtk_flow_box_child_get_index)
+  _WRAP_METHOD(bool is_selected() const, gtk_flow_box_child_is_selected)
+  _WRAP_METHOD(void changed(), gtk_flow_box_child_changed)
+
+  _IGNORE_SIGNAL("activate") // Action signal
+};
+
+} // namespace Gtk
diff --git a/gtk/src/gtk_signals.defs b/gtk/src/gtk_signals.defs
index b7609ba..9a37d69 100644
--- a/gtk/src/gtk_signals.defs
+++ b/gtk/src/gtk_signals.defs
@@ -943,6 +943,15 @@
   (when "last")
 )
 
+(define-property use-header-bar
+  (of-object "GtkAssistant")
+  (prop-type "GParamInt")
+  (docs "Use Header Bar for actions.")
+  (readable #t)
+  (writable #t)
+  (construct-only #t)
+)
+
 ;; From GtkBin
 
 ;; From GtkBorder
@@ -3008,19 +3017,19 @@
 
 ;; From GtkDialog
 
-(define-signal response
+(define-signal close
   (of-object "GtkDialog")
   (return-type "void")
   (when "last")
-  (parameters
-    '("gint" "p0")
-  )
 )
 
-(define-signal close
+(define-signal response
   (of-object "GtkDialog")
   (return-type "void")
   (when "last")
+  (parameters
+    '("gint" "p0")
+  )
 )
 
 (define-property use-header-bar
@@ -4053,8 +4062,202 @@
 
 ;; From GtkFileChooserWidget
 
+(define-signal show-hidden
+  (of-object "GtkFileChooserWidget")
+  (return-type "void")
+  (when "first")
+)
+
+(define-signal location-popup
+  (of-object "GtkFileChooserWidget")
+  (return-type "void")
+  (when "first")
+  (parameters
+    '("const-gchar*" "p0")
+  )
+)
+
+(define-signal location-popup-on-paste
+  (of-object "GtkFileChooserWidget")
+  (return-type "void")
+  (when "first")
+)
+
+(define-signal location-toggle-popup
+  (of-object "GtkFileChooserWidget")
+  (return-type "void")
+  (when "first")
+)
+
+(define-signal up-folder
+  (of-object "GtkFileChooserWidget")
+  (return-type "void")
+  (when "first")
+)
+
+(define-signal down-folder
+  (of-object "GtkFileChooserWidget")
+  (return-type "void")
+  (when "first")
+)
+
+(define-signal home-folder
+  (of-object "GtkFileChooserWidget")
+  (return-type "void")
+  (when "first")
+)
+
+(define-signal desktop-folder
+  (of-object "GtkFileChooserWidget")
+  (return-type "void")
+  (when "first")
+)
+
+(define-signal quick-bookmark
+  (of-object "GtkFileChooserWidget")
+  (return-type "void")
+  (when "first")
+  (parameters
+    '("gint" "p0")
+  )
+)
+
+(define-signal search-shortcut
+  (of-object "GtkFileChooserWidget")
+  (return-type "void")
+  (when "first")
+)
+
+(define-signal recent-shortcut
+  (of-object "GtkFileChooserWidget")
+  (return-type "void")
+  (when "first")
+)
+
 ;; From GtkFixed
 
+;; From GtkFlowBox
+
+(define-signal move-cursor
+  (of-object "GtkFlowBox")
+  (return-type "void")
+  (when "last")
+  (parameters
+    '("GtkMovementStep" "p0")
+    '("gint" "p1")
+  )
+)
+
+(define-signal select-all
+  (of-object "GtkFlowBox")
+  (return-type "void")
+  (when "last")
+)
+
+(define-signal unselect-all
+  (of-object "GtkFlowBox")
+  (return-type "void")
+  (when "last")
+)
+
+(define-signal child-activated
+  (of-object "GtkFlowBox")
+  (return-type "void")
+  (when "last")
+  (parameters
+    '("GtkFlowBoxChild*" "p0")
+  )
+)
+
+(define-signal selected-children-changed
+  (of-object "GtkFlowBox")
+  (return-type "void")
+  (when "first")
+)
+
+(define-signal activate-cursor-child
+  (of-object "GtkFlowBox")
+  (return-type "void")
+  (when "last")
+)
+
+(define-signal toggle-cursor-child
+  (of-object "GtkFlowBox")
+  (return-type "void")
+  (when "last")
+)
+
+(define-property homogeneous
+  (of-object "GtkFlowBox")
+  (prop-type "GParamBoolean")
+  (docs "Whether the children should all be the same size")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property column-spacing
+  (of-object "GtkFlowBox")
+  (prop-type "GParamUInt")
+  (docs "The amount of horizontal space between two children")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property row-spacing
+  (of-object "GtkFlowBox")
+  (prop-type "GParamUInt")
+  (docs "The amount of vertical space between two children")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property min-children-per-line
+  (of-object "GtkFlowBox")
+  (prop-type "GParamUInt")
+  (docs "The minimum number of children to allocate consecutively in the given orientation.")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property max-children-per-line
+  (of-object "GtkFlowBox")
+  (prop-type "GParamUInt")
+  (docs "The maximum amount of children to request space for consecutively in the given orientation.")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property selection-mode
+  (of-object "GtkFlowBox")
+  (prop-type "GParamEnum")
+  (docs "The selection mode")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property activate-on-single-click
+  (of-object "GtkFlowBox")
+  (prop-type "GParamBoolean")
+  (docs "Activate row on a single click")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+;; From GtkFlowBoxChild
+
+(define-signal activate
+  (of-object "GtkFlowBoxChild")
+  (return-type "void")
+  (when "first")
+)
+
 ;; From GtkFontButton
 
 (define-signal font-set
@@ -4590,19 +4793,19 @@
 
 ;; From GtkInfoBar
 
-(define-signal response
+(define-signal close
   (of-object "GtkInfoBar")
   (return-type "void")
   (when "last")
-  (parameters
-    '("gint" "p0")
-  )
 )
 
-(define-signal close
+(define-signal response
   (of-object "GtkInfoBar")
   (return-type "void")
   (when "last")
+  (parameters
+    '("gint" "p0")
+  )
 )
 
 (define-property message-type
@@ -6119,6 +6322,12 @@
 
 ;; From GtkPopover
 
+(define-signal closed
+  (of-object "GtkPopover")
+  (return-type "void")
+  (when "last")
+)
+
 (define-property relative-to
   (of-object "GtkPopover")
   (prop-type "GParamObject")
@@ -7192,19 +7401,19 @@
 
 ;; From GtkScaleButton
 
-(define-signal popup
+(define-signal value-changed
   (of-object "GtkScaleButton")
   (return-type "void")
   (when "last")
+  (parameters
+    '("gdouble" "p0")
+  )
 )
 
-(define-signal value-changed
+(define-signal popup
   (of-object "GtkScaleButton")
   (return-type "void")
   (when "last")
-  (parameters
-    '("gdouble" "p0")
-  )
 )
 
 (define-signal popdown
@@ -11650,28 +11859,28 @@
   (construct-only #f)
 )
 
-(define-property margin-start
+(define-property margin-right
   (of-object "GtkWidget")
   (prop-type "GParamInt")
-  (docs "Pixels of extra space on the start")
+  (docs "Pixels of extra space on the right side")
   (readable #t)
   (writable #t)
   (construct-only #f)
 )
 
-(define-property margin-end
+(define-property margin-start
   (of-object "GtkWidget")
   (prop-type "GParamInt")
-  (docs "Pixels of extra space on the end")
+  (docs "Pixels of extra space on the start")
   (readable #t)
   (writable #t)
   (construct-only #f)
 )
 
-(define-property margin-right
+(define-property margin-end
   (of-object "GtkWidget")
   (prop-type "GParamInt")
-  (docs "Pixels of extra space on the right side")
+  (docs "Pixels of extra space on the end")
   (readable #t)
   (writable #t)
   (construct-only #f)
diff --git a/tools/extra_defs_gen/generate_defs_gtk.cc b/tools/extra_defs_gen/generate_defs_gtk.cc
index 7648feb..01db454 100644
--- a/tools/extra_defs_gen/generate_defs_gtk.cc
+++ b/tools/extra_defs_gen/generate_defs_gtk.cc
@@ -110,6 +110,8 @@ int main(int argc, char** argv)
             << get_defs( GTK_TYPE_FILE_CHOOSER_DIALOG )
             << get_defs( GTK_TYPE_FILE_CHOOSER_WIDGET )
             << get_defs( GTK_TYPE_FIXED )
+            << get_defs( GTK_TYPE_FLOW_BOX )
+            << get_defs( GTK_TYPE_FLOW_BOX_CHILD )
             << get_defs( GTK_TYPE_FONT_BUTTON )
             << get_defs( GTK_TYPE_FONT_CHOOSER )
             << get_defs( GTK_TYPE_FONT_CHOOSER_DIALOG )
diff --git a/tools/m4/convert_gtk.m4 b/tools/m4/convert_gtk.m4
index c3839e6..cc354ed 100644
--- a/tools/m4/convert_gtk.m4
+++ b/tools/m4/convert_gtk.m4
@@ -572,6 +572,12 @@ _CONVERSION(`const Border&',`const GtkBorder*',__FR2P)
 _CONVERSION(`Border&',`GtkBorder*',__FR2P)
 _CONVERSION(`const GtkBorder*',`Border',`Glib::wrap(const_cast<GtkBorder*>($3))')
 
+#FlowBoxChild
+_CONVERSION(`GtkFlowBoxChild*',`FlowBoxChild*',__RP2P)
+_CONVERSION(`GtkFlowBoxChild*',`const FlowBoxChild*',__RP2P)
+_CONVERSION(`FlowBoxChild&',`GtkFlowBoxChild*',__FR2P)
+_CONVERSION(`FlowBoxChild*',`GtkFlowBoxChild*',__FP2P)
+
 #ListBoxRow
 _CONVERSION(`GtkListBoxRow*',`ListBoxRow*',__RP2P)
 _CONVERSION(`GtkListBoxRow*',`const ListBoxRow*',__RP2P)


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