[Gtk-sharp-list] [Patch, etc] gdk/EventKey.custom

Miguel de Icaza miguel@ximian.com
16 Apr 2003 20:17:21 -0400


> Now that we have all the Gdk.Key stuff.  I would be nice
> if we could get a Gdk.Key from Gdk.EventKey.
> So... here's a .custom file for that.  It makes if so you
> can do stuff like...
>     private void KeyPressed(object o, GtkSharp.KeyPressEventArgs args)
>     {
>         Gdk.EventKey ek = args.Event;
>         if (Gdk.Key.Escape == ek.Key) {
>             Gtk.Application.Quit();
>         }
>     }

This patch is interesting.   

I wonder if we should turn most of the internal fields into private
fields, and expose properties.  For instance, one of the problems is
that the field names in there do not follow the .NET naming conventions,
so they look strange sometimes