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 #ifndef __MEDIAWINDOWS_H__ 16 #define __MEDIAWINDOWS_H__ 17 18 19 #include <Box.h> 20 #include <ListView.h> 21 #include <MediaAddOn.h> 22 #include <ParameterWeb.h> 23 #include <StringView.h> 24 #include <Window.h> 25 26 #include <ObjectList.h> 27 28 #include "MediaViews.h" 29 #include "MediaListItem.h" 30 #include "MediaAlert.h" 31 32 33 #define SETTINGS_FILE "MediaPrefs Settings" 34 35 36 class BSeparatorView; 37 38 39 class MediaWindow : public BWindow 40 { 41 public: 42 MediaWindow(BRect frame); 43 ~MediaWindow(); 44 virtual bool QuitRequested(); 45 virtual void MessageReceived(BMessage* message); 46 virtual void FrameResized(float width, float height); 47 status_t InitCheck(); 48 49 private: 50 51 typedef BObjectList<dormant_node_info> NodeList; 52 53 54 status_t InitMedia(bool first); 55 void _FindNodes(); 56 void _FindNodes(media_type type, uint64 kind, 57 NodeList& into); 58 void _AddNodeItems(NodeList& from, bool isVideo); 59 void _EmptyNodeLists(); 60 61 MediaListItem* FindMediaListItem(dormant_node_info* info); 62 void InitWindow(); 63 64 static status_t RestartMediaServices(void* data); 65 static bool UpdateProgress(int stage, const char * message, 66 void * cookie); 67 68 BBox* fBox; 69 BListView* fListView; 70 BSeparatorView* fTitleView; 71 BView* fContentView; 72 SettingsView* fAudioView; 73 SettingsView* fVideoView; 74 75 media_node* fCurrentNode; 76 BParameterWeb* fParamWeb; 77 78 79 NodeList fAudioInputs; 80 NodeList fAudioOutputs; 81 NodeList fVideoInputs; 82 NodeList fVideoOutputs; 83 84 BList fIcons; 85 MediaAlert* fAlert; 86 status_t fInitCheck; 87 }; 88 89 #endif 90