1 | /* gtktreedatalist.h |
2 | * Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <jrb@redhat.com> |
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_DATA_LIST_H__ |
19 | #define __GTK_TREE_DATA_LIST_H__ |
20 | |
21 | #include <gtk/gtktreemodel.h> |
22 | #include <gtk/gtktreesortable.h> |
23 | |
24 | typedef struct _GtkTreeDataList GtkTreeDataList; |
25 | struct _GtkTreeDataList |
26 | { |
27 | GtkTreeDataList *next; |
28 | |
29 | union { |
30 | int v_int; |
31 | gint8 v_char; |
32 | guint8 v_uchar; |
33 | guint v_uint; |
34 | glong v_long; |
35 | gulong v_ulong; |
36 | gint64 v_int64; |
37 | guint64 v_uint64; |
38 | float v_float; |
39 | double v_double; |
40 | gpointer v_pointer; |
41 | } data; |
42 | }; |
43 | |
44 | typedef struct |
45 | { |
46 | int sort_column_id; |
47 | GtkTreeIterCompareFunc ; |
48 | gpointer ; |
49 | GDestroyNotify ; |
50 | } ; |
51 | |
52 | GtkTreeDataList *_gtk_tree_data_list_alloc (void); |
53 | void _gtk_tree_data_list_free (GtkTreeDataList *list, |
54 | GType *column_headers); |
55 | gboolean _gtk_tree_data_list_check_type (GType type); |
56 | void _gtk_tree_data_list_node_to_value (GtkTreeDataList *list, |
57 | GType type, |
58 | GValue *value); |
59 | void _gtk_tree_data_list_value_to_node (GtkTreeDataList *list, |
60 | GValue *value); |
61 | |
62 | GtkTreeDataList *_gtk_tree_data_list_node_copy (GtkTreeDataList *list, |
63 | GType type); |
64 | |
65 | /* Header code */ |
66 | int _gtk_tree_data_list_compare_func (GtkTreeModel *model, |
67 | GtkTreeIter *a, |
68 | GtkTreeIter *b, |
69 | gpointer user_data); |
70 | GList * (int n_columns, |
71 | GType *types); |
72 | void (GList *); |
73 | GtkTreeDataSortHeader * (GList *, |
74 | int sort_column_id); |
75 | GList * (GList *, |
76 | int sort_column_id, |
77 | GtkTreeIterCompareFunc func, |
78 | gpointer data, |
79 | GDestroyNotify destroy); |
80 | |
81 | #endif /* __GTK_TREE_DATA_LIST_H__ */ |
82 | |