~gerboland/qtubuntu/devicePixelRatio

« back to all changes in this revision

Viewing changes to src/ubuntumirclient/cursor.h

  • Committer: CI Train Bot
  • Author(s): Daniel d'Andrada
  • Date: 2015-11-24 13:26:03 UTC
  • mfrom: (286.2.7 cursor)
  • Revision ID: ci-train-bot@canonical.com-20151124132603-1q7lc97ut86ufbwe
Implemented cursor support
Approved by: PS Jenkins bot, Lukáš Tinkl

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 UBUNTU_CURSOR_H
 
18
#define UBUNTU_CURSOR_H
 
19
 
 
20
#include <qpa/qplatformcursor.h>
 
21
 
 
22
#include <QMap>
 
23
#include <QByteArray>
 
24
 
 
25
struct MirConnection;
 
26
struct MirSurface;
 
27
 
 
28
class UbuntuCursor : public QPlatformCursor
 
29
{
 
30
public:
 
31
    UbuntuCursor(MirConnection *connection);
 
32
    void changeCursor(QCursor *windowCursor, QWindow *window) override;
 
33
private:
 
34
    void configureMirCursorWithPixmapQCursor(MirSurface *surface, QCursor &cursor);
 
35
    void applyDefaultCursorConfiguration(MirSurface *surface);
 
36
    QMap<int, QByteArray> mShapeToCursorName;
 
37
    MirConnection *mConnection;
 
38
};
 
39
 
 
40
#endif // UBUNTU_CURSOR_H