Re: LibGlade query: glade_xml_signal_autoconnect_full() help.


On Mon, 9 Apr 2001, Archit Baweja wrote:

> Hi
> About a day or two I asked this question but no one answered. So I write 
> again, this time making it simpler for those who intend to answer it an help.
> I'm using libglade for my applications dialogs. So I wanted to know how to 
> get the ease of glade_xml_signal_autoconnect() and versatility of 
> gtk_signal_connect_full() in one. I believe glade_xml_signal_autoconnect_full()
>  is the answer, but I can't figure out how to use it. Can anyone help?

	If I understand you correctly, then yes:
glade_xml_signal_autoconnect_full is what you should use.  To use it, you
must write a callback-connection handler function (see
<includedir>/glade/glade-xml.h, look for 'GladeXMLConnectFunc'), then you
call glade_xml_signal_autoconnect_full with the xml, your connection func,
and some arbitrary user data.

	Your callback function will be called once for every signal
connection requested in the .glade file.  Your callback function is
responsible for connecting the signal correctly (presumably using the
gtk_signal_connect* functions).

	For examples on using it, you can look in the libglade source code
at the implementation of 'glade_xml_signal_connect_data', or you look at
MozGlade (; the project is depreciated, but the
its use of glade_xml_signal_autoconnect_full is still valid), or libglade--
(; a C++ wrapper for libglade, designed to work
nicely with Gtk--).  I'm sure there are others, but those are the ones I can
think of off the top of my head. :-)

> Archit Baweja
> --------------------
> In 1869 the waffle iron was invented for people who had wrinkled waffles.

Viel Spaß


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]