Changeset 132
- Timestamp:
- Feb 16, 2009, 8:39:23 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/plugins/org.eclipse.swt/Eclipse SWT/pm/org/eclipse/swt/widgets/Display.java
r121 r132 133 133 /* Keyboard and Mouse State */ 134 134 //@@TODO (dmik): not yet sure what do we need from these: 135 //boolean lastVirtual;135 boolean lastVirtual; 136 136 boolean lockActiveWindow; 137 //int lastKey, lastAscii, lastMouse;138 //byte [] keyboard = new byte [256];137 int lastKey, lastAscii, lastMouse; 138 byte [] keyboard = new byte [256]; 139 139 boolean accelKeyHit, mnemonicKeyHit; 140 140 … … 289 289 } 290 290 291 //@@TODO (dmik): Do we need it in OS/2? 291 //@@TODO (dmik): Do we need it in OS/2? 292 //@@TODO (lpino): Implement WinSetKeyboardStateTable API 292 293 //int asciiKey (int key) { 293 294 // if (OS.IsWinCE) return 0; … … 296 297 // for (int i=0; i<keyboard.length; i++) keyboard [i] = 0; 297 298 // if (!OS.GetKeyboardState (keyboard)) return 0; 299 // if (!OS.WinSetKeyboardStateTable (OS.HWND_DESKTOP, keyboard, OS.FALSE)) return 0; 298 300 // 299 301 // /* Translate the key to ASCII or UNICODE using the virtual keyboard */ … … 693 695 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 694 696 * </ul> 695 */ 696 //@@TODO (dmik):using WinQueryCursorInfo (lpino): 697 //public Point getCursorLocation () { 698 // checkDevice (); 699 // POINT pt = new POINT (); 700 // OS.GetCursorPos (pt); 701 // return new Point (pt.x, pt.y); 702 //} 697 */ 698 public Point getCursorLocation () { 699 checkDevice (); 700 POINTL pt = new POINTL (); 701 CURSORINFO cursor = new CURSORINFO(); 702 if (!OS.WinQueryCursorInfo(OS.HWND_DESKTOP, cursor)) return null; 703 pt.x = cursor.x; 704 pt.y = cursor.y; 705 return new Point (pt.x, pt.y); 706 } 703 707 704 708 /**
Note:
See TracChangeset
for help on using the changeset viewer.