//=========================================== // Lumina-DE source code // Copyright (c) 2016, Ken Moore // Available under the 3-clause BSD license // See the LICENSE file for full details //=========================================== #ifndef _LUMINA_SCREEN_SETTINGS_BACKEND_H #define _LUMINA_SCREEN_SETTINGS_BACKEND_H #include #include #include #include class ScreenInfo{ public: QString ID; QRect geom; //screen geometry bool isprimary; bool isactive; bool isavailable; int applyChange; //[<=0: do nothing, 1: deactivate, 2: activate] QStringList resList; int rotation; //possible values: [-90, 0, 90, 180] //Initial Defaults ScreenInfo(){ applyChange = -1; //initial value is invalid isprimary = false; isactive = false; isavailable = false; rotation = 0; //no rotation by default } ~ScreenInfo(){} }; class RRSettings{ public: //Reset current screen config to match previously-saved settings static void ApplyPrevious(); //generally performed on startup of the desktop //Read the current screen config from xrandr static QList CurrentScreens(); //reads xrandr information //Save the screen config for later static bool SaveScreens(QList screens); //Apply screen configuration static void Apply(QList screens); }; #endif