1/*
2 * Copyright 2006-2018, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef	_DESKBAR_H
6#define	_DESKBAR_H
7
8
9#include <Rect.h>
10
11
12class BMessenger;
13class BView;
14struct entry_ref;
15
16
17enum deskbar_location {
18	B_DESKBAR_TOP,
19	B_DESKBAR_BOTTOM,
20	B_DESKBAR_LEFT_TOP,
21	B_DESKBAR_RIGHT_TOP,
22	B_DESKBAR_LEFT_BOTTOM,
23	B_DESKBAR_RIGHT_BOTTOM
24};
25
26
27class BDeskbar {
28public:
29								BDeskbar();
30								~BDeskbar();
31
32			bool				IsRunning() const;
33
34	// Location methods
35			BRect				Frame() const;
36			deskbar_location	Location(bool* _isExpanded = NULL) const;
37			status_t			SetLocation(deskbar_location location,
38									bool expanded = false);
39
40	// Other state methods
41			bool				IsExpanded() const;
42			status_t			Expand(bool expand);
43
44			bool				IsAlwaysOnTop() const;
45			status_t			SetAlwaysOnTop(bool alwaysOnTop);
46
47			bool				IsAutoRaise() const;
48			status_t			SetAutoRaise(bool autoRaise);
49
50			bool				IsAutoHide() const;
51			status_t			SetAutoHide(bool autoHide);
52
53	// Item querying methods
54			status_t			GetItemInfo(int32 id, const char** _name) const;
55			status_t			GetItemInfo(const char* name, int32* _id) const;
56			bool				HasItem(int32 id) const;
57			bool				HasItem(const char* name) const;
58			uint32				CountItems() const;
59			float				MaxItemWidth() const;
60			float				MaxItemHeight() const;
61
62	// Item modification methods
63			status_t			AddItem(BView* archivableView,
64									int32* _id = NULL);
65			status_t			AddItem(entry_ref* addOn, int32* _id = NULL);
66			status_t			RemoveItem(int32 id);
67			status_t			RemoveItem(const char* name);
68
69private:
70			BMessenger*			fMessenger;
71			uint32				_reserved[12];
72};
73
74
75#endif	// _DESKBAR_H
76