#include "headers.h" PLUGINLINK* pluginLink; HINSTANCE g_hInst; LIST_INTERFACE li; MM_INTERFACE mmi; XML_API xi; // {AC8B66B3-AFE1-4475-BABA-49783BA39A66} #define MIID_SKINENGINE { 0xac8b66b3, 0xafe1, 0x4475, { 0xba, 0xba, 0x49, 0x78, 0x3b, 0xa3, 0x9a, 0x66 } } PLUGININFOEX pluginInfo = { sizeof(PLUGININFOEX), "ske", PLUGIN_MAKE_VERSION(0, 0, 0, 3), "ske", "", "nullbie@gmail.com", "(c)", "http://miranda-im.org/", UNICODE_AWARE, 0, // replace internal version (if any) #ifdef _UNICODE // {CE2C0401-F9E0-40d7-8E95-1A4197D7AB04} { 0xce2c0401, 0xf9e0, 0x40d7, { 0x8e, 0x95, 0x1a, 0x41, 0x97, 0xd7, 0xab, 0x4 } } #else // {DE1D765C-9DC2-4679-8633-EDAD492C8479} { 0xde1d765c, 0x9dc2, 0x4679, { 0x86, 0x33, 0xed, 0xad, 0x49, 0x2c, 0x84, 0x79 } } #endif }; BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { g_hInst = hinstDLL; return TRUE; } extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD mirandaVersion) { return &pluginInfo; } extern "C" __declspec(dllexport) const MUUID *MirandaPluginInterfaces(void) { static const MUUID interfaces[] = { MIID_SKINENGINE, MIID_LAST }; return interfaces; } #ifdef _DEBUG const TCHAR *xml =_T( "\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ "); int svcTest(WPARAM, LPARAM) { ISkinDataSource *ds = new CSkinDataSource; SkinRenderParams params = { GetDC(0) }; int bytesProcessed = 0; HXML hXml = xi.parseString(xml, &bytesProcessed, NULL); ISkinElement *obj = SkinCreateObjectFromXml(hXml, ds); obj->Measure(¶ms); obj->Layout(¶ms); obj->Paint(¶ms); obj->Destroy(); xi.destroyNode(hXml); delete ds; return 0; } #endif extern "C" __declspec(dllexport) int Load(PLUGINLINK * link) { pluginLink = link; mir_getLI(&li); mir_getMMI(&mmi); mir_getXI(&xi); #ifdef _DEBUG CreateServiceFunction("SkinEngine/Test", svcTest); CLISTMENUITEM mi = { 0 }; mi.cbSize = sizeof(mi); mi.flags = CMIF_ICONFROMICOLIB; mi.icolibItem = LoadSkinnedIconHandle(SKINICON_OTHER_MIRANDA); mi.position = 1900000000; mi.pszName = LPGEN("Skin engine test"); mi.pszService = "SkinEngine/Test"; CallService( MS_CLIST_ADDMAINMENUITEM, 0, ( LPARAM )&mi ); #endif return 0; } extern "C" __declspec(dllexport) int Unload(void) { return 0; }