1 /* gtktreestore.h
2  * Copyright (C) 2014 Benjamin Otte <otte@gnome.org>
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_MODEL_CSS_NODE_H__
19 #define __GTK_TREE_MODEL_CSS_NODE_H__
20 
21 #include <gtk/gtktreemodel.h>
22 
23 #include "gtk/gtkcssnodeprivate.h"
24 
25 
26 G_BEGIN_DECLS
27 
28 
29 #define GTK_TYPE_TREE_MODEL_CSS_NODE			(gtk_tree_model_css_node_get_type ())
30 #define GTK_TREE_MODEL_CSS_NODE(obj)			(G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TREE_MODEL_CSS_NODE, GtkTreeModelCssNode))
31 #define GTK_TREE_MODEL_CSS_NODE_CLASS(klass)		(G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TREE_MODEL_CSS_NODE, GtkTreeModelCssNodeClass))
32 #define GTK_IS_TREE_MODEL_CSS_NODE(obj)			(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TREE_MODEL_CSS_NODE))
33 #define GTK_IS_TREE_MODEL_CSS_NODE_CLASS(klass)		(G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TREE_MODEL_CSS_NODE))
34 #define GTK_TREE_MODEL_CSS_NODE_GET_CLASS(obj)		(G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_TREE_MODEL_CSS_NODE, GtkTreeModelCssNodeClass))
35 
36 typedef struct _GtkTreeModelCssNode        GtkTreeModelCssNode;
37 typedef struct _GtkTreeModelCssNodeClass   GtkTreeModelCssNodeClass;
38 typedef struct _GtkTreeModelCssNodePrivate GtkTreeModelCssNodePrivate;
39 
40 typedef void (* GtkTreeModelCssNodeGetFunc)             (GtkTreeModelCssNode   *model,
41                                                          GtkCssNode            *node,
42                                                          int                    column,
43                                                          GValue                *value);
44 
45 struct _GtkTreeModelCssNode
46 {
47   GObject parent;
48 
49   GtkTreeModelCssNodePrivate *priv;
50 };
51 
52 struct _GtkTreeModelCssNodeClass
53 {
54   GObjectClass parent_class;
55 };
56 
57 
58 GType         gtk_tree_model_css_node_get_type          (void) G_GNUC_CONST;
59 
60 GtkTreeModel *gtk_tree_model_css_node_new               (GtkTreeModelCssNodeGetFunc get_func,
61                                                          gint            n_columns,
62 					                 ...);
63 GtkTreeModel *gtk_tree_model_css_node_newv              (GtkTreeModelCssNodeGetFunc get_func,
64                                                          gint            n_columns,
65 					                 GType          *types);
66 
67 void          gtk_tree_model_css_node_set_root_node     (GtkTreeModelCssNode    *model,
68                                                          GtkCssNode             *node);
69 GtkCssNode   *gtk_tree_model_css_node_get_root_node     (GtkTreeModelCssNode    *model);
70 GtkCssNode   *gtk_tree_model_css_node_get_node_from_iter(GtkTreeModelCssNode    *model,
71                                                          GtkTreeIter            *iter);
72 void          gtk_tree_model_css_node_get_iter_from_node(GtkTreeModelCssNode    *model,
73                                                          GtkTreeIter            *iter,
74                                                          GtkCssNode             *node);
75 
76 
77 G_END_DECLS
78 
79 
80 #endif /* __GTK_TREE_MODEL_CSS_NODE_H__ */
81