MWCC/sdk_hdrs/DropInPanel.h

1 line
16 KiB
C
Raw Normal View History

2022-10-07 19:02:27 +00:00
/* * DropInPanel.h - Drop-In Preferences Panel Interface for Metrowerks CodeWarrior<6F> * * Copyright <20> 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 */ reqWriteS