Implemented BPrivateScreen::SetMode()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12522 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -24,8 +24,8 @@
|
|||||||
// Description: BPrivateScreen is the class which does the real work
|
// Description: BPrivateScreen is the class which does the real work
|
||||||
// for the proxy class BScreen (it interacts with the app server).
|
// for the proxy class BScreen (it interacts with the app server).
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
#include <Window.h>
|
#include <Window.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include "AppServerLink.h"
|
#include "AppServerLink.h"
|
||||||
@@ -263,6 +263,9 @@ BPrivateScreen::GetModeList(display_mode **mode_list, uint32 *count)
|
|||||||
status_t
|
status_t
|
||||||
BPrivateScreen::GetMode(uint32 workspace, display_mode *mode)
|
BPrivateScreen::GetMode(uint32 workspace, display_mode *mode)
|
||||||
{
|
{
|
||||||
|
if (mode == NULL)
|
||||||
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
BAppServerLink link;
|
BAppServerLink link;
|
||||||
link.StartMessage(AS_SCREEN_GET_MODE);
|
link.StartMessage(AS_SCREEN_GET_MODE);
|
||||||
link.Attach<screen_id>(ID());
|
link.Attach<screen_id>(ID());
|
||||||
@@ -289,18 +292,23 @@ BPrivateScreen::GetMode(uint32 workspace, display_mode *mode)
|
|||||||
status_t
|
status_t
|
||||||
BPrivateScreen::SetMode(uint32 workspace, display_mode *mode, bool makeDefault)
|
BPrivateScreen::SetMode(uint32 workspace, display_mode *mode, bool makeDefault)
|
||||||
{
|
{
|
||||||
// TODO: Implement
|
if (mode == NULL)
|
||||||
status_t status = B_ERROR;
|
return B_BAD_VALUE;
|
||||||
/*
|
|
||||||
BAppServerLink link;
|
BAppServerLink link;
|
||||||
PortMessage reply;
|
link.StartMessage(AS_SCREEN_SET_MODE);
|
||||||
link.SetOpCode(AS_SET_MODE);
|
link.Attach<screen_id>(ID());
|
||||||
link.Attach<uint32>(workspace);
|
link.Attach<uint32>(workspace);
|
||||||
link.Attach<display_mode>(*mode);
|
link.Attach<display_mode>(*mode);
|
||||||
link.Attach<bool>(makeDefault);
|
link.Attach<bool>(makeDefault);
|
||||||
link.FlushWithReply(&reply);
|
|
||||||
reply.Read<status_t>(&status);
|
int32 code = SERVER_FALSE;
|
||||||
*/
|
link.FlushWithReply(&code);
|
||||||
|
|
||||||
|
status_t status = B_ERROR;
|
||||||
|
if (code == SERVER_TRUE)
|
||||||
|
link.Read<status_t>(&status);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user