diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/AsyncImageLoader.hpp | 1 | ||||
-rw-r--r-- | include/Config.hpp | 4 | ||||
-rw-r--r-- | include/Entry.hpp | 1 | ||||
-rw-r--r-- | include/ImageViewer.hpp | 2 | ||||
-rw-r--r-- | include/QuickMedia.hpp | 3 | ||||
-rw-r--r-- | include/Storage.hpp | 7 | ||||
-rw-r--r-- | include/Text.hpp | 1 | ||||
-rw-r--r-- | include/Utils.hpp | 2 | ||||
-rw-r--r-- | include/VideoPlayer.hpp | 1 |
9 files changed, 17 insertions, 5 deletions
diff --git a/include/AsyncImageLoader.hpp b/include/AsyncImageLoader.hpp index 672e0e6..7eed39e 100644 --- a/include/AsyncImageLoader.hpp +++ b/include/AsyncImageLoader.hpp @@ -38,6 +38,7 @@ namespace QuickMedia { mgl::vec2i resize_target_size; }; + bool ffmpeg_convert_image_format(const Path &thumbnail_path, const Path &destination_path); // If |symlink_if_no_resize| is false then a copy is made from |thumbnail_path| to |thumbnail_path_resized| instead of a symlink if |thumbnail_path| is not larger than |resize_target_size|. // One example of why you might not want a symlink is if |thumbnail_path| is a temporary file. bool create_thumbnail(const Path &thumbnail_path, const Path &thumbnail_path_resized, mgl::vec2i resize_target_size, ContentType content_type); diff --git a/include/Config.hpp b/include/Config.hpp index 68e4462..fe210a6 100644 --- a/include/Config.hpp +++ b/include/Config.hpp @@ -48,6 +48,7 @@ namespace QuickMedia { bool sort_by_name = false; // Series bool sort_episodes_by_name = true; bool auto_group_episodes = true; + bool recursive = true; }; struct YoutubeSponsorblock { @@ -131,6 +132,7 @@ namespace QuickMedia { FileManagerConfig file_manager; bool use_system_fonts = false; bool use_system_mpv_config = false; + std::string system_mpv_profile; bool enable_shaders = true; std::string theme = "default"; float scale = 1.0f; @@ -139,5 +141,5 @@ namespace QuickMedia { bool low_latency_mode = false; }; - const Config& get_config(); + Config& get_config(); }
\ No newline at end of file diff --git a/include/Entry.hpp b/include/Entry.hpp index f4cbc5d..54a5713 100644 --- a/include/Entry.hpp +++ b/include/Entry.hpp @@ -32,6 +32,7 @@ namespace QuickMedia { void replace(size_t start_index, size_t length, const std::string &insert_str); int get_caret_index() const; + void set_caret_index(int index); bool is_editable() const; float get_height(); diff --git a/include/ImageViewer.hpp b/include/ImageViewer.hpp index b587b82..b3b18dc 100644 --- a/include/ImageViewer.hpp +++ b/include/ImageViewer.hpp @@ -104,5 +104,7 @@ namespace QuickMedia { mgl::vec2d prev_size_first_page; mgl::vec2d prev_size_last_page; + + bool show_progress_bar = true; }; }
\ No newline at end of file diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp index a6de75c..c316f5e 100644 --- a/include/QuickMedia.hpp +++ b/include/QuickMedia.hpp @@ -119,7 +119,7 @@ namespace QuickMedia { void set_clipboard(const std::string &str); bool youtube_dl_extract_url(const std::string &url, std::string &video_url, std::string &audio_url); private: - void init(mgl::WindowHandle parent_window, std::string &program_path, bool no_dialog); + void init(mgl::WindowHandle parent_window, std::string &program_path, bool no_dialog, const std::string &theme); const char* get_youtube_dl_program_name(); void check_youtube_dl_installed(const std::string &plugin_name); void load_plugin_by_name(std::vector<Tab> &tabs, int &start_tab_index, FileManagerMimeType fm_mime_type, FileSelectionHandler file_selection_handler, std::string instance); @@ -245,5 +245,6 @@ namespace QuickMedia { std::mutex login_inputs_mutex; const char *yt_dl_name = nullptr; bool yt_dl_name_checked = false; + bool show_manga_bottom_bar = true; }; } diff --git a/include/Storage.hpp b/include/Storage.hpp index 19dd345..86c34d2 100644 --- a/include/Storage.hpp +++ b/include/Storage.hpp @@ -20,8 +20,8 @@ namespace QuickMedia { DESC }; - // Return false to stop the iterator - using FileIteratorCallback = std::function<bool(const Path &filepath, FileType file_type)>; + // Return false to stop the iterator. + using FileIteratorCallback = std::function<bool(const Path &filepath, FileType file_type, time_t last_modified_seconds)>; Path get_home_dir(); Path get_storage_dir(); @@ -34,8 +34,11 @@ namespace QuickMedia { bool file_get_last_modified_time_seconds(const char *path, time_t *result); int file_overwrite(const Path &path, const std::string &data); int file_overwrite_atomic(const Path &path, const std::string &data); + bool file_append(const Path &path, const std::string &data); + // The callback is called with 0 as the argument (last_modified_seconds) void for_files_in_dir(const Path &path, FileIteratorCallback callback); void for_files_in_dir_sort_last_modified(const Path &path, FileIteratorCallback callback, FileSortDirection sort_dir = FileSortDirection::ASC); + // The callback is called with 0 as the argument (last_modified_seconds) void for_files_in_dir_sort_name(const Path &path, FileIteratorCallback callback, FileSortDirection sort_dir = FileSortDirection::ASC); bool read_file_as_json(const Path &filepath, Json::Value &result); diff --git a/include/Text.hpp b/include/Text.hpp index 89aba99..21b6dc0 100644 --- a/include/Text.hpp +++ b/include/Text.hpp @@ -117,6 +117,7 @@ namespace QuickMedia void replace(size_t start_index, size_t length, const std::string &insert_str); int getCaretIndex() const; + void setCaretIndex(int index); int getNumLines() const; void set_color(mgl::Color color, bool force_color = false); diff --git a/include/Utils.hpp b/include/Utils.hpp index fe0e583..370311a 100644 --- a/include/Utils.hpp +++ b/include/Utils.hpp @@ -8,7 +8,7 @@ namespace QuickMedia { void show_virtual_keyboard(); void hide_virtual_keyboard(); bool is_touch_enabled(); - bool is_running_wayland(); + bool is_running_wayland(void *dpy); time_t iso_utc_to_unix_time(const char *time_str); std::string unix_time_to_local_time_str(time_t unix_time); int64_t get_boottime_milliseconds(); diff --git a/include/VideoPlayer.hpp b/include/VideoPlayer.hpp index bea03fc..ea5996a 100644 --- a/include/VideoPlayer.hpp +++ b/include/VideoPlayer.hpp @@ -39,6 +39,7 @@ namespace QuickMedia { mgl::WindowHandle parent_window; bool no_video = false; bool use_system_mpv_config = false; + std::string system_mpv_profile; bool use_system_input_config = false; // |use_system_mpv_config| has to be true if this is set to true bool keep_open = false; bool resume = false; |