Re: how to get widget properties list ?



On Sun, Jan 30, 2005 at 05:46:51AM +0800, Kuang-Chun Cheng wrote:
> Is it possible to get widget properties list at run time ?
> For example, how could I know GtkButton has a
> signal called "clicked" ?  I knew I can check APIs manual
> to get the info, but is it possible to query such info
> at run time ?  Does Gtk widgets support stuff such as
> sys_siglist[] or sys_errlist[] ... 

You can use g_object_class_list_properties() and
g_signal_list_ids() (note the class must exist, so you may
need g_type_class_ref() beforehand; also note you will have
to trace inheritance yourself, g_signal_list_ids() does
not include parents' signals).

There are two programs you may want to have a look at
because of their use of inspection: glade and gtk-doc's
scanner.

Yeti


--
Dynamic IP address is not a crime.



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