A working SetFullscreen() implementation, courthesy of Caz. Added a comment. Enlarged the license section.
More to come. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7051 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,12 +1,18 @@
|
|||||||
// Copyright 2003 Stefano Ceccherini ([email protected])
|
/*
|
||||||
|
* Copyright 2003-2004,
|
||||||
|
* Stefano Ceccherini ([email protected]).
|
||||||
|
* Carwyn Jones ([email protected])
|
||||||
|
* All rights reserved.
|
||||||
|
* Distributed under the terms of the MIT License.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <DirectWindow.h>
|
#include <DirectWindow.h>
|
||||||
|
|
||||||
#include <clipping.h>
|
#include <clipping.h>
|
||||||
|
|
||||||
#include <R5_AppServerLink.h>
|
#include <R5_AppServerLink.h>
|
||||||
#include <R5_Session.h>
|
#include <R5_Session.h>
|
||||||
|
|
||||||
|
|
||||||
// TODO: We'll want to move this to a private header,
|
// TODO: We'll want to move this to a private header,
|
||||||
// accessible by the app server.
|
// accessible by the app server.
|
||||||
struct dw_sync_data
|
struct dw_sync_data
|
||||||
@@ -20,6 +26,7 @@ struct dw_sync_data
|
|||||||
// TODO: This commands are used by the BeOS R5 app_server.
|
// TODO: This commands are used by the BeOS R5 app_server.
|
||||||
// Change this when our app_server supports BDirectWindow
|
// Change this when our app_server supports BDirectWindow
|
||||||
#define DW_GET_SYNC_DATA 0x880
|
#define DW_GET_SYNC_DATA 0x880
|
||||||
|
#define DW_SET_FULLSCREEN 0x881
|
||||||
#define DW_SUPPORTS_WINDOW_MODE 0xF2C
|
#define DW_SUPPORTS_WINDOW_MODE 0xF2C
|
||||||
|
|
||||||
|
|
||||||
@@ -274,7 +281,16 @@ status_t
|
|||||||
BDirectWindow::SetFullScreen(bool enable)
|
BDirectWindow::SetFullScreen(bool enable)
|
||||||
{
|
{
|
||||||
status_t status = B_ERROR;
|
status_t status = B_ERROR;
|
||||||
//TODO: Implement
|
if (Lock()) {
|
||||||
|
a_session->swrite_l(DW_SET_FULLSCREEN);
|
||||||
|
a_session->swrite_l(server_token);
|
||||||
|
a_session->swrite_l(enable);
|
||||||
|
Flush();
|
||||||
|
|
||||||
|
// TODO: read back status from the app server,
|
||||||
|
// and set the full_screen_enable variable accordingly
|
||||||
|
Unlock();
|
||||||
|
}
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -398,7 +414,7 @@ BDirectWindow::InitData()
|
|||||||
a_session->sread(sizeof(sync_data), &sync_data);
|
a_session->sread(sizeof(sync_data), &sync_data);
|
||||||
|
|
||||||
status_t status;
|
status_t status;
|
||||||
a_session->sread(4, &status);
|
a_session->sread(sizeof(status), &status);
|
||||||
|
|
||||||
Unlock();
|
Unlock();
|
||||||
|
|
||||||
@@ -472,7 +488,12 @@ BDirectWindow::DisposeData()
|
|||||||
status_t
|
status_t
|
||||||
BDirectWindow::DriverSetup() const
|
BDirectWindow::DriverSetup() const
|
||||||
{
|
{
|
||||||
//Unimplemented
|
// XXX :Unimplemented in R5.
|
||||||
|
// This function is probably here because they wanted, in a future time,
|
||||||
|
// to implement graphic acceleration within BDirectWindow
|
||||||
|
// (in fact, there is also a BDirectDriver member in BDirectWindow,
|
||||||
|
// though it's not used, and the Lock/UnlockDirect functions are not used either).
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user