Changeset 8533 for trunk/src


Ignore:
Timestamp:
May 31, 2002, 11:54:05 AM (23 years ago)
Author:
sandervl
Message:

Generate injected WH_MOUSE_LL hook event in SetCursorPos (with LLMHF_INJECTED flag set)

Location:
trunk/src/user32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/winicon.cpp

    r7237 r8533  
    1 /* $Id: winicon.cpp,v 1.33 2001-10-27 10:30:11 sandervl Exp $ */
     1/* $Id: winicon.cpp,v 1.34 2002-05-31 09:54:05 sandervl Exp $ */
    22/*
    33 * Win32 Icon Code for OS/2
     
    451451    return hOldCursor;
    452452}
    453 //******************************************************************************
    454 //******************************************************************************
    455 BOOL WIN32API GetCursorPos( PPOINT lpPoint)
    456 {
    457     dprintf2(("USER32: GetCursorPos %x", lpPoint));
    458 
    459     if (!lpPoint) return FALSE;
    460 
    461     if (OSLibWinQueryPointerPos(lpPoint)) //POINT == POINTL
    462     {
    463         mapScreenPoint((OSLIBPOINT*)lpPoint);
    464         return TRUE;
    465     }
    466     else return FALSE;
    467 }
    468 //******************************************************************************
    469 //******************************************************************************
    470 BOOL WIN32API SetCursorPos( int X, int Y)
    471 {
    472     dprintf(("USER32: SetCursorPos %d %d", X,Y));
    473     return OSLibWinSetPointerPos(X, mapScreenY(Y));
    474 }
    475 //******************************************************************************
    476 //******************************************************************************
    477 BOOL WIN32API ClipCursor(const RECT * lpRect)
    478 {
    479     if(lpRect) {
    480          dprintf(("USER32: ClipCursor (%d,%d)(%d,%d)", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom));
    481     }
    482     else dprintf(("USER32: ClipCursor NULL"));
    483     return OSLibWinClipCursor(lpRect);
    484 }
    485 //******************************************************************************
    486 //******************************************************************************
    487 BOOL WIN32API GetClipCursor( LPRECT lpRect)
    488 {
    489     dprintf(("USER32: GetClipCursor %x", lpRect));
    490     return OSLibWinGetClipCursor(lpRect);
    491 }
    492 //******************************************************************************
    493 //******************************************************************************
    494453/*****************************************************************************
    495454 * Name      : BOOL WIN32API SetSystemCursor
  • trunk/src/user32/winmouse.cpp

    r8347 r8533  
    1 /* $Id: winmouse.cpp,v 1.23 2002-04-30 14:54:06 sandervl Exp $ */
     1/* $Id: winmouse.cpp,v 1.24 2002-05-31 09:54:05 sandervl Exp $ */
    22/*
    33 * Win32 mouse functions
     
    3535#include "winmouse.h"
    3636#include "oslibmsg.h"
     37#include "oslibres.h"
    3738#include "pmwindow.h"
    3839#include "oslibwin.h"
     40#include "hook.h"
    3941
    4042#define DBG_LOCALLOG    DBG_winmouse
     
    5153//******************************************************************************
    5254//******************************************************************************
    53 
     55BOOL 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//******************************************************************************
     69BOOL 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//******************************************************************************
     93BOOL 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//******************************************************************************
     103BOOL WIN32API GetClipCursor( LPRECT lpRect)
     104{
     105    dprintf(("USER32: GetClipCursor %x", lpRect));
     106    return OSLibWinGetClipCursor(lpRect);
     107}
     108//******************************************************************************
    54109// capture handle "cache"
    55110static HWND hwndWin32Capture = 0;
    56 
     111//******************************************************************************
    57112HWND WIN32API GetCapture()
    58113{
Note: See TracChangeset for help on using the changeset viewer.