From 94dcc72f13094157f344f284aec4edf0c0f5faa1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 11 Aug 2013 10:41:37 +0000 Subject: ProtoGetAvatarFormat, ProtoGetAvatarFileFormat, ProtoGetBufferFormat, ProtoGetAvatarExtension - standard helpers for protocol avatars' processing instead of the zoo that existed previously git-svn-id: http://svn.miranda-ng.org/main/trunk@5645 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AdvaImg/src/main.cpp | 33 +++++++-------------------------- 1 file changed, 7 insertions(+), 26 deletions(-) (limited to 'plugins/AdvaImg/src') diff --git a/plugins/AdvaImg/src/main.cpp b/plugins/AdvaImg/src/main.cpp index cb4500501d..4fcd79905f 100644 --- a/plugins/AdvaImg/src/main.cpp +++ b/plugins/AdvaImg/src/main.cpp @@ -795,12 +795,6 @@ extern "C" BOOL __declspec(dllexport) dib2mempng( BITMAPINFO* pbmi, png_byte* pD return TRUE; } -///////////////////////////////////////////////////////////////////////////////////////// -// Standard Miranda structures & functions - -static HANDLE hDib2mempng = NULL; -static HANDLE hMempng2Dib = NULL; - /////////////////////////////////////////////////////////////////////////////// // Load - initializes the plugin instance @@ -1195,21 +1189,17 @@ void FI_Populate(void) feif.FI_CorrectBitmap32Alpha = FI_CorrectBitmap32Alpha; } -static HANDLE hGetIF, hLoad, hLoadFromMem, hSave, hUnload, hResize, hGetVersion; - static int IMGSERVICE_Load() { FI_Populate(); - hDib2mempng = CreateServiceFunction( MS_DIB2PNG, serviceDib2Png ); - hMempng2Dib = CreateServiceFunction( MS_PNG2DIB, servicePng2Dib ); - hGetIF = CreateServiceFunction(MS_IMG_GETINTERFACE, serviceGetInterface); - hLoad = CreateServiceFunction(MS_IMG_LOAD, serviceLoad); - hLoadFromMem = CreateServiceFunction(MS_IMG_LOADFROMMEM, serviceLoadFromMem); - hSave = CreateServiceFunction(MS_IMG_SAVE, serviceSave); - hUnload = CreateServiceFunction(MS_IMG_UNLOAD, serviceUnload); - hResize = CreateServiceFunction(MS_IMG_RESIZE, serviceBmpFilterResizeBitmap); - hGetVersion = CreateServiceFunction(MS_IMG_GETIFVERSION, serviceGetVersion); + CreateServiceFunction(MS_IMG_GETINTERFACE, serviceGetInterface); + CreateServiceFunction(MS_IMG_LOAD, serviceLoad); + CreateServiceFunction(MS_IMG_LOADFROMMEM, serviceLoadFromMem); + CreateServiceFunction(MS_IMG_SAVE, serviceSave); + CreateServiceFunction(MS_IMG_UNLOAD, serviceUnload); + CreateServiceFunction(MS_IMG_RESIZE, serviceBmpFilterResizeBitmap); + CreateServiceFunction(MS_IMG_GETIFVERSION, serviceGetVersion); return 0; } @@ -1223,15 +1213,6 @@ extern "C" int __declspec(dllexport) Load(void) static int IMGSERVICE_Unload( void ) { - DestroyServiceFunction( hDib2mempng ); - DestroyServiceFunction( hMempng2Dib ); - DestroyServiceFunction( hGetIF ); - DestroyServiceFunction( hLoad ); - DestroyServiceFunction( hLoadFromMem ); - DestroyServiceFunction( hSave ); - DestroyServiceFunction( hUnload ); - DestroyServiceFunction( hResize ); - DestroyServiceFunction( hGetVersion ); return 0; } -- cgit v1.2.3