Ignore:
Timestamp:
Nov 26, 2002, 11:53:12 AM (23 years ago)
Author:
sandervl
Message:

Added debug wrappers for all exports

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gdi32/gdi32.cpp

    r9385 r9429  
    1 /* $Id: gdi32.cpp,v 1.84 2002-11-04 13:30:36 sandervl Exp $ */
     1/* $Id: gdi32.cpp,v 1.85 2002-11-26 10:53:08 sandervl Exp $ */
    22
    33/*
     
    3939COLORREF WIN32API SetBkColor(HDC hdc, COLORREF crColor)
    4040{
    41   dprintf(("GDI32: SetBkColor %x to %x", hdc, crColor));
    4241  return(O32_SetBkColor(hdc, crColor));
    4342}
     
    4645COLORREF WIN32API SetTextColor(HDC hdc, COLORREF crColor)
    4746{
    48  COLORREF clr;
    49 
    50   dprintf(("GDI32: SetTextColor %x to %x", hdc, crColor));
    51   clr = O32_SetTextColor(hdc, crColor);
    52   return(clr);
     47  return O32_SetTextColor(hdc, crColor);
    5348}
    5449//******************************************************************************
     
    7772                break;
    7873    }
    79     dprintf(("GDI32: GetStockObject %d returned %X\n", arg1, obj));
    8074    return(obj);
    8175}
    8276//******************************************************************************
    8377//******************************************************************************
    84 ODINFUNCTION3(HPEN, CreatePen, int, fnPenStyle, int, nWidth, COLORREF, crColor)
     78HPEN WIN32API CreatePen(int fnPenStyle, int nWidth, COLORREF crColor)
    8579{
    8680 HPEN hPen;
     
    10094 HPEN hPen;
    10195
    102     dprintf(("GDI32: CreatePenIndirect %x", lplgpn));
    10396    hPen = O32_CreatePenIndirect(lplgpn);
    10497    if(hPen) STATS_CreatePenIndirect(hPen, lplgpn);
     
    113106
    114107    hPen = O32_ExtCreatePen(dwPenStyle, dwWidth, lplb, dwStyleCount, lpStyle);
    115     dprintf(("GDI32: ExtCreatePen %x %x %x %x %x returned %x", dwPenStyle, dwWidth, lplb, dwStyleCount, lpStyle, hPen));
    116108    if(hPen) STATS_ExtCreatePen(hPen, dwPenStyle, dwWidth, lplb, dwStyleCount, lpStyle);
    117109    return hPen;
     
    125117    hBrush = O32_CreatePatternBrush(hBitmap);
    126118    if(hBrush) STATS_CreatePatternBrush(hBrush, hBitmap);
    127 
    128     dprintf(("GDI32: CreatePatternBrush from bitmap %X returned %X\n", hBitmap, hBrush));
    129119    return(hBrush);
    130120}
    131121//******************************************************************************
    132122//******************************************************************************
    133 ODINFUNCTION1(HBRUSH, CreateSolidBrush, COLORREF, color)
     123HBRUSH WIN32API CreateSolidBrush(COLORREF color)
    134124{
    135125    HBRUSH hBrush;
     
    143133HBRUSH WIN32API CreateBrushIndirect( const LOGBRUSH *pLogBrush)
    144134{
    145  HBRUSH hBrush;
     135    HBRUSH hBrush;
    146136
    147137    hBrush = O32_CreateBrushIndirect((LPLOGBRUSH)pLogBrush);
     
    156146 HBRUSH hBrush;
    157147 
    158     dprintf(("GDI32: CreateHatchBrush %x %x", fnStyle, clrref));
    159148    hBrush = O32_CreateHatchBrush(fnStyle, clrref);
    160149    if(hBrush) STATS_CreateHatchBrush(hBrush, fnStyle, clrref);
     
    167156 HBRUSH hBrush;
    168157
    169     dprintf(("GDI32: CreateDIBPatternBrushPt %x %x", buffer, usage));
    170158    hBrush = O32_CreateDIBPatternBrushPt(buffer, usage);
    171159    if(hBrush) STATS_CreateDIBPatternBrushPt(hBrush, buffer, usage);
     
    234222    //PF Open32 seems not to move coordinates to 0,0 in newHdc
    235223    MoveToEx(newHdc, 0, 0 , NULL);
    236     dprintf(("CreateCompatibleDC %X returned %x", hdc, newHdc));
     224
    237225    return newHdc;
    238226}
    239227//******************************************************************************
    240228//******************************************************************************
    241 ODINFUNCTION1(BOOL, DeleteDC, HDC, hdc)
     229BOOL WIN32API DeleteDC(HDC hdc)
    242230{
    243231  pDCData  pHps = (pDCData)OSLibGpiQueryDCData((HPS)hdc);
     
    270258BOOL WIN32API StrokeAndFillPath(HDC hdc)
    271259{
    272     dprintf(("GDI32: StrokeAndFillPath %x", hdc));
    273260    return O32_StrokeAndFillPath(hdc);
    274261}
     
    277264BOOL WIN32API StrokePath(HDC hdc)
    278265{
    279     dprintf(("GDI32: StrokePath %x", hdc));
    280266    return O32_StrokePath(hdc);
    281267}
     
    284270int WIN32API SetBkMode( HDC hdc, int mode)
    285271{
    286     dprintf(("GDI32: SetBkMode %x %d (old %d)", hdc, mode, O32_GetBkMode(hdc)));
    287272    return O32_SetBkMode(hdc, mode);
    288273}
     
    291276COLORREF WIN32API GetPixel( HDC hdc, int x, int y)
    292277{
    293  COLORREF color;
    294 
    295     color = O32_GetPixel(hdc, x, y);
    296     dprintf2(("GDI32: GetPixel %x (%d,%d) -> %x", hdc, x, y, color));
    297     return color;
     278    return O32_GetPixel(hdc, x, y);
    298279}
    299280//******************************************************************************
     
    301282COLORREF WIN32API SetPixel( HDC hdc, int x, int y, COLORREF color)
    302283{
    303     dprintf2(("GDI32: SetPixel %x (%d,%d) %x", hdc, x, y, color));
    304284    return O32_SetPixel(hdc, x, y, color);
    305285}
     
    312292 COLORREF rc;
    313293
    314 ////    dprintf(("GDI32: SetPixelV\n"));
    315294    rc = O32_SetPixel(arg1, arg2, arg3, arg4);
    316295    if(rc == GDI_ERROR) // || rc == COLOR_INVALID)
     
    326305        return FALSE;
    327306    }
    328     dprintf(("GDI32: GetDCOrgEx %x (%d,%d)", hdc, lpPoint));
    329307    return O32_GetDCOrgEx(hdc, lpPoint);
    330308}
     
    333311BOOL WIN32API AbortPath(HDC hdc)
    334312{
    335     dprintf(("GDI32: AbortPath %x", hdc));
    336313    return O32_AbortPath(hdc);
    337314}
     
    340317BOOL WIN32API AngleArc( HDC arg1, int arg2, int arg3, DWORD arg4, float  arg5, float  arg6)
    341318{
    342     dprintf(("GDI32: AngleArc"));
    343319    return O32_AngleArc(arg1, arg2, arg3, arg4, arg5, arg6);
    344320}
     
    347323BOOL WIN32API Arc( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7, int arg8, int  arg9)
    348324{
    349     dprintf(("GDI32: Arc"));
    350325    return O32_Arc(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
    351326}
     
    354329BOOL WIN32API ArcTo( HDC arg1, int arg2, int arg3, int arg4, int arg5, int  arg6, int  arg7, int  arg8, int  arg9)
    355330{
    356     dprintf(("GDI32: ArcTo"));
    357331    return O32_ArcTo(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
    358332}
     
    361335BOOL WIN32API BeginPath(HDC hdc)
    362336{
    363     dprintf(("GDI32: BeginPath $x", hdc));
    364337    return O32_BeginPath(hdc);
    365338}
     
    368341BOOL WIN32API Chord( HDC arg1, int arg2, int arg3, int arg4, int arg5, int  arg6, int  arg7, int  arg8, int  arg9)
    369342{
    370     dprintf(("GDI32: Chord"));
    371343    return O32_Chord(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9);
    372344}
     
    375347BOOL WIN32API CloseFigure(HDC hdc)
    376348{
    377     dprintf(("GDI32: CloseFigure %x", hdc));
    378349    return O32_CloseFigure(hdc);
    379350}
     
    423394    HDC   rc;
    424395    DEVMODEA devmode;
    425 
    426     dprintf(("GDI32: CreateDCW"));
    427396
    428397    if(arg4)
     
    486455 HDC          hdc;
    487456
    488     dprintf(("GDI32: CreateICA"));
    489457    //SvL: Open32 tests for "DISPLAY"
    490458    if(lpszDriver && !strcmp(lpszDriver, "display")) {
     
    516484    HDC   rc;
    517485    DEVMODEA devmode;
    518 
    519     dprintf(("GDI32: CreateICW"));
    520486
    521487    if(arg4)
     
    583549BOOL WIN32API EndPath( HDC hdc)
    584550{
    585     dprintf(("GDI32: EndPath %x", hdc));
    586551    return O32_EndPath(hdc);
    587552}
    588553//******************************************************************************
    589554//******************************************************************************
    590 ODINFUNCTION5(BOOL, Rectangle, HDC, hdc, int, left, int, top, int, right, int, bottom)
     555BOOL WIN32API Rectangle(HDC hdc, int left, int top, int right, int bottom)
    591556{
    592557    return O32_Rectangle(hdc, left, top, right, bottom);
     
    594559//******************************************************************************
    595560//******************************************************************************
     561#ifdef DEBUG
    596562VOID dumpROP2(INT rop2)
    597563{
     
    660626      break;
    661627
     628    case R2_NOTXORPEN:
     629      name = "R2_NOTXORPEN";
     630      break;
     631
    662632    default:
    663633      name = "unknown mode!!!";
     
    667637  dprintf(("  ROP2 mode = %s",name));
    668638}
     639#endif
    669640//******************************************************************************
    670641//******************************************************************************
    671642int WIN32API SetROP2( HDC hdc, int rop2)
    672643{
    673     dprintf(("GDI32: SetROP2 %x %x", hdc, rop2));
    674644    #ifdef DEBUG
    675645    dumpROP2(rop2);
     
    695665BOOL WIN32API ExtFloodFill( HDC arg1, int arg2, int arg3, COLORREF arg4, UINT  arg5)
    696666{
    697     dprintf(("GDI32: ExtFloodFill"));
    698667    return O32_ExtFloodFill(arg1, arg2, arg3, arg4, arg5);
    699668}
     
    702671BOOL WIN32API FillPath( HDC arg1)
    703672{
    704     dprintf(("GDI32: FillPath"));
    705673    return O32_FillPath(arg1);
    706674}
     
    709677BOOL WIN32API FlattenPath( HDC arg1)
    710678{
    711     dprintf(("GDI32: FlattenPath"));
    712679    return O32_FlattenPath(arg1);
    713680}
     
    716683BOOL WIN32API FloodFill(HDC arg1, int arg2, int arg3, COLORREF  arg4)
    717684{
    718     dprintf(("GDI32: FloodFill"));
    719685    return O32_FloodFill(arg1, arg2, arg3, arg4);
    720686}
     
    723689int WIN32API GetArcDirection( HDC arg1)
    724690{
    725     dprintf(("GDI32: GetArcDirection"));
    726691    return O32_GetArcDirection(arg1);
    727692}
     
    730695BOOL WIN32API GetAspectRatioFilterEx( HDC arg1, PSIZE  arg2)
    731696{
    732     dprintf(("GDI32: GetAspectRatioFilterEx"));
    733697    return O32_GetAspectRatioFilterEx(arg1, arg2);
    734698}
     
    737701COLORREF WIN32API GetBkColor(HDC hdc)
    738702{
    739  COLORREF color;
    740 
    741     color = O32_GetBkColor(hdc);
    742     dprintf(("GDI32: GetBkColor %x returned %x", hdc, color));
    743     return color;
     703    return O32_GetBkColor(hdc);
    744704}
    745705//******************************************************************************
     
    747707int WIN32API GetBkMode(HDC hdc)
    748708{
    749  int bkmode;
    750 
    751     bkmode = O32_GetBkMode(hdc);
    752     dprintf(("GDI32: GetBkMode %x returned %d", hdc, bkmode));
    753     return bkmode;
     709    return O32_GetBkMode(hdc);
    754710}
    755711//******************************************************************************
     
    757713UINT WIN32API GetBoundsRect( HDC arg1, PRECT arg2, UINT  arg3)
    758714{
    759     dprintf(("GDI32: GetBoundsRect"));
    760715    return O32_GetBoundsRect(arg1, arg2, arg3);
    761716}
     
    764719BOOL WIN32API GetBrushOrgEx( HDC arg1, PPOINT  arg2)
    765720{
    766     dprintf(("GDI32: GetBrushOrgEx"));
    767721    return O32_GetBrushOrgEx(arg1, arg2);
    768722}
     
    771725BOOL WIN32API GetCharABCWidthsA( HDC arg1, UINT arg2, UINT arg3, LPABC arg4)
    772726{
    773     dprintf(("GDI32: GetCharABCWidthsA"));
    774727    return O32_GetCharABCWidths(arg1, arg2, arg3, arg4);
    775728}
     
    817770 BOOL rc;
    818771
    819     dprintf(("GDI32: GetCurrentPositionEx %x", hdc));
    820772    rc = O32_GetCurrentPositionEx(hdc, lpPoint);
    821773    dprintf(("GDI32: GetCurrentPositionEx returned %d (%d,%d)", rc, lpPoint->x, lpPoint->y));
     
    840792DWORD WIN32API GetKerningPairsA( HDC arg1, DWORD arg2, LPKERNINGPAIR  arg3)
    841793{
    842     dprintf(("GDI32: GetKerningPairsA"));
    843794    return O32_GetKerningPairs(arg1, arg2, arg3);
    844795}
     
    847798DWORD WIN32API GetKerningPairsW( HDC arg1, DWORD arg2, LPKERNINGPAIR  arg3)
    848799{
    849     dprintf(("GDI32: GetKerningPairsW"));
     800    dprintf(("GDI32: GetKerningPairsW; might not work"));
    850801    // NOTE: This will not work as is (needs UNICODE support)
    851802    return O32_GetKerningPairs(arg1, arg2, arg3);
     
    855806BOOL WIN32API GetMiterLimit( HDC arg1, float * arg2)
    856807{
    857     dprintf(("GDI32: GetMiterLimit"));
    858808    return O32_GetMiterLimit(arg1, arg2);
    859809}
     
    862812COLORREF WIN32API GetNearestColor( HDC arg1, COLORREF  arg2)
    863813{
    864     dprintf(("GDI32: GetNearestColor\n"));
    865814    return O32_GetNearestColor(arg1, arg2);
    866815}
     
    869818INT WIN32API GetPath( HDC hdc, PPOINT arg2, PBYTE arg3, int  arg4)
    870819{
    871     dprintf(("GDI32: GetPath %x", hdc));
    872820    return O32_GetPath(hdc, arg2, arg3, arg4);
    873821}
     
    876824int WIN32API GetPolyFillMode( HDC hdc)
    877825{
    878     dprintf(("GDI32: GetPolyFillMode", hdc));
    879826    return O32_GetPolyFillMode(hdc);
    880827}
     
    883830int WIN32API GetROP2( HDC hdc)
    884831{
    885     dprintf(("GDI32: GetROP2 %x", hdc));
    886832    return O32_GetROP2(hdc);
    887833}
     
    890836BOOL WIN32API GetRasterizerCaps(LPRASTERIZER_STATUS arg1, UINT  arg2)
    891837{
    892     dprintf(("GDI32: GetRasterizerCaps"));
    893838    return O32_GetRasterizerCaps(arg1, arg2);
    894839}
     
    897842UINT WIN32API GetTextAlign( HDC hdc)
    898843{
    899     dprintf(("GDI32: GetTextAlign %x", hdc));
    900844    return O32_GetTextAlign(hdc);
    901845}
     
    904848int WIN32API GetTextCharacterExtra( HDC hdc)
    905849{
    906     dprintf(("GDI32: GetTextCharacterExtra", hdc));
    907850    return O32_GetTextCharacterExtra(hdc);
    908851}
     
    911854COLORREF WIN32API GetTextColor( HDC hdc)
    912855{
    913     COLORREF color;
    914 
    915     color = O32_GetTextColor(hdc);
    916     dprintf(("GDI32: GetTextColor %x -> %x", hdc, color));
    917     return color;
     856    return O32_GetTextColor(hdc);
    918857}
    919858//******************************************************************************
     
    936875BOOL WIN32API PolyBezier( HDC arg1, const POINT * arg2, DWORD  arg3)
    937876{
    938     dprintf(("GDI32: PolyBezier"));
    939877    return O32_PolyBezier(arg1, arg2, (int)arg3);
    940878}
     
    943881BOOL WIN32API PolyBezierTo( HDC arg1, const POINT * arg2, DWORD  arg3)
    944882{
    945     dprintf(("GDI32: PolyBezierTo"));
    946883    return O32_PolyBezierTo(arg1, arg2, arg3);
    947884}
     
    950887BOOL WIN32API PolyDraw( HDC arg1, const POINT * arg2, const BYTE * arg3, DWORD  arg4)
    951888{
    952     dprintf(("GDI32: PolyDraw"));
    953889    return O32_PolyDraw(arg1, arg2, arg3, arg4);
    954890}
     
    957893BOOL WIN32API PolyPolygon( HDC arg1, const POINT * arg2, const INT * arg3, UINT  arg4)
    958894{
    959     dprintf(("GDI32: PolyPolygon"));
    960895    return O32_PolyPolygon(arg1, arg2, arg3, arg4);
    961896}
     
    964899BOOL WIN32API PolyPolyline( HDC hdc, const POINT * lppt, const DWORD * lpdwPolyPoints, DWORD cCount)
    965900{
    966     dprintf(("GDI32: PolyPolyline %x %x %x %d", hdc, lppt, lpdwPolyPoints, cCount));
    967 
    968901    return O32_PolyPolyline(hdc,lppt,lpdwPolyPoints,cCount);
    969902}
     
    972905BOOL WIN32API Polygon( HDC hdc, const POINT *lpPoints, int count)
    973906{
    974     dprintf(("GDI32: Polygon %x %x %d", hdc, lpPoints, count));
    975907    return O32_Polygon(hdc, lpPoints, count);
    976908}
     
    997929HDC WIN32API ResetDCA( HDC arg1, const DEVMODEA *  arg2)
    998930{
    999     dprintf(("GDI32: ResetDCA\n"));
    1000931    return (HDC)O32_ResetDC(arg1, arg2);
    1001932}
     
    1004935HDC WIN32API ResetDCW( HDC arg1, const DEVMODEW *  arg2)
    1005936{
    1006     dprintf(("GDI32: ResetDCW\n"));
     937    dprintf(("GDI32: ResetDCW: not properly implemented"));
     938    DebugInt3();
    1007939    // NOTE: This will not work as is (needs UNICODE support)
    1008940    return (HDC)O32_ResetDC(arg1, (const DEVMODEA *)arg2);
     
    1013945{
    1014946 BOOL ret;
    1015 
    1016     dprintf(("GDI32: RestoreDC %x %d", hdc, id));
    1017947
    1018948    ret = O32_RestoreDC(hdc, id);
     
    1026956BOOL WIN32API RoundRect( HDC arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int  arg7)
    1027957{
    1028     dprintf(("GDI32: RoundRect"));
    1029958    return O32_RoundRect(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
    1030959}
     
    1035964 int id;
    1036965
    1037     dprintf(("GDI32: SaveDC %x", hdc));
    1038966    id = O32_SaveDC(hdc);
    1039967    if(id == 0) {
     
    1047975int WIN32API SetArcDirection( HDC arg1, int  arg2)
    1048976{
    1049     dprintf(("GDI32: SetArcDirection"));
    1050977    return O32_SetArcDirection(arg1, arg2);
    1051978}
     
    1054981UINT WIN32API SetBoundsRect( HDC arg1, const RECT * arg2, UINT arg3)
    1055982{
    1056     dprintf(("GDI32: SetBoundsRect"));
    1057983    return O32_SetBoundsRect(arg1, arg2, arg3);
    1058984}
     
    1061987BOOL WIN32API SetBrushOrgEx( HDC arg1, int arg2, int arg3, PPOINT  arg4)
    1062988{
    1063  BOOL rc;
    1064 
    1065     rc = O32_SetBrushOrgEx(arg1, arg2, arg3, arg4);
    1066     dprintf(("GDI32: SetBrushOrgEx returned %d\n", rc));
    1067     return(rc);
    1068 }
    1069 //******************************************************************************
    1070 //******************************************************************************
    1071 ODINFUNCTION2(DWORD, SetMapperFlags, HDC, hdc, DWORD, dwFlag)
     989    return O32_SetBrushOrgEx(arg1, arg2, arg3, arg4);
     990}
     991//******************************************************************************
     992//******************************************************************************
     993DWORD WIN32API SetMapperFlags(HDC hdc, DWORD dwFlag)
    1072994{
    1073995    return O32_SetMapperFlags(hdc, dwFlag);
     
    1075997//******************************************************************************
    1076998//******************************************************************************
    1077 ODINFUNCTION3(BOOL, SetMiterLimit, HDC, hdc, float, eNewLimit, float* ,peOldLimit)
     999BOOL WIN32API SetMiterLimit(HDC hdc, float eNewLimit, float* peOldLimit)
    10781000{
    10791001    return O32_SetMiterLimit(hdc, eNewLimit, peOldLimit);
     
    10811003//******************************************************************************
    10821004//******************************************************************************
    1083 ODINFUNCTION2(int, SetPolyFillMode, HDC, hdc, int, iPolyFillMode)
     1005int WIN32API SetPolyFillMode(HDC hdc, int iPolyFillMode)
    10841006{
    10851007    return O32_SetPolyFillMode(hdc, iPolyFillMode);
     
    10871009//******************************************************************************
    10881010//******************************************************************************
    1089 ODINFUNCTION2(UINT, SetTextAlign, HDC, hdc, UINT, fMode)
     1011UINT WIN32API SetTextAlign(HDC hdc, UINT fMode)
    10901012{
    10911013    return O32_SetTextAlign(hdc, fMode);
     
    10931015//******************************************************************************
    10941016//******************************************************************************
    1095 ODINFUNCTION2(int, SetTextCharacterExtra, HDC, hdc, int, nCharExtra)
     1017int WIN32API SetTextCharacterExtra(HDC hdc, int nCharExtra)
    10961018{
    10971019    return O32_SetTextCharacterExtra(hdc, nCharExtra);
     
    10991021//******************************************************************************
    11001022//******************************************************************************
    1101 ODINFUNCTION3(BOOL, SetTextJustification, HDC, hdc, int, nBreakExtra, int, nBreakCount)
     1023BOOL WIN32API SetTextJustification(HDC hdc, int nBreakExtra, int nBreakCount)
    11021024{
    11031025    return O32_SetTextJustification(hdc, nBreakExtra, nBreakCount);
     
    11071029BOOL WIN32API WidenPath( HDC hdc)
    11081030{
    1109     dprintf(("GDI32: WidenPath %x", hdc));
    11101031    return O32_WidenPath(hdc);
    11111032}
     
    11361057BOOL WIN32API UpdateColors(HDC hdc)
    11371058{
    1138   dprintf(("GDI32: UpdateColors\n"));
    11391059  return InvalidateRect(WindowFromDC(hdc), NULL, FALSE);
    11401060}
     
    13211241  return (FALSE);
    13221242}
    1323 
    13241243
    13251244/*****************************************************************************
Note: See TracChangeset for help on using the changeset viewer.