glade-app.h 4.07 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/*
 * Copyright (C) 2001 Ximian, Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * 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 19 20
 *
 * Authors:
 *   Naba Kumar <naba@gnome.org>
 */
21
 
22 23 24
#ifndef __GLADE_APP_H__
#define __GLADE_APP_H__

25 26 27
#include <gladeui/glade-editor.h>
#include <gladeui/glade-palette.h>
#include <gladeui/glade-clipboard.h>
28
#include <gladeui/glade-catalog.h>
Tristan Van Berkom's avatar
Tristan Van Berkom committed
29

30 31 32 33 34 35 36 37 38
G_BEGIN_DECLS

#define GLADE_TYPE_APP            (glade_app_get_type())
#define GLADE_APP(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GLADE_TYPE_APP, GladeApp))
#define GLADE_APP_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GLADE_TYPE_APP, GladeAppClass))
#define GLADE_IS_APP(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GLADE_TYPE_APP))
#define GLADE_IS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GLADE_TYPE_APP))
#define GLADE_APP_GET_CLASS(o)    (G_TYPE_INSTANCE_GET_CLASS ((o), GLADE_APP, GladeAppClass))

39 40 41
#define GLADE_ENV_CATALOG_PATH    "GLADE_CATALOG_PATH"
#define GLADE_ENV_MODULE_PATH     "GLADE_MODULE_PATH"

42 43 44 45
typedef struct _GladeApp         GladeApp;
typedef struct _GladeAppPrivate  GladeAppPrivate;
typedef struct _GladeAppClass    GladeAppClass;

46 47
struct _GladeApp
{
48 49 50
  GObject parent_instance;

  GladeAppPrivate *priv;
51 52 53 54
};

struct _GladeAppClass
{
55 56 57
  GObjectClass parent_class;

  /* signals */
58 59 60 61 62 63 64 65
  void   (* signal_editor_created) (GladeApp *app, GladeSignalEditor *signal_editor);

  void   (* glade_reserved1)   (void);
  void   (* glade_reserved2)   (void);
  void   (* glade_reserved3)   (void);
  void   (* glade_reserved4)   (void);
  void   (* glade_reserved5)   (void);
  void   (* glade_reserved6)   (void);
66 67
};

68

69
GType              glade_app_get_type             (void) G_GNUC_CONST;
70

71 72 73 74
GladeApp*          glade_app_new                  (void);
GladeApp*          glade_app_get                  (void);
GKeyFile*          glade_app_get_config           (void);
gint               glade_app_config_save          (void);
75

76 77 78 79 80 81
gboolean           glade_app_get_catalog_version  (const gchar   *name, 
						   gint          *major, 
						   gint          *minor);
GList             *glade_app_get_catalogs         (void);
GladeCatalog      *glade_app_get_catalog          (const gchar   *name);
GladeClipboard*    glade_app_get_clipboard        (void);
82

83 84 85 86 87
void               glade_app_add_project          (GladeProject  *project);
void               glade_app_remove_project       (GladeProject  *project);
GList*             glade_app_get_projects         (void);
gboolean           glade_app_is_project_loaded    (const gchar   *project_path);
GladeProject*      glade_app_get_project_by_path  (const gchar   *project_path);
88

89 90
void               glade_app_set_window           (GtkWidget     *window);
GtkWidget*         glade_app_get_window           (void);
91
 
92 93
void               glade_app_set_accel_group      (GtkAccelGroup *accel_group);
GtkAccelGroup     *glade_app_get_accel_group      (void);
94

95 96 97
void               glade_app_search_docs          (const gchar   *book, 
						   const gchar   *page, 
						   const gchar   *search);
98

99
/* package paths */
100 101 102 103 104 105
const gchar       *glade_app_get_catalogs_dir     (void) G_GNUC_CONST;
const gchar       *glade_app_get_modules_dir      (void) G_GNUC_CONST;
const gchar       *glade_app_get_plugins_dir      (void) G_GNUC_CONST;
const gchar       *glade_app_get_pixmaps_dir      (void) G_GNUC_CONST;
const gchar       *glade_app_get_locale_dir       (void) G_GNUC_CONST;
const gchar       *glade_app_get_bin_dir          (void) G_GNUC_CONST;
106

107 108 109
G_END_DECLS

#endif /* __GLADE_APP_H__ */