Lines Matching refs:cursor

10 /*!	Handles the system's cursor infrastructure */
101 ServerCursor* cursor = ((ServerCursor*)fCursorList.ItemAtFast(i));
102 cursor->fManager = NULL;
103 cursor->ReleaseReference();
114 ServerCursorReference cursor(_FindCursor(clientTeam, cursorData), false);
116 if (!cursor) {
117 cursor.SetTo(new (std::nothrow) ServerCursor(cursorData), true);
118 if (cursor) {
119 cursor->SetOwningTeam(clientTeam);
120 if (AddCursor(cursor) < B_OK)
121 cursor = NULL;
127 return cursor.Detach();
138 ServerCursor* cursor = new (std::nothrow) ServerCursor(r, format, flags,
140 if (cursor != NULL) {
141 cursor->SetOwningTeam(clientTeam);
142 if (AddCursor(cursor) < B_OK) {
143 delete cursor;
144 cursor = NULL;
150 return cursor;
154 /*! \brief Registers a cursor with the manager.
155 \param cursor ServerCursor object to register
156 \return The token assigned to the cursor or B_ERROR if cursor is NULL
159 CursorManager::AddCursor(ServerCursor* cursor, int32 token)
161 if (!cursor)
166 if (!fCursorList.AddItem(cursor)) {
172 token = fTokenSpace.NewToken(kCursorToken, cursor);
174 fTokenSpace.SetToken(token, kCursorToken, cursor);
176 cursor->fToken = token;
177 cursor->AttachedToManager(this);
185 /*! \brief Removes a cursor if it's not referenced anymore.
187 If this was the last reference to this cursor, it will be deleted.
188 Only if the cursor is deleted, \c true is returned.
191 CursorManager::RemoveCursor(ServerCursor* cursor)
197 if (cursor->CountReferences() > 0) {
198 // cursor has been referenced again in the mean time
203 _RemoveCursor(cursor);
220 ServerCursor* cursor = (ServerCursor*)fCursorList.ItemAtFast(index);
221 if (cursor->OwningTeam() == team)
222 cursor->ReleaseReference();
230 \param path Path to the cursor set
233 cursor for a particular cursor specifier, it will remain unchanged.
287 /*! \brief Acquire the cursor which is used for a particular system cursor
288 \param which Which system cursor to get
289 \return Pointer to the particular cursor used or NULL if which is
290 invalid or the cursor has not been assigned
363 /*! \brief Internal function which finds the cursor with a particular ID
364 \param token ID of the cursor to find
365 \return The cursor or NULL if not found
373 ServerCursor* cursor;
374 if (fTokenSpace.GetToken(token, kCursorToken, (void**)&cursor) != B_OK)
375 cursor = NULL;
379 return cursor;
383 /*! \brief Initializes a predefined system cursor.
407 ServerCursor* cursor;
408 if (set.FindCursor(id, &cursor) == B_OK) {
413 items[index] = cursor;
416 cursorMember = cursor;
426 ServerCursor* cursor = (ServerCursor*)fCursorList.ItemAtFast(i);
427 if (cursor->OwningTeam() == clientTeam
428 && cursor->CursorData()
429 && memcmp(cursor->CursorData(), cursorData, 68) == 0) {
430 return cursor;
438 CursorManager::_RemoveCursor(ServerCursor* cursor)
440 fCursorList.RemoveItem(cursor);
441 fTokenSpace.RemoveToken(cursor->fToken);