1 /* 2 * Copyright 2005-2008, 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 "WindowList.h" 13 #include "Workspace.h" 14 15 #include <Accelerant.h> 16 #include <ObjectList.h> 17 #include <String.h> 18 19 20 struct display_info { 21 BString identifier; 22 BPoint origin; 23 display_mode mode; 24 }; 25 26 class Workspace::Private { 27 public: 28 Private(); 29 ~Private(); 30 31 int32 Index() const { return fWindows.Index(); } 32 33 WindowList& Windows() { return fWindows; } 34 35 // displays 36 37 void SetDisplaysFromDesktop(Desktop* desktop); 38 39 int32 CountDisplays() const { return fDisplays.CountItems(); } 40 const display_info* DisplayAt(int32 index) const { return fDisplays.ItemAt(index); } 41 42 // configuration 43 44 const rgb_color& Color() const { return fColor; } 45 void SetColor(const rgb_color& color); 46 47 void RestoreConfiguration(const BMessage& settings); 48 void StoreConfiguration(BMessage& settings); 49 50 private: 51 void _SetDefaults(); 52 53 WindowList fWindows; 54 Window* fFront; 55 Window* fFocus; 56 57 BObjectList<display_info> fDisplays; 58 59 rgb_color fColor; 60 }; 61 62 #endif /* WORKSPACE_PRIVATE_H */ 63