Ignore:
Timestamp:
Sep 27, 1999, 8:21:25 PM (26 years ago)
Author:
dengert
Message:

minor dc changes

File:
1 edited

Legend:

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

    r1064 r1073  
    1 /* $Id: dc.cpp,v 1.7 1999-09-26 15:25:55 sandervl Exp $ */
     1/* $Id: dc.cpp,v 1.8 1999-09-27 18:21:25 dengert Exp $ */
    22
    33/*
     
    2424#include <limits.h>
    2525#include "oslibwin.h"
     26#include "dcdata.h"
     27
     28#undef SEVERITY_ERROR
     29#include <winerror.h>
    2630
    2731#ifndef OPEN32API
     
    3034
    3135/*********************/
    32 typedef struct _tagXFORM
    33 {
    34     FLOAT eM11;
    35     FLOAT eM12;
    36     FLOAT eM21;
    37     FLOAT eM22;
    38     FLOAT eDx;
    39     FLOAT eDy;
    40 } XFORM_W, *PXFORM_W, *LPXFORM_W;
    41 
    4236typedef struct
    4337{
     
    159153#define MM_ANISOTROPIC_W      8
    160154
    161 enum PS_Type { MICRO_CACHED, MICRO, NORMAL };
    162 enum HDC_Type{ TYPE_0, TYPE_1, TYPE_2, TYPE_3, TYPE_4 };
    163 
    164 typedef struct _DCData
    165 {
    166    HDC         hdc;
    167    HWND        hwnd;
    168    HPS         hps;
    169 
    170    UINT        lastBrushHandle;
    171    PVOID       lastBrushObject;
    172    UINT        lastPenHandle;
    173    pPenObject  lastPenObject;
    174    UINT        lastFontHandle;
    175    PVOID       lastFontObject;
    176    UINT        lastBitmapHandle;
    177    PVOID       lastBitmapObject;
    178    UINT        lastPaletteHandle;
    179    PVOID       lastPaletteObject;
    180 
    181    UINT        nullBitmapHandle;
    182 
    183    ULONG       BkColor;
    184    ULONG       TextColor;
    185    ULONG       BkColor_PM;
    186    ULONG       TextColor_PM;
    187 
    188    int         BkMode;
    189    ULONG       BkMode_PM;
    190 
    191    int         ROP2Mode;
    192    int         ROP2Mode_PM;
    193 
    194    unsigned    isMemoryPS:1;
    195    unsigned    isMetaPS:1;
    196    unsigned    isPrinter:1;
    197    unsigned    isFrameWindow:1;
    198    unsigned    isOD_QUEUED:1;
    199    unsigned    isOD_INFO:1;
    200    unsigned    isClient:1;
    201    unsigned    isClientArea:1;
    202    unsigned    isLeftLeft:1;
    203    unsigned    isTopTop:1;
    204    unsigned    isWideLine:1;
    205    unsigned    alignUpdateCP:1;
    206    unsigned    isCacheable:1;
    207    unsigned    penIsExtPen:1;
    208    unsigned    isValid:1;
    209    unsigned    inPath:1;
    210    unsigned    isStartDoc:1;
    211    unsigned    resetStockFonts:1;
    212    unsigned    unused:14;
    213 
    214    ULONG       MapMode;
    215    HBITMAP     bitmapHandle;
    216    ULONG       bitmapHeight;
    217    ULONG       bitmapWidth;
    218    ULONG       hMeta;
    219    PVOID       pMetaFileObject;
    220    int         polyFillMode;
    221    int         arcDirection;
    222    int         stretchBltMode;
    223    int         graphicsMode;
    224    HRGN        hrgnHDC;
    225 
    226    PS_Type     psType;
    227 
    228    HDC_Type    hdcType;
    229    USHORT      usFiller;
    230    POINTL      viewportOrg;
    231    double      viewportXExt;
    232    double      viewportYExt;
    233    POINTL      windowOrg;
    234    SIZEL       windowExt;
    235    HRGN        hrgnVis;
    236    POINTL      ptlOrigin;
    237    ULONG       printPageHeight;
    238    PVOID       printerObject;
    239 
    240    LONG        taMode;
    241    XFORM_W     xform;
    242 
    243    INT         worldYDeltaFor1Pixel;
    244    INT         worldXDeltaFor1Pixel;
    245    ULONG       colorMode;
    246    PULONG      pLogColorTable;
    247 
    248    ULONG       lcidBitfield;
    249 
    250    HWND        hwndRealize;
    251    ULONG       cpeMap;
    252 
    253    LONG        lTechnology;
    254 
    255    LONG        lWndXExtSave, lWndYExtSave,
    256                lVwpXExtSave, lVwpYExtSave;
    257 
    258    int         height;
    259 
    260    POINTL      brushOrgPoint;
    261 
    262    PVOID       pEnhMetaPalette;
    263    PVOID       lpAbortProc;
    264    ULONG       HPStoHDCInversionHeight;
    265 
    266    int         saveLevel;
    267 
    268    struct      _DCData *nextDCData;
    269 } tDCData, *pDCData;
    270 
    271155/*********************/
    272156
     
    366250      case MM_ISOTROPIC_W  : flOptions = PU_LOMETRIC ; break;
    367251      default:
    368 //         SET_ERROR_WIN(ERROR_INVALID_PARAMETER_W);
     252         _O32_SetLastError (ERROR_INVALID_PARAMETER);
    369253         return FALSE;
    370254   }
     
    391275      if (DevEscape(pHps->hdc ? pHps->hdc : pHps->hps, DEVESC_SETPS, 12, (PBYTE)data, 0, 0) == DEVESC_ERROR)
    392276      {
    393 //         SET_ERROR_LAST();
     277         _O32_SetLastError (ERROR_INVALID_PARAMETER);
    394278         return 0;
    395279      }
     
    699583   if ( !lpps )
    700584   {
    701 //      SET_ERROR_WIN( ERROR_INVALID_PARAMETER_W );
     585      _O32_SetLastError (ERROR_INVALID_PARAMETER);
    702586      return (HDC)NULLHANDLE;
    703587   }
     
    712596      if (!pHps)
    713597      {
    714 //         SET_ERROR_LAST();
     598         _O32_SetLastError (ERROR_INVALID_PARAMETER);
    715599         SetFS(sel);
    716600         return (HDC)NULLHANDLE;
     
    802686   if (hwnd)
    803687   {
    804 //      SET_ERROR_WIN( ERROR_INVALID_HANDLE_W );
     688      _O32_SetLastError (ERROR_INVALID_HANDLE);
    805689      return FALSE;
    806690   }
     
    824708         if (!pHps)
    825709         {
    826 //            SET_ERROR_WIN(ERROR_INVALID_HANDLE_W);
     710            _O32_SetLastError (ERROR_INVALID_HANDLE);
    827711            SetFS(sel);
    828712            return FALSE;
     
    1024908      _O32_DeleteObject (pHps->nullBitmapHandle);
    1025909   }
    1026 //   SET_ERROR_LAST();
     910   _O32_SetLastError (ERROR_INVALID_PARAMETER);
    1027911   SetFS(sel);
    1028912   return NULL;
     
    1095979   if (redraw & (RDW_FRAME_W | RDW_NOFRAME_W))
    1096980   {
    1097 //      SET_ERROR_WIN( ERROR_NOT_SUPPORTED_W );
     981      _O32_SetLastError (ERROR_NOT_SUPPORTED);
    1098982      return FALSE;
    1099983   }
     
    1112996      if (!wnd)
    1113997      {
    1114 //         SET_ERROR_LAST();
     998         _O32_SetLastError (ERROR_INVALID_PARAMETER);
    1115999         SetFS(sel);
    11161000         return FALSE;
     
    12481132      wnd->setSupressErase (TRUE);
    12491133
    1250 //   if (!success)
    1251 //      SET_ERROR_LAST();
     1134   if (!success)
     1135      _O32_SetLastError (ERROR_INVALID_PARAMETER);
    12521136
    12531137   SetFS(sel);
     
    13121196    //Rectangle could be relative to parent window, so fix this
    13131197    if(clientRect.yBottom != 0) {
    1314         clientRect.yTop   -= clientRect.yBottom;
    1315         clientRect.yBottom = 0;
     1198        clientRect.yTop   -= clientRect.yBottom;
     1199        clientRect.yBottom = 0;
    13161200    }
    13171201    if(clientRect.xLeft != 0) {
    1318         clientRect.xRight -= clientRect.xLeft;
    1319         clientRect.xLeft   = 0;
     1202        clientRect.xRight -= clientRect.xLeft;
     1203        clientRect.xLeft   = 0;
    13201204    }
    13211205    if(pScroll) {
    1322         MapWin32ToOS2Rectl((RECT *)pScroll, (PRECTLOS2)&scrollRect);
    1323         pScrollRect = &scrollRect;
    1324 
    1325         //Scroll rectangle relative to client area
     1206        MapWin32ToOS2Rectl((RECT *)pScroll, (PRECTLOS2)&scrollRect);
     1207        pScrollRect = &scrollRect;
     1208
     1209        //Scroll rectangle relative to client area
    13261210         pScrollRect->xLeft   += clientRect.xLeft;
    13271211         pScrollRect->xRight  += clientRect.xLeft;
     
    13331217
    13341218    if(pClip) {
    1335         MapWin32ToOS2Rectl((RECT *)pClip, (PRECTLOS2)&clipRect);
    1336         pClipRect = &clipRect;
    1337 
    1338         //Clip rectangle relative to client area
     1219        MapWin32ToOS2Rectl((RECT *)pClip, (PRECTLOS2)&clipRect);
     1220        pClipRect = &clipRect;
     1221
     1222        //Clip rectangle relative to client area
    13391223         pClipRect->xLeft     += clientRect.xLeft;
    13401224         pClipRect->xRight    += clientRect.xLeft;
     
    13551239//TODO: Implement this one
    13561240//******************************************************************************
    1357 INT WIN32API ScrollWindowEx(HWND hwnd, int dx, int dy, const RECT *pScroll, const RECT *pClip, 
     1241INT WIN32API ScrollWindowEx(HWND hwnd, int dx, int dy, const RECT *pScroll, const RECT *pClip,
    13581242                            HRGN hrgnUpdate, PRECT pRectUpdate, UINT scrollFlag)
    13591243{
Note: See TracChangeset for help on using the changeset viewer.