Set up sources to begin work on added BPicture support
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2979 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ef941b9977
commit
bff387f17a
@ -46,6 +46,7 @@ Server app_server :
|
||||
ScreenDriver.cpp
|
||||
ServerBitmap.cpp
|
||||
ServerCursor.cpp
|
||||
ServerPicture.cpp
|
||||
ViewDriver.cpp
|
||||
WinBorder.cpp
|
||||
;
|
||||
|
@ -41,11 +41,12 @@
|
||||
#include "ServerWindow.h"
|
||||
#include "ServerCursor.h"
|
||||
#include "ServerBitmap.h"
|
||||
#include "ServerPicture.h"
|
||||
#include "ServerConfig.h"
|
||||
#include "LayerData.h"
|
||||
#include "Utils.h"
|
||||
|
||||
#define DEBUG_SERVERAPP
|
||||
//#define DEBUG_SERVERAPP
|
||||
|
||||
/*!
|
||||
\brief Constructor
|
||||
@ -80,6 +81,7 @@ ServerApp::ServerApp(port_id sendport, port_id rcvport, int32 handlerID, char *s
|
||||
|
||||
_winlist=new BList(0);
|
||||
_bmplist=new BList(0);
|
||||
_piclist=new BList(0);
|
||||
_isactive=false;
|
||||
|
||||
ServerCursor *defaultc=cursormanager->GetCursor(B_CURSOR_DEFAULT);
|
||||
@ -125,6 +127,16 @@ printf("ServerApp %s:~ServerApp()\n",_signature.String());
|
||||
_bmplist->MakeEmpty();
|
||||
delete _bmplist;
|
||||
|
||||
ServerPicture *temppic;
|
||||
for(i=0;i<_piclist->CountItems();i++)
|
||||
{
|
||||
temppic=(ServerPicture*)_piclist->ItemAt(i);
|
||||
if(temppic)
|
||||
delete temppic;
|
||||
}
|
||||
_piclist->MakeEmpty();
|
||||
delete _piclist;
|
||||
|
||||
delete _applink;
|
||||
_applink=NULL;
|
||||
if(_appcursor)
|
||||
@ -450,6 +462,22 @@ void ServerApp::_DispatchMessage(int32 code, int8 *buffer)
|
||||
|
||||
break;
|
||||
}
|
||||
case AS_CREATE_PICTURE:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case AS_DELETE_PICTURE:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case AS_CLONE_PICTURE:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case AS_DOWNLOAD_PICTURE:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case AS_SET_SCREEN_MODE:
|
||||
{
|
||||
// Attached data
|
||||
|
@ -79,7 +79,7 @@ protected:
|
||||
thread_id _monitor_thread;
|
||||
team_id _target_id;
|
||||
PortLink *_applink;
|
||||
BList *_winlist, *_bmplist;
|
||||
BList *_winlist, *_bmplist, *_piclist;
|
||||
DisplayDriver *_driver;
|
||||
ServerCursor *_appcursor;
|
||||
sem_id _lock;
|
||||
|
27
src/servers/app/server/ServerPicture.cpp
Normal file
27
src/servers/app/server/ServerPicture.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
#include <AreaLink.h>
|
||||
#include "TokenHandler.h"
|
||||
#include "ServerPicture.h"
|
||||
|
||||
TokenHandler picture_token_handler;
|
||||
|
||||
ServerPicture::ServerPicture(void)
|
||||
{
|
||||
_token=picture_token_handler.GetToken();
|
||||
|
||||
_initialized=false;
|
||||
|
||||
int8 *ptr;
|
||||
_area=create_area("ServerPicture",(void**)&ptr,B_ANY_ADDRESS,B_PAGE_SIZE,
|
||||
B_NO_LOCK,B_READ_AREA | B_WRITE_AREA);
|
||||
|
||||
if(_area!=B_BAD_VALUE && _area!=B_NO_MEMORY && _area!=B_ERROR)
|
||||
_initialized=true;
|
||||
|
||||
arealink=(_initialized)?new AreaLink(_area):NULL;
|
||||
}
|
||||
|
||||
ServerPicture::~ServerPicture(void)
|
||||
{
|
||||
if(arealink)
|
||||
delete arealink;
|
||||
}
|
25
src/servers/app/server/ServerPicture.h
Normal file
25
src/servers/app/server/ServerPicture.h
Normal file
@ -0,0 +1,25 @@
|
||||
#ifndef SERVER_PICTURE_H
|
||||
#define SERVER_PICTURE_H
|
||||
|
||||
#include <OS.h>
|
||||
|
||||
class AreaLink;
|
||||
|
||||
class ServerPicture
|
||||
{
|
||||
public:
|
||||
ServerPicture(void);
|
||||
~ServerPicture(void);
|
||||
|
||||
bool InitCheck(void) { return _initialized; }
|
||||
area_id Area(void) { return _area; }
|
||||
int32 GetToken(void) { return _token; }
|
||||
private:
|
||||
|
||||
AreaLink *arealink;
|
||||
bool _initialized;
|
||||
area_id _area;
|
||||
int32 _token;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user