audiotrack: avoid cast, use proper type
[vlc.git] / include / vlc_vout_osd.h
blobbc7871d1761f08057147e54e12d271f9a7eeb3ab
1 /*****************************************************************************
2 * vlc_vout_osd.h: vout OSD
3 *****************************************************************************
4 * Copyright (C) 1999-2010 VLC authors and VideoLAN
5 * Copyright (C) 2004-2005 M2X
7 * Authors: Jean-Paul Saman <jpsaman #_at_# m2x dot nl>
8 * Gildas Bazin <gbazin@videolan.org>
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU Lesser General Public License as published by
12 * the Free Software Foundation; either version 2.1 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this program; if not, write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
25 #ifndef VLC_VOUT_OSD_H
26 #define VLC_VOUT_OSD_H 1
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
32 /**
33 * \defgroup osd On-screen display
34 * \ingroup spu
35 * @{
36 * \file
37 * Overlay text and widgets
40 /**
41 * OSD menu position and picture type defines
43 enum
45 /* Icons */
46 OSD_PLAY_ICON = 1,
47 OSD_PAUSE_ICON,
48 OSD_SPEAKER_ICON,
49 OSD_MUTE_ICON,
50 /* Sliders */
51 OSD_HOR_SLIDER,
52 OSD_VERT_SLIDER,
55 VLC_API int vout_OSDEpg( vout_thread_t *, input_item_t * );
57 /**
58 * \brief Write an informative message if the OSD option is enabled.
59 * \param vout The vout on which the message will be displayed
60 * \param channel Subpicture channel
61 * \param position Position of the text
62 * \param duration Duration of the text being displayed
63 * \param text Text to be displayed
65 VLC_API void vout_OSDText( vout_thread_t *vout, int channel, int position, vlc_tick_t duration, const char *text );
67 /**
68 * \brief Write an informative message at the default location,
69 * for the default duration and only if the OSD option is enabled.
70 * \param vout The vout on which the message will be displayed
71 * \param channel Subpicture channel
72 * \param format printf style formatting
73 * \param args format argument list
75 * Provided for convenience.
77 VLC_API void vout_OSDMessageVa(vout_thread_t *, int, const char *, va_list);
79 static inline void
80 vout_OSDMessage(vout_thread_t *vout, int channel, const char *format, ...)
82 va_list args;
83 va_start(args, format);
84 vout_OSDMessageVa(vout, channel, format, args);
85 va_end(args);
88 /**
89 * Display a slider on the video output.
90 * \param p_this The object that called the function.
91 * \param i_channel Subpicture channel
92 * \param i_postion Current position in the slider
93 * \param i_type Types are: OSD_HOR_SLIDER and OSD_VERT_SLIDER.
95 VLC_API void vout_OSDSlider( vout_thread_t *, int, int , short );
97 /**
98 * Display an Icon on the video output.
99 * \param p_this The object that called the function.
100 * \param i_channel Subpicture channel
101 * \param i_type Types are: OSD_PLAY_ICON, OSD_PAUSE_ICON, OSD_SPEAKER_ICON, OSD_MUTE_ICON
103 VLC_API void vout_OSDIcon( vout_thread_t *, int, short );
105 /** @} */
106 #ifdef __cplusplus
108 #endif
110 #endif /* VLC_VOUT_OSD_H */