Re: g_bus_watch_proxy and introspection
- From: Tomeu Vizoso <tomeu vizoso collabora co uk>
- To: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: g_bus_watch_proxy and introspection
- Date: Mon, 24 May 2010 09:40:29 +0200
On Mon, May 24, 2010 at 09:06, Tomeu Vizoso
<tomeu vizoso collabora co uk> wrote:
> 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.
Have added a point about callbacks to
http://live.gnome.org/action/subscribe/GObjectIntrospection/WritingBindingableAPIs
, but that page is still very incomplete.
What can we do so writers of new API have these guidelines more
present? Add a section to the glib docs? Something about a GNOME goal?
Regards,
Tomeu
> 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]