1/*
2 * Copyright 2001-2006, Haiku.
3 * Distributed under the terms of the MIT License.
4 *
5 * Authors:
6 *		DarkWyrm <bpmagic@columbus.rr.com>
7 */
8#ifndef CURSOR_SET_H
9#define CURSOR_SET_H
10
11
12#include <Bitmap.h>
13#include <Cursor.h>
14#include <Message.h>
15
16#include <ServerProtocol.h>
17
18class ServerCursor;
19
20
21/*!
22	\brief Class to manage system cursor sets
23*/
24class CursorSet : public BMessage {
25	public:
26		CursorSet(const char *name);
27
28		status_t		Save(const char *path,int32 saveflags=0);
29		status_t		Load(const char *path);
30		status_t		AddCursor(BCursorID which,const BBitmap *cursor, const BPoint &hotspot);
31		status_t		AddCursor(BCursorID which, uint8 *data);
32		void			RemoveCursor(BCursorID which);
33		status_t		FindCursor(BCursorID which, BBitmap **cursor, BPoint *hotspot);
34		status_t		FindCursor(BCursorID which, ServerCursor **cursor) const;
35		void			SetName(const char *name);
36		const char		*GetName();
37
38	private:
39		const char *_CursorWhichToString(BCursorID which) const;
40		BBitmap *_CursorDataToBitmap(uint8 *data);
41};
42
43#endif	// CURSOR_SET_H
44