xref: /haiku/headers/os/app/Cursor.h (revision 16d5c24e533eb14b7b8a99ee9f3ec9ba66335b1e)
1 /*
2  * Copyright 2006-2009, Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _CURSOR_H
6 #define _CURSOR_H
7 
8 
9 #include <Archivable.h>
10 #include <InterfaceDefs.h>
11 
12 
13 class BCursor : BArchivable {
14 public:
15 								BCursor(const void* cursorData);
16 								BCursor(const BCursor& other);
17 								BCursor(BMessage* data);
18 	virtual	~BCursor();
19 
20 	virtual	status_t			Archive(BMessage* archive,
21 									bool deep = true) const;
22 	static	BArchivable*		Instantiate(BMessage* archive);
23 
24 			BCursor&			operator=(const BCursor& other);
25 			bool				operator==(const BCursor& other) const;
26 			bool				operator!=(const BCursor& other) const;
27 
28 private:
29 	virtual	status_t			Perform(perform_code d, void* arg);
30 
31 	virtual	void				_ReservedCursor1();
32 	virtual	void				_ReservedCursor2();
33 	virtual	void				_ReservedCursor3();
34 	virtual	void				_ReservedCursor4();
35 
36 			void				_FreeCursorData();
37 
38 private:
39 	friend class BApplication;
40 	friend class BView;
41 
42 			int32				fServerToken;
43 			bool				fNeedToFree;
44 
45 			bool				_reservedWasPendingViewCursor;
46 				// Probably bogus because of padding.
47 			uint32				_reserved[6];
48 };
49 
50 #endif	// _CURSOR_H
51