1 #ifndef __BF_GUI_RESOURCES_H__ 2 #define __BF_GUI_RESOURCES_H__ 3 4 const color_space kDefaultIconDepth = B_COLOR_8_BIT; 5 6 enum { 7 kResMoveStatusBitmap = 1039, 8 kResCopyStatusBitmap = 1040, 9 kResTrashStatusBitmap = 1041 10 }; 11 12 #include <Locker.h> 13 #include <Resources.h> 14 #include <Mime.h> 15 #include <image.h> 16 #include <Bitmap.h> 17 18 #include "BL_Tools.h" 19 20 class BBitmap; 21 22 23 class BF_GUI_Resources:public BL_Object{ 24 public: 25 BF_GUI_Resources(); 26 27 const void *LoadResource(type_code type, int32 id, 28 size_t *outSize) const; 29 const void *LoadResource(type_code type, const char *name, 30 size_t *outSize) const; 31 32 status_t GetIconResource(int32 id, icon_size size, BBitmap *dest) const; 33 status_t GetBitmapResource(type_code type, int32 id, BBitmap **out) const; 34 35 36 37 private: 38 image_id find_image(void *memAddr) const; 39 40 mutable BLocker fLock; 41 BResources fResources; 42 43 }; 44 45 extern BF_GUI_Resources *poResources; 46 47