aboutsummaryrefslogtreecommitdiff
path: root/include/mglpp/mglpp.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mglpp/mglpp.hpp')
-rw-r--r--include/mglpp/mglpp.hpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/mglpp/mglpp.hpp b/include/mglpp/mglpp.hpp
index 2e49da5..58f956d 100644
--- a/include/mglpp/mglpp.hpp
+++ b/include/mglpp/mglpp.hpp
@@ -1,9 +1,15 @@
#ifndef MGLPP_MGLPP_HPP
#define MGLPP_MGLPP_HPP
-#include <stdexcept>
+#include <exception>
namespace mgl {
+ enum class WindowSystem {
+ NATIVE, // Use X11 on X11 and Wayland on Wayland
+ X11, // Use X11 on X11 and XWayland on Wayland
+ WAYLAND, // Use Wayland. If user runs on X11 then it fails to connect
+ };
+
class InitException : public std::exception {
public:
const char* what() const noexcept override {
@@ -14,7 +20,7 @@ namespace mgl {
class Init {
public:
// Throws InitException on failure
- Init();
+ Init(WindowSystem window_system = WindowSystem::NATIVE);
~Init();
bool is_connected_to_display_server();