diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2007-08-27 04:00:00 +0400 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:15:54 +0300 |
commit | 051769bbc577aeede90558b6ab5c9be187940ca0 (patch) | |
tree | e6330cb80f2d4a526d8aa27812528e053b0cda90 /CPP/7zip/UI/FileManager/SysIconUtils.h | |
parent | 33ccab7e728a996800e166d849fe1e92a17e1afe (diff) |
4.53 beta
Diffstat (limited to 'CPP/7zip/UI/FileManager/SysIconUtils.h')
-rwxr-xr-x | CPP/7zip/UI/FileManager/SysIconUtils.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/CPP/7zip/UI/FileManager/SysIconUtils.h b/CPP/7zip/UI/FileManager/SysIconUtils.h new file mode 100755 index 00000000..3b6c6c2e --- /dev/null +++ b/CPP/7zip/UI/FileManager/SysIconUtils.h @@ -0,0 +1,51 @@ +// SysIconUtils.h + +#ifndef __SYSICONUTILS_H +#define __SYSICONUTILS_H + +#include "Common/MyString.h" + +struct CExtIconPair +{ + UString Ext; + int IconIndex; + UString TypeName; + +}; + +inline bool operator==(const CExtIconPair &a1, const CExtIconPair &a2) +{ + return (a1.Ext == a2.Ext); +} + +inline bool operator<(const CExtIconPair &a1, const CExtIconPair &a2) +{ + return (a1.Ext < a2.Ext); +} + +class CExtToIconMap +{ + int _dirIconIndex; + UString _dirTypeName; + int _noExtIconIndex; + UString _noExtTypeName; + CObjectVector<CExtIconPair> _map; +public: + CExtToIconMap(): _dirIconIndex(-1), _noExtIconIndex(-1) {} + void Clear() + { + _dirIconIndex = -1; + _noExtIconIndex = -1; + _map.Clear(); + } + int GetIconIndex(UINT32 attributes, const UString &fileName, UString &typeName); + int GetIconIndex(UINT32 attributes, const UString &fileName); +}; + +DWORD_PTR GetRealIconIndex(LPCTSTR path, UINT32 attributes, int &iconIndex); +#ifndef _UNICODE +DWORD_PTR GetRealIconIndex(LPCWSTR path, UINT32 attributes, int &iconIndex); +#endif +int GetIconIndexForCSIDL(int aCSIDL); + +#endif |