Removed {set|get}_syscursor according to DW. Scratch that last sentence in the last commit, with this Appearance builds again.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13727 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz
2005-07-18 00:35:18 +00:00
parent 2213782534
commit a83bffa77a
2 changed files with 1 additions and 75 deletions
+1 -1
View File
@@ -40,7 +40,7 @@
#include <MenuItem.h>
#include <StringView.h>
#include <Invoker.h>
#include <SysCursor.h>
#include <CursorSet.h>
#include <Bitmap.h>
#include <Box.h>
#include <Invoker.h>
-74
View File
@@ -33,80 +33,6 @@
#include "CursorSet.h"
#include "ServerCursor.h"
/*!
\brief Sets a system cursor
\param which System cursor specifier defined in CursorSet.h
\param cursor The new cursor
*/
void
set_syscursor(cursor_which which, const BCursor *cursor)
{
port_id server = find_port(SERVER_PORT_NAME);
if (server < B_OK)
return;
BPrivate::PortLink link(server);
link.StartMessage(AS_SET_SYSCURSOR_BCURSOR);
link.Attach<cursor_which>(which);
// The easy (and clean) way for us to access the cursor's token
// would be to make it a friend function of the BCursor class. One problem:
// we couldn't build this under R5. For R1, we'll use a hack which we can
// get away with because it has to be binary compatible.
int32 *hack=(int32*)cursor;
link.Attach<int32>(hack[0]);
// link.Attach<int32>(cursor->m_serverToken);
link.Flush();
}
/*!
\brief Sets a system cursor
\param which System cursor specifier defined in CursorSet.h
\param bitmap BBitmap to represent the new cursor. Size should be 48x48 or less.
*/
void
set_syscursor(cursor_which which, const BBitmap *bitmap)
{
port_id server = find_port(SERVER_PORT_NAME);
if (server < B_OK)
return;
BPrivate::PortLink link(server);
link.StartMessage(AS_SET_SYSCURSOR_BBITMAP);
link.Attach<cursor_which>(which);
// Just like the BCursor version, we will use a hack until R1.
int32 *hack=(int32*)bitmap;
hack+=(sizeof(int32)*4)+sizeof(color_space)+sizeof(BRect);
link.Attach<int32>(hack[0]);
link.Flush();
}
/*!
\brief Returns the cursor specifier currently shown
\return Returns B_CURSOR_OTHER if an application-set cursor. Otherwise, see CursorSet.h
*/
cursor_which
get_syscursor(void)
{
port_id server = find_port(SERVER_PORT_NAME);
if (server >= B_OK) {
int32 code = SERVER_FALSE;
BPrivate::PortLink link(server);
cursor_which which;
link.StartMessage(AS_GET_SYSCURSOR);
link.FlushWithReply(code);
if (code == SERVER_TRUE
&& link.Read<cursor_which>(&which) == B_OK)
return which;
}
return B_CURSOR_INVALID;
}
/*!
\brief Constructor