1 /* 2 * Copyright (C) 2001 Ximian, Inc. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as 6 * published by the Free Software Foundation; either version 2 of the 7 * License, or (at your option) any later version. 8 * 9 * This program 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 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 * 18 * Authors: 19 * Naba Kumar <naba@gnome.org> 20 */ 21 22 #ifndef __GLADE_APP_H__ 23 #define __GLADE_APP_H__ 24 25 #include <gladeui/glade-editor.h> 26 #include <gladeui/glade-palette.h> 27 #include <gladeui/glade-clipboard.h> 28 #include <gladeui/glade-catalog.h> 29 30 G_BEGIN_DECLS 31 32 #define GLADE_TYPE_APP (glade_app_get_type()) 33 #define GLADE_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_APP, GladeApp)) 34 #define GLADE_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GLADE_TYPE_APP, GladeAppClass)) 35 #define GLADE_IS_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_APP)) 36 #define GLADE_IS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_APP)) 37 #define GLADE_APP_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GLADE_APP, GladeAppClass)) 38 39 #define GLADE_ENV_CATALOG_PATH "GLADE_CATALOG_SEARCH_PATH" 40 #define GLADE_ENV_MODULE_PATH "GLADE_MODULE_SEARCH_PATH" 41 #define GLADE_ENV_TESTING "GLADE_TESTING" 42 #define GLADE_ENV_PIXMAP_DIR "GLADE_PIXMAP_DIR" 43 #define GLADE_ENV_ICON_THEME_PATH "GLADE_ICON_THEME_PATH" 44 #define GLADE_ENV_BUNDLED "GLADE_BUNDLED" 45 46 typedef struct _GladeApp GladeApp; 47 typedef struct _GladeAppPrivate GladeAppPrivate; 48 typedef struct _GladeAppClass GladeAppClass; 49 50 struct _GladeApp 51 { 52 GObject parent_instance; 53 54 GladeAppPrivate *priv; 55 }; 56 57 struct _GladeAppClass 58 { 59 GObjectClass parent_class; 60 61 void (* glade_reserved1) (void); 62 void (* glade_reserved2) (void); 63 void (* glade_reserved3) (void); 64 void (* glade_reserved4) (void); 65 void (* glade_reserved5) (void); 66 void (* glade_reserved6) (void); 67 }; 68 69 void glade_init (void); 70 GType glade_app_get_type (void) G_GNUC_CONST; 71 72 GladeApp* glade_app_new (void); 73 GladeApp* glade_app_get (void); 74 GKeyFile* glade_app_get_config (void); 75 gint glade_app_config_save (void); 76 77 gboolean glade_app_do_event (GdkEvent *event); 78 79 gboolean glade_app_get_catalog_version (const gchar *name, 80 gint *major, 81 gint *minor); 82 GList *glade_app_get_catalogs (void); 83 GladeCatalog *glade_app_get_catalog (const gchar *name); 84 GladeClipboard* glade_app_get_clipboard (void); 85 86 void glade_app_add_project (GladeProject *project); 87 void glade_app_remove_project (GladeProject *project); 88 GList* glade_app_get_projects (void); 89 gboolean glade_app_is_project_loaded (const gchar *project_path); 90 GladeProject* glade_app_get_project_by_path (const gchar *project_path); 91 92 void glade_app_set_window (GtkWidget *window); 93 GtkWidget* glade_app_get_window (void); 94 95 void glade_app_set_accel_group (GtkAccelGroup *accel_group); 96 GtkAccelGroup *glade_app_get_accel_group (void); 97 98 void glade_app_search_docs (const gchar *book, 99 const gchar *page, 100 const gchar *search); 101 102 /* package paths */ 103 const gchar *glade_app_get_catalogs_dir (void) G_GNUC_CONST; 104 const gchar *glade_app_get_modules_dir (void) G_GNUC_CONST; 105 const gchar *glade_app_get_pixmaps_dir (void) G_GNUC_CONST; 106 const gchar *glade_app_get_locale_dir (void) G_GNUC_CONST; 107 const gchar *glade_app_get_bin_dir (void) G_GNUC_CONST; 108 const gchar *glade_app_get_lib_dir (void) G_GNUC_CONST; 109 110 G_END_DECLS 111 112 #endif /* __GLADE_APP_H__ */ 113