mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-14 04:11:37 -06:00
4.44 beta
This commit is contained in:
committed by
Kornel Lesiński
parent
804edc5756
commit
d9666cf046
51
CPP/7zip/FileManager/SysIconUtils.h
Executable file
51
CPP/7zip/FileManager/SysIconUtils.h
Executable file
@@ -0,0 +1,51 @@
|
||||
// SysIconUtils.h
|
||||
|
||||
#ifndef __SYSICONUTILS_H
|
||||
#define __SYSICONUTILS_H
|
||||
|
||||
#include "Common/String.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
|
||||
Reference in New Issue
Block a user