Implemented BPortLink::AttachShape and BPortLink::ReadShape and used them for passing the shapes in AS_GET_GLYPH_SHAPES.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12215 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz
2005-04-01 07:29:04 +00:00
parent ebf8af66c9
commit c2da902f2e
6 changed files with 42 additions and 45 deletions
+2
View File
@@ -78,6 +78,8 @@ virtual void _ReservedShape4();
friend class TPicture;
friend class BView;
friend class BFont;
friend class BPortLink;
void GetData(int32 *opCount, int32 *ptCount, uint32 **opList, BPoint **ptList);
void SetData(int32 opCount, int32 ptCount, uint32 *opList, BPoint *ptList);
void InitData();
+2
View File
@@ -68,6 +68,7 @@ public:
status_t Attach(const void *data, ssize_t size);
status_t AttachString(const char *string);
status_t AttachRegion(const BRegion &region);
status_t AttachShape(BShape &shape);
template <class Type> status_t Attach(const Type& data)
{
return Attach(&data, sizeof(Type));
@@ -77,6 +78,7 @@ public:
status_t Read(void *data, ssize_t size);
status_t ReadString(char **string);
status_t ReadRegion(BRegion *region);
status_t ReadShape(BShape *shape);
template <class T> status_t Read(T *data)
{
return fReader->Read(data,sizeof(T));