Merge lp:~dandrader/unity-api/mirInputTweaks into lp:unity-api

Proposed by Daniel d'Andrada
Status: Needs review
Proposed branch: lp:~dandrader/unity-api/mirInputTweaks
Merge into: lp:unity-api
Diff against target: 105 lines (+30/-7)
4 files modified
debian/changelog (+6/-0)
include/unity/shell/application/CMakeLists.txt (+1/-1)
include/unity/shell/application/Mir.h (+16/-2)
include/unity/shell/application/MirMousePointerInterface.h (+7/-4)
To merge this branch: bzr merge lp:~dandrader/unity-api/mirInputTweaks
Reviewer Review Type Date Requested Status
Unity8 CI Bot continuous-integration Approve
Gerry Boland (community) Needs Information
Review via email: mp+316844@code.launchpad.net

Commit message

Added API needed for emulating touch out of mouse events at qtmir level

To post a comment you must log in.
Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:272
https://unity8-jenkins.ubuntu.com/job/lp-unity-api-ci/138/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4057
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4085
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3925
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/3925/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3925
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/3925/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3925
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/3925/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3925
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/3925/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3925
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/3925/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3925
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/3925/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity-api-ci/138/rebuild

review: Approve (continuous-integration)
Revision history for this message
Gerry Boland (gerboland) wrote :

+ * @param position Position of the mouse device. Note that this is different from the
+ * position of the mouse pointer defined by this class, which is what shell
+ * will see and use.

I'm a bit confused by this. You mean to say this is the position of the physical mouse, from which the class calculates the on-screen mouse cursor position?

review: Needs Information
272. By CI Train Bot Account

unity::util - Add typedef macros to GlibMemory to make method
and member variable definitions easier.

273. By CI Train Bot Account

Releasing 8.3+17.04.20170217-0ubuntu1

274. By Daniel d'Andrada

Added API needed for emulating touch out of mouse events at qtmir level

Revision history for this message
Unity8 CI Bot (unity8-ci-bot) wrote :

PASSED: Continuous integration, rev:274
https://unity8-jenkins.ubuntu.com/job/lp-unity-api-ci/142/
Executed test runs:
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build/4145
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-0-fetch/4173
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4011
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=xenial+overlay/4011/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4011
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=amd64,release=zesty/4011/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4011
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=xenial+overlay/4011/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4011
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=armhf,release=zesty/4011/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4011
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=xenial+overlay/4011/artifact/output/*zip*/output.zip
    SUCCESS: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4011
        deb: https://unity8-jenkins.ubuntu.com/job/build-2-binpkg/arch=i386,release=zesty/4011/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://unity8-jenkins.ubuntu.com/job/lp-unity-api-ci/142/rebuild

review: Approve (continuous-integration)

Unmerged revisions

274. By Daniel d'Andrada

Added API needed for emulating touch out of mouse events at qtmir level

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2017-02-17 14:12:04 +0000
3+++ debian/changelog 2017-02-21 12:48:01 +0000
4@@ -1,3 +1,9 @@
5+unity-api (8.4) UNRELEASED; urgency=medium
6+
7+ * Added API needed for emulating touch out of mouse events at qtmir level
8+
9+ -- Daniel d'Andrada <daniel.dandrada@canonical.com> Thu, 09 Feb 2017 11:24:14 -0200
10+
11 unity-api (8.3+17.04.20170217-0ubuntu1) zesty; urgency=medium
12
13 [ Pete ]
14
15=== modified file 'include/unity/shell/application/CMakeLists.txt'
16--- include/unity/shell/application/CMakeLists.txt 2017-01-26 11:07:35 +0000
17+++ include/unity/shell/application/CMakeLists.txt 2017-02-21 12:48:01 +0000
18@@ -7,7 +7,7 @@
19
20 set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE)
21
22-set(VERSION 26)
23+set(VERSION 27)
24 set(PKGCONFIG_NAME "unity-shell-application")
25 set(PKGCONFIG_DESCRIPTION "Unity shell Application APIs")
26 set(PKGCONFIG_REQUIRES "Qt5Core")
27
28=== modified file 'include/unity/shell/application/Mir.h'
29--- include/unity/shell/application/Mir.h 2017-01-16 10:54:30 +0000
30+++ include/unity/shell/application/Mir.h 2017-02-21 12:48:01 +0000
31@@ -1,5 +1,5 @@
32 /*
33- * Copyright (C) 2015-2016 Canonical, Ltd.
34+ * Copyright (C) 2015-2017 Canonical, Ltd.
35 *
36 * This program is free software; you can redistribute it and/or modify
37 * it under the terms of the GNU General Public License as published by
38@@ -20,7 +20,7 @@
39 #include <QObject>
40
41 /**
42- @brief Acting mostly as a namespace to hold enums and such for use in QML
43+ @brief Hold enums and global properties for use in QML
44 */
45 class Mir : public QObject
46 {
47@@ -40,6 +40,16 @@
48 */
49 Q_PROPERTY(QString currentKeymap READ currentKeymap WRITE setCurrentKeymap NOTIFY currentKeymapChanged)
50
51+ /**
52+ * @brief Whether mir pointer events should generate QTouchEvents instead of QMouseEvents
53+ *
54+ * If true, mir pointer events will be used to synthesize QTouchEvents instead of being translated
55+ * into QMouseEvents.
56+ *
57+ * This is useful when testing touch UIs with a mouse device.
58+ */
59+ Q_PROPERTY(bool touchEmulationEnabled READ touchEmulationEnabled WRITE setTouchEmulationEnabled NOTIFY touchEmulationEnabledChanged)
60+
61 public:
62 /**
63 @brief Surface type
64@@ -118,12 +128,16 @@
65
66 virtual QString currentKeymap() const = 0;
67 virtual void setCurrentKeymap(const QString &currentKeymap) = 0;
68+
69+ virtual bool touchEmulationEnabled() const = 0;
70+ virtual void setTouchEmulationEnabled(bool enabled) = 0;
71 /// @endcond
72
73 Q_SIGNALS:
74 /// @cond
75 void cursorNameChanged(const QString &cursorName);
76 void currentKeymapChanged(const QString &currentKeymap);
77+ void touchEmulationEnabledChanged(bool enabled);
78 /// @endcond
79 };
80
81
82=== modified file 'include/unity/shell/application/MirMousePointerInterface.h'
83--- include/unity/shell/application/MirMousePointerInterface.h 2016-05-18 20:51:23 +0000
84+++ include/unity/shell/application/MirMousePointerInterface.h 2017-02-21 12:48:01 +0000
85@@ -78,13 +78,16 @@
86 * area.
87 * This is called by Mir's platform cursor.
88 *
89- * Note that we get only relative mouse movement, since the mouse pointer position is defined
90- * by this very item. Ie., it's up to this class to decide whether or not it (the mouse pointer)
91- * should move (and how much) due to movement in a mouse device.
92+ * The mouse pointer position is defined by this very item. Ie., it's up to this class to
93+ * decide whether or not it (the mouse pointer) should move (and how much) due to movement
94+ * in a mouse device.
95 *
96 * @param movement Movement vector
97+ * @param position Position of the mouse device. Note that this is different from the
98+ * position of the mouse pointer defined by this class, which is what shell
99+ * will see and use.
100 */
101- virtual void handleMouseEvent(ulong timestamp, QPointF movement, Qt::MouseButtons buttons,
102+ virtual void handleMouseEvent(ulong timestamp, QPointF movement, QPointF position, Qt::MouseButtons buttons,
103 Qt::KeyboardModifiers modifiers) = 0;
104
105 /**

Subscribers

People subscribed via source and target branches

to all changes: