[845] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] Re: A type system for high-level interfaces

daemon@ATHENA.MIT.EDU (Maurizio Vitale)
Tue Aug 26 01:40:17 1997

To: gtk-list@redhat.com
From: Maurizio Vitale <Maurizio.Vitale@esat.kuleuven.ac.be>
Date: 26 Aug 1997 07:40:05 +0200
In-Reply-To: Marius Vollmer's message of "25 Aug 1997 21:04:52 +0200"
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com

Marius Vollmer <mvo@zagadka.ping.de> writes:

> To explain, what I have in mind for enumerations: You could write this
> code to create a toplevel window
> 
>     (gtk-window-new 'toplevel)
> 
> The 'toplevel argument is essentially a string that has to be strcmped
> against all the literals of the GtkWindowType enumeration, at
> run-time.  The stub for gtk-window-new knows that the argument is a
> GtkWindowType enumeration and calls a Gtk function to obtain its type
> id, much like gtk_object_get_type can be used to get the type id of
> GtkObjects.  From that type id, all necessary information about the
> enumeration can be obtained.

Don't know much about what you're trying to do, but why not making
toplevel a scheme symbol whose value is the integer corresponding to
the C enumeration tag?
Making those symbols part of a gtk module (or prefixed by gtk:) would
help alleviating the name pollution problem.
-mav

--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post