Fixed cursor bug; made some cursor handlers temporaly unavailable. :-D - this is part of moving PollerThread into RootLayer class.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10852 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adi Oanca
2005-01-18 22:23:34 +00:00
parent 0aa393f411
commit e32785759f
8 changed files with 64 additions and 130 deletions
-117
View File
@@ -24,8 +24,6 @@
// Description: Handles the system's cursor infrastructure
//
//------------------------------------------------------------------------------
#include "DisplayDriver.h"
#include "Desktop.h"
#include "CursorManager.h"
#include "ServerCursor.h"
#include "CursorData.h"
@@ -175,121 +173,6 @@ void CursorManager::RemoveAppCursors(team_id team)
Unlock();
}
//! Wrapper around the DisplayDriver ShowCursor call
void CursorManager::ShowCursor(void)
{
Lock();
DisplayDriver *driver = desktop->ActiveScreen()->DDriver();
driver->ShowCursor();
Unlock();
}
//! Wrapper around the DisplayDriver HideCursor call
void CursorManager::HideCursor(void)
{
Lock();
DisplayDriver *driver = desktop->ActiveScreen()->DDriver();
driver->HideCursor();
Unlock();
}
//! Wrapper around the DisplayDriver ObscureCursor call
void CursorManager::ObscureCursor(void)
{
Lock();
DisplayDriver *driver = desktop->ActiveScreen()->DDriver();
driver->ObscureCursor();
Unlock();
}
/*!
\brief Set the screen's cursor
\param token ID of the screen's new cursor
*/
void CursorManager::SetCursor(int32 token)
{
Lock();
ServerCursor *c=FindCursor(token);
if(c)
{
DisplayDriver *driver = desktop->ActiveScreen()->DDriver();
driver->SetCursor(c);
fCurrentWhich=B_CURSOR_OTHER;
}
Unlock();
}
void CursorManager::SetCursor(cursor_which which)
{
Lock();
DisplayDriver *driver = desktop->ActiveScreen()->DDriver();
switch(which)
{
case B_CURSOR_DEFAULT:
{
driver->SetCursor(fDefaultCursor);
fCurrentWhich=which;
break;
}
case B_CURSOR_TEXT:
{
driver->SetCursor(fTextCursor);
fCurrentWhich=which;
break;
}
case B_CURSOR_MOVE:
{
driver->SetCursor(fMoveCursor);
fCurrentWhich=which;
break;
}
case B_CURSOR_DRAG:
{
driver->SetCursor(fDragCursor);
fCurrentWhich=which;
break;
}
case B_CURSOR_RESIZE:
{
driver->SetCursor(fResizeCursor);
fCurrentWhich=which;
break;
}
case B_CURSOR_RESIZE_NWSE:
{
driver->SetCursor(fNWSECursor);
fCurrentWhich=which;
break;
}
case B_CURSOR_RESIZE_NESW:
{
driver->SetCursor(fNESWCursor);
fCurrentWhich=which;
break;
}
case B_CURSOR_RESIZE_NS:
{
driver->SetCursor(fNSCursor);
fCurrentWhich=which;
break;
}
case B_CURSOR_RESIZE_EW:
{
driver->SetCursor(fEWCursor);
fCurrentWhich=which;
break;
}
default:
break;
}
Unlock();
}
/*!
\brief Sets all the cursors from a specified CursorSet
\param path Path to the cursor set