aboutsummaryrefslogtreecommitdiff
path: root/include/QuickMedia.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/QuickMedia.hpp')
-rw-r--r--include/QuickMedia.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp
index 512a722..4142a27 100644
--- a/include/QuickMedia.hpp
+++ b/include/QuickMedia.hpp
@@ -95,6 +95,8 @@ namespace QuickMedia {
void youtube_get_watch_history(BodyItems &history_items);
private:
void base_event_handler(sf::Event &event, PageType previous_page, Body *body, SearchBar *search_bar, bool handle_key_press = true, bool handle_searchbar = true);
+ void event_idle_handler(const sf::Event &event);
+ void update_idle_state();
void page_loop_render(sf::RenderWindow &window, std::vector<Tab> &tabs, int selected_tab, TabAssociatedData &tab_associated_data, const Json::Value *json_chapters);
using PageLoopSubmitHandler = std::function<void(const std::vector<Tab> &new_tabs)>;
void page_loop(std::vector<Tab> &tabs, int start_tab_index = 0, PageLoopSubmitHandler after_submit_handler = nullptr);
@@ -179,5 +181,8 @@ namespace QuickMedia {
sf::Vector2f body_size;
bool show_room_side_panel = true;
std::thread::id main_thread_id;
+ sf::Clock idle_timer;
+ bool idle = true;
+ bool low_cpu_mode = false;
};
} \ No newline at end of file