当前位置: 首页>>代码示例>>C++>>正文


C++ CreateHookableEvent函数代码示例

本文整理汇总了C++中CreateHookableEvent函数的典型用法代码示例。如果您正苦于以下问题:C++ CreateHookableEvent函数的具体用法?C++ CreateHookableEvent怎么用?C++ CreateHookableEvent使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了CreateHookableEvent函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: LoadExtraIconsModule

void LoadExtraIconsModule()
{
	DWORD ret = CallService(MS_CLUI_GETCAPS, CLUICAPS_FLAGS2, 0);
	clistFirstSlot = HIWORD(ret);
	clistSlotCount = LOWORD(ret);

	// Services
	CreateServiceFunction(MS_CLIST_EXTRA_ADD_ICON, svcExtraIcon_Add);

	hEventExtraClick = CreateHookableEvent(ME_CLIST_EXTRA_CLICK);
	hEventExtraImageApplying = CreateHookableEvent(ME_CLIST_EXTRA_IMAGE_APPLY);
	hEventExtraImageListRebuilding = CreateHookableEvent(ME_CLIST_EXTRA_LIST_REBUILD);

	// Icons
	Icon_Register(g_hInst, LPGEN("Contact list"), iconList, _countof(iconList));

	// Hooks
	HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);

	HookEvent(ME_CLIST_EXTRA_LIST_REBUILD, ClistExtraListRebuild);
	HookEvent(ME_CLIST_EXTRA_IMAGE_APPLY, ClistExtraImageApply);
	HookEvent(ME_CLIST_EXTRA_CLICK, ClistExtraClick);

	DefaultExtraIcons_Load();
}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:25,代码来源:extraicons.cpp

示例2: LoadChatModule

int LoadChatModule(void)
{
	InitializeCriticalSection(&cs);

	HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
	HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown);
	HookEvent(ME_SKIN_ICONSCHANGED, IconsChanged);

	CreateServiceFunction(MS_GC_REGISTER, Service_Register);
	CreateServiceFunction(MS_GC_NEWSESSION, Service_NewChat);
	CreateServiceFunction(MS_GC_EVENT, Service_AddEvent);
	CreateServiceFunction(MS_GC_GETEVENTPTR, Service_GetAddEventPtr);
	CreateServiceFunction(MS_GC_GETINFO, Service_GetInfo);
	CreateServiceFunction(MS_GC_GETSESSIONCOUNT, Service_GetCount);

	CreateServiceFunction("GChat/DblClickEvent", EventDoubleclicked);
	CreateServiceFunction("GChat/PrebuildMenuEvent", PrebuildContactMenuSvc);
	CreateServiceFunction("GChat/JoinChat", JoinChat);
	CreateServiceFunction("GChat/LeaveChat", LeaveChat);
	CreateServiceFunction("GChat/GetInterface", SvcGetChatManager);

	ci.hSendEvent = CreateHookableEvent(ME_GC_EVENT);
	ci.hBuildMenuEvent = CreateHookableEvent(ME_GC_BUILDMENU);
	hHookEvent = CreateHookableEvent(ME_GC_HOOK_EVENT);

	HookEvent(ME_FONT_RELOAD, FontsChanged);
	HookEvent(ME_SKIN2_ICONSCHANGED, IconsChanged);

	bInited = true;
	return 0;
}
开发者ID:Ganster41,项目名称:miranda-ng,代码行数:31,代码来源:chat_svc.cpp

示例3: LoadPluginOptions

void LoadPluginOptions()
{
	bOldMode = db_get_b(NULL, "Options", "OldPluginSettings", false) != 0;

	hevLoadModule = CreateHookableEvent(ME_SYSTEM_MODULELOAD);
	hevUnloadModule = CreateHookableEvent(ME_SYSTEM_MODULEUNLOAD);
}
开发者ID:truefriend-cz,项目名称:miranda-ng,代码行数:7,代码来源:pluginopts.cpp

示例4: Load

extern "C" FONTSERVICE_API int Load(PLUGINLINK *link)
{
	pluginLink=link;
    memset(&memoryManagerInterface, 0, sizeof(memoryManagerInterface));
    memoryManagerInterface.cbSize = sizeof(memoryManagerInterface);
    CallService(MS_SYSTEM_GET_MMI, 0, (LPARAM) & memoryManagerInterface);

	HookEvent(ME_OPT_INITIALISE, OptInit);

	CreateServiceFunction(MS_FONT_REGISTER, RegisterFont);
	CreateServiceFunction(MS_FONT_GET, GetFont);

	CreateServiceFunction(MS_COLOUR_REGISTER, RegisterColour);
	CreateServiceFunction(MS_COLOUR_GET, GetColour);

	CreateServiceFunction(MS_FONT_REGISTERW, RegisterFontW);
	CreateServiceFunction(MS_FONT_GETW, GetFontW);

	CreateServiceFunction(MS_COLOUR_REGISTERW, RegisterColourW);
	CreateServiceFunction(MS_COLOUR_GETW, GetColourW);

	hFontReloadEvent = CreateHookableEvent(ME_FONT_RELOAD);
	hColourReloadEvent = CreateHookableEvent(ME_COLOUR_RELOAD);

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

	// do last for silly dyna plugin
	HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
	return 0;
}
开发者ID:darkscout,项目名称:sje-miranda-plugins,代码行数:31,代码来源:FontService.cpp

示例5: ModulesLoaded

int ModulesLoaded(WPARAM, LPARAM)
{
	HookEvent(ME_OPT_INITIALISE, OptInitialise);

	hHookDisplayDataAlert = CreateHookableEvent(ME_DISPLAYDATA_ALERT);
	HookEvent(ME_DISPLAYDATA_ALERT, DataWndAlertCommand);

	hHookAlertPopup = CreateHookableEvent(ME_POPUP_ALERT);
	HookEvent(ME_POPUP_ALERT, PopupAlert);

	hHookErrorPopup = CreateHookableEvent(ME_POPUP_ERROR);
	HookEvent(ME_POPUP_ERROR, ErrorMsgs);

	hHookAlertOSD = CreateHookableEvent(ME_OSD_ALERT);
	HookEvent(ME_OSD_ALERT, OSDAlert);

	FontSettings();
	h_font = CreateFontIndirect(&lf);

	// get data on startup
	if ( db_get_b(NULL, MODULENAME, UPDATE_ONSTART_KEY, 0))
		mir_forkthread(StartUpdate, NULL);

	return 0;
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:25,代码来源:webview.cpp

示例6: InitAPI

static void TSAPI InitAPI()
{
	CreateServiceFunction(MS_MSG_SENDMESSAGE,     SendMessageCommand);
	CreateServiceFunction(MS_MSG_SENDMESSAGE "W", SendMessageCommand_W);
	CreateServiceFunction(MS_MSG_GETWINDOWAPI,    GetWindowAPI);
	CreateServiceFunction(MS_MSG_GETWINDOWCLASS,  GetWindowClass);
	CreateServiceFunction(MS_MSG_GETWINDOWDATA,   GetWindowData);
	CreateServiceFunction(MS_MSG_SETSTATUSTEXT,   SetStatusText);

	CreateServiceFunction("SRMsg/ReadMessage",    ReadMessageCommand);
	CreateServiceFunction("SRMsg/TypingMessage",  TypingMessageCommand);
	CreateServiceFunction(MS_TABMSG_SETUSERPREFS, SetUserPrefs);
	CreateServiceFunction(MS_TABMSG_TRAYSUPPORT,  Service_OpenTrayMenu);
	CreateServiceFunction(MS_TABMSG_SLQMGR,       CSendLater::svcQMgr);

	CreateServiceFunction(MS_MSG_MOD_GETWINDOWFLAGS, GetMessageWindowFlags);
	CreateServiceFunction(MS_MSG_MOD_MESSAGEDIALOGOPENED, MessageWindowOpened);

	SI_InitStatusIcons();
	CB_InitCustomButtons();

	/*
	 * the event API
	 */

	PluginConfig.m_event_MsgWin = CreateHookableEvent(ME_MSG_WINDOWEVENT);
	PluginConfig.m_event_MsgPopup = CreateHookableEvent(ME_MSG_WINDOWPOPUP);
	PluginConfig.m_event_WriteEvent = CreateHookableEvent(ME_MSG_PRECREATEEVENT);
}
开发者ID:slotwin,项目名称:miranda-ng,代码行数:29,代码来源:msgs.cpp

示例7: LoadExtraIconsModule

void LoadExtraIconsModule()
{
	DWORD ret = CallService(MS_CLUI_GETCAPS, CLUICAPS_FLAGS2, 0);
	clistFirstSlot = HIWORD(ret);
	clistSlotCount = LOWORD(ret);

	// Services
	CreateServiceFunction(MS_EXTRAICON_REGISTER, &ExtraIcon_Register);
	CreateServiceFunction(MS_EXTRAICON_SET_ICON, &ExtraIcon_SetIcon);
	CreateServiceFunction(MS_EXTRAICON_SET_ICON_BY_NAME, &ExtraIcon_SetIconByName);

	CreateServiceFunction(MS_CLIST_EXTRA_ADD_ICON, &svcExtraIcon_Add);

	hEventExtraClick = CreateHookableEvent(ME_CLIST_EXTRA_CLICK);
	hEventExtraImageApplying = CreateHookableEvent(ME_CLIST_EXTRA_IMAGE_APPLY);
	hEventExtraImageListRebuilding = CreateHookableEvent(ME_CLIST_EXTRA_LIST_REBUILD);

	// Icons
	Icon_Register(NULL, "Contact List", iconList, SIZEOF(iconList));

	// Hooks
	HookEvent(ME_SYSTEM_MODULESLOADED, &ModulesLoaded);

	HookEvent(ME_CLIST_EXTRA_LIST_REBUILD, &ClistExtraListRebuild);
	HookEvent(ME_CLIST_EXTRA_IMAGE_APPLY, &ClistExtraImageApply);
	HookEvent(ME_CLIST_EXTRA_CLICK, &ClistExtraClick);

	DefaultExtraIcons_Load();
}
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:29,代码来源:extraicons.cpp

示例8: __declspec

extern "C" int __declspec(dllexport) Load(void) 
{
	mir_getLP(&pluginInfoEx);

	// initialize global variables
	InitVar();

	// load options and set defaults
	LoadOptions();

	// reset the weather data at startup for individual contacts
	EraseAllInfo();

	// load weather update data
	LoadWIData(true);

	// set status to online if "Do not display weather condition as protocol status" is enabled
	old_status = status = ID_STATUS_OFFLINE;

	// add an event on weather update and error
	hHookWeatherUpdated = CreateHookableEvent(ME_WEATHER_UPDATED);
	hHookWeatherError = CreateHookableEvent(ME_WEATHER_ERROR);

	// initialize options and network
	HookEvent(ME_OPT_INITIALISE, OptInit);
	HookEvent(ME_SYSTEM_MODULESLOADED, WeatherInit);
	HookEvent(ME_DB_CONTACT_DELETED, ContactDeleted);
	HookEvent(ME_CLIST_DOUBLECLICKED, BriefInfo);
	HookEvent(ME_WEATHER_UPDATED, WeatherPopup);
	HookEvent(ME_WEATHER_ERROR, WeatherError);
	HookEvent(ME_SYSTEM_PRESHUTDOWN, WeatherShutdown);
	HookEvent(ME_CLIST_PREBUILDCONTACTMENU, BuildContactMenu);

	hDataWindowList = WindowList_Create();
	hWindowList = WindowList_Create();

	hUpdateMutex = CreateMutex(NULL, FALSE, NULL);

	// register weather protocol
	PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE };
	pd.szName = WEATHERPROTONAME;
	pd.type = (opt.NoProtoCondition) ? PROTOTYPE_VIRTUAL : PROTOTYPE_PROTOCOL;
	CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd);

	// initialize weather protocol services
	InitServices();

	// add sound event
	SkinAddNewSoundExT("weatherupdated", _T(WEATHERPROTONAME), LPGENT("Weather Condition Changed"));
	SkinAddNewSoundExT("weatheralert", _T(WEATHERPROTONAME), LPGENT("Weather Alert Issued"));

	// window needed for popup commands
	TCHAR SvcFunc[100];
	mir_sntprintf(SvcFunc, SIZEOF(SvcFunc), _T("%s__PopupWindow"), _T(WEATHERPROTONAME));
	hPopupWindow = CreateWindowEx(WS_EX_TOOLWINDOW, _T("static"), SvcFunc, 0, CW_USEDEFAULT, CW_USEDEFAULT,
		CW_USEDEFAULT, CW_USEDEFAULT, HWND_DESKTOP, NULL, hInst, NULL);
	SetWindowLongPtr(hPopupWindow, GWLP_WNDPROC, (LONG_PTR)PopupWndProc);
	return 0; 
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:59,代码来源:weather.cpp

示例9: CreateHookableEvents

static HRESULT CreateHookableEvents()
{
	g_CluiData.hEventBkgrChanged = CreateHookableEvent(ME_BACKGROUNDCONFIG_CHANGED);
	g_CluiData.hEventStatusBarShowToolTip = CreateHookableEvent(ME_CLIST_FRAMES_SB_SHOW_TOOLTIP);
	g_CluiData.hEventStatusBarHideToolTip = CreateHookableEvent(ME_CLIST_FRAMES_SB_HIDE_TOOLTIP);
	g_CluiData.hEventSkinServicesCreated = CreateHookableEvent(ME_SKIN_SERVICESCREATED);
	return S_OK;
}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:8,代码来源:init.cpp

示例10: LoadExtraImageFunc

void LoadExtraImageFunc()
{
	CreateServiceFunction(MS_CLIST_EXTRA_SET_ICON,SetIconForExtraColumn); 
	CreateServiceFunction(MS_CLIST_EXTRA_ADD_ICON,AddIconToExtraImageList); 

	hExtraImageListRebuilding=CreateHookableEvent(ME_CLIST_EXTRA_LIST_REBUILD);
	hExtraImageApplying=CreateHookableEvent(ME_CLIST_EXTRA_IMAGE_APPLY);
	hExtraImageClick=CreateHookableEvent(ME_CLIST_EXTRA_CLICK);
	HookEvent(ME_SKIN2_ICONSCHANGED,OnIconLibIconChanged);
}
开发者ID:dineshkummarc,项目名称:miranda-im-v0.9.47-src,代码行数:10,代码来源:extraimage.c

示例11: MTLASSERT

void CAVSessionController::Initialize(void)
{
    MTLASSERT(0 == m_hCallStateChanged);

    char eventName[300];
    mir_snprintf(eventName, sizeof(eventName), "%s%s", g_env.ProtocolName(), ME_SIPRTC_CALL_STATE_CHANGED);
    m_hCallStateChanged = CreateHookableEvent(eventName);
    mir_snprintf(eventName, sizeof(eventName), "%s%s", g_env.ProtocolName(), PE_VOICE_CALL_STATE);
    m_hVoiceStateEvent = CreateHookableEvent(eventName);
}
开发者ID:BackupTheBerlios,项目名称:mgoodies-svn,代码行数:10,代码来源:avsessioncontroller.cpp

示例12: Core_Mainloop_Init

void Core_Mainloop_Init()
{
	hMainLoopInnerBefore = CreateHookableEvent(EVENT_CORE_MAINLOOP_BEFORE);
	hMainLoopInnerAfter = CreateHookableEvent(EVENT_CORE_MAINLOOP_AFTER);

	if (hMainLoopInnerBefore && hMainLoopInnerAfter) {
		SetHookInitializer(hMainLoopInnerBefore, HookFunctions);
		SetHookInitializer(hMainLoopInnerAfter, HookFunctions);
	}
}
开发者ID:PsiOmegaDelta,项目名称:nwnx2-linux,代码行数:10,代码来源:Mainloop.cpp

示例13: InitContacts

int InitContacts(void)
{
	CreateServiceFunction(MS_DB_CONTACT_GETCOUNT,GetContactCount);
	CreateServiceFunction(MS_DB_CONTACT_FINDFIRST,FindFirstContact);
	CreateServiceFunction(MS_DB_CONTACT_FINDNEXT,FindNextContact);
	CreateServiceFunction(MS_DB_CONTACT_DELETE,DeleteContact);
	CreateServiceFunction(MS_DB_CONTACT_ADD,AddContact);
	CreateServiceFunction(MS_DB_CONTACT_IS,IsDbContact);
	hContactDeletedEvent=CreateHookableEvent(ME_DB_CONTACT_DELETED);
	hContactAddedEvent=CreateHookableEvent(ME_DB_CONTACT_ADDED);
	return 0;
}
开发者ID:TonyAlloa,项目名称:miranda-dev,代码行数:12,代码来源:dbcontacts.c

示例14: CB_InitCustomButtons

void CB_InitCustomButtons()
{
	dwSepCount = M.GetDword("TabSRMM_Toolbar", "SeparatorsCount", 0);

	hButtonsBarAddButton = CreateServiceFunction(MS_BB_ADDBUTTON, CB_AddButton);
	hButtonsBarRemoveButton = CreateServiceFunction(MS_BB_REMOVEBUTTON, CB_RemoveButton);
	hButtonsBarModifyButton = CreateServiceFunction(MS_BB_MODIFYBUTTON, CB_ModifyButton);
	hButtonsBarGetButtonState = CreateServiceFunction(MS_BB_GETBUTTONSTATE, CB_GetButtonState);
	hButtonsBarSetButtonState = CreateServiceFunction(MS_BB_SETBUTTONSTATE, CB_SetButtonState);

	hHookToolBarLoadedEvt = CreateHookableEvent(ME_MSG_TOOLBARLOADED);
	hHookButtonPressedEvt = CreateHookableEvent(ME_MSG_BUTTONPRESSED);
}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:13,代码来源:buttonsbar.cpp

示例15: LoadFontserviceModule

int LoadFontserviceModule(void)
{
	code_page = Langpack_GetDefaultCodePage();

	CreateServiceFunction("Font/Register", RegisterFont);
	CreateServiceFunction("Font/RegisterW", RegisterFontW);
	CreateServiceFunction(MS_FONT_GET, GetFont);
	CreateServiceFunction(MS_FONT_GETW, GetFontW);

	CreateServiceFunction("Colour/Register", RegisterColour);
	CreateServiceFunction("Colour/RegisterW", RegisterColourW);
	CreateServiceFunction(MS_COLOUR_GET, GetColour);
	CreateServiceFunction(MS_COLOUR_GETW, GetColourW);

	CreateServiceFunction("Effect/Register", RegisterEffect);
	CreateServiceFunction("Effect/RegisterW", RegisterEffectW);
	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);

	// create generic fonts
	FontIDT fontid = { sizeof(fontid) };
	strncpy(fontid.dbSettingsGroup, "Fonts", sizeof(fontid.dbSettingsGroup));
	_tcsncpy_s(fontid.group, LPGENT("General"), _TRUNCATE);

	_tcsncpy_s(fontid.name, LPGENT("Headers"), _TRUNCATE);
	fontid.flags = FIDF_APPENDNAME | FIDF_NOAS | FIDF_SAVEPOINTSIZE | FIDF_ALLOWEFFECTS | FIDF_CLASSHEADER;
	strncpy(fontid.prefix, "Header", _countof(fontid.prefix));
	FontRegisterT(&fontid);

	_tcsncpy_s(fontid.name, LPGENT("Generic text"), _TRUNCATE);
	fontid.flags = FIDF_APPENDNAME | FIDF_NOAS | FIDF_SAVEPOINTSIZE | FIDF_ALLOWEFFECTS | FIDF_CLASSGENERAL;
	strncpy(fontid.prefix, "Generic", _countof(fontid.prefix));
	FontRegisterT(&fontid);

	_tcsncpy_s(fontid.name, LPGENT("Small text"), _TRUNCATE);
	fontid.flags = FIDF_APPENDNAME | FIDF_NOAS | FIDF_SAVEPOINTSIZE | FIDF_ALLOWEFFECTS | FIDF_CLASSSMALL;
	strncpy(fontid.prefix, "Small", _countof(fontid.prefix));
	FontRegisterT(&fontid);

	// do last for silly dyna plugin
	HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
	HookEvent(ME_SYSTEM_PRESHUTDOWN, OnPreShutdown);
	return 0;
}
开发者ID:kxepal,项目名称:miranda-ng,代码行数:50,代码来源:FontService.cpp


注:本文中的CreateHookableEvent函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。