From a83bffa77aad8b116dc717eed25a4c2a403cb235 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Mon, 18 Jul 2005 00:35:18 +0000 Subject: [PATCH] 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 --- src/preferences/appearance/CurView.h | 2 +- src/servers/app/CursorSet.cpp | 74 ---------------------------- 2 files changed, 1 insertion(+), 75 deletions(-) diff --git a/src/preferences/appearance/CurView.h b/src/preferences/appearance/CurView.h index a1ae324d72..2e571efdc0 100644 --- a/src/preferences/appearance/CurView.h +++ b/src/preferences/appearance/CurView.h @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/servers/app/CursorSet.cpp b/src/servers/app/CursorSet.cpp index aec3b7ade7..3c63ee3c0e 100644 --- a/src/servers/app/CursorSet.cpp +++ b/src/servers/app/CursorSet.cpp @@ -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(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(hack[0]); -// link.Attach(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(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(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(&which) == B_OK) - return which; - } - return B_CURSOR_INVALID; -} - /*! \brief Constructor