Re: [gtk-list] Re: GC and GTK+
- From: Vollmer Marius <mvo zagadka ping de>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: GC and GTK+
- Date: 22 Apr 1998 17:16:26 +0200
Kenneth Albanowski <kjahds@kjahds.com> writes:
> On 21 Apr 1998, Vollmer Marius wrote:
>
> > Additionally, Gtk needs to be able to enumerate all `foreign' objects
> > that have been handed to it (essentially all things that now have a
> > DestroyNotify).
>
> An interesting idea, and one that ties nicely into the field that I've
> been concentrating on: interpreter binding.
Yup, I mainly designed this for use with Guile.
> In several places (pointers in signal arguments, and data in
> objects) pointers are held without type information. Keeping full
> type descriptors would help both a GC enumerator, and interpreters.
Yes, we could use the GTK_TYPE_FOREIGN for giving info to Gtk about
foreign values. The interpreter bindings would register a new type
(or several) with a parent type of GTK_TYPE_FOREIGN. Associated with
this new type would be functions for destroying it, and what else is
needed.
GtkType gtk_type_new_foreign (char *name, GtkDestroyNotify, ...);
We can then replace the DestroyNotify parameter thru out by a GtkType.
Then we can request a GtkObject to trace all foreign values of a
certain type, and Gtk knows how to destroy such a value when it needs
to. Additionally we have a hook into Gtk that we can extend without
having to change all functions that take foreign data.
Sigh, yet another variant on the _interp/_full theme. I think we
should start taking out the _interp functions when their functionality
has been superceded by the _full variant. We might introduce another
_typed family (or _foreign?) and the get rid of _full.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]