1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
3 * Copyright (C) 2001, 2002 Anders Carlsson <andersca@gnu.org>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __GCONF_TREE_MODEL_H__
21 #define __GCONF_TREE_MODEL_H__
24 #include <gconf/gconf-client.h>
26 #define GCONF_TYPE_TREE_MODEL (gconf_tree_model_get_type ())
27 #define GCONF_TREE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCONF_TYPE_TREE_MODEL, GConfTreeModel))
28 #define GCONF_TREE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GCONF_TYPE_TREE_MODEL, GConfTreeModelClass))
29 #define GCONF_IS_TREE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCONF_TYPE_TREE_MODEL))
30 #define GCONF_IS_TREE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), GCONF_TYPE_TREE_MODEL))
31 #define GCONF_TREE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GCONF_TYPE_TREE_MODEL, GConfTreeModelClass))
33 typedef struct _GConfTreeModel GConfTreeModel;
34 typedef struct _GConfTreeModelClass GConfTreeModelClass;
37 GCONF_TREE_MODEL_NAME_COLUMN,
38 GCONF_TREE_MODEL_NUM_COLUMNS
41 struct _GConfTreeModel {
42 GObject parent_instance;
50 struct _GConfTreeModelClass {
51 GObjectClass parent_class;
56 GType gconf_tree_model_get_type (void);
57 GtkTreeModel *gconf_tree_model_new (void);
58 gchar *gconf_tree_model_get_gconf_name (GConfTreeModel *tree_model, GtkTreeIter *iter);
59 gchar *gconf_tree_model_get_gconf_path (GConfTreeModel *tree_model, GtkTreeIter *iter);
61 GtkTreePath *gconf_tree_model_get_tree_path_from_gconf_path (GConfTreeModel *tree_model, const char *path);
62 void gconf_tree_model_set_client (GConfTreeModel *model, GConfClient *client);
64 #endif /* __GCONF_TREE_MODEL_H__ */