Files
haiku-beta6/headers/private/servers/app/ServerCursor.h
T

73 lines
2.7 KiB
C++
Raw Normal View History

2003-01-12 22:51:01 +00:00
//------------------------------------------------------------------------------
2004-09-20 22:46:37 +00:00
// Copyright (c) 2001-2002, Haiku, Inc.
2003-01-12 22:51:01 +00:00
//
// 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: ServerCursor.h
// Author: DarkWyrm <[email protected]>
// Description: Glorified ServerBitmap used for cursor work.
//
//------------------------------------------------------------------------------
#ifndef SERVERCURSOR_H_
#define SERVERCURSOR_H_
#include <Point.h>
2003-10-05 22:10:35 +00:00
#include <String.h>
2003-01-12 22:51:01 +00:00
#include "ServerBitmap.h"
class ServerApp;
2003-01-23 01:20:28 +00:00
class CursorManager;
2003-01-18 20:32:45 +00:00
/*!
\class ServerCursor ServerCursor.h
\brief Class to handle all cursor capabilities for the system
Although descended from ServerBitmaps, ServerCursors are not handled by
the BitmapManager - they are allocated like any other object. Unlike BeOS
R5, cursors can be any size or color space, and this class accomodates and
expands the R5 API.
*/
2003-01-12 22:51:01 +00:00
class ServerCursor : public ServerBitmap
{
public:
ServerCursor(BRect r, color_space cspace, int32 flags, BPoint hotspot, int32 bytesperrow=-1, screen_id screen=B_MAIN_SCREEN_ID);
ServerCursor(int8 *data);
ServerCursor(const ServerCursor *cursor);
~ServerCursor(void);
//! Returns the cursor's hot spot
2004-09-20 22:46:37 +00:00
BPoint GetHotSpot(void) { return fHotSpot; }
2003-01-12 22:51:01 +00:00
void SetHotSpot(BPoint pt);
2004-09-20 22:46:37 +00:00
const char *GetAppSignature(void) { return fAppSignature.String(); }
2003-02-24 15:47:06 +00:00
void SetAppSignature(const char *signature);
void SetOwningTeam(team_id tid) { fOwningTeam=tid; }
team_id OwningTeam(void) const { return fOwningTeam; }
2003-02-24 15:47:06 +00:00
//! Returns the cursor's ID
2004-09-20 22:46:37 +00:00
int32 ID(void) { return fToken; }
2003-01-12 22:51:01 +00:00
private:
2003-06-23 02:54:52 +00:00
friend class CursorManager;
2003-01-23 01:20:28 +00:00
2004-09-20 22:46:37 +00:00
BPoint fHotSpot;
team_id fOwningTeam;
2004-09-20 22:46:37 +00:00
BString fAppSignature;
2003-01-12 22:51:01 +00:00
};
#endif