Subversion Repositories tpanel

Rev

Rev 97 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 97 Rev 165
Line 22... Line 22...
22
#include <string>
22
#include <string>
23
#include <vector>
23
#include <vector>
24
 
24
 
25
#include <include/core/SkBitmap.h>
25
#include <include/core/SkBitmap.h>
26
 
26
 
-
 
27
typedef enum _IMGCACHE_BMTYPE
-
 
28
{
-
 
29
    _BMTYPE_NONE,
-
 
30
    _BMTYPE_CHAMELEON,
-
 
31
    _BMTYPE_BITMAP,
-
 
32
    _BMTYPE_ICON,
-
 
33
    _BMTYPE_URL
-
 
34
}_IMGCACHE_BMTYPE;
-
 
35
 
27
typedef struct _IMGCACHE
36
typedef struct _IMGCACHE
28
{
37
{
-
 
38
    _IMGCACHE_BMTYPE bmType{_BMTYPE_NONE};
29
    std::string name;
39
    std::string name;
30
    SkBitmap bitmap;
40
    SkBitmap bitmap;
31
}_IMGCACHE;
41
}_IMGCACHE;
32
 
42
 
33
class TImgCache
43
class TImgCache
34
{
44
{
35
    public:
45
    public:
36
        static bool addImage(const std::string& name, SkBitmap& bm);
46
        static bool addImage(const std::string& name, SkBitmap& bm, _IMGCACHE_BMTYPE bmType=_BMTYPE_NONE);
37
        static bool getBitmap(const std::string& name, SkBitmap *bm);
47
        static bool getBitmap(const std::string& name, SkBitmap *bm, _IMGCACHE_BMTYPE bmType=_BMTYPE_NONE);
38
        static bool delBitmap(const std::string& name);
48
        static bool delBitmap(const std::string& name, _IMGCACHE_BMTYPE bmType=_BMTYPE_NONE);
-
 
49
        static bool existBitmap(const std::string& name, _IMGCACHE_BMTYPE bmType=_BMTYPE_NONE);
39
 
50
 
40
    private:
51
    private:
41
        // This should never be used
52
        // This should never be used
42
        TImgCache() {}
53
        TImgCache() {}
43
        ~TImgCache();
54
        ~TImgCache();