haiku/headers/os/app/Cursor.h
Stephan Aßmus 19e179ca4f * Moved the implementation of SetViewCursor from the thread of the
window of the view into the application thread. This solves the
  race condition with asynchronous SetViewCursor and deleting the
  cursor immediately afterwards for real.
* The ServerApp now requires a reference to the current cursor,
  just in case...
* Added TODOs for caching the BView token, it's currently resolved
  for every single BView call that talks to the server... not good!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31133 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-20 12:11:49 +00:00

51 lines
1.1 KiB
C++

/*
* Copyright 2006-2009, 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(const BCursor& other);
BCursor(BMessage* data);
virtual ~BCursor();
virtual status_t Archive(BMessage* archive,
bool deep = true) const;
static BArchivable* Instantiate(BMessage* archive);
BCursor& operator=(const BCursor& other);
bool operator==(const BCursor& other) const;
bool operator!=(const BCursor& other) const;
private:
virtual status_t Perform(perform_code d, void* arg);
virtual void _ReservedCursor1();
virtual void _ReservedCursor2();
virtual void _ReservedCursor3();
virtual void _ReservedCursor4();
void _FreeCursorData();
private:
friend class BApplication;
friend class BView;
int32 fServerToken;
bool fNeedToFree;
bool _reservedWasPendingViewCursor;
// Probably bogus because of padding.
uint32 _reserved[6];
};
#endif // _CURSOR_H