From cdfd3e661969e92213e2588863187e291e8ed9d9 Mon Sep 17 00:00:00 2001 From: MikalaiR Date: Wed, 6 Jan 2016 18:53:11 +0000 Subject: mir_app: services for reload fonts & colors git-svn-id: http://svn.miranda-ng.org/main/trunk@16039 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_app/src/FontService.cpp | 6 ++++++ src/mir_app/src/services.cpp | 12 ++++++++++++ 2 files changed, 18 insertions(+) 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) -- cgit v1.2.3