1 /*****************************************************************************
2 * VlcWrapper.h: BeOS plugin for vlc (derived from MacOS X port)
3 *****************************************************************************
4 * Copyright (C) 2001 VideoLAN
5 * $Id: VlcWrapper.h,v 1.21 2003/04/22 16:36:16 titer Exp $
7 * Authors: Florian G. Pflug <fgp@phlo.org>
8 * Jon Lech Johansen <jon-vl@nanocrew.net>
9 * Tony Castley <tony@castley.net>
10 * Stephan Aßmus <stippi@yellowbites.com>
11 * Eric Petit <titer@videolan.org>
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
26 *****************************************************************************/
30 #define SEEKSLIDER_RANGE 2048
32 class InterfaceWindow;
35 /*****************************************************************************
36 * intf_sys_t: internal variables of the BeOS interface
37 *****************************************************************************/
40 msg_subscription_t * p_sub;
42 InterfaceWindow * p_window;
47 audio_volume_t i_saved_volume;
51 VlcWrapper * p_wrapper;
54 /* Necessary because of i18n */
55 const char * _AddEllipsis( char * string );
57 /*****************************************************************************
59 *****************************************************************************
60 * This class makes the link between the BeOS interface and the vlc core.
61 * There is only one VlcWrapper instance at any time, which is stored
62 * in p_intf->p_sys->p_wrapper
63 *****************************************************************************/
67 VlcWrapper( intf_thread_t *p_intf );
78 BList * GetChannels( int i_cat );
79 void ToggleLanguage( int i_language );
80 void ToggleSubtitle( int i_subtitle );
81 const char * GetTimeAsString();
82 float GetTimeAsFloat();
83 void SetTimeAsFloat( float i_offset );
87 void OpenFiles( BList *o_files, bool replace = true,
89 void OpenDisc( BString o_type, BString o_device,
90 int i_title, int i_chapter );
92 char * PlaylistItemName( int );
93 int PlaylistCurrent();
99 bool PlaylistPlaying();
100 void GetPlaylistInfo( int32& currentIndex,
102 void PlaylistJumpTo( int );
103 void GetNavCapabilities( bool * canSkipPrev,
104 bool * canSkipNext );
108 /* Playlist manipulation */
109 bool PlaylistLock() const;
110 void PlaylistUnlock() const;
111 // playlist must be locked prior to calling all of these!
112 void* PlaylistItemAt( int index ) const;
113 // both functions return a copy of the removed item
114 // so that it can be added at another index
115 void* PlaylistRemoveItem( int index ) const;
116 void* PlaylistRemoveItem( void* item ) const;
117 // uses playlist_AddItem()
118 bool PlaylistAddItem( void* item, int index ) const;
119 void* PlaylistCloneItem( void* item ) const;
120 // only modifies playlist, doesn't effect playback
121 void PlaylistSetPlaying( int index ) const;
124 unsigned short GetVolume();
125 void SetVolume( int value );
127 void VolumeRestore();
135 void ToggleTitle( int i_title );
136 void TitleInfo( int32& currentIndex, int32& maxIndex );
139 BList * GetChapters();
142 void ToggleChapter( int i_chapter );
143 void ChapterInfo( int32& currentIndex, int32& maxIndex );
146 void LoadSubFile( const char * psz_file );
150 intf_thread_t * p_intf;
151 input_thread_t * p_input;
152 playlist_t * p_playlist;