Changeset 903 for trunk/src/user32


Ignore:
Timestamp:
Sep 10, 1999, 9:00:11 PM (26 years ago)
Author:
dengert
Message:

some more DC related functions

Location:
trunk/src/user32/new
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/new/dc.cpp

    r896 r903  
    1 /* $Id: dc.cpp,v 1.1 1999-09-09 18:05:45 dengert Exp $ */
     1/* $Id: dc.cpp,v 1.2 1999-09-10 19:00:10 dengert Exp $ */
    22
    33/*
     
    250250void    OPEN32API DeleteHDC (HDC hdc);
    251251BOOL    OPEN32API _O32_EndPaint (HWND hwnd, const PAINTSTRUCT_W *lpps);
     252int     OPEN32API _O32_GetUpdateRgn (HWND hwnd, HRGN hrgn, BOOL erase);
    252253
    253254#define FLOAT_TO_FIXED(x) ((FIXED) ((x) * 65536.0))
     
    728729   return TRUE;
    729730}
     731
     732BOOL WIN32API GetUpdateRect (HWND hwnd, LPRECT pRect, BOOL erase)
     733{
     734   if (hwnd)
     735   {
     736//      SET_ERROR_WIN( ERROR_INVALID_HANDLE_W );
     737      return FALSE;
     738   }
     739
     740   RECTL rectl;
     741   USHORT sel = RestoreOS2FS();
     742   Win32BaseWindow *wnd = Win32BaseWindow::GetWindowFromHandle(hwnd);
     743
     744   BOOL updateRegionExists = WinQueryUpdateRect (hwnd, pRect ? &rectl : NULL);
     745   if (!pRect) {
     746      SetFS(sel);
     747      return (updateRegionExists);
     748   }
     749
     750   if (updateRegionExists)
     751   {
     752      if (wnd->isOwnDC())
     753      {
     754         pDCData pHps = NULL;
     755         pHps = (pDCData)GpiQueryDCData(wnd->getOwnDC());
     756         if (!pHps)
     757         {
     758//            SET_ERROR_WIN(ERROR_INVALID_HANDLE_W);
     759            SetFS(sel);
     760            return FALSE;
     761         }
     762         GpiConvert (pHps->hps, CVTC_DEVICE, CVTC_WORLD, 2, (PPOINTL)&rectl);
     763      }
     764      else
     765      {
     766         long height   = wnd->getWindowHeight();
     767         rectl.yTop    = height - rectl.yTop;
     768         rectl.yBottom = height - rectl.yBottom;
     769      }
     770
     771      if (pRect)
     772         WINRECT_FROM_PMRECT (*pRect, rectl);
     773
     774      if (erase)
     775         sendEraseBkgnd (wnd);
     776   }
     777   else
     778   {
     779      if (pRect)
     780         pRect->left = pRect->top = pRect->right = pRect->bottom = 0;
     781   }
     782
     783   SetFS(sel);
     784   return updateRegionExists;
     785}
     786
     787int WIN32API GetUpdateRgn (HWND hwnd, HRGN hrgn, BOOL erase)
     788{
     789   USHORT sel = RestoreOS2FS();
     790   LONG Complexity;
     791
     792   Complexity = _O32_GetUpdateRgn (hwnd, hrgn, FALSE);
     793   if (erase && (Complexity > NULLREGION_W)) {
     794       Win32BaseWindow *wnd = Win32BaseWindow::GetWindowFromHandle(hwnd);
     795       sendEraseBkgnd (wnd);
     796   }
     797
     798   SetFS(sel);
     799   return Complexity;
     800}
     801
    730802//******************************************************************************
    731803//******************************************************************************
  • trunk/src/user32/new/user32.cpp

    r839 r903  
    1 /* $Id: user32.cpp,v 1.19 1999-09-05 17:11:24 sandervl Exp $ */
     1/* $Id: user32.cpp,v 1.20 1999-09-10 19:00:11 dengert Exp $ */
    22
    33/*
     
    325325        lprcDst->right  = MAX(lprcSrc1->right,lprcSrc2->right);
    326326        lprcDst->top    = MIN(lprcSrc1->top,lprcSrc2->top);
    327         lprcDst->bottom = MAX(lprcSrc1->bottom,lprcSrc2->bottom);       
     327        lprcDst->bottom = MAX(lprcSrc1->bottom,lprcSrc2->bottom);
    328328      }
    329329    }
     
    10381038//******************************************************************************
    10391039//******************************************************************************
     1040#if 0
    10401041int WIN32API GetUpdateRgn( HWND arg1, HRGN arg2, BOOL  arg3)
    10411042{
     
    10451046    return O32_GetUpdateRgn(arg1, arg2, arg3);
    10461047}
     1048#endif
    10471049//******************************************************************************
    10481050
     
    12411243    case SPI_GETICONTITLELOGFONT:
    12421244    {
    1243         LPLOGFONTA lpLogFont = (LPLOGFONTA)pvParam;
    1244 
    1245         /* from now on we always have an alias for MS Sans Serif */
    1246         strcpy(lpLogFont->lfFaceName, "MS Sans Serif");
    1247         lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", 8);
    1248         lpLogFont->lfWidth = 0;
    1249         lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
    1250         lpLogFont->lfWeight = FW_NORMAL;
    1251         lpLogFont->lfItalic = FALSE;
    1252         lpLogFont->lfStrikeOut = FALSE;
    1253         lpLogFont->lfUnderline = FALSE;
    1254         lpLogFont->lfCharSet = ANSI_CHARSET;
    1255         lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
    1256         lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
    1257         lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
    1258         break;
     1245        LPLOGFONTA lpLogFont = (LPLOGFONTA)pvParam;
     1246
     1247        /* from now on we always have an alias for MS Sans Serif */
     1248        strcpy(lpLogFont->lfFaceName, "MS Sans Serif");
     1249        lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", 8);
     1250        lpLogFont->lfWidth = 0;
     1251        lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
     1252        lpLogFont->lfWeight = FW_NORMAL;
     1253        lpLogFont->lfItalic = FALSE;
     1254        lpLogFont->lfStrikeOut = FALSE;
     1255        lpLogFont->lfUnderline = FALSE;
     1256        lpLogFont->lfCharSet = ANSI_CHARSET;
     1257        lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
     1258        lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
     1259        lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
     1260        break;
    12591261    }
    12601262    case SPI_GETBORDER:
    1261         *(INT *)pvParam = GetSystemMetrics( SM_CXFRAME );
    1262         break;
     1263        *(INT *)pvParam = GetSystemMetrics( SM_CXFRAME );
     1264        break;
    12631265
    12641266    case SPI_GETWORKAREA:
    1265         SetRect( (RECT *)pvParam, 0, 0,
    1266                 GetSystemMetrics( SM_CXSCREEN ),
    1267                 GetSystemMetrics( SM_CYSCREEN )
    1268         );
    1269         break;
     1267        SetRect( (RECT *)pvParam, 0, 0,
     1268                GetSystemMetrics( SM_CXSCREEN ),
     1269                GetSystemMetrics( SM_CYSCREEN )
     1270        );
     1271        break;
    12701272
    12711273    case 104: //TODO: Undocumented
     
    13161318    case SPI_GETICONTITLELOGFONT:
    13171319    {
    1318         LPLOGFONTW lpLogFont = (LPLOGFONTW)pvParam;
    1319 
    1320         /* from now on we always have an alias for MS Sans Serif */
    1321         lstrcpyW(lpLogFont->lfFaceName, (LPCWSTR)L"MS Sans Serif");
    1322         lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", 8);
    1323         lpLogFont->lfWidth = 0;
    1324         lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
    1325         lpLogFont->lfWeight = FW_NORMAL;
    1326         lpLogFont->lfItalic = FALSE;
    1327         lpLogFont->lfStrikeOut = FALSE;
    1328         lpLogFont->lfUnderline = FALSE;
    1329         lpLogFont->lfCharSet = ANSI_CHARSET;
    1330         lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
    1331         lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
    1332         lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
    1333         return TRUE;
     1320        LPLOGFONTW lpLogFont = (LPLOGFONTW)pvParam;
     1321
     1322        /* from now on we always have an alias for MS Sans Serif */
     1323        lstrcpyW(lpLogFont->lfFaceName, (LPCWSTR)L"MS Sans Serif");
     1324        lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", 8);
     1325        lpLogFont->lfWidth = 0;
     1326        lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0;
     1327        lpLogFont->lfWeight = FW_NORMAL;
     1328        lpLogFont->lfItalic = FALSE;
     1329        lpLogFont->lfStrikeOut = FALSE;
     1330        lpLogFont->lfUnderline = FALSE;
     1331        lpLogFont->lfCharSet = ANSI_CHARSET;
     1332        lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS;
     1333        lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
     1334        lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS;
     1335        return TRUE;
    13341336    }
    13351337    default:
  • trunk/src/user32/new/window.cpp

    r833 r903  
    1 /* $Id: window.cpp,v 1.23 1999-09-05 12:03:34 sandervl Exp $ */
     1/* $Id: window.cpp,v 1.24 1999-09-10 19:00:11 dengert Exp $ */
    22/*
    33 * Win32 window apis for OS/2
     
    7373    //      Wine seems to assume it's a string though...
    7474    if(!stricmp(className, MDICLIENTCLASSNAMEA)) {
    75         window = (Win32BaseWindow *) new Win32MDIClientWindow(&cs, classAtom, FALSE);
     75        window = (Win32BaseWindow *) new Win32MDIClientWindow(&cs, classAtom, FALSE);
    7676    }
    7777    else {
    78         window = new Win32BaseWindow( &cs, classAtom, FALSE );
     78        window = new Win32BaseWindow( &cs, classAtom, FALSE );
    7979    }
    8080    if(window == NULL)
     
    137137    //      Wine seems to assume it's a string though...
    138138    if(!lstrcmpW(className, (LPWSTR)MDICLIENTCLASSNAMEW)) {
    139         window = (Win32BaseWindow *) new Win32MDIClientWindow(&cs, classAtom, TRUE);
     139        window = (Win32BaseWindow *) new Win32MDIClientWindow(&cs, classAtom, TRUE);
    140140    }
    141141    else {
    142         window = new Win32BaseWindow( &cs, classAtom, TRUE );
     142        window = new Win32BaseWindow( &cs, classAtom, TRUE );
    143143    }
    144144    if(window == NULL)
     
    821821 *****************************************************************************/
    822822
    823 HWND WIN32API ChildWindowFromPointEx (HWND hwndParent, POINT pt, UINT uFlags) 
     823HWND WIN32API ChildWindowFromPointEx (HWND hwndParent, POINT pt, UINT uFlags)
    824824{
    825825        RECT rect;
     
    995995//******************************************************************************
    996996//******************************************************************************
     997#if 0
    997998BOOL WIN32API GetUpdateRect( HWND hwnd, PRECT lpRect, BOOL  bErase)
    998999{
     
    10021003    return OSLibWinQueryUpdateRect(Win32BaseWindow::Win32ToOS2Handle(hwnd), lpRect);
    10031004}
     1005#endif
    10041006//******************************************************************************
    10051007//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.