aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/libLumina/LuminaRandR.h
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-06-22 06:46:54 -0400
committerKen Moore <ken@ixsystems.com>2017-06-22 06:46:54 -0400
commitee833dfa9e17521e59ad84634cf3ef4115bda606 (patch)
treec9101032fe84ba42823e0616de2216a6eaaf67a7 /src-qt5/core/libLumina/LuminaRandR.h
parentMerge branch 'master' of github.com:trueos/lumina (diff)
downloadlumina-ee833dfa9e17521e59ad84634cf3ef4115bda606.tar.gz
lumina-ee833dfa9e17521e59ad84634cf3ef4115bda606.tar.bz2
lumina-ee833dfa9e17521e59ad84634cf3ef4115bda606.zip
Get the LuminaRandR class all finished up for *information purposes only*.
1. All the information retrieval systems are now in place and functional (much easier to use than parsing xrandr output manually). 2. Also get the "setPrimaryMonitor" functionality all setup and working. This *does* change the running X session in an atomic fashion.
Diffstat (limited to 'src-qt5/core/libLumina/LuminaRandR.h')
-rw-r--r--src-qt5/core/libLumina/LuminaRandR.h23
1 files changed, 10 insertions, 13 deletions
diff --git a/src-qt5/core/libLumina/LuminaRandR.h b/src-qt5/core/libLumina/LuminaRandR.h
index 6d205680..6175a9d0 100644
--- a/src-qt5/core/libLumina/LuminaRandR.h
+++ b/src-qt5/core/libLumina/LuminaRandR.h
@@ -25,23 +25,18 @@
#include "xcb/xcb_atom.h"
struct p_objects{
-//public:
- xcb_atom_t monitor_atom; //This is the index used to identify particular monitors (unique ID)
+ xcb_randr_output_t output; //This is the index used to identify particular monitors (unique ID)
//Cached Information
- bool primary, automatic;
+ bool primary;
QRect geometry;
- QList<QSize> resolutions;
- QSize physicalSizeMM;
+
+ QSize physicalSizeMM; //physical size of the display in MM
QString name;
- xcb_randr_output_t output;
- QList<xcb_randr_mode_t> modes;
- /*p_objects(){
- // Set the defaults for non-default-constructed variables
- primary = automatic = false;
- monitor_atom = 0;
- }*/
+ xcb_randr_mode_t current_mode;
+ QList<xcb_randr_mode_t> modes; //each mode is a combination of resolution + refresh rate
+ QList<QSize> resolutions; //smaller subset of modes - just unique resolutions
};
@@ -68,12 +63,12 @@ public:
bool isEnabled();
bool isPrimary();
- bool isAutomatic();
bool isConnected();
QList<QSize> availableResolutions();
QSize currentResolution(); //could be different from geometry.size() if things like panning/rotation are enabled
QRect currentGeometry();
QSize physicalSizeMM();
+ QSize physicalDPI();
//Modification
bool setAsPrimary(bool);
@@ -107,6 +102,8 @@ public:
//Simplification functions for dealing with multiple monitors
void setPrimaryMonitor(QString id);
+ QString primaryMonitor();
+
void disableMonitor(QString id);
//void enableMonitor(QString id, QRect geom);
bgstack15