1 /*****************************************************************************
2 * InterfaceWindow.h: BeOS interface window class prototype
3 *****************************************************************************
4 * Copyright (C) 1999, 2000, 2001 VideoLAN
5 * $Id: InterfaceWindow.h,v 1.2 2002/09/30 18:30:27 titer Exp $
7 * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
8 * Tony Castley <tcastley@mail.powerup.com.au>
9 * Richard Shepherd <richard@rshepherd.demon.co.uk>
10 * Stephan Aßmus <stippi@yellowbites.com>
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.
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.
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 *****************************************************************************/
27 #ifndef BEOS_INTERFACE_WINDOW_H
28 #define BEOS_INTERFACE_WINDOW_H
34 class MediaControlView;
38 class CDMenu : public BMenu
41 CDMenu( const char* name );
44 virtual void AttachedToWindow();
47 int GetCD( const char* directory );
50 class LanguageMenu : public BMenu
53 LanguageMenu( const char* name,
55 intf_thread_t* p_interface );
56 virtual ~LanguageMenu();
58 virtual void AttachedToWindow();
63 intf_thread_t* p_intf;
67 class TitleMenu : public BMenu
70 TitleMenu( const char* name, intf_thread_t *p_interface );
73 virtual void AttachedToWindow();
75 intf_thread_t *p_intf;
78 class ChapterMenu : public BMenu
81 ChapterMenu( const char* name, intf_thread_t *p_interface );
82 virtual ~ChapterMenu();
84 virtual void AttachedToWindow();
86 intf_thread_t *p_intf;
90 class InterfaceWindow : public BWindow
93 InterfaceWindow( BRect frame,
95 intf_thread_t* p_interface );
96 virtual ~InterfaceWindow();
99 virtual void FrameResized( float width, float height );
100 virtual void MessageReceived( BMessage* message );
101 virtual bool QuitRequested();
104 void updateInterface();
105 bool IsStopped() const;
107 MediaControlView* p_mediaControl;
110 void _UpdatePlaylist();
111 void _SetMenusEnabled( bool hasFile,
112 bool hasChapters = false,
113 bool hasTitles = false );
114 void _UpdateSpeedMenu( int rate );
115 void _InputStreamChanged();
116 status_t _LoadSettings( BMessage* message,
117 const char* fileName,
118 const char* subFolder = NULL );
119 status_t _SaveSettings( BMessage* message,
120 const char* fileName,
121 const char* subFolder = NULL );
122 void _RestoreSettings();
123 void _StoreSettings();
125 intf_thread_t* p_intf;
126 es_descriptor_t* p_audio_es;
127 es_descriptor_t* p_spu_es;
128 input_thread_t* fInputThread;
130 bool fPlaylistIsEmpty;
131 BFilePanel* fFilePanel;
132 PlayListWindow* fPlaylistWindow;
134 BMenuItem* fNextTitleMI;
135 BMenuItem* fPrevTitleMI;
136 BMenuItem* fNextChapterMI;
137 BMenuItem* fPrevChapterMI;
139 BMenuItem* fSlowerMI;
140 BMenuItem* fNormalMI;
141 BMenuItem* fFasterMI;
143 BMenu* fNavigationMenu;
146 BMenu* fLanguageMenu;
147 BMenu* fSubtitlesMenu;
149 bigtime_t fLastUpdateTime;
150 BMessage* fSettings; // we keep the message arround
151 // for forward compatibility
153 Intf_VLCWrapper * p_vlc_wrapper;
156 #endif // BEOS_INTERFACE_WINDOW_H