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;
59 ModeMap
modes() const;
60 RandRMode
mode(RRMode id
) const;
62 bool adjustSize(const QRect
&minimumSize
= QRect(0,0,0,0));
63 bool setSize(const QSize
&s
);
66 * Return the number of connected outputs
68 int connectedCount() const;
71 * Return the number of active outputs
73 int activeCount() const;
75 bool outputsUnified() const;
76 void setOutputsUnified(bool unified
);
78 int unifiedRotations() const;
79 SizeList
unifiedSizes() const;
83 bool applyProposed(bool confirm
);
85 void load(KConfig
&config
);
86 void save(KConfig
&config
);
89 void slotUnifyOutputs(bool unify
);
90 void slotResizeUnified(QAction
*action
);
91 void slotRotateUnified(QAction
*action
);
93 void slotOutputChanged(RROutput id
, int changes
);
110 bool m_outputsUnified
;
112 int m_unifiedRotation
;
114 int m_connectedCount
;
117 XRRScreenResources
* m_resources
;