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_KEY_EDITOR_H__
21 #define __GCONF_KEY_EDITOR_H__
24 #include <gconf/gconf.h>
26 #define GCONF_TYPE_KEY_EDITOR (gconf_key_editor_get_type ())
27 #define GCONF_KEY_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCONF_TYPE_KEY_EDITOR, GConfKeyEditor))
28 #define GCONF_KEY_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GCONF_TYPE_KEY_EDITOR, GConfKeyEditorClass))
29 #define GCONF_IS_KEY_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCONF_TYPE_KEY_EDITOR))
30 #define GCONF_IS_KEY_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), GCONF_TYPE_KEY_EDITOR))
31 #define GCONF_KEY_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GCONF_TYPE_KEY_EDITOR, GConfKeyEditorClass))
34 GCONF_KEY_EDITOR_NEW_KEY,
35 GCONF_KEY_EDITOR_EDIT_KEY
36 } GConfKeyEditorAction;
38 typedef struct _GConfKeyEditor GConfKeyEditor;
39 typedef struct _GConfKeyEditorClass GConfKeyEditorClass;
41 struct _GConfKeyEditor {
42 GtkDialog parent_instance;
47 GtkWidget *bool_widget;
49 GtkWidget *int_widget;
50 GtkWidget *string_box;
51 GtkWidget *string_widget;
53 GtkWidget *float_widget;
55 GtkWidget *non_writable_label;
57 GtkWidget *path_label;
59 GtkWidget *name_entry;
61 /* List editing stuff */
63 GtkWidget *list_widget;
64 GtkListStore *list_model;
65 GtkWidget *list_type_menu;
66 GtkWidget *edit_button, *remove_button, *go_up_button, *go_down_button;
70 struct _GConfKeyEditorClass {
71 GtkDialogClass parent_class;
74 GType gconf_key_editor_get_type (void);
75 GtkWidget *gconf_key_editor_new (GConfKeyEditorAction action);
77 void gconf_key_editor_set_value (GConfKeyEditor *editor,
79 GConfValue *gconf_key_editor_get_value (GConfKeyEditor *editor);
81 void gconf_key_editor_set_key_path (GConfKeyEditor *editor,
83 char *gconf_key_editor_get_full_key_path (GConfKeyEditor *editor);
85 void gconf_key_editor_set_key_name (GConfKeyEditor *editor,
87 G_CONST_RETURN char *gconf_key_editor_get_key_name (GConfKeyEditor *editor);
89 void gconf_key_editor_set_writable (GConfKeyEditor *editor,
92 #endif /* __GCONF_KEY_EDITOR_H__ */