diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2005-10-10 14:46:48 +0000 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2005-10-10 14:46:48 +0000 |
commit | aaf058eea47313a95ff66eab2cd9fd6deac14f9a (patch) | |
tree | e0be4817c72305abba18a9c62d8bb799e050e94c /patches | |
parent | 5a882fb6611372e242e2917644b4245c4c95ee0b (diff) | |
download | ptxdist-aaf058eea47313a95ff66eab2cd9fd6deac14f9a.tar.gz ptxdist-aaf058eea47313a95ff66eab2cd9fd6deac14f9a.tar.xz |
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-0.7-trunk@3223 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'patches')
-rw-r--r-- | patches/qt-embedded-free-3.3.4/generic/qt-embedded-3.3.4-tslib.patch | 255 |
1 files changed, 255 insertions, 0 deletions
diff --git a/patches/qt-embedded-free-3.3.4/generic/qt-embedded-3.3.4-tslib.patch b/patches/qt-embedded-free-3.3.4/generic/qt-embedded-3.3.4-tslib.patch new file mode 100644 index 000000000..41e28f837 --- /dev/null +++ b/patches/qt-embedded-free-3.3.4/generic/qt-embedded-3.3.4-tslib.patch @@ -0,0 +1,255 @@ +diff -urN qt-embedded-free-3.3.4/configure qt-embedded-free-3.3.4-tslib/configure +--- qt-embedded-free-3.3.4/configure 2004-10-18 19:17:00.000000000 +0200 ++++ qt-embedded-free-3.3.4-tslib/configure 2005-10-10 16:42:08.000000000 +0200 +@@ -2294,7 +2294,7 @@ + -qt-mouse-<driver> . Enable a mouse <driver> in the Qt Library. + -no-mouse-<driver> . Disable mouse <driver> entirely. + +- Possible values for <driver>: [ pc bus linuxtp yopy vr41xx ] ++ Possible values for <driver>: [ pc bus linuxtp yopy vr41xx tslib ] + + EOF + fi +diff -urN qt-embedded-free-3.3.4/src/embedded/qmousedriverfactory_qws.cpp qt-embedded-free-3.3.4-tslib/src/embedded/qmousedriverfactory_qws.cpp +--- qt-embedded-free-3.3.4/src/embedded/qmousedriverfactory_qws.cpp 2005-01-21 18:16:07.000000000 +0100 ++++ qt-embedded-free-3.3.4-tslib/src/embedded/qmousedriverfactory_qws.cpp 2005-10-10 16:42:08.000000000 +0200 +@@ -37,6 +37,7 @@ + #include "qmousepc_qws.h" + #include "qmousebus_qws.h" + #include "qmousevr41xx_qws.h" ++#include "qmousetslib_qws.h" + #include "qmouseyopy_qws.h" + #include "qmouselinuxtp_qws.h" + #include <stdlib.h> +@@ -115,6 +116,10 @@ + if ( driver == "vr41xx" || driver.isEmpty() ) + return new QWSVr41xxMouseHandler( key, device ); + #endif ++#ifndef QT_NO_QWS_MOUSE_TSLIB ++ if ( driver == "tslib" || driver.isEmpty() ) ++ return new QWSTslibMouseHandler( key, device ); ++#endif + #ifndef QT_NO_QWS_MOUSE_PC + if ( driver == "auto" || driver == "intellimouse" || + driver == "microsoft" || driver == "mousesystems" || +diff -urN qt-embedded-free-3.3.4/src/embedded/qmousetslib_qws.cpp qt-embedded-free-3.3.4-tslib/src/embedded/qmousetslib_qws.cpp +--- qt-embedded-free-3.3.4/src/embedded/qmousetslib_qws.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ qt-embedded-free-3.3.4-tslib/src/embedded/qmousetslib_qws.cpp 2005-10-10 16:44:52.000000000 +0200 +@@ -0,0 +1,137 @@ ++/**************************************************************************** ++** $Id: qt/qmousetslib_qws.cpp 3.3.4 $ ++** ++** Implementation of Qt/Embedded mouse drivers ++** ++** Created : 20051010 ++** ++** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. ++** ++** This file is part of the kernel module of the Qt GUI Toolkit. ++** ++** This file may be distributed and/or modified under the terms of the ++** GNU General Public License version 2 as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL included in the ++** packaging of this file. ++** ++** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition ++** licenses for Qt/Embedded may use this file in accordance with the ++** Qt Embedded Commercial License Agreement provided with the Software. ++** ++** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ++** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ++** ++** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for ++** information about Qt Commercial License Agreements. ++** See http://www.trolltech.com/gpl/ for GPL licensing information. ++** ++** Contact info@trolltech.com if any conditions of this licensing are ++** not clear to you. ++** ++**********************************************************************/ ++ ++#include "qmousetslib_qws.h" ++ ++#ifndef QT_NO_QWS_MOUSE_TSLIB ++#include "qwindowsystem_qws.h" ++#include "qsocketnotifier.h" ++#include "qtimer.h" ++#include "qapplication.h" ++#include "qgfx_qws.h" ++ ++#include <unistd.h> ++#include <stdlib.h> ++#include <stdio.h> ++#include <sys/ioctl.h> ++#include <sys/types.h> ++#include <sys/stat.h> ++#include <fcntl.h> ++#include <errno.h> ++#include <termios.h> ++ ++#include <tslib.h> ++ ++class QWSTslibMouseHandlerPrivate : public QObject ++{ ++ Q_OBJECT ++public: ++ QWSTslibMouseHandlerPrivate( QWSTslibMouseHandler *, const QString &, const QString & ); ++ ~QWSTslibMouseHandlerPrivate(); ++ ++private slots: ++ void sendRelease(); ++ void readMouseData(); ++ ++private: ++ struct tsdev *tsDev; ++ int obstate; ++ QTimer *rtimer; ++ QWSTslibMouseHandler *handler; ++}; ++ ++QWSTslibMouseHandler::QWSTslibMouseHandler( const QString &drv, const QString &dev ) ++{ ++ d = new QWSTslibMouseHandlerPrivate( this, drv, dev ); ++ setFilterSize( 3 ); ++} ++ ++QWSTslibMouseHandler::~QWSTslibMouseHandler() ++{ ++ delete d; ++} ++ ++QWSTslibMouseHandlerPrivate::QWSTslibMouseHandlerPrivate( QWSTslibMouseHandler *h, const QString &, const QString &device ) ++ : handler( h ) ++{ ++ QString dev = device; ++ if ( dev.isEmpty() ) ++ dev = "/dev/input/event0"; ++ ++ if ((tsDev = ts_open( dev, 0)) == NULL) { ++ qFatal( "Cannot open %s (%s)", dev.latin1(), strerror(errno)); ++ } ++ ++ if (ts_config(tsDev)) { ++ qFatal( "ts_config failed (%s)", strerror(errno)); ++ } ++ ++ QSocketNotifier *mouseNotifier; ++ mouseNotifier = new QSocketNotifier( ts_fd(tsDev), QSocketNotifier::Read, ++ this ); ++ connect(mouseNotifier, SIGNAL(activated(int)),this, SLOT(readMouseData())); ++ ++ rtimer = new QTimer( this ); ++ connect( rtimer, SIGNAL(timeout()), this, SLOT(sendRelease())); ++ ++// printf("\033[?25l"); fflush(stdout); // VT100 cursor off ++} ++ ++QWSTslibMouseHandlerPrivate::~QWSTslibMouseHandlerPrivate() ++{ ++ printf("destructor\n"); ++ if (tsDev != NULL) ++ ts_close(tsDev); ++} ++ ++void QWSTslibMouseHandlerPrivate::sendRelease() ++{ ++ handler->mouseChanged( handler->pos(), 0 ); ++} ++ ++void QWSTslibMouseHandlerPrivate::readMouseData() ++{ ++ if(!qt_screen) ++ return; ++// static bool pressed = FALSE; ++ struct ts_sample tsam; ++ ++ if(ts_read(tsDev, &tsam, 1 ) < 0) ++ perror("ts_read"); ++ QPoint t(tsam.x, tsam.y); ++ handler->mouseChanged( t, tsam.pressure ? Qt::LeftButton : 0); ++ if ( tsam.pressure ) ++ rtimer->start( 200, TRUE ); // release unreliable ++} ++ ++#include "qmousetslib_qws.moc" ++#endif //QT_NO_QWS_MOUSE_TSLIB +diff -urN qt-embedded-free-3.3.4/src/embedded/qmousetslib_qws.h qt-embedded-free-3.3.4-tslib/src/embedded/qmousetslib_qws.h +--- qt-embedded-free-3.3.4/src/embedded/qmousetslib_qws.h 1970-01-01 01:00:00.000000000 +0100 ++++ qt-embedded-free-3.3.4-tslib/src/embedded/qmousetslib_qws.h 2005-10-10 16:45:00.000000000 +0200 +@@ -0,0 +1,57 @@ ++/**************************************************************************** ++** $Id: qt/qmousetslib_qws.h 3.3.4 $ ++** ++** Definition of Qt/Embedded mouse driver ++** ++** Created : 20051010 ++** ++** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. ++** ++** This file is part of the kernel module of the Qt GUI Toolkit. ++** ++** This file may be distributed and/or modified under the terms of the ++** GNU General Public License version 2 as published by the Free Software ++** Foundation and appearing in the file LICENSE.GPL included in the ++** packaging of this file. ++** ++** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition ++** licenses for Qt/Embedded may use this file in accordance with the ++** Qt Embedded Commercial License Agreement provided with the Software. ++** ++** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ++** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ++** ++** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for ++** information about Qt Commercial License Agreements. ++** See http://www.trolltech.com/gpl/ for GPL licensing information. ++** ++** Contact info@trolltech.com if any conditions of this licensing are ++** not clear to you. ++** ++**********************************************************************/ ++ ++#ifndef QMOUSETSLIB_QWS_H ++#define QMOUSETSLIB_QWS_H ++ ++#ifndef QT_H ++#include "qmouse_qws.h" ++#endif // QT_H ++ ++#ifndef QT_NO_QWS_MOUSE_TSLIB ++ ++class QWSTslibMouseHandlerPrivate; ++ ++class QWSTslibMouseHandler : public QWSCalibratedMouseHandler ++{ ++public: ++ QWSTslibMouseHandler( const QString & = QString::null, const QString & = QString::null ); ++ ~QWSTslibMouseHandler(); ++ ++protected: ++ QWSTslibMouseHandlerPrivate *d; ++}; ++ ++#endif ++ ++#endif ++ +diff -urN qt-embedded-free-3.3.4/src/embedded/qt_embedded.pri qt-embedded-free-3.3.4-tslib/src/embedded/qt_embedded.pri +--- qt-embedded-free-3.3.4/src/embedded/qt_embedded.pri 2003-12-01 11:16:53.000000000 +0100 ++++ qt-embedded-free-3.3.4-tslib/src/embedded/qt_embedded.pri 2005-10-10 16:42:08.000000000 +0200 +@@ -183,7 +183,14 @@ + } + else:DEFINES += QT_NO_QWS_MOUSE_VR41 + +- contains( mouse-drivers, yopy ) { ++ contains( mouse-drivers, tslib ) { ++ HEADERS +=$$EMBEDDED_H/qmousetslib_qws.h ++ SOURCES +=$$EMBEDDED_CPP/qmousetslib_qws.cpp ++ LIBS *= -lts ++ } ++ else:DEFINES += QT_NO_QWS_MOUSE_TSLIB ++ ++contains( mouse-drivers, yopy ) { + HEADERS +=$$EMBEDDED_H/qmouseyopy_qws.h + SOURCES +=$$EMBEDDED_CPP/qmouseyopy_qws.cpp + } |