diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2016-01-06 18:53:11 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2016-01-06 18:53:11 +0000 |
commit | cdfd3e661969e92213e2588863187e291e8ed9d9 (patch) | |
tree | 78682e1dc65e2318f62b16c39670f47625482b2f /src | |
parent | 1b76508b4be6092aa50a324fba432fd2b13c6b86 (diff) |
mir_app: services for reload fonts & colors
git-svn-id: http://svn.miranda-ng.org/main/trunk@16039 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/FontService.cpp | 6 | ||||
-rw-r--r-- | src/mir_app/src/services.cpp | 12 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/mir_app/src/FontService.cpp b/src/mir_app/src/FontService.cpp index 7d553218ad..21790e4369 100644 --- a/src/mir_app/src/FontService.cpp +++ b/src/mir_app/src/FontService.cpp @@ -49,6 +49,9 @@ INT_PTR RegisterEffectW(WPARAM wParam, LPARAM lParam); INT_PTR GetEffect(WPARAM wParam, LPARAM lParam);
INT_PTR GetEffectW(WPARAM wParam, LPARAM lParam);
+INT_PTR ReloadFonts(WPARAM, LPARAM);
+INT_PTR ReloadColours(WPARAM, LPARAM);
+
static int OnModulesLoaded(WPARAM, LPARAM)
{
HookEvent(ME_OPT_INITIALISE, OptInit);
@@ -85,6 +88,9 @@ int LoadFontserviceModule(void) CreateServiceFunction(MS_EFFECT_GET, GetEffect);
CreateServiceFunction(MS_EFFECT_GETW, GetEffectW);
+ CreateServiceFunction(MS_FONT_RELOAD, ReloadFonts);
+ CreateServiceFunction(MS_COLOUR_RELOAD, ReloadColours);
+
hFontReloadEvent = CreateHookableEvent(ME_FONT_RELOAD);
hColourReloadEvent = CreateHookableEvent(ME_COLOUR_RELOAD);
diff --git a/src/mir_app/src/services.cpp b/src/mir_app/src/services.cpp index 2aef865789..22206c3800 100644 --- a/src/mir_app/src/services.cpp +++ b/src/mir_app/src/services.cpp @@ -323,6 +323,12 @@ INT_PTR GetFont(WPARAM wParam, LPARAM lParam) return ret;
}
+INT_PTR ReloadFonts(WPARAM, LPARAM)
+{
+ NotifyEventHooks(hFontReloadEvent, 0, 0);
+ return 0;
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
MIR_APP_DLL(void) KillModuleFonts(int _hLang)
@@ -398,6 +404,12 @@ INT_PTR GetColour(WPARAM wParam, LPARAM) return sttGetColourWorker(&temp);
}
+INT_PTR ReloadColours(WPARAM, LPARAM)
+{
+ NotifyEventHooks(hColourReloadEvent, 0, 0);
+ return 0;
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
MIR_APP_DLL(void) KillModuleColours(int _hLang)
|