diff options
author | wm4 <wm4@nowhere> | 2014-11-02 20:26:51 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-11-02 20:53:56 +0100 |
commit | 4e2574f025b9f143140008cbed48f6ee9705f813 (patch) | |
tree | 0d3f18fa705a31cb278819324cb4e54533a704a6 /player/command.h | |
parent | 61b06f3756596d0e858db25f5293920eff29333c (diff) | |
download | mpv-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 'player/command.h')
-rw-r--r-- | player/command.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/player/command.h b/player/command.h index 0307bd06b7..3469e32948 100644 --- a/player/command.h +++ b/player/command.h @@ -39,9 +39,13 @@ void mp_notify_property(struct MPContext *mpctx, const char *property); int mp_get_property_id(const char *name); uint64_t mp_get_property_event_mask(const char *name); -// Must start with the first unused positive value in enum mpv_event_id -#define INTERNAL_EVENT_BASE 24 -#define MP_EVENT_CACHE_UPDATE (INTERNAL_EVENT_BASE + 0) +enum { + // Must start with the first unused positive value in enum mpv_event_id + // MPV_EVENT_* and MP_EVENT_* must not overlap. + INTERNAL_EVENT_BASE = 24, + MP_EVENT_CACHE_UPDATE, + MP_EVENT_WIN_RESIZE, +}; bool mp_hook_test_completion(struct MPContext *mpctx, char *type); void mp_hook_run(struct MPContext *mpctx, char *client, char *type); |