blob: bf2ba51ae19a3c57311f289a8baa12b324fd7576 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
//===========================================
// Lumina-DE source code
// Copyright (c) 2017, Ken Moore
// Available under the 3-clause BSD license
// See the LICENSE file for full details
//===========================================
// This class governs all the xcb/randr interactions
// and provides simpler Qt-based functions for use elsewhere
//===========================================
#ifndef _LUMINA_LIBRARY_RANDR_MONITORS_H
#define _LUMINA_LIBRARY_RANDR_MONITORS_H
//Qt includes
#include <QSize>
#include <QString>
#include <QPoint>
#include <QRect>
#include <QList>
class OutputDevice{
public:
QString id; //output ID
bool enabled;
bool isPrimary;
//Monitor Geometry
QPoint geom; //geometry of monitor within session
//Monitor Resolution
QSize cRes; //current resolution of the monitor (could be different from geom.size() if panning is enabled)
QList<QSize> availRes; //available resolutions supported by the monitor
//Refresh Rate
//int cHz; //current refresh rate
//QList<int> availHz; //available refresh rates
//Expand this later to include:
// panning (current/possible)
// rotation (current/possible)
//Global Listing of Devices
static QList<OutputDevice> availableMonitors();
//FUNCTIONS (do not use directly - use the static list function instead)
OutputDevice();
~OutputDevice();
//Modification
void setAsPrimary();
void setEnabled(bool, QRect geom = QRect());
void setResolution(QSize);
//Now define a simple public_objects class so that each implementation
// has a storage container for placing private objects as needed
class p_objects;
p_objects* p_obj;
};
#endif
|