From cb4d31922f0690f5a3c79526245c963bfd118864 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 18 May 2018 21:56:03 +0300 Subject: Icon_Register(g_plugin.getInst() => g_plugin.registerIcon Icon_RegisterT(g_plugin.getInst() => g_plugin.registerIconW --- include/m_core.h | 5 ----- include/newpluginapi.h | 12 ++++++++++++ 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/m_core.h b/include/m_core.h index 7f01dab6a2..83771c6120 100644 --- a/include/m_core.h +++ b/include/m_core.h @@ -172,13 +172,8 @@ typedef struct tagIconItemT } IconItemT; -#if defined( __cplusplus ) -MIR_CORE_DLL(void) Icon_Register(HINSTANCE hInst, const char* szSection, IconItem* pIcons, size_t iCount, const char *prefix = nullptr, int = hLangpack); -MIR_CORE_DLL(void) Icon_RegisterT(HINSTANCE hInst, const wchar_t* szSection, IconItemT* pIcons, size_t iCount, const char *prefix = nullptr, int = hLangpack); -#else MIR_CORE_DLL(void) Icon_Register(HINSTANCE hInst, const char* szSection, IconItem* pIcons, size_t iCount, const char *prefix, int hLangpack); MIR_CORE_DLL(void) Icon_RegisterT(HINSTANCE hInst, const wchar_t* szSection, IconItemT* pIcons, size_t iCount, const char *prefix, int hLangpack); -#endif /////////////////////////////////////////////////////////////////////////////// // language packs support diff --git a/include/newpluginapi.h b/include/newpluginapi.h index b85f489505..859c4e60d0 100644 --- a/include/newpluginapi.h +++ b/include/newpluginapi.h @@ -177,6 +177,18 @@ public: __forceinline HINSTANCE getInst() const { return m_hInst; } __forceinline void setInst(HINSTANCE hInst) { m_hInst = hInst; } + template + __forceinline void registerIcon(const char *szSection, IconItem(&pIcons)[_Size], const char *prefix = nullptr) + { + Icon_Register(m_hInst, szSection, pIcons, _Size, prefix, m_hLang); + } + + template + __forceinline void registerIconW(const wchar_t *szSection, IconItemT(&pIcons)[_Size], const char *prefix = nullptr) + { + Icon_RegisterT(m_hInst, szSection, pIcons, _Size, prefix, m_hLang); + } + __forceinline INT_PTR delSetting(const char *name) { return db_unset(0, m_szModuleName, name); -- cgit v1.2.3