From da827778f8c5d2f0cfc56b297099ba58454c38ed Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 26 Mar 2021 16:45:41 +0100 Subject: Add soundcloud --- include/Body.hpp | 7 +++++++ include/QuickMedia.hpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/Body.hpp b/include/Body.hpp index 5e68b5b..cc11664 100644 --- a/include/Body.hpp +++ b/include/Body.hpp @@ -33,6 +33,12 @@ namespace QuickMedia { CIRCLE }; + // TODO: Remove and create an Userdata class instead to replace the void* userdata in BodyItem + class BodyItemExtra { + public: + virtual ~BodyItemExtra() = default; + }; + struct Reaction { std::unique_ptr text; void *userdata = nullptr; @@ -146,6 +152,7 @@ namespace QuickMedia { ThumbnailMaskType thumbnail_mask_type = ThumbnailMaskType::NONE; sf::Vector2i thumbnail_size; std::vector reactions; // TODO: Move to a different body item type + std::shared_ptr extra; // TODO: Remove private: // TODO: Clean up these strings when set in text, and get_title for example should return |title_text.getString()| // TODO: Use sf::String instead, removes the need to convert to utf32 every time the text is dirty (for example when resizing window) diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp index 21b451d..51a97b4 100644 --- a/include/QuickMedia.hpp +++ b/include/QuickMedia.hpp @@ -101,7 +101,7 @@ namespace QuickMedia { void page_loop_render(sf::RenderWindow &window, std::vector &tabs, int selected_tab, TabAssociatedData &tab_associated_data, const Json::Value *json_chapters); using PageLoopSubmitHandler = std::function &new_tabs)>; void page_loop(std::vector &tabs, int start_tab_index = 0, PageLoopSubmitHandler after_submit_handler = nullptr); - void video_content_page(VideoPage *video_page, std::string video_url, std::string video_title, bool download_if_streaming_fails); + void video_content_page(VideoPage *video_page, std::string video_title, bool download_if_streaming_fails); // Returns -1 to go to previous chapter, 0 to stay on same chapter and 1 to go to next chapter int image_page(MangaImagesPage *images_page, Body *chapters_body); void image_continuous_page(MangaImagesPage *images_page); -- cgit v1.2.3