Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

video_widgets.c

00001 /*****************************************************************************
00002  * video_widgets.c : OSD widgets manipulation functions
00003  *****************************************************************************
00004  * Copyright (C) 2004-2005 the VideoLAN team
00005  * $Id: video_widgets.c 12487 2005-09-08 13:55:25Z hartman $
00006  *
00007  * Author: Yoann Peronneau <[email protected]>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
00022  *****************************************************************************/
00023 
00024 /*****************************************************************************
00025  * Preamble
00026  *****************************************************************************/
00027 #include <stdlib.h>                                                /* free() */
00028 #include <vlc/vout.h>
00029 #include <vlc_osd.h>
00030 
00031 #include "vlc_video.h"
00032 #include "vlc_filter.h"
00033 
00034 /*****************************************************************************
00035  * Displays an OSD slider.
00036  * Types are: OSD_HOR_SLIDER and OSD_VERT_SLIDER.
00037  *****************************************************************************/
00038 void vout_OSDSlider( vlc_object_t *p_caller, int i_channel, int i_position,
00039                      short i_type )
00040 {
00041     vout_thread_t *p_vout = vlc_object_find( p_caller, VLC_OBJECT_VOUT,
00042                                              FIND_ANYWHERE );
00043 
00044     if( p_vout && ( config_GetInt( p_caller, "osd" ) || ( i_position >= 0 ) ) )
00045     {
00046         osd_Slider( p_caller, p_vout->p_spu, p_vout->render.i_width,
00047             p_vout->render.i_height, i_channel, i_position, i_type );
00048     }
00049     vlc_object_release( p_vout );
00050 }
00051 
00052 /*****************************************************************************
00053  * Displays an OSD icon.
00054  * Types are: OSD_PLAY_ICON, OSD_PAUSE_ICON, OSD_SPEAKER_ICON, OSD_MUTE_ICON
00055  *****************************************************************************/
00056 void vout_OSDIcon( vlc_object_t *p_caller, int i_channel, short i_type )
00057 {
00058     vout_thread_t *p_vout = vlc_object_find( p_caller, VLC_OBJECT_VOUT,
00059                                              FIND_ANYWHERE );
00060 
00061     if( !p_vout ) return;
00062 
00063     if( config_GetInt( p_caller, "osd" ) )
00064     {
00065         osd_Icon( p_caller, p_vout->p_spu, p_vout->render.i_width,
00066             p_vout->render.i_height, i_channel, i_type );
00067     }
00068     vlc_object_release( p_vout );
00069 }
00070 

Generated on Tue Dec 20 10:15:02 2005 for vlc-0.8.4a by  doxygen 1.4.2