2004-02-16 21:32:22 +00:00
|
|
|
// Gdk.EventKey.cs - Custom key event wrapper
|
|
|
|
//
|
|
|
|
// Author: Mike Kestner <mkestner@ximian.com>
|
|
|
|
//
|
|
|
|
// (c) 2004 Novell, Inc.
|
|
|
|
|
|
|
|
namespace Gdk {
|
|
|
|
|
|
|
|
using System;
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
|
|
public class EventKey : Event {
|
|
|
|
|
2004-03-12 21:18:11 +00:00
|
|
|
[DllImport("gdksharpglue")]
|
2004-02-16 21:32:22 +00:00
|
|
|
static extern uint gtksharp_gdk_event_key_get_time (IntPtr evt);
|
|
|
|
|
2004-03-12 21:18:11 +00:00
|
|
|
[DllImport("gdksharpglue")]
|
2004-02-16 21:32:22 +00:00
|
|
|
static extern uint gtksharp_gdk_event_key_get_state (IntPtr evt);
|
|
|
|
|
2004-03-12 21:18:11 +00:00
|
|
|
[DllImport("gdksharpglue")]
|
2004-02-16 21:32:22 +00:00
|
|
|
static extern uint gtksharp_gdk_event_key_get_keyval (IntPtr evt);
|
|
|
|
|
2004-03-12 21:18:11 +00:00
|
|
|
[DllImport("gdksharpglue")]
|
2004-02-16 21:32:22 +00:00
|
|
|
static extern ushort gtksharp_gdk_event_key_get_hardware_keycode (IntPtr evt);
|
|
|
|
|
2004-03-12 21:18:11 +00:00
|
|
|
[DllImport("gdksharpglue")]
|
2004-02-16 21:32:22 +00:00
|
|
|
static extern byte gtksharp_gdk_event_key_get_group (IntPtr evt);
|
|
|
|
|
|
|
|
public EventKey (IntPtr raw) : base (raw) {}
|
|
|
|
|
|
|
|
public uint Time {
|
|
|
|
get {
|
|
|
|
return gtksharp_gdk_event_key_get_time (Handle);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public ModifierType State {
|
|
|
|
get {
|
|
|
|
return (ModifierType) gtksharp_gdk_event_key_get_state (Handle);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-02-16 22:04:27 +00:00
|
|
|
public Key Key {
|
|
|
|
get {
|
|
|
|
return (Key) gtksharp_gdk_event_key_get_keyval (Handle);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-02-16 21:32:22 +00:00
|
|
|
public uint KeyValue {
|
|
|
|
get {
|
|
|
|
return gtksharp_gdk_event_key_get_keyval (Handle);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public ushort HardwareKeycode {
|
|
|
|
get {
|
|
|
|
return gtksharp_gdk_event_key_get_hardware_keycode (Handle);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public byte Group {
|
|
|
|
get {
|
|
|
|
return gtksharp_gdk_event_key_get_group (Handle);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|