2 * Copyright 2013, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
5 #ifndef _INTERFACE__ICON_H_
6 #define _INTERFACE__ICON_H_
9 #include <InterfaceDefs.h>
10 #include <ObjectList.h>
25 status_t
SetTo(const BBitmap
* bitmap
, uint32 flags
= 0);
27 bool SetBitmap(BBitmap
* bitmap
, uint32 which
);
28 BBitmap
* Bitmap(uint32 which
) const;
30 status_t
SetExternalBitmap(const BBitmap
* bitmap
,
31 uint32 which
, uint32 flags
);
33 BBitmap
* CreateBitmap(const BRect
& bounds
,
34 color_space colorSpace
, uint32 which
);
35 BBitmap
* CopyBitmap(const BBitmap
& bitmapToClone
,
39 // convenience methods for icon owners
40 static status_t
UpdateIcon(const BBitmap
* bitmap
, uint32 flags
,
42 static status_t
SetIconBitmap(const BBitmap
* bitmap
,
43 uint32 which
, uint32 flags
, BIcon
*& _icon
);
46 typedef BObjectList
<BBitmap
> BitmapList
;
49 static BBitmap
* _ConvertToRGB32(const BBitmap
* bitmap
,
50 bool noAppServerLink
= false);
51 static status_t
_TrimBitmap(const BBitmap
* bitmap
,
52 bool keepAspect
, BBitmap
*& _trimmedBitmap
);
53 status_t
_MakeBitmaps(const BBitmap
* bitmap
,
57 BitmapList fEnabledBitmaps
;
58 BitmapList fDisabledBitmaps
;
62 } // namespace BPrivate
65 using BPrivate::BIcon
;
68 #endif // _INTERFACE__ICON_H_