Add platform independent monitor control structure
This commit is contained in:
parent
2a1ee46928
commit
d5d6f390fb
@ -6,6 +6,7 @@
|
|||||||
#include "log_to_file.hpp"
|
#include "log_to_file.hpp"
|
||||||
#include "log_tr.hpp"
|
#include "log_tr.hpp"
|
||||||
#include "main_window.hpp"
|
#include "main_window.hpp"
|
||||||
|
#include "monitor_control.hpp"
|
||||||
#include "sensor_driver.hpp"
|
#include "sensor_driver.hpp"
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
@ -36,6 +37,8 @@ int main(int argc, char* argv[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const auto monitors = enumerateMonitors();
|
||||||
|
|
||||||
MainWindow mainWindow;
|
MainWindow mainWindow;
|
||||||
mainWindow.show();
|
mainWindow.show();
|
||||||
return application.exec();
|
return application.exec();
|
||||||
|
8
AdaptiveBrightness/monitor.hpp
Normal file
8
AdaptiveBrightness/monitor.hpp
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
class Monitor {
|
||||||
|
private:
|
||||||
|
Monitor();
|
||||||
|
|
||||||
|
public:
|
||||||
|
};
|
7
AdaptiveBrightness/monitor_control.hpp
Normal file
7
AdaptiveBrightness/monitor_control.hpp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
#include "monitor.hpp"
|
||||||
|
|
||||||
|
std::vector<Monitor> enumerateMonitors();
|
10
AdaptiveBrightness/monitor_control_linux.cpp
Normal file
10
AdaptiveBrightness/monitor_control_linux.cpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#include "monitor_control.hpp"
|
||||||
|
|
||||||
|
#if defined(__clang__) || defined(__GNUC__)
|
||||||
|
|
||||||
|
std::vector<Monitor> enumerateMonitors()
|
||||||
|
{
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
10
AdaptiveBrightness/monitor_control_win.cpp
Normal file
10
AdaptiveBrightness/monitor_control_win.cpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#include "monitor_control.hpp"
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
|
||||||
|
std::vector<Monitor> enumerateMonitors()
|
||||||
|
{
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
7
AdaptiveBrightness/monitor_linux.cpp
Normal file
7
AdaptiveBrightness/monitor_linux.cpp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#include "monitor.hpp"
|
||||||
|
|
||||||
|
#if defined(__clang__) || defined(__GNUC__)
|
||||||
|
|
||||||
|
Monitor::Monitor() {}
|
||||||
|
|
||||||
|
#endif
|
7
AdaptiveBrightness/monitor_win.cpp
Normal file
7
AdaptiveBrightness/monitor_win.cpp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#include "monitor.hpp"
|
||||||
|
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
|
||||||
|
Monitor::Monitor() {}
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user