diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-10-19 23:49:22 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-10-19 23:49:22 +0200 |
commit | 939bf23921cce4b934ecc2a98fa871c7538d0276 (patch) | |
tree | 1f0efa707f752ec2e0e31e582df3114c7ecfd701 /include | |
parent | 668a83d3b96e027c525ac3cf8bb87991c66168fd (diff) |
Add screenshots
Diffstat (limited to 'include')
-rw-r--r-- | include/Overlay.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/Overlay.hpp b/include/Overlay.hpp index bf3600f..fcc3781 100644 --- a/include/Overlay.hpp +++ b/include/Overlay.hpp @@ -11,6 +11,7 @@ #include <mglpp/graphics/Sprite.hpp> #include <mglpp/graphics/Rectangle.hpp> #include <mglpp/graphics/Text.hpp> +#include <mglpp/window/Event.hpp> namespace gsr { class DropdownButton; @@ -37,6 +38,8 @@ namespace gsr { void toggle_show(); bool is_open() const; private: + void process_key_bindings(mgl::Event &event); + void update_gsr_process_status(); void load_program_status(); @@ -53,6 +56,12 @@ namespace gsr { void on_press_start_stream(const std::string &id); bool update_compositor_texture(const mgl_monitor *monitor); private: + using KeyBindingCallback = std::function<void()>; + struct KeyBinding { + mgl::Event::KeyEvent key_event; + KeyBindingCallback callback; + }; + mgl::Window &window; std::string resources_path; GsrInfo gsr_info; @@ -80,5 +89,7 @@ namespace gsr { DropdownButton *stream_dropdown_button_ptr = nullptr; RecordingStatus recording_status = RecordingStatus::NONE; + + std::array<KeyBinding, 1> key_bindings; }; }
\ No newline at end of file |