Re: Get signals and callbacks.
- From: Murray Cumming <murrayc murrayc com>
- To: Germán Diago <germandiago gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Get signals and callbacks.
- Date: Tue, 26 Feb 2008 15:49:21 +0100
On Tue, 2008-02-26 at 14:19 +0100, GermÃn Diago wrote:
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?
The get_signals() code here might provide some hints:
http://svn.gnome.org/viewvc/glibmm/trunk/tools/extra_defs_gen/generate_extra_defs.cc?view=markup
I am not at all optimistic that we can do autoconnection, but I am happy
that you are trying.
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]