wineps: Add a DC function structure and export it.
This commit is contained in:
parent
605b2e6d52
commit
572d0863b1
|
@ -301,7 +301,7 @@ static LPDEVMODEA DEVMODEdupWtoA(HANDLE heap, const DEVMODEW *dmW)
|
|||
/**********************************************************************
|
||||
* PSDRV_CreateDC
|
||||
*/
|
||||
BOOL CDECL PSDRV_CreateDC( HDC hdc, PSDRV_PDEVICE **pdev, LPCWSTR driver, LPCWSTR device,
|
||||
BOOL CDECL PSDRV_CreateDC( HDC hdc, PHYSDEV *pdev, LPCWSTR driver, LPCWSTR device,
|
||||
LPCWSTR output, const DEVMODEW* initData )
|
||||
{
|
||||
PSDRV_PDEVICE *physDev;
|
||||
|
@ -312,7 +312,7 @@ BOOL CDECL PSDRV_CreateDC( HDC hdc, PSDRV_PDEVICE **pdev, LPCWSTR driver, LPCWST
|
|||
* (See CreateCompatibleDC) */
|
||||
if ( !device && *pdev )
|
||||
{
|
||||
pi = PSDRV_FindPrinterInfo((*pdev)->pi->FriendlyName);
|
||||
pi = PSDRV_FindPrinterInfo(get_psdrv_dev(*pdev)->pi->FriendlyName);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -341,7 +341,7 @@ BOOL CDECL PSDRV_CreateDC( HDC hdc, PSDRV_PDEVICE **pdev, LPCWSTR driver, LPCWST
|
|||
|
||||
physDev = HeapAlloc( PSDRV_Heap, HEAP_ZERO_MEMORY, sizeof(*physDev) );
|
||||
if (!physDev) return FALSE;
|
||||
*pdev = physDev;
|
||||
*pdev = &physDev->dev;
|
||||
|
||||
physDev->pi = pi;
|
||||
|
||||
|
@ -798,3 +798,142 @@ fail:
|
|||
*last = NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
static const struct gdi_dc_funcs psdrv_funcs =
|
||||
{
|
||||
NULL, /* pAbortDoc */
|
||||
NULL, /* pAbortPath */
|
||||
NULL, /* pAlphaBlend */
|
||||
NULL, /* pAngleArc */
|
||||
PSDRV_Arc, /* pArc */
|
||||
NULL, /* pArcTo */
|
||||
NULL, /* pBeginPath */
|
||||
NULL, /* pChoosePixelFormat */
|
||||
PSDRV_Chord, /* pChord */
|
||||
NULL, /* pCloseFigure */
|
||||
NULL, /* pCreateBitmap */
|
||||
PSDRV_CreateDC, /* pCreateDC */
|
||||
NULL, /* pCreateDIBSection */
|
||||
NULL, /* pDeleteBitmap */
|
||||
PSDRV_DeleteDC, /* pDeleteDC */
|
||||
NULL, /* pDeleteObject */
|
||||
NULL, /* pDescribePixelFormat */
|
||||
PSDRV_DeviceCapabilities, /* pDeviceCapabilities */
|
||||
PSDRV_Ellipse, /* pEllipse */
|
||||
PSDRV_EndDoc, /* pEndDoc */
|
||||
PSDRV_EndPage, /* pEndPage */
|
||||
NULL, /* pEndPath */
|
||||
PSDRV_EnumDeviceFonts, /* pEnumDeviceFonts */
|
||||
NULL, /* pEnumICMProfiles */
|
||||
NULL, /* pExcludeClipRect */
|
||||
PSDRV_ExtDeviceMode, /* pExtDeviceMode */
|
||||
PSDRV_ExtEscape, /* pExtEscape */
|
||||
NULL, /* pExtFloodFill */
|
||||
NULL, /* pExtSelectClipRgn */
|
||||
PSDRV_ExtTextOut, /* pExtTextOut */
|
||||
NULL, /* pFillPath */
|
||||
NULL, /* pFillRgn */
|
||||
NULL, /* pFlattenPath */
|
||||
NULL, /* pFrameRgn */
|
||||
NULL, /* pGdiComment */
|
||||
NULL, /* pGetBitmapBits */
|
||||
PSDRV_GetCharWidth, /* pGetCharWidth */
|
||||
NULL, /* pGetDIBits */
|
||||
PSDRV_GetDeviceCaps, /* pGetDeviceCaps */
|
||||
NULL, /* pGetDeviceGammaRamp */
|
||||
NULL, /* pGetICMProfile */
|
||||
NULL, /* pGetNearestColor */
|
||||
NULL, /* pGetPixel */
|
||||
NULL, /* pGetPixelFormat */
|
||||
NULL, /* pGetSystemPaletteEntries */
|
||||
PSDRV_GetTextExtentExPoint, /* pGetTextExtentExPoint */
|
||||
PSDRV_GetTextMetrics, /* pGetTextMetrics */
|
||||
NULL, /* pIntersectClipRect */
|
||||
NULL, /* pInvertRgn */
|
||||
PSDRV_LineTo, /* pLineTo */
|
||||
NULL, /* pModifyWorldTransform */
|
||||
NULL, /* pMoveTo */
|
||||
NULL, /* pOffsetClipRgn */
|
||||
NULL, /* pOffsetViewportOrg */
|
||||
NULL, /* pOffsetWindowOrg */
|
||||
PSDRV_PaintRgn, /* pPaintRgn */
|
||||
PSDRV_PatBlt, /* pPatBlt */
|
||||
PSDRV_Pie, /* pPie */
|
||||
NULL, /* pPolyBezier */
|
||||
NULL, /* pPolyBezierTo */
|
||||
NULL, /* pPolyDraw */
|
||||
PSDRV_PolyPolygon, /* pPolyPolygon */
|
||||
PSDRV_PolyPolyline, /* pPolyPolyline */
|
||||
PSDRV_Polygon, /* pPolygon */
|
||||
PSDRV_Polyline, /* pPolyline */
|
||||
NULL, /* pPolylineTo */
|
||||
NULL, /* pRealizeDefaultPalette */
|
||||
NULL, /* pRealizePalette */
|
||||
PSDRV_Rectangle, /* pRectangle */
|
||||
PSDRV_ResetDC, /* pResetDC */
|
||||
NULL, /* pRestoreDC */
|
||||
PSDRV_RoundRect, /* pRoundRect */
|
||||
NULL, /* pSaveDC */
|
||||
NULL, /* pScaleViewportExt */
|
||||
NULL, /* pScaleWindowExt */
|
||||
NULL, /* pSelectBitmap */
|
||||
PSDRV_SelectBrush, /* pSelectBrush */
|
||||
NULL, /* pSelectClipPath */
|
||||
PSDRV_SelectFont, /* pSelectFont */
|
||||
NULL, /* pSelectPalette */
|
||||
PSDRV_SelectPen, /* pSelectPen */
|
||||
NULL, /* pSetArcDirection */
|
||||
NULL, /* pSetBitmapBits */
|
||||
PSDRV_SetBkColor, /* pSetBkColor */
|
||||
NULL, /* pSetBkMode */
|
||||
PSDRV_SetDCBrushColor, /* pSetDCBrushColor */
|
||||
PSDRV_SetDCPenColor, /* pSetDCPenColor */
|
||||
NULL, /* pSetDIBColorTable */
|
||||
NULL, /* pSetDIBits */
|
||||
NULL, /* pSetDIBitsToDevice */
|
||||
NULL, /* pSetDeviceClipping */
|
||||
NULL, /* pSetDeviceGammaRamp */
|
||||
NULL, /* pSetLayout */
|
||||
NULL, /* pSetMapMode */
|
||||
NULL, /* pSetMapperFlags */
|
||||
PSDRV_SetPixel, /* pSetPixel */
|
||||
NULL, /* pSetPixelFormat */
|
||||
NULL, /* pSetPolyFillMode */
|
||||
NULL, /* pSetROP2 */
|
||||
NULL, /* pSetRelAbs */
|
||||
NULL, /* pSetStretchBltMode */
|
||||
NULL, /* pSetTextAlign */
|
||||
NULL, /* pSetTextCharacterExtra */
|
||||
PSDRV_SetTextColor, /* pSetTextColor */
|
||||
NULL, /* pSetTextJustification */
|
||||
NULL, /* pSetViewportExt */
|
||||
NULL, /* pSetViewportOrg */
|
||||
NULL, /* pSetWindowExt */
|
||||
NULL, /* pSetWindowOrg */
|
||||
NULL, /* pSetWorldTransform */
|
||||
PSDRV_StartDoc, /* pStartDoc */
|
||||
PSDRV_StartPage, /* pStartPage */
|
||||
NULL, /* pStretchBlt */
|
||||
PSDRV_StretchDIBits, /* pStretchDIBits */
|
||||
NULL, /* pStrokeAndFillPath */
|
||||
NULL, /* pStrokePath */
|
||||
NULL, /* pSwapBuffers */
|
||||
NULL, /* pUnrealizePalette */
|
||||
NULL, /* pWidenPath */
|
||||
/* OpenGL not supported */
|
||||
};
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* PSDRV_get_gdi_driver
|
||||
*/
|
||||
const struct gdi_dc_funcs * CDECL PSDRV_get_gdi_driver( unsigned int version )
|
||||
{
|
||||
if (version != WINE_GDI_DRIVER_VERSION)
|
||||
{
|
||||
ERR( "version mismatch, gdi32 wants %u but wineps has %u\n", version, WINE_GDI_DRIVER_VERSION );
|
||||
return NULL;
|
||||
}
|
||||
return &psdrv_funcs;
|
||||
}
|
||||
|
|
|
@ -412,6 +412,55 @@ extern HINSTANCE PSDRV_hInstance DECLSPEC_HIDDEN;
|
|||
extern HANDLE PSDRV_Heap DECLSPEC_HIDDEN;
|
||||
extern char *PSDRV_ANSIVector[256] DECLSPEC_HIDDEN;
|
||||
|
||||
/* GDI driver functions */
|
||||
extern BOOL CDECL PSDRV_Arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
|
||||
INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
|
||||
extern BOOL CDECL PSDRV_Chord( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
|
||||
INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
|
||||
extern DWORD CDECL PSDRV_DeviceCapabilities(LPSTR lpszDriver, LPCSTR lpszDevice, LPCSTR lpszPort,
|
||||
WORD fwCapability, LPSTR lpszOutput, LPDEVMODEA lpDevMode) DECLSPEC_HIDDEN;
|
||||
extern BOOL CDECL PSDRV_Ellipse( PHYSDEV dev, INT left, INT top, INT right, INT bottom) DECLSPEC_HIDDEN;
|
||||
extern INT CDECL PSDRV_EndDoc( PHYSDEV dev ) DECLSPEC_HIDDEN;
|
||||
extern INT CDECL PSDRV_EndPage( PHYSDEV dev ) DECLSPEC_HIDDEN;
|
||||
extern BOOL CDECL PSDRV_EnumDeviceFonts( PHYSDEV dev, LPLOGFONTW plf, FONTENUMPROCW proc, LPARAM lp ) DECLSPEC_HIDDEN;
|
||||
extern INT CDECL PSDRV_ExtDeviceMode(LPSTR lpszDriver, HWND hwnd, LPDEVMODEA lpdmOutput,
|
||||
LPSTR lpszDevice, LPSTR lpszPort, LPDEVMODEA lpdmInput,
|
||||
LPSTR lpszProfile, DWORD dwMode) DECLSPEC_HIDDEN;
|
||||
extern INT CDECL PSDRV_ExtEscape( PHYSDEV dev, INT nEscape, INT cbInput, LPCVOID in_data,
|
||||
INT cbOutput, LPVOID out_data ) DECLSPEC_HIDDEN;
|
||||
extern BOOL CDECL PSDRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
|
||||
const RECT *lprect, LPCWSTR str, UINT count, const INT *lpDx ) DECLSPEC_HIDDEN;
|
||||
extern BOOL CDECL PSDRV_GetCharWidth(PHYSDEV dev, UINT firstChar, UINT lastChar, LPINT buffer) DECLSPEC_HIDDEN;
|
||||
extern BOOL CDECL PSDRV_GetTextExtentExPoint(PHYSDEV dev, LPCWSTR str, INT count,
|
||||
INT maxExt, LPINT lpnFit, LPINT alpDx, LPSIZE size) DECLSPEC_HIDDEN;
|
||||
extern BOOL CDECL PSDRV_GetTextMetrics(PHYSDEV dev, TEXTMETRICW *metrics) DECLSPEC_HIDDEN;
|
||||
extern BOOL CDECL PSDRV_LineTo(PHYSDEV dev, INT x, INT y) DECLSPEC_HIDDEN;
|
||||
extern BOOL CDECL PSDRV_PaintRgn( PHYSDEV dev, HRGN hrgn ) DECLSPEC_HIDDEN;
|
||||
extern BOOL CDECL PSDRV_PatBlt(PHYSDEV dev, struct bitblt_coords *dst, DWORD dwRop) DECLSPEC_HIDDEN;
|
||||
extern BOOL CDECL PSDRV_Pie( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
|
||||
INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
|
||||
extern BOOL CDECL PSDRV_PolyPolygon( PHYSDEV dev, const POINT* pts, const INT* counts, UINT polygons ) DECLSPEC_HIDDEN;
|
||||
extern BOOL CDECL PSDRV_PolyPolyline( PHYSDEV dev, const POINT* pts, const DWORD* counts, DWORD polylines ) DECLSPEC_HIDDEN;
|
||||
extern BOOL CDECL PSDRV_Polygon( PHYSDEV dev, const POINT* pt, INT count ) DECLSPEC_HIDDEN;
|
||||
extern BOOL CDECL PSDRV_Polyline( PHYSDEV dev, const POINT* pt, INT count ) DECLSPEC_HIDDEN;
|
||||
extern BOOL CDECL PSDRV_Rectangle( PHYSDEV dev, INT left, INT top, INT right, INT bottom ) DECLSPEC_HIDDEN;
|
||||
extern BOOL CDECL PSDRV_RoundRect( PHYSDEV dev, INT left, INT top, INT right,
|
||||
INT bottom, INT ell_width, INT ell_height ) DECLSPEC_HIDDEN;
|
||||
extern HBRUSH CDECL PSDRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush ) DECLSPEC_HIDDEN;
|
||||
extern HBRUSH CDECL PSDRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush ) DECLSPEC_HIDDEN;
|
||||
extern HFONT CDECL PSDRV_SelectFont( PHYSDEV dev, HFONT hfont, HANDLE gdiFont ) DECLSPEC_HIDDEN;
|
||||
extern HPEN CDECL PSDRV_SelectPen( PHYSDEV dev, HPEN hpen ) DECLSPEC_HIDDEN;
|
||||
extern COLORREF CDECL PSDRV_SetBkColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
|
||||
extern COLORREF CDECL PSDRV_SetDCBrushColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
|
||||
extern COLORREF CDECL PSDRV_SetDCPenColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
|
||||
extern COLORREF CDECL PSDRV_SetPixel( PHYSDEV dev, INT x, INT y, COLORREF color ) DECLSPEC_HIDDEN;
|
||||
extern COLORREF CDECL PSDRV_SetTextColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
|
||||
extern INT CDECL PSDRV_StartDoc( PHYSDEV dev, const DOCINFOW *doc ) DECLSPEC_HIDDEN;
|
||||
extern INT CDECL PSDRV_StretchDIBits( PHYSDEV dev, INT xDst, INT yDst, INT widthDst,
|
||||
INT heightDst, INT xSrc, INT ySrc,
|
||||
INT widthSrc, INT heightSrc, const void *bits,
|
||||
const BITMAPINFO *info, UINT wUsage, DWORD dwRop ) DECLSPEC_HIDDEN;
|
||||
|
||||
extern void PSDRV_MergeDevmodes(PSDRV_DEVMODEA *dm1, PSDRV_DEVMODEA *dm2,
|
||||
PRINTERINFO *pi) DECLSPEC_HIDDEN;
|
||||
extern BOOL PSDRV_GetFontMetrics(void) DECLSPEC_HIDDEN;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
@ cdecl wine_get_gdi_driver(long) PSDRV_get_gdi_driver
|
||||
|
||||
# GDI driver
|
||||
|
||||
@ cdecl Arc(ptr long long long long long long long long) PSDRV_Arc
|
||||
|
|
Loading…
Reference in New Issue