[gtkmm] Gtk::Stack and StackSwitcher: Add wrapper



commit d673fe31d873afd5110117841f19e7a030c75779
Author: Andrew Potter <agpotter gmail com>
Date:   Fri Jul 26 17:20:28 2013 -0700

    Gtk::Stack and StackSwitcher: Add wrapper
    
    * gtk/gtkmm.h: add stack.h and stackswitcher.h
    * gtk/src/enums.hg: wrap StackTransitionType
    * gtk/src/filelist.am: add stack.hg stackswitcher.hg
    * gtk/src/gtk_signals.defs: Regenerate
    * gtk/src/stack.ccg:
    * gtk/src/stack.hg:
    * gtk/src/stackswitcher.ccg:
    * gtk/src/stackswitcher.hg:
    * tools/extra_defs_gen/generate_defs_gtk.cc: Add stack and stackswitcher
    * tools/m4/convert_gtk.m4: Add conversions to/from Stack*
    
    Bug #704964

 gtk/gtkmm.h                               |    2 +
 gtk/src/enums.hg                          |    1 +
 gtk/src/filelist.am                       |    2 +
 gtk/src/gtk_signals.defs                  |   58 +++++++++++++++++++++++++++++
 tools/extra_defs_gen/generate_defs_gtk.cc |    2 +
 tools/m4/convert_gtk.m4                   |    3 +
 6 files changed, 68 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkmm.h b/gtk/gtkmm.h
index e6e616a..09d2e76 100644
--- a/gtk/gtkmm.h
+++ b/gtk/gtkmm.h
@@ -240,6 +240,8 @@ extern const int gtkmm_micro_version;
 #include <gtkmm/sizegroup.h>
 #include <gtkmm/spinbutton.h>
 #include <gtkmm/spinner.h>
+#include <gtkmm/stack.h>
+#include <gtkmm/stackswitcher.h>
 #include <gtkmm/statusbar.h>
 #include <gtkmm/statusicon.h>
 #include <gtkmm/stock.h>
diff --git a/gtk/src/enums.hg b/gtk/src/enums.hg
index 286312c..163a49a 100644
--- a/gtk/src/enums.hg
+++ b/gtk/src/enums.hg
@@ -93,6 +93,7 @@ _WRAP_ENUM(RevealerTransitionType, GtkRevealerTransitionType)
 _WRAP_ENUM(ScrollType, GtkScrollType)
 _WRAP_ENUM(SelectionMode, GtkSelectionMode)
 _WRAP_ENUM(ShadowType, GtkShadowType)
+_WRAP_ENUM(StackTransitionType, GtkStackTransitionType)
 _WRAP_ENUM(StateType, GtkStateType)
 _WRAP_ENUM(TargetFlags, GtkTargetFlags)
 _WRAP_ENUM(ToolbarStyle, GtkToolbarStyle)
diff --git a/gtk/src/filelist.am b/gtk/src/filelist.am
index 1063a3b..8ad4d54 100644
--- a/gtk/src/filelist.am
+++ b/gtk/src/filelist.am
@@ -146,6 +146,8 @@ gtkmm_files_any_hg =                \
        sizegroup.hg            \
        spinbutton.hg           \
        spinner.hg              \
+       stack.hg                \
+       stackswitcher.hg        \
        statusbar.hg            \
        statusicon.hg           \
        stylecontext.hg         \
diff --git a/gtk/src/gtk_signals.defs b/gtk/src/gtk_signals.defs
index d07242c..e6a8420 100644
--- a/gtk/src/gtk_signals.defs
+++ b/gtk/src/gtk_signals.defs
@@ -8102,6 +8102,64 @@
   (construct-only #f)
 )
 
+;; From GtkStack
+
+(define-property homogeneous
+  (of-object "GtkStack")
+  (prop-type "GParamBoolean")
+  (docs "Homogeneous sizing")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property visible-child
+  (of-object "GtkStack")
+  (prop-type "GParamObject")
+  (docs "The widget currently visible in the stack")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property visible-child-name
+  (of-object "GtkStack")
+  (prop-type "GParamString")
+  (docs "The name of the widget currently visible in the stack")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property transition-duration
+  (of-object "GtkStack")
+  (prop-type "GParamUInt")
+  (docs "The animation duration, in milliseconds")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property transition-type
+  (of-object "GtkStack")
+  (prop-type "GParamEnum")
+  (docs "The type of animation used to transition")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+;; From GtkStackSwitcher
+
+(define-property stack
+  (of-object "GtkStackSwitcher")
+  (prop-type "GParamObject")
+  (docs "Stack")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
 ;; From GtkStatusbar
 
 (define-signal text-pushed
diff --git a/tools/extra_defs_gen/generate_defs_gtk.cc b/tools/extra_defs_gen/generate_defs_gtk.cc
index 9b510b4..04181c6 100644
--- a/tools/extra_defs_gen/generate_defs_gtk.cc
+++ b/tools/extra_defs_gen/generate_defs_gtk.cc
@@ -187,6 +187,8 @@ int main(int argc, char** argv)
 #endif
             << get_defs( GTK_TYPE_SPINNER )
             << get_defs( GTK_TYPE_SPIN_BUTTON )
+            << get_defs( GTK_TYPE_STACK )
+            << get_defs( GTK_TYPE_STACK_SWITCHER )
             << get_defs( GTK_TYPE_STATUSBAR )
             << get_defs( GTK_TYPE_STATUS_ICON )
             << get_defs( GTK_TYPE_STYLE_CONTEXT )
diff --git a/tools/m4/convert_gtk.m4 b/tools/m4/convert_gtk.m4
index 8fb748c..00ca5b7 100644
--- a/tools/m4/convert_gtk.m4
+++ b/tools/m4/convert_gtk.m4
@@ -106,6 +106,7 @@ _CONV_ENUM(Gtk,SizeGroupMode)
 _CONV_ENUM(Gtk,SortType)
 _CONV_ENUM(Gtk,SpinButtonUpdatePolicy)
 _CONV_ENUM(Gtk,SpinType)
+_CONV_ENUM(Gtk,StackTransitionType)
 _CONV_ENUM(Gtk,StateType)
 _CONV_ENUM(Gtk,TargetFlags)
 _CONV_ENUM(Gtk,TextDirection)
@@ -205,6 +206,7 @@ _CONVERSION(`GtkMenu*',`Menu*',__RP2P)
 _CONVERSION(`GtkMenu*',`Gtk::Menu*',__RP2P)
 _CONVERSION(`GtkToolItem*',`ToolItem*',__RP2P)
 _CONVERSION(`GtkToolItemGroup*',`ToolItemGroup*',__RP2P)
+_CONVERSION(`GtkStack*',`Stack*',__RP2P)
 
 # Ptr (gtk+) -> const Ptr (gtkmm)
 _CONVERSION(`GtkWidget*',`const Gtk::Widget*',__RP2P)
@@ -327,6 +329,7 @@ _CONVERSION(`ToolItem&',`GtkToolItem*',__FR2P)
 _CONVERSION(`const ToolItem&',`GtkToolItem*',__FCR2P)
 _CONVERSION(`ToolItemGroup&',`GtkToolItemGroup*',__FR2P)
 _CONVERSION(`Gtk::Entry&',`GtkEntry*',__FR2P)
+_CONVERSION(`Stack&',`GtkStack*',__FR2P)
 
 # Glib::ListHandle<> (gtkmm) -> GList (gtk+)
 _CONVERSION(`const Glib::ListHandle<Glib::ustring>&',`GList*',`$3.data()')


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