[Glade-users] g_signal_connect - Referencing a pointer
- From: tristan.van.berkom at gmail.com (Tristan Van Berkom)
- Subject: [Glade-users] g_signal_connect - Referencing a pointer
- Date: Wed, 27 Feb 2008 00:47:46 -0300
On Tue, Feb 26, 2008 at 7:40 PM, Guy Murray <guymurray at tiscali.co.uk> wrote:
Hi,
just starting to get to know gtk+ and glade and have the following
problem.
I want to connect a button to a callback function and pass it a pointer
to a struct.
I've done this manually with gtk+ using the deprecated
gtk_signal_connect and it worked fine. However, when I try to do the
same with glade, by adding the struct pointer as an Object in the
button's properties dialogue, g_signal_connect (or rather
g_signal_connect_swapped) casts it as a GTK_OBJECT which presumably it
isn't.
Can anyone explain the best way to get around this?
You can use other signal_connect varients from glade-xml.h, you cannot
currently specify pointers as user data in the glade tool, only objects
inside
the project that can be reffered to by name.
Cheers,
-Tristan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20080227/ded0c5d3/attachment.html
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]