[Gtk-sharp-list] Gdk.Key again

Mike Kestner mkestner@speakeasy.net
20 Apr 2003 22:09:28 -0500

On Fri, 2003-04-18 at 13:16, Charles Iliya Krempeaux wrote:

> (One thing about the script though.  Currently, the script generates
> the C# code.  I'd actually suggest that the script generate an
> "api/???-api.xml" file instead.    Possibly even putting it in the
> "gtk-api.xml" file.  There are facilities with in this file format
> for enum's.  And this would fit in  better within the normal Gtk#
> build process.)

No, I think generating the source file directly is fine in this case. 
It sounds like this "type" is going to end up being substantially hacked
from the current automagically generated base.  That being the case, we
probably don't even need to keep the script around once the manual
hacking starts. 

> Alternatively, since we do have the problem that any automated script
> will likely not be able to generate CLS compliant code.  We may just
> have to write our own Gdk.Key struct ourselves.  (And hope that the
> GDK maintainers don't change any of the key codes.)

We have several CLS-compliance issues to address.  IntPtr and unsigned
API, this case-sensitivity stuff, etc...  This is clearly an important
goal, and we should mark this type with a bug report to indicate it has
CLS issues.

> But anyways, as I mentioned in a previous e-mail, I suggest something
> like this...
>     public struct Key

This seems a little heavy to me.  The currently encouraged method of
handling Text input in Gtk.IMContext.  I think having an enum that is
CLS-compliant to expose gdk keycodes is a good goal, though.

Mike Kestner <mkestner@speakeasy.net>