diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-20 00:17:30 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-20 00:17:30 +0300 |
commit | 7deea6cec5d2173f66d4c2dd75ca0b633b887bc7 (patch) | |
tree | 8e95a2e5a707ef578c2f070b997156fcda6f088c /include | |
parent | 15051a110d2575c2baa9a3b358977000c876abd9 (diff) |
sounds packed into CMPlugin (reduces usage of hLangpack)
Diffstat (limited to 'include')
-rw-r--r-- | include/m_core.h | 10 | ||||
-rw-r--r-- | include/m_skin.h | 6 | ||||
-rw-r--r-- | include/newpluginapi.h | 11 |
3 files changed, 11 insertions, 16 deletions
diff --git a/include/m_core.h b/include/m_core.h index 83771c6120..5c6ce4dd5a 100644 --- a/include/m_core.h +++ b/include/m_core.h @@ -302,16 +302,6 @@ MIR_CORE_DLL(char*) mir_strndup(const char* str, size_t len); MIR_CORE_DLL(wchar_t*) mir_wstrndup(const wchar_t *str, size_t len);
///////////////////////////////////////////////////////////////////////////////
-// modules
-
-class CMPluginBase;
-MIR_CORE_DLL(void) RegisterModule(CMPluginBase*);
-MIR_CORE_DLL(void) UnregisterModule(CMPluginBase*);
-
-MIR_CORE_DLL(HINSTANCE) GetInstByAddress(void* codePtr);
-MIR_CORE_DLL(CMPluginBase&) GetPluginByInstance(HINSTANCE hInst);
-
-///////////////////////////////////////////////////////////////////////////////
// print functions
MIR_CORE_DLL(int) mir_snprintf(char *buffer, size_t count, const char* fmt, ...);
diff --git a/include/m_skin.h b/include/m_skin.h index 326abd39d4..956f693fed 100644 --- a/include/m_skin.h +++ b/include/m_skin.h @@ -121,12 +121,6 @@ EXTERN_C MIR_APP_DLL(char*) Skin_GetIconName(int idx); EXTERN_C MIR_APP_DLL(HICON) Skin_LoadProtoIcon(const char *szProto, int status, bool big = false);
/////////////////////////////////////////////////////////////////////////////////////////
-// adds a new sound so it has a default and can be changed in the options dialog
-// returns 0 on success, nonzero otherwise
-
-EXTERN_C MIR_APP_DLL(int) Skin_AddSound(const char *name, const wchar_t *section, const wchar_t *description, const wchar_t *defaultFile = nullptr, int = hLangpack);
-
-/////////////////////////////////////////////////////////////////////////////////////////
// plays a registered sound
// returns 0 on success, nonzero otherwise
diff --git a/include/newpluginapi.h b/include/newpluginapi.h index 859c4e60d0..4aa29322b4 100644 --- a/include/newpluginapi.h +++ b/include/newpluginapi.h @@ -177,6 +177,9 @@ public: __forceinline HINSTANCE getInst() const { return m_hInst; }
__forceinline void setInst(HINSTANCE hInst) { m_hInst = hInst; }
+ ////////////////////////////////////////////////////////////////////////////////////////
+ // registering module's resources
+
template <size_t _Size>
__forceinline void registerIcon(const char *szSection, IconItem(&pIcons)[_Size], const char *prefix = nullptr)
{
@@ -189,6 +192,10 @@ public: Icon_RegisterT(m_hInst, szSection, pIcons, _Size, prefix, m_hLang);
}
+ int addSound(const char *name, const wchar_t *section, const wchar_t *description, const wchar_t *defaultFile = nullptr);
+
+ ////////////////////////////////////////////////////////////////////////////////////////
+
__forceinline INT_PTR delSetting(const char *name)
{
return db_unset(0, m_szModuleName, name);
@@ -435,4 +442,8 @@ OBJLIST<P> ACCPROTOPLUGIN<P>::g_arInstances(1, PtrKeySortT); #endif
#endif
+EXTERN_C MIR_APP_DLL(HINSTANCE) GetInstByAddress(void* codePtr);
+EXTERN_C MIR_APP_DLL(CMPluginBase*) GetPluginByLangId(int hLangpack);
+EXTERN_C MIR_APP_DLL(CMPluginBase&) GetPluginByInstance(HINSTANCE hInst);
+
#endif // M_NEWPLUGINAPI_H__
|