summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-10-03 16:48:12 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-10-03 16:48:12 +0000
commit0976190894d653d5062f8ef6befabf46218f2d24 (patch)
tree4a26f4baa9a535256d7220a0c04a698390cab4e5 /utils
parent3c4ccf82586be6b22380df2bc35ae4770f91651f (diff)
- inlined helpers for fonts, colors & effects creation replaced with functions;
- services for getting fonts, colors & effects removed; - some memory corruptions removed git-svn-id: http://svn.miranda-ng.org/main/trunk@17347 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'utils')
-rw-r--r--utils/mir_fonts.cpp23
-rw-r--r--utils/mir_fonts.h3
2 files changed, 2 insertions, 24 deletions
diff --git a/utils/mir_fonts.cpp b/utils/mir_fonts.cpp
index 9b8c32cb23..d8b7056adf 100644
--- a/utils/mir_fonts.cpp
+++ b/utils/mir_fonts.cpp
@@ -30,19 +30,10 @@ int FontService_RegisterFont(const char *pszDbModule, const char *pszDbName, con
fid.deffontsettings.charset = plfDefault->lfCharSet;
mir_wstrncpy(fid.deffontsettings.szFace, plfDefault->lfFaceName, _countof(fid.deffontsettings.szFace)); /* buffer safe */
}
- FontRegisterW(&fid);
+ Font_RegisterW(&fid);
return 0;
}
-int FontService_GetFont(const wchar_t *pszSection, const wchar_t *pszDescription, COLORREF *pclr, LOGFONT *plf)
-{
- FontIDW fid = { 0 };
- mir_wstrncpy(fid.group, pszSection, _countof(fid.group)); /* buffer sfae */
- mir_wstrncpy(fid.name, pszDescription, _countof(fid.name)); /* buffer safe */
- *pclr = (COLORREF)CallService(MS_FONT_GETW, (WPARAM)&fid, (LPARAM)plf); /* uses fallback font on error */
- return (int)*pclr == -1;
-}
-
int FontService_RegisterColor(const char *pszDbModule, const char *pszDbName, const wchar_t *pszSection, const wchar_t *pszDescription, COLORREF clrDefault)
{
ColourIDW cid = { 0 };
@@ -52,16 +43,6 @@ int FontService_RegisterColor(const char *pszDbModule, const char *pszDbName, co
mir_strncpy(cid.setting, pszDbName, sizeof(cid.setting)); /* buffer safe */
mir_wstrncpy(cid.group, pszSection, _countof(cid.group)); /* buffer safe */
mir_wstrncpy(cid.name, pszDescription, _countof(cid.name)); /* buffer safe */
- ColourRegisterW(&cid);
+ Colour_RegisterW(&cid);
return 0;
}
-
-int FontService_GetColor(const wchar_t *pszSection, const wchar_t *pszDescription, COLORREF *pclr)
-{
- ColourIDW cid = { 0 };
- cid.cbSize = sizeof(cid);
- wcsncpy_s(cid.group, pszSection, _TRUNCATE);
- wcsncpy_s(cid.name, pszDescription, _TRUNCATE);
- *pclr = (COLORREF)CallService(MS_COLOUR_GETW, (WPARAM)&cid, 0);
- return (int)*pclr == -1;
-}
diff --git a/utils/mir_fonts.h b/utils/mir_fonts.h
index b85b82ce74..2f7226777e 100644
--- a/utils/mir_fonts.h
+++ b/utils/mir_fonts.h
@@ -1,6 +1,3 @@
int FontService_RegisterFont(const char *pszDbModule, const char *pszDbName, const TCHAR *pszSection, const TCHAR *pszDescription, const TCHAR* pszBackgroundGroup, const TCHAR* pszBackgroundName, int position, BOOL bAllowEffects, LOGFONT *plfDefault, COLORREF clrDefault);
-int FontService_GetFont(const TCHAR *pszSection, const TCHAR *pszDescription, COLORREF *pclr, LOGFONT *plf);
-
int FontService_RegisterColor(const char *pszDbModule,const char *pszDbName,const TCHAR *pszSection,const TCHAR *pszDescription,COLORREF clrDefault);
-int FontService_GetColor(const TCHAR *pszSection,const TCHAR *pszDescription,COLORREF *pclr);