headers/bsd: Add sys/queue.h.
[haiku.git] / src / servers / app / Workspace.h
blobe92db6c54e66311581c85f01453860c6a45db81e
1 /*
2 * Copyright 2005-2013, Haiku.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Axel Dörfler, axeld@pinc-software.de
7 */
8 #ifndef WORKSPACE_H
9 #define WORKSPACE_H
12 #include <InterfaceDefs.h>
15 class Desktop;
16 class Window;
19 /*! Workspace objects are intended to be short-lived. You create them while
20 already holding a lock to the Desktop read-write lock and then you can use
21 them to query information, and then you destroy them again, for example by
22 letting them go out of scope.
24 class Workspace {
25 public:
26 Workspace(Desktop& desktop, int32 index,
27 bool readOnly = false);
28 ~Workspace();
30 const rgb_color& Color() const;
31 void SetColor(const rgb_color& color,
32 bool makeDefault);
33 bool IsCurrent() const
34 { return fCurrentWorkspace; }
36 status_t GetNextWindow(Window*& _window,
37 BPoint& _leftTop);
38 status_t GetPreviousWindow(Window*& _window,
39 BPoint& _leftTop);
40 void RewindWindows();
42 class Private;
44 private:
45 Workspace::Private& fWorkspace;
46 Desktop& fDesktop;
47 Window* fCurrent;
48 bool fCurrentWorkspace;
52 #endif /* WORKSPACE_H */