From e62b707603ec00fc5192bf702b4bca0ed77501e6 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 26 Aug 2021 01:10:40 +0200 Subject: Add ctrl+b to bookmark manga --- include/Body.hpp | 1 + include/QuickMedia.hpp | 1 + include/StringUtils.hpp | 1 + 3 files changed, 3 insertions(+) (limited to 'include') diff --git a/include/Body.hpp b/include/Body.hpp index 23439ec..e1e6fef 100644 --- a/include/Body.hpp +++ b/include/Body.hpp @@ -81,6 +81,7 @@ namespace QuickMedia { int find_item_index(std::function&)> callback); // Return true to remove the current item. // Returns true if the item was found. + // Note: only removes the first item found. bool erase_item(std::function&)> callback); std::shared_ptr get_item_by_index(size_t index); BodyItemList get_items(); diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp index cb3f5ef..55d7870 100644 --- a/include/QuickMedia.hpp +++ b/include/QuickMedia.hpp @@ -110,6 +110,7 @@ namespace QuickMedia { void idle_active_handler(); void update_idle_state(); bool show_info_page(BodyItem *body_item, bool include_reverse_image_search); + bool toggle_bookmark(BodyItem *body_item, const char *bookmark_name); void page_loop_render(sf::RenderWindow &window, std::vector &tabs, int selected_tab, TabAssociatedData &tab_associated_data, const Json::Value *json_chapters, Tabs &ui_tabs); using PageLoopSubmitHandler = std::function &new_tabs)>; // Returns false if the page loop was escaped by user navigation (pressing escape) or if there was an error at startup diff --git a/include/StringUtils.hpp b/include/StringUtils.hpp index acc7305..6554ea7 100644 --- a/include/StringUtils.hpp +++ b/include/StringUtils.hpp @@ -23,4 +23,5 @@ namespace QuickMedia { bool strncase_equals(const char *str1, const char *str2, size_t length); bool strcase_equals(const char *str1, const char *str2); bool to_num(const char *str, size_t size, int &num); + std::string seconds_to_relative_time_str(time_t seconds); } \ No newline at end of file -- cgit v1.2.3