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
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list

Reply via email to