On Fri, 15 Jun 2007, Johan Dahlin wrote:

> Tim Janik wrote:
> [..]
>>> 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.
>
> I also realized that after trying to implement user_type/user_data and I
> agree that haveing after, swapped and object tags is a much better mapping
> to what you can do using signal connection mechanism.
>
> The only use case it doesn't cover is a way to send in a string or an
> integer (with GPOINTER_TO_INT), as Morten mentioned in this thread.

yeah, you said you'd put this as a future bug though, so
we can still make up our mind on that later.
on a related note, we might want to have similar conveniences
in the C API, e.g.:

   void        g_object_set_qdata_int            (GObject        *object,
                                                  GQuark          quark,
                                                  gssize          int_data);
in your case, that'd map to "user_data_int".

or alternatively:
   void        g_object_set_float_qdata          (GObject        *object,
                                                  GQuark          quark,
                                                  float           float_data);
in your case, that'd map to "user_float_data".

however, that can be a seperate enhancement bug and doesn't
need to hold off builder inclusion right now.

(for anyone who wants to discuss this, please *first* open a bug report
and start a seperate email thread)

> 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