X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_vout_display.h;h=503f92db13b46b212b32b24095ff674fa76200fa;hb=12ade3e3bc975d5426ba4af155b7372c31093b31;hp=af486e95181fef398208b994d25fd42acca26f65;hpb=149587ec70d32767467760b86e12755860edbf3a;p=vlc diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h index af486e9518..503f92db13 100644 --- a/include/vlc_vout_display.h +++ b/include/vlc_vout_display.h @@ -61,6 +61,16 @@ typedef enum VOUT_DISPLAY_ALIGN_BOTTOM, } vout_display_align_t; +/** + * Window management state. + */ +enum { + VOUT_WINDOW_STATE_NORMAL=0, + VOUT_WINDOW_STATE_ABOVE=1, + VOUT_WINDOW_STATE_BELOW=2, + VOUT_WINDOW_STACK_MASK=3, +}; + /** * Initial/Current configuration for a vout_display_t */ @@ -103,7 +113,7 @@ typedef struct { } vout_display_cfg_t; /** - * Informations from a vout_display_t to configure + * Information from a vout_display_t to configure * the core behaviour. * * By default they are all false. @@ -114,6 +124,7 @@ typedef struct { bool has_double_click; /* Is double-click generated */ bool has_hide_mouse; /* Is mouse automatically hidden */ bool has_pictures_invalid;/* Will VOUT_DISPLAY_EVENT_PICTURES_INVALID be used */ + bool has_event_thread; /* Will events (key at least) be emitted using an independent thread */ } vout_display_info_t; /** @@ -133,9 +144,9 @@ enum { * being requested (externally or by VOUT_DISPLAY_EVENT_FULLSCREEN */ VOUT_DISPLAY_CHANGE_FULLSCREEN, /* const vout_display_cfg_t *p_cfg */ - /* Ask the module to acknowledge/refuse the "always on top" state change - * after being requested externally or by VOUT_DISPLAY_EVENT_ON_TOP */ - VOUT_DISPLAY_CHANGE_ON_TOP, /* int b_on_top */ + /* Ask the module to acknowledge/refuse the window management state change + * after being requested externally or by VOUT_DISPLAY_WINDOW_STATE */ + VOUT_DISPLAY_CHANGE_WINDOW_STATE, /* unsigned state */ /* Ask the module to acknowledge/refuse the display size change requested * (externally or by VOUT_DISPLAY_EVENT_DISPLAY_SIZE) */ @@ -177,7 +188,7 @@ enum { VOUT_DISPLAY_EVENT_PICTURES_INVALID, /* The buffer are now invalid and need to be changed */ VOUT_DISPLAY_EVENT_FULLSCREEN, - VOUT_DISPLAY_EVENT_ON_TOP, + VOUT_DISPLAY_EVENT_WINDOW_STATE, VOUT_DISPLAY_EVENT_DISPLAY_SIZE, /* The display size need to change : int i_width, int i_height, bool is_fullscreen */ @@ -214,7 +225,7 @@ struct vout_display_owner_t { * * You can send it at any time i.e. from any vout_display_t functions or * from another thread. - * Becarefull, it does not ensure correct serialization if it is used + * Be careful, it does not ensure correct serialization if it is used * from multiple threads. */ void (*event)(vout_display_t *, int, va_list); @@ -260,7 +271,7 @@ struct vout_display_t { */ video_format_t fmt; - /* Informations + /* Information * * You can only set them in the open function. */ @@ -344,9 +355,9 @@ static inline void vout_display_SendEventFullscreen(vout_display_t *vd, bool is_ { vout_display_SendEvent(vd, VOUT_DISPLAY_EVENT_FULLSCREEN, is_fullscreen); } -static inline void vout_display_SendEventOnTop(vout_display_t *vd, bool is_on_top) +static inline void vout_display_SendWindowState(vout_display_t *vd, unsigned state) { - vout_display_SendEvent(vd, VOUT_DISPLAY_EVENT_ON_TOP, is_on_top); + vout_display_SendEvent(vd, VOUT_DISPLAY_EVENT_WINDOW_STATE, state); } /* The mouse position (State and Moved event) must be expressed against vout_display_t::source unit */ static inline void vout_display_SendEventMouseState(vout_display_t *vd, int x, int y, int button_mask) @@ -379,6 +390,10 @@ static inline vout_window_t *vout_display_NewWindow(vout_display_t *vd, const vo { return vd->owner.window_new(vd, cfg); } +/** + * Deletes a window created by vout_display_NewWindow if window is non NULL + * or any unused windows otherwise. + */ static inline void vout_display_DeleteWindow(vout_display_t *vd, vout_window_t *window) {