From 876ec446f3863ec2a92c516b1f6d35137b66c005 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 12 Sep 2016 19:51:04 +0200 Subject: vo: change defines to an enum (They're flags, so it still doesn't make sense to actually name the enum and use it as a type.) --- video/out/vo.h | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) (limited to 'video') diff --git a/video/out/vo.h b/video/out/vo.h index 407255be12..c40367d406 100644 --- a/video/out/vo.h +++ b/video/out/vo.h @@ -30,21 +30,23 @@ #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_CHANGED 4 -// Some other window state changed (position, window state, fps) -#define VO_EVENT_WIN_STATE 8 -// The ambient light conditions changed and need to be reloaded -#define VO_EVENT_AMBIENT_LIGHTING_CHANGED 16 -// Special mechanism for making resizing with Cocoa react faster -#define VO_EVENT_LIVE_RESIZING 32 - -// Set of events the player core may be interested in. -#define VO_EVENTS_USER (VO_EVENT_RESIZE | VO_EVENT_WIN_STATE) +enum { + // VO needs to redraw + VO_EVENT_EXPOSE = 1 << 0, + // VO needs to update state to a new window size + VO_EVENT_RESIZE = 1 << 1, + // The ICC profile needs to be reloaded + VO_EVENT_ICC_PROFILE_CHANGED = 1 << 2, + // Some other window state changed (position, window state, fps) + VO_EVENT_WIN_STATE = 1 << 3, + // The ambient light conditions changed and need to be reloaded + VO_EVENT_AMBIENT_LIGHTING_CHANGED = 1 << 4, + // Special mechanism for making resizing with Cocoa react faster + VO_EVENT_LIVE_RESIZING = 1 << 5, + + // Set of events the player core may be interested in. + VO_EVENTS_USER = (VO_EVENT_RESIZE | VO_EVENT_WIN_STATE), +}; enum mp_voctrl { /* signal a device reset seek */ -- cgit v1.2.3