예제 #1
0
extern "C" int __declspec(dllexport) Load(void)
{
	CallService(MS_IMG_GETINTERFACE, FI_IF_VERSION, (LPARAM)&fii);
	mir_getLP(&pluginInfoEx);
	mir_getCLI();

	iCodePage = Langpack_GetDefaultCodePage();

	InitTranslations();
	InitMessagePump();
	InitOptions();

	// for compatibility with mToolTip status tooltips
	hShowTipService = CreateServiceFunction("mToolTip/ShowTip", ShowTip);

	hShowTipWService = CreateServiceFunction("mToolTip/ShowTipW", ShowTipW);

	hHideTipService = CreateServiceFunction("mToolTip/HideTip", HideTip);

	hEventPreShutdown = HookEvent(ME_SYSTEM_PRESHUTDOWN, Shutdown);
	hEventModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);

	hSettingChangedEvent = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, SettingChanged);
	hEventDeleted = HookEvent(ME_DB_EVENT_DELETED, EventDeleted);

	return 0;
}
예제 #2
0
extern "C" int POPUPS2_API Load(PLUGINLINK *link) {
	pluginLink = link;

	mir_getLI(&li);
	mir_getMMI(&mmi);

	InitMessagePump();
	InitOptions();
	InitNotify();

	hEventPreShutdown = HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown);
	hEventModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);

	/*
	// test popup classes
	PopupClass test = {0};
	test.cbSize = sizeof(test);
	test.flags = PCF_TCHAR;
	test.hIcon = LoadIcon(0, IDI_WARNING);
	test.colorBack = RGB(0, 0, 0);
	test.colorText = RGB(255, 255, 255);
	test.iSeconds = 10;
	test.ptszDescription = TranslateT("Test popup class");
	test.pszName = "popup/testclass";
	CallService(MS_POPUP_REGISTERCLASS, 0, (WPARAM)&test);
	*/

	return 0;
}
예제 #3
0
파일: yapp.cpp 프로젝트: Seldom/miranda-ng
extern "C" int __declspec(dllexport) Load(void)
{
    mir_getLP(&pluginInfo);
    mir_getCLI();

    InitMessagePump();
    InitOptions();
    InitNotify();
    InitFonts();
    InitIcons();
    InitMenuItems();

    HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown);
    HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
    return 0;
}
예제 #4
0
extern "C" int __declspec(dllexport) Load(PLUGINLINK *link) 
{
	pluginLink = link;

	if (mir_getMMI(&mmi) || mir_getLI(&li) || !ServiceExists(MS_IMG_GETINTERFACE))
	{
		MessageBox(NULL, TranslateT("Cannot obtain required interfaces!\nTooltips will not be available until you upgrade Miranda IM to the newest version."), TranslateT("Tipper error"), MB_OK | MB_ICONSTOP);
		return 1;
	}

	CallService(MS_IMG_GETINTERFACE, FI_IF_VERSION, (LPARAM)&fii);
	mir_getTMI(&tmi);
	mir_getLP(&pluginInfoEx);

	if (ServiceExists(MS_LANGPACK_GETCODEPAGE))
		iCodePage = CallService(MS_LANGPACK_GETCODEPAGE, 0, 0);

	InitTranslations();
	InitMessagePump();
	InitOptions();

	// for compatibility with mToolTip status tooltips
	hShowTipService = CreateServiceFunction("mToolTip/ShowTip", ShowTip);
#ifdef _UNICODE
	hShowTipWService = CreateServiceFunction("mToolTip/ShowTipW", ShowTipW);
#endif
	hHideTipService = CreateServiceFunction("mToolTip/HideTip", HideTip);

	hEventPreShutdown = HookEvent(ME_SYSTEM_PRESHUTDOWN, Shutdown);
	hEventModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);

	hSettingChangedEvent = HookEvent(ME_DB_CONTACT_SETTINGCHANGED, SettingChanged);
	hEventDeleted = HookEvent(ME_DB_EVENT_DELETED, EventDeleted);
	
	return 0;
}