]> git.sesse.net Git - vlc/blob - modules/gui/beos/VlcWrapper.h
Attempt to port new BeOS features from the stable branch.
[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.2 2002/09/30 18:30:27 titer Exp $
6  *
7  * Authors: Florian G. Pflug <fgp@phlo.org>
8  *          Jon Lech Johansen <jon-vl@nanocrew.net>
9  *          Tony Casltey <tony@castley.net>
10  *          Stephan Aßmus <stippi@yellowbites.com>
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  * 
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
25  *****************************************************************************/
26 class InterfaceWindow;
27
28 /*****************************************************************************
29  * intf_sys_t: description and status of FB interface
30  *****************************************************************************/
31 struct intf_sys_t
32 {
33     InterfaceWindow * p_window;
34     char              i_key;
35     
36     /* The input thread */
37     input_thread_t * p_input;
38     
39     /* DVD mode */
40     vlc_bool_t        b_disabled_menus;
41     vlc_bool_t        b_loop;
42     vlc_bool_t        b_mute;
43     int               i_part;
44     int               i_saved_volume;
45     int               i_channel;
46 };
47
48 /* Intf_VLCWrapper is a singleton class
49     (only one instance at any time) */
50 class Intf_VLCWrapper
51 {
52 public:
53     static Intf_VLCWrapper *getVLCWrapper(intf_thread_t *p_if);
54     ~Intf_VLCWrapper();
55     
56     /* static bool manage(); */
57     void quit();
58     int inputGetStatus();
59     
60     /* playlist control */
61     bool playlistPlay();
62     void playlistPause();
63     void playlistStop();
64     void playlistNext();
65     void playlistPrev();
66     /* void playlistJumpTo( int pos );
67     int playlistCurrentPos();
68     int playlistSize();
69         playlistLock();
70         playlistUnlock();*/
71         void playlistSkip(int i);
72     void playlistGoto(int i);
73
74 /*  Playback Modes
75                 PLAYLIST_REPEAT_CURRENT
76                 PLAYLIST_FORWARD       
77                 PLAYLIST_BACKWARD      
78                 PLAYLIST_FORWARD_LOOP  
79                 PLAYLIST_BACKWARD_LOOP 
80                 PLAYLIST_RANDOM        
81                 PLAYLIST_REVERSE_RANDOM
82 */
83
84     void getNavCapabilities( bool* canSkipPrev,
85                                                                 bool* canSkipNext );
86         void    navigatePrev();
87         void    navigateNext();
88
89 //    void channelNext();
90 //    void channelPrev();
91 //    void loop();
92
93     /*  Stream Control */
94     void playSlower();
95     void playFaster();
96     
97     /* playback control */
98     void volume_mute();
99     void volume_restore();
100     void set_volume(int value);
101     void toggle_mute( );
102     bool is_muted();
103     bool is_playing();
104     void maxvolume();
105     bool has_audio();
106 //    void fullscreen();
107     void eject();
108     
109     int getStatus();    
110     void setStatus(int status);
111     void inputSeek();
112
113     /* playback info */
114     BString* getTimeAsString();
115     float  getTimeAsFloat();
116     void   setTimeAsFloat( float i_offset );
117     bool   playlistPlaying();
118     BList* playlistAsArray();
119
120     /* open file/disc/network */
121     void openFiles( BList *o_files, bool replace = true );
122     void openDisc( BString o_type, BString o_device,
123                                           int i_title, int i_chapter );
124     void openNet( BString o_addr, int i_port );
125     void openNetChannel( BString o_addr, int i_port );
126     void openNetHTTP( BString o_addr );
127
128     /* menus management */
129     void toggleProgram( int i_program );
130     void toggleTitle( int i_title );
131     void toggleChapter( int i_chapter );
132     void toggleLanguage( int i_language );
133     void toggleSubtitle( int i_subtitle );
134     void channelNext();
135     void channelPrev();
136     void setupMenus();
137     
138     void playlistJumpTo( int );
139     int  playlistSize();
140     int  playlistCurrentPos();
141     void playlistLock();
142     void playlistUnlock();
143     void loop(); 
144     
145 //private:
146     Intf_VLCWrapper( intf_thread_t *p_if );
147         es_descriptor_t *  p_audio_es;
148     intf_thread_t *p_intf;
149 };
150