Changeset View
Changeset View
Standalone View
Standalone View
src/client/outputconfiguration.h
Show All 16 Lines | |||||
17 | * You should have received a copy of the GNU Lesser General Public | 17 | * You should have received a copy of the GNU Lesser General Public | ||
18 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | 18 | * License along with this library. If not, see <http://www.gnu.org/licenses/>. | ||
19 | ****************************************************************************/ | 19 | ****************************************************************************/ | ||
20 | #ifndef KWAYLAND_CLIENT_OUTPUTCONFIGURATION_H | 20 | #ifndef KWAYLAND_CLIENT_OUTPUTCONFIGURATION_H | ||
21 | #define KWAYLAND_CLIENT_OUTPUTCONFIGURATION_H | 21 | #define KWAYLAND_CLIENT_OUTPUTCONFIGURATION_H | ||
22 | 22 | | |||
23 | #include <QObject> | 23 | #include <QObject> | ||
24 | #include <QPoint> | 24 | #include <QPoint> | ||
25 | #include <QVector> | ||||
25 | 26 | | |||
26 | #include "outputdevice.h" | 27 | #include "outputdevice.h" | ||
27 | #include <KWayland/Client/kwaylandclient_export.h> | 28 | #include <KWayland/Client/kwaylandclient_export.h> | ||
28 | 29 | | |||
29 | struct org_kde_kwin_outputmanagement; | 30 | struct org_kde_kwin_outputmanagement; | ||
30 | struct org_kde_kwin_outputconfiguration; | 31 | struct org_kde_kwin_outputconfiguration; | ||
31 | 32 | | |||
32 | namespace KWayland | 33 | namespace KWayland | ||
▲ Show 20 Lines • Show All 160 Lines • ▼ Show 20 Line(s) | 100 | public: | |||
193 | * OutputDevice and only applied after apply() has been called. | 194 | * OutputDevice and only applied after apply() has been called. | ||
194 | * | 195 | * | ||
195 | * @param scale the scaling factor for this output device. | 196 | * @param scale the scaling factor for this output device. | ||
196 | * @param outputdevice the OutputDevice this change applies to. | 197 | * @param outputdevice the OutputDevice this change applies to. | ||
197 | */ | 198 | */ | ||
198 | void setScale(OutputDevice *outputdevice, qint32 scale); | 199 | void setScale(OutputDevice *outputdevice, qint32 scale); | ||
199 | 200 | | |||
200 | /** | 201 | /** | ||
202 | * Set color curves for this output. The respective color curve vector | ||||
romangg: rm | |||||
203 | * lengths must equal the current ones in the OutputDevice. The codomain | ||||
204 | * of the curves is always the full uint16 value range, such that any vector | ||||
205 | * is accepted as long as it has the right size. | ||||
206 | * The changes done in this call will be recorded in the | ||||
207 | * OutputDevice and only applied after apply() has been called. | ||||
208 | * | ||||
209 | * @param red color curve of red channel. | ||||
210 | * @param green color curve of green channel. | ||||
211 | * @param blue color curve of blue channel. | ||||
The documentation could state how many elements need to be in the vectors. Ideally, every component could have any number of elements, and if there are too few, the other elements are interpolated. But it is probably simpler to just state "The number of elements in each vector must be 256 or 1024, depending on the depth of the framebuffer (24 bits or 30 bits)." cfeck: The documentation could state how many elements need to be in the vectors. Ideally, every… | |||||
Number of elements depends on the OutputDevice technical possibilities (i.e. for example as you said 256 for 8bit color ramps and 1024 for 10bit ones and every other value between 1 and 16bit ramp size). Will add a comment to the doc. romangg: Number of elements depends on the OutputDevice technical possibilities (i.e. for example as you… | |||||
212 | * @param outputdevice the OutputDevice this change applies to. | ||||
213 | */ | ||||
214 | void setColorCurves(OutputDevice *outputdevice, QVector<quint16> red, QVector<quint16> green, QVector<quint16> blue); | ||||
215 | | ||||
216 | /** | ||||
201 | * Ask the compositor to apply the changes. | 217 | * Ask the compositor to apply the changes. | ||
202 | * This results in the compositor looking at all outputdevices and if they have | 218 | * This results in the compositor looking at all outputdevices and if they have | ||
203 | * pending changes from the set* calls, these changes will be tested with the | 219 | * pending changes from the set* calls, these changes will be tested with the | ||
204 | * hardware and applied if possible. The compositor will react to these changes | 220 | * hardware and applied if possible. The compositor will react to these changes | ||
205 | * with the applied() or failed() signals. Note that mode setting may take a | 221 | * with the applied() or failed() signals. Note that mode setting may take a | ||
206 | * while, so the interval between calling apply() and receiving the applied() | 222 | * while, so the interval between calling apply() and receiving the applied() | ||
207 | * signal may be considerable, depending on the hardware. | 223 | * signal may be considerable, depending on the hardware. | ||
208 | * | 224 | * | ||
Show All 37 Lines |
rm