Changeset View
Changeset View
Standalone View
Standalone View
outputscreens.h
- This file was copied from plugins/platforms/drm/screens_drm.h.
1 | /******************************************************************** | 1 | /******************************************************************** | ||
---|---|---|---|---|---|
2 | KWin - the KDE window manager | 2 | KWin - the KDE window manager | ||
3 | This file is part of the KDE project. | 3 | This file is part of the KDE project. | ||
4 | 4 | | |||
5 | Copyright (C) 2015 Martin Gräßlin <mgraesslin@kde.org> | 5 | Copyright 2018 Roman Gilg <subdiff@gmail.com> | ||
6 | 6 | | |||
7 | This program is free software; you can redistribute it and/or modify | 7 | This program is free software; you can redistribute it and/or modify | ||
8 | it under the terms of the GNU General Public License as published by | 8 | it under the terms of the GNU General Public License as published by | ||
9 | the Free Software Foundation; either version 2 of the License, or | 9 | the Free Software Foundation; either version 2 of the License, or | ||
10 | (at your option) any later version. | 10 | (at your option) any later version. | ||
11 | 11 | | |||
12 | This program is distributed in the hope that it will be useful, | 12 | This program is distributed in the hope that it will be useful, | ||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. | ||
16 | 16 | | |||
17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | #ifndef KWIN_SCREENS_DRM_H | 20 | #ifndef KWIN_OUTPUTSCREENS_H | ||
21 | #define KWIN_SCREENS_DRM_H | 21 | #define KWIN_OUTPUTSCREENS_H | ||
22 | | ||||
22 | #include "screens.h" | 23 | #include "screens.h" | ||
23 | 24 | | |||
24 | namespace KWin | 25 | namespace KWin | ||
25 | { | 26 | { | ||
26 | class DrmBackend; | | |||
27 | 27 | | |||
28 | class DrmScreens : public Screens | 28 | /** | ||
29 | * @brief Implementation for backends with Outputs | ||||
30 | **/ | ||||
31 | class KWIN_EXPORT OutputScreens : public Screens | ||||
29 | { | 32 | { | ||
30 | Q_OBJECT | 33 | Q_OBJECT | ||
31 | public: | 34 | public: | ||
32 | DrmScreens(DrmBackend *backend, QObject *parent = nullptr); | 35 | OutputScreens(Platform *platform, QObject *parent = nullptr); | ||
33 | virtual ~DrmScreens(); | 36 | virtual ~OutputScreens(); | ||
37 | | ||||
34 | void init() override; | 38 | void init() override; | ||
39 | QString name(int screen) const override; | ||||
40 | bool isInternal(int screen) const; | ||||
41 | QSizeF physicalSize(int screen) const; | ||||
35 | QRect geometry(int screen) const override; | 42 | QRect geometry(int screen) const override; | ||
36 | int number(const QPoint &pos) const override; | | |||
37 | qreal scale(int screen) const override; | | |||
38 | QSize size(int screen) const override; | 43 | QSize size(int screen) const override; | ||
44 | qreal scale(int screen) const override; | ||||
45 | Qt::ScreenOrientation orientation(int screen) const; | ||||
39 | void updateCount() override; | 46 | void updateCount() override; | ||
40 | QString name(int screen) const override; | 47 | int number(const QPoint &pos) const override; | ||
41 | float refreshRate(int screen) const override; | | |||
42 | | ||||
43 | QSizeF physicalSize(int screen) const override; | | |||
44 | bool isInternal(int screen) const override; | | |||
45 | bool supportsTransformations(int screen) const override; | | |||
46 | Qt::ScreenOrientation orientation(int screen) const override; | | |||
47 | 48 | | |||
48 | private: | 49 | protected: | ||
49 | DrmBackend *m_backend; | 50 | Platform *m_platform; | ||
50 | }; | 51 | }; | ||
51 | 52 | | |||
52 | } | 53 | } | ||
53 | 54 | | |||
54 | #endif | 55 | #endif // KWIN_OUTPUTSCREENS_H |