Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/x11/standalone/x11_output.h
Show All 20 Lines | |||||
21 | #define KWIN_X11_OUTPUT_H | 21 | #define KWIN_X11_OUTPUT_H | ||
22 | 22 | | |||
23 | #include "abstract_output.h" | 23 | #include "abstract_output.h" | ||
24 | #include <kwin_export.h> | 24 | #include <kwin_export.h> | ||
25 | 25 | | |||
26 | #include <QObject> | 26 | #include <QObject> | ||
27 | #include <QRect> | 27 | #include <QRect> | ||
28 | 28 | | |||
29 | #include <xcb/randr.h> | ||||
30 | | ||||
29 | namespace KWin | 31 | namespace KWin | ||
30 | { | 32 | { | ||
31 | 33 | | |||
32 | /** | 34 | /** | ||
33 | * X11 output representation | 35 | * X11 output representation | ||
34 | **/ | 36 | **/ | ||
35 | class KWIN_EXPORT X11Output : public AbstractOutput | 37 | class KWIN_EXPORT X11Output : public AbstractOutput | ||
36 | { | 38 | { | ||
37 | Q_OBJECT | 39 | Q_OBJECT | ||
40 | | ||||
38 | public: | 41 | public: | ||
39 | explicit X11Output(QObject *parent = nullptr); | 42 | explicit X11Output(QObject *parent = nullptr); | ||
40 | virtual ~X11Output() = default; | 43 | virtual ~X11Output() = default; | ||
41 | 44 | | |||
42 | QString name() const override; | 45 | QString name() const override; | ||
43 | void setName(QString set); | 46 | void setName(QString set); | ||
44 | /** | 47 | /** | ||
45 | * The geometry of this output in global compositor co-ordinates (i.e scaled) | 48 | * The geometry of this output in global compositor co-ordinates (i.e scaled) | ||
46 | **/ | 49 | **/ | ||
47 | QRect geometry() const override; | 50 | QRect geometry() const override; | ||
48 | void setGeometry(QRect set); | 51 | void setGeometry(QRect set); | ||
49 | 52 | | |||
50 | /** | 53 | /** | ||
51 | * Current refresh rate in 1/ms. | 54 | * Current refresh rate in 1/ms. | ||
52 | **/ | 55 | **/ | ||
53 | int refreshRate() const override; | 56 | int refreshRate() const override; | ||
54 | void setRefreshRate(int set); | 57 | void setRefreshRate(int set); | ||
55 | 58 | | |||
59 | /** | ||||
60 | * The size of gamma lookup table. | ||||
61 | **/ | ||||
62 | int gammaRampSize() const override; | ||||
63 | bool setGammaRamp(const GammaRamp &gamma) override; | ||||
64 | | ||||
56 | private: | 65 | private: | ||
66 | void setCrtc(xcb_randr_crtc_t crtc); | ||||
67 | void setGammaRampSize(int size); | ||||
68 | | ||||
69 | xcb_randr_crtc_t m_crtc = XCB_NONE; | ||||
57 | QString m_name; | 70 | QString m_name; | ||
58 | QRect m_geometry; | 71 | QRect m_geometry; | ||
72 | int m_gammaRampSize; | ||||
59 | int m_refreshRate; | 73 | int m_refreshRate; | ||
74 | | ||||
75 | friend class X11StandalonePlatform; | ||||
60 | }; | 76 | }; | ||
61 | 77 | | |||
62 | } | 78 | } | ||
63 | 79 | | |||
64 | #endif | 80 | #endif |