Changed a bunch of boxed types to pointers temporarily until they work

Thu Jan  4 15:46:18 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtkmodelsimple.c: Changed a bunch of boxed types to pointers
	temporarily until they work again.  Brought up to date with
	changes in the model.
	* gtk/gtkmodelsimple.h: Brought up to date with changes in the
	model.
This commit is contained in:
Jonathan Blandford 2001-01-04 20:42:49 +00:00 committed by Jonathan Blandford
parent b0a909b8c4
commit ef069fa0a0
9 changed files with 188 additions and 62 deletions

View File

@ -1,3 +1,11 @@
Thu Jan 4 15:46:18 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkmodelsimple.c: Changed a bunch of boxed types to pointers
temporarily until they work again. Brought up to date with
changes in the model.
* gtk/gtkmodelsimple.h: Brought up to date with changes in the
model.
2001-01-04 Havoc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (line_display_index_to_iter): if index is

View File

@ -1,3 +1,11 @@
Thu Jan 4 15:46:18 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkmodelsimple.c: Changed a bunch of boxed types to pointers
temporarily until they work again. Brought up to date with
changes in the model.
* gtk/gtkmodelsimple.h: Brought up to date with changes in the
model.
2001-01-04 Havoc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (line_display_index_to_iter): if index is

View File

@ -1,3 +1,11 @@
Thu Jan 4 15:46:18 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkmodelsimple.c: Changed a bunch of boxed types to pointers
temporarily until they work again. Brought up to date with
changes in the model.
* gtk/gtkmodelsimple.h: Brought up to date with changes in the
model.
2001-01-04 Havoc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (line_display_index_to_iter): if index is

View File

@ -1,3 +1,11 @@
Thu Jan 4 15:46:18 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkmodelsimple.c: Changed a bunch of boxed types to pointers
temporarily until they work again. Brought up to date with
changes in the model.
* gtk/gtkmodelsimple.h: Brought up to date with changes in the
model.
2001-01-04 Havoc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (line_display_index_to_iter): if index is

View File

@ -1,3 +1,11 @@
Thu Jan 4 15:46:18 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkmodelsimple.c: Changed a bunch of boxed types to pointers
temporarily until they work again. Brought up to date with
changes in the model.
* gtk/gtkmodelsimple.h: Brought up to date with changes in the
model.
2001-01-04 Havoc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (line_display_index_to_iter): if index is

View File

@ -1,3 +1,11 @@
Thu Jan 4 15:46:18 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkmodelsimple.c: Changed a bunch of boxed types to pointers
temporarily until they work again. Brought up to date with
changes in the model.
* gtk/gtkmodelsimple.h: Brought up to date with changes in the
model.
2001-01-04 Havoc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (line_display_index_to_iter): if index is

View File

@ -1,3 +1,11 @@
Thu Jan 4 15:46:18 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtkmodelsimple.c: Changed a bunch of boxed types to pointers
temporarily until they work again. Brought up to date with
changes in the model.
* gtk/gtkmodelsimple.h: Brought up to date with changes in the
model.
2001-01-04 Havoc Pennington <hp@redhat.com>
* gtk/gtktextlayout.c (line_display_index_to_iter): if index is

View File

@ -36,6 +36,8 @@ enum {
ITER_N_CHILDREN,
ITER_NTH_CHILD,
ITER_PARENT,
REF_ITER,
UNREF_ITER,
LAST_SIGNAL
};
@ -70,8 +72,10 @@ static gboolean gtk_real_model_simple_iter_nth_child (GtkTreeModel *
static gboolean gtk_real_model_simple_iter_parent (GtkTreeModel *tree_model,
GtkTreeIter *iter,
GtkTreeIter *child);
static void gtk_real_model_simple_ref_iter (GtkTreeModel *tree_model,
GtkTreeIter *iter);
static void gtk_real_model_simple_unref_iter (GtkTreeModel *tree_model,
GtkTreeIter *iter);
static guint model_simple_signals[LAST_SIGNAL] = { 0 };
@ -137,8 +141,8 @@ gtk_model_simple_class_init (GtkModelSimpleClass *class)
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, changed),
gtk_marshal_VOID__BOXED_BOXED,
G_TYPE_NONE, 2,
GTK_TYPE_TREE_PATH,
GTK_TYPE_TREE_ITER);
G_TYPE_POINTER,
G_TYPE_POINTER);
model_simple_signals[INSERTED] =
gtk_signal_new ("inserted",
GTK_RUN_FIRST,
@ -146,8 +150,8 @@ gtk_model_simple_class_init (GtkModelSimpleClass *class)
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, inserted),
gtk_marshal_VOID__BOXED_BOXED,
G_TYPE_NONE, 2,
GTK_TYPE_TREE_PATH,
GTK_TYPE_TREE_ITER);
G_TYPE_POINTER,
G_TYPE_POINTER);
model_simple_signals[CHILD_TOGGLED] =
gtk_signal_new ("child_toggled",
GTK_RUN_FIRST,
@ -155,8 +159,8 @@ gtk_model_simple_class_init (GtkModelSimpleClass *class)
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, child_toggled),
gtk_marshal_VOID__BOXED_BOXED,
G_TYPE_NONE, 2,
GTK_TYPE_TREE_PATH,
GTK_TYPE_TREE_ITER);
G_TYPE_POINTER,
G_TYPE_POINTER);
model_simple_signals[DELETED] =
gtk_signal_new ("deleted",
GTK_RUN_FIRST,
@ -164,20 +168,20 @@ gtk_model_simple_class_init (GtkModelSimpleClass *class)
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, deleted),
gtk_marshal_VOID__BOXED,
G_TYPE_NONE, 1,
GTK_TYPE_TREE_PATH);
G_TYPE_POINTER);
model_simple_signals[GET_N_COLUMNS] =
gtk_signal_new ("get_n_columns",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
0,
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, get_n_columns),
gtk_marshal_INT__VOID,
G_TYPE_INT, 0);
model_simple_signals[GET_COLUMN_TYPE] =
gtk_signal_new ("get_column_type",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
0,
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, get_column_type),
gtk_marshal_INT__INT,
G_TYPE_INT, 1,
G_TYPE_INT);
@ -185,81 +189,97 @@ gtk_model_simple_class_init (GtkModelSimpleClass *class)
gtk_signal_new ("get_iter",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
0,
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, get_iter),
gtk_marshal_BOOLEAN__BOXED_BOXED,
G_TYPE_BOOLEAN, 2,
GTK_TYPE_TREE_ITER,
GTK_TYPE_TREE_PATH);
G_TYPE_POINTER,
G_TYPE_POINTER);
model_simple_signals[GET_PATH] =
gtk_signal_new ("get_path",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
0,
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, get_path),
gtk_marshal_BOXED__BOXED,
GTK_TYPE_TREE_PATH, 1,
GTK_TYPE_TREE_ITER);
G_TYPE_POINTER, 1,
G_TYPE_POINTER);
model_simple_signals[GET_VALUE] =
gtk_signal_new ("get_value",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
0,
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, get_value),
gtk_marshal_VOID__BOXED_INT_POINTER,
G_TYPE_NONE, 3,
GTK_TYPE_TREE_ITER,
G_TYPE_POINTER,
G_TYPE_INT,
G_TYPE_POINTER);
model_simple_signals[ITER_NEXT] =
gtk_signal_new ("iter_next",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
0,
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, iter_next),
gtk_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1,
GTK_TYPE_TREE_ITER);
G_TYPE_POINTER);
model_simple_signals[ITER_CHILDREN] =
gtk_signal_new ("iter_children",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
0,
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, iter_children),
gtk_marshal_BOOLEAN__BOXED_BOXED,
G_TYPE_BOOLEAN, 2,
GTK_TYPE_TREE_ITER,
GTK_TYPE_TREE_ITER);
G_TYPE_POINTER,
G_TYPE_POINTER);
model_simple_signals[ITER_HAS_CHILD] =
gtk_signal_new ("iter_has_child",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
0,
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, iter_has_child),
gtk_marshal_BOOLEAN__BOXED,
G_TYPE_BOOLEAN, 1,
GTK_TYPE_TREE_ITER);
G_TYPE_POINTER);
model_simple_signals[ITER_N_CHILDREN] =
gtk_signal_new ("iter_n_children",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
0,
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, iter_n_children),
gtk_marshal_INT__BOXED,
G_TYPE_INT, 1,
GTK_TYPE_TREE_ITER);
G_TYPE_POINTER);
model_simple_signals[ITER_NTH_CHILD] =
gtk_signal_new ("node_nth_child",
gtk_signal_new ("iter_nth_child",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
0,
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, iter_nth_child),
gtk_marshal_BOOLEAN__BOXED_BOXED_INT,
GTK_TYPE_BOOL, 3,
GTK_TYPE_TREE_ITER,
GTK_TYPE_TREE_ITER,
G_TYPE_POINTER,
G_TYPE_POINTER,
G_TYPE_INT);
model_simple_signals[ITER_PARENT] =
gtk_signal_new ("node_parent",
gtk_signal_new ("iter_parent",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
0,
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, iter_parent),
gtk_marshal_BOOLEAN__BOXED_BOXED,
G_TYPE_BOOLEAN, 2,
GTK_TYPE_TREE_ITER,
GTK_TYPE_TREE_ITER);
G_TYPE_POINTER,
G_TYPE_POINTER);
model_simple_signals[REF_ITER] =
gtk_signal_new ("ref_iter",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, ref_iter),
gtk_marshal_NONE__BOXED,
G_TYPE_NONE, 1,
G_TYPE_POINTER);
model_simple_signals[UNREF_ITER] =
gtk_signal_new ("unref_iter",
GTK_RUN_LAST,
GTK_CLASS_TYPE (object_class),
GTK_SIGNAL_OFFSET (GtkModelSimpleClass, unref_iter),
gtk_marshal_NONE__BOXED,
G_TYPE_NONE, 1,
G_TYPE_POINTER);
}
static void
@ -276,6 +296,8 @@ gtk_model_simple_tree_model_init (GtkTreeModelIface *iface)
iface->iter_n_children = gtk_real_model_simple_iter_n_children;
iface->iter_nth_child = gtk_real_model_simple_iter_nth_child;
iface->iter_parent = gtk_real_model_simple_iter_parent;
iface->ref_iter = gtk_real_model_simple_ref_iter;
iface->unref_iter = gtk_real_model_simple_unref_iter;
}
@ -408,6 +430,20 @@ gtk_real_model_simple_iter_parent (GtkTreeModel *tree_model,
return retval;
}
static void
gtk_real_model_simple_ref_iter (GtkTreeModel *tree_model,
GtkTreeIter *iter)
{
gtk_signal_emit (GTK_OBJECT (tree_model), model_simple_signals[REF_ITER], iter);
}
static void
gtk_real_model_simple_unref_iter (GtkTreeModel *tree_model,
GtkTreeIter *iter)
{
gtk_signal_emit (GTK_OBJECT (tree_model), model_simple_signals[UNREF_ITER], iter);
}
/* Public functions */
void
gtk_model_simple_changed (GtkModelSimple *simple,

View File

@ -48,35 +48,69 @@ struct _GtkModelSimpleClass
GtkObjectClass parent_class;
/* signals */
/* Will be moved into the GtkTreeModelIface eventually */
void (* changed) (GtkTreeModel *tree_model,
GtkTreePath *path,
GtkTreeIter *iter);
void (* inserted) (GtkTreeModel *tree_model,
GtkTreePath *path,
GtkTreeIter *iter);
void (* child_toggled) (GtkTreeModel *tree_model,
GtkTreePath *path,
GtkTreeIter *iter);
void (* deleted) (GtkTreeModel *tree_model,
GtkTreePath *path);
guint (* get_flags) (GtkTreeModel *tree_model);
gint (* get_n_columns) (GtkTreeModel *tree_model);
GType (* get_column_type) (GtkTreeModel *tree_model,
gint index);
gboolean (* get_iter) (GtkTreeModel *tree_model,
GtkTreeIter *iter,
GtkTreePath *path);
GtkTreePath *(* get_path) (GtkTreeModel *tree_model,
GtkTreeIter *iter);
void (* get_value) (GtkTreeModel *tree_model,
GtkTreeIter *iter,
gint column,
GValue *value);
gboolean (* iter_next) (GtkTreeModel *tree_model,
GtkTreeIter *iter);
gboolean (* iter_children) (GtkTreeModel *tree_model,
GtkTreeIter *iter,
GtkTreeIter *parent);
gboolean (* iter_has_child) (GtkTreeModel *tree_model,
GtkTreeIter *iter);
gint (* iter_n_children) (GtkTreeModel *tree_model,
GtkTreeIter *iter);
gboolean (* iter_nth_child) (GtkTreeModel *tree_model,
GtkTreeIter *iter,
GtkTreeIter *parent,
gint n);
gboolean (* iter_parent) (GtkTreeModel *tree_model,
GtkTreeIter *iter,
GtkTreeIter *child);
void (* ref_iter) (GtkTreeModel *tree_model,
GtkTreeIter *iter);
void (* unref_iter) (GtkTreeModel *tree_model,
GtkTreeIter *iter);
/* These will be moved into the GtkTreeModelIface eventually */
void (* changed) (GtkTreeModel *tree_model,
GtkTreePath *path,
GtkTreeIter *iter);
void (* inserted) (GtkTreeModel *tree_model,
GtkTreePath *path,
GtkTreeIter *iter);
void (* child_toggled) (GtkTreeModel *tree_model,
GtkTreePath *path,
GtkTreeIter *iter);
void (* deleted) (GtkTreeModel *tree_model,
GtkTreePath *path);
};
GtkType gtk_model_simple_get_type (void);
GtkModelSimple *gtk_model_simple_new (void);
void gtk_model_simple_node_changed (GtkModelSimple *simple,
GtkTreePath *path,
GtkTreeIter *iter);
void gtk_model_simple_node_inserted (GtkModelSimple *simple,
GtkTreePath *path,
GtkTreeIter *iter);
void gtk_model_simple_node_child_toggled (GtkModelSimple *simple,
GtkTreePath *path,
GtkTreeIter *iter);
void gtk_model_simple_node_deleted (GtkModelSimple *simple,
GtkTreePath *path,
GtkTreeIter *iter);
GtkType gtk_model_simple_get_type (void);
GtkModelSimple *gtk_model_simple_new (void);
void gtk_model_simple_changed (GtkModelSimple *simple,
GtkTreePath *path,
GtkTreeIter *iter);
void gtk_model_simple_inserted (GtkModelSimple *simple,
GtkTreePath *path,
GtkTreeIter *iter);
void gtk_model_simple_child_toggled (GtkModelSimple *simple,
GtkTreePath *path,
GtkTreeIter *iter);
void gtk_model_simple_deleted (GtkModelSimple *simple,
GtkTreePath *path,
GtkTreeIter *iter);