summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog30
-rw-r--r--ChangeLog.pre-2-030
-rw-r--r--ChangeLog.pre-2-1030
-rw-r--r--ChangeLog.pre-2-230
-rw-r--r--ChangeLog.pre-2-430
-rw-r--r--ChangeLog.pre-2-630
-rw-r--r--ChangeLog.pre-2-830
-rw-r--r--gtk/gtk.defs15
-rw-r--r--gtk/gtkadjustment.c2
-rw-r--r--gtk/gtkadjustment.h8
-rw-r--r--gtk/gtkalignment.h1
-rw-r--r--gtk/gtkclist.c8
-rw-r--r--gtk/gtkclist.h18
-rw-r--r--gtk/gtkctree.c8
-rw-r--r--gtk/gtkctree.h12
-rw-r--r--gtk/gtkobject.c7
-rw-r--r--gtk/gtkscrolledwindow.c111
-rw-r--r--gtk/gtkscrolledwindow.h10
-rw-r--r--gtk/gtktypebuiltins.h4
-rw-r--r--gtk/gtktypebuiltins_evals.c15
-rw-r--r--gtk/gtktypebuiltins_ids.c4
-rw-r--r--gtk/gtktypebuiltins_vars.c2
-rw-r--r--gtk/gtkviewport.c141
-rw-r--r--gtk/gtkviewport.h12
-rw-r--r--gtk/gtkwidget.c8
-rw-r--r--gtk/gtkwidget.h4
26 files changed, 514 insertions, 86 deletions
diff --git a/ChangeLog b/ChangeLog
index 43a7f540ce..9b88bb27d4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,33 @@
+Thu Jul 16 01:27:15 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.h:
+ * gtk/gtkwidget.c (gtk_widget_set_usize): handle negative values
+ similar to gtk_widget_set_uposition(). that is: -1=unspecified,
+ -2=leave untouched. changed the width/height field of GtkWidgetAuxInfo
+ to be gint16s rather than guint16s, since that's what the code expected
+ (for a long time actually).
+
+ * gtk/gtkviewport.c:
+ added support for object arguments: GtkViewport::shadow_type,
+ GtkViewport::vadjustment and GtkViewport::hadjustment.
+ (gtk_viewport_add): chain gtk_bin_add.
+
+ * gtk/gtkscrolledwindow.c:
+ added support for object argument: GtkScrolledWindow::hscrollbar_policy,
+ GtkScrolledWindow::vscrollbar_policy and GtkScrolledWindow::viewport.
+
+ * gtk/gtkadjustment.h:
+ * gtk/gtkadjustment.c:
+ * gtk/gtkctree.h:
+ * gtk/gtkclist.h:
+ * gtk/gtkctree.c:
+ * gtk/gtkclist.c:
+ * gtk/gtkscrolledwindow.h:
+ * gtk/gtkscrolledwindow.c:
+ * gtk/gtkviewport.h:
+ * gtk/gtkviewport.c:
+ GtkType and macro fixups.
+
Thu Jul 16 01:10:02 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.h :
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 43a7f540ce..9b88bb27d4 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,33 @@
+Thu Jul 16 01:27:15 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.h:
+ * gtk/gtkwidget.c (gtk_widget_set_usize): handle negative values
+ similar to gtk_widget_set_uposition(). that is: -1=unspecified,
+ -2=leave untouched. changed the width/height field of GtkWidgetAuxInfo
+ to be gint16s rather than guint16s, since that's what the code expected
+ (for a long time actually).
+
+ * gtk/gtkviewport.c:
+ added support for object arguments: GtkViewport::shadow_type,
+ GtkViewport::vadjustment and GtkViewport::hadjustment.
+ (gtk_viewport_add): chain gtk_bin_add.
+
+ * gtk/gtkscrolledwindow.c:
+ added support for object argument: GtkScrolledWindow::hscrollbar_policy,
+ GtkScrolledWindow::vscrollbar_policy and GtkScrolledWindow::viewport.
+
+ * gtk/gtkadjustment.h:
+ * gtk/gtkadjustment.c:
+ * gtk/gtkctree.h:
+ * gtk/gtkclist.h:
+ * gtk/gtkctree.c:
+ * gtk/gtkclist.c:
+ * gtk/gtkscrolledwindow.h:
+ * gtk/gtkscrolledwindow.c:
+ * gtk/gtkviewport.h:
+ * gtk/gtkviewport.c:
+ GtkType and macro fixups.
+
Thu Jul 16 01:10:02 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.h :
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 43a7f540ce..9b88bb27d4 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,33 @@
+Thu Jul 16 01:27:15 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.h:
+ * gtk/gtkwidget.c (gtk_widget_set_usize): handle negative values
+ similar to gtk_widget_set_uposition(). that is: -1=unspecified,
+ -2=leave untouched. changed the width/height field of GtkWidgetAuxInfo
+ to be gint16s rather than guint16s, since that's what the code expected
+ (for a long time actually).
+
+ * gtk/gtkviewport.c:
+ added support for object arguments: GtkViewport::shadow_type,
+ GtkViewport::vadjustment and GtkViewport::hadjustment.
+ (gtk_viewport_add): chain gtk_bin_add.
+
+ * gtk/gtkscrolledwindow.c:
+ added support for object argument: GtkScrolledWindow::hscrollbar_policy,
+ GtkScrolledWindow::vscrollbar_policy and GtkScrolledWindow::viewport.
+
+ * gtk/gtkadjustment.h:
+ * gtk/gtkadjustment.c:
+ * gtk/gtkctree.h:
+ * gtk/gtkclist.h:
+ * gtk/gtkctree.c:
+ * gtk/gtkclist.c:
+ * gtk/gtkscrolledwindow.h:
+ * gtk/gtkscrolledwindow.c:
+ * gtk/gtkviewport.h:
+ * gtk/gtkviewport.c:
+ GtkType and macro fixups.
+
Thu Jul 16 01:10:02 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.h :
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 43a7f540ce..9b88bb27d4 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,33 @@
+Thu Jul 16 01:27:15 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.h:
+ * gtk/gtkwidget.c (gtk_widget_set_usize): handle negative values
+ similar to gtk_widget_set_uposition(). that is: -1=unspecified,
+ -2=leave untouched. changed the width/height field of GtkWidgetAuxInfo
+ to be gint16s rather than guint16s, since that's what the code expected
+ (for a long time actually).
+
+ * gtk/gtkviewport.c:
+ added support for object arguments: GtkViewport::shadow_type,
+ GtkViewport::vadjustment and GtkViewport::hadjustment.
+ (gtk_viewport_add): chain gtk_bin_add.
+
+ * gtk/gtkscrolledwindow.c:
+ added support for object argument: GtkScrolledWindow::hscrollbar_policy,
+ GtkScrolledWindow::vscrollbar_policy and GtkScrolledWindow::viewport.
+
+ * gtk/gtkadjustment.h:
+ * gtk/gtkadjustment.c:
+ * gtk/gtkctree.h:
+ * gtk/gtkclist.h:
+ * gtk/gtkctree.c:
+ * gtk/gtkclist.c:
+ * gtk/gtkscrolledwindow.h:
+ * gtk/gtkscrolledwindow.c:
+ * gtk/gtkviewport.h:
+ * gtk/gtkviewport.c:
+ GtkType and macro fixups.
+
Thu Jul 16 01:10:02 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.h :
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 43a7f540ce..9b88bb27d4 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,33 @@
+Thu Jul 16 01:27:15 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.h:
+ * gtk/gtkwidget.c (gtk_widget_set_usize): handle negative values
+ similar to gtk_widget_set_uposition(). that is: -1=unspecified,
+ -2=leave untouched. changed the width/height field of GtkWidgetAuxInfo
+ to be gint16s rather than guint16s, since that's what the code expected
+ (for a long time actually).
+
+ * gtk/gtkviewport.c:
+ added support for object arguments: GtkViewport::shadow_type,
+ GtkViewport::vadjustment and GtkViewport::hadjustment.
+ (gtk_viewport_add): chain gtk_bin_add.
+
+ * gtk/gtkscrolledwindow.c:
+ added support for object argument: GtkScrolledWindow::hscrollbar_policy,
+ GtkScrolledWindow::vscrollbar_policy and GtkScrolledWindow::viewport.
+
+ * gtk/gtkadjustment.h:
+ * gtk/gtkadjustment.c:
+ * gtk/gtkctree.h:
+ * gtk/gtkclist.h:
+ * gtk/gtkctree.c:
+ * gtk/gtkclist.c:
+ * gtk/gtkscrolledwindow.h:
+ * gtk/gtkscrolledwindow.c:
+ * gtk/gtkviewport.h:
+ * gtk/gtkviewport.c:
+ GtkType and macro fixups.
+
Thu Jul 16 01:10:02 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.h :
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 43a7f540ce..9b88bb27d4 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,33 @@
+Thu Jul 16 01:27:15 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.h:
+ * gtk/gtkwidget.c (gtk_widget_set_usize): handle negative values
+ similar to gtk_widget_set_uposition(). that is: -1=unspecified,
+ -2=leave untouched. changed the width/height field of GtkWidgetAuxInfo
+ to be gint16s rather than guint16s, since that's what the code expected
+ (for a long time actually).
+
+ * gtk/gtkviewport.c:
+ added support for object arguments: GtkViewport::shadow_type,
+ GtkViewport::vadjustment and GtkViewport::hadjustment.
+ (gtk_viewport_add): chain gtk_bin_add.
+
+ * gtk/gtkscrolledwindow.c:
+ added support for object argument: GtkScrolledWindow::hscrollbar_policy,
+ GtkScrolledWindow::vscrollbar_policy and GtkScrolledWindow::viewport.
+
+ * gtk/gtkadjustment.h:
+ * gtk/gtkadjustment.c:
+ * gtk/gtkctree.h:
+ * gtk/gtkclist.h:
+ * gtk/gtkctree.c:
+ * gtk/gtkclist.c:
+ * gtk/gtkscrolledwindow.h:
+ * gtk/gtkscrolledwindow.c:
+ * gtk/gtkviewport.h:
+ * gtk/gtkviewport.c:
+ GtkType and macro fixups.
+
Thu Jul 16 01:10:02 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.h :
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 43a7f540ce..9b88bb27d4 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,33 @@
+Thu Jul 16 01:27:15 1998 Tim Janik <timj@gtk.org>
+
+ * gtk/gtkwidget.h:
+ * gtk/gtkwidget.c (gtk_widget_set_usize): handle negative values
+ similar to gtk_widget_set_uposition(). that is: -1=unspecified,
+ -2=leave untouched. changed the width/height field of GtkWidgetAuxInfo
+ to be gint16s rather than guint16s, since that's what the code expected
+ (for a long time actually).
+
+ * gtk/gtkviewport.c:
+ added support for object arguments: GtkViewport::shadow_type,
+ GtkViewport::vadjustment and GtkViewport::hadjustment.
+ (gtk_viewport_add): chain gtk_bin_add.
+
+ * gtk/gtkscrolledwindow.c:
+ added support for object argument: GtkScrolledWindow::hscrollbar_policy,
+ GtkScrolledWindow::vscrollbar_policy and GtkScrolledWindow::viewport.
+
+ * gtk/gtkadjustment.h:
+ * gtk/gtkadjustment.c:
+ * gtk/gtkctree.h:
+ * gtk/gtkclist.h:
+ * gtk/gtkctree.c:
+ * gtk/gtkclist.c:
+ * gtk/gtkscrolledwindow.h:
+ * gtk/gtkscrolledwindow.c:
+ * gtk/gtkviewport.h:
+ * gtk/gtkviewport.c:
+ GtkType and macro fixups.
+
Thu Jul 16 01:10:02 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkctree.h :
diff --git a/gtk/gtk.defs b/gtk/gtk.defs
index 04c905f8b0..8c8dc0d9f4 100644
--- a/gtk/gtk.defs
+++ b/gtk/gtk.defs
@@ -23,6 +23,14 @@
(tabbed GTK_CTREE_LINES_TABBED)
(none GTK_CTREE_LINES_NONE))
+(define-enum GtkCTreeExpansion
+ (expand GTK_CTREE_EXPANSION_EXPAND)
+ (expand-recursive GTK_CTREE_EXPANSION_EXPAND_RECURSIVE)
+ (collapse GTK_CTREE_EXPANSION_COLLAPSE)
+ (collapse-recursive GTK_CTREE_EXPANSION_COLLAPSE_RECURSIVE)
+ (toggle GTK_CTREE_EXPANSION_TOGGLE)
+ (toggle-recursive GTK_CTREE_EXPANSION_TOGGLE_RECURSIVE))
+
; enumerations from "./gtkdebug.h"
(define-flags GtkDebugFlag
@@ -362,6 +370,13 @@
(color-context GDK_DEBUG_COLOR_CONTEXT)
(xim GDK_DEBUG_XIM))
+; enumerations from "../gdk/gdkrgb.h"
+
+(define-enum GdkRgbDither
+ (none GDK_RGB_DITHER_NONE)
+ (normal GDK_RGB_DITHER_NORMAL)
+ (max GDK_RGB_DITHER_MAX))
+
; enumerations from "../gdk/gdktypes.h"
(define-enum GdkWindowType
diff --git a/gtk/gtkadjustment.c b/gtk/gtkadjustment.c
index af5780216a..5f0b4128b3 100644
--- a/gtk/gtkadjustment.c
+++ b/gtk/gtkadjustment.c
@@ -53,7 +53,7 @@ gtk_adjustment_get_type (void)
(GtkClassInitFunc) NULL,
};
- adjustment_type = gtk_type_unique (gtk_data_get_type (), &adjustment_info);
+ adjustment_type = gtk_type_unique (GTK_TYPE_DATA, &adjustment_info);
}
return adjustment_type;
diff --git a/gtk/gtkadjustment.h b/gtk/gtkadjustment.h
index 9c6570abe1..a2877dd844 100644
--- a/gtk/gtkadjustment.h
+++ b/gtk/gtkadjustment.h
@@ -30,9 +30,11 @@ extern "C" {
#endif /* __cplusplus */
-#define GTK_ADJUSTMENT(obj) (GTK_CHECK_CAST (obj, gtk_adjustment_get_type (), GtkAdjustment))
-#define GTK_ADJUSTMENT_CLASS(klass) (GTK_CHECK_CLASS_CAST (klass, gtk_adjustment_get_type (), GtkAdjustmentClass))
-#define GTK_IS_ADJUSTMENT(obj) (GTK_CHECK_TYPE (obj, gtk_adjustment_get_type ()))
+#define GTK_TYPE_ADJUSTMENT (gtk_adjustment_get_type ())
+#define GTK_ADJUSTMENT(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_ADJUSTMENT, GtkAdjustment))
+#define GTK_ADJUSTMENT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_ADJUSTMENT, GtkAdjustmentClass))
+#define GTK_IS_ADJUSTMENT(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_ADJUSTMENT))
+#define GTK_IS_ADJUSTMENT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ADJUSTMENT))
typedef struct _GtkAdjustment GtkAdjustment;
diff --git a/gtk/gtkalignment.h b/gtk/gtkalignment.h
index e260683803..9acba3ee48 100644
--- a/gtk/gtkalignment.h
+++ b/gtk/gtkalignment.h
@@ -26,6 +26,7 @@
#ifdef __cplusplus
extern "C" {
+#pragma }
#endif /* __cplusplus */
diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c
index f8cbe3326d..c17bacb72a 100644
--- a/gtk/gtkclist.c
+++ b/gtk/gtkclist.c
@@ -402,7 +402,7 @@ gtk_clist_get_type (void)
(GtkClassInitFunc) NULL,
};
- clist_type = gtk_type_unique (gtk_container_get_type (), &clist_info);
+ clist_type = gtk_type_unique (GTK_TYPE_CONTAINER, &clist_info);
}
return clist_type;
@@ -419,7 +419,7 @@ gtk_clist_class_init (GtkCListClass * klass)
widget_class = (GtkWidgetClass *) klass;
container_class = (GtkContainerClass *) klass;
- parent_class = gtk_type_class (gtk_container_get_type ());
+ parent_class = gtk_type_class (GTK_TYPE_CONTAINER);
clist_signals[SELECT_ROW] =
gtk_signal_new ("select_row",
@@ -961,7 +961,7 @@ gtk_clist_new_with_titles (gint columns,
g_return_val_if_fail (titles != NULL, NULL);
- widget = gtk_type_new (gtk_clist_get_type ());
+ widget = gtk_type_new (GTK_TYPE_CLIST);
gtk_clist_construct (GTK_CLIST (widget), columns, titles);
@@ -976,7 +976,7 @@ gtk_clist_new (gint columns)
if (columns < 1)
return NULL;
- clist = gtk_type_new (gtk_clist_get_type ());
+ clist = gtk_type_new (GTK_TYPE_CLIST);
gtk_clist_construct (clist, columns, NULL);
return GTK_WIDGET (clist);
}
diff --git a/gtk/gtkclist.h b/gtk/gtkclist.h
index ec347dda74..25f99d5596 100644
--- a/gtk/gtkclist.h
+++ b/gtk/gtkclist.h
@@ -57,15 +57,15 @@ typedef enum
GTK_CELL_WIDGET
} GtkCellType;
-#define GTK_TYPE_CLIST (gtk_clist_get_type ())
-#define GTK_CLIST(obj) (GTK_CHECK_CAST ((obj), gtk_clist_get_type (), GtkCList))
-#define GTK_CLIST_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), gtk_clist_get_type (), GtkCListClass))
-#define GTK_IS_CLIST(obj) (GTK_CHECK_TYPE ((obj), gtk_clist_get_type ()))
-#define GTK_IS_CLIST_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CLIST))
-
-#define GTK_CLIST_FLAGS(clist) (GTK_CLIST (clist)->flags)
-#define GTK_CLIST_SET_FLAG(clist,flag) (GTK_CLIST_FLAGS (clist) |= (GTK_ ## flag))
-#define GTK_CLIST_UNSET_FLAG(clist,flag) (GTK_CLIST_FLAGS (clist) &= ~(GTK_ ## flag))
+#define GTK_TYPE_CLIST (gtk_clist_get_type ())
+#define GTK_CLIST(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CLIST, GtkCList))
+#define GTK_CLIST_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CLIST, GtkCListClass))
+#define GTK_IS_CLIST(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CLIST))
+#define GTK_IS_CLIST_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CLIST))
+
+#define GTK_CLIST_FLAGS(clist) (GTK_CLIST (clist)->flags)
+#define GTK_CLIST_SET_FLAG(clist,flag) (GTK_CLIST_FLAGS (clist) |= (GTK_ ## flag))
+#define GTK_CLIST_UNSET_FLAG(clist,flag) (GTK_CLIST_FLAGS (clist) &= ~(GTK_ ## flag))
#define GTK_CLIST_FROZEN(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_FROZEN)
#define GTK_CLIST_IN_DRAG(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_IN_DRAG)
diff --git a/gtk/gtkctree.c b/gtk/gtkctree.c
index 503b163fe6..6171c2820c 100644
--- a/gtk/gtkctree.c
+++ b/gtk/gtkctree.c
@@ -265,7 +265,7 @@ gtk_ctree_get_type (void)
(GtkClassInitFunc) NULL,
};
- ctree_type = gtk_type_unique (gtk_clist_get_type (), &ctree_info);
+ ctree_type = gtk_type_unique (GTK_TYPE_CLIST, &ctree_info);
}
return ctree_type;
@@ -337,8 +337,8 @@ gtk_ctree_class_init (GtkCTreeClass *klass)
container_class = (GtkContainerClass *) klass;
clist_class = (GtkCListClass *) klass;
- parent_class = gtk_type_class (gtk_clist_get_type ());
- container_class = gtk_type_class (gtk_container_get_type ());
+ parent_class = gtk_type_class (GTK_TYPE_CLIST);
+ container_class = gtk_type_class (GTK_TYPE_CONTAINER);
ctree_signals[TREE_SELECT_ROW] =
gtk_signal_new ("tree_select_row",
@@ -3728,7 +3728,7 @@ gtk_ctree_new_with_titles (gint columns,
g_return_val_if_fail (columns > 0, NULL);
g_return_val_if_fail (tree_column >= 0 && tree_column < columns, NULL);
- widget = gtk_type_new (gtk_ctree_get_type ());
+ widget = gtk_type_new (GTK_TYPE_CTREE);
gtk_ctree_construct (GTK_CTREE (widget), columns, tree_column, titles);
return widget;
}
diff --git a/gtk/gtkctree.h b/gtk/gtkctree.h
index d13f6ca1c4..58f2edab46 100644
--- a/gtk/gtkctree.h
+++ b/gtk/gtkctree.h
@@ -31,12 +31,12 @@ extern "C"
{
#endif /* __cplusplus */
-#define GTK_CTREE(obj) \
- (GTK_CHECK_CAST ((obj), gtk_ctree_get_type (), GtkCTree))
-#define GTK_CTREE_CLASS(klass) \
- (GTK_CHECK_CLASS_CAST ((klass), gtk_ctree_get_type (), GtkCTreeClass))
-#define GTK_IS_CTREE(obj) \
- (GTK_CHECK_TYPE ((obj), gtk_ctree_get_type ()))
+#define GTK_TYPE_CTREE (gtk_ctree_get_type ())
+#define GTK_CTREE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CTREE, GtkCTree))
+#define GTK_CTREE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CTREE, GtkCTreeClass))
+#define GTK_IS_CTREE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CTREE))
+#define GTK_IS_CTREE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CTREE))
+
#define GTK_CTREE_ROW(_glist_) ((GtkCTreeRow *)((_glist_)->data))
#define GTK_CTREE_TREE(_ctree_, _glist_) \
((GtkCellTree *) &(((GtkCTreeRow *)((_glist_)->data))->cell[(_ctree_)->tree_col]))
diff --git a/gtk/gtkobject.c b/gtk/gtkobject.c
index dd7742939b..23842dee8b 100644
--- a/gtk/gtkobject.c
+++ b/gtk/gtkobject.c
@@ -855,9 +855,12 @@ gtk_object_add_arg_type (const char *arg_name,
g_return_if_fail (arg_name != NULL);
g_return_if_fail (arg_type > GTK_TYPE_NONE);
g_return_if_fail (arg_id > 0);
- g_return_if_fail ((arg_flags & GTK_ARG_READWRITE) != 0);
g_return_if_fail ((arg_flags & GTK_ARG_CHILD_ARG) == 0);
-
+ if (arg_flags & GTK_ARG_CONSTRUCT)
+ g_return_if_fail ((arg_flags & GTK_ARG_READWRITE) == GTK_ARG_READWRITE);
+ else
+ g_return_if_fail ((arg_flags & GTK_ARG_READWRITE) != 0);
+
if (!object_arg_info_ht)
object_arg_info_ht = g_hash_table_new (gtk_arg_info_hash,
gtk_arg_info_equal);
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 82fb86d64e..eddc77831c 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -22,9 +22,22 @@
#define SCROLLBAR_SPACING(w) (GTK_SCROLLED_WINDOW_CLASS (GTK_OBJECT (w)->klass)->scrollbar_spacing)
+enum {
+ ARG_0,
+ ARG_VIEWPORT,
+ ARG_HSCROLLBAR_POLICY,
+ ARG_VSCROLLBAR_POLICY
+};
+
static void gtk_scrolled_window_class_init (GtkScrolledWindowClass *klass);
static void gtk_scrolled_window_init (GtkScrolledWindow *scrolled_window);
+static void gtk_scrolled_window_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void gtk_scrolled_window_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
static void gtk_scrolled_window_destroy (GtkObject *object);
static void gtk_scrolled_window_finalize (GtkObject *object);
static void gtk_scrolled_window_map (GtkWidget *widget);
@@ -51,10 +64,10 @@ static void gtk_scrolled_window_adjustment_changed (GtkAdjustment *adju
static GtkContainerClass *parent_class = NULL;
-guint
+GtkType
gtk_scrolled_window_get_type (void)
{
- static guint scrolled_window_type = 0;
+ static GtkType scrolled_window_type = 0;
if (!scrolled_window_type)
{
@@ -70,7 +83,7 @@ gtk_scrolled_window_get_type (void)
(GtkClassInitFunc) NULL,
};
- scrolled_window_type = gtk_type_unique (gtk_container_get_type (), &scrolled_window_info);
+ scrolled_window_type = gtk_type_unique (GTK_TYPE_CONTAINER, &scrolled_window_info);
}
return scrolled_window_type;
@@ -86,9 +99,23 @@ gtk_scrolled_window_class_init (GtkScrolledWindowClass *class)
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
container_class = (GtkContainerClass*) class;
-
- parent_class = gtk_type_class (gtk_container_get_type ());
-
+ parent_class = gtk_type_class (GTK_TYPE_CONTAINER);
+
+ gtk_object_add_arg_type ("GtkScrolledWindow::viewport",
+ GTK_TYPE_VIEWPORT,
+ GTK_ARG_READWRITE | GTK_ARG_CONSTRUCT,
+ ARG_VIEWPORT);
+ gtk_object_add_arg_type ("GtkScrolledWindow::hscrollbar_policy",
+ GTK_TYPE_POLICY_TYPE,
+ GTK_ARG_READWRITE,
+ ARG_HSCROLLBAR_POLICY);
+ gtk_object_add_arg_type ("GtkScrolledWindow::vscrollbar_policy",
+ GTK_TYPE_POLICY_TYPE,
+ GTK_ARG_READWRITE,
+ ARG_VSCROLLBAR_POLICY);
+
+ object_class->set_arg = gtk_scrolled_window_set_arg;
+ object_class->get_arg = gtk_scrolled_window_get_arg;
object_class->destroy = gtk_scrolled_window_destroy;
object_class->finalize = gtk_scrolled_window_finalize;
@@ -106,6 +133,67 @@ gtk_scrolled_window_class_init (GtkScrolledWindowClass *class)
}
static void
+gtk_scrolled_window_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
+{
+ GtkScrolledWindow *scrolled_window;
+
+ scrolled_window = GTK_SCROLLED_WINDOW (object);
+
+ switch (arg_id)
+ {
+ GtkWidget *viewport;
+
+ case ARG_VIEWPORT:
+ g_return_if_fail (scrolled_window->viewport == NULL);
+ viewport = GTK_VALUE_POINTER (*arg);
+ if (!viewport)
+ viewport = gtk_viewport_new (NULL, NULL);
+ scrolled_window->viewport = viewport;
+ gtk_scrolled_window_construct (scrolled_window, NULL, NULL);
+ case ARG_HSCROLLBAR_POLICY:
+ gtk_scrolled_window_set_policy (scrolled_window,
+ GTK_VALUE_ENUM (*arg),
+ scrolled_window->vscrollbar_policy);
+ break;
+ case ARG_VSCROLLBAR_POLICY:
+ gtk_scrolled_window_set_policy (scrolled_window,
+ scrolled_window->hscrollbar_policy,
+ GTK_VALUE_ENUM (*arg));
+ break;
+ default:
+ break;
+ }
+}
+
+static void
+gtk_scrolled_window_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
+{
+ GtkScrolledWindow *scrolled_window;
+
+ scrolled_window = GTK_SCROLLED_WINDOW (object);
+
+ switch (arg_id)
+ {
+ case ARG_VIEWPORT:
+ GTK_VALUE_POINTER (*arg) = scrolled_window->viewport;
+ break;
+ case ARG_HSCROLLBAR_POLICY:
+ GTK_VALUE_ENUM (*arg) = scrolled_window->hscrollbar_policy;
+ break;
+ case ARG_VSCROLLBAR_POLICY:
+ GTK_VALUE_ENUM (*arg) = scrolled_window->vscrollbar_policy;
+ break;
+ default:
+ arg->type = GTK_TYPE_INVALID;
+ break;
+ }
+}
+
+static void
gtk_scrolled_window_init (GtkScrolledWindow *scrolled_window)
{
GTK_WIDGET_SET_FLAGS (scrolled_window, GTK_NO_WINDOW);
@@ -124,7 +212,7 @@ gtk_scrolled_window_new (GtkAdjustment *hadjustment,
{
GtkWidget *scrolled_window;
- scrolled_window = gtk_type_new (gtk_scrolled_window_get_type ());
+ scrolled_window = gtk_type_new (GTK_TYPE_SCROLLED_WINDOW);
gtk_scrolled_window_construct (GTK_SCROLLED_WINDOW (scrolled_window), hadjustment, vadjustment);
@@ -138,9 +226,14 @@ gtk_scrolled_window_construct (GtkScrolledWindow *scrolled_window,
{
g_return_if_fail (scrolled_window != NULL);
g_return_if_fail (GTK_IS_SCROLLED_WINDOW (scrolled_window));
- g_return_if_fail (scrolled_window->viewport == NULL);
+ g_return_if_fail (scrolled_window->hscrollbar == NULL);
+ g_return_if_fail (scrolled_window->vscrollbar == NULL);
+
+ if (scrolled_window->viewport)
+ g_return_if_fail (hadjustment == NULL && vadjustment == NULL);
+ else
+ scrolled_window->viewport = gtk_viewport_new (hadjustment, vadjustment);
- scrolled_window->viewport = gtk_viewport_new (hadjustment, vadjustment);
hadjustment = gtk_viewport_get_hadjustment (GTK_VIEWPORT (scrolled_window->viewport));
vadjustment = gtk_viewport_get_vadjustment (GTK_VIEWPORT (scrolled_window->viewport));
gtk_container_set_resize_mode (GTK_CONTAINER (scrolled_window->viewport), GTK_RESIZE_PARENT);
diff --git a/gtk/gtkscrolledwindow.h b/gtk/gtkscrolledwindow.h
index 595163fc6a..2c22202c30 100644
--- a/gtk/gtkscrolledwindow.h
+++ b/gtk/gtkscrolledwindow.h
@@ -31,9 +31,11 @@ extern "C" {
#endif /* __cplusplus */
-#define GTK_SCROLLED_WINDOW(obj) GTK_CHECK_CAST (obj, gtk_scrolled_window_get_type (), GtkScrolledWindow)
-#define GTK_SCROLLED_WINDOW_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_scrolled_window_get_type (), GtkScrolledWindowClass)
-#define GTK_IS_SCROLLED_WINDOW(obj) GTK_CHECK_TYPE (obj, gtk_scrolled_window_get_type ())
+#define GTK_TYPE_SCROLLED_WINDOW (gtk_scrolled_window_get_type ())
+#define GTK_SCROLLED_WINDOW(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_SCROLLED_WINDOW, GtkScrolledWindow))
+#define GTK_SCROLLED_WINDOW_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_SCROLLED_WINDOW, GtkScrolledWindowClass))
+#define GTK_IS_SCROLLED_WINDOW(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_SCROLLED_WINDOW))
+#define GTK_IS_SCROLLED_WINDOW_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SCROLLED_WINDOW))
typedef struct _GtkScrolledWindow GtkScrolledWindow;
@@ -61,7 +63,7 @@ struct _GtkScrolledWindowClass
};
-guint gtk_scrolled_window_get_type (void);
+GtkType gtk_scrolled_window_get_type (void);
GtkWidget* gtk_scrolled_window_new (GtkAdjustment *hadjustment,
GtkAdjustment *vadjustment);
void gtk_scrolled_window_construct (GtkScrolledWindow *scrolled_window,
diff --git a/gtk/gtktypebuiltins.h b/gtk/gtktypebuiltins.h
index 0c0a21c1e6..7078dea672 100644
--- a/gtk/gtktypebuiltins.h
+++ b/gtk/gtktypebuiltins.h
@@ -3,6 +3,7 @@
extern GtkType GTK_TYPE_CELL_TYPE;
extern GtkType GTK_TYPE_C_TREE_POS;
extern GtkType GTK_TYPE_C_TREE_LINE_STYLE;
+extern GtkType GTK_TYPE_C_TREE_EXPANSION;
extern GtkType GTK_TYPE_DEBUG_FLAG;
extern GtkType GTK_TYPE_ACCEL_FLAGS;
extern GtkType GTK_TYPE_ARROW_TYPE;
@@ -50,6 +51,7 @@ extern GtkType GTK_TYPE_TREE_VIEW_MODE;
extern GtkType GTK_TYPE_FUNDAMENTAL_TYPE;
extern GtkType GTK_TYPE_WIDGET_FLAGS;
extern GtkType GTK_TYPE_GDK_DEBUG_FLAG;
+extern GtkType GTK_TYPE_GDK_RGB_DITHER;
extern GtkType GTK_TYPE_GDK_WINDOW_TYPE;
extern GtkType GTK_TYPE_GDK_WINDOW_CLASS;
extern GtkType GTK_TYPE_GDK_IMAGE_TYPE;
@@ -101,4 +103,4 @@ extern GtkType GTK_TYPE_GDK_WINDOW;
extern GtkType GTK_TYPE_GDK_EVENT;
extern GtkType GTK_TYPE_GDK_COLOR;
-#define GTK_TYPE_NUM_BUILTINS (100)
+#define GTK_TYPE_NUM_BUILTINS (102)
diff --git a/gtk/gtktypebuiltins_evals.c b/gtk/gtktypebuiltins_evals.c
index d2c6ccffa4..bf32de2007 100644
--- a/gtk/gtktypebuiltins_evals.c
+++ b/gtk/gtktypebuiltins_evals.c
@@ -21,6 +21,15 @@ static GtkEnumValue _gtk_c_tree_line_style_values[] = {
{ GTK_CTREE_LINES_NONE, "GTK_CTREE_LINES_NONE", "none" },
{ 0, NULL, NULL }
};
+static GtkEnumValue _gtk_c_tree_expansion_values[] = {
+ { GTK_CTREE_EXPANSION_EXPAND, "GTK_CTREE_EXPANSION_EXPAND", "expand" },
+ { GTK_CTREE_EXPANSION_EXPAND_RECURSIVE, "GTK_CTREE_EXPANSION_EXPAND_RECURSIVE", "expand-recursive" },
+ { GTK_CTREE_EXPANSION_COLLAPSE, "GTK_CTREE_EXPANSION_COLLAPSE", "collapse" },
+ { GTK_CTREE_EXPANSION_COLLAPSE_RECURSIVE, "GTK_CTREE_EXPANSION_COLLAPSE_RECURSIVE", "collapse-recursive" },
+ { GTK_CTREE_EXPANSION_TOGGLE, "GTK_CTREE_EXPANSION_TOGGLE", "toggle" },
+ { GTK_CTREE_EXPANSION_TOGGLE_RECURSIVE, "GTK_CTREE_EXPANSION_TOGGLE_RECURSIVE", "toggle-recursive" },
+ { 0, NULL, NULL }
+};
static GtkEnumValue _gtk_debug_flag_values[] = {
{ GTK_DEBUG_OBJECTS, "GTK_DEBUG_OBJECTS", "objects" },
{ GTK_DEBUG_MISC, "GTK_DEBUG_MISC", "misc" },
@@ -383,6 +392,12 @@ static GtkEnumValue _gdk_debug_flag_values[] = {
{ GDK_DEBUG_XIM, "GDK_DEBUG_XIM", "xim" },
{ 0, NULL, NULL }
};
+static GtkEnumValue _gdk_rgb_dither_values[] = {
+ { GDK_RGB_DITHER_NONE, "GDK_RGB_DITHER_NONE", "none" },
+ { GDK_RGB_DITHER_NORMAL, "GDK_RGB_DITHER_NORMAL", "normal" },
+ { GDK_RGB_DITHER_MAX, "GDK_RGB_DITHER_MAX", "max" },
+ { 0, NULL, NULL }
+};
static GtkEnumValue _gdk_window_type_values[] = {
{ GDK_WINDOW_ROOT, "GDK_WINDOW_ROOT", "root" },
{ GDK_WINDOW_TOPLEVEL, "GDK_WINDOW_TOPLEVEL", "toplevel" },
diff --git a/gtk/gtktypebuiltins_ids.c b/gtk/gtktypebuiltins_ids.c
index 92e71c6642..4dd575f4c0 100644
--- a/gtk/gtktypebuiltins_ids.c
+++ b/gtk/gtktypebuiltins_ids.c
@@ -6,6 +6,8 @@
GTK_TYPE_ENUM, _gtk_c_tree_pos_values },
{ "GtkCTreeLineStyle", &GTK_TYPE_C_TREE_LINE_STYLE,
GTK_TYPE_ENUM, _gtk_c_tree_line_style_values },
+ { "GtkCTreeExpansion", &GTK_TYPE_C_TREE_EXPANSION,
+ GTK_TYPE_ENUM, _gtk_c_tree_expansion_values },
{ "GtkDebugFlag", &GTK_TYPE_DEBUG_FLAG,
GTK_TYPE_FLAGS, _gtk_debug_flag_values },
{ "GtkAccelFlags", &GTK_TYPE_ACCEL_FLAGS,
@@ -100,6 +102,8 @@
GTK_TYPE_FLAGS, _gtk_widget_flags_values },
{ "GdkDebugFlag", &GTK_TYPE_GDK_DEBUG_FLAG,
GTK_TYPE_FLAGS, _gdk_debug_flag_values },
+ { "GdkRgbDither", &GTK_TYPE_GDK_RGB_DITHER,
+ GTK_TYPE_ENUM, _gdk_rgb_dither_values },
{ "GdkWindowType", &GTK_TYPE_GDK_WINDOW_TYPE,
GTK_TYPE_ENUM, _gdk_window_type_values },
{ "GdkWindowClass", &GTK_TYPE_GDK_WINDOW_CLASS,
diff --git a/gtk/gtktypebuiltins_vars.c b/gtk/gtktypebuiltins_vars.c
index 9544a73b0d..3e196e44db 100644
--- a/gtk/gtktypebuiltins_vars.c
+++ b/gtk/gtktypebuiltins_vars.c
@@ -3,6 +3,7 @@
GtkType GTK_TYPE_CELL_TYPE = 0;
GtkType GTK_TYPE_C_TREE_POS = 0;
GtkType GTK_TYPE_C_TREE_LINE_STYLE = 0;
+GtkType GTK_TYPE_C_TREE_EXPANSION = 0;
GtkType GTK_TYPE_DEBUG_FLAG = 0;
GtkType GTK_TYPE_ACCEL_FLAGS = 0;
GtkType GTK_TYPE_ARROW_TYPE = 0;
@@ -50,6 +51,7 @@ GtkType GTK_TYPE_TREE_VIEW_MODE = 0;
GtkType GTK_TYPE_FUNDAMENTAL_TYPE = 0;
GtkType GTK_TYPE_WIDGET_FLAGS = 0;
GtkType GTK_TYPE_GDK_DEBUG_FLAG = 0;
+GtkType GTK_TYPE_GDK_RGB_DITHER = 0;
GtkType GTK_TYPE_GDK_WINDOW_TYPE = 0;
GtkType GTK_TYPE_GDK_WINDOW_CLASS = 0;
GtkType GTK_TYPE_GDK_IMAGE_TYPE = 0;
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c
index 7cea71787c..ffc3088adf 100644
--- a/gtk/gtkviewport.c
+++ b/gtk/gtkviewport.c
@@ -19,10 +19,24 @@
#include "gtksignal.h"
#include "gtkviewport.h"
+enum {
+ ARG_0,
+ ARG_HADJUSTMENT,
+ ARG_VADJUSTMENT,
+ ARG_SHADOW_TYPE
+};
+
+
static void gtk_viewport_class_init (GtkViewportClass *klass);
static void gtk_viewport_init (GtkViewport *viewport);
static void gtk_viewport_finalize (GtkObject *object);
+static void gtk_viewport_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
+static void gtk_viewport_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id);
static void gtk_viewport_map (GtkWidget *widget);
static void gtk_viewport_unmap (GtkWidget *widget);
static void gtk_viewport_realize (GtkWidget *widget);
@@ -46,10 +60,10 @@ static void gtk_viewport_adjustment_value_changed (GtkAdjustment *adjustment,
static GtkBinClass *parent_class;
-guint
+GtkType
gtk_viewport_get_type (void)
{
- static guint viewport_type = 0;
+ static GtkType viewport_type = 0;
if (!viewport_type)
{
@@ -65,7 +79,7 @@ gtk_viewport_get_type (void)
(GtkClassInitFunc) NULL,
};
- viewport_type = gtk_type_unique (gtk_bin_get_type (), &viewport_info);
+ viewport_type = gtk_type_unique (GTK_TYPE_BIN, &viewport_info);
}
return viewport_type;
@@ -81,8 +95,23 @@ gtk_viewport_class_init (GtkViewportClass *class)
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
container_class = (GtkContainerClass*) class;
- parent_class = (GtkBinClass*) gtk_type_class (gtk_bin_get_type ());
-
+ parent_class = (GtkBinClass*) gtk_type_class (GTK_TYPE_BIN);
+
+ gtk_object_add_arg_type ("GtkViewport::hadjustment",
+ GTK_TYPE_ADJUSTMENT,
+ GTK_ARG_READWRITE | GTK_ARG_CONSTRUCT,
+ ARG_HADJUSTMENT);
+ gtk_object_add_arg_type ("GtkViewport::vadjustment",
+ GTK_TYPE_ADJUSTMENT,
+ GTK_ARG_READWRITE | GTK_ARG_CONSTRUCT,
+ ARG_VADJUSTMENT);
+ gtk_object_add_arg_type ("GtkViewport::shadow_type",
+ GTK_TYPE_SHADOW_TYPE,
+ GTK_ARG_READWRITE,
+ ARG_SHADOW_TYPE);
+
+ object_class->set_arg = gtk_viewport_set_arg;
+ object_class->get_arg = gtk_viewport_get_arg;
object_class->finalize = gtk_viewport_finalize;
widget_class->map = gtk_viewport_map;
@@ -98,6 +127,66 @@ gtk_viewport_class_init (GtkViewportClass *class)
}
static void
+gtk_viewport_set_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
+{
+ GtkViewport *viewport;
+
+ viewport = GTK_VIEWPORT (object);
+
+ switch (arg_id)
+ {
+ GtkAdjustment *adjustment;
+
+ case ARG_HADJUSTMENT:
+ g_return_if_fail (viewport->hadjustment == NULL);
+ adjustment = GTK_VALUE_POINTER (*arg);
+ if (!adjustment)
+ adjustment = (GtkAdjustment*) gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+ gtk_viewport_set_hadjustment (viewport, adjustment);
+ break;
+ case ARG_VADJUSTMENT:
+ g_return_if_fail (viewport->vadjustment == NULL);
+ adjustment = GTK_VALUE_POINTER (*arg);
+ if (!adjustment)
+ adjustment = (GtkAdjustment*) gtk_adjustment_new (0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
+ gtk_viewport_set_vadjustment (viewport, adjustment);
+ break;
+ case ARG_SHADOW_TYPE:
+ gtk_viewport_set_shadow_type (viewport, GTK_VALUE_ENUM (*arg));
+ default:
+ break;
+ }
+}
+
+static void
+gtk_viewport_get_arg (GtkObject *object,
+ GtkArg *arg,
+ guint arg_id)
+{
+ GtkViewport *viewport;
+
+ viewport = GTK_VIEWPORT (object);
+
+ switch (arg_id)
+ {
+ case ARG_HADJUSTMENT:
+ GTK_VALUE_POINTER (*arg) = viewport->hadjustment;
+ break;
+ case ARG_VADJUSTMENT:
+ GTK_VALUE_POINTER (*arg) = viewport->vadjustment;
+ break;
+ case ARG_SHADOW_TYPE:
+ GTK_VALUE_ENUM (*arg) = viewport->shadow_type;
+ break;
+ default:
+ arg->type = GTK_TYPE_INVALID;
+ break;
+ }
+}
+
+static void
gtk_viewport_init (GtkViewport *viewport)
{
GTK_WIDGET_UNSET_FLAGS (viewport, GTK_NO_WINDOW);
@@ -183,13 +272,13 @@ gtk_viewport_set_hadjustment (GtkViewport *viewport,
gtk_object_sink (GTK_OBJECT (viewport->hadjustment));
gtk_signal_connect (GTK_OBJECT (adjustment), "changed",
- (GtkSignalFunc) gtk_viewport_adjustment_changed,
- (gpointer) viewport);
+ gtk_viewport_adjustment_changed,
+ viewport);
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
- (GtkSignalFunc)gtk_viewport_adjustment_value_changed,
- (gpointer) viewport);
+ gtk_viewport_adjustment_value_changed,
+ viewport);
- gtk_viewport_adjustment_changed (adjustment, (gpointer) viewport);
+ gtk_viewport_adjustment_changed (adjustment, viewport);
}
}
@@ -215,13 +304,13 @@ gtk_viewport_set_vadjustment (GtkViewport *viewport,
gtk_object_sink (GTK_OBJECT (viewport->vadjustment));
gtk_signal_connect (GTK_OBJECT (adjustment), "changed",
- (GtkSignalFunc) gtk_viewport_adjustment_changed,
- (gpointer) viewport);
+ gtk_viewport_adjustment_changed,
+ viewport);
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
- (GtkSignalFunc)gtk_viewport_adjustment_value_changed,
- (gpointer) viewport);
+ gtk_viewport_adjustment_value_changed,
+ viewport);
- gtk_viewport_adjustment_changed (adjustment, (gpointer) viewport);
+ gtk_viewport_adjustment_changed (adjustment, viewport);
}
}
@@ -468,32 +557,20 @@ gtk_viewport_expose (GtkWidget *widget,
static void
gtk_viewport_add (GtkContainer *container,
- GtkWidget *widget)
+ GtkWidget *child)
{
GtkBin *bin;
g_return_if_fail (container != NULL);
g_return_if_fail (GTK_IS_VIEWPORT (container));
- g_return_if_fail (widget != NULL);
+ g_return_if_fail (child != NULL);
bin = GTK_BIN (container);
+ g_return_if_fail (bin->child == NULL);
- if (!bin->child)
- {
- gtk_widget_set_parent (widget, GTK_WIDGET (container));
- gtk_widget_set_parent_window (widget, GTK_VIEWPORT (container)->bin_window);
- if (GTK_WIDGET_VISIBLE (widget))
- {
- if (GTK_WIDGET_MAPPED (widget->parent) &&
- !GTK_WIDGET_MAPPED (widget))
- gtk_widget_map (widget);
- }
-
- bin->child = widget;
+ gtk_widget_set_parent_window (child, GTK_VIEWPORT (bin)->bin_window);
- if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (container))
- gtk_widget_queue_resize (widget);
- }
+ GTK_CONTAINER_CLASS (parent_class)->add (container, child);
}
static void
diff --git a/gtk/gtkviewport.h b/gtk/gtkviewport.h
index 4f3e9c08d7..d56d728d6d 100644
--- a/gtk/gtkviewport.h
+++ b/gtk/gtkviewport.h
@@ -30,9 +30,11 @@ extern "C" {
#endif /* __cplusplus */
-#define GTK_VIEWPORT(obj) GTK_CHECK_CAST (obj, gtk_viewport_get_type (), GtkViewport)
-#define GTK_VIEWPORT_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, gtk_viewport_get_type (), GtkViewportClass)
-#define GTK_IS_VIEWPORT(obj) GTK_CHECK_TYPE (obj, gtk_viewport_get_type ())
+#define GTK_TYPE_VIEWPORT (gtk_viewport_get_type ())
+#define GTK_VIEWPORT(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_VIEWPORT, GtkViewport))
+#define GTK_VIEWPORT_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_VIEWPORT, GtkViewportClass))
+#define GTK_IS_VIEWPORT(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_VIEWPORT))
+#define GTK_IS_VIEWPORT_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_VIEWPORT))
typedef struct _GtkViewport GtkViewport;
@@ -42,7 +44,7 @@ struct _GtkViewport
{
GtkBin bin;
- gint shadow_type;
+ guint shadow_type;
GdkWindow *view_window;
GdkWindow *bin_window;
GtkAdjustment *hadjustment;
@@ -55,7 +57,7 @@ struct _GtkViewportClass
};
-guint gtk_viewport_get_type (void);
+GtkType gtk_viewport_get_type (void);
GtkWidget* gtk_viewport_new (GtkAdjustment *hadjustment,
GtkAdjustment *vadjustment);
GtkAdjustment* gtk_viewport_get_hadjustment (GtkViewport *viewport);
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 1b4afb1c80..72ecdb322c 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -798,10 +798,10 @@ gtk_widget_set_arg (GtkObject *object,
gtk_widget_set_uposition (widget, -2, GTK_VALUE_INT (*arg));
break;
case ARG_WIDTH:
- gtk_widget_set_usize (widget, GTK_VALUE_INT (*arg), -1);
+ gtk_widget_set_usize (widget, GTK_VALUE_INT (*arg), -2);
break;
case ARG_HEIGHT:
- gtk_widget_set_usize (widget, -1, GTK_VALUE_INT (*arg));
+ gtk_widget_set_usize (widget, -2, GTK_VALUE_INT (*arg));
break;
case ARG_VISIBLE:
if (GTK_VALUE_BOOL(*arg))
@@ -3011,9 +3011,9 @@ gtk_widget_set_usize (GtkWidget *widget,
gtk_object_set_data_by_id (GTK_OBJECT (widget), aux_info_key_id, aux_info);
}
- if (width > -1)
+ if (width > -2)
aux_info->width = width;
- if (height > -1)
+ if (height > -2)
aux_info->height = height;
if (GTK_WIDGET_VISIBLE (widget))
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 420b3f38ee..ddbcf1b951 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -347,8 +347,8 @@ struct _GtkWidgetAuxInfo
{
gint16 x;
gint16 y;
- guint16 width;
- guint16 height;
+ gint16 width;
+ gint16 height;
};
struct _GtkWidgetShapeInfo