Re: [gtk-list] Re: Interpreter requests



Tim Janik <timj@gtk.org> writes:

> sure, that is probably a good idea!

Boy, I just read your commit message.  You are really fast...

> yes, please extend on this subject.

Hmm, just as we now have registration functions for enums and flags,
we could have ones for the other kinds of `inheritable' types, with
useful information about them.

   GtkType gtk_type_register_boxed (char *name, copy, free);

A boxed type is essentially a well typed pointer (GTK_TYPE_POINTER is
an untyped pointer).  The info to store for a boxed type could be:

 - the size of the pointed to object
 - whether it is ref_counted and which functions to use for that
 - whether it can be copied/freed and which funcs to use
 - maybe even the accessible fields that it has.

   GtkType gtk_type_register_foreign (char *name, copy, free, ...);

Foreign types are ones that Gtk doesn't know about but has to take
care of.  Like the DATA of signal handlers, or user data set with
gtk_object_set.  This is much like a boxed type...  Infos:

 - functions for copying and freeing such a value.

   GtkType gtk_type_register_object (...);

For uniformity.



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