source: trunk/third/libglade2/glade/glade-private.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-private.h: private datastructures for the GladeXML object.
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#ifndef GLADE_PRIVATE_H
23#define GLADE_PRIVATE_H
24#include <stdio.h>
25#include <glib.h>
26#include <gtk/gtk.h>
27#include <glade/glade-xml.h>
28#include <glade/glade-parser.h>
29
30struct _GladeXMLPrivate {
31    GladeInterface *tree; /* the tree for this GladeXML */
32
33    GtkTooltips *tooltips; /* if not NULL, holds all tooltip info */
34
35    /* hash tables of widgets.  The keys are stored as widget data,
36     * and get freed with those widgets. */
37    GHashTable *name_hash;
38       
39    /* hash table of signals.  The Data is a GList of GladeSignalData
40     * structures which get freed when the GladeXML object is
41     * destroyed */
42    GHashTable *signals;
43
44    /* the current toplevel being built */
45    GtkWindow *toplevel;
46
47    /* the accel group to add accelerators to (not mnemonics) */
48    GtkAccelGroup *accel_group;
49
50    /* these hold the focus and default widgets for a window until they
51     * get packed into the window -- we can't call gtk_widget_grab_focus
52     * or grab_default until this occurs */
53    GtkWidget *focus_widget;
54    GtkWidget *default_widget;
55
56    /* list of GtkWidget properties waiting to be set.  (they couldn't
57     * be set earlier because the value widget hadn't been created
58     * yet). */
59    GList *deferred_props;
60};
61
62typedef struct _GladeSignalData GladeSignalData;
63struct _GladeSignalData {
64    GObject *signal_object;
65    char *signal_name;
66    char *connect_object; /* or NULL if there is none */
67    gboolean signal_after;
68};
69
70typedef struct _GladeDeferredProperty GladeDeferredProperty;
71struct _GladeDeferredProperty {
72    const gchar *target_name;
73
74    enum { DEFERRED_PROP, DEFERRED_REL } type;
75    union {
76        struct {
77            GObject *object;
78            const gchar *prop_name;
79        } prop;
80        struct {
81            AtkRelationSet *relation_set;
82            AtkRelationType relation_type;
83        } rel;
84    } d;
85};
86
87typedef enum {
88    GLADE_DEBUG_PARSER = 1 << 0,
89    GLADE_DEBUG_BUILD  = 1 << 1
90} GladeDebugFlag;
91
92extern guint _glade_debug_flags;
93#ifdef DEBUG
94#  define GLADE_NOTE(type, action)  G_STMT_START { \
95    if (_glade_debug_flags & GLADE_DEBUG_##type) \
96        { action; };                } G_STMT_END
97#else
98#  define GLADE_NOTE(type, action)
99#endif
100
101#endif
102
Note: See TracBrowser for help on using the repository browser.