2 * Copyright 2013-2014, Stephan Aßmus <superstippi@gmx.de>.
3 * All rights reserved. Distributed under the terms of the MIT License.
5 #ifndef SHARED_BITMAP_H
6 #define SHARED_BITMAP_H
9 #include <Referenceable.h>
19 class SharedBitmap
: public BReferenceable
{
29 SharedBitmap(BBitmap
* bitmap
);
30 SharedBitmap(int32 resourceID
);
31 SharedBitmap(const char* mimeType
);
32 SharedBitmap(BPositionIO
& data
);
35 const BBitmap
* Bitmap(Size which
);
38 BBitmap
* _CreateBitmapFromResource(int32 size
) const;
39 BBitmap
* _CreateBitmapFromBuffer(int32 size
) const;
40 BBitmap
* _CreateBitmapFromMimeType(int32 size
) const;
42 BBitmap
* _LoadBitmapFromBuffer(const void* buffer
,
43 size_t dataSize
) const;
44 BBitmap
* _LoadArchivedBitmapFromStream(
45 BPositionIO
& stream
) const;
46 BBitmap
* _LoadTranslatorBitmapFromStream(
47 BPositionIO
& stream
) const;
48 BBitmap
* _LoadIconFromBuffer(const void* buffer
,
49 size_t dataSize
, int32 size
) const;
60 typedef BReference
<SharedBitmap
> BitmapRef
;
61 typedef List
<BitmapRef
, false> BitmapList
;
64 #endif // SHARED_BITMAP_H