2 * Copyright 2001-2015, Haiku.
3 * Distributed under the terms of the MIT License.
6 * DarkWyrm <bpmagic@columbus.rr.com>
7 * Stefano Ceccherini <stefano.ceccherini@gmail.com>
8 * Julian Harnath <julian.harnath@rwth-aachen.de>
10 #ifndef SERVER_PICTURE_H
11 #define SERVER_PICTURE_H
16 #include <ObjectList.h>
17 #include <PictureDataWriter.h>
18 #include <Referenceable.h>
33 class ServerPicture
: public BReferenceable
, public PictureDataWriter
{
36 ServerPicture(const ServerPicture
& other
);
37 ServerPicture(const char* fileName
,
39 virtual ~ServerPicture();
41 int32
Token() { return fToken
; }
42 bool SetOwner(ServerApp
* owner
);
43 ServerApp
* Owner() const { return fOwner
; }
45 bool ReleaseClientReference();
47 void EnterStateChange();
48 void ExitStateChange();
50 void SyncState(View
* view
);
51 void SetFontFromLink(BPrivate::LinkReceiver
& link
);
53 void Play(Canvas
* target
);
55 void PushPicture(ServerPicture
* picture
);
56 ServerPicture
* PopPicture();
58 void AppendPicture(ServerPicture
* picture
);
59 bool NestPicture(ServerPicture
* picture
);
61 off_t
DataLength() const;
63 status_t
ImportData(BPrivate::LinkReceiver
& link
);
64 status_t
ExportData(BPrivate::PortLink
& link
);
67 friend class PictureBoundingBoxPlayer
;
69 typedef BObjectList
<ServerPicture
> PictureList
;
74 PictureList
* fPictures
;
75 ServerPicture
* fPushed
;
80 #endif // SERVER_PICTURE_H