Changeset 8533 for trunk/src/user32/winmouse.cpp
- Timestamp:
- May 31, 2002, 11:54:05 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/winmouse.cpp
r8347 r8533 1 /* $Id: winmouse.cpp,v 1.2 3 2002-04-30 14:54:06sandervl Exp $ */1 /* $Id: winmouse.cpp,v 1.24 2002-05-31 09:54:05 sandervl Exp $ */ 2 2 /* 3 3 * Win32 mouse functions … … 35 35 #include "winmouse.h" 36 36 #include "oslibmsg.h" 37 #include "oslibres.h" 37 38 #include "pmwindow.h" 38 39 #include "oslibwin.h" 40 #include "hook.h" 39 41 40 42 #define DBG_LOCALLOG DBG_winmouse … … 51 53 //****************************************************************************** 52 54 //****************************************************************************** 53 55 BOOL WIN32API GetCursorPos( PPOINT lpPoint) 56 { 57 if (!lpPoint) return FALSE; 58 59 if (OSLibWinQueryPointerPos(lpPoint)) //POINT == POINTL 60 { 61 mapScreenPoint((OSLIBPOINT*)lpPoint); 62 dprintf2(("USER32: GetCursorPos (%d,%d)", lpPoint->x, lpPoint->y)); 63 return TRUE; 64 } 65 else return FALSE; 66 } 67 //****************************************************************************** 68 //****************************************************************************** 69 BOOL WIN32API SetCursorPos( int X, int Y) 70 { 71 BOOL ret; 72 73 dprintf(("USER32: SetCursorPos %d %d", X,Y)); 74 ret = OSLibWinSetPointerPos(X, mapScreenY(Y)); 75 if(ret == TRUE) { 76 MSLLHOOKSTRUCT hook; 77 78 hook.pt.x = X; 79 hook.pt.y = Y; 80 hook.mouseData = 0; 81 //signal to dinput hook that it only needs to modify the last 82 //known position (not treat it as a new event) 83 hook.flags = LLMHF_INJECTED; 84 hook.time = GetCurrentTime(); 85 hook.dwExtraInfo = 0; 86 87 HOOK_CallHooksW( WH_MOUSE_LL, HC_ACTION, WM_MOUSEMOVE, (LPARAM)&hook); 88 } 89 return ret; 90 } 91 //****************************************************************************** 92 //****************************************************************************** 93 BOOL WIN32API ClipCursor(const RECT * lpRect) 94 { 95 if(lpRect) { 96 dprintf(("USER32: ClipCursor (%d,%d)(%d,%d)", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom)); 97 } 98 else dprintf(("USER32: ClipCursor NULL")); 99 return OSLibWinClipCursor(lpRect); 100 } 101 //****************************************************************************** 102 //****************************************************************************** 103 BOOL WIN32API GetClipCursor( LPRECT lpRect) 104 { 105 dprintf(("USER32: GetClipCursor %x", lpRect)); 106 return OSLibWinGetClipCursor(lpRect); 107 } 108 //****************************************************************************** 54 109 // capture handle "cache" 55 110 static HWND hwndWin32Capture = 0; 56 111 //****************************************************************************** 57 112 HWND WIN32API GetCapture() 58 113 {
Note:
See TracChangeset
for help on using the changeset viewer.