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_CELL_RENDERER_H__
21 #define __GCONF_CELL_RENDERER_H__
24 #include <gconf/gconf-value.h>
26 #define GCONF_TYPE_CELL_RENDERER (gconf_cell_renderer_get_type ())
27 #define GCONF_CELL_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCONF_TYPE_CELL_RENDERER, GConfCellRenderer))
28 #define GCONF_CELL_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GCONF_TYPE_CELL_RENDERER, GConfCellRendererClass))
29 #define GCONF_IS_CELL_RENDERER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCONF_TYPE_CELL_RENDERER))
30 #define GCONF_IS_CELL_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), GCONF_TYPE_CELL_RENDERER))
31 #define GCONF_CELL_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GCONF_TYPE_CELL_RENDERER, GConfCellRendererClass))
33 typedef struct _GConfCellRenderer GConfCellRenderer;
34 typedef struct _GConfCellRendererClass GConfCellRendererClass;
37 GCONF_CELL_RENDERER_ICON_COLUMN,
38 GCONF_CELL_RENDERER_KEY_NAME_COLUMN,
39 GCONF_CELL_RENDERER_VALUE_COLUMN,
40 GCONF_CELL_RENDERER_VALUE_TYPE_COLUMN,
41 GCONF_CELL_RENDERER_NUM_COLUMNS
44 struct _GConfCellRenderer {
45 GtkCellRenderer parent_instance;
49 GtkCellRenderer *text_renderer;
50 GtkCellRenderer *toggle_renderer;
53 struct _GConfCellRendererClass {
54 GtkCellRendererClass parent_class;
56 void (*changed) (GConfCellRenderer *renderer, char *path, GConfValue *value);
57 gboolean (*check_writable) (GConfCellRenderer *renderer, char *path);
60 GType gconf_cell_renderer_get_type (void);
61 GtkCellRenderer *gconf_cell_renderer_new (void);
63 #endif /* __GCONF_CELL_RENDERER_H__ */