Commit 6c951b7d authored by Alexandre Julliard's avatar Alexandre Julliard

winex11: Pass a generic PHYSDEV to all graphics entry points.

parent faa269c4
......@@ -1408,8 +1408,9 @@ static BOOL same_format(X11DRV_PDEVICE *physDevSrc, X11DRV_PDEVICE *physDevDst)
/***********************************************************************
* X11DRV_PatBlt
*/
BOOL CDECL X11DRV_PatBlt( X11DRV_PDEVICE *physDev, INT x, INT y, INT width, INT height, DWORD rop )
BOOL CDECL X11DRV_PatBlt( PHYSDEV dev, INT x, INT y, INT width, INT height, DWORD rop )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
BOOL usePat = (((rop >> 4) & 0x0f0000) != (rop & 0x0f0000));
const BYTE *opcode = BITBLT_Opcodes[(rop >> 16) & 0xff];
struct bitblt_coords dst;
......@@ -1485,11 +1486,12 @@ BOOL CDECL X11DRV_PatBlt( X11DRV_PDEVICE *physDev, INT x, INT y, INT width, INT
/***********************************************************************
* X11DRV_StretchBlt
*/
BOOL CDECL X11DRV_StretchBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT yDst, INT widthDst, INT heightDst,
BOOL CDECL X11DRV_StretchBlt( PHYSDEV dst_dev, INT xDst, INT yDst, INT widthDst, INT heightDst,
PHYSDEV src_dev, INT xSrc, INT ySrc, INT widthSrc, INT heightSrc,
DWORD rop )
{
X11DRV_PDEVICE *physDevSrc = (X11DRV_PDEVICE *)src_dev; /* FIXME: check that it's really an x11 dev */
X11DRV_PDEVICE *physDevDst = get_x11drv_dev( dst_dev );
X11DRV_PDEVICE *physDevSrc = get_x11drv_dev( src_dev ); /* FIXME: check that it's really an x11 dev */
BOOL usePat, useDst, destUsed, fStretch, fNullBrush;
struct bitblt_coords src, dst;
INT width, height;
......@@ -1685,11 +1687,12 @@ done:
/***********************************************************************
* X11DRV_AlphaBlend
*/
BOOL CDECL X11DRV_AlphaBlend( X11DRV_PDEVICE *physDevDst, INT xDst, INT yDst, INT widthDst, INT heightDst,
BOOL CDECL X11DRV_AlphaBlend( PHYSDEV dst_dev, INT xDst, INT yDst, INT widthDst, INT heightDst,
PHYSDEV src_dev, INT xSrc, INT ySrc, INT widthSrc, INT heightSrc,
BLENDFUNCTION blendfn )
{
X11DRV_PDEVICE *physDevSrc = (X11DRV_PDEVICE *)src_dev; /* FIXME: check that it's really an x11 dev */
X11DRV_PDEVICE *physDevDst = get_x11drv_dev( dst_dev );
X11DRV_PDEVICE *physDevSrc = get_x11drv_dev( src_dev ); /* FIXME: check that it's really an x11 dev */
struct bitblt_coords src, dst;
src.x = xSrc;
......
......@@ -87,8 +87,9 @@ void X11DRV_BITMAP_Init(void)
/***********************************************************************
* SelectBitmap (X11DRV.@)
*/
HBITMAP CDECL X11DRV_SelectBitmap( X11DRV_PDEVICE *physDev, HBITMAP hbitmap )
HBITMAP CDECL X11DRV_SelectBitmap( PHYSDEV dev, HBITMAP hbitmap )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
X_PHYSBITMAP *physBitmap;
BITMAP bitmap;
......@@ -131,7 +132,7 @@ HBITMAP CDECL X11DRV_SelectBitmap( X11DRV_PDEVICE *physDev, HBITMAP hbitmap )
*
* Returns TRUE on success else FALSE
*/
BOOL CDECL X11DRV_CreateBitmap( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, LPVOID bmBits )
BOOL CDECL X11DRV_CreateBitmap( PHYSDEV dev, HBITMAP hbitmap, LPVOID bmBits )
{
X_PHYSBITMAP *physBitmap;
BITMAP bitmap;
......
......@@ -250,8 +250,9 @@ static BOOL BRUSH_SelectPatternBrush( X11DRV_PDEVICE *physDev, HBITMAP hbitmap )
/***********************************************************************
* SelectBrush (X11DRV.@)
*/
HBRUSH CDECL X11DRV_SelectBrush( X11DRV_PDEVICE *physDev, HBRUSH hbrush )
HBRUSH CDECL X11DRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
LOGBRUSH logbrush;
HBITMAP hBitmap;
BITMAPINFO * bmpInfo;
......@@ -320,8 +321,10 @@ HBRUSH CDECL X11DRV_SelectBrush( X11DRV_PDEVICE *physDev, HBRUSH hbrush )
/***********************************************************************
* SetDCBrushColor (X11DRV.@)
*/
COLORREF CDECL X11DRV_SetDCBrushColor( X11DRV_PDEVICE *physDev, COLORREF crColor )
COLORREF CDECL X11DRV_SetDCBrushColor( PHYSDEV dev, COLORREF crColor )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
if (GetCurrentObject(physDev->hdc, OBJ_BRUSH) == GetStockObject( DC_BRUSH ))
BRUSH_SelectSolidBrush( physDev, crColor );
......
......@@ -3842,11 +3842,12 @@ static int X11DRV_DIB_GetImageBits( const X11DRV_DIB_IMAGEBITS_DESCR *descr )
* X11DRV_SetDIBitsToDevice
*
*/
INT CDECL X11DRV_SetDIBitsToDevice( X11DRV_PDEVICE *physDev, INT xDest, INT yDest, DWORD cx,
INT CDECL X11DRV_SetDIBitsToDevice( PHYSDEV dev, INT xDest, INT yDest, DWORD cx,
DWORD cy, INT xSrc, INT ySrc,
UINT startscan, UINT lines, LPCVOID bits,
const BITMAPINFO *info, UINT coloruse )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
X11DRV_DIB_IMAGEBITS_DESCR descr;
INT result;
LONG width, height;
......@@ -3970,9 +3971,10 @@ INT CDECL X11DRV_SetDIBitsToDevice( X11DRV_PDEVICE *physDev, INT xDest, INT yDes
/***********************************************************************
* SetDIBits (X11DRV.@)
*/
INT CDECL X11DRV_SetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT startscan,
INT CDECL X11DRV_SetDIBits( PHYSDEV dev, HBITMAP hbitmap, UINT startscan,
UINT lines, LPCVOID bits, const BITMAPINFO *info, UINT coloruse )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
X_PHYSBITMAP *physBitmap = X11DRV_get_phys_bitmap( hbitmap );
X11DRV_DIB_IMAGEBITS_DESCR descr;
DIBSECTION ds;
......@@ -4086,9 +4088,10 @@ INT CDECL X11DRV_SetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT start
/***********************************************************************
* GetDIBits (X11DRV.@)
*/
INT CDECL X11DRV_GetDIBits( X11DRV_PDEVICE *physDev, HBITMAP hbitmap, UINT startscan, UINT lines,
INT CDECL X11DRV_GetDIBits( PHYSDEV dev, HBITMAP hbitmap, UINT startscan, UINT lines,
LPVOID bits, BITMAPINFO *info, UINT coloruse )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
X_PHYSBITMAP *physBitmap = X11DRV_get_phys_bitmap( hbitmap );
DIBSECTION dib;
X11DRV_DIB_IMAGEBITS_DESCR descr;
......@@ -4750,9 +4753,10 @@ static Bool X11DRV_DIB_QueryXShm( Bool *pixmaps )
/***********************************************************************
* X11DRV_CreateDIBSection (X11DRV.@)
*/
HBITMAP CDECL X11DRV_CreateDIBSection( X11DRV_PDEVICE *physDev, HBITMAP hbitmap,
HBITMAP CDECL X11DRV_CreateDIBSection( PHYSDEV dev, HBITMAP hbitmap,
const BITMAPINFO *bmi, UINT usage )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
X_PHYSBITMAP *physBitmap;
DIBSECTION dib;
WORD bpp, compr;
......@@ -4920,8 +4924,9 @@ void X11DRV_DIB_DeleteDIBSection(X_PHYSBITMAP *physBitmap, DIBSECTION *dib)
/***********************************************************************
* SetDIBColorTable (X11DRV.@)
*/
UINT CDECL X11DRV_SetDIBColorTable( X11DRV_PDEVICE *physDev, UINT start, UINT count, const RGBQUAD *colors )
UINT CDECL X11DRV_SetDIBColorTable( PHYSDEV dev, UINT start, UINT count, const RGBQUAD *colors )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
DIBSECTION dib;
UINT ret = 0;
X_PHYSBITMAP *physBitmap = physDev->bitmap;
......
......@@ -167,8 +167,10 @@ BOOL CDECL X11DRV_CreateDC( HDC hdc, X11DRV_PDEVICE **pdev, LPCWSTR driver, LPCW
/**********************************************************************
* X11DRV_DeleteDC
*/
BOOL CDECL X11DRV_DeleteDC( X11DRV_PDEVICE *physDev )
BOOL CDECL X11DRV_DeleteDC( PHYSDEV dev )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
if(physDev->xrender)
X11DRV_XRender_DeleteDC( physDev );
DeleteObject( physDev->region );
......@@ -183,8 +185,10 @@ BOOL CDECL X11DRV_DeleteDC( X11DRV_PDEVICE *physDev )
/***********************************************************************
* GetDeviceCaps (X11DRV.@)
*/
INT CDECL X11DRV_GetDeviceCaps( X11DRV_PDEVICE *physDev, INT cap )
INT CDECL X11DRV_GetDeviceCaps( PHYSDEV dev, INT cap )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
switch(cap)
{
case DRIVERVERSION:
......@@ -284,9 +288,11 @@ INT CDECL X11DRV_GetDeviceCaps( X11DRV_PDEVICE *physDev, INT cap )
/**********************************************************************
* ExtEscape (X11DRV.@)
*/
INT CDECL X11DRV_ExtEscape( X11DRV_PDEVICE *physDev, INT escape, INT in_count, LPCVOID in_data,
INT CDECL X11DRV_ExtEscape( PHYSDEV dev, INT escape, INT in_count, LPCVOID in_data,
INT out_count, LPVOID out_data )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
switch(escape)
{
case QUERYESCSUPPORT:
......
......@@ -1213,8 +1213,9 @@ static int X11DRV_LookupSysPaletteExact( BYTE r, BYTE g, BYTE b )
/***********************************************************************
* RealizePalette (X11DRV.@)
*/
UINT X11DRV_RealizePalette( X11DRV_PDEVICE *physDev, HPALETTE hpal, BOOL primary )
UINT CDECL X11DRV_RealizePalette( PHYSDEV dev, HPALETTE hpal, BOOL primary )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
char flag;
int index;
UINT i, iRemapped = 0;
......@@ -1331,7 +1332,7 @@ UINT X11DRV_RealizePalette( X11DRV_PDEVICE *physDev, HPALETTE hpal, BOOL primary
/***********************************************************************
* UnrealizePalette (X11DRV.@)
*/
BOOL X11DRV_UnrealizePalette( HPALETTE hpal )
BOOL CDECL X11DRV_UnrealizePalette( HPALETTE hpal )
{
int *mapping = palette_get_mapping( hpal );
......@@ -1349,8 +1350,7 @@ BOOL X11DRV_UnrealizePalette( HPALETTE hpal )
/***********************************************************************
* GetSystemPaletteEntries (X11DRV.@)
*/
UINT X11DRV_GetSystemPaletteEntries( X11DRV_PDEVICE *physDev, UINT start, UINT count,
LPPALETTEENTRY entries )
UINT CDECL X11DRV_GetSystemPaletteEntries( PHYSDEV dev, UINT start, UINT count, LPPALETTEENTRY entries )
{
UINT i;
......@@ -1375,8 +1375,9 @@ UINT X11DRV_GetSystemPaletteEntries( X11DRV_PDEVICE *physDev, UINT start, UINT c
/***********************************************************************
* GetNearestColor (X11DRV.@)
*/
COLORREF X11DRV_GetNearestColor( X11DRV_PDEVICE *physDev, COLORREF color )
COLORREF CDECL X11DRV_GetNearestColor( PHYSDEV dev, COLORREF color )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
unsigned char spec_type = color >> 24;
COLORREF nearest;
......@@ -1417,8 +1418,9 @@ COLORREF X11DRV_GetNearestColor( X11DRV_PDEVICE *physDev, COLORREF color )
/***********************************************************************
* RealizeDefaultPalette (X11DRV.@)
*/
UINT X11DRV_RealizeDefaultPalette( X11DRV_PDEVICE *physDev )
UINT CDECL X11DRV_RealizeDefaultPalette( PHYSDEV dev )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
UINT ret = 0;
if (palette_size && GetObjectType(physDev->hdc) != OBJ_MEMDC)
......
......@@ -28,7 +28,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(x11drv);
/***********************************************************************
* SelectPen (X11DRV.@)
*/
HPEN CDECL X11DRV_SelectPen( X11DRV_PDEVICE *physDev, HPEN hpen )
HPEN CDECL X11DRV_SelectPen( PHYSDEV dev, HPEN hpen )
{
static const char PEN_dash[] = { 16,8 };
static const char PEN_dot[] = { 4,4 };
......@@ -39,6 +39,7 @@ HPEN CDECL X11DRV_SelectPen( X11DRV_PDEVICE *physDev, HPEN hpen )
static const char EXTPEN_dot[] = { 1,1 };
static const char EXTPEN_dashdot[] = { 3,1,1,1 };
static const char EXTPEN_dashdotdot[] = { 3,1,1,1,1,1 };
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
LOGPEN logpen;
int i;
......@@ -126,8 +127,10 @@ HPEN CDECL X11DRV_SelectPen( X11DRV_PDEVICE *physDev, HPEN hpen )
/***********************************************************************
* SetDCPenColor (X11DRV.@)
*/
COLORREF CDECL X11DRV_SetDCPenColor( X11DRV_PDEVICE *physDev, COLORREF crColor )
COLORREF CDECL X11DRV_SetDCPenColor( PHYSDEV dev, COLORREF crColor )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
if (GetCurrentObject(physDev->hdc, OBJ_PEN) == GetStockObject( DC_PEN ))
physDev->pen.pixel = X11DRV_PALETTE_ToPhysical( physDev, crColor );
......
......@@ -37,11 +37,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(text);
/***********************************************************************
* X11DRV_ExtTextOut
*/
BOOL CDECL
X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
const RECT *lprect, LPCWSTR wstr, UINT count,
const INT *lpDx )
BOOL CDECL X11DRV_ExtTextOut( PHYSDEV dev, INT x, INT y, UINT flags,
const RECT *lprect, LPCWSTR wstr, UINT count, const INT *lpDx )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
unsigned int i;
fontObject* pfo;
XFontStruct* font;
......@@ -92,7 +91,7 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
/* make a copy of the current device region */
saved_region = CreateRectRgn( 0, 0, 0, 0 );
CombineRgn( saved_region, physDev->region, 0, RGN_COPY );
X11DRV_SetDeviceClipping( physDev, saved_region, clip_region );
X11DRV_SetDeviceClipping( dev, saved_region, clip_region );
DeleteObject( clip_region );
}
......@@ -181,7 +180,7 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
if (flags & ETO_CLIPPED)
{
/* restore the device region */
X11DRV_SetDeviceClipping( physDev, saved_region, 0 );
X11DRV_SetDeviceClipping( dev, saved_region, 0 );
DeleteObject( saved_region );
}
goto END;
......@@ -199,9 +198,10 @@ END:
/***********************************************************************
* X11DRV_GetTextExtentExPoint
*/
BOOL CDECL X11DRV_GetTextExtentExPoint( X11DRV_PDEVICE *physDev, LPCWSTR str, INT count,
BOOL CDECL X11DRV_GetTextExtentExPoint( PHYSDEV dev, LPCWSTR str, INT count,
INT maxExt, LPINT lpnFit, LPINT alpDx, LPSIZE size )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
fontObject* pfo = XFONT_GetFontObject( physDev->font );
TRACE("%s %d\n", debugstr_wn(str,count), count);
......
......@@ -169,6 +169,11 @@ typedef struct
struct xrender_info *xrender;
} X11DRV_PDEVICE;
static inline X11DRV_PDEVICE *get_x11drv_dev( PHYSDEV dev )
{
return (X11DRV_PDEVICE *)dev;
}
struct bitblt_coords
{
int x; /* original position and width */
......@@ -187,66 +192,66 @@ extern GC get_bitmap_gc(int depth) DECLSPEC_HIDDEN;
/* Wine driver X11 functions */
extern BOOL CDECL X11DRV_EnumDeviceFonts( X11DRV_PDEVICE *physDev, LPLOGFONTW plf,
extern BOOL CDECL X11DRV_EnumDeviceFonts( PHYSDEV dev, LPLOGFONTW plf,
FONTENUMPROCW dfeproc, LPARAM lp ) DECLSPEC_HIDDEN;
extern LONG CDECL X11DRV_GetBitmapBits( HBITMAP hbitmap, void *bits, LONG count ) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_GetCharWidth( X11DRV_PDEVICE *physDev, UINT firstChar,
extern BOOL CDECL X11DRV_GetCharWidth( PHYSDEV dev, UINT firstChar,
UINT lastChar, LPINT buffer ) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_GetTextExtentExPoint( X11DRV_PDEVICE *physDev, LPCWSTR str, INT count,
extern BOOL CDECL X11DRV_GetTextExtentExPoint( PHYSDEV dev, LPCWSTR str, INT count,
INT maxExt, LPINT lpnFit, LPINT alpDx, LPSIZE size ) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_GetTextMetrics(X11DRV_PDEVICE *physDev, TEXTMETRICW *metrics) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_LineTo( X11DRV_PDEVICE *physDev, INT x, INT y) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_Arc( X11DRV_PDEVICE *physDev, INT left, INT top, INT right,
extern BOOL CDECL X11DRV_GetTextMetrics(PHYSDEV dev, TEXTMETRICW *metrics) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_LineTo( PHYSDEV dev, INT x, INT y) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_Arc( PHYSDEV dev, INT left, INT top, INT right,
INT bottom, INT xstart, INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_Pie( X11DRV_PDEVICE *physDev, INT left, INT top, INT right,
extern BOOL CDECL X11DRV_Pie( PHYSDEV dev, INT left, INT top, INT right,
INT bottom, INT xstart, INT ystart, INT xend,
INT yend ) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_Chord( X11DRV_PDEVICE *physDev, INT left, INT top,
extern BOOL CDECL X11DRV_Chord( PHYSDEV dev, INT left, INT top,
INT right, INT bottom, INT xstart,
INT ystart, INT xend, INT yend ) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_Ellipse( X11DRV_PDEVICE *physDev, INT left, INT top,
extern BOOL CDECL X11DRV_Ellipse( PHYSDEV dev, INT left, INT top,
INT right, INT bottom ) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_Rectangle(X11DRV_PDEVICE *physDev, INT left, INT top,
extern BOOL CDECL X11DRV_Rectangle(PHYSDEV dev, INT left, INT top,
INT right, INT bottom) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_RoundRect( X11DRV_PDEVICE *physDev, INT left, INT top,
extern BOOL CDECL X11DRV_RoundRect( PHYSDEV dev, INT left, INT top,
INT right, INT bottom, INT ell_width,
INT ell_height ) DECLSPEC_HIDDEN;
extern COLORREF CDECL X11DRV_SetPixel( X11DRV_PDEVICE *physDev, INT x, INT y, COLORREF color ) DECLSPEC_HIDDEN;
extern COLORREF CDECL X11DRV_GetPixel( X11DRV_PDEVICE *physDev, INT x, INT y) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_PaintRgn( X11DRV_PDEVICE *physDev, HRGN hrgn ) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_Polyline( X11DRV_PDEVICE *physDev,const POINT* pt,INT count) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_Polygon( X11DRV_PDEVICE *physDev, const POINT* pt, INT count ) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_PolyPolygon( X11DRV_PDEVICE *physDev, const POINT* pt,
extern COLORREF CDECL X11DRV_SetPixel( PHYSDEV dev, INT x, INT y, COLORREF color ) DECLSPEC_HIDDEN;
extern COLORREF CDECL X11DRV_GetPixel( PHYSDEV dev, INT x, INT y) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_PaintRgn( PHYSDEV dev, HRGN hrgn ) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_Polyline( PHYSDEV dev,const POINT* pt,INT count) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_Polygon( PHYSDEV dev, const POINT* pt, INT count ) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_PolyPolygon( PHYSDEV dev, const POINT* pt,
const INT* counts, UINT polygons) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_PolyPolyline( X11DRV_PDEVICE *physDev, const POINT* pt,
extern BOOL CDECL X11DRV_PolyPolyline( PHYSDEV dev, const POINT* pt,
const DWORD* counts, DWORD polylines) DECLSPEC_HIDDEN;
extern COLORREF CDECL X11DRV_SetBkColor( X11DRV_PDEVICE *physDev, COLORREF color ) DECLSPEC_HIDDEN;
extern COLORREF CDECL X11DRV_SetTextColor( X11DRV_PDEVICE *physDev, COLORREF color ) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_ExtFloodFill( X11DRV_PDEVICE *physDev, INT x, INT y,
extern COLORREF CDECL X11DRV_SetBkColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
extern COLORREF CDECL X11DRV_SetTextColor( PHYSDEV dev, COLORREF color ) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_ExtFloodFill( PHYSDEV dev, INT x, INT y,
COLORREF color, UINT fillType ) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y,
extern BOOL CDECL X11DRV_ExtTextOut( PHYSDEV dev, INT x, INT y,
UINT flags, const RECT *lprect,
LPCWSTR str, UINT count, const INT *lpDx ) DECLSPEC_HIDDEN;
extern LONG CDECL X11DRV_SetBitmapBits( HBITMAP hbitmap, const void *bits, LONG count ) DECLSPEC_HIDDEN;
extern void CDECL X11DRV_SetDeviceClipping( X11DRV_PDEVICE *physDev, HRGN vis_rgn, HRGN clip_rgn ) DECLSPEC_HIDDEN;
extern INT CDECL X11DRV_SetDIBitsToDevice( X11DRV_PDEVICE *physDev, INT xDest,
extern void CDECL X11DRV_SetDeviceClipping( PHYSDEV dev, HRGN vis_rgn, HRGN clip_rgn ) DECLSPEC_HIDDEN;
extern INT CDECL X11DRV_SetDIBitsToDevice( PHYSDEV dev, INT xDest,
INT yDest, DWORD cx, DWORD cy,
INT xSrc, INT ySrc,
UINT startscan, UINT lines,
LPCVOID bits, const BITMAPINFO *info,
UINT coloruse ) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_GetDeviceGammaRamp( X11DRV_PDEVICE *physDev, LPVOID ramp ) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_SetDeviceGammaRamp( X11DRV_PDEVICE *physDev, LPVOID ramp ) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_GetDeviceGammaRamp( PHYSDEV dev, LPVOID ramp ) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_SetDeviceGammaRamp( PHYSDEV dev, LPVOID ramp ) DECLSPEC_HIDDEN;
/* OpenGL / X11 driver functions */
extern int CDECL X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev,
extern int CDECL X11DRV_ChoosePixelFormat(PHYSDEV dev,
const PIXELFORMATDESCRIPTOR *pppfd) DECLSPEC_HIDDEN;
extern int CDECL X11DRV_DescribePixelFormat(X11DRV_PDEVICE *physDev,
extern int CDECL X11DRV_DescribePixelFormat(PHYSDEV dev,
int iPixelFormat, UINT nBytes,
PIXELFORMATDESCRIPTOR *ppfd) DECLSPEC_HIDDEN;
extern int CDECL X11DRV_GetPixelFormat(X11DRV_PDEVICE *physDev) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_SwapBuffers(X11DRV_PDEVICE *physDev) DECLSPEC_HIDDEN;
extern int CDECL X11DRV_GetPixelFormat(PHYSDEV dev) DECLSPEC_HIDDEN;
extern BOOL CDECL X11DRV_SwapBuffers(PHYSDEV dev) DECLSPEC_HIDDEN;
extern void X11DRV_OpenGL_Cleanup(void) DECLSPEC_HIDDEN;
/* X11 driver internal functions */
......
......@@ -3226,8 +3226,9 @@ XFontStruct* XFONT_GetFontStruct( X_PHYSFONT pFont )
/***********************************************************************
* SelectFont (X11DRV.@)
*/
HFONT CDECL X11DRV_SelectFont( X11DRV_PDEVICE *physDev, HFONT hfont, HANDLE gdiFont )
HFONT CDECL X11DRV_SelectFont( PHYSDEV dev, HFONT hfont, HANDLE gdiFont )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
LOGFONTW logfont;
LOGFONT16 lf;
......@@ -3319,9 +3320,10 @@ HFONT CDECL X11DRV_SelectFont( X11DRV_PDEVICE *physDev, HFONT hfont, HANDLE gdiF
*
* X11DRV_EnumDeviceFonts
*/
BOOL CDECL X11DRV_EnumDeviceFonts( X11DRV_PDEVICE *physDev, LPLOGFONTW plf,
BOOL CDECL X11DRV_EnumDeviceFonts( PHYSDEV dev, LPLOGFONTW plf,
FONTENUMPROCW proc, LPARAM lp )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
ENUMLOGFONTEXW lf;
NEWTEXTMETRICEXW tm;
fontResource* pfr = fontList;
......@@ -3384,8 +3386,10 @@ BOOL CDECL X11DRV_EnumDeviceFonts( X11DRV_PDEVICE *physDev, LPLOGFONTW plf,
/***********************************************************************
* X11DRV_GetTextMetrics
*/
BOOL CDECL X11DRV_GetTextMetrics(X11DRV_PDEVICE *physDev, TEXTMETRICW *metrics)
BOOL CDECL X11DRV_GetTextMetrics(PHYSDEV dev, TEXTMETRICW *metrics)
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
if( CHECK_PFONT(physDev->font) )
{
fontObject* pfo = __PFONT(physDev->font);
......@@ -3399,9 +3403,9 @@ BOOL CDECL X11DRV_GetTextMetrics(X11DRV_PDEVICE *physDev, TEXTMETRICW *metrics)
/***********************************************************************
* X11DRV_GetCharWidth
*/
BOOL CDECL X11DRV_GetCharWidth( X11DRV_PDEVICE *physDev, UINT firstChar, UINT lastChar,
LPINT buffer )
BOOL CDECL X11DRV_GetCharWidth( PHYSDEV dev, UINT firstChar, UINT lastChar, LPINT buffer )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
fontObject* pfo = XFONT_GetFontObject( physDev->font );
if( pfo )
......
......@@ -1872,7 +1872,7 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
/* make a copy of the current device region */
saved_region = CreateRectRgn( 0, 0, 0, 0 );
CombineRgn( saved_region, physDev->region, 0, RGN_COPY );
X11DRV_SetDeviceClipping( physDev, saved_region, clip_region );
X11DRV_SetDeviceClipping( &physDev->dev, saved_region, clip_region );
DeleteObject( clip_region );
}
......@@ -2134,7 +2134,7 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
if (flags & ETO_CLIPPED)
{
/* restore the device region */
X11DRV_SetDeviceClipping( physDev, saved_region, 0 );
X11DRV_SetDeviceClipping( &physDev->dev, saved_region, 0 );
DeleteObject( saved_region );
}
......
......@@ -426,7 +426,7 @@ static BOOL X11DRV_XF86VM_SetGammaRamp(LPDDGAMMARAMP ramp)
* the stuff in graphics/x11drv/ has been moved to dlls/x11drv, so that
* they can include xvidmode.h directly
*/
BOOL CDECL X11DRV_GetDeviceGammaRamp(X11DRV_PDEVICE *physDev, LPVOID ramp)
BOOL CDECL X11DRV_GetDeviceGammaRamp(PHYSDEV dev, LPVOID ramp)
{
#ifdef SONAME_LIBXXF86VM
return X11DRV_XF86VM_GetGammaRamp(ramp);
......@@ -442,7 +442,7 @@ BOOL CDECL X11DRV_GetDeviceGammaRamp(X11DRV_PDEVICE *physDev, LPVOID ramp)
* the stuff in graphics/x11drv/ has been moved to dlls/x11drv, so that
* they can include xvidmode.h directly
*/
BOOL CDECL X11DRV_SetDeviceGammaRamp(X11DRV_PDEVICE *physDev, LPVOID ramp)
BOOL CDECL X11DRV_SetDeviceGammaRamp(PHYSDEV dev, LPVOID ramp)
{
#ifdef SONAME_LIBXXF86VM
return X11DRV_XF86VM_SetGammaRamp(ramp);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment