1 /*****************************************************************************
2 * InterfaceWindow.h: BeOS interface window class prototype
3 *****************************************************************************
4 * Copyright (C) 1999, 2000, 2001 the VideoLAN team
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;
37 class PreferencesWindow;
40 class CDMenu : public BMenu
43 CDMenu( const char* name );
46 virtual void AttachedToWindow();
49 int GetCD( const char* directory );
52 class LanguageMenu : public BMenu
55 LanguageMenu( intf_thread_t * p_intf,
56 const char * psz_name,
57 char * psz_variable );
58 virtual ~LanguageMenu();
60 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( intf_thread_t * p_intf,
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 void UpdatePlaylist();
107 bool IsStopped() const;
109 MediaControlView* p_mediaControl;
110 MessagesWindow* fMessagesWindow;
113 void _SetMenusEnabled( bool hasFile,
114 bool hasChapters = false,
115 bool hasTitles = false );
116 void _UpdateSpeedMenu( int rate );
117 void _ShowFilePanel( uint32 command,
118 const char* windowTitle );
119 void _RestoreSettings();
120 void _StoreSettings();
122 intf_thread_t * p_intf;
123 input_thread_t * p_input;
124 playlist_t * p_playlist;
125 es_descriptor_t * p_spu_es;
126 bool b_playlist_update;
128 BFilePanel* fFilePanel;
129 PlayListWindow* fPlaylistWindow;
130 PreferencesWindow* fPreferencesWindow;
132 BMenuItem* fGotoMenuMI;
133 BMenuItem* fNextTitleMI;
134 BMenuItem* fPrevTitleMI;
135 BMenuItem* fNextChapterMI;
136 BMenuItem* fPrevChapterMI;
138 BMenuItem* fHeighthMI;
139 BMenuItem* fQuarterMI;
141 BMenuItem* fNormalMI;
144 BMenuItem* fHeightMI;
146 BMenu* fNavigationMenu;
149 BMenu* fLanguageMenu;
150 BMenu* fSubtitlesMenu;
153 bigtime_t fLastUpdateTime;
154 BMessage* fSettings; // we keep the message arround
155 // for forward compatibility
159 // some global support functions
160 status_t load_settings( BMessage* message,
161 const char* fileName,
162 const char* folder = NULL );
164 status_t save_settings( BMessage* message,
165 const char* fileName,
166 const char* folder = NULL );
169 #endif // BEOS_INTERFACE_WINDOW_H