]> git.sesse.net Git - vlc/blob - modules/gui/beos/VlcWrapper.h
b7b1875156b5bea010a24855835f28ac0d67e4ca
[vlc] / modules / gui / beos / VlcWrapper.h
1 /*****************************************************************************
2  * intf_vlc_wrapper.h: BeOS plugin for vlc (derived from MacOS X port )
3  *****************************************************************************
4  * Copyright (C) 2001 VideoLAN
5  * $Id: VlcWrapper.h,v 1.6 2002/10/30 00:59:22 titer Exp $
6  *
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>
12  *
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.
17  * 
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.
22  *
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  *****************************************************************************/
27
28 #define SEEKSLIDER_RANGE 2048
29
30 class InterfaceWindow;
31 class Intf_VLCWrapper;
32
33 /*****************************************************************************
34  * intf_sys_t: internal variables of the BeOS interface
35  *****************************************************************************/
36 struct intf_sys_t
37 {
38     InterfaceWindow * p_window;
39     
40     input_thread_t *  p_input;
41     playlist_t *      p_playlist;
42     aout_instance_t * p_aout;
43     
44     /* DVD mode */
45     vlc_bool_t        b_disabled_menus;
46     vlc_bool_t        b_loop;
47     vlc_bool_t        b_mute;
48     int               i_part;
49     int               i_saved_volume;
50     int               i_channel;
51     
52     Intf_VLCWrapper * p_vlc_wrapper;
53 };
54
55 /*****************************************************************************
56  * Intf_VLCWrapper
57  *****************************************************************************
58  * This class makes the link between the BeOS interface and the vlc core.
59  * There is only one Intf_VLCWrapper instance at any time, which is stored
60  * in p_intf->p_sys->p_vlc_wrapper
61  *****************************************************************************/
62 class Intf_VLCWrapper
63 {
64 public:
65     Intf_VLCWrapper( intf_thread_t *p_intf );
66     ~Intf_VLCWrapper();
67     
68     int inputGetStatus();
69     void inputSeek();
70     
71     /* playlist control */
72     bool playlistPlay();
73     void playlistPause();
74     void playlistStop();
75     void playlistNext();
76     void playlistPrev();
77     void playlistJumpTo( int );
78     int  playlistSize();
79     int  playlistCurrentPos();
80     void playlistLock();
81     void playlistUnlock();
82     void playlistSkip(int i);
83     void playlistGoto(int i);
84     void loop(); 
85
86     bool playlistPlaying();
87     BList* playlistAsArray();
88     void   getPlaylistInfo( int32& currentIndex,
89                             int32& maxIndex );
90     void   getTitleInfo( int32& currentIndex,
91                          int32& maxIndex );
92     void   getChapterInfo( int32& currentIndex,
93                            int32& maxIndex );
94     void getNavCapabilities( bool* canSkipPrev,
95                              bool* canSkipNext );
96         void navigatePrev();
97         void navigateNext();
98
99     /*  Stream Control */
100     void playSlower();
101     void playFaster();
102     
103     /* playback control */
104     void volume_mute();
105     void volume_restore();
106     void set_volume(int value);
107     void toggle_mute( );
108     bool is_muted();
109     bool is_playing();
110     void maxvolume();
111     bool has_audio();
112     
113     /* playback info */
114     const char* getTimeAsString();
115     float  getTimeAsFloat();
116     void   setTimeAsFloat( float i_offset );
117
118     /* open file/disc/network */
119     void openFiles( BList *o_files, bool replace = true );
120     void openDisc( BString o_type, BString o_device,
121                    int i_title, int i_chapter );
122     void openNet( BString o_addr, int i_port );
123     void openNetChannel( BString o_addr, int i_port );
124     void openNetHTTP( BString o_addr );
125
126     /* menus management */
127     void toggleProgram( int i_program );
128     void toggleTitle( int i_title );
129     void toggleChapter( int i_chapter );
130     void toggleLanguage( int i_language );
131     void toggleSubtitle( int i_subtitle );
132     void channelNext();
133     void channelPrev();
134
135 private:
136     intf_thread_t *p_intf;
137 };
138