2 * Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <jrb@redhat.com>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef __GTK_LIST_STORE_H__
19 #define __GTK_LIST_STORE_H__
21 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
22 #error "Only <gtk/gtk.h> can be included directly."
25 #include <gtk/gtktreemodel.h>
26 #include <gtk/gtktreesortable.h>
32 #define GTK_TYPE_LIST_STORE (gtk_list_store_get_type ())
33 #define GTK_LIST_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_LIST_STORE, GtkListStore))
34 #define GTK_LIST_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_LIST_STORE, GtkListStoreClass))
35 #define GTK_IS_LIST_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_LIST_STORE))
36 #define GTK_IS_LIST_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_LIST_STORE))
37 #define GTK_LIST_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_LIST_STORE, GtkListStoreClass))
39 typedef struct _GtkListStore GtkListStore;
40 typedef struct _GtkListStorePrivate GtkListStorePrivate;
41 typedef struct _GtkListStoreClass GtkListStoreClass;
48 GtkListStorePrivate *priv;
51 struct _GtkListStoreClass
53 GObjectClass parent_class;
55 /* Padding for future expansion */
56 void (*_gtk_reserved1) (void);
57 void (*_gtk_reserved2) (void);
58 void (*_gtk_reserved3) (void);
59 void (*_gtk_reserved4) (void);
63 GType gtk_list_store_get_type (void) G_GNUC_CONST;
64 GtkListStore *gtk_list_store_new (gint n_columns,
66 GtkListStore *gtk_list_store_newv (gint n_columns,
68 void gtk_list_store_set_column_types (GtkListStore *list_store,
72 /* NOTE: use gtk_tree_model_get to get values from a GtkListStore */
74 void gtk_list_store_set_value (GtkListStore *list_store,
78 void gtk_list_store_set (GtkListStore *list_store,
81 void gtk_list_store_set_valuesv (GtkListStore *list_store,
86 void gtk_list_store_set_valist (GtkListStore *list_store,
89 gboolean gtk_list_store_remove (GtkListStore *list_store,
91 void gtk_list_store_insert (GtkListStore *list_store,
94 void gtk_list_store_insert_before (GtkListStore *list_store,
96 GtkTreeIter *sibling);
97 void gtk_list_store_insert_after (GtkListStore *list_store,
99 GtkTreeIter *sibling);
100 void gtk_list_store_insert_with_values (GtkListStore *list_store,
104 void gtk_list_store_insert_with_valuesv (GtkListStore *list_store,
110 void gtk_list_store_prepend (GtkListStore *list_store,
112 void gtk_list_store_append (GtkListStore *list_store,
114 void gtk_list_store_clear (GtkListStore *list_store);
115 gboolean gtk_list_store_iter_is_valid (GtkListStore *list_store,
117 void gtk_list_store_reorder (GtkListStore *store,
119 void gtk_list_store_swap (GtkListStore *store,
122 void gtk_list_store_move_after (GtkListStore *store,
124 GtkTreeIter *position);
125 void gtk_list_store_move_before (GtkListStore *store,
127 GtkTreeIter *position);
133 #endif /* __GTK_LIST_STORE_H__ */