haiku/src/servers/app/CursorManager.h
Axel Dörfler be05d56c7e * the app_server now uses a global token space - this should later be changed to
have different token spaces depending on the scope of its objects.
* removed TokenHandler - we're now using BTokenSpace instead.
* removed unused IPoint.cpp - if we ever need it again, it can still easily be
  resurrected from the dead.
* some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14925 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-14 19:46:20 +00:00

65 lines
1.4 KiB
C++

/*
* Copyright 2001-2005, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* DarkWyrm <bpmagic@columbus.rr.com>
*/
#ifndef CURSOR_MANAGER_H
#define CURSOR_MANAGER_H
#include <List.h>
#include <Locker.h>
#include <TokenSpace.h>
#include "CursorSet.h"
using BPrivate::BTokenSpace;
class ServerCursor;
/*!
\class CursorManager CursorManager.h
\brief Handles almost all cursor management functions for the system
The Cursor manager provides system cursor support, previous unseen on
any BeOS platform. It also provides tokens for BCursors and frees all
of an application's cursors whenever an application closes.
*/
class CursorManager : public BLocker {
public:
CursorManager();
virtual ~CursorManager();
int32 AddCursor(ServerCursor* cursor);
void DeleteCursor(int32 token);
void RemoveAppCursors(team_id team);
void SetCursorSet(const char* path);
ServerCursor* GetCursor(cursor_which which);
cursor_which GetCursorWhich();
void ChangeCursor(cursor_which which, int32 token);
void SetDefaults();
ServerCursor* FindCursor(int32 token);
private:
BList fCursorList;
BTokenSpace fTokenSpace;
// System cursor members
ServerCursor *fDefaultCursor,
*fTextCursor,
*fMoveCursor,
*fDragCursor,
*fResizeCursor,
*fNWSECursor,
*fNESWCursor,
*fNSCursor,
*fEWCursor;
cursor_which fCurrentWhich;
};
#endif /* CURSOR_MANAGER_H */