Re: GtkBuilderConnectFunc and <signal> tag

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.


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