Added support for sending BRegions
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10943 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <new>
|
||||
#include <Region.h>
|
||||
|
||||
#include <ServerProtocol.h>
|
||||
#include <PortLink.h>
|
||||
@@ -106,3 +107,18 @@ status_t BPortLink::AttachString(const char *string)
|
||||
{
|
||||
return fSender->AttachString(string);
|
||||
}
|
||||
|
||||
status_t BPortLink::ReadRegion(BRegion *region)
|
||||
{
|
||||
fReader->Read(®ion->count, sizeof(long));
|
||||
fReader->Read(®ion->bound, sizeof(clipping_rect));
|
||||
region->set_size(region->count + 1);
|
||||
return fReader->Read(region->data, region->count * sizeof(clipping_rect));
|
||||
}
|
||||
|
||||
status_t BPortLink::AttachRegion(const BRegion ®ion)
|
||||
{
|
||||
fSender->Attach(®ion.count, sizeof(long));
|
||||
fSender->Attach(®ion.bound, sizeof(clipping_rect));
|
||||
return fSender->Attach(region.data, region.count * sizeof(clipping_rect));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user