1 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 2 // 3 // Copyright (c) 2003, OpenBeOS 4 // 5 // This software is part of the OpenBeOS distribution and is covered 6 // by the OpenBeOS license. 7 // 8 // 9 // File: MediaWindow.h 10 // Author: Sikosis, Jérôme Duval 11 // Description: Media Preferences 12 // Created : June 25, 2003 13 // 14 // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ 15 16 #ifndef __MEDIAWINDOWS_H__ 17 #define __MEDIAWINDOWS_H__ 18 19 #include <MediaAddOn.h> 20 #include <Window.h> 21 #include <ParameterWeb.h> 22 #include <StringView.h> 23 #include <ListView.h> 24 #include <Box.h> 25 26 #include "MediaViews.h" 27 #include "MediaListItem.h" 28 #include "MediaAlert.h" 29 30 #define SETTINGS_FILE "MediaPrefs Settings" 31 32 class MediaWindow : public BWindow 33 { 34 public: 35 MediaWindow(BRect frame); 36 ~MediaWindow(); 37 virtual bool QuitRequested(); 38 virtual void MessageReceived(BMessage *message); 39 virtual void FrameResized(float width, float height); 40 status_t InitCheck(); 41 private: 42 status_t InitMedia(bool first); 43 void FindNodes(media_type type, uint64 kind, BList &list); 44 void AddNodes(BList &list, bool isVideo); 45 MediaListItem *FindMediaListItem(dormant_node_info *info); 46 void InitWindow(void); 47 static status_t RestartMediaServices(void *data); 48 static bool UpdateProgress(int stage, const char * message, void * cookie); 49 50 BBox * fBox; 51 BListView* fListView; 52 BStringView* fTitleView; 53 BView* fContentView; 54 SettingsView* fAudioView; 55 SettingsView* fVideoView; 56 BarView* fBar; 57 58 media_node* fCurrentNode; 59 BParameterWeb* fParamWeb; 60 61 BList fAudioInputs; 62 BList fAudioOutputs; 63 BList fVideoInputs; 64 BList fVideoOutputs; 65 66 BList fIcons; 67 MediaAlert *fAlert; 68 status_t fInitCheck; 69 }; 70 71 #endif 72