xref: /haiku/src/servers/app/CursorSet.h (revision 1d9d47fc72028bb71b5f232a877231e59cfe2438)
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 
18 class ServerCursor;
19 
20 
21 /*!
22 	\brief Class to manage system cursor sets
23 */
24 class 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(cursor_which which,const BBitmap *cursor, const BPoint &hotspot);
31 		status_t		AddCursor(cursor_which which, uint8 *data);
32 		void			RemoveCursor(cursor_which which);
33 		status_t		FindCursor(cursor_which which, BBitmap **cursor, BPoint *hotspot);
34 		status_t		FindCursor(cursor_which which, ServerCursor **cursor);
35 		void			SetName(const char *name);
36 		const char		*GetName(void);
37 
38 	private:
39 		const char *_CursorWhichToString(cursor_which which);
40 		BBitmap *_CursorDataToBitmap(uint8 *data);
41 };
42 
43 #endif	// CURSOR_SET_H
44