2
* Copyright (c) 2007 Gustavo Pichorim Boiko <gustavo.boiko@kdemail.net>
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or
7
* (at your option) any later version.
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
#ifndef __RANDRSCREEN_H__
20
#define __RANDRSCREEN_H__
32
class RandRScreen : public QObject
37
RandRScreen(int screenIndex);
42
XRRScreenResources* resources() const;
43
Window rootWindow() const;
45
QSize minSize() const;
46
QSize maxSize() const;
48
void loadSettings(bool notify = false);
50
void handleEvent(XRRScreenChangeNotifyEvent* event);
51
void handleRandREvent(XRRNotifyEvent* event);
53
CrtcMap crtcs() const;
54
RandRCrtc *crtc(RRCrtc id) const;
56
OutputMap outputs() const;
57
RandROutput *output(RROutput id) const;
60
void setPrimaryOutput(RandROutput* output);
61
RandROutput* primaryOutput();
63
void proposePrimaryOutput(RandROutput* output);
66
ModeMap modes() const;
67
RandRMode mode(RRMode id) const;
69
bool adjustSize(const QRect &minimumSize = QRect(0,0,0,0));
70
bool setSize(const QSize &s);
73
* Return the number of connected outputs
75
int connectedCount() const;
78
* Return the number of active outputs
80
int activeCount() const;
82
bool outputsUnified() const;
83
void setOutputsUnified(bool unified);
85
int unifiedRotations() const;
86
SizeList unifiedSizes() const;
90
bool applyProposed(bool confirm);
92
void load(KConfig &config);
93
void save(KConfig &config);
94
QStringList startupCommands() const;
97
void slotUnifyOutputs(bool unify);
98
void slotResizeUnified(QAction *action);
99
void slotRotateUnified(QAction *action);
101
void slotOutputChanged(RROutput id, int changes);
107
void configChanged();
118
bool m_outputsUnified;
120
int m_unifiedRotation;
122
int m_connectedCount;
126
RandROutput* m_originalPrimaryOutput;
127
RandROutput* m_proposedPrimaryOutput;
128
#endif //HAS_RANDR_1_3
130
XRRScreenResources* m_resources;
139
// vim:noet:sts=8:sw=8: