/*	GetDataFolderChangeFlags(dataFolderH, flagsP)

	This routine is for use by the WaveMetrics Data Browser only.

	Thread Safety: GetDataFolderChangeFlags is not thread-safe.
*/
int
GetDataFolderChangeFlags(DataFolderHandle dataFolderH, int *flagsP)
{
	if (!CheckRunningInMainThread("GetDataFolderChangeFlags"))
		return 0;
	
	return (int)CallBack2(GET_DATAFOLDER_CHANGEFLAGS, dataFolderH, flagsP);
}
Exemple #2
0
/*	SetDialogBalloonHelpID(balloonHelpID)

	Sets the resource ID for the 'hdlg' resource to be used for contextual help.
	If balloonHelpID is -1, this indicates that no contextual help is to be used.
	
	Currently does nothing on Windows.
	
	Prior to Carbon, this routine called the Apple Balloon Help Manager HMSetDialogResID
	routine. With Carbon, Apple dropped support for balloon help. This routine now links
	with the contextual help functionality inside Igor Pro Carbon. It does nothing
	if running with a pre-Carbon version of Igor.
	
	Thread Safety: SetDialogBalloonHelpID is not thread-safe.
*/
void
SetDialogBalloonHelpID(int balloonHelpID)
{
	if (!CheckRunningInMainThread("SetDialogBalloonHelpID"))
		return;

	CallBack2(SET_CONTEXTUAL_HELP_DIALOG_ID, (void *)XOPRefNum(), (void *)balloonHelpID);
}
/*	HoldDataFolder(dfH)

	Tells Igor that you are holding a reference to a data folder handle and that the
	data folder must not be deleted until you call ReleaseDataFolder.
	
	dfH is a data folder handle that you have obtained from Igor.
	
	As of XOP Toolkit 6.30, if dfH is NULL, HoldDataFolder does nothing and returns 0.
	
	For background information and further detail, please see "Data Folder Reference
	Counting" in the Accessing Igor Data chapter of the XOP Toolkit manual.

	HoldDataFolder returns an error code as the function result, typically 0 for success or
	IGOR_OBSOLETE.
	
	HoldDataFolder was added in Igor Pro 6.20. If you call this with an earlier
	version of Igor, it will do nothing and return IGOR_OBSOLETE.
	
	Prior to XOP Toolkit 6.30, HoldDataFolder had a second parameter. That parameter was removed
	in XOP Toolkit 6.30. This change does not affect XOPs compiled with earlier versions
	of the XOP Toolkit. It will cause a compile error that you will have to correct
	if you compile with XOP Toolkit 6.30 or later.

	Thread Safety: HoldDataFolder is Igor-thread-safe with XOP Toolkit 6 and Igor Pro 6.20 or later.
	You can call it from a thread created by Igor but not from a private thread that you created yourself.
*/
int
HoldDataFolder(DataFolderHandle dfH)
{
	DataFolderHandle tempDFH = NULL;
	if (dfH == NULL)
		return 0;
	return (int)CallBack2(HOLD_DATAFOLDER, dfH, &tempDFH);
}
Exemple #4
0
/*	ActualToResourceItem(igorMenuID, actualItemNumber)

	Given the ID of a built-in Igor and the actual number of a menu item in the Igor menu,
	returns the number of the specification in the 'XMI1' resource in the XOP's resource fork
	for that item.
	
	Item numbers start from 1.
	
	Returns 0 if XOP did not add this menu item to Igor menu.
	
	Thread Safety: ActualToResourceItem is not thread-safe.
*/
int
ActualToResourceItem(int igorMenuID, int actualItemNumber)
{
	if (!CheckRunningInMainThread("ActualToResourceItem"))
		return 0;
	
	return (int)CallBack2(RESOURCEITEMNUM, (void *)igorMenuID, (void *)actualItemNumber);	
}
Exemple #5
0
/*	ResourceToActualItem(igorMenuID, resourceItemNumber)

	Given the ID of a built-in Igor and the number of a menu item specification in the
	'XMI1' resource in the XOP's resource fork, returns the actual item number of that
	item in the Igor menu.
	
	Item numbers start from 1.
	
	Returns 0 if XOP did not add this menu item to Igor menu.
	
	Thread Safety: ResourceToActualItem is not thread-safe.
*/
int
ResourceToActualItem(int igorMenuID, int resourceItemNumber)
{
	if (!CheckRunningInMainThread("ResourceToActualItem"))
		return 0;
	
	return (int)CallBack2(ACTUALITEMNUM, (void *)igorMenuID, (void *)resourceItemNumber);	
}
/*	GetDataFolderProperties(dataFolderH, propertiesPtr)

	Returns the bit-flag properties of the specified data folder.
	
	If dataFolderH is NULL, it uses the current data folder.
	
	At present, Igor does not support any properties and this routine will always return 0
	in *propertiesPtr. In the future, it might support properties such as "locked".
	
	Returns 0 or error code.
	
	Thread Safety: GetDataFolderProperties is Igor-thread-safe with XOP Toolkit 6 and Igor Pro 6.20 or later.
	You can call it from a thread created by Igor but not from a private thread that you created yourself.
*/
int
GetDataFolderProperties(DataFolderHandle dataFolderH, int* propertiesPtr)
{
	return (int)CallBack2(GET_DATAFOLDER_PROPERTIES, dataFolderH, propertiesPtr);
}
/*	GetDataFolderIDNumber(dataFolderH, IDNumberPtr)

	Returns the unique ID number for the data folder via *IDNumberPtr.
	
	If dataFolderH is NULL, it uses the current data folder.
	
	Each data folder has a unique ID number that stays the same as long as the data
	folder exists, even if it is renamed or moved. If you need to reference a data
	folder over a period of time during which it could be killed, then you should
	store the data folder's ID number.
	
	Given the ID number, you can call GetDataFolderByIDNumber to check if the data
	folder still exists and to get a handle it.
	
	The ID number is valid until the user creates a new Igor experiment or quits Igor.
	ID numbers are not remembered from one running of Igor to the next.
	
	Thread Safety: GetDataFolderIDNumber is Igor-thread-safe with XOP Toolkit 6 and Igor Pro 6.20 or later.
	You can call it from a thread created by Igor but not from a private thread that you created yourself.
*/
int
GetDataFolderIDNumber(DataFolderHandle dataFolderH, int* IDNumberPtr)
{
	return (int)CallBack2(GET_DATAFOLDER_IDNUMBER, dataFolderH, IDNumberPtr);
}
/*	RenameDataFolder(dataFolderH, newName)
	
	Renames the data folder.
	
	dataFolderH is a handle to the data folder to be renamed or NULL to use
	the current data folder.

	Returns 0 or error code.

	Thread Safety: RenameDataFolder is Igor-thread-safe with XOP Toolkit 6 and Igor Pro 6.20 or later.
	You can call it from a thread created by Igor but not from a private thread that you created yourself.
*/
int
RenameDataFolder(DataFolderHandle dataFolderH, const char newName[MAX_OBJ_NAME+1])
{
	return (int)CallBack2(RENAME_DATAFOLDER, dataFolderH, (void*)newName);
}
/*	MoveDataFolder(sourceDataFolderH, newParentDataFolderH)
	
	Moves the source data folder into a new location in the hierarchy.
	It is an error to attempt to move a parent folder into itself or
	one of its children.
	
	sourceDataFolderH is a handle to the data folder to be moved
	or NULL to use the current data folder.

	newParentDataFolderH is a handle to the data folder in which the source data folder
	is to be moved or NULL to use the current data folder.

	Returns 0 or error code.

	Thread Safety: MoveDataFolder is Igor-thread-safe with XOP Toolkit 6 and Igor Pro 6.20 or later.
	You can call it from a thread created by Igor but not from a private thread that you created yourself.
*/
int
MoveDataFolder(DataFolderHandle sourceDataFolderH, DataFolderHandle newParentDataFolderH)
{
	return (int)CallBack2(MOVE_DATAFOLDER, sourceDataFolderH, newParentDataFolderH);
}
/*	GetWavesDataFolder(waveH, dataFolderHPtr)

	Returns the handle to the data folder containing the specified wave.
	
	Data folder handles belong to Igor so you should not modify or dispose them.
	
	Returns 0 or error code.

	Thread Safety: GetWavesDataFolder is Igor-thread-safe with XOP Toolkit 6 and Igor Pro 6.20 or later.
	You can call it from a thread created by Igor but not from a private thread that you created yourself.
*/
int
GetWavesDataFolder(waveHndl waveH, DataFolderHandle* dataFolderHPtr)
{
	return (int)CallBack2(GETWAVES_DATAFOLDER, waveH, dataFolderHPtr);
}
/*	int GetNumChildDataFolders(parentDataFolderH, numChildDataFolderPtr)

	Returns the number of child data folders in the specified parent data folder.

	If parentDataFolderH is NULL, it uses the current data folder.
	
	Returns 0 or error code.

	Thread Safety: GetNumChildDataFolders is Igor-thread-safe with XOP Toolkit 6 and Igor Pro 6.20 or later.
	You can call it from a thread created by Igor but not from a private thread that you created yourself.
*/
int
GetNumChildDataFolders(DataFolderHandle parentDataFolderH, int* numChildDataFolderPtr)
{
	return (int)CallBack2(GETNUMCHILD_DATAFOLDERS, parentDataFolderH, (void*)numChildDataFolderPtr);
}
/*	GetParentDataFolder(dataFolderH, parentFolderHPtr)

	Returns the parent of the specified data folder via *parentFolderHPtr.
	
	Data folder handles belong to Igor so you should not modify or dispose them.
	
	If dataFolderH is NULL, it uses the current data folder.
	
	Passing the root data folder as dataFolderH is an error. In this
	case GetParentDataFolder returns NO_PARENT_DATAFOLDER.
	
	Returns 0 or error code.

	Thread Safety: GetParentDataFolder is Igor-thread-safe with XOP Toolkit 6 and Igor Pro 6.20 or later.
	You can call it from a thread created by Igor but not from a private thread that you created yourself.
*/
int
GetParentDataFolder(DataFolderHandle dataFolderH, DataFolderHandle* parentFolderHPtr)
{
	return (int)CallBack2(GETPARENT_DATAFOLDER, dataFolderH, parentFolderHPtr);
}
/*	GetDataFolderByIDNumber(IDNumber, dataFolderHPtr)

	Returns via *dataFolderHPtr the data folder handle associated with the
	specified ID number.
	
	Data folder handles belong to Igor so you should not modify or dispose them.
	
	Returns 0 if OK or a non-zero error code if the data folder doesn't exist,
	which would be the case if the data folder were killed since you got its
	ID number.
	
	Each data folder has a unique ID number that stays the same as long as the data
	folder exists. You can get the ID number for a data folder using GetDataFolderIDNumber().
	
	If you need to reference a data folder over a period of time during which it
	could be killed, then you should store the data folder's ID number. Given the ID
	number, GetDataFolderByIDNumber tells you if the data folder still exists and,
	if it does, gives you the data folder handle.
	
	The ID number is valid until the user creates a new Igor experiment or quits Igor.
	ID numbers are not remembered from one running of Igor to the next.

	Thread Safety: GetDataFolderByIDNumber is Igor-thread-safe with XOP Toolkit 6 and Igor Pro 6.20 or later.
	You can call it from a thread created by Igor but not from a private thread that you created yourself.
*/
int
GetDataFolderByIDNumber(int IDNumber, DataFolderHandle* dataFolderHPtr)
{
	return (int)CallBack2(GET_DATAFOLDER_BYIDNUMBER, (void*)IDNumber, dataFolderHPtr);
}
/*	int GetRootDataFolder(refNum, rootDataFolderHPtr);

	Returns a handle to the root data folder.
	
	Data folder handles belong to Igor so you should not modify or dispose them.
	
	NOTE: Always pass 0 for refNum. It is for future use.

	Returns 0 or error code.

	Thread Safety: GetRootDataFolder is Igor-thread-safe with XOP Toolkit 6 and Igor Pro 6.20 or later.
	You can call it from a thread created by Igor but not from a private thread that you created yourself.
*/
int
GetRootDataFolder(int refNum, DataFolderHandle* rootDataFolderHPtr)
{
	return (int)CallBack2(GETROOT_DATAFOLDER, (void*)refNum, rootDataFolderHPtr);
}
/*	SetDataFolderProperties(dataFolderH, properties)

	Sets the bit-flag properties of the specified data folder.
	
	If dataFolderH is NULL, it uses the current data folder.
	
	At present, Igor does not support any properties and there is no reason
	to call this routine. It will return a -1 error code for any value
	of properties other than 0.
	
	In the future, it might support properties such as "locked".
	
	Returns 0 or error code.
	
	Thread Safety: SetDataFolderProperties is Igor-thread-safe with XOP Toolkit 6 and Igor Pro 6.20 or later.
	You can call it from a thread created by Igor but not from a private thread that you created yourself.
*/
int
SetDataFolderProperties(DataFolderHandle dataFolderH, int properties)
{
	return (int)CallBack2(SET_DATAFOLDER_PROPERTIES, dataFolderH, (void*)properties);
}