2 * Copyright 2001-2010, Haiku.
3 * Distributed under the terms of the MIT License.
6 * DarkWyrm <bpmagic@columbus.rr.com>
8 #ifndef CURSOR_MANAGER_H
9 #define CURSOR_MANAGER_H
15 #include <TokenSpace.h>
17 #include "CursorSet.h"
19 using BPrivate::BTokenSpace
;
24 \class CursorManager CursorManager.h
25 \brief Handles almost all cursor management functions for the system
27 The Cursor manager provides system cursor support, previous unseen on
28 any BeOS platform. It also provides tokens for BCursors and frees all
29 of an application's cursors whenever an application closes.
31 class CursorManager
: public BLocker
{
36 ServerCursor
* CreateCursor(team_id clientTeam
,
37 const uint8
* cursorData
);
39 int32
AddCursor(ServerCursor
* cursor
,
41 void DeleteCursors(team_id team
);
43 bool RemoveCursor(ServerCursor
* cursor
);
45 void SetCursorSet(const char* path
);
46 ServerCursor
* GetCursor(BCursorID which
);
48 ServerCursor
* FindCursor(int32 token
);
51 void _InitCursor(ServerCursor
*& cursorMember
,
52 const uint8
* cursorBits
, BCursorID id
,
53 const BPoint
& hotSpot
= B_ORIGIN
);
54 void _LoadCursor(ServerCursor
*& cursorMember
,
55 const CursorSet
& set
, BCursorID id
);
56 ServerCursor
* _FindCursor(team_id cientTeam
,
57 const uint8
* cursorData
);
58 void _RemoveCursor(ServerCursor
* cursor
);
62 BTokenSpace fTokenSpace
;
64 // System cursor members
65 ServerCursor
* fCursorSystemDefault
;
67 ServerCursor
* fCursorContextMenu
;
68 ServerCursor
* fCursorCopy
;
69 ServerCursor
* fCursorCreateLink
;
70 ServerCursor
* fCursorCrossHair
;
71 ServerCursor
* fCursorFollowLink
;
72 ServerCursor
* fCursorGrab
;
73 ServerCursor
* fCursorGrabbing
;
74 ServerCursor
* fCursorHelp
;
75 ServerCursor
* fCursorIBeam
;
76 ServerCursor
* fCursorIBeamHorizontal
;
77 ServerCursor
* fCursorMove
;
78 ServerCursor
* fCursorNoCursor
;
79 ServerCursor
* fCursorNotAllowed
;
80 ServerCursor
* fCursorProgress
;
81 ServerCursor
* fCursorResizeEast
;
82 ServerCursor
* fCursorResizeEastWest
;
83 ServerCursor
* fCursorResizeNorth
;
84 ServerCursor
* fCursorResizeNorthEast
;
85 ServerCursor
* fCursorResizeNorthEastSouthWest
;
86 ServerCursor
* fCursorResizeNorthSouth
;
87 ServerCursor
* fCursorResizeNorthWest
;
88 ServerCursor
* fCursorResizeNorthWestSouthEast
;
89 ServerCursor
* fCursorResizeSouth
;
90 ServerCursor
* fCursorResizeSouthEast
;
91 ServerCursor
* fCursorResizeSouthWest
;
92 ServerCursor
* fCursorResizeWest
;
93 ServerCursor
* fCursorZoomIn
;
94 ServerCursor
* fCursorZoomOut
;
97 #endif // CURSOR_MANAGER_H