2001-01-04 21:33:24 +00:00
|
|
|
/* gtktreemodelsimple.h
|
2000-10-05 01:04:57 +00:00
|
|
|
* Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <jrb@redhat.com>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 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
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2001-01-04 21:33:24 +00:00
|
|
|
#ifndef __GTK_TREE_MODEL_SIMPLE_H__
|
|
|
|
#define __GTK_TREE_MODEL_SIMPLE_H__
|
2000-10-05 01:04:57 +00:00
|
|
|
|
|
|
|
#include <gtk/gtktreemodel.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
2000-10-26 00:36:47 +00:00
|
|
|
|
2001-01-11 17:59:40 +00:00
|
|
|
#define GTK_TYPE_TREE_MODEL_SIMPLE (gtk_tree_model_simple_get_type ())
|
2001-01-12 04:47:56 +00:00
|
|
|
#define GTK_TREE_MODEL_SIMPLE(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_TREE_MODEL_SIMPLE, GtkTreeModelSimple))
|
|
|
|
#define GTK_TREE_MODEL_SIMPLE_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TREE_MODEL_SIMPLE, GtkTreeModelSimpleClass))
|
|
|
|
#define GTK_IS_TREE_MODEL_SIMPLE(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_TREE_MODEL_SIMPLE))
|
|
|
|
#define GTK_IS_TREE_MODEL_SIMPLE_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((obj), GTK_TYPE_TREE_MODEL_SIMPLE))
|
2000-10-05 01:04:57 +00:00
|
|
|
|
2001-01-04 21:33:24 +00:00
|
|
|
typedef struct _GtkTreeModelSimple GtkTreeModelSimple;
|
|
|
|
typedef struct _GtkTreeModelSimpleClass GtkTreeModelSimpleClass;
|
2000-10-05 01:04:57 +00:00
|
|
|
|
2001-01-04 21:33:24 +00:00
|
|
|
struct _GtkTreeModelSimple
|
2000-10-05 01:04:57 +00:00
|
|
|
{
|
2000-10-16 23:11:55 +00:00
|
|
|
GtkObject parent;
|
2000-10-27 23:34:58 +00:00
|
|
|
|
|
|
|
gint stamp;
|
2000-10-05 01:04:57 +00:00
|
|
|
};
|
|
|
|
|
2001-01-04 21:33:24 +00:00
|
|
|
struct _GtkTreeModelSimpleClass
|
2000-10-05 01:04:57 +00:00
|
|
|
{
|
2000-10-16 23:11:55 +00:00
|
|
|
GtkObjectClass parent_class;
|
|
|
|
|
|
|
|
/* signals */
|
2001-01-04 20:42:49 +00:00
|
|
|
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);
|
2000-10-05 01:04:57 +00:00
|
|
|
};
|
|
|
|
|
2001-01-04 21:33:24 +00:00
|
|
|
GtkType gtk_tree_model_simple_get_type (void);
|
|
|
|
GtkTreeModelSimple *gtk_tree_model_simple_new (void);
|
|
|
|
void gtk_tree_model_simple_changed (GtkTreeModelSimple *simple,
|
|
|
|
GtkTreePath *path,
|
|
|
|
GtkTreeIter *iter);
|
|
|
|
void gtk_tree_model_simple_inserted (GtkTreeModelSimple *simple,
|
|
|
|
GtkTreePath *path,
|
|
|
|
GtkTreeIter *iter);
|
|
|
|
void gtk_tree_model_simple_child_toggled (GtkTreeModelSimple *simple,
|
|
|
|
GtkTreePath *path,
|
|
|
|
GtkTreeIter *iter);
|
|
|
|
void gtk_tree_model_simple_deleted (GtkTreeModelSimple *simple,
|
|
|
|
GtkTreePath *path,
|
|
|
|
GtkTreeIter *iter);
|
2000-10-05 01:04:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
|
2001-01-04 21:33:24 +00:00
|
|
|
#endif /* __GTK_TREE_MODEL_SIMPLE_H__ */
|