1 /* 2 * Copyright (c) 2005, Haiku, Inc. 3 * Distributed under the terms of the MIT license. 4 * 5 * Authors: 6 * Axel Dörfler, axeld@pinc-software.de 7 */ 8 #ifndef WINDOW_LIST_H 9 #define WINDOW_LIST_H 10 11 12 #include <SupportDefs.h> 13 #include <Point.h> 14 15 16 class WindowLayer; 17 18 19 class WindowList { 20 public: 21 WindowList(int32 index = 0); 22 ~WindowList(); 23 24 void SetIndex(int32 index); 25 int32 Index() const { return fIndex; } 26 27 WindowLayer* FirstWindow() { return fFirstWindow; } 28 WindowLayer* LastWindow() { return fLastWindow; } 29 30 void AddWindow(WindowLayer* window, WindowLayer* before = NULL); 31 void RemoveWindow(WindowLayer* window); 32 33 bool HasWindow(WindowLayer* window) const; 34 35 private: 36 int32 fIndex; 37 WindowLayer* fFirstWindow; 38 WindowLayer* fLastWindow; 39 }; 40 41 enum window_lists { 42 kAllWindowList = 32, 43 kSubsetList, 44 kWorkingList, 45 46 kListCount 47 }; 48 49 struct window_anchor { 50 window_anchor(); 51 52 WindowLayer* next; 53 WindowLayer* previous; 54 BPoint position; 55 }; 56 57 extern const BPoint kInvalidWindowPosition; 58 59 #endif // WINDOW_LIST_H 60