From 4d7526d21ed78f61eefcb88631762127fb0d4e97 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 31 May 2025 22:54:14 +0200 Subject: Add x11 window capture (video and screenshot) --- include/Overlay.hpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'include/Overlay.hpp') diff --git a/include/Overlay.hpp b/include/Overlay.hpp index 4cfab1d..5f97e5f 100644 --- a/include/Overlay.hpp +++ b/include/Overlay.hpp @@ -9,6 +9,7 @@ #include "GlobalHotkeys/GlobalHotkeysJoystick.hpp" #include "AudioPlayer.hpp" #include "RegionSelector.hpp" +#include "WindowSelector.hpp" #include "CursorTracker/CursorTracker.hpp" #include @@ -116,10 +117,10 @@ namespace gsr { void on_press_save_replay(); void on_press_save_replay_1_min_replay(); void on_press_save_replay_10_min_replay(); - bool on_press_start_replay(bool disable_notification, bool finished_region_selection); - void on_press_start_record(bool finished_region_selection); - void on_press_start_stream(bool finished_region_selection); - void on_press_take_screenshot(bool finished_region_selection, bool force_region_capture); + bool on_press_start_replay(bool disable_notification, bool finished_selection); + void on_press_start_record(bool finished_selection); + void on_press_start_stream(bool finished_selection); + void on_press_take_screenshot(bool finished_selection, bool force_region_capture); bool update_compositor_texture(const Monitor &monitor); std::string get_capture_target(const std::string &capture_target, const SupportedCaptureOptions &capture_options); @@ -213,10 +214,15 @@ namespace gsr { int replay_save_duration_min = 0; AudioPlayer audio_player; + RegionSelector region_selector; bool start_region_capture = false; std::function on_region_selected; + WindowSelector window_selector; + bool start_window_capture = false; + std::function on_window_selected; + std::string recording_capture_target; std::string screenshot_capture_target; -- cgit v1.2.3-70-g09d2