Re: g_bus_watch_proxy and introspection



On Sun, May 23, 2010 at 18:00, muppet <scott asofyet org> wrote:
>
> On May 23, 2010, at 11:41 AM, Tomeu Vizoso wrote:
>
>> This implies that GDestroyNotify is per callback, but in this case we
>> have two callbacks and a single GDestroyNotify.
>>
>> What are bindings supposed to do in this case?
>
> Provided that both callbacks are invalidated when the object is destroyed, then you use a bit of glue code to use them together.  Make a little structure containing the info for both callbacks, and attach that as the user data.  The callback marshaller would look up the right slot, and the destroy notifier would invalidate and destroy both callbacks.
>
>
> This is not only something that bindings have to deal with -- users of the C api would have to do something similar.

Hi, I was talking about bindings that call the C side by using the
info that can be gotten from introspection repositories at runtime.
What you suggest could be done at build time, for this specific case,
but the point of introspection is precisely to avoid having to write
those.

An alternative is to add a more bindable-friendly function that
accepts GClosures.

Regards,

Tomeu

> --
> elysse:  You dance better than some.
> me:  "Some" what?
> elysse:  Some asparagus.
>
>
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
>


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