This object represents an `instantiation' of an XML interface description.
When one of these objects is created, the XML file is read, and the
interface is created. The GladeXML object then provides an interface for
accessing the widgets in the interface by the names assigned to them
inside the XML description.
The GladeXML object can also be used to connect handlers to the named
signals in the description. Libglade also provides an interface by which
it can look up the signal handler names in the program's symbol table and
automatically connect as many handlers up as it can that way.
Creates a new GladeXML object (and the corresponding widgets) from the
CLASS="PARAMETER"
>fname. Optionally it will only build the interface from the
widget node root (if it is not NULL). This feature is useful if you
only want to build say a toolbar or menu from the XML file, but not the
window it is embedded in. Note also that the XML parse tree is cached
to speed up creating another GladeXML object for the same file
fname :
the XML file name.
root :
the widget node in fname to start building from (or NULL)
domain :
the translation domain for the XML file (or NULL for default)
Returns :
the newly created GladeXML object, or NULL on failure.
Creates a new GladeXML object (and the corresponding widgets) from the
buffer buffer. Optionally it will only build the interface from the
widget node root (if it is not NULL). This feature is useful if you
only want to build say a toolbar or menu from the XML document, but not the
window it is embedded in.
buffer :
the memory buffer containing the XML document.
size :
the size of the buffer.
root :
the widget node in buffer to start building from (or NULL)
domain :
the translation domain to use for this interface (or NULL)
Returns :
the newly created GladeXML object, or NULL on failure.
In the glade interface descriptions, signal handlers are specified for
widgets by name. This function allows you to connect a C function to
all signals in the GladeXML file with the given signal handler name.
In the glade interface descriptions, signal handlers are specified for
widgets by name. This function allows you to connect a C function to
all signals in the GladeXML file with the given signal handler name.
self :
the GladeXML object
handlername :
the signal handler name
func :
the signal handler function
user_data :
the signal handler data
GladeXML *self);
NULL) to
look at the application's symbol table. From here it tries to match
the signal handler names given in the interface description with
symbols in the application and connects the signals.
Note that this function will not work correctly if gmodule is not
supported on the platform.
self :
the GladeXML object.
GtkWidgetGladeXML *self,
const char *name);
This function is used to get a pointer to the GtkWidget corresponding to
name in the interface description. You would use this if you have to do
anything to the widget after loading.
self :
the GladeXML object.
name :
the name of the widget.
Returns :
the widget matching name, or NULL if none exists.
GListGladeXML *self,
const char *name);
This function is used to get a list of pointers to the GtkWidget(s)
with names that start with the string name in the interface description.
You would use this if you have to do something to all of these widgets
after loading.
self :
the GladeXML object.
name :
the name of the widget.
Returns :
A list of the widget that match name as the start of their
name, or NULL if none exists.
This is the signature of a function used to connect signals. It is used
functions. It is mainly intented for interpreted language bindings, but
could be useful where the programmer wants more control over the signal
connection process.
handler_name :
the name of the handler function to connect.
object :
the object to connect the signal to.
signal_name :
the name of the signal.
signal_data :
the string value of the signal data given in the XML file.
connect_object :
non NULL if gtk_signal_connect_object should be used.
after :
TRUE if the connection should be made with gtk_signal_connect_after.
Calling this function allows you to override the default behaviour
when a Custom widget is found in an interface. This could be used by
a language binding to call some other function, or to limit what
functions can be called to create custom widgets.