コード例 #1
0
ファイル: srigintr.cpp プロジェクト: ebknudsen/SRW
//HOST_IMPORT void main(IORecHandle ioRecHandle)
HOST_IMPORT int main(IORecHandle ioRecHandle) //OC030110, required for GCC 4.2 Mac OSX
{
	//#ifdef applec					// For MPW C for 68K only.
	//	void _DATAINIT(void);
	//	_DATAINIT();				// For MPW C only.
	//	UnloadSeg(_DATAINIT);
	//#endif
	
	//#ifdef XOP_GLOBALS_ARE_A4_BASED
	//	#ifdef __MWERKS__
	//		SetCurrentA4();							// Set up correct A4. This allows globals to work.
	//		SendXOPA4ToIgor(ioRecHandle, GetA4());	// And communicate it to Igor.
	//	#endif
	//#endif

	//LoadXOPSegs();
	XOPInit(ioRecHandle);							// Do standard XOP initialization.
	SetXOPEntry(XOPEntry);							// Set entry point for future calls.
	
	if(igorVersion < 200) SetXOPResult(OLD_IGOR);
	else SetXOPResult(0L);
	
	SetXOPType(RESIDENT | IDLES);
	SR.Initialize();
	srYield.Init(0.5);

	srUtiProgrIndFuncSet(&(srTIgorSend::ShowCompProgress));
	srUtiWfrExtModifFuncSet(&(srTIgorSend::WfrModify));
	srUtiOptElemGetInfByNameFuncSet(&(srTIgorSend::GetOptElemInfByName));

	return 0;
}
コード例 #2
0
ファイル: MenuXOP1.cpp プロジェクト: prheenan/IgorUtil
/*	XOPMain(ioRecHandle)

	This is the initial entry point at which the host application calls XOP.
	The message sent by the host must be INIT.

	main does any necessary initialization and then sets the XOPEntry field of the
	ioRecHandle to the address to be called for future messages.
*/
HOST_IMPORT int
XOPMain(IORecHandle ioRecHandle)				// The use of XOPMain rather than main means this XOP requires Igor Pro 6.20 or later
{
	int err;
	
	XOPInit(ioRecHandle);						// Do standard XOP initialization.
	if (igorVersion < 620) {
		SetXOPResult(OLD_IGOR);
		return EXIT_FAILURE;
	}
	
	if (err = RegisterMenuXOP1()) {
		SetXOPResult(err);
		return EXIT_FAILURE;
	}
	
	SetXOPEntry(XOPEntry);						// Set entry point for future calls.
	SetXOPType(RESIDENT);						// Specify XOP to stick around and to Idle.
	
	mainMenuHandle = ResourceMenuIDToMenuHandle(MAINMENU_ID);
	
	SetXOPResult(0L);
	return EXIT_SUCCESS;
}