1 /* 2 * Copyright 2024, Andrew Lindesay <apl@lindesay.co.nz>. 3 * All rights reserved. Distributed under the terms of the MIT License. 4 */ 5 #ifndef SHARED_ICONS_H 6 #define SHARED_ICONS_H 7 8 9 #include "BitmapHolder.h" 10 11 12 class SharedIcons 13 { 14 15 public: 16 static void UnsetAllIcons(); 17 18 // icons from application resources 19 static BitmapHolderRef IconStarBlue12Scaled(); 20 static BitmapHolderRef IconStarBlue16Scaled(); 21 static BitmapHolderRef IconStarGrey16Scaled(); 22 static BitmapHolderRef IconInstalled16Scaled(); 23 static BitmapHolderRef IconArrowLeft22Scaled(); 24 static BitmapHolderRef IconArrowRight22Scaled(); 25 static BitmapHolderRef IconNative16Scaled(); 26 27 // icons from mime types 28 static BitmapHolderRef IconHTMLPackage16Scaled(); 29 30 private: 31 static BitmapHolderRef _CreateIconForResource(int32 resourceID, uint32 size); 32 static BitmapHolderRef _CreateIconForMimeType(const char* mimeType, uint32 size); 33 34 static status_t _CreateIconForResourceChecked(int32 resourceID, uint32 size, 35 BitmapHolderRef* bitmapHolderRef); 36 static status_t _CreateIconForMimeTypeChecked(const char* mimeTypeStr, uint32 size, 37 BitmapHolderRef* bitmapHolderRef); 38 39 private: 40 static BitmapHolderRef sIconStarBlue12Scaled; 41 static BitmapHolderRef sIconStarBlue16Scaled; 42 static BitmapHolderRef sIconStarGrey16Scaled; 43 static BitmapHolderRef sIconInstalled16Scaled; 44 static BitmapHolderRef sIconArrowLeft22Scaled; 45 static BitmapHolderRef sIconArrowRight22Scaled; 46 static BitmapHolderRef sIconHTMLPackage16Scaled; 47 static BitmapHolderRef sNative16Scaled; 48 49 }; 50 51 52 #endif // SHARED_ICONS_H 53