2016-05-31 03:58:58 +00:00
|
|
|
#pragma once
|
2016-05-19 14:41:06 +00:00
|
|
|
|
|
|
|
#include <sstream>
|
|
|
|
#include <memory>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace xlib
|
|
|
|
{
|
|
|
|
struct Monitor
|
|
|
|
{
|
|
|
|
std::string name;
|
|
|
|
int index = 0;
|
|
|
|
int width = 0;
|
|
|
|
int height = 0;
|
|
|
|
int x = 0;
|
|
|
|
int y = 0;
|
|
|
|
|
|
|
|
std::string str() {
|
|
|
|
return this->name + ": "+ this->geom();
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string geom() {
|
|
|
|
return std::to_string(width) +"x"+ std::to_string(height) +"+"+
|
|
|
|
std::to_string(x) +"+"+ std::to_string(y);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2016-05-31 03:58:58 +00:00
|
|
|
// std::unique_ptr<Monitor> get_monitor(const std::string& monitor_name);
|
2016-05-19 14:41:06 +00:00
|
|
|
|
|
|
|
std::vector<std::unique_ptr<Monitor>> get_sorted_monitorlist();
|
|
|
|
}
|