Added GetDCOrgEx in graphics device interface and removed X11 code
from dc.c.
This commit is contained in:
parent
f8fe366b37
commit
07e4213642
|
@ -53,6 +53,7 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
|
|||
EMFDRV_FlattenPath, /* pFlattenPath */
|
||||
EMFDRV_FrameRgn, /* pFrameRgn */
|
||||
NULL, /* pGetCharWidth */
|
||||
NULL, /* pGetDCOrgEx */
|
||||
NULL, /* no implementation */ /* pGetPixel */
|
||||
NULL, /* pGetTextExtentPoint */
|
||||
NULL, /* pGetTextMetrics */
|
||||
|
|
|
@ -51,6 +51,7 @@ static const DC_FUNCTIONS MFDRV_Funcs =
|
|||
MFDRV_FlattenPath, /* pFlattenPath */
|
||||
MFDRV_FrameRgn, /* pFrameRgn */
|
||||
NULL, /* pGetCharWidth */
|
||||
NULL, /* pGetDCOrgEx */
|
||||
NULL, /* no implementation */ /* pGetPixel */
|
||||
NULL, /* pGetTextExtentPoint */
|
||||
NULL, /* pGetTextMetrics */
|
||||
|
|
|
@ -55,6 +55,7 @@ static const DC_FUNCTIONS PSDRV_Funcs =
|
|||
NULL, /* pFlattenPath */
|
||||
NULL, /* pFrameRgn */
|
||||
PSDRV_GetCharWidth, /* pGetCharWidth */
|
||||
NULL, /* pGetDCOrgEx */
|
||||
NULL, /* pGetPixel */
|
||||
PSDRV_GetTextExtentPoint, /* pGetTextExtentPoint */
|
||||
PSDRV_GetTextMetrics, /* pGetTextMetrics */
|
||||
|
|
|
@ -49,6 +49,7 @@ static const DC_FUNCTIONS TTYDRV_DC_Driver =
|
|||
NULL, /* pFlattenPath */
|
||||
NULL, /* pFrameRgn */
|
||||
TTYDRV_DC_GetCharWidth, /* pGetCharWidth */
|
||||
NULL, /* pGetDCOrgEx */
|
||||
TTYDRV_DC_GetPixel, /* pGetPixel */
|
||||
TTYDRV_DC_GetTextExtentPoint, /* pGetTextExtentPoint */
|
||||
TTYDRV_DC_GetTextMetrics, /* pGetTextMetrics */
|
||||
|
|
|
@ -75,6 +75,7 @@ static const DC_FUNCTIONS WIN16DRV_Funcs =
|
|||
NULL, /* pFlattenPath */
|
||||
NULL, /* pFrameRgn */
|
||||
WIN16DRV_GetCharWidth, /* pGetCharWidth */
|
||||
NULL, /* pGetDCOrgEx */
|
||||
NULL, /* pGetPixel */
|
||||
WIN16DRV_GetTextExtentPoint, /* pGetTextExtentPoint */
|
||||
WIN16DRV_GetTextMetrics, /* pGetTextMetrics */
|
||||
|
|
|
@ -1337,4 +1337,23 @@ X11DRV_SetTextColor( DC *dc, COLORREF color )
|
|||
return oldColor;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* X11DRV_GetDCOrgEx
|
||||
*/
|
||||
BOOL X11DRV_GetDCOrgEx( DC *dc, LPPOINT lpp )
|
||||
{
|
||||
if (!(dc->w.flags & DC_MEMORY))
|
||||
{
|
||||
X11DRV_PDEVICE *physDev = (X11DRV_PDEVICE *) dc->physDev;
|
||||
Window root;
|
||||
int w, h, border, depth;
|
||||
|
||||
/* FIXME: this is not correct for managed windows */
|
||||
TSXGetGeometry( display, physDev->drawable, &root,
|
||||
(int*)&lpp->x, (int*)&lpp->y, &w, &h, &border, &depth );
|
||||
}
|
||||
else lpp->x = lpp->y = 0;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#endif /* !defined(X_DISPLAY_MISSING) */
|
||||
|
|
|
@ -64,6 +64,7 @@ static const DC_FUNCTIONS X11DRV_Funcs =
|
|||
NULL, /* pFlattenPath */
|
||||
NULL, /* pFrameRgn */
|
||||
X11DRV_GetCharWidth, /* pGetCharWidth */
|
||||
X11DRV_GetDCOrgEx, /* pGetDCOrgEx */
|
||||
X11DRV_GetPixel, /* pGetPixel */
|
||||
X11DRV_GetTextExtentPoint, /* pGetTextExtentPoint */
|
||||
X11DRV_GetTextMetrics, /* pGetTextMetrics */
|
||||
|
|
|
@ -204,6 +204,7 @@ typedef struct tagDC_FUNCS
|
|||
BOOL (*pFlattenPath)(DC*);
|
||||
BOOL (*pFrameRgn)(DC*,HRGN,HBRUSH,INT,INT);
|
||||
BOOL (*pGetCharWidth)(DC*,UINT,UINT,LPINT);
|
||||
BOOL (*pGetDCOrgEx)(DC*,LPPOINT);
|
||||
COLORREF (*pGetPixel)(DC*,INT,INT);
|
||||
BOOL (*pGetTextExtentPoint)(DC*,LPCWSTR,INT,LPSIZE);
|
||||
BOOL (*pGetTextMetrics)(DC*,TEXTMETRICA*);
|
||||
|
|
|
@ -91,6 +91,7 @@ extern BOOL X11DRV_EnumDeviceFonts( struct tagDC *dc, LPLOGFONT16 plf,
|
|||
DEVICEFONTENUMPROC dfeproc, LPARAM lp );
|
||||
extern BOOL X11DRV_GetCharWidth( struct tagDC *dc, UINT firstChar,
|
||||
UINT lastChar, LPINT buffer );
|
||||
extern BOOL X11DRV_GetDCOrgEx( struct tagDC *dc, LPPOINT lpp );
|
||||
extern BOOL X11DRV_GetTextExtentPoint( struct tagDC *dc, LPCWSTR str,
|
||||
INT count, LPSIZE size );
|
||||
extern BOOL X11DRV_GetTextMetrics(struct tagDC *dc, TEXTMETRICA *metrics);
|
||||
|
|
31
objects/dc.c
31
objects/dc.c
|
@ -7,11 +7,6 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#ifndef X_DISPLAY_MISSING
|
||||
#include "ts_xlib.h"
|
||||
#include "x11drv.h"
|
||||
#endif /* !defined(X_DISPLAY_MISSING) */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "dc.h"
|
||||
|
@ -25,7 +20,7 @@
|
|||
#include "wingdi.h"
|
||||
#include "wine/winuser16.h"
|
||||
|
||||
DEFAULT_DEBUG_CHANNEL(dc)
|
||||
DEFAULT_DEBUG_CHANNEL(dc);
|
||||
|
||||
/***********************************************************************
|
||||
* DC_Init_DC_INFO
|
||||
|
@ -892,24 +887,10 @@ BOOL WINAPI GetDCOrgEx( HDC hDC, LPPOINT lpp )
|
|||
if (!lpp) return FALSE;
|
||||
if (!(dc = (DC *) GDI_GetObjPtr( hDC, DC_MAGIC ))) return FALSE;
|
||||
|
||||
#ifndef X_DISPLAY_MISSING
|
||||
if (!(dc->w.flags & DC_MEMORY))
|
||||
{
|
||||
X11DRV_PDEVICE *physDev;
|
||||
Window root;
|
||||
int w, h, border, depth;
|
||||
|
||||
physDev = (X11DRV_PDEVICE *) dc->physDev;
|
||||
|
||||
/* FIXME: this is not correct for managed windows */
|
||||
TSXGetGeometry( display, physDev->drawable, &root,
|
||||
(int*)&lpp->x, (int*)&lpp->y, &w, &h, &border, &depth );
|
||||
}
|
||||
else
|
||||
#endif /* !defined(X_DISPLAY_MISSING) */
|
||||
lpp->x = lpp->y = 0;
|
||||
|
||||
lpp->x += dc->w.DCOrgX; lpp->y += dc->w.DCOrgY;
|
||||
lpp->x = lpp->y = 0;
|
||||
if (dc->funcs->pGetDCOrgEx) dc->funcs->pGetDCOrgEx( dc, lpp );
|
||||
lpp->x += dc->w.DCOrgX;
|
||||
lpp->y += dc->w.DCOrgY;
|
||||
GDI_HEAP_UNLOCK( hDC );
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1316,7 +1297,7 @@ BOOL WINAPI DeleteColorSpace( HCOLORSPACE hColorSpace )
|
|||
{
|
||||
FIXME( "stub\n" );
|
||||
|
||||
return True;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
Loading…
Reference in New Issue