summaryrefslogtreecommitdiffstats
path: root/libmpv/wxwidgets/main.h
diff options
context:
space:
mode:
Diffstat (limited to 'libmpv/wxwidgets/main.h')
-rw-r--r--libmpv/wxwidgets/main.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/libmpv/wxwidgets/main.h b/libmpv/wxwidgets/main.h
new file mode 100644
index 0000000..db5fa55
--- /dev/null
+++ b/libmpv/wxwidgets/main.h
@@ -0,0 +1,37 @@
+#pragma once
+
+#include <wx/wxprec.h>
+#ifndef WX_PRECOMP
+ #include <wx/wx.h>
+#endif
+
+#include <mpv/client.h>
+
+class MpvApp : public wxApp
+{
+public:
+ bool OnInit() override;
+};
+
+class MpvFrame : public wxFrame
+{
+public:
+ MpvFrame();
+
+ bool Destroy() override;
+ bool Autofit(int percent, bool larger = true, bool smaller = true);
+
+private:
+ void MpvCreate(int64_t wid);
+ void MpvDestroy();
+
+ void OnKeyDown(wxKeyEvent &event);
+ void OnDropFiles(wxDropFilesEvent &event);
+
+ void OnMpvEvent(mpv_event &event);
+ void OnMpvWakeupEvent(wxThreadEvent &event);
+
+ mpv_handle *mpv = nullptr;
+
+ wxDECLARE_EVENT_TABLE();
+};