TSXRender
Huw D M Davies
h.davies1 at physics.ox.ac.uk
Tue Sep 11 08:04:06 CDT 2001
This will get used by x11drv to render the glyphs obtained by
GetGlyphOutline.
Huw D M Davies <hdavies at codeweavers.com>
Add config check and thread safe wrappers for the XRender library.
-------------- next part --------------
Index: configure.in
===================================================================
RCS file: /home/wine/wine/configure.in,v
retrieving revision 1.222
diff -u -r1.222 configure.in
--- configure.in 2001/09/07 16:04:39 1.222
+++ configure.in 2001/09/11 10:38:19
@@ -176,7 +176,7 @@
]
)
- dnl *** All three of the following tests require X11/Xlib.h
+ dnl *** All of the following tests require X11/Xlib.h
AC_CHECK_HEADERS(X11/Xlib.h,
[
dnl *** Check for X keyboard extension
@@ -261,6 +261,19 @@
AC_MSG_WARN([XVideo extension not found !!])
)
+ dnl *** Check for XRender extension
+ AC_CHECK_HEADERS(X11/extensions/Xrender.h,
+ [ dnl *** If X11/extensions/Xrender.h exists...
+ AC_CHECK_LIB(Xrender, XRenderQueryExtension,
+ [ AC_DEFINE(HAVE_LIBXRENDER, 1, [Define if you have the XRender extension library])
+ X_PRE_LIBS="$X_PRE_LIBS -lXrender"
+ ],,
+ $X_LIBS -lXext -lX11 $X_EXTRA_LIBS
+ )
+ ],
+ AC_MSG_WARN([XRender extension not found !!])
+ )
+
]
) dnl *** End of X11/Xlib.h check
Index: tools/make_X11wrappers
===================================================================
RCS file: /home/wine/wine/tools/make_X11wrappers,v
retrieving revision 1.18
diff -u -r1.18 make_X11wrappers
--- tools/make_X11wrappers 2000/12/06 00:04:11 1.18
+++ tools/make_X11wrappers 2001/09/11 10:38:24
@@ -17,7 +17,7 @@
$X11_include_dir = "/usr/X11/include";
$outdir = "tsx11";
$wantfile = "$outdir/X11_calls";
- at dolist = ("Xlib", "Xresource", "Xutil", "xpm", "XShm", "xf86dga", "xf86dga2", "xf86vmode", "shape", "xvideo");
+ at dolist = ("Xlib", "Xresource", "Xutil", "xpm", "XShm", "xf86dga", "xf86dga2", "xf86vmode", "shape", "xvideo", "Xrender");
# First read list of wanted function names.
@@ -93,6 +93,12 @@
$post_file = "#endif /* defined(HAVE_XVIDEO) */\n";
$inc_name = "Xvlib";
}
+ if($name eq "Xrender") {
+ $x11_incl = "#include <X11/Xlib.h>\n";
+ $extensions_dir = "extensions/";
+ $pre_file = "#ifdef HAVE_LIBXRENDER\n";
+ $post_file = "#endif /* defined(HAVE_LIBXRENDER) */\n";
+ }
print OUTH <<END;
@@ -328,6 +334,73 @@
"Display*a0,int a1,int a2,int a3",
"a0,a1,a2,a3"
);
+ } elsif($name eq "Xrender") {
+ output_fn("XRenderAddGlyphs","void",
+ "Display*,GlyphSet,Glyph*,XGlyphInfo*,int,char*,int",
+ "Display*a0,GlyphSet a1,Glyph*a2,XGlyphInfo*a3,int a4,char*a5,int a6",
+ "a0,a1,a2,a3,a4,a5,a6"
+ );
+ output_fn("XRenderCompositeString8","void",
+ "Display*,int,Picture,Picture,XRenderPictFormat*,GlyphSet,int,int,int,int,char*,int",
+ "Display*a0,int a1,Picture a2,Picture a3,XRenderPictFormat*a4,GlyphSet a5,int a6,int a7,int a8,int a9,char*a10,int a11",
+ "a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11"
+ );
+ output_fn("XRenderCompositeString16","void",
+ "Display*,int,Picture,Picture,XRenderPictFormat*,GlyphSet,int,int,int,int,unsigned short*,int",
+ "Display*a0,int a1,Picture a2,Picture a3,XRenderPictFormat*a4,GlyphSet a5,int a6,int a7,int a8,int a9,unsigned short*a10,int a11",
+ "a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11"
+ );
+ output_fn("XRenderCompositeString32","void",
+ "Display*,int,Picture,Picture,XRenderPictFormat*,GlyphSet,int,int,int,int,unsigned int*,int",
+ "Display*a0,int a1,Picture a2,Picture a3,XRenderPictFormat*a4,GlyphSet a5,int a6,int a7,int a8,int a9,unsigned int*a10,int a11",
+ "a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11"
+ );
+ output_fn("XRenderCreateGlyphSet",GlyphSet,
+ "Display*,XRenderPictFormat*",
+ "Display*a0,XRenderPictFormat*a1",
+ "a0,a1"
+ );
+ output_fn("XRenderCreatePicture",Picture,
+ "Display*,Drawable,XRenderPictFormat*,unsigned long,XRenderPictureAttributes*",
+ "Display*a0,Drawable a1,XRenderPictFormat*a2,unsigned long a3,XRenderPictureAttributes*a4",
+ "a0,a1,a2,a3,a4"
+ );
+ output_fn("XRenderFillRectangle","void",
+ "Display*,int,Picture,XRenderColor*,int,int,unsigned int, unsigned int",
+ "Display*a0,int a1,Picture a2,XRenderColor*a3,int a4,int a5,unsigned int a6,unsigned int a7",
+ "a0,a1,a2,a3,a4,a5,a6,a7"
+ );
+ output_fn("XRenderFindFormat","XRenderPictFormat*",
+ "Display*,unsigned long,XRenderPictFormat*,int",
+ "Display*a0,unsigned long a1,XRenderPictFormat*a2,int a3",
+ "a0,a1,a2,a3"
+ );
+ output_fn("XRenderFindVisualFormat","XRenderPictFormat*",
+ "Display*,Visual*",
+ "Display*a0,Visual*a1",
+ "a0,a1"
+ );
+ output_fn("XRenderFreeGlyphSet","void",
+ "Display*,GlyphSet",
+ "Display*a0,GlyphSet a1",
+ "a0,a1"
+ );
+ output_fn("XRenderFreePicture","void",
+ "Display*,Picture",
+ "Display*a0,Picture a1",
+ "a0,a1"
+ );
+ output_fn("XRenderSetPictureClipRectangles","void",
+ "Display*,Picture,int,int,XRectangle*,int",
+ "Display*a0,Picture a1,int a2,int a3,XRectangle* a4,int a5",
+ "a0,a1,a2,a3,a4,a5"
+ );
+ output_fn("XRenderQueryExtension",Bool,
+ "Display*,int*,int*",
+ "Display*a0,int*a1,int*a2",
+ "a0,a1,a2"
+ );
+
} else {
open(IN,
"echo \"$x11_incl#include <X11/$extensions_dir$name.h>\" | " .
@@ -404,6 +477,10 @@
"struct _XImage *, long",
"struct _XImage *a0, long a1", "a0, a1");
output_fn("XUniqueContext", "XContext", "void", "void", "");
+ output_fn("XDeleteContext", "int",
+ "Display*,XID,XContext",
+ "Display*a0,XID a1,XContext a2",
+ "a0,a1,a2");
}
print OUTH <<END;
Index: tsx11/Makefile.in
===================================================================
RCS file: /home/wine/wine/tsx11/Makefile.in,v
retrieving revision 1.9
diff -u -r1.9 Makefile.in
--- tsx11/Makefile.in 2001/09/10 23:06:17 1.9
+++ tsx11/Makefile.in 2001/09/11 10:38:24
@@ -16,6 +16,7 @@
ts_xf86vmode.c \
ts_xshm.c \
ts_xlib.c \
+ ts_xrender.c \
ts_xresource.c \
ts_xvideo.c \
ts_xutil.c \
Index: tsx11/X11_calls
===================================================================
RCS file: /home/wine/wine/tsx11/X11_calls,v
retrieving revision 1.20
diff -u -r1.20 X11_calls
--- tsx11/X11_calls 2001/04/16 19:33:25 1.20
+++ tsx11/X11_calls 2001/09/11 10:38:24
@@ -251,3 +251,16 @@
XvPutImage
XvShmPutImage
XvShmCreateImage
+XRenderAddGlyphs
+XRenderCompositeString8
+XRenderCompositeString16
+XRenderCompositeString32
+XRenderCreateGlyphSet
+XRenderCreatePicture
+XRenderFillRectangle
+XRenderFindFormat
+XRenderFindVisualFormat
+XRenderFreeGlyphSet
+XRenderFreePicture
+XRenderSetPictureClipRectangles
+XRenderQueryExtension
--- /dev/null Sat Mar 24 04:37:44 2001
+++ tsx11/ts_xrender.c Tue Sep 11 11:38:14 2001
@@ -0,0 +1,119 @@
+/*
+ * Thread safe wrappers around Xrender calls.
+ * This file was generated automatically by tools/make_X11wrappers
+ * DO NOT EDIT!
+ */
+
+#include "config.h"
+
+#ifdef HAVE_LIBXRENDER
+
+#include <X11/Xlib.h>
+#include <X11/extensions/Xrender.h>
+
+#include "ts_xrender.h"
+
+
+void TSXRenderAddGlyphs(Display*a0,GlyphSet a1,Glyph*a2,XGlyphInfo*a3,int a4,char*a5,int a6)
+{
+ wine_tsx11_lock();
+ XRenderAddGlyphs(a0,a1,a2,a3,a4,a5,a6);
+ wine_tsx11_unlock();
+}
+
+void TSXRenderCompositeString8(Display*a0,int a1,Picture a2,Picture a3,XRenderPictFormat*a4,GlyphSet a5,int a6,int a7,int a8,int a9,char*a10,int a11)
+{
+ wine_tsx11_lock();
+ XRenderCompositeString8(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11);
+ wine_tsx11_unlock();
+}
+
+void TSXRenderCompositeString16(Display*a0,int a1,Picture a2,Picture a3,XRenderPictFormat*a4,GlyphSet a5,int a6,int a7,int a8,int a9,unsigned short*a10,int a11)
+{
+ wine_tsx11_lock();
+ XRenderCompositeString16(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11);
+ wine_tsx11_unlock();
+}
+
+void TSXRenderCompositeString32(Display*a0,int a1,Picture a2,Picture a3,XRenderPictFormat*a4,GlyphSet a5,int a6,int a7,int a8,int a9,unsigned int*a10,int a11)
+{
+ wine_tsx11_lock();
+ XRenderCompositeString32(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11);
+ wine_tsx11_unlock();
+}
+
+GlyphSet TSXRenderCreateGlyphSet(Display*a0,XRenderPictFormat*a1)
+{
+ GlyphSet r;
+ wine_tsx11_lock();
+ r = XRenderCreateGlyphSet(a0,a1);
+ wine_tsx11_unlock();
+ return r;
+}
+
+Picture TSXRenderCreatePicture(Display*a0,Drawable a1,XRenderPictFormat*a2,unsigned long a3,XRenderPictureAttributes*a4)
+{
+ Picture r;
+ wine_tsx11_lock();
+ r = XRenderCreatePicture(a0,a1,a2,a3,a4);
+ wine_tsx11_unlock();
+ return r;
+}
+
+void TSXRenderFillRectangle(Display*a0,int a1,Picture a2,XRenderColor*a3,int a4,int a5,unsigned int a6,unsigned int a7)
+{
+ wine_tsx11_lock();
+ XRenderFillRectangle(a0,a1,a2,a3,a4,a5,a6,a7);
+ wine_tsx11_unlock();
+}
+
+XRenderPictFormat* TSXRenderFindFormat(Display*a0,unsigned long a1,XRenderPictFormat*a2,int a3)
+{
+ XRenderPictFormat* r;
+ wine_tsx11_lock();
+ r = XRenderFindFormat(a0,a1,a2,a3);
+ wine_tsx11_unlock();
+ return r;
+}
+
+XRenderPictFormat* TSXRenderFindVisualFormat(Display*a0,Visual*a1)
+{
+ XRenderPictFormat* r;
+ wine_tsx11_lock();
+ r = XRenderFindVisualFormat(a0,a1);
+ wine_tsx11_unlock();
+ return r;
+}
+
+void TSXRenderFreeGlyphSet(Display*a0,GlyphSet a1)
+{
+ wine_tsx11_lock();
+ XRenderFreeGlyphSet(a0,a1);
+ wine_tsx11_unlock();
+}
+
+void TSXRenderFreePicture(Display*a0,Picture a1)
+{
+ wine_tsx11_lock();
+ XRenderFreePicture(a0,a1);
+ wine_tsx11_unlock();
+}
+
+void TSXRenderSetPictureClipRectangles(Display*a0,Picture a1,int a2,int a3,XRectangle* a4,int a5)
+{
+ wine_tsx11_lock();
+ XRenderSetPictureClipRectangles(a0,a1,a2,a3,a4,a5);
+ wine_tsx11_unlock();
+}
+
+Bool TSXRenderQueryExtension(Display*a0,int*a1,int*a2)
+{
+ Bool r;
+ wine_tsx11_lock();
+ r = XRenderQueryExtension(a0,a1,a2);
+ wine_tsx11_unlock();
+ return r;
+}
+
+#endif /* defined(HAVE_LIBXRENDER) */
+
--- /dev/null Sat Mar 24 04:37:44 2001
+++ include/ts_xrender.h Tue Sep 11 11:38:14 2001
@@ -0,0 +1,38 @@
+/*
+ * Thread safe wrappers around Xrender calls.
+ * Always include this file instead of <X11/Xrender.h>.
+ * This file was generated automatically by tools/make_X11wrappers
+ *
+ * Copyright 1998 Kristian Nielsen
+ */
+
+#ifndef __WINE_TS_XRENDER_H
+#define __WINE_TS_XRENDER_H
+
+#include "config.h"
+
+#ifdef HAVE_LIBXRENDER
+
+#include <X11/Xlib.h>
+#include <X11/extensions/Xrender.h>
+
+extern void (*wine_tsx11_lock)(void);
+extern void (*wine_tsx11_unlock)(void);
+
+extern void TSXRenderAddGlyphs(Display*,GlyphSet,Glyph*,XGlyphInfo*,int,char*,int);
+extern void TSXRenderCompositeString8(Display*,int,Picture,Picture,XRenderPictFormat*,GlyphSet,int,int,int,int,char*,int);
+extern void TSXRenderCompositeString16(Display*,int,Picture,Picture,XRenderPictFormat*,GlyphSet,int,int,int,int,unsigned short*,int);
+extern void TSXRenderCompositeString32(Display*,int,Picture,Picture,XRenderPictFormat*,GlyphSet,int,int,int,int,unsigned int*,int);
+extern GlyphSet TSXRenderCreateGlyphSet(Display*,XRenderPictFormat*);
+extern Picture TSXRenderCreatePicture(Display*,Drawable,XRenderPictFormat*,unsigned long,XRenderPictureAttributes*);
+extern void TSXRenderFillRectangle(Display*,int,Picture,XRenderColor*,int,int,unsigned int, unsigned int);
+extern XRenderPictFormat* TSXRenderFindFormat(Display*,unsigned long,XRenderPictFormat*,int);
+extern XRenderPictFormat* TSXRenderFindVisualFormat(Display*,Visual*);
+extern void TSXRenderFreeGlyphSet(Display*,GlyphSet);
+extern void TSXRenderFreePicture(Display*,Picture);
+extern void TSXRenderSetPictureClipRectangles(Display*,Picture,int,int,XRectangle*,int);
+extern Bool TSXRenderQueryExtension(Display*,int*,int*);
+
+#endif /* defined(HAVE_LIBXRENDER) */
+
+#endif /* __WINE_TS_XRENDER_H */
More information about the wine-patches
mailing list