mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:27:45 +00:00
VideoPlayer: Port to GML
This commit is contained in:
parent
f0a33b2a8e
commit
f63ecc2763
7 changed files with 95 additions and 42 deletions
|
@ -20,9 +20,11 @@
|
|||
namespace VideoPlayer {
|
||||
|
||||
class VideoPlayerWidget final : public GUI::Widget {
|
||||
C_OBJECT(VideoPlayerWidget)
|
||||
C_OBJECT_ABSTRACT(VideoPlayerWidget)
|
||||
|
||||
public:
|
||||
static ErrorOr<NonnullRefPtr<VideoPlayerWidget>> try_create();
|
||||
virtual ~VideoPlayerWidget() override = default;
|
||||
void close_file();
|
||||
void open_file(StringView filename);
|
||||
void resume_playback();
|
||||
|
@ -37,8 +39,8 @@ public:
|
|||
ErrorOr<void> initialize_menubar(GUI::Window&);
|
||||
|
||||
private:
|
||||
VideoPlayerWidget(GUI::Window&);
|
||||
|
||||
VideoPlayerWidget() = default;
|
||||
ErrorOr<void> setup_interface();
|
||||
void update_play_pause_icon();
|
||||
void update_seek_slider_max();
|
||||
void set_current_timestamp(Time);
|
||||
|
@ -51,15 +53,11 @@ private:
|
|||
|
||||
void event(Core::Event&) override;
|
||||
|
||||
GUI::Window& m_window;
|
||||
|
||||
DeprecatedString m_path;
|
||||
|
||||
RefPtr<VideoFrameWidget> m_video_display;
|
||||
RefPtr<GUI::HorizontalSlider> m_seek_slider;
|
||||
|
||||
RefPtr<GUI::Toolbar> m_toolbar;
|
||||
|
||||
RefPtr<Gfx::Bitmap> m_play_icon;
|
||||
RefPtr<Gfx::Bitmap> m_pause_icon;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue