Updates for changes in PortLink & PortMessage
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3958 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -2175,7 +2175,7 @@ BBitmap::InitObject(BRect bounds, color_space colorSpace, uint32 flags,
|
||||
// none
|
||||
status_t freestat;
|
||||
link->SetOpCode(AS_DELETE_BITMAP);
|
||||
link->Attach(fServerToken);
|
||||
link->Attach<int32>(fServerToken);
|
||||
error=link->FlushWithReply(&replydata);
|
||||
if(replydata.code==SERVER_FALSE)
|
||||
error=B_NO_MEMORY;
|
||||
@@ -2207,11 +2207,11 @@ BBitmap::InitObject(BRect bounds, color_space colorSpace, uint32 flags,
|
||||
// 4) int32 bytes_per_row
|
||||
// 5) int32 screen_id::id
|
||||
link->SetOpCode(AS_CREATE_BITMAP);
|
||||
link->Attach(bounds);
|
||||
link->Attach<BRect>(bounds);
|
||||
link->Attach(&colorSpace, sizeof(color_space));
|
||||
link->Attach((int32)flags);
|
||||
link->Attach(bytesPerRow);
|
||||
link->Attach(screenID.id);
|
||||
link->Attach<int32>((int32)flags);
|
||||
link->Attach<int32>(bytesPerRow);
|
||||
link->Attach<int32>(screenID.id);
|
||||
|
||||
// Reply Code: SERVER_TRUE
|
||||
// Reply Data:
|
||||
|
||||
@@ -47,9 +47,9 @@ _IMPEXP_BE status_t set_screen_space(int32 index, uint32 res, bool stick = true)
|
||||
{
|
||||
BPrivate::BAppServerLink *link=new BPrivate::BAppServerLink();
|
||||
link->SetOpCode(AS_SET_SCREEN_MODE);
|
||||
link->Attach(index);
|
||||
link->Attach((int32)res);
|
||||
link->Attach(stick);
|
||||
link->Attach<int32>(index);
|
||||
link->Attach<int32>((int32)res);
|
||||
link->Attach<bool>(stick);
|
||||
link->Flush();
|
||||
delete link;
|
||||
}
|
||||
@@ -222,7 +222,7 @@ _IMPEXP_BE void set_workspace_count(int32 count)
|
||||
{
|
||||
BPrivate::BAppServerLink *link=new BPrivate::BAppServerLink();
|
||||
link->SetOpCode(AS_SET_WORKSPACE_COUNT);
|
||||
link->Attach(count);
|
||||
link->Attach<int32>(count);
|
||||
link->Flush();
|
||||
delete link;
|
||||
}
|
||||
@@ -246,7 +246,7 @@ _IMPEXP_BE void activate_workspace(int32 workspace)
|
||||
{
|
||||
BPrivate::BAppServerLink *link=new BPrivate::BAppServerLink();
|
||||
link->SetOpCode(AS_ACTIVATE_WORKSPACE);
|
||||
link->Attach(workspace);
|
||||
link->Attach<int32>(workspace);
|
||||
link->Flush();
|
||||
delete link;
|
||||
}
|
||||
@@ -289,7 +289,7 @@ _IMPEXP_BE void set_focus_follows_mouse(bool follow)
|
||||
{
|
||||
BPrivate::BAppServerLink *link=new BPrivate::BAppServerLink();
|
||||
link->SetOpCode(AS_SET_FOCUS_FOLLOWS_MOUSE);
|
||||
link->Attach(follow);
|
||||
link->Attach<bool>(follow);
|
||||
link->Flush();
|
||||
delete link;
|
||||
}
|
||||
@@ -304,7 +304,7 @@ _IMPEXP_BE bool focus_follows_mouse()
|
||||
delete link;
|
||||
|
||||
bool ffm;
|
||||
pmsg.Read(&ffm);
|
||||
pmsg.Read<bool>(&ffm);
|
||||
return ffm;
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ BPicture::BPicture(const BPicture &picture)
|
||||
PortLink::ReplyData replydata;
|
||||
|
||||
link.SetOpCode(AS_CLONE_PICTURE);
|
||||
link.Attach(picture.token);
|
||||
link.Attach<int32>(picture.token);
|
||||
link.FlushWithReply(&replydata);
|
||||
token=*((int32*)replydata.buffer);
|
||||
|
||||
@@ -163,14 +163,14 @@ BPicture::BPicture(BMessage *archive)
|
||||
BPicture *pic;
|
||||
|
||||
link.SetOpCode(AS_CREATE_PICTURE);
|
||||
link.Attach(extent->fPictures.CountItems());
|
||||
link.Attach<int32>(extent->fPictures.CountItems());
|
||||
for (int32 i = 0; i < extent->fPictures.CountItems(); i++)
|
||||
{
|
||||
pic=(BPicture*)extent->fPictures.ItemAt(i);
|
||||
if(pic)
|
||||
link.Attach(pic->token);
|
||||
link.Attach<int32>(pic->token);
|
||||
}
|
||||
link.Attach(extent->fNewSize);
|
||||
link.Attach<int32>(extent->fNewSize);
|
||||
link.Attach(extent->fNewData,extent->fNewSize);
|
||||
link.FlushWithReply(&replydata);
|
||||
token=*((int32*)replydata.buffer);
|
||||
@@ -205,7 +205,7 @@ BPicture::~BPicture()
|
||||
BPrivate::BAppServerLink link;
|
||||
|
||||
link.SetOpCode(AS_DELETE_PICTURE);
|
||||
link.Attach(token);
|
||||
link.Attach<int32>(token);
|
||||
link.Flush();
|
||||
}
|
||||
|
||||
@@ -344,14 +344,14 @@ status_t BPicture::Unflatten(BDataIO *stream)
|
||||
BPicture *pic;
|
||||
|
||||
link.SetOpCode(AS_CREATE_PICTURE);
|
||||
link.Attach(extent->fPictures.CountItems());
|
||||
link.Attach<int32>(extent->fPictures.CountItems());
|
||||
for (int32 i = 0; i < extent->fPictures.CountItems(); i++)
|
||||
{
|
||||
pic=(BPicture*)extent->fPictures.ItemAt(i);
|
||||
if(pic)
|
||||
link.Attach(pic->token);
|
||||
link.Attach<int32>(pic->token);
|
||||
}
|
||||
link.Attach(extent->fNewSize);
|
||||
link.Attach<int32>(extent->fNewSize);
|
||||
link.Attach(extent->fNewData, extent->fNewSize);
|
||||
link.FlushWithReply(&replydata);
|
||||
token=*((int32*)replydata.buffer);
|
||||
@@ -397,12 +397,12 @@ void BPicture::import_data(const void *data, int32 size, BPicture **subs,
|
||||
PortLink::ReplyData replydata;
|
||||
|
||||
link.SetOpCode(AS_CREATE_PICTURE);
|
||||
link.Attach(subCount);
|
||||
link.Attach<int32>(subCount);
|
||||
|
||||
for (int32 i = 0; i < subCount; i++)
|
||||
link.Attach(subs[i]->token);
|
||||
link.Attach<int32>(subs[i]->token);
|
||||
|
||||
link.Attach(size);
|
||||
link.Attach<int32>(size);
|
||||
link.Attach(data, size);
|
||||
link.FlushWithReply(&replydata);
|
||||
token=*((int32*)replydata.buffer);
|
||||
@@ -423,8 +423,8 @@ void BPicture::import_old_data(const void *data, int32 size)
|
||||
PortLink::ReplyData replydata;
|
||||
|
||||
link.SetOpCode(AS_CREATE_PICTURE);
|
||||
link.Attach(0L);
|
||||
link.Attach(extent->fNewSize);
|
||||
link.Attach<int32>(0L);
|
||||
link.Attach<int32>(extent->fNewSize);
|
||||
link.Attach(extent->fNewData,extent->fNewSize);
|
||||
link.FlushWithReply(&replydata);
|
||||
token=*((int32*)replydata.buffer);
|
||||
@@ -456,7 +456,7 @@ bool BPicture::assert_local_copy()
|
||||
int32 count;
|
||||
|
||||
link.SetOpCode(AS_DOWNLOAD_PICTURE);
|
||||
link.Attach(token);
|
||||
link.Attach<int32>(token);
|
||||
link.FlushWithReply(&replydata);
|
||||
count=*((int32*)replydata.buffer);
|
||||
|
||||
@@ -506,10 +506,10 @@ bool BPicture::assert_server_copy()
|
||||
PortLink::ReplyData replydata;
|
||||
|
||||
link.SetOpCode(AS_CREATE_PICTURE);
|
||||
link.Attach(extent->fPictures.CountItems());
|
||||
link.Attach<int32>(extent->fPictures.CountItems());
|
||||
for (int32 i = 0; i < extent->fPictures.CountItems(); i++)
|
||||
link.Attach(extent->fPictures.ItemAt(i)->token);
|
||||
link.Attach(extent->fNewSize);
|
||||
link.Attach<int32>(extent->fPictures.ItemAt(i)->token);
|
||||
link.Attach<int32>(extent->fNewSize);
|
||||
link.Attach(extent->fNewData,extent->fNewSize);
|
||||
link.FlushWithReply(&replydata);
|
||||
token=*((int32*)replydata.buffer);
|
||||
@@ -553,7 +553,7 @@ void BPicture::usurp(BPicture *lameDuck)
|
||||
BPrivate::BAppServerLink link;
|
||||
|
||||
link.SetOpCode(AS_DELETE_PICTURE);
|
||||
link.Attach(token);
|
||||
link.Attach<int32>(token);
|
||||
link.Flush();
|
||||
}
|
||||
|
||||
|
||||
@@ -364,7 +364,7 @@ void BWindow::Minimize(bool minimize){
|
||||
return;
|
||||
|
||||
serverLink->SetOpCode( AS_WINDOW_MINIMIZE );
|
||||
serverLink->Attach( minimize );
|
||||
serverLink->Attach<bool>( minimize );
|
||||
|
||||
Lock();
|
||||
serverLink->Flush( );
|
||||
@@ -380,7 +380,7 @@ status_t BWindow::SendBehind(const BWindow* window){
|
||||
PortLink::ReplyData replyData;
|
||||
|
||||
serverLink->SetOpCode( AS_SEND_BEHIND );
|
||||
serverLink->Attach( _get_object_token_(window) );
|
||||
serverLink->Attach<int32>( _get_object_token_(window) );
|
||||
|
||||
Lock();
|
||||
serverLink->FlushWithReply( &replyData );
|
||||
@@ -447,7 +447,7 @@ void BWindow::BeginViewTransaction(){
|
||||
void BWindow::EndViewTransaction(){
|
||||
if ( fInTransaction ){
|
||||
// !!!!!!!!! if not '(int32)AS_END_TRANSACTION' we receive an error ?????
|
||||
srvGfxLink->Attach( (int32)AS_END_TRANSACTION );
|
||||
srvGfxLink->Attach<int32>( (int32)AS_END_TRANSACTION );
|
||||
fInTransaction = false;
|
||||
Flush();
|
||||
}
|
||||
@@ -924,10 +924,10 @@ void BWindow::SetSizeLimits(float minWidth, float maxWidth,
|
||||
PortLink::ReplyData replyData;
|
||||
|
||||
serverLink->SetOpCode( AS_SET_SIZE_LIMITS );
|
||||
serverLink->Attach( fMinWindWidth );
|
||||
serverLink->Attach( fMaxWindWidth );
|
||||
serverLink->Attach( fMinWindHeight );
|
||||
serverLink->Attach( fMaxWindHeight );
|
||||
serverLink->Attach<float>( fMinWindWidth );
|
||||
serverLink->Attach<float>( fMaxWindWidth );
|
||||
serverLink->Attach<float>( fMinWindHeight );
|
||||
serverLink->Attach<float>( fMaxWindHeight );
|
||||
|
||||
Lock();
|
||||
serverLink->FlushWithReply( &replyData );
|
||||
@@ -1207,7 +1207,7 @@ void BWindow::Activate(bool active){
|
||||
return;
|
||||
|
||||
serverLink->SetOpCode( AS_ACTIVATE_WINDOW );
|
||||
serverLink->Attach( active );
|
||||
serverLink->Attach<bool>( active );
|
||||
|
||||
Lock();
|
||||
serverLink->Flush( );
|
||||
@@ -1419,7 +1419,7 @@ status_t BWindow::AddToSubset(BWindow* window){
|
||||
PortLink::ReplyData replyData;
|
||||
|
||||
serverLink->SetOpCode( AS_ADD_TO_SUBSET );
|
||||
serverLink->Attach( _get_object_token_(window) );
|
||||
serverLink->Attach<int32>( _get_object_token_(window) );
|
||||
|
||||
Lock();
|
||||
serverLink->FlushWithReply( &replyData );
|
||||
@@ -1442,7 +1442,7 @@ status_t BWindow::RemoveFromSubset(BWindow* window){
|
||||
PortLink::ReplyData replyData;
|
||||
|
||||
serverLink->SetOpCode( AS_REM_FROM_SUBSET );
|
||||
serverLink->Attach( _get_object_token_(window) );
|
||||
serverLink->Attach<int32>( _get_object_token_(window) );
|
||||
|
||||
Lock();
|
||||
serverLink->FlushWithReply( &replyData );
|
||||
@@ -1599,15 +1599,15 @@ status_t BWindow::SetWindowAlignment(window_alignment mode,
|
||||
PortLink::ReplyData replyData;
|
||||
|
||||
serverLink->SetOpCode( AS_SET_ALIGNMENT );
|
||||
serverLink->Attach( (int32)mode );
|
||||
serverLink->Attach( h );
|
||||
serverLink->Attach( hOffset );
|
||||
serverLink->Attach( width );
|
||||
serverLink->Attach( widthOffset );
|
||||
serverLink->Attach( v );
|
||||
serverLink->Attach( vOffset );
|
||||
serverLink->Attach( height );
|
||||
serverLink->Attach( heightOffset );
|
||||
serverLink->Attach<int32>( (int32)mode );
|
||||
serverLink->Attach<int32>( h );
|
||||
serverLink->Attach<int32>( hOffset );
|
||||
serverLink->Attach<int32>( width );
|
||||
serverLink->Attach<int32>( widthOffset );
|
||||
serverLink->Attach<int32>( v );
|
||||
serverLink->Attach<int32>( vOffset );
|
||||
serverLink->Attach<int32>( height );
|
||||
serverLink->Attach<int32>( heightOffset );
|
||||
|
||||
Lock();
|
||||
serverLink->FlushWithReply( &replyData );
|
||||
@@ -1697,7 +1697,7 @@ void BWindow::SetWorkspaces(uint32 workspaces){
|
||||
// PortLink::ReplyData replyData;
|
||||
|
||||
serverLink->SetOpCode( AS_SET_WORKSPACES );
|
||||
serverLink->Attach( (int32)workspaces );
|
||||
serverLink->Attach<int32>( (int32)workspaces );
|
||||
|
||||
Lock();
|
||||
serverLink->Flush( );
|
||||
@@ -1742,8 +1742,8 @@ void BWindow::MoveTo( BPoint point ){
|
||||
void BWindow::MoveTo(float x, float y){
|
||||
|
||||
serverLink->SetOpCode( AS_WINDOW_MOVE );
|
||||
serverLink->Attach( x );
|
||||
serverLink->Attach( y );
|
||||
serverLink->Attach<float>( x );
|
||||
serverLink->Attach<float>( y );
|
||||
|
||||
Lock();
|
||||
serverLink->Flush();
|
||||
@@ -1776,8 +1776,8 @@ void BWindow::ResizeTo(float width, float height){
|
||||
height = (height > fMaxWindHeight) ? fMaxWindHeight : height;
|
||||
|
||||
serverLink->SetOpCode( AS_WINDOW_RESIZE );
|
||||
serverLink->Attach( width );
|
||||
serverLink->Attach( height );
|
||||
serverLink->Attach<float>( width );
|
||||
serverLink->Attach<float>( height );
|
||||
|
||||
Lock();
|
||||
serverLink->Flush( );
|
||||
@@ -2006,12 +2006,12 @@ void BWindow::InitData( BRect frame,
|
||||
PortLink::ReplyData replyData;
|
||||
|
||||
serverLink->SetOpCode(AS_CREATE_WINDOW);
|
||||
serverLink->Attach(fFrame);
|
||||
serverLink->Attach((int32)WindowLookToInteger(fLook));
|
||||
serverLink->Attach((int32)WindowFeelToInteger(fFeel));
|
||||
serverLink->Attach((int32)fFlags);
|
||||
serverLink->Attach((int32)workspace);
|
||||
serverLink->Attach((int32)_get_object_token_(this));
|
||||
serverLink->Attach<BRect>(fFrame);
|
||||
serverLink->Attach<int32>((int32)WindowLookToInteger(fLook));
|
||||
serverLink->Attach<int32>((int32)WindowFeelToInteger(fFeel));
|
||||
serverLink->Attach<int32>((int32)fFlags);
|
||||
serverLink->Attach<int32>((int32)workspace);
|
||||
serverLink->Attach<int32>((int32)_get_object_token_(this));
|
||||
serverLink->Attach(&receive_port,sizeof(port_id));
|
||||
// We add one so that the string will end up NULL-terminated.
|
||||
serverLink->Attach( (char*)title, strlen(title)+1 );
|
||||
@@ -2349,7 +2349,7 @@ void BWindow::attachTopView(){
|
||||
// TODO: implement after you have a messaging protocol with app_server
|
||||
|
||||
serverLink->SetOpCode( AS_LAYER_CREATE_ROOT );
|
||||
serverLink->Attach( _get_object_token_( top_view ) ); // no need for that!
|
||||
serverLink->Attach<int32>( _get_object_token_( top_view ) ); // no need for that!
|
||||
/* serverLink->Attach( top_view->Name() );
|
||||
serverLink->Attach( fCachedBounds.OffsetToCopy( origin_h, origin_v ) );
|
||||
serverLink->Attach( ...ResizeMode... );
|
||||
@@ -2369,7 +2369,7 @@ void BWindow::detachTopView(){
|
||||
// TODO: detach all views
|
||||
|
||||
serverLink->SetOpCode( AS_LAYER_DELETE_ROOT );
|
||||
serverLink->Attach( _get_object_token_( top_view ) ); // no need for that!
|
||||
serverLink->Attach<int32>( _get_object_token_( top_view ) ); // no need for that!
|
||||
|
||||
Lock();
|
||||
serverLink->Flush();
|
||||
|
||||
Reference in New Issue
Block a user