Changeset 5509 for trunk/src


Ignore:
Timestamp:
Apr 15, 2001, 4:29:49 PM (24 years ago)
Author:
sandervl
Message:

Rewrote (Get)ClipCursor

Location:
trunk/src/user32
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/USER32.DEF

    r5496 r5509  
    1 ; $Id: USER32.DEF,v 1.52 2001-04-12 14:04:32 sandervl Exp $
     1; $Id: USER32.DEF,v 1.53 2001-04-15 14:29:47 sandervl Exp $
    22
    33LIBRARY USER32 INITINSTANCE TERMINSTANCE
     
    2020    _GpiEnableYInversion        = PMGPI.723
    2121    _GpiQueryYInversion         = PMGPI.726
     22    _WinQueryPointerClipRect    = PMMERGE.5433
     23    _WinSetPointerClipRect      = PMMERGE.5434
     24
    2225;;;; Present in WGSS50
    2326;;;;    _GpiQueryDCData             = PMGPI.665
     
    636639
    637640
     641;----------------------------------
     642; obsolete WINNLS APIs (Far East)
     643;----------------------------------
     644    SendIMEMessageExA          = _SendIMEMessageExA@8           @1010
     645    SendIMEMessageExW          = _SendIMEMessageExW@8           @1011
     646
     647    WINNLSEnableIME            = _WINNLSEnableIME@8             @1012
     648    WINNLSGetEnableStatus      = _WINNLSGetEnableStatus@4       @1013
     649    WINNLSGetIMEHotkey         = _WINNLSGetIMEHotkey@4          @1014
     650
    638651;------------------------------------------------------------------------------
    639652; Wine/Odin helper function
     
    675688    _CreateFakeWindowEx@4                                        @2028 NONAME
    676689
    677 ;----------------------------------
    678 ; obsolete WINNLS APIs (Far East)
    679 ;----------------------------------
    680     SendIMEMessageExA          = _SendIMEMessageExA@8
    681     SendIMEMessageExW          = _SendIMEMessageExW@8
    682 
    683     WINNLSEnableIME            = _WINNLSEnableIME@8
    684     WINNLSGetEnableStatus      = _WINNLSGetEnableStatus@4
    685     WINNLSGetIMEHotkey         = _WINNLSGetIMEHotkey@4
  • trunk/src/user32/oslibres.cpp

    r5385 r5509  
    1 /* $Id: oslibres.cpp,v 1.12 2001-03-27 16:17:52 sandervl Exp $ */
     1/* $Id: oslibres.cpp,v 1.13 2001-04-15 14:29:48 sandervl Exp $ */
    22/*
    33 * Window API wrappers for OS/2
     
    473473//******************************************************************************
    474474//******************************************************************************
     475BOOL OSLibWinClipCursor(const RECT * pRect)
     476{
     477   RECTL  rectl;
     478   PRECTL ptr = NULL;
     479
     480   if (pRect != NULL)
     481   {
     482      rectl.xLeft = max(pRect->left, 0);
     483      rectl.xRight = min(pRect->right, ScreenWidth-1);
     484      rectl.yBottom = max(ScreenHeight - pRect->bottom, 0);
     485      rectl.yTop = min(ScreenHeight - pRect->top, ScreenHeight-1);
     486      ptr = &rectl;
     487   }
     488   return WinSetPointerClipRect (HWND_DESKTOP, ptr);
     489}
     490//******************************************************************************
     491//******************************************************************************
     492BOOL OSLibWinGetClipCursor(LPRECT pRect)
     493{
     494   RECTL  rectl;
     495
     496   if (WinQueryPointerClipRect(HWND_DESKTOP, &rectl))
     497   {
     498      pRect->left   = rectl.xLeft;
     499      pRect->right  = rectl.xRight;
     500      pRect->bottom = ScreenHeight - rectl.yBottom;
     501      pRect->top    = ScreenHeight - rectl.yTop;
     502      return TRUE;
     503   }
     504   return FALSE;
     505}
     506//******************************************************************************
     507//******************************************************************************
  • trunk/src/user32/oslibres.h

    r5385 r5509  
    1 /* $Id: oslibres.h,v 1.6 2001-03-27 16:17:52 sandervl Exp $ */
     1/* $Id: oslibres.h,v 1.7 2001-04-15 14:29:48 sandervl Exp $ */
    22/*
    33 * Window GUI resource wrapper functions for OS/2
     
    5252VOID    OSLibWinDestroyPointer(HANDLE hPointer);
    5353BOOL    OSLibWinSetPointer(HANDLE hPointer);
     54BOOL    OSLibWinClipCursor(const RECT * pRect);
     55BOOL    OSLibWinGetClipCursor(LPRECT pRect);
     56
     57
     58
     59BOOL APIENTRY _WinSetPointerClipRect(HWND hwnd, PRECTL pRect);
     60BOOL APIENTRY _WinQueryPointerClipRect(HWND hwnd, PRECTL pRect);
     61
     62inline BOOL APIENTRY WinSetPointerClipRect(HWND hwnd, PRECTL pRect)
     63{
     64 BOOL yyrc;
     65 USHORT sel = RestoreOS2FS();
     66
     67    yyrc = _WinSetPointerClipRect(hwnd, pRect);
     68    SetFS(sel);
     69
     70    return yyrc;
     71}
     72
     73inline BOOL APIENTRY WinQueryPointerClipRect(HWND hwnd, PRECTL pRect)
     74{
     75 BOOL yyrc;
     76 USHORT sel = RestoreOS2FS();
     77
     78    yyrc = _WinQueryPointerClipRect(hwnd, pRect);
     79    SetFS(sel);
     80
     81    return yyrc;
     82}
    5483
    5584#endif //__OSLIBGDI_H__
  • trunk/src/user32/user32.cpp

    r5406 r5509  
    1 /* $Id: user32.cpp,v 1.95 2001-03-30 22:08:19 sandervl Exp $ */
     1/* $Id: user32.cpp,v 1.96 2001-04-15 14:29:48 sandervl Exp $ */
    22
    33/*
     
    325325}
    326326
    327 /* Cursor Functions */
    328 
    329 BOOL WIN32API ClipCursor(const RECT * lpRect)
    330 {
    331     dprintf(("USER32:  ClipCursor\n"));
    332     return O32_ClipCursor(lpRect);
    333 }
    334 //******************************************************************************
    335 //******************************************************************************
    336 BOOL WIN32API GetClipCursor( LPRECT lpRect)
    337 {
    338     dprintf(("USER32:  GetClipCursor\n"));
    339     return O32_GetClipCursor(lpRect);
    340 }
    341 
    342327/* Mouse Input Functions */
    343328
  • trunk/src/user32/winicon.cpp

    r5482 r5509  
    1 /* $Id: winicon.cpp,v 1.21 2001-04-05 09:31:28 sandervl Exp $ */
     1/* $Id: winicon.cpp,v 1.22 2001-04-15 14:29:49 sandervl Exp $ */
    22/*
    33 * Win32 Icon Code for OS/2
     
    380380    dprintf(("USER32: SetCursorPos %d %d", X,Y));
    381381    return OSLibWinSetPointerPos(X, mapScreenY(Y));
     382}
     383//******************************************************************************
     384//******************************************************************************
     385BOOL WIN32API ClipCursor(const RECT * lpRect)
     386{
     387    if(lpRect) {
     388         dprintf(("USER32: ClipCursor (%d,%d)(%d,%d)", lpRect->left, lpRect->top, lpRect->right, lpRect->bottom));
     389    }
     390    else dprintf(("USER32: ClipCursor NULL"));
     391    return OSLibWinClipCursor(lpRect);
     392}
     393//******************************************************************************
     394//******************************************************************************
     395BOOL WIN32API GetClipCursor( LPRECT lpRect)
     396{
     397    dprintf(("USER32: GetClipCursor %x", lpRect));
     398    return OSLibWinGetClipCursor(lpRect);
    382399}
    383400//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.