xref: /haiku/src/servers/app/WorkspacePrivate.h (revision 1e36cfc2721ef13a187c6f7354dc9cbc485e89d3)
1 /*
2  * Copyright 2005, Haiku.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Axel Dörfler, axeld@pinc-software.de
7  */
8 #ifndef WORKSPACE_PRIVATE_H
9 #define WORKSPACE_PRIVATE_H
10 
11 
12 #include "RGBColor.h"
13 #include "WindowList.h"
14 #include "Workspace.h"
15 
16 #include <Accelerant.h>
17 #include <ObjectList.h>
18 #include <String.h>
19 
20 
21 struct display_info {
22 	BString			identifier;
23 	BPoint			origin;
24 	display_mode	mode;
25 };
26 
27 class Workspace::Private {
28 	public:
29 		Private();
30 		~Private();
31 
32 		int32				Index() const { return fWindows.Index(); }
33 
34 		WindowList&			Windows() { return fWindows; }
35 
36 		// displays
37 
38 		void				SetDisplaysFromDesktop(Desktop* desktop);
39 
40 		int32				CountDisplays() const { return fDisplays.CountItems(); }
41 		const display_info*	DisplayAt(int32 index) const { return fDisplays.ItemAt(index); }
42 
43 		// configuration
44 
45 		const RGBColor&		Color() const { return fColor; }
46 		void				SetColor(const RGBColor& color);
47 
48 		void				RestoreConfiguration(const BMessage& settings);
49 		void				StoreConfiguration(BMessage& settings);
50 
51 	private:
52 		void				_SetDefaults();
53 
54 		WindowList			fWindows;
55 		WindowLayer*		fFront;
56 		WindowLayer*		fFocus;
57 
58 		BObjectList<display_info> fDisplays;
59 
60 		RGBColor			fColor;
61 };
62 
63 #endif	/* WORKSPACE_PRIVATE_H */
64