[gtkmm] Add CellRendererSpin and Spinner.



commit a0d3be0bca33e578d43e2887ee01f1939e1d0b1b
Author: Debarshi Ray <debarshir src gnome org>
Date:   Fri Oct 16 21:03:36 2009 +0300

    Add CellRendererSpin and Spinner.
    
    	* gtk/src/cellrenderspin.[hg|ccg]:
    	* gtk/src/spinner.[hg|ccg]: New files, wrapping new C API.
    	* gtk/src/gtk_methods.defs:
    	* gtk/src/gtk_signals.defs:
    	* tools/extra_defs_gen/generate_defs_gtk.cc: Add new definitions of the
    	C API.
    	* gtk/gtkmm.h: Include the new headers.
    	* configure.ac: Require a newer version of GTK+.
    	Bug #598715.

 ChangeLog                                 |   14 +
 configure.ac                              |    2 +-
 gtk/gtkmm.h                               |    2 +
 gtk/src/cellrendererspinner.ccg           |   20 ++
 gtk/src/cellrendererspinner.hg            |   53 ++++
 gtk/src/filelist.am                       |    2 +
 gtk/src/gtk_methods.defs                  |   71 +++++
 gtk/src/gtk_signals.defs                  |  400 +++++++++++++++++++++++++++++
 gtk/src/spinner.ccg                       |   20 ++
 gtk/src/spinner.hg                        |   48 ++++
 tools/extra_defs_gen/generate_defs_gtk.cc |    2 +
 11 files changed, 633 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 255f1d1..5f29d26 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2009-10-30  Debarshi Ray  <debarshi ray gmail com>
+	
+	Add CellRendererSpin and Spinner.
+
+	* gtk/src/cellrenderspin.[hg|ccg]:
+	* gtk/src/spinner.[hg|ccg]: New files, wrapping new C API.
+	* gtk/src/gtk_methods.defs:
+	* gtk/src/gtk_signals.defs:
+	* tools/extra_defs_gen/generate_defs_gtk.cc: Add new definitions of the 
+	C API.
+	* gtk/gtkmm.h: Include the new headers.
+	* configure.ac: Require a newer version of GTK+.
+	Bug #598715.
+
 2009-10-30  Murray Cumming  <murrayc murrayc com>
 
 	VPaned documentation now says that it's vertical.
diff --git a/configure.ac b/configure.ac
index 70b78f5..594f942 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,7 +56,7 @@ AS_IF([test "x$enable_static" = xyes],
 AC_SUBST([ATKMM_MODULES], ['glibmm-2.4 >= 2.22 atk >= 1.12'])
 
 # gdkmm really does need GTK+, because part of Gdk::DragContext is in GTK+.
-AC_SUBST([GDKMM_MODULES], ['giomm-2.4 >= 2.22 pangomm-1.4 >= 2.26 gtk+-2.0 >= 2.18'])
+AC_SUBST([GDKMM_MODULES], ['giomm-2.4 >= 2.22 pangomm-1.4 >= 2.26 gtk+-2.0 >= 2.19'])
 
 AS_IF([test "x$gtkmm_host_windows" = xyes],
       [GTKMM_MODULES=$GDKMM_MODULES],
diff --git a/gtk/gtkmm.h b/gtk/gtkmm.h
index d506b8a..248ac25 100644
--- a/gtk/gtkmm.h
+++ b/gtk/gtkmm.h
@@ -54,6 +54,7 @@ extern const int gtkmm_micro_version;
 #include <gtkmm/cellrendererpixbuf.h>
 #include <gtkmm/cellrendererprogress.h>
 #include <gtkmm/cellrendererspin.h>
+#include <gtkmm/cellrendererspinner.h>
 #include <gtkmm/cellrenderertext.h>
 #include <gtkmm/cellrenderertoggle.h>
 #include <gtkmm/colorbutton.h>
@@ -147,6 +148,7 @@ extern const int gtkmm_micro_version;
 #include <gtkmm/settings.h>
 #include <gtkmm/sizegroup.h>
 #include <gtkmm/spinbutton.h>
+#include <gtkmm/spinner.h>
 #include <gtkmm/statusbar.h>
 #include <gtkmm/statusicon.h>
 #include <gtkmm/stock.h>
diff --git a/gtk/src/cellrendererspinner.ccg b/gtk/src/cellrendererspinner.ccg
new file mode 100644
index 0000000..9c313cb
--- /dev/null
+++ b/gtk/src/cellrendererspinner.ccg
@@ -0,0 +1,20 @@
+// -*- c++ -*-
+
+/*
+ *
+ * Copyright 2009 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, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
diff --git a/gtk/src/cellrendererspinner.hg b/gtk/src/cellrendererspinner.hg
new file mode 100644
index 0000000..49be0f1
--- /dev/null
+++ b/gtk/src/cellrendererspinner.hg
@@ -0,0 +1,53 @@
+/* cellrendererspinner.h
+ *
+ * Copyright (C) 2009 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, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/cellrenderer.h>
+#include <gtkmm/enums.h>
+_DEFS(gtkmm,gtk)
+_PINCLUDE(gtkmm/private/cellrenderer_p.h)
+
+
+namespace Gtk
+{
+
+_CC_INCLUDE(gtk/gtk.h)
+
+/** Renders a spinning animation in a cell.
+ * A CellRendererSpinner can be used as an alternative to CellRendererProgress for displaying
+ * indefinite activity, instead of actual progress.
+ *
+ * To start the animation in a cell, set the active property to	true and increment the pulse property
+ * at regular intervals.
+ *
+ * @ingroup TreeView
+ */
+class CellRendererSpinner : public CellRenderer
+{
+  _CLASS_GTKOBJECT(CellRendererSpinner,GtkCellRendererSpinner,GTK_CELL_RENDERER_SPINNER,Gtk::CellRenderer,GtkCellRenderer)
+public:
+
+  _CTOR_DEFAULT
+
+  _WRAP_PROPERTY("active", bool)
+  _WRAP_PROPERTY("pulse", guint)
+  _WRAP_PROPERTY("size", Gtk::IconSize)
+};
+
+} /* namespace Gtk */
+
diff --git a/gtk/src/filelist.am b/gtk/src/filelist.am
index 0349ece..f01c2d5 100644
--- a/gtk/src/filelist.am
+++ b/gtk/src/filelist.am
@@ -38,6 +38,7 @@ gtkmm_files_any_hg =		\
 	cellrendererpixbuf.hg	\
 	cellrendererprogress.hg	\
 	cellrendererspin.hg	\
+	cellrendererspinner.hg	\
 	cellrenderertext.hg	\
 	cellrenderertoggle.hg	\
 	cellview.hg		\
@@ -133,6 +134,7 @@ gtkmm_files_any_hg =		\
 	sizegroup.hg		\
 	socket.hg		\
 	spinbutton.hg		\
+	spinner.hg		\
 	statusbar.hg		\
 	statusicon.hg		\
 	stockitem.hg		\
diff --git a/gtk/src/gtk_methods.defs b/gtk/src/gtk_methods.defs
index 75dba1c..d92237f 100644
--- a/gtk/src/gtk_methods.defs
+++ b/gtk/src/gtk_methods.defs
@@ -196,6 +196,13 @@
   (gtype-id "GTK_TYPE_CELL_RENDERER_SPIN")
 )
 
+(define-object CellRendererSpinner
+  (in-module "Gtk")
+  (parent "GtkCellRenderer")
+  (c-name "GtkCellRendererSpinner")
+  (gtype-id "GTK_TYPE_CELL_RENDERER_SPINNER")
+)
+
 (define-object CellRendererProgress
   (in-module "Gtk")
   (parent "GtkCellRenderer")
@@ -720,6 +727,13 @@
   (gtype-id "GTK_TYPE_DRAWING_AREA")
 )
 
+(define-object Spinner
+  (in-module "Gtk")
+  (parent "GtkDrawingArea")
+  (c-name "GtkSpinner")
+  (gtype-id "GTK_TYPE_SPINNER")
+)
+
 (define-object Curve
   (in-module "Gtk")
   (parent "GtkDrawingArea")
@@ -6159,6 +6173,21 @@
 
 
 
+;; From gtkcellrendererspinner.h
+
+(define-function gtk_cell_renderer_spinner_get_type
+  (c-name "gtk_cell_renderer_spinner_get_type")
+  (return-type "GType")
+)
+
+(define-function gtk_cell_renderer_spinner_new
+  (c-name "gtk_cell_renderer_spinner_new")
+  (is-constructor-of "GtkCellRendererSpinner")
+  (return-type "GtkCellRenderer*")
+)
+
+
+
 ;; From gtkcellrenderertext.h
 
 (define-function gtk_cell_renderer_text_get_type
@@ -23325,6 +23354,33 @@
 
 
 
+;; From gtkspinner.h
+
+(define-function gtk_spinner_get_type
+  (c-name "gtk_spinner_get_type")
+  (return-type "GType")
+)
+
+(define-function gtk_spinner_new
+  (c-name "gtk_spinner_new")
+  (is-constructor-of "GtkSpinner")
+  (return-type "GtkWidget*")
+)
+
+(define-method start
+  (of-object "GtkSpinner")
+  (c-name "gtk_spinner_start")
+  (return-type "none")
+)
+
+(define-method stop
+  (of-object "GtkSpinner")
+  (c-name "gtk_spinner_stop")
+  (return-type "none")
+)
+
+
+
 ;; From gtkstatusbar.h
 
 (define-function gtk_statusbar_get_type
@@ -24520,6 +24576,21 @@
   )
 )
 
+(define-function gtk_paint_spinner
+  (c-name "gtk_paint_spinner")
+  (return-type "none")
+  (parameters
+    '("GtkStyle*" "style")
+    '("GdkWindow*" "window")
+    '("GtkStateType" "state_type")
+    '("guint" "step")
+    '("gint" "x")
+    '("gint" "y")
+    '("gint" "width")
+    '("gint" "height")
+  )
+)
+
 (define-function gtk_border_get_type
   (c-name "gtk_border_get_type")
   (return-type "GType")
diff --git a/gtk/src/gtk_signals.defs b/gtk/src/gtk_signals.defs
index 578cfce..e4e0963 100644
--- a/gtk/src/gtk_signals.defs
+++ b/gtk/src/gtk_signals.defs
@@ -9499,6 +9499,179 @@
   (construct-only #f)
 )
 
+;; From GtkCellRendererSpinner
+
+(define-property user-data
+  (of-object "GtkCellRendererSpinner")
+  (prop-type "GParamPointer")
+  (docs "Anonymous User Data Pointer")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property mode
+  (of-object "GtkCellRendererSpinner")
+  (prop-type "GParamEnum")
+  (docs "Editable mode of the CellRenderer")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property visible
+  (of-object "GtkCellRendererSpinner")
+  (prop-type "GParamBoolean")
+  (docs "Display the cell")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property sensitive
+  (of-object "GtkCellRendererSpinner")
+  (prop-type "GParamBoolean")
+  (docs "Display the cell sensitive")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property xalign
+  (of-object "GtkCellRendererSpinner")
+  (prop-type "GParamFloat")
+  (docs "The x-align")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property yalign
+  (of-object "GtkCellRendererSpinner")
+  (prop-type "GParamFloat")
+  (docs "The y-align")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property xpad
+  (of-object "GtkCellRendererSpinner")
+  (prop-type "GParamUInt")
+  (docs "The xpad")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property ypad
+  (of-object "GtkCellRendererSpinner")
+  (prop-type "GParamUInt")
+  (docs "The ypad")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property width
+  (of-object "GtkCellRendererSpinner")
+  (prop-type "GParamInt")
+  (docs "The fixed width")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property height
+  (of-object "GtkCellRendererSpinner")
+  (prop-type "GParamInt")
+  (docs "The fixed height")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property is-expander
+  (of-object "GtkCellRendererSpinner")
+  (prop-type "GParamBoolean")
+  (docs "Row has children")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property is-expanded
+  (of-object "GtkCellRendererSpinner")
+  (prop-type "GParamBoolean")
+  (docs "Row is an expander row, and is expanded")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property cell-background
+  (of-object "GtkCellRendererSpinner")
+  (prop-type "GParamString")
+  (docs "Cell background color as a string")
+  (readable #f)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property cell-background-gdk
+  (of-object "GtkCellRendererSpinner")
+  (prop-type "GParamBoxed")
+  (docs "Cell background color as a GdkColor")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property cell-background-set
+  (of-object "GtkCellRendererSpinner")
+  (prop-type "GParamBoolean")
+  (docs "Whether this tag affects the cell background color")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property editing
+  (of-object "GtkCellRendererSpinner")
+  (prop-type "GParamBoolean")
+  (docs "Whether the cell renderer is currently in editing mode")
+  (readable #t)
+  (writable #f)
+  (construct-only #f)
+)
+
+(define-property active
+  (of-object "GtkCellRendererSpinner")
+  (prop-type "GParamBoolean")
+  (docs "Whether the spinner is active (ie. shown) in the cell")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property pulse
+  (of-object "GtkCellRendererSpinner")
+  (prop-type "GParamUInt")
+  (docs "Pulse of the spinner")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property size
+  (of-object "GtkCellRendererSpinner")
+  (prop-type "GParamEnum")
+  (docs "The GtkIconSize value that specifies the size of the rendered spinner")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
 ;; From GtkClipboard
 
 (define-signal owner-change
@@ -35003,6 +35176,233 @@
   (construct-only #f)
 )
 
+;; From GtkSpinner
+
+(define-property user-data
+  (of-object "GtkSpinner")
+  (prop-type "GParamPointer")
+  (docs "Anonymous User Data Pointer")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property name
+  (of-object "GtkSpinner")
+  (prop-type "GParamString")
+  (docs "The name of the widget")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property parent
+  (of-object "GtkSpinner")
+  (prop-type "GParamObject")
+  (docs "The parent widget of this widget. Must be a Container widget")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property width-request
+  (of-object "GtkSpinner")
+  (prop-type "GParamInt")
+  (docs "Override for width request of the widget, or -1 if natural request should be used")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property height-request
+  (of-object "GtkSpinner")
+  (prop-type "GParamInt")
+  (docs "Override for height request of the widget, or -1 if natural request should be used")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property visible
+  (of-object "GtkSpinner")
+  (prop-type "GParamBoolean")
+  (docs "Whether the widget is visible")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property sensitive
+  (of-object "GtkSpinner")
+  (prop-type "GParamBoolean")
+  (docs "Whether the widget responds to input")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property app-paintable
+  (of-object "GtkSpinner")
+  (prop-type "GParamBoolean")
+  (docs "Whether the application will paint directly on the widget")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property can-focus
+  (of-object "GtkSpinner")
+  (prop-type "GParamBoolean")
+  (docs "Whether the widget can accept the input focus")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property has-focus
+  (of-object "GtkSpinner")
+  (prop-type "GParamBoolean")
+  (docs "Whether the widget has the input focus")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property is-focus
+  (of-object "GtkSpinner")
+  (prop-type "GParamBoolean")
+  (docs "Whether the widget is the focus widget within the toplevel")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property can-default
+  (of-object "GtkSpinner")
+  (prop-type "GParamBoolean")
+  (docs "Whether the widget can be the default widget")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property has-default
+  (of-object "GtkSpinner")
+  (prop-type "GParamBoolean")
+  (docs "Whether the widget is the default widget")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property receives-default
+  (of-object "GtkSpinner")
+  (prop-type "GParamBoolean")
+  (docs "If TRUE, the widget will receive the default action when it is focused")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property composite-child
+  (of-object "GtkSpinner")
+  (prop-type "GParamBoolean")
+  (docs "Whether the widget is part of a composite widget")
+  (readable #t)
+  (writable #f)
+  (construct-only #f)
+)
+
+(define-property style
+  (of-object "GtkSpinner")
+  (prop-type "GParamObject")
+  (docs "The style of the widget, which contains information about how it will look (colors etc)")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property events
+  (of-object "GtkSpinner")
+  (prop-type "GParamFlags")
+  (docs "The event mask that decides what kind of GdkEvents this widget gets")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property extension-events
+  (of-object "GtkSpinner")
+  (prop-type "GParamEnum")
+  (docs "The mask that decides what kind of extension events this widget gets")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property no-show-all
+  (of-object "GtkSpinner")
+  (prop-type "GParamBoolean")
+  (docs "Whether gtk_widget_show_all() should not affect this widget")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property has-tooltip
+  (of-object "GtkSpinner")
+  (prop-type "GParamBoolean")
+  (docs "Whether this widget has a tooltip")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property tooltip-markup
+  (of-object "GtkSpinner")
+  (prop-type "GParamString")
+  (docs "The contents of the tooltip for this widget")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property tooltip-text
+  (of-object "GtkSpinner")
+  (prop-type "GParamString")
+  (docs "The contents of the tooltip for this widget")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property window
+  (of-object "GtkSpinner")
+  (prop-type "GParamObject")
+  (docs "The widget's window if it is realized")
+  (readable #t)
+  (writable #f)
+  (construct-only #f)
+)
+
+(define-property double-buffered
+  (of-object "GtkSpinner")
+  (prop-type "GParamBoolean")
+  (docs "Whether or not the widget is double buffered")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
+(define-property active
+  (of-object "GtkSpinner")
+  (prop-type "GParamBoolean")
+  (docs "Whether the spinner is active")
+  (readable #t)
+  (writable #t)
+  (construct-only #f)
+)
+
 ;; From GtkSpinButton
 
 (define-signal value-changed
diff --git a/gtk/src/spinner.ccg b/gtk/src/spinner.ccg
new file mode 100644
index 0000000..9c313cb
--- /dev/null
+++ b/gtk/src/spinner.ccg
@@ -0,0 +1,20 @@
+// -*- c++ -*-
+
+/*
+ *
+ * Copyright 2009 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, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
diff --git a/gtk/src/spinner.hg b/gtk/src/spinner.hg
new file mode 100644
index 0000000..679a290
--- /dev/null
+++ b/gtk/src/spinner.hg
@@ -0,0 +1,48 @@
+/* spinner.h
+ *
+ * Copyright (C) 2009 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, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/drawingarea.h>
+_DEFS(gtkmm,gtk)
+_PINCLUDE(gtkmm/private/drawingarea_p.h)
+
+
+namespace Gtk
+{
+
+_CC_INCLUDE(gtk/gtk.h)
+
+/** A widget that displays a spinner animation.
+ *
+ * @ingroup Widgets
+ */
+class Spinner : public DrawingArea
+{
+  _CLASS_GTKOBJECT(Spinner,GtkSpinner,GTK_SPINNER,Gtk::DrawingArea,GtkDrawingArea)
+public:
+
+  _CTOR_DEFAULT
+
+  _WRAP_METHOD(void start(), gtk_spinner_start)
+  _WRAP_METHOD(void stop(), gtk_spinner_stop)
+
+  _WRAP_PROPERTY("active", bool)
+};
+
+} /* namespace Gtk */
+
diff --git a/tools/extra_defs_gen/generate_defs_gtk.cc b/tools/extra_defs_gen/generate_defs_gtk.cc
index 553d080..f73a281 100644
--- a/tools/extra_defs_gen/generate_defs_gtk.cc
+++ b/tools/extra_defs_gen/generate_defs_gtk.cc
@@ -104,6 +104,7 @@ int main(int argc, char** argv)
             << get_defs( GTK_TYPE_CELL_RENDERER_PIXBUF )
             << get_defs( GTK_TYPE_CELL_RENDERER_PROGRESS )
             << get_defs( GTK_TYPE_CELL_RENDERER_SPIN )
+            << get_defs( GTK_TYPE_CELL_RENDERER_SPINNER )
             << get_defs( GTK_TYPE_CLIPBOARD )
             << get_defs( GTK_TYPE_COLOR_BUTTON )
             << get_defs( GTK_TYPE_COLOR_SELECTION )
@@ -196,6 +197,7 @@ int main(int argc, char** argv)
 #if !defined(G_OS_WIN32)
             << get_defs( GTK_TYPE_SOCKET )
 #endif /* G_OS_WIN32 */
+            << get_defs( GTK_TYPE_SPINNER )
             << get_defs( GTK_TYPE_SPIN_BUTTON )
             << get_defs( GTK_TYPE_STATUSBAR )
             << get_defs( GTK_TYPE_STATUS_ICON )



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