4 #undef SetWorldTransform 408 while ((*dev)->funcs->priority >
funcs->priority)
dev = &(*dev)->next;
426 DPRINT1(
"Failed to create link for selected METADC object.\n");
464 if (
info->bmiHeader.biClrUsed) colors =
min(
info->bmiHeader.biClrUsed, 256 );
465 else colors =
info->bmiHeader.biBitCount > 8 ? 0 : 1 <<
info->bmiHeader.biBitCount;
501 if (*ppvBits ==
NULL)
525 DWORD cxVirtualDevicePixel,
526 DWORD cyVirtualDevicePixel,
527 DWORD cxVirtualDeviceMm,
528 DWORD cyVirtualDeviceMm)
531 cxVirtualDevicePixel,
532 cyVirtualDevicePixel,
547 SetWorldTransformForMetafile(
559 DPRINT1(
"Failed to get physdev for meta DC %p\n",
hdc);
563 physdev->funcs->pSetWorldTransform(physdev, pxform);
632 return physdev->funcs->pPatBlt(physdev, &
coords, dwRop);
664 return physdev->funcs->pStretchBlt(physdev, &coordsDst, &physdevSrc, &coordsSrc, dwRop);
684 return physdev->
funcs->pRestoreDC(physdev,
level);
694 if (!physdev->
funcs->pSelectFont(physdev,
hFont, aa_flags))
697 hOldFont = pWineDc->
hFont;
712 hOldPen = pWineDc->
hPen;
727 hOldBrush = pWineDc->
hBrush;
736 DPRINT1(
"DRIVER_PathToRegion\n");
755 #define _va_arg_n(p,t,i) (*(t*)((intptr_t*)(p) + i)) 760 return physdev->funcs->pAbortPath(physdev);
762 return physdev->funcs->pArc(physdev,
772 return physdev->funcs->pBeginPath(physdev);
774 return physdev->funcs->pChord(physdev,
784 return physdev->funcs->pCloseFigure(physdev);
786 return physdev->funcs->pEllipse(physdev,
792 return physdev->funcs->pEndPath(physdev);
794 return physdev->funcs->pExcludeClipRect(physdev,
801 return physdev->funcs->pExtEscape(physdev,
808 return physdev->funcs->pExtFloodFill(physdev,
814 return physdev->funcs->pExtSelectClipRgn(physdev,
818 return physdev->funcs->pExtTextOut(physdev,
827 return physdev->funcs->pFillPath(physdev);
829 return physdev->funcs->pFillRgn(physdev,
833 return physdev->funcs->pFlattenPath(physdev);
835 return physdev->funcs->pFrameRgn(physdev,
841 return physdev->funcs->pGetDeviceCaps(physdev,
va_arg(argptr,
INT));
843 return physdev->funcs->pGdiComment(physdev,
847 return physdev->funcs->pIntersectClipRect(physdev,
853 return physdev->funcs->pInvertRgn(physdev,
856 return physdev->funcs->pLineTo(physdev,
860 return physdev->funcs->pModifyWorldTransform(physdev,
864 return physdev->funcs->pMoveTo(physdev,
868 return physdev->funcs->pOffsetClipRgn(physdev,
872 return physdev->funcs->pOffsetViewportOrgEx(physdev,
877 return physdev->funcs->pOffsetWindowOrgEx(physdev,
890 return physdev->funcs->pPie(physdev,
900 return physdev->funcs->pPolyBezier(physdev,
904 return physdev->funcs->pPolyBezierTo(physdev,
908 return physdev->funcs->pPolyDraw(physdev,
913 return physdev->funcs->pPolygon(physdev,
917 return physdev->funcs->pPolyline(physdev,
921 return physdev->funcs->pPolylineTo(physdev,
925 return physdev->funcs->pPolyPolygon(physdev,
930 return physdev->funcs->pPolyPolyline(physdev,
940 return physdev->funcs->pRealizePalette(physdev,
NULL,
FALSE);
942 return physdev->funcs->pRectangle(physdev,
950 return physdev->funcs->pRoundRect(physdev,
959 return physdev->funcs->pSaveDC(physdev);
961 return physdev->funcs->pScaleViewportExtEx(physdev,
968 return physdev->funcs->pScaleWindowExtEx(physdev,
977 return physdev->funcs->pSelectClipPath(physdev,
va_arg(argptr,
INT));
981 return (
DWORD_PTR)physdev->funcs->pSelectPalette(physdev,
987 return physdev->funcs->pSetDCBrushColor(physdev,
va_arg(argptr,
COLORREF));
989 return physdev->funcs->pSetDCPenColor(physdev,
va_arg(argptr,
COLORREF));
991 return physdev->funcs->pSetDIBitsToDevice(physdev,
1004 return physdev->funcs->pSetBkColor(physdev,
va_arg(argptr,
COLORREF));
1006 return physdev->funcs->pSetBkMode(physdev,
va_arg(argptr,
INT));
1009 return physdev->funcs->pSetLayout(physdev,
1014 return physdev->funcs->pSetPixel(physdev,
1019 return physdev->funcs->pSetPolyFillMode(physdev,
va_arg(argptr,
INT));
1021 return physdev->funcs->pSetROP2(physdev,
va_arg(argptr,
INT));
1023 return physdev->funcs->pSetStretchBltMode(physdev,
va_arg(argptr,
INT));
1025 return physdev->funcs->pSetTextAlign(physdev,
va_arg(argptr,
UINT));
1027 return physdev->funcs->pSetTextCharacterExtra(physdev,
va_arg(argptr,
INT));
1029 return physdev->funcs->pSetTextColor(physdev,
va_arg(argptr,
COLORREF));
1031 return physdev->funcs->pSetTextJustification(physdev,
1035 return physdev->funcs->pSetViewportExtEx(physdev,
1040 return physdev->funcs->pSetViewportOrgEx(physdev,
1045 return physdev->funcs->pSetWindowExtEx(physdev,
1050 return physdev->funcs->pSetWindowOrgEx(physdev,
1056 return physdev->funcs->pSetWorldTransform(physdev,
1073 return physdev->funcs->pStrokeAndFillPath(physdev);
1075 return physdev->funcs->pStrokePath(physdev);
1077 return physdev->funcs->pWidenPath(physdev);
1079 return physdev->funcs->pAngleArc(physdev,
1086 return physdev->funcs->pArcTo(physdev,
1096 return physdev->funcs->pGradientFill(physdev,
1150 if (physdev ==
NULL)
1186 if (physdev ==
NULL)
1257 if (physdev ==
NULL)
1261 DPRINT1(
"METADC was already closed, cannot delete object. Ignoring.\n");
1265 physdev->
funcs->pDeleteObject(physdev, hobj);
1276 DPRINT1(
"Trying to delete METADC %p\n",
hdc);
1310 return (
INT)dwResult;
HGDIOBJ WINAPI GetStockObject(_In_ int)
static INT_PTR NULL_Unused()
VOID free_dc_ptr(WINEDC *pWineDc)
BOOL nulldrv_SelectClipPath(PHYSDEV dev, INT mode)
WINEDC * get_dc_ptr(HDC hdc)
#define _va_arg_n(p, t, i)
VOID GDI_hdc_not_using_object(HGDIOBJ hobj, HDC hdc)
BOOL WINAPI METADC_DeleteDC(_In_ HDC hdc)
static const struct gdi_dc_funcs DummyPhysDevFuncs
_In_ int _Inout_ LPRECT lprc
BOOL nulldrv_BeginPath(PHYSDEV dev)
WINEDC * get_physdev_dc(PHYSDEV dev)
BITMAPINFOHEADER bmiHeader
PVOID WINAPI GdiGetClientObjLink(_In_ HGDIOBJ hobj)
PVOID WINAPI GdiRemoveClientObjLink(_In_ HGDIOBJ hobj)
static BOOL NULL_SetWorldTransform(PHYSDEV dev, const XFORM *xform)
BOOL FASTCALL GdiSetLDC(HDC hdc, PVOID pvLDC)
HDC WINAPI GetDC(_In_opt_ HWND)
#define UNREFERENCED_PARAMETER(P)
struct gdi_physdev * next
_In_ HBITMAP _In_ UINT _In_ UINT _Inout_ LPBITMAPINFO pbmi
static HFONT NULL_SelectFont(PHYSDEV dev, HFONT hFont, UINT *aa_flags)
VOID WINAPI METADC_DeleteObject(HGDIOBJ hobj)
struct tagBITMAPINFOHEADER BITMAPINFOHEADER
void __cdecl _assert(const char *exp, const char *file, unsigned line)
#define ERROR_INVALID_HANDLE
static INT NULL_SetMapMode(PHYSDEV dev, INT iMode)
static HPEN DRIVER_SelectPen(PHYSDEV physdev, HPEN hpen, const struct brush_pattern *pattern)
HGDIOBJ WINAPI GdiCreateClientObj(_In_ PVOID pvObject, _In_ GDILOOBJTYPE eObjType)
GLint GLint GLint GLint GLint x
PVOID GDI_GetObjPtr(HGDIOBJ hobj, WORD wType)
BOOL WINAPI DeleteColorSpace(HCOLORSPACE hcs)
BOOL WINAPI SetVirtualResolution(HDC hdc, DWORD cxVirtualDevicePixel, DWORD cyVirtualDevicePixel, DWORD cxVirtualDeviceMm, DWORD cyVirtualDeviceMm)
void __cdecl __debugbreak(void)
static INT NULL_SaveDC(PHYSDEV dev)
VOID GDI_hdc_using_object(HGDIOBJ hobj, HDC hdc)
BOOL nulldrv_EndPath(PHYSDEV dev)
static BOOL DRIVER_PatBlt(_In_ PHYSDEV physdev, _In_ HDC hdc, _In_ INT xLeft, _In_ INT yTop, _In_ INT cx, _In_ INT cy, _In_ DWORD dwRop)
BOOL WINAPI SetWorldTransform(_In_ HDC, _In_ const XFORM *)
static BOOL NULL_ModifyWorldTransform(PHYSDEV dev, const XFORM *xform, DWORD mode)
static BOOL DRIVER_RestoreDC(PHYSDEV physdev, INT level)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDeleteColorSpace(_In_ HANDLE hColorSpace)
WINEDC * alloc_dc_ptr(WORD magic)
BOOL WINAPI GdiCreateClientObjLink(_In_ HGDIOBJ hobj, _In_ PVOID pvObject)
static BOOL DRIVER_StretchBlt(_In_ PHYSDEV physdev, _In_ HDC hdcDst, _In_ INT xDst, _In_ INT yDst, _In_ INT cxDst, _In_ INT cyDst, _In_opt_ HDC hdcSrc, _In_ INT xSrc, _In_ INT ySrc, _In_ INT cxSrc, _In_ INT cySrc, _In_ DWORD dwRop)
static BOOL NULL_SetViewportExtEx(PHYSDEV dev, INT cx, INT cy, SIZE *size)
_Out_opt_ int _Out_opt_ int * cy
void push_dc_driver_ros(PHYSDEV *dev, PHYSDEV physdev, const struct gdi_dc_funcs *funcs)
VOID release_dc_ptr(WINEDC *dc)
BOOL nulldrv_FillPath(PHYSDEV dev)
WINEDC * get_nulldrv_dc(PHYSDEV dev)
static GDILOOBJTYPE ConvertObjectType(WORD wType)
static HRGN DRIVER_PathToRegion(PHYSDEV physdev)
static BOOL NULL_SetViewportOrgEx(PHYSDEV dev, INT x, INT y, POINT *pt)
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
static BOOL NULL_PolyPolyline(PHYSDEV dev, const POINT *pt, const DWORD *lpt, DWORD cw)
#define GDI_HANDLE_GET_TYPE(h)
BOOL nulldrv_AbortPath(PHYSDEV dev)
BOOL nulldrv_StrokeAndFillPath(PHYSDEV dev)
BOOL nulldrv_StrokePath(PHYSDEV dev)
PLDC FASTCALL GdiGetLDC(HDC hDC)
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
__kernel_entry W32KAPI HBITMAP APIENTRY NtGdiGetObjectBitmapHandle(_In_ HBRUSH hbr, _Out_ UINT *piUsage)
DWORD WINAPI GetDCDWord(_In_ HDC hdc, _In_ UINT u, _In_ DWORD dwError)
static struct __wine_debug_functions funcs
PVOID WINAPI GdiDeleteClientObj(_In_ HGDIOBJ hobj)
int bitmap_info_size(const BITMAPINFO *info, WORD coloruse)
BOOL nulldrv_WidenPath(PHYSDEV dev)
BOOL get_brush_bitmap_info(HBRUSH hbr, PBITMAPINFO pbmi, PVOID *ppvBits, PUINT puUsage)
PVOID free_gdi_handle(HGDIOBJ hobj)
static BOOL NULL_ExtTextOutW(PHYSDEV dev, INT x, INT y, UINT fuOptions, const RECT *lprc, LPCWSTR lpString, UINT cwc, const INT *lpDx)
BOOL nulldrv_CloseFigure(PHYSDEV dev)
BOOL nulldrv_FlattenPath(PHYSDEV dev)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiSetVirtualResolution(_In_ HDC hdc, _In_ INT cxVirtualDevicePixel, _In_ INT cyVirtualDevicePixel, _In_ INT cxVirtualDeviceMm, _In_ INT cyVirtualDeviceMm)
static INT NULL_ExcludeClipRect(PHYSDEV dev, INT left, INT top, INT right, INT bottom)
struct gdi_physdev NullPhysDev
VOID GDI_ReleaseObj(HGDIOBJ hobj)
static BOOL NULL_SetWindowOrgEx(PHYSDEV dev, INT x, INT y, POINT *pt)
HGDIOBJ alloc_gdi_handle(PVOID pvObject, WORD wType, const struct gdi_obj_funcs *funcs)
__kernel_entry W32KAPI HDC APIENTRY NtGdiCreateMetafileDC(_In_ HDC hdc)
static HFONT DRIVER_SelectFont(PHYSDEV physdev, HFONT hFont, UINT *aa_flags)
BOOL METADC_Dispatch(_In_ DCFUNC eFunction, _Out_ PDWORD_PTR pdwResult, _In_ DWORD_PTR dwError, _In_ HDC hdc,...)
static INT NULL_IntersectClipRect(PHYSDEV dev, INT left, INT top, INT right, INT bottom)
DWORD WINAPI GetLayout(_In_ HDC hdc)
__kernel_entry W32KAPI BOOL APIENTRY NtGdiDeleteObjectApp(_In_ HANDLE hobj)
static VOID InitBitBltCoords(struct bitblt_coords *coords, HDC hdc, int x, int y, int cx, int cy)
_In_ UINT _In_ DWORD _Out_ DWORD * pdwResult
static DWORD_PTR DRIVER_Dispatch(_In_ PHYSDEV physdev, _In_ DCFUNC eFunction, _In_ va_list argptr)
static INT NULL_ExtSelectClipRgn(PHYSDEV dev, HRGN hrgn, INT iMode)
GLint GLint GLint GLint GLint GLint y
_In_ UINT _In_ DWORD dwIn
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
INT WINAPI METADC16_Escape(_In_ HDC hdc, _In_ INT nEscape, _In_ INT cbInput, _In_ LPCSTR lpvInData, _Out_ LPVOID lpvOutData)
int WINAPI GetDIBits(_In_ HDC hdc, _In_ HBITMAP hbm, _In_ UINT start, _In_ UINT cLines, _Out_opt_ LPVOID lpvBits, _At_((LPBITMAPINFOHEADER) lpbmi, _Inout_) LPBITMAPINFO lpbmi, _In_ UINT usage)
static BOOL NULL_SetWindowExtEx(PHYSDEV dev, INT cx, INT cy, SIZE *size)
#define DbgRaiseAssertionFailure
static BOOL NULL_RestoreDC(PHYSDEV dev, INT level)
static INT NULL_OffsetClipRgn(PHYSDEV dev, INT x, INT y)
const struct gdi_dc_funcs * funcs
GLdouble GLdouble GLdouble GLdouble top
BOOL WINAPI METADC_GetAndSetDCDWord(_Out_ DWORD *pdwResult, _In_ HDC hdc, _In_ UINT uFunction, _In_ DWORD dwIn, _In_ ULONG ulMFId, _In_ USHORT usMF16Id, _In_ DWORD dwError)
enum GDILoObjType GDILOOBJTYPE
#define HeapFree(x, y, z)
static HBRUSH DRIVER_SelectBrush(PHYSDEV physdev, HBRUSH hbrush, const struct brush_pattern *pattern)
static PHYSDEV GetPhysDev(HDC hdc)
static const BYTE masks[8]