Merge lp:~lukas-kde/unity-api/liveCaption into lp:unity-api

Proposed by Lukáš Tinkl
Status: Superseded
Proposed branch: lp:~lukas-kde/unity-api/liveCaption
Merge into: lp:unity-api
Diff against target: 263 lines (+170/-6)
7 files modified
debian/changelog (+8/-0)
include/unity/shell/application/CMakeLists.txt (+1/-1)
include/unity/shell/application/Mir.h (+20/-3)
include/unity/shell/application/MirMousePointerInterface.h (+99/-0)
include/unity/shell/application/MirPlatformCursor.h (+38/-0)
include/unity/shell/application/MirSurfaceInterface.h (+2/-1)
include/unity/shell/application/MirSurfaceItemInterface.h (+2/-1)
To merge this branch: bzr merge lp:~lukas-kde/unity-api/liveCaption
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Unity Team Pending
Review via email: mp+272753@code.launchpad.net

This proposal has been superseded by a proposal from 2015-09-29.

Commit message

Notify about surface name changes

Description of the change

Notify about surface name changes, bump api version

Cf: https://bugs.launchpad.net/ubuntu/+source/unity-api/+bug/1497092

* Are there any related MPs required for this MP to build/function as expected? Please list.

No

* Did you perform an exploratory manual test run of your code change and any related functionality?

Yes

* Did you make sure that your branch does not contain spurious tags?

Yes

* If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

Yes

* If you changed the UI, has there been a design review?

N/A

To post a comment you must log in.
lp:~lukas-kde/unity-api/liveCaption updated
190. By Lukáš Tinkl

rebase on top of lp:~dandrader/unity-api/mousePointer

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2015-09-15 09:15:11 +0000
+++ debian/changelog 2015-09-29 14:28:01 +0000
@@ -1,3 +1,11 @@
1unity-api (7.101) UNRELEASED; urgency=medium
2
3 * unity/shell/application: Add Mir.cursorName
4 * unity/shell/application: Added MirMousePointerInterface.h
5 * unity/shell/application: Added MirPlatformCursor.h
6
7 -- Daniel d'Andrada <daniel.dandrada@canonical.com> Tue, 01 Sep 2015 13:38:11 -0300
8
1unity-api (7.100+15.10.20150903-0ubuntu1) wily; urgency=medium9unity-api (7.100+15.10.20150903-0ubuntu1) wily; urgency=medium
210
3 [ Michal Sawicz ]11 [ Michal Sawicz ]
412
=== modified file 'include/unity/shell/application/CMakeLists.txt'
--- include/unity/shell/application/CMakeLists.txt 2015-08-19 13:18:09 +0000
+++ include/unity/shell/application/CMakeLists.txt 2015-09-29 14:28: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 8)10set(VERSION 9)
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 2015-08-19 13:18:09 +0000
+++ include/unity/shell/application/Mir.h 2015-09-29 14:28:01 +0000
@@ -20,15 +20,22 @@
20#include <QObject>20#include <QObject>
2121
22/**22/**
23 @brief Acting as a namespace to hold enums and such for use in QML23 @brief Acting mostly as a namespace to hold enums and such for use in QML
24 */24 */
25class Mir25class Mir : public QObject
26{26{
27 Q_GADGET27 Q_OBJECT
28 Q_ENUMS(Type)28 Q_ENUMS(Type)
29 Q_ENUMS(State)29 Q_ENUMS(State)
30 Q_ENUMS(OrientationAngle)30 Q_ENUMS(OrientationAngle)
3131
32 /**
33 @brief Name of the mouse cursor to be used. Follows the X Cursor naming convention.
34
35 Eg.: "left_ptr" is a left-sided pointer arrow
36 */
37 Q_PROPERTY(QString cursorName READ cursorName WRITE setCursorName NOTIFY cursorNameChanged)
38
32public:39public:
33 /**40 /**
34 @brief Surface type41 @brief Surface type
@@ -69,6 +76,16 @@
69 Angle180 = 180,76 Angle180 = 180,
70 Angle270 = 27077 Angle270 = 270
71 };78 };
79
80 /// @cond
81 virtual void setCursorName(const QString &cursorName) = 0;
82 virtual QString cursorName() const = 0;
83 /// @endcond
84
85Q_SIGNALS:
86 /// @cond
87 void cursorNameChanged(const QString &cursorName);
88 /// @endcond
72};89};
7390
74Q_DECLARE_METATYPE(Mir::OrientationAngle)91Q_DECLARE_METATYPE(Mir::OrientationAngle)
7592
=== added file 'include/unity/shell/application/MirMousePointerInterface.h'
--- include/unity/shell/application/MirMousePointerInterface.h 1970-01-01 00:00:00 +0000
+++ include/unity/shell/application/MirMousePointerInterface.h 2015-09-29 14:28:01 +0000
@@ -0,0 +1,99 @@
1/*
2 * Copyright (C) 2015 Canonical, Ltd.
3 *
4 * This program is free software: you can redistribute it and/or modify it under
5 * the terms of the GNU Lesser General Public License version 3, as published by
6 * the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
10 * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef MIR_MOUSE_POINTER_INTERFACE_H
18#define MIR_MOUSE_POINTER_INTERFACE_H
19
20#include <QQuickItem>
21
22/**
23 * @brief The QML mouse pointer
24 *
25 * FIXME: Get this out of unity-api
26 *
27 * This QML item drives the position of the Mir mouse pointer on the scene
28 */
29class MirMousePointerInterface : public QQuickItem {
30 Q_OBJECT
31
32 /**
33 * @brief Name of the cursor
34 * Defines the look of the mouse pointer along with themeName
35 */
36 Q_PROPERTY(QString cursorName READ cursorName NOTIFY cursorNameChanged)
37
38 /**
39 * @brief Name of the cursor theme
40 * Defines the look of the mouse pointer along with cursorName
41 * Its default value is "default".
42 */
43 Q_PROPERTY(QString themeName READ themeName NOTIFY themeNameChanged)
44
45 /**
46 * @brief X coordinate of the cursor hotspot
47 * Is value depends on the current cursor name and theme
48 */
49 Q_PROPERTY(qreal hotspotX READ hotspotX NOTIFY hotspotXChanged)
50
51 /**
52 * @brief Y coordinate of the cursor hotspot
53 * Is value depends on the current cursor name and theme
54 */
55 Q_PROPERTY(qreal hotspotY READ hotspotY NOTIFY hotspotYChanged)
56public:
57 /**
58 * @brief The constructor
59 */
60 MirMousePointerInterface(QQuickItem *parent = nullptr) : QQuickItem(parent) {}
61
62 /// @cond
63 virtual void setCursorName(const QString &cursorName) = 0;
64 virtual QString cursorName() const = 0;
65
66 virtual void setThemeName(const QString &themeName) = 0;
67 virtual QString themeName() const = 0;
68
69 virtual qreal hotspotX() const = 0;
70 virtual qreal hotspotY() const = 0;
71 /// @endcond
72
73Q_SIGNALS:
74 /// @cond
75 void cursorNameChanged(QString name);
76 void themeNameChanged(QString name);
77 void hotspotXChanged(qreal value);
78 void hotspotYChanged(qreal value);
79 /// @endcond
80
81public Q_SLOTS:
82 /**
83 * @brief Handler for Mir mouse events
84 * The implementation should respond to Mir mouse events by moving itself along its parent
85 * area.
86 * This is called by Mir's platform cursor.
87 *
88 * Note that we get only relative mouse movement, since the mouse pointer position is defined
89 * by this very item. Ie., it's up to this class to decide whether or not it (the mouse pointer)
90 * should move (and how much) due to movement in a mouse device.
91 *
92 * @param movement Movement vector
93 */
94 virtual void handleMouseEvent(ulong timestamp, QPointF movement, Qt::MouseButton buttons,
95 Qt::KeyboardModifiers modifiers) = 0;
96
97};
98
99#endif // MIR_MOUSE_POINTER_INTERFACE_H
0100
=== added file 'include/unity/shell/application/MirPlatformCursor.h'
--- include/unity/shell/application/MirPlatformCursor.h 1970-01-01 00:00:00 +0000
+++ include/unity/shell/application/MirPlatformCursor.h 2015-09-29 14:28:01 +0000
@@ -0,0 +1,38 @@
1/*
2 * Copyright (C) 2015 Canonical, Ltd.
3 *
4 * 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 by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#ifndef MIR_PLATFORM_CURSOR_H
18#define MIR_PLATFORM_CURSOR_H
19
20#include <qpa/qplatformcursor.h>
21
22class MirMousePointerInterface;
23
24/**
25 * @brief Cursor interface for Mir platform
26 *
27 * FIXME: Get this out of unity-api
28 */
29class MirPlatformCursor : public QPlatformCursor
30{
31public:
32 /**
33 * @brief Set the QML mouse pointer that this platform cursor will talk to
34 */
35 virtual void setMousePointer(MirMousePointerInterface *mousePointer) = 0;
36};
37
38#endif // MIR_PLATFORM_CURSOR_H
039
=== modified file 'include/unity/shell/application/MirSurfaceInterface.h'
--- include/unity/shell/application/MirSurfaceInterface.h 2015-08-19 13:18:09 +0000
+++ include/unity/shell/application/MirSurfaceInterface.h 2015-09-29 14:28:01 +0000
@@ -47,7 +47,7 @@
47 /**47 /**
48 * @brief Name of the surface, given by the client application48 * @brief Name of the surface, given by the client application
49 */49 */
50 Q_PROPERTY(QString name READ name CONSTANT)50 Q_PROPERTY(QString name READ name NOTIFY nameChanged)
5151
52 /**52 /**
53 * @brief Size of the current surface buffer, in pixels.53 * @brief Size of the current surface buffer, in pixels.
@@ -102,6 +102,7 @@
102 void stateChanged(Mir::State value);102 void stateChanged(Mir::State value);
103 void orientationAngleChanged(Mir::OrientationAngle value);103 void orientationAngleChanged(Mir::OrientationAngle value);
104 void sizeChanged(const QSize &value);104 void sizeChanged(const QSize &value);
105 void nameChanged(const QString &name);
105 /// @endcond106 /// @endcond
106};107};
107108
108109
=== modified file 'include/unity/shell/application/MirSurfaceItemInterface.h'
--- include/unity/shell/application/MirSurfaceItemInterface.h 2015-08-19 13:18:09 +0000
+++ include/unity/shell/application/MirSurfaceItemInterface.h 2015-09-29 14:28:01 +0000
@@ -59,7 +59,7 @@
59 /**59 /**
60 * @brief Name of the given surface or an empty string if no surface is set60 * @brief Name of the given surface or an empty string if no surface is set
61 */61 */
62 Q_PROPERTY(QString name READ name CONSTANT)62 Q_PROPERTY(QString name READ name NOTIFY nameChanged)
6363
64 /**64 /**
65 * @brief True if the item has a surface and that surface has a mir client bound to it.65 * @brief True if the item has a surface and that surface has a mir client bound to it.
@@ -141,6 +141,7 @@
141 void consumesInputChanged(bool value);141 void consumesInputChanged(bool value);
142 void surfaceWidthChanged(int value);142 void surfaceWidthChanged(int value);
143 void surfaceHeightChanged(int value);143 void surfaceHeightChanged(int value);
144 void nameChanged(const QString &name);
144 /// @endcond145 /// @endcond
145};146};
146147

Subscribers

People subscribed via source and target branches

to all changes: