Commit ea69f8ee authored by Alexandre Julliard's avatar Alexandre Julliard

Added some #ifdefs HAVE_X11_XLIB_H where appropriate.

parent 8877c669
......@@ -12,6 +12,7 @@
# error You must include config.h to use this header
#endif
#ifdef HAVE_X11_XLIB_H
#include <X11/Xlib.h>
......@@ -147,7 +148,7 @@ extern int TSXUnmapWindow(Display*, Window);
extern int TSXWarpPointer(Display*, Window, Window, int, int, unsigned int, unsigned int, int, int);
extern XIM TSXOpenIM(Display*, struct _XrmHashBucketRec*, char*, char*);
extern int (*TSXSynchronize(Display *, Bool))(Display *);
extern void TS_XInitImageFuncPtrs(XImage *);
#endif /* defined(HAVE_X11_XLIB_H) */
#endif /* __WINE_TS_XLIB_H */
......@@ -12,6 +12,7 @@
# error You must include config.h to use this header
#endif
#ifdef HAVE_X11_XLIB_H
#include <X11/Xlib.h>
#include <X11/Xresource.h>
......@@ -26,5 +27,6 @@ extern XrmDatabase TSXrmGetStringDatabase(const char*);
extern void TSXrmMergeDatabases(XrmDatabase, XrmDatabase*);
extern void TSXrmParseCommand(XrmDatabase*, XrmOptionDescList, int, const char*, int*, char**);
#endif /* defined(HAVE_X11_XLIB_H) */
#endif /* __WINE_TS_XRESOURCE_H */
......@@ -12,6 +12,7 @@
# error You must include config.h to use this header
#endif
#ifdef HAVE_X11_XLIB_H
#include <X11/Xlib.h>
#include <X11/Xresource.h>
......@@ -56,5 +57,6 @@ extern int TSXAddPixel(struct _XImage *, long);
extern XContext TSXUniqueContext(void);
extern int TSXDeleteContext(Display*,XID,XContext);
#endif /* defined(HAVE_X11_XLIB_H) */
#endif /* __WINE_TS_XUTIL_H */
......@@ -57,8 +57,8 @@ foreach $name (@dolist) {
$x11_incl = "";
$extensions_dir = "";
$pre_file = "";
$post_file = "";
$pre_file = "#ifdef HAVE_X11_XLIB_H\n";
$post_file = "#endif /* defined(HAVE_X11_XLIB_H) */\n";
$inc_name = $name;
if($name eq "Xutil" || $name eq "Xresource" || $name eq "XShm") {
$x11_incl = "#include <X11/Xlib.h>\n";
......@@ -388,8 +388,6 @@ output_fn_short("XvImage *", "XvShmCreateImage", "Display*", "XvPortID", "int",
"int (*TSXSynchronize(Display *, Bool))(Display *)",
"int (*TSXSynchronize(Display *a0, Bool a1))(Display *)",
"a0, a1");
print OUTC "\nextern void _XInitImageFuncPtrs(XImage *);\n";
output_fn("_XInitImageFuncPtrs", "void", "XImage *", "XImage *a0", "a0");
} elsif($name eq "Xutil") {
output_fn("XDestroyImage", "int",
"struct _XImage *", "struct _XImage *a0", "a0");
......
......@@ -185,7 +185,6 @@ XrmInitialize
XrmMergeDatabases
XrmParseCommand
XrmUniqueQuark
_XInitImageFuncPtrs
XF86DGAQueryExtension
XF86DGASetViewPort
XF86DGAInstallColormap
......
......@@ -6,6 +6,7 @@
#include "config.h"
#ifdef HAVE_X11_XLIB_H
#include <X11/Xlib.h>
......@@ -1171,13 +1172,5 @@ int (*TSXSynchronize(Display *a0, Bool a1))(Display *)
return r;
}
extern void _XInitImageFuncPtrs(XImage *);
void TS_XInitImageFuncPtrs(XImage *a0)
{
wine_tsx11_lock();
_XInitImageFuncPtrs(a0);
wine_tsx11_unlock();
}
#endif /* defined(HAVE_X11_XLIB_H) */
......@@ -6,6 +6,7 @@
#include "config.h"
#ifdef HAVE_X11_XLIB_H
#include <X11/Xlib.h>
#include <X11/Xresource.h>
......@@ -63,4 +64,5 @@ void TSXrmParseCommand(XrmDatabase* a0, XrmOptionDescList a1, int a2, const ch
wine_tsx11_unlock();
}
#endif /* defined(HAVE_X11_XLIB_H) */
......@@ -6,6 +6,7 @@
#include "config.h"
#ifdef HAVE_X11_XLIB_H
#include <X11/Xlib.h>
#include <X11/Xresource.h>
......@@ -59,15 +60,6 @@ Region TSXCreateRegion(void)
return r;
}
int TSXDeleteContext(Display* a0, XID a1, XContext a2)
{
int r;
wine_tsx11_lock();
r = XDeleteContext(a0, a1, a2);
wine_tsx11_unlock();
return r;
}
int TSXDestroyRegion(Region a0)
{
int r;
......@@ -325,4 +317,14 @@ XContext TSXUniqueContext(void)
return r;
}
int TSXDeleteContext(Display*a0,XID a1,XContext a2)
{
int r;
wine_tsx11_lock();
r = XDeleteContext(a0,a1,a2);
wine_tsx11_unlock();
return r;
}
#endif /* defined(HAVE_X11_XLIB_H) */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment