]> git.sesse.net Git - vlc/blob - modules/gui/beos/VlcWrapper.h
1ac65e9d6ff308e9968f4caf8aa94c3e1db6c065
[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.4 2002/10/14 20:09:17 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
27 #define SEEKSLIDER_RANGE 2048
28
29 class InterfaceWindow;
30 class Intf_VLCWrapper;
31
32 /*****************************************************************************
33  * intf_sys_t: description and status of FB interface
34  *****************************************************************************/
35 struct intf_sys_t
36 {
37     InterfaceWindow * p_window;
38     char              i_key;
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 /* Intf_VLCWrapper is a singleton class
56     (only one instance at any time) */
57 class Intf_VLCWrapper
58 {
59 public:
60     static Intf_VLCWrapper *getVLCWrapper(intf_thread_t *p_if);
61     ~Intf_VLCWrapper();
62     
63     /* static bool manage(); */
64     void quit();
65     int inputGetStatus();
66     
67     /* playlist control */
68     bool playlistPlay();
69     void playlistPause();
70     void playlistStop();
71     void playlistNext();
72     void playlistPrev();
73     /* void playlistJumpTo( int pos );
74     int playlistCurrentPos();
75     int playlistSize();
76         playlistLock();
77         playlistUnlock();*/
78         void playlistSkip(int i);
79     void playlistGoto(int i);
80
81 /*  Playback Modes
82                 PLAYLIST_REPEAT_CURRENT
83                 PLAYLIST_FORWARD       
84                 PLAYLIST_BACKWARD      
85                 PLAYLIST_FORWARD_LOOP  
86                 PLAYLIST_BACKWARD_LOOP 
87                 PLAYLIST_RANDOM        
88                 PLAYLIST_REVERSE_RANDOM
89 */
90
91     void getNavCapabilities( bool* canSkipPrev,
92                                                                 bool* canSkipNext );
93         void    navigatePrev();
94         void    navigateNext();
95
96 //    void channelNext();
97 //    void channelPrev();
98 //    void loop();
99
100     /*  Stream Control */
101     void playSlower();
102     void playFaster();
103     
104     /* playback control */
105     void volume_mute();
106     void volume_restore();
107     void set_volume(int value);
108     void toggle_mute( );
109     bool is_muted();
110     bool is_playing();
111     void maxvolume();
112     bool has_audio();
113 //    void fullscreen();
114     void eject();
115     
116     int getStatus();    
117     void setStatus(int status);
118     void inputSeek();
119
120     /* playback info */
121     BString* getTimeAsString();
122     float  getTimeAsFloat();
123     void   setTimeAsFloat( float i_offset );
124     bool   playlistPlaying();
125     BList* playlistAsArray();
126
127     /* open file/disc/network */
128     void openFiles( BList *o_files, bool replace = true );
129     void openDisc( BString o_type, BString o_device,
130                                           int i_title, int i_chapter );
131     void openNet( BString o_addr, int i_port );
132     void openNetChannel( BString o_addr, int i_port );
133     void openNetHTTP( BString o_addr );
134
135     /* menus management */
136     void toggleProgram( int i_program );
137     void toggleTitle( int i_title );
138     void toggleChapter( int i_chapter );
139     void toggleLanguage( int i_language );
140     void toggleSubtitle( int i_subtitle );
141     void channelNext();
142     void channelPrev();
143     void setupMenus();
144     
145     void playlistJumpTo( int );
146     int  playlistSize();
147     int  playlistCurrentPos();
148     void playlistLock();
149     void playlistUnlock();
150     void loop(); 
151     
152 //private:
153     Intf_VLCWrapper( intf_thread_t *p_intf );
154     es_descriptor_t *  p_audio_es;
155     intf_thread_t *p_intf;
156 };
157