Get signals and callbacks.



Hello. I'm implementing an application in gtkmm. I want to add support for
dynamic signal
connection from a glade file in C++ (which is not supported by the C++
bindings).

I'd like to know if there is a way, once a glade file has been instantiated,
to obtain information about
the signals and handlers attached to every widget from the Gobject objects
and how I should do it.

I tried to  do like this:


guint nids = 0;
guint * ids = g_signal_list_ids(g_type_from_name("GtkButton"), &nids);

 std::cout << nids << std::endl;
 std::cout << g_signal_name(ids[23]) << std::endl;


but if I use GtkButton, nids == 0. However, when I use "GtkWidget" I get
a 67 and signals can be get with the function g_signal_names(ids[i]);

This code is to get available signals, but not the real connections between
objects. Can help, please?



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