2213782534
* 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
73 lines
2.5 KiB
C++
73 lines
2.5 KiB
C++
//------------------------------------------------------------------------------
|
|
// 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"),
|
|
// to deal in the Software without restriction, including without limitation
|
|
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
// and/or sell copies of the Software, and to permit persons to whom the
|
|
// Software is furnished to do so, subject to the following conditions:
|
|
//
|
|
// The above copyright notice and this permission notice shall be included in
|
|
// all copies or substantial portions of the Software.
|
|
//
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
// DEALINGS IN THE SOFTWARE.
|
|
//
|
|
// File Name: CursorSet.h
|
|
// Author: DarkWyrm <bpmagic@columbus.rr.com>
|
|
// Description: Private file encapsulating of the Haiku system cursor API
|
|
//
|
|
//------------------------------------------------------------------------------
|
|
#ifndef CURSORSET_H_
|
|
#define CURSORSET_H_
|
|
|
|
#include <Bitmap.h>
|
|
#include <Cursor.h>
|
|
#include <Message.h>
|
|
|
|
typedef enum
|
|
{
|
|
B_CURSOR_DEFAULT=0,
|
|
B_CURSOR_TEXT,
|
|
B_CURSOR_MOVE,
|
|
B_CURSOR_DRAG,
|
|
B_CURSOR_RESIZE,
|
|
B_CURSOR_RESIZE_NWSE,
|
|
B_CURSOR_RESIZE_NESW,
|
|
B_CURSOR_RESIZE_NS,
|
|
B_CURSOR_RESIZE_EW,
|
|
B_CURSOR_OTHER,
|
|
B_CURSOR_APP,
|
|
B_CURSOR_INVALID
|
|
} cursor_which;
|
|
|
|
class ServerCursor;
|
|
|
|
const char *CursorWhichToString(cursor_which which);
|
|
BBitmap *CursorDataToBitmap(int8 *data);
|
|
|
|
/*!
|
|
\brief Class to manage system cursor sets
|
|
*/
|
|
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);
|
|
};
|
|
|
|
#endif
|