#ifndef OUTPUT_H #define OUTPUT_H #include #include #include #include typedef struct _Resolution{ unsigned int width; unsigned int height; }Resolution; inline bool operator==(const Resolution& lhs, const Resolution& rhs) { return lhs.width == rhs.width && lhs.height == rhs.height; } inline uint qHash(const Resolution &key) { return qHash(key.width ^ key.height); } class Output { public: Output(Display *dpy, XRRScreenResources *resources, RROutput output); bool hasEDID() const; bool isProjector() const; Resolution getCurrentMode() const; Resolution getPreferredMode() const; QSet getSupportedModes() const; Resolution addMode(Resolution) const; private: Display *dpy; XRRScreenResources *resources; RROutput ID; Resolution getResolution(RRMode) const; }; #endif // OUTPUT_H