summaryrefslogtreecommitdiffstats
path: root/video/out/vo.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-11-02 20:26:51 +0100
committerwm4 <wm4@nowhere>2014-11-02 20:53:56 +0100
commit4e2574f025b9f143140008cbed48f6ee9705f813 (patch)
tree0d3f18fa705a31cb278819324cb4e54533a704a6 /video/out/vo.h
parent61b06f3756596d0e858db25f5293920eff29333c (diff)
downloadmpv-4e2574f025b9f143140008cbed48f6ee9705f813.tar.bz2
mpv-4e2574f025b9f143140008cbed48f6ee9705f813.tar.xz
command: make window-scale property observable
Add a generic mechanism to the VO to relay "extra" events from VO to player. Use it to notify the core of window resizes, which in turn will be used to mark all affected properties ("window-scale" in this case) as changed. (I refrained from hacking this as internal command into input_ctx, or to poll the state change, etc. - but in the end, maybe it would be best to actually pass the client API context directly to the places where events can happen.)
Diffstat (limited to 'video/out/vo.h')
-rw-r--r--video/out/vo.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/video/out/vo.h b/video/out/vo.h
index feb2907c67..035b4dc1d6 100644
--- a/video/out/vo.h
+++ b/video/out/vo.h
@@ -30,10 +30,16 @@
#include "common/common.h"
#include "options/options.h"
+// VO needs to redraw
#define VO_EVENT_EXPOSE 1
+// VO needs to update state to a new window size
#define VO_EVENT_RESIZE 2
+// The ICC profile needs to be reloaded
#define VO_EVENT_ICC_PROFILE_PATH_CHANGED 4
+// Set of events the player core may be interested in.
+#define VO_EVENTS_USER (VO_EVENT_RESIZE)
+
enum mp_voctrl {
/* signal a device reset seek */
VOCTRL_RESET = 1,
@@ -298,6 +304,8 @@ void vo_destroy(struct vo *vo);
void vo_set_paused(struct vo *vo, bool paused);
int64_t vo_get_drop_count(struct vo *vo);
int vo_query_format(struct vo *vo, int format);
+void vo_event(struct vo *vo, int event);
+int vo_query_events(struct vo *vo, int events, bool clear);
void vo_set_flip_queue_offset(struct vo *vo, int64_t us);
int64_t vo_get_vsync_interval(struct vo *vo);