Re: [gtk-list] Re: GC and GTK+
- From: Tim Janik <timj gtk org>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: GC and GTK+
- Date: Fri, 24 Apr 1998 22:38:55 +0200 (CEST)
On Thu, 23 Apr 1998, Kenneth Albanowski wrote:
> On 22 Apr 1998, Vollmer Marius wrote:
>
> > 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.
>
> Actually, I'd rather unify more: the existing pointer values passed by the
> signal handlers cause great problems for my Perl code (as it needs to know
> the exact type of each of those pointers). I'd change the GTK_TYPE_POINTER
> GtkType to include a DestroyNotify callback, and then expand the GtkArg a
> bit to include flags saying whether the type is read, write, or both
> (i.e., in, out, or both) and who has ownership of the pointer (the caller
> retains ownership, or transfers ownership to the called.)
the functionality for this is already in place:
/* Allocate a GtkArg array of size nargs that hold the
* names and types of the args that can be used with
* gtk_object_set/gtk_object_get. if (arg_flags!=NULL),
* (*arg_flags) will be set to point to a newly allocated
* guint array that holds the flags of the args.
* It is the callers response to do a
* g_free (returned_args); g_free (*acess_masks).
*/
GtkArg* gtk_object_query_args (GtkType class_type,
guint32 **arg_flags,
guint *nargs);
>
> --
> Kenneth Albanowski (kjahds@kjahds.com, CIS: 70705,126)
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]