diff options
Diffstat (limited to 'includes/plugin.h')
-rw-r--r-- | includes/plugin.h | 123 |
1 files changed, 120 insertions, 3 deletions
diff --git a/includes/plugin.h b/includes/plugin.h index 76b17cc..3341c82 100644 --- a/includes/plugin.h +++ b/includes/plugin.h @@ -16,7 +16,18 @@ #endif enum { - CWDROPINPARSERTYPE = CWFOURCHAR('P','a','r','s') + CWDROPINPARSERTYPE = CWFOURCHAR('P','a','r','s'), + CWDROPINDRIVERTYPE = CWFOURCHAR('c','l','d','r'), + CWDROPINANYTYPE = CWFOURCHAR('*','*','*','*') +}; + +// Extra drop-in flags that aren't in the public plugin SDK headers +enum { + dropInExecutableTool = 1 +}; + +enum { + Lang_Any = CWFOURCHAR('*','*','*','*') }; typedef struct IDEAccessPath { @@ -36,6 +47,7 @@ typedef struct IDEAccessPathList { } IDEAccessPathList; enum { + cwAccessPathTypeFlag1 = 1, cwAccessPathTypeFlag2 = 2 }; typedef struct CWNewAccessPathInfo { @@ -77,6 +89,27 @@ typedef struct ToolVersionInfo { char *version; } ToolVersionInfo; +typedef struct CWObjectFlags { + SInt16 version; + SInt32 flags; + const char *objFileExt; + const char *brsFileExt; + const char *ppFileExt; + const char *disFileExt; + const char *depFileExt; + const char *pchFileExt; + OSType objFileCreator; + OSType objFileType; + OSType brsFileCreator; + OSType brsFileType; + OSType ppFileCreator; + OSType ppFileType; + OSType disFileCreator; + OSType disFileType; + OSType depFileCreator; + OSType depFileType; +} CWObjectFlags; + typedef struct CLPluginInfo { OSType plugintype; OSType language; @@ -154,7 +187,7 @@ struct CWCompilerLinkerCallbacks { struct CWParserCallbacks { CWResult (*cbParserAddAccessPath)(CWPluginContext, const CWNewAccessPathInfo *); CWResult (*cbParserSwapAccessPaths)(CWPluginContext); - CWResult (*cbParserSetNamedPreferences)(CWPluginContext, const char *, CWMemHandle); + CWResult (*cbParserSetNamedPreferences)(CWPluginContext, const char *, Handle); CWResult (*cbParserSetFileOutputName)(CWPluginContext, SInt32, short, const char *); CWResult (*cbParserSetOutputFileDirectory)(CWPluginContext, const CWFileSpec *); CWResult (*cbParserAddOverlay1Group)(CWPluginContext, const char *, const CWAddr64 *, SInt32 *); @@ -172,6 +205,10 @@ extern "C" { #endif CW_CALLBACK CWCheckoutLicense(CWPluginContext context, const char *a, const char *b, SInt32 c, void *d, SInt32 *cookiePtr); CW_CALLBACK CWCheckinLicense(CWPluginContext context, SInt32 cookie); + +CW_CALLBACK CWOSErrorMessage(CWPluginContext context, const char *msg, OSErr errorcode); +CW_CALLBACK CWOSAlert(CWPluginContext context, const char* message, OSErr errorcode); + CW_CALLBACK CWSecretAttachHandle(CWPluginContext context, Handle handle, CWMemHandle *memHandle); CW_CALLBACK CWSecretDetachHandle(CWPluginContext context, CWMemHandle memHandle, Handle *handle); CW_CALLBACK CWSecretPeekHandle(CWPluginContext context, CWMemHandle memHandle, Handle *handle); @@ -187,7 +224,7 @@ CW_CALLBACK CWParserStoreCommandLineForPanel(CWPluginContext context, int index, CW_CALLBACK CWParserStoreCommandLineForPlugin(CWPluginContext context, int index, const CWCommandLineArgs *args); CW_CALLBACK CWParserAddAccessPath(CWPluginContext context, const CWNewAccessPathInfo *api); CW_CALLBACK CWParserSwapAccessPaths(CWPluginContext context); -CW_CALLBACK CWParserSetNamedPreferences(CWPluginContext context, const char *panelName, CWMemHandle paneldata); +CW_CALLBACK CWParserSetNamedPreferences(CWPluginContext context, const char *panelName, Handle paneldata); CW_CALLBACK CWParserSetFileOutputName(CWPluginContext context, SInt32 position, short which, const char *outfilename); CW_CALLBACK CWParserSetOutputFileDirectory(CWPluginContext context, const CWFileSpec *idefss); CW_CALLBACK CWParserAddOverlay1Group(CWPluginContext context, const char *name, const CWAddr64 *addr, SInt32 *newGroupNumber); @@ -196,6 +233,86 @@ CW_CALLBACK CWParserAddSegment(CWPluginContext context, const char *name, short CW_CALLBACK CWParserSetSegment(CWPluginContext context, SInt32 segmentNumber, const char *name, short attrs); CW_CALLBACK CWParserCreateVirtualFile(CWPluginContext context, const char *name, CWMemHandle text); CW_CALLBACK CWParserDisplayTextHandle(CWPluginContext context, const char *name, CWMemHandle text); + +// CLDropinCallbacks +extern CWResult UCBGetFileInfo(CWPluginContext context, SInt32 whichfile, Boolean checkFileLocation, CWProjectFileInfo *fileinfo); +extern CWResult UCBFindAndLoadFile(CWPluginContext context, const char *filename, CWFileInfo *fileinfo); +extern CWResult UCBGetFileText(CWPluginContext context, const CWFileSpec *filespec, const char **text, SInt32 *textLength, short *filedatatype); +extern CWResult UCBReleaseFileText(CWPluginContext context, const char *text); +extern CWResult UCBGetSegmentInfo(CWPluginContext context, SInt32 whichsegment, CWProjectSegmentInfo *segmentinfo); +extern CWResult UCBGetOverlay1GroupInfo(CWPluginContext context, SInt32 whichgroup, CWOverlay1GroupInfo *groupinfo); +extern CWResult UCBGetOverlay1FileInfo(CWPluginContext context, SInt32 whichgroup, SInt32 whichoverlay, SInt32 whichoverlayfile, CWOverlay1FileInfo *fileinfo); +extern CWResult UCBGetOverlay1Info(CWPluginContext context, SInt32 whichgroup, SInt32 whichoverlay, CWOverlay1Info *overlayinfo); +extern CWResult UCBReportMessage(CWPluginContext context, const CWMessageRef *msgRef, const char *line1, const char *line2, short errorlevel, SInt32 errorNumber); +extern CWResult UCBAlert(CWPluginContext context, const char *msg1, const char *msg2, const char *msg3, const char *msg4); +extern CWResult UCBShowStatus(CWPluginContext context, const char *line1, const char *line2); +extern CWResult UCBUserBreak(CWPluginContext context); +extern CWResult UCBGetNamedPreferences(CWPluginContext context, const char *prefsname, CWMemHandle *prefsdata); +extern CWResult UCBStorePluginData(CWPluginContext context, SInt32 whichfile, CWDataType type, CWMemHandle prefsdata); +extern CWResult UCBGetPluginData(CWPluginContext context, SInt32 whichfile, CWDataType type, CWMemHandle *prefsdata); +extern CWResult UCBSetModDate(CWPluginContext context, const CWFileSpec *filespec, CWFileTime *moddate, Boolean isGenerated); +extern CWResult UCBAddProjectEntry(CWPluginContext context, const CWFileSpec *fileSpec, Boolean isGenerated, const CWNewProjectEntryInfo *projectEntryInfo, SInt32 *whichfile); +extern CWResult UCBCreateNewTextDocument(CWPluginContext context, const CWNewTextDocumentInfo *docinfo); +extern CWResult UCBAllocateMemory(CWPluginContext context, SInt32 size, Boolean isPermanent, void **ptr); +extern CWResult UCBFreeMemory(CWPluginContext context, void *ptr, Boolean isPermanent); +extern CWResult UCBAllocMemHandle(CWPluginContext context, SInt32 size, Boolean useTempMemory, CWMemHandle *handle); +extern CWResult UCBFreeMemHandle(CWPluginContext context, CWMemHandle handle); +extern CWResult UCBGetMemHandleSize(CWPluginContext context, CWMemHandle handle, SInt32 *size); +extern CWResult UCBResizeMemHandle(CWPluginContext context, CWMemHandle handle, SInt32 newSize); +extern CWResult UCBLockMemHandle(CWPluginContext context, CWMemHandle handle, Boolean moveHi, void **ptr); +extern CWResult UCBUnlockMemHandle(CWPluginContext context, CWMemHandle handle); +extern CWResult UCBGetTargetName(CWPluginContext context, char *name, short maxLength); +extern CWResult UCBPreDialog(CWPluginContext context); +extern CWResult UCBPostDialog(CWPluginContext context); +extern CWResult UCBPreFileAction(CWPluginContext context, const CWFileSpec *theFile); +extern CWResult UCBPostFileAction(CWPluginContext context, const CWFileSpec *theFile); +extern CWResult UCBCacheAccessPathList(CWPluginContext context); +extern CWResult UCBSecretAttachHandle(CWPluginContext context, Handle handle, CWMemHandle *memHandle); +extern CWResult UCBSecretDetachHandle(CWPluginContext context, CWMemHandle memHandle, Handle *handle); +extern CWResult UCBSecretPeekHandle(CWPluginContext context, CWMemHandle memHandle, Handle *handle); +extern CWResult UCBCheckoutLicense(CWPluginContext context, const char *a, const char *b, SInt32 c, void *d, SInt32 *cookiePtr); +extern CWResult UCBCheckinLicense(CWPluginContext context, SInt32 cookie); +extern CWResult UCBResolveRelativePath(CWPluginContext context, const CWRelativePath *relativePath, CWFileSpec *fileSpec, Boolean create); +extern CWResult UCBMacOSErrToCWResult(CWPluginContext context, OSErr err); + +// CLCompilerLinkerDropin +extern CWResult UCBCachePrecompiledHeader(CWPluginContext context, const CWFileSpec *filespec, CWMemHandle pchhandle); +extern CWResult UCBLoadObjectData(CWPluginContext context, SInt32 whichfile, CWMemHandle *objectdata); +extern CWResult UCBStoreObjectData(CWPluginContext context, SInt32 whichfile, CWObjectData *object); +extern CWResult UCBFreeObjectData(CWPluginContext context, SInt32 whichfile, CWMemHandle objectdata); +extern CWResult UCBDisplayLines(CWPluginContext context, SInt32 nlines); +extern CWResult UCBBeginSubCompile(CWPluginContext context, SInt32 whichfile, CWPluginContext *subContext); +extern CWResult UCBEndSubCompile(CWPluginContext subContext); +extern CWResult UCBGetPrecompiledHeaderSpec(CWPluginContext context, CWFileSpec *pchspec, const char *target); +extern CWResult UCBGetResourceFile(CWPluginContext context, CWFileSpec *filespec); +extern CWResult UCBPutResourceFile(CWPluginContext context, const char *prompt, const char *name, CWFileSpec *filespec); +extern CWResult UCBLookUpUnit(CWPluginContext context, const char *name, Boolean isdependency, const void **unitdata, SInt32 *unitdatalength); +extern CWResult UCBSBMfiles(CWPluginContext context, short libref); +extern CWResult UCBStoreUnit(CWPluginContext context, const char *unitname, CWMemHandle unitdata, CWDependencyTag dependencytag); +extern CWResult UCBReleaseUnit(CWPluginContext context, void *unitdata); +extern CWResult UCBUnitNameToFileName(CWPluginContext context, const char *unitname, char *filename); +extern CWResult UCBOSAlert(CWPluginContext context, const char *message, OSErr errorcode); +extern CWResult UCBOSErrorMessage(CWPluginContext context, const char *msg, OSErr errorcode); +extern CWResult UCBGetModifiedFiles(CWPluginContext context, SInt32 *modifiedFileCount, const SInt32 **modifiedFiles); +extern CWResult UCBGetSuggestedObjectFileSpec(CWPluginContext context, SInt32 whichfile, CWFileSpec *fileSpec); +extern CWResult UCBGetStoredObjectFileSpec(CWPluginContext context, SInt32 whichfile, CWFileSpec *fileSpec); +extern CWResult UCBGetFrameworkCount(CWPluginContext context, SInt32 *frameworkCount); +extern CWResult UCBGetFrameworkInfo(CWPluginContext context, SInt32 whichFramework, CWFrameworkInfo *frameworkInfo); + +// CLParserCallbacks +extern CWResult UCBParserAddAccessPath(CWPluginContext context, const CWNewAccessPathInfo *api); +extern CWResult UCBParserSwapAccessPaths(CWPluginContext context); +extern CWResult UCBParserSetNamedPreferences(CWPluginContext context, const char *panelName, Handle paneldata); +extern CWResult UCBParserSetFileOutputName(CWPluginContext context, SInt32 position, short which, const char *outfilename); +extern CWResult UCBParserSetOutputFileDirectory(CWPluginContext context, const CWFileSpec *idefss); +extern CWResult UCBParserAddOverlay1Group(CWPluginContext context, const char *name, const CWAddr64 *addr, SInt32 *newGroupNumber); +extern CWResult UCBParserAddOverlay1(CWPluginContext context, const char *name, SInt32 groupNumber, SInt32 *newOverlayNumber); +extern CWResult UCBParserAddSegment(CWPluginContext context, const char *name, short attrs, SInt32 *newSegmentNumber); +extern CWResult UCBParserSetSegment(CWPluginContext context, SInt32 segmentNumber, const char *name, short attrs); + #ifdef __cplusplus } #endif + +// This one is intentionally outwith the extern "C" block as it's mangled +extern CWResult OSErrtoCWResult(OSErr err);
\ No newline at end of file |