qtubuntu-0.54+14.04.20140402/0000755000015301777760000000000012317074332015725 5ustar pbusernogroup00000000000000qtubuntu-0.54+14.04.20140402/tests/0000755000015301777760000000000012317074332017067 5ustar pbusernogroup00000000000000qtubuntu-0.54+14.04.20140402/tests/clipboard/0000755000015301777760000000000012317074332021026 5ustar pbusernogroup00000000000000qtubuntu-0.54+14.04.20140402/tests/clipboard/clipboard.pro0000644000015301777760000000013012317074055023503 0ustar pbusernogroup00000000000000QT += core gui TARGET = clipboard TEMPLATE = app SOURCES += clipboard.cc LIBS += -lrt qtubuntu-0.54+14.04.20140402/tests/clipboard/clipboard.cc0000644000015301777760000000405612317074055023303 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . #include #include #include enum Operation { kNone, kCopy, kPaste }; static void usage() { fprintf(stdout, "Usage: clipboard [options]\n\n" " Options:\n" " -c or --copy \"text\" ... Copy text to clipboard\n" " -p or --paste ... Paste text from clipboard\n" " -h or --help ... Show that help\n"); } int main(int argc, char* argv[]) { Operation operation = kNone; QString text; for (int i = 1; i < argc; ++i) { const QString kArg = QString::fromLatin1(argv[i]).toLower(); if ((kArg == QLatin1String("-c") || kArg == QLatin1String("--copy")) && i + 1 < argc) { operation = kCopy; text = QString::fromLatin1(argv[++i]); } else if (kArg == QLatin1String("-p") || kArg == QLatin1String("--paste")) { operation = kPaste; } else if (kArg == QLatin1String("-h") || kArg == QLatin1String("--help")) { usage(); return 1; } } if (operation == kNone) { usage(); return 1; } QGuiApplication app(argc, argv); if (operation == kCopy) { QGuiApplication::clipboard()->setText(text); fprintf(stdout, "Copied: \"%s\"\n", text.toLatin1().data()); } else { fprintf(stdout, "Pasted: \"%s\"\n", QGuiApplication::clipboard()->text().toLatin1().data()); } return 0; } qtubuntu-0.54+14.04.20140402/tests/MovingLogo.qml0000644000015301777760000000455312317074055021673 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU General Public License version 3, as published by the // Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. // // You should have received a copy of the GNU General Public License along with // this program. If not, see . import QtQuick 2.0 Item { id: surface // Hard-coded Samsung Galaxy Nexus screen size. width: 720 height: 1280 property real seed function lerp(x, a, b) { return ((1.0 - x) * a) + (x * b); } Item { id: scene anchors.fill: parent Image { id: logo source: "logo.png" SequentialAnimation on y { loops: Animation.Infinite NumberAnimation { from: 0.0; to: surface.height - logo.height duration: Math.floor(lerp(Math.random(surface.seed), 2250.0, 2750.0)) easing.type: Easing.InOutSine; } NumberAnimation { to: 0.0; from: surface.height - logo.height duration: Math.floor(lerp(Math.random(surface.seed), 2250.0, 2750.0)) easing.type: Easing.InOutSine; } } SequentialAnimation on x { loops: Animation.Infinite NumberAnimation { from: 0.0; to: surface.width - logo.width duration: Math.floor(lerp(Math.random(surface.seed), 1750.0, 2250.0)) easing.type: Easing.InOutSine; } NumberAnimation { to: 0.0; from: surface.width - logo.width duration: Math.floor(lerp(Math.random(surface.seed), 1750.0, 2250.0)) easing.type: Easing.InOutSine; } } } } Component.onCompleted: { var d = new Date(); surface.seed = d.getSeconds(); } } qtubuntu-0.54+14.04.20140402/tests/Input.qml0000644000015301777760000000543512317074055020712 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU General Public License version 3, as published by the // Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. // // You should have received a copy of the GNU General Public License along with // this program. If not, see . import QtQuick 2.0 Item { id: surface // Hard-coded Samsung Galaxy Nexus screen size. width: 720 height: 1280 // Needed for the key events to be emitted. focus: true MultiPointTouchArea { anchors.fill: parent touchPoints: [ TouchPoint { id: point1 }, TouchPoint { id: point2 }, TouchPoint { id: point3 }, TouchPoint { id: point4 }, TouchPoint { id: point5 } ] } // Touch elements. Text { font.family: "Ubuntu Mono"; font.weight: Font.Bold; font.pixelSize: 100; color: "#9F9F00" x: point5.x + 50; y: point5.y - 200 visible: point5.pressed text: "5" } Text { font.family: "Ubuntu Mono"; font.weight: Font.Bold; font.pixelSize: 100; color: "#AF00AF" x: point4.x + 50; y: point4.y - 200 visible: point4.pressed text: "4" } Text { font.family: "Ubuntu Mono"; font.weight: Font.Bold; font.pixelSize: 100; color: "#0000EF" x: point3.x + 50; y: point3.y - 200 visible: point3.pressed text: "3" } Text { font.family: "Ubuntu Mono"; font.weight: Font.Bold; font.pixelSize: 100; color: "#00FF00" x: point2.x + 50; y: point2.y - 200 visible: point2.pressed text: "2" } Text { font.family: "Ubuntu Mono"; font.weight: Font.Bold; font.pixelSize: 100; color: "#FF0000" x: point1.x + 50; y: point1.y - 200 visible: point1.pressed text: "1" } // Key elements. Text { id: keyText font.family: "Ubuntu Mono"; font.weight: Font.Bold; font.pixelSize: 75; color: "#DFDFDF" anchors.centerIn: surface visible: false text: "" } Keys.onPressed: { if (event.key == Qt.Key_PowerOff) keyText.text = "Power Off"; else if (event.key == Qt.Key_VolumeUp) keyText.text = "Volume Up"; else if (event.key == Qt.Key_VolumeDown) keyText.text = "Volume Down"; keyText.visible = true; } Keys.onReleased: { keyText.visible = false; } } qtubuntu-0.54+14.04.20140402/tests/WarpingLogo.qml0000644000015301777760000000552312317074055022041 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU General Public License version 3, as published by the // Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. // // You should have received a copy of the GNU General Public License along with // this program. If not, see . import QtQuick 2.0 Item { id: surface // Hard-coded Samsung Galaxy Nexus screen size. width: 720 height: 1280 property real displace SequentialAnimation on displace { loops: Animation.Infinite NumberAnimation { from: 0.0; to: 1.0; duration: 30000 } } Item { id: scene anchors.fill: parent Image { id: logo x: (scene.width - sourceSize.width) / 2 y: (scene.height - sourceSize.height) / 2 width: sourceSize.width height: sourceSize.height source: "logo.png" sourceSize: Qt.size(400, 400) } } ShaderEffect { property variant tex: ShaderEffectSource { sourceItem: scene; hideSource: true; live: false; smooth: true } property variant noise: ShaderEffectSource { sourceItem: Image { source: "noise.png"; smooth: true } wrapMode: ShaderEffectSource.Repeat } property variant size: Qt.size(scene.width, scene.height) property variant displace: surface.displace anchors.fill: parent blending: false vertexShader: " uniform mediump float displace; uniform mediump vec2 size; uniform mediump mat4 qt_Matrix; attribute mediump vec4 qt_Vertex; attribute mediump vec2 qt_MultiTexCoord0; varying mediump vec2 texCoord; varying mediump vec2 noiseCoord; void main() { texCoord = qt_MultiTexCoord0.xy; noiseCoord = vec2(qt_MultiTexCoord0.x * 0.25, qt_MultiTexCoord0.y * 0.25 + displace); gl_Position = qt_Matrix * qt_Vertex; }" fragmentShader: " uniform sampler2D noise; uniform sampler2D tex; varying mediump vec2 texCoord; varying mediump vec2 noiseCoord; void main() { mediump vec2 noiseVec = texture2D(noise, noiseCoord).xy; gl_FragColor = texture2D(tex, texCoord + ((noiseVec - 0.5) * 0.05)); }" } } qtubuntu-0.54+14.04.20140402/tests/Fullscreen.qml0000644000015301777760000000315312317074055021710 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU General Public License version 3, as published by the // Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. // // You should have received a copy of the GNU General Public License along with // this program. If not, see . // Non graphical test watching fullscreen states of main and side stages. import QtQuick 2.0 import Unity.Application 0.1 Item { Timer { id: time interval: 1000 repeat: true onTriggered: { if (ApplicationManager.mainStageFocusedApplication) { print(ApplicationManager.sideStageFocusedApplication.name, "in main stage is fullscreen: ", ApplicationManager.sideStageFocusedApplication.fullscreen) } if (ApplicationManager.sideStageFocusedApplication) { print(ApplicationManager.sideStageFocusedApplication.name, "in side stage is fullscreen: ", ApplicationManager.sideStageFocusedApplication.fullscreen) } } Component.onCompleted: time.start() } Component.onCompleted: { time.start() } } qtubuntu-0.54+14.04.20140402/tests/tests.pro0000644000015301777760000000037512317074055020762 0ustar pbusernogroup00000000000000TEMPLATE = subdirs SUBDIRS += qmlscene_ubuntu clipboard OTHER_FILES += *.qml logo.png noise.png target.path = $$[QT_INSTALL_EXAMPLES]/qtubuntu sources.path = $$[QT_INSTALL_EXAMPLES]/qtubuntu sources.files = $$OTHER_FILES tests.pro INSTALLS += target qtubuntu-0.54+14.04.20140402/tests/noise.png0000644000015301777760000027720312317074055020727 0ustar pbusernogroup00000000000000PNG  IHDR?1sRGB pHYs  tIME &e IDATx<{mȎ;2+ff$h:-{󺫒kA?q~y?ckY2/RR N#G_O Qo ^nZkU[MZp>&Y؄?^󪙥{ |~|5"~p52Ӳzvg0MmYf6r.99LJn=XT}{៲=?p|z2^_WW%䍾+g93ved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*/'JEh2)Ěrk{ZC RJaC3p- OoYVz*<)C }eM:$ ]YÙ÷P '}>m<z(-.wC訁KZ*Fvs7N6l!W7դ&$lP: C)1Y],.}q>(IpV;}6(OݏBM͗AZe`0&n\ s5z@!t(S H&hJ@]< !anfD>Yy"t\P^C2p4#t3 ΂PDs&BD?4"]LdBrH+~vkrHcD'0SkPEeST!IENDB`qtubuntu-0.54+14.04.20140402/tests/Application.qml0000644000015301777760000001265312317074055022056 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU General Public License version 3, as published by the // Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. // // You should have received a copy of the GNU General Public License along with // this program. If not, see . // That example demonstrates the types added by the Ubuntu application plugin and how to use them. // // Here is how to create a window with specific surface role (Greeter here) from QML. // // import QtQuick.Window 2.0 // // Window { // width: 400 // height: 400 // Component.onCompleted: { // window.role = ApplicationManager.Greeter // window.visible = true // } // } // // Here is how to start a new process: // ApplicationManager.startProcess("snowshoe") // // In order to pass additional arguments, a second optional argument can be used: // ApplicationManager.startProcess("snowshoe", [ "http://www.ubuntu.com" ]) // // An application can be stopped by using: // ApplicationManager.stopProcess(application) // // In order to focus or start a favorite application, that function can be used: // ApplicationManager.focusFavoriteApplication(ApplicationManager.GalleryApplication); // // A good way to use Application.qml is to launch it using: // qmlscene-ubuntu --fullscreen --session 1 --role 0 Application.qml // and then to launch other applications using: // qmlscene-ubuntu --session 0 --role 1 MovingLogo.qml \ // --desktop_file_hint=/usr/share/applications/goodhope.desktop --stage_hint=main_stage import QtQuick 2.0 import Unity.Application 0.1 Rectangle { id: surface width: 2560 height: 1600 color: "#000020" Connections { target: ApplicationManager onFocusRequested: { var favoriteApplicationStr = [ 'CameraApplication', 'GalleryApplication', 'BrowserApplication', 'ShareApplication' ]; print("focus request:", favoriteApplicationStr[favoriteApplication]) } } MouseArea { id: touchArea anchors.fill: parent onClicked: { // ApplicationManager.focusFavoriteApplication(ApplicationManager.BrowserApplication); } } Column { id: mainHeader anchors { left: parent.left right: parent.right } spacing: 10 Text { font.family: "Ubuntu Mono"; font.weight: Font.Bold; font.pixelSize: 40; color: "white" text: "Main stage:" } } Row { id: mainRow anchors { top: mainHeader.bottom topMargin: 10 } Repeater { model: ApplicationManager.mainStageApplications delegate: ApplicationImage { id: applicationImage width: 2560 / 5; height: 1600 / 5 source: application Text { font.family: "Ubuntu Mono"; font.weight: Font.Bold; font.pixelSize: 30; color: "white" text: application.name } MouseArea { anchors.fill: parent onClicked: applicationImage.scheduleUpdate() } Timer { running: true onTriggered: applicationImage.scheduleUpdate() } } } } Column { id: sideHeader y: surface.height / 2 anchors { left: parent.left right: parent.right } spacing: 10 Text { font.family: "Ubuntu Mono"; font.weight: Font.Bold; font.pixelSize: 40; color: "white" text: "Side stage:" } } Row { anchors { top: sideHeader.bottom topMargin: 10 } Repeater { model: ApplicationManager.sideStageApplications delegate: ApplicationImage { id: applicationImage width: 2560 / 5; height: 1600 / 5 source: application Text { font.family: "Ubuntu Mono"; font.weight: Font.Bold; font.pixelSize: 30; color: "white" text: application.name } MouseArea { anchors.fill: parent onClicked: applicationImage.scheduleUpdate() } Timer { running: true onTriggered: applicationImage.scheduleUpdate() } } } } Component.onCompleted: { // Display form factor and stage hints. var formFactorHintStr = [ 'Desktop', 'Phone', 'Tablet' ]; var stageHintStr = [ 'Main', 'Integration', 'Share', 'ContentPicking', 'Side', 'Configuration' ]; print('Form factor hint:', formFactorHintStr[ApplicationManager.formFactorHint]); print('Stage hint:', stageHintStr[ApplicationManager.stageHint]); } } qtubuntu-0.54+14.04.20140402/tests/qmlscene_ubuntu/0000755000015301777760000000000012317074332022300 5ustar pbusernogroup00000000000000qtubuntu-0.54+14.04.20140402/tests/qmlscene_ubuntu/qmlscene_ubuntu.pro0000644000015301777760000000037512317074055026242 0ustar pbusernogroup00000000000000QT += core quick qml gui-private TARGET = qmlscene-ubuntu TEMPLATE = app HEADERS += qmlscene_ubuntu.h SOURCES += qmlscene_ubuntu.cc LIBS += -lrt sources.path = $$[QT_INSTALL_EXAMPLES]/qtubuntu sources.files = $$HEADERS $$SOURCES qmlscene_ubuntu.pro qtubuntu-0.54+14.04.20140402/tests/qmlscene_ubuntu/qmlscene_ubuntu.h0000644000015301777760000000207212317074055025665 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU General Public License version 3, as published by the // Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. // // You should have received a copy of the GNU General Public License along with // this program. If not, see . #include class Scene : public QObject { Q_OBJECT public: Scene(QObject* parent = 0); void getStats(int* frames, double* min, double* max, double* average); private slots: void beforeRendering(); void afterRendering(); private: struct timespec t1_; struct timespec t2_; qint64 frames_; double sum_; double min_; double max_; }; qtubuntu-0.54+14.04.20140402/tests/qmlscene_ubuntu/qmlscene_ubuntu.cc0000644000015301777760000001253012317074055026023 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU General Public License version 3, as published by the // Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. // // You should have received a copy of the GNU General Public License along with // this program. If not, see . #include "qmlscene_ubuntu.h" #include #include #include #include #include #include #include #include #include Scene::Scene(QObject* parent) : QObject(parent) , frames_(0) , sum_(0.0) , min_(DBL_MAX) , max_(0.0) { } void Scene::beforeRendering() { clock_gettime(CLOCK_MONOTONIC, &t1_); } void Scene::afterRendering() { clock_gettime(CLOCK_MONOTONIC, &t2_); double time = ((t2_.tv_sec * 1000000000 + t2_.tv_nsec) - (t1_.tv_sec * 1000000000 + t1_.tv_nsec)) / 1000000.0; if (time < min_) min_ = time; if (time > max_) max_ = time; sum_ += time; frames_++; } void Scene::getStats(int* frames, double* min, double* max, double* average) { *frames = frames_; *min = min_; *max = max_; *average = sum_ / frames_; } static void usage() { fprintf(stdout, "Usage: qmlscene-ubuntu [options] \n\n" " Options:\n" " -i ... Add to the list of import paths\n" " -f or --fullscreen ... Show the window fullscreen\n" " -m or --maximized ... Show the window maximized\n" " -s or --session ... Set the Ubuntu session type\n" " -r or --role ... Set the Ubuntu surface role\n" " -o or --opaque ... Set the Ubuntu opaque surface flag\n" " -h or --help ... Show that help\n"); } // static void logger(QtMsgType type, const char* msg) { // Q_UNUSED(type); // Q_UNUSED(msg); // } static void signalHandler(int signal) { switch (signal) { case SIGINT: case SIGTERM: { QGuiApplication::quit(); break; } default: { break; } } } int main(int argc, char* argv[]) { QQuickView* view; int exit_code; QUrl url; QStringList imports; bool fullscreen = false; bool maximized = false; int session = 0; int role = 1; int opaque = 0; for (int i = 1; i < argc; ++i) { if (QFileInfo(QFile::decodeName(argv[i])).exists()) { url = QUrl::fromLocalFile(argv[i]); } else { const QString kArg = QString::fromLatin1(argv[i]).toLower(); if (kArg == QLatin1String("-i") && i + 1 < argc) { imports.append(QString::fromLatin1(argv[++i])); } else if (kArg == QLatin1String("-f") || kArg == QLatin1String("--fullscreen")) { fullscreen = true; } else if (kArg == QLatin1String("-m") || kArg == QLatin1String("--maximized")) { maximized = true; } else if ((kArg == QLatin1String("-s") || kArg == QLatin1String("--session")) && i + 1 < argc) { session = atoi(argv[++i]); } else if ((kArg == QLatin1String("-r") || kArg == QLatin1String("--role")) && i + 1 < argc) { role = atoi(argv[++i]); } else if ((kArg == QLatin1String("-o") || kArg == QLatin1String("--opaque")) && i + 1 < argc) { opaque = atoi(argv[++i]); } else if (kArg == QLatin1String("-h") || kArg == QLatin1String("--help")) { usage(); return 0; } } } if (url.isEmpty()) { usage(); return 1; } // Swallow all the messages to avoid cluttering the standard output. // qInstallMsgHandler(logger); signal(SIGINT, signalHandler); signal(SIGTERM, signalHandler); QGuiApplication app(argc, argv); app.setApplicationName("QmlSceneUbuntu"); app.setOrganizationName("Canonical"); app.setOrganizationDomain("canonical.com"); view = new QQuickView(); QPlatformNativeInterface* native = QGuiApplication::platformNativeInterface(); native->setProperty("session", session); view->setProperty("role", role); view->setProperty("opaque", opaque); QQmlEngine* engine = view->engine(); for (int i = 0; i < imports.size(); ++i) engine->addImportPath(imports.at(i)); view->setColor(Qt::transparent); view->setTitle("QML Scene Ubuntu"); view->setResizeMode(QQuickView::SizeRootObjectToView); view->setSource(url); if (fullscreen) view->showFullScreen(); else if (maximized) view->showMaximized(); else view->show(); Scene scene; QObject::connect(view, SIGNAL(beforeRendering()), &scene, SLOT(beforeRendering())); QObject::connect(view, SIGNAL(afterRendering()), &scene, SLOT(afterRendering())); exit_code = app.exec(); delete view; int frames; double min, max, average; scene.getStats(&frames, &min, &max, &average); fprintf(stdout, "Over %d frames\nmin: %.2lf ms\nmax: %.2lf ms\navg: %.2lf ms\n", frames, min, max, average); return exit_code; } qtubuntu-0.54+14.04.20140402/tests/InputFilter.qml0000644000015301777760000000367712317074055022066 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU General Public License version 3, as published by the // Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. // // You should have received a copy of the GNU General Public License along with // this program. If not, see . import QtQuick 2.0 import Unity.Application 0.1 Item { width: 700; height: 700 InputFilterArea { id: topLeftFilter width: 500 height: 500 blockInput: true Rectangle { anchors.fill: parent color: parent.blockInput ? "red" : "green" opacity: parent.blockInput ? 1.0 : 0.8 } } MouseArea { anchors.centerIn: parent width: 500 height: 200 onClicked: { topLeftFilter.blockInput = !topLeftFilter.blockInput; bottomRightFilter.blockInput = !bottomRightFilter.blockInput; } Rectangle { anchors.fill: parent color: "grey" } Text { anchors.centerIn: parent text: "Press to toggle filters" font.pixelSize: 45 color: "lightgrey" } } InputFilterArea { id: bottomRightFilter anchors.right: parent.right anchors.bottom: parent.bottom width: 500 height: 500 blockInput: true Rectangle { anchors.fill: parent color: parent.blockInput ? "red" : "green" opacity: parent.blockInput ? 1.0 : 0.8 } } } qtubuntu-0.54+14.04.20140402/tests/Logo.qml0000644000015301777760000000147512317074055020513 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU General Public License version 3, as published by the // Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // General Public License for more details. // // You should have received a copy of the GNU General Public License along with // this program. If not, see . import QtQuick 2.0 Item { width: 720; height: 1280 Image { anchors.fill: parent; source: "logo.png" } } qtubuntu-0.54+14.04.20140402/TODO0000644000015301777760000000002612317074055016415 0ustar pbusernogroup00000000000000To do ----- Empty! qtubuntu-0.54+14.04.20140402/qtubuntu.pro0000644000015301777760000000033212317074055020336 0ustar pbusernogroup00000000000000load(configure) load(qt_parts) # FIXME(loicm) I don't get why qmake automatically detects src/ but not # tests/. Doing it that way makes make warn about the generated Makefile. TEMPLATE = subdirs SUBDIRS += tests qtubuntu-0.54+14.04.20140402/COPYING0000644000015301777760000010451312317074055016766 0ustar pbusernogroup00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . qtubuntu-0.54+14.04.20140402/src/0000755000015301777760000000000012317074332016514 5ustar pbusernogroup00000000000000qtubuntu-0.54+14.04.20140402/src/src.pro0000644000015301777760000000005112317074055020023 0ustar pbusernogroup00000000000000TEMPLATE = subdirs SUBDIRS += platforms qtubuntu-0.54+14.04.20140402/src/platforms/0000755000015301777760000000000012317074332020523 5ustar pbusernogroup00000000000000qtubuntu-0.54+14.04.20140402/src/platforms/ubuntulegacy/0000755000015301777760000000000012317074332023232 5ustar pbusernogroup00000000000000qtubuntu-0.54+14.04.20140402/src/platforms/ubuntulegacy/ubuntulegacy.pro0000644000015301777760000000135112317074055026465 0ustar pbusernogroup00000000000000TARGET = qubuntulegacy TEMPLATE = lib QT += core-private gui-private platformsupport-private DEFINES += MESA_EGL_NO_X11_HEADERS QMAKE_CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden QMAKE_LFLAGS += -Wl,-no-undefined CONFIG(debug) { QMAKE_CXXFLAGS_DEBUG += -Werror } SOURCES = main.cc \ integration.cc \ window.cc \ screen.cc \ input.cc HEADERS = integration.h \ window.h \ screen.h \ input.h CONFIG += plugin link_prl PRE_TARGETDEPS = ../base/libubuntubase.a INCLUDEPATH += .. /usr/include/hybris LIBS += -L../base -lubuntubase -lhybris_ics -lsf -lis OTHER_FILES += ubuntulegacy.json target.path += $$[QT_INSTALL_PLUGINS]/platforms INSTALLS += target qtubuntu-0.54+14.04.20140402/src/platforms/ubuntulegacy/window.h0000644000015301777760000000261312317074055024716 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #ifndef QUBUNTULEGACYWINDOW_H #define QUBUNTULEGACYWINDOW_H #include "base/window.h" struct SfClient; struct SfSurface; class QUbuntuLegacyScreen; class QUbuntuLegacyWindow : public QUbuntuBaseWindow { public: QUbuntuLegacyWindow(QWindow* w, QUbuntuLegacyScreen* screen); ~QUbuntuLegacyWindow(); // QPlatformWindow methods. void setGeometry(const QRect&); void setWindowState(Qt::WindowState state); void setOpacity(qreal level); void raise(); void lower(); private: void moveResize(const QRect& rect); QUbuntuLegacyScreen* screen_; SfSurface* sfSurface_; Qt::WindowState state_; QRect geometry_; int layer_; }; #endif // QUBUNTULEGACYWINDOW_H qtubuntu-0.54+14.04.20140402/src/platforms/ubuntulegacy/screen.cc0000644000015301777760000000301612317074055025022 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #include "screen.h" #include "base/logging.h" #include QUbuntuLegacyScreen::QUbuntuLegacyScreen() { const int kScreenWidth = sf_get_display_width(SURFACE_FLINGER_DEFAULT_DISPLAY_ID); const int kScreenHeight = sf_get_display_height(SURFACE_FLINGER_DEFAULT_DISPLAY_ID); ASSERT(kScreenWidth > 0 && kScreenHeight > 0); geometry_ = QRect(0, 0, kScreenWidth, kScreenHeight); ASSERT((sfClient_ = sf_client_create_full(false)) != NULL); DLOG("QUbuntuLegacyScreen::QUbuntuLegacyScreen (this=%p)", this); } QUbuntuLegacyScreen::~QUbuntuLegacyScreen() { DLOG("QUbuntuLegacyScreen::~QUbuntuLegacyScreen"); // FIXME(loicm) Invalid because the struct is forward declarated, we need a way to clean the // handle correctly. // delete sfClient_; } qtubuntu-0.54+14.04.20140402/src/platforms/ubuntulegacy/integration.h0000644000015301777760000000341312317074055025731 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #ifndef QUBUNTULEGACYINTEGRATION_H #define QUBUNTULEGACYINTEGRATION_H #include "base/integration.h" #include "screen.h" class QUbuntuLegacyInput; class QUbuntuLegacyIntegration : public QObject, public QUbuntuBaseIntegration { Q_OBJECT public: QUbuntuLegacyIntegration(); ~QUbuntuLegacyIntegration(); // QPlatformIntegration methods. QPlatformWindow* createPlatformWindow(QWindow* window) const; QPlatformWindow* createPlatformWindow(QWindow* window); QPlatformInputContext* inputContext() const { return inputContext_; } QPlatformClipboard* clipboard() const { return clipboard_; } // New methods. // FIXME(loicm) Only one window can be created for now, remove that function when adding support // for multiple windows. QPlatformWindow* platformWindow() const { return window_; } private slots: void initInput(); private: QPlatformWindow* window_; QPlatformScreen* screen_; QUbuntuLegacyInput* input_; QPlatformInputContext* inputContext_; QPlatformClipboard* clipboard_; }; #endif // QUBUNTULEGACYINTEGRATION_H qtubuntu-0.54+14.04.20140402/src/platforms/ubuntulegacy/integration.cc0000644000015301777760000000566012317074055026075 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #include "integration.h" #include "window.h" #include "input.h" #include "base/clipboard.h" #include "base/logging.h" #include #include #include // That value seems to work on every systems and applications tested so far. static const int kInputDelay = 1000; QUbuntuLegacyIntegration::QUbuntuLegacyIntegration() : window_(NULL) , screen_(new QUbuntuLegacyScreen()) , input_(NULL) , clipboard_(new QUbuntuBaseClipboard()) { screenAdded(screen_); if (qEnvironmentVariableIsEmpty("QTUBUNTU_NO_INPUT")) { // Input initialization needs to be delayed in order to avoid crashes in the input stack. int delay = kInputDelay; QByteArray swapIntervalString = qgetenv("QTUBUNTU_INPUT_DELAY"); if (!swapIntervalString.isEmpty()) { bool valid; delay = qMax(1, swapIntervalString.toInt(&valid)); if (!valid) delay = kInputDelay; } DLOG("delaying input initialization for %d ms", delay); QTimer::singleShot(delay, this, SLOT(initInput())); } DLOG("QUbuntuLegacyIntegration::QUbuntuLegacyIntegration (this=%p)", this); } QUbuntuLegacyIntegration::~QUbuntuLegacyIntegration() { DLOG("QUbuntuLegacyIntegration::~QUbuntuLegacyIntegration"); delete clipboard_; delete input_; delete inputContext_; delete screen_; } void QUbuntuLegacyIntegration::initInput() { DLOG("QUbuntuLegacyIntegration::initInput (this=%p)", this); input_ = new QUbuntuLegacyInput(this); inputContext_ = QPlatformInputContextFactory::create(); } QPlatformWindow* QUbuntuLegacyIntegration::createPlatformWindow(QWindow* window) const { DLOG("QUbuntuLegacyIntegration::createPlatformWindow const (this=%p, window=%p)", this, window); return const_cast(this)->createPlatformWindow(window); } QPlatformWindow* QUbuntuLegacyIntegration::createPlatformWindow(QWindow* window) { DLOG("QUbuntuLegacyIntegration::createPlatformWindow (this=%p, window=%p)", this, window); ASSERT(window_ == NULL); // FIXME(loicm) Multiple windows are not supported yet. window_ = new QUbuntuLegacyWindow(window, static_cast(screen_)); window_->requestActivateWindow(); return window_; } qtubuntu-0.54+14.04.20140402/src/platforms/ubuntulegacy/ubuntulegacy.json0000644000015301777760000000004312317074055026633 0ustar pbusernogroup00000000000000{ "Keys": [ "ubuntulegacy" ] } qtubuntu-0.54+14.04.20140402/src/platforms/ubuntulegacy/screen.h0000644000015301777760000000225312317074055024666 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #ifndef QUBUNTULEGACYSCREEN_H #define QUBUNTULEGACYSCREEN_H #include "base/screen.h" struct SfClient; class QUbuntuLegacyScreen : public QUbuntuBaseScreen { public: QUbuntuLegacyScreen(); ~QUbuntuLegacyScreen(); // QPlatformScreen methods. QRect geometry() const { return geometry_; } // New methods. SfClient* sfClient() const { return sfClient_; } private: QRect geometry_; SfClient* sfClient_; }; #endif // QUBUNTULEGACYSCREEN_H qtubuntu-0.54+14.04.20140402/src/platforms/ubuntulegacy/input.cc0000644000015301777760000000430712317074055024706 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #include "input.h" #include "integration.h" #include "base/logging.h" #include static void eventCallback(Event* event, void* context) { DLOG("eventCallback (event=%p, context=%p)", event, context); QUbuntuLegacyInput* input = static_cast(context); if (!input->stopping_.testAndSetRelease(1, 1)) { // FIXME(loicm) We need to be able to retrieve the window from an event in order to support // multiple surfaces. QPlatformWindow* window = static_cast( input->integration())->platformWindow(); if (window) { input->postEvent(window->window(), event); } } } QUbuntuLegacyInput::QUbuntuLegacyInput(QUbuntuLegacyIntegration* integration) : QUbuntuBaseInput(integration) , stopping_(0) { config_.enable_touch_point_visualization = false; config_.default_layer_for_touch_point_visualization = 1; listener_.on_new_event = eventCallback; listener_.context = this; DLOG("initializing input stack"); android_input_stack_initialize(&listener_, &config_); DLOG("starting input stack"); android_input_stack_start(); DLOG("QUbuntuLegacyInput::QUbuntuLegacyInput (this=%p, integration=%p)", this, integration); } QUbuntuLegacyInput::~QUbuntuLegacyInput() { DLOG("QUbuntuLegacyInput::~QUbuntuLegacyInput"); stopping_.fetchAndStoreRelease(1); DLOG("stopping input stack"); android_input_stack_stop(); DLOG("shutting down input stack"); android_input_stack_shutdown(); } qtubuntu-0.54+14.04.20140402/src/platforms/ubuntulegacy/window.cc0000644000015301777760000001131512317074055025053 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #include "window.h" #include "screen.h" #include "base/logging.h" #include #include QUbuntuLegacyWindow::QUbuntuLegacyWindow(QWindow* w, QUbuntuLegacyScreen* screen) : QUbuntuBaseWindow(w, screen) , geometry_(window()->geometry()) , layer_((INT_MAX / 2) + winId()) { // FIXME(loicm) SF compat set_size() function doesn't seem to work as expected, surfaces are // created fullscreen and never resized for now. QRect screenGeometry(screen->availableGeometry()); SfSurfaceCreationParameters parameters = { screenGeometry.x(), screenGeometry.y(), screenGeometry.width(), screenGeometry.height(), -1, layer_, 1.0f, false, "QUbuntuLegacyWindow" }; // SfSurfaceCreationParameters parameters = { // geometry_.x(), geometry_.y(), geometry_.width(), geometry_.height(), -1, layer_, 1.0f, false, // "QUbuntuLegacyWindow" // }; ASSERT((sfSurface_ = sf_surface_create(screen->sfClient(), ¶meters)) != NULL); createEGLSurface(sf_surface_get_egl_native_window(sfSurface_)); setWindowState(window()->windowState()); DLOG("QUbuntuLegacyWindow::QUbuntuLegacyWindow (this=%p, w=%p, screen=%p)", this, w, screen); } QUbuntuLegacyWindow::~QUbuntuLegacyWindow() { DLOG("QUbuntuLegacyWindow::~QUbuntuLegacyWindow"); destroyEGLSurface(); // FIXME(loicm) Invalid because the struct is forward declarated, we need a way to clean the // handle correctly. // delete sfSurface_; } void QUbuntuLegacyWindow::setWindowState(Qt::WindowState state) { if (state == state_) return; switch (state) { case Qt::WindowNoState: { DLOG("QUbuntuLegacyWindow::setWindowState (this=%p, state='NoState')", this); moveResize(geometry_); state_ = Qt::WindowNoState; break; } case Qt::WindowFullScreen: { DLOG("QUbuntuLegacyWindow::setWindowState (this=%p, state='FullScreen')", this); QRect screenGeometry(screen()->availableGeometry()); moveResize(screenGeometry); state_ = Qt::WindowFullScreen; break; } case Qt::WindowActive: case Qt::WindowMinimized: case Qt::WindowMaximized: default: { DLOG("QUbuntuLegacyWindow::setWindowState (this=%p, state='Active|Minimized|Maximized')", this); break; } } } void QUbuntuLegacyWindow::setGeometry(const QRect& rect) { DLOG("QUbuntuLegacyWindow::setGeometry (this=%p)", this); geometry_ = rect; if (state_ != Qt::WindowFullScreen) moveResize(rect); } void QUbuntuLegacyWindow::setOpacity(qreal level) { DLOG("QUbuntuLegacyWindow::setOpacity (this=%p, level=%.2f)", this, level); sf_client_begin_transaction(screen_->sfClient()); sf_surface_set_alpha(sfSurface_, level); sf_client_end_transaction(screen_->sfClient()); } void QUbuntuLegacyWindow::raise() { DLOG("QUbuntuLegacyWindow::raise (this=%p)", this); layer_ = qMax(0, qMin(layer_ + 1, INT_MAX)); sf_client_begin_transaction(screen_->sfClient()); sf_surface_set_layer(sfSurface_, layer_); sf_client_end_transaction(screen_->sfClient()); } void QUbuntuLegacyWindow::lower() { DLOG("QUbuntuLegacyWindow::lower (this=%p)", this); layer_ = qMax(0, qMin(layer_ - 1, INT_MAX)); sf_client_begin_transaction(screen_->sfClient()); sf_surface_set_alpha(sfSurface_, layer_); sf_client_end_transaction(screen_->sfClient()); } void QUbuntuLegacyWindow::moveResize(const QRect& rect) { DLOG("QUbuntuLegacyWindow::moveResize (this=%p, x=%d, y=%d, w=%d, h=%d)", this, rect.x(), rect.y(), rect.width(), rect.height()); // FIXME(loicm) SF compat set_size() function doesn't seem to work as expected, surfaces are // created fullscreen and never moved nor resized for now. // sf_client_begin_transaction(screen_->sfClient()); // sf_surface_move_to(sfSurface_, rect.x(), rect.y()); // sf_surface_set_size(sfSurface_, rect.width(), rect.height()); // sf_client_end_transaction(screen_->sfClient()); QWindowSystemInterface::handleGeometryChange(window(), rect); QPlatformWindow::setGeometry(rect); } qtubuntu-0.54+14.04.20140402/src/platforms/ubuntulegacy/main.cc0000644000015301777760000000300312317074055024463 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #include #include "integration.h" QT_BEGIN_NAMESPACE class QUbuntuLegacyIntegrationPlugin : public QPlatformIntegrationPlugin { Q_OBJECT Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "ubuntulegacy.json") public: QStringList keys() const; QPlatformIntegration* create(const QString&, const QStringList&); }; QStringList QUbuntuLegacyIntegrationPlugin::keys() const { QStringList list; list << "ubuntulegacy"; return list; } QPlatformIntegration* QUbuntuLegacyIntegrationPlugin::create( const QString& system, const QStringList& paramList) { Q_UNUSED(paramList); if (system.toLower() == "ubuntulegacy") return new QUbuntuLegacyIntegration(); return 0; } QT_END_NAMESPACE #include "main.moc" qtubuntu-0.54+14.04.20140402/src/platforms/ubuntulegacy/input.h0000644000015301777760000000237212317074055024550 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #ifndef QUBUNTULEGACYINPUT_H #define QUBUNTULEGACYINPUT_H #include "base/input.h" #include // input_stack_compatibility_layer.h needs this for size_t. #include class QUbuntuLegacyIntegration; class QUbuntuLegacyInput : public QUbuntuBaseInput { public: QUbuntuLegacyInput(QUbuntuLegacyIntegration* integration); ~QUbuntuLegacyInput(); QAtomicInt stopping_; private: InputStackConfiguration config_; AndroidEventListener listener_; }; #endif // QUBUNTULEGACYINPUT_H qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/0000755000015301777760000000000012317074332022045 5ustar pbusernogroup00000000000000qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntu.pro0000644000015301777760000000030012317074055024104 0ustar pbusernogroup00000000000000TEMPLATE = subdirs !mirclient:!mirserver { CONFIG += hybris } hybris { SUBDIRS += ubuntu } SUBDIRS += ubuntucommon ubuntumir ubuntu.depends = ubuntucommon ubuntumir.depends = ubuntucommon qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntu/0000755000015301777760000000000012317074332023367 5ustar pbusernogroup00000000000000qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntu/ubuntu.json0000644000015301777760000000003512317074055025604 0ustar pbusernogroup00000000000000{ "Keys": [ "ubuntu" ] } qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntu/ubuntu.pro0000644000015301777760000000106612317074055025440 0ustar pbusernogroup00000000000000TARGET = qubuntu TEMPLATE = lib QT += gui-private platformsupport-private sensors DEFINES += MESA_EGL_NO_X11_HEADERS QMAKE_CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden QMAKE_LFLAGS += -Wl,-no-undefined CONFIG(debug) { QMAKE_CXXFLAGS_DEBUG += -Werror } SOURCES = main.cc CONFIG += plugin link_prl link_pkgconfig PKGCONFIG += egl INCLUDEPATH += ../../ ../ LIBS += -L../ubuntucommon -lqubuntucommon -lubuntu_application_api -L../../base -lubuntubase OTHER_FILES += ubuntu.json target.path += $$[QT_INSTALL_PLUGINS]/platforms INSTALLS += target qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntu/main.cc0000644000015301777760000000373212317074055024631 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #include #include "ubuntucommon/integration.h" #include "ubuntucommon/input.h" #include "ubuntucommon/input_adaptor_factory.h" namespace { struct InputAdaptorFactory : public QUbuntuInputAdaptorFactory { InputAdaptorFactory() {} ~InputAdaptorFactory() {} QUbuntuInput* create_input_adaptor(QUbuntuIntegration *integration){ return new QUbuntuInput(integration); } static InputAdaptorFactory* instance(){ static InputAdaptorFactory global_instance; return &global_instance; } }; } QT_BEGIN_NAMESPACE class QUbuntuIntegrationPlugin : public QPlatformIntegrationPlugin { Q_OBJECT Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "ubuntu.json") public: QStringList keys() const; QPlatformIntegration* create(const QString&, const QStringList&); }; QStringList QUbuntuIntegrationPlugin::keys() const { QStringList list; list << "ubuntu"; return list; } QPlatformIntegration* QUbuntuIntegrationPlugin::create( const QString& system, const QStringList& paramList) { Q_UNUSED(paramList); if (system.toLower() == "ubuntu") return new QUbuntuIntegration(InputAdaptorFactory::instance()); return 0; } QT_END_NAMESPACE #include "main.moc" qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntumir/0000755000015301777760000000000012317074332024077 5ustar pbusernogroup00000000000000qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntumir/ubuntumirserver/0000755000015301777760000000000012317074332027360 5ustar pbusernogroup00000000000000qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntumir/ubuntumirserver/ubuntumirserver.json0000644000015301777760000000004612317074055033536 0ustar pbusernogroup00000000000000{ "Keys": [ "ubuntumirserver" ] } qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntumir/ubuntumirserver/ubuntumirserver.pro0000644000015301777760000000125612317074055033371 0ustar pbusernogroup00000000000000TARGET = qubuntumirserver TEMPLATE = lib QT += gui-private platformsupport-private sensors DEFINES += MESA_EGL_NO_X11_HEADERS QMAKE_CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden QMAKE_LFLAGS += -Wl,-no-undefined CONFIG(debug) { QMAKE_CXXFLAGS_DEBUG += -Werror } SOURCES = main.cc CONFIG += plugin link_prl link_pkgconfig PKGCONFIG += egl INCLUDEPATH += ../../../ ../../ ../ LIBS += -Wl,--whole-archive -L../../../base -lubuntubase -L../../ubuntucommon -lqubuntucommon -L../ubuntumircommon -lqubuntumircommon -Wl,--no-whole-archive -lubuntu_application_api_mirserver OTHER_FILES += ubuntu.json target.path += $$[QT_INSTALL_PLUGINS]/platforms INSTALLS += target qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntumir/ubuntumirserver/main.cc0000644000015301777760000000304212317074055030614 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #include #include "ubuntumircommon/integration.h" QT_BEGIN_NAMESPACE class QUbuntuMirServerIntegrationPlugin : public QPlatformIntegrationPlugin { Q_OBJECT Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "ubuntumirserver.json") public: QStringList keys() const; QPlatformIntegration* create(const QString&, const QStringList&); }; QStringList QUbuntuMirServerIntegrationPlugin::keys() const { QStringList list; list << "ubuntumirserver"; return list; } QPlatformIntegration* QUbuntuMirServerIntegrationPlugin::create( const QString& system, const QStringList& paramList) { Q_UNUSED(paramList); if (system.toLower() == "ubuntumirserver") return new QUbuntuMirIntegration(); return 0; } QT_END_NAMESPACE #include "main.moc" qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntumir/ubuntumirclient/0000755000015301777760000000000012317074332027330 5ustar pbusernogroup00000000000000qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntumir/ubuntumirclient/ubuntumirclient.json0000644000015301777760000000004612317074055033456 0ustar pbusernogroup00000000000000{ "Keys": [ "ubuntumirclient" ] } qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntumir/ubuntumirclient/ubuntumirclient.pro0000644000015301777760000000126712317074055033313 0ustar pbusernogroup00000000000000TARGET = qubuntumirclient TEMPLATE = lib QT += gui-private platformsupport-private sensors DEFINES += MESA_EGL_NO_X11_HEADERS QMAKE_CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden QMAKE_LFLAGS += -Wl,-no-undefined CONFIG(debug) { QMAKE_CXXFLAGS_DEBUG += -Werror } SOURCES = main.cc CONFIG += plugin link_prl link_pkgconfig PKGCONFIG += egl INCLUDEPATH += ../../../ ../../ ../ LIBS += -Wl,--whole-archive -L../../../base -lubuntubase -L../../ubuntucommon -lqubuntucommon -L../ubuntumircommon -lqubuntumircommon -Wl,--no-whole-archive -lubuntu_application_api_mirclient OTHER_FILES += ubuntumirclient.json target.path += $$[QT_INSTALL_PLUGINS]/platforms INSTALLS += target qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntumir/ubuntumirclient/main.cc0000644000015301777760000000304212317074055030564 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #include #include "ubuntumircommon/integration.h" QT_BEGIN_NAMESPACE class QUbuntuMirClientIntegrationPlugin : public QPlatformIntegrationPlugin { Q_OBJECT Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "ubuntumirclient.json") public: QStringList keys() const; QPlatformIntegration* create(const QString&, const QStringList&); }; QStringList QUbuntuMirClientIntegrationPlugin::keys() const { QStringList list; list << "ubuntumirclient"; return list; } QPlatformIntegration* QUbuntuMirClientIntegrationPlugin::create( const QString& system, const QStringList& paramList) { Q_UNUSED(paramList); if (system.toLower() == "ubuntumirclient") return new QUbuntuMirIntegration(); return 0; } QT_END_NAMESPACE #include "main.moc" qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntumir/ubuntumircommon/0000755000015301777760000000000012317074332027342 5ustar pbusernogroup00000000000000qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntumir/ubuntumircommon/ubuntumircommon.pro0000644000015301777760000000075512317074055033340 0ustar pbusernogroup00000000000000TARGET = qubuntumircommon TEMPLATE = lib QT += core-private gui-private DEFINES += MESA_EGL_NO_X11_HEADERS QMAKE_CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden QMAKE_LFLAGS += -Wl,-no-undefined -L../ubuntucommon CONFIG(debug) { QMAKE_CXXFLAGS_DEBUG += -Werror } SOURCES = input.cc integration.cc HEADERS = input.h integration.h CONFIG += static plugin create_prl link_prl INCLUDEPATH += ../../../ ../../ LIBS += -Wl,--whole-archive -lqubuntucommon -Wl,--no-whole-archive qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntumir/ubuntumircommon/integration.h0000644000015301777760000000175712317074055032052 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #ifndef QUBUNTU_MIR_INTEGRATION_H #define QUBUNTU_MIR_INTEGRATION_H #include "ubuntucommon/integration.h" class QUbuntuMirIntegration : public QUbuntuIntegration { public: QUbuntuMirIntegration(); ~QUbuntuMirIntegration(); }; #endif // QUBUNTU_MIR_INTEGRATION_H qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntumir/ubuntumircommon/integration.cc0000644000015301777760000000254612317074055032205 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #include "input.h" #include "integration.h" #include "ubuntucommon/input_adaptor_factory.h" namespace { struct InputAdaptorFactory : public QUbuntuInputAdaptorFactory { InputAdaptorFactory() {} ~InputAdaptorFactory() {} QUbuntuInput *create_input_adaptor(QUbuntuIntegration* integration) { return new QUbuntuMirInput(integration); } static InputAdaptorFactory* instance() { static InputAdaptorFactory global_instance; return &global_instance; } }; } QUbuntuMirIntegration::QUbuntuMirIntegration() : QUbuntuIntegration(InputAdaptorFactory::instance()) { } QUbuntuMirIntegration::~QUbuntuMirIntegration() { } qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntumir/ubuntumircommon/input.cc0000644000015301777760000001615712317074055031024 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #include "input.h" #include "integration.h" #include "base/logging.h" #include #include #include #include #include #include #include #include // XKB Keysyms which do not map directly to Qt types (i.e. Unicode points) static const uint32_t KeyTable[] = { XKB_KEY_Escape, Qt::Key_Escape, XKB_KEY_Tab, Qt::Key_Tab, XKB_KEY_ISO_Left_Tab, Qt::Key_Backtab, XKB_KEY_BackSpace, Qt::Key_Backspace, XKB_KEY_Return, Qt::Key_Return, XKB_KEY_Insert, Qt::Key_Insert, XKB_KEY_Delete, Qt::Key_Delete, XKB_KEY_Clear, Qt::Key_Delete, XKB_KEY_Pause, Qt::Key_Pause, XKB_KEY_Print, Qt::Key_Print, XKB_KEY_Home, Qt::Key_Home, XKB_KEY_End, Qt::Key_End, XKB_KEY_Left, Qt::Key_Left, XKB_KEY_Up, Qt::Key_Up, XKB_KEY_Right, Qt::Key_Right, XKB_KEY_Down, Qt::Key_Down, XKB_KEY_Prior, Qt::Key_PageUp, XKB_KEY_Next, Qt::Key_PageDown, XKB_KEY_Shift_L, Qt::Key_Shift, XKB_KEY_Shift_R, Qt::Key_Shift, XKB_KEY_Shift_Lock, Qt::Key_Shift, XKB_KEY_Control_L, Qt::Key_Control, XKB_KEY_Control_R, Qt::Key_Control, XKB_KEY_Meta_L, Qt::Key_Meta, XKB_KEY_Meta_R, Qt::Key_Meta, XKB_KEY_Alt_L, Qt::Key_Alt, XKB_KEY_Alt_R, Qt::Key_Alt, XKB_KEY_Caps_Lock, Qt::Key_CapsLock, XKB_KEY_Num_Lock, Qt::Key_NumLock, XKB_KEY_Scroll_Lock, Qt::Key_ScrollLock, XKB_KEY_Super_L, Qt::Key_Super_L, XKB_KEY_Super_R, Qt::Key_Super_R, XKB_KEY_Menu, Qt::Key_Menu, XKB_KEY_Hyper_L, Qt::Key_Hyper_L, XKB_KEY_Hyper_R, Qt::Key_Hyper_R, XKB_KEY_Help, Qt::Key_Help, XKB_KEY_KP_Space, Qt::Key_Space, XKB_KEY_KP_Tab, Qt::Key_Tab, XKB_KEY_KP_Enter, Qt::Key_Enter, XKB_KEY_KP_Home, Qt::Key_Home, XKB_KEY_KP_Left, Qt::Key_Left, XKB_KEY_KP_Up, Qt::Key_Up, XKB_KEY_KP_Right, Qt::Key_Right, XKB_KEY_KP_Down, Qt::Key_Down, XKB_KEY_KP_Prior, Qt::Key_PageUp, XKB_KEY_KP_Next, Qt::Key_PageDown, XKB_KEY_KP_End, Qt::Key_End, XKB_KEY_KP_Begin, Qt::Key_Clear, XKB_KEY_KP_Insert, Qt::Key_Insert, XKB_KEY_KP_Delete, Qt::Key_Delete, XKB_KEY_KP_Equal, Qt::Key_Equal, XKB_KEY_KP_Multiply, Qt::Key_Asterisk, XKB_KEY_KP_Add, Qt::Key_Plus, XKB_KEY_KP_Separator, Qt::Key_Comma, XKB_KEY_KP_Subtract, Qt::Key_Minus, XKB_KEY_KP_Decimal, Qt::Key_Period, XKB_KEY_KP_Divide, Qt::Key_Slash, XKB_KEY_ISO_Level3_Shift, Qt::Key_AltGr, XKB_KEY_Multi_key, Qt::Key_Multi_key, XKB_KEY_Codeinput, Qt::Key_Codeinput, XKB_KEY_SingleCandidate, Qt::Key_SingleCandidate, XKB_KEY_MultipleCandidate, Qt::Key_MultipleCandidate, XKB_KEY_PreviousCandidate, Qt::Key_PreviousCandidate, XKB_KEY_Mode_switch, Qt::Key_Mode_switch, XKB_KEY_script_switch, Qt::Key_Mode_switch, XKB_KEY_XF86AudioRaiseVolume, Qt::Key_VolumeUp, XKB_KEY_XF86AudioLowerVolume, Qt::Key_VolumeDown, XKB_KEY_XF86PowerOff, Qt::Key_PowerOff, XKB_KEY_XF86PowerDown, Qt::Key_PowerDown, 0, 0 }; QUbuntuMirInput::QUbuntuMirInput(QUbuntuIntegration* integration) : QUbuntuInput(integration) { } QUbuntuMirInput::~QUbuntuMirInput() { } static uint32_t translateKeysym(uint32_t sym, char *string, size_t size) { Q_UNUSED(size); string[0] = '\0'; if (sym >= XKB_KEY_F1 && sym <= XKB_KEY_F35) return Qt::Key_F1 + (int(sym) - XKB_KEY_F1); for (int i = 0; KeyTable[i]; i += 2) if (sym == KeyTable[i]) return KeyTable[i + 1]; string[0] = sym; string[1] = '\0'; return toupper(sym); } void QUbuntuMirInput::dispatchKeyEvent(QWindow* window, const void* ev) { DLOG("QUbuntuBaseInput::dispatchKeyEvent (this=%p, window=%p, event=%p)", this, window, ev); const Event* event = reinterpret_cast(ev); #if (LOG_EVENTS != 0) // Key event logging. LOG("KEY device_id:%d source_id:%d action:%d flags:%d meta_state:%d key_code:%d " "scan_code:%d repeat_count:%d down_time:%lld event_time:%lld is_system_key:%d", event->device_id, event->source_id, event->action, event->flags, event->meta_state, event->details.key.key_code, event->details.key.scan_code, event->details.key.repeat_count, event->details.key.down_time, event->details.key.event_time, event->details.key.is_system_key); #endif ulong timestamp = event->details.key.event_time / 1000000; xkb_keysym_t xk_sym = (xkb_keysym_t)event->details.key.key_code; // Key modifier and unicode index mapping. const int kMetaState = event->meta_state; Qt::KeyboardModifiers modifiers = Qt::NoModifier; if (kMetaState & U_KEY_MODIFIER_SHIFT) { modifiers |= Qt::ShiftModifier; } if (kMetaState & U_KEY_MODIFIER_CTRL) { modifiers |= Qt::ControlModifier; } if (kMetaState & U_KEY_MODIFIER_ALT) { modifiers |= Qt::AltModifier; } if (kMetaState & U_KEY_MODIFIER_META) { modifiers |= Qt::MetaModifier; } QEvent::Type keyType = event->action == U_KEY_ACTION_DOWN ? QEvent::KeyPress : QEvent::KeyRelease; char s[2]; int sym = translateKeysym(xk_sym, s, sizeof(s)); QString text = QString::fromLatin1(s); QPlatformInputContext* context = QGuiApplicationPrivate::platformIntegration()->inputContext(); if (context) { QKeyEvent qKeyEvent(keyType, sym, modifiers, text); qKeyEvent.setTimestamp(timestamp); if (context->filterEvent(&qKeyEvent)) { DLOG("key event filtered out by input context"); return; } } handleKeyEvent(window, timestamp, keyType, sym, modifiers, text); } qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntumir/ubuntumircommon/input.h0000644000015301777760000000210112317074055030646 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #ifndef QUBUNTU_MIR_INPUT_H #define QUBUNTU_MIR_INPUT_H #include "ubuntucommon/input.h" class QUbuntuIntegration; class QUbuntuMirInput : public QUbuntuInput { public: QUbuntuMirInput(QUbuntuIntegration* integration); ~QUbuntuMirInput(); virtual void dispatchKeyEvent(QWindow* window, const void* event); }; #endif // QUBUNTU_MIR_INPUT_H qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntumir/ubuntumir.pro0000644000015301777760000000035712317074055026662 0ustar pbusernogroup00000000000000TEMPLATE = subdirs mirclient|mirserver{ SUBDIRS += ubuntumircommon } mirclient { SUBDIRS += ubuntumirclient } mirserver { SUBDIRS += ubuntumirserver } ubuntumirclient.depends = ubuntumircommon ubuntumirserver.depends = ubuntumircommon qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntucommon/0000755000015301777760000000000012317074332024600 5ustar pbusernogroup00000000000000qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntucommon/window.h0000644000015301777760000000317112317074055026264 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #ifndef QUBUNTUWINDOW_H #define QUBUNTUWINDOW_H #include "base/window.h" #include #include #define IS_OPAQUE_FLAG 1 class QUbuntuScreen; class QUbuntuInput; class QUbuntuWindow : public QUbuntuBaseWindow { public: QUbuntuWindow(QWindow* w, QUbuntuScreen* screen, QUbuntuInput* input, bool systemSession, UApplicationInstance* instance, bool isShell); ~QUbuntuWindow(); // QPlatformWindow methods. void setGeometry(const QRect&); void setWindowState(Qt::WindowState state); void setVisible(bool visible); QUbuntuInput* input_; private: void createWindow(); void moveResize(const QRect& rect); UAUiWindow* window_; Qt::WindowState state_; QRect geometry_; bool systemSession_; UApplicationInstance* uainstance_; UAUiWindowProperties* wprops_; QUbuntuScreen* screen_; bool isShell_; }; #endif // QUBUNTUWINDOW_H qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntucommon/clipboard.cc0000644000015301777760000001141712317074055027054 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . // FIXME(loicm) The clipboard data format is not defined by Ubuntu Platform API // which makes it impossible to have non-Qt applications communicate with Qt // applications through the clipboard API. The solution would be to have // Ubuntu Platform define the data format or propose an API that supports // embedding different mime types in the clipboard. // Data format: // number of mime types (4 bytes) // data layout (16 bytes * number of mime types) // mime type string offset (4 bytes) // mime type string size (4 bytes) // data offset (4 bytes) // data size (4 bytes) // data (n bytes) #include "clipboard.h" #include "base/logging.h" #include #include #include const int maxFormatsCount = 16; const int maxBufferSize = 4 * 1024 * 1024; // 4 Mb QUbuntuClipboard::QUbuntuClipboard() : QUbuntuBaseClipboard() , mimeData_(new QMimeData()) { DLOG("QUbuntuClipboard::QUbuntuClipboard (this=%p)", this); } QUbuntuClipboard::~QUbuntuClipboard() { DLOG("QUbuntuClipboard::~QUbuntuClipboard"); delete mimeData_; } QMimeData* QUbuntuClipboard::mimeData(QClipboard::Mode mode) { Q_UNUSED(mode); DLOG("QUbuntuClipboard::mimeData (this=%p, mode=%d)", this, static_cast(mode)); // Get clipboard data. void* data = NULL; size_t size = 0; ua_ui_get_clipboard_content(&data, &size); // Deserialize, update and return mime data taking care of incorrectly // formatted input. mimeData_->clear(); if (static_cast(size) > sizeof(int) // Should be at least that big to read the count. && data != NULL) { const char* const buffer = reinterpret_cast(data); const int* const header = reinterpret_cast(data); const int count = qMin(header[0], maxFormatsCount); for (int i = 0; i < count; i++) { const unsigned int formatOffset = header[i*4+1]; const unsigned int formatSize = header[i*4+2]; const unsigned int dataOffset = header[i*4+3]; const unsigned int dataSize = header[i*4+4]; if (formatOffset + formatSize <= size && dataOffset + dataSize <= size) { mimeData_->setData(QString(&buffer[formatOffset]), QByteArray(&buffer[dataOffset], dataSize)); } } } return mimeData_; } void QUbuntuClipboard::setMimeData(QMimeData* mimeData, QClipboard::Mode mode) { Q_UNUSED(mode); DLOG("QUbuntuClipboard::setMimeData (this=%p, data=%p, mode=%d)", this, mimeData, static_cast(mode)); if (mimeData == NULL) { ua_ui_set_clipboard_content(NULL, 0); return; } const QStringList formats = mimeData->formats(); const int count = qMin(formats.size(), maxFormatsCount); const int headerSize = sizeof(int) + count * 4 * sizeof(int); int bufferSize = headerSize; char* buffer; // Get the buffer size considering the header size, the NULL-terminated // formats and the non NULL-terminated data. for (int i = 0; i < count; i++) bufferSize += formats[i].size() + 1 + mimeData->data(formats[i]).size(); // FIXME(loicm) Implement max buffer size limitation. // FIXME(loicm) Remove ASSERT before release. ASSERT(bufferSize <= maxBufferSize); // Serialize data. buffer = new char[bufferSize]; int* header = reinterpret_cast(buffer); int offset = headerSize; header[0] = count; for (int i = 0; i < count; i++) { const int formatOffset = offset; const int formatSize = formats[i].size() + 1; const int dataOffset = offset + formatSize; const int dataSize = mimeData->data(formats[i]).size(); memcpy(&buffer[formatOffset], formats[i].toLatin1().data(), formatSize); memcpy(&buffer[dataOffset], mimeData->data(formats[i]).data(), dataSize); header[i*4+1] = formatOffset; header[i*4+2] = formatSize; header[i*4+3] = dataOffset; header[i*4+4] = dataSize; offset += formatSize + dataSize; } // Set clipboard content. ua_ui_set_clipboard_content(reinterpret_cast(buffer), bufferSize); delete [] buffer; } qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntucommon/screen.cc0000644000015301777760000001647212317074055026402 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . // Unit conversion code has been extracted from the Ubuntu UI toolkit. #include "screen.h" #include "base/logging.h" #include #include #include #include #include #include #include #include #include class OrientationReadingEvent : public QEvent { public: OrientationReadingEvent(QEvent::Type type, QOrientationReading::Orientation orientation) : QEvent(type) , orientation_(orientation) { DLOG("OrientationReadingEvent::OrientationReadingEvent()"); } ~OrientationReadingEvent() { DLOG("OrientationReadingEvent::~OrientationReadingEvent()"); } static const QEvent::Type type_; QOrientationReading::Orientation orientation_; }; const QEvent::Type OrientationReadingEvent::type_ = static_cast(QEvent::registerEventType()); // Grid unit used if GRID_UNIT_PX is not in the environment. const int kDefaultGridUnit = 8; // Size of the side stage in grid units. // FIXME(loicm) Hard-coded to 40 grid units for now. const int kSideStageWidth = 40; // Lifted from shell to determine form factor const int kTabletMinSize = 100; QUbuntuScreen::QUbuntuScreen(UApplicationOptions *options) { // Retrieve units from the environment. int gridUnit = kDefaultGridUnit; QByteArray gridUnitString = qgetenv("GRID_UNIT_PX"); if (!gridUnitString.isEmpty()) { bool ok; gridUnit = gridUnitString.toInt(&ok); if (!ok) { gridUnit = kDefaultGridUnit; } } gridUnit_ = gridUnit; densityPixelRatio_ = static_cast(gridUnit) / kDefaultGridUnit; DLOG("grid unit is %d", gridUnit); DLOG("density pixel ratio is %.2f", densityPixelRatio_); // Compute menubar strut. // FIXME(loicm) Hard-coded to 3 grid units plus 2 density independent pixels for now. struct { int left; int right; int top; int bottom; } strut = { 0, 0, gridUnitToPixel(3) + densityPixelToPixel(2), 0 }; DLOG("menu bar height is %d pixels", strut.top); // Get screen resolution. UAUiDisplay* display = ua_ui_display_new_with_index(0); const int kScreenWidth = ua_ui_display_query_horizontal_res(display); const int kScreenHeight = ua_ui_display_query_vertical_res(display); ASSERT(kScreenWidth > 0 && kScreenHeight > 0); DLOG("screen resolution: %dx%d", kScreenWidth, kScreenHeight); ua_ui_display_destroy(display); // Store geometries depending on the stage hint. UAUiStage kStageHint = static_cast(u_application_options_get_stage(options)); if (kScreenWidth/gridUnit < kTabletMinSize) kStageHint = U_MAIN_STAGE; DASSERT(kStageHint == U_MAIN_STAGE || kStageHint == U_SIDE_STAGE); if (kStageHint != U_SIDE_STAGE) { geometry_ = QRect(0, 0, kScreenWidth, kScreenHeight); availableGeometry_ = QRect( strut.left, strut.top, kScreenWidth - strut.left - strut.right, kScreenHeight - strut.top - strut.bottom); } else { const int kSideStageWidthPixels = gridUnitToPixel(kSideStageWidth); geometry_ = QRect(kScreenWidth - kSideStageWidthPixels, 0, kSideStageWidthPixels, kScreenHeight); availableGeometry_ = QRect( kScreenWidth - kSideStageWidthPixels + strut.left, strut.top, kSideStageWidthPixels - strut.left - strut.right, kScreenHeight - strut.top - strut.bottom); } DLOG("QUbuntuScreen::QUbuntuScreen (this=%p)", this); // Set the default orientation based on the initial screen dimmensions. nativeOrientation_ = (availableGeometry_.width() >= availableGeometry_.height()) ? Qt::LandscapeOrientation : Qt::PortraitOrientation; // If it's a landscape device (i.e. some tablets), start in landscape, otherwise portrait currentOrientation_ = (nativeOrientation_ == Qt::LandscapeOrientation) ? Qt::LandscapeOrientation : Qt::PortraitOrientation; orientationSensor_ = new QOrientationSensor(); QObject::connect(orientationSensor_, SIGNAL(readingChanged()), this, SLOT(onOrientationReadingChanged())); orientationSensor_->start(); } QUbuntuScreen::~QUbuntuScreen() { DLOG("QUbuntuScreen::~QUbuntuScreen"); delete orientationSensor_; } void QUbuntuScreen::toggleSensors(bool enable) const { DLOG("QUbuntuScreen::toggleSensors (this=%p, enable=%d)", this, enable); if (enable) orientationSensor_->start(); else orientationSensor_->stop(); } int QUbuntuScreen::gridUnitToPixel(int value) const { DLOG("QUbuntuScreen::gridUnitToPixel (this=%p, value=%d)", this, value); return value * gridUnit_; } int QUbuntuScreen::densityPixelToPixel(int value) const { DLOG("QUbuntuScreen::densityPixelToPixel (this=%p, value=%d)", this, value); if (value <= 2) { // For values under 2dp, return only multiples of the value. return static_cast(value * qFloor(densityPixelRatio_)); } else { return static_cast(qRound(value * densityPixelRatio_)); } } void QUbuntuScreen::customEvent(QEvent* event) { DLOG("QUbuntuScreen::customEvent (event: %p)", event); DASSERT(QThread::currentThread() == thread()); OrientationReadingEvent* oReadingEvent = static_cast(event); switch (oReadingEvent->orientation_) { case QOrientationReading::LeftUp: { currentOrientation_ = (nativeOrientation_ == Qt::LandscapeOrientation) ? Qt::InvertedPortraitOrientation : Qt::LandscapeOrientation; break; } case QOrientationReading::TopUp: { currentOrientation_ = (nativeOrientation_ == Qt::LandscapeOrientation) ? Qt::LandscapeOrientation : Qt::PortraitOrientation; break; } case QOrientationReading::RightUp: { currentOrientation_ = (nativeOrientation_ == Qt::LandscapeOrientation) ? Qt::PortraitOrientation : Qt::InvertedLandscapeOrientation; break; } case QOrientationReading::TopDown: { currentOrientation_ = (nativeOrientation_ == Qt::LandscapeOrientation) ? Qt::InvertedLandscapeOrientation : Qt::InvertedPortraitOrientation; break; } default: { DLOG("Unknown orientation."); } } // Raise the event signal so that client apps know the orientation changed QWindowSystemInterface::handleScreenOrientationChange(screen(), currentOrientation_); } void QUbuntuScreen::onOrientationReadingChanged() { DLOG("QUbuntuScreen::onOrientationReadingChanged"); DASSERT(orientationSensor_ != NULL); // Make sure to switch to the main Qt thread context QCoreApplication::postEvent(this, new OrientationReadingEvent( OrientationReadingEvent::type_, orientationSensor_->reading()->orientation())); } qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntucommon/integration.h0000644000015301777760000000351312317074055027300 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #ifndef QUBUNTUINTEGRATION_H #define QUBUNTUINTEGRATION_H #include "base/integration.h" #include "screen.h" #include #include class QUbuntuInputAdaptorFactory; class QUbuntuInput; class QUbuntuIntegration : public QUbuntuBaseIntegration { public: QUbuntuIntegration(QUbuntuInputAdaptorFactory* input_factory); ~QUbuntuIntegration(); // QPlatformIntegration methods. QPlatformWindow* createPlatformWindow(QWindow* window) const; QPlatformWindow* createPlatformWindow(QWindow* window); QPlatformInputContext* inputContext() const { return inputContext_; } QPlatformClipboard* clipboard() const { return clipboard_; } QUbuntuScreen* screen() const { return screen_; } private: int argc_; char** argv_; QUbuntuScreen* screen_; QUbuntuInput* input_; QPlatformInputContext* inputContext_; QPlatformClipboard* clipboard_; bool isShell_; UApplicationOptions* options_; UApplicationDescription* desc_; UApplicationInstance* instance_; UAUiSessionProperties* props_; UAUiSession* session_; }; #endif // QUBUNTUINTEGRATION_H qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntucommon/clipboard.h0000644000015301777760000000224512317074055026715 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #ifndef QUBUNTUCLIPBOARD_H #define QUBUNTUCLIPBOARD_H #include "base/clipboard.h" class QUbuntuClipboard : public QUbuntuBaseClipboard { public: QUbuntuClipboard(); ~QUbuntuClipboard(); // QUbuntuBaseClipboard methods. QMimeData* mimeData(QClipboard::Mode mode = QClipboard::Clipboard); void setMimeData(QMimeData* data, QClipboard::Mode mode = QClipboard::Clipboard); private: QMimeData* mimeData_; }; #endif // QUBUNTUCLIPBOARD_H qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntucommon/integration.cc0000644000015301777760000001505412317074055027441 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #include "integration.h" #include "window.h" #include "input.h" #include "clipboard.h" #include "input_adaptor_factory.h" #include "base/logging.h" #include #include #include #include #include #include #include #include #include static void resumedCallback(const UApplicationOptions *options, void* context) { DLOG("resumedCallback (options=%p, context=%p)", options, context); DASSERT(context != NULL); QUbuntuIntegration* integration = static_cast(context); integration->screen()->toggleSensors(true); QCoreApplication::postEvent(QCoreApplication::instance(), new QEvent(QEvent::ApplicationActivate)); } static void aboutToStopCallback(UApplicationArchive *archive, void* context) { DLOG("aboutToStopCallback (archive=%p, context=%p)", archive, context); DASSERT(context != NULL); QUbuntuIntegration* integration = static_cast(context); integration->screen()->toggleSensors(false); integration->inputContext()->hideInputPanel(); QCoreApplication::postEvent(QCoreApplication::instance(), new QEvent(QEvent::ApplicationDeactivate)); } QUbuntuIntegration::QUbuntuIntegration(QUbuntuInputAdaptorFactory *input_factory) : clipboard_(new QUbuntuClipboard()) { // Init Ubuntu Platform library. QStringList args = QCoreApplication::arguments(); argc_ = args.size() + 1; argv_ = new char*[argc_]; for (int i = 0; i < argc_ - 1; i++) argv_[i] = qstrdup(args.at(i).toLocal8Bit()); argv_[argc_ - 1] = NULL; // Setup options options_ = u_application_options_new_from_cmd_line(argc_ - 1, argv_); // Setup application description desc_ = u_application_description_new(); UApplicationId* id = u_application_id_new_from_stringn("QtUbuntu", 8); u_application_description_set_application_id(desc_, id); UApplicationLifecycleDelegate* delegate = u_application_lifecycle_delegate_new(); u_application_lifecycle_delegate_set_application_resumed_cb(delegate, &resumedCallback); u_application_lifecycle_delegate_set_application_about_to_stop_cb(delegate, &aboutToStopCallback); u_application_lifecycle_delegate_set_context(delegate, this); u_application_description_set_application_lifecycle_delegate(desc_, delegate); // Create new application instance instance_ = u_application_instance_new_from_description_with_options(desc_, options_); if (instance_ == NULL) qFatal("QUbuntu: Could not create application instance"); // Create default screen. screen_ = new QUbuntuScreen(options_); screenAdded(screen_); // FIXME (ricmm) We shouldn't disable sensors for the shell process // it is only valid right now because the shell doesnt use them screen_->toggleSensors(false); isShell_ = false; if (args.contains("unity8") || args.contains("/usr/bin/unity8")) isShell_ = true; // Initialize input. if (qEnvironmentVariableIsEmpty("QTUBUNTU_NO_INPUT")) { input_ = input_factory->create_input_adaptor(this); inputContext_ = QPlatformInputContextFactory::create(); } else { input_ = NULL; inputContext_ = NULL; } DLOG("QUbuntuIntegration::QUbuntuIntegration (this=%p)", this); } QUbuntuIntegration::~QUbuntuIntegration() { DLOG("QUbuntuIntegration::~QUbuntuIntegration"); delete clipboard_; delete input_; delete inputContext_; delete screen_; for (int i = 0; i < argc_; i++) delete [] argv_[i]; delete [] argv_; } QPlatformWindow* QUbuntuIntegration::createPlatformWindow(QWindow* window) const { DLOG("QUbuntuIntegration::createPlatformWindow const (this=%p, window=%p)", this, window); return const_cast(this)->createPlatformWindow(window); } QPlatformWindow* QUbuntuIntegration::createPlatformWindow(QWindow* window) { DLOG("QUbuntuIntegration::createPlatformWindow (this=%p, window=%p)", this, window); static uint sessionType; // Start a session before creating the first window. static bool once = false; if (!once) { sessionType = nativeInterface()->property("session").toUInt(); // FIXME(loicm) Remove that once all system applications have been ported to the new property. if (sessionType == 0) { sessionType = nativeInterface()->property("ubuntuSessionType").toUInt(); } #if !defined(QT_NO_DEBUG) ASSERT(sessionType <= U_SYSTEM_SESSION); const char* const sessionTypeString[] = { "User", "System" }; const char* const stageHintString[] = { "Main", "Integration", "Share", "Content picking", "Side", "Configuration", }; const char* const formFactorHintString[] = { "Desktop", "Phone", "Tablet" }; LOG("ubuntu session type: '%s'", sessionTypeString[sessionType]); LOG("ubuntu application stage hint: '%s'", stageHintString[u_application_options_get_stage(options_)]); LOG("ubuntu application form factor: '%s'", formFactorHintString[u_application_options_get_form_factor(options_)]); #endif LOG("callbacks %p %p", &resumedCallback, &aboutToStopCallback); props_ = ua_ui_session_properties_new(); ua_ui_session_properties_set_type(props_, static_cast(sessionType)); ua_ui_session_properties_set_remote_pid(props_, static_cast(QCoreApplication::applicationPid())); session_ = ua_ui_session_new_with_properties(props_); input_->setSessionType(sessionType); once = true; } QStringList args = QCoreApplication::arguments(); // Create the window. QPlatformWindow* platformWindow = new QUbuntuWindow( window, static_cast(screen_), input_, static_cast(sessionType), instance_, isShell_); platformWindow->requestActivateWindow(); return platformWindow; } qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntucommon/screen.h0000644000015301777760000000350612317074055026236 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #ifndef QUBUNTUSCREEN_H #define QUBUNTUSCREEN_H #include "base/screen.h" #include #include class QOrientationSensor; class QUbuntuScreen : public QObject, public QUbuntuBaseScreen { Q_OBJECT public: QUbuntuScreen(UApplicationOptions *options); ~QUbuntuScreen(); // QPlatformScreen methods. QRect geometry() const { return geometry_; } QRect availableGeometry() const { return availableGeometry_; } Qt::ScreenOrientation nativeOrientation() const { return nativeOrientation_; } Qt::ScreenOrientation orientation() const { return currentOrientation_; } int gridUnitToPixel(int value) const; int densityPixelToPixel(int value) const; void toggleSensors(bool enable) const; // QObject methods. void customEvent(QEvent* event); public Q_SLOTS: void onOrientationReadingChanged(); private: QRect geometry_; QRect availableGeometry_; int gridUnit_; float densityPixelRatio_; Qt::ScreenOrientation nativeOrientation_; Qt::ScreenOrientation currentOrientation_; QOrientationSensor* orientationSensor_; }; #endif // QUBUNTUSCREEN_H qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntucommon/input.cc0000644000015301777760000000434212317074055026253 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #include "input.h" #include "integration.h" #include "base/logging.h" #include QUbuntuInput::QUbuntuInput(QUbuntuIntegration* integration) : QUbuntuBaseInput(integration) , sessionType_(0) { DLOG("QUbuntuInput::QUbuntuInput (this=%p integration=%p)", this, integration); } QUbuntuInput::~QUbuntuInput() { DLOG("QUbuntuInput::~QUbuntuInput"); } void QUbuntuInput::handleTouchEvent( QWindow* window, ulong timestamp, QTouchDevice* device, const QList &points) { DLOG("QUbuntuInput::handleTouchEvent (this=%p, window=%p, timestamp=%lu, device=%p)", this, window, timestamp, device); if (sessionType_ != 1) { QUbuntuBaseInput::handleTouchEvent(window, timestamp, device, points); } else { // Ubuntu platform API creates an input handler per window. Since system sessions have // fullscreen input handlers, the last created window has an input handler that takes precedence // over the others. Because of that, only the last created window receives touch input. In order // to fix that issue for system sessions, we pass the NULL pointer to the Qt handler as window // argument so that it pushes the event to the window that's located at the touch point. QUbuntuBaseInput::handleTouchEvent(NULL, timestamp, device, points); } } void QUbuntuInput::setSessionType(uint sessionType) { DLOG("QUbuntuInput::setSessionType (this=%p, window=%u)", this, sessionType); sessionType_ = sessionType; } qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntucommon/window.cc0000644000015301777760000001604212317074055026423 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . // FIXME(loicm) The fullscreen API from Ubuntu Platform isn't good enough as we can't leave // fullscreen. The current Ubuntu Platform fullscreen call allows the application manager to // know the fullscreen state of an application, it's still the application responsibility to set // the right surface geometry. #include "window.h" #include "screen.h" #include "input.h" #include "base/logging.h" #include #include static void eventCallback(void* context, const Event* event) { DLOG("eventCallback (context=%p, event=%p)", context, event); DASSERT(context != NULL); QUbuntuWindow* window = static_cast(context); window->input_->postEvent(window->window(), event); } QUbuntuWindow::QUbuntuWindow( QWindow* w, QUbuntuScreen* screen, QUbuntuInput* input, bool systemSession, UApplicationInstance* instance, bool isShell) : QUbuntuBaseWindow(w, screen) , input_(input) , state_(window()->windowState()) , systemSession_(systemSession) , uainstance_(instance) , screen_(screen) , isShell_(isShell) { if (!systemSession) { // Non-system sessions can't resize the window geometry. geometry_ = screen->availableGeometry(); } else { // Use client geometry if set explicitly, use available screen geometry otherwise. geometry_ = window()->geometry() != screen->geometry() ? window()->geometry() : screen->availableGeometry(); } createWindow(); DLOG("QUbuntuWindow::QUbuntuWindow (this=%p, w=%p, screen=%p, input=%p)", this, w, screen, input); } QUbuntuWindow::~QUbuntuWindow() { DLOG("QUbuntuWindow::~QUbuntuWindow"); destroyEGLSurface(); ua_ui_window_destroy(window_); } void QUbuntuWindow::createWindow() { DLOG("QUbuntuWindow::createWindow (this=%p)", this); // Get surface role and flags. QVariant roleVariant = window()->property("role"); int role = roleVariant.isValid() ? roleVariant.toUInt() : 1; // 1 is the default role for apps. QVariant opaqueVariant = window()->property("opaque"); uint flags = opaqueVariant.isValid() ? opaqueVariant.toUInt() ? static_cast(IS_OPAQUE_FLAG) : 0 : 0; if (!systemSession_) { // FIXME(loicm) Opaque flag is forced for now for non-system sessions (applications) for // performance reasons. flags |= static_cast(IS_OPAQUE_FLAG); } const QByteArray title = (!window()->title().isNull()) ? window()->title().toUtf8() : "Window 1"; // legacy title #if !defined(QT_NO_DEBUG) //ASSERT(role <= ON_SCREEN_KEYBOARD_ACTOR_ROLE); const char* const roleString[] = { "Dash", "Default", "Indicator", "Notifications", "Greeter", "Launcher", "OSK", "ShutdownDialog" }; LOG("role: '%s'", roleString[role]); LOG("flags: '%s'", (flags & static_cast(1)) ? "Opaque" : "NotOpaque"); LOG("title: '%s'", title.constData()); #endif // Get surface geometry. QRect geometry; if (state_ == Qt::WindowFullScreen) { geometry = screen()->geometry(); } else if (state_ == Qt::WindowMaximized) { geometry = screen()->availableGeometry(); } else { geometry = geometry_; } fprintf(stderr, "creating surface at (%d, %d) with size (%d, %d) with title '%s'", geometry.x(), geometry.y(), geometry.width(), geometry.height(), title.data()); // Setup platform window creation properties wprops_ = ua_ui_window_properties_new_for_normal_window(); ua_ui_window_properties_set_titlen(wprops_, title.data(), title.size()); ua_ui_window_properties_set_role(wprops_, static_cast(role)); ua_ui_window_properties_set_input_cb_and_ctx(wprops_, &eventCallback, this); ua_ui_window_properties_set_dimensions(wprops_, geometry.width(), geometry.height()); // Create platform window window_ = ua_ui_window_new_for_application_with_properties(uainstance_, wprops_); if (geometry.width() != 0 || geometry.height() != 0) ua_ui_window_resize(window_, geometry.width(), geometry.height()); if (geometry.x() != 0 || geometry.y() != 0) ua_ui_window_move(window_, geometry.x(), geometry.y()); ASSERT(window_ != NULL); createEGLSurface(ua_ui_window_get_native_type(window_)); if (state_ == Qt::WindowFullScreen) { ua_ui_window_request_fullscreen(window_); } // Tell Qt about the geometry. QWindowSystemInterface::handleGeometryChange(window(), geometry); QPlatformWindow::setGeometry(geometry); } void QUbuntuWindow::moveResize(const QRect& rect) { fprintf(stderr, "\nQUbuntuWindow::moveResize (this=%p, x=%d, y=%d, w=%d, h=%d)\n", this, rect.x(), rect.y(), rect.width(), rect.height()); ua_ui_window_move(window_, rect.x(), rect.y()); ua_ui_window_resize(window_, rect.width(), rect.height()); QWindowSystemInterface::handleGeometryChange(window(), rect); QPlatformWindow::setGeometry(rect); } void QUbuntuWindow::setWindowState(Qt::WindowState state) { DLOG("QUbuntuWindow::setWindowState (this=%p, state=%d)", this, state); if (state == state_) return; switch (state) { case Qt::WindowNoState: { DLOG("setting window state: 'NoState'"); moveResize(geometry_); state_ = Qt::WindowNoState; break; } case Qt::WindowFullScreen: { DLOG("setting window state: 'FullScreen'"); ua_ui_window_request_fullscreen(window_); moveResize(screen()->geometry()); state_ = Qt::WindowFullScreen; break; } case Qt::WindowMaximized: { DLOG("setting window state: 'Maximized'"); moveResize(screen()->availableGeometry()); state_ = Qt::WindowMaximized; break; } case Qt::WindowActive: case Qt::WindowMinimized: default: { DLOG("setting window state: 'Active|Minimized'"); break; } } } void QUbuntuWindow::setGeometry(const QRect& rect) { fprintf(stderr, "QUbuntuWindow::setGeometry (this=%p)", this); if (systemSession_) { // Non-system sessions can't resize the window geometry. geometry_ = rect; if (state_ != Qt::WindowFullScreen && state_ != Qt::WindowMaximized) moveResize(rect); } } void QUbuntuWindow::setVisible(bool visible) { DLOG("QUbuntuWindow::setVisible (this=%p, visible=%s)", this, visible ? "true" : "false"); if (isShell_ == false) screen_->toggleSensors(visible); if (visible) { ua_ui_window_show(window_); QWindowSystemInterface::handleExposeEvent(window(), QRect()); } else { ua_ui_window_hide(window_); } } qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntucommon/input.h0000644000015301777760000000236112317074055026114 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #ifndef QUBUNTUINPUT_H #define QUBUNTUINPUT_H #include "base/input.h" class QUbuntuIntegration; class QUbuntuInput : public QUbuntuBaseInput { public: QUbuntuInput(QUbuntuIntegration* integration); ~QUbuntuInput(); // QUbuntuBaseInput methods. void handleTouchEvent(QWindow* window, ulong timestamp, QTouchDevice* device, const QList &points); void setSessionType(uint sessionType); private: uint sessionType_; }; #endif // QUBUNTUINPUT_H qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntucommon/input_adaptor_factory.h0000644000015301777760000000211412317074055031351 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #ifndef QUBUNTU_INPUT_ADAPTOR_FACTORY_H_ #define QUBUNTU_INPUT_ADAPTOR_FACTORY_H_ class QUbuntuInput; class QUbuntuIntegration; class QUbuntuInputAdaptorFactory { public: virtual ~QUbuntuInputAdaptorFactory() {} virtual QUbuntuInput* create_input_adaptor(QUbuntuIntegration* integration) = 0; protected: QUbuntuInputAdaptorFactory() {} }; #endif qtubuntu-0.54+14.04.20140402/src/platforms/ubuntu/ubuntucommon/ubuntucommon.pro0000644000015301777760000000121312317074055030054 0ustar pbusernogroup00000000000000TARGET = qubuntucommon TEMPLATE = lib QT += gui-private DEFINES += MESA_EGL_NO_X11_HEADERS QMAKE_CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden QMAKE_LFLAGS += -Wl,-no-undefined CONFIG(debug) { QMAKE_CXXFLAGS_DEBUG += -Werror } SOURCES = integration.cc \ window.cc \ screen.cc \ input.cc \ clipboard.cc HEADERS = integration.h \ window.h \ screen.h \ input.h \ clipboard.h \ input_adaptor_factory.h CONFIG += static plugin create_prl link_prl INCLUDEPATH += ../../ LIBS += -L../base -Wl,--whole-archive -lubuntubase -Wl,--no-whole-archive qtubuntu-0.54+14.04.20140402/src/platforms/base/0000755000015301777760000000000012317074332021435 5ustar pbusernogroup00000000000000qtubuntu-0.54+14.04.20140402/src/platforms/base/logging.h0000644000015301777760000000274412317074055023245 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #ifndef QUBUNTULOGGING_H #define QUBUNTULOGGING_H // Logging and assertion macros. #define LOG(...) qDebug(__VA_ARGS__) #define LOG_IF(cond,...) do { if (cond) qDebug(__VA_ARGS__); } while(0) #define ASSERT(cond) ((!(cond)) ? qt_assert(#cond,__FILE__,__LINE__) : qt_noop()) #define NOT_REACHED() qt_assert("Not reached!",__FILE__,__LINE__) // Logging and assertion macros are compiled out for release builds. #if !defined(QT_NO_DEBUG) #define DLOG(...) LOG(__VA_ARGS__) #define DLOG_IF(cond,...) LOG_IF((cond), __VA_ARGS__) #define DASSERT(cond) ASSERT((cond)) #define DNOT_REACHED() NOT_REACHED() #else #define DLOG(...) qt_noop() #define DLOG_IF(cond,...) qt_noop() #define DASSERT(cond) qt_noop() #define DNOT_REACHED() qt_noop() #endif #endif // QUBUNTULOGGING_H qtubuntu-0.54+14.04.20140402/src/platforms/base/native_interface.cc0000644000015301777760000001155512317074055025263 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . // FIXME(loicm) "nativeorientation" should be implemented in the Ubuntu plugin // and not include headers from it, base isn't meant to know about plugins. // FIXME(loicm) Why return a pointer to the screen orientation enum? The enum // can just fit in the returned pointer. #include "native_interface.h" #include "screen.h" #include "ubuntu/ubuntucommon/screen.h" #include "context.h" #include "logging.h" #include #include #include #include class QUbuntuBaseResourceMap : public QMap { public: QUbuntuBaseResourceMap() : QMap() { insert("egldisplay", QUbuntuBaseNativeInterface::EglDisplay); insert("eglcontext", QUbuntuBaseNativeInterface::EglContext); insert("nativeorientation", QUbuntuBaseNativeInterface::NativeOrientation); insert("display", QUbuntuBaseNativeInterface::Display); } }; Q_GLOBAL_STATIC(QUbuntuBaseResourceMap, ubuntuResourceMap) QUbuntuBaseNativeInterface::QUbuntuBaseNativeInterface() : genericEventFilterType_(QByteArrayLiteral("Event")) , nativeOrientation_(NULL) { DLOG("QUbuntuBaseNativeInterface::QUbuntuBaseNativeInterface (this=%p)", this); } QUbuntuBaseNativeInterface::~QUbuntuBaseNativeInterface() { DLOG("QUbuntuBaseNativeInterface::~QUbuntuBaseNativeInterface"); if (nativeOrientation_) delete nativeOrientation_; } void* QUbuntuBaseNativeInterface::nativeResourceForContext( const QByteArray& resourceString, QOpenGLContext* context) { DLOG("QUbuntuBaseNativeInterface::nativeResourceForContext (this=%p, resourceString=%s, " "context=%p)", this, resourceString.constData(), context); if (!context) return NULL; const QByteArray kLowerCaseResource = resourceString.toLower(); if (!ubuntuResourceMap()->contains(kLowerCaseResource)) return NULL; const ResourceType kResourceType = ubuntuResourceMap()->value(kLowerCaseResource); if (kResourceType == QUbuntuBaseNativeInterface::EglContext) return static_cast(context->handle())->eglContext(); else return NULL; } void* QUbuntuBaseNativeInterface::nativeResourceForScreen( const QByteArray& resourceString, QScreen* screen) { DLOG("QUbuntuBaseNativeInterface::nativeResourceForScreen (this=%p, resourceString=%s, " "screen=%p)", this, resourceString.constData(), screen); const QByteArray kLowerCaseResource = resourceString.toLower(); if (!ubuntuResourceMap()->contains(kLowerCaseResource)) return NULL; const ResourceType kResourceType = ubuntuResourceMap()->value(kLowerCaseResource); if (kResourceType == QUbuntuBaseNativeInterface::Display) { if (!screen) screen = QGuiApplication::primaryScreen(); return static_cast(screen->handle())->nativeDisplay(); } else return NULL; } void* QUbuntuBaseNativeInterface::nativeResourceForWindow( const QByteArray& resourceString, QWindow* window) { DLOG("QUbuntuBaseNativeInterface::nativeResourceForWindow (this=%p, resourceString=%s, " "window=%p)", this, resourceString.constData(), window); const QByteArray kLowerCaseResource = resourceString.toLower(); if (!ubuntuResourceMap()->contains(kLowerCaseResource)) return NULL; const ResourceType kResourceType = ubuntuResourceMap()->value(kLowerCaseResource); if (kResourceType == QUbuntuBaseNativeInterface::EglDisplay) { if (window) { return static_cast(window->screen()->handle())->eglDisplay(); } else { return static_cast( QGuiApplication::primaryScreen()->handle())->eglDisplay(); } } else if (kResourceType == QUbuntuBaseNativeInterface::NativeOrientation) { // Return the device's native screen orientation. if (window) { nativeOrientation_ = new Qt::ScreenOrientation(static_cast(window->screen()->handle())->nativeOrientation()); } else { nativeOrientation_ = new Qt::ScreenOrientation(QGuiApplication::primaryScreen()->handle()->nativeOrientation()); } return nativeOrientation_; } else { return NULL; } } qtubuntu-0.54+14.04.20140402/src/platforms/base/window.h0000644000015301777760000000252112317074055023117 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #ifndef QUBUNTUBASEWINDOW_H #define QUBUNTUBASEWINDOW_H #include #include class QUbuntuBaseScreen; class QUbuntuBaseWindow : public QPlatformWindow { public: QUbuntuBaseWindow(QWindow* w, QUbuntuBaseScreen* screen); ~QUbuntuBaseWindow(); // QPlatformWindow methods. WId winId() const { return id_; } // New methods. void createEGLSurface(EGLNativeWindowType nativeWindow); void destroyEGLSurface(); EGLSurface eglSurface() const { return eglSurface_; } private: QUbuntuBaseScreen* screen_; EGLSurface eglSurface_; WId id_; }; #endif // QUBUNTUBASEWINDOW_H qtubuntu-0.54+14.04.20140402/src/platforms/base/clipboard.cc0000644000015301777760000000266412317074055023715 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #include "clipboard.h" #include "logging.h" QUbuntuBaseClipboard::QUbuntuBaseClipboard() { DLOG("QUbuntuBaseClipboard::QUbuntuBaseClipboard (this=%p)", this); } QUbuntuBaseClipboard::~QUbuntuBaseClipboard() { DLOG("QUbuntuBaseClipboard::~QUbuntuBaseClipboard"); } QMimeData* QUbuntuBaseClipboard::mimeData(QClipboard::Mode mode) { DLOG("QUbuntuBaseClipboard::mimeData (this=%p, mode=%d)", this, static_cast(mode)); return QPlatformClipboard::mimeData(mode); } void QUbuntuBaseClipboard::setMimeData(QMimeData* data, QClipboard::Mode mode) { DLOG("QUbuntuBaseClipboard::setMimeData (this=%p, data=%p, mode=%d)", this, data, static_cast(mode)); QPlatformClipboard::setMimeData(data, mode); } qtubuntu-0.54+14.04.20140402/src/platforms/base/screen.cc0000644000015301777760000001141312317074064023225 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #include "screen.h" #include "logging.h" #include #include static const int kSwapInterval = 1; #if !defined(QT_NO_DEBUG) static void printEglConfig(EGLDisplay display, EGLConfig config) { DASSERT(display != EGL_NO_DISPLAY); DASSERT(config != NULL); static const struct { const EGLint attrib; const char* name; } kAttribs[] = { { EGL_BUFFER_SIZE, "EGL_BUFFER_SIZE" }, { EGL_ALPHA_SIZE, "EGL_ALPHA_SIZE" }, { EGL_BLUE_SIZE, "EGL_BLUE_SIZE" }, { EGL_GREEN_SIZE, "EGL_GREEN_SIZE" }, { EGL_RED_SIZE, "EGL_RED_SIZE" }, { EGL_DEPTH_SIZE, "EGL_DEPTH_SIZE" }, { EGL_STENCIL_SIZE, "EGL_STENCIL_SIZE" }, { EGL_CONFIG_CAVEAT, "EGL_CONFIG_CAVEAT" }, { EGL_CONFIG_ID, "EGL_CONFIG_ID" }, { EGL_LEVEL, "EGL_LEVEL" }, { EGL_MAX_PBUFFER_HEIGHT, "EGL_MAX_PBUFFER_HEIGHT" }, { EGL_MAX_PBUFFER_PIXELS, "EGL_MAX_PBUFFER_PIXELS" }, { EGL_MAX_PBUFFER_WIDTH, "EGL_MAX_PBUFFER_WIDTH" }, { EGL_NATIVE_RENDERABLE, "EGL_NATIVE_RENDERABLE" }, { EGL_NATIVE_VISUAL_ID, "EGL_NATIVE_VISUAL_ID" }, { EGL_NATIVE_VISUAL_TYPE, "EGL_NATIVE_VISUAL_TYPE" }, { EGL_SAMPLES, "EGL_SAMPLES" }, { EGL_SAMPLE_BUFFERS, "EGL_SAMPLE_BUFFERS" }, { EGL_SURFACE_TYPE, "EGL_SURFACE_TYPE" }, { EGL_TRANSPARENT_TYPE, "EGL_TRANSPARENT_TYPE" }, { EGL_TRANSPARENT_BLUE_VALUE, "EGL_TRANSPARENT_BLUE_VALUE" }, { EGL_TRANSPARENT_GREEN_VALUE, "EGL_TRANSPARENT_GREEN_VALUE" }, { EGL_TRANSPARENT_RED_VALUE, "EGL_TRANSPARENT_RED_VALUE" }, { EGL_BIND_TO_TEXTURE_RGB, "EGL_BIND_TO_TEXTURE_RGB" }, { EGL_BIND_TO_TEXTURE_RGBA, "EGL_BIND_TO_TEXTURE_RGBA" }, { EGL_MIN_SWAP_INTERVAL, "EGL_MIN_SWAP_INTERVAL" }, { EGL_MAX_SWAP_INTERVAL, "EGL_MAX_SWAP_INTERVAL" }, { -1, NULL } }; const char* string = eglQueryString(display, EGL_VENDOR); LOG("EGL vendor: %s", string); string = eglQueryString(display, EGL_VERSION); LOG("EGL version: %s", string); string = eglQueryString(display, EGL_EXTENSIONS); LOG("EGL extensions: %s", string); LOG("EGL configuration attibutes:"); for (int index = 0; kAttribs[index].attrib != -1; index++) { EGLint value; if (eglGetConfigAttrib(display, config, kAttribs[index].attrib, &value)) LOG(" %s: %d", kAttribs[index].name, static_cast(value)); } } #endif QUbuntuBaseScreen::QUbuntuBaseScreen() : format_(QImage::Format_RGB32) , depth_(32) , surfaceFormat_() , eglDisplay_(EGL_NO_DISPLAY) , eglConfig_(NULL) { // Initialize EGL. ASSERT(eglBindAPI(EGL_OPENGL_ES_API) == EGL_TRUE); UAUiDisplay* u_display = ua_ui_display_new_with_index(0); nativeDisplay_ = ua_ui_display_get_native_type(u_display); ASSERT((eglDisplay_ = eglGetDisplay(nativeDisplay_)) != EGL_NO_DISPLAY); ua_ui_display_destroy(u_display); ASSERT(eglInitialize(eglDisplay_, NULL, NULL) == EGL_TRUE); // Configure EGL buffers format. surfaceFormat_.setRedBufferSize(8); surfaceFormat_.setGreenBufferSize(8); surfaceFormat_.setBlueBufferSize(8); surfaceFormat_.setAlphaBufferSize(8); surfaceFormat_.setDepthBufferSize(24); surfaceFormat_.setStencilBufferSize(8); if (!qEnvironmentVariableIsEmpty("QTUBUNTU_MULTISAMPLE")) { surfaceFormat_.setSamples(4); DLOG("setting MSAA to 4 samples"); } #ifdef QTUBUNTU_USE_OPENGL surfaceFormat_.setRenderableType(QSurfaceFormat::OpenGL); #endif eglConfig_ = q_configFromGLFormat(eglDisplay_, surfaceFormat_, true); #if !defined(QT_NO_DEBUG) printEglConfig(eglDisplay_, eglConfig_); #endif // Set vblank swap interval. int swapInterval = kSwapInterval; QByteArray swapIntervalString = qgetenv("QTUBUNTU_SWAPINTERVAL"); if (!swapIntervalString.isEmpty()) { bool ok; swapInterval = swapIntervalString.toInt(&ok); if (!ok) swapInterval = kSwapInterval; } DLOG("setting swap interval to %d", swapInterval); eglSwapInterval(eglDisplay_, swapInterval); DLOG("QUbuntuBaseScreen::QUbuntuBaseScreen (this=%p)", this); } QUbuntuBaseScreen::~QUbuntuBaseScreen() { eglTerminate(eglDisplay_); DLOG("QUbuntuBaseScreen::~QUbuntuBaseScreen"); } qtubuntu-0.54+14.04.20140402/src/platforms/base/integration.h0000644000015301777760000000412612317074055024136 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #ifndef QUBUNTUBASEINTEGRATION_H #define QUBUNTUBASEINTEGRATION_H #include class QAbstractEventDispatcher; class QUbuntuBaseIntegration : public QPlatformIntegration { public: QUbuntuBaseIntegration(); ~QUbuntuBaseIntegration(); // QPlatformIntegration methods. bool hasCapability(QPlatformIntegration::Capability cap) const; #if QT_VERSION < QT_VERSION_CHECK(5, 2, 0) QAbstractEventDispatcher* guiThreadEventDispatcher() const { return eventDispatcher_; } #else QAbstractEventDispatcher *createEventDispatcher() const; #endif QPlatformNativeInterface* nativeInterface() const { return nativeInterface_; } QPlatformServices *services() const { return platformServices_; } QPlatformBackingStore* createPlatformBackingStore(QWindow* window) const; QPlatformOpenGLContext* createPlatformOpenGLContext(QOpenGLContext* context) const; QPlatformOpenGLContext* createPlatformOpenGLContext(QOpenGLContext* context); QPlatformFontDatabase* fontDatabase() const { return fontDb_; } QStringList themeNames() const; QPlatformTheme* createPlatformTheme(const QString& name) const; private: QPlatformNativeInterface* nativeInterface_; #if QT_VERSION < QT_VERSION_CHECK(5, 2, 0) QAbstractEventDispatcher* eventDispatcher_; #endif QPlatformFontDatabase* fontDb_; QPlatformServices* platformServices_; }; #endif // QUBUNTUBASEINTEGRATION_H qtubuntu-0.54+14.04.20140402/src/platforms/base/clipboard.h0000644000015301777760000000255012317074055023551 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #ifndef QUBUNTUBASECLIPBOARD_H #define QUBUNTUBASECLIPBOARD_H #include class QUbuntuBaseClipboard : public QPlatformClipboard { public: QUbuntuBaseClipboard(); ~QUbuntuBaseClipboard(); // QPlatformClipboard methods. virtual QMimeData* mimeData(QClipboard::Mode mode = QClipboard::Clipboard); virtual void setMimeData(QMimeData* data, QClipboard::Mode mode = QClipboard::Clipboard); virtual bool supportsMode(QClipboard::Mode mode) const { return mode == QClipboard::Clipboard; } virtual bool ownsMode(QClipboard::Mode mode) const { Q_UNUSED(mode); return false; } }; #endif // QUBUNTUBASECLIPBOARD_H qtubuntu-0.54+14.04.20140402/src/platforms/base/integration.cc0000644000015301777760000000743712317074055024304 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #include "integration.h" #include "native_interface.h" #include "backing_store.h" #include "screen.h" #include "context.h" #include "logging.h" #include "theme.h" #include "platformservices.h" #include #include #include #include QUbuntuBaseIntegration::QUbuntuBaseIntegration() : nativeInterface_(new QUbuntuBaseNativeInterface()) #if QT_VERSION < QT_VERSION_CHECK(5, 2, 0) , eventDispatcher_(createUnixEventDispatcher()) #endif , fontDb_(new QGenericUnixFontDatabase()) , platformServices_(new QUbuntuBasePlatformServices()) { #if QT_VERSION < QT_VERSION_CHECK(5, 2, 0) QGuiApplicationPrivate::instance()->setEventDispatcher(eventDispatcher_); #endif DLOG("QUbuntuBaseIntegration::QUbuntuBaseIntegration (this=%p)", this); } QUbuntuBaseIntegration::~QUbuntuBaseIntegration() { DLOG("QUbuntuBaseIntegration::~QUbuntuBaseIntegration"); delete fontDb_; delete nativeInterface_; } bool QUbuntuBaseIntegration::hasCapability(QPlatformIntegration::Capability cap) const { DLOG("QUbuntuBaseIntegration::hasCapability (this=%p)", this); switch (cap) { case ThreadedPixmaps: { return true; } case OpenGL: { return true; } case ThreadedOpenGL: { if (qEnvironmentVariableIsEmpty("QTUBUNTU_NO_THREADED_OPENGL")) { return true; } else { DLOG("disabled threaded OpenGL"); return false; } } default: { return QPlatformIntegration::hasCapability(cap); } } } #if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0) QAbstractEventDispatcher *QUbuntuBaseIntegration::createEventDispatcher() const { return createUnixEventDispatcher(); } #endif QPlatformBackingStore* QUbuntuBaseIntegration::createPlatformBackingStore(QWindow* window) const { DLOG("QUbuntuBaseIntegration::createPlatformBackingStore (this=%p, window=%p)", this, window); return new QUbuntuBaseBackingStore(window); } QPlatformOpenGLContext* QUbuntuBaseIntegration::createPlatformOpenGLContext( QOpenGLContext* context) const { DLOG("QUbuntuBaseIntegration::createPlatformOpenGLContext const (this=%p, context=%p)", this, context); return const_cast(this)->createPlatformOpenGLContext(context); } QPlatformOpenGLContext* QUbuntuBaseIntegration::createPlatformOpenGLContext( QOpenGLContext* context) { DLOG("QUbuntuBaseIntegration::createPlatformOpenGLContext (this=%p, context=%p)", this, context); return new QUbuntuBaseContext( static_cast(context->screen()->handle()), static_cast(context->shareHandle())); } QStringList QUbuntuBaseIntegration::themeNames() const { DLOG("QUbuntuBaseIntegration::themeNames (this=%p)", this); return QStringList(QUbuntuTheme::name); } QPlatformTheme* QUbuntuBaseIntegration::createPlatformTheme(const QString& name) const { Q_UNUSED(name); DLOG("QUbuntuBaseIntegration::createPlatformTheme (this=%p)", this); return new QUbuntuTheme(); } qtubuntu-0.54+14.04.20140402/src/platforms/base/base.pro0000644000015301777760000000160212317074055023072 0ustar pbusernogroup00000000000000TARGET = ubuntubase TEMPLATE = lib QT += core-private gui-private platformsupport-private DEFINES += MESA_EGL_NO_X11_HEADERS QMAKE_CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden QMAKE_LFLAGS += -Wl,-no-undefined CONFIG(debug) { QMAKE_CXXFLAGS_DEBUG += -Werror } SOURCES = integration.cc \ backing_store.cc \ native_interface.cc \ context.cc \ screen.cc \ window.cc \ input.cc \ theme.cc \ platformservices.cc \ clipboard.cc HEADERS = integration.h \ backing_store.h \ native_interface.h \ context.h \ screen.h \ window.h \ input.h \ logging.h \ theme.h \ platformservices.h \ clipboard.h CONFIG += static create_prl egl qpa/genericunixfontdatabase INCLUDEPATH += .. /usr/include/hybris qtubuntu-0.54+14.04.20140402/src/platforms/base/backing_store.h0000644000015301777760000000267312317074055024432 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #ifndef QUBUNTUBASEBACKINGSTORE_H #define QUBUNTUBASEBACKINGSTORE_H #include class QOpenGLContext; class QOpenGLPaintDevice; class QUbuntuBaseBackingStore : public QPlatformBackingStore { public: QUbuntuBaseBackingStore(QWindow* window); ~QUbuntuBaseBackingStore(); // QPlatformBackingStore methods. void beginPaint(const QRegion&); void endPaint(); void flush(QWindow* window, const QRegion& region, const QPoint& offset); void resize(const QSize& size, const QRegion& staticContents); QPaintDevice* paintDevice() { return reinterpret_cast(device_); } private: QOpenGLContext* context_; QOpenGLPaintDevice* device_; }; #endif // QUBUNTUBASEBACKINGSTORE_H qtubuntu-0.54+14.04.20140402/src/platforms/base/theme.cc0000644000015301777760000000264612317074055023060 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #include "theme.h" #include "logging.h" #include const char *QUbuntuTheme::name = "ubuntu"; QUbuntuTheme::QUbuntuTheme() { DLOG("QUbuntuTheme::QUbuntuTheme()"); } QUbuntuTheme::~QUbuntuTheme() { DLOG("QUbuntuTheme::~QUbuntuTheme"); } QVariant QUbuntuTheme::themeHint(ThemeHint hint) const { DLOG("QUbuntuTheme::themehint (this=%p, hint=%d)", this, hint); if (hint == QPlatformTheme::SystemIconThemeName) { QByteArray iconTheme = qgetenv("QTUBUNTU_ICON_THEME"); if (iconTheme.isEmpty()) { return QVariant(QStringLiteral("ubuntu-mobile")); } else { return QVariant(QString(iconTheme)); } } else { return QGenericUnixTheme::themeHint(hint); } } qtubuntu-0.54+14.04.20140402/src/platforms/base/context.cc0000644000015301777760000001031512317074055023432 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #include "context.h" #include "window.h" #include "logging.h" #include #if !defined(QT_NO_DEBUG) static void printOpenGLESConfig() { static bool once = true; if (once) { const char* string = (const char*) glGetString(GL_VENDOR); LOG("OpenGL ES vendor: %s", string); string = (const char*) glGetString(GL_RENDERER); LOG("OpenGL ES renderer: %s", string); string = (const char*) glGetString(GL_VERSION); LOG("OpenGL ES version: %s", string); string = (const char*) glGetString(GL_SHADING_LANGUAGE_VERSION); LOG("OpenGL ES Shading Language version: %s", string); string = (const char*) glGetString(GL_EXTENSIONS); LOG("OpenGL ES extensions: %s", string); once = false; } } #endif static EGLenum api_in_use() { #ifdef QTUBUNTU_USE_OPENGL return EGL_OPENGL_API; #else return EGL_OPENGL_ES_API; #endif } QUbuntuBaseContext::QUbuntuBaseContext(QUbuntuBaseScreen* screen, QUbuntuBaseContext* share) { DASSERT(screen != NULL); eglDisplay_ = screen->eglDisplay(); screen_ = screen; // Create an OpenGL ES 2 context. QVector attribs; attribs.append(EGL_CONTEXT_CLIENT_VERSION); attribs.append(2); attribs.append(EGL_NONE); ASSERT(eglBindAPI(api_in_use()) == EGL_TRUE); ASSERT((eglContext_ = eglCreateContext( eglDisplay_, screen->eglConfig(), share ? share->eglContext() : EGL_NO_CONTEXT, attribs.constData())) != EGL_NO_CONTEXT); DLOG("QUbuntuBaseContext::QUbuntuBaseContext (this=%p, screen=%p)", this, screen); } QUbuntuBaseContext::~QUbuntuBaseContext() { DLOG("QUbuntuBaseContext::~QUbuntuBaseContext"); ASSERT(eglDestroyContext(eglDisplay_, eglContext_) == EGL_TRUE); } bool QUbuntuBaseContext::makeCurrent(QPlatformSurface* surface) { // DLOG("QUbuntuBaseContext::makeCurrent (this=%p, surface=%p)", this, surface); DASSERT(surface->surface()->surfaceType() == QSurface::OpenGLSurface); EGLSurface eglSurface = static_cast(surface)->eglSurface(); #if defined(QT_NO_DEBUG) eglBindAPI(api_in_use()); eglMakeCurrent(eglDisplay_, eglSurface, eglSurface, eglContext_); #else ASSERT(eglBindAPI(api_in_use()) == EGL_TRUE); ASSERT(eglMakeCurrent(eglDisplay_, eglSurface, eglSurface, eglContext_) == EGL_TRUE); printOpenGLESConfig(); #endif return true; } void QUbuntuBaseContext::doneCurrent() { DLOG("QUbuntuBaseContext::doneCurrent (this=%p)", this); #if defined(QT_NO_DEBUG) eglBindAPI(api_in_use()); eglMakeCurrent(eglDisplay_, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); #else ASSERT(eglBindAPI(api_in_use()) == EGL_TRUE); ASSERT(eglMakeCurrent(eglDisplay_, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT) == EGL_TRUE); #endif } void QUbuntuBaseContext::swapBuffers(QPlatformSurface* surface) { // DLOG("QUbuntuBaseContext::swapBuffers (this=%p, surface=%p)", this, surface); EGLSurface eglSurface = static_cast(surface)->eglSurface(); #if defined(QT_NO_DEBUG) eglBindAPI(api_in_use()); eglSwapBuffers(eglDisplay_, eglSurface); #else ASSERT(eglBindAPI(api_in_use()) == EGL_TRUE); ASSERT(eglSwapBuffers(eglDisplay_, eglSurface) == EGL_TRUE); #endif } void (*QUbuntuBaseContext::getProcAddress(const QByteArray& procName)) () { DLOG("QUbuntuBaseContext::getProcAddress (this=%p, procName=%s)", this, procName.constData()); #if defined(QT_NO_DEBUG) eglBindAPI(api_in_use()); #else ASSERT(eglBindAPI(api_in_use()) == EGL_TRUE); #endif return eglGetProcAddress(procName.constData()); } qtubuntu-0.54+14.04.20140402/src/platforms/base/theme.h0000644000015301777760000000203612317074055022713 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #ifndef QUBUNTUTHEME_H #define QUBUNTUTHEME_H #include class QUbuntuTheme : public QGenericUnixTheme { public: static const char* name; QUbuntuTheme(); ~QUbuntuTheme(); virtual QVariant themeHint(ThemeHint hint) const; }; #endif //QUBUNTUBASECONTEXT_H qtubuntu-0.54+14.04.20140402/src/platforms/base/screen.h0000644000015301777760000000305212317074055023067 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #ifndef QUBUNTUBASESCREEN_H #define QUBUNTUBASESCREEN_H #include #include #include class QUbuntuBaseScreen : public QPlatformScreen { public: QUbuntuBaseScreen(); ~QUbuntuBaseScreen(); // QPlatformScreen methods. QImage::Format format() const { return format_; } int depth() const { return depth_; } // New methods. QSurfaceFormat surfaceFormat() const { return surfaceFormat_; } EGLNativeDisplayType nativeDisplay() const { return nativeDisplay_; } EGLDisplay eglDisplay() const { return eglDisplay_; } EGLConfig eglConfig() const { return eglConfig_; } private: QImage::Format format_; int depth_; QSurfaceFormat surfaceFormat_; EGLNativeDisplayType nativeDisplay_; EGLDisplay eglDisplay_; EGLConfig eglConfig_; }; #endif // QUBUNTUBASESCREEN_H qtubuntu-0.54+14.04.20140402/src/platforms/base/input.cc0000644000015301777760000010070312317074055023106 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #include "input.h" #include "integration.h" #include "native_interface.h" #include "logging.h" #if !defined(QT_NO_DEBUG) #include #endif #include #include #include #include #include #include #define LOG_EVENTS 0 // Lookup table for the key types. // FIXME(loicm) Not sure what to do with that multiple thing. static const QEvent::Type kEventType[] = { QEvent::KeyPress, // ISCL_KEY_EVENT_ACTION_DOWN = 0 QEvent::KeyRelease, // ISCL_KEY_EVENT_ACTION_UP = 1 QEvent::KeyPress // ISCL_KEY_EVENT_ACTION_MULTIPLE = 2 }; // Lookup table for the key codes and unicode values. static const struct { const quint32 keycode; const quint16 unicode[3]; // { no modifier, shift modifier, other modifiers } } kKeyCode[] = { { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_UNKNOWN = 0 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_SOFT_LEFT = 1 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_SOFT_RIGHT = 2 { Qt::Key_Home, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_HOME = 3 { Qt::Key_Back, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BACK = 4 { Qt::Key_Call, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_CALL = 5 { Qt::Key_Hangup, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_ENDCALL = 6 { Qt::Key_0, { 0x0030, 0x0029, 0xffff } }, // ISCL_KEYCODE_0 = 7 { Qt::Key_1, { 0x0031, 0xffff, 0xffff } }, // ISCL_KEYCODE_1 = 8 { Qt::Key_2, { 0x0032, 0xffff, 0xffff } }, // ISCL_KEYCODE_2 = 9 { Qt::Key_3, { 0x0033, 0xffff, 0xffff } }, // ISCL_KEYCODE_3 = 10 { Qt::Key_4, { 0x0034, 0xffff, 0xffff } }, // ISCL_KEYCODE_4 = 11 { Qt::Key_5, { 0x0035, 0xffff, 0xffff } }, // ISCL_KEYCODE_5 = 12 { Qt::Key_6, { 0x0036, 0xffff, 0xffff } }, // ISCL_KEYCODE_6 = 13 { Qt::Key_7, { 0x0037, 0xffff, 0xffff } }, // ISCL_KEYCODE_7 = 14 { Qt::Key_8, { 0x0038, 0xffff, 0xffff } }, // ISCL_KEYCODE_8 = 15 { Qt::Key_9, { 0x0039, 0x0028, 0xffff } }, // ISCL_KEYCODE_9 = 16 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_STAR = 17 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_POUND = 18 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_DPAD_UP = 19 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_DPAD_DOWN = 20 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_DPAD_LEFT = 21 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_DPAD_RIGHT = 22 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_DPAD_CENTER = 23 { Qt::Key_VolumeUp, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_VOLUME_UP = 24 { Qt::Key_VolumeDown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_VOLUME_DOWN = 25 { Qt::Key_PowerOff, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_POWER = 26 { Qt::Key_Camera, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_CAMERA = 27 { Qt::Key_Clear, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_CLEAR = 28 { Qt::Key_A, { 0x0061, 0x0041, 0xffff } }, // ISCL_KEYCODE_A = 29 { Qt::Key_B, { 0x0062, 0x0042, 0xffff } }, // ISCL_KEYCODE_B = 30 { Qt::Key_C, { 0x0063, 0x0043, 0xffff } }, // ISCL_KEYCODE_C = 31 { Qt::Key_D, { 0x0064, 0x0044, 0xffff } }, // ISCL_KEYCODE_D = 32 { Qt::Key_E, { 0x0065, 0x0045, 0xffff } }, // ISCL_KEYCODE_E = 33 { Qt::Key_F, { 0x0066, 0x0046, 0xffff } }, // ISCL_KEYCODE_F = 34 { Qt::Key_G, { 0x0067, 0x0047, 0xffff } }, // ISCL_KEYCODE_G = 35 { Qt::Key_H, { 0x0068, 0x0048, 0xffff } }, // ISCL_KEYCODE_H = 36 { Qt::Key_I, { 0x0069, 0x0049, 0xffff } }, // ISCL_KEYCODE_I = 37 { Qt::Key_J, { 0x006a, 0x004a, 0xffff } }, // ISCL_KEYCODE_J = 38 { Qt::Key_K, { 0x006b, 0x004b, 0xffff } }, // ISCL_KEYCODE_K = 39 { Qt::Key_L, { 0x006c, 0x004c, 0xffff } }, // ISCL_KEYCODE_L = 40 { Qt::Key_M, { 0x006d, 0x004d, 0xffff } }, // ISCL_KEYCODE_M = 41 { Qt::Key_N, { 0x006e, 0x004e, 0xffff } }, // ISCL_KEYCODE_N = 42 { Qt::Key_O, { 0x006f, 0x004f, 0xffff } }, // ISCL_KEYCODE_O = 43 { Qt::Key_P, { 0x0070, 0x0050, 0xffff } }, // ISCL_KEYCODE_P = 44 { Qt::Key_Q, { 0x0071, 0x0051, 0xffff } }, // ISCL_KEYCODE_Q = 45 { Qt::Key_R, { 0x0072, 0x0052, 0xffff } }, // ISCL_KEYCODE_R = 46 { Qt::Key_S, { 0x0073, 0x0053, 0xffff } }, // ISCL_KEYCODE_S = 47 { Qt::Key_T, { 0x0074, 0x0054, 0xffff } }, // ISCL_KEYCODE_T = 48 { Qt::Key_U, { 0x0075, 0x0055, 0xffff } }, // ISCL_KEYCODE_U = 49 { Qt::Key_V, { 0x0076, 0x0056, 0xffff } }, // ISCL_KEYCODE_V = 50 { Qt::Key_W, { 0x0077, 0x0057, 0xffff } }, // ISCL_KEYCODE_W = 51 { Qt::Key_X, { 0x0078, 0x0058, 0xffff } }, // ISCL_KEYCODE_X = 52 { Qt::Key_Y, { 0x0079, 0x0059, 0xffff } }, // ISCL_KEYCODE_Y = 53 { Qt::Key_Z, { 0x007a, 0x005a, 0xffff } }, // ISCL_KEYCODE_Z = 54 { Qt::Key_Comma, { 0x002c, 0xffff, 0xffff } }, // ISCL_KEYCODE_COMMA = 55 { Qt::Key_Period, { 0x002e, 0xffff, 0xffff } }, // ISCL_KEYCODE_PERIOD = 56 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_ALT_LEFT = 57 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_ALT_RIGHT = 58 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_SHIFT_LEFT = 59 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_SHIFT_RIGHT = 60 { Qt::Key_Tab, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_TAB = 61 { Qt::Key_Space, { 0x0020, 0xffff, 0xffff } }, // ISCL_KEYCODE_SPACE = 62 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_SYM = 63 { Qt::Key_Explorer, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_EXPLORER = 64 { Qt::Key_LaunchMail, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_ENVELOPE = 65 { Qt::Key_Enter, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_ENTER = 66 { Qt::Key_Delete, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_DEL = 67 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_GRAVE = 68 { Qt::Key_Minus, { 0x002d, 0x005f, 0xffff } }, // ISCL_KEYCODE_MINUS = 69 { Qt::Key_Equal, { 0x003d, 0xffff, 0xffff } }, // ISCL_KEYCODE_EQUALS = 70 { Qt::Key_BracketLeft, { 0x005b, 0xffff, 0xffff } }, // ISCL_KEYCODE_LEFT_BRACKET = 71 { Qt::Key_BracketRight, { 0x005d, 0xffff, 0xffff } }, // ISCL_KEYCODE_RIGHT_BRACKET = 72 { Qt::Key_Backslash, { 0x005c, 0xffff, 0xffff } }, // ISCL_KEYCODE_BACKSLASH = 73 { Qt::Key_Semicolon, { 0x003b, 0x003a, 0xffff } }, // ISCL_KEYCODE_SEMICOLON = 74 { Qt::Key_Apostrophe, { 0x0027, 0xffff, 0xffff } }, // ISCL_KEYCODE_APOSTROPHE = 75 { Qt::Key_Slash, { 0x002f, 0xffff, 0xffff } }, // ISCL_KEYCODE_SLASH = 76 { Qt::Key_At, { 0x0040, 0xffff, 0xffff } }, // ISCL_KEYCODE_AT = 77 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_NUM = 78 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_HEADSETHOOK = 79 { Qt::Key_CameraFocus, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_FOCUS = 80 // *Camera* focus { Qt::Key_Plus, { 0x002b, 0xffff, 0xffff } }, // ISCL_KEYCODE_PLUS = 81 { Qt::Key_Menu, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_MENU = 82 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_NOTIFICATION = 83 { Qt::Key_Search, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_SEARCH = 84 { Qt::Key_MediaTogglePlayPause, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_MEDIA_PLAY_PAUSE= 85 { Qt::Key_MediaStop, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_MEDIA_STOP = 86 { Qt::Key_MediaNext, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_MEDIA_NEXT = 87 { Qt::Key_MediaPrevious, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_MEDIA_PREVIOUS = 88 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_MEDIA_REWIND = 89 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_MEDIA_FAST_FORWARD = 90 { Qt::Key_VolumeMute, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_MUTE = 91 { Qt::Key_PageUp, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_PAGE_UP = 92 { Qt::Key_PageDown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_PAGE_DOWN = 93 { Qt::Key_Pictures, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_PICTSYMBOLS = 94 { Qt::Key_Mode_switch, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_SWITCH_CHARSET = 95 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_A = 96 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_B = 97 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_C = 98 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_X = 99 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_Y = 100 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_Z = 101 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_L1 = 102 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_R1 = 103 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_L2 = 104 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_R2 = 105 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_THUMBL = 106 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_THUMBR = 107 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_START = 108 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_SELECT = 109 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_MODE = 110 { Qt::Key_Escape, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_ESCAPE = 111 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_FORWARD_DEL = 112 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_CTRL_LEFT = 113 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_CTRL_RIGHT = 114 { Qt::Key_CapsLock, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_CAPS_LOCK = 115 { Qt::Key_ScrollLock, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_SCROLL_LOCK = 116 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_META_LEFT = 117 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_META_RIGHT = 118 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_FUNCTION = 119 { Qt::Key_SysReq, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_SYSRQ = 120 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BREAK = 121 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_MOVE_HOME = 122 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_MOVE_END = 123 { Qt::Key_Insert, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_INSERT = 124 { Qt::Key_Forward, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_FORWARD = 125 { Qt::Key_MediaPlay, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_MEDIA_PLAY = 126 { Qt::Key_MediaPause, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_MEDIA_PAUSE = 127 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_MEDIA_CLOSE = 128 { Qt::Key_Eject, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_MEDIA_EJECT = 129 { Qt::Key_MediaRecord, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_MEDIA_RECORD = 130 { Qt::Key_F1, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_F1 = 131 { Qt::Key_F2, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_F2 = 132 { Qt::Key_F3, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_F3 = 133 { Qt::Key_F4, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_F4 = 134 { Qt::Key_F5, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_F5 = 135 { Qt::Key_F6, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_F6 = 136 { Qt::Key_F7, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_F7 = 137 { Qt::Key_F8, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_F8 = 138 { Qt::Key_F9, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_F9 = 139 { Qt::Key_F10, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_F10 = 140 { Qt::Key_F11, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_F11 = 141 { Qt::Key_F12, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_F12 = 142 { Qt::Key_NumLock, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_NUM_LOCK = 143 { Qt::Key_0, { 0x0030, 0xffff, 0xffff } }, // ISCL_KEYCODE_NUMPAD_0 = 144 { Qt::Key_1, { 0x0031, 0xffff, 0xffff } }, // ISCL_KEYCODE_NUMPAD_1 = 145 { Qt::Key_2, { 0x0032, 0xffff, 0xffff } }, // ISCL_KEYCODE_NUMPAD_2 = 146 { Qt::Key_3, { 0x0033, 0xffff, 0xffff } }, // ISCL_KEYCODE_NUMPAD_3 = 147 { Qt::Key_4, { 0x0034, 0xffff, 0xffff } }, // ISCL_KEYCODE_NUMPAD_4 = 148 { Qt::Key_5, { 0x0035, 0xffff, 0xffff } }, // ISCL_KEYCODE_NUMPAD_5 = 149 { Qt::Key_6, { 0x0036, 0xffff, 0xffff } }, // ISCL_KEYCODE_NUMPAD_6 = 150 { Qt::Key_7, { 0x0037, 0xffff, 0xffff } }, // ISCL_KEYCODE_NUMPAD_7 = 151 { Qt::Key_8, { 0x0038, 0xffff, 0xffff } }, // ISCL_KEYCODE_NUMPAD_8 = 152 { Qt::Key_9, { 0x0039, 0xffff, 0xffff } }, // ISCL_KEYCODE_NUMPAD_9 = 153 { Qt::Key_Slash, { 0x002f, 0xffff, 0xffff } }, // ISCL_KEYCODE_NUMPAD_DIVIDE = 154 { Qt::Key_Asterisk, { 0x002a, 0xffff, 0xffff } }, // ISCL_KEYCODE_NUMPAD_MULTIPLY = 155 { Qt::Key_Minus, { 0x002d, 0xffff, 0xffff } }, // ISCL_KEYCODE_NUMPAD_SUBTRACT = 156 { Qt::Key_Plus, { 0x002b, 0xffff, 0xffff } }, // ISCL_KEYCODE_NUMPAD_ADD = 157 { Qt::Key_Period, { 0x002e, 0xffff, 0xffff } }, // ISCL_KEYCODE_NUMPAD_DOT = 158 { Qt::Key_Comma, { 0x002c, 0xffff, 0xffff } }, // ISCL_KEYCODE_NUMPAD_COMMA = 159 { Qt::Key_Enter, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_NUMPAD_ENTER = 160 { Qt::Key_Equal, { 0x003d, 0xffff, 0xffff } }, // ISCL_KEYCODE_NUMPAD_EQUALS = 161 { Qt::Key_ParenLeft, { 0x0028, 0xffff, 0xffff } }, // ISCL_KEYCODE_NUMPAD_LEFT_PAREN = 162 { Qt::Key_ParenRight, { 0x0029, 0xffff, 0xffff } }, // ISCL_KEYCODE_NUMPAD_RIGHT_PAREN = 163 { Qt::Key_VolumeMute, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_VOLUME_MUTE = 164 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_INFO = 165 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_CHANNEL_UP = 166 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_CHANNEL_DOWN = 167 { Qt::Key_ZoomIn, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_ZOOM_IN = 168 { Qt::Key_ZoomOut, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_ZOOM_OUT = 169 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_TV = 170 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_WINDOW = 171 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_GUIDE = 172 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_DVR = 173 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BOOKMARK = 174 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_CAPTIONS = 175 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_SETTINGS = 176 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_TV_POWER = 177 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_TV_INPUT = 178 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_STB_POWER = 179 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_STB_INPUT = 180 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_AVR_POWER = 181 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_AVR_INPUT = 182 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_PROG_RED = 183 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_PROG_GREEN = 184 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_PROG_YELLOW = 185 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_PROG_BLUE = 186 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_APP_SWITCH = 187 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_1 = 188 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_2 = 189 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_3 = 190 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_4 = 191 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_5 = 192 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_6 = 193 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_7 = 194 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_8 = 195 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_9 = 196 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_10 = 197 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_11 = 198 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_12 = 199 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_13 = 200 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_14 = 201 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_15 = 202 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_BUTTON_16 = 203 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_LANGUAGE_SWITCH = 204 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_MANNER_MODE = 205 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_3D_MODE = 206 { Qt::Key_unknown, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_CONTACTS = 207 { Qt::Key_Calendar, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_CALENDAR = 208 { Qt::Key_Music, { 0xffff, 0xffff, 0xffff } }, // ISCL_KEYCODE_MUSIC = 209 { Qt::Key_Calculator, { 0xffff, 0xffff, 0xffff } } // ISCL_KEYCODE_CALCULATOR = 210 }; class QUbuntuBaseEvent : public QEvent { public: QUbuntuBaseEvent(QWindow* window, const Event* event, QEvent::Type type) : QEvent(type) , window_(window) { memcpy(&nativeEvent_, event, sizeof(Event)); } QWindow* window_; Event nativeEvent_; }; QUbuntuBaseInput::QUbuntuBaseInput(QUbuntuBaseIntegration* integration) : integration_(integration) , eventFilterType_(static_cast( integration->nativeInterface())->genericEventFilterType()) , eventType_(static_cast(QEvent::registerEventType())) { // Initialize touch device. touchDevice_ = new QTouchDevice(); touchDevice_->setType(QTouchDevice::TouchScreen); touchDevice_->setCapabilities( QTouchDevice::Position | QTouchDevice::Area | QTouchDevice::Pressure | QTouchDevice::NormalizedPosition); QWindowSystemInterface::registerTouchDevice(touchDevice_); DLOG("QUbuntuBaseInput::QUbuntuBaseInput (this=%p, integration=%p)", this, integration); } QUbuntuBaseInput::~QUbuntuBaseInput() { DLOG("QUbuntuBaseInput::~QUbuntuBaseInput"); // touchDevice_ isn't cleaned up on purpose as it crashes or asserts on "Bus Error". } void QUbuntuBaseInput::customEvent(QEvent* event) { DLOG("QUbuntuBaseInput::customEvent (this=%p, event=%p)", this, event); DASSERT(QThread::currentThread() == thread()); QUbuntuBaseEvent* ubuntuEvent = static_cast(event); // Event filtering. long result; if (QWindowSystemInterface::handleNativeEvent( ubuntuEvent->window_, eventFilterType_, &ubuntuEvent->nativeEvent_, &result) == true) { DLOG("event filtered out by native interface"); return; } // Event dispatching. switch (ubuntuEvent->nativeEvent_.type) { case MOTION_EVENT_TYPE: { dispatchMotionEvent(ubuntuEvent->window_, &ubuntuEvent->nativeEvent_); break; } case KEY_EVENT_TYPE: { dispatchKeyEvent(ubuntuEvent->window_, &ubuntuEvent->nativeEvent_); break; } case HW_SWITCH_EVENT_TYPE: { dispatchHWSwitchEvent(ubuntuEvent->window_, &ubuntuEvent->nativeEvent_); break; } default: { DLOG("unhandled event type %d", ubuntuEvent->nativeEvent_.type); } } } void QUbuntuBaseInput::postEvent(QWindow* window, const void* event) { DLOG("QUbuntuBaseInput::postEvent (this=%p, window=%p, event=%p)", this, window, event); QCoreApplication::postEvent(this, new QUbuntuBaseEvent( window, reinterpret_cast(event), eventType_)); if ((window->flags() && Qt::WindowTransparentForInput) && window->parent()) { DLOG("QUbuntuBaseInput::postEvent (this=%p, window=%p, event=%p)", this, window->parent(), event); QCoreApplication::postEvent(this, new QUbuntuBaseEvent( window->parent(), reinterpret_cast(event), eventType_)); } } void QUbuntuBaseInput::dispatchMotionEvent(QWindow* window, const void* ev) { DLOG("QUbuntuBaseInput::dispatchMotionEvent (this=%p, window=%p, event=%p)", this, window, ev); const Event* event = reinterpret_cast(ev); #if (LOG_EVENTS != 0) // Motion event logging. LOG("MOTION device_id:%d source_id:%d action:%d flags:%d meta_state:%d edge_flags:%d " "button_state:%d x_offset:%.2f y_offset:%.2f x_precision:%.2f y_precision:%.2f " "down_time:%lld event_time:%lld pointer_count:%d {", event->device_id, event->source_id, event->action, event->flags, event->meta_state, event->details.motion.edge_flags, event->details.motion.button_state, event->details.motion.x_offset, event->details.motion.y_offset, event->details.motion.x_precision, event->details.motion.y_precision, event->details.motion.down_time, event->details.motion.event_time, event->details.motion.pointer_count); for (size_t i = 0; i < event->details.motion.pointer_count; i++) { LOG(" id:%d x:%.2f y:%.2f rx:%.2f ry:%.2f maj:%.2f min:%.2f sz:%.2f press:%.2f", event->details.motion.pointer_coordinates[i].id, event->details.motion.pointer_coordinates[i].x, event->details.motion.pointer_coordinates[i].y, event->details.motion.pointer_coordinates[i].raw_x, event->details.motion.pointer_coordinates[i].raw_y, event->details.motion.pointer_coordinates[i].touch_major, event->details.motion.pointer_coordinates[i].touch_minor, event->details.motion.pointer_coordinates[i].size, event->details.motion.pointer_coordinates[i].pressure // event->details.motion.pointer_coordinates[i].orientation -> Always 0.0. ); } LOG("}"); #endif // FIXME(loicm) Max pressure is device specific. That one is for the Samsung Galaxy Nexus. That // needs to be fixed as soon as the compat input lib adds query support. const float kMaxPressure = 1.28; const QRect kWindowGeometry = window->geometry(); QList touchPoints; // TODO: Is it worth setting the Qt::TouchPointStationary ones? Currently they are left // as Qt::TouchPointMoved const int kPointerCount = event->details.motion.pointer_count; for (int i = 0; i < kPointerCount; ++i) { QWindowSystemInterface::TouchPoint touchPoint; const float kX = event->details.motion.pointer_coordinates[i].raw_x; const float kY = event->details.motion.pointer_coordinates[i].raw_y; const float kW = event->details.motion.pointer_coordinates[i].touch_major; const float kH = event->details.motion.pointer_coordinates[i].touch_minor; const float kP = event->details.motion.pointer_coordinates[i].pressure; touchPoint.id = event->details.motion.pointer_coordinates[i].id; touchPoint.normalPosition = QPointF(kX / kWindowGeometry.width(), kY / kWindowGeometry.height()); touchPoint.area = QRectF(kX - (kW / 2.0), kY - (kH / 2.0), kW, kH); touchPoint.pressure = kP / kMaxPressure; touchPoint.state = Qt::TouchPointMoved; touchPoints.append(touchPoint); } switch (event->action & ISCL_MOTION_EVENT_ACTION_MASK) { case ISCL_MOTION_EVENT_ACTION_MOVE: // No extra work needed. break; case ISCL_MOTION_EVENT_ACTION_DOWN: touchPoints[0].state = Qt::TouchPointPressed; break; case ISCL_MOTION_EVENT_ACTION_UP: touchPoints[0].state = Qt::TouchPointReleased; break; case ISCL_MOTION_EVENT_ACTION_POINTER_DOWN: { const int index = (event->action & ISCL_MOTION_EVENT_ACTION_POINTER_INDEX_MASK) >> ISCL_MOTION_EVENT_ACTION_POINTER_INDEX_SHIFT; touchPoints[index].state = Qt::TouchPointPressed; break; } case ISCL_MOTION_EVENT_ACTION_CANCEL: case ISCL_MOTION_EVENT_ACTION_POINTER_UP: { const int index = (event->action & ISCL_MOTION_EVENT_ACTION_POINTER_INDEX_MASK) >> ISCL_MOTION_EVENT_ACTION_POINTER_INDEX_SHIFT; touchPoints[index].state = Qt::TouchPointReleased; break; } case ISCL_MOTION_EVENT_ACTION_OUTSIDE: case ISCL_MOTION_EVENT_ACTION_HOVER_MOVE: case ISCL_MOTION_EVENT_ACTION_SCROLL: case ISCL_MOTION_EVENT_ACTION_HOVER_ENTER: case ISCL_MOTION_EVENT_ACTION_HOVER_EXIT: default: DLOG("unhandled motion event action %d", event->action & ISCL_MOTION_EVENT_ACTION_MASK); } // Touch event propagation. handleTouchEvent(window, event->details.motion.event_time / 1000000, touchDevice_, touchPoints); } void QUbuntuBaseInput::handleTouchEvent( QWindow* window, ulong timestamp, QTouchDevice* device, const QList &points) { DLOG("QUbuntuBaseInput::handleTouchEvent (this=%p, window=%p, timestamp=%lu, device=%p)", this, window, timestamp, device); QWindowSystemInterface::handleTouchEvent(window, timestamp, device, points); } void QUbuntuBaseInput::dispatchKeyEvent(QWindow* window, const void* ev) { DLOG("QUbuntuBaseInput::dispatchKeyEvent (this=%p, window=%p, event=%p)", this, window, ev); const Event* event = reinterpret_cast(ev); #if (LOG_EVENTS != 0) // Key event logging. LOG("KEY device_id:%d source_id:%d action:%d flags:%d meta_state:%d key_code:%d " "scan_code:%d repeat_count:%d down_time:%lld event_time:%lld is_system_key:%d", event->device_id, event->source_id, event->action, event->flags, event->meta_state, event->details.key.key_code, event->details.key.scan_code, event->details.key.repeat_count, event->details.key.down_time, event->details.key.event_time, event->details.key.is_system_key); #endif // Key modifier and unicode index mapping. const int kMetaState = event->meta_state; Qt::KeyboardModifiers modifiers = Qt::NoModifier; int unicodeIndex = 0; if (kMetaState & ISCL_META_SHIFT_ON) { modifiers |= Qt::ShiftModifier; unicodeIndex = 1; } if (kMetaState & ISCL_META_CTRL_ON) { modifiers |= Qt::ControlModifier; unicodeIndex = 2; } if (kMetaState & ISCL_META_ALT_ON) { modifiers |= Qt::AltModifier; unicodeIndex = 2; } if (kMetaState & ISCL_META_META_ON) { modifiers |= Qt::MetaModifier; unicodeIndex = 2; } // Key event propagation. QEvent::Type keyType = kEventType[event->action]; quint32 keyCode = kKeyCode[event->details.key.key_code].keycode; QString text(kKeyCode[event->details.key.key_code].unicode[unicodeIndex]); ulong timestamp = event->details.key.event_time / 1000000; QPlatformInputContext* context = QGuiApplicationPrivate::platformIntegration()->inputContext(); if (context) { QKeyEvent qKeyEvent(keyType, keyCode, modifiers, text); qKeyEvent.setTimestamp(timestamp); if (context->filterEvent(&qKeyEvent)) { DLOG("key event filtered out by input context"); return; } } handleKeyEvent(window, timestamp, keyType, keyCode, modifiers, text); } void QUbuntuBaseInput::handleKeyEvent( QWindow* window, ulong timestamp, QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, const QString& text) { DLOG("QUbuntuBaseInput::handleKeyEvent (this=%p window=%p, timestamp=%lu, type=%d, key=%d, " "modifiers=%d, text='%s')", this, window, timestamp, static_cast(type), key, static_cast(modifiers), text.toUtf8().data()); QWindowSystemInterface::handleKeyEvent(window, timestamp, type, key, modifiers, text); } void QUbuntuBaseInput::dispatchHWSwitchEvent(QWindow* window, const void* ev) { Q_UNUSED(window); Q_UNUSED(ev); DLOG("QUbuntuBaseInput::dispatchSwitchEvent (this=%p, window=%p, event=%p)", this, window, ev); #if (LOG_EVENTS != 0) // HW switch event logging. const Event* event = reinterpret_cast(ev); LOG("HWSWITCH device_id:%d source_id:%d action:%d flags:%d meta_state:%d event_time:%lld " "policy_flags:%u switch_values:%d switch_mask:%d", event->device_id, event->source_id, event->action, event->flags, event->meta_state, event->details.hw_switch.event_time, event->details.hw_switch.policy_flags, event->details.hw_switch.switch_values, event->details.hw_switch.switch_mask); #endif // FIXME(loicm) Not sure how to interpret that kind of event. DLOG("hw switch events are not handled"); } qtubuntu-0.54+14.04.20140402/src/platforms/base/window.cc0000644000015301777760000000344312317074055023261 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #include "window.h" #include "screen.h" #include "logging.h" #include QUbuntuBaseWindow::QUbuntuBaseWindow(QWindow* w, QUbuntuBaseScreen* screen) : QPlatformWindow(w) , screen_(screen) , eglSurface_(EGL_NO_SURFACE) { DASSERT(screen != NULL); static int id = 1; id_ = id++; DLOG("QUbuntuBaseWindow::QUbuntuBaseWindow (this=%p, screen=%p)", this, screen); } QUbuntuBaseWindow::~QUbuntuBaseWindow() { DLOG("QUbuntuBaseWindow::~QUbuntuBaseWindow"); } void QUbuntuBaseWindow::createEGLSurface(EGLNativeWindowType nativeWindow) { DLOG("QUbuntuBaseWindow::createEGLSurface (this=%p, nativeWindow=%p)", this, reinterpret_cast(nativeWindow)); ASSERT((eglSurface_ = eglCreateWindowSurface( screen_->eglDisplay(), screen_->eglConfig(), nativeWindow, NULL)) != EGL_NO_SURFACE); } void QUbuntuBaseWindow::destroyEGLSurface() { DLOG("QUbuntuBaseWindow::destroyEGLSurface (this=%p)", this); if (eglSurface_ != EGL_NO_SURFACE) { eglDestroySurface(screen_->eglDisplay(), eglSurface_); eglSurface_ = EGL_NO_SURFACE; } } qtubuntu-0.54+14.04.20140402/src/platforms/base/input.h0000644000015301777760000000364012317074055022752 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #ifndef QUBUNTUBASEINPUT_H #define QUBUNTUBASEINPUT_H #include class QUbuntuBaseIntegration; class QUbuntuBaseInput : public QObject { Q_OBJECT public: QUbuntuBaseInput(QUbuntuBaseIntegration* integration); ~QUbuntuBaseInput(); // QObject methods. void customEvent(QEvent* event); virtual void handleTouchEvent(QWindow* window, ulong timestamp, QTouchDevice* device, const QList &points); virtual void handleKeyEvent(QWindow* window, ulong timestamp, QEvent::Type type, int key, Qt::KeyboardModifiers modifiers, const QString& text); void postEvent(QWindow* window, const void* event); QUbuntuBaseIntegration* integration() const { return integration_; } protected: virtual void dispatchKeyEvent(QWindow* window, const void* event); void dispatchMotionEvent(QWindow* window, const void* event); void dispatchHWSwitchEvent(QWindow* window, const void* event); private: QUbuntuBaseIntegration* integration_; QTouchDevice* touchDevice_; const QByteArray eventFilterType_; const QEvent::Type eventType_; }; #endif // QUBUNTUBASEINPUT_H qtubuntu-0.54+14.04.20140402/src/platforms/base/platformservices.h0000644000015301777760000000210512317074055025176 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #ifndef QUBUNTUBASEPLATFORMSERVICES_H #define QUBUNTUBASEPLATFORMSERVICES_H #include class QUbuntuBasePlatformServices : public QPlatformServices { public: bool openUrl(const QUrl &url); bool openDocument(const QUrl &url); private: bool callDispatcher(const QUrl &url); }; #endif // QUBUNTUBASEPLATFORMSERVICES_H qtubuntu-0.54+14.04.20140402/src/platforms/base/native_interface.h0000644000015301777760000000312612317074055025120 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #ifndef QUBUNTUBASENATIVEINTERFACE_H #define QUBUNTUBASENATIVEINTERFACE_H #include class QUbuntuBaseNativeInterface : public QPlatformNativeInterface { public: enum ResourceType { EglDisplay, EglContext, NativeOrientation, Display }; QUbuntuBaseNativeInterface(); ~QUbuntuBaseNativeInterface(); // QPlatformNativeInterface methods. void* nativeResourceForContext(const QByteArray& resourceString, QOpenGLContext* context); void* nativeResourceForScreen(const QByteArray& resourceString, QScreen* screen); void* nativeResourceForWindow(const QByteArray& resourceString, QWindow* window); // New methods. const QByteArray& genericEventFilterType() const { return genericEventFilterType_; } private: const QByteArray genericEventFilterType_; Qt::ScreenOrientation* nativeOrientation_; }; #endif // QUBUNTUNATIVEINTERFACE_H qtubuntu-0.54+14.04.20140402/src/platforms/base/backing_store.cc0000644000015301777760000000424112317074055024561 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #include "backing_store.h" #include "logging.h" #include #include QUbuntuBaseBackingStore::QUbuntuBaseBackingStore(QWindow* window) : QPlatformBackingStore(window) , context_(new QOpenGLContext) { context_->setFormat(window->requestedFormat()); context_->setScreen(window->screen()); context_->create(); DLOG("QUbuntuBaseBackingStore::QUbuntuBaseBackingStore (this=%p, window=%p)", this, window); } QUbuntuBaseBackingStore::~QUbuntuBaseBackingStore() { DLOG("QUbuntuBaseBackingStore::~QUbuntuBaseBackingStore"); delete context_; } void QUbuntuBaseBackingStore::flush(QWindow* window, const QRegion& region, const QPoint& offset) { Q_UNUSED(region); Q_UNUSED(offset); DLOG("QUbuntuBaseBackingStore::flush (this=%p, window=%p)", this, window); context_->swapBuffers(window); } void QUbuntuBaseBackingStore::beginPaint(const QRegion& region) { Q_UNUSED(region); DLOG("QUbuntuBaseBackingStore::beginPaint (this=%p)", this); window()->setSurfaceType(QSurface::OpenGLSurface); context_->makeCurrent(window()); device_ = new QOpenGLPaintDevice(window()->size()); } void QUbuntuBaseBackingStore::endPaint() { DLOG("QUbuntuBaseBackingStore::endPaint (this=%p)", this); delete device_; } void QUbuntuBaseBackingStore::resize(const QSize& size, const QRegion& staticContents) { Q_UNUSED(size); Q_UNUSED(staticContents); DLOG("QUbuntuBaseBackingStore::resize (this=%p)", this); } qtubuntu-0.54+14.04.20140402/src/platforms/base/context.h0000644000015301777760000000305012317074055023272 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #ifndef QUBUNTUBASECONTEXT_H #define QUBUNTUBASECONTEXT_H #include #include "screen.h" class QUbuntuBaseContext : public QPlatformOpenGLContext { public: QUbuntuBaseContext(QUbuntuBaseScreen* screen, QUbuntuBaseContext* share); ~QUbuntuBaseContext(); // QPlatformOpenGLContext methods. QSurfaceFormat format() const { return screen_->surfaceFormat(); } void swapBuffers(QPlatformSurface* surface); bool makeCurrent(QPlatformSurface* surface); void doneCurrent(); bool isValid() const { return eglContext_ != EGL_NO_CONTEXT; } void (*getProcAddress(const QByteArray& procName)) (); EGLContext eglContext() const { return eglContext_; } private: QUbuntuBaseScreen* screen_; EGLContext eglContext_; EGLDisplay eglDisplay_; }; #endif //QUBUNTUBASECONTEXT_H qtubuntu-0.54+14.04.20140402/src/platforms/base/platformservices.cc0000644000015301777760000000327012317074055025340 0ustar pbusernogroup00000000000000// This file is part of QtUbuntu, a set of Qt components for Ubuntu. // Copyright © 2013 Canonical Ltd. // // This program is free software: you can redistribute it and/or modify it under // the terms of the GNU Lesser General Public License version 3, as published by // the Free Software Foundation. // // This program is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranties of MERCHANTABILITY, // SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . #include "platformservices.h" #include #include #include bool QUbuntuBasePlatformServices::openUrl(const QUrl &url) { return callDispatcher(url); } bool QUbuntuBasePlatformServices::openDocument(const QUrl &url) { return callDispatcher(url); } bool QUbuntuBasePlatformServices::callDispatcher(const QUrl &url) { UAUrlDispatcherSession* session = ua_url_dispatcher_session(); if (!session) return false; ua_url_dispatcher_session_open(session, url.toEncoded().constData(), NULL, NULL); free(session); // We are returning true here because the other option // is spawning a nested event loop and wait for the // callback. But there is no guarantee on how fast // the callback is going to be so we prefer to avoid the // nested event loop. Long term plan is improve Qt API // to support an async openUrl return true; } qtubuntu-0.54+14.04.20140402/src/platforms/platforms.pro0000644000015301777760000000010212317074055023247 0ustar pbusernogroup00000000000000TEMPLATE = subdirs SUBDIRS += base ubuntu ubuntu.depends = base qtubuntu-0.54+14.04.20140402/deploy.sh0000755000015301777760000000234212317074055017563 0ustar pbusernogroup00000000000000#!/bin/bash -i adb push src/platforms/ubuntu/libqubuntu.so /data/ubuntu/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms adb push src/platforms/ubuntu/libqubuntumir.so /data/ubuntu/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms adb push src/platforms/ubuntu/libqubuntumirserver.so /data/ubuntu/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms adb push src/platforms/ubuntulegacy/libqubuntulegacy.so /data/ubuntu/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms adb push tests/qmlscene_ubuntu/qmlscene-ubuntu /data/ubuntu/usr/bin adb push tests/clipboard/clipboard /data/ubuntu/usr/lib/arm-linux-gnueabihf/qt5/tests adb push tests/Logo.qml /data/ubuntu/usr/lib/arm-linux-gnueabihf/qt5/tests adb push tests/MovingLogo.qml /data/ubuntu/usr/lib/arm-linux-gnueabihf/qt5/tests adb push tests/WarpingLogo.qml /data/ubuntu/usr/lib/arm-linux-gnueabihf/qt5/tests adb push tests/Input.qml /data/ubuntu/usr/lib/arm-linux-gnueabihf/qt5/tests adb push tests/Application.qml /data/ubuntu/usr/lib/arm-linux-gnueabihf/qt5/tests adb push tests/Fullscreen.qml /data/ubuntu/usr/lib/arm-linux-gnueabihf/qt5/tests adb push tests/logo.png /data/ubuntu/usr/lib/arm-linux-gnueabihf/qt5/tests adb push tests/noise.png /data/ubuntu/usr/lib/arm-linux-gnueabihf/qt5/tests qtubuntu-0.54+14.04.20140402/README0000644000015301777760000001060612317074055016612 0ustar pbusernogroup00000000000000 1. Description 2. Running 3. Building 4. QPA native interface 5. QPA properties 1. Description -------------- QtUbuntu is a set of Qt5 components for the Ubuntu Platform API. It contains a QPA (Qt Platform Abstraction) plugin based on the Ubuntu Platform API and a legacy QPA plugin based on the compatibility layers. It also provides Qt bindings for Ubuntu Platform API features that are not exposed through the QPA plugins. 2 Running --------- Considering the QPA plugin path is correctly set using either the QT_QPA_PLATFORM_PLUGIN_PATH environment variable or the "-platformpluginpath" command line switch, the following commands can be used to run with the Ubuntu QPA plugin: $ qmlscene -platform ubuntu Foo.qml $ QT_QPA_PLATFORM=ubuntu qmlscene Foo.qml and the following ones to run with the Ubuntu legacy QPA plugin: $ qmlscene -platform ubuntulegacy Foo.qml $ QT_QPA_PLATFORM=ubuntulegacy qmlscene Foo.qml The QPA plugins expose the following environment variables: QTUBUNTU_SWAPINTERVAL: Specifies the required swap interval as an integer. 1 by default. QTUBUNTU_MULTISAMPLE: Enables multisampling with using 4 samples per fragment. QTUBUNTU_NO_THREADED_OPENGL: Disables QtQuick threaded OpenGL rendering. QTUBUNTU_NO_INPUT: Disables touchscreen and buttons. QTUBUNTU_INPUT_DELAY: Specifies a delay in milliseconds for input initialization (ubuntulegacy plugin only). QTUBUNTU_ICON_THEME: Specifies the default icon theme name. 3. Building ----------- To compile QtUbuntu, create the makefiles with qmake and build with make: $ qmake $ make By default, QtUbuntu compiles a release build. To compile a debug build, the following qmake command should be used: $ qmake CONFIG+=debug 4. QPA native interface ----------------------- The QPA plugin exposes a native interface allowing to retrieve native handles and to filter out native events. In order to retrieve native handles, the following code can be used: #include #include ... QQuickView* view = new QQuickView(); ... QPlatformNativeInterface* native = QGuiApplication::platformNativeInterface(); printf("app: eglcontext=%p egldisplay=%p\n", native->nativeResourceForContext("eglcontext", view->openglContext()), native->nativeResourceForWindow("egldisplay", view)); Note that handles aren't valid until the application mainloop is started. The qmake .pro needs to add private gui include directories using QT += gui-private Some events exposed in the input compatibility layer can't be directly mapped to Qt. In order to retrieve such events, a native event filter needs to be installed. To do so, a QAbstractNativeEventFilter [1] filtering out "Event" events needs to be implemented and installed using QCoreApplication::installNativeEventFilter [2]. [1] http://doc-snapshot.qt-project.org/5.0/qabstractnativeeventfilter.html [2] http://doc-snapshot.qt-project.org/5.0/qcoreapplication.html#installNativeEventFilter 5. QPA properties ----------------- The QPA plugin for Ubuntu looks for a "session" dynamic property on the QPlatformNativeInterface object in order to know the session type to request. That property can be set to an integer representing a SessionType specified in the Ubuntu Platform API before the first window is shown. In order to request a system session type, the following code can be used: #include ... QPlatformNativeInterface* native = QGuiApplication::platformNativeInterface(); native->setProperty("session", static_cast(USER_SESSION_TYPE)); The plugin also looks for "role" and "opaque" dynamic properties on the QWindow object. The "role" property can be set to an integer representing a SurfaceRole and the "opaque" property can be set to 0 or 1 to specify whether or not the surface shoud be considered opaque by the compositor. Note that these properties must be set before the window is shown. In order to request a launcher role and an opaque window, the following code can be used: QQuickView* view = new QQuickView(); view->setProperty("role", static_cast(LAUNCHER_ACTOR_ROLE)); view->setProperty("opaque", 1); qtubuntu-0.54+14.04.20140402/COPYING.LGPL0000644000015301777760000001674312317074055017532 0ustar pbusernogroup00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.