Re-enabled private SysCursor API and fixed build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12753 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -13,7 +13,7 @@ Preference Appearance :
|
|||||||
FontMenu.cpp
|
FontMenu.cpp
|
||||||
MenuView.cpp
|
MenuView.cpp
|
||||||
PreviewDriver.cpp
|
PreviewDriver.cpp
|
||||||
# SysCursorAPI.cpp
|
SysCursorAPI.cpp
|
||||||
ColorWell.cpp
|
ColorWell.cpp
|
||||||
ColorWhichItem.cpp
|
ColorWhichItem.cpp
|
||||||
CursorWhichItem.cpp
|
CursorWhichItem.cpp
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
#include <PortLink.h>
|
#include <PortLink.h>
|
||||||
#include <PortMessage.h>
|
|
||||||
#include <ServerProtocol.h>
|
#include <ServerProtocol.h>
|
||||||
#include <OS.h>
|
#include <OS.h>
|
||||||
#include "SysCursorAPI.h"
|
#include "SysCursorAPI.h"
|
||||||
|
|
||||||
// TODO: tweak the BBitmap and BCursor headers
|
// TODO R2: tweak the BBitmap and BCursor headers
|
||||||
|
|
||||||
void set_syscursor(cursor_which which, const BCursor *cursor)
|
void set_syscursor(cursor_which which, const BCursor *cursor)
|
||||||
{
|
{
|
||||||
@@ -39,15 +38,18 @@ cursor_which get_syscursor(void)
|
|||||||
port_id server=find_port(SERVER_PORT_NAME);
|
port_id server=find_port(SERVER_PORT_NAME);
|
||||||
if(server!=B_NAME_NOT_FOUND)
|
if(server!=B_NAME_NOT_FOUND)
|
||||||
{
|
{
|
||||||
PortMessage pmsg;
|
int32 code;
|
||||||
|
BPortLink link(server);
|
||||||
|
|
||||||
PortLink link(server);
|
link.StartMessage(AS_GET_SYSCURSOR);
|
||||||
link.SetOpCode(AS_GET_SYSCURSOR);
|
link.GetNextReply(&code);
|
||||||
link.FlushWithReply(&pmsg);
|
|
||||||
|
|
||||||
cursor_which which;
|
if(code==SERVER_TRUE)
|
||||||
pmsg.Read<cursor_which>(&which);
|
{
|
||||||
return which;
|
cursor_which which;
|
||||||
|
link.Read<cursor_which>(&which);
|
||||||
|
return which;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return B_CURSOR_INVALID;
|
return B_CURSOR_INVALID;
|
||||||
}
|
}
|
||||||
@@ -57,8 +59,8 @@ void setcursor(cursor_which which)
|
|||||||
port_id server=find_port(SERVER_PORT_NAME);
|
port_id server=find_port(SERVER_PORT_NAME);
|
||||||
if(server!=B_NAME_NOT_FOUND)
|
if(server!=B_NAME_NOT_FOUND)
|
||||||
{
|
{
|
||||||
PortLink link(server);
|
BPortLink link(server);
|
||||||
link.SetOpCode(AS_SET_CURSOR_SYSTEM);
|
link.StartMessage(AS_SET_CURSOR_SYSTEM);
|
||||||
link.Flush();
|
link.Flush();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user