//
// Launch codes and data structure
// for comunicating of stand-alone applications with X-Master
//
// (C) LinkeSOFT GmbH, 2001
// http://linkesoft.com/
//
// Version 1.4   22-Nov-2001
//

#ifndef __XMINTERFACE_H__
#define __XMINTERFACE_H__

// test for existence of X-Master version feature
// version feature contains X-Master version in the form major.minor.rel 
// e.g. 0x10400 for X-Master 1.4
#define XMCREATOR 'ExtM'
#define XMVERSIONFTR 1 

// X-Master interface launch codes
//
// Do not call from an extension when X-Master is the currently active application
// When you use these launch codes to work on your own extension, make sure
// you lock your code chunk and protect your extension database
//

// query active/inactive status
// returns in UInt32 result 1 if active or 0 if not active
#define XMLaunchCmdQueryActive 60000

// activate trap(s) for application
// returns in UInt32 result 0 if success
#define XMLaunchCmdSetActive   60001

// deactivate active trap(s) for application
// returns in UInt32 result 0 if success
#define XMLaunchCmdSetInactive 60002  

// deactivate all traps temporarily
// the internal database will not be removed
// an app should call XMLaunchCmdRestoreAll or SysReset as soon as it is finished
#define XMLaunchCmdDeactivateAll 60003

// restore extensions that have been deactivated with launch code above
#define XMLaunchCmdRestoreAll 60004  

// X-Master parameter block used with all the launch codes above
typedef struct
{
UInt16 version; // must be 1 (used for future compatibility)
UInt32 creator; // creator ID of your application
} XMcmdPBType;

// activate an X-Master "set" of extensions
// returns 0 on success
#define XMLaunchCmdSwitchToSet 60005

// parameter block for activating an X-Master "set" of extensions
typedef struct
{
UInt16 version; // must be 1 (used for future compatibility)
char setname[32];
} XMSetcmdPBType;

// 
// X-Master also supports the
// sysAppLaunchCmdOpenDB launch code
// which will display the Details form of the given extension database
//


#endif // __XMINTERFACE_H__