haiku/src/servers/app/WindowList.h
Axel Dörfler d01879e5a6 * Added a separate focus list that will contain all windows in the order
of the last focus.
* When choosing a new focus window, this list is now used to find the
  new focus window instead of just choosing the next window in the
  workspace list.
* With the normal mode mouse, this shouldn't change anything, but with
  focus follows mouse turned on, this will behave much better if you 
  don't actually move the mouse - and it also fixes bug #1886.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24234 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-04 12:47:34 +00:00

61 lines
1.0 KiB
C++

/*
* Copyright (c) 2005-2008, Haiku, Inc.
* Distributed under the terms of the MIT license.
*
* Authors:
* Axel Dörfler, axeld@pinc-software.de
*/
#ifndef WINDOW_LIST_H
#define WINDOW_LIST_H
#include <SupportDefs.h>
#include <Point.h>
class WindowLayer;
class WindowList {
public:
WindowList(int32 index = 0);
~WindowList();
void SetIndex(int32 index);
int32 Index() const { return fIndex; }
WindowLayer* FirstWindow() { return fFirstWindow; }
WindowLayer* LastWindow() { return fLastWindow; }
void AddWindow(WindowLayer* window, WindowLayer* before = NULL);
void RemoveWindow(WindowLayer* window);
bool HasWindow(WindowLayer* window) const;
private:
int32 fIndex;
WindowLayer* fFirstWindow;
WindowLayer* fLastWindow;
};
enum window_lists {
kAllWindowList = 32,
kSubsetList,
kFocusList,
kWorkingList,
kListCount
};
struct window_anchor {
window_anchor();
WindowLayer* next;
WindowLayer* previous;
BPoint position;
};
extern const BPoint kInvalidWindowPosition;
#endif // WINDOW_LIST_H