API tweaks

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4984 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
DarkWyrm
2003-10-10 02:33:38 +00:00
parent 9b2a55526a
commit 836656bf86
2 changed files with 16 additions and 3 deletions
+3 -2
View File
@@ -42,8 +42,8 @@ typedef enum
B_CURSOR_RESIZE_NESW, B_CURSOR_RESIZE_NESW,
B_CURSOR_RESIZE_NS, B_CURSOR_RESIZE_NS,
B_CURSOR_RESIZE_EW, B_CURSOR_RESIZE_EW,
B_CURSOR_APP,
B_CURSOR_OTHER, B_CURSOR_OTHER,
B_CURSOR_APP,
B_CURSOR_INVALID B_CURSOR_INVALID
} cursor_which; } cursor_which;
@@ -73,7 +73,8 @@ public:
void RemoveCursor(cursor_which which); void RemoveCursor(cursor_which which);
status_t FindCursor(cursor_which which, BBitmap **cursor, BPoint *hotspot); status_t FindCursor(cursor_which which, BBitmap **cursor, BPoint *hotspot);
status_t FindCursor(cursor_which which, ServerCursor **cursor); status_t FindCursor(cursor_which which, ServerCursor **cursor);
void Rename(const char *name); void SetName(const char *name);
const char *GetName(void);
}; };
+13 -1
View File
@@ -339,13 +339,25 @@ status_t CursorSet::FindCursor(cursor_which which, ServerCursor **cursor)
return B_ERROR; return B_ERROR;
} }
/*!
\brief Returns the name of the set
\return The name of the set
*/
const char *CursorSet::GetName(void)
{
BString name;
if(FindString("name",&name)==B_OK)
return name.String();
return NULL;
}
/*! /*!
\brief Renames the cursor set \brief Renames the cursor set
\param name new name of the set. \param name new name of the set.
This function will fail if given a NULL name This function will fail if given a NULL name
*/ */
void CursorSet::Rename(const char *name) void CursorSet::SetName(const char *name)
{ {
if(!name) if(!name)
return; return;