source: trunk/third/libglade2/glade/glade-parser.h @ 18268

Revision 18268, 3.1 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18267, which included commits to RCS files with non-trunk default branches.
Line 
1/* -*- Mode: C; c-basic-offset: 4 -*-
2 * libglade - a library for building interfaces from XML files at runtime
3 * Copyright (C) 1998-2002  James Henstridge <james@daa.com.au>
4 *
5 * glade-parser.h: functions for parsing glade-2.0 files
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 * Library General Public License for more details.
16 *
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA  02111-1307, USA.
21 */
22
23#ifndef GLADE_PARSER_H
24#define GLADE_PARSER_H
25
26#include <glib.h>
27#include <gdk/gdk.h>
28
29G_BEGIN_DECLS
30
31typedef struct _GladeProperty GladeProperty;
32struct _GladeProperty {
33    gchar *name;
34    gchar *value;
35};
36
37typedef struct _GladeSignalInfo GladeSignalInfo;
38struct _GladeSignalInfo {
39    gchar *name;
40    gchar *handler;
41    gchar *object; /* NULL if this isn't a connect_object signal */
42    guint after : 1;
43};
44
45typedef struct _GladeAtkActionInfo GladeAtkActionInfo;
46struct _GladeAtkActionInfo {
47    gchar *action_name;
48    gchar *description;
49};
50
51typedef struct _GladeAtkRelationInfo GladeAtkRelationInfo;
52struct _GladeAtkRelationInfo {
53    gchar *target;
54    gchar *type;
55};
56
57typedef struct _GladeAccelInfo GladeAccelInfo;
58struct _GladeAccelInfo {
59    guint key;
60    GdkModifierType modifiers;
61    gchar *signal;
62};
63
64typedef struct _GladeWidgetInfo GladeWidgetInfo;
65typedef struct _GladeChildInfo GladeChildInfo;
66
67struct _GladeWidgetInfo {
68    GladeWidgetInfo *parent;
69
70    gchar *classname;
71    gchar *name;
72
73    GladeProperty *properties;
74    guint n_properties;
75
76    GladeProperty *atk_props;
77    guint n_atk_props;
78
79    GladeSignalInfo *signals;
80    guint n_signals;
81       
82    GladeAtkActionInfo *atk_actions;
83    guint n_atk_actions;
84
85    GladeAtkRelationInfo *relations;
86    guint n_relations;
87
88    GladeAccelInfo *accels;
89    guint n_accels;
90
91    GladeChildInfo *children;
92    guint n_children;
93};
94
95struct _GladeChildInfo {
96    GladeProperty *properties;
97    guint n_properties;
98
99    GladeWidgetInfo *child;
100    gchar *internal_child;
101};
102
103typedef struct _GladeInterface GladeInterface;
104struct _GladeInterface {
105    gchar **requires;
106    guint n_requires;
107
108    GladeWidgetInfo **toplevels;
109    guint n_toplevels;
110
111    GHashTable *names;
112
113    GHashTable *strings;
114};
115
116/* the actual functions ... */
117GladeInterface *glade_parser_parse_file   (const gchar *file,
118                                           const gchar *domain);
119GladeInterface *glade_parser_parse_buffer (const gchar *buffer, gint len,
120                                           const gchar *domain);
121void            glade_interface_destroy   (GladeInterface *interface);
122
123void            glade_interface_dump      (GladeInterface *interface,
124                                           const gchar *filename);
125
126G_END_DECLS
127
128#endif
Note: See TracBrowser for help on using the repository browser.