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

This commit is contained in:
Alexandre Julliard 2011-07-08 15:55:11 +02:00
parent faa269c42a
commit 6c951b7d0d
14 changed files with 213 additions and 163 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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 );

View File

@ -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;

View File

@ -188,8 +188,9 @@ RGNDATA *X11DRV_GetRegionData( HRGN hrgn, HDC hdc_lptodp )
/***********************************************************************
* X11DRV_SetDeviceClipping
*/
void CDECL X11DRV_SetDeviceClipping( X11DRV_PDEVICE *physDev, HRGN vis_rgn, HRGN clip_rgn )
void CDECL X11DRV_SetDeviceClipping( PHYSDEV dev, HRGN vis_rgn, HRGN clip_rgn )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
RGNDATA *data;
CombineRgn( physDev->region, vis_rgn, clip_rgn, clip_rgn ? RGN_AND : RGN_COPY );
@ -469,9 +470,9 @@ INT X11DRV_YWStoDS( X11DRV_PDEVICE *physDev, INT height )
/***********************************************************************
* X11DRV_LineTo
*/
BOOL CDECL
X11DRV_LineTo( X11DRV_PDEVICE *physDev, INT x, INT y )
BOOL CDECL X11DRV_LineTo( PHYSDEV dev, INT x, INT y )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
POINT pt[2];
if (X11DRV_SetupGCForPen( physDev )) {
@ -504,11 +505,10 @@ X11DRV_LineTo( X11DRV_PDEVICE *physDev, INT x, INT y )
* 'lines' is the number of lines to draw: 0 for Arc, 1 for Chord, 2 for Pie.
*
*/
static BOOL
X11DRV_DrawArc( X11DRV_PDEVICE *physDev, INT left, INT top, INT right,
INT bottom, INT xstart, INT ystart,
INT xend, INT yend, INT lines )
static BOOL X11DRV_DrawArc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
INT xstart, INT ystart, INT xend, INT yend, INT lines )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
INT xcenter, ycenter, istart_angle, idiff_angle;
INT width, oldwidth;
double start_angle, end_angle;
@ -661,44 +661,38 @@ X11DRV_DrawArc( X11DRV_PDEVICE *physDev, INT left, INT top, INT right,
/***********************************************************************
* X11DRV_Arc
*/
BOOL CDECL
X11DRV_Arc( X11DRV_PDEVICE *physDev, INT left, INT top, INT right, INT bottom,
INT xstart, INT ystart, INT xend, INT yend )
BOOL CDECL X11DRV_Arc( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
INT xstart, INT ystart, INT xend, INT yend )
{
return X11DRV_DrawArc( physDev, left, top, right, bottom,
xstart, ystart, xend, yend, 0 );
return X11DRV_DrawArc( dev, left, top, right, bottom, xstart, ystart, xend, yend, 0 );
}
/***********************************************************************
* X11DRV_Pie
*/
BOOL CDECL
X11DRV_Pie( X11DRV_PDEVICE *physDev, INT left, INT top, INT right, INT bottom,
INT xstart, INT ystart, INT xend, INT yend )
BOOL CDECL X11DRV_Pie( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
INT xstart, INT ystart, INT xend, INT yend )
{
return X11DRV_DrawArc( physDev, left, top, right, bottom,
xstart, ystart, xend, yend, 2 );
return X11DRV_DrawArc( dev, left, top, right, bottom, xstart, ystart, xend, yend, 2 );
}
/***********************************************************************
* X11DRV_Chord
*/
BOOL CDECL
X11DRV_Chord( X11DRV_PDEVICE *physDev, INT left, INT top, INT right, INT bottom,
INT xstart, INT ystart, INT xend, INT yend )
BOOL CDECL X11DRV_Chord( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
INT xstart, INT ystart, INT xend, INT yend )
{
return X11DRV_DrawArc( physDev, left, top, right, bottom,
xstart, ystart, xend, yend, 1 );
return X11DRV_DrawArc( dev, left, top, right, bottom, xstart, ystart, xend, yend, 1 );
}
/***********************************************************************
* X11DRV_Ellipse
*/
BOOL CDECL
X11DRV_Ellipse( X11DRV_PDEVICE *physDev, INT left, INT top, INT right, INT bottom )
BOOL CDECL X11DRV_Ellipse( PHYSDEV dev, INT left, INT top, INT right, INT bottom )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
INT width, oldwidth;
BOOL update = FALSE;
RECT rc = get_device_rect( physDev->hdc, left, top, right, bottom );
@ -754,9 +748,9 @@ X11DRV_Ellipse( X11DRV_PDEVICE *physDev, INT left, INT top, INT right, INT botto
/***********************************************************************
* X11DRV_Rectangle
*/
BOOL CDECL
X11DRV_Rectangle(X11DRV_PDEVICE *physDev, INT left, INT top, INT right, INT bottom)
BOOL CDECL X11DRV_Rectangle(PHYSDEV dev, INT left, INT top, INT right, INT bottom)
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
INT width, oldwidth, oldjoinstyle;
BOOL update = FALSE;
RECT rc = get_device_rect( physDev->hdc, left, top, right, bottom );
@ -821,10 +815,10 @@ X11DRV_Rectangle(X11DRV_PDEVICE *physDev, INT left, INT top, INT right, INT bott
/***********************************************************************
* X11DRV_RoundRect
*/
BOOL CDECL
X11DRV_RoundRect( X11DRV_PDEVICE *physDev, INT left, INT top, INT right,
INT bottom, INT ell_width, INT ell_height )
BOOL CDECL X11DRV_RoundRect( PHYSDEV dev, INT left, INT top, INT right, INT bottom,
INT ell_width, INT ell_height )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
INT width, oldwidth, oldendcap;
BOOL update = FALSE;
POINT pts[2];
@ -1023,9 +1017,9 @@ X11DRV_RoundRect( X11DRV_PDEVICE *physDev, INT left, INT top, INT right,
/***********************************************************************
* X11DRV_SetPixel
*/
COLORREF CDECL
X11DRV_SetPixel( X11DRV_PDEVICE *physDev, INT x, INT y, COLORREF color )
COLORREF CDECL X11DRV_SetPixel( PHYSDEV dev, INT x, INT y, COLORREF color )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
unsigned long pixel;
POINT pt;
@ -1055,10 +1049,10 @@ X11DRV_SetPixel( X11DRV_PDEVICE *physDev, INT x, INT y, COLORREF color )
/***********************************************************************
* X11DRV_GetPixel
*/
COLORREF CDECL
X11DRV_GetPixel( X11DRV_PDEVICE *physDev, INT x, INT y )
COLORREF CDECL X11DRV_GetPixel( PHYSDEV dev, INT x, INT y )
{
static Pixmap pixmap = 0;
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
XImage * image;
int pixel;
POINT pt;
@ -1107,9 +1101,10 @@ X11DRV_GetPixel( X11DRV_PDEVICE *physDev, INT x, INT y )
/***********************************************************************
* X11DRV_PaintRgn
*/
BOOL CDECL
X11DRV_PaintRgn( X11DRV_PDEVICE *physDev, HRGN hrgn )
BOOL CDECL X11DRV_PaintRgn( PHYSDEV dev, HRGN hrgn )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
if (X11DRV_SetupGCForBrush( physDev ))
{
unsigned int i;
@ -1137,9 +1132,9 @@ X11DRV_PaintRgn( X11DRV_PDEVICE *physDev, HRGN hrgn )
/**********************************************************************
* X11DRV_Polyline
*/
BOOL CDECL
X11DRV_Polyline( X11DRV_PDEVICE *physDev, const POINT* pt, INT count )
BOOL CDECL X11DRV_Polyline( PHYSDEV dev, const POINT* pt, INT count )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
int i;
XPoint *points;
@ -1174,10 +1169,10 @@ X11DRV_Polyline( X11DRV_PDEVICE *physDev, const POINT* pt, INT count )
/**********************************************************************
* X11DRV_Polygon
*/
BOOL CDECL
X11DRV_Polygon( X11DRV_PDEVICE *physDev, const POINT* pt, INT count )
BOOL CDECL X11DRV_Polygon( PHYSDEV dev, const POINT* pt, INT count )
{
register int i;
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
int i;
XPoint *points;
BOOL update = FALSE;
@ -1226,16 +1221,16 @@ X11DRV_Polygon( X11DRV_PDEVICE *physDev, const POINT* pt, INT count )
/**********************************************************************
* X11DRV_PolyPolygon
*/
BOOL CDECL
X11DRV_PolyPolygon( X11DRV_PDEVICE *physDev, const POINT* pt, const INT* counts, UINT polygons)
BOOL CDECL X11DRV_PolyPolygon( PHYSDEV dev, const POINT* pt, const INT* counts, UINT polygons )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
HRGN hrgn;
/* FIXME: The points should be converted to device coords before */
/* creating the region. */
hrgn = CreatePolyPolygonRgn( pt, counts, polygons, GetPolyFillMode( physDev->hdc ) );
X11DRV_PaintRgn( physDev, hrgn );
X11DRV_PaintRgn( dev, hrgn );
DeleteObject( hrgn );
/* Draw the outline of the polygons */
@ -1284,9 +1279,10 @@ X11DRV_PolyPolygon( X11DRV_PDEVICE *physDev, const POINT* pt, const INT* counts,
/**********************************************************************
* X11DRV_PolyPolyline
*/
BOOL CDECL
X11DRV_PolyPolyline( X11DRV_PDEVICE *physDev, const POINT* pt, const DWORD* counts, DWORD polylines )
BOOL CDECL X11DRV_PolyPolyline( PHYSDEV dev, const POINT* pt, const DWORD* counts, DWORD polylines )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
if (X11DRV_SetupGCForPen ( physDev ))
{
unsigned int i, j, max = 0;
@ -1403,10 +1399,9 @@ static int ExtFloodFillXGetImageErrorHandler( Display *dpy, XErrorEvent *event,
/**********************************************************************
* X11DRV_ExtFloodFill
*/
BOOL CDECL
X11DRV_ExtFloodFill( X11DRV_PDEVICE *physDev, INT x, INT y, COLORREF color,
UINT fillType )
BOOL CDECL X11DRV_ExtFloodFill( PHYSDEV dev, INT x, INT y, COLORREF color, UINT fillType )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
XImage *image;
RECT rect;
POINT pt;
@ -1457,9 +1452,10 @@ X11DRV_ExtFloodFill( X11DRV_PDEVICE *physDev, INT x, INT y, COLORREF color,
/**********************************************************************
* X11DRV_SetBkColor
*/
COLORREF CDECL
X11DRV_SetBkColor( X11DRV_PDEVICE *physDev, COLORREF color )
COLORREF CDECL X11DRV_SetBkColor( PHYSDEV dev, COLORREF color )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
physDev->backgroundPixel = X11DRV_PALETTE_ToPhysical( physDev, color );
return color;
}
@ -1467,9 +1463,10 @@ X11DRV_SetBkColor( X11DRV_PDEVICE *physDev, COLORREF color )
/**********************************************************************
* X11DRV_SetTextColor
*/
COLORREF CDECL
X11DRV_SetTextColor( X11DRV_PDEVICE *physDev, COLORREF color )
COLORREF CDECL X11DRV_SetTextColor( PHYSDEV dev, COLORREF color )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
physDev->textPixel = X11DRV_PALETTE_ToPhysical( physDev, color );
return color;
}
@ -1519,7 +1516,7 @@ static const WCHAR color_path[] =
/***********************************************************************
* GetICMProfile (X11DRV.@)
*/
BOOL CDECL X11DRV_GetICMProfile( X11DRV_PDEVICE *physDev, LPDWORD size, LPWSTR filename )
BOOL CDECL X11DRV_GetICMProfile( PHYSDEV dev, LPDWORD size, LPWSTR filename )
{
static const WCHAR srgb[] =
{'s','R','G','B',' ','C','o','l','o','r',' ','S','p','a','c','e',' ',
@ -1593,8 +1590,9 @@ BOOL CDECL X11DRV_GetICMProfile( X11DRV_PDEVICE *physDev, LPDWORD size, LPWSTR f
/***********************************************************************
* EnumICMProfiles (X11DRV.@)
*/
INT CDECL X11DRV_EnumICMProfiles( X11DRV_PDEVICE *physDev, ICMENUMPROCW proc, LPARAM lparam )
INT CDECL X11DRV_EnumICMProfiles( PHYSDEV dev, ICMENUMPROCW proc, LPARAM lparam )
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
HKEY hkey;
DWORD len_sysdir, len_path, len, index = 0;
WCHAR sysdir[MAX_PATH], *profile;

View File

@ -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:

View File

@ -1199,8 +1199,9 @@ static XID create_bitmap_glxpixmap(X11DRV_PDEVICE *physDev, WineGLPixelFormat *f
*
* Equivalent to glXChooseVisual.
*/
int CDECL X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev,
const PIXELFORMATDESCRIPTOR *ppfd) {
int CDECL X11DRV_ChoosePixelFormat(PHYSDEV dev, const PIXELFORMATDESCRIPTOR *ppfd)
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
WineGLPixelFormat *list;
int onscreen_size;
int ret = 0;
@ -1448,10 +1449,10 @@ int CDECL X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev,
*
* Get the pixel-format descriptor associated to the given id
*/
int CDECL X11DRV_DescribePixelFormat(X11DRV_PDEVICE *physDev,
int iPixelFormat,
UINT nBytes,
PIXELFORMATDESCRIPTOR *ppfd) {
int CDECL X11DRV_DescribePixelFormat(PHYSDEV dev, int iPixelFormat,
UINT nBytes, PIXELFORMATDESCRIPTOR *ppfd)
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
/*XVisualInfo *vis;*/
int value;
int rb,gb,bb,ab;
@ -1592,7 +1593,9 @@ int CDECL X11DRV_DescribePixelFormat(X11DRV_PDEVICE *physDev,
*
* Get the pixel-format id used by this DC
*/
int CDECL X11DRV_GetPixelFormat(X11DRV_PDEVICE *physDev) {
int CDECL X11DRV_GetPixelFormat(PHYSDEV dev)
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
WineGLPixelFormat *fmt;
int tmp;
TRACE("(%p)\n", physDev);
@ -1701,9 +1704,10 @@ static BOOL internal_SetPixelFormat(X11DRV_PDEVICE *physDev,
*
* Set the pixel-format id used by this DC
*/
BOOL CDECL X11DRV_SetPixelFormat(X11DRV_PDEVICE *physDev,
int iPixelFormat,
const PIXELFORMATDESCRIPTOR *ppfd) {
BOOL CDECL X11DRV_SetPixelFormat(PHYSDEV dev, int iPixelFormat, const PIXELFORMATDESCRIPTOR *ppfd)
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
TRACE("(%p,%d,%p)\n", physDev, iPixelFormat, ppfd);
if (!has_opengl()) return FALSE;
@ -1738,8 +1742,9 @@ BOOL CDECL X11DRV_wglCopyContext(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask) {
*
* For OpenGL32 wglCreateContext.
*/
HGLRC CDECL X11DRV_wglCreateContext(X11DRV_PDEVICE *physDev)
HGLRC CDECL X11DRV_wglCreateContext(PHYSDEV dev)
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
Wine_GLContext *ret;
WineGLPixelFormat *fmt;
int hdcPF = physDev->current_pf;
@ -1877,7 +1882,9 @@ PROC CDECL X11DRV_wglGetProcAddress(LPCSTR lpszProc)
*
* For OpenGL32 wglMakeCurrent.
*/
BOOL CDECL X11DRV_wglMakeCurrent(X11DRV_PDEVICE *physDev, HGLRC hglrc) {
BOOL CDECL X11DRV_wglMakeCurrent(PHYSDEV dev, HGLRC hglrc)
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
BOOL ret;
HDC hdc = physDev->hdc;
DWORD type = GetObjectType(hdc);
@ -1955,8 +1962,10 @@ BOOL CDECL X11DRV_wglMakeCurrent(X11DRV_PDEVICE *physDev, HGLRC hglrc) {
*
* For OpenGL32 wglMakeContextCurrentARB
*/
BOOL CDECL X11DRV_wglMakeContextCurrentARB(X11DRV_PDEVICE* pDrawDev, X11DRV_PDEVICE* pReadDev, HGLRC hglrc)
BOOL CDECL X11DRV_wglMakeContextCurrentARB( PHYSDEV draw_dev, PHYSDEV read_dev, HGLRC hglrc )
{
X11DRV_PDEVICE *pDrawDev = get_x11drv_dev( draw_dev );
X11DRV_PDEVICE *pReadDev = get_x11drv_dev( read_dev );
BOOL ret;
TRACE("(%p,%p,%p)\n", pDrawDev, pReadDev, hglrc);
@ -2185,8 +2194,9 @@ static BOOL internal_wglUseFontBitmaps(HDC hdc, DWORD first, DWORD count, DWORD
*
* For OpenGL32 wglUseFontBitmapsA.
*/
BOOL CDECL X11DRV_wglUseFontBitmapsA(X11DRV_PDEVICE *physDev, DWORD first, DWORD count, DWORD listBase)
BOOL CDECL X11DRV_wglUseFontBitmapsA(PHYSDEV dev, DWORD first, DWORD count, DWORD listBase)
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
Font fid = physDev->font;
TRACE("(%p, %d, %d, %d) using font %ld\n", physDev->hdc, first, count, listBase, fid);
@ -2209,8 +2219,9 @@ BOOL CDECL X11DRV_wglUseFontBitmapsA(X11DRV_PDEVICE *physDev, DWORD first, DWORD
*
* For OpenGL32 wglUseFontBitmapsW.
*/
BOOL CDECL X11DRV_wglUseFontBitmapsW(X11DRV_PDEVICE *physDev, DWORD first, DWORD count, DWORD listBase)
BOOL CDECL X11DRV_wglUseFontBitmapsW(PHYSDEV dev, DWORD first, DWORD count, DWORD listBase)
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
Font fid = physDev->font;
TRACE("(%p, %d, %d, %d) using font %ld\n", physDev->hdc, first, count, listBase, fid);
@ -2322,8 +2333,9 @@ static void WINAPI X11DRV_wglFlush(void)
*
* WGL_ARB_create_context: wglCreateContextAttribsARB
*/
HGLRC CDECL X11DRV_wglCreateContextAttribsARB(X11DRV_PDEVICE *physDev, HGLRC hShareContext, const int* attribList)
HGLRC CDECL X11DRV_wglCreateContextAttribsARB(PHYSDEV dev, HGLRC hShareContext, const int* attribList)
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
Wine_GLContext *ret;
WineGLPixelFormat *fmt;
int hdcPF = physDev->current_pf;
@ -2672,9 +2684,11 @@ static GLboolean WINAPI X11DRV_wglDestroyPbufferARB(HPBUFFERARB hPbuffer)
* Gdi32 implements the part of this function which creates a device context.
* This part associates the physDev with the X drawable of the pbuffer.
*/
HDC CDECL X11DRV_wglGetPbufferDCARB(X11DRV_PDEVICE *physDev, HPBUFFERARB hPbuffer)
HDC CDECL X11DRV_wglGetPbufferDCARB(PHYSDEV dev, HPBUFFERARB hPbuffer)
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
Wine_GLPBuffer* object = hPbuffer;
if (NULL == object) {
SetLastError(ERROR_INVALID_HANDLE);
return NULL;
@ -3515,8 +3529,10 @@ static void WINAPI X11DRV_wglFreeMemoryNV(GLvoid* pointer) {
* WGL_WINE_pixel_format_passthrough: wglSetPixelFormatWINE
* This is a WINE-specific wglSetPixelFormat which can set the pixel format multiple times.
*/
BOOL CDECL X11DRV_wglSetPixelFormatWINE(X11DRV_PDEVICE *physDev, int iPixelFormat, const PIXELFORMATDESCRIPTOR *ppfd)
BOOL CDECL X11DRV_wglSetPixelFormatWINE(PHYSDEV dev, int iPixelFormat, const PIXELFORMATDESCRIPTOR *ppfd)
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
TRACE("(%p,%d,%p)\n", physDev, iPixelFormat, ppfd);
if (!has_opengl()) return FALSE;
@ -3809,8 +3825,9 @@ BOOL destroy_glxpixmap(Display *display, XID glxpixmap)
*
* Swap the buffers of this DC
*/
BOOL CDECL X11DRV_SwapBuffers(X11DRV_PDEVICE *physDev)
BOOL CDECL X11DRV_SwapBuffers(PHYSDEV dev)
{
X11DRV_PDEVICE *physDev = get_x11drv_dev( dev );
GLXDrawable drawable;
Wine_GLContext *ctx = NtCurrentTeb()->glContext;
@ -3927,8 +3944,8 @@ Drawable create_glxpixmap(Display *display, XVisualInfo *vis, Pixmap parent)
/***********************************************************************
* ChoosePixelFormat (X11DRV.@)
*/
int CDECL X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev,
const PIXELFORMATDESCRIPTOR *ppfd) {
int CDECL X11DRV_ChoosePixelFormat(PHYSDEV dev, const PIXELFORMATDESCRIPTOR *ppfd)
{
opengl_error();
return 0;
}
@ -3936,10 +3953,9 @@ int CDECL X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev,
/***********************************************************************
* DescribePixelFormat (X11DRV.@)
*/
int CDECL X11DRV_DescribePixelFormat(X11DRV_PDEVICE *physDev,
int iPixelFormat,
UINT nBytes,
PIXELFORMATDESCRIPTOR *ppfd) {
int CDECL X11DRV_DescribePixelFormat(PHYSDEV dev, int iPixelFormat,
UINT nBytes, PIXELFORMATDESCRIPTOR *ppfd)
{
opengl_error();
return 0;
}
@ -3947,7 +3963,8 @@ int CDECL X11DRV_DescribePixelFormat(X11DRV_PDEVICE *physDev,
/***********************************************************************
* GetPixelFormat (X11DRV.@)
*/
int CDECL X11DRV_GetPixelFormat(X11DRV_PDEVICE *physDev) {
int CDECL X11DRV_GetPixelFormat(PHYSDEV dev)
{
opengl_error();
return 0;
}
@ -3955,9 +3972,8 @@ int CDECL X11DRV_GetPixelFormat(X11DRV_PDEVICE *physDev) {
/***********************************************************************
* SetPixelFormat (X11DRV.@)
*/
BOOL CDECL X11DRV_SetPixelFormat(X11DRV_PDEVICE *physDev,
int iPixelFormat,
const PIXELFORMATDESCRIPTOR *ppfd) {
BOOL CDECL X11DRV_SetPixelFormat(PHYSDEV dev, int iPixelFormat, const PIXELFORMATDESCRIPTOR *ppfd)
{
opengl_error();
return FALSE;
}
@ -3965,7 +3981,8 @@ BOOL CDECL X11DRV_SetPixelFormat(X11DRV_PDEVICE *physDev,
/***********************************************************************
* SwapBuffers (X11DRV.@)
*/
BOOL CDECL X11DRV_SwapBuffers(X11DRV_PDEVICE *physDev) {
BOOL CDECL X11DRV_SwapBuffers(PHYSDEV dev)
{
opengl_error();
return FALSE;
}
@ -3985,7 +4002,8 @@ BOOL CDECL X11DRV_wglCopyContext(HGLRC hglrcSrc, HGLRC hglrcDst, UINT mask) {
*
* For OpenGL32 wglCreateContext.
*/
HGLRC CDECL X11DRV_wglCreateContext(X11DRV_PDEVICE *physDev) {
HGLRC CDECL X11DRV_wglCreateContext(PHYSDEV dev)
{
opengl_error();
return NULL;
}
@ -3995,7 +4013,7 @@ HGLRC CDECL X11DRV_wglCreateContext(X11DRV_PDEVICE *physDev) {
*
* WGL_ARB_create_context: wglCreateContextAttribsARB
*/
HGLRC CDECL X11DRV_wglCreateContextAttribsARB(X11DRV_PDEVICE *physDev, HGLRC hShareContext, const int* attribList)
HGLRC CDECL X11DRV_wglCreateContextAttribsARB(PHYSDEV dev, HGLRC hShareContext, const int* attribList)
{
opengl_error();
return NULL;
@ -4021,13 +4039,14 @@ PROC CDECL X11DRV_wglGetProcAddress(LPCSTR lpszProc) {
return NULL;
}
HDC CDECL X11DRV_wglGetPbufferDCARB(X11DRV_PDEVICE *hDevice, void *hPbuffer)
HDC CDECL X11DRV_wglGetPbufferDCARB(PHYSDEV dev, void *hPbuffer)
{
opengl_error();
return NULL;
}
BOOL CDECL X11DRV_wglMakeContextCurrentARB(X11DRV_PDEVICE* hDrawDev, X11DRV_PDEVICE* hReadDev, HGLRC hglrc) {
BOOL CDECL X11DRV_wglMakeContextCurrentARB(PHYSDEV draw_dev, PHYSDEV read_dev, HGLRC hglrc)
{
opengl_error();
return FALSE;
}
@ -4037,7 +4056,8 @@ BOOL CDECL X11DRV_wglMakeContextCurrentARB(X11DRV_PDEVICE* hDrawDev, X11DRV_PDEV
*
* For OpenGL32 wglMakeCurrent.
*/
BOOL CDECL X11DRV_wglMakeCurrent(X11DRV_PDEVICE *physDev, HGLRC hglrc) {
BOOL CDECL X11DRV_wglMakeCurrent(PHYSDEV dev, HGLRC hglrc)
{
opengl_error();
return FALSE;
}
@ -4057,7 +4077,7 @@ BOOL CDECL X11DRV_wglShareLists(HGLRC hglrc1, HGLRC hglrc2) {
*
* For OpenGL32 wglUseFontBitmapsA.
*/
BOOL CDECL X11DRV_wglUseFontBitmapsA(X11DRV_PDEVICE *physDev, DWORD first, DWORD count, DWORD listBase)
BOOL CDECL X11DRV_wglUseFontBitmapsA(PHYSDEV dev, DWORD first, DWORD count, DWORD listBase)
{
opengl_error();
return FALSE;
@ -4068,7 +4088,7 @@ BOOL CDECL X11DRV_wglUseFontBitmapsA(X11DRV_PDEVICE *physDev, DWORD first, DWORD
*
* For OpenGL32 wglUseFontBitmapsW.
*/
BOOL CDECL X11DRV_wglUseFontBitmapsW(X11DRV_PDEVICE *physDev, DWORD first, DWORD count, DWORD listBase)
BOOL CDECL X11DRV_wglUseFontBitmapsW(PHYSDEV dev, DWORD first, DWORD count, DWORD listBase)
{
opengl_error();
return FALSE;
@ -4080,7 +4100,7 @@ BOOL CDECL X11DRV_wglUseFontBitmapsW(X11DRV_PDEVICE *physDev, DWORD first, DWORD
* WGL_WINE_pixel_format_passthrough: wglSetPixelFormatWINE
* This is a WINE-specific wglSetPixelFormat which can set the pixel format multiple times.
*/
BOOL CDECL X11DRV_wglSetPixelFormatWINE(X11DRV_PDEVICE *physDev, int iPixelFormat, const PIXELFORMATDESCRIPTOR *ppfd)
BOOL CDECL X11DRV_wglSetPixelFormatWINE(PHYSDEV dev, int iPixelFormat, const PIXELFORMATDESCRIPTOR *ppfd)
{
opengl_error();
return FALSE;

View File

@ -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)

View File

@ -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 );

View File

@ -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);

View File

@ -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 */

View File

@ -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 )

View File

@ -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 );
}

View File

@ -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);