Author: pbartok
Date: 2005-02-26 06:20:10 -0500 (Sat, 26 Feb 2005)
New Revision: 41236
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/X11Keyboard.cs
Log:
- Stupid cold kept me up but I couldn't concentrate on stuff, so I fixed
keyboard support on 64bit instead
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2005-02-26 10:54:17 UTC (rev 41235)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2005-02-26 11:20:10 UTC (rev 41236)
@@ -1,5 +1,9 @@
2005-02-26 Peter Bartok <[EMAIL PROTECTED]>
+ * X11Keyboard.cs: Fixes to work on 64bit systems
+
+2005-02-26 Peter Bartok <[EMAIL PROTECTED]>
+
* Control.cs:
- Now calling OnHandleDestroyed from DestroyHandle()
instead of Dispose()
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/X11Keyboard.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/X11Keyboard.cs
2005-02-26 10:54:17 UTC (rev 41235)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/X11Keyboard.cs
2005-02-26 11:20:10 UTC (rev 41236)
@@ -635,12 +635,23 @@
}
[DllImport ("libX11")]
- internal extern static int XLookupString(ref XEvent xevent,
IntPtr buffer,
- int num_bytes, out XKeySym keysym, IntPtr
status);
+ internal extern static int XLookupString(ref XEvent xevent,
IntPtr buffer, int num_bytes, out IntPtr keysym, IntPtr status);
+ internal static int XLookupString (ref XEvent xevent, IntPtr
buffer, int num_bytes, out XKeySym keysym, IntPtr status) {
+ IntPtr keysym_ret;
+ int ret;
- [DllImport ("libX11")]
- private static extern XKeySym XLookupKeysym (ref XEvent xevent,
int index);
+ ret = XLookupString (ref xevent, buffer, num_bytes, out
keysym_ret, status);
+ keysym = (XKeySym)keysym_ret.ToInt32();
+ return ret;
+ }
+
+ [DllImport ("libX11", EntryPoint="XLookupKeysym")]
+ private static extern IntPtr XLookupKeysymX11(ref XEvent
xevent, int index);
+ private static XKeySym XLookupKeysym(ref XEvent xevent, int
index) {
+ return (XKeySym)XLookupKeysymX11(ref xevent,
index).ToInt32();
+ }
+
[DllImport ("libX11")]
private static extern IntPtr XGetKeyboardMapping (IntPtr
display, byte first_keycode, int keycode_count,
out int keysyms_per_keycode_return);
@@ -648,11 +659,17 @@
[DllImport ("libX11")]
private static extern void XDisplayKeycodes (IntPtr display,
out int min, out int max);
- [DllImport ("libX11")]
- private static extern XKeySym XKeycodeToKeysym (IntPtr display,
int keycode, int index);
+ [DllImport ("libX11", EntryPoint="XKeycodeToKeysym")]
+ private static extern IntPtr XKeycodeToKeysymX11(IntPtr
display, int keycode, int index);
+ private static XKeySym XKeycodeToKeysym(IntPtr display, int
keycode, int index) {
+ return (XKeySym)XKeycodeToKeysymX11(display, keycode,
index).ToInt32();
+ }
[DllImport ("libX11")]
- private static extern int XKeysymToKeycode (IntPtr display, int
keysym);
+ private static extern int XKeysymToKeycode (IntPtr display,
IntPtr keysym);
+ private static int XKeysymToKeycode (IntPtr display, int
keysym) {
+ return XKeysymToKeycode(display, (IntPtr)keysym);
+ }
[DllImport ("libX11")]
internal extern static IntPtr XGetModifierMapping (IntPtr
display);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches