1 | /* gtktreestore.h |
2 | * Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <[email protected]> |
3 | * |
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. |
8 | * |
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. |
13 | * |
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/>. |
16 | */ |
17 | |
18 | #ifndef __GTK_TREE_STORE_H__ |
19 | #define __GTK_TREE_STORE_H__ |
20 | |
21 | #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) |
22 | #error "Only <gtk/gtk.h> can be included directly." |
23 | #endif |
24 | |
25 | #include <gdk/gdk.h> |
26 | #include <gtk/gtktreemodel.h> |
27 | #include <gtk/gtktreesortable.h> |
28 | #include <stdarg.h> |
29 | |
30 | |
31 | G_BEGIN_DECLS |
32 | |
33 | |
34 | #define GTK_TYPE_TREE_STORE (gtk_tree_store_get_type ()) |
35 | #define GTK_TREE_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TREE_STORE, GtkTreeStore)) |
36 | #define GTK_TREE_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TREE_STORE, GtkTreeStoreClass)) |
37 | #define GTK_IS_TREE_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TREE_STORE)) |
38 | #define GTK_IS_TREE_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TREE_STORE)) |
39 | #define GTK_TREE_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TREE_STORE, GtkTreeStoreClass)) |
40 | |
41 | typedef struct _GtkTreeStore GtkTreeStore; |
42 | typedef struct _GtkTreeStoreClass GtkTreeStoreClass; |
43 | typedef struct _GtkTreeStorePrivate GtkTreeStorePrivate; |
44 | |
45 | struct _GtkTreeStore |
46 | { |
47 | GObject parent; |
48 | |
49 | GtkTreeStorePrivate *priv; |
50 | }; |
51 | |
52 | struct _GtkTreeStoreClass |
53 | { |
54 | GObjectClass parent_class; |
55 | |
56 | /* Padding for future expansion */ |
57 | void (*_gtk_reserved1) (void); |
58 | void (*_gtk_reserved2) (void); |
59 | void (*_gtk_reserved3) (void); |
60 | void (*_gtk_reserved4) (void); |
61 | }; |
62 | |
63 | |
64 | GDK_AVAILABLE_IN_ALL |
65 | GType gtk_tree_store_get_type (void) G_GNUC_CONST; |
66 | GDK_AVAILABLE_IN_ALL |
67 | GtkTreeStore *gtk_tree_store_new (gint n_columns, |
68 | ...); |
69 | GDK_AVAILABLE_IN_ALL |
70 | GtkTreeStore *gtk_tree_store_newv (gint n_columns, |
71 | GType *types); |
72 | GDK_AVAILABLE_IN_ALL |
73 | void gtk_tree_store_set_column_types (GtkTreeStore *tree_store, |
74 | gint n_columns, |
75 | GType *types); |
76 | |
77 | /* NOTE: use gtk_tree_model_get to get values from a GtkTreeStore */ |
78 | |
79 | GDK_AVAILABLE_IN_ALL |
80 | void gtk_tree_store_set_value (GtkTreeStore *tree_store, |
81 | GtkTreeIter *iter, |
82 | gint column, |
83 | GValue *value); |
84 | GDK_AVAILABLE_IN_ALL |
85 | void gtk_tree_store_set (GtkTreeStore *tree_store, |
86 | GtkTreeIter *iter, |
87 | ...); |
88 | GDK_AVAILABLE_IN_ALL |
89 | void gtk_tree_store_set_valuesv (GtkTreeStore *tree_store, |
90 | GtkTreeIter *iter, |
91 | gint *columns, |
92 | GValue *values, |
93 | gint n_values); |
94 | GDK_AVAILABLE_IN_ALL |
95 | void gtk_tree_store_set_valist (GtkTreeStore *tree_store, |
96 | GtkTreeIter *iter, |
97 | va_list var_args); |
98 | GDK_AVAILABLE_IN_ALL |
99 | gboolean gtk_tree_store_remove (GtkTreeStore *tree_store, |
100 | GtkTreeIter *iter); |
101 | GDK_AVAILABLE_IN_ALL |
102 | void gtk_tree_store_insert (GtkTreeStore *tree_store, |
103 | GtkTreeIter *iter, |
104 | GtkTreeIter *parent, |
105 | gint position); |
106 | GDK_AVAILABLE_IN_ALL |
107 | void gtk_tree_store_insert_before (GtkTreeStore *tree_store, |
108 | GtkTreeIter *iter, |
109 | GtkTreeIter *parent, |
110 | GtkTreeIter *sibling); |
111 | GDK_AVAILABLE_IN_ALL |
112 | void gtk_tree_store_insert_after (GtkTreeStore *tree_store, |
113 | GtkTreeIter *iter, |
114 | GtkTreeIter *parent, |
115 | GtkTreeIter *sibling); |
116 | GDK_AVAILABLE_IN_ALL |
117 | void gtk_tree_store_insert_with_values (GtkTreeStore *tree_store, |
118 | GtkTreeIter *iter, |
119 | GtkTreeIter *parent, |
120 | gint position, |
121 | ...); |
122 | GDK_AVAILABLE_IN_ALL |
123 | void gtk_tree_store_insert_with_valuesv (GtkTreeStore *tree_store, |
124 | GtkTreeIter *iter, |
125 | GtkTreeIter *parent, |
126 | gint position, |
127 | gint *columns, |
128 | GValue *values, |
129 | gint n_values); |
130 | GDK_AVAILABLE_IN_ALL |
131 | void gtk_tree_store_prepend (GtkTreeStore *tree_store, |
132 | GtkTreeIter *iter, |
133 | GtkTreeIter *parent); |
134 | GDK_AVAILABLE_IN_ALL |
135 | void gtk_tree_store_append (GtkTreeStore *tree_store, |
136 | GtkTreeIter *iter, |
137 | GtkTreeIter *parent); |
138 | GDK_AVAILABLE_IN_ALL |
139 | gboolean gtk_tree_store_is_ancestor (GtkTreeStore *tree_store, |
140 | GtkTreeIter *iter, |
141 | GtkTreeIter *descendant); |
142 | GDK_AVAILABLE_IN_ALL |
143 | gint gtk_tree_store_iter_depth (GtkTreeStore *tree_store, |
144 | GtkTreeIter *iter); |
145 | GDK_AVAILABLE_IN_ALL |
146 | void gtk_tree_store_clear (GtkTreeStore *tree_store); |
147 | GDK_AVAILABLE_IN_ALL |
148 | gboolean gtk_tree_store_iter_is_valid (GtkTreeStore *tree_store, |
149 | GtkTreeIter *iter); |
150 | GDK_AVAILABLE_IN_ALL |
151 | void gtk_tree_store_reorder (GtkTreeStore *tree_store, |
152 | GtkTreeIter *parent, |
153 | gint *new_order); |
154 | GDK_AVAILABLE_IN_ALL |
155 | void gtk_tree_store_swap (GtkTreeStore *tree_store, |
156 | GtkTreeIter *a, |
157 | GtkTreeIter *b); |
158 | GDK_AVAILABLE_IN_ALL |
159 | void gtk_tree_store_move_before (GtkTreeStore *tree_store, |
160 | GtkTreeIter *iter, |
161 | GtkTreeIter *position); |
162 | GDK_AVAILABLE_IN_ALL |
163 | void gtk_tree_store_move_after (GtkTreeStore *tree_store, |
164 | GtkTreeIter *iter, |
165 | GtkTreeIter *position); |
166 | |
167 | |
168 | G_END_DECLS |
169 | |
170 | |
171 | #endif /* __GTK_TREE_STORE_H__ */ |
172 | |