From 8ed06e4de53ec88fef35755b552749f5e7bd487e Mon Sep 17 00:00:00 2001 From: Barrett17 Date: Wed, 24 Jun 2015 16:23:04 +0000 Subject: [PATCH] IconUtils is now Haiku public API remove it. --- application/CayaUtils.cpp | 3 +- libs/libinterface/BitmapUtils.cpp | 2 +- libs/private/IconUtils.h | 80 ------------------------------- 3 files changed, 2 insertions(+), 83 deletions(-) delete mode 100644 libs/private/IconUtils.h diff --git a/application/CayaUtils.cpp b/application/CayaUtils.cpp index 2dd01b2..18ce4c8 100644 --- a/application/CayaUtils.cpp +++ b/application/CayaUtils.cpp @@ -11,10 +11,9 @@ #include #include #include +#include #include -#include "private/IconUtils.h" - #include "CayaUtils.h" diff --git a/libs/libinterface/BitmapUtils.cpp b/libs/libinterface/BitmapUtils.cpp index 4f85b6f..2f19c77 100644 --- a/libs/libinterface/BitmapUtils.cpp +++ b/libs/libinterface/BitmapUtils.cpp @@ -10,7 +10,7 @@ #include -#include +#include #include "BitmapUtils.h" diff --git a/libs/private/IconUtils.h b/libs/private/IconUtils.h deleted file mode 100644 index fdcfbd9..0000000 --- a/libs/private/IconUtils.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright 2006-2008, Haiku. All rights reserved. - * Distributed under the terms of the MIT License. - */ -#ifndef _ICON_UTILS_H -#define _ICON_UTILS_H - - -#include - -class BBitmap; -class BNode; - - -// This class is a little different from many other classes. -// You don't create an instance of it; you just call its various -// static member functions for utility-like operations. -class BIconUtils { - BIconUtils(); - ~BIconUtils(); - BIconUtils(const BIconUtils&); - BIconUtils& operator=(const BIconUtils&); - -public: - - // Utility function to import an icon from the node that - // has either of the provided attribute names. Which icon type - // is preferred (vector, small or large B_CMAP8 icon) depends - // on the colorspace of the provided bitmap. If the colorspace - // is B_CMAP8, B_CMAP8 icons are preferred. In that case, the - // bitmap size must also match the provided icon_size "size"! - static status_t GetIcon(BNode* node, - const char* vectorIconAttrName, - const char* smallIconAttrName, - const char* largeIconAttrName, - icon_size size, BBitmap* result); - - // Utility functions to import a vector icon in "flat icon" - // format from a BNode attribute or from a flat buffer in - // memory into the preallocated BBitmap "result". - // The colorspace of result needs to be B_RGBA32 or at - // least B_RGB32 (though that makes less sense). The icon - // will be scaled from it's "native" size of 64x64 to the - // size of the bitmap, the scale is derived from the bitmap - // width, the bitmap should have square dimension, or the - // icon will be cut off at the bottom (or have room left). - static status_t GetVectorIcon(BNode* node, - const char* attrName, BBitmap* result); - - static status_t GetVectorIcon(const uint8* buffer, - size_t size, BBitmap* result); - - // Utility function to import an "old" BeOS icon in B_CMAP8 - // colorspace from either the small icon attribute or the - // large icon attribute as given in "smallIconAttrName" and - // "largeIconAttrName". Which icon is loaded depends on - // the given "size". - static status_t GetCMAP8Icon(BNode* node, - const char* smallIconAttrName, - const char* largeIconAttrName, - icon_size size, BBitmap* icon); - - // Utility functions to convert from old icon colorspace - // into colorspace of BBitmap "result" (should be B_RGBA32 - // to make any sense). - static status_t ConvertFromCMAP8(BBitmap* source, - BBitmap* result); - static status_t ConvertToCMAP8(BBitmap* source, - BBitmap* result); - - static status_t ConvertFromCMAP8(const uint8* data, - uint32 width, uint32 height, - uint32 bytesPerRow, BBitmap* result); - - static status_t ConvertToCMAP8(const uint8* data, - uint32 width, uint32 height, - uint32 bytesPerRow, BBitmap* result); -}; - -#endif // _ICON_UTILS_H