1 /*****************************************************************************
2 * video_widgets.c : OSD widgets manipulation functions
3 *****************************************************************************
4 * Copyright (C) 2004-2005 the VideoLAN team
7 * Author: Yoann Peronneau <yoann@videolan.org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
24 /*****************************************************************************
26 *****************************************************************************/
32 #include <vlc_common.h>
36 #include <vlc_filter.h>
38 /* TODO remove access to private vout data */
39 #include "vout_internal.h"
41 /*****************************************************************************
42 * Displays an OSD slider.
43 * Types are: OSD_HOR_SLIDER and OSD_VERT_SLIDER.
44 *****************************************************************************/
45 void vout_OSDSlider( vout_thread_t *p_vout, int i_channel, int i_position,
48 if( !var_InheritBool( p_vout, "osd" ) || i_position < 0 )
51 osd_Slider( VLC_OBJECT( p_vout ), vout_GetSpu( p_vout ),
52 p_vout->p->fmt_render.i_width,
53 p_vout->p->fmt_render.i_height,
54 p_vout->p->fmt_in.i_x_offset,
55 p_vout->p->fmt_in.i_height - p_vout->p->fmt_in.i_visible_height
56 - p_vout->p->fmt_in.i_y_offset,
57 i_channel, i_position, i_type );
60 /*****************************************************************************
61 * Displays an OSD icon.
62 * Types are: OSD_PLAY_ICON, OSD_PAUSE_ICON, OSD_SPEAKER_ICON, OSD_MUTE_ICON
63 *****************************************************************************/
64 void vout_OSDIcon( vout_thread_t *p_vout, int i_channel, short i_type )
66 if( !var_InheritBool( p_vout, "osd" ) )
68 osd_Icon( VLC_OBJECT( p_vout ),
69 vout_GetSpu( p_vout ),
70 p_vout->p->fmt_render.i_width,
71 p_vout->p->fmt_render.i_height,
72 p_vout->p->fmt_in.i_width - p_vout->p->fmt_in.i_visible_width
73 - p_vout->p->fmt_in.i_x_offset,
74 p_vout->p->fmt_in.i_y_offset,