[vlc-devel] [PATCH] window: add an API to show or hide the cursor over the window
Steve Lhomme
robux4 at ycbcr.xyz
Fri Apr 5 08:29:41 CEST 2019
On 4/5/2019 8:24 AM, Steve Lhomme wrote:
> This will allow handling the "mouse-hide-timeout" in the core rather than in
> each vout_window_t implementation.
> ---
> include/vlc_vout_window.h | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/include/vlc_vout_window.h b/include/vlc_vout_window.h
> index 11752116bf..ae872c650b 100644
> --- a/include/vlc_vout_window.h
> +++ b/include/vlc_vout_window.h
> @@ -317,6 +317,7 @@ struct vout_window_operations {
> void (*unset_fullscreen)(struct vout_window_t *);
> void (*set_fullscreen)(struct vout_window_t *, const char *id);
> void (*set_title)(struct vout_window_t *, const char *id);
> + void (*show_cursor)(struct vout_window_t *, bool show);
> };
>
> /**
> @@ -501,6 +502,18 @@ static inline void vout_window_SetTitle(vout_window_t *window, const char *title
> window->ops->set_title(window, title);
> }
>
> +/**
> + * Show or hide the cursor when the mouse is over this window.
> + *
> + * \param window window to change the title.
> + * \param show show or hide the cursor.
> + */
> +static inline void vout_window_ShowCursor(vout_window_t *window, bool show)
> +{
> + if (window->ops->show_cursor != NULL)
> + window->ops->show_cursor(window, title);
s/title/show/
I did not compile this patch, this is more a RFC.
A vout_window_t module can still continue to handle it internally and
not implement this callback. It can be added gradually to each of them.
> +}
> +
> /**
> * Enables a window.
> *
> --
> 2.17.1
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list