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__
35 class RandRScreen
: public QObject
40 RandRScreen(int screenIndex
);
45 XRRScreenResources
* resources() const;
46 Window
rootWindow() const;
48 QSize
minSize() const;
49 QSize
maxSize() const;
51 void loadSettings(bool notify
= false);
53 void handleEvent(XRRScreenChangeNotifyEvent
* event
);
54 void handleRandREvent(XRRNotifyEvent
* event
);
56 CrtcMap
crtcs() const;
57 RandRCrtc
*crtc(RRCrtc id
) const;
59 OutputMap
outputs() const;
60 RandROutput
*output(RROutput id
) const;
62 ModeMap
modes() const;
63 RandRMode
mode(RRMode id
) const;
65 bool adjustSize(const QRect
&minimumSize
= QRect(0,0,0,0));
66 bool setSize(const QSize
&s
);
69 * Return the number of connected outputs
71 int connectedCount() const;
74 * Return the number of active outputs
76 int activeCount() const;
78 bool outputsUnified() const;
79 void setOutputsUnified(bool unified
);
81 int unifiedRotations() const;
82 SizeList
unifiedSizes() const;
90 void reloadResources();
93 void slotOutputChanged(RROutput id
, int changes
);
104 int m_connectedCount
;
107 XRRScreenResources
* m_resources
;