1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
4 * Copyright (C) 2000 - 2003 Naba Kumar <naba@gnome.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef _ANJUTA_PREFERENCES_H_
21 #define _ANJUTA_PREFERENCES_H_
24 #include <glib/gi18n.h>
25 #include <gdk/gdkkeysyms.h>
27 #include <libanjuta/anjuta-preferences-dialog.h>
28 #include <libanjuta/anjuta-plugin-manager.h>
32 typedef struct _AnjutaProperty AnjutaProperty
;
34 /* Get functions. Add more get functions for AnjutaProperty, if required */
35 /* Gets the widget associated with the property */
36 GtkWidget
* anjuta_property_get_widget (AnjutaProperty
*prop
);
38 #define ANJUTA_TYPE_PREFERENCES (anjuta_preferences_get_type ())
39 #define ANJUTA_PREFERENCES(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), ANJUTA_TYPE_PREFERENCES, AnjutaPreferences))
40 #define ANJUTA_PREFERENCES_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), ANJUTA_TYPE_PREFERENCES, AnjutaPreferencesClass))
41 #define ANJUTA_IS_PREFERENCES(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), ANJUTA_TYPE_PREFERENCES))
42 #define ANJUTA_IS_PREFERENCES_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), ANJUTA_TYPE_PREFERENCES))
44 typedef struct _AnjutaPreferences AnjutaPreferences
;
45 typedef struct _AnjutaPreferencesClass AnjutaPreferencesClass
;
46 typedef struct _AnjutaPreferencesPriv AnjutaPreferencesPriv
;
48 struct _AnjutaPreferences
53 AnjutaPreferencesPriv
*priv
;
56 struct _AnjutaPreferencesClass
61 typedef gboolean (*AnjutaPreferencesCallback
) (AnjutaPreferences
*pr
,
65 GType
anjuta_preferences_get_type (void);
67 AnjutaPreferences
*anjuta_preferences_new (AnjutaPluginManager
*plugin_manager
, const gchar
*common_schema_id
);
68 AnjutaPreferences
*anjuta_preferences_default (void);
70 void anjuta_preferences_add_from_builder (AnjutaPreferences
*pr
,
73 const gchar
*glade_widget_name
,
75 const gchar
*icon_filename
);
77 void anjuta_preferences_remove_page (AnjutaPreferences
*pr
,
78 const gchar
*page_name
);
81 * Registers all properties defined for widgets below the 'parent' widget
82 * in the given gtkbuilder UI tree
84 void anjuta_preferences_register_all_properties_from_builder_xml (AnjutaPreferences
* pr
,
89 anjuta_preferences_register_property (AnjutaPreferences
*pr
,
95 GtkWidget
*anjuta_preferences_get_dialog (AnjutaPreferences
*pr
);
96 gboolean
anjuta_preferences_is_dialog_created (AnjutaPreferences
*pr
);