- Timestamp:
- Apr 30, 2002, 4:54:07 PM (23 years ago)
- Location:
- trunk/src/user32
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/USER32.DEF
r8049 r8347 1 ; $Id: USER32.DEF,v 1.7 1 2002-03-08 11:09:15 sandervl Exp $1 ; $Id: USER32.DEF,v 1.72 2002-04-30 14:54:05 sandervl Exp $ 2 2 3 3 LIBRARY USER32 INITINSTANCE TERMINSTANCE … … 678 678 _OS2ToWin32Handle@4 @2012 NONAME 679 679 680 _MOUSE_Enable@4 @2007 NONAME681 680 ;; _KeyTranslatePMToWin@4 @2008 NONAME 682 681 _KeyTranslatePMToWinBuf@12 @2009 NONAME … … 685 684 ;Export for MSACM32 686 685 _wsnprintfA @2100 NONAME 687 688 _KEYBOARD_Enable@4 @2011 NONAME689 686 690 687 ;SvL: Used by GDI32 -
trunk/src/user32/oslibmsgtranslate.cpp
r8129 r8347 1 /* $Id: oslibmsgtranslate.cpp,v 1.8 4 2002-03-28 11:25:59sandervl Exp $ */1 /* $Id: oslibmsgtranslate.cpp,v 1.85 2002-04-30 14:54:06 sandervl Exp $ */ 2 2 /* 3 3 * Window message translation functions for OS/2 … … 37 37 #include <winscan.h> 38 38 #include <winkeyboard.h> 39 #include "hook.h" 39 40 40 41 #define DBG_LOCALLOG DBG_oslibmsgtranslate … … 341 342 } 342 343 EnableLogging(); 343 if((fMsgRemoved == MSG_REMOVE) && ISMOUSE_CAPTURED())344 {345 if(DInputMouseHandler(win32wnd->getWindowHandle(), winMsg->message, winMsg->pt.x, winMsg->pt.y)) {346 goto dummymessage; //dinput swallowed message347 }348 }349 344 350 345 if(fWasDisabled) { … … 385 380 EnableLogging(); 386 381 382 if(fMsgRemoved == MSG_REMOVE) 383 { 384 MSLLHOOKSTRUCT hook; 385 386 hook.pt.x = os2Msg->ptl.x & 0xFFFF; 387 hook.pt.y = mapScreenY(os2Msg->ptl.y); 388 hook.mouseData = 0; //todo: XBUTTON1/2 (XP feature) or wheel data 389 hook.flags = 0; //todo: injected (LLMHF_INJECTED) 390 hook.time = winMsg->time; 391 hook.dwExtraInfo = 0; 392 393 if(HOOK_CallHooksW( WH_MOUSE_LL, HC_ACTION, winMsg->message, (LPARAM)&hook)) { 394 goto dummymessage; //hook swallowed message 395 } 396 } 387 397 break; 388 398 } … … 453 463 } 454 464 EnableLogging(); 455 if((fMsgRemoved == MSG_REMOVE) && ISMOUSE_CAPTURED())456 {457 if(DInputMouseHandler(win32wnd->getWindowHandle(), winMsg->message, winMsg->pt.x, winMsg->pt.y)) {458 goto dummymessage; //dinput swallowed message459 }460 }461 465 if(fWasDisabled) { 462 if(win32wnd) { 463 winMsg->hwnd = win32wnd->getWindowHandle(); 464 } 465 else { 466 goto dummymessage; //don't send mouse messages to disabled windows 467 } 468 } 469 //OS/2 Window coordinates -> Win32 Window coordinates 466 if(win32wnd) { 467 winMsg->hwnd = win32wnd->getWindowHandle(); 468 } 469 else { 470 goto dummymessage; //don't send mouse messages to disabled windows 471 } 472 } 473 if(fMsgRemoved == MSG_REMOVE) 474 { 475 MSLLHOOKSTRUCT hook; 476 477 hook.pt.x = os2Msg->ptl.x & 0xFFFF; 478 hook.pt.y = mapScreenY(os2Msg->ptl.y); 479 hook.mouseData = 0; 480 hook.flags = 0; //todo: injected (LLMHF_INJECTED) 481 hook.time = winMsg->time; 482 hook.dwExtraInfo = 0; 483 484 if(HOOK_CallHooksW( WH_MOUSE_LL, HC_ACTION, winMsg->message, (LPARAM)&hook)) { 485 goto dummymessage; //hook swallowed message 486 } 487 } 470 488 break; 471 489 } 472 490 473 491 case WM_CONTROL: 474 goto dummymessage;492 goto dummymessage; 475 493 476 494 case WM_COMMAND: … … 742 760 } 743 761 744 if (ISKDB_CAPTURED())745 {746 if (DInputKeyBoardHandler(winMsg)) {747 goto dummymessage; //dinput swallowed message748 }749 }750 751 762 #ifdef ALTGR_HACK 752 763 // it's a PMSCAN_ALTRIGHT WM_CHAR message? -
trunk/src/user32/user32dbg.def
r8049 r8347 1 ; $Id: user32dbg.def,v 1. 4 2002-03-08 11:09:15sandervl Exp $1 ; $Id: user32dbg.def,v 1.5 2002-04-30 14:54:06 sandervl Exp $ 2 2 3 3 LIBRARY USER32 INITINSTANCE TERMINSTANCE … … 677 677 _OS2ToWin32Handle@4 @2012 NONAME 678 678 679 _MOUSE_Enable@4 @2007 NONAME680 679 ;; _KeyTranslatePMToWin@4 @2008 NONAME 681 680 _KeyTranslatePMToWinBuf@12 @2009 NONAME … … 684 683 ;Export for MSACM32 685 684 _wsnprintfA @2100 NONAME 686 687 _KEYBOARD_Enable@4 @2011 NONAME688 685 689 686 ;SvL: Used by GDI32 -
trunk/src/user32/winmouse.cpp
r7875 r8347 1 /* $Id: winmouse.cpp,v 1.2 2 2002-02-11 16:06:00sandervl Exp $ */1 /* $Id: winmouse.cpp,v 1.23 2002-04-30 14:54:06 sandervl Exp $ */ 2 2 /* 3 3 * Win32 mouse functions … … 49 49 ****************************************************************************/ 50 50 51 LPMOUSE_EVENT_PROC mouseHandler = NULL;52 WNDPROC keyboardHandler = NULL;53 54 55 //******************************************************************************56 //******************************************************************************57 VOID WIN32API MOUSE_Enable(LPMOUSE_EVENT_PROC lpMouseEventProc)58 {59 if(lpMouseEventProc == (LPMOUSE_EVENT_PROC)-1)60 mouseHandler = NULL;61 else62 mouseHandler = lpMouseEventProc;63 }64 //******************************************************************************65 //******************************************************************************66 VOID WIN32API KEYBOARD_Enable(WNDPROC handler)67 {68 keyboardHandler = handler;69 }70 //******************************************************************************71 //******************************************************************************72 BOOL DInputKeyBoardHandler(MSG *msg)73 {74 if(!ISKDB_CAPTURED())75 return FALSE;76 77 return keyboardHandler(msg->hwnd, msg->message, msg->wParam, msg->lParam);78 }79 //******************************************************************************80 //******************************************************************************81 BOOL DInputMouseHandler(HWND hwnd, ULONG msg, ULONG x, ULONG y)82 {83 WINE_MOUSEEVENT mouseEvent;84 DWORD dwFlags = MOUSEEVENTF_ABSOLUTE;85 86 if(!ISMOUSE_CAPTURED())87 return FALSE;88 89 mouseEvent.magic = WINE_MOUSEEVENT_MAGIC;90 mouseEvent.hWnd = hwnd;91 mouseEvent.time = OSLibWinQueryMsgTime();92 mouseEvent.keyState = 0; //not used in dinput right now93 switch(msg)94 {95 case WM_NCLBUTTONDOWN:96 case WM_LBUTTONDOWN:97 dwFlags |= MOUSEEVENTF_LEFTDOWN;98 break;99 case WM_NCLBUTTONUP:100 case WM_LBUTTONUP:101 dwFlags |= MOUSEEVENTF_LEFTUP;102 break;103 case WM_NCRBUTTONUP:104 case WM_RBUTTONUP:105 dwFlags |= MOUSEEVENTF_RIGHTUP;106 break;107 case WM_NCRBUTTONDOWN:108 case WM_RBUTTONDOWN:109 dwFlags |= MOUSEEVENTF_RIGHTDOWN;110 break;111 case WM_NCMBUTTONUP:112 case WM_MBUTTONUP:113 dwFlags |= MOUSEEVENTF_MIDDLEUP;114 break;115 case WM_NCMBUTTONDOWN:116 case WM_MBUTTONDOWN:117 dwFlags |= MOUSEEVENTF_MIDDLEDOWN;118 break;119 case WM_MOUSEMOVE:120 case WM_NCMOUSEMOVE:121 dwFlags |= MOUSEEVENTF_MOVE;122 break;123 default:124 //TODO: handle double clicks???125 return FALSE;126 }127 128 x = (((long)x << 16) + ScreenWidth-1) / ScreenWidth;129 y = (((long)y << 16) + ScreenHeight-1) / ScreenHeight;130 131 return mouseHandler(dwFlags, x, y, 0, (DWORD)&mouseEvent);132 }133 51 //****************************************************************************** 134 52 //****************************************************************************** … … 290 208 * Remark : 291 209 * Status : UNTESTED STUB 210 * TODO: call hooks!! 292 211 * 293 212 * Author : Patrick Haller [Thu, 1998/02/26 11:55] -
trunk/src/user32/winmouse.h
r3072 r8347 1 /* $Id: winmouse.h,v 1. 7 2000-03-09 21:50:11sandervl Exp $ */1 /* $Id: winmouse.h,v 1.8 2002-04-30 14:54:07 sandervl Exp $ */ 2 2 /* 3 3 * Mouse handler for DINPUT … … 12 12 #define __WINMOUSE_H__ 13 13 14 extern LPMOUSE_EVENT_PROC mouseHandler;15 extern WNDPROC keyboardHandler;16 17 #define ISMOUSE_CAPTURED() (mouseHandler!=NULL)18 #define ISKDB_CAPTURED() (keyboardHandler!=0)19 20 BOOL DInputMouseHandler(HWND hwnd, ULONG msg, ULONG x, ULONG y);21 BOOL DInputKeyBoardHandler(MSG *msg);22 23 14 #endif //__WINMOUSE_H__
Note:
See TracChangeset
for help on using the changeset viewer.