KWin
Loading...
Searching...
No Matches
xcursortheme.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2020 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include <kwin_export.h>
10
11#include <QImage>
12#include <QList>
13#include <QSharedDataPointer>
14
15#include <chrono>
16
17namespace KWin
18{
19
20class KXcursorSpritePrivate;
21class KXcursorThemePrivate;
22
26class KWIN_EXPORT KXcursorSprite
27{
28public:
33
37 KXcursorSprite(const KXcursorSprite &other);
38
42 KXcursorSprite(const QImage &data, const QPoint &hotspot,
43 const std::chrono::milliseconds &delay);
44
49
53 KXcursorSprite &operator=(const KXcursorSprite &other);
54
58 QImage data() const;
59
65 QPoint hotspot() const;
66
70 std::chrono::milliseconds delay() const;
71
72private:
73 QSharedDataPointer<KXcursorSpritePrivate> d;
74};
75
79class KWIN_EXPORT KXcursorTheme
80{
81public:
86
92 KXcursorTheme(const QString &theme, int size, qreal devicePixelRatio);
93
97 KXcursorTheme(const KXcursorTheme &other);
98
103
107 KXcursorTheme &operator=(const KXcursorTheme &other);
108
109 bool operator==(const KXcursorTheme &other);
110 bool operator!=(const KXcursorTheme &other);
111
115 bool isEmpty() const;
116
120 QList<KXcursorSprite> shape(const QByteArray &name) const;
121
122private:
123 QSharedDataPointer<KXcursorThemePrivate> d;
124};
125
126} // namespace KWin
bool operator==(const LinuxDmaBufV1Feedback::Tranche &t1, const LinuxDmaBufV1Feedback::Tranche &t2)