]> git.sesse.net Git - vlc/blob - include/vlc/deprecated.h
Improve libvlc drawable documentation
[vlc] / include / vlc / deprecated.h
1 /*****************************************************************************
2  * deprecated.h:  libvlc deprecated API
3  *****************************************************************************
4  * Copyright (C) 1998-2008 the VideoLAN team
5  * $Id$
6  *
7  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
8  *          Jean-Paul Saman <jpsaman@videolan.org>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
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 General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23  *****************************************************************************/
24
25 #ifndef LIBVLC_DEPRECATED_H
26 #define LIBVLC_DEPRECATED_H 1
27
28 /**
29  * \file
30  * This file defines libvlc depreceated API
31  */
32
33 # ifdef __cplusplus
34 extern "C" {
35 # endif
36
37 /**
38  * Set the default video output's parent.
39  *
40  * This setting will be used as default for any video output.
41  *
42  * \param p_instance libvlc instance
43  * \param drawable the new parent window
44  *                 (see libvlc_media_player_set_drawable() for details)
45  * \param p_e an initialized exception pointer
46  * @deprecated Use libvlc_media_player_set_drawable
47  */
48 VLC_PUBLIC_API void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
49
50 /**
51  * Set the default video output parent.
52  *
53  * This setting will be used as default for all video outputs.
54  *
55  * \param p_instance libvlc instance
56  * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
57  * \param p_e an initialized exception pointer
58  * @deprecated Use libvlc_media_player_get_drawable
59  */
60 VLC_PUBLIC_API libvlc_drawable_t libvlc_video_get_parent( libvlc_instance_t *, libvlc_exception_t * );
61
62 /*
63  * This function shall not be used at all. It may lead to crash and race condition.
64  */
65 VLC_DEPRECATED_API int libvlc_video_destroy( libvlc_media_player_t *, libvlc_exception_t *);
66
67 /*****************************************************************************
68  * Playlist (Deprecated)
69  *****************************************************************************/
70 /** \defgroup libvlc_playlist libvlc_playlist (Deprecated)
71  * \ingroup libvlc
72  * LibVLC Playlist handling (Deprecated)
73  * @deprecated Use media_list
74  * @{
75  */
76
77 /**
78  * Set the playlist's loop attribute. If set, the playlist runs continuously
79  * and wraps around when it reaches the end.
80  *
81  * \param p_instance the playlist instance
82  * \param loop the loop attribute. 1 sets looping, 0 disables it
83  * \param p_e an initialized exception pointer
84  */
85 VLC_DEPRECATED_API void libvlc_playlist_loop( libvlc_instance_t* , int,
86                                           libvlc_exception_t * );
87
88 /**
89  * Start playing.
90  *
91  * Additionnal playlist item options can be specified for addition to the
92  * item before it is played.
93  *
94  * \param p_instance the playlist instance
95  * \param i_id the item to play. If this is a negative number, the next
96  *        item will be selected. Otherwise, the item with the given ID will be
97  *        played
98  * \param i_options the number of options to add to the item
99  * \param ppsz_options the options to add to the item
100  * \param p_e an initialized exception pointer
101  */
102 VLC_DEPRECATED_API void libvlc_playlist_play( libvlc_instance_t*, int, int,
103                                           char **, libvlc_exception_t * );
104
105 /**
106  * Toggle the playlist's pause status.
107  *
108  * If the playlist was running, it is paused. If it was paused, it is resumed.
109  *
110  * \param p_instance the playlist instance to pause
111  * \param p_e an initialized exception pointer
112  */
113 VLC_DEPRECATED_API void libvlc_playlist_pause( libvlc_instance_t *,
114                                            libvlc_exception_t * );
115
116 /**
117  * Checks whether the playlist is running
118  *
119  * \param p_instance the playlist instance
120  * \param p_e an initialized exception pointer
121  * \return 0 if the playlist is stopped or paused, 1 if it is running
122  */
123 VLC_DEPRECATED_API int libvlc_playlist_isplaying( libvlc_instance_t *,
124                                               libvlc_exception_t * );
125
126 /**
127  * Get the number of items in the playlist
128  *
129  * \param p_instance the playlist instance
130  * \param p_e an initialized exception pointer
131  * \return the number of items
132  */
133 VLC_DEPRECATED_API int libvlc_playlist_items_count( libvlc_instance_t *,
134                                                 libvlc_exception_t * );
135
136 VLC_DEPRECATED_API int libvlc_playlist_get_current_index( libvlc_instance_t *,
137                                                  libvlc_exception_t *);
138 /**
139  * Lock the playlist.
140  *
141  * \param p_instance the playlist instance
142  */
143 VLC_DEPRECATED_API void libvlc_playlist_lock( libvlc_instance_t * );
144
145 /**
146  * Unlock the playlist.
147  *
148  * \param p_instance the playlist instance
149  */
150 VLC_DEPRECATED_API void libvlc_playlist_unlock( libvlc_instance_t * );
151
152 /**
153  * Stop playing.
154  *
155  * \param p_instance the playlist instance to stop
156  * \param p_e an initialized exception pointer
157  */
158 VLC_DEPRECATED_API void libvlc_playlist_stop( libvlc_instance_t *,
159                                           libvlc_exception_t * );
160
161 /**
162  * Go to the next playlist item. If the playlist was stopped, playback
163  * is started.
164  *
165  * \param p_instance the playlist instance
166  * \param p_e an initialized exception pointer
167  */
168 VLC_DEPRECATED_API void libvlc_playlist_next( libvlc_instance_t *,
169                                           libvlc_exception_t * );
170
171 /**
172  * Go to the previous playlist item. If the playlist was stopped, playback
173  * is started.
174  *
175  * \param p_instance the playlist instance
176  * \param p_e an initialized exception pointer
177  */
178 VLC_DEPRECATED_API void libvlc_playlist_prev( libvlc_instance_t *,
179                                           libvlc_exception_t * );
180
181 /**
182  * Empty a playlist. All items in the playlist are removed.
183  *
184  * \param p_instance the playlist instance
185  * \param p_e an initialized exception pointer
186  */
187 VLC_DEPRECATED_API void libvlc_playlist_clear( libvlc_instance_t *,
188                                            libvlc_exception_t * );
189
190 /**
191  * Append an item to the playlist. The item is added at the end. If more
192  * advanced options are required, \see libvlc_playlist_add_extended instead.
193  *
194  * \param p_instance the playlist instance
195  * \param psz_uri the URI to open, using VLC format
196  * \param psz_name a name that you might want to give or NULL
197  * \param p_e an initialized exception pointer
198  * \return the identifier of the new item
199  */
200 VLC_DEPRECATED_API int libvlc_playlist_add( libvlc_instance_t *, const char *,
201                                         const char *, libvlc_exception_t * );
202
203 /**
204  * Append an item to the playlist. The item is added at the end, with
205  * additional input options.
206  *
207  * \param p_instance the playlist instance
208  * \param psz_uri the URI to open, using VLC format
209  * \param psz_name a name that you might want to give or NULL
210  * \param i_options the number of options to add
211  * \param ppsz_options strings representing the options to add
212  * \param p_e an initialized exception pointer
213  * \return the identifier of the new item
214  */
215 VLC_DEPRECATED_API int libvlc_playlist_add_extended( libvlc_instance_t *, const char *,
216                                                  const char *, int, const char **,
217                                                  libvlc_exception_t * );
218
219 /**
220  * Append an item to the playlist. The item is added at the end, with
221  * additional input options from an untrusted source.
222  *
223  * \param p_instance the playlist instance
224  * \param psz_uri the URI to open, using VLC format
225  * \param psz_name a name that you might want to give or NULL
226  * \param i_options the number of options to add
227  * \param ppsz_options strings representing the options to add
228  * \param p_e an initialized exception pointer
229  * \return the identifier of the new item
230  */
231 VLC_DEPRECATED_API int libvlc_playlist_add_extended_untrusted( libvlc_instance_t *, const char *,
232                                                  const char *, int, const char **,
233                                                  libvlc_exception_t * );
234
235 /**
236  * Delete the playlist item with the given ID.
237  *
238  * \param p_instance the playlist instance
239  * \param i_id the id to remove
240  * \param p_e an initialized exception pointer
241  * \return 0 in case of success, a non-zero value otherwise
242  */
243 VLC_DEPRECATED_API int libvlc_playlist_delete_item( libvlc_instance_t *, int,
244                                                 libvlc_exception_t * );
245
246 /** Get the input that is currently being played by the playlist.
247  *
248  * \param p_instance the playlist instance to use
249  * \param p_e an initialized exception pointern
250  * \return a media instance object
251  */
252 VLC_DEPRECATED_API libvlc_media_player_t * libvlc_playlist_get_media_player(
253                                 libvlc_instance_t *, libvlc_exception_t * );
254
255 /** @}*/
256
257 # ifdef __cplusplus
258 }
259 # endif
260
261 #endif /* _LIBVLC_DEPRECATED_H */