Implemented GetBitmap() - only client side, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14904 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -24,15 +24,17 @@
|
|||||||
// 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 "AppServerLink.h"
|
||||||
|
#include "PrivateScreen.h"
|
||||||
|
#include "ServerProtocol.h"
|
||||||
|
|
||||||
#include <Bitmap.h>
|
#include <Bitmap.h>
|
||||||
#include <Locker.h>
|
#include <Locker.h>
|
||||||
#include <Window.h>
|
#include <Window.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <new>
|
||||||
|
|
||||||
#include "AppServerLink.h"
|
#include <stdlib.h>
|
||||||
#include "PrivateScreen.h"
|
|
||||||
#include "ServerProtocol.h"
|
|
||||||
|
|
||||||
|
|
||||||
// TODO: We should define this somewhere else
|
// TODO: We should define this somewhere else
|
||||||
@@ -197,13 +199,25 @@ BPrivateScreen::ColorMap()
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
BPrivateScreen::GetBitmap(BBitmap **bitmap, bool drawCursor, BRect *bound)
|
BPrivateScreen::GetBitmap(BBitmap **_bitmap, bool drawCursor, BRect *bounds)
|
||||||
{
|
{
|
||||||
if (bitmap == NULL)
|
if (_bitmap == NULL)
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
// TODO: Implement
|
BBitmap* bitmap = new (std::nothrow) BBitmap(Frame(), ColorSpace());
|
||||||
return B_ERROR;
|
if (bitmap == NULL)
|
||||||
|
return B_NO_MEMORY;
|
||||||
|
|
||||||
|
status_t status = bitmap->InitCheck();
|
||||||
|
if (status == B_OK)
|
||||||
|
status = ReadBitmap(bitmap, drawCursor, bounds);
|
||||||
|
if (status != B_OK) {
|
||||||
|
delete bitmap;
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
*_bitmap = bitmap;
|
||||||
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user