haiku/headers/os/interface/Picture.h
Stefano Ceccherini 2e6adc56e4 Added a _BPictureExtent_::Flatten(), moved some code from BPicture::Flatten()
into it. Renamed ImportData() to Unflatten(). Some code shuffling.
No functional change.
Some style cleanup needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-07-28 12:33:47 +00:00

84 lines
1.9 KiB
C++

/*
* Copyright 2001-2009, Haiku.
* Distributed under the terms of the MIT License.
*
*/
#ifndef _PICTURE_H
#define _PICTURE_H
#include <BeBuild.h>
#include <InterfaceDefs.h>
#include <Rect.h>
#include <Archivable.h>
class BDataIO;
class BView;
struct _BPictureExtent_;
// BPicture class --------------------------------------------------------------
class BPicture : public BArchivable {
public:
BPicture();
BPicture(const BPicture &original);
BPicture(BMessage *data);
virtual ~BPicture();
static BArchivable *Instantiate(BMessage *data);
virtual status_t Archive(BMessage *data, bool deep = true) const;
virtual status_t Perform(perform_code d, void *arg);
status_t Play(void **callBackTable,
int32 tableEntries,
void *userData);
status_t Flatten(BDataIO *stream);
status_t Unflatten(BDataIO *stream);
/*----- Private or reserved -----------------------------------------*/
private:
friend class BWindow;
friend class BView;
friend class BPrintJob;
virtual void _ReservedPicture1();
virtual void _ReservedPicture2();
virtual void _ReservedPicture3();
BPicture &operator=(const BPicture &);
void _InitData();
void _DisposeData();
void _ImportOldData(const void *data, int32 size);
void SetToken(int32 token);
int32 Token() const;
bool _AssertLocalCopy();
bool _AssertOldLocalCopy();
bool _AssertServerCopy();
status_t _Upload();
status_t _Download();
/**Deprecated API**/
BPicture(const void *data, int32 size);
const void *Data() const;
int32 DataSize() const;
void Usurp(BPicture *lameDuck);
BPicture *StepDown();
int32 fToken;
_BPictureExtent_ *fExtent;
BPicture *fUsurped;
uint32 _reserved[3];
};
//------------------------------------------------------------------------------
#endif // _PICTURE_H