Re: GtkBuilderConnectFunc and <signal> tag
- From: Tim Janik <timj gtk org>
- To: Johan Dahlin <johan gnome org>
- Cc: Christian Persch <chpe gnome org>, Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: GtkBuilderConnectFunc and <signal> tag
- Date: Fri, 15 Jun 2007 15:21:33 +0200 (CEST)
On Wed, 13 Jun 2007, Johan Dahlin wrote:
Tristan Van Berkom wrote:
Let's do something a little cleaner and more flexible;
typedef void (*GtkBuilderConnectFunc) (GtkBuilder *builder,
const gchar *handler_name,
GObject *object,
const gchar *signal_name,
const GValue *signal_user_data,
GConnectFlags flags,
gpointer user_data);
and;
<signal name=".*" handler=".*" after="bool" swapped="bool"
user_type="type" user_data=""/>
user_type would take a GType name, if it's derived from G_TYPE_OBJECT
user_data will be treated an object reference, similar to other
object properties.
Would that be enough?
why? what is the type specification good for if it's not an object?
and, didn't an earlier variant of your code match object="button"
to some "button" object from the builder file? so then, the straight
forward mapping of the GSignal API would be:
<signal name="signalname" handler="callbackname" // mandatory
after="bool" // optional
swapped="bool" // optional
user_data="0x42" object="objectname" // optionally have either of these but not both
/>
i'd say anything other than
"after" indicating G_CONNECT_AFTER,
"swapped" indicating G_CONNECT_SWAPPED,
"object" indicating g_signal_connect_object,
would be misleading and likely confuse people
who also know the C API.
especially so, since g_object_connect() already establishes
a mapping between strings and AFTER/SWAPPED/connect_object,
which is exactly the one i listed above.
Johan
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]