Re: [gtk-list] Re: A type system for high-level interfaces
- From: Maurizio Vitale <Maurizio Vitale esat kuleuven ac be>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: A type system for high-level interfaces
- Date: 26 Aug 1997 07:40:05 +0200
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]