KWin
Loading...
Searching...
No Matches
x11_standalone_output.h
Go to the documentation of this file.
1/*
2 KWin - the KDE window manager
3 This file is part of the KDE project.
4
5 SPDX-FileCopyrightText: 2019 Roman Gilg <subdiff@gmail.com>
6
7 SPDX-License-Identifier: GPL-2.0-or-later
8*/
9#pragma once
10
11#include "core/output.h"
12#include <kwin_export.h>
13
14#include <QObject>
15#include <QRect>
16
17#include <xcb/randr.h>
18
19namespace KWin
20{
21
22class X11StandaloneBackend;
23
27class KWIN_EXPORT X11Output : public Output
28{
29 Q_OBJECT
30
31public:
32 explicit X11Output(X11StandaloneBackend *backend, QObject *parent = nullptr);
33
34 void updateEnabled(bool enabled);
35
36 RenderLoop *renderLoop() const override;
37 void setRenderLoop(RenderLoop *loop);
38
39 int xineramaNumber() const;
40 void setXineramaNumber(int number);
41
42 bool setChannelFactors(const QVector3D &rgb) override;
43
44private:
45 void setCrtc(xcb_randr_crtc_t crtc);
46 void setGammaRampSize(int size);
47
48 X11StandaloneBackend *m_backend;
49 RenderLoop *m_loop = nullptr;
50 xcb_randr_crtc_t m_crtc = XCB_NONE;
51 int m_gammaRampSize;
52 int m_xineramaNumber = 0;
53
55};
56
57}