From 416c86f3cb3535a5b252b8c08a7f4cb253fa495a Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 2 Nov 2014 20:48:45 +0100 Subject: command: add window-minimized property (X11 only) More or less requested by #1237. Should be simple to extend this to other backends. --- video/out/vo.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'video/out/vo.h') diff --git a/video/out/vo.h b/video/out/vo.h index 035b4dc1d6..6906cab222 100644 --- a/video/out/vo.h +++ b/video/out/vo.h @@ -36,9 +36,11 @@ #define VO_EVENT_RESIZE 2 // The ICC profile needs to be reloaded #define VO_EVENT_ICC_PROFILE_PATH_CHANGED 4 +// Some other window state changed +#define VO_EVENT_WIN_STATE 8 // Set of events the player core may be interested in. -#define VO_EVENTS_USER (VO_EVENT_RESIZE) +#define VO_EVENTS_USER (VO_EVENT_RESIZE | VO_EVENT_WIN_STATE) enum mp_voctrl { /* signal a device reset seek */ @@ -83,6 +85,8 @@ enum mp_voctrl { VOCTRL_GET_UNFS_WINDOW_SIZE, // int[2] (w/h) VOCTRL_SET_UNFS_WINDOW_SIZE, // int[2] (w/h) + VOCTRL_GET_WIN_STATE, // int* (VO_WIN_STATE_* flags) + // The VO is supposed to set "known" fields, and leave the others // untouched or set to 0. // imgfmt/w/h/d_w/d_h can be omitted for convenience. @@ -130,6 +134,9 @@ struct voctrl_screenshot_args { bool has_osd; }; +// VOCTRL_GET_WIN_STATE +#define VO_WIN_STATE_MINIMIZED 1 + #define VO_TRUE true #define VO_FALSE false #define VO_ERROR -1 -- cgit v1.2.3