aboutsummaryrefslogtreecommitdiff
path: root/include/Overlay.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/Overlay.hpp')
-rw-r--r--include/Overlay.hpp24
1 files changed, 20 insertions, 4 deletions
diff --git a/include/Overlay.hpp b/include/Overlay.hpp
index e802cd0..a4e75dc 100644
--- a/include/Overlay.hpp
+++ b/include/Overlay.hpp
@@ -5,6 +5,9 @@
#include "GsrInfo.hpp"
#include "Config.hpp"
#include "window_texture.h"
+#include "WindowUtils.hpp"
+#include "GlobalHotkeysLinux.hpp"
+#include "GlobalHotkeysJoystick.hpp"
#include <mglpp/window/Window.hpp>
#include <mglpp/window/Event.hpp>
@@ -41,8 +44,7 @@ namespace gsr {
Overlay& operator=(const Overlay&) = delete;
~Overlay();
- void handle_events(gsr::GlobalHotkeys *global_hotkeys);
- void on_event(mgl::Event &event);
+ void handle_events();
// Returns false if not visible
bool draw();
@@ -60,13 +62,19 @@ namespace gsr {
void exit();
const Config& get_config() const;
+
+ void unbind_all_keyboard_hotkeys();
+ void rebind_all_keyboard_hotkeys();
private:
+ void handle_keyboard_mapping_event();
+ void on_event(mgl::Event &event);
+
void xi_setup();
void handle_xi_events();
void process_key_bindings(mgl::Event &event);
void grab_mouse_and_keyboard();
void xi_setup_fake_cursor();
- void xi_grab_all_devices();
+ void xi_grab_all_mouse_devices();
void close_gpu_screen_recorder_output();
@@ -97,7 +105,7 @@ namespace gsr {
void on_press_start_replay(bool disable_notification);
void on_press_start_record();
void on_press_start_stream();
- bool update_compositor_texture(const mgl_monitor *monitor);
+ bool update_compositor_texture(const Monitor &monitor);
void force_window_on_top();
private:
@@ -169,5 +177,13 @@ namespace gsr {
mgl::vec2i window_size = { 1280, 720 };
mgl::vec2i window_pos = { 0, 0 };
+
+ mgl::Clock show_overlay_clock;
+ double show_overlay_timeout_seconds = 0.0;
+
+ std::unique_ptr<GlobalHotkeys> global_hotkeys = nullptr;
+ std::unique_ptr<GlobalHotkeysJoystick> global_hotkeys_js = nullptr;
+ Display *x11_mapping_display = nullptr;
+ XEvent x11_mapping_xev;
};
} \ No newline at end of file