]> git.sesse.net Git - vlc/blob - src/video_output/video_widgets.c
Removed unused "intf-change" vout variable.
[vlc] / src / video_output / video_widgets.c
1 /*****************************************************************************
2  * video_widgets.c : OSD widgets manipulation functions
3  *****************************************************************************
4  * Copyright (C) 2004-2005 the VideoLAN team
5  * $Id$
6  *
7  * Author: Yoann Peronneau <yoann@videolan.org>
8  *
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.
13  *
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.
18  *
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  *****************************************************************************/
23
24 /*****************************************************************************
25  * Preamble
26  *****************************************************************************/
27 #ifdef HAVE_CONFIG_H
28 # include "config.h"
29 #endif
30
31 #include <vlc_common.h>
32 #include <vlc_vout.h>
33 #include <vlc_osd.h>
34
35 #include <vlc_filter.h>
36
37 /*****************************************************************************
38  * Displays an OSD slider.
39  * Types are: OSD_HOR_SLIDER and OSD_VERT_SLIDER.
40  *****************************************************************************/
41 void vout_OSDSlider( vlc_object_t *p_caller, int i_channel, int i_position,
42                      short i_type )
43 {
44     vout_thread_t *p_vout = vlc_object_find( p_caller, VLC_OBJECT_VOUT,
45                                              FIND_ANYWHERE );
46
47     if( p_vout && ( var_InheritBool( p_caller, "osd" ) && ( i_position >= 0 ) ) )
48     {
49         osd_Slider( p_caller, vout_GetSpu( p_vout ),
50                     p_vout->fmt_render.i_width,
51                     p_vout->fmt_render.i_height,
52                     p_vout->fmt_in.i_x_offset,
53                     p_vout->fmt_in.i_height - p_vout->fmt_in.i_visible_height
54                                             - p_vout->fmt_in.i_y_offset,
55                     i_channel, i_position, i_type );
56     }
57     vlc_object_release( p_vout );
58 }
59
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( vlc_object_t *p_caller, int i_channel, short i_type )
65 {
66     vout_thread_t *p_vout = vlc_object_find( p_caller, VLC_OBJECT_VOUT,
67                                              FIND_ANYWHERE );
68
69     if( !p_vout ) return;
70
71     if( var_InheritBool( p_caller, "osd" ) )
72     {
73         osd_Icon( p_caller,
74                   vout_GetSpu( p_vout ),
75                   p_vout->fmt_render.i_width,
76                   p_vout->fmt_render.i_height,
77                   p_vout->fmt_in.i_width - p_vout->fmt_in.i_visible_width
78                                          - p_vout->fmt_in.i_x_offset,
79                   p_vout->fmt_in.i_y_offset,
80                   i_channel, i_type );
81     }
82     vlc_object_release( p_vout );
83 }
84