xref: /haiku/src/preferences/media/MediaWindow.h (revision 93aeb8c3bc3f13cb1f282e3e749258a23790d947)
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 *					mBox;
51 		BListView*				mListView;
52 		BStringView*			mTitleView;
53 		BView*					mContentView;
54 		SettingsView*			mAudioView;
55 		SettingsView*			mVideoView;
56 		BarView*				mBar;
57 
58 	    media_node*				mCurrentNode;
59 	    BParameterWeb*			mParamWeb;
60 
61 		BList					mAudioInputs;
62 		BList					mAudioOutputs;
63 		BList					mVideoInputs;
64 		BList					mVideoOutputs;
65 
66 		BList					mIcons;
67 		MediaAlert				*mAlert;
68 		status_t				mInitCheck;
69 };
70 
71 #endif
72