From 44be58226e2fae82c9e8b9b21ccbd53e396c333e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Lind?= Date: Mon, 16 Apr 2012 09:29:29 +0200 Subject: Remove OpenKode OpenVG and qvfb platformplugins MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ic0bd8f68080bf139d81266d033cfd3c96a8d01f4 Reviewed-by: Donald Carr Reviewed-by: Samuel Rødal --- src/plugins/platforms/openkode/main.cpp | 72 ----- src/plugins/platforms/openkode/openkode.pro | 42 --- .../platforms/openkode/openkodekeytranslator.h | 244 ---------------- .../openkode/qopenkodeeventloopintegration.cpp | 128 --------- .../openkode/qopenkodeeventloopintegration.h | 71 ----- .../platforms/openkode/qopenkodeintegration.cpp | 247 ---------------- .../platforms/openkode/qopenkodeintegration.h | 120 -------- src/plugins/platforms/openkode/qopenkodewindow.cpp | 315 --------------------- src/plugins/platforms/openkode/qopenkodewindow.h | 89 ------ src/plugins/platforms/openkode/resources.qrc | 6 - src/plugins/platforms/openkode/shaders/frag.glslf | 49 ---- src/plugins/platforms/openkode/shaders/vert.glslv | 55 ---- 12 files changed, 1438 deletions(-) delete mode 100644 src/plugins/platforms/openkode/main.cpp delete mode 100644 src/plugins/platforms/openkode/openkode.pro delete mode 100644 src/plugins/platforms/openkode/openkodekeytranslator.h delete mode 100644 src/plugins/platforms/openkode/qopenkodeeventloopintegration.cpp delete mode 100644 src/plugins/platforms/openkode/qopenkodeeventloopintegration.h delete mode 100644 src/plugins/platforms/openkode/qopenkodeintegration.cpp delete mode 100644 src/plugins/platforms/openkode/qopenkodeintegration.h delete mode 100644 src/plugins/platforms/openkode/qopenkodewindow.cpp delete mode 100644 src/plugins/platforms/openkode/qopenkodewindow.h delete mode 100644 src/plugins/platforms/openkode/resources.qrc delete mode 100644 src/plugins/platforms/openkode/shaders/frag.glslf delete mode 100644 src/plugins/platforms/openkode/shaders/vert.glslv (limited to 'src/plugins/platforms/openkode') diff --git a/src/plugins/platforms/openkode/main.cpp b/src/plugins/platforms/openkode/main.cpp deleted file mode 100644 index 0507d5bfb2..0000000000 --- a/src/plugins/platforms/openkode/main.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include "qopenkodeintegration.h" - -QT_BEGIN_NAMESPACE - -class QOpenKODEPlugin : public QPlatformIntegrationPlugin -{ -public: - QStringList keys() const; - QPlatformIntegration *create(const QString&, const QStringList&); -}; - -QStringList QOpenKODEPlugin::keys() const -{ - QStringList list; - list << "OpenKODE"; - return list; -} - -QPlatformIntegration * QOpenKODEPlugin::create(const QString& system, const QStringList& paramList) -{ - Q_UNUSED(paramList); - if (system.toLower() == "openkode") - return new QOpenKODEIntegration; - - return 0; -} - -Q_EXPORT_PLUGIN2(openkode, QOpenKODEPlugin) - -QT_END_NAMESPACE diff --git a/src/plugins/platforms/openkode/openkode.pro b/src/plugins/platforms/openkode/openkode.pro deleted file mode 100644 index 0fcf7b1488..0000000000 --- a/src/plugins/platforms/openkode/openkode.pro +++ /dev/null @@ -1,42 +0,0 @@ -TARGET = qopenkodeintegration -load(qt_plugin) - -QT += opengl - -DESTDIR = $$QT.gui.plugins/platforms - -SOURCES = main.cpp \ - qopenkodeintegration.cpp \ - qopenkodewindow.cpp \ - ../eglconvenience/qeglplatformcontext.cpp \ - ../eglconvenience/qeglconvenience.cpp \ - qopenkodeeventloopintegration.cpp - -HEADERS = qopenkodeintegration.h \ - qopenkodewindow.h \ - ../eglconvenience/qeglplatformcontext.h \ - ../eglconvenience/qeglconvenience.h \ - qopenkodeeventloopintegration.h \ - openkodekeytranslator.h - -CONFIG += qpa/genericunixfontdatabase - -RESOURCES = resources.qrc - -target.path += $$[QT_INSTALL_PLUGINS]/platforms -INSTALLS += target - -LIBS += -lKD -lEGL -!isEmpty(QMAKE_INCDIR_OPENGL_ES2){ - INCLUDEPATH += $$QMAKE_INCDIR_OPENGL_ES2 -} -!isEmpty(QMAKE_LIBDIR_OPENGL_ES2){ - for(p, QMAKE_LIBDIR_OPENGL_ES2) { - exists($$p):LIBS += -L$$p - } -} -!isEmpty(QMAKE_LIBS_OPENGL_ES2){ - LIBS += $$QMAKE_LIBS_OPENGL_ES2 -} else { - LIBS += -lGLESv2 -} diff --git a/src/plugins/platforms/openkode/openkodekeytranslator.h b/src/plugins/platforms/openkode/openkodekeytranslator.h deleted file mode 100644 index 63f4e4e3ac..0000000000 --- a/src/plugins/platforms/openkode/openkodekeytranslator.h +++ /dev/null @@ -1,244 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef OPENKODEKEYTRANSLATOR_H -#define OPENKODEKEYTRANSLATOR_H - -#ifdef KD_ATX_keyboard - -#include - -QT_BEGIN_NAMESPACE - -Qt::Key keyTranslator( int key ) -{ - switch (key) { -// KD_KEY_ACCEPT_ATX: -// KD_KEY_AGAIN_ATX: -// KD_KEY_ALLCANDIDATES_ATX -// KD_KEY_ALPHANUMERIC_ATX - case KD_KEY_ALT_ATX: - return Qt::Key_Alt; - case KD_KEY_ALTGRAPH_ATX: - return Qt::Key_AltGr; -// KD_KEY_APPS_ATX -// KD_KEY_ATTN_ATX -// KD_KEY_BROWSERBACK_ATX -// KD_KEY_BROWSERFAVORITES_ATX -// KD_KEY_BROWSERFORWARD_ATX -// KD_KEY_BROWSERHOME_ATX -// KD_KEY_BROWSERREFRESH_ATX -// KD_KEY_BROWSERSEARCH_ATX -// KD_KEY_BROWSERSTOP_ATX - case KD_KEY_CAPSLOCK_ATX: - return Qt::Key_CapsLock; - case KD_KEY_CLEAR_ATX: - return Qt::Key_Clear; - case KD_KEY_CODEINPUT_ATX: - return Qt::Key_Codeinput; -// KD_KEY_COMPOSE_ATX - case KD_KEY_CONTROL_ATX: - return Qt::Key_Control; -// KD_KEY_CRSEL_ATX -// KD_KEY_CONVERT_ATX - case KD_KEY_COPY_ATX: - return Qt::Key_Copy; - case KD_KEY_CUT_ATX: - return Qt::Key_Cut; - case KD_KEY_DOWN_ATX: - return Qt::Key_Down; - case KD_KEY_END_ATX: - return Qt::Key_End; - case KD_KEY_ENTER_ATX: - return Qt::Key_Enter; -// KD_KEY_ERASEEOF_ATX -// KD_KEY_EXECUTE_ATX -// KD_KEY_EXSEL_ATX - case KD_KEY_F1_ATX: - return Qt::Key_F1; - case KD_KEY_F2_ATX: - return Qt::Key_F2; - case KD_KEY_F3_ATX: - return Qt::Key_F3; - case KD_KEY_F4_ATX: - return Qt::Key_F4; - case KD_KEY_F5_ATX: - return Qt::Key_F5; - case KD_KEY_F6_ATX: - return Qt::Key_F6; - case KD_KEY_F7_ATX: - return Qt::Key_F7; - case KD_KEY_F8_ATX: - return Qt::Key_F8; - case KD_KEY_F9_ATX: - return Qt::Key_F9; - case KD_KEY_F10_ATX: - return Qt::Key_F10; - case KD_KEY_F11_ATX: - return Qt::Key_F11; - case KD_KEY_F12_ATX: - return Qt::Key_F12; - case KD_KEY_F13_ATX: - return Qt::Key_F13; - case KD_KEY_F14_ATX: - return Qt::Key_F14; - case KD_KEY_F15_ATX: - return Qt::Key_F15; - case KD_KEY_F16_ATX: - return Qt::Key_F16; - case KD_KEY_F17_ATX: - return Qt::Key_F17; - case KD_KEY_F18_ATX: - return Qt::Key_F18; - case KD_KEY_F19_ATX: - return Qt::Key_F19; - case KD_KEY_F20_ATX: - return Qt::Key_F20; - case KD_KEY_F21_ATX: - return Qt::Key_F21; - case KD_KEY_F22_ATX: - return Qt::Key_F22; - case KD_KEY_F23_ATX: - return Qt::Key_F23; - case KD_KEY_F24_ATX: - return Qt::Key_F24; -// KD_KEY_FINALMODE_ATX -// KD_KEY_FIND_ATX -// KD_KEY_FULLWIDTH_ATX -// KD_KEY_HALFWIDTH_ATX - case KD_KEY_HANGULMODE_ATX: - return Qt::Key_Hangul; -// KD_KEY_HANJAMODE_ATX - case KD_KEY_HELP_ATX: - return Qt::Key_Help; - case KD_KEY_HIRAGANA_ATX: - return Qt::Key_Hiragana; - case KD_KEY_HOME_ATX: - return Qt::Key_Home; - case KD_KEY_INSERT_ATX: - return Qt::Key_Insert; -// KD_KEY_JAPANESEHIRAGANA_ATX: -// KD_KEY_JAPANESEKATAKANA_ATX -// KD_KEY_JAPANESEROMAJI_ATX -// KD_KEY_JUNJAMODE_ATX - case KD_KEY_KANAMODE_ATX: - return Qt::Key_Kana_Lock; //? - case KD_KEY_KANJIMODE_ATX: - return Qt::Key_Kanji; -// KD_KEY_KATAKANA_ATX -// KD_KEY_LAUNCHAPPLICATION1_ATX -// KD_KEY_LAUNCHAPPLICATION2_ATX - case KD_KEY_LAUNCHMAIL_ATX: - return Qt::Key_MailForward; - case KD_KEY_LEFT_ATX: - return Qt::Key_Left; - case KD_KEY_META_ATX: - return Qt::Key_Meta; - case KD_KEY_MEDIANEXTTRACK_ATX: - return Qt::Key_MediaNext; - case KD_KEY_MEDIAPLAYPAUSE_ATX: - return Qt::Key_MediaPause; - case KD_KEY_MEDIAPREVIOUSTRACK_ATX: - return Qt::Key_MediaPrevious; - case KD_KEY_MEDIASTOP_ATX: - return Qt::Key_MediaStop; - case KD_KEY_MODECHANGE_ATX: - return Qt::Key_Mode_switch; -// KD_KEY_NONCONVERT_ATX - case KD_KEY_NUMLOCK_ATX: - return Qt::Key_NumLock; - case KD_KEY_PAGEDOWN_ATX: - return Qt::Key_PageDown; - case KD_KEY_PAGEUP_ATX: - return Qt::Key_PageUp; - case KD_KEY_PASTE_ATX: - return Qt::Key_Paste; - case KD_KEY_PAUSE_ATX: - return Qt::Key_Pause; - case KD_KEY_PLAY_ATX: - return Qt::Key_Play; -// KD_KEY_PREVIOUSCANDIDATE_ATX - case KD_KEY_PRINTSCREEN_ATX: - return Qt::Key_Print; -// case KD_KEY_PROCESS_ATX -// case KD_KEY_PROPS_ATX - case KD_KEY_RIGHT_ATX: - return Qt::Key_Right; -// KD_KEY_ROMANCHARACTERS_ATX - case KD_KEY_SCROLL_ATX: - return Qt::Key_ScrollLock; - case KD_KEY_SELECT_ATX: - return Qt::Key_Select; -// KD_KEY_SELECTMEDIA_ATX - case KD_KEY_SHIFT_ATX: - return Qt::Key_Shift; - case KD_KEY_STOP_ATX: - return Qt::Key_Stop; - case KD_KEY_UP_ATX: - return Qt::Key_Up; -// KD_KEY_UNDO_ATX - case KD_KEY_VOLUMEDOWN_ATX: - return Qt::Key_VolumeDown; - case KD_KEY_VOLUMEMUTE_ATX: - return Qt::Key_VolumeMute; - case KD_KEY_VOLUMEUP_ATX: - return Qt::Key_VolumeUp; - case KD_KEY_WIN_ATX: - return Qt::Key_Meta; - case KD_KEY_ZOOM_ATX: - return Qt::Key_Zoom; - case 0x8: - return Qt::Key_Backspace; - case 0x1b: - return Qt::Key_Escape; - case 0x9: - return Qt::Key_Tab; - - default: - break; - } - - return Qt::Key_Escape; -} - -QT_END_NAMESPACE -#endif //KD_ATX_keyboard -#endif // OPENKODEKEYTRANSLATOR_H diff --git a/src/plugins/platforms/openkode/qopenkodeeventloopintegration.cpp b/src/plugins/platforms/openkode/qopenkodeeventloopintegration.cpp deleted file mode 100644 index b0890ccbae..0000000000 --- a/src/plugins/platforms/openkode/qopenkodeeventloopintegration.cpp +++ /dev/null @@ -1,128 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qopenkodeeventloopintegration.h" - -#include - -#include -#include - -QT_BEGIN_NAMESPACE - -static const int QT_EVENT_WAKEUP_EVENTLOOP = KD_EVENT_USER + 1; - -void kdprocessevent( const KDEvent *event) -{ - switch (event->type) { - case KD_EVENT_INPUT: - qDebug() << "KD_EVENT_INPUT"; - break; - case KD_EVENT_INPUT_POINTER: - qDebug() << "KD_EVENT_INPUT_POINTER"; - break; - case KD_EVENT_WINDOW_CLOSE: - qDebug() << "KD_EVENT_WINDOW_CLOSE"; - break; - case KD_EVENT_WINDOWPROPERTY_CHANGE: - qDebug() << "KD_EVENT_WINDOWPROPERTY_CHANGE"; - qDebug() << event->data.windowproperty.pname; - break; - case KD_EVENT_WINDOW_FOCUS: - qDebug() << "KD_EVENT_WINDOW_FOCUS"; - break; - case KD_EVENT_WINDOW_REDRAW: - qDebug() << "KD_EVENT_WINDOW_REDRAW"; - break; - case KD_EVENT_USER: - qDebug() << "KD_EVENT_USER"; - break; - case KD_EVENT_INPUT_KEY_ATX: - qDebug() << "KD_EVENT_INPUT_KEY_ATX"; - break; - case QT_EVENT_WAKEUP_EVENTLOOP: - QPlatformEventLoopIntegration::processEvents(); - break; - default: - break; - } - - kdDefaultEvent(event); - -} - -QOpenKODEEventLoopIntegration::QOpenKODEEventLoopIntegration() - : m_quit(false) -{ - m_kdThread = kdThreadSelf(); - kdInstallCallback(&kdprocessevent,QT_EVENT_WAKEUP_EVENTLOOP,this); -} - -void QOpenKODEEventLoopIntegration::startEventLoop() -{ - - while(!m_quit) { - qint64 msec = nextTimerEvent(); - const KDEvent *event = kdWaitEvent(msec); - if (event) { - kdDefaultEvent(event); - while ((event = kdWaitEvent(0)) != 0) { - kdDefaultEvent(event); - } - } - QPlatformEventLoopIntegration::processEvents(); - } -} - -void QOpenKODEEventLoopIntegration::quitEventLoop() -{ - m_quit = true; -} - -void QOpenKODEEventLoopIntegration::qtNeedsToProcessEvents() -{ - KDEvent *event = kdCreateEvent(); - event->type = QT_EVENT_WAKEUP_EVENTLOOP; - event->userptr = this; - kdPostThreadEvent(event,m_kdThread); -} - -QT_END_NAMESPACE diff --git a/src/plugins/platforms/openkode/qopenkodeeventloopintegration.h b/src/plugins/platforms/openkode/qopenkodeeventloopintegration.h deleted file mode 100644 index 0ba0eb882f..0000000000 --- a/src/plugins/platforms/openkode/qopenkodeeventloopintegration.h +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QOPENKODEEVENTLOOPINTEGRATION_H -#define QOPENKODEEVENTLOOPINTEGRATION_H - -#include - -class KDThread; -class KDEvent; - -QT_BEGIN_HEADER -QT_BEGIN_NAMESPACE - -class QOpenKODEEventLoopIntegration : public QPlatformEventLoopIntegration -{ -public: - QOpenKODEEventLoopIntegration(); - void startEventLoop(); - void quitEventLoop(); - void qtNeedsToProcessEvents(); - - void processInputEvent(const KDEvent *event); -private: - - bool m_quit; - KDThread *m_kdThread; -}; - -QT_END_NAMESPACE -QT_END_HEADER - -#endif // QOPENKODEEVENTLOOPINTEGRATION_H diff --git a/src/plugins/platforms/openkode/qopenkodeintegration.cpp b/src/plugins/platforms/openkode/qopenkodeintegration.cpp deleted file mode 100644 index 705f332826..0000000000 --- a/src/plugins/platforms/openkode/qopenkodeintegration.cpp +++ /dev/null @@ -1,247 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qopenkodeintegration.h" -#include "qopenkodewindow.h" -#include "qopenkodeeventloopintegration.h" - -#include -#include - -#include - -#include -#include -#include - -#include "qgenericunixfontdatabase.h" - -#include -#include -#include - -#include - -#include "GLES2/gl2ext.h" - -QT_BEGIN_NAMESPACE - -QOpenKODEScreen::QOpenKODEScreen(KDDisplayNV *kdDisplay, KDDesktopNV *kdDesktop) - : mIsFullScreen(false) -{ - qDebug() << "QOpenKODEScreen::QOpenKODEIntegrationScreen()"; - - KDboolean enabled = KD_TRUE; - kdSetDisplayPropertybvNV(kdDisplay, - KD_DISPLAYPROPERTY_ENABLED_NV, - &enabled); - KDboolean power = KD_DISPLAY_POWER_ON; - kdSetDisplayPropertyivNV(kdDisplay, - KD_DISPLAYPROPERTY_POWER_NV, - &power); - - kdSetDisplayPropertycvNV(kdDisplay, - KD_DISPLAYPROPERTY_DESKTOP_NAME_NV, - KD_DEFAULT_DESKTOP_NV); - - KDDisplayModeNV mode; - if (kdGetDisplayModeNV(kdDisplay, &mode)) { - qErrnoWarning(kdGetError(), "Could not get display mode"); - return; - } - - qDebug() << " - display mode " << mode.width << "x" << mode.height << " refresh " << mode.refresh; - - KDint desktopSize[] = { mode.width, mode.height }; - - if (kdSetDesktopPropertyivNV(kdDesktop, KD_DESKTOPPROPERTY_SIZE_NV, desktopSize)) { - qErrnoWarning(kdGetError(), "Could not set desktop size"); - return; - } - - // Once we've set up the desktop and display we don't need them anymore - kdReleaseDisplayNV(kdDisplay); - kdReleaseDesktopNV(kdDesktop); - - mEglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY); - if (mEglDisplay == EGL_NO_DISPLAY) { - qErrnoWarning("EGL failed to obtain display"); - } - - /* Initialize EGL display */ - EGLBoolean rvbool = eglInitialize(mEglDisplay, 0, 0); - if (!rvbool) { - qErrnoWarning("EGL failed to initialize display"); - } - -// cursor = new QOpenKODECursor(this); - - mGeometry = QRect(0, 0, mode.width, mode.height); - mDepth = 24; - mFormat = QImage::Format_RGB32; - - -} - -QOpenKODEIntegration::QOpenKODEIntegration() - : mEventLoopIntegration(0) - , mFontDb(new QGenericUnixFontDatabase()) - , mMainGlContext(0) -{ - if (kdInitializeNV() == KD_ENOTINITIALIZED) { - qFatal("Did not manage to initialize openkode"); - } - - KDDisplaySystemNV *kdDisplaySystem = kdCreateDisplaySystemSnapshotNV(this); - KDint32 displayCount = 0; - kdGetDisplaySystemPropertyivNV(kdDisplaySystem, KD_DISPLAYPROPERTY_COUNT_NV, 0, &displayCount); - - for (int i = 0; i < displayCount; i++) { - KDchar *displayName = 0; - KDsize displayNameLength = 0; - kdGetDisplaySystemPropertycvNV(kdDisplaySystem,KD_DISPLAYPROPERTY_NAME_NV,i,0,&displayNameLength); - if (!displayNameLength) - continue; - displayName = new KDchar[displayNameLength]; - kdGetDisplaySystemPropertycvNV(kdDisplaySystem,KD_DISPLAYPROPERTY_NAME_NV,i,displayName,&displayNameLength); - - KDDisplayNV *display = kdGetDisplayNV(displayName,this); - if (!display || display == (void*)-1) { - qErrnoWarning(kdGetError(), "Could not obtain KDDisplayNV pointer"); - return; - } - if (displayNameLength) - delete[] displayName; - - KDchar *desktopName = 0; - KDsize desktopNameLength = 0; - bool openkodeImpDoesNotFail = false; - if (openkodeImpDoesNotFail) { - qDebug() << "printing desktopname"; - kdGetDisplayPropertycvNV(display,KD_DISPLAYPROPERTY_DESKTOP_NAME_NV,desktopName,&desktopNameLength); - if (desktopNameLength) { - desktopName = new KDchar[desktopNameLength]; - kdGetDisplayPropertycvNV(display,KD_DISPLAYPROPERTY_DESKTOP_NAME_NV,desktopName,&desktopNameLength); - } else { - desktopName = KD_DEFAULT_DESKTOP_NV; - } - } else { - desktopName = KD_DEFAULT_DESKTOP_NV; - } - - KDDesktopNV *desktop = kdGetDesktopNV(desktopName,this); - if (!desktop || desktop == (void*)-1) { - qErrnoWarning(kdGetError(), "Could not obtain KDDesktopNV pointer"); - kdReleaseDisplayNV(display); - return; - } - if (desktopNameLength) - delete desktopName; - - QOpenKODEScreen *screen = new QOpenKODEScreen(display,desktop); - mScreens.append(screen); - } -} - -QOpenKODEIntegration::~QOpenKODEIntegration() -{ - delete mEventLoopIntegration; - delete mFontDb; -} - - -bool QOpenKODEIntegration::hasCapability(QPlatformIntegration::Capability cap) const -{ - switch (cap) { - case ThreadedPixmaps: return true; - case OpenGL: return true; - default: return QPlatformIntegration::hasCapability(cap); - } -} - -QPlatformPixmap *QOpenKODEIntegration::createPlatformPixmap(QPlatformPixmap::PixelType type) const -{ - return new QGLPlatformPixmap(type); -} - -QPlatformWindow *QOpenKODEIntegration::createPlatformWindow(QWidget *tlw, WId ) const -{ - return new QOpenKODEWindow(tlw); -} - -QWindowSurface *QOpenKODEIntegration::createWindowSurface(QWidget *widget, WId) const -{ - QWindowSurface *returnSurface = 0; - switch (widget->platformWindowFormat().windowApi()) { - - case QPlatformWindowFormat::Raster: - case QPlatformWindowFormat::OpenGL: - returnSurface = new QGLWindowSurface(widget); - break; - - case QPlatformWindowFormat::OpenVG: -// returnSurface = new QVGWindowSurface(widget); -// break; - - default: - returnSurface = new QGLWindowSurface(widget); - break; - } - - return returnSurface; -} - -QPlatformEventLoopIntegration *QOpenKODEIntegration::createEventLoopIntegration() const -{ - if (!mEventLoopIntegration) { - QOpenKODEIntegration *that = const_cast(this); - that->mEventLoopIntegration = new QOpenKODEEventLoopIntegration; - } - return mEventLoopIntegration; -} - -QPlatformFontDatabase *QOpenKODEIntegration::fontDatabase() const -{ - return mFontDb; -} - - -QT_END_NAMESPACE diff --git a/src/plugins/platforms/openkode/qopenkodeintegration.h b/src/plugins/platforms/openkode/qopenkodeintegration.h deleted file mode 100644 index 31d76dcad7..0000000000 --- a/src/plugins/platforms/openkode/qopenkodeintegration.h +++ /dev/null @@ -1,120 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QGRAPHICSSYSTEM_OPENKODE_H -#define QGRAPHICSSYSTEM_OPENKODE_H - -#include "qopenkodeeventloopintegration.h" - -#include - -#include -#include -#include -#include - -#include -#include - -QT_BEGIN_HEADER -QT_BEGIN_NAMESPACE - -struct KDDesktopNV; -struct KDDisplayNV; -class QOpenKODECursor; - -class QOpenKODEScreen : public QPlatformScreen -{ - Q_OBJECT -public: - QOpenKODEScreen(KDDisplayNV *kdDisplay, KDDesktopNV *kdDesktop); - ~QOpenKODEScreen() {} - - QRect geometry() const { return mGeometry; } - int depth() const { return mDepth; } - QImage::Format format() const { return mFormat; } - - EGLDisplay eglDisplay() { return mEglDisplay; } - - bool isFullScreen() const {return mIsFullScreen;} - void setFullScreen(bool fullscreen) { mIsFullScreen = fullscreen; } -private: - QRect mGeometry; - int mDepth; - QImage::Format mFormat; - EGLDisplay mEglDisplay; - bool mIsFullScreen; -}; - -class QOpenKODEIntegration : public QPlatformIntegration -{ -public: - QOpenKODEIntegration(); - ~QOpenKODEIntegration(); - - bool hasCapability(QPlatformIntegration::Capability cap) const; - - QPlatformPixmap *createPlatformPixmap(QPlatformPixmap::PixelType type) const; - QPlatformWindow *createPlatformWindow(QWidget *widget, WId winId = 0) const; - QWindowSurface *createWindowSurface(QWidget *widget, WId winId) const; - - QPlatformEventLoopIntegration *createEventLoopIntegration() const; - - QPlatformFontDatabase *fontDatabase() const; - - virtual QList screens() const { return mScreens; } - - static GLuint blitterProgram(); - - void setMainGLContext(QEGLPlatformContext *ctx) { mMainGlContext = ctx; } - void mainGLContext() const { return mMainGlContext; } - -private: - QList mScreens; - QOpenKODEEventLoopIntegration *mEventLoopIntegration; - QPlatformFontDatabase *mFontDb; - QEGLPlatformContext *mMainGlContext; -}; - -QT_END_NAMESPACE -QT_END_HEADER - -#endif diff --git a/src/plugins/platforms/openkode/qopenkodewindow.cpp b/src/plugins/platforms/openkode/qopenkodewindow.cpp deleted file mode 100644 index 23bcd12440..0000000000 --- a/src/plugins/platforms/openkode/qopenkodewindow.cpp +++ /dev/null @@ -1,315 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qopenkodewindow.h" -#include "qopenkodeintegration.h" -#include "../eglconvenience/qeglplatformcontext.h" -#include "../eglconvenience/qeglconvenience.h" - -#include -#include -#include -#ifdef KD_ATX_keyboard -#include "openkodekeytranslator.h" -#endif - -#include - -#include -#include -#include - -#include -#include - -QT_BEGIN_NAMESPACE - -void kdProcessMouseEvents( const KDEvent *event ) -{ - QOpenKODEWindow *window = static_cast(event->userptr); - window->processMouseEvents(event); -} - -#ifdef KD_ATX_keyboard -void kdProcessKeyEvents( const KDEvent *event ) -{ - QOpenKODEWindow *window = static_cast(event->userptr); - window->processKeyEvents(event); -} -#endif //KD_ATX_keyboard - -QOpenKODEWindow::QOpenKODEWindow(QWidget *tlw) - : QPlatformWindow(tlw), isFullScreen(false) -{ - if (tlw->platformWindowFormat().windowApi() == QPlatformWindowFormat::OpenVG) { - m_eglApi = EGL_OPENVG_API; - } else { - m_eglContextAttrs.append(EGL_CONTEXT_CLIENT_VERSION); - m_eglContextAttrs.append(2); - - m_eglApi = EGL_OPENGL_ES_API; - } - eglBindAPI(m_eglApi); - - m_eglContextAttrs.append(EGL_NONE); - m_eglWindowAttrs.append(EGL_NONE); - - QList screens = QApplicationPrivate::platformIntegration()->screens(); - //XXXX: jl figure out how to pick the correct screen. -// Q_ASSERT(screens.size() > tlw->d_func()->screenNumber); -// QOpenKODEScreen *screen = qobject_cast(screens.at(tlw->d_func()->screenNumber)); - QOpenKODEScreen *screen = qobject_cast(screens.at(0)); - if (!screen) { - qErrnoWarning("Could not make QOpenKODEWindow without a screen"); - } - - QPlatformWindowFormat format = tlw->platformWindowFormat(); - format.setRedBufferSize(5); - format.setGreenBufferSize(6); - format.setBlueBufferSize(5); - - m_eglConfig = q_configFromQPlatformWindowFormat(screen->eglDisplay(),format); - - m_kdWindow = kdCreateWindow(screen->eglDisplay(), - m_eglConfig, - this); - kdInstallCallback(kdProcessMouseEvents,KD_EVENT_INPUT_POINTER,this); -#ifdef KD_ATX_keyboard - kdInstallCallback(kdProcessKeyEvents, KD_EVENT_INPUT_KEY_ATX,this); -#endif //KD_ATX_keyboard - - if (!m_kdWindow) { - qErrnoWarning(kdGetError(), "Error creating native window"); - return; - } - - KDboolean exclusive(false); - if (kdSetWindowPropertybv(m_kdWindow,KD_WINDOWPROPERTY_DESKTOP_EXCLUSIVE_NV, &exclusive)) { - isFullScreen = true; - } - - if (isFullScreen) { - tlw->setGeometry(screen->geometry()); - screen->setFullScreen(isFullScreen); - }else { - const KDint windowSize[2] = { tlw->width(), tlw->height() }; - if (kdSetWindowPropertyiv(m_kdWindow, KD_WINDOWPROPERTY_SIZE, windowSize)) { - qErrnoWarning(kdGetError(), "Could not set native window size"); - } - KDboolean visibillity(false); - if (kdSetWindowPropertybv(m_kdWindow, KD_WINDOWPROPERTY_VISIBILITY, &visibillity)) { - qErrnoWarning(kdGetError(), "Could not set visibillity to false"); - } - - const KDint windowPos[2] = { tlw->x(), tlw->y() }; - if (kdSetWindowPropertyiv(m_kdWindow, KD_WINDOWPROPERTY_DESKTOP_OFFSET_NV, windowPos)) { - qErrnoWarning(kdGetError(), "Could not set native window position"); - return; - } - } - - - QOpenKODEIntegration *integration = static_cast(QApplicationPrivate::platformIntegration()); - - if (!isFullScreen || (isFullScreen && !integration->mainGLContext())) { - if (kdRealizeWindow(m_kdWindow, &m_eglWindow)) { - qErrnoWarning(kdGetError(), "Could not realize native window"); - return; - } - - EGLSurface surface = eglCreateWindowSurface(screen->eglDisplay(),m_eglConfig,m_eglWindow,m_eglWindowAttrs.constData()); - m_platformGlContext = new QEGLPlatformContext(screen->eglDisplay(), m_eglConfig, - m_eglContextAttrs.data(), surface, m_eglApi); - integration->setMainGLContext(m_platformGLContext); - } else { - m_platformGlContext = integration->mainGLContext(); - kdDestroyWindow(m_kdWindow); - m_kdWindow = 0; - } -} - - -QOpenKODEWindow::~QOpenKODEWindow() -{ - if (m_platformGlContext != static_cast(QApplicationPrivate::platformIntegration())) { - delete m_platformGlContext; - } - if (m_kdWindow) - kdDestroyWindow(m_kdWindow); -} -void QOpenKODEWindow::setGeometry(const QRect &rect) -{ - if (isFullScreen) { - QList screens = QApplicationPrivate::platformIntegration()->screens(); - QOpenKODEScreen *screen = qobject_cast(screens.at(0)); - widget()->setGeometry(screen->geometry()); - return; - } - bool needToDeleteContext = false; - if (!isFullScreen) { - const QRect geo = geometry(); - if (geo.size() != rect.size()) { - const KDint windowSize[2] = { rect.width(), rect.height() }; - if (kdSetWindowPropertyiv(m_kdWindow, KD_WINDOWPROPERTY_SIZE, windowSize)) { - qErrnoWarning(kdGetError(), "Could not set native window size"); - //return; - } else { - needToDeleteContext = true; - } - } - - if (geo.topLeft() != rect.topLeft()) { - const KDint windowPos[2] = { rect.x(), rect.y() }; - if (kdSetWindowPropertyiv(m_kdWindow, KD_WINDOWPROPERTY_DESKTOP_OFFSET_NV, windowPos)) { - qErrnoWarning(kdGetError(), "Could not set native window position"); - //return; - } else { - needToDeleteContext = true; - } - } - } - - //need to recreate context - if (needToDeleteContext) { - delete m_platformGlContext; - - QList screens = QApplicationPrivate::platformIntegration()->screens(); - QOpenKODEScreen *screen = qobject_cast(screens.at(0)); - EGLSurface surface = eglCreateWindowSurface(screen->eglDisplay(),m_eglConfig,m_eglWindow,m_eglWindowAttrs.constData()); - m_platformGlContext = new QEGLPlatformContext(screen->eglDisplay(),m_eglConfig, - m_eglContextAttrs.data(),surface,m_eglApi); - } -} - -void QOpenKODEWindow::setVisible(bool visible) -{ - if (!m_kdWindow) - return; - KDboolean visibillity(visible); - if (kdSetWindowPropertybv(m_kdWindow, KD_WINDOWPROPERTY_VISIBILITY, &visibillity)) { - qErrnoWarning(kdGetError(), "Could not set visibillity property"); - } -} - -WId QOpenKODEWindow::winId() const -{ - static int i = 0; - return i++; -} - -QPlatformOpenGLContext *QOpenKODEWindow::glContext() const -{ - return m_platformGlContext; -} - -void QOpenKODEWindow::raise() -{ - if (!m_kdWindow) - return; - KDboolean focus(true); - if (kdSetWindowPropertybv(m_kdWindow, KD_WINDOWPROPERTY_FOCUS, &focus)) { - qErrnoWarning(kdGetError(), "Could not set focus"); - } -} - -void QOpenKODEWindow::lower() -{ - if (!m_kdWindow) - return; - KDboolean focus(false); - if (kdSetWindowPropertybv(m_kdWindow, KD_WINDOWPROPERTY_FOCUS, &focus)) { - qErrnoWarning(kdGetError(), "Could not set focus"); - } -} - -void QOpenKODEWindow::processMouseEvents(const KDEvent *event) -{ - int x = event->data.inputpointer.x; - int y = event->data.inputpointer.y; - Qt::MouseButtons buttons; - switch(event->data.inputpointer.select) { - case 1: - buttons = Qt::LeftButton; - break; - default: - buttons = Qt::NoButton; - } - QPoint pos(x,y); - QWindowSystemInterface::handleMouseEvent(0,event->timestamp,pos,pos,buttons); -} - -void QOpenKODEWindow::processKeyEvents(const KDEvent *event) -{ -#ifdef KD_ATX_keyboard - //KD_KEY_PRESS_ATX 1 - QEvent::Type keyPressed = QEvent::KeyRelease; - if (event->data.keyboardInputKey.flags) - keyPressed = QEvent::KeyPress; -//KD_KEY_LOCATION_LEFT_ATX // dont care for now -//KD_KEY_LOCATION_RIGHT_ATX -//KD_KEY_LOCATION_NUMPAD_ATX - Qt::KeyboardModifiers mod = Qt::NoModifier; - int openkodeMods = event->data.keyboardInputKey.flags; - if (openkodeMods & KD_KEY_MODIFIER_SHIFT_ATX) - mod |= Qt::ShiftModifier; - if (openkodeMods & KD_KEY_MODIFIER_CTRL_ATX) - mod |= Qt::ControlModifier; - if (openkodeMods & KD_KEY_MODIFIER_ALT_ATX) - mod |= Qt::AltModifier; - if (openkodeMods & KD_KEY_MODIFIER_META_ATX) - mod |= Qt::MetaModifier; - - Qt::Key qtKey; - QChar keyText; - int key = event->data.keyboardInputKey.keycode; - if (key >= 0x20 && key <= 0x0ff){ // 8 bit printable Latin1 - qtKey = Qt::Key(key); - keyText = QChar(event->data.keyboardInputKeyChar.character); - if (!(mod & Qt::ShiftModifier)) - keyText = keyText.toLower(); - } else { - qtKey = keyTranslator(key); - } - QWindowSystemInterface::handleKeyEvent(0,event->timestamp,keyPressed,qtKey,mod,keyText); -#endif -} - -QT_END_NAMESPACE diff --git a/src/plugins/platforms/openkode/qopenkodewindow.h b/src/plugins/platforms/openkode/qopenkodewindow.h deleted file mode 100644 index 7685350eb8..0000000000 --- a/src/plugins/platforms/openkode/qopenkodewindow.h +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QOPENKODEWINDOW_H -#define QOPENKODEWINDOW_H - -#include -#include - -#include - -QT_BEGIN_HEADER -QT_BEGIN_NAMESPACE - -class QEGLPlatformContext; -class QPlatformEventLoopIntegration; - -class QOpenKODEWindow : public QPlatformWindow -{ -public: - QOpenKODEWindow(QWidget *tlw); - ~QOpenKODEWindow(); - - void setGeometry(const QRect &rect); - void setVisible(bool visible); - WId winId() const; - - QPlatformOpenGLContext *glContext() const; - - void raise(); - void lower(); - - void processKeyEvents( const KDEvent *event ); - void processMouseEvents( const KDEvent *event ); - -private: - struct KDWindow *m_kdWindow; - EGLNativeWindowType m_eglWindow; - EGLConfig m_eglConfig; - QVector m_eglWindowAttrs; - QVector m_eglContextAttrs; - EGLenum m_eglApi; - QEGLPlatformContext *m_platformGlContext; - - bool isFullScreen; -}; - -QT_END_NAMESPACE -QT_END_HEADER - -#endif //QOPENKODEWINDOW_H diff --git a/src/plugins/platforms/openkode/resources.qrc b/src/plugins/platforms/openkode/resources.qrc deleted file mode 100644 index dbb34199ff..0000000000 --- a/src/plugins/platforms/openkode/resources.qrc +++ /dev/null @@ -1,6 +0,0 @@ - - - shaders/vert.glslv - shaders/frag.glslf - - diff --git a/src/plugins/platforms/openkode/shaders/frag.glslf b/src/plugins/platforms/openkode/shaders/frag.glslf deleted file mode 100644 index f657f4f926..0000000000 --- a/src/plugins/platforms/openkode/shaders/frag.glslf +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -uniform sampler2D tex_samp; - -varying vec2 texcoord_var; - -void main(void) -{ - gl_FragColor = texture2D(tex_samp, texcoord_var); -} diff --git a/src/plugins/platforms/openkode/shaders/vert.glslv b/src/plugins/platforms/openkode/shaders/vert.glslv deleted file mode 100644 index d7d6e15772..0000000000 --- a/src/plugins/platforms/openkode/shaders/vert.glslv +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the plugins of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL$ -** GNU Lesser General Public License Usage -** 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. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU General -** Public License version 3.0 as published by the Free Software Foundation -** and appearing in the file LICENSE.GPL included in the packaging of this -** file. Please review the following information to ensure the GNU General -** Public License version 3.0 requirements will be met: -** http://www.gnu.org/copyleft/gpl.html. -** -** Other Usage -** Alternatively, this file may be used in accordance with the terms and -** conditions contained in a signed written agreement between you and Nokia. -** -** -** -** -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -uniform vec2 window; // window size - -// Per-vertex attributes] -attribute vec2 pos_attr; -attribute vec2 texcoord_attr; - -// Output vertex color -varying vec2 texcoord_var; - -void main() -{ - gl_Position = vec4( (2.0 * pos_attr / window -1.0) * vec2(1.0, -1.0), 0.0, 1.0); - texcoord_var = texcoord_attr; -} -- cgit v1.2.3