Removed more TSX functions.
This commit is contained in:
parent
720af28ea4
commit
8a7fbf542d
|
@ -4,40 +4,19 @@
|
||||||
# To add a new call, put it on this list and run tools/make_X11wrappers.
|
# To add a new call, put it on this list and run tools/make_X11wrappers.
|
||||||
# Also read the comments at the top of tools/make_X11wrappers.
|
# Also read the comments at the top of tools/make_X11wrappers.
|
||||||
#
|
#
|
||||||
XChangeGC
|
|
||||||
XChangeProperty
|
XChangeProperty
|
||||||
XDrawArc
|
|
||||||
XDrawLine
|
|
||||||
XDrawLines
|
|
||||||
XDrawString16
|
|
||||||
XDrawText16
|
|
||||||
XFillArc
|
|
||||||
XFillRectangle
|
|
||||||
XFree
|
XFree
|
||||||
XFreeFont
|
XFreeFont
|
||||||
XFreePixmap
|
|
||||||
XGetAtomName
|
XGetAtomName
|
||||||
XGetFontProperty
|
XGetFontProperty
|
||||||
XGetGeometry
|
|
||||||
XGetSelectionOwner
|
XGetSelectionOwner
|
||||||
XGetWindowProperty
|
XGetWindowProperty
|
||||||
XInternAtom
|
|
||||||
XKeycodeToKeysym
|
XKeycodeToKeysym
|
||||||
XKeysymToKeycode
|
XKeysymToKeycode
|
||||||
XKeysymToString
|
XKeysymToString
|
||||||
XMapWindow
|
XMapWindow
|
||||||
XQueryPointer
|
XQueryPointer
|
||||||
XQueryTree
|
XQueryTree
|
||||||
XSetArcMode
|
|
||||||
XSetClipRectangles
|
|
||||||
XSetDashes
|
|
||||||
XSetForeground
|
|
||||||
XSetFunction
|
|
||||||
XSetLineAttributes
|
|
||||||
XSetSelectionOwner
|
XSetSelectionOwner
|
||||||
XSetSubwindowMode
|
|
||||||
XStoreColor
|
|
||||||
XSync
|
XSync
|
||||||
XTextExtents16
|
|
||||||
XTextWidth16
|
|
||||||
XUnmapWindow
|
XUnmapWindow
|
||||||
|
|
|
@ -31,15 +31,6 @@ char * TSXKeysymToString(KeySym a0)
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
Atom TSXInternAtom(Display* a0, const char* a1, int a2)
|
|
||||||
{
|
|
||||||
Atom r;
|
|
||||||
wine_tsx11_lock();
|
|
||||||
r = XInternAtom(a0, a1, a2);
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
Window TSXGetSelectionOwner(Display* a0, Atom a1)
|
Window TSXGetSelectionOwner(Display* a0, Atom a1)
|
||||||
{
|
{
|
||||||
Window r;
|
Window r;
|
||||||
|
@ -58,15 +49,6 @@ KeySym TSXKeycodeToKeysym(Display* a0, unsigned int a1, int a2)
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TSXChangeGC(Display* a0, GC a1, unsigned long a2, XGCValues* a3)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
wine_tsx11_lock();
|
|
||||||
r = XChangeGC(a0, a1, a2, a3);
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
int TSXChangeProperty(Display* a0, Window a1, Atom a2, Atom a3, int a4, int a5, const unsigned char* a6, int a7)
|
int TSXChangeProperty(Display* a0, Window a1, Atom a2, Atom a3, int a4, int a5, const unsigned char* a6, int a7)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
@ -76,69 +58,6 @@ int TSXChangeProperty(Display* a0, Window a1, Atom a2, Atom a3, int a4, int a5,
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TSXDrawArc(Display* a0, Drawable a1, GC a2, int a3, int a4, unsigned int a5, unsigned int a6, int a7, int a8)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
wine_tsx11_lock();
|
|
||||||
r = XDrawArc(a0, a1, a2, a3, a4, a5, a6, a7, a8);
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
int TSXDrawLine(Display* a0, Drawable a1, GC a2, int a3, int a4, int a5, int a6)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
wine_tsx11_lock();
|
|
||||||
r = XDrawLine(a0, a1, a2, a3, a4, a5, a6);
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
int TSXDrawLines(Display* a0, Drawable a1, GC a2, XPoint* a3, int a4, int a5)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
wine_tsx11_lock();
|
|
||||||
r = XDrawLines(a0, a1, a2, a3, a4, a5);
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
int TSXDrawString16(Display* a0, Drawable a1, GC a2, int a3, int a4, const XChar2b* a5, int a6)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
wine_tsx11_lock();
|
|
||||||
r = XDrawString16(a0, a1, a2, a3, a4, a5, a6);
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
int TSXDrawText16(Display* a0, Drawable a1, GC a2, int a3, int a4, XTextItem16* a5, int a6)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
wine_tsx11_lock();
|
|
||||||
r = XDrawText16(a0, a1, a2, a3, a4, a5, a6);
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
int TSXFillArc(Display* a0, Drawable a1, GC a2, int a3, int a4, unsigned int a5, unsigned int a6, int a7, int a8)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
wine_tsx11_lock();
|
|
||||||
r = XFillArc(a0, a1, a2, a3, a4, a5, a6, a7, a8);
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
int TSXFillRectangle(Display* a0, Drawable a1, GC a2, int a3, int a4, unsigned int a5, unsigned int a6)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
wine_tsx11_lock();
|
|
||||||
r = XFillRectangle(a0, a1, a2, a3, a4, a5, a6);
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
int TSXFree(void* a0)
|
int TSXFree(void* a0)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
@ -157,15 +76,6 @@ int TSXFreeFont(Display* a0, XFontStruct* a1)
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TSXFreePixmap(Display* a0, Pixmap a1)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
wine_tsx11_lock();
|
|
||||||
r = XFreePixmap(a0, a1);
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
int TSXGetFontProperty(XFontStruct* a0, Atom a1, unsigned long* a2)
|
int TSXGetFontProperty(XFontStruct* a0, Atom a1, unsigned long* a2)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
@ -175,15 +85,6 @@ int TSXGetFontProperty(XFontStruct* a0, Atom a1, unsigned long* a2)
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TSXGetGeometry(Display* a0, Drawable a1, Window* a2, int* a3, int* a4, unsigned int* a5, unsigned int* a6, unsigned int* a7, unsigned int* a8)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
wine_tsx11_lock();
|
|
||||||
r = XGetGeometry(a0, a1, a2, a3, a4, a5, a6, a7, a8);
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
int TSXGetWindowProperty(Display* a0, Window a1, Atom a2, long a3, long a4, int a5, Atom a6, Atom* a7, int* a8, unsigned long* a9, unsigned long* a10, unsigned char** a11)
|
int TSXGetWindowProperty(Display* a0, Window a1, Atom a2, long a3, long a4, int a5, Atom a6, Atom* a7, int* a8, unsigned long* a9, unsigned long* a10, unsigned char** a11)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
@ -229,60 +130,6 @@ int TSXQueryTree(Display* a0, Window a1, Window* a2, Window* a3, Window** a4, u
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TSXSetArcMode(Display* a0, GC a1, int a2)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
wine_tsx11_lock();
|
|
||||||
r = XSetArcMode(a0, a1, a2);
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
int TSXSetClipRectangles(Display* a0, GC a1, int a2, int a3, XRectangle* a4, int a5, int a6)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
wine_tsx11_lock();
|
|
||||||
r = XSetClipRectangles(a0, a1, a2, a3, a4, a5, a6);
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
int TSXSetDashes(Display* a0, GC a1, int a2, const char* a3, int a4)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
wine_tsx11_lock();
|
|
||||||
r = XSetDashes(a0, a1, a2, a3, a4);
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
int TSXSetForeground(Display* a0, GC a1, unsigned long a2)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
wine_tsx11_lock();
|
|
||||||
r = XSetForeground(a0, a1, a2);
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
int TSXSetFunction(Display* a0, GC a1, int a2)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
wine_tsx11_lock();
|
|
||||||
r = XSetFunction(a0, a1, a2);
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
int TSXSetLineAttributes(Display* a0, GC a1, unsigned int a2, int a3, int a4, int a5)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
wine_tsx11_lock();
|
|
||||||
r = XSetLineAttributes(a0, a1, a2, a3, a4, a5);
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
int TSXSetSelectionOwner(Display* a0, Atom a1, Window a2, Time a3)
|
int TSXSetSelectionOwner(Display* a0, Atom a1, Window a2, Time a3)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
@ -292,24 +139,6 @@ int TSXSetSelectionOwner(Display* a0, Atom a1, Window a2, Time a3)
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TSXSetSubwindowMode(Display* a0, GC a1, int a2)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
wine_tsx11_lock();
|
|
||||||
r = XSetSubwindowMode(a0, a1, a2);
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
int TSXStoreColor(Display* a0, Colormap a1, XColor* a2)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
wine_tsx11_lock();
|
|
||||||
r = XStoreColor(a0, a1, a2);
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
int TSXSync(Display* a0, int a1)
|
int TSXSync(Display* a0, int a1)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
@ -319,24 +148,6 @@ int TSXSync(Display* a0, int a1)
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TSXTextExtents16(XFontStruct* a0, const XChar2b* a1, int a2, int* a3, int* a4, int* a5, XCharStruct* a6)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
wine_tsx11_lock();
|
|
||||||
r = XTextExtents16(a0, a1, a2, a3, a4, a5, a6);
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
int TSXTextWidth16(XFontStruct* a0, const XChar2b* a1, int a2)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
wine_tsx11_lock();
|
|
||||||
r = XTextWidth16(a0, a1, a2);
|
|
||||||
wine_tsx11_unlock();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
int TSXUnmapWindow(Display* a0, Window a1)
|
int TSXUnmapWindow(Display* a0, Window a1)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
|
|
@ -21,40 +21,19 @@ extern void wine_tsx11_unlock(void);
|
||||||
|
|
||||||
extern char * TSXGetAtomName(Display*, Atom);
|
extern char * TSXGetAtomName(Display*, Atom);
|
||||||
extern char * TSXKeysymToString(KeySym);
|
extern char * TSXKeysymToString(KeySym);
|
||||||
extern Atom TSXInternAtom(Display*, const char*, int);
|
|
||||||
extern Window TSXGetSelectionOwner(Display*, Atom);
|
extern Window TSXGetSelectionOwner(Display*, Atom);
|
||||||
extern KeySym TSXKeycodeToKeysym(Display*, unsigned int, int);
|
extern KeySym TSXKeycodeToKeysym(Display*, unsigned int, int);
|
||||||
extern int TSXChangeGC(Display*, GC, unsigned long, XGCValues*);
|
|
||||||
extern int TSXChangeProperty(Display*, Window, Atom, Atom, int, int, const unsigned char*, int);
|
extern int TSXChangeProperty(Display*, Window, Atom, Atom, int, int, const unsigned char*, int);
|
||||||
extern int TSXDrawArc(Display*, Drawable, GC, int, int, unsigned int, unsigned int, int, int);
|
|
||||||
extern int TSXDrawLine(Display*, Drawable, GC, int, int, int, int);
|
|
||||||
extern int TSXDrawLines(Display*, Drawable, GC, XPoint*, int, int);
|
|
||||||
extern int TSXDrawString16(Display*, Drawable, GC, int, int, const XChar2b*, int);
|
|
||||||
extern int TSXDrawText16(Display*, Drawable, GC, int, int, XTextItem16*, int);
|
|
||||||
extern int TSXFillArc(Display*, Drawable, GC, int, int, unsigned int, unsigned int, int, int);
|
|
||||||
extern int TSXFillRectangle(Display*, Drawable, GC, int, int, unsigned int, unsigned int);
|
|
||||||
extern int TSXFree(void*);
|
extern int TSXFree(void*);
|
||||||
extern int TSXFreeFont(Display*, XFontStruct*);
|
extern int TSXFreeFont(Display*, XFontStruct*);
|
||||||
extern int TSXFreePixmap(Display*, Pixmap);
|
|
||||||
extern int TSXGetFontProperty(XFontStruct*, Atom, unsigned long*);
|
extern int TSXGetFontProperty(XFontStruct*, Atom, unsigned long*);
|
||||||
extern int TSXGetGeometry(Display*, Drawable, Window*, int*, int*, unsigned int*, unsigned int*, unsigned int*, unsigned int*);
|
|
||||||
extern int TSXGetWindowProperty(Display*, Window, Atom, long, long, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**);
|
extern int TSXGetWindowProperty(Display*, Window, Atom, long, long, int, Atom, Atom*, int*, unsigned long*, unsigned long*, unsigned char**);
|
||||||
extern KeyCode TSXKeysymToKeycode(Display*, KeySym);
|
extern KeyCode TSXKeysymToKeycode(Display*, KeySym);
|
||||||
extern int TSXMapWindow(Display*, Window);
|
extern int TSXMapWindow(Display*, Window);
|
||||||
extern int TSXQueryPointer(Display*, Window, Window*, Window*, int*, int*, int*, int*, unsigned int*);
|
extern int TSXQueryPointer(Display*, Window, Window*, Window*, int*, int*, int*, int*, unsigned int*);
|
||||||
extern int TSXQueryTree(Display*, Window, Window*, Window*, Window**, unsigned int*);
|
extern int TSXQueryTree(Display*, Window, Window*, Window*, Window**, unsigned int*);
|
||||||
extern int TSXSetArcMode(Display*, GC, int);
|
|
||||||
extern int TSXSetClipRectangles(Display*, GC, int, int, XRectangle*, int, int);
|
|
||||||
extern int TSXSetDashes(Display*, GC, int, const char*, int);
|
|
||||||
extern int TSXSetForeground(Display*, GC, unsigned long);
|
|
||||||
extern int TSXSetFunction(Display*, GC, int);
|
|
||||||
extern int TSXSetLineAttributes(Display*, GC, unsigned int, int, int, int);
|
|
||||||
extern int TSXSetSelectionOwner(Display*, Atom, Window, Time);
|
extern int TSXSetSelectionOwner(Display*, Atom, Window, Time);
|
||||||
extern int TSXSetSubwindowMode(Display*, GC, int);
|
|
||||||
extern int TSXStoreColor(Display*, Colormap, XColor*);
|
|
||||||
extern int TSXSync(Display*, int);
|
extern int TSXSync(Display*, int);
|
||||||
extern int TSXTextExtents16(XFontStruct*, const XChar2b*, int, int*, int*, int*, XCharStruct*);
|
|
||||||
extern int TSXTextWidth16(XFontStruct*, const XChar2b*, int);
|
|
||||||
extern int TSXUnmapWindow(Display*, Window);
|
extern int TSXUnmapWindow(Display*, Window);
|
||||||
|
|
||||||
#endif /* defined(HAVE_X11_XLIB_H) */
|
#endif /* defined(HAVE_X11_XLIB_H) */
|
||||||
|
|
|
@ -1004,8 +1004,9 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
|
||||||
xgcval.function = GXcopy;
|
xgcval.function = GXcopy;
|
||||||
xgcval.background = physDev->backgroundPixel;
|
xgcval.background = physDev->backgroundPixel;
|
||||||
xgcval.fill_style = FillSolid;
|
xgcval.fill_style = FillSolid;
|
||||||
TSXChangeGC( gdi_display, physDev->gc,
|
wine_tsx11_lock();
|
||||||
GCFunction | GCBackground | GCFillStyle, &xgcval );
|
XChangeGC( gdi_display, physDev->gc, GCFunction | GCBackground | GCFillStyle, &xgcval );
|
||||||
|
wine_tsx11_unlock();
|
||||||
|
|
||||||
X11DRV_LockDIBSection( physDev, DIB_Status_GdiMod, FALSE );
|
X11DRV_LockDIBSection( physDev, DIB_Status_GdiMod, FALSE );
|
||||||
|
|
||||||
|
@ -1023,10 +1024,12 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
|
||||||
}
|
}
|
||||||
|
|
||||||
if(flags & ETO_OPAQUE) {
|
if(flags & ETO_OPAQUE) {
|
||||||
TSXSetForeground( gdi_display, physDev->gc, backgroundPixel );
|
wine_tsx11_lock();
|
||||||
TSXFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
XSetForeground( gdi_display, physDev->gc, backgroundPixel );
|
||||||
physDev->org.x + rc.left, physDev->org.y + rc.top,
|
XFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
||||||
rc.right - rc.left, rc.bottom - rc.top );
|
physDev->org.x + rc.left, physDev->org.y + rc.top,
|
||||||
|
rc.right - rc.left, rc.bottom - rc.top );
|
||||||
|
wine_tsx11_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(count == 0) {
|
if(count == 0) {
|
||||||
|
@ -1159,10 +1162,12 @@ BOOL X11DRV_XRender_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flag
|
||||||
if(!((flags & ETO_CLIPPED) && (flags & ETO_OPAQUE))) {
|
if(!((flags & ETO_CLIPPED) && (flags & ETO_OPAQUE))) {
|
||||||
if(!(flags & ETO_OPAQUE) || x < rc.left || x + width >= rc.right ||
|
if(!(flags & ETO_OPAQUE) || x < rc.left || x + width >= rc.right ||
|
||||||
y - tm.tmAscent < rc.top || y + tm.tmDescent >= rc.bottom) {
|
y - tm.tmAscent < rc.top || y + tm.tmDescent >= rc.bottom) {
|
||||||
TSXSetForeground( gdi_display, physDev->gc, backgroundPixel );
|
wine_tsx11_lock();
|
||||||
TSXFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
XSetForeground( gdi_display, physDev->gc, backgroundPixel );
|
||||||
physDev->org.x + x, physDev->org.y + y - tm.tmAscent,
|
XFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
||||||
width, tm.tmAscent + tm.tmDescent );
|
physDev->org.x + x, physDev->org.y + y - tm.tmAscent,
|
||||||
|
width, tm.tmAscent + tm.tmDescent );
|
||||||
|
wine_tsx11_unlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -425,8 +425,10 @@ BOOL X11DRV_DeleteBitmap( HBITMAP hbitmap )
|
||||||
BITMAPOBJ *bmp = (BITMAPOBJ *) GDI_GetObjPtr( hbitmap, BITMAP_MAGIC );
|
BITMAPOBJ *bmp = (BITMAPOBJ *) GDI_GetObjPtr( hbitmap, BITMAP_MAGIC );
|
||||||
if (bmp)
|
if (bmp)
|
||||||
{
|
{
|
||||||
if (bmp->physBitmap) TSXFreePixmap( gdi_display, (Pixmap)bmp->physBitmap );
|
wine_tsx11_lock();
|
||||||
|
if (bmp->physBitmap) XFreePixmap( gdi_display, (Pixmap)bmp->physBitmap );
|
||||||
bmp->physBitmap = NULL;
|
bmp->physBitmap = NULL;
|
||||||
|
wine_tsx11_unlock();
|
||||||
if (bmp->dib) X11DRV_DIB_DeleteDIBSection( bmp );
|
if (bmp->dib) X11DRV_DIB_DeleteDIBSection( bmp );
|
||||||
GDI_ReleaseObj( hbitmap );
|
GDI_ReleaseObj( hbitmap );
|
||||||
}
|
}
|
||||||
|
@ -450,9 +452,11 @@ HBITMAP X11DRV_BITMAP_CreateBitmapHeaderFromPixmap(Pixmap pixmap)
|
||||||
unsigned int depth, width, height;
|
unsigned int depth, width, height;
|
||||||
|
|
||||||
/* Get the Pixmap dimensions and bit depth */
|
/* Get the Pixmap dimensions and bit depth */
|
||||||
if ( 0 == TSXGetGeometry(gdi_display, pixmap, &root, &x, &y, &width, &height,
|
wine_tsx11_lock();
|
||||||
&border_width, &depth) )
|
if (!XGetGeometry(gdi_display, pixmap, &root, &x, &y, &width, &height,
|
||||||
goto END;
|
&border_width, &depth)) depth = 0;
|
||||||
|
wine_tsx11_unlock();
|
||||||
|
if (!depth) goto END;
|
||||||
|
|
||||||
TRACE("\tPixmap properties: width=%d, height=%d, depth=%d\n",
|
TRACE("\tPixmap properties: width=%d, height=%d, depth=%d\n",
|
||||||
width, height, depth);
|
width, height, depth);
|
||||||
|
|
|
@ -235,8 +235,10 @@ HBRUSH X11DRV_SelectBrush( X11DRV_PDEVICE *physDev, HBRUSH hbrush )
|
||||||
|
|
||||||
if (physDev->brush.pixmap)
|
if (physDev->brush.pixmap)
|
||||||
{
|
{
|
||||||
TSXFreePixmap( gdi_display, physDev->brush.pixmap );
|
wine_tsx11_lock();
|
||||||
physDev->brush.pixmap = 0;
|
XFreePixmap( gdi_display, physDev->brush.pixmap );
|
||||||
|
wine_tsx11_unlock();
|
||||||
|
physDev->brush.pixmap = 0;
|
||||||
}
|
}
|
||||||
physDev->brush.style = logbrush.lbStyle;
|
physDev->brush.style = logbrush.lbStyle;
|
||||||
if (hbrush == GetStockObject( DC_BRUSH ))
|
if (hbrush == GetStockObject( DC_BRUSH ))
|
||||||
|
|
|
@ -117,8 +117,10 @@ void X11DRV_SetDeviceClipping( X11DRV_PDEVICE *physDev, HRGN hrgn )
|
||||||
RGNDATA *data;
|
RGNDATA *data;
|
||||||
|
|
||||||
if (!(data = X11DRV_GetRegionData( hrgn, 0 ))) return;
|
if (!(data = X11DRV_GetRegionData( hrgn, 0 ))) return;
|
||||||
TSXSetClipRectangles( gdi_display, physDev->gc, physDev->org.x, physDev->org.y,
|
wine_tsx11_lock();
|
||||||
(XRectangle *)data->Buffer, data->rdh.nCount, YXBanded );
|
XSetClipRectangles( gdi_display, physDev->gc, physDev->org.x, physDev->org.y,
|
||||||
|
(XRectangle *)data->Buffer, data->rdh.nCount, YXBanded );
|
||||||
|
wine_tsx11_unlock();
|
||||||
HeapFree( GetProcessHeap(), 0, data );
|
HeapFree( GetProcessHeap(), 0, data );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,7 +144,9 @@ void X11DRV_SetDrawable( HDC hdc, Drawable drawable, int mode, const POINT *org,
|
||||||
physDev->org = *org;
|
physDev->org = *org;
|
||||||
physDev->drawable = drawable;
|
physDev->drawable = drawable;
|
||||||
physDev->drawable_org = *drawable_org;
|
physDev->drawable_org = *drawable_org;
|
||||||
TSXSetSubwindowMode( gdi_display, physDev->gc, mode );
|
wine_tsx11_lock();
|
||||||
|
XSetSubwindowMode( gdi_display, physDev->gc, mode );
|
||||||
|
wine_tsx11_unlock();
|
||||||
GDI_ReleaseObj( hdc );
|
GDI_ReleaseObj( hdc );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -409,19 +409,27 @@ static void X11DRV_DrawString_normal( fontObject* pfo, Display* pdisp,
|
||||||
Drawable d, GC gc, int x, int y,
|
Drawable d, GC gc, int x, int y,
|
||||||
XChar2b* pstr, int count )
|
XChar2b* pstr, int count )
|
||||||
{
|
{
|
||||||
TSXDrawString16( pdisp, d, gc, x, y, pstr, count );
|
wine_tsx11_lock();
|
||||||
|
XDrawString16( pdisp, d, gc, x, y, pstr, count );
|
||||||
|
wine_tsx11_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
static int X11DRV_TextWidth_normal( fontObject* pfo, XChar2b* pstr, int count )
|
static int X11DRV_TextWidth_normal( fontObject* pfo, XChar2b* pstr, int count )
|
||||||
{
|
{
|
||||||
return TSXTextWidth16( pfo->fs, pstr, count );
|
int ret;
|
||||||
|
wine_tsx11_lock();
|
||||||
|
ret = XTextWidth16( pfo->fs, pstr, count );
|
||||||
|
wine_tsx11_unlock();
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void X11DRV_DrawText_normal( fontObject* pfo, Display* pdisp, Drawable d,
|
static void X11DRV_DrawText_normal( fontObject* pfo, Display* pdisp, Drawable d,
|
||||||
GC gc, int x, int y, XTextItem16* pitems,
|
GC gc, int x, int y, XTextItem16* pitems,
|
||||||
int count )
|
int count )
|
||||||
{
|
{
|
||||||
TSXDrawText16( pdisp, d, gc, x, y, pitems, count );
|
wine_tsx11_lock();
|
||||||
|
XDrawText16( pdisp, d, gc, x, y, pitems, count );
|
||||||
|
wine_tsx11_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void X11DRV_TextExtents_normal( fontObject* pfo, XChar2b* pstr, int count,
|
static void X11DRV_TextExtents_normal( fontObject* pfo, XChar2b* pstr, int count,
|
||||||
|
@ -430,7 +438,9 @@ static void X11DRV_TextExtents_normal( fontObject* pfo, XChar2b* pstr, int count
|
||||||
{
|
{
|
||||||
XCharStruct info;
|
XCharStruct info;
|
||||||
|
|
||||||
TSXTextExtents16( pfo->fs, pstr, count, pdir, pascent, pdescent, &info );
|
wine_tsx11_lock();
|
||||||
|
XTextExtents16( pfo->fs, pstr, count, pdir, pascent, pdescent, &info );
|
||||||
|
wine_tsx11_unlock();
|
||||||
*pwidth = info.width;
|
*pwidth = info.width;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -519,13 +529,14 @@ int X11DRV_TextWidth_dbcs_2fonts( fontObject* pfo, XChar2b* pstr, int count )
|
||||||
if ( pfos[0] == NULL ) pfos[0] = pfo;
|
if ( pfos[0] == NULL ) pfos[0] = pfo;
|
||||||
|
|
||||||
width = 0;
|
width = 0;
|
||||||
|
wine_tsx11_lock();
|
||||||
for ( i = 0; i < count; i++ )
|
for ( i = 0; i < count; i++ )
|
||||||
{
|
{
|
||||||
curfont = ( pstr->byte1 != 0 ) ? 1 : 0;
|
curfont = ( pstr->byte1 != 0 ) ? 1 : 0;
|
||||||
width += TSXTextWidth16( pfos[curfont]->fs, pstr, 1 );
|
width += XTextWidth16( pfos[curfont]->fs, pstr, 1 );
|
||||||
pstr ++;
|
pstr ++;
|
||||||
}
|
}
|
||||||
|
wine_tsx11_unlock();
|
||||||
return width;
|
return width;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -576,7 +587,9 @@ void X11DRV_DrawText_dbcs_2fonts( fontObject* pfo, Display* pdisp, Drawable d,
|
||||||
pti->nchars = pstr - pti->chars;
|
pti->nchars = pstr - pti->chars;
|
||||||
pitems ++; pti ++;
|
pitems ++; pti ++;
|
||||||
}
|
}
|
||||||
TSXDrawText16( pdisp, d, gc, x, y, ptibuf, pti - ptibuf );
|
wine_tsx11_lock();
|
||||||
|
XDrawText16( pdisp, d, gc, x, y, ptibuf, pti - ptibuf );
|
||||||
|
wine_tsx11_unlock();
|
||||||
HeapFree( GetProcessHeap(), 0, ptibuf );
|
HeapFree( GetProcessHeap(), 0, ptibuf );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -598,18 +611,18 @@ void X11DRV_TextExtents_dbcs_2fonts( fontObject* pfo, XChar2b* pstr, int count,
|
||||||
width = 0;
|
width = 0;
|
||||||
*pascent = 0;
|
*pascent = 0;
|
||||||
*pdescent = 0;
|
*pdescent = 0;
|
||||||
|
wine_tsx11_lock();
|
||||||
for ( i = 0; i < count; i++ )
|
for ( i = 0; i < count; i++ )
|
||||||
{
|
{
|
||||||
curfont = ( pstr->byte1 != 0 ) ? 1 : 0;
|
curfont = ( pstr->byte1 != 0 ) ? 1 : 0;
|
||||||
TSXTextExtents16( pfos[curfont]->fs, pstr, 1, pdir,
|
XTextExtents16( pfos[curfont]->fs, pstr, 1, pdir, &ascent, &descent, &info );
|
||||||
&ascent, &descent, &info );
|
|
||||||
if ( *pascent < ascent ) *pascent = ascent;
|
if ( *pascent < ascent ) *pascent = ascent;
|
||||||
if ( *pdescent < descent ) *pdescent = descent;
|
if ( *pdescent < descent ) *pdescent = descent;
|
||||||
width += info.width;
|
width += info.width;
|
||||||
|
|
||||||
pstr ++;
|
pstr ++;
|
||||||
}
|
}
|
||||||
|
wine_tsx11_unlock();
|
||||||
*pwidth = width;
|
*pwidth = width;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4825,7 +4825,9 @@ INT X11DRV_SetDIBitsToDevice( X11DRV_PDEVICE *physDev, INT xDest, INT yDest, DWO
|
||||||
if (!cx || !cy) return lines;
|
if (!cx || !cy) return lines;
|
||||||
|
|
||||||
X11DRV_SetupGCForText( physDev ); /* To have the correct colors */
|
X11DRV_SetupGCForText( physDev ); /* To have the correct colors */
|
||||||
TSXSetFunction(gdi_display, physDev->gc, X11DRV_XROPfunction[dc->ROPmode-1]);
|
wine_tsx11_lock();
|
||||||
|
XSetFunction(gdi_display, physDev->gc, X11DRV_XROPfunction[dc->ROPmode-1]);
|
||||||
|
wine_tsx11_unlock();
|
||||||
|
|
||||||
switch (descr.infoBpp)
|
switch (descr.infoBpp)
|
||||||
{
|
{
|
||||||
|
|
|
@ -222,14 +222,6 @@ BOOL X11DRV_SetupGCForPen( X11DRV_PDEVICE *physDev )
|
||||||
}
|
}
|
||||||
val.background = physDev->backgroundPixel;
|
val.background = physDev->backgroundPixel;
|
||||||
val.fill_style = FillSolid;
|
val.fill_style = FillSolid;
|
||||||
if ((physDev->pen.width <= 1) &&
|
|
||||||
(physDev->pen.style != PS_SOLID) &&
|
|
||||||
(physDev->pen.style != PS_INSIDEFRAME))
|
|
||||||
{
|
|
||||||
TSXSetDashes( gdi_display, physDev->gc, 0, physDev->pen.dashes, physDev->pen.dash_len );
|
|
||||||
val.line_style = (GetBkMode(physDev->hdc) == OPAQUE) ? LineDoubleDash : LineOnOffDash;
|
|
||||||
}
|
|
||||||
else val.line_style = LineSolid;
|
|
||||||
val.line_width = physDev->pen.width;
|
val.line_width = physDev->pen.width;
|
||||||
if (val.line_width <= 1) {
|
if (val.line_width <= 1) {
|
||||||
val.cap_style = CapNotLast;
|
val.cap_style = CapNotLast;
|
||||||
|
@ -259,9 +251,20 @@ BOOL X11DRV_SetupGCForPen( X11DRV_PDEVICE *physDev )
|
||||||
default:
|
default:
|
||||||
val.join_style = JoinRound;
|
val.join_style = JoinRound;
|
||||||
}
|
}
|
||||||
TSXChangeGC( gdi_display, physDev->gc,
|
wine_tsx11_lock();
|
||||||
|
if ((physDev->pen.width <= 1) &&
|
||||||
|
(physDev->pen.style != PS_SOLID) &&
|
||||||
|
(physDev->pen.style != PS_INSIDEFRAME))
|
||||||
|
{
|
||||||
|
XSetDashes( gdi_display, physDev->gc, 0, physDev->pen.dashes, physDev->pen.dash_len );
|
||||||
|
val.line_style = (GetBkMode(physDev->hdc) == OPAQUE) ? LineDoubleDash : LineOnOffDash;
|
||||||
|
}
|
||||||
|
else val.line_style = LineSolid;
|
||||||
|
|
||||||
|
XChangeGC( gdi_display, physDev->gc,
|
||||||
GCFunction | GCForeground | GCBackground | GCLineWidth |
|
GCFunction | GCForeground | GCBackground | GCLineWidth |
|
||||||
GCLineStyle | GCCapStyle | GCJoinStyle | GCFillStyle, &val );
|
GCLineStyle | GCCapStyle | GCJoinStyle | GCFillStyle, &val );
|
||||||
|
wine_tsx11_unlock();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -286,9 +289,11 @@ BOOL X11DRV_SetupGCForText( X11DRV_PDEVICE *physDev )
|
||||||
val.fill_style = FillSolid;
|
val.fill_style = FillSolid;
|
||||||
val.font = xfs->fid;
|
val.font = xfs->fid;
|
||||||
|
|
||||||
TSXChangeGC( gdi_display, physDev->gc,
|
wine_tsx11_lock();
|
||||||
|
XChangeGC( gdi_display, physDev->gc,
|
||||||
GCFunction | GCForeground | GCBackground | GCFillStyle |
|
GCFunction | GCForeground | GCBackground | GCFillStyle |
|
||||||
GCFont, &val );
|
GCFont, &val );
|
||||||
|
wine_tsx11_unlock();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
WARN("Physical font failure\n" );
|
WARN("Physical font failure\n" );
|
||||||
|
@ -312,9 +317,11 @@ X11DRV_LineTo( X11DRV_PDEVICE *physDev, INT x, INT y )
|
||||||
pt[1].y = y;
|
pt[1].y = y;
|
||||||
LPtoDP( physDev->hdc, pt, 2 );
|
LPtoDP( physDev->hdc, pt, 2 );
|
||||||
|
|
||||||
TSXDrawLine(gdi_display, physDev->drawable, physDev->gc,
|
wine_tsx11_lock();
|
||||||
physDev->org.x + pt[0].x, physDev->org.y + pt[0].y,
|
XDrawLine(gdi_display, physDev->drawable, physDev->gc,
|
||||||
physDev->org.x + pt[1].x, physDev->org.y + pt[1].y );
|
physDev->org.x + pt[0].x, physDev->org.y + pt[0].y,
|
||||||
|
physDev->org.x + pt[1].x, physDev->org.y + pt[1].y );
|
||||||
|
wine_tsx11_unlock();
|
||||||
|
|
||||||
/* Update the DIBSection from the pixmap */
|
/* Update the DIBSection from the pixmap */
|
||||||
X11DRV_UnlockDIBSection(physDev, TRUE);
|
X11DRV_UnlockDIBSection(physDev, TRUE);
|
||||||
|
@ -404,19 +411,23 @@ X11DRV_DrawArc( X11DRV_PDEVICE *physDev, INT left, INT top, INT right,
|
||||||
/* Fill arc with brush if Chord() or Pie() */
|
/* Fill arc with brush if Chord() or Pie() */
|
||||||
|
|
||||||
if ((lines > 0) && X11DRV_SetupGCForBrush( physDev )) {
|
if ((lines > 0) && X11DRV_SetupGCForBrush( physDev )) {
|
||||||
TSXSetArcMode( gdi_display, physDev->gc, (lines==1) ? ArcChord : ArcPieSlice);
|
wine_tsx11_lock();
|
||||||
TSXFillArc( gdi_display, physDev->drawable, physDev->gc,
|
XSetArcMode( gdi_display, physDev->gc, (lines==1) ? ArcChord : ArcPieSlice);
|
||||||
physDev->org.x + rc.left, physDev->org.y + rc.top,
|
XFillArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
rc.right-rc.left-1, rc.bottom-rc.top-1, istart_angle, idiff_angle );
|
physDev->org.x + rc.left, physDev->org.y + rc.top,
|
||||||
|
rc.right-rc.left-1, rc.bottom-rc.top-1, istart_angle, idiff_angle );
|
||||||
|
wine_tsx11_unlock();
|
||||||
update = TRUE;
|
update = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Draw arc and lines */
|
/* Draw arc and lines */
|
||||||
|
|
||||||
if (X11DRV_SetupGCForPen( physDev )){
|
if (X11DRV_SetupGCForPen( physDev ))
|
||||||
TSXDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
{
|
||||||
physDev->org.x + rc.left, physDev->org.y + rc.top,
|
wine_tsx11_lock();
|
||||||
rc.right-rc.left-1, rc.bottom-rc.top-1, istart_angle, idiff_angle );
|
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
|
physDev->org.x + rc.left, physDev->org.y + rc.top,
|
||||||
|
rc.right-rc.left-1, rc.bottom-rc.top-1, istart_angle, idiff_angle );
|
||||||
if (lines) {
|
if (lines) {
|
||||||
/* use the truncated values */
|
/* use the truncated values */
|
||||||
start_angle=(double)istart_angle*PI/64./180.;
|
start_angle=(double)istart_angle*PI/64./180.;
|
||||||
|
@ -470,9 +481,10 @@ X11DRV_DrawArc( X11DRV_PDEVICE *physDev, INT left, INT top, INT right,
|
||||||
}
|
}
|
||||||
lines++;
|
lines++;
|
||||||
}
|
}
|
||||||
TSXDrawLines( gdi_display, physDev->drawable, physDev->gc,
|
XDrawLines( gdi_display, physDev->drawable, physDev->gc,
|
||||||
points, lines+1, CoordModeOrigin );
|
points, lines+1, CoordModeOrigin );
|
||||||
}
|
}
|
||||||
|
wine_tsx11_unlock();
|
||||||
update = TRUE;
|
update = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -558,16 +570,20 @@ X11DRV_Ellipse( X11DRV_PDEVICE *physDev, INT left, INT top, INT right, INT botto
|
||||||
|
|
||||||
if (X11DRV_SetupGCForBrush( physDev ))
|
if (X11DRV_SetupGCForBrush( physDev ))
|
||||||
{
|
{
|
||||||
TSXFillArc( gdi_display, physDev->drawable, physDev->gc,
|
wine_tsx11_lock();
|
||||||
physDev->org.x + rc.left, physDev->org.y + rc.top,
|
XFillArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
rc.right-rc.left-1, rc.bottom-rc.top-1, 0, 360*64 );
|
physDev->org.x + rc.left, physDev->org.y + rc.top,
|
||||||
|
rc.right-rc.left-1, rc.bottom-rc.top-1, 0, 360*64 );
|
||||||
|
wine_tsx11_unlock();
|
||||||
update = TRUE;
|
update = TRUE;
|
||||||
}
|
}
|
||||||
if (X11DRV_SetupGCForPen( physDev ))
|
if (X11DRV_SetupGCForPen( physDev ))
|
||||||
{
|
{
|
||||||
TSXDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
wine_tsx11_lock();
|
||||||
physDev->org.x + rc.left, physDev->org.y + rc.top,
|
XDrawArc( gdi_display, physDev->drawable, physDev->gc,
|
||||||
rc.right-rc.left-1, rc.bottom-rc.top-1, 0, 360*64 );
|
physDev->org.x + rc.left, physDev->org.y + rc.top,
|
||||||
|
rc.right-rc.left-1, rc.bottom-rc.top-1, 0, 360*64 );
|
||||||
|
wine_tsx11_unlock();
|
||||||
update = TRUE;
|
update = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -997,14 +1013,12 @@ X11DRV_Polyline( X11DRV_PDEVICE *physDev, const POINT* pt, INT count )
|
||||||
|
|
||||||
if (X11DRV_SetupGCForPen ( physDev ))
|
if (X11DRV_SetupGCForPen ( physDev ))
|
||||||
{
|
{
|
||||||
/* Update the pixmap from the DIB section */
|
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
|
||||||
X11DRV_LockDIBSection(physDev, DIB_Status_GdiMod, FALSE);
|
wine_tsx11_lock();
|
||||||
|
XDrawLines( gdi_display, physDev->drawable, physDev->gc,
|
||||||
TSXDrawLines( gdi_display, physDev->drawable, physDev->gc,
|
points, count, CoordModeOrigin );
|
||||||
points, count, CoordModeOrigin );
|
wine_tsx11_unlock();
|
||||||
|
X11DRV_UnlockDIBSection(physDev, TRUE);
|
||||||
/* Update the DIBSection from the pixmap */
|
|
||||||
X11DRV_UnlockDIBSection(physDev, TRUE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HeapFree( GetProcessHeap(), 0, points );
|
HeapFree( GetProcessHeap(), 0, points );
|
||||||
|
@ -1107,8 +1121,10 @@ X11DRV_PolyPolygon( X11DRV_PDEVICE *physDev, const POINT* pt, const INT* counts,
|
||||||
pt++;
|
pt++;
|
||||||
}
|
}
|
||||||
points[j] = points[0];
|
points[j] = points[0];
|
||||||
TSXDrawLines( gdi_display, physDev->drawable, physDev->gc,
|
wine_tsx11_lock();
|
||||||
points, j + 1, CoordModeOrigin );
|
XDrawLines( gdi_display, physDev->drawable, physDev->gc,
|
||||||
|
points, j + 1, CoordModeOrigin );
|
||||||
|
wine_tsx11_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update the DIBSection of the dc's bitmap */
|
/* Update the DIBSection of the dc's bitmap */
|
||||||
|
@ -1150,8 +1166,10 @@ X11DRV_PolyPolyline( X11DRV_PDEVICE *physDev, const POINT* pt, const DWORD* coun
|
||||||
points[j].y = physDev->org.y + tmp.y;
|
points[j].y = physDev->org.y + tmp.y;
|
||||||
pt++;
|
pt++;
|
||||||
}
|
}
|
||||||
TSXDrawLines( gdi_display, physDev->drawable, physDev->gc,
|
wine_tsx11_lock();
|
||||||
points, j, CoordModeOrigin );
|
XDrawLines( gdi_display, physDev->drawable, physDev->gc,
|
||||||
|
points, j, CoordModeOrigin );
|
||||||
|
wine_tsx11_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update the DIBSection of the dc's bitmap */
|
/* Update the DIBSection of the dc's bitmap */
|
||||||
|
|
|
@ -333,6 +333,7 @@ static BOOL X11DRV_PALETTE_BuildPrivateMap( const PALETTEENTRY *sys_pal_template
|
||||||
|
|
||||||
/* Allocate system palette colors */
|
/* Allocate system palette colors */
|
||||||
|
|
||||||
|
wine_tsx11_lock();
|
||||||
for( i=0; i < palette_size; i++ )
|
for( i=0; i < palette_size; i++ )
|
||||||
{
|
{
|
||||||
if( i < NB_RESERVED_COLORS/2 )
|
if( i < NB_RESERVED_COLORS/2 )
|
||||||
|
@ -355,7 +356,7 @@ static BOOL X11DRV_PALETTE_BuildPrivateMap( const PALETTEENTRY *sys_pal_template
|
||||||
|
|
||||||
color.flags = DoRed | DoGreen | DoBlue;
|
color.flags = DoRed | DoGreen | DoBlue;
|
||||||
color.pixel = i;
|
color.pixel = i;
|
||||||
TSXStoreColor(gdi_display, X11DRV_PALETTE_PaletteXColormap, &color);
|
XStoreColor(gdi_display, X11DRV_PALETTE_PaletteXColormap, &color);
|
||||||
|
|
||||||
/* Set EGA mapping if color is from the first or last eight */
|
/* Set EGA mapping if color is from the first or last eight */
|
||||||
|
|
||||||
|
@ -364,6 +365,7 @@ static BOOL X11DRV_PALETTE_BuildPrivateMap( const PALETTEENTRY *sys_pal_template
|
||||||
else if (i >= palette_size - 8 )
|
else if (i >= palette_size - 8 )
|
||||||
X11DRV_PALETTE_mapEGAPixel[i - (palette_size - 16)] = color.pixel;
|
X11DRV_PALETTE_mapEGAPixel[i - (palette_size - 16)] = color.pixel;
|
||||||
}
|
}
|
||||||
|
wine_tsx11_unlock();
|
||||||
|
|
||||||
X11DRV_PALETTE_XPixelToPalette = X11DRV_PALETTE_PaletteToXPixel = NULL;
|
X11DRV_PALETTE_XPixelToPalette = X11DRV_PALETTE_PaletteToXPixel = NULL;
|
||||||
|
|
||||||
|
@ -1138,7 +1140,9 @@ static UINT X11DRV_PALETTE_SetMapping( PALETTEOBJ* palPtr, UINT uStart, UINT uNu
|
||||||
color.green = palPtr->logpalette.palPalEntry[uStart].peGreen << 8;
|
color.green = palPtr->logpalette.palPalEntry[uStart].peGreen << 8;
|
||||||
color.blue = palPtr->logpalette.palPalEntry[uStart].peBlue << 8;
|
color.blue = palPtr->logpalette.palPalEntry[uStart].peBlue << 8;
|
||||||
color.flags = DoRed | DoGreen | DoBlue;
|
color.flags = DoRed | DoGreen | DoBlue;
|
||||||
TSXStoreColor(gdi_display, X11DRV_PALETTE_PaletteXColormap, &color);
|
wine_tsx11_lock();
|
||||||
|
XStoreColor(gdi_display, X11DRV_PALETTE_PaletteXColormap, &color);
|
||||||
|
wine_tsx11_unlock();
|
||||||
|
|
||||||
COLOR_sysPal[index] = palPtr->logpalette.palPalEntry[uStart];
|
COLOR_sysPal[index] = palPtr->logpalette.palPalEntry[uStart];
|
||||||
COLOR_sysPal[index].peFlags = flag;
|
COLOR_sysPal[index].peFlags = flag;
|
||||||
|
|
|
@ -139,10 +139,12 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
|
||||||
{
|
{
|
||||||
X11DRV_LockDIBSection( physDev, DIB_Status_GdiMod, FALSE );
|
X11DRV_LockDIBSection( physDev, DIB_Status_GdiMod, FALSE );
|
||||||
dibUpdateFlag = TRUE;
|
dibUpdateFlag = TRUE;
|
||||||
TSXSetForeground( gdi_display, physDev->gc, physDev->backgroundPixel );
|
wine_tsx11_lock();
|
||||||
TSXFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
XSetForeground( gdi_display, physDev->gc, physDev->backgroundPixel );
|
||||||
physDev->org.x + rect.left, physDev->org.y + rect.top,
|
XFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
||||||
rect.right-rect.left, rect.bottom-rect.top );
|
physDev->org.x + rect.left, physDev->org.y + rect.top,
|
||||||
|
rect.right-rect.left, rect.bottom-rect.top );
|
||||||
|
wine_tsx11_unlock();
|
||||||
}
|
}
|
||||||
if (!count) goto END; /* Nothing more to do */
|
if (!count) goto END; /* Nothing more to do */
|
||||||
|
|
||||||
|
@ -245,10 +247,12 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
|
||||||
(y - ascent < rect.top) ||
|
(y - ascent < rect.top) ||
|
||||||
(y + descent >= rect.bottom))
|
(y + descent >= rect.bottom))
|
||||||
{
|
{
|
||||||
TSXSetForeground( gdi_display, physDev->gc, physDev->backgroundPixel );
|
wine_tsx11_lock();
|
||||||
TSXFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
XSetForeground( gdi_display, physDev->gc, physDev->backgroundPixel );
|
||||||
physDev->org.x + x, physDev->org.y + y - ascent,
|
XFillRectangle( gdi_display, physDev->drawable, physDev->gc,
|
||||||
width, ascent + descent );
|
physDev->org.x + x, physDev->org.y + y - ascent,
|
||||||
|
width, ascent + descent );
|
||||||
|
wine_tsx11_unlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -257,7 +261,9 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
|
||||||
if (!(str2b = X11DRV_cptable[pfo->fi->cptable].punicode_to_char2b( pfo, wstr, count )))
|
if (!(str2b = X11DRV_cptable[pfo->fi->cptable].punicode_to_char2b( pfo, wstr, count )))
|
||||||
goto FAIL;
|
goto FAIL;
|
||||||
|
|
||||||
TSXSetForeground( gdi_display, physDev->gc, physDev->textPixel );
|
wine_tsx11_lock();
|
||||||
|
XSetForeground( gdi_display, physDev->gc, physDev->textPixel );
|
||||||
|
wine_tsx11_unlock();
|
||||||
if(!rotated)
|
if(!rotated)
|
||||||
{
|
{
|
||||||
if (!dc->charExtra && !dc->breakExtra && !lpDx)
|
if (!dc->charExtra && !dc->breakExtra && !lpDx)
|
||||||
|
@ -378,34 +384,36 @@ X11DRV_ExtTextOut( X11DRV_PDEVICE *physDev, INT x, INT y, UINT flags,
|
||||||
|
|
||||||
/* Draw underline and strike-out if needed */
|
/* Draw underline and strike-out if needed */
|
||||||
|
|
||||||
|
wine_tsx11_lock();
|
||||||
if (lfUnderline)
|
if (lfUnderline)
|
||||||
{
|
{
|
||||||
long linePos, lineWidth;
|
long linePos, lineWidth;
|
||||||
|
|
||||||
if (!TSXGetFontProperty( font, XA_UNDERLINE_POSITION, &linePos ))
|
if (!XGetFontProperty( font, XA_UNDERLINE_POSITION, &linePos ))
|
||||||
linePos = descent - 1;
|
linePos = descent - 1;
|
||||||
if (!TSXGetFontProperty( font, XA_UNDERLINE_THICKNESS, &lineWidth ))
|
if (!XGetFontProperty( font, XA_UNDERLINE_THICKNESS, &lineWidth ))
|
||||||
lineWidth = 0;
|
lineWidth = 0;
|
||||||
else if (lineWidth == 1) lineWidth = 0;
|
else if (lineWidth == 1) lineWidth = 0;
|
||||||
TSXSetLineAttributes( gdi_display, physDev->gc, lineWidth,
|
XSetLineAttributes( gdi_display, physDev->gc, lineWidth,
|
||||||
LineSolid, CapRound, JoinBevel );
|
LineSolid, CapRound, JoinBevel );
|
||||||
TSXDrawLine( gdi_display, physDev->drawable, physDev->gc,
|
XDrawLine( gdi_display, physDev->drawable, physDev->gc,
|
||||||
physDev->org.x + x, physDev->org.y + y + linePos,
|
physDev->org.x + x, physDev->org.y + y + linePos,
|
||||||
physDev->org.x + x + width, physDev->org.y + y + linePos );
|
physDev->org.x + x + width, physDev->org.y + y + linePos );
|
||||||
}
|
}
|
||||||
if (lfStrikeOut)
|
if (lfStrikeOut)
|
||||||
{
|
{
|
||||||
long lineAscent, lineDescent;
|
long lineAscent, lineDescent;
|
||||||
if (!TSXGetFontProperty( font, XA_STRIKEOUT_ASCENT, &lineAscent ))
|
if (!XGetFontProperty( font, XA_STRIKEOUT_ASCENT, &lineAscent ))
|
||||||
lineAscent = ascent / 2;
|
lineAscent = ascent / 2;
|
||||||
if (!TSXGetFontProperty( font, XA_STRIKEOUT_DESCENT, &lineDescent ))
|
if (!XGetFontProperty( font, XA_STRIKEOUT_DESCENT, &lineDescent ))
|
||||||
lineDescent = -lineAscent * 2 / 3;
|
lineDescent = -lineAscent * 2 / 3;
|
||||||
TSXSetLineAttributes( gdi_display, physDev->gc, lineAscent + lineDescent,
|
XSetLineAttributes( gdi_display, physDev->gc, lineAscent + lineDescent,
|
||||||
LineSolid, CapRound, JoinBevel );
|
LineSolid, CapRound, JoinBevel );
|
||||||
TSXDrawLine( gdi_display, physDev->drawable, physDev->gc,
|
XDrawLine( gdi_display, physDev->drawable, physDev->gc,
|
||||||
physDev->org.x + x, physDev->org.y + y - lineAscent,
|
physDev->org.x + x, physDev->org.y + y - lineAscent,
|
||||||
physDev->org.x + x + width, physDev->org.y + y - lineAscent );
|
physDev->org.x + x + width, physDev->org.y + y - lineAscent );
|
||||||
}
|
}
|
||||||
|
wine_tsx11_unlock();
|
||||||
|
|
||||||
if (flags & ETO_CLIPPED) RestoreVisRgn16( HDC_16(dc->hSelf) );
|
if (flags & ETO_CLIPPED) RestoreVisRgn16( HDC_16(dc->hSelf) );
|
||||||
goto END;
|
goto END;
|
||||||
|
|
Loading…
Reference in New Issue