/* * Copyright (c) 2007,2008 Harry Bock * Copyright (c) 2007 Gustavo Pichorim Boiko * Copyright (c) 2002,2003 Hamish Rodda * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef __RANDR_H__ #define __RANDR_H__ #include #include #include #include #include extern "C" { #include #include #include } #include class RandRScreen; class RandRCrtc; class RandROutput; class RandRMode; // maps typedef QMap CrtcMap; typedef QMap OutputMap; typedef QMap ModeMap; //lists typedef QList ScreenList; typedef QList OutputList; typedef QList CrtcList; typedef QList ModeList; typedef QList RateList; typedef QList SizeList; class RandR { public: static Time timestamp; static const int OrientationCount = 6; static const int RotationCount = 4; enum Orientations { Rotate0 = RR_Rotate_0, Rotate90 = RR_Rotate_90, Rotate180 = RR_Rotate_180, Rotate270 = RR_Rotate_270, RotateMask = (RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270), ReflectX = RR_Reflect_X, ReflectY = RR_Reflect_Y, ReflectMask = (RR_Reflect_X | RR_Reflect_Y), OrientationMask = (RotateMask | ReflectMask) }; enum Changes { ChangeCrtc = 0x01, ChangeOutputs = 0x02, ChangeMode = 0x04, ChangeRotation = 0x08, ChangeConnection = 0x10, ChangeRect = 0x20, ChangeRate = 0x40 }; static QString rotationName(int rotation, bool pastTense = false, bool capitalised = true); static QPixmap rotationIcon(int rotation, int currentRotation); static bool confirm(const QRect &rect = QRect()); static SizeList sortSizes(const SizeList &sizes); }; #endif