diff options
Diffstat (limited to 'config.tests/x11')
35 files changed, 1073 insertions, 0 deletions
diff --git a/config.tests/x11/fontconfig/fontconfig.cpp b/config.tests/x11/fontconfig/fontconfig.cpp new file mode 100644 index 0000000000..0e856de533 --- /dev/null +++ b/config.tests/x11/fontconfig/fontconfig.cpp @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <ft2build.h> +#include FT_FREETYPE_H +#include <fontconfig/fontconfig.h> + +#ifndef FC_RGBA_UNKNOWN +# error "This version of fontconfig is tool old, it is missing the FC_RGBA_UNKNOWN define" +#endif + +#if ((FREETYPE_MAJOR*10000 + FREETYPE_MINOR*100 + FREETYPE_PATCH) < 20103) +# error "This version of freetype is too old." +#endif + +int main(int, char **) +{ + FT_Face face; + face = 0; + FcPattern *pattern; + pattern = 0; + return 0; +} diff --git a/config.tests/x11/fontconfig/fontconfig.pro b/config.tests/x11/fontconfig/fontconfig.pro new file mode 100644 index 0000000000..718a8204bc --- /dev/null +++ b/config.tests/x11/fontconfig/fontconfig.pro @@ -0,0 +1,5 @@ +SOURCES = fontconfig.cpp +CONFIG += x11 +CONFIG -= qt +LIBS += -lfreetype -lfontconfig +include(../../unix/freetype/freetype.pri) diff --git a/config.tests/x11/glxfbconfig/glxfbconfig.cpp b/config.tests/x11/glxfbconfig/glxfbconfig.cpp new file mode 100644 index 0000000000..f111784776 --- /dev/null +++ b/config.tests/x11/glxfbconfig/glxfbconfig.cpp @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <GL/gl.h> +#include <GL/glx.h> + +int main(int, char **) +{ + GLXFBConfig config; + config = 0; + + return 0; +} diff --git a/config.tests/x11/glxfbconfig/glxfbconfig.pro b/config.tests/x11/glxfbconfig/glxfbconfig.pro new file mode 100644 index 0000000000..65f855a5f2 --- /dev/null +++ b/config.tests/x11/glxfbconfig/glxfbconfig.pro @@ -0,0 +1,10 @@ +SOURCES = glxfbconfig.cpp +CONFIG += x11 +INCLUDEPATH += $$QMAKE_INCDIR_OPENGL + +for(p, QMAKE_LIBDIR_OPENGL) { + exists($$p):LIBS += -L$$p +} + +CONFIG -= qt +LIBS += -lGL diff --git a/config.tests/x11/mitshm/mitshm.cpp b/config.tests/x11/mitshm/mitshm.cpp new file mode 100644 index 0000000000..de80e3a93d --- /dev/null +++ b/config.tests/x11/mitshm/mitshm.cpp @@ -0,0 +1,63 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifdef Q_OS_HPUX +#error "MITSHM not supported on HP-UX." +#else +#include <X11/Xlib.h> +#include <sys/ipc.h> +#include <sys/shm.h> +#include <X11/extensions/XShm.h> + +int main(int, char **) +{ + Display *dpy = 0; + int minor; + int major; + int pixmaps; + if (dpy && XShmQueryVersion(dpy, &major, &minor, &pixmaps)) { + minor = 0; + major = 0; + pixmaps = 0; + } + return 0; +} +#endif diff --git a/config.tests/x11/mitshm/mitshm.pro b/config.tests/x11/mitshm/mitshm.pro new file mode 100644 index 0000000000..8a40317d97 --- /dev/null +++ b/config.tests/x11/mitshm/mitshm.pro @@ -0,0 +1,5 @@ +SOURCES = mitshm.cpp +CONFIG += x11 +CONFIG -= qt +LIBS += -lXext +hpux*:DEFINES+=Q_OS_HPUX diff --git a/config.tests/x11/notype.test b/config.tests/x11/notype.test new file mode 100755 index 0000000000..1b534c8cb7 --- /dev/null +++ b/config.tests/x11/notype.test @@ -0,0 +1,49 @@ +#!/bin/sh + +QMKSPEC=$1 +XPLATFORM=`basename $1` +VERBOSE=$2 +SRCDIR=$3 +OUTDIR=$4 + +# debuggery +[ "$VERBOSE" = "yes" ] && echo "Detecting broken X11 headers... ($*)" + +# Detect broken X11 headers when using GCC 2.95 or later +# Xsun on Solaris 2.5.1: +# Patches are available for Solaris 2.6, 7, and 8 but +# not for Solaris 2.5.1. +# HP-UX: +# Patches are available for HP-UX 10.20, 11.00, and 11.11. +# AIX 4.3.3 and AIX 5.1: +# Headers are clearly broken on all AIX versions, and we +# don't know of any patches. The strange thing is that we +# did not get any reports about this issue until very +# recently, long after gcc 3.0.x was released. It seems to +# work for us with gcc 2.95.2. +NOTYPE=no + +if [ $XPLATFORM = "solaris-g++" -o $XPLATFORM = "hpux-g++" -o $XPLATFORM = "aix-g++" -o $XPLATFORM = "aix-g++-64" ]; then + NOTYPE=yes + + test -d "$OUTDIR/config.tests/x11/notype" || mkdir -p "$OUTDIR/config.tests/x11/notype" + "$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "QT_BUILD_TREE=$OUTDIR" "$SRCDIR/config.tests/x11/notype/notypetest.pro" -o "$OUTDIR/config.tests/x11/notype/Makefile" >/dev/null 2>&1 + cd "$OUTDIR/config.tests/x11/notype" + + if [ "$VERBOSE" = "yes" ]; then + $MAKE + else + $MAKE >/dev/null 2>&1 + fi + + [ -x notypetest ] && NOTYPE=no +fi + +# done +if [ "$NOTYPE" = "yes" ]; then + [ "$VERBOSE" = "yes" ] && echo "Broken X11 headers detected." + exit 0 +else + [ "$VERBOSE" = "yes" ] && echo "X11 headers look good." + exit 1 +fi diff --git a/config.tests/x11/notype/notypetest.cpp b/config.tests/x11/notype/notypetest.cpp new file mode 100644 index 0000000000..40023134cf --- /dev/null +++ b/config.tests/x11/notype/notypetest.cpp @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/* Sample program for configure to test for broken X11 headers that +confuse gcc 2.95 and better on target platforms such as Solaris. +*/ + +#include <X11/Xlib.h> +#include <X11/ICE/ICElib.h> + +int main() +{ + return 0; +} diff --git a/config.tests/x11/notype/notypetest.pro b/config.tests/x11/notype/notypetest.pro new file mode 100644 index 0000000000..6ce2c62619 --- /dev/null +++ b/config.tests/x11/notype/notypetest.pro @@ -0,0 +1,5 @@ +TEMPLATE=app +TARGET=notypetest +CONFIG-=qt +CONFIG+=x11 +SOURCES=notypetest.cpp diff --git a/config.tests/x11/opengl/opengl.cpp b/config.tests/x11/opengl/opengl.cpp new file mode 100644 index 0000000000..71e52cf5c7 --- /dev/null +++ b/config.tests/x11/opengl/opengl.cpp @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <GL/gl.h> + +int main(int, char **) +{ + GLuint x; + x = 0; + return 0; +} diff --git a/config.tests/x11/opengl/opengl.pro b/config.tests/x11/opengl/opengl.pro new file mode 100644 index 0000000000..5c3a1c50cb --- /dev/null +++ b/config.tests/x11/opengl/opengl.pro @@ -0,0 +1,11 @@ +SOURCES = opengl.cpp +CONFIG += x11 +INCLUDEPATH += $$QMAKE_INCDIR_OPENGL + +for(p, QMAKE_LIBDIR_OPENGL) { + exists($$p):LIBS += -L$$p +} + +CONFIG -= qt +win32-g++*:LIBS += -lopengl32 +else:LIBS += -lGL diff --git a/config.tests/x11/sm/sm.cpp b/config.tests/x11/sm/sm.cpp new file mode 100644 index 0000000000..6dd81832dc --- /dev/null +++ b/config.tests/x11/sm/sm.cpp @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <X11/SM/SMlib.h> + +int main(int, char **) +{ + SmPointer pointer; + pointer = 0; + return 0; +} diff --git a/config.tests/x11/sm/sm.pro b/config.tests/x11/sm/sm.pro new file mode 100644 index 0000000000..9be43d8aa2 --- /dev/null +++ b/config.tests/x11/sm/sm.pro @@ -0,0 +1,4 @@ +SOURCES += sm.cpp +CONFIG += x11 +CONFIG -= qt +LIBS += $$QMAKE_LIBS_X11SM diff --git a/config.tests/x11/xcursor/xcursor.cpp b/config.tests/x11/xcursor/xcursor.cpp new file mode 100644 index 0000000000..f979b7bc70 --- /dev/null +++ b/config.tests/x11/xcursor/xcursor.cpp @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <X11/Xlib.h> +#include <X11/Xcursor/Xcursor.h> + +#if !defined(XCURSOR_LIB_MAJOR) +# define XCURSOR_LIB_MAJOR XCURSOR_MAJOR +#endif +#if !defined(XCURSOR_LIB_MINOR) +# define XCURSOR_LIB_MINOR XCURSOR_MINOR +#endif + +#if XCURSOR_LIB_MAJOR == 1 && XCURSOR_LIB_MINOR >= 0 +# define XCURSOR_FOUND +#else +# define +# error "Required Xcursor version 1.0 not found." +#endif + +int main(int, char **) +{ + XcursorImage *image; + image = 0; + XcursorCursors *cursors; + cursors = 0; + return 0; +} diff --git a/config.tests/x11/xcursor/xcursor.pro b/config.tests/x11/xcursor/xcursor.pro new file mode 100644 index 0000000000..b1e69be29a --- /dev/null +++ b/config.tests/x11/xcursor/xcursor.pro @@ -0,0 +1,4 @@ +SOURCES = xcursor.cpp +CONFIG += x11 +CONFIG -= qt +LIBS += -lXcursor diff --git a/config.tests/x11/xfixes/xfixes.cpp b/config.tests/x11/xfixes/xfixes.cpp new file mode 100644 index 0000000000..afa54bd42e --- /dev/null +++ b/config.tests/x11/xfixes/xfixes.cpp @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <X11/Xlib.h> +#include <X11/extensions/Xfixes.h> + +#if XFIXES_MAJOR < 2 +# error "Required Xfixes version 2.0 not found." +#endif + +int main(int, char **) +{ + XFixesSelectionNotifyEvent event; + event.type = 0; + return 0; +} + diff --git a/config.tests/x11/xfixes/xfixes.pro b/config.tests/x11/xfixes/xfixes.pro new file mode 100644 index 0000000000..cc94a11bc2 --- /dev/null +++ b/config.tests/x11/xfixes/xfixes.pro @@ -0,0 +1,3 @@ +CONFIG += x11 +CONFIG -= qt +SOURCES = xfixes.cpp diff --git a/config.tests/x11/xinerama/xinerama.cpp b/config.tests/x11/xinerama/xinerama.cpp new file mode 100644 index 0000000000..d686d99cbc --- /dev/null +++ b/config.tests/x11/xinerama/xinerama.cpp @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <X11/Xlib.h> +#include <X11/extensions/Xinerama.h> + +int main(int, char **) +{ + XineramaScreenInfo *info; + info = 0; + return 0; +} diff --git a/config.tests/x11/xinerama/xinerama.pro b/config.tests/x11/xinerama/xinerama.pro new file mode 100644 index 0000000000..54d1af031b --- /dev/null +++ b/config.tests/x11/xinerama/xinerama.pro @@ -0,0 +1,4 @@ +SOURCES = xinerama.cpp +CONFIG += x11 +CONFIG -= qt +LIBS += -lXinerama diff --git a/config.tests/x11/xinput/xinput.cpp b/config.tests/x11/xinput/xinput.cpp new file mode 100644 index 0000000000..92a3d4146c --- /dev/null +++ b/config.tests/x11/xinput/xinput.cpp @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifdef Q_OS_SOLARIS +#error "Not supported." +#else + +#include <X11/Xlib.h> +#include <X11/extensions/XInput.h> + +#ifdef Q_OS_IRIX +# include <wacom.h> +#endif + +int main(int, char **) +{ + XDeviceButtonEvent *event; + event = 0; + return 0; +} +#endif diff --git a/config.tests/x11/xinput/xinput.pro b/config.tests/x11/xinput/xinput.pro new file mode 100644 index 0000000000..8acaede355 --- /dev/null +++ b/config.tests/x11/xinput/xinput.pro @@ -0,0 +1,6 @@ +SOURCES = xinput.cpp +CONFIG += x11 +CONFIG -= qt +LIBS += -lXi +irix-*:DEFINES+=Q_OS_IRIX +solaris-*:DEFINES+=Q_OS_SOLARIS diff --git a/config.tests/x11/xkb/xkb.cpp b/config.tests/x11/xkb/xkb.cpp new file mode 100644 index 0000000000..84e272e055 --- /dev/null +++ b/config.tests/x11/xkb/xkb.cpp @@ -0,0 +1,71 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <X11/Xlib.h> +#include <X11/XKBlib.h> + +int main(int, char **) +{ + Display *display = 0; + + int opcode = -1; + int xkbEventBase = -1; + int xkbErrorBase = -1; + int xkblibMajor = XkbMajorVersion; + int xkblibMinor = XkbMinorVersion; + XkbQueryExtension(display, &opcode, &xkbEventBase, &xkbErrorBase, &xkblibMajor, &xkblibMinor); + + int keycode = 0; + unsigned int state = 0; + KeySym keySym; + unsigned int consumedModifiers; + XkbLookupKeySym(display, keycode, state, &consumedModifiers, &keySym); + + XkbDescPtr xkbDesc = XkbGetMap(display, XkbAllClientInfoMask, XkbUseCoreKbd); + int w = XkbKeyGroupsWidth(xkbDesc, keycode); + keySym = XkbKeySym(xkbDesc, keycode, w-1); + XkbFreeClientMap(xkbDesc, XkbAllClientInfoMask, true); + + state = XkbPCF_GrabsUseXKBStateMask; + (void) XkbSetPerClientControls(display, state, &state); + + return 0; +} diff --git a/config.tests/x11/xkb/xkb.pro b/config.tests/x11/xkb/xkb.pro new file mode 100644 index 0000000000..d4ec2223df --- /dev/null +++ b/config.tests/x11/xkb/xkb.pro @@ -0,0 +1,3 @@ +SOURCES = xkb.cpp +CONFIG += x11 +CONFIG -= qt diff --git a/config.tests/x11/xlib/xlib.cpp b/config.tests/x11/xlib/xlib.cpp new file mode 100644 index 0000000000..234b2216b1 --- /dev/null +++ b/config.tests/x11/xlib/xlib.cpp @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <X11/Xlib.h> + +int main(int, char **) +{ + Display *d = XOpenDisplay(NULL); + XCloseDisplay(d); + return 0; +} + diff --git a/config.tests/x11/xlib/xlib.pro b/config.tests/x11/xlib/xlib.pro new file mode 100644 index 0000000000..658161ed9d --- /dev/null +++ b/config.tests/x11/xlib/xlib.pro @@ -0,0 +1,3 @@ +CONFIG += x11 +CONFIG -= qt +SOURCES = xlib.cpp diff --git a/config.tests/x11/xrandr/xrandr.cpp b/config.tests/x11/xrandr/xrandr.cpp new file mode 100644 index 0000000000..0c93f01797 --- /dev/null +++ b/config.tests/x11/xrandr/xrandr.cpp @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <X11/Xlib.h> +#include <X11/extensions/Xrandr.h> + +#if RANDR_MAJOR != 1 || RANDR_MINOR < 1 +# error "Requried Xrandr version 1.1 not found." +#endif + +int main(int, char **) +{ + XRRScreenSize *size; + size = 0; + return 0; +} diff --git a/config.tests/x11/xrandr/xrandr.pro b/config.tests/x11/xrandr/xrandr.pro new file mode 100644 index 0000000000..3fb2910b5e --- /dev/null +++ b/config.tests/x11/xrandr/xrandr.pro @@ -0,0 +1,4 @@ +SOURCES = xrandr.cpp +CONFIG += x11 +CONFIG -= qt +LIBS += -lXrender -lXrandr diff --git a/config.tests/x11/xrender/xrender.cpp b/config.tests/x11/xrender/xrender.cpp new file mode 100644 index 0000000000..d99f9c2a6e --- /dev/null +++ b/config.tests/x11/xrender/xrender.cpp @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <X11/Xlib.h> +#include <X11/extensions/Xrender.h> + +#if RENDER_MAJOR == 0 && RENDER_MINOR < 5 +# error "Required Xrender version 0.6 not found." +#else +int main(int, char **) +{ + XRenderPictFormat *format; + format = 0; + return 0; +} +#endif diff --git a/config.tests/x11/xrender/xrender.pro b/config.tests/x11/xrender/xrender.pro new file mode 100644 index 0000000000..e7786420fa --- /dev/null +++ b/config.tests/x11/xrender/xrender.pro @@ -0,0 +1,4 @@ +SOURCES = xrender.cpp +CONFIG += x11 +CONFIG -= qt +LIBS += -lXrender diff --git a/config.tests/x11/xshape/xshape.cpp b/config.tests/x11/xshape/xshape.cpp new file mode 100644 index 0000000000..1b3972c8bb --- /dev/null +++ b/config.tests/x11/xshape/xshape.cpp @@ -0,0 +1,51 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <X11/Xlib.h> +#include <X11/Xutil.h> +#include <X11/extensions/shape.h> + +int main(int, char **) +{ + XShapeEvent shapeevent; + shapeevent.type = 0; + return 0; +} diff --git a/config.tests/x11/xshape/xshape.pro b/config.tests/x11/xshape/xshape.pro new file mode 100644 index 0000000000..611c048e39 --- /dev/null +++ b/config.tests/x11/xshape/xshape.pro @@ -0,0 +1,3 @@ +CONFIG += x11 +CONFIG -= qt +SOURCES = xshape.cpp diff --git a/config.tests/x11/xsync/xsync.cpp b/config.tests/x11/xsync/xsync.cpp new file mode 100644 index 0000000000..795eef213a --- /dev/null +++ b/config.tests/x11/xsync/xsync.cpp @@ -0,0 +1,56 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the config.tests of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <X11/Xlib.h> +#include <X11/Xutil.h> +extern "C" { +#include <X11/extensions/sync.h> +} + +int main(int, char **) +{ + XSyncValue value; + (void*)&XSyncIntToValue; + (void*)&XSyncCreateCounter; + int a, b; + Status ret = XSyncInitialize(NULL, &a, &b); + return ret; +} diff --git a/config.tests/x11/xsync/xsync.pro b/config.tests/x11/xsync/xsync.pro new file mode 100644 index 0000000000..58b82383ea --- /dev/null +++ b/config.tests/x11/xsync/xsync.pro @@ -0,0 +1,3 @@ +CONFIG += x11 +CONFIG -= qt +SOURCES = xsync.cpp diff --git a/config.tests/x11/xvideo/xvideo.cpp b/config.tests/x11/xvideo/xvideo.cpp new file mode 100644 index 0000000000..9cf0662cf3 --- /dev/null +++ b/config.tests/x11/xvideo/xvideo.cpp @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the FOO module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <X11/Xlib.h> +#include <X11/extensions/Xv.h> +#include <X11/extensions/Xvlib.h> + +int main(int argc, char** argv) +{ + unsigned int count = 0; + XvAdaptorInfo *adaptors = 0; + XvQueryAdaptors(0, 0, &count, &adaptors); + return 0; +} diff --git a/config.tests/x11/xvideo/xvideo.pro b/config.tests/x11/xvideo/xvideo.pro new file mode 100644 index 0000000000..d4c63a0158 --- /dev/null +++ b/config.tests/x11/xvideo/xvideo.pro @@ -0,0 +1,4 @@ +CONFIG += x11 +CONFIG -= qt +SOURCES = xvideo.cpp +LIBS += -lXv |