2005-11-14 22:46:20 +03:00
|
|
|
/*
|
2006-02-05 21:14:14 +03:00
|
|
|
* Copyright 2001-2006, Haiku.
|
2005-11-14 22:46:20 +03:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* DarkWyrm <bpmagic@columbus.rr.com>
|
|
|
|
*/
|
|
|
|
#ifndef CURSOR_MANAGER_H
|
|
|
|
#define CURSOR_MANAGER_H
|
|
|
|
|
2003-01-23 17:25:16 +03:00
|
|
|
|
|
|
|
#include <List.h>
|
2003-07-24 23:38:24 +04:00
|
|
|
#include <Locker.h>
|
2005-11-14 22:46:20 +03:00
|
|
|
|
|
|
|
#include <TokenSpace.h>
|
|
|
|
|
2005-07-18 04:22:08 +04:00
|
|
|
#include "CursorSet.h"
|
2003-01-23 17:25:16 +03:00
|
|
|
|
2005-11-14 22:46:20 +03:00
|
|
|
using BPrivate::BTokenSpace;
|
2003-01-23 17:25:16 +03:00
|
|
|
class ServerCursor;
|
|
|
|
|
2005-11-14 22:46:20 +03:00
|
|
|
|
2003-01-23 17:25:16 +03:00
|
|
|
/*!
|
|
|
|
\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.
|
|
|
|
*/
|
2005-07-12 21:41:22 +04:00
|
|
|
class CursorManager : public BLocker {
|
2005-11-14 22:46:20 +03:00
|
|
|
public:
|
2005-07-12 21:41:22 +04:00
|
|
|
CursorManager();
|
2005-11-14 22:46:20 +03:00
|
|
|
virtual ~CursorManager();
|
|
|
|
|
2006-02-05 21:14:14 +03:00
|
|
|
int32 AddCursor(ServerCursor* cursor, int32 token = -1);
|
2005-07-12 21:41:22 +04:00
|
|
|
void DeleteCursor(int32 token);
|
2006-02-05 21:14:14 +03:00
|
|
|
void DeleteCursors(team_id team);
|
2005-11-14 22:46:20 +03:00
|
|
|
|
|
|
|
void SetCursorSet(const char* path);
|
|
|
|
ServerCursor* GetCursor(cursor_which which);
|
2005-07-18 01:26:28 +04:00
|
|
|
cursor_which GetCursorWhich();
|
2005-07-12 21:41:22 +04:00
|
|
|
void ChangeCursor(cursor_which which, int32 token);
|
2005-07-18 01:26:28 +04:00
|
|
|
void SetDefaults();
|
2005-11-14 22:46:20 +03:00
|
|
|
ServerCursor* FindCursor(int32 token);
|
2003-01-23 17:25:16 +03:00
|
|
|
|
2005-11-14 22:46:20 +03:00
|
|
|
private:
|
2006-02-05 21:14:14 +03:00
|
|
|
ServerCursor* _RemoveCursor(int32 index);
|
|
|
|
|
2005-07-12 21:41:22 +04:00
|
|
|
BList fCursorList;
|
2005-11-14 22:46:20 +03:00
|
|
|
BTokenSpace fTokenSpace;
|
2003-01-23 17:25:16 +03:00
|
|
|
|
2005-07-12 21:41:22 +04:00
|
|
|
// System cursor members
|
|
|
|
ServerCursor *fDefaultCursor,
|
|
|
|
*fTextCursor,
|
|
|
|
*fMoveCursor,
|
|
|
|
*fDragCursor,
|
|
|
|
*fResizeCursor,
|
|
|
|
*fNWSECursor,
|
|
|
|
*fNESWCursor,
|
|
|
|
*fNSCursor,
|
|
|
|
*fEWCursor;
|
|
|
|
cursor_which fCurrentWhich;
|
2003-01-23 17:25:16 +03:00
|
|
|
};
|
|
|
|
|
2005-11-14 22:46:20 +03:00
|
|
|
#endif /* CURSOR_MANAGER_H */
|