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
=== modified file 'debian/changelog'
--- debian/changelog 2017-02-17 14:12:04 +0000
+++ debian/changelog 2017-02-21 12:48:01 +0000
@@ -1,3 +1,9 @@
1unity-api (8.4) UNRELEASED; urgency=medium
2
3 * Added API needed for emulating touch out of mouse events at qtmir level
4
5 -- Daniel d'Andrada <daniel.dandrada@canonical.com> Thu, 09 Feb 2017 11:24:14 -0200
6
1unity-api (8.3+17.04.20170217-0ubuntu1) zesty; urgency=medium7unity-api (8.3+17.04.20170217-0ubuntu1) zesty; urgency=medium
28
3 [ Pete ]9 [ Pete ]
410
=== modified file 'include/unity/shell/application/CMakeLists.txt'
--- include/unity/shell/application/CMakeLists.txt 2017-01-26 11:07:35 +0000
+++ include/unity/shell/application/CMakeLists.txt 2017-02-21 12:48:01 +0000
@@ -7,7 +7,7 @@
77
8set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE)8set(UNITY_API_LIB_HDRS ${UNITY_API_LIB_HDRS} ${headers} ${internal_headers} PARENT_SCOPE)
99
10set(VERSION 26)10set(VERSION 27)
11set(PKGCONFIG_NAME "unity-shell-application")11set(PKGCONFIG_NAME "unity-shell-application")
12set(PKGCONFIG_DESCRIPTION "Unity shell Application APIs")12set(PKGCONFIG_DESCRIPTION "Unity shell Application APIs")
13set(PKGCONFIG_REQUIRES "Qt5Core")13set(PKGCONFIG_REQUIRES "Qt5Core")
1414
=== modified file 'include/unity/shell/application/Mir.h'
--- include/unity/shell/application/Mir.h 2017-01-16 10:54:30 +0000
+++ include/unity/shell/application/Mir.h 2017-02-21 12:48:01 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright (C) 2015-2016 Canonical, Ltd.2 * Copyright (C) 2015-2017 Canonical, Ltd.
3 *3 *
4 * This program is free software; you can redistribute it and/or modify4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by5 * it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
20#include <QObject>20#include <QObject>
2121
22/**22/**
23 @brief Acting mostly as a namespace to hold enums and such for use in QML23 @brief Hold enums and global properties for use in QML
24 */24 */
25class Mir : public QObject25class Mir : public QObject
26{26{
@@ -40,6 +40,16 @@
40 */40 */
41 Q_PROPERTY(QString currentKeymap READ currentKeymap WRITE setCurrentKeymap NOTIFY currentKeymapChanged)41 Q_PROPERTY(QString currentKeymap READ currentKeymap WRITE setCurrentKeymap NOTIFY currentKeymapChanged)
4242
43 /**
44 * @brief Whether mir pointer events should generate QTouchEvents instead of QMouseEvents
45 *
46 * If true, mir pointer events will be used to synthesize QTouchEvents instead of being translated
47 * into QMouseEvents.
48 *
49 * This is useful when testing touch UIs with a mouse device.
50 */
51 Q_PROPERTY(bool touchEmulationEnabled READ touchEmulationEnabled WRITE setTouchEmulationEnabled NOTIFY touchEmulationEnabledChanged)
52
43public:53public:
44 /**54 /**
45 @brief Surface type55 @brief Surface type
@@ -118,12 +128,16 @@
118128
119 virtual QString currentKeymap() const = 0;129 virtual QString currentKeymap() const = 0;
120 virtual void setCurrentKeymap(const QString &currentKeymap) = 0;130 virtual void setCurrentKeymap(const QString &currentKeymap) = 0;
131
132 virtual bool touchEmulationEnabled() const = 0;
133 virtual void setTouchEmulationEnabled(bool enabled) = 0;
121 /// @endcond134 /// @endcond
122135
123Q_SIGNALS:136Q_SIGNALS:
124 /// @cond137 /// @cond
125 void cursorNameChanged(const QString &cursorName);138 void cursorNameChanged(const QString &cursorName);
126 void currentKeymapChanged(const QString &currentKeymap);139 void currentKeymapChanged(const QString &currentKeymap);
140 void touchEmulationEnabledChanged(bool enabled);
127 /// @endcond141 /// @endcond
128};142};
129143
130144
=== modified file 'include/unity/shell/application/MirMousePointerInterface.h'
--- include/unity/shell/application/MirMousePointerInterface.h 2016-05-18 20:51:23 +0000
+++ include/unity/shell/application/MirMousePointerInterface.h 2017-02-21 12:48:01 +0000
@@ -78,13 +78,16 @@
78 * area.78 * area.
79 * This is called by Mir's platform cursor.79 * This is called by Mir's platform cursor.
80 *80 *
81 * Note that we get only relative mouse movement, since the mouse pointer position is defined81 * The mouse pointer position is defined by this very item. Ie., it's up to this class to
82 * by this very item. Ie., it's up to this class to decide whether or not it (the mouse pointer)82 * decide whether or not it (the mouse pointer) should move (and how much) due to movement
83 * should move (and how much) due to movement in a mouse device.83 * in a mouse device.
84 *84 *
85 * @param movement Movement vector85 * @param movement Movement vector
86 * @param position Position of the mouse device. Note that this is different from the
87 * position of the mouse pointer defined by this class, which is what shell
88 * will see and use.
86 */89 */
87 virtual void handleMouseEvent(ulong timestamp, QPointF movement, Qt::MouseButtons buttons,90 virtual void handleMouseEvent(ulong timestamp, QPointF movement, QPointF position, Qt::MouseButtons buttons,
88 Qt::KeyboardModifiers modifiers) = 0;91 Qt::KeyboardModifiers modifiers) = 0;
8992
90 /**93 /**

Subscribers

People subscribed via source and target branches

to all changes: