diff options
Diffstat (limited to 'include/QuickMedia.hpp')
-rw-r--r-- | include/QuickMedia.hpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp index b2c499c..d3bff47 100644 --- a/include/QuickMedia.hpp +++ b/include/QuickMedia.hpp @@ -11,7 +11,11 @@ #include <json/value.h> #include <unordered_set> #include <future> +#include <thread> +#include <mutex> +#include <condition_variable> #include <stack> +#include <deque> #include <X11/Xlib.h> #include <X11/Xatom.h> @@ -23,6 +27,11 @@ namespace QuickMedia { SINGLE, SCROLL }; + + struct CopyOp { + Path source; + Path destination; + }; class Program { public: @@ -94,12 +103,18 @@ namespace QuickMedia { std::future<BodyItems> search_suggestion_future; std::future<std::string> autocomplete_future; std::future<void> image_download_future; + std::thread image_upscale_thead; + std::mutex image_upscale_mutex; + std::deque<CopyOp> images_to_upscale; + std::condition_variable image_upscale_cv; std::string downloading_chapter_url; bool image_download_cancel = false; int exit_code = 0; std::string resources_root; bool use_tor = false; bool use_system_mpv_config = false; + bool upscale_images = false; + bool running = false; // TODO: Save this to config file when switching modes ImageViewMode image_view_mode = ImageViewMode::SINGLE; Body *related_media_body; |