aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/VideoPlayer.hpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/VideoPlayer.hpp b/include/VideoPlayer.hpp
index 0ae05b0..4f60883 100644
--- a/include/VideoPlayer.hpp
+++ b/include/VideoPlayer.hpp
@@ -26,10 +26,10 @@ namespace QuickMedia {
class VideoPlayer {
public:
// Throws VideoInitializationException on error
- VideoPlayer(sf::RenderWindow &window, unsigned int width, unsigned int height, const char *file, bool loop = false);
+ VideoPlayer(sf::RenderWindow *window, unsigned int width, unsigned int height, const char *file, bool loop = false);
~VideoPlayer();
- void handleEvent(sf::Event &event);
+ void handle_event(sf::Event &event);
void setPosition(float x, float y);
void resize(const sf::Vector2f &size);
void draw(sf::RenderWindow &window);
@@ -42,6 +42,7 @@ namespace QuickMedia {
std::atomic_bool event_update;
PlaybackEndedCallback onPlaybackEndedCallback;
private:
+ void on_doubleclick();
void handle_mpv_events();
private:
mpv_handle *mpv;
@@ -55,5 +56,9 @@ namespace QuickMedia {
sf::RectangleShape seekbar;
sf::RectangleShape seekbar_background;
sf::Clock cursor_last_active_timer;
+ sf::Clock time_since_last_left_click;
+ int left_click_counter;
+ sf::RenderWindow *window;
+ bool video_is_fullscreen;
};
}