haiku/headers/os/app/Cursor.h
Axel Dörfler aa1f543799 Some work on cursors:
* Fixed a myriad of bugs all over the place, ranging from locking errors to
  deleting objects that don't belong to the one deleting them (hello HWInterface!)
* Almost all ServerWindow cursor stuff was broken; I've replaced all commands
  to set a cursor with a single one AS_SET_CURSOR.
* Renamed some cursor commands.
* Changed the (broken) way ServerApp::fAppCursor was maintained - the application
  cursor is now NULL as long as possible.
* Removed superfluous ServerCursor app signature stuff.
* The BApplication will no longer duplicate the default/I-beam cursors, it will
  just reuse the default ones which now have fixed tokens.
* As a result, changing the cursor is now working as expected, closing bug #102.
* Rewrote Cursor.h, renamed private members to match our style guide.
* Minor cleanup.

What's still left to be done is reference counting the cursor objects to make them
work right and reliable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16237 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-05 18:14:14 +00:00

41 lines
823 B
C++

/*
* Copyright 2006, Haiku, Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/
#ifndef _CURSOR_H
#define _CURSOR_H
#include <Archivable.h>
#include <InterfaceDefs.h>
class BCursor : BArchivable {
public:
BCursor(const void* cursorData);
BCursor(BMessage* data);
virtual ~BCursor();
virtual status_t Archive(BMessage* archive, bool deep = true) const;
static BArchivable* Instantiate(BMessage* archive);
private:
virtual status_t Perform(perform_code d, void* arg);
virtual void _ReservedCursor1();
virtual void _ReservedCursor2();
virtual void _ReservedCursor3();
virtual void _ReservedCursor4();
private:
friend class BApplication;
friend class BView;
int32 fServerToken;
bool fNeedToFree;
uint32 _reserved[6];
};
#endif // _CURSOR_H