All cursor related changes:

* Moved setting the default cursor from ServerScreen to Desktop
* Getting the default cursor is now done using the CursorManager
* Removed outdated setcursor from SysCursor.cpp (we have a new implementation by now)
* Renamed SysCursor.cpp to CursorSet.cpp as that's what it is
* Moved  headers/private/app/SysCursor.h to headers/private/servers/app/CursorSet.h
* Removed some unneeded header includes along the way

There remains {set|get}_syscursor now in CursorSet.cpp. Serverside for these are not implemented
and they are obvious hacks. Do we need to keep them?
Also this commit _would_ break Appearance, but 1) all the related code is currently commented out
with the comment "cursor set management belongs in another app" and 2) it is already broken
because of ColorSet.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13726 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz
2005-07-18 00:22:08 +00:00
parent a93b45f00f
commit 2213782534
10 changed files with 48 additions and 81 deletions
@@ -1,5 +1,5 @@
//------------------------------------------------------------------------------
// Copyright (c) 2001-2002, OpenBeOS
// Copyright (c) 2001-2005, Haiku
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
@@ -19,13 +19,13 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
//
// File Name: SysCursor.h
// File Name: CursorSet.h
// Author: DarkWyrm <[email protected]>
// Description: Private file encapsulating OBOS system cursor API
// Description: Private file encapsulating of the Haiku system cursor API
//
//------------------------------------------------------------------------------
#ifndef SYSCURSOR_H_
#define SYSCURSOR_H_
#ifndef CURSORSET_H_
#define CURSORSET_H_
#include <Bitmap.h>
#include <Cursor.h>
@@ -49,33 +49,24 @@ typedef enum
class ServerCursor;
void set_syscursor(cursor_which which, const BCursor *cursor);
void set_syscursor(cursor_which which, const BBitmap *bitmap);
cursor_which get_syscursor(void);
void setcursor(cursor_which which);
const char *CursorWhichToString(cursor_which which);
BBitmap *CursorDataToBitmap(int8 *data);
/*!
\brief Class to manage system cursor sets
*/
class CursorSet : public BMessage
{
class CursorSet : public BMessage {
public:
CursorSet(const char *name);
status_t Save(const char *path,int32 saveflags=0);
status_t Load(const char *path);
status_t AddCursor(cursor_which which,const BBitmap *cursor, const BPoint &hotspot);
status_t AddCursor(cursor_which which, int8 *data);
void RemoveCursor(cursor_which which);
status_t FindCursor(cursor_which which, BBitmap **cursor, BPoint *hotspot);
status_t FindCursor(cursor_which which, ServerCursor **cursor);
void SetName(const char *name);
const char *GetName(void);
CursorSet(const char *name);
status_t Save(const char *path,int32 saveflags=0);
status_t Load(const char *path);
status_t AddCursor(cursor_which which,const BBitmap *cursor, const BPoint &hotspot);
status_t AddCursor(cursor_which which, int8 *data);
void RemoveCursor(cursor_which which);
status_t FindCursor(cursor_which which, BBitmap **cursor, BPoint *hotspot);
status_t FindCursor(cursor_which which, ServerCursor **cursor);
void SetName(const char *name);
const char *GetName(void);
};
#endif