Changeset View
Changeset View
Standalone View
Standalone View
abstract_output.h
Show All 19 Lines | |||||
20 | #ifndef KWIN_ABSTRACT_OUTPUT_H | 20 | #ifndef KWIN_ABSTRACT_OUTPUT_H | ||
21 | #define KWIN_ABSTRACT_OUTPUT_H | 21 | #define KWIN_ABSTRACT_OUTPUT_H | ||
22 | 22 | | |||
23 | #include <kwin_export.h> | 23 | #include <kwin_export.h> | ||
24 | 24 | | |||
25 | #include <QObject> | 25 | #include <QObject> | ||
26 | #include <QRect> | 26 | #include <QRect> | ||
27 | #include <QSize> | 27 | #include <QSize> | ||
28 | #include <QVector> | ||||
28 | 29 | | |||
29 | namespace KWin | 30 | namespace KWin | ||
30 | { | 31 | { | ||
31 | 32 | | |||
32 | namespace ColorCorrect { | 33 | class KWIN_EXPORT GammaRamp | ||
33 | struct GammaRamp; | 34 | { | ||
34 | } | 35 | public: | ||
36 | GammaRamp(uint32_t size); | ||||
37 | | ||||
38 | /** | ||||
39 | * Returns the size of the gamma ramp. | ||||
40 | **/ | ||||
41 | uint32_t size() const; | ||||
42 | | ||||
43 | /** | ||||
44 | * Returns pointer to the first red component in the gamma ramp. | ||||
45 | * | ||||
46 | * The returned pointer can be used for altering the red component | ||||
47 | * in the gamma ramp. | ||||
48 | **/ | ||||
49 | uint16_t *red(); | ||||
50 | | ||||
51 | /** | ||||
52 | * Returns pointer to the first red component in the gamma ramp. | ||||
53 | **/ | ||||
54 | const uint16_t *red() const; | ||||
55 | | ||||
56 | /** | ||||
57 | * Returns pointer to the first green component in the gamma ramp. | ||||
58 | * | ||||
59 | * The returned pointer can be used for altering the green component | ||||
60 | * in the gamma ramp. | ||||
61 | **/ | ||||
62 | uint16_t *green(); | ||||
63 | | ||||
64 | /** | ||||
65 | * Returns pointer to the first green component in the gamma ramp. | ||||
66 | **/ | ||||
67 | const uint16_t *green() const; | ||||
68 | | ||||
69 | /** | ||||
70 | * Returns pointer to the first blue component in the gamma ramp. | ||||
71 | * | ||||
72 | * The returned pointer can be used for altering the blue component | ||||
73 | * in the gamma ramp. | ||||
74 | **/ | ||||
75 | uint16_t *blue(); | ||||
76 | | ||||
77 | /** | ||||
78 | * Returns pointer to the first blue component in the gamma ramp. | ||||
79 | **/ | ||||
80 | const uint16_t *blue() const; | ||||
81 | | ||||
82 | private: | ||||
83 | QVector<uint16_t> m_table; | ||||
84 | uint32_t m_size; | ||||
85 | }; | ||||
35 | 86 | | |||
36 | /** | 87 | /** | ||
37 | * Generic output representation in a Wayland session | 88 | * Generic output representation in a Wayland session | ||
38 | **/ | 89 | **/ | ||
39 | class KWIN_EXPORT AbstractOutput : public QObject | 90 | class KWIN_EXPORT AbstractOutput : public QObject | ||
40 | { | 91 | { | ||
41 | Q_OBJECT | 92 | Q_OBJECT | ||
42 | public: | 93 | public: | ||
Show All 16 Lines | |||||
59 | } | 110 | } | ||
60 | virtual QSize physicalSize() const { | 111 | virtual QSize physicalSize() const { | ||
61 | return QSize(); | 112 | return QSize(); | ||
62 | } | 113 | } | ||
63 | virtual Qt::ScreenOrientation orientation() const { | 114 | virtual Qt::ScreenOrientation orientation() const { | ||
64 | return Qt::PrimaryOrientation; | 115 | return Qt::PrimaryOrientation; | ||
65 | } | 116 | } | ||
66 | 117 | | |||
67 | virtual int getGammaRampSize() const { | 118 | virtual int gammaRampSize() const { | ||
68 | return 0; | 119 | return 0; | ||
69 | } | 120 | } | ||
70 | virtual bool setGammaRamp(const ColorCorrect::GammaRamp &gamma) { | 121 | virtual bool setGammaRamp(const GammaRamp &gamma) { | ||
71 | Q_UNUSED(gamma); | 122 | Q_UNUSED(gamma); | ||
72 | return false; | 123 | return false; | ||
73 | } | 124 | } | ||
74 | }; | 125 | }; | ||
75 | 126 | | |||
76 | } | 127 | } | ||
77 | 128 | | |||
78 | #endif | 129 | #endif |