コード例 #1
0
extern "C" __declspec(dllexport) int Load(void)
{
	mir_getLP(&pluginInfo);
	mir_getCLI();

	AddIcons();
	RegisterFonts();

	CHAT_MANAGER_INITDATA data = { &g_Settings, sizeof(MODULEINFO), sizeof(SESSION_INFO), LPGENT("Chat module"), FONTMODE_SKIP };
	mir_getCI(&data);
	saveCI = *pci;

	pci->OnAddUser = OnAddUser;
	pci->OnNewUser = OnNewUser;
	pci->OnRemoveUser = OnRemoveUser;

	pci->OnAddStatus = OnAddStatus;
	pci->OnSetStatus = OnSetStatus;
	pci->OnSetTopic = OnSetTopic;

	pci->OnAddLog = OnAddLog;
	pci->OnClearLog = OnClearLog;

	pci->OnCreateModule = OnCreateModule;
	pci->OnOfflineSession = OnOfflineSession;
	pci->OnRemoveSession = OnRemoveSession;
	pci->OnRenameSession = OnRenameSession;
	pci->OnReplaceSession = OnReplaceSession;
	pci->OnDblClickSession = OnDblClickSession;

	pci->OnEventBroadcast = OnEventBroadcast;
	pci->OnLoadSettings = OnLoadSettings;
	pci->OnSetStatusBar = OnSetStatusBar;
	pci->OnFlashWindow = OnFlashWindow;
	pci->OnFlashHighlight = OnFlashHighlight;
	pci->ShowRoom = ShowRoom;

	pci->DoPopup = DoPopup;
	pci->DoTrayIcon = DoTrayIcon;
	pci->ReloadSettings();

	g_hMenu = LoadMenu(g_hInst, MAKEINTRESOURCE(IDR_MENU));
	LoadIcons();
	TabsInit();

	HookEvent(ME_OPT_INITIALISE, OptionsInitialize);
	HookEvent(ME_SYSTEM_SHUTDOWN, OnShutdown);
	return 0;
}
コード例 #2
0
void SkinManager::loadSkin( CFreestyleUIApp&  g_uiApp , string firstScene, bool firstLoad )
{
	
	HRESULT hr;
	string path;

	if(firstLoad)
	{
		ExtractTempSkinInfo();
	}		

	if (CurrentSkin.isCompressed)
	{
		path = CurrentSkin.XZPPath;
	} else {
		path = CurrentSkin.SkinPath;
	}

	RegisterFonts(g_uiApp, path);

	string skinload;
	string sceneload;
	skinload = "file://" + path + "skin.xur";
	sceneload = "file://" + path;


	//DebugMsg("SkinManager","loading %s as default skin", skinload.c_str());
	hr = g_uiApp.LoadSkin( strtowstr(skinload).c_str() );
	if (hr != S_OK)
	{
		DebugMsg("SkinManager", "Skin Loaded with HRESULT : %08x");
		return;
	}
	//DebugMsg("SkinManager","loading %s %s as default scene", sceneload.c_str(),firstScene.c_str());
	hr = g_uiApp.LoadFirstScene( strtowstr(sceneload).c_str(), strtowstr(firstScene).c_str() );
	if (hr != S_OK)
	{
		DebugMsg("SkinManager", "Scene Loaded with HRESULT : %08x");
	}
}
コード例 #3
0
int Chat_ModulesLoaded(WPARAM wParam,LPARAM lParam)
{
	char* mods[3] = { "Chat", "ChatFonts" };
	CallService( "DBEditorpp/RegisterModule", (WPARAM)mods, 2 );

	AddIcons();
	RegisterFonts();
	LoadIcons();

//	g_hIconsChanged2 =	HookEvent(ME_SKIN2_ICONSCHANGED, Chat_IconsChanged);

	if ( ServiceExists( MS_SMILEYADD_SHOWSELECTION )) {
		SmileyAddInstalled = TRUE;
		g_hSmileyOptionsChanged = HookEvent(ME_SMILEYADD_OPTIONSCHANGED, SmileyOptionsChanged);
	}
	if ( ServiceExists( MS_POPUP_ADDPOPUPEX ))
		PopUpInstalled = TRUE;

	if ( ServiceExists( MS_IEVIEW_WINDOW ))
		IEviewInstalled = TRUE;

	CList_SetAllOffline(TRUE);
 	return 0;
}