diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/ImageBoard.hpp | 2 | ||||
-rw-r--r-- | plugins/Info.hpp | 2 | ||||
-rw-r--r-- | plugins/Matrix.hpp | 9 | ||||
-rw-r--r-- | plugins/MediaGeneric.hpp | 4 | ||||
-rw-r--r-- | plugins/Page.hpp | 4 | ||||
-rw-r--r-- | plugins/Youtube.hpp | 1 |
6 files changed, 13 insertions, 9 deletions
diff --git a/plugins/ImageBoard.hpp b/plugins/ImageBoard.hpp index e7c4c5d..b6d84a1 100644 --- a/plugins/ImageBoard.hpp +++ b/plugins/ImageBoard.hpp @@ -29,7 +29,7 @@ namespace QuickMedia { const char* get_title() const override { return ""; } PageTypez get_type() const override { return PageTypez::IMAGE_BOARD_THREAD; } - void copy_to_clipboard(const BodyItem *body_item) const override; + void copy_to_clipboard(const BodyItem *body_item) override; bool autoplay_next_item() override { return true; } virtual PluginResult login(const std::string &token, const std::string &pin, std::string &response_msg); diff --git a/plugins/Info.hpp b/plugins/Info.hpp index fbf7a41..cdaefd3 100644 --- a/plugins/Info.hpp +++ b/plugins/Info.hpp @@ -10,7 +10,7 @@ namespace QuickMedia { PluginResult submit(const std::string &title, const std::string &url, std::vector<Tab> &result_tabs) override; bool submit_is_async() const override { return false; } - void copy_to_clipboard(const BodyItem *body_item) const override; + void copy_to_clipboard(const BodyItem *body_item) override; static std::shared_ptr<BodyItem> add_url(const std::string &url); static std::shared_ptr<BodyItem> add_reverse_image_search(const std::string &image_url); diff --git a/plugins/Matrix.hpp b/plugins/Matrix.hpp index 680b8b6..0c96114 100644 --- a/plugins/Matrix.hpp +++ b/plugins/Matrix.hpp @@ -4,9 +4,10 @@ #include "../include/MessageQueue.hpp" #include "Plugin.hpp" #include "Page.hpp" -#include <SFML/Graphics/Color.hpp> +#include <mglpp/graphics/Color.hpp> #include <unordered_map> #include <unordered_set> +#include <map> #include <set> #include <mutex> #include <atomic> @@ -22,7 +23,7 @@ namespace QuickMedia { std::string remove_reply_formatting(const std::string &str); std::string message_get_body_remove_formatting(Message *message); std::string extract_first_line_remove_newline_elipses(const std::string &str, size_t max_length); - sf::Color user_id_to_color(const std::string &user_id); + mgl::Color user_id_to_color(const std::string &user_id); struct UserInfo { friend struct RoomData; @@ -30,7 +31,7 @@ namespace QuickMedia { UserInfo(RoomData *room, std::string user_id, std::string display_name, std::string avatar_url); RoomData *room; - const sf::Color display_name_color; + const mgl::Color display_name_color; const std::string user_id; private: std::string display_name; @@ -82,7 +83,7 @@ namespace QuickMedia { std::string url; std::string thumbnail_url; std::string related_event_id; - sf::Vector2i thumbnail_size; // Set to {0, 0} if not specified + mgl::vec2i thumbnail_size; // Set to {0, 0} if not specified RelatedEventType related_event_type = RelatedEventType::NONE; bool notification_mentions_me = false; bool cache = false; diff --git a/plugins/MediaGeneric.hpp b/plugins/MediaGeneric.hpp index 61f1ad9..f0d5462 100644 --- a/plugins/MediaGeneric.hpp +++ b/plugins/MediaGeneric.hpp @@ -34,7 +34,7 @@ namespace QuickMedia { class MediaGenericSearchPage : public Page { public: - MediaGenericSearchPage(Program *program, const char *website_url, sf::Vector2i thumbnail_max_size, bool cloudflare_bypass, std::vector<CommandArg> extra_commands = {}); + MediaGenericSearchPage(Program *program, const char *website_url, mgl::vec2i thumbnail_max_size, bool cloudflare_bypass, std::vector<CommandArg> extra_commands = {}); const char* get_title() const override { return "Search"; } bool search_is_filter() override { return false; } SearchResult search(const std::string &str, BodyItems &result_items) override; @@ -60,7 +60,7 @@ namespace QuickMedia { MediaGenericSearchPage& related_media_custom_handler(MediaRelatedCustomHandler handler); private: std::string website_url; - sf::Vector2i thumbnail_max_size; + mgl::vec2i thumbnail_max_size; MediaSearchQuery search_query; std::vector<MediaTextQuery> text_queries; std::vector<MediaThumbnailQuery> thumbnail_queries; diff --git a/plugins/Page.hpp b/plugins/Page.hpp index c07679d..b9f220d 100644 --- a/plugins/Page.hpp +++ b/plugins/Page.hpp @@ -74,12 +74,14 @@ namespace QuickMedia { virtual void on_navigate_to_page(Body *body) { (void)body; } virtual void cancel_operation() {} - virtual void copy_to_clipboard(const BodyItem *body_item) const; + virtual void copy_to_clipboard(const BodyItem *body_item); std::unique_ptr<Body> create_body(bool plain_text_list = false, bool prefer_card_view = false); std::unique_ptr<SearchBar> create_search_bar(const std::string &placeholder_text, int search_delay); bool load_manga_content_storage(const char *service_name, const std::string &manga_title, const std::string &manga_url, const std::string &manga_id); + + void set_clipboard(const std::string &str); Program *program; std::shared_ptr<BodyItem> submit_body_item; // TODO: Remove this diff --git a/plugins/Youtube.hpp b/plugins/Youtube.hpp index d3a57a6..2cfe36e 100644 --- a/plugins/Youtube.hpp +++ b/plugins/Youtube.hpp @@ -3,6 +3,7 @@ #include "Page.hpp" #include "../include/AsyncTask.hpp" #include <unordered_set> +#include <map> namespace QuickMedia { struct YoutubeFormat { |