X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_vout_display.h;h=6f5b35f2eb94223fd3685df862e1fc49ee4ee088;hb=c75fafe4ec348154a6e07c324dbe62c1c23a7149;hp=f7c436d48dd84a4631c0be62a63a7ceeb429ba94;hpb=ce75037724b80da41af208a55f81b40e778eb06e;p=vlc diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h index f7c436d48d..6f5b35f2eb 100644 --- a/include/vlc_vout_display.h +++ b/include/vlc_vout_display.h @@ -31,6 +31,7 @@ #include #include +#include #include #include #include @@ -60,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 */ @@ -132,9 +143,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) */ @@ -157,6 +168,9 @@ enum { * The cropping requested is stored by video_format_t::i_x/y_offset and * video_format_t::i_visible_width/height */ VOUT_DISPLAY_CHANGE_SOURCE_CROP, /* const video_format_t *p_source */ + + /* Ask an opengl interface if available. */ + VOUT_DISPLAY_GET_OPENGL, /* vout_opengl_t ** */ }; /** @@ -173,7 +187,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 */ @@ -210,7 +224,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); @@ -262,14 +276,16 @@ struct vout_display_t { */ vout_display_info_t info; - /* Return a new picture_t (mandatory). + /* Return a pointer over the current picture_pool_t* (mandatory). * + * For performance reasons, it is best to provide at least count + * pictures but it is not mandatory. * You can return NULL when you cannot/do not want to allocate - * more pictures. - * If you want to create a pool of reusable pictures, you can - * use a picture_pool_t. + * pictures. + * The vout display module keeps the ownership of the pool and can + * destroy it only when closing or on invalid pictures control. */ - picture_t *(*get)(vout_display_t *); + picture_pool_t *(*pool)(vout_display_t *, unsigned count); /* Prepare a picture for display (optional). * @@ -338,9 +354,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)