<HTML
><HEAD
><TITLE
>Libglade SAX Parser</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.44"><LINK
REL="HOME"
TITLE="Libglade Reference Manual"
HREF="libglade.html"><LINK
REL="UP"
TITLE="Libglade Library Reference"
HREF="libglade-lib.html"><LINK
REL="PREVIOUS"
TITLE="GladeXML"
HREF="gladexml.html"><LINK
REL="NEXT"
TITLE="Libglade Build"
HREF="libglade-libglade-build.html"></HEAD
><BODY
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
BGCOLOR="#000000"
CELLPADDING="1"
CELLSPACING="0"
><TR
><TH
COLSPAN="4"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="5"
>Libglade Reference Manual</FONT
></TH
></TR
><TR
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="left"
><A
HREF="gladexml.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>&#60;&#60;&#60; Previous Page</B
></FONT
></A
></TD
><TD
WIDTH="25%"
BGCOLOR="#0000C0"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="libglade.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Home</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#00C000"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="libglade-lib.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Up</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="right"
><A
HREF="libglade-libglade-build.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Next Page &#62;&#62;&#62;</B
></FONT
></A
></TD
></TR
></TABLE
></DIV
><H1
><A
NAME="LIBGLADE-LIBGLADE-SAX-PARSER"
>Libglade SAX Parser</A
></H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN686"
></A
><H2
>Name</H2
>Libglade SAX Parser&nbsp;--&nbsp;Declarations and routines for accessing the SAX based parser.</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN689"
></A
><H2
>Synopsis</H2
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="SYNOPSIS"
>&#13;#include &lt;glade/glade-widget-tree.h&gt;


struct      <A
HREF="libglade-libglade-sax-parser.html#GLADEWIDGETTREE"
>GladeWidgetTree</A
>;
struct      <A
HREF="libglade-libglade-sax-parser.html#GLADESTYLEINFO"
>GladeStyleInfo</A
>;
struct      <A
HREF="libglade-libglade-sax-parser.html#GLADEWIDGETINFO"
>GladeWidgetInfo</A
>;
struct      <A
HREF="libglade-libglade-sax-parser.html#GLADEATTRIBUTE"
>GladeAttribute</A
>;
struct      <A
HREF="libglade-libglade-sax-parser.html#GLADESIGNALINFO"
>GladeSignalInfo</A
>;
struct      <A
HREF="libglade-libglade-sax-parser.html#GLADEACCELERATORINFO"
>GladeAcceleratorInfo</A
>;

<A
HREF="libglade-libglade-sax-parser.html#GLADEWIDGETTREE"
>GladeWidgetTree</A
>* <A
HREF="libglade-libglade-sax-parser.html#GLADE-WIDGET-TREE-PARSE-FILE"
>glade_widget_tree_parse_file</A
>
                                            (const char *file);
<A
HREF="libglade-libglade-sax-parser.html#GLADEWIDGETTREE"
>GladeWidgetTree</A
>* <A
HREF="libglade-libglade-sax-parser.html#GLADE-WIDGET-TREE-PARSE-MEMORY"
>glade_widget_tree_parse_memory</A
>
                                            (char *buffer,
                                             int size);
<A
HREF="libglade-libglade-sax-parser.html#GLADEWIDGETTREE"
>GladeWidgetTree</A
>* <A
HREF="libglade-libglade-sax-parser.html#GLADE-WIDGET-TREE-REF"
>glade_widget_tree_ref</A
>      (<A
HREF="libglade-libglade-sax-parser.html#GLADEWIDGETTREE"
>GladeWidgetTree</A
> *tree);
void        <A
HREF="libglade-libglade-sax-parser.html#GLADE-WIDGET-TREE-UNREF"
>glade_widget_tree_unref</A
>         (<A
HREF="libglade-libglade-sax-parser.html#GLADEWIDGETTREE"
>GladeWidgetTree</A
> *tree);
void        <A
HREF="libglade-libglade-sax-parser.html#GLADE-WIDGET-TREE-PRINT"
>glade_widget_tree_print</A
>         (<A
HREF="libglade-libglade-sax-parser.html#GLADEWIDGETTREE"
>GladeWidgetTree</A
> *tree);</PRE
></TD
></TR
></TABLE
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN709"
></A
><H2
>Description</H2
><P
>The structures described here are the output of libglade's XML parser.
These structures are really only useful for people who are extending
libglade to handle other widget sets, but it could also be useful for
other applications that need to read glade XML files.</P
><P
>If you only wish to use libglade, you don't need to worry about
these functions and structures.</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN713"
></A
><H2
>Details</H2
><DIV
CLASS="REFSECT2"
><A
NAME="AEN715"
></A
><H3
><A
NAME="GLADEWIDGETTREE"
></A
>struct GladeWidgetTree</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>struct GladeWidgetTree {
    guint ref;
    GTime mtime;
    GList *styles;
    GList *widgets;
    GHashTable *names;
};</PRE
></TD
></TR
></TABLE
><P
></P
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN720"
></A
><H3
><A
NAME="GLADESTYLEINFO"
></A
>struct GladeStyleInfo</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>struct GladeStyleInfo {
    gchar *name;
    gchar *rc_name;
    gboolean local : 1;
};</PRE
></TD
></TR
></TABLE
><P
></P
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN725"
></A
><H3
><A
NAME="GLADEWIDGETINFO"
></A
>struct GladeWidgetInfo</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>struct GladeWidgetInfo {
    GladeWidgetInfo *parent;

    gchar *class;
    gchar *name;
    gchar *tooltip;

    gint width, height;
    gint border_width;

    /* bit field */
    gboolean visible : 1;
    gboolean sensitive : 1;
    gboolean can_default : 1;
    gboolean can_focus : 1;
    gboolean has_default : 1;
    gboolean has_focus : 1;

    GladeStyleInfo *style;

    /* lists of GladeAttribute's */
    GList *attributes;
    GList *child_attributes; /* for the &lt;child&gt;&lt;/child&gt; section */

    GList *signals;
    GList *accelerators;

    GList *children;
};</PRE
></TD
></TR
></TABLE
><P
></P
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN730"
></A
><H3
><A
NAME="GLADEATTRIBUTE"
></A
>struct GladeAttribute</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>struct GladeAttribute {
    gchar *name;
    gchar *value;
};</PRE
></TD
></TR
></TABLE
><P
></P
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN735"
></A
><H3
><A
NAME="GLADESIGNALINFO"
></A
>struct GladeSignalInfo</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>struct GladeSignalInfo {
    gchar *name;
    gchar *handler;
    gchar *data;
    gchar *object; /* NULL if this isn't a connect_object signal */
    gboolean after : 1;
};</PRE
></TD
></TR
></TABLE
><P
></P
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN740"
></A
><H3
><A
NAME="GLADEACCELERATORINFO"
></A
>struct GladeAcceleratorInfo</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>struct GladeAcceleratorInfo {
    guint key;
    GdkModifierType modifiers;
    gchar *signal;
};</PRE
></TD
></TR
></TABLE
><P
></P
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN745"
></A
><H3
><A
NAME="GLADE-WIDGET-TREE-PARSE-FILE"
></A
>glade_widget_tree_parse_file ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
><A
HREF="libglade-libglade-sax-parser.html#GLADEWIDGETTREE"
>GladeWidgetTree</A
>* glade_widget_tree_parse_file
                                            (const char *file);</PRE
></TD
></TR
></TABLE
><P
>This routine will parse a file containing Glade XML, and produce a
GladeWidgetTree structure containing the information in this file.</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>file</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the filename of the XML file to parse.</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the GladeWidgetTree structure, or NULL on error.</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN765"
></A
><H3
><A
NAME="GLADE-WIDGET-TREE-PARSE-MEMORY"
></A
>glade_widget_tree_parse_memory ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
><A
HREF="libglade-libglade-sax-parser.html#GLADEWIDGETTREE"
>GladeWidgetTree</A
>* glade_widget_tree_parse_memory
                                            (char *buffer,
                                             int size);</PRE
></TD
></TR
></TABLE
><P
>This routine will parse an in memory buffer containing Glade XML, and
produce a GladeWidgetTree structure containing the information in this
buffer.</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>buffer</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the in memory buffer holding the XML document</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>size</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the size of the buffer</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the GladeWidgetTree structure, or NULL on error.</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN789"
></A
><H3
><A
NAME="GLADE-WIDGET-TREE-REF"
></A
>glade_widget_tree_ref ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
><A
HREF="libglade-libglade-sax-parser.html#GLADEWIDGETTREE"
>GladeWidgetTree</A
>* glade_widget_tree_ref      (<A
HREF="libglade-libglade-sax-parser.html#GLADEWIDGETTREE"
>GladeWidgetTree</A
> *tree);</PRE
></TD
></TR
></TABLE
><P
>Increment the reference count of a GladeWidgetTree structure.</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>tree</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the GladeWidgetTree structure</TD
></TR
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><I
CLASS="EMPHASIS"
>Returns</I
> :</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the tree argument.</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN810"
></A
><H3
><A
NAME="GLADE-WIDGET-TREE-UNREF"
></A
>glade_widget_tree_unref ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void        glade_widget_tree_unref         (<A
HREF="libglade-libglade-sax-parser.html#GLADEWIDGETTREE"
>GladeWidgetTree</A
> *tree);</PRE
></TD
></TR
></TABLE
><P
>Decrement the reference count of a GladeWidgetTree structure.</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>tree</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the GladeWidgetTree structure</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><HR><DIV
CLASS="REFSECT2"
><A
NAME="AEN826"
></A
><H3
><A
NAME="GLADE-WIDGET-TREE-PRINT"
></A
>glade_widget_tree_print ()</H3
><TABLE
BORDER="0"
BGCOLOR="#D6E8FF"
WIDTH="100%"
CELLPADDING="6"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>void        glade_widget_tree_print         (<A
HREF="libglade-libglade-sax-parser.html#GLADEWIDGETTREE"
>GladeWidgetTree</A
> *tree);</PRE
></TD
></TR
></TABLE
><P
>Prints out the information stored in the GladeWidgetTree structure.
This is mainly for debugging to make sure that the parser is producing
correct output.</P
><P
></P
><DIV
CLASS="INFORMALTABLE"
><P
></P
><TABLE
BORDER="0"
WIDTH="100%"
BGCOLOR="#FFD0D0"
CELLSPACING="0"
CELLPADDING="4"
CLASS="CALSTABLE"
><TR
><TD
WIDTH="20%"
ALIGN="RIGHT"
VALIGN="TOP"
><TT
CLASS="PARAMETER"
><I
>tree</I
></TT
>&nbsp;:</TD
><TD
WIDTH="80%"
ALIGN="LEFT"
VALIGN="TOP"
> the widget tree.</TD
></TR
></TABLE
><P
></P
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><BR
CLEAR="all"><BR><TABLE
WIDTH="100%"
BORDER="0"
BGCOLOR="#000000"
CELLPADDING="1"
CELLSPACING="0"
><TR
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="left"
><A
HREF="gladexml.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>&#60;&#60;&#60; Previous Page</B
></FONT
></A
></TD
><TD
WIDTH="25%"
BGCOLOR="#0000C0"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="libglade.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Home</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#00C000"
ALIGN="center"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
><A
HREF="libglade-lib.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Up</B
></FONT
></A
></B
></FONT
></TD
><TD
WIDTH="25%"
BGCOLOR="#C00000"
ALIGN="right"
><A
HREF="libglade-libglade-build.html"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Next Page &#62;&#62;&#62;</B
></FONT
></A
></TD
></TR
><TR
><TD
COLSPAN="2"
ALIGN="left"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>GladeXML</B
></FONT
></TD
><TD
COLSPAN="2"
ALIGN="right"
><FONT
COLOR="#FFFFFF"
SIZE="3"
><B
>Libglade Build</B
></FONT
></TD
></TR
></TABLE
></DIV
></BODY
></HTML
>