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