diff options
author | Ash Wolf <ninji@wuffs.org> | 2022-10-07 20:02:27 +0100 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2022-10-07 20:02:27 +0100 |
commit | 97f6a2438df1eaeb4128ce36f29346ea38a3db4a (patch) | |
tree | 78260f8f0f2b84fc70fadb1e50e7fc104390eee4 /sdk_hdrs | |
download | MWCC-97f6a2438df1eaeb4128ce36f29346ea38a3db4a.tar.gz MWCC-97f6a2438df1eaeb4128ce36f29346ea38a3db4a.zip |
first very unfinished commit lol
Diffstat (limited to '')
-rwxr-xr-x | sdk_hdrs/CWDropInPanel.h | 1 | ||||
-rwxr-xr-x | sdk_hdrs/CWPluginErrors.h | 1 | ||||
-rwxr-xr-x | sdk_hdrs/CWPlugins.h | 1 | ||||
-rwxr-xr-x | sdk_hdrs/CWRuntimeFeatures.h | 1 | ||||
-rwxr-xr-x | sdk_hdrs/CWUnixPluginPrefix.h | 1 | ||||
-rwxr-xr-x | sdk_hdrs/CWWinPluginPrefix.h | 1 | ||||
-rwxr-xr-x | sdk_hdrs/CatTypes.h | 1 | ||||
-rwxr-xr-x | sdk_hdrs/CompilerMapping.h | 1 | ||||
-rwxr-xr-x | sdk_hdrs/DropInCompilerLinker.h | 1 | ||||
-rwxr-xr-x | sdk_hdrs/DropInPanel.h | 1 | ||||
-rwxr-xr-x | sdk_hdrs/DropInPanelWin32.h | 1 | ||||
-rwxr-xr-x | sdk_hdrs/DropInVCS.h | 1 | ||||
-rwxr-xr-x | sdk_hdrs/MWBrowse.h | 1 | ||||
-rwxr-xr-x | sdk_hdrs/MWLangDefs.h | 1 |
14 files changed, 14 insertions, 0 deletions
diff --git a/sdk_hdrs/CWDropInPanel.h b/sdk_hdrs/CWDropInPanel.h new file mode 100755 index 0000000..4aa7a21 --- /dev/null +++ b/sdk_hdrs/CWDropInPanel.h @@ -0,0 +1 @@ +/*
* CWDropInPanel.h
*
* Copyright © 1999 Metrowerks inc. All rights reserved.
*
* DropIn Preferences Panel Interface for UNIX/WIN32 Metrowerks CodeWarriorª
*/
#ifndef __CWDROPINPANEL_H__
#define __CWDROPINPANEL_H__
#ifdef __MWERKS__
# pragma once
#endif
#ifndef __CWPlugins_H__
#include "CWPlugins.h"
#endif
#ifdef __MWERKS__
#pragma options align=mac68k
#endif
#ifdef _MSC_VER
#pragma pack(push,2)
#endif
#ifdef __cplusplus
extern "C" {
#endif
/*
* Convenience macros for swapping pref-panel values. Use this macros only if your
* system/libraries do not provide their own public swapping functions/macros.
*
*/
/* Swap 16-bit(short) value */
#define CWPREF_BYTESWAP_SHORT(value) value = \
(((((unsigned short)(value))<<8) & 0xFF00) | \
((((unsigned short)(value))>>8) & 0x00FF))
/* Swap 32-bit(long) value */
#define CWPREF_BYTESWAP_LONG(value) value = \
(((((unsigned long)(value))<<24) & 0xFF000000) | \
((((unsigned long)(value))<< 8) & 0x00FF0000) | \
((((unsigned long)(value))>> 8) & 0x0000FF00) | \
((((unsigned long)(value))>>24) & 0x000000FF))
#ifndef __DROPINPANEL_H__
/* API version numbers */
#define DROPINPANELAPIVERSION_1 1 /* CW7 API version */
#define DROPINPANELAPIVERSION_2 2 /* intermediate version */
#define DROPINPANELAPIVERSION_3 3 /* CW8 API version */
#define DROPINPANELAPIVERSION_4 4 /* CW9 API version */
#define DROPINPANELAPIVERSION_5 5 /* CW Pro 2 API version */
#define DROPINPANELAPIVERSION_7 7 /* CW Pro 3 Mac API version */
#define DROPINPANELAPIVERSION_8 8 /* CW Pro 3 Win32 API version */
#define DROPINPANELAPIVERSION_9 9 /* CW Pro 5 Win32 API version */
#define DROPINPANELAPIVERSION_10 10 /* CW Pro 6 Win32 API version */
#define DROPINPANELAPIVERSION_11 11 /* CW Pro 7 Win32 API version */
#define DROPINPANELAPIVERSION DROPINPANELAPIVERSION_11 /* current API version */
/* Error codes you return to the IDE */
#define kBadPrefVersion 1000 /* panel doesn't know about this version */
#define kMissingPrefErr 1001
#define kSettingNotFoundErr 1002
#define kSettingTypeMismatchErr 1003
#define kInvalidCallbackErr 1004
#define kSettingOutOfRangeErr 1005
/*
* Requests codes - sent by the IDE to your panel
* Note: Many of these are Mac-specific but are included for compatability reasons.
* Future APIs will reimplement many of them is an OS-neutral way.
*/
enum {
reqInitPanel = -2, /* (called when panel is loaded) */
reqTermPanel = -1, /* (called when panel is unloaded) */
reqInitDialog = 0, /* initialize panel's dialog state */
reqTermDialog, /* clean up panel's dialog state */
reqPutData, /* copy options data to dialog items */
reqGetData, /* copy dialog items to options data */
reqFilter, /* filter a dialog event for the panel (Mac only) */
reqItemHit, /* process an itemHit in the panel */
reqAEGetPref, /* get preference setting for AppleEvent request (Mac only) */
reqAESetPref, /* set preference setting from AppleEvent request (Mac only) */
reqValidate, /* tell if current settings force recompile or relink */
reqGetFactory, /* retrieve factory settings */
reqUpdatePref, /* verify and/or modify prefs to fit current version */
reqUpdateProject, /* (only sent to built-in panels) */
reqSetupDebug, /* change settings to reflect debugging status */
reqRenameProject, /* change settings that depend on project name */
reqPrefsLoaded, /* (only sent to built-in panels) */
reqDrawCustomItem, /* draw a custom item (Mac only) */
reqActivateItem, /* activate a custom item (Mac only) */
reqDeactivateItem, /* deactivate a custom item (Mac only) */
reqHandleClick, /* handle mouse down in an active custom item (Mac only) */
reqHandleKey, /* handle key down in an active custom item (Mac only) */
reqFindStatus, /* enable/disable menu items for a custom item (Mac only) */
reqObeyCommand, /* execute a menu command for a custom item (Mac only) */
reqDragEnter, /* the user is dragging into the given item (Mac only) */
reqDragWithin, /* the user is dragging within the given item (Mac only) */
reqDragExit, /* the user is dragging out of the given item (Mac only) */
reqDragDrop, /* the user dropped onto the given item (Mac only) */
reqByteSwapData, /* byte swap the fields in the prefs data */
reqFirstLoad, /* panel has been loaded for the first time */
reqReadSettings, /* read settings from IDE to construct pref data handle */
reqWriteSettings, /* write the individual settings from pref data handle */
reqItemDoubleClick, /* process an double clicked in the panel, currently implemented for listviews */
reqItemIsCellEditable /* currently implemented for listviews, tells whether or not the listview is editable */
};
/* Layout and bit flags for 'Flag' resource for panels */
/* */
/* For the version 3 of these resource, we renamed the 'apiversion' field to */
/* 'earliestCompatibleAPIVersion' and added the 'newestAPIVersion' field. */
/* This allows plugins to support more than one API version and therefore run */
/* under more than one version of the IDE. */
typedef struct PanelFlags {
unsigned short rsrcversion; /* version number of resource */
CWDataType dropintype; /* dropin type ('Comp', 'Link', 'Panl') */
/* earliest API support by this plugin */
unsigned short earliestCompatibleAPIVersion;
unsigned long dropinflags; /* capability flags (see enum below) */
CWDataType panelfamily; /* family of panel (linker, codegen, etc) */
unsigned short newestAPIVersion; /* newest API version supported */
unsigned short dataversion; /* version number of prefs data */
unsigned short panelscope; /* scope of panel (see enum below) */
} PanelFlags;
/* capability flags, as used in member dropinflags of PanelFlags struct */
enum {
usesStrictAPI = 1 << 31, /* this panel is built with the strict API */
supportsByteSwapping = 1 << 30, /* this panel support the byte-swapping request */
supportsTextSettings = 1 << 29, /* this panel supports the read & write settings requests */
usesCrossPlatformAPI = 1 << 28 /* uses the cross-platform API rather than Mac API */
/* remaining flags are reserved for future use and should be zero-initialized */
};
/* panel scopes, as used in member panelscope of PanelFlags struct */
/* */
/* The scope of a panel tells the IDE which settings window to display the panel. */
/* Currently, only panels for debugger plug-ins use panelScopeGlobal and only */
/* panels for VCS plug-ins use panelScopeProject. A panel for a compiler or linker */
/* must use panelScopeTarget. */
enum {
panelScopeGlobal, /* this panel is scoped to the global preferences window */
panelScopeProject, /* this panel is scoped to the VCS settings window */
panelScopeTarget /* this panel is scoped to the target settings window */
};
/* pre-defined panel families, used in panelfamily field of PanelFlags struct */
enum {
panelFamilyProject = CWFOURCHAR('p', 'r', 'o', 'j'),
panelFamilyFrontEnd = CWFOURCHAR('f', 'e', 'n', 'd'),
panelFamilyBackEnd = CWFOURCHAR('b', 'e', 'n', 'd'),
panelFamilyBrowser = CWFOURCHAR('b', 'r', 'o', 'w'),
panelFamilyEditor = CWFOURCHAR('e', 'd', 'i', 't'),
panelFamilyDebugger = CWFOURCHAR('d', 'b', 'u', 'g'),
panelFamilyLinker = CWFOURCHAR('l', 'i', 'n', 'k'),
panelFamilyMisc = CWFOURCHAR('*', '*', '*', '*')
};
typedef struct MWSetting* CWSettingID;
#define kNoSettingID 0
#endif /* not defined __DROPINPANEL_H__ */
/*-------------------------------------------------------------------------------------
Callbacks to the IDE, in addition to those in CWPlugins.h
-----------------------------------------------------------------------------------*/
/* Dialog related */
CW_CALLBACK CWPanelAppendItems (CWPluginContext context, short ditlID);
CW_CALLBACK CWPanelShowItem (CWPluginContext context, long whichItem, Boolean showIt);
CW_CALLBACK CWPanelEnableItem (CWPluginContext context, long whichItem, Boolean enableIt);
CW_CALLBACK CWPanelActivateItem (CWPluginContext context, long whichItem);
CW_CALLBACK CWPanelGetItemValue (CWPluginContext context, long whichItem, long* value);
CW_CALLBACK CWPanelSetItemValue (CWPluginContext context, long whichItem, long value);
CW_CALLBACK CWPanelGetItemText (CWPluginContext context, long whichItem, char* str, short maxLen);
CW_CALLBACK CWPanelSetItemText (CWPluginContext context, long whichItem, char* str);
CW_CALLBACK CWPanelInsertListItem (CWPluginContext context, long dlgItemID, long index, char* str);
CW_CALLBACK CWPanelDeleteListItem (CWPluginContext context, long dlgItemID, long index);
CW_CALLBACK CWPanelGetListItemSize (CWPluginContext context, long dlgItemID, long* listSize);
CW_CALLBACK CWPanelGetListItemText (CWPluginContext context, long dlgItemID, long index, char* str, short maxLen);
CW_CALLBACK CWPanelSetListItemText (CWPluginContext context, long dlgItemID, long index, char* str);
CW_CALLBACK CWPanelGetPopupItemChecked (CWPluginContext context, long dlgItemID, long index, Boolean* checked);
CW_CALLBACK CWPanelSetPopupItemChecked (CWPluginContext context, long dlgItemID, long index, Boolean checked);
CW_CALLBACK CWPanelSetPopupItemEnabled (CWPluginContext context, long dlgItemID, long index, Boolean enabled);
CW_CALLBACK CWPanelInvalItem (CWPluginContext context, long whichItem);
CW_CALLBACK CWPanelValidItem (CWPluginContext context, long whichItem);
CW_CALLBACK CWPanelGetNumBaseDialogItems(CWPluginContext context, short* baseItems);
CW_CALLBACK CWPanelGetDialogItemHit (CWPluginContext context, short* itemHit);
CW_CALLBACK CWPanelGetItemTextHandle (CWPluginContext context, long whichItem, CWMemHandle* text);
CW_CALLBACK CWPanelSetItemTextHandle (CWPluginContext context, long whichItem, CWMemHandle text);
CW_CALLBACK CWPanelGetItemData (CWPluginContext context, long dlgItemID, void *outData, long *outDataLength);
CW_CALLBACK CWPanelSetItemData (CWPluginContext context, long dlgItemID, void *inData, long inDataLength);
CW_CALLBACK CWPanelGetItemMaxLength (CWPluginContext context, long dlgItemID, short *outLength);
CW_CALLBACK CWPanelSetItemMaxLength (CWPluginContext context, long dlgItemID, short inLength);
CW_CALLBACK CWPanelChooseRelativePath (CWPluginContext context, CWRelativePath *ioPath, Boolean isFolder, short filterCount, void *filterList, char *prompt);
CW_CALLBACK CWPanelGetRelativePathString(CWPluginContext context, CWRelativePath *inPath, char *pathString, long* maxLength);
/* CellView related, with string elements */
// selection
CW_CALLBACK CWPanelListViewSelectCell (CWPluginContext context,long dlgItemID,long col,long row,Boolean addToSelection);
CW_CALLBACK CWPanelListViewUnselectCell (CWPluginContext context,long dlgItemID,long col,long row,Boolean *result);
CW_CALLBACK CWPanelListViewSelectNothing (CWPluginContext context,long dlgItemID);
CW_CALLBACK CWPanelListViewGetSelectionCount (CWPluginContext context,long dlgItemID,long *count);
CW_CALLBACK CWPanelListViewGetSelection (CWPluginContext context,long dlgItemID,long *col,long *row);
// rows
CW_CALLBACK CWPanelListViewAddRows (CWPluginContext context,long dlgItemID,long afterRow,long count);
CW_CALLBACK CWPanelListViewDeleteRows (CWPluginContext context,long dlgItemID,long firstRow,long count);
CW_CALLBACK CWPanelListViewGetRowCount (CWPluginContext context,long dlgItemID,long *count);
// refresh
CW_CALLBACK CWPanelListViewRefreshRow (CWPluginContext context,long dlgItemID,long row);
// columns
CW_CALLBACK CWPanelListViewAddCols (CWPluginContext context,long dlgItemID,long afterCol,long count);
CW_CALLBACK CWPanelListViewDeleteCols (CWPluginContext context,long dlgItemID,long firstCol,long count);
CW_CALLBACK CWPanelListViewGetColCount (CWPluginContext context,long dlgItemID,long *count);
CW_CALLBACK CWPanelListViewGetColWidth (CWPluginContext context,long dlgItemID,long col,short *colWidth);
CW_CALLBACK CWPanelListViewSetColWidth (CWPluginContext context,long dlgItemID,long col,short colWidth);
CW_CALLBACK CWPanelListViewNextCell (CWPluginContext context,long dlgItemID,long *col,long *row,Boolean hNext,Boolean vNext,Boolean selectableOnly,Boolean *result); // col and row is in-> and <-out
CW_CALLBACK CWPanelListViewRefreshCell (CWPluginContext context,long dlgItemID,long col,long row);
CW_CALLBACK CWPanelListViewScrollToCell (CWPluginContext context,long dlgItemID,long col,long row,Boolean inRefresh);
CW_CALLBACK CWPanelListViewGetCellTextValue (CWPluginContext context,long dlgItemID,long col,long row,char* str, short maxLen);
CW_CALLBACK CWPanelListViewSetCellTextValue (CWPluginContext context,long dlgItemID,long col,long row,char* str);
// utilities for giving a answer to a request
CW_CALLBACK CWPanelListViewSetDoubleClickHandled(CWPluginContext context, Boolean value);
CW_CALLBACK CWPanelListViewSetEditable (CWPluginContext context, Boolean value);
CW_CALLBACK CWPanelListViewGetCell (CWPluginContext context, long *col,long *row);
/* Preference data related */
CW_CALLBACK CWPanelGetOriginalPrefs (CWPluginContext context, CWMemHandle* originalPrefs);
CW_CALLBACK CWPanelGetCurrentPrefs (CWPluginContext context, CWMemHandle* currentPrefs);
CW_CALLBACK CWPanelGetFactoryPrefs (CWPluginContext context, CWMemHandle* factoryPrefs);
CW_CALLBACK CWPanelGetDebugFlag (CWPluginContext context, Boolean* debugOn);
CW_CALLBACK CWPanelSetRevertFlag (CWPluginContext context, Boolean canRevert);
CW_CALLBACK CWPanelSetFactoryFlag (CWPluginContext context, Boolean canFactory);
CW_CALLBACK CWPanelSetResetPathsFlag (CWPluginContext context, Boolean resetPaths);
CW_CALLBACK CWPanelSetRecompileFlag (CWPluginContext context, Boolean recompile);
CW_CALLBACK CWPanelSetRelinkFlag (CWPluginContext context, Boolean relink);
CW_CALLBACK CWPanelSetReparseFlag (CWPluginContext context, Boolean reparse);
CW_CALLBACK CWPanelGetPanelPrefs (CWPluginContext context, const char* panelName, CWMemHandle *prefs, Boolean* requiresByteSwap);
CW_CALLBACK CWPanelGetOldProjectFile (CWPluginContext context, CWFileSpec* projectSpec);
CW_CALLBACK CWPanelGetToEndian (CWPluginContext context, short* toEndian);
#if CWPLUGIN_HOST == CWPLUGIN_HOST_MACOS
CW_CALLBACK CWPanelGetAEKeyword (CWPluginContext context, AEKeyword* keyword);
CW_CALLBACK CWPanelGetAEDesc (CWPluginContext context, AEDesc* desc);
CW_CALLBACK CWPanelSetAEDesc (CWPluginContext context, const AEDesc* desc);
CW_CALLBACK CWPanelReadRelativePathAEDesc (CWPluginContext context, CWRelativePath* path, const AEDesc* desc);
CW_CALLBACK CWPanelWriteRelativePathAEDesc (CWPluginContext context, const CWRelativePath* path, AEDesc* desc);
#endif
/* Reading and writing scalar settings */
CW_CALLBACK CWReadBooleanSetting (CWPluginContext context, const char* name, Boolean* value);
CW_CALLBACK CWReadIntegerSetting (CWPluginContext context, const char* name, long* value);
CW_CALLBACK CWReadFloatingPointSetting (CWPluginContext context, const char* name, double* value);
CW_CALLBACK CWReadStringSetting (CWPluginContext context, const char* name, const char** value);
CW_CALLBACK CWReadRelativePathSetting (CWPluginContext context, const char* name, CWRelativePath* value);
CW_CALLBACK CWWriteBooleanSetting (CWPluginContext context, const char* name, Boolean value);
CW_CALLBACK CWWriteIntegerSetting (CWPluginContext context, const char* name, long value);
CW_CALLBACK CWWriteFloatingPointSetting (CWPluginContext context, const char* name, double value);
CW_CALLBACK CWWriteStringSetting (CWPluginContext context, const char* name, const char* value);
CW_CALLBACK CWWriteRelativePathSetting (CWPluginContext context, const char* name, const CWRelativePath* value);
/* Reading and writing array and structure settings */
CW_CALLBACK CWGetNamedSetting (CWPluginContext context, const char* name, CWSettingID* settingID);
CW_CALLBACK CWGetStructureSettingField (CWPluginContext context, CWSettingID settingID, const char* name, CWSettingID* fieldSettingID);
CW_CALLBACK CWGetArraySettingSize (CWPluginContext context, CWSettingID settingID, long* size);
CW_CALLBACK CWGetArraySettingElement (CWPluginContext context, CWSettingID settingID, long index, CWSettingID* elementSettingID);
CW_CALLBACK CWGetBooleanValue (CWPluginContext context, CWSettingID settingID, Boolean* value);
CW_CALLBACK CWGetIntegerValue (CWPluginContext context, CWSettingID settingID, long* value);
CW_CALLBACK CWGetFloatingPointValue (CWPluginContext context, CWSettingID settingID, double* value);
CW_CALLBACK CWGetStringValue (CWPluginContext context, CWSettingID settingID, const char** value);
CW_CALLBACK CWGetRelativePathValue (CWPluginContext context, CWSettingID settingID, CWRelativePath* value);
CW_CALLBACK CWSetBooleanValue (CWPluginContext context, CWSettingID settingID, Boolean value);
CW_CALLBACK CWSetIntegerValue (CWPluginContext context, CWSettingID settingID, long value);
CW_CALLBACK CWSetFloatingPointValue (CWPluginContext context, CWSettingID settingID, double value);
CW_CALLBACK CWSetStringValue (CWPluginContext context, CWSettingID settingID, const char* value);
CW_CALLBACK CWSetRelativePathValue (CWPluginContext context, CWSettingID settingID, const CWRelativePath* value);
#ifdef __cplusplus
}
#endif
#ifdef __MWERKS__
#pragma options align=reset
#endif
#ifdef _MSC_VER
#pragma pack(pop)
#endif
#endif /* __CWDROPINPANEL_H__ */
\ No newline at end of file diff --git a/sdk_hdrs/CWPluginErrors.h b/sdk_hdrs/CWPluginErrors.h new file mode 100755 index 0000000..74f93c7 --- /dev/null +++ b/sdk_hdrs/CWPluginErrors.h @@ -0,0 +1 @@ +/*
* CWPluginErrors.h - CW_Result constants for plugin errors
*
* Copyright © 1995-1997 Metrowerks, Inc. All rights reserved.
*
*/
#ifndef __CWPluginErrors_H__
#define __CWPluginErrors_H__
#ifdef __MWERKS__
# pragma once
#endif
enum
{
// common errors for all plugins
cwNoErr, /* successful return */
cwErrUserCanceled, /* operation canceled by user */
cwErrRequestFailed, /* generic failure when plugin fails */
cwErrInvalidParameter, /* one or more callback parameters invalid */
cwErrInvalidCallback, /* invalid given current request and plugin type*/
cwErrInvalidMPCallback, /* this request is not support from MP threads */
cwErrOSError, /* OS-specific, call CWGetCallbackOSError() */
cwErrOutOfMemory, /* not enough memory */
cwErrFileNotFound, /* file not found on disk */
cwErrUnknownFile, /* bad file number, doesn't exist */
cwErrSilent, /* request failed but plugin didn't report any */
/* errors and doesn't want IDE to report that */
/* an unknown error occurred */
cwErrCantSetAttribute, /* plugin requested inapplicable file flags in */
/* CWAddProjectEntry */
cwErrStringBufferOverflow, /* an output string buffer was too small */
cwErrDirectoryNotFound, /* unable to find a directory being sought */
cwErrLastCommonError = 512,
// compiler/linker errors
cwErrUnknownSegment, /* bad segment number, doesn't exist */
cwErrSBMNotFound, /* */
cwErrObjectFileNotStored, /* No external object file has been stored */
cwErrLicenseCheckFailed,/* license check failed, error reported by IDE */
cwErrFileSpecNotSpecified, /* a file spec was unspecified */
cwErrFileSpecInvalid, /* a file spec was invalid */
cwErrLastCompilerLinkerError = 1024
};
#endif // __CWPluginErrors_H__
\ No newline at end of file diff --git a/sdk_hdrs/CWPlugins.h b/sdk_hdrs/CWPlugins.h new file mode 100755 index 0000000..b3dbd2a --- /dev/null +++ b/sdk_hdrs/CWPlugins.h @@ -0,0 +1 @@ +/*
* CWPlugins.h - Common declarations for Metrowerks CodeWarriorª plugins
*
* Copyright © 1995-1997 Metrowerks, Inc. All rights reserved.
*
*/
#ifndef __CWPlugins_H__
#define __CWPlugins_H__
#ifdef __MWERKS__
# pragma once
#endif
#define CWPLUGIN_HOST_MACOS 1
#define CWPLUGIN_HOST_WIN32 2
#define CWPLUGIN_HOST_SOLARIS 3
#define CWPLUGIN_HOST_LINUX 4
#ifndef CWPLUGIN_HOST
# ifdef WIN32
# define CWPLUGIN_HOST CWPLUGIN_HOST_WIN32
# elif defined(macintosh)
# define CWPLUGIN_HOST CWPLUGIN_HOST_MACOS
# elif defined(__sun__)
# define CWPLUGIN_HOST CWPLUGIN_HOST_SOLARIS
# elif defined(__linux__)
# define CWPLUGIN_HOST CWPLUGIN_HOST_LINUX
# else
# error
# endif
#endif
#define CWPLUGIN_API_MACOS 1
#define CWPLUGIN_API_WIN32 2
#define CWPLUGIN_API_UNIX 3
#ifndef CWPLUGIN_API
# ifdef WIN32
# define CWPLUGIN_API CWPLUGIN_API_WIN32
# elif defined(macintosh)
# define CWPLUGIN_API CWPLUGIN_API_MACOS
# elif defined(__sun__) || defined(__linux__)
# define CWPLUGIN_API CWPLUGIN_API_UNIX
# else
# error
# endif
#endif
/*
** Radix 256 notation where a 32-bit integer is created from four
** ASCII characters. A four-character constant of this form, say
** 'ABCD', must always be represented with the same pattern, 0x41424344
** in this case, regardless of big/little endian issues.
*/
typedef long CWFourCharType;
#define CWFOURCHAR(a, b, c, d) \
(((CWFourCharType) ((a) & 0xff) << 24) \
| ((CWFourCharType) ((b) & 0xff) << 16) \
| ((CWFourCharType) ((c) & 0xff) << 8) \
| ((CWFourCharType) ((d) & 0xff)))
#if CWPLUGIN_API == CWPLUGIN_API_UNIX
#include <sys/param.h>
#endif
#ifndef CW_USE_PRAGMA_EXPORT
#if CWPLUGIN_HOST == CWPLUGIN_HOST_MACOS
#define CW_USE_PRAGMA_EXPORT 1
#else
#define CW_USE_PRAGMA_EXPORT 0
#endif
#endif
#ifndef CW_USE_PRAGMA_IMPORT
#if CWPLUGIN_HOST == CWPLUGIN_HOST_MACOS
#define CW_USE_PRAGMA_IMPORT 1
#else
#define CW_USE_PRAGMA_IMPORT 0
#endif
#endif
#ifdef __MWERKS__
#pragma options align=mac68k
#endif
#ifdef _MSC_VER
#pragma pack(push,2)
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if CW_USE_PRAGMA_IMPORT
#pragma import on
#endif
/* These constants specify the action the IDE is asking the plugin to execute */
enum {
reqInitialize = -2, /* called when the plugin is loaded */
reqTerminate = -1, /* called when the plugin is unloaded */
reqIdle = -100, /* called periodically to allow for plugin tasks EP 6/24/98 */
reqAbout = -101, /* called to ask plugin to display about dialog EP 6/24/98 */
reqPrefsChange = -102 /* called when an associated pref panel changes EP 6/24/98 */
};
/* Used in CWFileInfo.dependencyType to indicate what type of make */
/* dependency to establish between files */
typedef enum CWDependencyType {
cwNoDependency, /* do not establish a dependency */
cwNormalDependency, /* recompile dependent whenever prereq changes */
cwInterfaceDependency /* recompile only if interface to file changes */
} CWDependencyType;
/* Used in CWFileInfo.filedatatype to indicate the type of data in a loaded file */
enum {
cwFileTypeUnknown, /* unknown binary data */
cwFileTypeText, /* normal text file */
cwFileTypePrecompiledHeader /* cached precompiled header */
};
/* constant for CWFileInfo.isdependentoffile */
#define kCurrentCompiledFile -1L
/* constant for CWStorePluginData/CWGetPluginData */
#define kTargetGlobalPluginData -1L
/* constant for CWNewProjectEntryInfo link order, segment, and overlay values */
#define kDefaultLinkPosition -1L
/* Selectors for CWFindLogicalDirectory */
enum {
kIDEDirectorySelector = 1, /* parent directory of IDE application; "bin" folder on Win32 */
kCodeWarriorDirectorySelector, /* root CodeWarrior directory */
kSystemDirectorySelector, /* system directory */
kProjectDirectorySelector, /* parent directory of current project */
kProjectDataDirectorySelector, /* project data directory */
kTargetDataDirectorySelector, /* target data directory (within project data directory) */
kTargetObjectCodeDirectorySelector, /* object code directory (within target data directory) */
kDebuggerCacheDirectorySelector, /* "CW Debugging Cache" directory */
kHelperAppsDirectorySelector, /* "(Helper Apps)" directory */
kPluginsDirectorySelector, /* "CodeWarrior Plugins" (Mac) or "plugins" (Win32) directory */
kPluginParentDirectorySelector, /* parent directory of current plugin */
kStationeryDirectorySelector, /* "(Project Stationery)" directory */
kRADStationeryDirectorySelector, /* "RAD Stationery" directory */
kLocalizedResourcesDirectorySelector /* "resources" directory */
};
/* CWPluginContext is a magic cookie passed to all plugins. It must */
/* be passed back to all IDE callbacks */
typedef struct CWPluginPrivateContext* CWPluginContext;
/* CWResult is the error/status result returned by all IDE API routine. */
/* The most common errors are returned directly. For OS-specific errors, the */
/* CWResult is cwErrOSError, and the OS-specific error can be obtained by */
/* calling CWGetOSError() */
typedef long CWResult;
/* CWMemHandle is an abstraction for memory used in some parts */
/* of the plugin API. API routines must be used to allocate */
/* and free CWMemHandles, or to convert them to pointers. */
typedef struct CWMemHandlePrivateStruct* CWMemHandle;
/* Used to identify custom data associated by a plugin with */
/* a project file or a target as a whole. Must be a four character */
/* constant. All lower case constants are reserved by the IDE */
typedef unsigned long CWDataType;
/* Some information used in the compiler/linker API is platform-dependent */
/* We use some typedefs to isolate the differences */
/* CWFileSpec contains the native platform file specifier. */
/* CWFileName contains the string type for a native file name */
/* CWFileTime contains the native platform file timestamp */
/* CWOSResult contains the native platform error return value */
/* CWResult contains an API routine error/status result */
/* CW_CALLBACK is a macro defining the calling convention and return type for */
/* IDE callback routines. */
/* CW_PLUGINENTRY is a macro defining the calling convention and return type for */
/* plugin entry points. */
/* CWSUCCESS is a macro that evaluates to true when given a CWResult indicating an */
/* routine succeeded */
#if CWPLUGIN_API == CWPLUGIN_API_MACOS
typedef FSSpec CWFileSpec;
typedef char CWFileName[32];
typedef unsigned long CWFileTime;
typedef OSErr CWOSResult;
#elif CWPLUGIN_API == CWPLUGIN_API_WIN32
typedef unsigned char Boolean;
typedef struct CWFileSpec { char path[MAX_PATH]; } CWFileSpec;
typedef char CWFileName[65];
typedef FILETIME CWFileTime;
typedef DWORD CWOSResult;
#elif CWPLUGIN_API == CWPLUGIN_API_UNIX
#define MAX_PATH MAXPATHLEN
#ifndef __MACTYPES__
typedef unsigned char Boolean;
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
typedef struct CWFileSpec { char path[MAX_PATH]; } CWFileSpec;
typedef char CWFileName[65];
typedef time_t CWFileTime;
typedef int CWOSResult;
#else
#error Unknown plugin API!
#endif
#define CWSUCCESS(result) ((result) == 0)
#if CWPLUGIN_HOST == CWPLUGIN_HOST_MACOS
#define CW_CALLBACK pascal CWResult
#define CW_CALLBACK_PTR(function_name) pascal CWResult (function_name)
#define CWPLUGIN_ENTRY(function_name) pascal short (function_name)
#elif CWPLUGIN_HOST == CWPLUGIN_HOST_WIN32
#define CW_CALLBACK CWResult __stdcall
#define CW_CALLBACK_PTR(function_name) CWResult (__stdcall function_name)
#define CWPLUGIN_ENTRY(function_name) short (__stdcall function_name)
#elif CWPLUGIN_HOST==CWPLUGIN_HOST_SOLARIS || CWPLUGIN_HOST==CWPLUGIN_HOST_LINUX
#define CW_CALLBACK CWResult
#define CW_CALLBACK_PTR(function_name) CWResult (function_name)
#define CWPLUGIN_ENTRY(function_name) short (function_name)
#else
#error Unknown plugin host!
#endif
/* information returned by CWFindAndLoadFile */
typedef struct CWFileInfo {
Boolean fullsearch; /* [<-] do we do a full search of paths for file */
char dependencyType; /* [<-] type CWDependencyType */
long isdependentoffile; /* [<-] this file is a dependent of file id */
/* (zero based) or -1L if of current file */
Boolean suppressload; /* [<-] find but don't load the file */
Boolean padding; /* [**] structure padding */
const char* filedata; /* [->] point to the file text/data, or NULL */
long filedatalength; /* [->] length of filedata */
short filedatatype; /* [->] type of data pointed to by filedata */
/* the remaining members are valid only when called by compilers */
short fileID; /* [->] use in browse records and dependencies */
CWFileSpec filespec; /* [->] specifies the file on disk */
Boolean alreadyincluded; /* [->] TRUE if already included in current compile */
Boolean recordbrowseinfo; /* [->] record browse info for this file? */
} CWFileInfo;
/* information maintained by the IDE for each segment in the project */
typedef struct CWProjectSegmentInfo {
char name[32]; /* segment name */
short attributes; /* segment attributes */
} CWProjectSegmentInfo;
/* 64 bit address */
typedef struct CWAddr64 {
long lo; /* low order longword of address */
long hi; /* high order longword of address */
} CWAddr64;
/* describes an overlay group, Use CWGetOverlayGroup1Info to iterate over overlay groups */
typedef struct CWOverlay1GroupInfo {
char name[256]; /* overlay group name */
CWAddr64 address; /* load address */
long numoverlays; /* number of overlays in this group */
} CWOverlay1GroupInfo;
/* describes an overlay, use CWGetOverlay1Info to iterate over overlays */
typedef struct CWOverlay1Info {
char name[256]; /* name of this overlay */
long numfiles; /* number of files in the overlay */
} CWOverlay1Info;
/* describes a file in an overlay, use CWGetOverlayFile1Info to iterate over files. Use */
/* whichfile in calls taking a file number, e.g. CWLoadObjectData or CWGetFileInfo */
typedef struct CWOverlay1FileInfo {
long whichfile; /* flat file number */
} CWOverlay1FileInfo;
/*
* All compiler errors or warnings which occur at some specific location in some
* source file are identified by a CWMessageRef structure. This structure
* provides sufficient information for the development environment to locate
* and display the exact position associated with a message. For each message,
* the compiler provides:
*
* errorstring: contains a description of the error, e.g. "syntax error"
* errorline: contains a subset of the text containing the error
* errorlevel: indicates if the "error" is an error, warning, or informational message
* CWMessageRef: further info so the IDE can perform two tasks:
* - Display a summary of each message, with the "error token"
* underlined within the compiler-provided errorline. This
* information is provided by the tokenoffset and tokenlength
* fields. If tokenLength is zero then no underlining is performed.
*
* - Open the file containing the error and select the full
* text of the error. This information is provided by the
* selectionoffset and selectionlength fields.
*/
typedef struct CWMessageRef
{
CWFileSpec sourcefile; /* file containing error */
long linenumber; /* error linenumber in file */
short tokenoffset; /* offset into errorline of token underline */
short tokenlength; /* length of error token to be underlined */
long selectionoffset; /* start of error for text selection */
long selectionlength; /* length of error for text selection */
} CWMessageRef;
/* message types, used for errorlevel parameter to message routines */
enum {
messagetypeInfo, /* informational only */
messagetypeWarning, /* warning message */
messagetypeError /* error message */
};
/* information maintained by the IDE for each file in the project */
typedef struct CWProjectFileInfo
{
CWFileSpec filespec; /* CW_FileSpec of file in project */
CWFileTime moddate; /* date source file was last modified */
short segment; /* segment number of file */
Boolean hasobjectcode; /* file has object code to be linked */
Boolean hasresources; /* file has resources to be linked */
Boolean isresourcefile; /* file -is- a resource file to be linked */
Boolean weakimport; /* file has "Import Weak" flag set */
Boolean initbefore; /* file has "Init Before" flag set */
Boolean gendebug; /* file has generate debug info on */
CWFileTime objmoddate; /* date object code was last modified */
CWFileName dropinname; /* name of dropin used to process this file */
short fileID; /* fileID to use in browse records */
Boolean recordbrowseinfo; /* record browse info for this file? */
Boolean reserved; /* reserved and used internally */
#if CWPLUGIN_HOST == CWPLUGIN_HOST_MACOS
/* some Macintosh-specific information */
OSType filetype; /* MacOS file type */
OSType filecreator; /* MacOS file creator */
#endif
Boolean hasunitdata; /* file has associated unit data (Pascal) */
Boolean mergeintooutput; /* file has "Merge Into Output" flag set */
unsigned long unitdatadependencytag; /* dependency tag (i.e. checksum) of unit data (Pascal) */
} CWProjectFileInfo;
typedef struct CWNewTextDocumentInfo
{
const char* documentname; /* name for new document, can be NULL */
CWMemHandle text; /* initial text for document */
Boolean markDirty; /* mark doc as needing to be saved? */
} CWNewTextDocumentInfo;
typedef struct CWNewProjectEntryInfo
{ /* use kDefaultLinkPosition to get default link order, overlay, or segment */
long position; /* optional link order position */
long segment; /* optional segment number */
long overlayGroup; /* optional overlay group number */
long overlay; /* optional overlay number */
const char* groupPath; /* optional fully qualified path to file group */
Boolean mergeintooutput; /* set merge into output flag? */
Boolean weakimport; /* set weak import flag? */
Boolean initbefore; /* set initbefore flag? */
} CWNewProjectEntryInfo;
typedef struct CWIDEInfo
{
unsigned short majorVersion;
unsigned short minorVersion;
unsigned short bugFixVersion;
unsigned short buildVersion;
unsigned short dropinAPIVersion;
} CWIDEInfo;
/* Structures for getting the list of access paths. */
/* The callback does the filtering on the host flags, so the list returned */
/* will only contain the paths that are enabled for the host platform. */
/* There are separate APIs to get the Mac OS X framework style access paths. */
typedef enum CWAccessPathType {
cwSystemPath,
cwUserPath
} CWAccessPathType;
typedef struct CWAccessPathInfo
{
CWFileSpec pathSpec;
Boolean recursive;
long subdirectoryCount;
} CWAccessPathInfo;
typedef struct CWAccessPathListInfo
{
long systemPathCount;
long userPathCount;
Boolean alwaysSearchUserPaths;
Boolean convertPaths;
} CWAccessPathListInfo;
/* Structures for getting the list of Mac OS X framework access paths. */
/* The callback does the filtering on the host flags, so the list returned */
/* will only contain the Mac OS X framework style paths that are enabled for */
/* the host platform. */
/* There are separate APIs to get the traditional style access paths. */
typedef struct CWFrameworkAccessPathInfo
{
CWFileSpec pathSpec;
Boolean framework;
} CWFrameworkAccessPathInfo;
typedef struct CWFrameworkAccessPathListInfo
{
long systemPathCount;
long userPathCount;
Boolean alwaysSearchUserPaths;
Boolean convertPaths;
Boolean requireFrameworkIncludes;
} CWFrameworkAccessPathListInfo;
/* constants for different types of plugins */
/* Used in the dropintype in the DropInFlags, as well as for the MacOS file type */
enum
{
CWDROPINLINKERTYPE = CWFOURCHAR('L','i','n','k'), /* type for DropIn linkers */
CWDROPINCOMPILERTYPE= CWFOURCHAR('C','o','m','p'), /* type for DropIn compilers */
CWDROPINPREFSTYPE = CWFOURCHAR('P','a','n','L'), /* type for DropIn panels */
CWDROPINPREFSTYPE_1 = CWFOURCHAR('P','a','n','l'), /* type for 1.x IDE DropIn panels */
CWDROPINVCSTYPE = CWFOURCHAR('V','C','S',' '), /* type for DropIn version control */
CWDROPINCOMTYPE = CWFOURCHAR('C','O','M',' ') /* type for COM-only plugins */
};
typedef long CWPluginType; // one of the above types
/* Format of 'Flag' resources, or data returned by dropin's GetDropinFlags entry */
/* point. */
/* */
/* For the version 2 of these resource, we renamed the 'apiversion' field to */
/* 'earliestCompatibleAPIVersion' and added the 'newestAPIVersion' field. */
/* This allows plugins to support more than one API version and therefore run */
/* under more than one version of the IDE. The CWGetAPIVersion call should be used */
/* to determine what API version the IDE is using to talk to a plugin. */
#define kCurrentDropInFlagsVersion 2
typedef struct DropInFlags {
short rsrcversion; /* version number of resource */
CWDataType dropintype; /* dropin type (compiler, panel, etc) */
/* earliest API support by this plugin */
unsigned short earliestCompatibleAPIVersion;
unsigned long dropinflags; /* capability flags */
CWDataType edit_language; /* language */
unsigned short newestAPIVersion; /* newest API version supported */
} DropInFlags, **DropInFlagsHandle;
#define kCurrentCWPanelListVersion 1
typedef struct CWPanelList {
short version;
short count;
const char** names;
} CWPanelList;
#define kCurrentCWFamilyListVersion 1
#define kCurrentCWFamilyResourceVersion 1
typedef struct CWFamily {
CWDataType type;
const char* name;
} CWFamily;
typedef struct CWFamilyList {
short version;
short count;
CWFamily* families;
} CWFamilyList;
typedef struct CWFamilyResource {
short version;
CWDataType type;
unsigned char name[64];
} CWFamilyResource;
#define kCurrentCWHelpInfoVersion 1
typedef struct CWHelpInfo {
short version;
const char* helpFileName;
} CWHelpInfo;
#define kCurrentCWRelativePathVersion 1
typedef enum CWRelativePathFormat
{
format_Generic = 0, // Simple name, not platform-specific
format_Mac, // Uses : as separator :: for parent directory
format_Win, // Uses \ as separator .. for parent directory
format_Unix // Uses / as separator .. for parent directory
} CWRelativePathFormat;
typedef enum CWRelativePathTypes
{
type_Absolute = 0,
type_Project,
type_Compiler,
type_System,
type_UserDefined
} CWRelativePathTypes;
typedef struct CWRelativePath
{
short version; // version number
unsigned char pathType; // use CWRelativePathTypes
unsigned char pathFormat; // use CWRelativePathFormat
char userDefinedTree[256]; // user-defined tree name
char pathString[512]; // actual path string
} CWRelativePath;
/*
*
*/
#define kCurrentCWPluginInfoVersion 1
typedef struct CWPluginInfo
{
short version; // struct version number
const char* companyName; // i.e. Metrowerks
const char* pluginName; // Defaults to Dropin->GetName()
const char* pluginDisplayName;
const char* familyName; // i.e. Java
unsigned short majorIDEVersion; // Version of IDE Required
unsigned short minorIDEVersion;
} CWPluginInfo;
/* Declaration of plugin entry points that must be implemented by non-MacOS plugins */
/* It can also be implemented for MacOS plugins instead of having a 'Flag' resource */
CWPLUGIN_ENTRY (CWPlugin_GetDropInFlags)(const DropInFlags**, long* flagsSize);
/* Declaration of plugin entry points that may optionally be implemented by plugins */
/* These entry points override the corresponding resources on MacOS */
CWPLUGIN_ENTRY (CWPlugin_GetDropInName)(const char** dropInName);
CWPLUGIN_ENTRY (CWPlugin_GetDisplayName)(const char** displayName);
CWPLUGIN_ENTRY (CWPlugin_GetPanelList)(const CWPanelList** panelList);
CWPLUGIN_ENTRY (CWPlugin_GetFamilyList)(const CWFamilyList** familyList);
CWPLUGIN_ENTRY (CWPlugin_GetHelpInfo)(const CWHelpInfo** helpInfo);
/* Declaration of info plugin entry point that must be implemented by all COM plugins */
CWPLUGIN_ENTRY (CWPlugin_GetPluginInfo)(const CWPluginInfo** pluginInfo);
/* Callback declarations: these callbacks are supported for all CodeWarrior plugins */
/* Get the action the IDE is requesting of the plugin */
CW_CALLBACK CWGetPluginRequest(CWPluginContext context, long* request);
/* Call when finished handling a request, just before returning to the shell */
CW_CALLBACK CWDonePluginRequest(CWPluginContext, CWResult resultCode);
/* Get the version number of API used by the IDE to talk to the plugin */
CW_CALLBACK CWGetAPIVersion(CWPluginContext context, long* version);
/* Get information about the IDE being used */
CW_CALLBACK CWGetIDEInfo(CWPluginContext context, CWIDEInfo* info);
/* Get the OS error associated with the last callback */
CW_CALLBACK CWGetCallbackOSError(CWPluginContext context, CWOSResult* error);
/* Set the OS error associated with a failed plugin request */
CW_CALLBACK CWSetPluginOSError(CWPluginContext context, CWOSResult);
/* Get the file specifier for the current project */
CW_CALLBACK CWGetProjectFile(CWPluginContext context, CWFileSpec* projectSpec);
/* Get the directory where the IDE stores target-specific generated data */
CW_CALLBACK CWGetTargetDataDirectory(CWPluginContext context, CWFileSpec* targetDataDirectorySpec);
/* Get the name of the current target in the current project */
CW_CALLBACK CWGetTargetName(CWPluginContext context, char* name, short maxLength);
/* Get the directory where output files should be stored */
CW_CALLBACK CWGetOutputFileDirectory(CWPluginContext context, CWFileSpec* outputFileDirectory);
/* Get the number of files in the current project */
CW_CALLBACK CWGetProjectFileCount(CWPluginContext context, long* count);
/* Get information about a particular file in the project */
CW_CALLBACK CWGetFileInfo(CWPluginContext context, long whichfile, Boolean checkFileLocation, CWProjectFileInfo* fileinfo);
/* Search for a file by name on the current file's access paths. */
CW_CALLBACK CWFindAndLoadFile(CWPluginContext context, const char* filename, CWFileInfo *fileinfo);
/* Get the access paths for the current target */
CW_CALLBACK CWGetAccessPathListInfo(CWPluginContext context, CWAccessPathListInfo* pathListInfo);
CW_CALLBACK CWGetAccessPathInfo(CWPluginContext context, CWAccessPathType pathType, long whichPath, CWAccessPathInfo* pathInfo);
CW_CALLBACK CWGetAccessPathSubdirectory(CWPluginContext context, CWAccessPathType pathType, long whichPath, long whichSubdirectory, CWFileSpec* subdirectory);
CW_CALLBACK CWGetFrameworkAccessPathListInfo(CWPluginContext context, CWFrameworkAccessPathListInfo* pathListInfo);
CW_CALLBACK CWGetFrameworkAccessPathInfo(CWPluginContext context, CWAccessPathType pathType, long whichPath, CWFrameworkAccessPathInfo* pathInfo);
/* Get file text, from the editor, include file cache, or by reading the file */
CW_CALLBACK CWGetFileText(CWPluginContext context, const CWFileSpec* filespec, const char** text, long* textLength, short* filedatatype);
/* Release file text returned by CWFindAndLoadFile and CWGetFileText */
CW_CALLBACK CWReleaseFileText(CWPluginContext context, const char* text);
/* Get information about a project segment */
CW_CALLBACK CWGetSegmentInfo(CWPluginContext context, long whichsegment, CWProjectSegmentInfo* segmentinfo);
/* Get the number of overlay groups in the target */
CW_CALLBACK CWGetOverlay1GroupsCount(CWPluginContext context, long* count);
/* Get information about a project overlay group */
CW_CALLBACK CWGetOverlay1GroupInfo(CWPluginContext context, long whichgroup, CWOverlay1GroupInfo* groupinfo);
/* Get information about an overlay within a group */
CW_CALLBACK CWGetOverlay1Info(CWPluginContext context, long whichgroup, long whichoverlay, CWOverlay1Info* overlayinfo);
/* Get information about a file in an overlay */
CW_CALLBACK CWGetOverlay1FileInfo(CWPluginContext context, long whichgroup, long whichoverlay, long whichoverlayfile, CWOverlay1FileInfo* fileinfo);
/* Report a error, warning, or informational message */
CW_CALLBACK CWReportMessage(CWPluginContext context, const CWMessageRef* msgRef, const char *line1, const char *line2, short errorlevel, long errorNumber);
/* Display an alert. May actually be put in a message, depending on the plugin request */
CW_CALLBACK CWAlert(CWPluginContext context, const char* msg1, const char* msg2, const char* msg3, const char* msg4);
/* Display one or two status messages to the user */
CW_CALLBACK CWShowStatus(CWPluginContext context, const char *line1, const char *line2);
/* Give to the IDE to handle events and check if user has canceled this operation */
CW_CALLBACK CWUserBreak(CWPluginContext context);
/* Return stored preference data, referenced by name. Typically used for preference */
/* panel settings. */
CW_CALLBACK CWGetNamedPreferences(CWPluginContext context, const char* prefsname, CWMemHandle* prefsdata);
/* Store data referenced by a data type and file number */
CW_CALLBACK CWStorePluginData(CWPluginContext context, long whichfile, CWDataType type, CWMemHandle prefsdata);
/* Return stored data referenced by a data type and file number */
CW_CALLBACK CWGetPluginData(CWPluginContext context, long whichfile, CWDataType type, CWMemHandle* prefsdata);
/* Inform the IDE that a file modification date has changed. isGenerated is for use */
/* by compiler and linker plugins only */
CW_CALLBACK CWSetModDate(CWPluginContext context, const CWFileSpec* filespec, CWFileTime* moddate, Boolean isGenerated);
/* Ask the IDE to add a file to the current target in the current project. isGenerated */
/* is for use by compiler plugins only. */
CW_CALLBACK CWAddProjectEntry(CWPluginContext context, const CWFileSpec* fileSpec, Boolean isGenerated, const CWNewProjectEntryInfo* projectEntryInfo, long* whichfile);
/* Ask the IDE to remove a file from the current target (link-order/segment/overlay) in the current project. */
/* If it's the last target that contains the file, it would be removed from the file list. */
CW_CALLBACK CWRemoveProjectEntry(CWPluginContext context, const CWFileSpec* fileSpec);
/* Create a new editor window, supplying initial text and an optional document name */
CW_CALLBACK CWCreateNewTextDocument(CWPluginContext, const CWNewTextDocumentInfo* docinfo);
/* Allocate memory. Permanent memory is not freed until the plugin is unloaded. */
/* Temporary memory is freed after each plugin request completes. */
CW_CALLBACK CWAllocateMemory(CWPluginContext context, long size, Boolean isPermanent, void** ptr);
/* Free memory allocated via CWAllocateMemory */
CW_CALLBACK CWFreeMemory(CWPluginContext context, void* ptr, Boolean isPermanent);
/* Allocate a memory handle of the requested size. All handles are automatically */
/* freed at the end of each compiler/linker request. useTempMemory is MacOS-specific*/
CW_CALLBACK CWAllocMemHandle(CWPluginContext context, long size, Boolean useTempMemory, CWMemHandle* handle);
/* Free a memory handle */
CW_CALLBACK CWFreeMemHandle(CWPluginContext context, CWMemHandle handle);
/* Return the current size of a memory handle */
CW_CALLBACK CWGetMemHandleSize(CWPluginContext context, CWMemHandle handle, long* size);
/* Resize an existing memory handle */
CW_CALLBACK CWResizeMemHandle(CWPluginContext context, CWMemHandle handle, long newSize);
/* To obtain a pointer to the block, you must lock the handle */
/* moveHi is MacOS-specific */
CW_CALLBACK CWLockMemHandle(CWPluginContext context, CWMemHandle handle, Boolean moveHi, void** ptr);
/* Unlock a memory handle, the pointer returned by locking the handle may no */
/* longer be valid */
CW_CALLBACK CWUnlockMemHandle(CWPluginContext context, CWMemHandle handle);
#if CWPLUGIN_HOST == CWPLUGIN_HOST_MACOS
/* Utility function to map MacOS error codes to a CWResult code. Plugins */
/* may internally generate OSErrs, but need to return CWResult to the */
/* CodeWarrior IDE */
CW_CALLBACK CWMacOSErrToCWResult(CWPluginContext context, OSErr err);
#endif
/* Turn off the built in PP window manager while the plugin displays a dialog */
CW_CALLBACK CWPreDialog(CWPluginContext context);
/* Turn on the built in PP window manager after the plugin is through with its */
/* dialog */
CW_CALLBACK CWPostDialog(CWPluginContext context);
/* Notify the IDE that the plugin will be performing actions on a file */
CW_CALLBACK CWPreFileAction(CWPluginContext context, const CWFileSpec *theFile);
/* Notify the IDE that the plugin is finished performing actions on a file */
CW_CALLBACK CWPostFileAction(CWPluginContext context, const CWFileSpec *theFile);
CW_CALLBACK CWResolveRelativePath(CWPluginContext context, const CWRelativePath* relativePath, CWFileSpec* fileSpec, Boolean create);
CW_CALLBACK CWFindLogicalDirectory(CWPluginContext context, long selector, CWFileSpec *dirSpec);
CW_CALLBACK CWOpenFileInEditor(CWPluginContext context, const CWFileSpec *fileSpec);
#if CWPLUGIN_HOST==CWPLUGIN_HOST_SOLARIS || CWPLUGIN_HOST==CWPLUGIN_HOST_LINUX
/* Forward declarations */
struct ICodeWarriorApp;
struct ICodeWarriorProject;
struct ICodeWarriorDesign;
struct ICodeWarriorTarget;
#endif /* CWPLUGIN_HOST==CWPLUGIN_HOST_SOLARIS || CWPLUGIN_HOST==CWPLUGIN_HOST_LINUX */
/* Get the IDE application COM interface. Fails if called from any thread */
/* other than the main IDE thread, e.g. a build thread. */
CW_CALLBACK CWGetCOMApplicationInterface(CWPluginContext context, struct ICodeWarriorApp **app);
/* Get the current project COM interface. Adds a reference upon return. */
/* Only succeeds if the plugin is being called in the context of a */
/* particular project. Fails if called from any thread */
/* other than the main IDE thread, e.g. a build thread. */
CW_CALLBACK CWGetCOMProjectInterface(CWPluginContext context, struct ICodeWarriorProject **project);
/* Get the current design COM interface. Adds a reference upon return. */
/* Only succeeds if the plugin is being called in the context of a */
/* particular target that is associated with a design. */
/* Fails if called from any thread other than the main IDE thread, */
/* e.g. a build thread. */
CW_CALLBACK CWGetCOMDesignInterface(CWPluginContext context, struct ICodeWarriorDesign **design);
/* Get the current target COM interface. Adds a reference upon return. */
/* Only succeeds if the plugin is being called in the context of a */
/* particular target. Fails if called from any thread */
/* other than the main IDE thread, e.g. a build thread. */
CW_CALLBACK CWGetCOMTargetInterface(CWPluginContext context, struct ICodeWarriorTarget **target);
#if CW_USE_PRAGMA_IMPORT
#pragma import reset
#endif
#ifdef __cplusplus
}
#endif
#ifdef _MSC_VER
#pragma pack(pop)
#endif
#ifdef __MWERKS__
#pragma options align=reset
#endif
#endif /* __CWPlugins_H__ */
\ No newline at end of file diff --git a/sdk_hdrs/CWRuntimeFeatures.h b/sdk_hdrs/CWRuntimeFeatures.h new file mode 100755 index 0000000..003020c --- /dev/null +++ b/sdk_hdrs/CWRuntimeFeatures.h @@ -0,0 +1 @@ +/*****************************************************************************/
/* Name......: CWRuntimeFeatures.h */
/* Purpose...: Macros to parameterize your runtime environment based on */
/* platform-specific compiler macros. Target/host */
/* configurations to set host/target values as well as */
/* CW_HOST, CW_HOSTOS, CW_HOST_ENDIAN, CW_LINE_ENDING, */
/* and CW_UNIX_TYPE, which is used to discriminate among */
/* the various UNIX versions. */
/* Info......: These settings are common enough to factor into a location */
/* that can be shared by all components, including those */
/* used internally and those shared externally. */
/* Copyright.: ©Copyright 2000 by metrowerks inc. All rights reserved. */
/*****************************************************************************/
#ifndef CW_RuntimeFeatures_H
#define CW_RuntimeFeatures_H
/*************************
* Runtime Definitions *
*************************/
/* host / target processors values used to set HOST macro. */
#define CW_MC68K 1
#define CW_POWERPC 2
#define CW_INTEL 3
#define CW_MIPS 4
#define CW_SPARC 5
#define CW_PA_RISC 6
/* host / target operating systems values used to set CW_HOSTOS macro. */
#define CW_MACOS 1
#define CW_BEWORKS 2
#define CW_UNIX 3
#define CW_MSWIN 4
#define CW_MAGIC 5
#define CW_QNX 11
/* UNIX specialization values used to set the CW_UNIX_TYPE macro. */
#define CW_SOLARIS 32 /* Base value to support bit manipulation */
#define CW_LINUX 33
#define CW_RHAPSODY 34
#define CW_HPUX 35
#define CW_IRIX 36
#define CW_AIX 37
#define CW_FREEBSD 38
/* big/little endian values used to set CW_HOST_ENDIAN macro. */
#define CW_ENDIAN_NEUTRAL 0x7fffffff
#define CW_BIG_ENDIAN 1
#define CW_LITTLE_ENDIAN 2
#define CW_EITHER_ENDIAN 3
/*
** Detemine run-time environment settings based on clues from the
** compile time settings given by specific compilers.
*/
#if defined(__MWERKS__)
/* Metrowerks Compiler */
#if macintosh && __MC68K__
/* 68K MacOS */
#define CW_HOST CW_MC68K
#define CW_HOSTOS CW_MACOS
#define CW_HOST_ENDIAN CW_BIG_ENDIAN
#define CW_LINE_ENDING "\r"
#elif macintosh && __POWERPC__
/* PPC MacOS */
#define CW_HOST CW_POWERPC
#define CW_HOSTOS CW_MACOS
#define CW_HOST_ENDIAN CW_BIG_ENDIAN
#define CW_LINE_ENDING "\r"
#elif __INTEL__ && defined(__BEOS__)
/* x86 BeOS */
#define CW_HOST CW_INTEL
#define CW_HOSTOS CW_BEWORKS
#define CW_HOST_ENDIAN CW_LITTLE_ENDIAN
#define CW_LINE_ENDING "\n"
#elif __INTEL__ && defined(__QNX__)
/* x86 QNX */
#define CW_HOST CW_INTEL
#define CW_HOSTOS CW_QNX
#define CW_HOST_ENDIAN CW_LITTLE_ENDIAN
#define CW_LINE_ENDING "\n"
#elif __INTEL__ && __linux__
/* x86 Linux */
#define CW_HOST CW_INTEL
#define CW_HOSTOS CW_UNIX
#define CW_UNIX_TYPE CW_LINUX
#define CW_HOST_ENDIAN CW_LITTLE_ENDIAN
#define CW_LINE_ENDING "\n"
#elif __INTEL__ /* default to Win32 */
/* x86 Assuming Windows */
#define CW_HOST CW_INTEL
#define CW_HOSTOS CW_MSWIN
#define CW_HOST_ENDIAN CW_LITTLE_ENDIAN
#define CW_LINE_ENDING "\r\n"
#else
#error "UNKNOWN CW COMPILER USE"
#endif
#elif defined(__GNUC__)
/* GCC/EGCS Compiler */
#if __i386__ && __linux__
/* x86 Linux */
#define CW_HOST CW_INTEL
#define CW_HOSTOS CW_UNIX
#define CW_UNIX_TYPE CW_LINUX
#define CW_HOST_ENDIAN CW_LITTLE_ENDIAN
#define CW_LINE_ENDING "\n"
#elif __i386__ && __sun__
/* x86 Solaris */
#define CW_HOST CW_INTEL
#define CW_HOSTOS CW_UNIX
#define CW_UNIX_TYPE CW_SOLARIS
#define CW_HOST_ENDIAN CW_LITTLE_ENDIAN
#define CW_LINE_ENDING "\n"
#elif __sparc__ && __linux__
/* SPARC Linux */
#define CW_HOST CW_SPARC
#define CW_HOSTOS CW_UNIX
#define CW_UNIX_TYPE CW_LINUX
#define CW_HOST_ENDIAN CW_BIG_ENDIAN
#define CW_LINE_ENDING "\n"
#elif __sparc__ && __sun__
/* SPARC Solaris */
#define CW_HOST CW_SPARC
#define CW_HOSTOS CW_UNIX
#define CW_UNIX_TYPE CW_SOLARIS
#define CW_HOST_ENDIAN CW_BIG_ENDIAN
#define CW_LINE_ENDING "\n"
#elif __i386__ && __BEOS__
/* x86 BeOS */
#define CW_HOST CW_INTEL
#define CW_HOSTOS CW_BEWORKS
#define CW_HOST_ENDIAN CW_LITTLE_ENDIAN
#define CW_LINE_ENDING "\n"
#elif __powerpc__ && __linux__
/* PPC Linux */
#define CW_HOST CW_POWERPC
#define CW_HOSTOS CW_UNIX
#define CW_UNIX_TYPE CW_LINUX
#define CW_HOST_ENDIAN CW_BIG_ENDIAN
#define CW_LINE_ENDING "\n"
#else
#error "UNKNOWN GNU COMPILER USE"
#endif
#elif defined(_MSC_VER)
/* Microsoft VC Compiler */
#if defined(_M_IX86)
/* x86 Windows */
#define CW_HOST CW_INTEL
#define CW_HOSTOS CW_MSWIN
#define CW_HOST_ENDIAN CW_LITTLE_ENDIAN
#define CW_LINE_ENDING "\r\n"
#else
#error "UNKNOWN MSC COMPILER USE"
#endif
#else
#error "UNKNOWN COMPILER"
#endif
#endif /* CW_RuntimeFeatures_H */
\ No newline at end of file diff --git a/sdk_hdrs/CWUnixPluginPrefix.h b/sdk_hdrs/CWUnixPluginPrefix.h new file mode 100755 index 0000000..a261ea3 --- /dev/null +++ b/sdk_hdrs/CWUnixPluginPrefix.h @@ -0,0 +1 @@ +/*
* CWUnixPluginPrefix.h
*
* Copyright © 1999 Metrowerks, Inc. All rights reserved.
*
*/
#ifndef MW_CWUnixPluginPrefix_H
#define MW_CWUnixPluginPrefix_H
#define CW_USE_PRAGMA_EXPORT 0
#include "CWRuntimeFeatures.h"
#ifdef __MWERKS__
#if !__option(bool)
#ifndef true
#define true 1
#endif
#ifndef false
#define false 0
#endif
#endif
#endif
#endif /* MW_CWUnixPluginPrefix_H */
\ No newline at end of file diff --git a/sdk_hdrs/CWWinPluginPrefix.h b/sdk_hdrs/CWWinPluginPrefix.h new file mode 100755 index 0000000..4ad49af --- /dev/null +++ b/sdk_hdrs/CWWinPluginPrefix.h @@ -0,0 +1 @@ +#include <Win32Headers.mch>
#ifndef WIN32
#define WIN32 1
#endif
#define CW_USE_PRAGMA_EXPORT 0
#ifdef __MWERKS__
#if !__option(bool)
#ifndef true
#define true 1
#endif
#ifndef false
#define false 0
#endif
#endif
#endif
\ No newline at end of file diff --git a/sdk_hdrs/CatTypes.h b/sdk_hdrs/CatTypes.h new file mode 100755 index 0000000..421622b --- /dev/null +++ b/sdk_hdrs/CatTypes.h @@ -0,0 +1 @@ +#ifndef __CATTYPES_H__
#define __CATTYPES_H__
typedef int CatNodeID;
#define NODE_NULL -1
#define NODE_ROOT 0
#define kCatalogClass "CodeWarrior.CatalogModelObject"
#define kFolderClass "CodeWarrior.FolderModelObject"
#define kTrashNodeClass "CodeWarrior.TrashNode"
// internal properties used in the catalog
#define kContentsFolder "ContentsFolder"
#define kClass "Class"
#define kComments "Comments"
#define kFile "File"
#define kNodeLocked "Locked"
#define kModDate "Modified"
#define kName "Name"
#define kID "ID"
#define kFolderSuffix "_Contents"
#define kDefCatalogExt "ctlg"
#define kDefCatalogFolderExt "ctlgf"
// Command group ID for commands in the catalog menu...
const long cmdGroup_CatalogMenu = 10000;
// catalog-specific menu commands to go with those defined by the IDE;
// such as cmd_Cut, cmd_Copy, etc.
const long cmd_CatalogRename = 10000; // plugin commands in the range 10000-10999
const long cmd_CatalogProperties = 10001;
const long cmd_ShowCatalogBrowser = 10002;
const long cmd_ShowCatalogPalette = 10003;
const long cmd_NewCatalog = 10004;
const long cmd_NewFolder = 10005;
const long cmd_OpenCatalog = 10006;
const long cmd_CloseCatalog = 10007;
const long cmd_ImportControls = 10008;
const long cmd_ShowPrevious = 10009;
const long cmd_ShowNext = 10010;
const long cmd_ExpandIndexView = 10011;
const long cmd_CollapseIndexView = 10012;
const long cmd_ToggleIndexView = 10013;
const long cmd_CloseCatalogPalette = 10014;
enum UPDATE_TYPE
{
UPDATE_NONE = 0,
UPDATE_CHILDREN,
UPDATE_DESCENDANTS
};
enum CatTransType
{
CATTRANS_TYPE_UNKNOWN,
CATTRANS_TYPE_ALIAS,
CATTRANS_TYPE_COPY,
CATTRANS_TYPE_DELETE,
CATTRANS_TYPE_DROP,
CATTRANS_TYPE_EDITPROPERTIES,
CATTRANS_TYPE_LOCK,
CATTRANS_TYPE_MOVE,
CATTRANS_TYPE_PASTE,
CATTRANS_TYPE_RENAME,
CATTRANS_TYPE_UNLOCK
};
struct CatWindowData
{
bool fUseDefSize;
bool fUseDefPos;
SIZE size;
POINT pos;
CatWindowData() : fUseDefSize(true), fUseDefPos(true)
{
pos.x = pos.y = 0;
size.cx = size.cy = 0;
}
};
#endif // __CATTYPES_H__
\ No newline at end of file diff --git a/sdk_hdrs/CompilerMapping.h b/sdk_hdrs/CompilerMapping.h new file mode 100755 index 0000000..30ee355 --- /dev/null +++ b/sdk_hdrs/CompilerMapping.h @@ -0,0 +1 @@ +/*
* CompilerMapping.h - File Type & Extension => Compiler Mapping for Metrowerks CodeWarriorª
*
* Copyright © 1995 Metrowerks, Inc. All rights reserved.
*
*/
#ifndef __COMPILERMAPPING_H__
#define __COMPILERMAPPING_H__
#ifdef __MWERKS__
# pragma once
#endif
#ifndef __CWPLUGINS_H__
#include "CWPlugins.h"
#endif
#ifdef __MWERKS__
#pragma options align=mac68k
#endif
#ifdef _MSC_VER
#pragma pack(push,2)
#endif
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __cplusplus
const CWDataType Lang_C_CPP = CWFOURCHAR('c','+','+',' ');
const CWDataType Lang_Pascal = CWFOURCHAR('p','a','s','c');
const CWDataType Lang_Rez = CWFOURCHAR('r','e','z',' ');
const CWDataType Lang_Java = CWFOURCHAR('j','a','v','a');
const CWDataType Lang_MISC = CWFOURCHAR('\?','\?','\?','\?');
#else
#define Lang_C_CPP CWFOURCHAR('c','+','+',' ')
#define Lang_Pascal CWFOURCHAR('p','a','s','c')
#define Lang_Rez CWFOURCHAR('r','e','z',' ')
#define Lang_Java CWFOURCHAR('j','a','v','a')
#define Lang_MISC CWFOURCHAR('\?','\?','\?','\?')
#endif
/* Compiler flags, as used in member dropinflags of struct DropInFlags returned by compilers */
enum
{
kGeneratescode = 1L << 31, /* this compiler generates code */
kGeneratesrsrcs = 1L << 30, /* this compiler generates resources */
kCanpreprocess = 1L << 29, /* this compiler can accept a Preprocess request */
kCanprecompile = 1L << 28, /* this compiler can accept a Precompile request */
kIspascal = 1L << 27, /* this is the pascal compiler */
kCanimport = 1L << 26, /* this compiler needs the "Import Weak" popup */
kCandisassemble = 1L << 25, /* this compiler can disassemble */
kPersistent = 1L << 24, /* keep the compiler resident except on context switches*/
kCompAllowDupFileNames = 1L << 23, /* allow multiple project files with the same name */
kCompMultiTargAware = 1L << 22, /* the compiler can be used with multiple targets */
kIsMPAware = 1L << 21, /* the compiler can be run in an MP thread */
kCompUsesTargetStorage = 1L << 20, /* the compiler keeps storage per target */
kCompEmitsOwnBrSymbols = 1L << 19, /* browser info includes compiler-specific symbols */
kCompAlwaysReload = 1L << 18, /* always reload the compiler before request */
kCompRequiresProjectBuildStartedMsg = 1L << 17, /* Compiler listens for project build started messages */
kCompRequiresTargetBuildStartedMsg = 1L << 16, /* Compiler listens for target build started messages */
kCompRequiresSubProjectBuildStartedMsg = 1L << 15, /* Compiler listens for Sub project build started messages */
kCompRequiresFileListBuildStartedMsg = 1L << 14, /* Compiler listens for filelist build started messages */
kCompReentrant = 1L << 13, /* Compiler can use re-entrant DropIn and is re-entry safe */
kCompSavesDbgPreprocess = 1 << 12, /* Compiler will save preprocessed files for debugging needs */
kCompRequiresTargetCompileStartedMsg = 1 << 11 /* Compiler listens for target compile started/ended messages */
/* remaining flags are reserved for future use and should be zero-initialized */
};
/* Compiler mapping flags, used in CompilerMapping.flags & CWExtensionMapping.flags */
typedef unsigned long CompilerMappingFlags;
enum
{
kPrecompile = 1L << 31, /* should this file type be Precompiled? */
kLaunchable = 1L << 30, /* can this file type be double-clicked on? */
kRsrcfile = 1L << 29, /* does this file type contain resources for linking? */
kIgnored = 1L << 28 /* should files of this type be ignored during Make? */
/* remaining flags are reserved for future use and should be zero-initialized */
};
/* Format of data in 'EMap' resource, or as returned by a compiler's */
/* GetExtensionMapping entry point */
typedef struct CWExtensionMapping {
CWDataType type; /* MacOS file type, e.g. 'TEXT' or 0 */
char extension[32]; /* file extension, e.g. .c/.cp/.pch or "" */
CompilerMappingFlags flags; /* see above */
char editlanguage[32]; /* edit language or "" to use default language for plugin */
} CWExtensionMapping;
#define kCurrentCWExtMapListVersion 2
#define kCurrentCWExtMapListResourceVersion 2
typedef struct CWExtMapList {
short version;
short nMappings;
CWExtensionMapping* mappings;
} CWExtMapList;
/* Format of data returned by GetTargetList entry point */
#define kCurrentCWTargetListVersion 1
#define kCurrentCWTargetListResourceVersion 1
typedef struct CWTypeList {
short count;
CWDataType items[1];
} CW_CPUList, CW_OSList;
typedef struct CWTargetList {
short version;
short cpuCount;
CWDataType* cpus;
short osCount;
CWDataType* oss;
} CWTargetList;
typedef struct CWTargetListResource {
short version;
CW_CPUList cpus;
CW_OSList oss;
} CWTargetListResource;
#ifdef __cplusplus
}
#endif
#ifdef _MSC_VER
#pragma pack(pop,2)
#endif
#ifdef __MWERKS__
#pragma options align=reset
#endif
#endif /* __COMPILERMAPPING_H__ */
\ No newline at end of file diff --git a/sdk_hdrs/DropInCompilerLinker.h b/sdk_hdrs/DropInCompilerLinker.h new file mode 100755 index 0000000..8551a86 --- /dev/null +++ b/sdk_hdrs/DropInCompilerLinker.h @@ -0,0 +1 @@ +/*
* DropInCompilerLinker.h - Drop-In Interface for Metrowerks CodeWarriorª Compilers and Linkers
*
* Copyright © 1996 Metrowerks, Inc. All rights reserved.
*
*/
#ifndef __DROPINCOMPILERLINKER_H__
#define __DROPINCOMPILERLINKER_H__
#ifdef __MWERKS__
# pragma once
#endif
#ifndef __CWPlugins_H__
#include "CWPlugins.h"
#endif
#ifndef __COMPILERMAPPING_H__
#include "CompilerMapping.h"
#endif
#ifdef __MWERKS__
#pragma options align=mac68k
#endif
#ifdef _MSC_VER
#pragma pack(push,2)
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if CW_USE_PRAGMA_IMPORT
#pragma import on
#endif
/* this is the current version number of the API documented herein */
#define DROPINCOMPILERLINKERAPIVERSION_4 4
#define DROPINCOMPILERLINKERAPIVERSION_5 5
#define DROPINCOMPILERLINKERAPIVERSION_6 6
#define DROPINCOMPILERLINKERAPIVERSION_7 7
#define DROPINCOMPILERLINKERAPIVERSION_8 8
#define DROPINCOMPILERLINKERAPIVERSION_9 9
#define DROPINCOMPILERLINKERAPIVERSION_10 10
#define DROPINCOMPILERLINKERAPIVERSION_11 11
#define DROPINCOMPILERLINKERAPIVERSION_12 12
#define DROPINCOMPILERLINKERAPIVERSION_13 13
#define DROPINCOMPILERLINKERAPIVERSION DROPINCOMPILERLINKERAPIVERSION_13
/* deprecated request codes */
enum {
reqInitCompiler = reqInitialize, /* (called when compiler is loaded) */
reqTermCompiler = reqTerminate, /* (called when compiler is unloaded) */
reqInitLinker = reqInitialize, /* (called when linker is loaded) */
reqTermLinker = reqTerminate /* (called when linker is unloaded) */
};
/* request codes (common) */
enum {
reqTargetCompileEnded = -17, /* Sent when target's compile phase ends */
reqTargetCompileStarted = -16, /* Sent when target's compile phase starts */
reqTargetLinkEnded = -15, /* Sent when the link has ended */
reqTargetLinkStarted = -14, /* Sent when the link starts */
reqFileListBuildEnded = -13, /* Sent when the group file build ends */
reqFileListBuildStarted = -12, /* Sent when the group file build starts */
reqSubProjectBuildEnded = -11, /* Sent when subproject's build ends */
reqSubProjectBuildStarted = -10, /* Sent when subproject's build starts */
reqTargetBuildEnded = -9, /* Sent when target's build ends */
reqTargetBuildStarted = -8, /* Sent when target's build starts */
reqProjectBuildEnded = -7, /* Sent when project build ends */
reqProjectBuildStarted = -6, /* Sent when project build starts */
reqTargetLoaded = -5, /* called when the "keeps target info" flag is set */
reqTargetPrefsChanged = -4, /* called when the "keeps target info" flag is set */
reqTargetUnloaded = -3 /* called when the "keeps target info" flag is set */
};
/* requests codes (compilers) */
enum {
reqCompile = 0, /* compile/precompile/preprocess source file */
/* and return results */
reqMakeParse, /* used internally by Metrowerks */
reqCompDisassemble, /* disassemble a specific file in the project */
reqCheckSyntax, /* check syntax, but don't generate code */
reqPreprocessForDebugger /* when preprocess, don't open window w/results */
};
/* requests codes (linkers) */
enum {
reqLink = 0, /* link project and generate executable or library */
reqDisassemble, /* disassemble a specific file in the project */
reqTargetInfo, /* get info about the generated executable */
reqPreRun /* give linker a last chance to modify target info */
};
/* Returned as part of CWFileInfo to indicate the */
/* type of data pointed to by the filedata pointer */
enum {
filetypeText, /* data is text */
filetypeUnknown /* unknown type, could be precompiled header */
};
/* executable linkage types, used in CWTargetInfo.linkType */
enum {
exelinkageFlat, /* flat executable */
exelinkageSegmented, /* uses 68K code segments */
exelinkageOverlay1 /* uses overlay groups and overlays */
};
/* output file type, used in CWTargetInfo.outputType */
enum {
linkOutputNone, /* linker produces no output */
linkOutputFile, /* linker produces a file */
linkOutputDirectory /* linker produces a directory */
};
/* Constants for the targetCPU field of the CWTargetInfo struct */
enum {
targetCPU68K = CWFOURCHAR('6','8','k',' '),
targetCPUPowerPC = CWFOURCHAR('p','p','c',' '),
targetCPUi80x86 = CWFOURCHAR('8','0','8','6'),
targetCPUMips = CWFOURCHAR('m','i','p','s'),
targetCPUNECv800 = CWFOURCHAR('v','8','0','0'),
targetCPUEmbeddedPowerPC = CWFOURCHAR('e','P','P','C'),
targetCPUARM = CWFOURCHAR('a','r','m',' '),
targetCPUSparc = CWFOURCHAR('s','p','r','c'),
targetCPUIA64 = CWFOURCHAR('I','A','6','4'),
targetCPUAny = CWFOURCHAR('*','*','*','*'),
targetCPUMCORE = CWFOURCHAR('m','c','o','r'),
targetCPU_Intent = CWFOURCHAR('n','t','n','t')
};
/* Constants for the targetOS field of the CWTargetInfo struct */
enum {
targetOSMacintosh = CWFOURCHAR('m','a','c',' '),
targetOSWindows = CWFOURCHAR('w','i','n','t'),
targetOSNetware = CWFOURCHAR('n','l','m',' '),
targetOSMagicCap = CWFOURCHAR('m','c','a','p'),
targetOSOS9 = CWFOURCHAR('o','s','9',' '),
targetOSEmbeddedABI = CWFOURCHAR('E','A','B','I'),
targetOSJava = CWFOURCHAR('j','a','v','a'), /* java (no VM specification) */
targetOSJavaMS = CWFOURCHAR('j','v','m','s'), /* Microsoft VM */
targetOSJavaSun = CWFOURCHAR('j','v','s','n'), /* Sun VM */
targetOSJavaMRJ = CWFOURCHAR('j','v','m','r'), /* MRJ VM */
targetOSJavaMW = CWFOURCHAR('j','v','m','w'), /* Metrowerks VM */
targetOSPalm = CWFOURCHAR('p','a','l','m'),
targetOSGTD5 = CWFOURCHAR('g','t','d','5'),
targetOSSolaris = CWFOURCHAR('s','l','r','s'),
targetOSLinux = CWFOURCHAR('l','n','u','x'),
targetOSAny = CWFOURCHAR('*','*','*','*'),
targetOS_Intent = CWFOURCHAR('n','t','n','t')
};
/* linker flags, as used in member dropinflags of DropInFlags struct returned by linkers */
enum {
cantDisassemble = 1L << 31, /* this linker doesn't support 'Disassemble' */
isPostLinker = 1L << 30, /* this is a post linker */
linkAllowDupFileNames = 1L << 29, /* allow multiple project files with the same name */
linkMultiTargAware = 1L << 28, /* the linker can be used with multiple targets */
isPreLinker = 1L << 27, /* this is a pre linker */
linkerUsesTargetStorage = 1L << 26, /* the linker keeps storage per target */
linkerUnmangles = 1L << 25, /* The linker supports unmangling. */
magicCapLinker = 1L << 24, /* Pre- or post-linker is used for MagicCap */
linkAlwaysReload = 1L << 23, /* Always reload the linker before request */
linkRequiresProjectBuildStartedMsg = 1L << 22, /* Linker listens for a Project Build Started/Ended message */
linkRequiresTargetBuildStartedMsg = 1L << 21, /* Linker listens for a Target Build Started/Ended message */
linkRequiresSubProjectBuildStartedMsg = 1L << 20, /* Linker listens for a Sub Project Build Started/Ended message */
linkRequiresFileListBuildStartedMsg = 1L << 19, /* Linker listens for a File List Build Started/Ended message */
linkRequiresTargetLinkStartedMsg = 1L << 18, /* Linker listens for a Target Link Started/Ended message */
linkerWantsPreRunRequest = 1L << 17, /* Linker wants to be sent the pre-run request */
linkerGetTargetInfoThreadSafe = 1L << 16, /* GetTargetInfo call doesn't use any globals, etc. */
linkerUsesCaseInsensitiveSymbols = 1L << 15, /* All languages used by linker contain case insensitive browser symbols */
linkerDisasmRequiresPreprocess = 1L << 14, /* (obsolete) file must be preprocesed before being passed to linker for disasm */
linkerUsesFrameworks = 1L << 13, /* target uses frameworks; enables framework-style file searching */
linkerInitializeOnMainThread = 1L << 12 /* The Linker needs to be intialized on the main thread. */
/* remaining flags are reserved for future use and should be zero-initialized */
};
/* ways to store dependency returned as CWFileSpec in StoreObjectData */
enum {
cwAccessAbsolute,
cwAccessPathRelative,
cwAccessFileName,
cwAccessFileRelative
};
/* specifies what browser information compilers should generate */
/* they should always generate records for globals and functions */
typedef struct CWBrowseOptions {
Boolean recordClasses; /* [<-] do we record info for classes */
Boolean recordEnums; /* [<-] do we record info for enums */
Boolean recordMacros; /* [<-] do we record info for macros */
Boolean recordTypedefs; /* [<-] do we record info for typedefs */
Boolean recordConstants; /* [<-] do we record info for constants */
Boolean recordTemplates; /* [<-] do we record info for templates */
Boolean recordUndefinedFunctions; /* [<-] do we record info for undefined functions */
long reserved1; /* reserved space */
long reserved2; /* reserved space */
} CWBrowseOptions;
/* A dependency tag is associated with unit data in the StoreUnitData callback. It should */
/* change whenever unit data has changed in a way that forces its dependents to be rebuilt. */
/* Typically, it is just a checksum on the unit data. */
typedef unsigned long CWDependencyTag;
/* dependency information passed back in StoreObjectData */
typedef struct CWDependencyInfo {
long fileIndex; /* Another project entry. -1 => use fileSpec */
CWFileSpec fileSpec; /* location of file. Only used if fileIndex < 0 */
short fileSpecAccessType; /* One of cwAccessAbsolute, etc. above. Only */
/* used is specifying via fileSpec. */
short dependencyType; /* cwNormalDependency or cwInterfaceDependency. */
/* Values defined in CWPlugins.h */
} CWDependencyInfo;
/* information used when calling StoreObjectData */
typedef struct CWObjectData {
CWMemHandle objectdata; /* Handle to generated object code, */
/* resource data, or preprocessed text */
CWMemHandle browsedata; /* Handle to generated browse data */
long reserved1; /* reserved for future use, set to zero */
long codesize; /* size of generated code */
long udatasize; /* size of uninitialized data */
long idatasize; /* size of initialized data */
long compiledlines; /* number of lines of source compiled */
Boolean interfaceChanged; /* recompile interface dependents? */
long reserved2; /* reserved for future use, set to zero */
void* compilecontext; /* used internally by Metrowerks */
CWDependencyInfo* dependencies; /* optional array of dependencies */
short dependencyCount; /* overrides those collected by IDE */
CWFileSpec* objectfile; /* external object code file (i.e. .o file) */
} CWObjectData;
/* characteristics of a link target */
typedef struct CWTargetInfo {
short outputType; /* outputs file, directory, or nothing */
CWFileSpec outfile; /* generated executable file/folder spec */
CWFileSpec symfile; /* generated debug file spec */
CWFileSpec runfile; /* file to run, can be same or different from outfile */
short linkType; /* flat, segmented, or overlays */
Boolean canRun; /* "Run" can be performed on this target */
Boolean canDebug; /* "Run with Debugger" can be performed on this target */
CWDataType targetCPU; /* target CPU architecture (e.g. 68K, PowerPC, x86, MIPS)*/
CWDataType targetOS; /* target OS (e.g. MacOS, Windows, Unix) */
#if CWPLUGIN_HOST == CWPLUGIN_HOST_MACOS
OSType outfileCreator; /* file creator, if outputType == linkOutputFile */
OSType outfileType; /* file type, if outputType == linkOutputFile */
OSType debuggerCreator; /* file creator of debugger for this target */
OSType runHelperCreator; /* creator of helper app to use when running this file. */
#endif
#if CWPLUGIN_HOST == CWPLUGIN_HOST_WIN32
Boolean runHelperIsRegKey; /* true if runHelperName is a registry key */
Boolean debugHelperIsRegKey;/* true if debugHelperName is a registry key */
char args[512]; /* command line arguments */
char runHelperName[512]; /* full path to the run helper executable or a reg key */
Boolean runHelperRequiresURL;/* Indicates whether the outfile must be converted to */
/* a file scheme URL before being passed to the run */
/* helper app */
char reserved2;
char debugHelperName[512];/* full path to the debug helper executable or a reg key*/
#endif
// We need the args for Solaris
#if (CWPLUGIN_HOST == CWPLUGIN_HOST_SOLARIS || CWPLUGIN_HOST == CWPLUGIN_HOST_LINUX)
char args[512]; /* command line arguments */
char runHelperName[512]; /* Relative path name from (Helper Apps) to run helper program */
Boolean runHelperRequiresURL; /* Indicates whether the outfile must be converted to */
/* a file scheme URL before being passed to the run */
/* helper app */
char reserved2[3];
char debugHelperName[512]; /* Relative path name from (Helper Apps) to debug helper */
#endif
CWFileSpec linkAgainstFile; /* file parent targets link against (e.g. lib file) */
} CWTargetInfo;
typedef struct CWUnmangleInfo {
void* targetStorage;
const char* mangledName;
char* unmangleBuff;
long unmangleBuffSize;
unsigned short browserClassID;
unsigned char browserLang;
unsigned char filler1;
} CWUnmangleInfo;
/* Types used to get compiler-specific browser symbol information. */
typedef struct CWCompilerBrSymbol {
char symName[32];
char symUIName[32];
} CWCompilerBrSymbol;
typedef struct CWCompilerBrSymbolList {
short count;
CWCompilerBrSymbol items[1];
} CWCompilerBrSymbolList;
typedef struct CWCompilerBrSymbolInfo {
void* targetStorage;
CWCompilerBrSymbolList* symList; /* [<-] Compiler should put a pointer to the read-only list here.*/
} CWCompilerBrSymbolInfo;
typedef struct CWFrameworkInfo {
CWFileSpec fileSpec; /* location of ".framework" directory */
char version[256]; /* which version directory to use; if empty use "Current" sym link */
} CWFrameworkInfo;
/*** Declaration of plugin entry points that must be implemented by non-MacOS plugins ***/
/*** It can also be implemented by a MacOS plugin to override the 'Targ' resource ***/
CWPLUGIN_ENTRY (CWPlugin_GetTargetList)(const struct CWTargetList**);
/*** Optional entry points ***/
CWPLUGIN_ENTRY (CWPlugin_GetDefaultMappingList)(const struct CWExtMapList**);
CWPLUGIN_ENTRY (Helper_Unmangle)(CWUnmangleInfo*);
CWPLUGIN_ENTRY (Helper_GetCompilerBrSymbols)(CWCompilerBrSymbolInfo*);
/*** callbacks to the IDE, in addition to those in CWPlugins.h ***/
CW_CALLBACK CWIsPrecompiling(CWPluginContext context, Boolean* isPrecompiling);
CW_CALLBACK CWIsAutoPrecompiling(CWPluginContext context, Boolean* isAutoPrecompiling);
CW_CALLBACK CWIsPreprocessing(CWPluginContext context, Boolean* isPreprocessing);
CW_CALLBACK CWIsGeneratingDebugInfo(CWPluginContext context, Boolean* isGenerating);
CW_CALLBACK CWIsCachingPrecompiledHeaders(CWPluginContext context, Boolean* isCaching);
CW_CALLBACK CWGetBrowseOptions(CWPluginContext context, CWBrowseOptions* browseOptions);
CW_CALLBACK CWGetBuildSequenceNumber(CWPluginContext context, long* sequenceNumber);
CW_CALLBACK CWGetTargetInfo(CWPluginContext context, CWTargetInfo* targetInfo);
CW_CALLBACK CWSetTargetInfo(CWPluginContext context, CWTargetInfo* targetInfo);
CW_CALLBACK CWGetTargetStorage(CWPluginContext context, void** storage);
CW_CALLBACK CWSetTargetStorage(CWPluginContext context, void* storage);
CW_CALLBACK CWGetMainFileNumber(CWPluginContext context, long* fileNumber);
CW_CALLBACK CWGetMainFileID(CWPluginContext context, short* fileID);
CW_CALLBACK CWGetMainFileSpec(CWPluginContext context, CWFileSpec* fileSpec);
CW_CALLBACK CWGetMainFileText(CWPluginContext context, const char** text, long* textLength);
CW_CALLBACK CWCachePrecompiledHeader(CWPluginContext context, const CWFileSpec* filespec, CWMemHandle pchhandle);
CW_CALLBACK CWLoadObjectData(CWPluginContext context, long whichfile, CWMemHandle* objectdata);
CW_CALLBACK CWFreeObjectData(CWPluginContext context, long whichfile, CWMemHandle objectdata);
CW_CALLBACK CWStoreObjectData(CWPluginContext context, long whichfile, CWObjectData* object);
CW_CALLBACK CWGetSuggestedObjectFileSpec(CWPluginContext context, long whichfile, CWFileSpec* fileSpec);
CW_CALLBACK CWGetStoredObjectFileSpec(CWPluginContext context, long whichfile, CWFileSpec* fileSpec);
CW_CALLBACK CWDisplayLines(CWPluginContext context, long nlines);
CW_CALLBACK CWBeginSubCompile(CWPluginContext context, long whichfile, CWPluginContext* subContext);
CW_CALLBACK CWEndSubCompile(CWPluginContext subContext);
CW_CALLBACK CWGetPrecompiledHeaderSpec(CWPluginContext context, CWFileSpec *pchspec, const char *target);
CW_CALLBACK CWGetResourceFile(CWPluginContext context, CWFileSpec* filespec);
CW_CALLBACK CWPutResourceFile(CWPluginContext context, const char* prompt, const char* name, CWFileSpec* filespec);
/* Metrowerks Pascal support */
CW_CALLBACK CWLookUpUnit(CWPluginContext context, const char* name, Boolean isdependency, const void** unitdata, long* unitdatalength);
CW_CALLBACK CWSBMfiles(CWPluginContext context, short libref);
CW_CALLBACK CWStoreUnit(CWPluginContext context, const char* unitname, CWMemHandle unitdata, CWDependencyTag dependencytag);
CW_CALLBACK CWReleaseUnit(CWPluginContext context, void* unitdata);
CW_CALLBACK CWUnitNameToFileName(CWPluginContext context, const char* unitname, char* filename);
/* obsolete, for MacOS backward compatibility only */
#if CWPLUGIN_API == CWPLUGIN_API_MACOS
CW_CALLBACK CWOSAlert(CWPluginContext context, const char* message, OSErr errorcode);
CW_CALLBACK CWOSErrorMessage(CWPluginContext context, const char *msg, OSErr errorcode);
#endif
CW_CALLBACK CWGetModifiedFiles(CWPluginContext context, long* modifiedFileCount, const long** modifiedFiles);
/* Get information from the "Runtime Settings" panel */
CW_CALLBACK CWGetCommandLineArgs(CWPluginContext context, const char** commandLineArgs);
CW_CALLBACK CWGetWorkingDirectory(CWPluginContext context, CWFileSpec* workingDirectorySpec);
CW_CALLBACK CWGetEnvironmentVariableCount(CWPluginContext context, long* count);
CW_CALLBACK CWGetEnvironmentVariable(CWPluginContext context, long index, const char** name, const char** value);
CW_CALLBACK CWGetFrameworkCount(CWPluginContext context, long* frameworkCount);
CW_CALLBACK CWGetFrameworkInfo(CWPluginContext context, long whichFramework, CWFrameworkInfo* frameworkInfo);
CW_CALLBACK CWGetFrameworkSharedLibrary(CWPluginContext context, long whichFramework, CWFileSpec* frameworkSharedLibrary);
#if CW_USE_PRAGMA_IMPORT
#pragma import reset
#endif
#ifdef __cplusplus
}
#endif
#ifdef _MSC_VER
#pragma pack(pop,2)
#endif
#ifdef __MWERKS__
#pragma options align=reset
#endif
#endif /* __DROPINCOMPILERLINKER_H__ */
\ No newline at end of file diff --git a/sdk_hdrs/DropInPanel.h b/sdk_hdrs/DropInPanel.h new file mode 100755 index 0000000..edee6e2 --- /dev/null +++ b/sdk_hdrs/DropInPanel.h @@ -0,0 +1 @@ +/*
* DropInPanel.h - Drop-In Preferences Panel Interface for Metrowerks CodeWarriorª
*
* Copyright © 1995 Metrowerks, Inc. All rights reserved.
*
*/
#ifndef __DROPINPANEL_H__
#define __DROPINPANEL_H__
#ifdef __MWERKS__
# pragma once
#endif
#ifndef CW_STRICT_DIALOGS
# define CW_STRICT_DIALOGS 0
#endif
#if macintosh
#ifndef F_PASCAL
# define F_PASCAL(x) pascal x
#endif
#elif __sun__ || __linux__
#ifndef F_PASCAL
# define F_PASCAL(x) x
#endif
#endif
/* system headers */
#ifndef __APPLEEVENTS__
# include <AppleEvents.h>
#endif
#ifndef __CONTROLS__
# include <Controls.h>
#endif
#ifndef __DIALOGS__
# include <Dialogs.h>
#endif
#ifndef __DRAG__
# include <Drag.h>
#endif
#ifndef __CWPlugins_H__
# include "CWPlugins.h"
#endif
#ifdef __MWERKS__
#pragma options align=mac68k
#endif
#ifdef _MSC_VER
#pragma pack(push,2)
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if CW_USE_PRAGMA_IMPORT
#pragma import on
#endif
/* this is the current version number of the API documented herein */
#define DROPINPANELAPIVERSION_1 1 /* CW7 API version */
#define DROPINPANELAPIVERSION_2 2 /* intermediate version */
#define DROPINPANELAPIVERSION_3 3 /* CW8 API version */
#define DROPINPANELAPIVERSION_4 4 /* CW9 API version */
#define DROPINPANELAPIVERSION_5 5 /* CW10-CW Pro 1 version */
#define DROPINPANELAPIVERSION_6 6 /* CW Pro 2 version */
#define DROPINPANELAPIVERSION_7 7 /* CW Pro 3 version */
#define DROPINPANELAPIVERSION_8 8 /* CW Pro 4 version */
#define DROPINPANELAPIVERSION_9 9 /* CW Pro 5 version */
#define DROPINPANELAPIVERSION_10 10 /* CW Pro 6 version */
#define DROPINPANELAPIVERSION_11 11 /* CW Pro 7 version (listView Support) */
#define DROPINPANELAPIVERSION DROPINPANELAPIVERSION_11 /* current API version */
/* error codes */
#define kBadPrefVersion 1000
#define kMissingPrefErr 1001
#define kSettingNotFoundErr 1002
#define kSettingTypeMismatchErr 1003
#define kInvalidCallbackErr 1004
#define kSettingOutOfRangeErr 1005
/* requests codes */
enum {
reqInitPanel = -2, /* (called when panel is loaded) */
reqTermPanel = -1, /* (called when panel is unloaded) */
reqInitDialog = 0, /* initialize panel's dialog state */
reqTermDialog, /* clean up panel's dialog state */
reqPutData, /* copy options data to dialog items */
reqGetData, /* copy dialog items to options data */
reqFilter, /* filter a dialog event for the panel */
reqItemHit, /* process an itemHit in the panel */
reqAEGetPref, /* get preference setting for AppleEvent request */
reqAESetPref, /* set preference setting from AppleEvent request */
reqValidate, /* tell if current settings force recompile or relink */
reqGetFactory, /* retrieve factory settings */
reqUpdatePref, /* verify and/or modify prefs to fit current version */
reqUpdateProject, /* (only sent to built-in panels) */
reqSetupDebug, /* change settings to reflect debugging status */
reqRenameProject, /* change settings that depend on project name */
reqPrefsLoaded, /* (only sent to built-in panels) */
reqDrawCustomItem, /* draw a custom item */
reqActivateItem, /* activate a custom item */
reqDeactivateItem, /* deactivate a custom item */
reqHandleClick, /* handle mouse down in an active custom item */
reqHandleKey, /* handle key down in an active custom item */
reqFindStatus, /* enable/disable menu items for a custom item */
reqObeyCommand, /* execute a menu command for a custom item */
reqDragEnter, /* the user is dragging into the given item */
reqDragWithin, /* the user is dragging within the given item */
reqDragExit, /* the user is dragging out of the given item */
reqDragDrop, /* the user dropped onto the given item */
reqByteSwapData, /* byte swap the fields in the prefs data */
reqFirstLoad, /* panel has been loaded for the first time */
reqReadSettings, /* read settings from IDE to construct pref data handle */
reqWriteSettings, /* write the individual settings from pref data handle */
reqItemDoubleClick, /* process an double clicked in the panel, currently implemented for listviews */
reqItemIsCellEditable /* currently implemented for listviews, tells whether or not the listview is editable */
};
/* menu command codes */
enum {
menu_Cut = 1,
menu_Copy,
menu_Paste,
menu_Clear,
menu_SelectAll
};
/* Layout and bit flags for 'Flag' resource for panels */
/* */
/* For the version 3 of these resource, we renamed the 'apiversion' field to */
/* 'earliestCompatibleAPIVersion' and added the 'newestAPIVersion' field. */
/* This allows plugins to support more than one API version and therefore run */
/* under more than one version of the IDE. */
typedef struct PanelFlags {
unsigned short rsrcversion; /* version number of resource */
CWDataType dropintype; /* dropin type ('Comp', 'Link', 'Panl') */
/* earliest API support by this plugin */
unsigned short earliestCompatibleAPIVersion;
unsigned long dropinflags; /* capability flags (see enum below) */
CWDataType panelfamily; /* family of panel (linker, codegen, etc) */
unsigned short newestAPIVersion; /* newest API version supported */
unsigned short dataversion; /* version number of prefs data */
unsigned short panelscope; /* scope of panel (see enum below) */
} PanelFlags;
/* capability flags, as used in member dropinflags of PanelFlags struct */
enum {
usesStrictAPI = 1 << 31, /* this panel is built with the strict API */
supportsByteSwapping = 1 << 30, /* this panel support the byte-swapping request */
supportsTextSettings = 1 << 29, /* this panel supports the read & write settings requests */
usesCrossPlatformAPI = 1 << 28 /* uses the cross-platform API rather than Mac API */
/* remaining flags are reserved for future use and should be zero-initialized */
};
/* panel scopes, as used in member panelscope of PanelFlags struct */
/* */
/* The scope of a panel tells the IDE which settings window to display the panel. */
/* Currently, only panels for debugger plug-ins use panelScopeGlobal and only */
/* panels for VCS plug-ins use panelScopeProject. A panel for a compiler or linker */
/* must use panelScopeTarget. */
enum {
panelScopeGlobal, /* this panel is scoped to the global preferences window */
panelScopeProject, /* this panel is scoped to the VCS settings window */
panelScopeTarget, /* this panel is scoped to the target settings window */
panelScopeRConn /* this panel is scoped to configure remote debugging connections */
};
/* pre-defined panel families, used in panelfamily field of PanelFlags struct */
enum {
panelFamilyProject = CWFOURCHAR('p', 'r', 'o', 'j'),
panelFamilyFrontEnd = CWFOURCHAR('f', 'e', 'n', 'd'),
panelFamilyBackEnd = CWFOURCHAR('b', 'e', 'n', 'd'),
panelFamilyBrowser = CWFOURCHAR('b', 'r', 'o', 'w'),
panelFamilyEditor = CWFOURCHAR('e', 'd', 'i', 't'),
panelFamilyDebugger = CWFOURCHAR('d', 'b', 'u', 'g'),
panelFamilyLinker = CWFOURCHAR('l', 'i', 'n', 'k'),
panelFamilyMisc = CWFOURCHAR('*', '*', '*', '*')
};
typedef struct MWSetting* CWSettingID;
#define kNoSettingID 0
/* alias types */
#if CW_STRICT_DIALOGS
typedef struct DummyDialog* CWDialog;
#else
typedef DialogPtr CWDialog;
#endif
/* forward declarations */
typedef struct CWPanelCallbacks CWPanelCallbacks;
/* parameter block -- this is passed to the dropin at each request */
typedef struct PanelParameterBlock {
/* common to all dropins */
long request; /* [->] requested action (see below) */
long version; /* [->] version # of shell's API */
void *context; /* [->] reserved for use by shell */
void *storage; /* [<->] reserved for use by the dropin */
FSSpec targetfile; /* [->] FSSpec of current project */
/* specific to panels */
CWDialog dialog; /* [->] pointer to PreferencesÉ dialog */
Handle originalPrefs; /* [->] panel's original options data */
Handle currentPrefs; /* [<->] panel's current options data */
Handle factoryPrefs; /* [<->] panel's "factory" options data */
EventRecord *event; /* [->] dialog event (for reqFilterEvent) */
short baseItems; /* [->] # of items in dialog shell */
short itemHit; /* [<->] for reqFilterEvent and reqItemHit */
Boolean canRevert; /* [<-] enable Revert button */
Boolean canFactory; /* [<-] enable Factory button */
Boolean reset; /* [<-] access paths must be reset */
Boolean recompile; /* [<-] files must be recompiled */
Boolean relink; /* [<-] project must be relinked */
AEKeyword prefsKeyword; /* [->] for reqAEGetPref and reqAESetPref */
AEDesc prefsDesc; /* [->] for reqAESetPref */
Boolean debugOn; /* [->] turning on debugging? */
FSSpec oldtargfile; /* [->] previous project file FSSpec */
/* version 2 API */
CWPanelCallbacks* callbacks;
/* version 3 API */
Boolean reparse; /* [<-] project must be reparsed */
/* version 4 API */
DragReference dragref; /* [->] for drag-related requests */
Rect dragrect; /* [<-] rect to track mouse in */
Point dragmouse; /* [->] mouse location during drag */
/* version 5 API */
unsigned char toEndian; /* [->] for reqByteSwapData, the endian we are swapping to */
/* CWPro 3 temporary placeholders for opaque references to prefs data.
These will be removed in Pro 4.
*/
CWMemHandle originalPrefsMemHandle;
CWMemHandle currentPrefsMemHandle;
CWMemHandle factoryPrefsMemHandle;
CWMemHandle panelPrefsMemHandle;
/* version 11 api */
long listViewCellRow; /* [->] the cell row of the listView */
long listViewCellCol; /* [->] the cell row of the listView */
} PanelParameterBlock, *PanelParameterBlockPtr;
typedef PanelParameterBlock PanelParamBlk;
typedef PanelParameterBlockPtr PanelParamBlkPtr;
/* callbacks to the IDE */
extern F_PASCAL(OSErr) CWPanlAppendItems(PanelParamBlkPtr ppb, short ditlID);
extern F_PASCAL(OSErr) CWPanlDrawPanelBox(PanelParamBlkPtr ppb, long whichItem, ConstStr255Param title);
extern F_PASCAL(OSErr) CWPanlShowItem(PanelParamBlkPtr ppb, long whichItem, Boolean showIt);
extern F_PASCAL(OSErr) CWPanlEnableItem(PanelParamBlkPtr ppb, long whichItem, Boolean enableIt);
extern F_PASCAL(OSErr) CWPanlActivateItem(PanelParamBlkPtr ppb, long whichItem);
extern F_PASCAL(OSErr) CWPanlGetItemValue(PanelParamBlkPtr ppb, long whichItem, long* value);
extern F_PASCAL(OSErr) CWPanlSetItemValue(PanelParamBlkPtr ppb, long whichItem, long value);
extern F_PASCAL(OSErr) CWPanlGetItemText(PanelParamBlkPtr ppb, long whichItem, StringPtr str, short maxLen);
extern F_PASCAL(OSErr) CWPanlSetItemText(PanelParamBlkPtr ppb, long whichItem, ConstStr255Param str);
extern F_PASCAL(OSErr) CWPanlGetPanelPrefs(PanelParamBlkPtr ppb, StringPtr inPanelName, Handle *prefs, Boolean* requiresByteSwap);
extern F_PASCAL(OSErr) CWPanlGetItemRect(PanelParamBlkPtr ppb, long whichItem, Rect* rect);
extern F_PASCAL(OSErr) CWPanlGetItemControl(PanelParamBlkPtr ppb, long whichItem, ControlRef* control);
extern F_PASCAL(OSErr) CWPanlInvalItem(PanelParamBlkPtr ppb, long whichItem);
extern F_PASCAL(OSErr) CWPanlValidItem(PanelParamBlkPtr ppb, long whichItem);
extern F_PASCAL(OSErr) CWPanlGetMacPort(PanelParamBlkPtr ppb, GrafPtr* port);
extern F_PASCAL(OSErr) CWPanlGetItemTextHandle(PanelParamBlkPtr ppb, long whichItem, Handle *text);
extern F_PASCAL(OSErr) CWPanlSetItemTextHandle(PanelParamBlkPtr ppb, long whichItem, Handle text);
extern F_PASCAL(OSErr) CWPanlGetItemData(PanelParamBlkPtr ppb, long whichItem, void *outData, long *outDataLength);
extern F_PASCAL(OSErr) CWPanlSetItemData(PanelParamBlkPtr ppb, long whichItem, void *inData, long inDataLength);
extern F_PASCAL(OSErr) CWPanlGetItemMaxLength(PanelParamBlkPtr ppb, long whichItem, short *outLength);
extern F_PASCAL(OSErr) CWPanlSetItemMaxLength(PanelParamBlkPtr ppb, long whichItem, short inLength);
extern F_PASCAL(OSErr) CWPanlChooseRelativePath(PanelParamBlkPtr ppb, CWRelativePath* path, Boolean isFolder, short filterCount, void* filterList, char* prompt);
extern F_PASCAL(OSErr) CWPanlGetRelativePathString(PanelParamBlkPtr ppb, CWRelativePath* path, char* pathString, long* maxLength);
#if macintosh
extern F_PASCAL(OSErr) CWPanlReadRelativePathAEDesc(PanelParamBlkPtr ppb, CWRelativePath* path, const AEDesc* desc);
extern F_PASCAL(OSErr) CWPanlWriteRelativePathAEDesc(PanelParamBlkPtr ppb, const CWRelativePath* path, AEDesc* desc);
#endif
/* utility routines */
extern F_PASCAL(OSErr) CWPanlDrawUserItemBox(DialogPtr dialog, short whichItem, ConstStr255Param title);
extern F_PASCAL(OSErr) CWPanlInstallUserItem(PanelParamBlkPtr ppb, short whichItem, UserItemProcPtr proc);
extern F_PASCAL(OSErr) CWPanlRemoveUserItem(PanelParamBlkPtr ppb, short whichItem);
/* reading and writing scalar settings */
extern F_PASCAL(OSErr) CWPanlReadBooleanSetting(PanelParamBlkPtr ppb, const char* name, Boolean* value);
extern F_PASCAL(OSErr) CWPanlReadIntegerSetting(PanelParamBlkPtr ppb, const char* name, long* value);
extern F_PASCAL(OSErr) CWPanlReadFloatingPointSetting(PanelParamBlkPtr ppb, const char* name, double* value);
extern F_PASCAL(OSErr) CWPanlReadStringSetting(PanelParamBlkPtr ppb, const char* name, const char** value);
extern F_PASCAL(OSErr) CWPanlReadRelativePathSetting(PanelParamBlkPtr ppb, const char* name, CWRelativePath* value);
extern F_PASCAL(OSErr) CWPanlWriteBooleanSetting(PanelParamBlkPtr ppb, const char* name, Boolean value);
extern F_PASCAL(OSErr) CWPanlWriteIntegerSetting(PanelParamBlkPtr ppb, const char* name, long value);
extern F_PASCAL(OSErr) CWPanlWriteFloatingPointSetting(PanelParamBlkPtr ppb, const char* name, double value);
extern F_PASCAL(OSErr) CWPanlWriteStringSetting(PanelParamBlkPtr ppb, const char* name, const char* value);
extern F_PASCAL(OSErr) CWPanlWriteRelativePathSetting(PanelParamBlkPtr ppb, const char* name, const CWRelativePath* value);
/* reading and writing array and structure settings */
extern F_PASCAL(OSErr) CWPanlGetNamedSetting(PanelParamBlkPtr ppb, const char* name, CWSettingID* settingID);
extern F_PASCAL(OSErr) CWPanlGetStructureSettingField(PanelParamBlkPtr ppb, CWSettingID settingID, const char* name, CWSettingID* fieldSettingID);
extern F_PASCAL(OSErr) CWPanlGetArraySettingSize(PanelParamBlkPtr ppb, CWSettingID settingID, long* size);
extern F_PASCAL(OSErr) CWPanlGetArraySettingElement(PanelParamBlkPtr ppb, CWSettingID settingID, long index, CWSettingID* elementSettingID);
extern F_PASCAL(OSErr) CWPanlGetBooleanValue(PanelParamBlkPtr ppb, CWSettingID settingID, Boolean* value);
extern F_PASCAL(OSErr) CWPanlGetIntegerValue(PanelParamBlkPtr ppb, CWSettingID settingID, long* value);
extern F_PASCAL(OSErr) CWPanlGetFloatingPointValue(PanelParamBlkPtr ppb, CWSettingID settingID, double* value);
extern F_PASCAL(OSErr) CWPanlGetStringValue(PanelParamBlkPtr ppb, CWSettingID settingID, const char** value);
extern F_PASCAL(OSErr) CWPanlGetRelativePathValue(PanelParamBlkPtr ppb, CWSettingID settingID, CWRelativePath* value);
extern F_PASCAL(OSErr) CWPanlSetBooleanValue(PanelParamBlkPtr ppb, CWSettingID settingID, Boolean value);
extern F_PASCAL(OSErr) CWPanlSetIntegerValue(PanelParamBlkPtr ppb, CWSettingID settingID, long value);
extern F_PASCAL(OSErr) CWPanlSetFloatingPointValue(PanelParamBlkPtr ppb, CWSettingID settingID, double value);
extern F_PASCAL(OSErr) CWPanlSetStringValue(PanelParamBlkPtr ppb, CWSettingID settingID, const char* value);
extern F_PASCAL(OSErr) CWPanlSetRelativePathValue(PanelParamBlkPtr ppb, CWSettingID settingID, const CWRelativePath* value);
#if CW_USE_PRAGMA_IMPORT
#pragma import reset
#endif
#ifdef __cplusplus
}
#endif
#ifdef __MWERKS__
#pragma options align=reset
#endif
#ifdef _MSC_VER
#pragma pack(pop)
#endif
#endif /* __DROPINPANEL_H__ */
\ No newline at end of file diff --git a/sdk_hdrs/DropInPanelWin32.h b/sdk_hdrs/DropInPanelWin32.h new file mode 100755 index 0000000..98d0c8a --- /dev/null +++ b/sdk_hdrs/DropInPanelWin32.h @@ -0,0 +1 @@ +/*
DropInPanelWin32.h
This is the old name for the file that is now called CWDropInPanel.h.
It is here for backward compatibility with older panels. New panels
should include CWDropInPanel.h instead.
*/
#ifndef __DROPINPANELWIN32_H__
#define __DROPINPANELWIN32_H__
#include "CWDropInPanel.h"
#endif
\ No newline at end of file diff --git a/sdk_hdrs/DropInVCS.h b/sdk_hdrs/DropInVCS.h new file mode 100755 index 0000000..6124933 --- /dev/null +++ b/sdk_hdrs/DropInVCS.h @@ -0,0 +1 @@ +/*
DropInVCS.h
Copyright (c) 1996-8, Metrowerks Corporation. All rights reserved.
This include contains the declarations needed to interface a version control system to
the CodeWarrior integrated development environment.
*/
#ifndef __DROPINVCS_H__
#define __DROPINVCS_H__
#ifdef macintosh
#include <OSUtils.h>
#include <Files.h>
#endif
#define VCS_API_VERSION_1 1 // 1.7 IDE through Pro 3
#define VCS_API_VERSION_7 7 // Pro 4
#define VCS_API_VERSION_8 8 // Pro 5
#define VCS_API_VERSION_9 9 // Pro 6
#define VCS_API_CURRENT_VERSION VCS_API_VERSION_9
#ifndef __CWPlugins_H__
#include "CWPlugins.h"
#endif
#ifdef __MWERKS__
#pragma options align=mac68k
#endif
#ifdef _MSC_VER
#pragma pack(push,2)
#endif
#ifndef __CWPluginErrors_H__
#include "CWPluginErrors.h"
#endif
#ifdef MW_USES_PRAGMA_ONCE
#pragma once
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if CW_USE_PRAGMA_IMPORT
#pragma import on
#endif
// The following constants are to be used when specifying the flags through a
// flags callback. For version 3 flags.
enum {
vcsDoesntPrePostSingleFile = 1L << 31, /* this VCS plugin does NOT call Pre/PostFileAction routines for calls dealing with a single file (file must be accessible before call) */
vcsDoesntPrePostRecursive = 1L << 30, /* this VCS plugin does NOT call Pre/PostFileAction routines for files during recursive calls (files must be accessible before call) */
vcsRequiresEvents = 1L << 29, /* this flag specifies that the VCS is responding to either AppleEvents or other highLevelEvents and the IDE should not try to handle events during callbacks */
vcsWantsIdle = 1L << 28, /* this flag is turned on when the VCS plugin wants to receive idle events */
vcsSupportsPrefsChanged = 1L << 27, /* this flag is turned on when the VCS plugin supports the reqPrefsChanged request */
vcsDoesntUseLoginSettings = 1L << 26, /* this VCS plugin does not use the login settings in the VCS Setup panel */
vcsDoesntUseDatabaseSetting = 1L << 25, /* this VCS plugin does not use the database path setting in the VCS Setup panel */
vcsDoesntUseLocalRootSetting = 1L << 24 /* this VCS plugin does not use the local root setting in the VCS Setup panel */
};
enum
{
reqDatabaseConnect = 1, // connect to database
reqDatabaseDisconnect, // disconnect from database
reqDatabaseVariables, // database variables list
reqFileAdd, // add file
reqFileCheckin, // checkin file
reqFileCheckout, // checkout file
reqFileComment, // set file comment
reqFileDelete, // delete file
reqFileDestroy, // destroy file
reqFileDifference, // difference file
reqFileGet, // get file
reqFileHistory, // get file history
reqFileLabel, // label file
reqFileProperties, // get file properties
reqFilePurge, // purge file
reqFileRename, // rename file
reqFileRollback, // rollback file
reqFileStatus, // get file status
reqFileUndoCheckout, // cancel file checkout
reqFileVersion, // get file version
reqFileBranch, // branch a shared file
reqFileShare, // share a file
reqFileView // view a file
};
typedef long CWVCSCommand;
enum
{
cwCommandStatusCommandUnknown = -4, // command unknown
cwCommandStatusUnknown = -3, // status unknown
cwCommandStatusUnsupported = -2, // command unsupported
cwCommandStatusSupported = -1, // command supported
cwCommandStatusSucceeded = cwNoErr, // successful
cwCommandStatusFailed = 1, // failed
cwCommandStatusPartial = 2, // partially successful
cwCommandStatusCancelled = 3, // user cancelled
cwCommandStatusConnectionLost = 4, // connection lost
cwCommandStatusInvalidLogin = 5 // invalid username or password
};
typedef long CWVCSCommandStatus;
enum
{
cwItemStatusUnprocessed = -2, // item yet unprocessed
cwItemStatusUnknown = -1, // status unknown
cwItemStatusSucceeded = 0, // operation succeeded
cwItemStatusFailed = 1, // operation failed
cwItemStatusCancelled = 2 // operation cancelled
};
typedef long CWVCSItemStatus;
enum
{
cwCheckoutStateUnknown = 0xFFFFFFFF, // unknown
cwCheckoutStateNotInDatabase = 0x00000002, // not in database
cwCheckoutStateNotCheckedOut = 0x00000000, // not checked out
cwCheckoutStateCheckedOut = 0x00000001, // checked out
cwCheckoutStateMultiplyCheckedOut = 0x00000101, // multiply checked out
cwCheckoutStateNotCheckedOutShared = 0x00010000, // not checked out and shared
cwCheckoutStateCheckedOutShared = 0x00010001, // checked out and shared
cwCheckoutStateMultiplyCheckedOutShared = 0x00010101, // multiply checked out and shared
cwCheckoutStateNotCheckedOutBranched = 0x00020000, // not checked out and branched
cwCheckoutStateCheckedOutBranched = 0x00020001, // checked out and branched
cwCheckoutStateMultiplyCheckedOutBranched = 0x00020101, // checked out and branched
cwCheckoutStateNotCheckedOutSharedBranched = 0x00030000, // not checked out, shared and branched
cwCheckoutStateCheckedOutSharedBranched = 0x00030001, // checked out, shared and branched
cwCheckoutStateMultiplyCheckedSharedOutBranched = 0x00030101, // checked out, shared and branched
cwCheckoutStateCheckedOutExclusive = 0x00040001, // exclusively checked out
cwCheckoutStateCheckedOutExclusiveShared = 0x00050001, // exclusively checked out and shared
cwCheckoutStateCheckedOutExclusiveBranched = 0x00060001, // exclusively checked out and branched
cwCheckoutStateCheckedOutExclusiveSharedBranched = 0x00070001, // exclusively checked out, shared and branched
cwCheckoutStateCheckedOutMask = 0x00000001, // checked out mask
cwCheckoutStateMultiplyCheckedOutMask = 0x00000100, // multiply checked out mask
cwCheckoutStateSharedMask = 0x00010000, // shared mask
cwCheckoutStateBranchedMask = 0x00020000, // branched mask
cwCheckoutStateExclusiveMask = 0x00040000 // exclusive mask
};
typedef long CWVCSCheckoutState;
enum
{
cwVersionFormNone = 0, // no record
cwVersionFormNumeric = 1, // intergral numeric
cwVersionFormAlpha = 2, // alphabetic
cwVersionFormLabel = 4, // label
cwVersionFormDate = 5 // date / time
};
typedef long CWVCSVersionForm;
enum
{
cwCommandDescriptionVersion = 1
};
typedef struct CWVCSCommandDescription
{
long version;
char menuItem[40];
char progressMessage[200];
} CWVCSCommandDescription;
typedef union CWVCSVersionData
{
unsigned long numeric; // integral numeric
char* pAlpha; // alphabetic
CWFileTime date; // date / time
char* pLabel; // label
} CWVCSVersionData, *p_CWVCSVersionData, **h_CWVCSVersionData;
typedef struct CWVCSVersion
{
CWVCSVersionForm eVersionForm; // version form
CWVCSVersionData sVersionData; // version data
} CWVCSVersion, *p_CWVCSVersion, **h_CWVCSVersion;
typedef struct CWVCSItem
{
CWFileSpec fsItem; // item file specification
CWVCSItemStatus eItemStatus; // item status code
CWVCSVersion version; // item version
CWVCSCheckoutState eCheckoutState; // item checkout state
} CWVCSItem, *p_CWVCSItem, **h_CWVCSItem;
typedef struct CWVCSDatabaseConnection
{
CWFileSpec sDatabasePath; // path to the database directory
CWFileSpec sProjectRoot; // path to the local database directory
char* pUsername; // user name
char* pPassword; // user password
} CWVCSDatabaseConnection, *p_CWVCSDatabaseConnection, **h_CWVCSDatabaseConnection;
/* The following callback mechanisms are available for VCS plugins for VCS performing VCS specific
* functions and retrieving VCS specific data from the context passed to the main entry point by the
* IDE. You may also use any of the callbacks for generic plugins.
*
* These callbacks are available only to plugins using version 2 of the API or greater.
*/
/* Call this function as the first thing you do in your main entry point. Check its result. If you pass in
* true, then if the v2 plugin is running under a pre-Pro4 IDE it will set up the compatibillity libraries and
* return cwNoErr. If you pass in false and your v2 plugin is running uner a pre-Pro4 IDE it will return
* cwCommandStatusFailed, at which point you should return this error to the IDE and not process the request
* sent to you.
*
* Note that if you allow v1 compatibility and the result of isV1 is true, your plugin will not receive the V2
* idle requests or preferences changed requests and you must work around accordingly. */
CW_CALLBACK CWAllowV1Compatibility(CWPluginContext context, Boolean canHandleV1Mode, Boolean *isV1);
/* Get a comment from the user */
CW_CALLBACK CWGetComment(CWPluginContext context, const char* pPrompt, char* pComment, const long lBufferSize);
/* Notify IDE if any changes occur to a file's information or checkout state */
CW_CALLBACK CWVCSStateChanged(CWPluginContext context, const CWFileSpec* file,
CWVCSCheckoutState eCheckoutState, const CWVCSVersion* version);
/* Display a IDE visual difference window for the passed files. The first file passed in
* should be an unchangable file and the second file should be the local file. Instead of passing
* a CWFileSpec it is possible to pass in a pointer to text (null terminated) and a title.
* If the file spec is used, set both the title and text pointers to NULL */
CW_CALLBACK CWDoVisualDifference(CWPluginContext context,
const CWFileSpec* file1, const char* pTitle1, const char* pText1, unsigned long lengthText1,
const CWFileSpec* file2, const char* pTitle2, const char* pText2, unsigned long lengthText2);
/* Tell the IDE the current ratio of how many items are completed. If you are able to correctly
* give a completion ratio, the IDE will display a progress bar indicating how far along the
* VCS action has progressed instead of displaying a busy indicator. If you pass -1 as the
* total number of items, the busy indicator will replace any progress bar that you have
* displayed with a prior call to completion ratio during the handling of a single request */
CW_CALLBACK CWCompletionRatio(CWPluginContext context, int totalItems, int completedItems);
/* Get the project file specifier */
CW_CALLBACK CWGetProjectFileSpecifier(CWPluginContext context, CWFileSpec* projectFileSpec);
/* Is the command passed an advanced command? */
CW_CALLBACK CWIsAdvancedRequest(CWPluginContext context, Boolean* isAdvanced);
/* Is the command passed a recursive command? */
CW_CALLBACK CWIsRecursiveRequest(CWPluginContext context, Boolean* isRecursive);
/* Is the command passed simply to check if it is supported? */
CW_CALLBACK CWIsCommandSupportedRequest(CWPluginContext context, Boolean* isCommandSupported);
/* Set the pointer to a new overriding menu title string */
CW_CALLBACK CWSetCommandDescription(CWPluginContext context, CWVCSCommandDescription* descr);
/* Get the pointer to the database connection structure */
CW_CALLBACK CWGetDatabaseConnectionInfo(CWPluginContext context, CWVCSDatabaseConnection* dbConnection);
/* Get the command status code */
CW_CALLBACK CWGetCommandStatus(CWPluginContext context, CWVCSCommandStatus* status);
/* Set the command status code */
CW_CALLBACK CWSetCommandStatus(CWPluginContext context, CWVCSCommandStatus status);
/* Get the number of VCS items passed to the plugin */
CW_CALLBACK CWGetVCSItemCount(CWPluginContext context, unsigned long* count);
/* Get a pointer to the ith entry of the item array, 0 indexed */
CW_CALLBACK CWGetVCSItem(CWPluginContext context, long index, CWVCSItem* item);
/* Change the data for a VCS Item in the item array */
CW_CALLBACK CWSetVCSItem(CWPluginContext context, long index, CWVCSItem* item);
/* Get what's stored in the VCS pointer storage area */
CW_CALLBACK CWGetVCSPointerStorage(CWPluginContext context, void** storage);
/* Store a pointer that will be maintained across calls to the main entry point */
CW_CALLBACK CWSetVCSPointerStorage(CWPluginContext context, void* storage);
#if CW_USE_PRAGMA_IMPORT
#pragma import reset
#endif
#ifdef __cplusplus
}
#endif
#ifdef _MSC_VER
#pragma pack(pop,2)
#endif
#ifdef __MWERKS__
#pragma options align=reset
#endif
#endif /* __DROPINVCS_H__ */
\ No newline at end of file diff --git a/sdk_hdrs/MWBrowse.h b/sdk_hdrs/MWBrowse.h new file mode 100755 index 0000000..310a5d0 --- /dev/null +++ b/sdk_hdrs/MWBrowse.h @@ -0,0 +1 @@ +/*
* MWBrowse.h
*
* Copyright © 1993-96 Metrowerks, Inc. All rights reserved.
*
* Types and constants needed for emitting CodeWarrior
* browse information.
*/
#ifndef __MWBROWSE_H__
#define __MWBROWSE_H__
#ifdef __MWERKS__
#pragma once
#endif
#include "MWLangDefs.h"
#ifdef __MWERKS__
#pragma options align=mac68k
#endif
#ifdef _MSC_VER
#pragma pack(push,2)
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define BROWSE_HEADER 0xBEABBAEB
#define BROWSE_VERSION 2
#define BROWSE_EARLIEST_COMPATIBLE_VERSION 2
typedef struct BrowseHeader {
long browse_header; // always set to BROWSE_HEADER
long browse_version; // always set to BROWSE_VERSION
short browse_language; // the language of this translation unit, enum ELanguage
short uses_name_table; // TRUE: uses name table from CW object code
long earliest_compatible_version;// always set to BROWSE_EARLIEST_COMPATIBLE_VERSION
long reserved[15]; // for future extensions
} BrowseHeader;
typedef unsigned char EBrowserItem;
enum {
browseFunction, // function, procedure, or method
browseGlobal, // global variable
browseClass, // class, struct, or union
browseMacro, // macro
browseEnum, // enum, enumerated type member
browseTypedef, // user-defined type other than class
browseConstant, // constant value
browseTemplate, // C++ template
browsePackage, // Java package
browseCompSymbolStart = 0x70,
browseEnd = 0xFF // used to denote end-of-list
};
// flag constants for functions, member functions, data members
enum
{
kAbstract = 1, // abstract/pure virtual
kStatic = 2, // static member
kFinal = 4, // final Java class, method, or data member
kMember = 8, // item is a class member
// reserve flags 0x10, 0x20, and 0x40 for other general flags
// flags specific to classes
kInterface = 0x80, // class is Java interface
kPublic = 0x100, // class is public Java class
// flags specific to functions and member functions
kInline = 0x80, // inline function
kPascal = 0x100, // pascal function
kAsm = 0x200, // asm function
kVirtual = 0x400, // virtual member function
kCtor = 0x800, // is constructor
kDtor = 0x1000, // is destructor
kNative = 0x2000, // native Java method
kSynch = 0x4000, // synchronized Java method
kIntrinsic = 0x8000, // intrinsic routine (for General Magic)
kConst = 0x10000, // const function
// flags specific to data members
kTransient = 0x80, // transient Java data member
kVolatile = 0x100 // volatile Java data member
};
typedef enum EAccess
{ // can be used as mask values
accessNone = 0,
accessPrivate = 1,
accessProtected = 2,
accessPublic = 4,
accessAll = accessPrivate+accessProtected+accessPublic
} EAccess;
typedef unsigned char EMember;
enum
{
memberFunction, // member function/method
memberData, // data member/field
memberEnd = 0xFF // denotes end-of-list
};
typedef enum ETemplateType
{ // templates are either class or function templates
templateClass,
templateFunction
} ETemplateType;
/********************************************************************************/
/* Old (pre-CW9) browse data support definitions */
/********************************************************************************/
#define BROWSE_OLD_VERSION 0
enum {
BROWSE_SCOPE_STATIC, // local to this file
BROWSE_SCOPE_EXTERN // global to all files
};
enum {
BROWSE_OBJECT_FUNCTION, // function object
BROWSE_OBJECT_DATA // data object
};
enum { // browse data types
BROWSE_END, // end of browse data
BROWSE_OBJECT // a function/data definition
};
typedef struct BrowseObjectDef {
short type; // always BROWSE_OBJECT
short size; // size of following data
char object_type; // one of: (BROWSE_OBJECT_FUNCTION,BROWSE_OBJECT_DATA)
char object_scope; // one of: (BROWSE_SCOPE_STATIC,BROWSE_SCOPE_EXTERN)
long source_offset; // offset of declartation in source code
// char name[...]; followed by padded object name (c-string)
// char classname[...]; followed by padded class name string (c-string)
} BrowseObjectDef;
typedef struct BrowseHeader_Old {
long browse_header; // always set to BROWSE_HEADER
long browse_version; // always set to BROWSE_VERSION
long reserved[14]; // for future extensions
} BrowseHeader_Old;
#ifdef __cplusplus
}
#endif
#ifdef _MSC_VER
#pragma pack(pop)
#endif
#ifdef __MWERKS__
#pragma options align=reset
#endif
#endif // __MWBROWSE_H__
\ No newline at end of file diff --git a/sdk_hdrs/MWLangDefs.h b/sdk_hdrs/MWLangDefs.h new file mode 100755 index 0000000..6a6a650 --- /dev/null +++ b/sdk_hdrs/MWLangDefs.h @@ -0,0 +1 @@ +/*
* MWLangDefs.h
*
* Copyright © 1994-1996 metrowerks inc. All rights reserved.
*
* Language constants.
*/
#ifndef MWLangDefs_H
#define MWLangDefs_H
enum ELanguage
{
langUnknown,
langC,
langCPlus,
langPascal,
langObjectPascal,
langJava,
langAssembler, // don't care which assembler
langFortran,
langRez
};
#endif // !MWLangDefs_H
\ No newline at end of file |