glade-catalog.h 3.03 KB
Newer Older
1 2 3
/*
 * Copyright (C) 2001 Ximian, Inc.
 * Copyright (C) 2004 Imendio AB
4
 * Copyright (C) 2007 The GNOME Foundation
5 6 7 8 9 10 11 12 13 14 15 16 17
 *
 * 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
18
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 20
 */

Jose Maria Celorio's avatar
Jose Maria Celorio committed
21 22 23
#ifndef __GLADE_CATALOG_H__
#define __GLADE_CATALOG_H__

24
#include <glib.h>
25
#include <gladeui/glade-xml-utils.h>
26

Jose Maria Celorio's avatar
Jose Maria Celorio committed
27 28
G_BEGIN_DECLS

29
#define GLADE_CATALOG(c)    ((GladeCatalog *) c)
Paolo Borelli's avatar
Paolo Borelli committed
30 31
#define GLADE_IS_CATALOG(c) (c != NULL)

Tristan Van Berkom's avatar
Tristan Van Berkom committed
32

33 34
#define GLADE_WIDGET_GROUP(g)    ((GladeWidgetGroup *) g)
#define GLADE_IS_WIDGET_GROUP(g) (g != NULL)
35

36
typedef struct _GladeCatalog     GladeCatalog;
37
typedef struct _GladeWidgetGroup GladeWidgetGroup;
Paolo Borelli's avatar
Paolo Borelli committed
38

39 40 41 42 43 44 45 46 47 48 49

/**
 * GladeCatalogInitFunc:
 * @name: The name of the catalog
 *
 * Called once at glade startup time for every catalog, catalogs
 * are initialized in order of dependancies.
 */
typedef void      (*GladeCatalogInitFunc)    (const gchar *name);


50
typedef struct {
51 52
  gint major;
  gint minor;
53 54
} GladeTargetableVersion;

55

56 57
void          glade_catalog_add_path                (const gchar      *path);
void          glade_catalog_remove_path             (const gchar      *path);
58
const GList  *glade_catalog_get_extra_paths         (void);
59
const GList  *glade_catalog_load_all                (void);
Paolo Borelli's avatar
Paolo Borelli committed
60

61 62 63 64
G_CONST_RETURN gchar  *glade_catalog_get_name       (GladeCatalog     *catalog);
G_CONST_RETURN gchar  *glade_catalog_get_icon_prefix(GladeCatalog     *catalog);
G_CONST_RETURN gchar  *glade_catalog_get_domain     (GladeCatalog     *catalog);
G_CONST_RETURN gchar  *glade_catalog_get_book       (GladeCatalog     *catalog);
65

66 67
GList        *glade_catalog_get_targets             (GladeCatalog     *catalog);

68 69
guint16       glade_catalog_get_major_version       (GladeCatalog     *catalog);
guint16       glade_catalog_get_minor_version       (GladeCatalog     *catalog);
70

71
GList        *glade_catalog_get_widget_groups       (GladeCatalog     *catalog);
72

73
GList        *glade_catalog_get_adaptors            (GladeCatalog     *catalog);
Paolo Borelli's avatar
Paolo Borelli committed
74

75
gboolean      glade_catalog_is_loaded               (const gchar      *name);
76

77
void          glade_catalog_destroy_all             (void);
Paolo Borelli's avatar
Paolo Borelli committed
78

79

80
const gchar  *glade_widget_group_get_name           (GladeWidgetGroup *group);
81

82
const gchar  *glade_widget_group_get_title          (GladeWidgetGroup *group);
83

84
gboolean      glade_widget_group_get_expanded       (GladeWidgetGroup *group);
85

86
const GList  *glade_widget_group_get_adaptors       (GladeWidgetGroup *group);
87

Jose Maria Celorio's avatar
Jose Maria Celorio committed
88 89 90
G_END_DECLS

#endif /* __GLADE_CATALOG_H__ */