2004-02-16 Mike Kestner <mkestner@ximian.com>

* gdk/Gdk.metadata : hide EventKey
	* gdk/EventKey.cs : glue-based manual implementation.
	* gdk/EventKey.custom : killed
	* gdk/gdk-api.xml : regen
	* gdk/gdk-symbols.xml : manual mapping for EventKey.
	* glue/event.cs : expose key struct fields.

svn path=/trunk/gtk-sharp/; revision=23140
This commit is contained in:
Mike Kestner 2004-02-16 18:41:52 +00:00
parent 65ade8b84c
commit 62c466e8b4
6 changed files with 46 additions and 28 deletions

View file

@ -1,3 +1,11 @@
2004-02-16 Mike Kestner <mkestner@ximian.com>
* gdk/Gdk.metadata : hide EventKey
* gdk/EventKey.cs : glue-based manual implementation.
* gdk/gdk-api.xml : regen
* gdk/gdk-symbols.xml : manual mapping for EventKey.
* glue/event.cs : expose key struct fields.
2004-02-16 Mike Kestner <mkestner@ximian.com>
* gdk/Gdk.metadata : hide EventAny

View file

@ -1,27 +0,0 @@
//
// gdk/EventKey.custom
//
// Authors: Charles Iliya Krempeaux <charles@reptile.ca>
// Gustavo Giraldez <gustavo.giraldez@gmx.net>
//
// Copyright (C) 2003 Reptile Consulting & Services Ltd.
// Copyright (C) 2003 Charles Iliya Krempeaux.
// Copyright (C) 2004 Gustavo Giraldez
//
[DllImport("libgdk-win32-2.0-0.dll")]
static extern IntPtr gdk_event_get_type();
public static GLib.GType GType {
get {
IntPtr raw_ret = gdk_event_get_type();
GLib.GType ret = new GLib.GType(raw_ret);
return ret;
}
}
public Gdk.Key Key {
get {
return (Gdk.Key) this.Keyval;
}
}

View file

@ -63,6 +63,7 @@
<attr path="//object[@cname='GdkWindow']/method[@name='PeekChildren']" name="hidden">1</attr>
<attr path="//object[@cname='GdkWindow']/method[@name='SetIconList']" name="hidden">1</attr>
<attr path="//struct[@cname='GdkEventAny']" name="hidden">1</attr>
<attr path="//struct[@cname='GdkEventKey']" name="hidden">1</attr>
<attr path="//struct[@cname='GdkPixmapObject']" name="hidden">1</attr>
<attr path="//struct[@cname='GdkTimeCoord']/field[@cname='axes']" name="array_len">128</attr>
<attr path="//struct[@cname='GdkWindowObject']" name="hidden">1</attr>

View file

@ -2339,7 +2339,7 @@
<field cname="send_event" type="gint8" />
<field cname="in" type="gint16" />
</struct>
<struct name="EventKey" cname="GdkEventKey">
<struct name="EventKey" cname="GdkEventKey" hidden="1">
<field cname="type" type="GdkEventType" />
<field cname="window" type="GdkWindow*" />
<field cname="send_event" type="gint8" />

View file

@ -2,5 +2,6 @@
<api>
<symbol type="manual" cname="GdkEvent" name="Gdk.Event"/>
<symbol type="manual" cname="GdkEventAny" name="Gdk.Event"/>
<symbol type="manual" cname="GdkEventKey" name="Gdk.EventKey"/>
</api>

View file

@ -14,6 +14,11 @@
GdkEventType gtksharp_gdk_event_get_event_type (GdkEvent *event);
GdkWindow* gtksharp_gdk_event_get_window (GdkEventAny *event);
gint8 gtksharp_gdk_event_get_send_event (GdkEventAny *event);
guint32 gtksharp_gdk_event_key_get_time (GdkEventKey *event);
guint gtksharp_gdk_event_key_get_state (GdkEventKey *event);
guint gtksharp_gdk_event_key_get_keyval (GdkEventKey *event);
guint16 gtksharp_gdk_event_key_get_hardware_keycode (GdkEventKey *event);
guint8 gtksharp_gdk_event_key_get_group (GdkEventKey *event);
/* */
GdkEventType
@ -34,3 +39,33 @@ gtksharp_gdk_event_get_send_event (GdkEventAny *event)
return event->send_event;
}
guint32
gtksharp_gdk_event_key_get_time (GdkEventKey *event)
{
return event->time;
}
guint
gtksharp_gdk_event_key_get_state (GdkEventKey *event)
{
return event->time;
}
guint
gtksharp_gdk_event_key_get_keyval (GdkEventKey *event)
{
return event->keyval;
}
guint16
gtksharp_gdk_event_key_get_hardware_keycode (GdkEventKey *event)
{
return event->hardware_keycode;
}
guint8
gtksharp_gdk_event_key_get_group (GdkEventKey *event)
{
return event->group;
}