add more spacing
[personal-kdebase.git] / workspace / libs / kephal / xrandr12 / randr.h
blob24fa61d1e07e68345b436a79b7a35c1359231642
1 /*
2 * Copyright (c) 2007,2008 Harry Bock <hbock@providence.edu>
3 * Copyright (c) 2007 Gustavo Pichorim Boiko <gustavo.boiko@kdemail.net>
4 * Copyright (c) 2002,2003 Hamish Rodda <rodda@kde.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #ifndef __RANDR_H__
22 #define __RANDR_H__
24 #include <QString>
25 #include <QMap>
26 #include <QList>
27 #include <QSize>
29 extern "C"
31 #include <X11/Xlib.h>
32 #define INT8 _X11INT8
33 #define INT32 _X11INT32
34 #include <X11/Xproto.h>
35 #undef INT8
36 #undef INT32
37 #include <X11/extensions/Xrandr.h>
40 class RandRScreen;
41 class RandRCrtc;
42 class RandROutput;
43 class RandRMode;
45 // maps
46 typedef QMap<RRCrtc,RandRCrtc*> CrtcMap;
47 typedef QMap<RROutput,RandROutput*> OutputMap;
48 typedef QMap<RRMode,RandRMode> ModeMap;
50 //lists
51 typedef QList<RandRScreen*> ScreenList;
52 typedef QList<RROutput> OutputList;
53 typedef QList<RRCrtc> CrtcList;
54 typedef QList<RRMode> ModeList;
56 typedef QList<float> RateList;
57 typedef QList<QSize> SizeList;
59 //class LegacyRandRScreen;
60 //typedef QList<LegacyRandRScreen*> LegacyScreenList;
62 class RandR
64 public:
65 //static bool has_1_2;
66 static Time timestamp;
68 static const int OrientationCount = 6;
69 static const int RotationCount = 4;
71 enum Orientations {
72 Rotate0 = RR_Rotate_0,
73 Rotate90 = RR_Rotate_90,
74 Rotate180 = RR_Rotate_180,
75 Rotate270 = RR_Rotate_270,
76 RotateMask = (RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270),
77 ReflectX = RR_Reflect_X,
78 ReflectY = RR_Reflect_Y,
79 ReflectMask = (RR_Reflect_X | RR_Reflect_Y),
80 OrientationMask = (RotateMask | ReflectMask)
83 enum Changes
85 ChangeCrtc = 0x01,
86 ChangeOutputs = 0x02,
87 ChangeMode = 0x04,
88 ChangeRotation = 0x08,
89 ChangeConnection = 0x10,
90 ChangeRect = 0x20,
91 ChangeRate = 0x40
96 #endif