[gtkmm] progress
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] progress
- Date: Fri, 22 Oct 2010 20:27:25 +0000 (UTC)
commit 5227c568f6006b93e7de56c919b0ff209b868cb6
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Oct 22 17:52:16 2010 +0200
progress
ChangeLog | 18 ++
gtk/src/application.hg | 8 +-
gtk/src/filelist.am | 1 +
gtk/src/gtk_methods.defs | 311 ++++++++++++++++-----
gtk/src/gtk_signals.defs | 436 +++++++++++++++++++++++++++++
gtk/src/iconview.hg | 8 +-
gtk/src/layout.hg | 10 +-
gtk/src/scrollable.ccg | 18 ++
gtk/src/scrollable.hg | 61 ++++
gtk/src/textview.hg | 8 +-
gtk/src/treeview.hg | 10 +-
gtk/src/viewport.hg | 7 +-
gtk/src/widget.hg | 2 -
tools/extra_defs_gen/generate_defs_gtk.cc | 1 +
14 files changed, 802 insertions(+), 97 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b5b267e..f2d2115 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
2010-10-22 Murray Cumming <murrayc murrayc com>
+ Fix the build with latest GTK+, adding Scrollable interface.
+
+ * gtk/src/gtk_methods.defs: Regenerated with h2defs.py.
+ * tools/extra_defs_gen/generate_defs_gtk.cc: Mention GTK_TYPE_SCROLLABLE.
+ * gtk/src/gtk_signals.defs: Add the generated part for GtkScrollable.
+ * gtk/src/filelist.am:
+ * gtk/src/scrollable.[hg|ccg]: Added Scrollable interface, wrapping
+ GtkScrollable.
+ * gtk/src/iconview.hg:
+ * gtk/src/layout.hg:
+ * gtk/src/textview.hg:
+ * gtk/src/treeview.hg:
+ * gtk/src/viewport.hg: Derive from, and implement, Scrollable.
+ Remove their set_scroll_adjustments signals, because it is in the
+ base Scrollable.
+
+2010-10-22 Murray Cumming <murrayc murrayc com>
+
Entry: Remove get_text_window() and get_icon_window().
* gtk/src/entry.hg: Don't wrap theses functions recently removed from GTK+.
diff --git a/gtk/src/application.hg b/gtk/src/application.hg
index d083fd9..7c55084 100644
--- a/gtk/src/application.hg
+++ b/gtk/src/application.hg
@@ -48,11 +48,11 @@ public:
_WRAP_METHOD(Window* get_window(), gtk_application_get_window)
_WRAP_METHOD(const Window* get_window() const, gtk_application_get_window, constversion)
-#m4 _CONVERSION(`const GSList*',`Glib::SListHandle<Window*>',`$2(const_cast<GSList*>($3), Glib::OWNERSHIP_NONE)')
- _WRAP_METHOD(Glib::SListHandle<Window*> get_windows(), gtk_application_get_windows)
+#m4 _CONVERSION(`GList*',`Glib::ListHandle<Window*>',`$2($3, Glib::OWNERSHIP_NONE)')
+ _WRAP_METHOD(Glib::ListHandle<Window*> get_windows(), gtk_application_get_windows)
-#m4 _CONVERSION(`const GSList*',`Glib::SListHandle<const Window*>',`$2(const_cast<GSList*>($3), Glib::OWNERSHIP_NONE)')
- _WRAP_METHOD(Glib::SListHandle<const Window*> get_windows() const, gtk_application_get_windows)
+#m4 _CONVERSION(`GList*',`Glib::ListHandle<const Window*>',`$2($3, Glib::OWNERSHIP_NONE)')
+ _WRAP_METHOD(Glib::ListHandle<const Window*> get_windows() const, gtk_application_get_windows)
_WRAP_METHOD(void add_window(Window& window), gtk_application_add_window)
_WRAP_METHOD(void run(), gtk_application_run)
diff --git a/gtk/src/filelist.am b/gtk/src/filelist.am
index 990ec45..09bbe7a 100644
--- a/gtk/src/filelist.am
+++ b/gtk/src/filelist.am
@@ -125,6 +125,7 @@ gtkmm_files_any_hg = \
ruler.hg \
scale.hg \
scalebutton.hg \
+ scrollable.hg \
scrollbar.hg \
scrolledwindow.hg \
selectiondata.hg \
diff --git a/gtk/src/gtk_methods.defs b/gtk/src/gtk_methods.defs
index 548c029..ab88be0 100644
--- a/gtk/src/gtk_methods.defs
+++ b/gtk/src/gtk_methods.defs
@@ -743,6 +743,13 @@
(gtype-id "GTK_TYPE_ICON_VIEW")
)
+(define-object Grid
+ (in-module "Gtk")
+ (parent "GtkContainer")
+ (c-name "GtkGrid")
+ (gtype-id "GTK_TYPE_GRID")
+)
+
(define-object Fixed
(in-module "Gtk")
(parent "GtkContainer")
@@ -3912,6 +3919,30 @@
)
)
+(define-method add_window
+ (of-object "GtkApplication")
+ (c-name "gtk_application_add_window")
+ (return-type "none")
+ (parameters
+ '("GtkWindow*" "window")
+ )
+)
+
+(define-method remove_window
+ (of-object "GtkApplication")
+ (c-name "gtk_application_remove_window")
+ (return-type "none")
+ (parameters
+ '("GtkWindow*" "window")
+ )
+)
+
+(define-method get_windows
+ (of-object "GtkApplication")
+ (c-name "gtk_application_get_windows")
+ (return-type "GList*")
+)
+
;; From gtkarrow.h
@@ -6670,54 +6701,6 @@
(return-type "gboolean")
)
-(define-function gtk_combo_box_new_text
- (c-name "gtk_combo_box_new_text")
- (return-type "GtkWidget*")
-)
-
-(define-method append_text
- (of-object "GtkComboBox")
- (c-name "gtk_combo_box_append_text")
- (return-type "none")
- (parameters
- '("const-gchar*" "text")
- )
-)
-
-(define-method insert_text
- (of-object "GtkComboBox")
- (c-name "gtk_combo_box_insert_text")
- (return-type "none")
- (parameters
- '("gint" "position")
- '("const-gchar*" "text")
- )
-)
-
-(define-method prepend_text
- (of-object "GtkComboBox")
- (c-name "gtk_combo_box_prepend_text")
- (return-type "none")
- (parameters
- '("const-gchar*" "text")
- )
-)
-
-(define-method remove_text
- (of-object "GtkComboBox")
- (c-name "gtk_combo_box_remove_text")
- (return-type "none")
- (parameters
- '("gint" "position")
- )
-)
-
-(define-method get_active_text
- (of-object "GtkComboBox")
- (c-name "gtk_combo_box_get_active_text")
- (return-type "gchar*")
-)
-
(define-method popup
(of-object "GtkComboBox")
(c-name "gtk_combo_box_popup")
@@ -6802,6 +6785,12 @@
)
)
+(define-method remove_all
+ (of-object "GtkComboBoxText")
+ (c-name "gtk_combo_box_text_remove_all")
+ (return-type "none")
+)
+
(define-method get_active_text
(of-object "GtkComboBoxText")
(c-name "gtk_combo_box_text_get_active_text")
@@ -8066,10 +8055,13 @@
)
)
-(define-method get_text_window
+(define-method get_text_area
(of-object "GtkEntry")
- (c-name "gtk_entry_get_text_window")
- (return-type "GdkWindow*")
+ (c-name "gtk_entry_get_text_area")
+ (return-type "none")
+ (parameters
+ '("GdkRectangle*" "text_area")
+ )
)
(define-method set_visibility
@@ -8522,12 +8514,13 @@
(return-type "gint")
)
-(define-method get_icon_window
+(define-method get_icon_area
(of-object "GtkEntry")
- (c-name "gtk_entry_get_icon_window")
- (return-type "GdkWindow*")
+ (c-name "gtk_entry_get_icon_area")
+ (return-type "none")
(parameters
'("GtkEntryIconPosition" "icon_pos")
+ '("GdkRectangle*" "icon_area")
)
)
@@ -9768,6 +9761,107 @@
+;; From gtkgrid.h
+
+(define-function gtk_grid_get_type
+ (c-name "gtk_grid_get_type")
+ (return-type "GType")
+)
+
+(define-function gtk_grid_new
+ (c-name "gtk_grid_new")
+ (is-constructor-of "GtkGrid")
+ (return-type "GtkWidget*")
+)
+
+(define-method attach
+ (of-object "GtkGrid")
+ (c-name "gtk_grid_attach")
+ (return-type "none")
+ (parameters
+ '("GtkWidget*" "child")
+ '("gint" "left")
+ '("gint" "top")
+ '("gint" "width")
+ '("gint" "height")
+ )
+)
+
+(define-method attach_next_to
+ (of-object "GtkGrid")
+ (c-name "gtk_grid_attach_next_to")
+ (return-type "none")
+ (parameters
+ '("GtkWidget*" "widget")
+ '("GtkWidget*" "sibling")
+ '("GtkPositionType" "side")
+ '("gint" "width")
+ '("gint" "height")
+ )
+)
+
+(define-method set_row_homogeneous
+ (of-object "GtkGrid")
+ (c-name "gtk_grid_set_row_homogeneous")
+ (return-type "none")
+ (parameters
+ '("gboolean" "homogeneous")
+ )
+)
+
+(define-method get_row_homogeneous
+ (of-object "GtkGrid")
+ (c-name "gtk_grid_get_row_homogeneous")
+ (return-type "gboolean")
+)
+
+(define-method set_row_spacing
+ (of-object "GtkGrid")
+ (c-name "gtk_grid_set_row_spacing")
+ (return-type "none")
+ (parameters
+ '("guint" "spacing")
+ )
+)
+
+(define-method get_row_spacing
+ (of-object "GtkGrid")
+ (c-name "gtk_grid_get_row_spacing")
+ (return-type "guint")
+)
+
+(define-method set_column_homogeneous
+ (of-object "GtkGrid")
+ (c-name "gtk_grid_set_column_homogeneous")
+ (return-type "none")
+ (parameters
+ '("gboolean" "homogeneous")
+ )
+)
+
+(define-method get_column_homogeneous
+ (of-object "GtkGrid")
+ (c-name "gtk_grid_get_column_homogeneous")
+ (return-type "gboolean")
+)
+
+(define-method set_column_spacing
+ (of-object "GtkGrid")
+ (c-name "gtk_grid_set_column_spacing")
+ (return-type "none")
+ (parameters
+ '("guint" "spacing")
+ )
+)
+
+(define-method get_column_spacing
+ (of-object "GtkGrid")
+ (c-name "gtk_grid_get_column_spacing")
+ (return-type "guint")
+)
+
+
+
;; From gtk.h
@@ -17186,6 +17280,16 @@
)
)
+(define-method create_app_info
+ (of-object "GtkRecentInfo")
+ (c-name "gtk_recent_info_create_app_info")
+ (return-type "GAppInfo*")
+ (parameters
+ '("const-gchar*" "app_name")
+ '("GError**" "error")
+ )
+)
+
(define-method get_applications
(of-object "GtkRecentInfo")
(c-name "gtk_recent_info_get_applications")
@@ -17237,6 +17341,12 @@
)
)
+(define-method get_gicon
+ (of-object "GtkRecentInfo")
+ (c-name "gtk_recent_info_get_gicon")
+ (return-type "GIcon*")
+)
+
(define-method get_short_name
(of-object "GtkRecentInfo")
(c-name "gtk_recent_info_get_short_name")
@@ -17522,6 +17632,75 @@
+;; From gtkscrollable.h
+
+(define-function gtk_scrollable_get_type
+ (c-name "gtk_scrollable_get_type")
+ (return-type "GType")
+)
+
+(define-method get_hadjustment
+ (of-object "GtkScrollable")
+ (c-name "gtk_scrollable_get_hadjustment")
+ (return-type "GtkAdjustment*")
+)
+
+(define-method set_hadjustment
+ (of-object "GtkScrollable")
+ (c-name "gtk_scrollable_set_hadjustment")
+ (return-type "none")
+ (parameters
+ '("GtkAdjustment*" "hadjustment")
+ )
+)
+
+(define-method get_vadjustment
+ (of-object "GtkScrollable")
+ (c-name "gtk_scrollable_get_vadjustment")
+ (return-type "GtkAdjustment*")
+)
+
+(define-method set_vadjustment
+ (of-object "GtkScrollable")
+ (c-name "gtk_scrollable_set_vadjustment")
+ (return-type "none")
+ (parameters
+ '("GtkAdjustment*" "vadjustment")
+ )
+)
+
+(define-method get_min_display_width
+ (of-object "GtkScrollable")
+ (c-name "gtk_scrollable_get_min_display_width")
+ (return-type "gint")
+)
+
+(define-method set_min_display_width
+ (of-object "GtkScrollable")
+ (c-name "gtk_scrollable_set_min_display_width")
+ (return-type "none")
+ (parameters
+ '("gint" "width")
+ )
+)
+
+(define-method get_min_display_height
+ (of-object "GtkScrollable")
+ (c-name "gtk_scrollable_get_min_display_height")
+ (return-type "gint")
+)
+
+(define-method set_min_display_height
+ (of-object "GtkScrollable")
+ (c-name "gtk_scrollable_set_min_display_height")
+ (return-type "none")
+ (parameters
+ '("gint" "height")
+ )
+)
+
+
+
;; From gtkscrollbar.h
(define-function gtk_scrollbar_get_type
@@ -27123,27 +27302,21 @@
(return-type "none")
)
-(define-method show_now
- (of-object "GtkWidget")
- (c-name "gtk_widget_show_now")
- (return-type "none")
-)
-
(define-method hide
(of-object "GtkWidget")
(c-name "gtk_widget_hide")
(return-type "none")
)
-(define-method show_all
+(define-method show_now
(of-object "GtkWidget")
- (c-name "gtk_widget_show_all")
+ (c-name "gtk_widget_show_now")
(return-type "none")
)
-(define-method hide_all
+(define-method show_all
(of-object "GtkWidget")
- (c-name "gtk_widget_hide_all")
+ (c-name "gtk_widget_show_all")
(return-type "none")
)
@@ -27410,16 +27583,6 @@
(return-type "gboolean")
)
-(define-method set_scroll_adjustments
- (of-object "GtkWidget")
- (c-name "gtk_widget_set_scroll_adjustments")
- (return-type "gboolean")
- (parameters
- '("GtkAdjustment*" "hadjustment")
- '("GtkAdjustment*" "vadjustment")
- )
-)
-
(define-method reparent
(of-object "GtkWidget")
(c-name "gtk_widget_reparent")
diff --git a/gtk/src/gtk_signals.defs b/gtk/src/gtk_signals.defs
index 4bc97ae..f6b04ea 100644
--- a/gtk/src/gtk_signals.defs
+++ b/gtk/src/gtk_signals.defs
@@ -33653,6 +33653,442 @@
(construct-only #f)
)
+;; From GtkScrollable
+
+(define-property hadjustment
+ (of-object "GtkScrollable")
+ (prop-type "GParamObject")
+ (docs "Horizontal adjustment that is shared between scrollable widget and it's controller")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property min-display-height
+ (of-object "GtkScrollable")
+ (prop-type "GParamInt")
+ (docs "Minimum height to display in the parent scrolled window")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property min-display-width
+ (of-object "GtkScrollable")
+ (prop-type "GParamInt")
+ (docs "Minimum width to display in the parent scrolled window")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property vadjustment
+ (of-object "GtkScrollable")
+ (prop-type "GParamObject")
+ (docs "Vertical adjustment that is shared between scrollable widget and it's controller")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+;; From GtkScrollbar
+
+(define-property orientation
+ (of-object "GtkScrollbar")
+ (prop-type "GParamEnum")
+ (docs "The orientation of the orientable")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property name
+ (of-object "GtkScrollbar")
+ (prop-type "GParamString")
+ (docs "The name of the widget")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property parent
+ (of-object "GtkScrollbar")
+ (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 "GtkScrollbar")
+ (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 "GtkScrollbar")
+ (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 "GtkScrollbar")
+ (prop-type "GParamBoolean")
+ (docs "Whether the widget is visible")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property sensitive
+ (of-object "GtkScrollbar")
+ (prop-type "GParamBoolean")
+ (docs "Whether the widget responds to input")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property app-paintable
+ (of-object "GtkScrollbar")
+ (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 "GtkScrollbar")
+ (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 "GtkScrollbar")
+ (prop-type "GParamBoolean")
+ (docs "Whether the widget has the input focus")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property is-focus
+ (of-object "GtkScrollbar")
+ (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 "GtkScrollbar")
+ (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 "GtkScrollbar")
+ (prop-type "GParamBoolean")
+ (docs "Whether the widget is the default widget")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property receives-default
+ (of-object "GtkScrollbar")
+ (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 "GtkScrollbar")
+ (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 "GtkScrollbar")
+ (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 "GtkScrollbar")
+ (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 "GtkScrollbar")
+ (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 "GtkScrollbar")
+ (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 "GtkScrollbar")
+ (prop-type "GParamBoolean")
+ (docs "Whether this widget has a tooltip")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property tooltip-markup
+ (of-object "GtkScrollbar")
+ (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 "GtkScrollbar")
+ (prop-type "GParamString")
+ (docs "The contents of the tooltip for this widget")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property window
+ (of-object "GtkScrollbar")
+ (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 "GtkScrollbar")
+ (prop-type "GParamBoolean")
+ (docs "Whether the widget is double buffered")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property halign
+ (of-object "GtkScrollbar")
+ (prop-type "GParamEnum")
+ (docs "How to position in extra horizontal space")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property valign
+ (of-object "GtkScrollbar")
+ (prop-type "GParamEnum")
+ (docs "How to position in extra vertical space")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property margin-left
+ (of-object "GtkScrollbar")
+ (prop-type "GParamInt")
+ (docs "Pixels of extra space on the left side")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property margin-right
+ (of-object "GtkScrollbar")
+ (prop-type "GParamInt")
+ (docs "Pixels of extra space on the right side")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property margin-top
+ (of-object "GtkScrollbar")
+ (prop-type "GParamInt")
+ (docs "Pixels of extra space on the top side")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property margin-bottom
+ (of-object "GtkScrollbar")
+ (prop-type "GParamInt")
+ (docs "Pixels of extra space on the bottom side")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property margin
+ (of-object "GtkScrollbar")
+ (prop-type "GParamInt")
+ (docs "Pixels of extra space on all four sides")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property hexpand
+ (of-object "GtkScrollbar")
+ (prop-type "GParamBoolean")
+ (docs "Whether widget wants more horizontal space")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property vexpand
+ (of-object "GtkScrollbar")
+ (prop-type "GParamBoolean")
+ (docs "Whether widget wants more vertical space")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property hexpand-set
+ (of-object "GtkScrollbar")
+ (prop-type "GParamBoolean")
+ (docs "Whether to use the hexpand property")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property vexpand-set
+ (of-object "GtkScrollbar")
+ (prop-type "GParamBoolean")
+ (docs "Whether to use the vexpand property")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property expand
+ (of-object "GtkScrollbar")
+ (prop-type "GParamBoolean")
+ (docs "Whether widget wants to expand in both directions")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property update-policy
+ (of-object "GtkScrollbar")
+ (prop-type "GParamEnum")
+ (docs "How the range should be updated on the screen")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property adjustment
+ (of-object "GtkScrollbar")
+ (prop-type "GParamObject")
+ (docs "The GtkAdjustment that contains the current value of this range object")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property inverted
+ (of-object "GtkScrollbar")
+ (prop-type "GParamBoolean")
+ (docs "Invert direction slider moves to increase range value")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property lower-stepper-sensitivity
+ (of-object "GtkScrollbar")
+ (prop-type "GParamEnum")
+ (docs "The sensitivity policy for the stepper that points to the adjustment's lower side")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property upper-stepper-sensitivity
+ (of-object "GtkScrollbar")
+ (prop-type "GParamEnum")
+ (docs "The sensitivity policy for the stepper that points to the adjustment's upper side")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property show-fill-level
+ (of-object "GtkScrollbar")
+ (prop-type "GParamBoolean")
+ (docs "Whether to display a fill level indicator graphics on trough.")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property restrict-to-fill-level
+ (of-object "GtkScrollbar")
+ (prop-type "GParamBoolean")
+ (docs "Whether to restrict the upper boundary to the fill level.")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property fill-level
+ (of-object "GtkScrollbar")
+ (prop-type "GParamDouble")
+ (docs "The fill level.")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
;; From GtkScrolledWindow
(define-signal move-focus-out
diff --git a/gtk/src/iconview.hg b/gtk/src/iconview.hg
index c13385b..8f507f3 100644
--- a/gtk/src/iconview.hg
+++ b/gtk/src/iconview.hg
@@ -25,7 +25,9 @@
#include <gtkmm/treepath.h>
#include <gtkmm/celllayout.h>
#include <gtkmm/cellrenderer.h>
+#include <gtkmm/scrollable.h>
#include <gtkmm/tooltip.h>
+
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/container_p.h)
@@ -46,10 +48,12 @@ _WRAP_ENUM(IconViewDropPosition, GtkIconViewDropPosition)
*/
class IconView
: public Container,
- public CellLayout
+ public CellLayout,
+ public Scrollable
{
_CLASS_GTKOBJECT(IconView, GtkIconView, GTK_ICON_VIEW, Gtk::Container, GtkContainer)
_IMPLEMENTS_INTERFACE(CellLayout)
+ _IMPLEMENTS_INTERFACE(Scrollable)
public:
_CTOR_DEFAULT()
@@ -392,8 +396,6 @@ public:
_WRAP_METHOD(void set_tooltip_column(int column), gtk_icon_view_set_tooltip_column)
_WRAP_METHOD(int get_tooltip_column() const, gtk_icon_view_get_tooltip_column)
-#m4 _CONVERSION(`GtkAdjustment*',`const Glib::RefPtr<Adjustment>&',`Glib::wrap($3, true)')
- _WRAP_SIGNAL(void set_scroll_adjustments(const Glib::RefPtr<Adjustment>& hadjustment, const Glib::RefPtr<Adjustment>& vadjustment), set_scroll_adjustments)
_WRAP_SIGNAL(void item_activated(const TreeModel::Path& path), item_activated)
_WRAP_SIGNAL(void selection_changed(), selection_changed)
diff --git a/gtk/src/layout.hg b/gtk/src/layout.hg
index c0d390b..e1eafb7 100644
--- a/gtk/src/layout.hg
+++ b/gtk/src/layout.hg
@@ -21,6 +21,7 @@
#include <gtkmm/container.h>
#include <gtkmm/adjustment.h>
+#include <gtkmm/scrollable.h>
#include <gdkmm/window.h>
_DEFS(gtkmm,gtk)
@@ -42,9 +43,12 @@ namespace Gtk
* @ingroup Widgets
* @ingroup Containers
*/
-class Layout : public Container
+class Layout
+ : public Container,
+ public Scrollable
{
_CLASS_GTKOBJECT(Layout,GtkLayout,GTK_LAYOUT,Gtk::Container,GtkContainer)
+ _IMPLEMENTS_INTERFACE(Scrollable)
_IGNORE(gtk_layout_freeze, gtk_layout_thaw)
public:
Layout();
@@ -71,10 +75,6 @@ public:
_WRAP_METHOD(Glib::RefPtr<Adjustment> get_vadjustment(), gtk_layout_get_vadjustment)
_WRAP_METHOD(Glib::RefPtr<const Adjustment> get_vadjustment() const, gtk_layout_get_vadjustment, constversion)
-#m4 _CONVERSION(`GtkAdjustment*',`const Glib::RefPtr<Adjustment>&',`Glib::wrap($3, true)')
- // See Gtk::Widget::set_scroll_adjustments()
- _WRAP_SIGNAL(void set_scroll_adjustments(const Glib::RefPtr<Adjustment>& hadj, const Glib::RefPtr<Adjustment>& vadj), "set_scroll_adjustments")
-
_WRAP_PROPERTY("hadjustment", Glib::RefPtr<Adjustment>)
_WRAP_PROPERTY("vadjustment", Glib::RefPtr<Adjustment>)
_WRAP_PROPERTY("width", guint)
diff --git a/gtk/src/scrollable.ccg b/gtk/src/scrollable.ccg
new file mode 100644
index 0000000..7bede42
--- /dev/null
+++ b/gtk/src/scrollable.ccg
@@ -0,0 +1,18 @@
+/* Copyright 2010 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 <gtk/gtk.h>
diff --git a/gtk/src/scrollable.hg b/gtk/src/scrollable.hg
new file mode 100644
index 0000000..94453ec
--- /dev/null
+++ b/gtk/src/scrollable.hg
@@ -0,0 +1,61 @@
+/* Copyright (C) 2010 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 <glibmm/interface.h>
+#include <gtkmm/enums.h>
+#include <gtk/gtk.h> //TODO: Hide this?
+_DEFS(gtkmm,gtk)
+_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'.
+ *
+ * @newin{2,16}
+ */
+class Scrollable : public Glib::Interface
+{
+ _CLASS_INTERFACE(Scrollable, GtkScrollable, GTK_SCROLLABLE, GtkScrollableInterface)
+
+public:
+ _WRAP_METHOD(Glib::RefPtr<Adjustment> get_hadjustment(), gtk_scrollable_get_hadjustment)
+ _WRAP_METHOD(Glib::RefPtr<const Adjustment> get_hadjustment() const, gtk_scrollable_get_hadjustment)
+
+ _WRAP_METHOD(void set_hadjustment(const Glib::RefPtr<Adjustment>& hadjustment), gtk_scrollable_set_hadjustment)
+
+ _WRAP_METHOD(Glib::RefPtr<Adjustment> get_vadjustment(), gtk_scrollable_get_vadjustment)
+ _WRAP_METHOD(Glib::RefPtr<const Adjustment> get_vadjustment() const, gtk_scrollable_get_vadjustment)
+
+ _WRAP_METHOD(void set_vadjustment(const Glib::RefPtr<Adjustment>& hadjustment), gtk_scrollable_set_vadjustment)
+
+
+ _WRAP_METHOD(int get_min_display_width() const, gtk_scrollable_get_min_display_width)
+ _WRAP_METHOD(void set_min_display_width(int width), gtk_scrollable_set_min_display_width)
+
+ _WRAP_METHOD(int get_min_display_height() const, gtk_scrollable_get_min_display_height)
+ _WRAP_METHOD(void set_min_display_height(int width), gtk_scrollable_set_min_display_height)
+
+ //TODO: Properties and signals.
+};
+
+} // namespace Gtk
diff --git a/gtk/src/textview.hg b/gtk/src/textview.hg
index e9f5d3f..a9b63ee 100644
--- a/gtk/src/textview.hg
+++ b/gtk/src/textview.hg
@@ -22,6 +22,7 @@
_CONFIGINCLUDE(gtkmmconfig.h)
#include <gtkmm/container.h>
+#include <gtkmm/scrollable.h>
#include <gtkmm/textbuffer.h>
#include <gtkmm/textmark.h>
#include <gtkmm/menu.h>
@@ -51,9 +52,12 @@ _WRAP_ENUM(TextWindowType, GtkTextWindowType)
* @ingroup Containers
* @ingroup TextView
*/
-class TextView : public Container
+class TextView
+ : public Container,
+ public Scrollable
{
_CLASS_GTKOBJECT(TextView, GtkTextView, GTK_TEXT_VIEW, Gtk::Container, GtkContainer)
+ _IMPLEMENTS_INTERFACE(Scrollable)
public:
_CTOR_DEFAULT()
explicit TextView(const Glib::RefPtr<TextBuffer>& buffer);
@@ -193,8 +197,6 @@ public:
_WRAP_METHOD(void set_accepts_tab(bool accepts_tab = true), gtk_text_view_set_accepts_tab)
_WRAP_METHOD(bool get_accepts_tab() const, gtk_text_view_get_accepts_tab)
-#m4 _CONVERSION(`GtkAdjustment*',`const Glib::RefPtr<Adjustment>&',`Glib::wrap($3, true)')
- _WRAP_SIGNAL(void set_scroll_adjustments(const Glib::RefPtr<Adjustment>& hadjustment, const Glib::RefPtr<Adjustment>& vadjustment), "set_scroll_adjustments")
_WRAP_SIGNAL(void populate_popup(Menu* menu), "populate_popup")
_WRAP_SIGNAL(void set_anchor(), "set_anchor")
diff --git a/gtk/src/treeview.hg b/gtk/src/treeview.hg
index 8fecc7f..fc4877f 100644
--- a/gtk/src/treeview.hg
+++ b/gtk/src/treeview.hg
@@ -26,6 +26,7 @@ _CONFIGINCLUDE(gtkmmconfig.h)
#include <gtkmm/treeselection.h>
#include <gtkmm/treemodelcolumn.h>
#include <gtkmm/cellrenderer.h>
+#include <gtkmm/scrollable.h>
#include <gtkmm/targetentry.h>
#include <gtkmm/entry.h>
#include <gtkmm/tooltip.h>
@@ -95,9 +96,12 @@ class TreeModel;
* @ingroup Containers
* @ingroup TreeView
*/
-class TreeView : public Container
+class TreeView
+ : public Container,
+ public Scrollable
{
_CLASS_GTKOBJECT(TreeView, GtkTreeView, GTK_TREE_VIEW, Gtk::Container, GtkContainer)
+ _IMPLEMENTS_INTERFACE(Scrollable)
_IGNORE(gtk_tree_view_get_path_at_pos, gtk_tree_view_set_destroy_count_func, gtk_tree_view_get_cursor
gtk_tree_view_insert_column_with_data_func, gtk_tree_view_get_drag_dest_row, gtk_tree_view_get_dest_row_at_pos)
public:
@@ -773,10 +777,6 @@ dnl // GtkTreeModel*.
_CONVERSION(`GtkTreeIter*',`const TreeModel::iterator&',`TreeModel::iterator(gtk_tree_view_get_model(self), $3)')
#m4end
-#m4 _CONVERSION(`GtkAdjustment*',`const Glib::RefPtr<Adjustment>&',`Glib::wrap($3, true)')
-//TODO: Ignore this? It's in many widgets and seems internals.
- _WRAP_SIGNAL(void set_scroll_adjustments(const Glib::RefPtr<Adjustment>& hadjustment, const Glib::RefPtr<Adjustment>& vadjustment), "set-scroll-adjustments")
-
_WRAP_SIGNAL(void row_activated(const TreeModel::Path& path, TreeViewColumn* column) , "row-activated")
_WRAP_SIGNAL(bool test_expand_row(const TreeModel::iterator& iter, const TreeModel::Path& path), "test-expand-row")
_WRAP_SIGNAL(bool test_collapse_row(const TreeModel::iterator& iter, const TreeModel::Path& path), "test-collapse-row")
diff --git a/gtk/src/viewport.hg b/gtk/src/viewport.hg
index 7a7ccaf..57d09ac 100644
--- a/gtk/src/viewport.hg
+++ b/gtk/src/viewport.hg
@@ -20,6 +20,8 @@
*/
#include <gtkmm/bin.h>
+#include <gtkmm/scrollable.h>
+
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/bin_p.h)
@@ -32,9 +34,12 @@ class Adjustment;
* @ingroup Widgets
* @ingroup Containers
*/
-class Viewport : public Bin
+class Viewport
+ : public Bin,
+ public Scrollable
{
_CLASS_GTKOBJECT(Viewport,GtkViewport,GTK_VIEWPORT,Gtk::Bin,GtkBin)
+ _IMPLEMENTS_INTERFACE(Scrollable)
public:
_WRAP_CTOR(Viewport(const Glib::RefPtr<Adjustment>& hadjustment, const Glib::RefPtr<Adjustment>& vadjustment), gtk_viewport_new)
diff --git a/gtk/src/widget.hg b/gtk/src/widget.hg
index 1cb6410..648d39b 100644
--- a/gtk/src/widget.hg
+++ b/gtk/src/widget.hg
@@ -114,8 +114,6 @@ public:
friend class Main;
_CUSTOM_DTOR
- _WRAP_METHOD(bool set_scroll_adjustments(const Glib::RefPtr<Adjustment>& hadjustment, const Glib::RefPtr<Adjustment>& vadjustment), gtk_widget_set_scroll_adjustments)
-
_WRAP_METHOD(void show(), gtk_widget_show)
_WRAP_METHOD(void show_now(), gtk_widget_show_now)
_WRAP_METHOD(void hide(), gtk_widget_hide)
diff --git a/tools/extra_defs_gen/generate_defs_gtk.cc b/tools/extra_defs_gen/generate_defs_gtk.cc
index ba9a223..bb97010 100644
--- a/tools/extra_defs_gen/generate_defs_gtk.cc
+++ b/tools/extra_defs_gen/generate_defs_gtk.cc
@@ -155,6 +155,7 @@ int main(int argc, char** argv)
<< get_defs( GTK_TYPE_RULER )
<< get_defs( GTK_TYPE_SCALE )
<< get_defs( GTK_TYPE_SCALE_BUTTON )
+ << get_defs( GTK_TYPE_SCROLLABLE )
<< get_defs( GTK_TYPE_SCROLLBAR )
<< get_defs( GTK_TYPE_SCROLLED_WINDOW )
<< get_defs( GTK_TYPE_SEPARATOR )
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]