diff options
author | watcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-04-21 14:14:52 +0000 |
---|---|---|
committer | watcherhd <watcherhd@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-04-21 14:14:52 +0000 |
commit | cb4a46e7fbe62d788e66ed6121c717a2d22a4d7c (patch) | |
tree | 30df260fdc5a1b5a7049c2f8cac8b7ef17513d6d /skinengine/src/bitmap_cache.h | |
parent | 19b6f534d2e784a1e120bf52c4aa07004798f473 (diff) |
svn.miranda.im is moving to a new home!
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@7 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
Diffstat (limited to 'skinengine/src/bitmap_cache.h')
-rw-r--r-- | skinengine/src/bitmap_cache.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/skinengine/src/bitmap_cache.h b/skinengine/src/bitmap_cache.h new file mode 100644 index 0000000..3cf4893 --- /dev/null +++ b/skinengine/src/bitmap_cache.h @@ -0,0 +1,32 @@ +#ifndef bitmap_cache_h__
+#define bitmap_cache_h__
+
+class CMyBitmap;
+
+class CBitmapCache
+{
+private:
+ struct CacheNode
+ {
+ TCHAR *path;
+ HBITMAP bitmap;
+ int refCount;
+
+ static int cmp(const CacheNode *p1, const CacheNode *p2)
+ {
+ return lstrcmp(p1->path, p2->path);
+ }
+ };
+ OBJLIST<CacheNode> m_cache;
+
+public:
+ CBitmapCache();
+ ~CBitmapCache();
+ HBITMAP LoadBitmap(const TCHAR *path);
+ void UnloadBitmap(HBITMAP);
+};
+
+// The only instance
+extern CBitmapCache g_BitmapCache;
+
+#endif // bitmap_cache_h__
|