Re: Signal prototypes





----- Original Message ----
From: Gabriele Greco <gabriele greco darts it>
To: gtk-app-devel-list gnome org
Sent: Thursday, February 21, 2008 8:40:05 AM
Subject: Signal prototypes


Given 
that 
different 
signals 
may 
have 
different 
prototypes:

"clicked": 
void 
(*)(GtkWidget 
*, 
void 
*)
"keypress": 
gboolean 
(*)(GtkWidget 
*, 
GdkEvent 
*, 
void 
*)
"delete_event": 
gboolean 
(*)(GtkWidget 
*, 
void 
*)
[...]

There 
is 
a 
way, 
from 
the 
signal 
name, 
to 
find 
in 
ADVANCE 
what 
kind 
of 
prototype 
the 
signal 
will 
expect?

---
Bye,
 
Gabry


---------------------


Try g_signal_query()

Use g_signal_lookup() to get the id from the signal name (and the type of object it acts on), then use 
g_signal_query() to get the in-depth information.

http://library.gnome.org/devel/gobject/stable/gobject-Signals.html#g-signal-query



guint               g_signal_lookup                     (const gchar *name,
                                                         GType itype);


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 




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