mirror of https://git.wuffs.org/MWCC
1 line
18 KiB
C
1 line
18 KiB
C
|
/*
* CWDropInPanel.h
*
* Copyright <20> 1999 Metrowerks inc. All rights reserved.
*
* DropIn Preferences Panel Interface for UNIX/WIN32 Metrowerks CodeWarrior<6F>
*/
#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) */
req
|