int LoadCLCModule(void) { bModuleInitialized = true; g_IconWidth = g_iIconSX; g_IconHeight = g_iIconSY; hClcWindowList = WindowList_Create(); hShowInfoTipEvent = CreateHookableEvent(ME_CLC_SHOWINFOTIP); hHideInfoTipEvent = CreateHookableEvent(ME_CLC_HIDEINFOTIP); CreateServiceFunction(MS_CLC_SETINFOTIPHOVERTIME, SetInfoTipHoverTime); CreateServiceFunction(MS_CLC_GETINFOTIPHOVERTIME, GetInfoTipHoverTime); InitFileDropping(); arEvents.insert(HookEvent(ME_SYSTEM_MODULESLOADED, ClcModulesLoaded)); arEvents.insert(HookEvent(ME_PROTO_ACCLISTCHANGED, ClcAccountsChanged)); arEvents.insert(HookEvent(ME_DB_CONTACT_SETTINGCHANGED, ClcSettingChanged)); arEvents.insert(HookEvent(ME_DB_CONTACT_ADDED, ClcContactAdded)); arEvents.insert(HookEvent(ME_DB_CONTACT_DELETED, ClcContactDeleted)); arEvents.insert(HookEvent(ME_CLIST_CONTACTICONCHANGED, ClcContactIconChanged)); arEvents.insert(HookEvent(ME_SKIN_ICONSCHANGED, ClcIconsChanged)); arEvents.insert(HookEvent(ME_PROTO_ACK, ClcProtoAck)); InitCustomMenus(); return 0; }
extern "C" int __declspec(dllexport) CListInitialise() { mir_getCLI(); coreCli = *pcli; pcli->hInst = g_hInst; pcli->pfnPaintClc = PaintClc; pcli->pfnContactListWndProc = ContactListWndProc; pcli->pfnContactListControlWndProc = ContactListControlWndProc; pcli->pfnRebuildEntireList = RebuildEntireList; pcli->pfnSetGroupExpand = SetGroupExpand; pcli->pfnRecalcScrollBar = RecalcScrollBar; pcli->pfnScrollTo = ScrollTo; pcli->pfnLoadClcOptions = LoadClcOptions; pcli->pfnGetRowHeight = GetRowHeight; pcli->pfnSortCLC = SortCLC; CreateServiceFunction(MS_CLIST_GETSTATUSMODE, GetStatusMode); HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); HookEvent(ME_PROTO_ACCLISTCHANGED, OnAccountsChanged); HookEvent(ME_OPT_INITIALISE, OnOptsInit); InitCustomMenus(); return 0; }
int LoadContactListModule(void) { HookEvent(ME_SYSTEM_SHUTDOWN, ContactListShutdownProc); CreateServiceFunction(MS_CLIST_GETSTATUSMODE, GetStatusMode); hSvc_GetContactStatusMsg = CreateServiceFunction("CList/GetContactStatusMsg", GetContactStatusMessage); InitCustomMenus(); return 0; }
HRESULT CluiLoadModule() { CreateServiceFunction(MS_CLUI_GETCAPS,CLUIGetCapsService); InitDisplayNameCache(); hookSystemShutdown_CListMod = ModernHookEvent(ME_SYSTEM_SHUTDOWN,CListMod_ContactListShutdownProc); hookOptInitialise_CList = ModernHookEvent(ME_OPT_INITIALISE,CListOptInit); hookOptInitialise_Skin = ModernHookEvent(ME_OPT_INITIALISE,SkinOptInit); CreateServiceFunction("ModernSkinSel/Active", SvcActiveSkin); CreateServiceFunction("ModernSkinSel/Preview", SvcPreviewSkin); CreateServiceFunction("ModernSkinSel/Apply", SvcApplySkin); hookContactAdded_CListSettings = ModernHookEvent(ME_DB_CONTACT_ADDED,ContactAdded); CreateServiceFunction(MS_CLIST_TRAYICONPROCESSMESSAGE,cli_TrayIconProcessMessage); CreateServiceFunction(MS_CLIST_PAUSEAUTOHIDE,TrayIconPauseAutoHide); CreateServiceFunction(MS_CLIST_CONTACTCHANGEGROUP,ContactChangeGroup); CreateServiceFunction(MS_CLIST_TOGGLEHIDEOFFLINE,ToggleHideOffline); CreateServiceFunction(MS_CLIST_TOGGLEGROUPS,ToggleGroups); CreateServiceFunction(MS_CLIST_TOGGLESOUNDS,ToggleSounds); CreateServiceFunction(MS_CLIST_SETUSEGROUPS,SetUseGroups); CreateServiceFunction(MS_CLIST_GETCONTACTICON,GetContactIcon); MySetProcessWorkingSetSize=(BOOL (WINAPI*)(HANDLE,SIZE_T,SIZE_T))GetProcAddress(GetModuleHandle(TEXT("kernel32")),"SetProcessWorkingSetSize"); hCListImages = ImageList_Create(16, 16, ILC_MASK|ILC_COLOR32, 32, 0); InitCustomMenus(); InitTray(); { HINSTANCE hUser = GetModuleHandleA("USER32"); MyMonitorFromPoint = ( pfnMyMonitorFromPoint )GetProcAddress( hUser,"MonitorFromPoint" ); MyMonitorFromWindow = ( pfnMyMonitorFromWindow )GetProcAddress( hUser, "MonitorFromWindow" ); #if defined( _UNICODE ) MyGetMonitorInfo = ( pfnMyGetMonitorInfo )GetProcAddress( hUser, "GetMonitorInfoW"); #else MyGetMonitorInfo = ( pfnMyGetMonitorInfo )GetProcAddress( hUser, "GetMonitorInfoA"); #endif } CLUI::InitClui(); return S_OK; }
extern "C" __declspec(dllexport) int CListInitialise() { mir_getLP(&pluginInfo); mir_getCLI(); g_bSortByStatus = db_get_b(NULL, "CList", "SortByStatus", SETTING_SORTBYSTATUS_DEFAULT); g_bSortByProto = db_get_b(NULL, "CList", "SortByProto", SETTING_SORTBYPROTO_DEFAULT); coreCli = *pcli; pcli->hInst = g_hInst; pcli->pfnPaintClc = PaintClc; pcli->pfnLoadClcOptions = LoadClcOptions; pcli->pfnCompareContacts = CompareContacts; CreateServiceFunction(MS_CLIST_GETSTATUSMODE, GetStatusMode); HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); HookEvent(ME_PROTO_ACCLISTCHANGED, OnAccountsChanged); HookEvent(ME_OPT_INITIALISE, OnOptsInit); InitCustomMenus(); return 0; }
int LoadContactListModule(void) { HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); while (hContact!=NULL) { DBWriteContactSettingString(hContact, "CList", "StatusMsg", ""); hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0); } hCListImages = (HIMAGELIST)CallService(MS_CLIST_GETICONSIMAGELIST, 0, 0); DefaultImageListColorDepth=DBGetContactSettingDword(NULL,"CList","DefaultImageListColorDepth",ILC_COLOR32); hProtoAckHook = (HANDLE) HookEvent(ME_PROTO_ACK, ProtocolAck); HookEvent(ME_OPT_INITIALISE,CListOptInit); HookEvent(ME_SYSTEM_SHUTDOWN,ContactListShutdownProc); hSettingChanged=HookEvent(ME_DB_CONTACT_SETTINGCHANGED,ContactSettingChanged); hContactIconChangedEvent=CreateHookableEvent(ME_CLIST_CONTACTICONCHANGED); CreateServiceFunction(MS_CLIST_CONTACTCHANGEGROUP,ContactChangeGroup); CreateServiceFunction(MS_CLIST_HOTKEYSPROCESSMESSAGE,HotkeysProcessMessage); CreateServiceFunction(MS_CLIST_GETSTATUSMODE, GetStatusMode); InitCustomMenus(); InitTrayMenus(); return 0; }
int LoadContactListModule(void) { /* HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); while (hContact!=NULL) { DBWriteContactSettingString(hContact, "CList", "StatusMsg", ""); hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0); } */ HookEvent(ME_SYSTEM_SHUTDOWN,ContactListShutdownProc); HookEvent(ME_SYSTEM_MODULESLOADED,ContactListModulesLoaded); HookEvent(ME_OPT_INITIALISE,CListOptInit); HookEvent(ME_OPT_INITIALISE,SkinOptInit); hSettingChanged=HookEvent(ME_DB_CONTACT_SETTINGCHANGED,ContactSettingChanged); HookEvent(ME_DB_CONTACT_ADDED,ContactAdded); HookEvent(ME_DB_CONTACT_DELETED,ContactDeleted); hProtoAckHook=(HANDLE)HookEvent(ME_PROTO_ACK,ProtocolAck); hContactDoubleClicked=CreateHookableEvent(ME_CLIST_DOUBLECLICKED); hStatusModeChangeEvent=CreateHookableEvent(ME_CLIST_STATUSMODECHANGE); hContactIconChangedEvent=CreateHookableEvent(ME_CLIST_CONTACTICONCHANGED); CreateServiceFunction(MS_CLIST_CONTACTDOUBLECLICKED,ContactDoubleClicked); CreateServiceFunction(MS_CLIST_CONTACTFILESDROPPED,ContactFilesDropped); CreateServiceFunction(MS_CLIST_SETSTATUSMODE,SetStatusMode); CreateServiceFunction(MS_CLIST_GETSTATUSMODE,GetStatusMode); CreateServiceFunction(MS_CLIST_GETSTATUSMODEDESCRIPTION,GetStatusModeDescription); CreateServiceFunction(MS_CLIST_GETCONTACTDISPLAYNAME,GetContactDisplayName); CreateServiceFunction(MS_CLIST_INVALIDATEDISPLAYNAME,InvalidateDisplayName); CreateServiceFunction(MS_CLIST_TRAYICONPROCESSMESSAGE,TrayIconProcessMessage); CreateServiceFunction(MS_CLIST_PAUSEAUTOHIDE,TrayIconPauseAutoHide); CreateServiceFunction(MS_CLIST_CONTACTSCOMPARE,CompareContacts); CreateServiceFunction(MS_CLIST_CONTACTCHANGEGROUP,ContactChangeGroup); CreateServiceFunction(MS_CLIST_SHOWHIDE,ShowHide); CreateServiceFunction(MS_CLIST_SETHIDEOFFLINE,SetHideOffline); CreateServiceFunction(MS_CLIST_TOGGLEHIDEOFFLINE,ToggleHideOffline); CreateServiceFunction(MS_CLIST_DOCKINGPROCESSMESSAGE,Docking_ProcessWindowMessage); CreateServiceFunction(MS_CLIST_DOCKINGISDOCKED,Docking_IsDocked); CreateServiceFunction(MS_CLIST_HOTKEYSPROCESSMESSAGE,HotkeysProcessMessage); CreateServiceFunction(MS_CLIST_GETCONTACTICON,GetContactIcon); MySetProcessWorkingSetSize=(BOOL (WINAPI*)(HANDLE,SIZE_T,SIZE_T))GetProcAddress(GetModuleHandle(TEXT("kernel32")),"SetProcessWorkingSetSize"); hCListImages = ImageList_Create(16, 16, ILC_MASK|ILC_COLOR32, 32, 0); InitDisplayNameCache(&lContactsCache); InitCListEvents(); InitCustomMenus(); InitGroupServices(); InitTray(); { CLISTMENUITEM mi; ZeroMemory(&mi,sizeof(mi)); mi.cbSize=sizeof(mi); CreateServiceFunction("CList/DeleteContactCommand",MenuItem_DeleteContact); mi.position=2000070000; mi.flags=0; mi.hIcon=LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_DELETE)); mi.pszContactOwner=NULL; //on every contact mi.pszName=Translate("De&lete"); mi.pszService="CList/DeleteContactCommand"; CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&mi); CreateServiceFunction("CList/AddToListContactCommand",MenuItem_AddContactToList); mi.position=-2050000000; mi.flags=CMIF_NOTONLIST; mi.hIcon=LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_ADDCONTACT)); mi.pszName=Translate("&Add permanently to list"); mi.pszService="CList/AddToListContactCommand"; CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&mi); } HookEvent(ME_SKIN_ICONSCHANGED,CListIconsChanged); CreateServiceFunction(MS_CLIST_GETICONSIMAGELIST,GetIconsImageList); ImageList_AddIcon(hCListImages, LoadIcon(GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_BLANK))); { int i; for(i=0;i<sizeof(statusModeList)/sizeof(statusModeList[0]);i++) ImageList_AddIcon(hCListImages, LoadSkinnedIcon(skinIconStatusList[i])); } //see IMAGE_GROUP... in clist.h if you add more images above here ImageList_AddIcon(hCListImages, LoadSkinnedIcon(SKINICON_OTHER_GROUPOPEN)); ImageList_AddIcon(hCListImages, LoadSkinnedIcon(SKINICON_OTHER_GROUPSHUT)); //InitGroupMenus(); return 0; }