Changeset View
Changeset View
Standalone View
Standalone View
backends/xrandr/xrandrcrtc.h
Show All 12 Lines | |||||
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 | */ | 20 | */ | ||
21 | #pragma once | ||||
21 | 22 | | |||
22 | #ifndef XRANDRCRTC_H | 23 | #include <QMap> | ||
23 | #define XRANDRCRTC_H | | |||
24 | | ||||
25 | #include <QObject> | 24 | #include <QObject> | ||
26 | #include <QRect> | 25 | #include <QRect> | ||
27 | #include <QVector> | 26 | #include <QVector> | ||
28 | #include <QMap> | | |||
29 | 27 | | |||
30 | #include <xcb/randr.h> | 28 | #include <xcb/randr.h> | ||
31 | 29 | | |||
32 | class XRandRConfig; | 30 | class XRandRConfig; | ||
33 | 31 | | |||
34 | class XRandRCrtc : public QObject | 32 | class XRandRCrtc : public QObject | ||
35 | { | 33 | { | ||
36 | Q_OBJECT | 34 | Q_OBJECT | ||
37 | 35 | | |||
38 | public: | 36 | public: | ||
39 | typedef QMap<xcb_randr_crtc_t, XRandRCrtc*> Map; | 37 | typedef QMap<xcb_randr_crtc_t, XRandRCrtc*> Map; | ||
40 | 38 | | |||
41 | 39 | | |||
42 | XRandRCrtc(xcb_randr_crtc_t crtc, XRandRConfig *config); | 40 | XRandRCrtc(xcb_randr_crtc_t crtc, XRandRConfig *config); | ||
43 | 41 | | |||
44 | xcb_randr_crtc_t crtc() const; | 42 | xcb_randr_crtc_t crtc() const; | ||
45 | xcb_randr_mode_t mode() const; | 43 | xcb_randr_mode_t mode() const; | ||
46 | xcb_randr_rotation_t rotation() const; | 44 | | ||
47 | QRect geometry() const; | 45 | QRect geometry() const; | ||
46 | xcb_randr_rotation_t rotation() const; | ||||
47 | | ||||
48 | QVector<xcb_randr_output_t> possibleOutputs(); | 48 | QVector<xcb_randr_output_t> possibleOutputs(); | ||
49 | QVector<xcb_randr_output_t> outputs() const; | 49 | QVector<xcb_randr_output_t> outputs() const; | ||
50 | 50 | | |||
51 | bool connectOutput(xcb_randr_output_t output); | 51 | bool connectOutput(xcb_randr_output_t output); | ||
52 | void disconectOutput(xcb_randr_output_t output); | 52 | void disconectOutput(xcb_randr_output_t output); | ||
53 | 53 | | |||
54 | bool isFree() const; | 54 | bool isFree() const; | ||
55 | 55 | | |||
56 | void update(); | 56 | void update(); | ||
57 | void update(xcb_randr_crtc_t mode, xcb_randr_rotation_t rotation, const QRect &geom); | 57 | void update(xcb_randr_crtc_t mode, xcb_randr_rotation_t rotation, const QRect &geom); | ||
58 | 58 | | |||
59 | private: | 59 | private: | ||
60 | xcb_randr_crtc_t m_crtc; | 60 | xcb_randr_crtc_t m_crtc; | ||
61 | xcb_randr_mode_t m_mode; | 61 | xcb_randr_mode_t m_mode; | ||
62 | xcb_randr_rotation_t m_rotation; | 62 | | ||
63 | QRect m_geometry; | 63 | QRect m_geometry; | ||
64 | xcb_randr_rotation_t m_rotation; | ||||
65 | | ||||
64 | QVector<xcb_randr_output_t> m_possibleOutputs; | 66 | QVector<xcb_randr_output_t> m_possibleOutputs; | ||
65 | QVector<xcb_randr_output_t> m_outputs; | 67 | QVector<xcb_randr_output_t> m_outputs; | ||
66 | }; | 68 | }; | ||
67 | | ||||
68 | #endif // XRANDRCRTC_H | |