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