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

Rewrote (Get)ClipCursor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.