BShape: use BShape::Private class to access private methods.

Avoid declaring random friend classes in public header. Allow to access
private methods from arbitrary source if needed.

Change-Id: Iac2cf0ca59e483aa0657e3fe1fc47080c661cf8b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8534
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
X512
2024-11-11 16:56:19 +00:00
committed by waddlesplash
parent e892302909
commit 2b0aa4245b
6 changed files with 37 additions and 24 deletions
+17
View File
@@ -9,6 +9,7 @@
#ifndef SHAPE_PRIVATE_H
#define SHAPE_PRIVATE_H
#include <Shape.h>
#include <Point.h>
#include <Rect.h>
#include <Referenceable.h>
@@ -97,4 +98,20 @@ public:
};
class BShape::Private {
public:
Private(BShape& shape) : fShape(shape) {}
void GetData(int32* opCount, int32* ptCount,
uint32** opList, BPoint** ptList);
void SetData(int32 opCount, int32 ptCount,
const uint32* opList,
const BPoint* ptList);
shape_data* PrivateData() {return (shape_data*)fShape.fPrivateData;}
private:
BShape& fShape;
};
#endif // SHAPE_PRIVATE_H