Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS

Complete disaster-recovery snapshot: engine/game source, game data assets,
VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive.
Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false,
no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
This commit is contained in:
Cyd
2026-06-24 21:28:16 -05:00
commit 2b8ca921cb
66341 changed files with 7923174 additions and 0 deletions
@@ -0,0 +1,175 @@
/*
* Name: ADM.txt
* $Revision: $
* Author: Dave Lazarony
* Date: May 13, 1996
* Purpose: Description of the Macintosh and Windows Resource format
* for Adobe Dialog Manager Items.
*
* Copyright (c) 1986-1996 Adobe Systems Incorporated, All Rights Reserved.
*
*/
/*
* Mac CNTL Resource
* ------------------------------------------------------------------------------
* ADMItemType Mac Dialog Item CDEF Res ID Variation Additional Fields
* ----------------------------- ----------------- ----------- ------------------------- --------------------------------------
* ADM Frame User Item
* Control Item 1000 ADMFrameStyle Control Title is Group Name
*
* ADM List Box Control Item 1010 ADMListBoxStyle Min = MenuID = MenuResID
*
* ADM Picture Check Box Control Item 1023 ADMPictureButtonStyle Value = PictureID, Min = PictureSelectedID, Max = PictureDisabledID
*
* ADM Picture Push Button Control Item 1020 ADMPictureButtonStyle Value = PictureID, Min = PictureSelectedID, Max = PictureDisabledID
*
* ADM Picture Radio Button Control Item 1021 ADMPictureButtonStyle Value = PictureID, Min = PictureSelectedID, Max = PictureDisabledID
*
* ADM Picture Static Icon Item
* Picture Item
* Control Item 1022 0 Value = PictureID, Min = PictureSelectedID, Max = PictureDisabledID
*
* ADM Popup List Control Item 63 0 Min = MenuID = MenuResID
*
* ADM Popup Menu Control Item 1030 ADMPopupMenuStyle Min = MenuID = MenuResID
*
* ADM Resize Control Item 1040 0
*
* ADM Scrollbar Control Item 1 0 Value = IntValue, Min = IntMin, Max = IntMax
*
* ADM Scrolling Popup List Control Item 1031 0
*
* ADM Slider Control Item 1050 0 Value = IntValue, Min = IntMin, Max = IntMax
*
* ADM Spin Edit Control Item 1060 ADMSpinEditStyle Value = ADMJustify,
*
* ADM Spin Edit Popup Control Item 1061 ADMSpinEditPopupStyle Value = ADMJustify, Min = MenuID = MenuResID
*
* ADM Spin Edit Scrolling Popup Control Item 1062 ADMSpinEditPopupStyle Value = ADMJustify, Min = MenuID = MenuResID
*
* ADM Text Check Box Check Box Item
* Control Item 0 1
*
* ADM Text Edit Edit Text Item
* Control Item 1070 ADMTextEditStyle Value = ADMJustify
*
* ADM Text Edit Multi Line Control Item 1073 0 Value = ADMJustify
*
* ADM Text Edit Popup Control Item 1071 ADMTextEditPopupStyle Value = ADMJustify, Min = MenuID = MenuResID
*
* ADM Text Edit Scrolling Popup Control Item 1075 ADMTextEditPopupStyle Value = ADMJustify, Min = MenuID = MenuResID
*
* ADM Text Push Button Push Button Item
* Control Item 0 0
* Control Item 0 4 = Default itemID = 1 is made default automaticly.
*
* ADM Text Radio Button Radio Button Item
* ControlItem 0 2
*
* ADM Text Static Static Text Item
* ControlItem 1072 0 Value = ADMJustify
*
* ADM Text Static Multi Line ControlItem 1074 0 Value = ADMJustify
*
* ADM User ControlItem 1080 0
*
* ADM Custom ControlItem 1090 CNTL Title = "Name Registered Custom Item Type"
*
* ADM Hierarchical List ControlItem 1011 0
*/
/*
* ADMItemType Windows Class Name Window Style Comments
* ----------------------------- -------------------------------- ------------------------ ---------------------------------------------
* ADM Frame "Button" BS_GROUPBOX == kADMSunkenFrameStyle
* "Static" SS_BLACKRECT == kADMBlackFrameStyle
* "Static" SS_GRAYRECT == kADMGrayFrameStyle
* "Static" SS_WHITERECT == kADMRaisedFrameStyle
* "Static" SS_BLACKFRAME == kADMBlackFrameStyle
* "Static" SS_GRAYFRAME == kADMGrayFrameStyle
* "Static" SS_WHITEFRAME == kADMRaisedFrameStyle
* "Static" SS_ETCHEDHORZ == kADMSunkenFrameStyle
* "Static" SS_ETCHEDVERT == kADMSunkenFrameStyle
* "Static" SS_ETCHEDFRAME == kADMSunkenFrameStyle
* "ADM Frame Type" ADMFrameStyle
*
* ADM List Box "Listbox"
* "ADM List Box Type" ADMListBoxStyle
*
* ADM Picture Push Button "ADM Picture Push Button Type" 0 item name == MAKEINTRESOURCE(pictureID)
*
* ADM Picture Radio Button "ADM Picture Radio Button Type" 0 item name == MAKEINTRESOURCE(pictureID)
*
* ADM Picture Static "Static" SS_BITMAP item name == MAKEINTRESOURCE(pictureID)
* "Static" SS_ICON item name == MAKEINTRESOURCE(pictureID)
* "Static" SS_ENHMETAFILE item name == MAKEINTRESOURCE(pictureID)
* "ADM Picture Static Type" 0 item name == MAKEINTRESOURCE(pictureID)
*
* ADM Popup List "Combobox" CBS_DROPDOWNLIST
* "ADM Popup List Type" 0
*
* ADM Popup Menu "ADM Popup Menu Type" ADMPopupMenuStyle
*
* ADM Resize "ADM Resize Type" 0
*
* ADM Scrollbar "Scrollbar" 0
* "ADM Scrollbar Type" 0
*
* ADM Scrolling Popup List "Combobox" CBS_DROPDOWNLIST | WS_VSCROLL
* "ADM Scrolling Popup List Type" 0
*
* ADM Slider "MSCtls_Trackbar32" 0
* "ADM Slider Type" 0
*
* ADM Spin Edit "ADM Spin Edit Type" ADMSpinEditStyle
*
* ADM Spin Edit Popup "Combobox" CBS_DROPDOWN == kADMSingleLineEditPopupStyle
* "ADM Spin Edit Popup Type" ADMSpinEditPopupStyle
*
* ADM Spin Edit Scrolling Popup "Combobox" CBS_DROPDOWN | WS_VSCROLL == kADMSingleLineEditPopupStyle
* "ADM Spin Edit Scrolling Popup Type" ADMSpinEditPopupStyle
*
* ADM Text Check Box "Button" BS_CHECKBOX
* "Button" BS_AUTOCHECKBOX
* "Button" BS_3STATE
* "Button" BS_AUTO3STATE
* "ADM Text Check Box Type" 0
*
* ADM Text Edit "Edit" ES_LEFT == kADMLeftJustify
* "Edit" ES_CENTER == kADMCenterJustify
* "Edit" ES_RIGHT == kADMRightJustify
* "Edit" ES_NUMBER == kADMNumbericEditStyle (Auto sets if you call SetXValue().)
* "ADM Text Edit Type" ADMTextEditStyle
*
* ADM Text Edit Multi Line "Edit" ES_MULTILINE == kADMNumbericEditStyle (Auto sets if you call SetXValue().)
* "ADM Text Edit Multi Line Type" 0
*
* ADM Text Edit Popup "Combobox" CBS_DROPDOWN == kADMSingleLineEditPopupStyle
* "ADM Text Edit Popup Type" ADMTextEditPopupStyle
*
* ADM Text Push Button "Button" BS_DEFPUSHBUTTON == Default
* "Button" BS_PUSHBUTTON
* "Button" BS_USERBUTTON
* "Button" BS_OWNERDRAW
* "ADM Text Push Button Type" 0
*
* ADM Text Radio Button "Button" BS_RADIOBUTTON
* "Button" BS_AUTORADIOBUTTON
* "ADM Text Radio Button Type" 0
*
* ADM Text Static "Static" SS_LEFT == kADMLeftJustify
* "Static" SS_CENTER == kADMCenterJustify
* "Static" SS_RIGHT == kADMRightJustify
* "Static" SS_LEFTNOWORDWRAP == kADMLeftJustify
* "Static" SS_SIMPLE == kADMLeftJustify
* "ADM Text Static Type" 0
*
* ADM Text Static Multi Line "Edit" ES_READONLY
* "ADM Text Static Multi Line Type" 0
*
* ADM User "ADM User Type" 0
*/
@@ -0,0 +1,215 @@
/*
* Name:
* ADMBasic.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* ADM Basic Suite.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 3/9/1996 DL First version.
* Created by Dave Lazarony.
*/
#ifndef __ADMBasic__
#define __ADMBasic__
/*
* Includes
*/
#ifndef __ADMTypes__
#include "ADMTypes.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#pragma PRAGMA_ALIGN_BEGIN
#pragma PRAGMA_IMPORT_BEGIN
/*
* Constants
*/
#define kADMBasicSuite "ADM Basic Suite"
#define kADMBasicSuiteVersion2 2
#define kADMBasicSuiteVersion3 3
#define kADMBasicSuiteVersion kADMBasicSuiteVersion2
#define kADMBasicVersion kADMBasicSuiteVersion
/*
* Types
*/
typedef enum
{
kADMNoAnswer = 0,
kADMYesAnswer,
kADMCancelAnswer,
kADMDummyAnswer = 0xFFFFFFFF
}
ADMAnswer;
// ADMAnswer equivalents
typedef enum
{
kADMLeftAnswer = 0,
kADMRightAnswer,
kADMMiddleAnswer,
kADMDummyChoice = 0xFFFFFFFF
}
ADMChoice;
#ifdef MAC_ENV
typedef struct
{
unsigned long *types;
short numTypes;
} ADMPlatformFileTypesSpecification;
typedef struct
{
unsigned long *types;
short numTypes;
char filter[256];
} ADMPlatformFileTypesSpecification3;
#else
typedef struct
{
char filter[256];
} ADMPlatformFileTypesSpecification, ADMPlatformFileTypesSpecification3;
#endif
/*
* Basic Suite
*/
typedef struct ADMBasicSuite2
{
int ASAPI (*GetIndexString)(SPPluginRef pluginRef, int stringID, int stringIndex, char *string, int maxLen);
void ASAPI (*Beep)(void);
void ASAPI (*ErrorAlert)(char *errorString);
void ASAPI (*MessageAlert)(char *messageString);
ADMAnswer ASAPI (*QuestionAlert)(char *questionString);
ASBoolean ASAPI (*GetScreenDimensions)(ASPoint *point, ASRect *dimensions);
void ASAPI (*EnableToolTips)(ASBoolean enable);
ASBoolean ASAPI (*AreToolTipsEnabled)(void);
void ASAPI (*ValueToString)(float value, char *text, int maxLen, ADMUnits units, int precision, ASBoolean alwaysAppendUnits);
ASBoolean ASAPI (*StringToValue)(const char *text, float *value, ADMUnits units);
ASBoolean ASAPI (*StandardGetFileDialog)(char *message, ADMPlatformFileTypesSpecification *filter, SPPlatformFileSpecification *startingDir, char *startingFile, SPPlatformFileSpecification *result);
ASBoolean ASAPI (*StandardGetDirectoryDialog)(char *message, SPPlatformFileSpecification *startingDir, SPPlatformFileSpecification *result);
ASBoolean ASAPI (*StandardPutFileDialog)(char *message, SPPlatformFileSpecification *startingDir, char *startingFile, SPPlatformFileSpecification *result);
ASBoolean ASAPI (*ChooseColor)( ASPoint where, const ASRGBColor *inColor, ASRGBColor *outColor );
void ASAPI (*SetAppUnits)(ADMUnits appUnits, ADMUnits actualUnits);
ADMUnits ASAPI (*GetAppUnits)(ADMUnits appUnits);
void ASAPI (*SetNumbersArePoints)(ASBoolean points);
ASBoolean ASAPI (*GetNumbersArePoints)(void);
void ASAPI (*SetDefaultIncrements)(ADMUnits units, float smallIncr, float largeIncr);
void ASAPI (*GetDefaultIncrements)(ADMUnits units, float *smallIncr, float *largeIncr);
//This probably should move up with the other dialog calls (eg ErrorAlert)
void ASAPI (*AboutBox)(SPPluginRef plugin, char *text1, char *text2);
// move up to by other tool tips functions
ASBoolean ASAPI (*AreToolTipsSticky)(ADMDialogRef dialog);
void ASAPI (*GetToolTipDelays)(int *popupDelay, int *popdownDelay);
// move up by GetScreenDimensions()
ASBoolean ASAPI (*GetWorkspaceBounds)(ASRect *dimensions); // main screen less system menus, task bars, etc
ASBoolean ASAPI (*GetPaletteLayoutBounds)(ASRect *dimensions); // inset of standard application window
} ADMBasicSuite2;
typedef struct ADMBasicSuite3
{
int ASAPI (*GetIndexString)(SPPluginRef pluginRef, int stringID, int stringIndex, char *string, int maxLen);
void ASAPI (*Beep)(void);
void ASAPI (*ErrorAlert)(char *errorString);
void ASAPI (*MessageAlert)(char *messageString);
ADMAnswer ASAPI (*QuestionAlert)(char *questionString);
ASBoolean ASAPI (*GetScreenDimensions)(ASPoint *point, ASRect *dimensions);
void ASAPI (*EnableToolTips)(ASBoolean enable);
ASBoolean ASAPI (*AreToolTipsEnabled)(void);
void ASAPI (*ValueToString)(float value, char *text, int maxLen, ADMUnits units, int precision, ASBoolean alwaysAppendUnits);
ASBoolean ASAPI (*StringToValue)(const char *text, float *value, ADMUnits units);
ASBoolean ASAPI (*StandardGetFileDialog)(char *message, ADMPlatformFileTypesSpecification3 *filter, SPPlatformFileSpecification *startingDir, char *startingFile, SPPlatformFileSpecification *result);
ASBoolean ASAPI (*StandardGetDirectoryDialog)(char *message, SPPlatformFileSpecification *startingDir, SPPlatformFileSpecification *result);
ASBoolean ASAPI (*StandardPutFileDialog)(char *message, SPPlatformFileSpecification *startingDir, char *startingFile, SPPlatformFileSpecification *result);
ASBoolean ASAPI (*ChooseColor)( ASPoint where, const ASRGBColor *inColor, ASRGBColor *outColor );
void ASAPI (*SetAppUnits)(ADMUnits appUnits, ADMUnits actualUnits);
ADMUnits ASAPI (*GetAppUnits)(ADMUnits appUnits);
void ASAPI (*SetNumbersArePoints)(ASBoolean points);
ASBoolean ASAPI (*GetNumbersArePoints)(void);
void ASAPI (*SetDefaultIncrements)(ADMUnits units, float smallIncr, float largeIncr);
void ASAPI (*GetDefaultIncrements)(ADMUnits units, float *smallIncr, float *largeIncr);
//This probably should move up with the other dialog calls (eg ErrorAlert)
void ASAPI (*AboutBox)(SPPluginRef plugin, char *text1, char *text2);
// move up to by other tool tips functions
ASBoolean ASAPI (*AreToolTipsSticky)(ADMDialogRef dialog);
void ASAPI (*GetToolTipDelays)(int *popupDelay, int *popdownDelay);
// move up by GetScreenDimensions()
ASBoolean ASAPI (*GetWorkspaceBounds)(ASRect *dimensions); // main screen less system menus, task bars, etc
ASBoolean ASAPI (*GetPaletteLayoutBounds)(ASRect *dimensions); // inset of standard application window
void ASAPI (*SetPlatformCursor)(SPPluginRef pluginRef, int nCursorID);
void ASAPI (*PluginAboutBox)(char *title, char *text);
// call before an alert, defaults are reset automatically
void ASAPI (*SetAlertButtonText)(char *leftChoice, char* middleChoice, char*rightChoice);
void ASAPI (*ShowToolTip)(ASPoint *where, char *tip);
void ASAPI (*HideToolTip)(void);
} ADMBasicSuite3;
typedef ADMBasicSuite2 ADMBasicSuite;
#pragma PRAGMA_IMPORT_END
#pragma PRAGMA_ALIGN_END
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,288 @@
/*
* Name:
* ADMDialog.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* ADM Dialog Suite.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.3 3/10/1996 DL Third version.
* Created by Dave Lazarony.
*/
#ifndef __ADMDialog__
#define __ADMDialog__
/*
* Includes
*/
#ifndef __ADMItem__
#include "ADMItem.h"
#endif
#ifndef __ADMTypes__
#include "ADMTypes.h"
#endif
#ifndef __ASHelp__
#include "ASHelp.h"
#endif
#ifndef __SPInterface__
#include "SPInterf.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#pragma PRAGMA_ALIGN_BEGIN
#pragma PRAGMA_IMPORT_BEGIN
// Problematic Macintosh Headers #define GetItem.
#ifdef GetItem
#undef GetItem
#endif
/*
* Constants
*/
#define kADMDialogSuite "ADM Dialog Suite"
#define kADMDialogSuiteVersion2 2
#define kADMDialogSuiteVersion3 3
#define kADMDialogSuiteVersion kADMDialogSuiteVersion3
/*
* ADM Dialog Message
*/
#define kADMCaller "Adobe Dialog Manager"
#define kADMCreateCustomItem "Create Custom Item"
typedef struct
{
SPMessageData d;
struct ADMDialog *dialog;
int itemID;
ADMItemType itemType;
ASRect boundsRect;
ADMItemInitProc initProc;
ADMUserData data;
struct ADMItem *item;
}
ADMCreateCustomItemMessage;
/*
* Dialog Styles
*/
typedef enum
{
kADMModalDialogStyle = 0,
kADMAlertDialogStyle = 1,
kADMFloatingDialogStyle = 2,
kADMTabbedFloatingDialogStyle = 3,
kADMResizingFloatingDialogStyle = 4,
kADMTabbedResizingFloatingDialogStyle = 5,
kADMPopupDialogStyle = 6,
kADMNoCloseFloatingDialogStyle = 7,
kADMSystemAlertDialogStyle = 8,
kADMDummyDialogStyle = 0xFFFFFFFF
}
ADMDialogStyle;
/*
* Standard Dialog Item IDs
*/
typedef enum
{
kADMUniqueItemID = 0,
kADMFirstItemID = -1,
kADMLastItemID = -2,
kADMDefaultItemID = -3,
kADMCancelItemID = -4,
kADMMenuItemID = -5,
kADMResizeItemID = -6,
kADMDummyItemID = 0xFFFFFFFF
}
ADMStandardDialogItemID;
/*
* Types
*/
/* ADMItemRef and ADMDialogRef are declared in ADMTypes.h */
typedef ASErr ASAPI (*ADMDialogInitProc)(ADMDialogRef dialog);
typedef void ASAPI (*ADMDialogDrawProc)(ADMDialogRef dialog, ADMDrawerRef drawer);
typedef ASBoolean ASAPI (*ADMDialogTrackProc)(ADMDialogRef dialog, ADMTrackerRef tracker);
typedef void ASAPI (*ADMDialogNotifyProc)(ADMDialogRef dialog, ADMNotifierRef notifier);
typedef void ASAPI (*ADMDialogDestroyProc)(ADMDialogRef dialog);
typedef ASBoolean ASAPI (*ADMDialogTimerProc)(ADMDialogRef dialog, ADMTimerRef timer);
typedef void ASAPI (*ADMDialogTimerAbortProc)(ADMDialogRef dialog, ADMTimerRef timer, ADMAction abortAction);
/*
* Dialog Suite
*/
typedef struct ADMDialogSuite3
{
ADMDialogRef ASAPI (*Create)(SPPluginRef pluginRef, char *name, int dialogID, ADMDialogStyle style, ADMDialogInitProc initProc, ADMUserData data);
int ASAPI (*Modal)(SPPluginRef pluginRef, char *name, int dialogID, ADMDialogStyle style, ADMDialogInitProc initProc, ADMUserData data);
int ASAPI (*DisplayAsModal)(ADMDialogRef dialog); // This will disable all floating palettes too. -jro
void ASAPI (*Destroy)(ADMDialogRef dialog);
void ASAPI (*SetDrawProc)(ADMDialogRef dialog, ADMDialogDrawProc drawProc);
ADMDialogDrawProc ASAPI (*GetDrawProc)(ADMDialogRef dialog);
void ASAPI (*DefaultDraw)(ADMDialogRef dialog, ADMDrawerRef drawer);
void ASAPI (*SetTrackProc)(ADMDialogRef dialog, ADMDialogTrackProc trackProc);
ADMDialogTrackProc ASAPI (*GetTrackProc)(ADMDialogRef dialog);
ASBoolean ASAPI (*DefaultTrack)(ADMDialogRef dialog, ADMTrackerRef tracker);
void ASAPI (*SetMask)(ADMDialogRef dialog, ADMActionMask mask);
ADMActionMask ASAPI (*GetMask)(ADMDialogRef dialog);
void ASAPI (*SetNotifyProc)(ADMDialogRef dialog, ADMDialogNotifyProc notifyProc);
ADMDialogNotifyProc ASAPI (*GetNotifyProc)(ADMDialogRef dialog);
void ASAPI (*DefaultNotify)(ADMDialogRef dialog, ADMNotifierRef notifier);
void ASAPI (*SendNotify)(ADMDialogRef dialog, char *notifierType);
void ASAPI (*SetNotifierData)(ADMDialogRef dialog, ADMUserData data);
ADMUserData ASAPI (*GetNotifierData)(ADMDialogRef dialog);
void ASAPI (*SetDestroyProc)(ADMDialogRef dialog, ADMDialogDestroyProc destroyProc);
ADMDialogDestroyProc ASAPI (*GetDestroyProc)(ADMDialogRef dialog);
ADMTimerRef ASAPI (*CreateTimer)(ADMDialogRef dialog, unsigned long milliseconds,
ADMActionMask abortMask,
ADMDialogTimerProc timerProc,
ADMDialogTimerAbortProc abortProc);
void ASAPI (*AbortTimer)(ADMDialogRef dialog, ADMTimerRef timer);
void ASAPI (*SetUserData)(ADMDialogRef dialog, ADMUserData data);
ADMUserData ASAPI (*GetUserData)(ADMDialogRef dialog);
ASAPI char* (*GetDialogName)(ADMDialogRef dialog);
int ASAPI (*GetID)(ADMDialogRef dialog);
SPPluginRef ASAPI (*GetPluginRef)(ADMDialogRef dialog);
ASWindowRef ASAPI (*GetWindowRef)(ADMDialogRef dialog);
void ASAPI (*SetDialogStyle)(ADMDialogRef dialog, ADMDialogStyle style);
ADMDialogStyle ASAPI (*GetDialogStyle)(ADMDialogRef dialog);
void ASAPI (*Show)(ADMDialogRef dialog, ASBoolean show);
ASBoolean ASAPI (*IsVisible)(ADMDialogRef dialog);
void ASAPI (*Enable)(ADMDialogRef dialog, ASBoolean enable);
ASBoolean ASAPI (*IsEnabled)(ADMDialogRef dialog);
void ASAPI (*Activate)(ADMDialogRef dialog, ASBoolean activate);
ASBoolean ASAPI (*IsActive)(ADMDialogRef dialog);
void ASAPI (*SetLocalRect)(ADMDialogRef dialog, ASRect *localRect);
void ASAPI (*GetLocalRect)(ADMDialogRef dialog, ASRect *localRect);
void ASAPI (*SetBoundsRect)(ADMDialogRef dialog, ASRect *boundsRect);
void ASAPI (*GetBoundsRect)(ADMDialogRef dialog, ASRect *boundsRect);
void ASAPI (*Move)(ADMDialogRef dialog, int x, int y);
void ASAPI (*Size)(ADMDialogRef dialog, int width, int height);
void ASAPI (*LocalToScreenPoint)(ADMDialogRef dialog, ASPoint *point);
void ASAPI (*ScreenToLocalPoint)(ADMDialogRef dialog, ASPoint *point);
void ASAPI (*LocalToScreenRect)(ADMDialogRef dialog, ASRect *rect);
void ASAPI (*ScreenToLocalRect)(ADMDialogRef dialog, ASRect *rect);
void ASAPI (*Invalidate)(ADMDialogRef dialog);
void ASAPI (*InvalidateRect)(ADMDialogRef dialog, ASRect *invalRect);
void ASAPI (*Update)(ADMDialogRef dialog);
ASBoolean ASAPI (*SetCursorID)(ADMDialogRef dialog, SPPluginRef pluginRef, int cursorID);
void ASAPI (*GetCursorID)(ADMDialogRef dialog, SPPluginRef *pluginRef, int *cursorID);
void ASAPI (*SetFont)(ADMDialogRef dialog, ADMFont font);
ADMFont ASAPI (*GetFont)(ADMDialogRef dialog);
void ASAPI (*SetText)(ADMDialogRef dialog, char *text);
void ASAPI (*GetText)(ADMDialogRef dialog, char *text, int maxLen);
int ASAPI (*GetTextLength)(ADMDialogRef dialog);
void ASAPI (*SetMinWidth)(ADMDialogRef dialog, int width);
int ASAPI (*GetMinWidth)(ADMDialogRef dialog);
void ASAPI (*SetMinHeight)(ADMDialogRef dialog, int height);
int ASAPI (*GetMinHeight)(ADMDialogRef dialog);
void ASAPI (*SetMaxWidth)(ADMDialogRef dialog, int width);
int ASAPI (*GetMaxWidth)(ADMDialogRef dialog);
void ASAPI (*SetMaxHeight)(ADMDialogRef dialog, int height);
int ASAPI (*GetMaxHeight)(ADMDialogRef dialog);
void ASAPI (*SetHorizontalIncrement)(ADMDialogRef dialog, int increment);
int ASAPI (*GetHorizontalIncrement)(ADMDialogRef dialog);
void ASAPI (*SetVerticalIncrement)(ADMDialogRef dialog, int increment);
int ASAPI (*GetVerticalIncrement)(ADMDialogRef dialog);
ADMItemRef ASAPI (*GetItem)(ADMDialogRef dialog, int itemID);
ADMItemRef ASAPI (*CreateItem)(ADMDialogRef dialog, int itemID, ADMItemType itemType, ASRect *boundsRect, ADMItemInitProc initProc, ADMUserData data);
void ASAPI (*DestroyItem)(ADMDialogRef dialog, ADMItemRef item);
ADMItemRef ASAPI (*GetNextItem)(ADMDialogRef dialog, ADMItemRef item);
ADMItemRef ASAPI (*GetPreviousItem)(ADMDialogRef dialog, ADMItemRef item);
void ASAPI (*SetDefaultItemID)(ADMDialogRef dialog, int itemID);
int ASAPI (*GetDefaultItemID)(ADMDialogRef dialog);
void ASAPI (*SetCancelItemID)(ADMDialogRef dialog, int itemID);
int ASAPI (*GetCancelItemID)(ADMDialogRef dialog);
ASBoolean ASAPI (*EndModal)(ADMDialogRef dialog, int modalResultID, ASBoolean cancelling);
ASErr ASAPI (*RegisterItemType)(SPPluginRef pluginRef, ADMItemType itemType);
ASErr ASAPI (*UnregisterItemType)(SPPluginRef pluginRef, ADMItemType itemType);
void ASAPI (*LoadToolTips)(ADMDialogRef dialog, int stringID);
void ASAPI (*SetHelpID)(ADMDialogRef dialog, ASHelpID helpID);
ASHelpID ASAPI (*GetHelpID)(ADMDialogRef dialog);
void ASAPI (*Help)(ADMDialogRef dialog);
ASBoolean ASAPI (*IsCollapsed)(ADMDialogRef dialog);
} ADMDialogSuite3;
typedef ADMDialogSuite3 ADMDialogSuite; // Current version
#pragma PRAGMA_IMPORT_END
#pragma PRAGMA_ALIGN_END
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,149 @@
/*
* Name:
* ADMDialogGroup.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* ADM DialogGroup Suite.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.6 9/28/1996 MF Sixth version.
* Created by Matt Foster.
*/
#ifndef __ADMDialogGroup__
#define __ADMDialogGroup__
/*
* Includes
*/
#ifndef __ADMTypes__
#include "ADMTypes.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#pragma PRAGMA_ALIGN_BEGIN
#pragma PRAGMA_IMPORT_BEGIN
/*
* Constants
*/
#define kADMDialogGroupSuite "ADM Dialog Group Suite"
#define kADMDialogGroupSuiteVersion1 1
#define kADMDialogGroupSuiteVersion 1
#define kADMDialogGroupVersion kADMDialogGroupSuiteVersion1
#define kDockHostConflictError 'DOCK'
#define kTabGroupNotFoundError 'T!FD'
#define kAlreadyDockedError 'DCKD'
/*
* Types
*/
/*
* For the xxGroupInfo() functions, positionCode is a code to restore a
* dialog's position within a docked/tabbed group. The group is
* referred to by name, this being the name of the ADM Dialog that is
* the first tab in the top dcok of the group.
*
* You don't need to know what positionCode means, but if you are curious:
*
* byte meaning
* ---- ------------------------------
* 1 (0x000000ff) dock position. 0 is no dock, 1 is first docked (i.e. top dock), 2 etc.
* 2 (0x0000ff00) tab position, 0 is no tab group, 1 is the 1st tab, 2 etc.
* 3 (0x00010000) bit 16, boolean, 1 for front tab.
* 3 (0x00020000) bit 17, boolean, 0 is zoom up, 1 is zoom down.
* 3 (0x00040000) bit 18, boolean, 0 is in hidden dock, 1 is in visible dock.
* 4 (0x00000000) reserved. currently unused
*
* So for stand alone palette, the tab, dock position code is 0,?,0,0
*
*/
/* default position code for stand alone palette */
#define kADM_DPDefaultCode 0x00030000
/* DialogPosition (DP) Bit */
#define kADM_DPDockBit 0
#define kADM_DPTabBit 8
#define kADM_DPFrontTabBit 16
#define kADM_DPZoomBit 17
#define kADM_DPDockVisibleBit 18
/* DialogPosition (DP) mask */
#define kADM_DPDockMask 0x000000ff
#define kADM_DPTabMask 0x0000ff00
#define kADM_DPFrontTabMask 0x00010000
#define kADM_DPZoomMask 0x00020000
#define kADM_DPDockVisibleMask 0x00040000
/* Strings for saving palette state into preference file */
#define kADM_DPLocationStr "Location"
#define kADM_DPSizeStr "Size" // save only for resizable standalone palettes
#define kADM_DPVisibleStr "Visible"
#define kADM_DPDockCodeStr "DockCode"
#define kADM_DPDockGroupStr "DockGroup"
#define kADM_DPDockGroupStrMaxLen 65 // Group name max size = 64 chars.
/***********************************************************
** The Suite
**/
typedef struct ADMDialogGroupSuite1 {
ASAPI ASErr (*GetDialogName) ( ADMDialogRef dialog, char **name );
ASAPI ASErr (*GetDialogGroupInfo) ( ADMDialogRef dialog, char **groupName, long *positionCode );
ASAPI ASErr (*SetDialogGroupInfo) ( ADMDialogRef dialog, char *groupName, long positionCode );
// The queries below take a docking position code obtained from above functions or prefs
// You should always create a palette that is not stand alone
ASAPI ASBoolean (*IsStandAlonePalette)( long positionCode );
// Your "show palette" menu would be "Show..." unless palette dock code returns true for
// IsDockVisible() and IsFrontTab().
ASAPI ASBoolean (*IsDockVisible)( long positionCode );
ASAPI ASBoolean (*IsFrontTab)( long positionCode );
// You probably won't ever use this, but it here for completeness.
ASAPI ASBoolean (*IsCollapsed)( long positionCode );
ASAPI ASErr (*SetTabGroup) (ADMDialogRef dialog, char *tabGroupName, ASBoolean bringToFront );
ASAPI ASErr (*CountDialogs) ( long *count );
ASAPI ASErr (*GetNthDialog) ( long n, ADMDialogRef *dialog );
ASAPI ASErr (*GetNamedDialog) ( char *name, ADMDialogRef *dialog );
ASAPI void (*ToggleAllFloatingDialogs)();
} ADMDialogGroupSuite1;
typedef ADMDialogGroupSuite1 ADMDialogGroupSuite;
#pragma PRAGMA_IMPORT_END
#pragma PRAGMA_ALIGN_END
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,309 @@
/*
* Name:
* ADMDrawer.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* ADM Drawer Suite.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 3/6/1996 DL First version.
* Created by Dave Lazarony.
*/
#ifndef __ADMDrawer__
#define __ADMDrawer__
/*
* Includes
*/
#ifndef __ADMTypes__
#include "ADMTypes.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#pragma PRAGMA_ALIGN_BEGIN
#pragma PRAGMA_IMPORT_BEGIN
/*
* Constants
*/
#define kADMDrawerSuite "ADM Drawer Suite"
#define kADMDrawerSuiteVersion3 3
#define kADMDrawerSuiteVersion2 2
#define kADMDrawerSuiteVersion kADMDrawerSuiteVersion3 // The current version
/*
* Types
*/
typedef enum
{
kADMBlackColor = 0,
kADMWhiteColor,
kADMHiliteColor,
kADMHiliteTextColor,
kADMLightColor,
kADMBackgroundColor,
kADMShadowColor,
kADMDisabledColor,
kADMButtonUpColor,
kADMButtonDownColor,
kADMButtonDownShadowColor,
kADMToolTipBackgroundColor,
kADMToolTipForegroundColor,
kADMWindowColor,
kADMForegroundColor,
kADMTextColor,
kADMRedColor,
kADMDummyColor = 0xFFFFFFFF
} ADMColor;
typedef enum
{
kADMNormalMode = 0,
kADMXORMode,
kADMDummyMode = 0xFFFFFFFF
} ADMDrawMode;
typedef struct
{
int height;
int ascent;
int descent;
int leading;
int maxWidth;
} ADMFontInfo;
typedef enum
{
kADMNoRecolor,
kADMActiveRecolor,
kADMInactiveRecolor,
kADMDisabledRecolor,
kADMDummyRecolor = 0xFFFFFFFF
} ADMRecolorStyle;
/*
* Drawer Suite
*/
typedef struct ADMDrawerSuite2
{
ASPortRef ASAPI (*GetPortRef)(ADMDrawerRef drawer);
void ASAPI (*Clear)(ADMDrawerRef drawer);
void ASAPI (*GetBoundsRect)(ADMDrawerRef drawer, ASRect *boundsRect);
void ASAPI (*GetClipRect)(ADMDrawerRef drawer, ASRect *clipRect);
void ASAPI (*SetClipRect)(ADMDrawerRef drawer, ASRect *clipRect);
void ASAPI (*IntersectClipRect)(ADMDrawerRef drawer, ASRect *clipRect);
void ASAPI (*UnionClipRect)(ADMDrawerRef drawer, ASRect *clipRect);
void ASAPI (*SubtractClipRect)(ADMDrawerRef drawer, ASRect *clipRect);
void ASAPI (*SetClipPolygon)(ADMDrawerRef drawer, ASPoint *points, int numPoints);
void ASAPI (*IntersectClipPolygon)(ADMDrawerRef drawer, ASPoint *points, int numPoints);
void ASAPI (*UnionClipPolygon)(ADMDrawerRef drawer, ASPoint *points, int numPoints);
void ASAPI (*SubtractClipPolygon)(ADMDrawerRef drawer, ASPoint *points, int numPoints);
void ASAPI (*GetOrigin)(ADMDrawerRef drawer, ASPoint *origin);
void ASAPI (*SetOrigin)(ADMDrawerRef drawer, ASPoint *origin);
void ASAPI (*GetRGBColor)(ADMDrawerRef drawer, ASRGBColor *color);
void ASAPI (*SetRGBColor)(ADMDrawerRef drawer, ASRGBColor *color);
ADMColor ASAPI (*GetADMColor)(ADMDrawerRef drawer);
void ASAPI (*SetADMColor)(ADMDrawerRef drawer, ADMColor color);
ADMDrawMode ASAPI (*GetDrawMode)(ADMDrawerRef drawer);
void ASAPI (*SetDrawMode)(ADMDrawerRef drawer, ADMDrawMode drawMode);
ADMFont ASAPI (*GetFont)(ADMDrawerRef drawer);
void ASAPI (*SetFont)(ADMDrawerRef drawer, ADMFont font);
void ASAPI (*DrawLine)(ADMDrawerRef drawer, ASPoint *startPoint, ASPoint *endPoint);
void ASAPI (*DrawPolygon)(ADMDrawerRef drawer, ASPoint *points, int numPoints);
void ASAPI (*FillPolygon)(ADMDrawerRef drawer, ASPoint *points, int numPoints);
void ASAPI (*DrawRect)(ADMDrawerRef drawer, ASRect *rect);
void ASAPI (*FillRect)(ADMDrawerRef drawer, ASRect *rect);
void ASAPI (*ClearRect)(ADMDrawerRef drawer, ASRect *rect);
void ASAPI (*DrawSunkenRect)(ADMDrawerRef drawer, ASRect *rect);
void ASAPI (*DrawRaisedRect)(ADMDrawerRef drawer, ASRect *rect);
void ASAPI (*InvertRect)(ADMDrawerRef drawer, ASRect *rect);
void ASAPI (*DrawOval)(ADMDrawerRef drawer, ASRect *rect);
void ASAPI (*FillOval)(ADMDrawerRef drawer, ASRect *rect);
_t_AGMPortPtr ASAPI (*GetAGMPort)(ADMDrawerRef drawer);
void ASAPI (*DrawAGMImage)(ADMDrawerRef drawer, struct _t_AGMImageRecord *image, struct _t_AGMFixedMatrix *matrix, long flags);
void ASAPI (*DrawResPicture)(ADMDrawerRef drawer, struct SPPlugin *pluginRef, int resID, ASPoint *topLeftPoint);
void ASAPI (*DrawResPictureCentered)(ADMDrawerRef drawer, struct SPPlugin *pluginRef, int resID, ASRect *rect);
void ASAPI (*DrawRecoloredResPicture)(ADMDrawerRef drawer, struct SPPlugin *pluginRef, int resID, ASPoint *topLeftPoint, ADMRecolorStyle style);
void ASAPI (*DrawRecoloredResPictureCentered)(ADMDrawerRef drawer, struct SPPlugin *pluginRef, int resID, ASRect *rect, ADMRecolorStyle style);
void ASAPI (*DrawIcon)(ADMDrawerRef drawer, ADMIconRef icon, ASPoint *topLeftPoint);
void ASAPI (*DrawIconCentered)(ADMDrawerRef drawer, ADMIconRef icon, ASRect *rect);
void ASAPI (*DrawRecoloredIcon)(ADMDrawerRef drawer, ADMIconRef icon, ASPoint *topLeftPoint, ADMRecolorStyle style);
void ASAPI (*DrawRecoloredIconCentered)(ADMDrawerRef drawer, ADMIconRef icon, ASRect *rect, ADMRecolorStyle style);
void ASAPI (*GetResPictureBounds)(ADMDrawerRef drawer, struct SPPlugin *pluginRef, int resID, ASRect *boundsRect);
int ASAPI (*GetTextWidth)(ADMDrawerRef drawer, char *text);
void ASAPI (*GetFontInfo)(ADMDrawerRef drawer, ADMFontInfo *fontInfo);
void ASAPI (*DrawText)(ADMDrawerRef drawer, char *text, ASPoint *point);
void ASAPI (*DrawTextLeft)(ADMDrawerRef drawer, char *text, ASRect *rect);
void ASAPI (*DrawTextCentered)(ADMDrawerRef drawer, char *text, ASRect *rect);
void ASAPI (*DrawTextRight)(ADMDrawerRef drawer, char *text, ASRect *rect);
void ASAPI (*DrawUpArrow)(ADMDrawerRef drawer, ASRect *rect);
void ASAPI (*DrawDownArrow)(ADMDrawerRef drawer, ASRect *rect);
void ASAPI (*DrawLeftArrow)(ADMDrawerRef drawer, ASRect *rect);
void ASAPI (*DrawRightArrow)(ADMDrawerRef drawer, ASRect *rect);
ADMDrawerRef ASAPI (*Create)(ASPortRef portRef, ASRect *boundsRect, ADMFont font);
void ASAPI (*Destroy)(ADMDrawerRef drawer);
void ASAPI (*DrawADMImage)(ADMDrawerRef drawer, ADMImageRef image, ASPoint *topLeftPoint);
void ASAPI (*DrawADMImageCentered)(ADMDrawerRef drawer, ADMImageRef image, ASRect *rect);
} ADMDrawerSuite2;
typedef struct ADMDrawerSuite3
{
ASPortRef ASAPI (*GetPortRef)(ADMDrawerRef drawer);
void ASAPI (*Clear)(ADMDrawerRef drawer);
void ASAPI (*GetBoundsRect)(ADMDrawerRef drawer, ASRect *boundsRect);
void ASAPI (*GetClipRect)(ADMDrawerRef drawer, ASRect *clipRect);
void ASAPI (*SetClipRect)(ADMDrawerRef drawer, ASRect *clipRect);
void ASAPI (*IntersectClipRect)(ADMDrawerRef drawer, ASRect *clipRect);
void ASAPI (*UnionClipRect)(ADMDrawerRef drawer, ASRect *clipRect);
void ASAPI (*SubtractClipRect)(ADMDrawerRef drawer, ASRect *clipRect);
void ASAPI (*SetClipPolygon)(ADMDrawerRef drawer, ASPoint *points, int numPoints);
void ASAPI (*IntersectClipPolygon)(ADMDrawerRef drawer, ASPoint *points, int numPoints);
void ASAPI (*UnionClipPolygon)(ADMDrawerRef drawer, ASPoint *points, int numPoints);
void ASAPI (*SubtractClipPolygon)(ADMDrawerRef drawer, ASPoint *points, int numPoints);
void ASAPI (*GetOrigin)(ADMDrawerRef drawer, ASPoint *origin);
void ASAPI (*SetOrigin)(ADMDrawerRef drawer, ASPoint *origin);
void ASAPI (*GetRGBColor)(ADMDrawerRef drawer, ASRGBColor *color);
void ASAPI (*SetRGBColor)(ADMDrawerRef drawer, ASRGBColor *color);
ADMColor ASAPI (*GetADMColor)(ADMDrawerRef drawer);
void ASAPI (*SetADMColor)(ADMDrawerRef drawer, ADMColor color);
ADMDrawMode ASAPI (*GetDrawMode)(ADMDrawerRef drawer);
void ASAPI (*SetDrawMode)(ADMDrawerRef drawer, ADMDrawMode drawMode);
ADMFont ASAPI (*GetFont)(ADMDrawerRef drawer);
void ASAPI (*SetFont)(ADMDrawerRef drawer, ADMFont font);
void ASAPI (*DrawLine)(ADMDrawerRef drawer, ASPoint *startPoint, ASPoint *endPoint);
void ASAPI (*DrawPolygon)(ADMDrawerRef drawer, ASPoint *points, int numPoints);
void ASAPI (*FillPolygon)(ADMDrawerRef drawer, ASPoint *points, int numPoints);
void ASAPI (*DrawRect)(ADMDrawerRef drawer, ASRect *rect);
void ASAPI (*FillRect)(ADMDrawerRef drawer, ASRect *rect);
void ASAPI (*ClearRect)(ADMDrawerRef drawer, ASRect *rect);
void ASAPI (*DrawSunkenRect)(ADMDrawerRef drawer, ASRect *rect);
void ASAPI (*DrawRaisedRect)(ADMDrawerRef drawer, ASRect *rect);
void ASAPI (*InvertRect)(ADMDrawerRef drawer, ASRect *rect);
void ASAPI (*DrawOval)(ADMDrawerRef drawer, ASRect *rect);
void ASAPI (*FillOval)(ADMDrawerRef drawer, ASRect *rect);
ASAPI struct _t_AGMPort* (*GetAGMPort)(ADMDrawerRef drawer);
void ASAPI (*DrawAGMImage)(ADMDrawerRef drawer, struct _t_AGMImageRecord *image, struct _t_AGMFixedMatrix *matrix, long flags);
void ASAPI (*DrawResPicture)(ADMDrawerRef drawer, struct SPPlugin *pluginRef, int resID, ASPoint *topLeftPoint);
void ASAPI (*DrawResPictureCentered)(ADMDrawerRef drawer, struct SPPlugin *pluginRef, int resID, ASRect *rect);
void ASAPI (*DrawRecoloredResPicture)(ADMDrawerRef drawer, struct SPPlugin *pluginRef, int resID, ASPoint *topLeftPoint, ADMRecolorStyle style);
void ASAPI (*DrawRecoloredResPictureCentered)(ADMDrawerRef drawer, struct SPPlugin *pluginRef, int resID, ASRect *rect, ADMRecolorStyle style);
void ASAPI (*DrawIcon)(ADMDrawerRef drawer, ADMIconRef icon, ASPoint *topLeftPoint);
void ASAPI (*DrawIconCentered)(ADMDrawerRef drawer, ADMIconRef icon, ASRect *rect);
void ASAPI (*DrawRecoloredIcon)(ADMDrawerRef drawer, ADMIconRef icon, ASPoint *topLeftPoint, ADMRecolorStyle style);
void ASAPI (*DrawRecoloredIconCentered)(ADMDrawerRef drawer, ADMIconRef icon, ASRect *rect, ADMRecolorStyle style);
void ASAPI (*GetResPictureBounds)(ADMDrawerRef drawer, struct SPPlugin *pluginRef, int resID, ASRect *boundsRect);
int ASAPI (*GetTextWidth)(ADMDrawerRef drawer, char *text);
void ASAPI (*GetFontInfo)(ADMDrawerRef drawer, ADMFontInfo *fontInfo);
void ASAPI (*DrawText)(ADMDrawerRef drawer, char *text, ASPoint *point);
void ASAPI (*DrawTextLeft)(ADMDrawerRef drawer, char *text, ASRect *rect);
void ASAPI (*DrawTextCentered)(ADMDrawerRef drawer, char *text, ASRect *rect);
void ASAPI (*DrawTextRight)(ADMDrawerRef drawer, char *text, ASRect *rect);
void ASAPI (*DrawUpArrow)(ADMDrawerRef drawer, ASRect *rect);
void ASAPI (*DrawDownArrow)(ADMDrawerRef drawer, ASRect *rect);
void ASAPI (*DrawLeftArrow)(ADMDrawerRef drawer, ASRect *rect);
void ASAPI (*DrawRightArrow)(ADMDrawerRef drawer, ASRect *rect);
ADMDrawerRef ASAPI (*Create)(ASPortRef portRef, ASRect *boundsRect, ADMFont font);
void ASAPI (*Destroy)(ADMDrawerRef drawer);
void ASAPI (*DrawADMImage)(ADMDrawerRef drawer, ADMImageRef image, ASPoint *topLeftPoint);
void ASAPI (*DrawADMImageCentered)(ADMDrawerRef drawer, ADMImageRef image, ASRect *rect);
ASPortRef ASAPI (*GetADMWindowPort)(ASWindowRef window);
void ASAPI (*ReleaseADMWindowPort)(ASWindowRef window, ASPortRef port);
void ASAPI (*GetThisFontInfo)(ADMFont font, ADMFontInfo *fontInfo);
void ASAPI (*DrawTextInaBox)(ADMDrawerRef drawer, ASRect *rect, char *text);
} ADMDrawerSuite3;
typedef ADMDrawerSuite3 ADMDrawerSuite;
#pragma PRAGMA_IMPORT_END
#pragma PRAGMA_ALIGN_END
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,166 @@
/*
* Name:
* ADMEntry.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* ADM Entry Suite.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.1 5/7/1996 DL Second version.
* Created by Dave Lazarony.
*/
#ifndef __ADMEntry__
#define __ADMEntry__
/*
* Includes
*/
#ifndef __ADMTypes__
#include "ADMTypes.h"
#endif
#ifndef __ADMTracker__
#include "ADMTracker.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#pragma PRAGMA_ALIGN_BEGIN
#pragma PRAGMA_IMPORT_BEGIN
// Problematic Macintosh Headers #define GetItem.
#ifdef GetItem
#undef GetItem
#endif
/*
* Constants
*/
#define kADMEntrySuite "ADM Entry Suite"
#define kADMEntrySuiteVersion1 1
#define kADMEntrySuiteVersion2 2
#define kADMEntrySuiteVersion kADMEntrySuiteVersion2
/*
* Types
*/
typedef ASBoolean ASAPI (*ADMEntryTimerProc)(ADMEntryRef entry, ADMTimerRef timer);
typedef void ASAPI (*ADMEntryTimerAbortProc)(ADMEntryRef entry, ADMTimerRef timer, ADMAction abortAction);
/*
* Entry Suite
*/
typedef struct ADMEntrySuite2
{
ADMEntryRef ASAPI (*Create)(ADMListRef list);
void ASAPI (*Destroy)(ADMEntryRef entry);
void ASAPI (*DefaultDraw)(ADMEntryRef entry, ADMDrawerRef drawer);
ASBoolean ASAPI (*DefaultTrack)(ADMEntryRef entry, ADMTrackerRef tracker);
void ASAPI (*DefaultNotify)(ADMEntryRef entry, ADMNotifierRef notifier);
void ASAPI (*SendNotify)(ADMEntryRef entry, char *notifierType);
int ASAPI (*GetIndex)(ADMEntryRef entry);
ADMListRef ASAPI (*GetList)(ADMEntryRef entry);
void ASAPI (*SetID)(ADMEntryRef entry, int entryID);
int ASAPI (*GetID)(ADMEntryRef entry);
void ASAPI (*SetUserData)(ADMEntryRef entry, ADMUserData data);
ADMUserData ASAPI (*GetUserData)(ADMEntryRef entry);
void ASAPI (*Select)(ADMEntryRef entry, ASBoolean select);
ASBoolean ASAPI (*IsSelected)(ADMEntryRef entry);
void ASAPI (*MakeInBounds)(ADMEntryRef entry);
ASBoolean ASAPI (*IsInBounds)(ADMEntryRef entry);
void ASAPI (*Enable)(ADMEntryRef entry, ASBoolean enable);
ASBoolean ASAPI (*IsEnabled)(ADMEntryRef entry);
void ASAPI (*Activate)(ADMEntryRef entry, ASBoolean activate);
ASBoolean ASAPI (*IsActive)(ADMEntryRef entry);
void ASAPI (*Check)(ADMEntryRef entry, ASBoolean check);
ASBoolean ASAPI (*IsChecked)(ADMEntryRef entry);
void ASAPI (*MakeSeparator)(ADMEntryRef entry, ASBoolean separator);
ASBoolean ASAPI (*IsSeparator)(ADMEntryRef entry);
void ASAPI (*GetLocalRect)(ADMEntryRef entry, ASRect *localRect);
void ASAPI (*GetBoundsRect)(ADMEntryRef entry, ASRect *boundsRect);
void ASAPI (*LocalToScreenPoint)(ADMEntryRef entry, ASPoint *point);
void ASAPI (*ScreenToLocalPoint)(ADMEntryRef entry, ASPoint *point);
void ASAPI (*LocalToScreenRect)(ADMEntryRef entry, ASRect *rect);
void ASAPI (*ScreenToLocalRect)(ADMEntryRef entry, ASRect *rect);
void ASAPI (*Invalidate)(ADMEntryRef entry);
void ASAPI (*InvalidateRect)(ADMEntryRef dialog, ASRect *invalRect);
void ASAPI (*Update)(ADMEntryRef entry);
void ASAPI (*SetPictureID)(ADMEntryRef entry, int pictureResID);
int ASAPI (*GetPictureID)(ADMEntryRef entry);
void ASAPI (*SetSelectedPictureID)(ADMEntryRef entry, int pictureResID);
int ASAPI (*GetSelectedPictureID)(ADMEntryRef entry);
void ASAPI (*SetDisabledPictureID)(ADMEntryRef entry, int pictureResID);
int ASAPI (*GetDisabledPictureID)(ADMEntryRef entry);
void ASAPI (*SetText)(ADMEntryRef entry, char *text);
void ASAPI (*GetText)(ADMEntryRef entry, char *text, int maxLen);
int ASAPI (*GetTextLength)(ADMEntryRef entry);
ADMTimerRef ASAPI (*CreateTimer)(ADMEntryRef entry, unsigned long milliseconds,
ADMActionMask abortMask,
ADMEntryTimerProc timerProc,
ADMEntryTimerAbortProc abortProc);
void ASAPI (*AbortTimer)(ADMEntryRef entry, ADMTimerRef timer);
} ADMEntrySuite2; // kADMEntrySuiteVersion2
typedef ADMEntrySuite2 ADMEntrySuite; // The current version
#pragma PRAGMA_IMPORT_END
#pragma PRAGMA_ALIGN_END
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,190 @@
/*
* Name:
* ADMHierarchyList.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* ADM Hierarchy List Suite.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 10/17/1997 WH First version.
* Created by Wei Huang.
*/
#ifndef __ADMHierarchyList__
#define __ADMHierarchyList__
/*
* Includes
*/
#ifndef __ADMTypes__
#include "ADMTypes.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#pragma PRAGMA_ALIGN_BEGIN
#pragma PRAGMA_IMPORT_BEGIN
/*
* Constants
*/
#define kADMHierarchyListSuite "ADM Hierarchy List Suite"
#define kADMHierarchyListSuiteVersion 1
#define kMultiSelectAcrossHierarchyLevels 0x00000001
typedef struct ADMHierarchyList *ADMHierarchyListRef;
typedef struct ADMListEntry *ADMListEntryRef;
typedef ASErr ASAPI (*ADMListEntryInitProc)(ADMListEntryRef entry);
typedef void ASAPI (*ADMListEntryDrawProc)(ADMListEntryRef entry, ADMDrawerRef drawer);
typedef ASBoolean ASAPI (*ADMListEntryTrackProc)(ADMListEntryRef entry, ADMTrackerRef tracker);
typedef void ASAPI (*ADMListEntryNotifyProc)(ADMListEntryRef entry, ADMNotifierRef notifier);
typedef void ASAPI (*ADMListEntryDestroyProc)(ADMListEntryRef entry);
/*
* List Suite
*/
typedef struct ADMHierarchyListSuite
{
void ASAPI (*SetMenuID)(ADMHierarchyListRef list, int menuResID);
int ASAPI (*GetMenuID)(ADMHierarchyListRef list);
ADMItemRef ASAPI (*GetItem)(ADMHierarchyListRef list);
void ASAPI (*SetUserData)(ADMHierarchyListRef list, ADMUserData data);
ADMUserData ASAPI (*GetUserData)(ADMHierarchyListRef list);
void ASAPI (*SetInitProc)(ADMHierarchyListRef list, ADMListEntryInitProc initProc);
void ASAPI (*SetInitProcRecursive)(ADMHierarchyListRef list, ADMListEntryInitProc initProc);
ADMListEntryInitProc ASAPI (*GetInitProc)(ADMHierarchyListRef list);
void ASAPI (*SetDrawProc)(ADMHierarchyListRef list, ADMListEntryDrawProc drawProc);
void ASAPI (*SetDrawProcRecursive)(ADMHierarchyListRef list, ADMListEntryDrawProc drawProc);
ADMListEntryDrawProc ASAPI (*GetDrawProc)(ADMHierarchyListRef list);
void ASAPI (*SetTrackProc)(ADMHierarchyListRef list, ADMListEntryTrackProc trackProc);
void ASAPI (*SetTrackProcRecursive)(ADMHierarchyListRef list, ADMListEntryTrackProc trackProc);
ADMListEntryTrackProc ASAPI (*GetTrackProc)(ADMHierarchyListRef list);
void ASAPI (*SetMask)(ADMHierarchyListRef entry, ADMActionMask mask);
void ASAPI (*SetMaskRecursive)(ADMHierarchyListRef entry, ADMActionMask mask);
ADMActionMask ASAPI (*GetMask)(ADMHierarchyListRef entry);
void ASAPI (*SetNotifyProc)(ADMHierarchyListRef list, ADMListEntryNotifyProc notifyProc);
void ASAPI (*SetNotifyProcRecursive)(ADMHierarchyListRef list, ADMListEntryNotifyProc notifyProc);
ADMListEntryNotifyProc ASAPI (*GetNotifyProc)(ADMHierarchyListRef list);
void ASAPI (*SetNotifierData)(ADMHierarchyListRef entry, ADMUserData data);
ADMUserData ASAPI (*GetNotifierData)(ADMHierarchyListRef entry);
void ASAPI (*SetDestroyProc)(ADMHierarchyListRef list, ADMListEntryDestroyProc destroyProc);
void ASAPI (*SetDestroyProcRecursive)(ADMHierarchyListRef list, ADMListEntryDestroyProc destroyProc);
ADMListEntryDestroyProc ASAPI (*GetDestroyProc)(ADMHierarchyListRef list);
void ASAPI (*SetEntryWidth)(ADMHierarchyListRef list, int width);
void ASAPI (*SetEntryWidthRecursive)(ADMHierarchyListRef list, int width);
int ASAPI (*GetEntryWidth)(ADMHierarchyListRef list);
int ASAPI (*GetNonLeafEntryWidth)(ADMHierarchyListRef list);
void ASAPI (*SetEntryHeight)(ADMHierarchyListRef list, int height);
void ASAPI (*SetEntryHeightRecursive)(ADMHierarchyListRef list, int height);
int ASAPI (*GetEntryHeight)(ADMHierarchyListRef list);
void ASAPI (*SetEntryTextRect)(ADMHierarchyListRef list, ASRect *rect);
void ASAPI (*SetEntryTextRectRecursive)(ADMHierarchyListRef list, ASRect *rect);
void ASAPI (*GetEntryTextRect)(ADMHierarchyListRef list, ASRect *rect);
void ASAPI (*SetNonLeafEntryTextRect)(ADMHierarchyListRef list, ASRect *rect);
void ASAPI (*SetNonLeafEntryTextRectRecursive)(ADMHierarchyListRef list, ASRect *rect);
void ASAPI (*GetNonLeafEntryTextRect)(ADMHierarchyListRef list, ASRect *rect);
ADMListEntryRef ASAPI (*InsertEntry)(ADMHierarchyListRef list, int index);
void ASAPI (*RemoveEntry)(ADMHierarchyListRef list, int index);
ADMListEntryRef ASAPI (*GetEntry)(ADMHierarchyListRef list, int entryID);
ADMListEntryRef ASAPI (*IndexEntry)(ADMHierarchyListRef list, int index);
ADMListEntryRef ASAPI (*FindEntry)(ADMHierarchyListRef list, char *text);
ADMListEntryRef ASAPI (*PickEntry)(ADMHierarchyListRef list, ASPoint *point);
ADMListEntryRef ASAPI (*PickLeafEntry)(ADMHierarchyListRef list, ASPoint *point);
ADMListEntryRef ASAPI (*GetActiveEntry)(ADMHierarchyListRef list);
ADMListEntryRef ASAPI (*GetActiveLeafEntry)(ADMHierarchyListRef list);
ADMListEntryRef ASAPI (*IndexSelectedEntry)(ADMHierarchyListRef list, int selectionIndex);
ADMListEntryRef ASAPI (*IndexAllSelectedEntriesInHierarchy)(ADMHierarchyListRef list, int selectionIndex);
ADMListEntryRef ASAPI (*IndexUnNestedSelectedEntriesInHierarchy)(ADMHierarchyListRef list, int selectionIndex);
int ASAPI (*NumberOfEntries)(ADMHierarchyListRef list);
int ASAPI (*NumberOfSelectedEntries)(ADMHierarchyListRef list);
int ASAPI (*NumberOfAllSelectedEntriesInHierarchy)(ADMHierarchyListRef list);
int ASAPI (*NumberOfUnNestedSelectedEntriesInHierarchy)(ADMHierarchyListRef list);
ADMListEntryRef ASAPI (*GetParentEntry)(ADMHierarchyListRef list);
void ASAPI (*GetLocalRect)(ADMHierarchyListRef list, ASRect *rect);
void ASAPI (*LocalToScreenPoint)(ADMHierarchyListRef list, ASPoint *point);
void ASAPI (*ScreenToLocalPoint)(ADMHierarchyListRef list, ASPoint *point);
void ASAPI (*LocalToGlobalPoint)(ADMHierarchyListRef list, ASPoint *point);
void ASAPI (*GlobalToLocalPoint)(ADMHierarchyListRef list, ASPoint *point);
void ASAPI (*LocalToGlobalRect)(ADMHierarchyListRef list, ASRect *rect);
void ASAPI (*GlobalToLocalRect)(ADMHierarchyListRef list, ASRect *rect);
void ASAPI (*SetIndentationWidth)(ADMHierarchyListRef list, int width);
void ASAPI (*SetIndentationWidthRecursive)(ADMHierarchyListRef list, int width);
int ASAPI (*GetIndentationWidth)(ADMHierarchyListRef list);
void ASAPI (*SetLocalLeftMargin)(ADMHierarchyListRef list, int width);
int ASAPI (*GetLocalLeftMargin)(ADMHierarchyListRef list);
int ASAPI (*GetGlobalLeftMargin)(ADMHierarchyListRef list);
void ASAPI (*SetDivided)(ADMHierarchyListRef list, ASBoolean divided);
void ASAPI (*SetDividedRecursive)(ADMHierarchyListRef list, ASBoolean divided);
ASBoolean ASAPI (*GetDivided)(ADMHierarchyListRef list);
void ASAPI (*SetFlags)(ADMHierarchyListRef list, int flags);
void ASAPI (*SetFlagsRecursive)(ADMHierarchyListRef list, int flags);
ASBoolean ASAPI (*GetFlags)(ADMHierarchyListRef list);
void ASAPI (*Invalidate)(ADMHierarchyListRef list);
} ADMHierarchyListSuite;
#pragma PRAGMA_IMPORT_END
#pragma PRAGMA_ALIGN_END
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,284 @@
/*
* Name:
* ADMHost.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Adobe Standard Enviornment Configuration
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.2.0 3/9/1996 MF Second version.
* Created by Matt Foster.
*/
#ifndef __ADMHost__
#define __ADMHost__
#ifndef __ADMTypes__
#include "ADMTypes.h"
#endif
#ifndef __SPMessageData__
#include "SPMData.h"
#endif
#ifndef __SPAccess__
#include "SPAccess.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#pragma PRAGMA_ALIGN_BEGIN
#pragma PRAGMA_IMPORT_BEGIN
/*
* Constants
*/
#define kADMPluginName "ADM Plugin"
#define kADMHostSuite "ADM Host Suite"
#define kADMHostSuiteVersion1 1
#define kADMHostSuiteVersion2 2
#define kADMHostSuiteVersion kADMHostSuiteVersion2 // The current version
#define kADMHostCaller "ADM Host"
#define kADMHostStartSelector "ADM Started"
#define kADMHostEndSelector "ADM Ending"
//#ifdef MODELESS_DIAOG_HACK
#define kADMHostBeginSet "ADM Host Begin Set"
#define kADMHostBeginReset "ADM Host Begin Reset"
#define kADMHostForceBeginSet "ADM Host Force Begin Set"
#define kADMHostForceBeginReset "ADM Host Force Begin Reset"
#ifndef kMaxHostNameLen
#define kMaxHostNameLen 256
#endif
/* GetADMVersion returns the version number ADM is compiled with. This number consists
of a hi word which is the major version number, and a low word which is the minor
revision number.
The macro ADM_VERSION can be used to make sure you are running the version
you think you are.
*/
#define ADM_VERSION 0x00020019
/*
* Types
*/
typedef struct ADMHostInterfaceMessage {
SPMessageData d;
} ADMHostInterfaceMessage;
typedef void ASAPI (*ADMAGMCallibrationProc)(_t_AGMPortPtr port);
typedef void ASAPI (*ModifyPaletteLayoutBoundsProc)(ASRect *dim);
// This is a reference to the AppContext. It is never dereferenced.
typedef struct _t_ADMHostAppContextOpaque *ADMHostAppContextRef;
typedef ASErr ASAPI (*BeginHostAppContextProc) ( ADMPluginRef plugin, ADMHostAppContextRef *appContext );
typedef ASErr ASAPI (*EndHostppContextProc) ( ADMHostAppContextRef appContext );
typedef struct ADMHostAppContextProcs {
BeginHostAppContextProc beginAppContext;
EndHostppContextProc endAppContext;
}
ADMHostAppContextProcs;
// This is a reference to the ResContext. It is never dereferenced.
typedef struct _t_ADMResContextOpaque *ADMResContextRef;
// This is basically the same as the SPAccess suite call GetAccessInfo(). Use it on Windows
// to supply an instance handle and on Mac if you have highly managed resource chain.
typedef ASErr ASAPI (*GetResourceAccessInfoProc)( ADMPluginRef plugin, SPPlatformAccessInfo *info);
// These can be used to order the MAcresource chain (e.g. bring a plug-in to the top) and restore
// a previous order if necessary. Restore doesn't necessarily have to do anything. The resContext
// you return to the set function will be returned by restore if you need it.
typedef ASErr ASAPI (*SetResourceContextProc)( ADMPluginRef plugin, ADMResContextRef *resContext );
typedef ASErr ASAPI (*RestoreResourceContextProc)( ADMResContextRef resContext );
typedef struct ADMResourceAccessProcs {
// Supply functions getResAccessInfo() *OR* set/resetResContext()
GetResourceAccessInfoProc getResAccessInfo;
SetResourceContextProc setResContext;
RestoreResourceContextProc resetResContext;
}
ADMResourceAccessProcs;
// Overridable defaults for text items
typedef struct ADMDefaultTextInfo {
/* Text */
int maxTextLen;
ADMJustify justify;
/* Numerics */
ADMUnits units;
int numberOfDecimalPlaces;
ASBoolean allowUnits;
ASBoolean allowMath;
} ADMDefaultTextInfo;
/*
* Suite
*/
typedef struct ADMHostSuite1
{
void ASAPI (*SetAGMCallibrationProc)(ADMAGMCallibrationProc callibrationProc);
ADMAGMCallibrationProc ASAPI (*GetAGMCallibrationProc)();
ASBoolean ASAPI (*PointerInUse)();
void ASAPI (*SetModifyPaletteLayoutBoundsProc)(ModifyPaletteLayoutBoundsProc modifyBoundsProc);
ModifyPaletteLayoutBoundsProc ASAPI (*GetModifyPaletteLayoutBoundsProc)();
}
ADMHostSuite1;
typedef struct ADMHostSuite2
{
void ASAPI (*SetAGMCallibrationProc)(ADMAGMCallibrationProc callibrationProc);
ADMAGMCallibrationProc ASAPI (*GetAGMCallibrationProc)();
ASBoolean ASAPI (*PointerInUse)();
void ASAPI (*SetModifyPaletteLayoutBoundsProc)(ModifyPaletteLayoutBoundsProc modifyBoundsProc);
ModifyPaletteLayoutBoundsProc ASAPI (*GetModifyPaletteLayoutBoundsProc)();
void ASAPI (*SetADMHostAppContextProcs)(ADMHostAppContextProcs *appContextProcs);
void ASAPI (*GetADMHostAppContextProcs)(ADMHostAppContextProcs *appContextProcs);
void ASAPI (*SetADMHostAppName)(char *hostName);
void ASAPI (*GetADMHostAppName)(char *hostName, short length);
void ASAPI (*SetADMResourceAccessProcs)(ADMResourceAccessProcs *resProcs);
void ASAPI (*GetADMResourceAccessProcs)(ADMResourceAccessProcs *resProcs);
ASUInt32 ASAPI (*GetADMVersion)( void );
void ASAPI (*SetADMDefaultTextInfo)(ADMDefaultTextInfo *defaultTextInfo);
void ASAPI (*GetADMDefaultTextInfo)(ADMDefaultTextInfo *defaultTextInfo);
}
ADMHostSuite2;
typedef ADMHostSuite2 ADMHostSuite; // The current version: kADMHostSuiteVersion2
#ifdef MAC_ENV
#define kADMMacHostSuite "ADM Mac Host Suite"
#define kADMMacHostSuiteVersion1 1
#define kADMMacHostSuiteVersion2 2
#define kADMMacHostSuiteVersion kADMMacHostSuiteVersion2 // The current version
typedef ASErr ASAPI (*ADMModalEventProc)(struct EventRecord *event);
typedef ASErr ASAPI (*ADMWindowActivateProc)(struct EventRecord *event);
/*
* Suite
*/
typedef struct ADMMacHostSuite1
{
ASBoolean ASAPI (*HandleADMEvent)(struct EventRecord *event);
void ASAPI (*SetModalEventProc)(ADMModalEventProc modalEventProc);
ADMModalEventProc ASAPI (*GetModalEventProc)();
void ASAPI (*ActivateWindows)(ASBoolean activate);
}
ADMMacHostSuite1;
typedef struct ADMMacHostSuite2
{
ASBoolean ASAPI (*HandleADMEvent)(struct EventRecord *event);
void ASAPI (*SetModalEventProc)(ADMModalEventProc modalEventProc);
ADMModalEventProc ASAPI (*GetModalEventProc)();
void ASAPI (*ActivateWindows)(ASBoolean activate);
void ASAPI (*SetWindowActivateProc)(ADMWindowActivateProc windowActivateProc);
ADMWindowActivateProc ASAPI (*GetWindowActivateProc)();
}
ADMMacHostSuite2;
typedef ADMMacHostSuite2 ADMMacHostSuite; // The current version: kADMMacHostSuiteVersion2
#endif
#ifdef WIN_ENV
#define kADMWinHostSuite "ADM Win Host Suite"
#define kADMWinHostSuiteVersion1 1
#define kADMWinHostSuiteVersion2 2
#define kADMWinHostSuiteVersion kADMWinHostSuiteVersion2 // The current version
typedef ASErr ASAPI (*ADMModalMessageProc)(unsigned int message, unsigned int wParam, long lParam); // SPAM : added by jojanen
/*
* Suite
*/
typedef struct ADMWinHostSuite1
{
ASBoolean ASAPI (*HandleADMMessage)(ASWindowRef frameWnd, unsigned int message, unsigned int wParam, long lParam);
ASWindowRef ASAPI (*GetCurrentOwnerWindow)();
ASBoolean ASAPI (*IsADMMessage)(struct tagMSG *message);
}
ADMWinHostSuite1;
typedef struct ADMWinHostSuite2
{
ASBoolean ASAPI (*HandleADMMessage)(ASWindowRef frameWnd, unsigned int message, unsigned int wParam, long lParam);
ASWindowRef ASAPI (*GetCurrentOwnerWindow)();
ASBoolean ASAPI (*IsADMMessage)(struct tagMSG *message);
ASWindowRef ASAPI (*GetPlatformAppWindow)();
void ASAPI (*SetPlatformAppWindow) (ASWindowRef appWindow);
ADMModalMessageProc ASAPI (*GetModalMessageProc)(); // SPAM : added by jojanen
void ASAPI (*SetModalMessageProc)(ADMModalMessageProc modalMessageProc); // SPAM : added by jojanen
}
ADMWinHostSuite2;
typedef ADMWinHostSuite2 ADMWinHostSuite; // The current version: kADMWinHostSuiteVersion2
#endif
#pragma PRAGMA_IMPORT_END
#pragma PRAGMA_ALIGN_END
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,100 @@
/*
* Name:
* ADMHostInit.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* ADM Host Init Suite
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.4 8/7/1997 MF Fourth version.
* Created by Matt Foster.
*/
#ifndef __ADMHostInit__
#define __ADMHostInit__
/* The host of ADM provides this suite for ADM to use at initialization.
These values can also be set/reset later if desired using the ADM Host suites. */
#ifndef __ADMHost__
#include "ADMHost.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#pragma PRAGMA_ALIGN_BEGIN
#pragma PRAGMA_IMPORT_BEGIN
/*
* Constants
*/
#define kADMHostInitSuite "ADM Host Init Suite"
#define kADMHostInitSuiteVersion1 1
#define kADMHostInitSuiteVersion kADMHostInitSuiteVersion1 // The current version
/* Host Options */
#define kADMEnableFloatingPalettes (1L<<0) // 1 by default, palettes are enabled and
// ADM is always in memory. Disabling palettes
// allows only modal operations and ADM can be unloaded
#define kADMUseFrontWindowAsAppWindow (1L<<1) // 1 by default, Windows only.
// if app window is undefined, ADM will use whatever
// window is frontmost at startup as the parent for
// all windows. if 0, the host must set the app window
#define kADMUseMinMaxOnBadValue (1L<<2) // 0 by default, when a entered value exceeds its min
// or max, it resets the last good value. If this
// option is set, it sets the value to the min or max
#define kADMUseMacGSAppearance (1L<<3) // 0 by default. if 1 and Mac OS 8 is running, dialogs
// will have the platinum look, else lighter grey look
/*
* Most suites must be fully initialized. Since this suite is intended to be
* used by ADM to communicate with the host to obtain overrides to its defaults,
* any of these function pointers can be NULL and ADM will simply use the default
* behavior until it is changed later. The exception to this is the UI resource
* directory on windows and the host options. The are checked once at startup
* and never again.
*/
typedef struct ADMHostInitSuite1
{
void ASAPI (*GetADMHostAppContextProcs)(ADMHostAppContextProcs *appContextProcs);
void ASAPI (*GetADMHostAppName)(char *hostName, short length);
void ASAPI (*GetADMResourceAccessProcs)(ADMResourceAccessProcs *resProcs);
void ASAPI (*GetADMHostOptions)(long *options);
void ASAPI (*GetHostModifyPaletteLayoutBoundsProc)(ModifyPaletteLayoutBoundsProc *proc);
#ifdef MAC_ENV
ADMWindowActivateProc ASAPI (*GetWindowActivateProc)();
void ASAPI (*GetModalEventProc)(ADMModalEventProc *modalEventProc);
#endif
#ifdef WIN_ENV
ASWindowRef ASAPI (*GetAppWindow)();
void ASAPI (*GetUIResourceDirectory)(SPPlatformFileSpecification* resDir); // default is 'System'
#endif
}
ADMHostInitSuite1;
typedef ADMHostInitSuite1 ADMHostInitSuite;
#pragma PRAGMA_IMPORT_END
#pragma PRAGMA_ALIGN_END
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,97 @@
/*
* Name:
* ADMIcon.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Adobe Standard Enviornment Configuration
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 8/1/1996 DL First version.
* Created by Dave Lazarony.
*/
#ifndef __ADMIcon__
#define __ADMIcon__
/*
* Includes
*/
#ifndef __ADMTypes__
#include "ADMTypes.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#pragma PRAGMA_ALIGN_BEGIN
#pragma PRAGMA_IMPORT_BEGIN
// Problematic Macintosh Headers #define GetItem.
#ifdef GetItem
#undef GetItem
#endif
/*
* Constants
*/
#define kADMIconSuite "ADM Icon Suite"
#define kADMIconSuiteVersion1 1
#define kADMIconSuiteVersion kADMIconSuiteVersion1
typedef enum {
// Mac types
kCICN, kPICT, kIconSuite,
// Windows types
kWinIcon, kBMP,
// Either type
kUnknown
} ADMIconType;
/*
* Icon Suite
*/
typedef struct ADMIconSuite1
{
ADMIconRef ASAPI (*GetFromResource)(SPPluginRef pluginRef, int iconID, int iconIndex);
ADMIconRef ASAPI (*Create)(ADMIconType type, int width, int height, void *data);
void ASAPI (*Destroy)(ADMIconRef icon);
ADMIconType ASAPI (*GetType)(ADMIconRef icon);
int ASAPI (*GetWidth)(ADMIconRef icon);
int ASAPI (*GetHeight)(ADMIconRef icon);
ASAPI void * (*GetData)(ADMIconRef icon);
ASBoolean ASAPI (*IsFromResource)(ADMIconRef icon);
} ADMIconSuite1;
typedef ADMIconSuite1 ADMIconSuite;
#pragma PRAGMA_IMPORT_END
#pragma PRAGMA_ALIGN_END
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,101 @@
/*
* Name:
* ADMImage.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* ADM Image Suite.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.1 11/20/1996 DL Second version.
* Created by Dave Lazarony.
*/
#ifndef __ADMImage__
#define __ADMImage__
/*
* Includes
*/
#ifndef __ADMTypes__
#include "ADMTypes.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#pragma PRAGMA_ALIGN_BEGIN
#pragma PRAGMA_IMPORT_BEGIN
// Problematic Macintosh Headers #define GetItem.
#ifdef GetItem
#undef GetItem
#endif
/*
* Constants
*/
#define kADMImageSuite "ADM Image Suite"
#define kADMImageSuiteVersion1 1
#define kADMImageSuiteVersion kADMImageSuiteVersion1
/*
* ADMImage Suite
*/
typedef struct ADMImageSuite1
{
ADMImageRef ASAPI (*Create)(int width, int height);
void ASAPI (*Destroy)(ADMImageRef image);
int ASAPI (*GetWidth)(ADMImageRef image);
int ASAPI (*GetHeight)(ADMImageRef image);
int ASAPI (*GetByteWidth)(ADMImageRef image);
int ASAPI (*GetBitsPerPixel)(ADMImageRef image);
ASBytePtr ASAPI (*BeginBaseAddressAccess)(ADMImageRef image);
void ASAPI (*EndBaseAddressAccess)(ADMImageRef image);
ADMDrawerRef ASAPI (*BeginADMDrawer)(ADMImageRef image);
void ASAPI (*EndADMDrawer)(ADMImageRef image);
void ASAPI (*BeginAGMImageAccess)(ADMImageRef image, struct _t_AGMImageRecord *imageRecord);
void ASAPI (*EndAGMImageAccess)(ADMImageRef image);
ASErr ASAPI (*GetPixel)(ADMImageRef image, ASPoint *point, ASRGBColor *color);
ASErr ASAPI (*SetPixel)(ADMImageRef image, ASPoint *point, ASRGBColor *color);
ADMImageRef ASAPI (*CreateBitmap)(int width, int height);
ADMImageRef ASAPI (*CreateOffscreen)(int width, int height);
} ADMImageSuite1;
typedef ADMImageSuite1 ADMImageSuite; // The current version
#pragma PRAGMA_IMPORT_END
#pragma PRAGMA_ALIGN_END
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,472 @@
/*
* Name:
* ADM Item Suite.
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* ADM Item Suite.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.2 3/10/1996 DL Second version.
* Created by Dave Lazarony.
*/
#ifndef __ADMItem__
#define __ADMItem__
/*
* Includes
*/
#ifndef __ADMTypes__
#include "ADMTypes.h"
#endif
#ifndef __ADMTracker__
#include "ADMTracker.h"
#endif
#ifndef __ASHelp__
#include "ASHelp.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#pragma PRAGMA_ALIGN_BEGIN
#pragma PRAGMA_IMPORT_BEGIN
// Problematic Macintosh Headers #define GetItem.
#ifdef GetItem
#undef GetItem
#endif
/*
* Constants
*/
#define kADMItemSuite "ADM Item Suite"
#define kADMItemSuiteVersion3 3
#define kADMItemSuiteVersion4 4
#define kADMItemSuiteVersion kADMItemSuiteVersion4
/*
* Item Types
*/
#define kADMFrameType "ADM Frame Type"
#define kADMListBoxType "ADM List Box Type"
#define kADMHierarchyListBoxType "ADM Hierarchy List Box Type"
#define kADMPictureCheckBoxType "ADM Picture Check Box Button Type"
#define kADMPicturePushButtonType "ADM Picture Push Button Type"
#define kADMPictureRadioButtonType "ADM Picture Radio Button Type"
#define kADMPictureStaticType "ADM Picture Static Type"
#define kADMPopupListType "ADM Popup List Type"
#define kADMPopupMenuType "ADM Popup Menu Type"
#define kADMResizeType "ADM Resize Type"
#define kADMScrollbarType "ADM Scrollbar Type"
#define kADMScrollingPopupListType "ADM Scrolling Popup List Type"
#define kADMSliderType "ADM Slider Type"
#define kADMSpinEditType "ADM Spin Edit Type"
#define kADMSpinEditPopupType "ADM Spin Edit Popup Type"
#define kADMSpinEditScrollingPopupType "ADM Spin Edit Scrolling Popup Type"
#define kADMTextCheckBoxType "ADM Text Check Box Type"
#define kADMTextEditType "ADM Text Edit Type"
#define kADMTextEditMultiLineType "ADM Text Edit Multi Line Type"
#define kADMTextEditPopupType "ADM Text Edit Popup Type"
#define kADMTextEditScrollingPopupType "ADM Text Edit Scrolling Popup Type"
#define kADMTextPushButtonType "ADM Text Push Button Type"
#define kADMTextRadioButtonType "ADM Text Radio Button Type"
#define kADMTextStaticType "ADM Text Static Type"
#define kADMTextStaticMultiLineType "ADM Text Static Multi Line Type"
#define kADMUserType "ADM User Type"
typedef char *ADMItemType;
/*
* Item Styles
*/
typedef int ADMItemStyle;
typedef enum
{
kADMBlackFrameStyle = 0,
kADMGrayFrameStyle = 1,
kADMSunkenFrameStyle = 2,
kADMRaisedFrameStyle = 3,
kADMEtchedFrameStyle = 4,
kADMDummyFrameStyle = 0xFFFFFFFF
}
ADMFrameStyle;
typedef enum
{
kADMBlackAndSunkenRectPictureButtonStyle = 0,
kADMBlackRectPictureButtonStyle = 1,
kADMDummyPictureButtonStyle = 0xFFFFFFFF
}
ADMPictureButtonStyle;
/* Picture Static styles */
#define kADMDisableAutoActivatePictureStaticStyle (1L << 1)
/* List box styles */
#define kADMMultiSelectListBoxStyle (1L << 0)
#define kADMDividedListBoxStyle (1L << 1)
#define kADMTileListBoxStyle (1L << 2)
#define kADMEntryAlwaysSelectedListBoxStyle (1L << 3)
#define kADMBlackRectListBoxStyle (1L << 4)
#define kADMUseImageListBoxStyle (1L << 5)
typedef enum
{
kADMRightPopupMenuStyle = 0,
kADMBottomPopupMenuStyle = 1,
kADMDummyPopupMenuStyle = 0xFFFFFFFF
}
ADMPopupMenuStyle;
typedef enum
{
kADMVerticalSpinEditStyle = 0,
kADMHorizontalSpinEditStyle = 1,
kADMDummySpinEditStyle = 0xFFFFFFFF
}
ADMSpinEditStyle;
typedef enum
{
kADMVerticalSpinEditPopupStyle = 0,
kADMHorizontalSpinEditPopupStyle = 4,
kADMDummySpinEditPopupStyle = 0xFFFFFFFF
}
ADMSpinEditPopupStyle;
typedef enum
{
kADMSingleLineTextEditStyle = 0,
kADMNumericTextEditStyle = 2,
kADMDummyTextEditStyle = 0xFFFFFFFF
}
ADMTextEditStyle;
/* Text Static styles */
#define kADMClippedTextStaticStyle (1L << 0)
#define kADMDisableAutoActivateTextStaticStyle (1L << 1)
#define kADMTruncateEndTextStaticStyle (1L << 2) // clipped style has priority
#define kADMTruncateMiddleTextStaticStyle (1L << 3) // truncate end has priority
typedef enum
{
kADMSingleLineEditPopupStyle = 0,
kADMNumericEditPopupStyle = 2,
kADMExclusiveEditPopupStyle = 5,
kADMDummyTextEditPopupStyle = 0xFFFFFFFF
}
ADMTextEditPopupStyle;
/* Must set this style on all buttons in the radio group */
typedef enum
{
kADMRadioButtonOneAlwaysSetStyle = 0,
kADMRadioButtonAllowNoneSetStyle = 1,
kADMDummyRadioButtonStyle = 0xFFFFFFFF
}
ADMRadioButtonStyle;
/*
* Child Item IDs
*/
typedef enum
{
kADMListBoxScrollbarChildID = 1,
kADMListBoxListChildID = 2,
kADMListBoxDummyChildID = 0xFFFFFFFF
}
ADMListBoxChildID;
typedef enum
{
kADMSpinEditUpButtonChildID = 1,
kADMSpinEditDownButtonChildID = 2,
kADMSpinEditTextEditChildID = 3,
kADMSpinEditDummyChildID = 0xFFFFFFFF
}
ADMSpinEditChildID;
typedef enum
{
kADMSpinEditPopupUpButtonChildID = 1,
kADMSpinEditPopupDownButtonChildID = 2,
kADMSpinEditPopupTextEditChildID = 3,
kADMSpinEditPopupPopupChildID = 4,
kADMSpinEditPopupDummyChildID = 0xFFFFFFFF
}
ADMSpinEditPopupChildID;
typedef enum
{
kADMTextEditPopupTextEditChildID = 3,
kADMTextEditPopupPopupChildID = 4,
kADMTextEditPopupDummyChildID = 0xFFFFFFFF
}
ADMTextEditPopupChildID;
typedef ASErr ASAPI (*ADMItemInitProc)(ADMItemRef item);
typedef void ASAPI (*ADMItemDrawProc)(ADMItemRef item, ADMDrawerRef drawer);
typedef ASBoolean ASAPI (*ADMItemTrackProc)(ADMItemRef item, ADMTrackerRef tracker);
typedef void ASAPI (*ADMItemNotifyProc)(ADMItemRef item, ADMNotifierRef notifier);
typedef void ASAPI (*ADMItemDestroyProc)(ADMItemRef item);
typedef ASBoolean ASAPI (*ADMItemTimerProc)(ADMItemRef item, ADMTimerRef timer);
typedef void ASAPI (*ADMItemTimerAbortProc)(ADMItemRef item, ADMTimerRef timer, ADMAction abortAction);
typedef ASBoolean ASAPI (*ADMItemFloatToTextProc)(ADMItemRef item, float value, char *text, int textLength);
typedef ASBoolean ASAPI (*ADMItemTextToFloatProc)(ADMItemRef item, char *text, float *value);
/*
* Item Suite
*/
typedef struct ADMItemSuite4
{
ADMItemRef ASAPI (*Create)(ADMDialogRef dialog, int itemID, ADMItemType itemType, ASRect *boundsRect, ADMItemInitProc initProc, ADMUserData data);
void ASAPI (*Destroy)(ADMItemRef item);
void ASAPI (*SetDrawProc)(ADMItemRef item, ADMItemDrawProc drawProc);
ADMItemDrawProc ASAPI (*GetDrawProc)(ADMItemRef item);
void ASAPI (*DefaultDraw)(ADMItemRef item, ADMDrawerRef drawer);
void ASAPI (*SetTrackProc)(ADMItemRef item, ADMItemTrackProc trackProc);
ADMItemTrackProc ASAPI (*GetTrackProc)(ADMItemRef item);
ASBoolean ASAPI (*DefaultTrack)(ADMItemRef item, ADMTrackerRef tracker);
void ASAPI (*SetMask)(ADMItemRef item, ADMActionMask mask);
ADMActionMask ASAPI (*GetMask)(ADMItemRef item);
void ASAPI (*SetNotifyProc)(ADMItemRef item, ADMItemNotifyProc notifyProc);
ADMItemNotifyProc ASAPI (*GetNotifyProc)(ADMItemRef item);
void ASAPI (*DefaultNotify)(ADMItemRef item, ADMNotifierRef notifier);
void ASAPI (*SendNotify)(ADMItemRef item, char *notifierType);
void ASAPI (*SetNotifierData)(ADMItemRef item, ADMUserData data);
ADMUserData ASAPI (*GetNotifierData)(ADMItemRef item);
void ASAPI (*SetDestroyProc)(ADMItemRef item, ADMItemDestroyProc destroyProc);
ADMItemDestroyProc ASAPI (*GetDestroyProc)(ADMItemRef item);
ADMTimerRef ASAPI (*CreateTimer)(ADMItemRef item, unsigned long milliseconds,
ADMActionMask abortMask,
ADMItemTimerProc timerProc,
ADMItemTimerAbortProc abortProc);
void ASAPI (*AbortTimer)(ADMItemRef item, ADMTimerRef timer);
void ASAPI (*SetUserData)(ADMItemRef item, ADMUserData data);
ADMUserData ASAPI (*GetUserData)(ADMItemRef item);
int ASAPI (*GetID)(ADMItemRef item);
ADMDialogRef ASAPI (*GetDialog)(ADMItemRef item);
ASWindowRef ASAPI (*GetWindowRef)(ADMItemRef item);
ADMListRef ASAPI (*GetList)(ADMItemRef item);
ADMItemRef ASAPI (*GetChildItem)(ADMItemRef item, int childID);
void ASAPI (*SetPluginRef)(ADMItemRef item, SPPluginRef pluginRef);
SPPluginRef ASAPI (*GetPluginRef)(ADMItemRef item);
void ASAPI (*SetItemType)(ADMItemRef item, ADMItemType type);
ADMItemType ASAPI (*GetItemType)(ADMItemRef item);
void ASAPI (*SetItemStyle)(ADMItemRef item, ADMItemStyle style);
ADMItemStyle ASAPI (*GetItemStyle)(ADMItemRef item);
void ASAPI (*Show)(ADMItemRef item, ASBoolean show);
ASBoolean ASAPI (*IsVisible)(ADMItemRef item);
void ASAPI (*Enable)(ADMItemRef item, ASBoolean enable);
ASBoolean ASAPI (*IsEnabled)(ADMItemRef item);
void ASAPI (*Activate)(ADMItemRef item, ASBoolean activate);
ASBoolean ASAPI (*IsActive)(ADMItemRef item);
void ASAPI (*Known)(ADMItemRef item, ASBoolean known);
ASBoolean ASAPI (*IsKnown)(ADMItemRef item);
void ASAPI (*SetLocalRect)(ADMItemRef item, ASRect *localRect);
void ASAPI (*GetLocalRect)(ADMItemRef item, ASRect *localRect);
void ASAPI (*SetBoundsRect)(ADMItemRef item, ASRect *boundsRect);
void ASAPI (*GetBoundsRect)(ADMItemRef item, ASRect *boundsRect);
void ASAPI (*GetBestSize)(ADMItemRef item, ASPoint *size);
void ASAPI (*Move)(ADMItemRef item, int x, int y);
void ASAPI (*Size)(ADMItemRef item, int width, int height);
void ASAPI (*LocalToScreenPoint)(ADMItemRef item, ASPoint *point);
void ASAPI (*ScreenToLocalPoint)(ADMItemRef item, ASPoint *point);
void ASAPI (*LocalToScreenRect)(ADMItemRef item, ASRect *rect);
void ASAPI (*ScreenToLocalRect)(ADMItemRef item, ASRect *rect);
void ASAPI (*Invalidate)(ADMItemRef item);
void ASAPI (*InvalidateRect)(ADMItemRef dialog, ASRect *invalRect);
void ASAPI (*Update)(ADMItemRef item);
ASBoolean ASAPI (*SetCursorID)(ADMItemRef item, SPPluginRef pluginRef, int cursorID);
void ASAPI (*GetCursorID)(ADMItemRef item, SPPluginRef *pluginRef, int *cursorID);
void ASAPI (*SetPictureID)(ADMItemRef item, int pictureResID);
int ASAPI (*GetPictureID)(ADMItemRef item);
void ASAPI (*SetSelectedPictureID)(ADMItemRef item, int pictureResID);
int ASAPI (*GetSelectedPictureID)(ADMItemRef item);
void ASAPI (*SetDisabledPictureID)(ADMItemRef item, int pictureResID);
int ASAPI (*GetDisabledPictureID)(ADMItemRef item);
/*
* ToolTip
*/
void ASAPI (*SetTipString)(ADMItemRef item, char *tipStr);
void ASAPI (*GetTipString)(ADMItemRef item, char *tipStr, int maxLen);
int ASAPI (*GetTipStringLength)(ADMItemRef item);
void ASAPI (*EnableTip)(ADMItemRef item, ASBoolean enable);
ASBoolean ASAPI (*IsTipEnabled)(ADMItemRef item);
void ASAPI (*ShowToolTip)(ADMItemRef item, ASPoint *where);
void ASAPI (*HideToolTip)(ADMItemRef item);
/*
* Text
*/
void ASAPI (*SetFont)(ADMItemRef item, ADMFont font);
ADMFont ASAPI (*GetFont)(ADMItemRef item);
void ASAPI (*SetText)(ADMItemRef item, char *text);
void ASAPI (*GetText)(ADMItemRef item, char *text, int maxLen);
int ASAPI (*GetTextLength)(ADMItemRef item);
void ASAPI (*SetMaxTextLength)(ADMItemRef item, int length);
int ASAPI (*GetMaxTextLength)(ADMItemRef item);
void ASAPI (*SelectAll)(ADMItemRef item);
void ASAPI (*SetSelectionRange)(ADMItemRef item, int selStart, int selEnd);
void ASAPI (*GetSelectionRange)(ADMItemRef item, int *selStart, int *selEnd);
void ASAPI (*SetJustify)(ADMItemRef item, ADMJustify justify);
ADMJustify ASAPI (*GetJustify)(ADMItemRef item);
void ASAPI (*SetUnits)(ADMItemRef item, ADMUnits units);
ADMUnits ASAPI (*GetUnits)(ADMItemRef item);
/*
* Numerics
*/
void ASAPI (*SetPrecision)(ADMItemRef item, int numberOfDecimalPlaces);
int ASAPI (*GetPrecision)(ADMItemRef item);
void ASAPI (*SetBooleanValue)(ADMItemRef item, ASBoolean value);
ASBoolean ASAPI (*GetBooleanValue)(ADMItemRef item);
void ASAPI (*SetIntValue)(ADMItemRef item, int value);
int ASAPI (*GetIntValue)(ADMItemRef item);
void ASAPI (*SetFixedValue)(ADMItemRef item, ASFixed value);
ASFixed ASAPI (*GetFixedValue)(ADMItemRef item);
void ASAPI (*SetFloatValue)(ADMItemRef item, float value);
float ASAPI (*GetFloatValue)(ADMItemRef item);
void ASAPI (*SetMinIntValue)(ADMItemRef item, int value);
int ASAPI (*GetMinIntValue)(ADMItemRef item);
void ASAPI (*SetMinFixedValue)(ADMItemRef item, ASFixed value);
ASFixed ASAPI (*GetMinFixedValue)(ADMItemRef item);
void ASAPI (*SetMaxIntValue)(ADMItemRef item, int value);
int ASAPI (*GetMaxIntValue)(ADMItemRef item);
void ASAPI (*SetMinFloatValue)(ADMItemRef item, float value);
float ASAPI (*GetMinFloatValue)(ADMItemRef item);
void ASAPI (*SetMaxFixedValue)(ADMItemRef item, ASFixed value);
ASFixed ASAPI (*GetMaxFixedValue)(ADMItemRef item);
void ASAPI (*SetMaxFloatValue)(ADMItemRef item, float value);
float ASAPI (*GetMaxFloatValue)(ADMItemRef item);
void ASAPI (*SetSmallIncrement)(ADMItemRef item, float increment);
float ASAPI (*GetSmallIncrement)(ADMItemRef item);
void ASAPI (*SetLargeIncrement)(ADMItemRef item, float increment);
float ASAPI (*GetLargeIncrement)(ADMItemRef item);
void ASAPI (*SetAllowUnits)(ADMItemRef item, ASBoolean allow);
ASBoolean ASAPI (*GetAllowUnits)(ADMItemRef item);
void ASAPI (*SetAllowMath)(ADMItemRef item, ASBoolean allow);
ASBoolean ASAPI (*GetAllowMath)(ADMItemRef item);
void ASAPI (*SetFloatToTextProc)(ADMItemRef item, ADMItemFloatToTextProc proc);
ADMItemFloatToTextProc ASAPI (*GetFloatToTextProc)(ADMItemRef item);
ASBoolean ASAPI (*DefaultFloatToText)(ADMItemRef item, float value, char *text, int textLength);
void ASAPI (*SetTextToFloatProc)(ADMItemRef item, ADMItemTextToFloatProc proc);
ADMItemTextToFloatProc ASAPI (*GetTextToFloatProc)(ADMItemRef item);
ASBoolean ASAPI (*DefaultTextToFloat)(ADMItemRef item, char *text, float *value);
void ASAPI (*ShowUnits)(ADMItemRef item, ASBoolean show);
ASBoolean ASAPI (*GetShowUnits)(ADMItemRef item);
ASBoolean ASAPI (*WasPercentageChange)(ADMItemRef item);
// Help
void ASAPI (*SetHelpID)(ADMItemRef item, ASHelpID helpID);
ASHelpID ASAPI (*GetHelpID)(ADMItemRef item);
void ASAPI (*Help)(ADMItemRef dialog);
// New Item type support
ADMHierarchyListRef ASAPI (*GetHierarchyList)(ADMItemRef item);
} ADMItemSuite4; // kADMItemSuiteVersion4
typedef ADMItemSuite4 ADMItemSuite; // The current version
#pragma PRAGMA_IMPORT_END
#pragma PRAGMA_ALIGN_END
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,145 @@
/*
* Name:
* ADMList.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* ADM List Suite.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.2 5/7/1996 DL Second version.
* Created by Dave Lazarony.
*/
#ifndef __ADMList__
#define __ADMList__
/*
* Includes
*/
#ifndef __ADMTypes__
#include "ADMTypes.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#pragma PRAGMA_ALIGN_BEGIN
#pragma PRAGMA_IMPORT_BEGIN
/*
* Constants
*/
#define kADMListSuite "ADM List Suite"
#define kADMListSuiteVersion1 1
#define kADMListSuiteVersion kADMListSuiteVersion1
/*
* Types
*/
/* ADMListRef and ADMEntryRef are declared in ADMTypes.h */
typedef ASErr ASAPI (*ADMEntryInitProc)(ADMEntryRef entry);
typedef void ASAPI (*ADMEntryDrawProc)(ADMEntryRef entry, ADMDrawerRef drawer);
typedef ASBoolean ASAPI (*ADMEntryTrackProc)(ADMEntryRef entry, ADMTrackerRef tracker);
typedef void ASAPI (*ADMEntryNotifyProc)(ADMEntryRef entry, ADMNotifierRef notifier);
typedef void ASAPI (*ADMEntryDestroyProc)(ADMEntryRef entry);
/*
* List Suite
*/
typedef struct ADMListSuite1
{
void ASAPI (*SetMenuID)(ADMListRef list, int menuResID);
int ASAPI (*GetMenuID)(ADMListRef list);
ADMItemRef ASAPI (*GetItem)(ADMListRef list);
void ASAPI (*SetUserData)(ADMListRef list, ADMUserData data);
ADMUserData ASAPI (*GetUserData)(ADMListRef list);
void ASAPI (*SetInitProc)(ADMListRef list, ADMEntryInitProc initProc);
ADMEntryInitProc ASAPI (*GetInitProc)(ADMListRef list);
void ASAPI (*SetDrawProc)(ADMListRef list, ADMEntryDrawProc drawProc);
ADMEntryDrawProc ASAPI (*GetDrawProc)(ADMListRef list);
void ASAPI (*SetTrackProc)(ADMListRef list, ADMEntryTrackProc trackProc);
ADMEntryTrackProc ASAPI (*GetTrackProc)(ADMListRef list);
void ASAPI (*SetNotifyProc)(ADMListRef list, ADMEntryNotifyProc notifyProc);
ADMEntryNotifyProc ASAPI (*GetNotifyProc)(ADMListRef list);
void ASAPI (*SetDestroyProc)(ADMListRef list, ADMEntryDestroyProc destroyProc);
ADMEntryDestroyProc ASAPI (*GetDestroyProc)(ADMListRef list);
void ASAPI (*SetEntryWidth)(ADMListRef list, int width);
int ASAPI (*GetEntryWidth)(ADMListRef list);
void ASAPI (*SetEntryHeight)(ADMListRef list, int height);
int ASAPI (*GetEntryHeight)(ADMListRef list);
void ASAPI (*SetEntryTextRect)(ADMListRef list, ASRect *rect);
void ASAPI (*GetEntryTextRect)(ADMListRef list, ASRect *rect);
ADMEntryRef ASAPI (*InsertEntry)(ADMListRef list, int index);
void ASAPI (*RemoveEntry)(ADMListRef list, int index);
ADMEntryRef ASAPI (*GetEntry)(ADMListRef list, int entryID);
ADMEntryRef ASAPI (*IndexEntry)(ADMListRef list, int index);
ADMEntryRef ASAPI (*FindEntry)(ADMListRef list, char *text);
ADMEntryRef ASAPI (*PickEntry)(ADMListRef list, ASPoint *point);
ADMEntryRef ASAPI (*GetActiveEntry)(ADMListRef list);
ADMEntryRef ASAPI (*IndexSelectedEntry)(ADMListRef list, int selectionIndex);
int ASAPI (*NumberOfEntries)(ADMListRef list);
int ASAPI (*NumberOfSelectedEntries)(ADMListRef list);
// Move up to after Tracker procedures FIX_ME pja
void ASAPI (*SetMask)(ADMListRef entry, ADMActionMask mask);
ADMActionMask ASAPI (*GetMask)(ADMListRef entry);
// Move up to after Notifier procedures FIX_ME pja
void ASAPI (*SetNotifierData)(ADMListRef entry, ADMUserData data);
ADMUserData ASAPI (*GetNotifierData)(ADMListRef entry);
} ADMListSuite1;
typedef ADMListSuite1 ADMListSuite;
#pragma PRAGMA_IMPORT_END
#pragma PRAGMA_ALIGN_END
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,177 @@
/*
* Name:
* ADMListEntry.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Adobe Standard Enviornment Configuration
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.1 10/17/97 WH Second version.
* Created by Wei Huang.
*/
#ifndef __ADMListEntry__
#define __ADMListEntry__
/*
* Includes
*/
#ifndef __ADMTypes__
#include "ADMTypes.h"
#endif
#ifndef __ADMTracker__
#include "ADMTracker.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#pragma PRAGMA_ALIGN_BEGIN
#pragma PRAGMA_IMPORT_BEGIN
// Problematic Macintosh Headers #define GetItem.
#ifdef GetItem
#undef GetItem
#endif
/*
* Constants
*/
#define kADMListEntrySuite "ADM List Entry Suite"
#define kADMListEntrySuiteVersion 1
typedef ASBoolean ASAPI (*ADMListEntryTimerProc)(ADMListEntryRef entry, ADMTimerRef timer);
typedef void ASAPI (*ADMListEntryTimerAbortProc)(ADMListEntryRef entry, ADMTimerRef timer, ADMAction abortAction);
/*
* Entry Suite
*/
typedef struct ADMListEntrySuite
{
ADMListEntryRef ASAPI (*Create)(ADMHierarchyListRef list);
void ASAPI (*Destroy)(ADMListEntryRef entry);
int ASAPI (*GetIndex)(ADMListEntryRef entry);
ADMItemRef ASAPI (*GetItem)(ADMListEntryRef entry);
ADMHierarchyListRef ASAPI (*GetList)(ADMListEntryRef entry);
ADMHierarchyListRef ASAPI (*GetChildList)(ADMListEntryRef entry);
ADMHierarchyListRef ASAPI (*CreateChildList)(ADMListEntryRef entry);
void ASAPI (*DeleteChildList)(ADMListEntryRef entry);
void ASAPI (*ExpandHierarchy)(ADMListEntryRef entry, ASBoolean flag);
ASBoolean ASAPI (*IsHierarchyExpanded)(ADMListEntryRef entry);
void ASAPI (*HideEntryName)(ADMListEntryRef entry, ASBoolean flag);
ASBoolean ASAPI (*IsEntryNameHidden)(ADMListEntryRef entry);
void ASAPI (*EnableChildSelection)(ADMListEntryRef entry, ASBoolean flag);
ASBoolean ASAPI (*IsChildSelectable)(ADMListEntryRef entry);
int ASAPI (*GetHierarchyDepth)(ADMListEntryRef entry);
int ASAPI (*GetVisualHierarchyDepth)(ADMListEntryRef entry);
void ASAPI (*SetID)(ADMListEntryRef entry, int entryID);
int ASAPI (*GetID)(ADMListEntryRef entry);
void ASAPI (*SetUserData)(ADMListEntryRef entry, ADMUserData data);
ADMUserData ASAPI (*GetUserData)(ADMListEntryRef entry);
void ASAPI (*DefaultDraw)(ADMListEntryRef entry, ADMDrawerRef drawer);
ASBoolean ASAPI (*DefaultTrack)(ADMListEntryRef entry, ADMTrackerRef tracker);
void ASAPI (*DefaultNotify)(ADMListEntryRef entry, ADMNotifierRef notifier);
void ASAPI (*SendNotify)(ADMListEntryRef entry, char *notifierType);
void ASAPI (*Select)(ADMListEntryRef entry, ASBoolean select);
ASBoolean ASAPI (*IsSelected)(ADMListEntryRef entry);
ASBoolean ASAPI (*IsChildrenSelected)(ADMListEntryRef entry);
void ASAPI (*Enable)(ADMListEntryRef entry, ASBoolean enable);
ASBoolean ASAPI (*IsEnabled)(ADMListEntryRef entry);
void ASAPI (*Activate)(ADMListEntryRef entry, ASBoolean activate);
ASBoolean ASAPI (*IsActive)(ADMListEntryRef entry);
void ASAPI (*Check)(ADMListEntryRef entry, ASBoolean check);
ASBoolean ASAPI (*IsChecked)(ADMListEntryRef entry);
void ASAPI (*MakeSeparator)(ADMListEntryRef entry, ASBoolean separator);
ASBoolean ASAPI (*IsSeparator)(ADMListEntryRef entry);
void ASAPI (*GetLocalRect)(ADMListEntryRef entry, ASRect *localRect);
void ASAPI (*GetBoundsRect)(ADMListEntryRef entry, ASRect *boundsRect);
void ASAPI (*LocalToScreenPoint)(ADMListEntryRef entry, ASPoint *point);
void ASAPI (*ScreenToLocalPoint)(ADMListEntryRef entry, ASPoint *point);
void ASAPI (*LocalToScreenRect)(ADMListEntryRef entry, ASRect *rect);
void ASAPI (*ScreenToLocalRect)(ADMListEntryRef entry, ASRect *rect);
void ASAPI (*Invalidate)(ADMListEntryRef entry);
void ASAPI (*Update)(ADMListEntryRef entry);
void ASAPI (*SetPictureID)(ADMListEntryRef entry, int pictureResID);
int ASAPI (*GetPictureID)(ADMListEntryRef entry);
void ASAPI (*SetSelectedPictureID)(ADMListEntryRef entry, int pictureResID);
int ASAPI (*GetSelectedPictureID)(ADMListEntryRef entry);
void ASAPI (*SetDisabledPictureID)(ADMListEntryRef entry, int pictureResID);
int ASAPI (*GetDisabledPictureID)(ADMListEntryRef entry);
void ASAPI (*SetText)(ADMListEntryRef entry, char *text);
void ASAPI (*GetText)(ADMListEntryRef entry, char *text, int maxLen);
int ASAPI (*GetTextLength)(ADMListEntryRef entry);
ADMTimerRef ASAPI (*CreateTimer)(ADMListEntryRef entry, unsigned long milliseconds,
ADMActionMask abortMask,
ADMListEntryTimerProc timerProc,
ADMListEntryTimerAbortProc abortProc);
void ASAPI (*AbortTimer)(ADMListEntryRef entry, ADMTimerRef timer);
/* Move up to after Select procedures FIX_ME 1/29 pja */
void ASAPI (*MakeInBounds)(ADMListEntryRef entry);
ASBoolean ASAPI (*IsInBounds)(ADMListEntryRef entry);
} ADMListEntrySuite;
#pragma PRAGMA_IMPORT_END
#pragma PRAGMA_ALIGN_END
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,124 @@
/*
* Name:
* ADMNotifier.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* ADM Notifier Suite.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.1 3/27/1996 DL Second version.
* Created by Dave Lazarony.
*/
#ifndef __ADMNotifier__
#define __ADMNotifier__
/*
* Includes
*/
#ifndef __ADMTypes__
#include "ADMTypes.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#pragma PRAGMA_ALIGN_BEGIN
#pragma PRAGMA_IMPORT_BEGIN
// Problematic Macintosh Headers #define GetItem.
#ifdef GetItem
#undef GetItem
#endif
/*
* Constants
*/
#define kADMNotifierSuite "ADM Notifier Suite"
#define kADMNotifierSuiteVersion1 1
#define kADMNotifierSuiteVersion kADMNotifierSuiteVersion1
#define kADMNotifierSuiteVersion2 2
#define kADMUserChangedNotifier "ADM User Changed Notifier"
#define kADMIntermediateChangedNotifier "ADM Intermediate Changed Notifier"
#define kADMBoundsChangedNotifier "ADM Bounds Changed Notifier"
#define kADMEntryTextChangedNotifier "ADM Entry Text Changed Notifier"
#define kADMCloseHitNotifier "ADM Close Hit Notifier"
#define kADMZoomHitNotifier "ADM Zoom Hit Notifier"
#define kADMCycleNotifier "ADM Cycle Notifier"
#define kADMCollapseNotifier "ADM Collapse Notifier"
#define kADMExpandNotifier "ADM Expand Notifier"
#define kADMContextMenuChangedNotifier "ADM Context Menu Changed Notifier"
#define kADMWindowShowNotifier "ADM Show Window Notifier"
#define kADMWindowHideNotifier "ADM Hide Window Notifier"
#define kADMWindowActivateNotifier "ADM Activate Window Notifier"
#define kADMWindowDeactivateNotifier "ADM Deactivate Window Notifier"
#define kADMNumberOutOfBoundsNotifier "ADM Number Out Of Bounds Notifier"
// text item notifiers
#define kADMPreClipboardCutNotifier "ADM Pre Clipboard Cut Notifier"
#define kADMPostClipboardCutNotifier "ADM Post Clipboard Cut Notifier"
#define kADMPreClipboardCopyNotifier "ADM Pre Clipboard Copy Notifier"
#define kADMPostClipboardCopyNotifier "ADM Post Clipboard Copy Notifier"
#define kADMPreClipboardPasteNotifier "ADM Pre Clipboard Paste Notifier"
#define kADMPostClipboardPasteNotifier "ADM Post Clipboard Paste Notifier"
#define kADMPreClipboardClearNotifier "ADM Pre Clipboard Clear Notifier"
#define kADMPostClipboardClearNotifier "ADM Post Clipboard Clear Notifier"
#define kADMPreTextSelectionChangedNotifier "ADM Pre Selection Change Notification"
#define kADMTextSelectionChangedNotifier "ADM Text Selection Change Notification"
/*
* Notifier Suite
*/
typedef struct ADMNotifierSuite1
{
ADMItemRef ASAPI (*GetItem)(ADMNotifierRef notifier);
ADMDialogRef ASAPI (*GetDialog)(ADMNotifierRef notifier);
ASBoolean ASAPI (*IsNotifierType)(ADMNotifierRef notifier, char *notifierType);
void ASAPI (*GetNotifierType)(ADMNotifierRef notifier, char *notifierType, int maxLen);
} ADMNotifierSuite1;
typedef ADMNotifierSuite1 ADMNotifierSuite; // original version
typedef struct ADMNotifierSuite2
{
ADMItemRef ASAPI (*GetItem)(ADMNotifierRef notifier);
ADMDialogRef ASAPI (*GetDialog)(ADMNotifierRef notifier);
ASBoolean ASAPI (*IsNotifierType)(ADMNotifierRef notifier, char *notifierType);
void ASAPI (*GetNotifierType)(ADMNotifierRef notifier, char *notifierType, int maxLen);
void ASAPI (*SkipNextClipboardOperation)(ADMNotifierRef notifier, ASBoolean skip);
} ADMNotifierSuite2;
#pragma PRAGMA_IMPORT_END
#pragma PRAGMA_ALIGN_END
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,72 @@
/*
* Name:
* ADMResource.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Adobe Dialog Manager Resources.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.1 5/12/1996 DL Second version.
* Created by Dave Lazarony.
*/
#ifndef __ADMResource__
#define __ADMResource__
/*
* ADM Picture IDs
*/
#define kADMAttentionPictureID -1000
#define kADMErrorPictureID -1001
#define kADMSliderPictureID -16000
#define kADMSliderSelectedPictureID -16001
#define kADMSliderDisabledPictureID -16002
#define kADMNewEntryPictureID -16010
#define kADMNewEntryDisabledPictureID -16012
#define kADMDeleteEntryPictureID -16020
#define kADMDeleteEntryDisabledPictureID -16022
#define kADMUpSpinArrowPictureID -16040
#define kADMUpSpinArrowDisabledPictureID -16042
#define kADMDownSpinArrowPictureID -16050
#define kADMDownSpinArrowDisabledPictureID -16052
#define kADMLeftSpinArrowPictureID -16060
#define kADMLeftSpinArrowDisabledPictureID -16062
#define kADMRightSpinArrowPictureID -16070
#define kADMRightSpinArrowDisabledPictureID -16072
#define kADMRightPopupArrowPictureID -16080
#define kADMRightPopupArrowDisabledPictureID -16082
#define kADMDownPopupArrowPictureID -16090
#define kADMDownPopupArrowDisabledPictureID -16092
/*
* ADM Cursor IDs
*/
#define kADMIBeamCursorID -1
#define kADMCrossCursorID -2
#define kADMWaitCursorID -3
#define kADMArrowCursorID -4
#define kADMCancelCursorID -5
#define kADMFingerCursorID -6
#define kADMFistCursorID -7
#define kADMFistPlusCursorID -8
#define kADMHostControlsCursorID -9
#define kADMSmallestCursorID kADMFistPlusCursorID
#define kADMLargestCursorID kADMIBeamCursorID
/*
* Or this flag with the dialog style of a Windows dialog resource and the dialog's
* units are read as Pixel Units instead of Dialog Units.
*/
#define kADMPixelUnitsDialogStyle 0x0020
#endif
@@ -0,0 +1,241 @@
/*
* Name:
* ADMTracker.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* ADM Tracker Suite.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.1 3/25/1996 DL Second version.
* Created by Dave Lazarony.
*/
#ifndef __ADMTracker__
#define __ADMTracker__
/*
* Includes
*/
#ifndef __ADMTypes__
#include "ADMTypes.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#pragma PRAGMA_ALIGN_BEGIN
#pragma PRAGMA_IMPORT_BEGIN
/*
* Constants
*/
#define kADMTrackerSuite "ADM Tracker Suite"
#define kADMTrackerSuiteVersion1 1
#define kADMTrackerSuiteVersion kADMTrackerSuiteVersion1
/*
* Types
*/
typedef enum {
kADMMouseNormal,
kADMMouseCaptured,
kADMMouseUncaptured
} ADMMouseState;
typedef unsigned long ADMTime;
/*
* ADM General Macintosh Specific Windows Specific
* ----------------------------------------- ----------------------------------------- ---------------------------------------------
*/
typedef enum
{
kADMMouseMoveAction = 1, // It is better to use the specific move down and up cases
kADMMouseMovedDownAction = 1,
kADMButtonDownAction = 2, kWinLeftButtonDownAction = 2,
kWinMiddleButtonDownAction = 3,
kWinRightButtonDownAction = 4,
kADMShiftKeyDownAction = 5,
kADMMenuKeyDownAction = 6, kMacCommandKeyDownAction = 6, kWinControlKeyDownAction = 6,
kADMModKeyDownAction = 7, kMacOptionKeyDownAction = 7, kWinAltKeyDownAction = 7,
kMacControlKeyDownAction = 8,
kADMSpaceKeyDownAction = 9,
kADMTabKeyDownAction = 10,
kADMEnterAction = 11,
kADMMouseMovedUpAction = -1,
kADMButtonUpAction = -2, kWinLeftButtonUpAction = -2,
kWinMiddleButtonUpAction = -3,
kWinRightButtonUpAction = -4,
kADMShiftKeyUpAction = -5,
kADMMenuKeyUpAction = -6, kMacCommandKeyUpAction = -6, kWinControlKeyUpAction = -6,
kADMModKeyUpAction = -7, kMacOptionKeyUpAction = -7, kWinAltKeyUpAction = -7,
kMacControlKeyUpAction = -8,
kADMSpaceKeyUpAction = -9,
kADMTabKeyUpAction = -10,
kADMLeaveAction = -11,
kADMUncapturedButtonUpAction= -12, kWinUncapturedLeftButtonUpAction = -12,
kWinUncapturedMiddleButtonUpAction = -13,
kWinUncapturedRightButtonUpAction = -14,
kADMKeyStrokeAction = -15,
kADMDummyAction = 0x8FFFFFFF
} ADMAction;
enum {
kADMNullMask = 0x00000000,
kADMUncapturedActionMask = 0x00000001,
kADMMouseMovedDownMask = 0x00000002,
kADMButtonDownMask = 0x00000004, kWinLeftButtonDownMask = 0x00000004,
kWinMiddleButtonDownMask = 0x00000008,
kWinRightButtonDownMask = 0x00000010,
kADMShiftKeyDownMask = 0x00000020,
kADMMenuKeyDownMask = 0x00000040, kMacCommandKeyDownMask = 0x00000040, kWinControlKeyDownMask = 0x00000040,
kADMModKeyDownMask = 0x00000080, kMacOptionKeyDownMask = 0x00000080, kWinAltKeyDownMask = 0x00000080,
kMacControlKeyDownMask = 0x00000100,
kADMSpaceKeyDownMask = 0x00000200,
kADMTabKeyDownMask = 0x00000400,
kADMEnterMask = 0x00000800,
kADMMouseMovedUpMask = 0x00020000,
kADMButtonUpMask = 0x00040000, kWinLeftButtonUpMask = 0x00040000,
kWinMiddleButtonUpMask = 0x00080000,
kWinRightButtonUpMask = 0x00100000,
kADMShiftKeyUpMask = 0x00200000,
kADMMenuKeyUpMask = 0x00400000, kMacCommandKeyUpMask = 0x00400000, kWinControlKeyUpMask = 0x00400000,
kADMModKeyUpMask = 0x00800000, kMacOptionKeyUpMask = 0x00800000, kWinAltKeyUpMask = 0x00800000,
kMacControlKeyUpMask = 0x01000000,
kADMSpaceKeyUpMask = 0x02000000,
kADMTabKeyUpMask = 0x04000000,
kADMLeaveMask = 0x08000000,
kADMUncapturedButtonUpMask = 0x10000000, /* Applies to all UncapturedButtonUpActions on Windows */
kADMKeyStrokeMask = 0x80000000
};
#define kADMAllActionsMask ((unsigned long) 0xFFFFFFFF)
typedef enum
{
kADMNullModifier = 0x00000000,
kADMButtonDownModifier = 0x00000004, kWinLeftButtonDownModifier = 0x00000004,
kWinMiddleButtonDownModifier = 0x00000008,
kWinRightButtonDownModifier = 0x00000010,
kADMShiftKeyDownModifier = 0x00000020,
kADMMenuKeyDownModifier = 0x00000040, kMacCommandKeyDownModifier = 0x00000040, kWinControlKeyDownModifier = 0x00000040,
kADMModKeyDownModifier = 0x00000080, kMacOptionKeyDownModifier = 0x00000080, kWinAltKeyDownModifier = 0x00000080,
kMacControlKeyDownModifier = 0x00000100,
kADMSpaceKeyDownModifier = 0x00000200,
kADMTabKeyDownModifier = 0x00000400,
kADMDoubleClickModifier = 0x00000800,
kADMCapsLockOnModifier = 0x00001000,
kADMDummyModifier = 0xFFFFFFFF
} ADMModifiers;
/*
* Virtual Keys
*/
enum {
kADMUnknownKey = 0x0000,
kADMCancelKey = 0x0001,
kADMEnterKey = 0x0003,
kADMHomeKey = 0x0004,
kADMEndKey = 0x0005,
kADMPageUpKey = 0x0006,
kADMPageDownKey = 0x0007,
kADMBackspaceKey = 0x0008,
kADMTabKey = 0x0009,
kADMInsertKey = 0x000A,
kADMReturnKey = 0x000D,
kADMF1Key = 0x000E,
kADMF2Key = 0x000F,
kADMF3Key = 0x0010,
kADMF4Key = 0x0011,
kADMF5Key = 0x0012,
kADMF6Key = 0x0013,
kADMF7Key = 0x0014,
kADMF8Key = 0x0015,
kADMF9Key = 0x0016,
kADMF10Key = 0x0017,
kADMF11Key = 0x0018,
kADMF12Key = 0x0019,
kADMClearKey = 0x001A,
kADMEscapeKey = 0x001B,
kADMLeftKey = 0x001C,
kADMRightKey = 0x001D,
kADMUpKey = 0x001E,
kADMDownKey = 0x001F,
kADMSpaceKey = 0x0020,
kADMDeleteKey = 0x007F,
kADMDummyKey = 0xFFFF
};
/*
* Tracker Suite
*/
typedef struct ADMTrackerSuite1
{
void ASAPI (*GetPoint)(ADMTrackerRef tracker, ASPoint *point);
ADMAction ASAPI (*GetAction)(ADMTrackerRef tracker);
ADMModifiers ASAPI (*GetModifiers)(ADMTrackerRef tracker);
ASBoolean ASAPI (*TestAction)(ADMTrackerRef tracker, ADMAction action);
ASBoolean ASAPI (*TestModifier)(ADMTrackerRef tracker, ADMModifiers modifier);
ADMTime ASAPI (*GetTime)(ADMTrackerRef tracker);
void ASAPI (*Abort)(ADMTrackerRef tracker);
ADMMouseState ASAPI (*GetMouseState)(ADMTrackerRef tracker);
void ASAPI (*ReleaseMouseCapture)(ADMTrackerRef tracker);
ADMChar ASAPI (*GetVirtualKey)(ADMTrackerRef tracker);
ADMChar ASAPI (*GetCharacter)(ADMTrackerRef tracker);
} ADMTrackerSuite1;
typedef ADMTrackerSuite1 ADMTrackerSuite; // Current version
#pragma PRAGMA_IMPORT_END
#pragma PRAGMA_ALIGN_END
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,148 @@
/*
* Name:
* ADMTypes.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Adobe Dialog Manager Types.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.1.2 3/10/1996 DL Twelfth version.
* Created by Dave Lazarony.
*/
#ifndef __ADMTypes__
#define __ADMTypes__
/*
* Includes
*/
#ifndef __ASTypes__
#include "ASTypes.h"
#endif
#ifndef __SPPlugs__
#include "SPPlugs.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#pragma PRAGMA_ALIGN_BEGIN
#pragma PRAGMA_IMPORT_BEGIN
/*
* Types
*/
typedef struct ADMDialog *ADMDialogRef;
typedef struct ADMDrawer *ADMDrawerRef;
typedef struct ADMItem *ADMItemRef;
typedef struct ADMList *ADMListRef;
typedef struct ADMHierarchyList *ADMHierarchyListRef;
typedef struct ADMEntry *ADMEntryRef;
typedef struct ADMListEntry *ADMListEntryRef;
typedef struct ADMNotifier *ADMNotifierRef;
typedef struct ADMTracker *ADMTrackerRef;
typedef struct ADMIcon *ADMIconRef;
typedef struct ADMImage *ADMImageRef;
typedef void *ADMUserData;
typedef unsigned long ADMTimerRef;
typedef unsigned long ADMActionMask;
typedef unsigned short ADMChar;
typedef SPPluginRef ADMPluginRef; // Unless otherwise specified, ADM assumes it is using SP
#ifndef _t_AGMPortPtr
typedef struct _t_AGMPort *_t_AGMPortPtr;
#endif
/*
* Units
*/
typedef enum
{
kADMNoUnits = 0,
kADMPointUnits = 1,
kADMInchUnits = 2,
kADMMillimeterUnits = 3,
kADMCentimeterUnits = 4,
kADMPicaUnits = 5,
kADMPercentUnits = 6,
kADMDegreeUnits = 7,
kADMQUnits = 8,
kADMMinNormalUnits = kADMPointUnits,
kADMMaxNormalUnits = kADMQUnits,
kADMAppUnits1 = 101,
kADMAppUnits2 = 102,
kADMAppUnits3 = 103,
kADMAppUnits4 = 104,
kADMAppUnits5 = 105,
kADMAppUnits6 = 106,
kADMAppUnits7 = 107,
kADMAppUnits8 = 108,
kADMAppUnits9 = 109,
kADMAppUnits10 = 110,
kADMMaxAppUnits = kADMAppUnits10,
kADMDummyUnits = 0xFFFFFFFF
} ADMUnits;
/*
* Fonts
*/
typedef enum
{
kADMDefaultFont = 0,
kADMDialogFont,
kADMPaletteFont,
kADMItalicDialogFont,
kADMItalicPaletteFont,
kADMBoldDialogFont,
kADMBoldPaletteFont,
kADMBoldItalicDialogFont,
kADMBoldItalicPaletteFont,
kADMDummyFont = 0xFFFFFFFF
} ADMFont;
/*
* Justify
*/
typedef enum
{
kADMLeftJustify = 0,
kADMCenterJustify = 1,
kADMRightJustify = 2,
kADMDummyJustify = 0xFFFFFFFF
}
ADMJustify;
#pragma PRAGMA_IMPORT_END
#pragma PRAGMA_ALIGN_END
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,108 @@
/*
* Name:
* ADMWindow.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* ADM Window Suite
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 1/1/95 MF First version.
* Created by Matt Foster.
*/
#ifndef __ADMWindow__
#define __ADMWindow__
/*******************************************************************************
**
** Imports
**
**/
#ifndef __ADMTypes__
#include "ADMTypes.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#pragma PRAGMA_ALIGN_BEGIN
#pragma PRAGMA_IMPORT_BEGIN
/*******************************************************************************
**
** Constants
**
**/
#define kADMWindowSuite "ADM Window Suite"
#define kADMWindowSuiteVersion 1
typedef enum
{
// Note: these first four correspond to ADMDialogStyles
// and are all variants of type kADMWindow
kADMFloatingWindowStyle = 2,
kADMTabbedFloatingWindowStyle = 3,
kADMResizingFloatingWindowStyle = 4,
kADMTabbedResizingFloatingWindowStyle = 5,
kADMDocumentWindowStyle = 100, // for searches only, to find all document window types
kADMGrowNoZoomDocumentWindowStyle = 100, // for new window calls, use a specific type
kADMNoGrowNoZoomDocumentWindowStyle = 104,
kADMGrowZoomDocumentWindowStyle = 108,
kADMNoGrowZoomDocumentWindowStyle = 112,
kADMPopupWindowStyle = 300,
kADMDummyWindowStyle = 0xFFFFFFFF
}
ADMWindowStyle;
/*******************************************************************************
**
** Suite
**
**/
typedef struct ADMWindowSuite1 {
ASAPI ASWindowRef (*NewLayerWindow)(ADMWindowStyle windowKind, unsigned char *wStorage, ASRect * boundsRect,
char *title, ASBoolean visible, ASBoolean goAwayFlag, long refCon);
ASAPI ASWindowRef (*GetNewLayerWindow)(SPPluginRef pluginRef, ADMWindowStyle windowKind,
short windowID, unsigned char *wStorage);
ASAPI void (*DisposeLayerWindow)(ASWindowRef theWindow);
ASAPI void (*HideLayerWindow)(ASWindowRef theWindow);
ASAPI void (*ShowAndSelectLayerWindow)(ASWindowRef theWindow);
ASAPI void (*SelectLayerWindow)(ASWindowRef theWindow);
ASAPI void (*ShowLayerWindow)(ASWindowRef theWindow);
ASAPI void (*DragLayerWindow)(ASWindowRef theWindow, ASPoint startPoint, ASRect *draggingBounds);
ASAPI ASWindowRef (*GetFrontWindow)(ADMWindowStyle windowKind);
ASAPI void (*UpdateWindowOrder)(void);
} ADMWindowSuite1;
typedef ADMWindowSuite1 ADMWindowSuite;
#pragma PRAGMA_IMPORT_END
#pragma PRAGMA_ALIGN_END
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,103 @@
/*
* Name:
* BaseADMDialog.hpp
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Adobe Dialog Manager Dialog Base Class.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 3/11/1996 DL First version.
* Created by Dave Lazarony.
*/
#ifndef __BaseADMDialog_hpp__
#define __BaseADMDialog_hpp__
/*
* Includes
*/
#ifndef __IADMDialog_hpp__
#include "IADMDialog.hpp"
#endif
#ifndef __IADMItem_hpp__
#include "IADMItem.hpp"
#endif
class IADMDrawer;
class IADMNotifier;
class IADMTracker;
/*
* Base Class
*/
class BaseADMDialog : public IADMDialog
{
private:
static ASErr ASAPI InitProc(ADMDialogRef dialog);
static void ASAPI DrawProc(ADMDialogRef dialog, ADMDrawerRef drawer);
static ASBoolean ASAPI TrackProc(ADMDialogRef dialog, ADMTrackerRef tracker);
static void ASAPI NotifyProc(ADMDialogRef dialog, ADMNotifierRef notifier);
static void ASAPI DestroyProc(ADMDialogRef dialog);
ASBoolean fIsModal;
protected:
// IADMDialog fDialog;
ADMUserData fUserData;
virtual ASErr Init();
virtual void Draw(IADMDrawer drawer);
virtual ASBoolean Track(IADMTracker tracker);
virtual void Notify(IADMNotifier notifier);
virtual void Destroy();
IADMItem GetItem(int itemID);
public:
BaseADMDialog();
virtual ~BaseADMDialog();
virtual ADMDialogRef Create(SPPluginRef pluginRef, char *name, int dialogID, ADMDialogStyle style);
virtual int Modal(SPPluginRef pluginRef, char *name, int dialogID, ADMDialogStyle style = kADMModalDialogStyle);
void SetUserData(ADMUserData userData);
ADMUserData GetUserData();
IADMDialog GetDialog();
};
inline IADMItem BaseADMDialog::GetItem(int itemID)
{
return IADMDialog::GetItem(itemID);
}
inline void BaseADMDialog::SetUserData(ADMUserData userData)
{
fUserData = userData;
}
inline ADMUserData BaseADMDialog::GetUserData()
{
return fUserData;
}
inline IADMDialog BaseADMDialog::GetDialog()
{
return IADMDialog::GetDialogRef(); //fDialog;
}
#endif
@@ -0,0 +1,99 @@
/*
* Name:
* BaseADMEntry.hpp
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Adobe Dialog Manager Entry Base Class.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 2/2/1998 DT First version.
* Created by Darin Tomack.
*/
#ifndef __BaseADMEntry_hpp__
#define __BaseADMEntry_hpp__
/*
* Includes
*/
#ifndef __IADMEntry_hpp__
#include "IADMEntry.hpp"
#endif
#include "IADMList.hpp"
class IADMDrawer;
class IADMNotifier;
class IADMTracker;
/*
* Base Class
*/
class BaseADMEntry : public IADMEntry
{
private:
static ASErr ASAPI InitProc(ADMEntryRef entry);
static void ASAPI DrawProc(ADMEntryRef entry, ADMDrawerRef drawer);
static ASBoolean ASAPI TrackProc(ADMEntryRef entry, ADMTrackerRef tracker);
static void ASAPI NotifyProc(ADMEntryRef entry, ADMNotifierRef notifier);
static void ASAPI DestroyProc(ADMEntryRef entry);
protected:
// IADMEntry fEntry;
IADMList fList;
ADMUserData fUserData;
virtual ASErr Init();
virtual void Draw(IADMDrawer drawer);
virtual ASBoolean Track(IADMTracker tracker);
virtual void Notify(IADMNotifier notifier);
virtual void BaseDraw(IADMDrawer drawer);
public:
BaseADMEntry(IADMEntry entry, ADMUserData data = nil);
BaseADMEntry(IADMList list, ADMUserData entryUserData = nil);
virtual ~BaseADMEntry();
virtual ADMEntryRef Create(ADMListRef list, ADMUserData data = nil);
void SetUserData(ADMUserData userData);
ADMUserData GetUserData();
// IADMEntry GetEntry();
ASErr DoInit();
};
inline void BaseADMEntry::SetUserData(ADMUserData userData)
{
fUserData = userData;
}
inline ADMUserData BaseADMEntry::GetUserData()
{
return fUserData;
}
/*
inline IADMEntry BaseADMEntry::GetEntry()
{
return fEntry;
}
*/
inline ASErr BaseADMEntry::DoInit()
{
return Init();
}
#endif
@@ -0,0 +1,63 @@
/*
* Name:
* BaseADMHierarchyList.hpp
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Adobe Dialog Manager Entry Base Class.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 2/2/1998 DL First version.
* Created by Darin Tomack.
*/
#ifndef __BaseADMHierarchyList_hpp__
#define __BaseADMHierarchyList_hpp__
/*
* Includes
*/
#ifndef __IADMHierarchyList_hpp__
#include "IADMHierarchyList.hpp"
#endif
class IADMDrawer;
class IADMNotifier;
class IADMTracker;
/*
* Base Class
*/
class BaseADMHierarchyList : public IADMHierarchyList
{
protected:
ADMUserData fUserData;
public:
BaseADMHierarchyList(IADMHierarchyList list, ADMUserData data = nil);
virtual ~BaseADMHierarchyList();
void SetUserData(ADMUserData userData);
ADMUserData GetUserData();
};
inline void BaseADMHierarchyList::SetUserData(ADMUserData userData)
{
fUserData = userData;
}
inline ADMUserData BaseADMHierarchyList::GetUserData()
{
return fUserData;
}
#endif
@@ -0,0 +1,58 @@
/*
* Name:
* BaseADMImageItem.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Adobe Dialog Manager Image Item Base Class.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 3/6/1996 DL First version.
* Created by Dave Lazarony.
*/
#ifndef __BaseADMImageItem_hpp__
#define __BaseADMImageItem_hpp__
/*
* Includes
*/
#ifndef __BaseADMItem_hpp__
#include "BaseADMItem.hpp"
#endif
#ifndef __IADMImage_hpp__
#include "IADMImage.hpp"
#endif
class IADMDrawer;
class IADMNotifier;
class IADMTracker;
/*
* Base Class
*/
class BaseADMImageItem : public BaseADMItem
{
protected:
IADMImage fImage;
virtual ASBoolean UseImage();
virtual void BaseDraw(IADMDrawer drawer);
public:
BaseADMImageItem(IADMItem item, ADMUserData data = nil);
virtual ~BaseADMImageItem();
};
#endif
@@ -0,0 +1,101 @@
/*
* Name:
* BaseADMItem.hpp
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Adobe Dialog Manager Item Base Class.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 3/6/1996 DL First version.
* Created by Dave Lazarony.
*/
#ifndef __BaseADMItem_hpp__
#define __BaseADMItem_hpp__
/*
* Includes
*/
#ifndef __IADMItem_hpp__
#include "IADMItem.hpp"
#endif
#ifndef __IADMDialog_hpp__
#include "IADMDialog.hpp"
#endif
class IADMDrawer;
class IADMNotifier;
class IADMTracker;
/*
* Base Class
*/
class BaseADMItem : public IADMItem
{
private:
static ASErr ASAPI InitProc(ADMItemRef item);
static void ASAPI DrawProc(ADMItemRef item, ADMDrawerRef drawer);
static ASBoolean ASAPI TrackProc(ADMItemRef item, ADMTrackerRef tracker);
static void ASAPI NotifyProc(ADMItemRef item, ADMNotifierRef notifier);
static void ASAPI DestroyProc(ADMItemRef item);
static ASBoolean ASAPI TextToFloatProc(ADMItemRef item, char *text, float *value);
static ASBoolean ASAPI FloatToTextProc(ADMItemRef item, float value, char *text, int textLength);
protected:
ADMUserData fUserData;
virtual ASErr Init();
virtual void Draw(IADMDrawer drawer);
virtual ASBoolean Track(IADMTracker tracker);
virtual void Notify(IADMNotifier notifier);
virtual ASBoolean TextToFloat(const char *text, float &value);
virtual ASBoolean FloatToText(float value, char *text, int textLength);
virtual void BaseDraw(IADMDrawer drawer);
public:
BaseADMItem(IADMItem item, ADMUserData data = nil);
virtual ~BaseADMItem();
virtual ADMItemRef Create(ADMDialogRef dialog, const IASRect &boundsRect, ADMItemType itemType = kADMUserType, int itemID = kADMUniqueItemID);
void SetUserData(ADMUserData userData);
ADMUserData GetUserData();
IADMItem GetItem();
ASErr DoInit();
};
inline void BaseADMItem::SetUserData(ADMUserData userData)
{
fUserData = userData;
}
inline ADMUserData BaseADMItem::GetUserData()
{
return fUserData;
}
inline IADMItem BaseADMItem::GetItem()
{
return fItem;
}
inline ASErr BaseADMItem::DoInit()
{
return Init();
}
#endif
@@ -0,0 +1,72 @@
/*
* Name:
* BaseADMList.hpp
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Adobe Dialog Manager Entry Base Class.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 2/2/1998 DT First version.
* Created by Darin Tomack.
*/
#ifndef __BaseADMList_hpp__
#define __BaseADMList_hpp__
/*
* Includes
*/
#ifndef __IADMList_hpp__
#include "IADMList.hpp"
#endif
class IADMDrawer;
class IADMNotifier;
class IADMTracker;
/*
* Base Class
*/
class BaseADMList : public IADMList
{
protected:
// IADMList fList;
ADMUserData fUserData;
public:
BaseADMList(IADMList list, ADMUserData data = nil);
virtual ~BaseADMList();
void SetUserData(ADMUserData userData);
ADMUserData GetUserData();
// IADMList GetList();
};
inline void BaseADMList::SetUserData(ADMUserData userData)
{
fUserData = userData;
}
inline ADMUserData BaseADMList::GetUserData()
{
return fUserData;
}
/*
inline IADMList BaseADMList::GetList()
{
return fList;
}
*/
#endif
@@ -0,0 +1,90 @@
/*
* Name:
* BaseADMListEntry.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Adobe Dialog Manager Hier. List Entry Base Class.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 2/2/1998 First version.
* Created by Darin Tomack.
*/
#ifndef __BaseADMListEntry_hpp__
#define __BaseADMListEntry_hpp__
/*
* Includes
*/
#ifndef __IADMEntry_hpp__
#include "IADMListEntry.hpp"
#endif
#include "IADMHierarchyList.hpp"
class IADMDrawer;
class IADMNotifier;
class IADMTracker;
/*
* Base Class
*/
class BaseADMListEntry : public IADMListEntry
{
private:
static ASErr ASAPI InitProc(ADMListEntryRef entry);
static void ASAPI DrawProc(ADMListEntryRef entry, ADMDrawerRef drawer);
static ASBoolean ASAPI TrackProc(ADMListEntryRef entry, ADMTrackerRef tracker);
static void ASAPI NotifyProc(ADMListEntryRef entry, ADMNotifierRef notifier);
static void ASAPI DestroyProc(ADMListEntryRef entry);
protected:
IADMHierarchyList fHierarchyList;
ADMUserData fUserData;
virtual ASErr Init();
virtual void Draw(IADMDrawer drawer);
virtual ASBoolean Track(IADMTracker tracker);
virtual void Notify(IADMNotifier notifier);
virtual void BaseDraw(IADMDrawer drawer);
public:
BaseADMListEntry(IADMListEntry entry, ADMUserData data = nil);
BaseADMListEntry(IADMHierarchyList list, ADMUserData entryUserData = nil);
virtual ~BaseADMListEntry();
virtual ADMListEntryRef Create(ADMHierarchyListRef list, ADMUserData data = nil);
void SetUserData(ADMUserData userData);
ADMUserData GetUserData();
ASErr DoInit();
};
inline void BaseADMListEntry::SetUserData(ADMUserData userData)
{
fUserData = userData;
}
inline ADMUserData BaseADMListEntry::GetUserData()
{
return fUserData;
}
inline ASErr BaseADMListEntry::DoInit()
{
return Init();
}
#endif // __BaseADMListEntry_hpp__
@@ -0,0 +1,567 @@
/*
* Name:
* IADMDialog.hpp
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Adobe Dialog Manager Dialog Interface Class.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 3/6/1996 DL First version.
* Created by Dave Lazarony.
*/
#ifndef __IADMDialog_hpp__
#define __IADMDialog_hpp__
/*
* Includes
*/
#ifndef __ADMDialog__
#include "ADMDialog.h"
#endif
#ifndef __IASTypes_hpp__
#include "IASTypes.hpp"
#endif
// Stupid Macintosh Headers #define GetItem.
#ifdef GetItem
#undef GetItem
#endif
/*
* Global Suite Pointer
*/
extern "C" ADMDialogSuite *sADMDialog;
/*
* Interface Wrapper Class
*/
class IADMDialog
{
protected:
ADMDialog *fDialog;
public:
IADMDialog();
IADMDialog(ADMDialogRef dialog);
IADMDialog(int nilDialog);
operator ADMDialogRef(void);
ADMDialogRef GetDialogRef(void);
void SetDialogRef(ADMDialogRef);
void SendNotify(const char *notifierType = nil);
void DefaultNotify(ADMNotifierRef notifier);
int GetID();
SPPluginRef GetPluginRef();
ASWindowRef GetWindowRef();
char* GetName();
void SetDialogStyle(ADMDialogStyle style);
ADMDialogStyle GetDialogStyle();
void Show(ASBoolean show = true);
void Hide();
ASBoolean IsVisible();
void Enable(ASBoolean enable = true);
void Disable();
ASBoolean IsEnabled();
void Activate(ASBoolean activate = true);
void Deactivate();
ASBoolean IsActive();
void SetLocalRect(const IASRect &localRect);
void GetLocalRect(IASRect &localRect);
void SetBoundsRect(const IASRect &boundsRect);
void GetBoundsRect(IASRect &boundsRect);
void Move(int x, int y);
void Size(int width, int height);
void LocalToScreenPoint(IASPoint &point);
void ScreenToLocalPoint(IASPoint &point);
void LocalToScreenRect(IASRect &rect);
void ScreenToLocalRect(IASRect &rect);
void Invalidate();
void Update();
void SetCursorID(int cursorResID);
int GetCursorID();
void GetCursorID(SPPluginRef *plugin, int *cursorResID);
ADMFont GetFont();
void SetFont(ADMFont font);
void SetText(const char *text);
void GetText(char *text, int maxLength = 0);
int GetTextLength();
void SetMinWidth(int width);
int GetMinWidth();
void SetMinHeight(int height);
int GetMinHeight();
void SetMaxWidth(int width);
int GetMaxWidth();
void SetMaxHeight(int height);
int GetMaxHeight();
void SetHorizontalIncrement(int height);
int GetHorizontalIncrement();
void SetVerticalIncrement(int height);
int GetVerticalIncrement();
ADMItemRef GetItem(int itemID);
ADMItemRef CreateItem(int itemID, ADMItemType itemType, const IASRect &boundsRect, ADMItemInitProc initProc = nil, ADMUserData data = 0);
void DestroyItem(ADMItemRef item);
ADMItemRef GetNextItem(ADMItemRef item);
ADMItemRef GetPreviousItem(ADMItemRef item);
void SetDefaultItemID(int itemID);
int GetDefaultItemID();
void SetCancelItemID(int itemID);
int GetCancelItemID();
void EndModal(int modalResultID, ASBoolean cancelling = false);
void LoadToolTips(int stringID);
void SetHelpID(ASHelpID helpID);
ASHelpID GetHelpID();
void Help();
void SetMask(ADMActionMask mask);
ADMActionMask GetMask();
void SetNotifierData(ADMUserData data);
ADMUserData GetNotifierData();
ADMTimerRef CreateTimer(unsigned long milliseconds,
ADMActionMask abortMask,
ADMDialogTimerProc timerProc,
ADMDialogTimerAbortProc abortProc);
void AbortTimer(ADMTimerRef timer);
ASBoolean IsCollapsed();
};
inline IADMDialog::IADMDialog()
{
}
inline IADMDialog::IADMDialog(ADMDialogRef dialog)
{
fDialog = dialog;
}
inline IADMDialog::IADMDialog(int nilDialog)
{
if (nilDialog == nil)
fDialog = (ADMDialog *)nil;
}
inline IADMDialog::operator ADMDialogRef(void)
{
return fDialog;
}
inline ADMDialogRef IADMDialog::GetDialogRef(void)
{
return fDialog;
}
inline void IADMDialog::SetDialogRef(ADMDialogRef dialog)
{
fDialog = dialog;
}
inline void IADMDialog::SendNotify(const char *notifierType)
{
sADMDialog->SendNotify(fDialog, (char *)notifierType);
}
inline void IADMDialog::DefaultNotify(ADMNotifierRef notifier)
{
sADMDialog->DefaultNotify(fDialog, notifier);
}
inline int IADMDialog::GetID()
{
return sADMDialog->GetID(fDialog);
}
inline struct SPPlugin *IADMDialog::GetPluginRef()
{
return sADMDialog->GetPluginRef(fDialog);
}
inline ASWindowRef IADMDialog::GetWindowRef()
{
return sADMDialog->GetWindowRef(fDialog);
}
inline char* IADMDialog::GetName()
{
return sADMDialog->GetDialogName(fDialog);
}
inline void IADMDialog::SetDialogStyle(ADMDialogStyle style)
{
sADMDialog->SetDialogStyle(fDialog, style);
}
inline ADMDialogStyle IADMDialog::GetDialogStyle()
{
return sADMDialog->GetDialogStyle(fDialog);
}
inline void IADMDialog::Show(ASBoolean show)
{
sADMDialog->Show(fDialog, show);
}
inline void IADMDialog::Hide()
{
sADMDialog->Show(fDialog, false);
}
inline ASBoolean IADMDialog::IsVisible()
{
return sADMDialog->IsVisible(fDialog);
}
inline void IADMDialog::Enable(ASBoolean enable)
{
sADMDialog->Enable(fDialog, enable);
}
inline void IADMDialog::Disable()
{
sADMDialog->Enable(fDialog, false);
}
inline ASBoolean IADMDialog::IsEnabled()
{
return sADMDialog->IsEnabled(fDialog);
}
inline void IADMDialog::Activate(ASBoolean activate)
{
sADMDialog->Activate(fDialog, activate);
}
inline void IADMDialog::Deactivate()
{
sADMDialog->Activate(fDialog, false);
}
inline ASBoolean IADMDialog::IsActive()
{
return sADMDialog->IsActive(fDialog);
}
inline void IADMDialog::SetLocalRect(const IASRect &localRect)
{
sADMDialog->SetLocalRect(fDialog, (IASRect *)&localRect);
}
inline void IADMDialog::GetLocalRect(IASRect &localRect)
{
sADMDialog->GetLocalRect(fDialog, &localRect);
}
inline void IADMDialog::SetBoundsRect(const IASRect &boundsRect)
{
sADMDialog->SetBoundsRect(fDialog, (IASRect *)&boundsRect);
}
inline void IADMDialog::GetBoundsRect(IASRect &boundsRect)
{
sADMDialog->GetBoundsRect(fDialog, &boundsRect);
}
inline void IADMDialog::Move(int x, int y)
{
sADMDialog->Move(fDialog, x, y);
}
inline void IADMDialog::Size(int width, int height)
{
sADMDialog->Size(fDialog, width, height);
}
inline void IADMDialog::LocalToScreenPoint(IASPoint &point)
{
sADMDialog->LocalToScreenPoint(fDialog, (ASPoint *)&point);
}
inline void IADMDialog::ScreenToLocalPoint(IASPoint &point)
{
sADMDialog->ScreenToLocalPoint(fDialog, (ASPoint *)&point);
}
inline void IADMDialog::LocalToScreenRect(IASRect &rect)
{
sADMDialog->LocalToScreenRect(fDialog, (ASRect *)&rect);
}
inline void IADMDialog::ScreenToLocalRect(IASRect &rect)
{
sADMDialog->ScreenToLocalRect(fDialog, (ASRect *)&rect);
}
inline void IADMDialog::Invalidate()
{
sADMDialog->Invalidate(fDialog);
}
inline void IADMDialog::Update()
{
sADMDialog->Update(fDialog);
}
inline void IADMDialog::SetCursorID(int cursorResID)
{
sADMDialog->SetCursorID(fDialog, sADMDialog->GetPluginRef(fDialog), cursorResID);
}
inline int IADMDialog::GetCursorID()
{
int cursorID = 0;
SPPluginRef itsPlugin;
sADMDialog->GetCursorID(fDialog, &itsPlugin, &cursorID);
return cursorID;
}
inline void IADMDialog::GetCursorID(SPPluginRef *plugin, int *cursorResID)
{
*cursorResID = 0;
sADMDialog->GetCursorID(fDialog, plugin, cursorResID);
}
inline ADMFont IADMDialog::GetFont()
{
return sADMDialog->GetFont(fDialog);
}
inline void IADMDialog::SetFont(ADMFont font)
{
sADMDialog->SetFont(fDialog, font);
}
inline void IADMDialog::SetText(const char *text)
{
sADMDialog->SetText(fDialog, (char *)text);
}
inline void IADMDialog::GetText(char *text, int maxLength)
{
sADMDialog->GetText(fDialog, text, maxLength);
}
inline int IADMDialog::GetTextLength()
{
return sADMDialog->GetTextLength(fDialog);
}
inline void IADMDialog::SetMinWidth(int width)
{
sADMDialog->SetMinWidth(fDialog, width);
}
inline int IADMDialog::GetMinWidth()
{
return sADMDialog->GetMinWidth(fDialog);
}
inline void IADMDialog::SetMinHeight(int height)
{
sADMDialog->SetMinHeight(fDialog, height);
}
inline int IADMDialog::GetMinHeight()
{
return sADMDialog->GetMinHeight(fDialog);
}
inline void IADMDialog::SetMaxWidth(int width)
{
sADMDialog->SetMaxWidth(fDialog, width);
}
inline int IADMDialog::GetMaxWidth()
{
return sADMDialog->GetMaxWidth(fDialog);
}
inline void IADMDialog::SetMaxHeight(int height)
{
sADMDialog->SetMaxHeight(fDialog, height);
}
inline int IADMDialog::GetMaxHeight()
{
return sADMDialog->GetMaxHeight(fDialog);
}
inline void IADMDialog::SetHorizontalIncrement(int increment)
{
sADMDialog->SetHorizontalIncrement(fDialog, increment);
}
inline int IADMDialog::GetHorizontalIncrement()
{
return sADMDialog->GetHorizontalIncrement(fDialog);
}
inline void IADMDialog::SetVerticalIncrement(int increment)
{
sADMDialog->SetVerticalIncrement(fDialog, increment);
}
inline int IADMDialog::GetVerticalIncrement()
{
return sADMDialog->GetVerticalIncrement(fDialog);
}
inline ADMItemRef IADMDialog::GetItem(int itemID)
{
return sADMDialog->GetItem(fDialog, itemID);
}
inline ADMItemRef IADMDialog::CreateItem(int itemID, ADMItemType itemType, const IASRect &boundsRect, ADMItemInitProc initProc, ADMUserData data)
{
return sADMDialog->CreateItem(fDialog, itemID, itemType, (ASRect *)&boundsRect, initProc, data);
}
inline void IADMDialog::DestroyItem(ADMItemRef item)
{
sADMDialog->DestroyItem(fDialog, item);
}
inline ADMItemRef IADMDialog::GetNextItem(ADMItemRef item)
{
return sADMDialog->GetNextItem(fDialog, item);
}
inline ADMItemRef IADMDialog::GetPreviousItem(ADMItemRef item)
{
return sADMDialog->GetPreviousItem(fDialog, item);
}
inline void IADMDialog::SetDefaultItemID(int itemID)
{
sADMDialog->SetDefaultItemID(fDialog, itemID);
}
inline int IADMDialog::GetDefaultItemID()
{
return sADMDialog->GetDefaultItemID(fDialog);
}
inline void IADMDialog::SetCancelItemID(int itemID)
{
sADMDialog->SetCancelItemID(fDialog, itemID);
}
inline int IADMDialog::GetCancelItemID()
{
return sADMDialog->GetCancelItemID(fDialog);
}
inline void IADMDialog::EndModal(int modalResultID, ASBoolean cancelling)
{
sADMDialog->EndModal(fDialog, modalResultID, cancelling);
}
inline void IADMDialog::LoadToolTips(int stringID)
{
sADMDialog->LoadToolTips(fDialog, stringID);
}
inline void IADMDialog::SetHelpID(ASHelpID helpID)
{
sADMDialog->SetHelpID(fDialog, helpID);
}
inline ASHelpID IADMDialog::GetHelpID()
{
return sADMDialog->GetHelpID(fDialog);
}
inline void IADMDialog::Help()
{
sADMDialog->Help(fDialog);
}
inline void IADMDialog::SetMask(ADMActionMask mask)
{
sADMDialog->SetMask(fDialog, mask);
}
inline ADMActionMask IADMDialog::GetMask()
{
return sADMDialog->GetMask(fDialog);
}
inline void IADMDialog::SetNotifierData(ADMUserData data)
{
sADMDialog->SetNotifierData(fDialog, data);
}
inline ADMUserData IADMDialog::GetNotifierData()
{
return sADMDialog->GetNotifierData(fDialog);
}
inline ADMTimerRef IADMDialog::CreateTimer(unsigned long milliseconds,
ADMActionMask abortMask, ADMDialogTimerProc timerProc,
ADMDialogTimerAbortProc abortProc)
{
return sADMDialog->CreateTimer(fDialog, milliseconds,
abortMask, timerProc, abortProc);
}
inline void IADMDialog::AbortTimer(ADMTimerRef timer)
{
sADMDialog->AbortTimer(fDialog, timer);
}
inline ASBoolean IADMDialog::IsCollapsed()
{
return sADMDialog->IsCollapsed(fDialog);
}
#endif
@@ -0,0 +1,428 @@
/*
* Name:
* IADMDrawer.hpp
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* IADMDrawer Wrapper Class.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 3/6/1996 DL First version.
* Created by Dave Lazarony.
*/
#ifndef __IADMDrawer_hpp__
#define __IADMDrawer_hpp__
/*
* Includes
*/
#ifndef __ADMDrawer__
#include "ADMDrawer.h"
#endif
#ifndef __IASTypes_hpp__
#include "IASTypes.hpp"
#endif
/*
* Forward Declarations
*/
extern "C" typedef struct SPPlugin SPPlugin;
extern "C" typedef struct _t_AGMImageRecord AGMImageRecord;
extern "C" typedef struct _t_AGMFixedMatrix AGMFixedMatrix;
class AGMPort;
/*
* Global Suite Pointer
*/
extern "C" ADMDrawerSuite *sADMDrawer;
/*
* Wrapper Class
*/
class IADMDrawer
{
private:
ADMDrawer *fDrawer;
public:
IADMDrawer();
IADMDrawer(ADMDrawer *c);
operator ADMDrawer *(void);
ASPortRef GetPortRef();
void Clear();
void GetBoundsRect(IASRect &boundsRect);
void GetClipRect(IASRect &clipRect);
void SetClipRect(const IASRect &clipRect);
void IntersectClipRect(const IASRect &clipRect);
void UnionClipRect(const IASRect &clipRect);
void SubtractClipRect(const IASRect &clipRect);
void SetClipPolygon(const IASPoint *points, int numPoints);
void IntersectClipPolygon(const IASPoint *points, int numPoints);
void UnionClipPolygon(const IASPoint *points, int numPoints);
void SubtractClipPolygon(const IASPoint *points, int numPoints);
void GetOrigin(IASPoint &origin);
void SetOrigin(const IASPoint &origin);
void GetRGBColor(ASRGBColor &color);
void SetRGBColor(const ASRGBColor &color);
ADMColor GetADMColor();
void SetADMColor(ADMColor color);
ADMDrawMode GetDrawMode();
void SetDrawMode(ADMDrawMode drawMode);
ADMFont GetFont();
void SetFont(ADMFont font);
void DrawLine(const IASPoint &startPoint, const IASPoint &endPoint);
void DrawPolygon(const IASPoint *points, int numPoints);
void FillPolygon(const IASPoint *points, int numPoints);
void DrawRect(const IASRect &rect);
void FillRect(const IASRect &rect);
void ClearRect(const IASRect &rect);
void DrawSunkenRect(const IASRect &rect);
void DrawRaisedRect(const IASRect &rect);
void InvertRect(const IASRect &rect);
void DrawOval(const IASRect &rect);
void FillOval(const IASRect &rect);
AGMPort* GetAGMPort();
void DrawAGMImage(AGMImageRecord *image, AGMFixedMatrix *matrix, long flags);
void DrawADMImage(ADMImageRef image, const IASPoint &topLeftPoint);
void DrawADMImageCentered(ADMImageRef image, const IASRect &rect);
void DrawResPicture(SPPlugin *pluginRef, int resID, const IASPoint &topLeftPoint, ADMRecolorStyle style = kADMNoRecolor);
void DrawResPictureCentered(SPPlugin *pluginRef, int resID, const IASRect &rect, ADMRecolorStyle style = kADMNoRecolor);
void DrawIcon(ADMIconRef icon, const IASPoint &topLeftPoint, ADMRecolorStyle style = kADMNoRecolor);
void DrawIconCentered(ADMIconRef icon, const IASRect &rect, ADMRecolorStyle style = kADMNoRecolor);
void GetResPictureBounds(struct SPPlugin *pluginRef, int resID, IASRect &boundsRect);
int GetTextWidth(const char *text);
void GetFontInfo(const ADMFontInfo &fontInfo);
void DrawText(const char *text, const IASPoint &point);
void DrawTextLeft(const char *text, const IASRect &rect);
void DrawTextCentered(const char *text, const IASRect &rect);
void DrawTextRight(const char *text, const IASRect &rect);
void DrawUpArrow(const IASRect &rect);
void DrawDownArrow(const IASRect &rect);
void DrawLeftArrow(const IASRect &rect);
void DrawRightArrow(const IASRect &rect);
};
inline IADMDrawer::IADMDrawer()
{
}
inline IADMDrawer::IADMDrawer(ADMDrawer *drawer)
{
fDrawer = drawer;
}
inline IADMDrawer::operator ADMDrawer *(void)
{
return fDrawer;
}
inline ASPortRef IADMDrawer::GetPortRef()
{
return sADMDrawer->GetPortRef(fDrawer);
}
inline void IADMDrawer::Clear()
{
sADMDrawer->Clear(fDrawer);
}
inline void IADMDrawer::GetBoundsRect(IASRect &boundsRect)
{
sADMDrawer->GetBoundsRect(fDrawer, &boundsRect);
}
inline void IADMDrawer::GetClipRect(IASRect &clipRect)
{
sADMDrawer->GetClipRect(fDrawer, &clipRect);
}
inline void IADMDrawer::SetClipRect(const IASRect &clipRect)
{
sADMDrawer->SetClipRect(fDrawer, (IASRect *)&clipRect);
}
inline void IADMDrawer::IntersectClipRect(const IASRect &clipRect)
{
sADMDrawer->IntersectClipRect(fDrawer, (IASRect *)&clipRect);
}
inline void IADMDrawer::UnionClipRect(const IASRect &clipRect)
{
sADMDrawer->UnionClipRect(fDrawer, (IASRect *)&clipRect);
}
inline void IADMDrawer::SubtractClipRect(const IASRect &clipRect)
{
sADMDrawer->SubtractClipRect(fDrawer, (IASRect *)&clipRect);
}
inline void IADMDrawer::SetClipPolygon(const IASPoint *points, int numPoints)
{
sADMDrawer->SetClipPolygon(fDrawer, (IASPoint *)points, numPoints);
}
inline void IADMDrawer::IntersectClipPolygon(const IASPoint *points, int numPoints)
{
sADMDrawer->IntersectClipPolygon(fDrawer, (IASPoint *)points, numPoints);
}
inline void IADMDrawer::UnionClipPolygon(const IASPoint *points, int numPoints)
{
sADMDrawer->UnionClipPolygon(fDrawer, (IASPoint *)points, numPoints);
}
inline void IADMDrawer::SubtractClipPolygon(const IASPoint *points, int numPoints)
{
sADMDrawer->SubtractClipPolygon(fDrawer, (IASPoint *)points, numPoints);
}
inline void IADMDrawer::GetOrigin(IASPoint &origin)
{
sADMDrawer->GetOrigin(fDrawer, &origin);
}
inline void IADMDrawer::SetOrigin(const IASPoint &origin)
{
sADMDrawer->SetOrigin(fDrawer, (IASPoint *)&origin);
}
inline void IADMDrawer::GetRGBColor(ASRGBColor &color)
{
sADMDrawer->GetRGBColor(fDrawer, &color);
}
inline void IADMDrawer::SetRGBColor(const ASRGBColor &color)
{
sADMDrawer->SetRGBColor(fDrawer, (ASRGBColor *)&color);
}
inline ADMColor IADMDrawer::GetADMColor()
{
return sADMDrawer->GetADMColor(fDrawer);
}
inline void IADMDrawer::SetADMColor(ADMColor color)
{
sADMDrawer->SetADMColor(fDrawer, color);
}
inline ADMDrawMode IADMDrawer::GetDrawMode()
{
return sADMDrawer->GetDrawMode(fDrawer);
}
inline void IADMDrawer::SetDrawMode(ADMDrawMode drawMode)
{
sADMDrawer->SetDrawMode(fDrawer, drawMode);
}
inline ADMFont IADMDrawer::GetFont()
{
return sADMDrawer->GetFont(fDrawer);
}
inline void IADMDrawer::SetFont(ADMFont font)
{
sADMDrawer->SetFont(fDrawer, font);
}
inline void IADMDrawer::DrawLine(const IASPoint &startPoint, const IASPoint &endPoint)
{
sADMDrawer->DrawLine(fDrawer, (IASPoint *)&startPoint, (IASPoint *)&endPoint);
}
inline void IADMDrawer::DrawPolygon(const IASPoint *points, int numPoints)
{
sADMDrawer->DrawPolygon(fDrawer, (IASPoint *)points, numPoints);
}
inline void IADMDrawer::FillPolygon(const IASPoint *points, int numPoints)
{
sADMDrawer->FillPolygon(fDrawer, (IASPoint *)points, numPoints);
}
inline void IADMDrawer::DrawRect(const IASRect &rect)
{
sADMDrawer->DrawRect(fDrawer, (IASRect *)&rect);
}
inline void IADMDrawer::FillRect(const IASRect &rect)
{
sADMDrawer->FillRect(fDrawer, (IASRect *)&rect);
}
inline void IADMDrawer::ClearRect(const IASRect &rect)
{
sADMDrawer->ClearRect(fDrawer, (IASRect *)&rect);
}
inline void IADMDrawer::DrawSunkenRect(const IASRect &rect)
{
sADMDrawer->DrawSunkenRect(fDrawer, (IASRect *)&rect);
}
inline void IADMDrawer::DrawRaisedRect(const IASRect &rect)
{
sADMDrawer->DrawRaisedRect(fDrawer, (IASRect *)&rect);
}
inline void IADMDrawer::InvertRect(const IASRect &rect)
{
sADMDrawer->InvertRect(fDrawer, (IASRect *)&rect);
}
inline void IADMDrawer::DrawOval(const IASRect &rect)
{
sADMDrawer->DrawOval(fDrawer, (IASRect *)&rect);
}
inline void IADMDrawer::FillOval(const IASRect &rect)
{
sADMDrawer->FillOval(fDrawer, (IASRect *)&rect);
}
inline AGMPort* IADMDrawer::GetAGMPort()
{
return (AGMPort*) sADMDrawer->GetAGMPort(fDrawer);
}
inline void IADMDrawer::DrawAGMImage(AGMImageRecord *image, AGMFixedMatrix *matrix, long flags)
{
sADMDrawer->DrawAGMImage(fDrawer, (struct _t_AGMImageRecord *)image, (struct _t_AGMFixedMatrix *)matrix, flags);
}
inline void IADMDrawer::DrawADMImage(ADMImageRef image, const IASPoint &topLeftPoint)
{
sADMDrawer->DrawADMImage(fDrawer, image, (IASPoint *)&topLeftPoint);
}
inline void IADMDrawer::DrawADMImageCentered(ADMImageRef image, const IASRect &rect)
{
sADMDrawer->DrawADMImageCentered(fDrawer, image, (IASRect *)&rect);
}
inline void IADMDrawer::DrawResPicture(SPPlugin *pluginRef, int resID, const IASPoint &topLeftPoint, ADMRecolorStyle style)
{
sADMDrawer->DrawRecoloredResPicture(fDrawer, pluginRef, resID, (IASPoint *)&topLeftPoint, style);
}
inline void IADMDrawer::DrawResPictureCentered(SPPlugin *pluginRef, int resID, const IASRect &rect, ADMRecolorStyle style)
{
sADMDrawer->DrawRecoloredResPictureCentered(fDrawer, pluginRef, resID, (IASRect *)&rect, style);
}
inline void IADMDrawer::DrawIcon(ADMIconRef icon, const IASPoint &topLeftPoint, ADMRecolorStyle style)
{
sADMDrawer->DrawRecoloredIcon(fDrawer, icon, (IASPoint *)&topLeftPoint, style);
}
inline void IADMDrawer::DrawIconCentered(ADMIconRef icon, const IASRect &rect, ADMRecolorStyle style)
{
sADMDrawer->DrawRecoloredIconCentered(fDrawer, icon, (IASRect *)&rect, style);
}
inline void IADMDrawer::GetResPictureBounds(struct SPPlugin *pluginRef, int resID, IASRect &boundsRect)
{
sADMDrawer->GetResPictureBounds(fDrawer, pluginRef, resID, (IASRect *)&boundsRect);
}
inline int IADMDrawer::GetTextWidth(const char *text)
{
return sADMDrawer->GetTextWidth(fDrawer, (char *)text);
}
inline void IADMDrawer::GetFontInfo(const ADMFontInfo &fontInfo)
{
sADMDrawer->GetFontInfo(fDrawer, (ADMFontInfo*)&fontInfo);
}
inline void IADMDrawer::DrawText(const char *text, const IASPoint &point)
{
sADMDrawer->DrawText(fDrawer, (char *)text, (IASPoint *)&point);
}
inline void IADMDrawer::DrawTextLeft(const char *text, const IASRect &rect)
{
sADMDrawer->DrawTextLeft(fDrawer, (char *)text, (IASRect *)&rect);
}
inline void IADMDrawer::DrawTextCentered(const char *text, const IASRect &rect)
{
sADMDrawer->DrawTextCentered(fDrawer, (char *)text, (IASRect *)&rect);
}
inline void IADMDrawer::DrawTextRight(const char *text, const IASRect &rect)
{
sADMDrawer->DrawTextRight(fDrawer, (char *)text, (IASRect *)&rect);
}
inline void IADMDrawer::DrawUpArrow(const IASRect &rect)
{
sADMDrawer->DrawUpArrow(fDrawer, (IASRect *)&rect);
}
inline void IADMDrawer::DrawDownArrow(const IASRect &rect)
{
sADMDrawer->DrawDownArrow(fDrawer, (IASRect *)&rect);
}
inline void IADMDrawer::DrawLeftArrow(const IASRect &rect)
{
sADMDrawer->DrawLeftArrow(fDrawer, (IASRect *)&rect);
}
inline void IADMDrawer::DrawRightArrow(const IASRect &rect)
{
sADMDrawer->DrawRightArrow(fDrawer, (IASRect *)&rect);
}
#endif
@@ -0,0 +1,360 @@
/*
* Name:
* IADMEntry.hpp
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Adobe Dialog Manager Entry Interface Class.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 5/7/1996 DL First version.
* Created by Dave Lazarony.
*/
#ifndef __IADMEntry_hpp__
#define __IADMEntry_hpp__
/*
* Includes
*/
#ifndef __ADMEntry__
#include "ADMEntry.h"
#endif
#ifndef __IASTypes_hpp__
#include "IASTypes.hpp"
#endif
/*
* Global Suite Pointer
*/
extern "C" ADMEntrySuite *sADMEntry;
/*
* Interface Wrapper Class
*/
class IADMEntry
{
protected:
ADMEntry *fEntry;
public:
IADMEntry();
IADMEntry(ADMEntryRef entry);
IADMEntry(int nilEntry);
operator ADMEntryRef(void);
void SendNotify(const char *notifierType = nil);
int GetIndex();
ADMListRef GetList();
void SetID(int entryID);
int GetID();
void SetUserData(ADMUserData data);
ADMUserData GetUserData();
void Select(ASBoolean show = true);
void Deselect();
ASBoolean IsSelected();
void MakeInBounds();
ASBoolean IsInBounds();
void Enable(ASBoolean enable = true);
void Disable();
ASBoolean IsEnabled();
void Activate(ASBoolean activate = true);
void Deactivate();
ASBoolean IsActive();
void Check(ASBoolean check = true);
void Uncheck();
ASBoolean IsChecked();
void MakeSeparator(ASBoolean separator);
ASBoolean IsSeparator();
void GetLocalRect(IASRect &localRect);
void GetBoundsRect(IASRect &boundsRect);
void LocalToScreenPoint(IASPoint &point);
void ScreenToLocalPoint(IASPoint &point);
void LocalToScreenRect(IASRect &rect);
void ScreenToLocalRect(IASRect &rect);
void Invalidate();
void Update();
void SetPictureID(int pictureResID);
int GetPictureID();
void SetSelectedPictureID(int pictureResID);
int GetSelectedPictureID();
void SetDisabledPictureID(int pictureResID);
int GetDisabledPictureID();
void SetText(const char *text);
void GetText(char *text, int maxLength);
int GetTextLength();
ADMTimerRef CreateTimer(unsigned long milliseconds,
ADMActionMask abortMask,
ADMEntryTimerProc timerProc,
ADMEntryTimerAbortProc abortProc);
void AbortTimer(ADMTimerRef timer);
};
inline IADMEntry::IADMEntry()
{
}
inline IADMEntry::IADMEntry(ADMEntryRef entry)
{
fEntry = entry;
}
inline IADMEntry::IADMEntry(int nilEntry)
{
if (nilEntry == nil)
fEntry = (ADMEntry *)nilEntry;
}
inline IADMEntry::operator ADMEntryRef(void)
{
return fEntry;
}
inline void IADMEntry::SendNotify(const char *notifierType)
{
sADMEntry->SendNotify(fEntry, (char *)notifierType);
}
inline int IADMEntry::GetIndex()
{
return sADMEntry->GetIndex(fEntry);
}
inline ADMListRef IADMEntry::GetList()
{
return sADMEntry->GetList(fEntry);
}
inline void IADMEntry::SetID(int entryID)
{
sADMEntry->SetID(fEntry, entryID);
}
inline int IADMEntry::GetID()
{
return sADMEntry->GetID(fEntry);
}
inline void IADMEntry::SetUserData(ADMUserData data)
{
sADMEntry->SetUserData(fEntry, data);
}
inline ADMUserData IADMEntry::GetUserData()
{
return sADMEntry->GetUserData(fEntry);
}
inline void IADMEntry::Select(ASBoolean show)
{
sADMEntry->Select(fEntry, show);
}
inline void IADMEntry::Deselect()
{
sADMEntry->Select(fEntry, false);
}
inline ASBoolean IADMEntry::IsSelected()
{
return sADMEntry->IsSelected(fEntry);
}
inline void IADMEntry::MakeInBounds()
{
sADMEntry->MakeInBounds(fEntry);
}
inline ASBoolean IADMEntry::IsInBounds()
{
return sADMEntry->IsInBounds(fEntry);
}
inline void IADMEntry::Enable(ASBoolean enable)
{
sADMEntry->Enable(fEntry, enable);
}
inline void IADMEntry::Disable()
{
sADMEntry->Enable(fEntry, false);
}
inline ASBoolean IADMEntry::IsEnabled()
{
return sADMEntry->IsEnabled(fEntry);
}
inline void IADMEntry::Activate(ASBoolean activate)
{
sADMEntry->Activate(fEntry, activate);
}
inline void IADMEntry::Deactivate()
{
sADMEntry->Activate(fEntry, false);
}
inline ASBoolean IADMEntry::IsActive()
{
return sADMEntry->IsActive(fEntry);
}
inline void IADMEntry::Check(ASBoolean check)
{
sADMEntry->Check(fEntry, check);
}
inline void IADMEntry::Uncheck()
{
sADMEntry->Check(fEntry, false);
}
inline ASBoolean IADMEntry::IsChecked()
{
return sADMEntry->IsChecked(fEntry);
}
inline void IADMEntry::MakeSeparator(ASBoolean separator)
{
sADMEntry->MakeSeparator(fEntry, separator);
}
inline ASBoolean IADMEntry::IsSeparator()
{
return sADMEntry->IsSeparator(fEntry);
}
inline void IADMEntry::GetLocalRect(IASRect &localRect)
{
sADMEntry->GetLocalRect(fEntry, (ASRect *)&localRect);
}
inline void IADMEntry::GetBoundsRect(IASRect &boundsRect)
{
sADMEntry->GetBoundsRect(fEntry, (ASRect *)&boundsRect);
}
inline void IADMEntry::LocalToScreenPoint(IASPoint &point)
{
sADMEntry->LocalToScreenPoint(fEntry, (ASPoint *)&point);
}
inline void IADMEntry::ScreenToLocalPoint(IASPoint &point)
{
sADMEntry->ScreenToLocalPoint(fEntry, (ASPoint *)&point);
}
inline void IADMEntry::LocalToScreenRect(IASRect &rect)
{
sADMEntry->LocalToScreenRect(fEntry, (ASRect *)&rect);
}
inline void IADMEntry::ScreenToLocalRect(IASRect &rect)
{
sADMEntry->ScreenToLocalRect(fEntry, (ASRect *)&rect);
}
inline void IADMEntry::Invalidate()
{
sADMEntry->Invalidate(fEntry);
}
inline void IADMEntry::Update()
{
sADMEntry->Update(fEntry);
}
inline void IADMEntry::SetPictureID(int pictureResID)
{
sADMEntry->SetPictureID(fEntry, pictureResID);
}
inline int IADMEntry::GetPictureID()
{
return sADMEntry->GetPictureID(fEntry);
}
inline void IADMEntry::SetSelectedPictureID(int pictureResID)
{
sADMEntry->SetSelectedPictureID(fEntry, pictureResID);
}
inline int IADMEntry::GetSelectedPictureID()
{
return sADMEntry->GetSelectedPictureID(fEntry);
}
inline void IADMEntry::SetDisabledPictureID(int pictureResID)
{
sADMEntry->SetDisabledPictureID(fEntry, pictureResID);
}
inline int IADMEntry::GetDisabledPictureID()
{
return sADMEntry->GetDisabledPictureID(fEntry);
}
inline void IADMEntry::SetText(const char *text)
{
sADMEntry->SetText(fEntry, (char *)text);
}
inline void IADMEntry::GetText(char *text, int maxLength = 0)
{
sADMEntry->GetText(fEntry, text, maxLength);
}
inline int IADMEntry::GetTextLength()
{
return sADMEntry->GetTextLength(fEntry);
}
inline ADMTimerRef IADMEntry::CreateTimer(unsigned long milliseconds,
ADMActionMask abortMask, ADMEntryTimerProc timerProc,
ADMEntryTimerAbortProc abortProc)
{
return sADMEntry->CreateTimer(fEntry, milliseconds,
abortMask, timerProc, abortProc);
}
inline void IADMEntry::AbortTimer(ADMTimerRef timer)
{
sADMEntry->AbortTimer(fEntry, timer);
}
#endif
@@ -0,0 +1,562 @@
/*
* Name:
* IADMHierarchyList.hpp
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Adobe Dialog Manager Hierarchy List Interface Class.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 10/17/1997 WH First version.
* Created by Wei Huang.
*/
#ifndef __IADMHierarchyList_hpp__
#define __IADMHierarchyList_hpp__
/*
* Includes
*/
#ifndef __ADMHierarchyList__
#include "ADMHierarchyList.h"
#endif
#ifndef __IASTypes_hpp__
#include "IASTypes.hpp"
#endif
/*
* Global Suite Pointer
*/
extern "C" ADMHierarchyListSuite *sADMHierarchyList;
/*
* Interface Wrapper Class
*/
class IADMHierarchyList
{
protected:
ADMHierarchyList *fList;
public:
IADMHierarchyList();
IADMHierarchyList(ADMHierarchyListRef list);
IADMHierarchyList(int nilList);
operator ADMHierarchyListRef(void);
void SetMenuID(int menuResID);
int GetMenuID();
ADMItemRef GetItem();
void SetEntryWidth(int width);
void SetEntryWidthRecursive(int width);
int GetEntryWidth();
int GetNonLeafEntryWidth();
void SetEntryHeight(int height);
void SetEntryHeightRecursive(int height);
int GetEntryHeight();
void SetEntryTextRect(const IASRect &rect);
void SetEntryTextRectRecursive(const IASRect &rect);
void GetEntryTextRect(IASRect &rect);
void SetNonLeafEntryTextRect(const IASRect &rect);
void SetNonLeafEntryTextRectRecursive(const IASRect &rect);
void GetNonLeafEntryTextRect(const IASRect &rect);
ADMListEntryRef InsertEntry(int index);
void RemoveEntry(int index);
ADMListEntryRef GetEntry(int entryID);
ADMListEntryRef IndexEntry(int index);
ADMListEntryRef FindEntry(const char *text);
ADMListEntryRef PickEntry(const ASPoint &point);
ADMListEntryRef PickLeafEntry(const ASPoint &point);
ADMListEntryRef GetActiveEntry();
ADMListEntryRef GetActiveLeafEntry();
int NumberOfEntries();
// Number of selected entries in the current hierarchical level
int NumberOfSelectedEntries();
// Number of all selected entries in the hierarchy.
// If b is a's child, and both are selected, then both will count.
int NumberOfAllSelectedEntriesInHierarchy();
// If b is a's child, and both are selected, only a will count.
int NumberOfUnNestedSelectedEntriesInHierarchy();
// Find the selected entry in the current hierarchical level
// Correspond to NumberOfSelectedEntries().
ADMListEntryRef IndexSelectedEntry(int selectionIndex);
// Find the selected entry in the entire hierarchy.
// Correspond to NumberOfAllSelectedEntriesInHierarchy().
ADMListEntryRef IndexAllSelectedEntriesInHierarchy(int selectionIndex);
// Correspond to NumberOfUnNestedSelectedEntriesInHierarchy().
ADMListEntryRef IndexUnNestedSelectedEntriesInHierarchy(int selectionIndex);
void SetMask(ADMActionMask mask);
void SetMaskRecursive(ADMActionMask mask);
ADMActionMask GetMask();
void SetNotifierData(ADMUserData data);
ADMUserData GetNotifierData();
ADMListEntryRef GetParentEntry();
void GetLocalRect(IASRect &rect);
void LocalToScreenPoint(IASPoint &point);
void ScreenToLocalPoint(IASPoint &point);
void LocalToGlobalPoint(IASPoint &point);
void GlobalToLocalPoint(IASPoint &point);
void LocalToGlobalRect(IASRect &rect);
void GlobalToLocalRect(IASRect &rect);
void SetIndentationWidth(int width);
void SetIndentationWidthRecursive(int width);
int GetIndentationWidth();
void SetLocalLeftMargin(int margin);
int GetLocalLeftMargin();
int GetGlobalLeftMargin();
void SetDivided(ASBoolean divided);
void SetDividedRecursive(ASBoolean divided);
ASBoolean GetDivided();
void SetFlags(int flags);
void SetFlagsRecursive(int flags);
ASBoolean GetFlags();
void Invalidate();
void SetInitProc(ADMListEntryInitProc initProc);
void SetInitProcRecursive(ADMListEntryInitProc initProc);
ADMListEntryInitProc GetInitProc();
void SetDrawProc(ADMListEntryDrawProc drawProc);
void SetDrawProcRecursive(ADMListEntryDrawProc drawProc);
ADMListEntryDrawProc GetDrawProc();
void SetTrackProc(ADMListEntryTrackProc trackProc);
void SetTrackProcRecursive(ADMListEntryTrackProc trackProc);
ADMListEntryTrackProc GetTrackProc();
void SetNotifyProc(ADMListEntryNotifyProc notifyProc);
void SetNotifyProcRecursive(ADMListEntryNotifyProc notifyProc);
ADMListEntryNotifyProc GetNotifyProc();
void SetDestroyProc(ADMListEntryDestroyProc destroyProc);
void SetDestroyProcRecursive(ADMListEntryDestroyProc destroyProc);
ADMListEntryDestroyProc GetDestroyProc();
};
inline IADMHierarchyList::IADMHierarchyList()
{
}
inline IADMHierarchyList::IADMHierarchyList(ADMHierarchyListRef list)
{
fList = list;
}
inline IADMHierarchyList::IADMHierarchyList(int nilList)
{
if (nilList == nil)
fList = (ADMHierarchyList *)nilList;
}
inline IADMHierarchyList::operator ADMHierarchyListRef(void)
{
return fList;
}
inline void IADMHierarchyList::SetMenuID(int menuResID)
{
sADMHierarchyList->SetMenuID(fList, menuResID);
}
inline int IADMHierarchyList::GetMenuID()
{
return sADMHierarchyList->GetMenuID(fList);
}
inline ADMItemRef IADMHierarchyList::GetItem()
{
return sADMHierarchyList->GetItem(fList);
}
inline void IADMHierarchyList::SetEntryWidth(int width)
{
sADMHierarchyList->SetEntryWidth(fList, width);
}
inline void IADMHierarchyList::SetEntryWidthRecursive(int width)
{
sADMHierarchyList->SetEntryWidthRecursive(fList, width);
}
inline int IADMHierarchyList::GetEntryWidth()
{
return sADMHierarchyList->GetEntryWidth(fList);
}
inline int IADMHierarchyList::GetNonLeafEntryWidth()
{
return sADMHierarchyList->GetNonLeafEntryWidth(fList);
}
inline void IADMHierarchyList::SetEntryHeight(int height)
{
sADMHierarchyList->SetEntryHeight(fList, height);
}
inline void IADMHierarchyList::SetEntryHeightRecursive(int height)
{
sADMHierarchyList->SetEntryHeightRecursive(fList, height);
}
inline int IADMHierarchyList::GetEntryHeight()
{
return sADMHierarchyList->GetEntryHeight(fList);
}
inline void IADMHierarchyList::SetEntryTextRect(const IASRect &rect)
{
sADMHierarchyList->SetEntryTextRect(fList, (ASRect *)&rect);
}
inline void IADMHierarchyList::SetEntryTextRectRecursive(const IASRect &rect)
{
sADMHierarchyList->SetEntryTextRectRecursive(fList, (ASRect *)&rect);
}
inline void IADMHierarchyList::GetEntryTextRect(IASRect &rect)
{
sADMHierarchyList->GetEntryTextRect(fList, &rect);
}
inline void IADMHierarchyList::SetNonLeafEntryTextRect(const IASRect &rect)
{
sADMHierarchyList->SetNonLeafEntryTextRect(fList, (ASRect *)&rect);
}
inline void IADMHierarchyList::SetNonLeafEntryTextRectRecursive(const IASRect &rect)
{
sADMHierarchyList->SetNonLeafEntryTextRectRecursive(fList, (ASRect *)&rect);
}
inline void IADMHierarchyList::GetNonLeafEntryTextRect(const IASRect &rect)
{
sADMHierarchyList->GetNonLeafEntryTextRect(fList, (ASRect *)&rect);
}
inline ADMListEntryRef IADMHierarchyList::InsertEntry(int index)
{
return sADMHierarchyList->InsertEntry(fList, index);
}
inline void IADMHierarchyList::RemoveEntry(int index)
{
sADMHierarchyList->RemoveEntry(fList, index);
}
inline ADMListEntryRef IADMHierarchyList::GetEntry(int entryID)
{
return sADMHierarchyList->GetEntry(fList, entryID);
}
inline ADMListEntryRef IADMHierarchyList::IndexEntry(int index)
{
return sADMHierarchyList->IndexEntry(fList, index);
}
inline ADMListEntryRef IADMHierarchyList::FindEntry(const char *text)
{
return sADMHierarchyList->FindEntry(fList, (char *)text);
}
inline ADMListEntryRef IADMHierarchyList::PickEntry(const ASPoint &point)
{
return sADMHierarchyList->PickEntry(fList, (ASPoint *)&point);
}
inline ADMListEntryRef IADMHierarchyList::PickLeafEntry(const ASPoint &point)
{
return sADMHierarchyList->PickLeafEntry(fList, (ASPoint *)&point);
}
inline ADMListEntryRef IADMHierarchyList::GetActiveEntry()
{
return sADMHierarchyList->GetActiveEntry(fList);
}
inline ADMListEntryRef IADMHierarchyList::GetActiveLeafEntry()
{
return sADMHierarchyList->GetActiveLeafEntry(fList);
}
inline int IADMHierarchyList::NumberOfEntries()
{
return sADMHierarchyList->NumberOfEntries(fList);
}
inline int IADMHierarchyList::NumberOfSelectedEntries()
{
return sADMHierarchyList->NumberOfSelectedEntries(fList);
}
inline int IADMHierarchyList::NumberOfAllSelectedEntriesInHierarchy()
{
return sADMHierarchyList->NumberOfAllSelectedEntriesInHierarchy(fList);
}
inline int IADMHierarchyList::NumberOfUnNestedSelectedEntriesInHierarchy()
{
return sADMHierarchyList->NumberOfUnNestedSelectedEntriesInHierarchy(fList);
}
inline ADMListEntryRef IADMHierarchyList::IndexSelectedEntry(int selectionIndex)
{
return sADMHierarchyList->IndexSelectedEntry(fList, selectionIndex);
}
inline ADMListEntryRef IADMHierarchyList::IndexAllSelectedEntriesInHierarchy(int selectionIndex)
{
return sADMHierarchyList->IndexAllSelectedEntriesInHierarchy(fList, selectionIndex);
}
inline ADMListEntryRef IADMHierarchyList::IndexUnNestedSelectedEntriesInHierarchy(int selectionIndex)
{
return sADMHierarchyList->IndexUnNestedSelectedEntriesInHierarchy(fList, selectionIndex);
}
inline void IADMHierarchyList::SetMask(ADMActionMask mask)
{
sADMHierarchyList->SetMask(fList, mask);
}
inline void IADMHierarchyList::SetMaskRecursive(ADMActionMask mask)
{
sADMHierarchyList->SetMaskRecursive(fList, mask);
}
inline ADMActionMask IADMHierarchyList::GetMask()
{
return sADMHierarchyList->GetMask(fList);
}
inline void IADMHierarchyList::SetNotifierData(ADMUserData data)
{
sADMHierarchyList->SetNotifierData(fList, data);
}
inline ADMUserData IADMHierarchyList::GetNotifierData()
{
return sADMHierarchyList->GetNotifierData(fList);
}
inline ADMListEntryRef IADMHierarchyList::GetParentEntry()
{
return sADMHierarchyList->GetParentEntry(fList);
}
inline void IADMHierarchyList::GetLocalRect(IASRect &rect)
{
sADMHierarchyList->GetLocalRect(fList, (ASRect *)&rect);
}
inline void IADMHierarchyList::LocalToScreenPoint(IASPoint &point)
{
sADMHierarchyList->LocalToScreenPoint(fList, (ASPoint *)&point);
}
inline void IADMHierarchyList::ScreenToLocalPoint(IASPoint &point)
{
sADMHierarchyList->ScreenToLocalPoint(fList, (ASPoint *)&point);
}
inline void IADMHierarchyList::LocalToGlobalPoint(IASPoint &point)
{
sADMHierarchyList->LocalToGlobalPoint(fList, (ASPoint *)&point);
}
inline void IADMHierarchyList::GlobalToLocalPoint(IASPoint &point)
{
sADMHierarchyList->GlobalToLocalPoint(fList, (ASPoint *)&point);
}
inline void IADMHierarchyList::LocalToGlobalRect(IASRect &rect)
{
sADMHierarchyList->LocalToGlobalRect(fList, (ASRect *)&rect);
}
inline void IADMHierarchyList::GlobalToLocalRect(IASRect &rect)
{
sADMHierarchyList->GlobalToLocalRect(fList, (ASRect *)&rect);
}
inline void IADMHierarchyList::SetIndentationWidth(int width)
{
sADMHierarchyList->SetIndentationWidth(fList, width);
}
inline void IADMHierarchyList::SetIndentationWidthRecursive(int width)
{
sADMHierarchyList->SetIndentationWidthRecursive(fList, width);
}
inline int IADMHierarchyList::GetIndentationWidth()
{
return sADMHierarchyList->GetIndentationWidth(fList);
}
inline void IADMHierarchyList::SetLocalLeftMargin(int margin)
{
sADMHierarchyList->SetLocalLeftMargin(fList, margin);
}
inline int IADMHierarchyList::GetLocalLeftMargin()
{
return sADMHierarchyList->GetLocalLeftMargin(fList);
}
inline int IADMHierarchyList::GetGlobalLeftMargin()
{
return sADMHierarchyList->GetGlobalLeftMargin(fList);
}
inline void IADMHierarchyList::SetDivided(ASBoolean divided)
{
sADMHierarchyList->SetDivided(fList, divided);
}
inline void IADMHierarchyList::SetDividedRecursive(ASBoolean divided)
{
sADMHierarchyList->SetDividedRecursive(fList, divided);
}
inline ASBoolean IADMHierarchyList::GetDivided()
{
return sADMHierarchyList->GetDivided(fList);
}
inline void IADMHierarchyList::SetFlags(int flags)
{
sADMHierarchyList->SetFlags(fList, flags);
}
inline void IADMHierarchyList::SetFlagsRecursive(int flags)
{
sADMHierarchyList->SetFlagsRecursive(fList, flags);
}
inline ASBoolean IADMHierarchyList::GetFlags()
{
return sADMHierarchyList->GetFlags(fList);
}
inline void IADMHierarchyList::Invalidate()
{
sADMHierarchyList->Invalidate(fList);
}
inline void IADMHierarchyList::SetInitProc(ADMListEntryInitProc initProc)
{
sADMHierarchyList->SetInitProc(fList, initProc);
}
inline void IADMHierarchyList::SetInitProcRecursive(ADMListEntryInitProc initProc)
{
sADMHierarchyList->SetInitProcRecursive(fList, initProc);
}
inline ADMListEntryInitProc IADMHierarchyList::GetInitProc()
{
return sADMHierarchyList->GetInitProc(fList);
}
inline void IADMHierarchyList::SetDrawProc(ADMListEntryDrawProc drawProc)
{
sADMHierarchyList->SetDrawProc(fList, drawProc);
}
inline void IADMHierarchyList::SetDrawProcRecursive(ADMListEntryDrawProc drawProc)
{
sADMHierarchyList->SetDrawProcRecursive(fList, drawProc);
}
inline ADMListEntryDrawProc IADMHierarchyList::GetDrawProc()
{
return sADMHierarchyList->GetDrawProc(fList);
}
inline void IADMHierarchyList::SetTrackProc(ADMListEntryTrackProc trackProc)
{
sADMHierarchyList->SetTrackProc(fList, trackProc);
}
inline void IADMHierarchyList::SetTrackProcRecursive(ADMListEntryTrackProc trackProc)
{
sADMHierarchyList->SetTrackProcRecursive(fList, trackProc);
}
inline ADMListEntryTrackProc IADMHierarchyList::GetTrackProc()
{
return sADMHierarchyList->GetTrackProc(fList);
}
inline void IADMHierarchyList::SetNotifyProc(ADMListEntryNotifyProc notifyProc)
{
sADMHierarchyList->SetNotifyProc(fList, notifyProc);
}
inline void IADMHierarchyList::SetNotifyProcRecursive(ADMListEntryNotifyProc notifyProc)
{
sADMHierarchyList->SetNotifyProcRecursive(fList, notifyProc);
}
inline ADMListEntryNotifyProc IADMHierarchyList::GetNotifyProc()
{
return sADMHierarchyList->GetNotifyProc(fList);
}
inline void IADMHierarchyList::SetDestroyProc(ADMListEntryDestroyProc destroyProc)
{
sADMHierarchyList->SetDestroyProc(fList, destroyProc);
}
inline void IADMHierarchyList::SetDestroyProcRecursive(ADMListEntryDestroyProc destroyProc)
{
sADMHierarchyList->SetDestroyProc(fList, destroyProc);
}
inline ADMListEntryDestroyProc IADMHierarchyList::GetDestroyProc()
{
return sADMHierarchyList->GetDestroyProc(fList);
}
#endif
@@ -0,0 +1,73 @@
/*
* Name:
* IADMIcon.hpp
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* IADMIcon Class.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 6/15/1996 DL First version.
* Created by Paul Asente.
*/
#ifndef __IADMIcon_hpp__
#define __IADMIcon_hpp__
/*
* Includes
*/
#ifndef __ADMIcon__
#include "ADMIcon.h"
#endif
/*
* Global Suite Pointer
*/
extern ADMIconSuite *sADMIcon;
/*
* Wrapper Class
*/
class IADMIcon
{
private:
ADMIconRef fIcon;
public:
IADMIcon(ADMIconType type, int width, int height, void *data)
{ fIcon = sADMIcon->Create(type, width, height, data); }
IADMIcon(SPPluginRef pluginRef, int iconID, int iconIndex)
{ fIcon = sADMIcon->GetFromResource(pluginRef, iconID, iconIndex); }
~IADMIcon() { sADMIcon->Destroy(fIcon); }
IADMIcon(ADMIconRef icon) { fIcon = icon; }
operator ADMIconRef() { return fIcon; }
ADMIconType GetType() { return sADMIcon->GetType(fIcon); }
int GetWidth() { return sADMIcon->GetWidth(fIcon); }
int GetHeight() { return sADMIcon->GetHeight(fIcon); }
void *GetData() { return sADMIcon->GetData(fIcon); }
ASBoolean IsFromResource() { return sADMIcon->IsFromResource(fIcon); }
};
#endif
@@ -0,0 +1,164 @@
/*
* Name:
* IADMImage.hpp
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* IADMImage Class.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 11/20/96 DL First version.
* Created by Dave Lazarony.
*/
#ifndef __IADMImage_hpp__
#define __IADMImage_hpp__
/*
* Includes
*/
#ifndef __ADMImage__
#include "ADMImage.h"
#endif
#ifndef __IADMDrawer_hpp__
#include "IADMDrawer.hpp"
#endif
/*
* Global Suite Pointer
*/
extern "C" ADMImageSuite *sADMImage;
/*
* Wrapper Class
*/
class IADMImage
{
private:
ADMImageRef fImage;
public:
IADMImage();
IADMImage(ADMImageRef Image);
IADMImage(int nilImage);
operator ADMImageRef();
int GetWidth();
int GetHeight();
int GetByteWidth();
int GetBitsPerPixel();
ASByte *BeginBaseAddressAccess();
void EndBaseAddressAccess();
IADMDrawer BeginADMDrawer();
void EndADMDrawer();
void BeginAGMImageAccess(struct _t_AGMImageRecord *imageRecord);
void EndAGMImageAccess();
ASErr GetPixel(const IASPoint &point, ASRGBColor &color);
ASErr SetPixel(const IASPoint &point, const ASRGBColor &color);
};
inline IADMImage::IADMImage()
{
fImage = nil;
}
inline IADMImage::IADMImage(ADMImageRef Image)
{
fImage = Image;
}
inline IADMImage::IADMImage(int nilImage)
{
if (nilImage == nil)
fImage = (ADMImage *)nilImage;
}
inline IADMImage::operator ADMImageRef()
{
return fImage;
}
inline int IADMImage::GetWidth()
{
return sADMImage->GetWidth(fImage);
}
inline int IADMImage::GetHeight()
{
return sADMImage->GetHeight(fImage);
}
inline int IADMImage::GetByteWidth()
{
return sADMImage->GetByteWidth(fImage);
}
inline int IADMImage::GetBitsPerPixel()
{
return sADMImage->GetBitsPerPixel(fImage);
}
inline ASByte *IADMImage::BeginBaseAddressAccess()
{
return sADMImage->BeginBaseAddressAccess(fImage);
}
inline void IADMImage::EndBaseAddressAccess()
{
sADMImage->EndBaseAddressAccess(fImage);
}
inline IADMDrawer IADMImage::BeginADMDrawer()
{
return sADMImage->BeginADMDrawer(fImage);
}
inline void IADMImage::EndADMDrawer()
{
sADMImage->EndADMDrawer(fImage);
}
inline void IADMImage::BeginAGMImageAccess(struct _t_AGMImageRecord *imageRecord)
{
sADMImage->BeginAGMImageAccess(fImage, imageRecord);
}
inline void IADMImage::EndAGMImageAccess()
{
sADMImage->EndAGMImageAccess(fImage);
}
inline ASErr IADMImage::GetPixel(const IASPoint &point, ASRGBColor &color)
{
return sADMImage->GetPixel(fImage, (ASPoint *)&point, &color);
}
inline ASErr IADMImage::SetPixel(const IASPoint &point, const ASRGBColor &color)
{
return sADMImage->SetPixel(fImage, (ASPoint *)&point, (ASRGBColor *)&color);
}
#endif
@@ -0,0 +1,880 @@
/*
* Name:
* IADMItem.hpp
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Adobe Dialog Manager Item Interface Class.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 3/6/1996 DL First version.
* Created by Dave Lazarony.
*/
#ifndef __IADMItem_hpp__
#define __IADMItem_hpp__
/*
* Includes
*/
#ifndef __ADMItem__
#include "ADMItem.h"
#endif
#ifndef __IASTypes_hpp__
#include "IASTypes.hpp"
#endif
// Stupid Macintosh Headers #define GetItem.
#ifdef GetItem
#undef GetItem
#endif
/*
* Global Suite Pointer
*/
extern "C" ADMItemSuite *sADMItem;
/*
* Interface Wrapper Class
*/
class IADMItem
{
protected:
ADMItem *fItem;
public:
IADMItem();
IADMItem(ADMItemRef item);
IADMItem(int nilItem);
operator ADMItemRef(void);
void SendNotify(const char *notifierType = nil);
void SetNotifyProc(ADMItemNotifyProc proc);
int GetID();
ADMDialogRef GetDialog();
ASWindowRef GetWindowRef();
ADMListRef GetList();
ADMHierarchyListRef GetHierarchyList();
SPPluginRef GetPluginRef();
void SetPluginRef(SPPluginRef pluginRef);
void SetItemType(ADMItemType type);
ADMItemType GetItemType();
void SetItemStyle(ADMItemStyle style);
ADMItemStyle GetItemStyle();
void Show(ASBoolean show = true);
void Hide();
ASBoolean IsVisible();
void Enable(ASBoolean enable = true);
void Disable();
ASBoolean IsEnabled();
void Activate(ASBoolean activate = true);
void Deactivate();
ASBoolean IsActive();
void Known(ASBoolean known = true);
void Unknown();
ASBoolean IsKnown();
void SetLocalRect(const IASRect &localRect);
void GetLocalRect(IASRect &localRect);
void SetBoundsRect(const IASRect &boundsRect);
void GetBoundsRect(IASRect &boundsRect);
void Move(int x, int y);
void Size(int width, int height);
void LocalToScreenPoint(IASPoint &point);
void ScreenToLocalPoint(IASPoint &point);
void LocalToScreenRect(IASRect &rect);
void ScreenToLocalRect(IASRect &rect);
void Invalidate();
void Update();
void SetCursorID(int cursorResID);
int GetCursorID();
void GetCursorID(SPPluginRef *pluginRef, int *cursorID);
ADMFont GetFont();
void SetFont(ADMFont font);
void SetPictureID(int pictureResID);
int GetPictureID();
void SetSelectedPictureID(int pictureResID);
int GetSelectedPictureID();
void SetDisabledPictureID(int pictureResID);
int GetDisabledPictureID();
void SetMask(ADMActionMask mask);
ADMActionMask GetMask();
void SetUserData(ADMUserData data);
ADMUserData GetUserData();
void SetNotifierData(ADMUserData data);
ADMUserData GetNotifierData();
ADMTimerRef CreateTimer(unsigned long milliseconds,
ADMActionMask abortMask,
ADMItemTimerProc timerProc,
ADMItemTimerAbortProc abortProc);
void AbortTimer(ADMTimerRef timer);
/*
* Text
*/
void SetText(const char *);
void GetText(char *, int maxLength = 0);
int GetTextLength();
void SetMaxTextLength(int length);
int GetMaxTextLength();
void SelectAll();
void SetSelectionRange(int selStart, int selEnd);
void GetSelectionRange(int &selStart, int &selEnd);
void SetJustify(ADMJustify justify);
ADMJustify GetJustify();
void SetUnits(ADMUnits units);
ADMUnits GetUnits();
void SetAllowUnits(ASBoolean allow);
ASBoolean GetAllowUnits();
void SetAllowMath(ASBoolean allow);
ASBoolean GetAllowMath();
void ShowUnits(ASBoolean show);
ASBoolean GetShowUnits();
void SetFloatToTextProc(ADMItemFloatToTextProc proc);
ADMItemFloatToTextProc GetFloatToTextProc();
ASBoolean DefaultFloatToText(float value, char *text, int textLength);
void SetTextToFloatProc(ADMItemTextToFloatProc proc);
ADMItemTextToFloatProc GetTextToFloatProc();
ASBoolean DefaultTextToFloat(char *text, float *value);
ASBoolean WasPercentageChange();
/*
* Numerics
*/
void SetPrecision(int numberOfDecimalPlaces);
int GetPrecision();
void SetBooleanValue(ASBoolean value);
ASBoolean GetBooleanValue();
void SetIntValue(int value);
int GetIntValue();
void SetFixedValue(ASFixed value);
IASFixed GetFixedValue();
void SetFloatValue(float value);
float GetFloatValue();
void SetMinIntValue(int value);
int GetMinIntValue();
void SetMinFixedValue(ASFixed value);
IASFixed GetMinFixedValue();
void SetMaxIntValue(int value);
int GetMaxIntValue();
void SetMinFloatValue(float value);
float GetMinFloatValue();
void SetMaxFixedValue(ASFixed value);
IASFixed GetMaxFixedValue();
void SetMaxFloatValue(float value);
float GetMaxFloatValue();
void SetSmallIncrement(float increment);
float GetSmallIncrement();
void SetLargeIncrement(float increment);
float GetLargeIncrement();
ADMItemRef GetChildItem(int childID);
void SetTipString(const char *tipStr);
void GetTipString(char *tipStr, int maxLen);
int GetTipStringLength();
void EnableTip(ASBoolean enable = true);
ASBoolean IsTipEnabled();
void ShowToolTip(ASPoint *where = nil);
void HideToolTip();
void SetHelpID(ASHelpID helpID);
ASHelpID GetHelpID();
void Help();
void GetBestSize(ASPoint *size);
};
inline IADMItem::IADMItem()
{
}
inline IADMItem::IADMItem(ADMItemRef item)
{
fItem = item;
}
inline IADMItem::IADMItem(int nilItem)
{
if (nilItem == nil)
fItem = (ADMItem *)nilItem;
}
inline IADMItem::operator ADMItemRef(void)
{
return fItem;
}
inline void IADMItem::SendNotify(const char *notifierType)
{
sADMItem->SendNotify(fItem, (char *)notifierType);
}
inline void IADMItem::SetNotifyProc(ADMItemNotifyProc proc)
{
sADMItem->SetNotifyProc(fItem, proc);
}
inline int IADMItem::GetID()
{
return sADMItem->GetID(fItem);
}
inline ADMDialogRef IADMItem::GetDialog()
{
return sADMItem->GetDialog(fItem);
}
inline ASWindowRef IADMItem::GetWindowRef()
{
return sADMItem->GetWindowRef(fItem);
}
inline ADMListRef IADMItem::GetList()
{
return sADMItem->GetList(fItem);
}
inline ADMHierarchyListRef IADMItem::GetHierarchyList()
{
return sADMItem->GetHierarchyList(fItem);
}
inline void IADMItem::SetPluginRef(struct SPPlugin *pluginRef)
{
sADMItem->SetPluginRef(fItem, pluginRef);
}
inline struct SPPlugin *IADMItem::GetPluginRef()
{
return sADMItem->GetPluginRef(fItem);
}
inline void IADMItem::SetItemType(ADMItemType type)
{
sADMItem->SetItemType(fItem, type);
}
inline ADMItemType IADMItem::GetItemType()
{
return sADMItem->GetItemType(fItem);
}
inline void IADMItem::SetItemStyle(ADMItemStyle style)
{
sADMItem->SetItemStyle(fItem, style);
}
inline ADMItemStyle IADMItem::GetItemStyle()
{
return sADMItem->GetItemStyle(fItem);
}
inline void IADMItem::Show(ASBoolean show)
{
sADMItem->Show(fItem, show);
}
inline void IADMItem::Hide()
{
sADMItem->Show(fItem, false);
}
inline ASBoolean IADMItem::IsVisible()
{
return sADMItem->IsVisible(fItem);
}
inline void IADMItem::Enable(ASBoolean enable)
{
sADMItem->Enable(fItem, enable);
}
inline void IADMItem::Disable()
{
sADMItem->Enable(fItem, false);
}
inline ASBoolean IADMItem::IsEnabled()
{
return sADMItem->IsEnabled(fItem);
}
inline void IADMItem::Activate(ASBoolean activate)
{
sADMItem->Activate(fItem, activate);
}
inline void IADMItem::Deactivate()
{
sADMItem->Activate(fItem, false);
}
inline ASBoolean IADMItem::IsActive()
{
return sADMItem->IsActive(fItem);
}
inline void IADMItem::Known(ASBoolean known)
{
sADMItem->Known(fItem, known);
}
inline void IADMItem::Unknown()
{
sADMItem->Known(fItem, false);
}
inline ASBoolean IADMItem::IsKnown()
{
return sADMItem->IsKnown(fItem);
}
inline void IADMItem::SetLocalRect(const IASRect &localRect)
{
sADMItem->SetLocalRect(fItem, (IASRect *)&localRect);
}
inline void IADMItem::GetLocalRect(IASRect &localRect)
{
sADMItem->GetLocalRect(fItem, &localRect);
}
inline void IADMItem::SetBoundsRect(const IASRect &boundsRect)
{
sADMItem->SetBoundsRect(fItem, (IASRect *)&boundsRect);
}
inline void IADMItem::GetBoundsRect(IASRect &boundsRect)
{
sADMItem->GetBoundsRect(fItem, &boundsRect);
}
inline void IADMItem::Move(int x, int y)
{
sADMItem->Move(fItem, x, y);
}
inline void IADMItem::Size(int width, int height)
{
sADMItem->Size(fItem, width, height);
}
inline void IADMItem::LocalToScreenPoint(IASPoint &point)
{
sADMItem->LocalToScreenPoint(fItem, (ASPoint *)&point);
}
inline void IADMItem::ScreenToLocalPoint(IASPoint &point)
{
sADMItem->ScreenToLocalPoint(fItem, (ASPoint *)&point);
}
inline void IADMItem::LocalToScreenRect(IASRect &rect)
{
sADMItem->LocalToScreenRect(fItem, (ASRect *)&rect);
}
inline void IADMItem::ScreenToLocalRect(IASRect &rect)
{
sADMItem->ScreenToLocalRect(fItem, (ASRect *)&rect);
}
inline void IADMItem::Invalidate()
{
sADMItem->Invalidate(fItem);
}
inline void IADMItem::Update()
{
sADMItem->Update(fItem);
}
inline void IADMItem::SetCursorID(int cursorResID)
{
sADMItem->SetCursorID(fItem, sADMItem->GetPluginRef(fItem), cursorResID);
}
inline int IADMItem::GetCursorID()
{
int cursorID = 0;
SPPluginRef itsPlugin;
sADMItem->GetCursorID(fItem, &itsPlugin, &cursorID);
return cursorID;
}
inline void IADMItem::GetCursorID(SPPluginRef *plugin, int *cursorResID)
{
*cursorResID = 0;
sADMItem->GetCursorID(fItem, plugin, cursorResID);
}
inline ADMFont IADMItem::GetFont()
{
return sADMItem->GetFont(fItem);
}
inline void IADMItem::SetFont(ADMFont font)
{
sADMItem->SetFont(fItem, font);
}
inline void IADMItem::SetPictureID(int pictureResID)
{
sADMItem->SetPictureID(fItem, pictureResID);
}
inline int IADMItem::GetPictureID()
{
return sADMItem->GetPictureID(fItem);
}
inline void IADMItem::SetSelectedPictureID(int pictureResID)
{
sADMItem->SetSelectedPictureID(fItem, pictureResID);
}
inline int IADMItem::GetSelectedPictureID()
{
return sADMItem->GetSelectedPictureID(fItem);
}
inline void IADMItem::SetDisabledPictureID(int pictureResID)
{
sADMItem->SetDisabledPictureID(fItem, pictureResID);
}
inline int IADMItem::GetDisabledPictureID()
{
return sADMItem->GetDisabledPictureID(fItem);
}
/*
* Text
*/
inline void IADMItem::SetText(const char *text)
{
sADMItem->SetText(fItem, (char *)text);
}
inline void IADMItem::GetText(char *text, int maxLength)
{
sADMItem->GetText(fItem, text, maxLength);
}
inline int IADMItem::GetTextLength()
{
return sADMItem->GetTextLength(fItem);
}
inline void IADMItem::SetMaxTextLength(int length)
{
sADMItem->SetMaxTextLength(fItem, length);
}
inline int IADMItem::GetMaxTextLength()
{
return sADMItem->GetMaxTextLength(fItem);
}
inline void IADMItem::SelectAll()
{
sADMItem->SelectAll(fItem);
}
inline void IADMItem::SetSelectionRange(int selStart, int selEnd)
{
sADMItem->SetSelectionRange(fItem, selStart, selEnd);
}
inline void IADMItem::GetSelectionRange(int &selStart, int &selEnd)
{
sADMItem->GetSelectionRange(fItem, &selStart, &selEnd);
}
inline void IADMItem::SetJustify(ADMJustify justify)
{
sADMItem->SetJustify(fItem, justify);
}
inline ADMJustify IADMItem::GetJustify()
{
return sADMItem->GetJustify(fItem);
}
inline void IADMItem::SetUnits(ADMUnits units)
{
sADMItem->SetUnits(fItem, units);
}
inline ADMUnits IADMItem::GetUnits()
{
return sADMItem->GetUnits(fItem);
}
inline void IADMItem::SetAllowUnits(ASBoolean allow)
{
sADMItem->SetAllowUnits(fItem, allow);
}
inline ASBoolean IADMItem::GetAllowUnits()
{
return sADMItem->GetAllowUnits(fItem);
}
inline void IADMItem::SetAllowMath(ASBoolean allow)
{
sADMItem->SetAllowMath(fItem, allow);
}
inline ASBoolean IADMItem::GetAllowMath()
{
return sADMItem->GetAllowMath(fItem);
}
inline void IADMItem::ShowUnits(ASBoolean show)
{
sADMItem->ShowUnits(fItem, show);
}
inline ASBoolean IADMItem::GetShowUnits()
{
return sADMItem->GetShowUnits(fItem);
}
inline void IADMItem::SetFloatToTextProc(ADMItemFloatToTextProc proc)
{
sADMItem->SetFloatToTextProc(fItem, proc);
}
inline ADMItemFloatToTextProc IADMItem::GetFloatToTextProc()
{
return sADMItem->GetFloatToTextProc(fItem);
}
inline ASBoolean IADMItem::DefaultFloatToText(float value, char *text, int textLength)
{
return sADMItem->DefaultFloatToText(fItem, value, text, textLength);
}
inline void IADMItem::SetTextToFloatProc(ADMItemTextToFloatProc proc)
{
sADMItem->SetTextToFloatProc(fItem, proc);
}
inline ADMItemTextToFloatProc IADMItem::GetTextToFloatProc()
{
return sADMItem->GetTextToFloatProc(fItem);
}
inline ASBoolean IADMItem::DefaultTextToFloat(char *text, float *value)
{
return sADMItem->DefaultTextToFloat(fItem, text, value);
}
inline ASBoolean IADMItem::WasPercentageChange()
{
return sADMItem->WasPercentageChange(fItem);
}
/*
* Numerics
*/
inline void IADMItem::SetPrecision(int numberOfDecimalPlaces)
{
sADMItem->SetPrecision(fItem, numberOfDecimalPlaces);
}
inline int IADMItem::GetPrecision()
{
return sADMItem->GetPrecision(fItem);
}
inline void IADMItem::SetBooleanValue(ASBoolean value)
{
sADMItem->SetBooleanValue(fItem, value);
}
inline ASBoolean IADMItem::GetBooleanValue()
{
return sADMItem->GetBooleanValue(fItem);
}
inline void IADMItem::SetIntValue(int value)
{
sADMItem->SetIntValue(fItem, value);
}
inline int IADMItem::GetIntValue()
{
return sADMItem->GetIntValue(fItem);
}
inline void IADMItem::SetFixedValue(ASFixed value)
{
sADMItem->SetFixedValue(fItem, value);
}
inline IASFixed IADMItem::GetFixedValue()
{
return sADMItem->GetFixedValue(fItem);
}
inline void IADMItem::SetFloatValue(float value)
{
sADMItem->SetFloatValue(fItem, value);
}
inline float IADMItem::GetFloatValue()
{
return sADMItem->GetFloatValue(fItem);
}
inline void IADMItem::SetMinIntValue(int value)
{
sADMItem->SetMinIntValue(fItem, value);
}
inline int IADMItem::GetMinIntValue()
{
return sADMItem->GetMinIntValue(fItem);
}
inline void IADMItem::SetMinFixedValue(ASFixed value)
{
sADMItem->SetMinFixedValue(fItem, value);
}
inline IASFixed IADMItem::GetMinFixedValue()
{
return sADMItem->GetMinFixedValue(fItem);
}
inline void IADMItem::SetMaxIntValue(int value)
{
sADMItem->SetMaxIntValue(fItem, value);
}
inline int IADMItem::GetMaxIntValue()
{
return sADMItem->GetMaxIntValue(fItem);
}
inline void IADMItem::SetMinFloatValue(float value)
{
sADMItem->SetMinFloatValue(fItem, value);
}
inline float IADMItem::GetMinFloatValue()
{
return sADMItem->GetMinFloatValue(fItem);
}
inline void IADMItem::SetMaxFixedValue(ASFixed value)
{
sADMItem->SetMaxFixedValue(fItem, value);
}
inline IASFixed IADMItem::GetMaxFixedValue()
{
return sADMItem->GetMaxFixedValue(fItem);
}
inline void IADMItem::SetMaxFloatValue(float value)
{
sADMItem->SetMaxFloatValue(fItem, value);
}
inline float IADMItem::GetMaxFloatValue()
{
return sADMItem->GetMaxFloatValue(fItem);
}
inline void IADMItem::SetSmallIncrement(float increment)
{
sADMItem->SetSmallIncrement(fItem, increment);
}
inline float IADMItem::GetSmallIncrement()
{
return sADMItem->GetSmallIncrement(fItem);
}
inline void IADMItem::SetLargeIncrement(float increment)
{
sADMItem->SetLargeIncrement(fItem, increment);
}
inline float IADMItem::GetLargeIncrement()
{
return sADMItem->GetLargeIncrement(fItem);
}
inline ADMItemRef IADMItem::GetChildItem(int childID)
{
return sADMItem->GetChildItem(fItem, childID);
}
inline void IADMItem::SetTipString(const char *tipStr)
{
sADMItem->SetTipString(fItem, (char *)tipStr);
}
inline void IADMItem::GetTipString(char *tipStr, int maxLen)
{
sADMItem->GetTipString(fItem, tipStr, maxLen);
}
inline int IADMItem::GetTipStringLength()
{
return sADMItem->GetTipStringLength(fItem);
}
inline void IADMItem::EnableTip(ASBoolean enable)
{
sADMItem->EnableTip(fItem, enable);
}
inline ASBoolean IADMItem::IsTipEnabled()
{
return sADMItem->IsTipEnabled(fItem);
}
inline void IADMItem::ShowToolTip(ASPoint *where)
{
sADMItem->ShowToolTip(fItem, where);
}
inline void IADMItem::HideToolTip()
{
sADMItem->HideToolTip(fItem);
}
inline void IADMItem::SetHelpID(ASHelpID helpID)
{
sADMItem->SetHelpID(fItem, helpID);
}
inline ASHelpID IADMItem::GetHelpID()
{
return sADMItem->GetHelpID(fItem);
}
inline void IADMItem::Help()
{
sADMItem->Help(fItem);
}
inline void IADMItem::GetBestSize(ASPoint *size)
{
sADMItem->GetBestSize(fItem, size);
}
inline void IADMItem::SetMask(ADMActionMask mask)
{
sADMItem->SetMask(fItem, mask);
}
inline ADMActionMask IADMItem::GetMask()
{
return sADMItem->GetMask(fItem);
}
inline void IADMItem::SetUserData(ADMUserData data)
{
sADMItem->SetUserData(fItem, data);
}
inline ADMUserData IADMItem::GetUserData()
{
return sADMItem->GetUserData(fItem);
}
inline void IADMItem::SetNotifierData(ADMUserData data)
{
sADMItem->SetNotifierData(fItem, data);
}
inline ADMUserData IADMItem::GetNotifierData()
{
return sADMItem->GetNotifierData(fItem);
}
inline ADMTimerRef IADMItem::CreateTimer(unsigned long milliseconds,
ADMActionMask abortMask, ADMItemTimerProc timerProc,
ADMItemTimerAbortProc abortProc)
{
return sADMItem->CreateTimer(fItem, milliseconds,
abortMask, timerProc, abortProc);
}
inline void IADMItem::AbortTimer(ADMTimerRef timer)
{
sADMItem->AbortTimer(fItem, timer);
}
#endif
@@ -0,0 +1,247 @@
/*
* Name:
* IADMList.hpp
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Adobe Dialog Manager List Interface Class.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 5/7/96 DL First version.
* Created by Dave Lazarony.
*/
#ifndef __IADMList_hpp__
#define __IADMList_hpp__
/*
* Includes
*/
#ifndef __ADMList__
#include "ADMList.h"
#endif
#ifndef __IASTypes_hpp__
#include "IASTypes.hpp"
#endif
/*
* Global Suite Pointer
*/
extern "C" ADMListSuite *sADMList;
/*
* Interface Wrapper Class
*/
class IADMList
{
private:
ADMList *fList;
public:
IADMList();
IADMList(ADMListRef list);
IADMList(int nilList);
operator ADMListRef(void);
void SetMenuID(int menuResID);
int GetMenuID();
ADMItemRef GetItem();
void SetUserData(ADMUserData data);
ADMUserData GetUserData();
void SetEntryWidth(int width);
int GetEntryWidth();
void SetEntryHeight(int height);
int GetEntryHeight();
void SetEntryTextRect(const IASRect &rect);
void GetEntryTextRect(IASRect &rect);
ADMEntryRef InsertEntry(int index);
void RemoveEntry(int index);
ADMEntryRef GetEntry(int entryID);
ADMEntryRef IndexEntry(int index);
ADMEntryRef FindEntry(const char *text);
ADMEntryRef PickEntry(const ASPoint &point);
ADMEntryRef GetActiveEntry();
ADMEntryRef IndexSelectedEntry(int selectionIndex);
int NumberOfEntries();
int NumberOfSelectedEntries();
void SetMask(ADMActionMask mask);
ADMActionMask GetMask();
void SetNotifierData(ADMUserData data);
ADMUserData GetNotifierData();
};
inline IADMList::IADMList()
{
}
inline IADMList::IADMList(ADMListRef list)
{
fList = list;
}
inline IADMList::IADMList(int nilList)
{
if (nilList == nil)
fList = (ADMList *)nilList;
}
inline IADMList::operator ADMListRef(void)
{
return fList;
}
inline void IADMList::SetMenuID(int menuResID)
{
sADMList->SetMenuID(fList, menuResID);
}
inline int IADMList::GetMenuID()
{
return sADMList->GetMenuID(fList);
}
inline void IADMList::SetUserData(ADMUserData data)
{
sADMList->SetUserData(fList, data);
}
inline ADMUserData IADMList::GetUserData()
{
return sADMList->GetUserData(fList);
}
inline ADMItemRef IADMList::GetItem()
{
return sADMList->GetItem(fList);
}
inline void IADMList::SetEntryWidth(int width)
{
sADMList->SetEntryWidth(fList, width);
}
inline int IADMList::GetEntryWidth()
{
return sADMList->GetEntryWidth(fList);
}
inline void IADMList::SetEntryHeight(int height)
{
sADMList->SetEntryHeight(fList, height);
}
inline int IADMList::GetEntryHeight()
{
return sADMList->GetEntryHeight(fList);
}
inline void IADMList::SetEntryTextRect(const IASRect &rect)
{
sADMList->SetEntryTextRect(fList, (ASRect *)&rect);
}
inline void IADMList::GetEntryTextRect(IASRect &rect)
{
sADMList->GetEntryTextRect(fList, &rect);
}
inline ADMEntryRef IADMList::InsertEntry(int index)
{
return sADMList->InsertEntry(fList, index);
}
inline void IADMList::RemoveEntry(int index)
{
sADMList->RemoveEntry(fList, index);
}
inline ADMEntryRef IADMList::GetEntry(int entryID)
{
return sADMList->GetEntry(fList, entryID);
}
inline ADMEntryRef IADMList::IndexEntry(int index)
{
return sADMList->IndexEntry(fList, index);
}
inline ADMEntryRef IADMList::FindEntry(const char *text)
{
return sADMList->FindEntry(fList, (char *)text);
}
inline ADMEntryRef IADMList::PickEntry(const ASPoint &point)
{
return sADMList->PickEntry(fList, (ASPoint *)&point);
}
inline ADMEntryRef IADMList::GetActiveEntry()
{
return sADMList->GetActiveEntry(fList);
}
inline ADMEntryRef IADMList::IndexSelectedEntry(int selectionIndex)
{
return sADMList->IndexSelectedEntry(fList, selectionIndex);
}
inline int IADMList::NumberOfEntries()
{
return sADMList->NumberOfEntries(fList);
}
inline int IADMList::NumberOfSelectedEntries()
{
return sADMList->NumberOfSelectedEntries(fList);
}
inline void IADMList::SetMask(ADMActionMask mask)
{
sADMList->SetMask(fList, mask);
}
inline ADMActionMask IADMList::GetMask()
{
return sADMList->GetMask(fList);
}
inline void IADMList::SetNotifierData(ADMUserData data)
{
sADMList->SetNotifierData(fList, data);
}
inline ADMUserData IADMList::GetNotifierData()
{
return sADMList->GetNotifierData(fList);
}
#endif
@@ -0,0 +1,445 @@
/*
* Name:
* IADMListEntry.hpp
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Adobe Standard Enviornment Configuration
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 10/17/97 WH First version.
* Created by Wei Huang.
*/
#ifndef __IADMListEntry_hpp__
#define __IADMListEntry_hpp__
/*
* Includes
*/
#ifndef __ADMListEntry__
#include "ADMListEntry.h"
#endif
#ifndef __IASTypes_hpp__
#include "IASTypes.hpp"
#endif
/*
* Global Suite Pointer
*/
extern "C" ADMListEntrySuite *sADMListEntry;
/*
* Interface Wrapper Class
*/
class IADMListEntry
{
protected:
ADMListEntry *fEntry;
public:
IADMListEntry();
IADMListEntry(ADMListEntryRef entry);
IADMListEntry(int nilEntry);
operator ADMListEntryRef(void);
void SendNotify(const char *notifierType = nil);
int GetIndex();
ADMItemRef GetItem();
ADMHierarchyListRef GetList();
ADMHierarchyListRef GetChildList();
ADMHierarchyListRef CreateChildList();
void DeleteChildList();
void ExpandHierarchy(ASBoolean flag);
ASBoolean IsHierarchyExpanded();
void HideEntryName(ASBoolean flag);
ASBoolean IsEntryNameHidden();
void EnableChildSelection(ASBoolean flag);
ASBoolean IsChildSelectable();
int GetHierarchyDepth();
int GetVisualHierarchyDepth();
void SetID(int entryID);
int GetID();
void SetUserData(ADMUserData data);
ADMUserData GetUserData();
void Select(ASBoolean show = true);
void Deselect();
ASBoolean IsSelected();
ASBoolean IsChildrenSelected();
void MakeInBounds();
ASBoolean IsInBounds();
void Enable(ASBoolean enable = true);
void Disable();
ASBoolean IsEnabled();
void Activate(ASBoolean activate = true);
void Deactivate();
ASBoolean IsActive();
void Check(ASBoolean check = true);
void Uncheck();
ASBoolean IsChecked();
void MakeSeparator(ASBoolean separator);
ASBoolean IsSeparator();
void GetLocalRect(IASRect &localRect);
void GetBoundsRect(IASRect &boundsRect);
void LocalToScreenPoint(IASPoint &point);
void ScreenToLocalPoint(IASPoint &point);
void LocalToScreenRect(IASRect &rect);
void ScreenToLocalRect(IASRect &rect);
void Invalidate();
void Update();
void SetPictureID(int pictureResID);
int GetPictureID();
void SetSelectedPictureID(int pictureResID);
int GetSelectedPictureID();
void SetDisabledPictureID(int pictureResID);
int GetDisabledPictureID();
void SetText(const char *text);
void GetText(char *text, int maxLength);
int GetTextLength();
ADMTimerRef CreateTimer(unsigned long milliseconds,
ADMActionMask abortMask,
ADMListEntryTimerProc timerProc,
ADMListEntryTimerAbortProc abortProc);
void AbortTimer(ADMTimerRef timer);
};
inline IADMListEntry::IADMListEntry()
{
}
inline IADMListEntry::IADMListEntry(ADMListEntryRef entry)
{
fEntry = entry;
}
inline IADMListEntry::IADMListEntry(int nilEntry)
{
if (nilEntry == nil)
fEntry = (ADMListEntry *)nilEntry;
}
inline IADMListEntry::operator ADMListEntryRef(void)
{
return fEntry;
}
inline void IADMListEntry::SendNotify(const char *notifierType)
{
sADMListEntry->SendNotify(fEntry, (char *)notifierType);
}
inline int IADMListEntry::GetIndex()
{
return sADMListEntry->GetIndex(fEntry);
}
inline ADMItemRef IADMListEntry::GetItem()
{
return sADMListEntry->GetItem(fEntry);
}
inline ADMHierarchyListRef IADMListEntry::GetList()
{
return sADMListEntry->GetList(fEntry);
}
inline ADMHierarchyListRef IADMListEntry::GetChildList()
{
return sADMListEntry->GetChildList(fEntry);
}
inline ADMHierarchyListRef IADMListEntry::CreateChildList()
{
return sADMListEntry->CreateChildList(fEntry);
}
inline void IADMListEntry::DeleteChildList()
{
sADMListEntry->DeleteChildList(fEntry);
}
inline void IADMListEntry::ExpandHierarchy(ASBoolean flag)
{
sADMListEntry->ExpandHierarchy(fEntry, flag);
}
inline ASBoolean IADMListEntry::IsHierarchyExpanded()
{
return sADMListEntry->IsHierarchyExpanded(fEntry);
}
inline void IADMListEntry::HideEntryName(ASBoolean flag)
{
sADMListEntry->HideEntryName(fEntry, flag);
}
inline ASBoolean IADMListEntry::IsEntryNameHidden()
{
return sADMListEntry->IsEntryNameHidden(fEntry);
}
inline void IADMListEntry::EnableChildSelection(ASBoolean flag)
{
sADMListEntry->EnableChildSelection(fEntry, flag);
}
inline ASBoolean IADMListEntry::IsChildSelectable()
{
return sADMListEntry->IsChildSelectable(fEntry);
}
inline int IADMListEntry::GetHierarchyDepth()
{
return sADMListEntry->GetHierarchyDepth(fEntry);
}
inline int IADMListEntry::GetVisualHierarchyDepth()
{
return sADMListEntry->GetVisualHierarchyDepth(fEntry);
}
inline void IADMListEntry::SetID(int entryID)
{
sADMListEntry->SetID(fEntry, entryID);
}
inline int IADMListEntry::GetID()
{
return sADMListEntry->GetID(fEntry);
}
inline void IADMListEntry::SetUserData(ADMUserData data)
{
sADMListEntry->SetUserData(fEntry, data);
}
inline ADMUserData IADMListEntry::GetUserData()
{
return sADMListEntry->GetUserData(fEntry);
}
inline void IADMListEntry::Select(ASBoolean show)
{
sADMListEntry->Select(fEntry, show);
}
inline void IADMListEntry::Deselect()
{
sADMListEntry->Select(fEntry, false);
}
inline ASBoolean IADMListEntry::IsSelected()
{
return sADMListEntry->IsSelected(fEntry);
}
inline ASBoolean IADMListEntry::IsChildrenSelected()
{
return sADMListEntry->IsChildrenSelected(fEntry);
}
inline void IADMListEntry::MakeInBounds()
{
sADMListEntry->MakeInBounds(fEntry);
}
inline ASBoolean IADMListEntry::IsInBounds()
{
return sADMListEntry->IsInBounds(fEntry);
}
inline void IADMListEntry::Enable(ASBoolean enable)
{
sADMListEntry->Enable(fEntry, enable);
}
inline void IADMListEntry::Disable()
{
sADMListEntry->Enable(fEntry, false);
}
inline ASBoolean IADMListEntry::IsEnabled()
{
return sADMListEntry->IsEnabled(fEntry);
}
inline void IADMListEntry::Activate(ASBoolean activate)
{
sADMListEntry->Activate(fEntry, activate);
}
inline void IADMListEntry::Deactivate()
{
sADMListEntry->Activate(fEntry, false);
}
inline ASBoolean IADMListEntry::IsActive()
{
return sADMListEntry->IsActive(fEntry);
}
inline void IADMListEntry::Check(ASBoolean check)
{
sADMListEntry->Check(fEntry, check);
}
inline void IADMListEntry::Uncheck()
{
sADMListEntry->Check(fEntry, false);
}
inline ASBoolean IADMListEntry::IsChecked()
{
return sADMListEntry->IsChecked(fEntry);
}
inline void IADMListEntry::MakeSeparator(ASBoolean separator)
{
sADMListEntry->MakeSeparator(fEntry, separator);
}
inline ASBoolean IADMListEntry::IsSeparator()
{
return sADMListEntry->IsSeparator(fEntry);
}
inline void IADMListEntry::GetLocalRect(IASRect &localRect)
{
sADMListEntry->GetLocalRect(fEntry, (ASRect *)&localRect);
}
inline void IADMListEntry::GetBoundsRect(IASRect &boundsRect)
{
sADMListEntry->GetBoundsRect(fEntry, (ASRect *)&boundsRect);
}
inline void IADMListEntry::LocalToScreenPoint(IASPoint &point)
{
sADMListEntry->LocalToScreenPoint(fEntry, (ASPoint *)&point);
}
inline void IADMListEntry::ScreenToLocalPoint(IASPoint &point)
{
sADMListEntry->ScreenToLocalPoint(fEntry, (ASPoint *)&point);
}
inline void IADMListEntry::LocalToScreenRect(IASRect &rect)
{
sADMListEntry->LocalToScreenRect(fEntry, (ASRect *)&rect);
}
inline void IADMListEntry::ScreenToLocalRect(IASRect &rect)
{
sADMListEntry->ScreenToLocalRect(fEntry, (ASRect *)&rect);
}
inline void IADMListEntry::Invalidate()
{
sADMListEntry->Invalidate(fEntry);
}
inline void IADMListEntry::Update()
{
sADMListEntry->Update(fEntry);
}
inline void IADMListEntry::SetPictureID(int pictureResID)
{
sADMListEntry->SetPictureID(fEntry, pictureResID);
}
inline int IADMListEntry::GetPictureID()
{
return sADMListEntry->GetPictureID(fEntry);
}
inline void IADMListEntry::SetSelectedPictureID(int pictureResID)
{
sADMListEntry->SetSelectedPictureID(fEntry, pictureResID);
}
inline int IADMListEntry::GetSelectedPictureID()
{
return sADMListEntry->GetSelectedPictureID(fEntry);
}
inline void IADMListEntry::SetDisabledPictureID(int pictureResID)
{
sADMListEntry->SetDisabledPictureID(fEntry, pictureResID);
}
inline int IADMListEntry::GetDisabledPictureID()
{
return sADMListEntry->GetDisabledPictureID(fEntry);
}
inline void IADMListEntry::SetText(const char *text)
{
sADMListEntry->SetText(fEntry, (char *)text);
}
inline void IADMListEntry::GetText(char *text, int maxLength = 0)
{
sADMListEntry->GetText(fEntry, text, maxLength);
}
inline int IADMListEntry::GetTextLength()
{
return sADMListEntry->GetTextLength(fEntry);
}
inline ADMTimerRef IADMListEntry::CreateTimer(unsigned long milliseconds,
ADMActionMask abortMask, ADMListEntryTimerProc timerProc,
ADMListEntryTimerAbortProc abortProc)
{
return sADMListEntry->CreateTimer(fEntry, milliseconds,
abortMask, timerProc, abortProc);
}
inline void IADMListEntry::AbortTimer(ADMTimerRef timer)
{
sADMListEntry->AbortTimer(fEntry, timer);
}
#endif
@@ -0,0 +1,60 @@
/*
* Name:
* IADMNotifier.hpp
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* IADMNotifier Wrapper Class.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 3/6/1996 DL First version.
* Created by Dave Lazarony.
*/
#ifndef __IADMNotifier_hpp__
#define __IADMNotifier_hpp__
/*
* Includes
*/
#ifndef __ADMNotifier__
#include "ADMNotifier.h"
#endif
/*
* Global Suite Pointer
*/
extern "C" ADMNotifierSuite *sADMNotifier;
/*
* Wrapper Class
*/
class IADMNotifier
{
private:
ADMNotifierRef fNotifier;
public:
IADMNotifier() {}
IADMNotifier(ADMNotifierRef notifier) { fNotifier = notifier; }
operator ADMNotifierRef() { return fNotifier; }
ADMItemRef GetItem() { return sADMNotifier->GetItem(fNotifier); }
ADMDialogRef GetDialog() { return sADMNotifier->GetDialog(fNotifier); }
ASBoolean IsNotifierType(const char *notifierType) { return sADMNotifier->IsNotifierType(fNotifier, (char *)notifierType); }
void GetNotifierType(char *notifierType, int maxLength = 0) { sADMNotifier->GetNotifierType(fNotifier, notifierType, maxLength); }
};
#endif
@@ -0,0 +1,137 @@
/*
* Name:
* IADMTracker.hpp
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* IADMTracker Wrapper Class.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 3/6/1996 DL First version.
* Created by Dave Lazarony.
*/
#ifndef __IADMTracker_hpp__
#define __IADMTracker_hpp__
/*
* Includes
*/
#ifndef __ADMTracker__
#include "ADMTracker.h"
#endif
/*
* Global Suite Pointer
*/
extern "C" ADMTrackerSuite *sADMTracker;
/*
* Wrapper Class
*/
class IADMTracker
{
private:
ADMTrackerRef fTracker;
public:
IADMTracker() {}
IADMTracker(ADMTrackerRef tracker) { fTracker = tracker; }
operator ADMTrackerRef(void) { return fTracker; }
void Abort() { sADMTracker->Abort(fTracker); }
void GetPoint(IASPoint &point) { sADMTracker->GetPoint(fTracker, &point); }
ADMAction GetAction() { return sADMTracker->GetAction(fTracker); }
ADMModifiers GetModifiers() { return sADMTracker->GetModifiers(fTracker); }
ASBoolean TestAction(ADMAction action) { return sADMTracker->TestAction(fTracker, action); }
ASBoolean TestModifier(ADMModifiers modifier) { return sADMTracker->TestModifier(fTracker, modifier); }
ADMTime GetTime() { return sADMTracker->GetTime(fTracker); }
ADMMouseState GetMouseState() { return sADMTracker->GetMouseState(fTracker); }
void ReleaseMouseCapture() { sADMTracker->ReleaseMouseCapture(fTracker); }
ADMChar GetVirtualKey() { return sADMTracker->GetVirtualKey(fTracker); }
ADMChar GetCharacter() { return sADMTracker->GetCharacter(fTracker); }
/*
* Action Testers
*/
ASBoolean DidMouseMove() { return TestAction(kADMMouseMoveAction); } /**** Get rid of this FIX ME pja****/
ASBoolean DidMouseMoveWhileDown() { return TestAction(kADMMouseMovedDownAction); }
ASBoolean DidMouseMoveWhileUp() { return TestAction(kADMMouseMovedUpAction); }
ASBoolean DidButtonGoDown() { return TestAction(kADMButtonDownAction); }
ASBoolean DidButtonGoUp() { return TestAction(kADMButtonUpAction); }
ASBoolean DidShiftKeyGoDown() { return TestAction(kADMShiftKeyDownAction); }
ASBoolean DidShiftKeyGoUp() { return TestAction(kADMShiftKeyUpAction); }
ASBoolean DidMenuKeyGoDown() { return TestAction(kADMMenuKeyDownAction); }
ASBoolean DidMenuKeyGoUp() { return TestAction(kADMMenuKeyUpAction); }
ASBoolean DidModKeyGoDown() { return TestAction(kADMModKeyDownAction); }
ASBoolean DidModKeyGoUp() { return TestAction(kADMModKeyUpAction); }
ASBoolean DidSpaceKeyGoDown() { return TestAction(kADMSpaceKeyDownAction); }
ASBoolean DidSpaceKeyGoUp() { return TestAction(kADMSpaceKeyUpAction); }
ASBoolean DidTabKeyGoDown() { return TestAction(kADMTabKeyDownAction); }
ASBoolean DidTabKeyGoUp() { return TestAction(kADMTabKeyUpAction); }
ASBoolean DidEnter() { return TestAction(kADMEnterAction); }
ASBoolean DidLeave() { return TestAction(kADMLeaveAction); }
ASBoolean DidUncapturedButtonGoUp() { return TestAction(kADMUncapturedButtonUpAction); }
ASBoolean DidWinLeftButtonGoDown() { return TestAction(kWinLeftButtonDownAction); }
ASBoolean DidWinLeftButtonGoUp() { return TestAction(kWinLeftButtonUpAction); }
ASBoolean DidWinMiddleButtonGoDown() { return TestAction(kWinMiddleButtonDownAction); }
ASBoolean DidWinMiddleButtonGoUp() { return TestAction(kWinMiddleButtonUpAction); }
ASBoolean DidWinRightButtonGoDown() { return TestAction(kWinRightButtonDownAction); }
ASBoolean DidWinRightButtonGoUp() { return TestAction(kWinRightButtonUpAction); }
ASBoolean DidWinAltKeyGoDown() { return TestAction(kWinAltKeyDownAction); }
ASBoolean DidWinAltKeyGoUp() { return TestAction(kWinAltKeyUpAction); }
ASBoolean DidWinControlKeyGoDown() { return TestAction(kWinControlKeyDownAction); }
ASBoolean DidWinControlKeyGoUp() { return TestAction(kWinControlKeyUpAction); }
ASBoolean DidWinUncapturedLeftButtonGoUp() { return TestAction(kWinUncapturedLeftButtonUpAction); }
ASBoolean DidWinUncapturedMiddleButtonGoUp() { return TestAction(kWinUncapturedMiddleButtonUpAction); }
ASBoolean DidWinUncapturedRightButtonGoUp() { return TestAction(kWinUncapturedRightButtonUpAction); }
ASBoolean DidMacCommandKeyGoDown() { return TestAction(kMacCommandKeyDownAction); }
ASBoolean DidMacCommandKeyGoUp() { return TestAction(kMacCommandKeyUpAction); }
ASBoolean DidMacOptionKeyGoDown() { return TestAction(kMacOptionKeyDownAction); }
ASBoolean DidMacOptionKeyGoUp() { return TestAction(kMacOptionKeyUpAction); }
ASBoolean DidMacControlKeyGoDown() { return TestAction(kMacControlKeyDownAction); }
ASBoolean DidMacControlKeyGoUp() { return TestAction(kMacControlKeyUpAction); }
/*
* Modifier Testers
*/
ASBoolean IsButtonDown() { return TestModifier(kADMButtonDownModifier); }
ASBoolean IsShiftKeyDown() { return TestModifier(kADMShiftKeyDownModifier); }
ASBoolean IsMenuKeyDown() { return TestModifier(kADMMenuKeyDownModifier); }
ASBoolean IsModKeyDown() { return TestModifier(kADMModKeyDownModifier); }
ASBoolean IsSpaceKeyDown() { return TestModifier(kADMSpaceKeyDownModifier); }
ASBoolean IsTabKeyDown() { return TestModifier(kADMTabKeyDownModifier); }
ASBoolean IsDoubleClick() { return TestModifier(kADMDoubleClickModifier); }
ASBoolean IsWinLeftButtonDown() { return TestModifier(kWinLeftButtonDownModifier); }
ASBoolean IsWinMiddleButtonDown() { return TestModifier(kWinMiddleButtonDownModifier); }
ASBoolean IsWinRightButtonDown() { return TestModifier(kWinRightButtonDownModifier); }
ASBoolean IsWinAltKeyDown() { return TestModifier(kWinAltKeyDownModifier); }
ASBoolean IsWinControlKeyDown() { return TestModifier(kWinControlKeyDownModifier); }
ASBoolean IsMacCommandKeyDown() { return TestModifier(kMacCommandKeyDownModifier); }
ASBoolean IsMacOptionKeyDown() { return TestModifier(kMacOptionKeyDownModifier); }
ASBoolean IsMacControlKeyDown() { return TestModifier(kMacControlKeyDownModifier); }
};
#endif
@@ -0,0 +1,77 @@
/*
* Name:
* ASConfig.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Adobe Standard Environment Configuration
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 1/26/1996 DL First version.
* Created by Dave Lazarony.
*/
#ifndef __ASConfig__
#define __ASConfig__
/*
* Defines for MPW and THINK C.
*/
#if defined(macintosh) || defined(THINK_C)
#ifndef MAC_ENV
#define MAC_ENV
#endif
#endif
/*
* Defines for Metrowerks on Macintosh.
*/
#ifdef __MWERKS__
#if defined(__MC68K__) || defined(__POWERPC__)
#ifndef MAC_ENV
#define MAC_ENV
#endif
#endif
#ifdef __MC68K__
#ifndef MAC68K_ENV
#define MAC68K_ENV
#endif
#endif
#ifdef __POWERPC__
#ifndef MACPPC_ENV
#define MACPPC_ENV
#endif
#endif
#endif
/*
* Defines for Metrowerks on Windows.
*/
#ifdef __MWERKS__
#ifdef __INTEL__
#ifndef WIN_ENV
#define WIN_ENV
#endif
#endif
#endif
/*
* Defines for Visual C++ on Windows.
*/
#ifdef _WINDOWS
#ifndef WIN_ENV
#define WIN_ENV
#endif
#endif
#endif
@@ -0,0 +1,178 @@
/*
* Name:
* ASHelp.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* AS Help suite.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.5 2/15/97 RS Fifth version.
* Created by Rob Sargent.
*/
#ifndef __ASHelp__
#define __ASHelp__
/*
* Includes
*/
#include "ASTypes.h"
#include "SPFiles.h"
#include "SPPlugs.h"
#ifdef __cplusplus
extern "C" {
#endif
#pragma PRAGMA_ALIGN_BEGIN
#pragma PRAGMA_IMPORT_BEGIN
/*******************************************************************************
**
** Constants
**
**/
#define kASHelpSuite "AS Help Suite"
#define kASHelpSuiteVersion 1
#define kASHelpVersion kASHelpSuiteVersion
#define kHelpInfoVersion 1L
#define kHelpError '!Hlp'
#define kHelpMenuType 'Menu'
#define kHelpDialogType 'Dlog'
#define kHelpToolType 'Tool'
#define kHelpPaletteMenuType 'PMnu'
#define kHelpEndType 0L
#define kNoHelpID 0L
#define kHelpFileStrIDProperty 'HlpS'
#define kHelpNativeStrIndex 1
/*******************************************************************************
**
** Types
**
**/
// WARNING: The size of these types
// must match the resources
typedef ASUInt32 ASHelpType;
typedef ASInt32 ASHelpKey; // can be an integer or a pooled string pointer
typedef ASInt32 ASHelpID;
// WinHelp/QuickHelp Commands
typedef enum
{
/* #if(WINVER >= 0x0400) */
kASHelpCmd_CONTEXTMENU = 0x000a,
kASHelpCmd_FINDER = 0x000b,
kASHelpCmd_WM_HELP = 0x000c,
kASHelpCmd_SETPOPUP_POS = 0x000d,
kASHelpCmd_TCARD = 0x8000,
kASHelpCmd_TCARD_DATA = 0x0010,
kASHelpCmd_TCARD_OTHER_CALLER = 0x0011,
/* #endif // WINVER >= 0x0400 */
kASHelpCmd_CONTEXT = 0x0001L, /* Display topic in ulTopic */
kASHelpCmd_QUIT = 0x0002L, /* Terminate help */
kASHelpCmd_CONTENTS = 0x0003L, /* NOTE: HELP_INDEX = HELP_CONTENTS in Windows.h */
kASHelpCmd_HELPONHELP = 0x0004L, /* Display help on using help */
kASHelpCmd_SETCONTENTS = 0x0005L, /* NOTE: HELP_SETINDEX = HELP_SETCONTENTS */
kASHelpCmd_CONTEXTPOPUP = 0x0008L,
kASHelpCmd_FORCEFILE = 0x0009L,
kASHelpCmd_KEY = 0x0101L, /* Display topic for keyword in offabData */
kASHelpCmd_COMMAND = 0x0102L,
kASHelpCmd_PARTIALKEY = 0x0105L,
kASHelpCmd_MULTIKEY = 0x0201L,
kASHelpCmd_SETWINPOS = 0x0203L
} ASHelpCommand;
typedef struct ASHelpInitInfo
{
ASInt32 version;
ASWindowRef appWindow;
SPPluginRef appPluginRef;
ASInt16 helpFolderNameStrID;
ASInt16 appHelpFileNameStrID;
} ASHelpInitInfo;
typedef struct PIHelpFileDesc
{
long fVersion;
long fFileNameStrID;
} PIHelpFileDesc;
/*******************************************************************************
**
** Suite
**
**/
typedef struct t_ASHelpSuite
{
ASAPI ASErr (*Init) (ASHelpInitInfo *info);
ASAPI ASErr (*Quit) (void);
ASAPI ASErr (*SetContextHelpMode) (ASBoolean helpMode);
ASAPI ASBoolean (*InContextHelpMode) (void);
ASAPI ASErr (*Help) (ASWindowRef asWinRef, SPPlatformFileSpecification *spFile,
ASHelpCommand asHelpCommand, ASUInt32 dwData);
// spFile == NULL uses the App's help file
ASAPI ASErr (*HelpContents) (SPPluginRef pluginRef);
ASAPI ASErr (*SearchHelp) (SPPluginRef pluginRef);
ASAPI ASErr (*HowToUseHelp) (SPPluginRef pluginRef);
ASAPI ASErr (*ContextHelp) (SPPluginRef pluginRef, ASHelpID helpID);
ASAPI ASErr (*GetHelpID) (SPPluginRef pluginRef, ASHelpType helpType,
ASHelpKey key1, ASHelpKey key2, ASHelpID *helpID);
ASAPI ASErr (*TypedHelp) (SPPluginRef pluginRef, ASHelpType helpType, ASHelpKey key1, ASHelpKey key2);
ASAPI ASErr (*MenuHelp) (SPPluginRef pluginRef, ASHelpKey commandID);
ASAPI ASErr (*DialogHelp) (SPPluginRef pluginRef, ASHelpKey dialogID, ASHelpKey itemID);
// itemID == 0 means whole dialog
ASAPI ASErr (*PaletteMenuHelp) (SPPluginRef pluginRef, ASHelpKey dialogID, ASHelpKey menuItem );
ASAPI ASErr (*ToolHelp) (SPPluginRef pluginRef, ASHelpKey toolName );
// toolName should be a pooled string pointer cast to ASHelpKey
} ASHelpSuite;
#pragma PRAGMA_IMPORT_END
#pragma PRAGMA_ALIGN_END
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,51 @@
/*
* Name:
* ASMac68KPlugin.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Adobe Macintosh 68K Plugin support.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 1/26/1995 DL First version.
* Created by Dave Lazarony.
*/
#ifndef __ASMac68KPlugin__
#define __ASMac68KPlugin__
#ifndef __ASConfig__
#include "ASConfig.h"
#endif
#if !defined(__BUILD_PLUGIN__)
#if defined(ILLUSTRATOR_H)
#define __BUILD_PLUGIN__ 0
#else
#define __BUILD_PLUGIN__ 1
#endif
#endif
#if __BUILD_PLUGIN__ && defined(MAC68K_ENV)
#include <A4Stuff.h>
#define PUSH_GLOBALS long __oldA4 = SetCurrentA4();
#define POP_GLOBALS SetA4(__oldA4);
#define kPlatformUnloadedSuiteProc ((void *)0x50FF8001L)
#endif
#if !defined(PUSH_GLOBALS)
#define PUSH_GLOBALS
#define POP_GLOBALS
#define kPlatformUnloadedSuiteProc NULL
#endif
#endif
@@ -0,0 +1,56 @@
/*
* Name:
* ASPragma.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Makes #defines Pragmas to eliminate compiler dependency.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 1/26/1996 DL First version.
* Created by Dave Lazarony.
*/
#ifndef __ASPragma__
#define __ASPragma__
#ifndef __ASConfig__
#include "ASConfig.h"
#endif
#ifdef MAC_ENV
#ifdef MACPPC_ENV
#define PRAGMA_ALIGN_BEGIN options align=mac68k
#define PRAGMA_ALIGN_END options align=reset
#define PRAGMA_IMPORT_BEGIN import on
#define PRAGMA_IMPORT_END import off
#endif
#ifdef MAC68K_ENV
#define PRAGMA_ALIGN_BEGIN
#define PRAGMA_ALIGN_END
#define PRAGMA_IMPORT_BEGIN
#define PRAGMA_IMPORT_END
#endif
#endif
// NOTE: Illustrator uses 2 byte align now, but may change to native align on MSWINDOWS later.
// Currently, the alignment for plugin on MSWINDOWS is set within the project file.
#ifdef WIN_ENV
#define PRAGMA_ALIGN_BEGIN pack(push, 4)
#define PRAGMA_ALIGN_END pack(pop)
#define PRAGMA_IMPORT_BEGIN
#define PRAGMA_IMPORT_END
#endif
#endif
@@ -0,0 +1,259 @@
/*
* Name:
* ASTypes.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Adobe Standard Types.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 1/26/1996 DL First version.
* Created by Dave Lazarony.
*/
#ifndef __ASTypes__
#define __ASTypes__
/*
* Includes
*/
#ifndef __ASConfig__
#include "ASConfig.h"
#endif
#ifndef __ASPragma__
#include "ASPragma.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#pragma PRAGMA_ALIGN_BEGIN
#pragma PRAGMA_IMPORT_BEGIN
/*
* Constants
*/
// true and false
#ifndef true
#define true 1
#endif
#ifndef false
#define false 0
#endif
#ifndef TRUE
#define TRUE true
#endif
#ifndef FALSE
#define FALSE false
#endif
// error codes
#define kNoErr 0
#define kOutOfMemoryErr '!MEM'
#define kBadParameterErr 'PARM'
#define kNotImplementedErr '!IMP'
#define kCantHappenErr 'CANT'
// NULL and nil
#ifndef NULL
#ifdef MAC_ENV
#if !defined(__cplusplus) && (defined(__SC__) || defined(THINK_C))
#define NULL ((void *) 0)
#else
#define NULL 0
#endif
#endif
#ifdef WIN_ENV
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#endif
#ifndef nil
#define nil NULL
#endif
// AMPAPI Adobe Standard Plugin API calling convention.
#ifndef AMPAPI
#ifdef MAC_ENV
#define ASAPI pascal
#endif
#ifdef WIN_ENV
#define ASAPI
#endif
#endif
// C calling convention for those places that need it.
// This doesn't really do anything, but is more for
// an explicity declaration when it matters.
#define ASCAPI
/*
* Types
*/
// Integer Types
#ifndef _H_CoreExpT
typedef signed char ASInt8;
typedef signed short ASInt16;
typedef signed long ASInt32;
#endif
typedef unsigned char ASUInt8;
typedef unsigned short ASUInt16;
typedef unsigned long ASUInt32;
typedef long ASErr;
// Storage Types
typedef unsigned char ASByte;
typedef ASByte *ASBytePtr;
// Pointer Types
typedef void *ASPtr, **ASHandle;
// Fixed Types
#ifndef _H_ASExpT
typedef long ASFixed;
#endif
typedef long ASFract;
typedef float ASReal;
#ifndef _H_ASExpT
typedef struct _t_ASFixedPoint {
ASFixed h, v;
} ASFixedPoint;
typedef struct _t_ASFixedRect {
ASFixed left, top, right, bottom;
} ASFixedRect;
typedef struct _t_ASFixedMatrix {
ASFixed a, b, c, d, tx, ty;
} ASFixedMatrix;
#endif
typedef struct _t_ASRealPoint {
ASReal h, v;
} ASRealPoint;
typedef struct _t_ASRealRect {
ASReal left, top, right, bottom;
} ASRealRect;
typedef struct _t_ASRealMatrix {
ASReal a, b, c, d, tx, ty;
} ASRealMatrix;
// Platform Structures
#ifdef MAC_ENV
// ASBoolean is the same a Macintosh Boolean.
typedef unsigned char ASBoolean;
// ASPortRef is the same as a Windows HDC.
typedef struct GrafPort *ASPortRef;
// ASWindowRef is the same as a Windows HWND.
typedef struct GrafPort *ASWindowRef;
// ASRect is the same size and layout as a Macintosh Rect.
typedef struct _t_ASRect {
short top, left, bottom, right;
} ASRect;
// ASPoint is the same size and layout as a Macintosh Point.
typedef struct _t_ASPoint {
short v, h;
} ASPoint;
#endif
#ifdef WIN_ENV
// ASBoolean is the same a Windows BOOL.
typedef int ASBoolean;
// ASPortRef is the same as a Windows HDC.
typedef void * ASPortRef;
// ASWindowRef is the same as a Windows HWND.
typedef void * ASWindowRef;
// ASRect is the same size and layout as a Windows RECT.
typedef struct _t_ASRect {
long left, top, right, bottom;
} ASRect;
// ASPoint is the same size and layout as a Windows POINT.
typedef struct _t_ASPoint {
long h, v;
} ASPoint;
#endif
// ASRGBColor is the same as a Macintosh RGBColor on Macintosh and Windows.
typedef struct _t_ASRGBColor {
unsigned short red, green, blue;
} ASRGBColor;
// AIEvent is the same as a Macintosh EventRecord on Macintosh and Windows.
typedef struct _t_ASEvent {
unsigned short what;
unsigned long message;
unsigned long when;
ASPoint where;
unsigned short modifiers;
} ASEvent;
// This is a generic reference to a resource/plugin file. If not otherwise stated,
// it is assumed to be equivalent to an SPPluginRef (see "SPPlugs.h")
typedef struct ASAccess *ASAccessRef;
#pragma PRAGMA_IMPORT_END
#pragma PRAGMA_ALIGN_END
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,133 @@
/*
* Name:
* ASZStringSuite.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* ZString handling suite.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 1/26/1996 DL First version.
* Created by Dave Lazarony.
*/
#ifndef _ASZSTRING_H_
#define _ASZSTRING_H_
#include "ASTypes.h"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Constants
*/
#define kASZStringSuite "AS ZString Suite"
#define kASZStringDictionarySuite "AS ZString Dictionary Suite"
#define kASUnknownErr 'UNK '
#define kASBufferTooSmallErr 'BUFF'
#define kASMemoryErr 'MEM '
/*
* Types
*/
// aja 4.5.98 moved this into PIActions.h to accommodate SuspendHistory
#ifndef ASZString_defined
#define ASZString_defined
struct ASZByteRun;
typedef struct ASZByteRun *ASZString;
#endif
typedef short ASUnicode;
/*
* ZString Suite
*/
/******************************************************************************/
#define kASZStringSuiteVersion1 1
typedef struct ASZStringSuite
{
ASErr ASAPI(*MakeFromUnicode)( ASUnicode *src, size_t byteCount, ASZString *newZString );
ASErr ASAPI(*MakeFromCString)( const char *src, size_t byteCount, ASZString *newZString );
ASErr ASAPI(*MakeFromPascalString)( const unsigned char *src, size_t byteCount,
ASZString *newZString );
ASErr ASAPI (*MakeRomanizationOfInteger)( ASInt32 value, ASZString *newZString );
ASErr ASAPI (*MakeRomanizationOfFixed)( ASInt32 value, ASInt16 places, ASBoolean trim,
ASBoolean isSigned, ASZString *newZString);
ASErr ASAPI (*MakeRomanizationOfDouble)( double value, ASZString *newZString );
ASZString ASAPI (*GetEmpty)();
ASErr ASAPI (*Copy)( ASZString source, ASZString *copy);
ASErr ASAPI (*Replace)( ASZString zstr, ASUInt32 index, ASZString replacement);
ASErr ASAPI (*TrimEllipsis)( ASZString zstr );
ASErr ASAPI (*TrimSpaces)( ASZString zstr );
ASErr ASAPI (*RemoveAccelerators)( ASZString zstr );
/* These functions support reference counting of ASZStrings. When the
* ASZString is created its reference count is one. When the reference
* count goes to zero, the ASZString referred to is deleted.
*/
ASErr ASAPI (*AddRef)( ASZString zstr);
ASErr ASAPI (*Release)( ASZString zstr );
ASBoolean ASAPI (*IsAllWhiteSpace)( ASZString zstr );
ASBoolean ASAPI (*IsEmpty)( ASZString zstr );
ASBoolean ASAPI (*WillReplace)( ASZString zstr, ASUInt32 index );
ASUInt32 ASAPI (*LengthAsUnicodeCString)( ASZString zstr );
ASErr ASAPI (*AsUnicodeCString)( ASZString zstr, ASUnicode *str, ASUInt32 strSize,
ASBoolean checkStrSize );
ASUInt32 ASAPI (*LengthAsCString)( ASZString zstr );
ASErr ASAPI (*AsCString)( ASZString zstr, char *str, ASUInt32 strSize,
ASBoolean checkStrSize );
ASUInt32 ASAPI (*LengthAsPascalString)( ASZString zstr );
ASErr ASAPI (*AsPascalString)( ASZString zstr, char *str, ASUInt32 strBufferSize,
ASBoolean checkBufferSize );
} ASZStringSuite1;
/******************************************************************************/
#define kASZStringDictionarySuiteVersion1 1
typedef struct
{
/* This functions set up the ZString tag-value pairs dictionary. The
* dictionary is scoped by the SPPluginRef to reduce naming conflicts
* between plug-ins.
*/
ASErr ASAPI (*DictionaryAddTags)( SPPluginRef context, const char *tags );
ASErr ASAPI (*DictionaryAddTagsRsrc)( SPPluginRef context, ASUInt32 rsrcType, ASInt16 rsrcID );
ASErr ASAPI (*MakeFromTag)( SPPluginRef context, const char *tag, ASZString *newZString );
} ASZStringDictionarySuite1;
#ifdef __cplusplus
}
#endif
#endif /* _ASZSTRING_H_ */
@@ -0,0 +1,641 @@
/*
* Name:
* IASFixed.hpp
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Wrapper class for ASFixed.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 3/10/1996 DL First version.
* Created by Dave Lazarony.
*/
#ifndef __IASFixed_hpp__
#define __IASFixed_hpp__
/*
* Includes
*/
#include "ASTypes.h"
/*
* Types and Defines
*/
// Problem: Mac headers define GetItem. DRL 7/29/96
#ifdef GetItem
#undef GetItem
#endif
#define kASFixedZero ((ASFixed) 0x00000000L)
#define kASFixedOne ((ASFixed) 0x00010000L)
#define kASFixedMin ((ASFixed) 0x80000000L)
#define kASFixedMax ((ASFixed) 0x7FFFFFFFL)
#define kASFixedUnknown ((ASFixed) 0x80000000L)
typedef long double asdouble_t;
#define _ShortToASFixed(a) ((ASFixed)(a) << 16)
/*
* Global Suite Pointer
*/
class IASFixed;
inline int operator!=(const IASFixed& a, const IASFixed& b);
inline int operator>(const IASFixed& a, const IASFixed& b);
inline int operator>=(const IASFixed& a, const IASFixed& b);
inline int operator<=(const IASFixed& a, const IASFixed& b);
class IASFixed
{
protected:
ASFixed f;
inline asdouble_t FixToX(ASFixed x);
inline ASFixed XToFix(asdouble_t x);
inline ASFixed FixMul (ASFixed a, ASFixed b);
inline ASFixed FixDiv(ASFixed x, ASFixed y);
inline ASFixed FixedSumChk(ASFixed a, ASFixed b);
public:
/*
* Constructors
*/
IASFixed();
IASFixed(const ASFixed a);
IASFixed(const short a);
IASFixed(const int a);
IASFixed(const float a);
IASFixed(const double a);
/*
* Conversion operator
*/
operator ASFixed() const;
operator short() const;
operator int() const;
operator float() const;
operator double() const;
/*
* Comparison Operators
*/
friend inline int operator==(const IASFixed& a, const IASFixed& b);
friend inline int operator==(short a, const IASFixed& b);
friend inline int operator==(const IASFixed& a, short b);
friend inline int operator==(int a, const IASFixed& b);
friend inline int operator==(const IASFixed& a, int b);
friend inline int operator==(const float &a, const IASFixed& b);
friend inline int operator==(const IASFixed& a, const float &b);
friend inline int operator==(const double &a, const IASFixed& b);
friend inline int operator==(const IASFixed& a, const double &b);
friend inline int operator!=(const IASFixed& a, const IASFixed& b);
friend inline int operator!=(short a, const IASFixed& b);
friend inline int operator!=(const IASFixed& a, short b);
friend inline int operator!=(int a, const IASFixed& b);
friend inline int operator!=(const IASFixed& a, int b);
friend inline int operator!=(const float &a, const IASFixed& b);
friend inline int operator!=(const IASFixed& a, const float &b);
friend inline int operator!=(const double &a, const IASFixed& b);
friend inline int operator!=(const IASFixed& a, const double &b);
friend inline int operator>(const IASFixed& a, const IASFixed& b);
friend inline int operator>(short a, const IASFixed& b);
friend inline int operator>(const IASFixed& a, short b);
friend inline int operator>(int a, const IASFixed& b);
friend inline int operator>(const IASFixed& a, int b);
friend inline int operator>(const float &a, const IASFixed& b);
friend inline int operator>(const IASFixed& a, const float &b);
friend inline int operator>(const double &a, const IASFixed& b);
friend inline int operator>(const IASFixed& a, const double &b);
friend inline int operator<(const IASFixed& a, const IASFixed& b);
friend inline int operator<(short a, const IASFixed& b);
friend inline int operator<(const IASFixed& a, short b);
friend inline int operator<(int a, const IASFixed& b);
friend inline int operator<(const IASFixed& a, int b);
friend inline int operator<(const float &a, const IASFixed& b);
friend inline int operator<(const IASFixed& a, const float &b);
friend inline int operator<(const double &a, const IASFixed& b);
friend inline int operator<(const IASFixed& a, const double &b);
friend inline int operator>=(const IASFixed& a, const IASFixed& b);
friend inline int operator>=(short a, const IASFixed& b);
friend inline int operator>=(const IASFixed& a, short b);
friend inline int operator>=(int a, const IASFixed& b);
friend inline int operator>=(const IASFixed& a, int b);
friend inline int operator>=(const float &a, const IASFixed& b);
friend inline int operator>=(const IASFixed& a, const float &b);
friend inline int operator>=(const double &a, const IASFixed& b);
friend inline int operator>=(const IASFixed& a, const double &b);
friend inline int operator<=(const IASFixed& a, const IASFixed& b);
friend inline int operator<=(short a, const IASFixed& b);
friend inline int operator<=(const IASFixed& a, short b);
friend inline int operator<=(int a, const IASFixed& b);
friend inline int operator<=(const IASFixed& a, int b);
friend inline int operator<=(const float &a, const IASFixed& b);
friend inline int operator<=(const IASFixed& a, const float &b);
friend inline int operator<=(const double &a, const IASFixed& b);
friend inline int operator<=(const IASFixed& a, const double &b);
/*
* Unary Minus
*/
friend inline IASFixed operator-(const IASFixed &a);
/*
* Binary arithmetic operators
*/
friend inline IASFixed operator+(const IASFixed &a, const IASFixed &b);
friend inline IASFixed operator-(const IASFixed &a, const IASFixed &b);
friend inline IASFixed operator*(const IASFixed &a, const IASFixed &b);
friend inline IASFixed operator/(const IASFixed &a, const IASFixed &b);
/*
* "Unary" aritmetic opererators
*/
void operator+=(const IASFixed& a);
void operator-=(const IASFixed& a);
void operator*=(const IASFixed& a);
void operator/=(const IASFixed& a);
friend inline IASFixed operator>>(const IASFixed &a, int amount);
friend inline IASFixed operator<<(const IASFixed &a, int amount);
friend inline IASFixed abs(const IASFixed &a);
};
inline asdouble_t FixToX(ASFixed x)
{
return ((asdouble_t)x) / 65536.0;
}
inline ASFixed XToFix(asdouble_t x)
{
ASFixed fx;
if (x - 1.0 >= (asdouble_t)0x00007fffL)
fx = 0x7fffffffL;
else if (x + 1.0 <= -(asdouble_t)0x00008000L)
fx = 0x80000000L;
else
fx = (ASFixed)(x * (asdouble_t)0x00010000L + (x > 0.0 ? 0.5 : -0.5));
return fx;
}
inline ASFixed FixedMul (ASFixed a, ASFixed b)
{
asdouble_t da, db;
ASFixed fx;
da = FixToX (a);
db = FixToX (b);
fx = XToFix (da * db);
return fx;
}
inline ASFixed FixedDiv(ASFixed x, ASFixed y)
{
if (!y)
{
if (x < 0)
return 0x80000000L;
else
return 0x7fffffffL;
}
return XToFix ((asdouble_t)x / (asdouble_t)y);
}
inline ASFixed FixedSumChk(ASFixed a, ASFixed b)
{
if (a == kASFixedMax || b == kASFixedMax)
return kASFixedMax;
else if (a == kASFixedMin || b == kASFixedMin)
return kASFixedMin;
else
{
ASFixed c;
ASBoolean aNeg, bNeg;
aNeg = a < kASFixedZero;
bNeg = b < kASFixedZero;
c = a + b;
if (aNeg == bNeg && aNeg != (c < kASFixedZero))
c = aNeg ? kASFixedMin : kASFixedMax;
return c;
}
}
inline IASFixed::IASFixed()
{
}
inline IASFixed::IASFixed(const ASFixed a)
{
f = a;
}
inline IASFixed::IASFixed(const short a)
{
f = ASFixed(a) << 16;
}
inline IASFixed::IASFixed(const int a)
{
f = ASFixed(a) << 16;
}
inline IASFixed::IASFixed(const float a)
{
f = long(a * 65536.0);
}
inline IASFixed::IASFixed(const double a)
{
f = long(a * 65536.0);
}
inline IASFixed::operator ASFixed() const
{
return f;
}
inline IASFixed::operator short() const
{
return short(f >> 16);
}
inline IASFixed::operator int() const
{
return int(f >> 16);
}
inline IASFixed::operator float() const
{
return float(f / 65536.0);
}
inline IASFixed::operator double() const
{
return double(f / 65536.0);
}
inline int operator==(const IASFixed &a, const IASFixed &b)
{
return(a.f == b.f);
}
inline int operator==(short a, const IASFixed &b)
{
return(IASFixed(a).f != b.f);
}
inline int operator==(const IASFixed &a, short b)
{
return(a.f == IASFixed(b).f);
}
inline int operator==(int a, const IASFixed &b)
{
return(IASFixed(a).f == b.f);
}
inline int operator==(const IASFixed &a, int b)
{
return(a.f == IASFixed(b).f);
}
inline int operator==(const float &a, const IASFixed &b)
{
return(a == float(b));
}
inline int operator==(const IASFixed &a, const float &b)
{
return(float(a) == b);
}
inline int operator==(const double &a, const IASFixed &b)
{
return(a == double(b));
}
inline int operator==(const IASFixed &a, const double &b)
{
return(double(a) == b);
}
inline int operator!=(const IASFixed &a, const IASFixed &b)
{
return(a.f != b.f);
}
inline int operator!=(short a, const IASFixed &b)
{
return(IASFixed(a).f != b.f);
}
inline int operator!=(const IASFixed &a, short b)
{
return(a.f != IASFixed(b).f);
}
inline int operator!=(int a, const IASFixed &b)
{
return(IASFixed(a).f != b.f);
}
inline int operator!=(const IASFixed &a, int b)
{
return(a.f != IASFixed(b).f);
}
inline int operator!=(const float &a, const IASFixed &b)
{
return(a != float(b));
}
inline int operator!=(const IASFixed &a, const float &b)
{
return(float(a) != b);
}
inline int operator!=(const double &a, const IASFixed &b)
{
return(a != double(b));
}
inline int operator!=(const IASFixed &a, const double &b)
{
return(double(a) != b);
}
inline int operator>(const IASFixed &a, const IASFixed &b)
{
return(a.f > b.f);
}
inline int operator>(short a, const IASFixed &b)
{
return(IASFixed(a).f > b.f);
}
inline int operator>(const IASFixed &a, short b)
{
return(a.f > IASFixed(b).f);
}
inline int operator>(int a, const IASFixed &b)
{
return(IASFixed(a).f > b.f);
}
inline int operator>(const IASFixed &a, int b)
{
return(a.f > IASFixed(b).f);
}
inline int operator>(const float &a, const IASFixed &b)
{
return(a > float(b));
}
inline int operator>(const IASFixed &a, const float &b)
{
return(float(a) > b);
}
inline int operator>(const double &a, const IASFixed &b)
{
return(a > double(b));
}
inline int operator>(const IASFixed &a, const double &b)
{
return(double(a) > b);
}
inline int operator<(const IASFixed &a, const IASFixed &b)
{
return(a.f < b.f);
}
inline int operator<(short a, const IASFixed &b)
{
return(IASFixed(a).f < b.f);
}
inline int operator<(const IASFixed &a, short b)
{
return(a.f < IASFixed(b).f);
}
inline int operator<(int a, const IASFixed &b)
{
return(IASFixed(a).f < b.f);
}
inline int operator<(const IASFixed &a, int b)
{
return(a.f < IASFixed(b).f);
}
inline int operator<(const float &a, const IASFixed &b)
{
return(a < float(b));
}
inline int operator<(const IASFixed &a, const float &b)
{
return(float(a) < b);
}
inline int operator<(const double &a, const IASFixed &b)
{
return(a < double(b));
}
inline int operator<(const IASFixed &a, const double &b)
{
return(double(a) < b);
}
inline int operator>=(const IASFixed &a, const IASFixed &b)
{
return(a.f >= b.f);
}
inline int operator>=(short a, const IASFixed &b)
{
return(IASFixed(a).f >= b.f);
}
inline int operator>=(const IASFixed &a, short b)
{
return(a.f >= IASFixed(b).f);
}
inline int operator>=(int a, const IASFixed &b)
{
return(IASFixed(a).f >= b.f);
}
inline int operator>=(const IASFixed &a, int b)
{
return(a.f >= IASFixed(b).f);
}
inline int operator>=(const float &a, const IASFixed &b)
{
return(a >= float(b));
}
inline int operator>=(const IASFixed &a, const float &b)
{
return(float(a) >= b);
}
inline int operator>=(const double &a, const IASFixed &b)
{
return(a >= double(b));
}
inline int operator>=(const IASFixed &a, const double &b)
{
return(double(a) >= b);
}
inline int operator<=(const IASFixed &a, const IASFixed &b)
{
return(a.f <= b.f);
}
inline int operator<=(short a, const IASFixed &b)
{
return(IASFixed(a).f <= b.f);
}
inline int operator<=(const IASFixed &a, short b)
{
return(a.f <= IASFixed(b).f);
}
inline int operator<=(int a, const IASFixed &b)
{
return(IASFixed(a).f <= b.f);
}
inline int operator<=(const IASFixed &a, int b)
{
return(a.f <= IASFixed(b).f);
}
inline int operator<=(const float &a, const IASFixed &b)
{
return(a <= float(b));
}
inline int operator<=(const IASFixed &a, const float &b)
{
return(float(a) <= b);
}
inline int operator<=(const double &a, const IASFixed &b)
{
return(a <= double(b));
}
inline int operator<=(const IASFixed &a, const double &b)
{
return(double(a) <= b);
}
inline IASFixed operator-(const IASFixed &a)
{
return -a.f;
}
inline IASFixed operator+(const IASFixed &a, const IASFixed &b)
{
return a + b;
}
inline IASFixed operator-(const IASFixed &a, const IASFixed &b)
{
return a - b;
}
inline IASFixed operator*(const IASFixed &a, const IASFixed &b)
{
return FixedMul(a, b);
}
inline IASFixed operator/(const IASFixed &a, const IASFixed &b)
{
return FixedDiv(a, b);
}
inline void IASFixed::operator+=(const IASFixed &a)
{
*this = *this + a;
}
inline void IASFixed::operator-=(const IASFixed &a)
{
*this = *this - a;
}
inline void IASFixed::operator*=(const IASFixed &a)
{
*this = *this * a;
}
inline void IASFixed::operator/=(const IASFixed &a)
{
*this = *this / a;
}
inline IASFixed operator>>(const IASFixed &a, int amount)
{
return a.f >> amount;
}
inline IASFixed operator<<(const IASFixed &a, int amount)
{
return a.f << amount;
}
inline IASFixed abs(const IASFixed &a)
{
if (a.f >= 0)
return a.f;
else
return -a.f;
}
#endif
@@ -0,0 +1,62 @@
/*
* Name:
* IASGlobalContext.hpp
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Creates a Global Context for setting up globals in Mac 68K Code Resources.
* Declare a IASMain68KContext in the main() of the Code Resource.
* Declare a IASCallback68KContext in each callback routine.
* NOTE: suite entry points are callback routines.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/12/1996 DL First version.
* Created by Dave Lazarony.
*/
#ifndef __IASGlobalContext_hpp__
#define __IASGlobalContext_hpp__
#ifndef __ASTypes__
#include "ASTypes.h"
#endif
#ifdef MAC68K_ENV
#include "A4Stuff.h"
class IASGlobalContext
{
private:
long saveA4;
public:
IASGlobalContext()
{
saveA4 = SetCurrentA4(); // Save A4 away and set A4 to point to the code resources globals.
}
~IASGlobalContext()
{
SetA4(saveA4); // Set A4 back.
}
};
#else
class IASGlobalContext
{
public:
IASGlobalContext() {}
~IASGlobalContext() {}
};
#endif
#endif
@@ -0,0 +1,172 @@
/*
* Name:
* IASPoint.hpp
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* IASPoint Wrapper Class.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 3/26/1996 DL First version.
* Created by Dave Lazarony.
*/
#ifndef __IASPoint_hpp__
#define __IASPoint_hpp__
/*
* Includes
*/
#ifndef __ASTypes__
#include "ASTypes.h"
#endif
/*
* Wrapper Class
*/
struct IASPoint : public ASPoint
{
public:
IASPoint();
IASPoint(const ASPoint &p);
IASPoint(int h, int v);
friend inline ASBoolean operator == (const ASPoint &a, const ASPoint &b);
friend inline ASBoolean operator != (const ASPoint &a, const ASPoint &b);
friend inline ASPoint operator + (const ASPoint &a, const ASPoint& b);
friend inline ASPoint operator - (const ASPoint &a, const ASPoint& b);
friend inline ASPoint operator * (const ASPoint &p, int s);
friend inline ASPoint operator * (int s, const ASPoint& p);
friend inline ASPoint operator / (const ASPoint &p, int s);
friend inline ASPoint operator - (const ASPoint &p);
void operator = (const ASPoint &p);
void operator += (const ASPoint &p);
void operator -= (const ASPoint &p);
void operator *= (int s);
void operator /= (int s);
};
inline IASPoint::IASPoint()
{
}
inline IASPoint::IASPoint(const ASPoint &p)
{
h = p.h;
v = p.v;
}
inline IASPoint::IASPoint(int h, int v)
{
this->h = h; this->v = v;
}
inline ASBoolean operator == (const ASPoint &a, const ASPoint &b)
{
return a.h == b.h && a.v == b.v;
}
inline ASBoolean operator != (const ASPoint &a, const ASPoint &b)
{
return a.h != b.h || a.v != b.v;
}
inline ASPoint operator + (const ASPoint &a, const ASPoint &b)
{
return IASPoint(a.h + b.h, a.v + b.v);
}
inline ASPoint operator - (const ASPoint &a, const ASPoint &b)
{
return IASPoint(a.h - b.h, a.v - b.v);
}
inline ASPoint operator * (const ASPoint &p, int s)
{
return IASPoint(p.h * s, p.v * s);
}
inline ASPoint operator * (int s, const ASPoint &p)
{
return IASPoint(p.h * s, p.v * s);
}
inline ASPoint operator / (const ASPoint &p, int s)
{
return IASPoint(p.h / s, p.v / s);
}
inline ASPoint operator - (const ASPoint &p)
{
return IASPoint(-p.h, -p.v);
}
inline void IASPoint::operator = (const ASPoint& p)
{
h = p.h;
v = p.v;
}
inline void IASPoint::operator += (const ASPoint& p)
{
h += p.h;
v += p.v;
}
inline void IASPoint::operator -= (const ASPoint& p)
{
h -= p.h;
v -= p.v;
}
inline void IASPoint::operator *= (int s)
{
h *= s;
v *= s;
}
inline void IASPoint::operator /= (int s)
{
h /= s;
v /= s;
}
#endif
@@ -0,0 +1,515 @@
/*
* Name:
* IASRect.hpp
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* IASRect Wrapper Class
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 1/26/1996 DL First version.
* Created by Dave Lazarony.
*/
#ifndef __IASRect_hpp__
#define __IASRect_hpp__
/*
* Includes
*/
#ifndef __ASTypes__
#include "ASTypes.h"
#endif
/*
* Wrapper Class
*/
struct IASRect : public ASRect
{
public:
IASRect();
IASRect(const ASRect &rect);
IASRect(const ASPoint &a);
IASRect(const ASPoint &a, const ASPoint &b);
IASRect(int left, int top, int right, int bottom);
int Width() const;
int Height() const;
ASBoolean IsEmpty() const;
void SetEmpty();
ASBoolean IsNormalized() const;
void Normalize();
int Area() const;
ASPoint Center() const;
ASBoolean Contains(const ASPoint &p) const;
ASBoolean Contains(const ASRect &r) const;
ASBoolean Overlaps(const ASRect &r) const;
IASRect &operator ++ ();
IASRect &operator -- ();
IASRect operator ++ (int);
IASRect operator -- (int);
IASRect &operator += (int n);
IASRect &operator -= (int n);
IASRect &operator += (ASPoint &p);
IASRect &operator -= (ASPoint &p);
IASRect &operator = (ASPoint &p);
void Inset(int h, int v);
void Inflate(int h, int v);
void Offset(int h, int v);
void Union(const ASPoint &a);
void Union(const ASRect &a);
void Union(const ASRect &a, const ASRect &b);
void Intersect(const ASRect &a);
void Intersect(const ASRect &a, const ASRect &b);
void Center(const ASRect &centerRect);
friend inline ASBoolean operator == (const ASRect &a, const ASRect &b);
friend inline ASBoolean operator != (const ASRect &a, const ASRect &b);
// Doesn't work in CodeWarrior 1.4. Anyone know why? DRL 4/22/96
// friend inline ASRect operator + (const IASRect &a, const IASPoint &b);
// friend inline ASRect operator + (const IASPoint &a, const IASRect &b);
// friend inline ASRect operator - (const IASRect &a, const IASPoint &b);
// friend inline ASRect operator - (const IASPoint &a, const IASRect &b);
};
inline IASRect::IASRect()
{
}
inline IASRect::IASRect(const ASRect &rect)
{
left = rect.left;
top = rect.top;
right = rect.right;
bottom = rect.bottom;
}
inline IASRect::IASRect(const ASPoint &a)
{
left = right = a.h;
top = bottom = a.v;
}
inline IASRect::IASRect(const ASPoint &a, const ASPoint &b)
{
if (a.h < b.h)
{
left = a.h;
right = b.h;
}
else
{
left = b.h;
right = a.h;
}
if (a.v < b.v)
{
top = a.v;
bottom = b.v;
}
else
{
top = b.v;
bottom = a.v;
}
}
inline IASRect::IASRect(int left, int top, int right, int bottom)
{
this->left = left;
this->top = top;
this->right = right;
this->bottom = bottom;
}
inline int IASRect::Width() const
{
return right - left;
}
inline int IASRect::Height() const
{
return bottom - top;
}
inline ASBoolean IASRect::IsEmpty() const
{
return top == bottom && right == left;
}
inline void IASRect::SetEmpty()
{
left = top = right = bottom = 0;
}
inline ASBoolean IASRect::IsNormalized() const
{
return left <= right && top <= bottom;
}
inline void IASRect::Normalize()
{
if (left > right)
{
int saveLeft = left; left = right; right = saveLeft;
}
if (top > bottom)
{
int saveTop = top; top = bottom; bottom = top;
}
}
inline int IASRect::Area() const
{
return Width() * Height();
}
inline ASPoint IASRect::Center() const
{
ASPoint center;
center.h = left + Width() / 2;
center.v = top + Height() / 2;
return center;
}
inline ASBoolean IASRect::Contains(const ASPoint &p) const
{
return left <= p.h && right >= p.h && top <= p.v && bottom >= p.v;
}
inline ASBoolean IASRect::Contains(const ASRect &r) const
{
return left <= r.left && right >= r.left && top <= r.top && bottom >= r.top &&
left <= r.right && right >= r.right && top <= r.bottom && bottom >= r.bottom;
}
inline ASBoolean IASRect::Overlaps(const ASRect &r) const
{
return right >= r.left && left <= r.right &&
bottom >= r.top && top <= r.bottom;
}
inline IASRect &IASRect::operator ++ ()
{
left--;
top--;
right++;
bottom++;
return *this;
}
inline IASRect &IASRect::operator -- ()
{
left++;
top++;
right--;
bottom--;
return *this;
}
inline IASRect IASRect::operator ++ (int)
{
left--;
top--;
right++;
bottom++;
return *this;
}
inline IASRect IASRect::operator -- (int)
{
left++;
top++;
right--;
bottom--;
return *this;
}
inline IASRect &IASRect::operator += (int n)
{
left -= n;
top -= n;
right += n;
bottom += n;
return *this;
}
inline IASRect &IASRect::operator -= (int n)
{
left += n;
top += n;
right -= n;
bottom -= n;
return *this;
}
inline IASRect &IASRect::operator += (ASPoint &p)
{
left += p.h;
top += p.v;
right += p.h;
bottom += p.v;
return *this;
}
inline IASRect &IASRect::operator -= (ASPoint &p)
{
left -= p.h;
top -= p.v;
right -= p.h;
bottom -= p.v;
return *this;
}
inline IASRect &IASRect::operator = (ASPoint &p)
{
left = right = p.h;
top = bottom = p.h;
return *this;
}
inline ASBoolean operator == (const ASRect &a, const ASRect &b)
{
return a.left == b.left &&
a.top == b.top &&
a.right == b.right &&
a.bottom == b.bottom;
}
inline ASBoolean operator != (const ASRect &a, const ASRect &b)
{
return a.left != b.left ||
a.top != b.top ||
a.right != b.right ||
a.bottom != b.bottom;
}
inline void IASRect::Inset(int h, int v)
{
left += h;
top += v;
right -= h;
bottom -= v;
}
inline void IASRect::Inflate(int h, int v)
{
left -= h;
top -= v;
right += h;
bottom += v;
}
inline void IASRect::Offset(int h, int v)
{
left += h;
top += v;
right += h;
bottom += v;
}
inline void IASRect::Union(const ASPoint &a)
{
if (left > a.h)
left = a.h;
if (top > a.v)
top = a.v;
if (right < a.h)
right = a.h;
if (bottom < a.v)
bottom = a.v;
}
inline void IASRect::Union(const ASRect &a)
{
if (left > a.left)
left = a.left;
if (top > a.top)
top = a.top;
if (right < a.right)
right = a.right;
if (bottom < a.bottom)
bottom = a.bottom;
}
inline void IASRect::Union(const ASRect &a, const ASRect &b)
{
if (b.left > a.left)
left = a.left;
else
left = b.left;
if (b.top > a.top)
top = a.top;
else
top = b.top;
if (b.right < a.right)
right = a.right;
else
right = b.right;
if (b.bottom < a.bottom)
bottom = a.bottom;
else
bottom = b.bottom;
}
inline void IASRect::Intersect(const ASRect &a)
{
if (left < a.left)
left = a.left;
if (top < a.top)
top = a.top;
if (right > a.right)
right = a.right;
if (bottom > a.bottom)
bottom = a.bottom;
if (!Overlaps(a))
SetEmpty();
}
inline void IASRect::Intersect(const ASRect &a, const ASRect &b)
{
if (b.left < a.left)
left = a.left;
else
left = b.left;
if (b.top < a.top)
top = a.top;
else
top = b.top;
if (b.right > a.right)
top = a.right;
else
top = b.right;
if (b.bottom > a.bottom)
bottom = a.bottom;
else
bottom = b.bottom;
if (!Overlaps(a))
SetEmpty();
}
inline void IASRect::Center(const ASRect &centerRect)
{
Offset(centerRect.left + ((centerRect.right - centerRect.left) - Width()) / 2,
centerRect.top + ((centerRect.bottom - centerRect.top) - Height()) / 2);
}
/*
* Doesn't work in CodeWarrior 1.4. Anyone know why? DRL 4/22/96.
inline ASRect operator + (const IASRect &a, const IASPoint &b)
{
return IASRect(a.left + b.h, a.top + b.v, a.right + b.h, a.bottom + b.v);
}
inline ASRect operator + (const IASPoint &a, const IASRect &b)
{
IASRect r;
r.left = b.left + a.h;
r.top = b.top + a.v;
r.right = b.right + a.h;
r.bottom = b.bottom + a.v;
return r;
}
inline ASRect operator - (const IASRect &a, const IASPoint &b)
{
IASRect r;
r.left = a.left - b.h;
r.top = a.top - b.v;
r.right = a.right - b.h;
r.bottom = a.bottom - b.v;
return r;
}
inline ASRect operator - (const IASPoint &a, const IASRect &b)
{
IASRect r;
r.left = b.left - a.h;
r.top = b.top - a.v;
r.right = b.right - a.h;
r.bottom = b.bottom - a.v;
return r;
}
*/
#endif
@@ -0,0 +1,47 @@
/*
* Name:
* IASTypes.hpp
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Wrapper Classes for types in ASTypes.h.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 3/26/1996 DL First version.
* Created by Dave Lazarony.
*/
#ifndef __IASTypes_hpp__
#define __IASTypes_hpp__
/*
* Includes
*/
#ifndef __IASFixed_hpp__
#include "IASFixed.hpp"
#endif
#ifndef __IASPoint_hpp__
#include "IASPoint.hpp"
#endif
#ifndef __IASRect_hpp__
#include "IASRect.hpp"
#endif
#endif
@@ -0,0 +1,123 @@
/*
* Name:
* VTableSupport.hpp
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Allow restoration of virtual function tables.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/1/98 First version.
* Created by Andy Coven.
*/
#ifndef _VTABLESUPPORT_HPP_
#define _VTABLESUPPORT_HPP_
#ifdef __cplusplus
extern "C"
{
#endif
#pragma PRAGMA_ALIGN_BEGIN
#pragma PRAGMA_IMPORT_BEGIN
///////////////////////////////////////////////////////////////////////
//
// If your plugin has a C++ object attached to it's globals, and if
// the class of that object has virtual functions, those functions
// will not work after the plugin is unloaded and then reloaded.
//
// The following macro (FIXUP_VTABLE) can be used to provide a means
// of restoring the virtual function table of a globally-persistent
// C++ object by calling FixupVTable() prior to the use of any of
// the object's virtual functions after a reload.
//
// Here is how you might use the macro:
//
// class MyGlobals
// {
// public:
// //
// [some class definition code skipped];
// //
// // pass class name to macro
// FIXUP_VTABLE(MyGlobals);
// //
// // Note: private access at this point
// //
// protected:
// //
// [more class definition code skipped];
// };
//
// //
// // Then, later in the translation:
// //
//
// ASErr
// OnReloadPlugin(SPInterfaceMessage *pMsg)
// {
// MyGlobals *pGlobals = (MyGlobals *) pMsg->d.globals;
//
// // don't use any of MyGlobals' virtual functions here
// [some code skipped];
//
// // should probably do this early on.
// MyGlobals::FixupVTable(pGlobals);
//
// // o.k. to use virtual functions now
// [more code skipped];
// }
//
///////////////////////////////////////////////////////////////////////
#define FIXUP_VTABLE(CLASSNAME) \
public: \
static void FixupVTable(CLASSNAME *pThis) {pThis = new(pThis) CLASSNAME((FixupVTableSignature) 0);} \
private: \
typedef long FixupVTableSignature; \
CLASSNAME(FixupVTableSignature) {} \
static void *operator new(size_t uiSize, CLASSNAME *pThis) {return pThis;} \
//
///////////////////////////////////////////////////////////////////////
//
// If you are using operator new from a base class, you can use the
// following macro so that the compiler can resolve the overloading
// in the scope of your derived class.
//
///////////////////////////////////////////////////////////////////////
#define FIXUP_VTABLE_EX(CLASSNAME, BASECLASS) \
public: \
void *operator new(size_t uiSize) {return BASECLASS::operator new(uiSize);} \
FIXUP_VTABLE(CLASSNAME)
///////////////////////////////////////////////////////////////////////
//
// If you are using a global operator new, you can use the
// following macro so that the compiler can resolve the overloading
// in the scope of your derived class.
//
///////////////////////////////////////////////////////////////////////
#define FIXUP_VTABLE_EX1(CLASSNAME) \
public: \
void *operator new(size_t uiSize) {return ::operator new(uiSize);} \
FIXUP_VTABLE(CLASSNAME)
#pragma PRAGMA_IMPORT_END
#pragma PRAGMA_ALIGN_END
#ifdef __cplusplus
}
#endif
#endif // _VTABLESUPPORT_HPP_
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,62 @@
//-------------------------------------------------------------------------------
//
// File:
// PIAbout.h
//
// Copyright 1992-1998, Adobe Systems Incorporated.
// All Rights Reserved.
//
// Distribution:
// PUBLIC
//
// Description:
// This file describes version 4.0 of Photoshop's plug-in module interface
// for the about box selector.
//
// Use:
// Use in all types of Photoshop plug-ins.
//
// Version history:
// 1.0.0 10/9/1997 Ace Initial compilation.
//
//-------------------------------------------------------------------------------
#ifndef __PIAbout__
#define __PIAbout__
#include "SPBasic.h"
#include "SPMData.h"
/******************************************************************************/
/* Pragma to byte align structures; only for Borland C */
#if defined(__BORLANDC__)
#pragma option -a-
#endif
/******************************************************************************/
#define plugInSelectorAbout 0
typedef struct AboutRecord
{
void * platformData; /* Platform specific information. */
SPBasicSuite *sSPBasic; /* SuitePea basic suite */
void *plugInRef; /* plugin reference used by SuitePea*/
char reserved [244]; /* Set to zero */
}
AboutRecord, *AboutRecordPtr;
/******************************************************************************/
/* turn off the byte align pragma back to its original state; only for Borland C */
#if defined(__BORLANDC__)
#pragma option -a.
#endif
/******************************************************************************/
#endif // __PIAbout_h__
@@ -0,0 +1,262 @@
//-------------------------------------------------------------------------------
//
// File:
// PIAcquire.h
//
// Copyright 1990-1991, Thomas Knoll.
// Copyright 1991-1998, Adobe Systems Incorporated.
// All Rights Reserved.
//
// Distribution:
// PUBLIC
//
// Description:
// This file describes version 4.0 of Photoshop's Acquisition module interface.
//
// Use:
// Use in all Import modules.
//
//
// Version history:
// 1.0.0 1/1/90 TK Initial compilation.
// 4.0.0 10/9/1997 Ace Updated for Photoshop 4.0.
//
//-------------------------------------------------------------------------------
#ifndef __PIAcquire__
#define __PIAcquire__
#include "PIActions.h"
#include "PIGeneral.h"
#include "SPBasic.h"
/* Operation selectors */
#define acquireSelectorAbout 0
#define acquireSelectorStart 1
#define acquireSelectorContinue 2
#define acquireSelectorFinish 3
#define acquireSelectorPrepare 4
#define acquireSelectorFinalize 5
/* Error return values. The plug-in module may also return standard Macintosh
operating system error codes, or report its own errors, in which case it
can return any positive integer. */
#define acquireBadParameters -30000 /* "a problem with the acquisition module interface" */
#define acquireNoScanner -30001 /* "there is no scanner installed" */
#define acquireScannerProblem -30002 /* "a problem with the scanner" */
/******************************************************************************/
/* Pragma to byte align structures; only for Borland C */
#if defined(__BORLANDC__)
#pragma option -a-
#endif
/******************************************************************************/
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
typedef struct AcquireRecord
{
int32 serialNumber; /* Host's serial number, to allow
copy protected plug-in modules. */
TestAbortProc abortProc; /* The plug-in module may call this no-argument
Boolean function (using Pascal calling
conventions) several times a second during long
operations to allow the user to abort the operation.
If it returns TRUE, the operation should be aborted
(and a positive error code returned). */
ProgressProc progressProc; /* The plug-in module may call this two-argument
procedure periodically to update a progress
indicator. The first parameter is the number
of operations completed; the second is the total
number of operations. */
int32 maxData; /* Maximum number of bytes that should be
passed back at once, plus the size of any
interal buffers. The plug-in may reduce this
value in the acquireSelectorPrepare routine. */
int16 imageMode; /* Image mode */
Point imageSize; /* Size of image */
int16 depth; /* Bits per sample, currently must be 1 or 8 */
int16 planes; /* Samples per pixel */
Fixed imageHRes; /* Pixels per inch */
Fixed imageVRes; /* Pixels per inch */
LookUpTable redLUT; /* Red LUT, only used for Indexed Color images */
LookUpTable greenLUT; /* Green LUT, only used for Indexed Color images */
LookUpTable blueLUT; /* Blue LUT, only used for Indexed Color images */
void * data; /* A pointer to the returned image data. The
plug-in module is now responsible for freeing
this buffer (this is a change from previous
versions). Should be set to NIL when
all the image data has been returned. */
Rect theRect; /* Rectangle being returned */
int16 loPlane; /* First plane being returned */
int16 hiPlane; /* Last plane being returned */
int16 colBytes; /* Spacing between columns */
int32 rowBytes; /* Spacing between rows */
int32 planeBytes; /* Spacing between planes (ignored if only one
plane is returned at a time) */
Str255 filename; /* Document file name */
int16 vRefNum; /* Volume reference number, or zero if none */
Boolean dirty; /* Changes since last saved flag. The plug-in may clear
this field to prevent prompting the user when
closing the document. */
OSType hostSig; /* Creator code for host application */
HostProc hostProc; /* Host specific callback procedure */
int32 hostModes; /* Used by the host to inform the plug-in which
imageMode values it supports. If the corresponding
bit (LSB = bit 0) is 1, the mode is supported. */
PlaneMap planeMap; /* Maps plug-in plane numbers to host plane
numbers. The host initializes this is a linear
mapping. The plug-in may change this mapping if
it sees the data in a different order. */
Boolean canTranspose; /* Is the host able to transpose the image? */
Boolean needTranspose; /* Does the plug-in need the image transposed? */
Handle duotoneInfo; /* Handle to duotone information, if returning a
duotone mode image. The plug-in is responsible
for freeing this buffer. */
int32 diskSpace; /* Free disk space on the host's scratch disk or
disks. Set to a negative number if host does
not use a scratch disk. */
SpaceProc spaceProc; /* If not NIL, a pointer to a no-argument
in32 valued function (using Pascal calling
conventions) which uses the current settings of
the imageMode, imageSize, depth, and planes
fields to compute the amount of scratch disk
space required to hold the image. Returns -1
if the settings are not valid. */
PlugInMonitor monitor; /* Information on current monitor */
void * platformData; /* Platform specific information. */
BufferProcs * bufferProcs; /* The buffer procedures. */
ResourceProcs * resourceProcs; /* The plug-in resource procedures. */
ProcessEventProc processEvent; /* Pass events to the application. */
Boolean canReadBack; /* Can we return data for filtering? */
Boolean wantReadBack; /* Does the plug-in want to read the data back? */
Boolean acquireAgain; /* If true at finish, call the plug-in again.
Not all hosts may pay attention to this flag. */
Boolean canFinalize; /* Can the host make the finalize call? */
DisplayPixelsProc displayPixels;/* Display dithered pixels. */
HandleProcs *handleProcs; /* Platform independent handle manipulation. */
/* New in 3.0. */
Boolean wantFinalize; /* Requests an acquireSelectorFinalize call
if the host provides the newer protocol
(canFinalize). */
char reserved1[3]; /* Get us aligned to a four byte */
/* boundary. */
ColorServicesProc colorServices; /* Routine to access color services. */
AdvanceStateProc advanceState; /* Advance state. Valid to call only
within an acquireSelectorContinue
call. */
/* New in 3.0.4. */
ImageServicesProcs *imageServicesProcs;
/* The suite of image processing services
callbacks. */
int16 tileWidth; /* The width of the tiles. Zero if not set. */
int16 tileHeight; /* The height of the tiles. Zero if not set. */
Point tileOrigin; /* The origin point for the tiles. */
PropertyProcs *propertyProcs; /* Routines to query and set document and
view properties. The plug-in needs to
dispose of the handle returned for
complex properties (the plug-in also
maintains ownership of handles for
set properties.
*/
/* New in 4.0 */
PIDescriptorParameters *descriptorParameters; /* For recording and playback */
Str255 *errorString; /* For silent and errReportString */
/* New in 4.0.1. */
Boolean isFirstAlphaTransparency; /* Set to true if the first alpha channel contains transparency. */
char padding0;
char padding1;
char padding2;
/* New in 5.0 */
int32 maxValue; /* maximum value of data -- only used for 16 bit data */
SPBasicSuite *sSPBasic; /* SuitePea basic suite */
void *plugInRef; /* plugin reference used by SuitePea*/
int32 transparentIndex; /* if IndexedColor, and the value is between 0 and 255 (inclusive),
this is the index of the transparent color (for GIF) */
Handle iCCprofileData; /* Handle containing the ICC profile for the image. (NULL if none)
The handle must be allocated using Photoshop's handle suite.
Photoshop will use the data after the Finish call
and Photoshop will free the handle
*/
int32 iCCprofileSize; /* size of profile. */
int32 canUseICCProfiles; /* non-zero if the host can accept ICC profiles
if this is zero, you'd better not set iCCprofileData :-)
*/
char *pushDataSource; /* Pointer to c-string that contains TWAIN data source name.
Used for push scanning on Windows. */
/* Reserved Space for Expansion -- decrement when you add stuff */
char reserved [160]; /* Set to zero */
}
AcquireRecord, *AcquireRecordPtr;
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
/******************************************************************************/
/* turn off the byte align pragma back to its original state; only for Borland C */
#if defined(__BORLANDC__)
#pragma option -a.
#endif
/******************************************************************************/
#endif // __PIAcquire_h__
@@ -0,0 +1,980 @@
//-------------------------------------------------------------------------------
//
// File:
// PIActions.h
//
// Copyright 1996-1998, Adobe Systems Incorporated.
// All Rights Reserved.
//
// Distribution:
// PUBLIC
//
// Description:
// This file contains the public definitions and structures
// used by all plug-ins for scripting control and access.
//
// Use:
// This file must be included to correctly compile.
// It is included by all the plug-in headers.
//
// Version history:
// 1.0.0 1/1/1996 SP Initial Compilation.
// Photoshop 4.0.
//
// 2.0.0 3/18/1998 SP Photoshop 5.0.
// Updated for for Photoshop 5.0. Suite structures and
// new actions non-stream-based key access.
//
//-------------------------------------------------------------------------------
#ifndef __PIActions__ // Already defined?
#define __PIActions__
#ifndef MSWindows
#define MSWindows (MSDOS || WIN32)
#endif
#ifndef INSIDE_PHOTOSHOP
#define INSIDE_PHOTOSHOP 0
#endif
#ifdef Rez
#ifdef SystemSevenOrLater
#undef SystemSevenOrLater
#endif
#define SystemSevenOrLater 1
#if !MSWindows
#include "Types.r"
#include "AEUserTermTypes.r"
#include "AppleEvents.r"
#endif
#else
#include "PITypes.h"
#include "SPTypes.h"
#include "SPPlugs.h"
#if !MSWindows && !INSIDE_PHOTOSHOP
#include "AERegistry.h"
#endif
#endif // Rez
//-------------------------------------------------------------------------------
// Flags for dictionary parameters.
//-------------------------------------------------------------------------------
#define flagsSingleParameter \
required, singleItem, notEnumerated, reserved, \
reserved, reserved, reserved, reserved, \
reserved, reserved, reserved, reserved, \
prepositionParam, notFeminine, notMasculine, singular
#define flagsListParameter \
required, listOfItems, notEnumerated, reserved, \
reserved, reserved, reserved, reserved, \
reserved, reserved, reserved, reserved, \
prepositionParam, notFeminine, notMasculine, singular
#define flagsEnumeratedParameter \
required, singleItem, enumerated, reserved, \
reserved, reserved, reserved, reserved, \
reserved, reserved, reserved, reserved, \
prepositionParam, notFeminine, notMasculine, singular
#define flagsEnumeratedListParameter \
required, listOfItems, enumerated, reserved, \
reserved, reserved, reserved, reserved, \
reserved, reserved, reserved, reserved, \
prepositionParam, notFeminine, notMasculine, singular
#define flagsOptionalSingleParameter \
optional, singleItem, notEnumerated, reserved, \
reserved, reserved, reserved, reserved, \
reserved, reserved, reserved, reserved, \
prepositionParam, notFeminine, notMasculine, singular
#define flagsOptionalListParameter \
optional, listOfItems, notEnumerated, reserved, \
reserved, reserved, reserved, reserved, \
reserved, reserved, reserved, reserved, \
prepositionParam, notFeminine, notMasculine, singular
#define flagsOptionalEnumeratedParameter \
optional, singleItem, enumerated, reserved, \
reserved, reserved, reserved, reserved, \
reserved, reserved, reserved, reserved, \
prepositionParam, notFeminine, notMasculine, singular
#define flagsOptionalEnumeratedListParameter \
optional, listOfItems, enumerated, reserved, \
reserved, reserved, reserved, reserved, \
reserved, reserved, reserved, reserved, \
prepositionParam, notFeminine, notMasculine, singular
// Flags for object propeties:
#define flagsSingleProperty \
reserved, singleItem, notEnumerated, readWrite, \
reserved, reserved, reserved, reserved, \
reserved, reserved, reserved, reserved, \
noApostrophe, notFeminine, notMasculine, singular
#define flagsListProperty \
reserved, listOfItems, notEnumerated, readWrite, \
reserved, reserved, reserved, reserved, \
reserved, reserved, reserved, reserved, \
noApostrophe, notFeminine, notMasculine, singular
#define flagsEnumeratedProperty \
reserved, singleItem, enumerated, readWrite, \
reserved, reserved, reserved, reserved, \
reserved, reserved, reserved, reserved, \
noApostrophe, notFeminine, notMasculine, singular
#define flagsEnumeratedListProperty \
reserved, listOfItems, enumerated, readWrite, \
reserved, reserved, reserved, reserved, \
reserved, reserved, reserved, reserved, \
noApostrophe, notFeminine, notMasculine, singular
// Flags for direct dictionary parameters:
#define flagsOptionalEnumeratedChangesDirect \
directParamOptional, singleItem, enumerated, changesState, \
reserved, reserved, reserved, reserved, \
reserved, reserved, reserved, reserved, \
reserved, reserved, reserved, reserved
#define flagsEnumeratedChangesDirect \
directParamRequired, singleItem, enumerated, changesState, \
reserved, reserved, reserved, reserved, \
reserved, reserved, reserved, reserved, \
reserved, reserved, reserved, reserved
#define flagsEnumeratedDirect \
directParamRequired, singleItem, enumerated, doesntChangeState, \
reserved, reserved, reserved, reserved, \
reserved, reserved, reserved, reserved, \
reserved, reserved, reserved, reserved
#define flagsChangesDirect \
directParamRequired, singleItem, notEnumerated, changesState, \
reserved, reserved, reserved, reserved, \
reserved, reserved, reserved, reserved, \
reserved, reserved, reserved, reserved
//-------------------------------------------------------------------------------
// Handy short cuts.
//-------------------------------------------------------------------------------
#define NO_REPLY \
noReply, \
"", \
replyRequired, singleItem, notEnumerated, notTightBindingFunction, \
reserved, reserved, reserved, reserved, \
reserved, reserved, reserved, reserved, \
verbEvent, reserved, reserved, reserved
#define IMAGE_DIRECT_PARAMETER \
typeImageReference, \
"", \
flagsOptionalEnumeratedChangesDirect
//-------------------------------------------------------------------------------
// NOTE: 1/21/98 (Ace) I'm going to leave these conditional defines in this
// file to keep PITerminology devoid of conditionals:
/* Normalize the AppleScript terminology */
#if MSWindows // These items come from AppleScript
#define formName 'name'
#define typeFloat 'doub'
#define typeInteger 'long'
#define typeBoolean 'bool'
#define typeAlias 'alis'
#define typeNull 'null'
#define roman 0
#define english 0
#define japanese 11
#ifndef noReply
#define noReply typeNull
#endif
#ifndef __APPLEEVENTS__
#define typeType 'type'
#define typeChar 'TEXT'
#define typeObjectSpecifier 'obj '
#define typeEnumerated 'enum'
#endif /* __APPLEEVENTS __ */
#ifndef __AEOBJECTS__
#define formAbsolutePosition 'indx'
#define formPropertyID 'prop'
#define formRelativePosition 'rele'
#endif /* __AEOBJECTS__ */
#endif /* MSWindows */
#if INSIDE_PHOTOSHOP || !defined(keySelection)
#define keySelection 'fsel' // keySelection
#endif
#define typePath 'Pth '
#if MSWindows
#define typePlatformFilePath typePath
#else
#define typePlatformFilePath typeAlias
#endif
#include "PITerminology.h"
//-------------------------------------------------------------------------------
#ifndef Rez
//-------------------------------------------------------------------------------
#define PIHasTerminologyProperty 0x6873746DL /* 'hstm' <PITerminology> Has <aete, 0> resource:
version number
classID: Object or event class
eventID: For events (typeNull otherwise)
terminologyID: 'aete' resource ID (ignored if PITerminologyProperty)
scopeString: Unique string present if
AppleScript not supported
*/
#define PITerminologyProperty 0x74726D6EL /* 'trmn' <aete> Used internaly as terminology cache.
If present it is used instead of an aete resource.
*/
// These are the flags for recordInfo:
typedef int32 PIDialogRecordOptions;
enum
{
plugInDialogOptional,
plugInDialogRequired,
plugInDialogNone
};
// These flags are used for playInfo:
typedef int32 PIDialogPlayOptions;
enum
{
plugInDialogDontDisplay,
plugInDialogDisplay,
plugInDialogSilent
};
//-------------------------------------------------------------------------------
// Flags returned by GetKey. Low order word corresponds to AppleEvent flags.
//-------------------------------------------------------------------------------
#define actionSimpleParameter 0x00000000L
#define actionEnumeratedParameter 0x00002000L
#define actionListParameter 0x00004000L
#define actionOptionalParameter 0x00008000L
#define actionObjectParameter 0x80000000L
#define actionScopedParameter 0x40000000L
#define actionStringIDParameter 0x20000000L
//-------------------------------------------------------------------------------
typedef Handle PIDescriptorHandle;
typedef struct PIOpaqueWriteDescriptor* PIWriteDescriptor;
typedef struct PIOpaqueReadDescriptor* PIReadDescriptor;
typedef unsigned long DescriptorEventID;
typedef unsigned long DescriptorClassID;
typedef unsigned long DescriptorKeyID;
typedef unsigned long DescriptorTypeID;
typedef unsigned long DescriptorUnitID;
typedef unsigned long DescriptorEnumID;
typedef unsigned long DescriptorEnumTypeID;
typedef unsigned long DescriptorFormID;
typedef DescriptorKeyID DescriptorKeyIDArray[];
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
#if WIN32
#pragma pack(push,1)
#endif
typedef struct PITerminology
{
int32 version;
OSType classID;
OSType eventID;
int16 terminologyID;
char scopeString[1]; // C string
} PITerminology;
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
#if WIN32
#pragma pack(pop)
#endif
#define PITerminologyMinSize 15
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
typedef struct PIDescriptorSimpleReference
{
DescriptorTypeID desiredClass;
DescriptorKeyID keyForm;
struct _keyData
{
Str255 name;
int32 index;
DescriptorTypeID type;
DescriptorEnumID value;
} keyData;
} PIDescriptorSimpleReference;
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
//-------------------------------------------------------------------------------
#ifdef __cplusplus
extern "C"
{
#endif
//-------------------------------------------------------------------------------
// WriteDescriptor callbacks.
//-------------------------------------------------------------------------------
typedef MACPASCAL PIWriteDescriptor (*OpenWriteDescriptorProc)(void);
typedef MACPASCAL OSErr (*CloseWriteDescriptorProc)(PIWriteDescriptor, PIDescriptorHandle*);
typedef MACPASCAL OSErr (*PutIntegerProc)(PIWriteDescriptor, DescriptorKeyID, int32);
typedef MACPASCAL OSErr (*PutFloatProc)(PIWriteDescriptor, DescriptorKeyID, const double*);
typedef MACPASCAL OSErr (*PutUnitFloatProc)(PIWriteDescriptor, DescriptorKeyID, DescriptorUnitID, const double*);
typedef MACPASCAL OSErr (*PutBooleanProc)(PIWriteDescriptor, DescriptorKeyID, Boolean);
typedef MACPASCAL OSErr (*PutTextProc)(PIWriteDescriptor, DescriptorKeyID, Handle);
typedef MACPASCAL OSErr (*PutAliasProc)(PIWriteDescriptor, DescriptorKeyID, Handle);
typedef MACPASCAL OSErr (*PutEnumeratedProc)(PIWriteDescriptor, DescriptorKeyID key, DescriptorTypeID type, DescriptorEnumID value);
typedef MACPASCAL OSErr (*PutClassProc)(PIWriteDescriptor, DescriptorKeyID, DescriptorTypeID);
typedef MACPASCAL OSErr (*PutSimpleReferenceProc)(PIWriteDescriptor, DescriptorKeyID, const PIDescriptorSimpleReference*);
typedef MACPASCAL OSErr (*PutObjectProc)(PIWriteDescriptor, DescriptorKeyID, DescriptorTypeID, PIDescriptorHandle);
typedef MACPASCAL OSErr (*PutCountProc)(PIWriteDescriptor, DescriptorKeyID, uint32 count);
typedef MACPASCAL OSErr (*PutStringProc)(PIWriteDescriptor, DescriptorKeyID, ConstStr255Param);
// Scoped classes are not for use by plug-ins in Photoshop 4.0:
typedef MACPASCAL OSErr (*PutScopedClassProc)(PIWriteDescriptor, DescriptorKeyID, DescriptorTypeID);
typedef MACPASCAL OSErr (*PutScopedObjectProc)(PIWriteDescriptor, DescriptorKeyID, DescriptorTypeID, PIDescriptorHandle);
//-------------------------------------------------------------------------------
// ReadDescriptor callbacks.
//-------------------------------------------------------------------------------
typedef MACPASCAL PIReadDescriptor (*OpenReadDescriptorProc)(PIDescriptorHandle, DescriptorKeyIDArray);
typedef MACPASCAL OSErr (*CloseReadDescriptorProc)(PIReadDescriptor);
typedef MACPASCAL Boolean (*GetKeyProc)(PIReadDescriptor, DescriptorKeyID* key, DescriptorTypeID* type, int32* flags);
typedef MACPASCAL OSErr (*GetIntegerProc)(PIReadDescriptor, int32*);
typedef MACPASCAL OSErr (*GetFloatProc)(PIReadDescriptor, double*);
typedef MACPASCAL OSErr (*GetUnitFloatProc)(PIReadDescriptor, DescriptorUnitID*, double*);
typedef MACPASCAL OSErr (*GetBooleanProc)(PIReadDescriptor, Boolean*);
typedef MACPASCAL OSErr (*GetTextProc)(PIReadDescriptor, Handle*);
typedef MACPASCAL OSErr (*GetAliasProc)(PIReadDescriptor, Handle*);
typedef MACPASCAL OSErr (*GetEnumeratedProc)(PIReadDescriptor, DescriptorEnumID*);
typedef MACPASCAL OSErr (*GetClassProc)(PIReadDescriptor, DescriptorTypeID*);
typedef MACPASCAL OSErr (*GetSimpleReferenceProc)(PIReadDescriptor, PIDescriptorSimpleReference*);
typedef MACPASCAL OSErr (*GetObjectProc)(PIReadDescriptor, DescriptorTypeID*, PIDescriptorHandle*);
typedef MACPASCAL OSErr (*GetCountProc)(PIReadDescriptor, uint32*);
typedef MACPASCAL OSErr (*GetStringProc)(PIReadDescriptor, Str255*);
typedef MACPASCAL OSErr (*GetPinnedIntegerProc)(PIReadDescriptor, int32 min, int32 max, int32*);
typedef MACPASCAL OSErr (*GetPinnedFloatProc)(PIReadDescriptor, const double* min, const double* max, double*);
typedef MACPASCAL OSErr (*GetPinnedUnitFloatProc)(PIReadDescriptor, const double* min, const double* max, DescriptorUnitID*, double*);
//-------------------------------------------------------------------------------
#ifdef __cplusplus
}
#endif
//-------------------------------------------------------------------------------
// WriteDescriptorProcs structure.
//-------------------------------------------------------------------------------
// Version:
#define kCurrentWriteDescriptorProcsVersion 0
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
typedef struct WriteDescriptorProcs
{
int16 writeDescriptorProcsVersion;
int16 numWriteDescriptorProcs;
OpenWriteDescriptorProc openWriteDescriptorProc;
CloseWriteDescriptorProc closeWriteDescriptorProc;
PutIntegerProc putIntegerProc;
PutFloatProc putFloatProc;
PutUnitFloatProc putUnitFloatProc;
PutBooleanProc putBooleanProc;
PutTextProc putTextProc;
PutAliasProc putAliasProc;
PutEnumeratedProc putEnumeratedProc;
PutClassProc putClassProc;
PutSimpleReferenceProc putSimpleReferenceProc;
PutObjectProc putObjectProc;
PutCountProc putCountProc;
PutStringProc putStringProc;
/* Scoped classes are not for use by plug-ins in Photoshop 4.0 */
PutScopedClassProc putScopedClassProc;
PutScopedObjectProc putScopedObjectProc;
} WriteDescriptorProcs;
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
// Count:
#define kCurrentWriteDescriptorProcsCount \
((sizeof(WriteDescriptorProcs) - offsetof(WriteDescriptorProcs, openWriteDescriptorProc)) / sizeof(void*))
//-------------------------------------------------------------------------------
// ReadDescriptorProcs structure.
//-------------------------------------------------------------------------------
// Version:
#define kCurrentReadDescriptorProcsVersion 0
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
typedef struct ReadDescriptorProcs
{
int16 readDescriptorProcsVersion;
int16 numReadDescriptorProcs;
OpenReadDescriptorProc openReadDescriptorProc;
CloseReadDescriptorProc closeReadDescriptorProc;
GetKeyProc getKeyProc;
GetIntegerProc getIntegerProc;
GetFloatProc getFloatProc;
GetUnitFloatProc getUnitFloatProc;
GetBooleanProc getBooleanProc;
GetTextProc getTextProc;
GetAliasProc getAliasProc;
GetEnumeratedProc getEnumeratedProc;
GetClassProc getClassProc;
GetSimpleReferenceProc getSimpleReferenceProc;
GetObjectProc getObjectProc;
GetCountProc getCountProc;
GetStringProc getStringProc;
GetPinnedIntegerProc getPinnedIntegerProc;
GetPinnedFloatProc getPinnedFloatProc;
GetPinnedUnitFloatProc getPinnedUnitFloatProc;
} ReadDescriptorProcs;
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
// Count:
#define kCurrentReadDescriptorProcsCount \
((sizeof(ReadDescriptorProcs) - offsetof(ReadDescriptorProcs, openReadDescriptorProc)) / sizeof(void*))
//-------------------------------------------------------------------------------
// PIDescriptorParameters structure.
//-------------------------------------------------------------------------------
// Version:
#define kCurrentDescriptorParametersVersion 0
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
typedef struct PIDescriptorParameters
{
int16 descriptorParametersVersion;
int16 playInfo;
int16 recordInfo;
PIDescriptorHandle descriptor;
WriteDescriptorProcs* writeDescriptorProcs;
ReadDescriptorProcs* readDescriptorProcs;
} PIDescriptorParameters;
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
//-------------------------------------------------------------------------------
// Window notify suite.
//-------------------------------------------------------------------------------
// The window notify suite is used on the Macintosh to receive event notification
// during play:
#if !MSWindows
#define kPSWindowNotifySuite "482963f4-3ea1-11d1-8da3-00c04fd5f7ee"
#define kPSWindowNotifySuiteVersion 1
#ifdef __cplusplus
extern "C"
{
#endif
typedef void (*PIWindowNotifier)(const EventRecord* event, void* data);
#ifdef __cplusplus
}
#endif
typedef struct PSWindowNotifyProcs
{
SPAPI OSErr (*AddNotify)(WindowRef window, PIWindowNotifier notifier, void* data);
SPAPI OSErr (*RemoveNotify)(WindowRef window);
} PSWindowNotifyProcs;
#endif
//-------------------------------------------------------------------------------
typedef struct _ADsc* PIActionDescriptor;
typedef struct _ALst* PIActionList;
typedef struct _ARef* PIActionReference;
// other define for this is in ASZStringSuite.h; placed here for SuspendHistory
#ifndef ASZString_defined
#define ASZString_defined
struct ASZByteRun;
typedef struct ASZByteRun *ASZString;
#endif
//-------------------------------------------------------------------------------
// ActionControl suite. Available only in Automation plug-ins.
//-------------------------------------------------------------------------------
#define kPSActionControlSuite "bc1e4d70-f953-11d0-8d9f-00c04fd5f7ee"
#define kPSActionControlSuiteVersion 2
#ifdef __cplusplus
extern "C"
{
#endif
// Use PIEventNotifier as the prototype for your routine that will
// receive action event notification (see AddNotify(), below):
typedef void (*PIEventNotifier)
(
DescriptorEventID eventID, // Event that occurred.
PIActionDescriptor descriptor, // Copy of result descriptor.
PIDialogRecordOptions options, // Options passed from event.
void* data // Plug-in data.
);
// Use PISuspendProc as the prototype for your routine that will
// play actions which will NOT get recorded to the Actions Palette
// (see SuspendHistory(), below):
typedef SPErr (*PISuspendProc)
(
void *data // Plug-in data.
);
#ifdef __cplusplus
}
#endif
typedef struct PSActionControlProcs
{
// Play dispatches an event into the actions mechanism. You must
// supply the event's ID (or runtime ID), a 4-character long; a descriptor
// describing any specific parameters for that event (if any), and the dialog
// options for whether to pop a dialog, don't pop a dialog (unless necessary),
// or stay absolutely silent. If it returns an error, the result descriptor
// may contain keyMessage, a string with the error message:
SPAPI OSErr (*Play)
(
/* OUT */ PIActionDescriptor* result, // When done, free this if not NULL.
/* IN */ DescriptorEventID event, // Event to play. See PITerminology.h.
/* IN */ PIActionDescriptor descriptor, // Descriptor for event.
/* IN */ PIDialogPlayOptions options // plugInDialogDisplay, dontDisplay, silent.
);
// Get. The actions system also acts as a database for properties. Use the Get
// routine as a quick way to get properties out of the host. You must build
// a reference to the object and the property, and it will return a descriptor
// with the pertinent information:
SPAPI OSErr (*Get)
(
/* OUT */ PIActionDescriptor* result, // When done, free this if not NULL.
/* IN */ PIActionReference reference // Reference to property. See reference suite.
);
// StringIDtoTypeID takes the ScopeString from the HasTerminology PiPL property and
// returns its runtime ID. If the string is not present, it generates a new
// runtime ID, so the only way to know if the ID is valid is whether the Play
// command returns with no error when passing this as the event:
SPAPI OSErr (*StringIDToTypeID)
(
/* IN */ char *stringID, // ScopeString from HasTerminology PiPL property.
/* OUT */ DescriptorTypeID *typeID // 4-character runtime ID.
);
// TypeIDToStringID requires a runtime ID and returns the HasTerminology PiPL property's
// ScopeString, if valid:
SPAPI OSErr (*TypeIDToStringID)
(
/* IN */ DescriptorTypeID typeID, // Runtime IDs only.
/* OUT */ char *stringID, // ScopeString from HasTerminology PiPL property.
/* IN */ uint32 stringLength // Buffer size/Maximum string length.
);
// AddNotify specifies a notification routine for specific events. Use
// "eventAll" to get notified on all events.
//
// NOTE: It is your responsibility to remove any notifiers you add.
//
// Any one event can only dispatch to one notifier routine, but you can have
// one notifier routine receive multiple events:
SPAPI OSErr (*AddNotify)
(
/* IN */ SPPluginRef ref, // Plug-in reference to calling plug-in.
/* IN */ DescriptorEventID event, // Any event. Use "eventAll" for all.
/* IN */ PIEventNotifier notifier, // Routine to call when event occurs.
/* IN */ void* data // Any local data.
);
// RemoveNotify. NOTE: It is your responsibility to remove any notifiers you add:
SPAPI OSErr (*RemoveNotify)
(
/* IN */ SPPluginRef ref, // Plug-in reference to calling plug-in.
/* IN */ DescriptorEventID event // Specific event to remove notifier for.
);
// SuspendHistory. Given a reference to a document, SuspendHistory will suspend recording
// of events to the History Palette, then call proc(data). When proc returns, history
// recording will be re-enabled, and a final state will be added to the History palette
// with the label specified by operationName.
SPAPI OSErr (*SuspendHistory)
(
/* IN */ PIActionReference reference,// Reference to a doc (or something contained in one)
/* IN */ PISuspendProc proc, // Callback function in the plugin
/* IN */ void *procData, // Data to be sent to proc
/* IN */ ASZString operationName // Name of the operation Actions palette
);
} PSActionControlProcs;
//-------------------------------------------------------------------------------
// Basic Action control suite. Available to non-Automation plug-ins.
//-------------------------------------------------------------------------------
#define kPSBasicActionControlSuite "3eb7c480-8797-11d1-8da7-00c04fd5f7ee"
#define kPSBasicActionControlSuiteVersion 1
typedef struct PSBasicActionControlProcs
{
// Get. The actions system also acts as a database for properties. Use the Get
// routine as a quick way to get properties out of the host. You must build
// a reference to the object and the property, and it will return a descriptor
// with the pertinent information:
SPAPI OSErr (*Get)
(
/* OUT */ PIActionDescriptor* result, // When done, free this if not NULL.
/* IN */ PIActionReference reference // Reference to property. See reference suite.
);
// StringIDtoTypeID takes the ScopeString from the HasTerminology PiPL property and
// returns its runtime ID. If the string is not present, it generates a new
// runtime ID, so the only way to know if the ID is valid is whether the Play
// command returns with no error when passing this as the event:
SPAPI OSErr (*StringIDToTypeID)
(
/* IN */ char *stringID, // ScopeString from HasTerminology PiPL property.
/* OUT */ DescriptorTypeID *typeID // 4-character runtime ID.
);
// TypeIDToStringID requires a runtime ID and returns the HasTerminology PiPL property's
// ScopeString, if valid:
SPAPI OSErr (*TypeIDToStringID)
(
/* IN */ DescriptorTypeID typeID, // Runtime IDs only.
/* OUT */ char *stringID, // ScopeString from HasTerminology PiPL property.
/* IN */ uint32 stringLength // Buffer size/Maximum string length.
);
} PSBasicActionControlProcs;
//-------------------------------------------------------------------------------
// DescriptorRegistry suite. Use to pass descriptors between plug-ins or
// save parameters between invocations.
//-------------------------------------------------------------------------------
#define kPSDescriptorRegistrySuite "61e608b0-40fd-11d1-8da3-00c04fd5f7ee"
#define kPSDescriptorRegistrySuiteVersion 1
typedef struct PSDescriptorRegistryProcs
{
// Register. To add a descriptor to the registry, supply a unique id key,
// the descriptor, and then mark it persistent to get saved and restored
// across invocations of the app. (Perfect for preferences-like things):
SPAPI OSErr (*Register)
(
/* IN */ const char* key, // Unique string or ID.
/* IN */ PIActionDescriptor descriptor, // Descriptor with pertinent keys.
/* IN */ Boolean isPersistent // Indicate whether to save and restore.
);
// Erase. Remove a key from the registry:
SPAPI OSErr (*Erase)
(
/* IN */ const char* key // Unique string or ID.
);
// Get. Return a key from the registry. The descriptor is a copy, so it
// is your responsibility to Free it when done:
SPAPI OSErr (*Get)
(
/* IN */ const char* key, // Unique string or ID.
/* OUT */ PIActionDescriptor* descriptor // When done, free if not NULL.
);
} PSDescriptorRegistryProcs;
//-------------------------------------------------------------------------------
// ActionDescriptor suite. Use for putting keys and objects into descriptors,
// getting them out of descriptors, and other descriptor management.
//-------------------------------------------------------------------------------
#define kPSActionDescriptorSuite "df135115-c769-11d0-8079-00c04fd7ec47"
#define kPSActionDescriptorSuiteVersion 2
typedef struct PSActionDescriptorProcs
{
// ALLOCATES: descriptor
SPAPI OSErr (*Make)(PIActionDescriptor *descriptor);
SPAPI OSErr (*Free)(PIActionDescriptor descriptor);
SPAPI OSErr (*GetType)(PIActionDescriptor descriptor, DescriptorKeyID key, DescriptorTypeID *type);
// index is zero based
SPAPI OSErr (*GetKey)(PIActionDescriptor descriptor, uint32 index, DescriptorKeyID *key);
SPAPI OSErr (*HasKey)(PIActionDescriptor descriptor, DescriptorKeyID key, Boolean *hasKey);
SPAPI OSErr (*GetCount)(PIActionDescriptor descriptor, uint32 *count);
SPAPI OSErr (*IsEqual)(PIActionDescriptor descriptor, PIActionDescriptor other, Boolean *isEqual);
SPAPI OSErr (*Erase)(PIActionDescriptor descriptor, DescriptorKeyID key);
SPAPI OSErr (*Clear)(PIActionDescriptor descriptor);
SPAPI OSErr (*PutInteger)(PIActionDescriptor descriptor, DescriptorKeyID key, int32 value);
SPAPI OSErr (*PutFloat)(PIActionDescriptor descriptor, DescriptorKeyID key, double value);
SPAPI OSErr (*PutUnitFloat)(PIActionDescriptor descriptor, DescriptorKeyID key, DescriptorUnitID unit, double value);
SPAPI OSErr (*PutString)(PIActionDescriptor descriptor, DescriptorKeyID key, char *cstrValue);
SPAPI OSErr (*PutBoolean)(PIActionDescriptor descriptor, DescriptorKeyID key, Boolean value);
SPAPI OSErr (*PutList)(PIActionDescriptor descriptor, DescriptorKeyID key, PIActionList value);
SPAPI OSErr (*PutObject)(PIActionDescriptor descriptor, DescriptorKeyID key, DescriptorClassID type, PIActionDescriptor value);
SPAPI OSErr (*PutGlobalObject)(PIActionDescriptor descriptor, DescriptorKeyID key, DescriptorClassID type, PIActionDescriptor value);
SPAPI OSErr (*PutEnumerated)(PIActionDescriptor descriptor, DescriptorKeyID key, DescriptorEnumTypeID type, DescriptorEnumID value);
SPAPI OSErr (*PutReference)(PIActionDescriptor descriptor, DescriptorKeyID key, PIActionReference value);
SPAPI OSErr (*PutClass)(PIActionDescriptor descriptor, DescriptorKeyID key, DescriptorClassID value);
SPAPI OSErr (*PutGlobalClass)(PIActionDescriptor descriptor, DescriptorKeyID key, DescriptorClassID value);
SPAPI OSErr (*PutAlias)(PIActionDescriptor descriptor, DescriptorKeyID key, Handle value);
SPAPI OSErr (*GetInteger)(PIActionDescriptor descriptor, DescriptorKeyID key, int32* value);
SPAPI OSErr (*GetFloat)(PIActionDescriptor descriptor, DescriptorKeyID key, double* value);
SPAPI OSErr (*GetUnitFloat)(PIActionDescriptor descriptor, DescriptorKeyID key, DescriptorUnitID* unit, double* value);
SPAPI OSErr (*GetStringLength)(PIActionDescriptor descriptor, DescriptorKeyID key, uint32 *stringLength);
SPAPI OSErr (*GetString)(PIActionDescriptor descriptor, DescriptorKeyID key, char *cstrValue, uint32 maxLength);
SPAPI OSErr (*GetBoolean)(PIActionDescriptor descriptor, DescriptorKeyID key, Boolean* value);
SPAPI OSErr (*GetList)(PIActionDescriptor descriptor, DescriptorKeyID key, PIActionList* value);
SPAPI OSErr (*GetObject)(PIActionDescriptor descriptor, DescriptorKeyID key, DescriptorClassID* type, PIActionDescriptor* value);
SPAPI OSErr (*GetGlobalObject)(PIActionDescriptor descriptor, DescriptorKeyID key, DescriptorClassID* type, PIActionDescriptor* value);
SPAPI OSErr (*GetEnumerated)(PIActionDescriptor descriptor, DescriptorKeyID key, DescriptorEnumTypeID* type, DescriptorEnumID* value);
SPAPI OSErr (*GetReference)(PIActionDescriptor descriptor, DescriptorKeyID key, PIActionReference* value);
SPAPI OSErr (*GetClass)(PIActionDescriptor descriptor, DescriptorKeyID key, DescriptorClassID* value);
SPAPI OSErr (*GetGlobalClass)(PIActionDescriptor descriptor, DescriptorKeyID key, DescriptorClassID* value);
SPAPI OSErr (*GetAlias)(PIActionDescriptor descriptor, DescriptorKeyID key, Handle* value);
SPAPI OSErr (*HasKeys)(PIActionDescriptor descriptor, DescriptorKeyIDArray requiredKeys, Boolean *hasKeys);
SPAPI OSErr (*PutIntegers)(PIActionDescriptor descriptor, DescriptorKeyID key, uint32 count, int32* value);
SPAPI OSErr (*GetIntegers)(PIActionDescriptor descriptor, DescriptorKeyID key, uint32 count, int32* value);
SPAPI OSErr (*AsHandle)(PIActionDescriptor descriptor, PIDescriptorHandle *value);
SPAPI OSErr (*HandleToDescriptor)(PIDescriptorHandle value, PIActionDescriptor *descriptor);
SPAPI OSErr (*PutZString)(PIActionDescriptor descriptor, DescriptorKeyID key, ASZString zstring);
SPAPI OSErr (*GetZString)(PIActionDescriptor descriptor, DescriptorKeyID key, ASZString *zstring);
SPAPI OSErr (*PutData)(PIActionDescriptor descriptor, DescriptorKeyID key, int32 length, void *value);
SPAPI OSErr (*GetDataLength)(PIActionDescriptor descriptor, DescriptorKeyID key, int32* value);
SPAPI OSErr (*GetData)(PIActionDescriptor descriptor, DescriptorKeyID key, void* value);
} PSActionDescriptorProcs;
//-------------------------------------------------------------------------------
// ActionList suite. Use to manage lists of keys.
//-------------------------------------------------------------------------------
#define kPSActionListSuite "df135116-c769-11d0-8079-00c04fd7ec47"
#define kPSActionListSuiteVersion 1
typedef struct PSActionListProcs
{
SPAPI OSErr (*Make)(PIActionList *actionList);
SPAPI OSErr (*Free)(PIActionList actionList);
SPAPI OSErr (*GetType)(PIActionList list, uint32 index, DescriptorTypeID *value);
SPAPI OSErr (*GetCount)(PIActionList list, uint32 *value);
SPAPI OSErr (*PutInteger)(PIActionList list, int32 value);
SPAPI OSErr (*PutFloat)(PIActionList list, double value);
SPAPI OSErr (*PutUnitFloat)(PIActionList list, DescriptorUnitID unit, double value);
SPAPI OSErr (*PutString)(PIActionList list, char *cstr);
SPAPI OSErr (*PutBoolean)(PIActionList list, Boolean value);
SPAPI OSErr (*PutList)(PIActionList list, PIActionList value);
SPAPI OSErr (*PutObject)(PIActionList list, DescriptorClassID type, PIActionDescriptor value);
SPAPI OSErr (*PutGlobalObject)(PIActionList list, DescriptorClassID type, PIActionDescriptor value);
SPAPI OSErr (*PutEnumerated)(PIActionList list, DescriptorEnumTypeID type, DescriptorEnumID value);
SPAPI OSErr (*PutReference)(PIActionList list, PIActionReference value);
SPAPI OSErr (*PutClass)(PIActionList list, DescriptorClassID value);
SPAPI OSErr (*PutGlobalClass)(PIActionList list, DescriptorClassID value);
SPAPI OSErr (*PutAlias)(PIActionList list, Handle value);
SPAPI OSErr (*GetInteger)(PIActionList list, uint32 index, int32 *value);
SPAPI OSErr (*GetFloat)(PIActionList list, uint32 index, double *value);
SPAPI OSErr (*GetUnitFloat)(PIActionList list, uint32 index, DescriptorUnitID* unit, double *value);
SPAPI OSErr (*GetStringLength)(PIActionList list, uint32 index, uint32 *stringLength);
SPAPI OSErr (*GetString)(PIActionList list, uint32 index, char *cstr, uint32 maxLength);
SPAPI OSErr (*GetBoolean)(PIActionList list, uint32 index, Boolean *value);
SPAPI OSErr (*GetList)(PIActionList list, uint32 index, PIActionList *actionList);
SPAPI OSErr (*GetObject)(PIActionList list, uint32 index, DescriptorClassID* type, PIActionDescriptor *value);
SPAPI OSErr (*GetGlobalObject)(PIActionList list, uint32 index, DescriptorClassID* type, PIActionDescriptor *value);
SPAPI OSErr (*GetEnumerated)(PIActionList list, uint32 index, DescriptorEnumTypeID* type, DescriptorEnumID *value);
SPAPI OSErr (*GetReference)(PIActionList list, uint32 index, PIActionReference *value);
SPAPI OSErr (*GetClass)(PIActionList list, uint32 index, DescriptorClassID *value);
SPAPI OSErr (*GetGlobalClass)(PIActionList list, uint32 index, DescriptorClassID *value);
SPAPI OSErr (*GetAlias)(PIActionList list, uint32 index, Handle *aliasHandle);
SPAPI OSErr (*PutIntegers)(PIActionList list, uint32 count, int32* value);
SPAPI OSErr (*GetIntegers)(PIActionList list, uint32 count, int32* value);
SPAPI OSErr (*PutData)(PIActionList list, int32 length, void *data);
SPAPI OSErr (*GetDataLength)(PIActionList list, uint32 index, int32* length);
SPAPI OSErr (*GetData)(PIActionList list, uint32 index, void* value);
SPAPI OSErr (*PutZString)(PIActionList list, ASZString zstring);
SPAPI OSErr (*GetZString)(PIActionList list, uint32 index, ASZString *zstring);
} PSActionListProcs;
//-------------------------------------------------------------------------------
// ActionReference suite. Use to build references to objects to be able to
// get/set properties and target events.
//-------------------------------------------------------------------------------
#define kPSActionReferenceSuite "df135117-c769-11d0-8079-00c04fd7ec47"
#define kPSActionReferenceSuiteVersion 2
typedef struct PSActionReferenceProcs
{
SPAPI OSErr (*Make)(PIActionReference *reference);
SPAPI OSErr (*Free)(PIActionReference ref);
SPAPI OSErr (*GetForm)(PIActionReference ref, DescriptorFormID *value);
SPAPI OSErr (*GetDesiredClass)(PIActionReference ref, DescriptorClassID *value);
SPAPI OSErr (*PutName)(PIActionReference ref, DescriptorClassID desiredClass, char *cstrValue);
SPAPI OSErr (*PutIndex)(PIActionReference ref, DescriptorClassID desiredClass, uint32 value);
SPAPI OSErr (*PutIdentifier)(PIActionReference ref, DescriptorClassID desiredClass, uint32 value);
SPAPI OSErr (*PutOffset)(PIActionReference ref, DescriptorClassID desiredClass, int32 value);
SPAPI OSErr (*PutEnumerated)(PIActionReference ref, DescriptorClassID desiredClass, DescriptorEnumTypeID type, DescriptorEnumID value);
SPAPI OSErr (*PutProperty)(PIActionReference ref, DescriptorClassID desiredClass, DescriptorKeyID value);
SPAPI OSErr (*PutClass)(PIActionReference ref, DescriptorClassID desiredClass);
SPAPI OSErr (*GetNameLength)(PIActionReference ref, uint32 *stringLength);
SPAPI OSErr (*GetName)(PIActionReference ref, char *name, uint32 maxLength);
SPAPI OSErr (*GetIndex)(PIActionReference ref, uint32 *value);
SPAPI OSErr (*GetIdentifier)(PIActionReference ref, uint32 *value);
SPAPI OSErr (*GetOffset)(PIActionReference ref, int32 *value);
SPAPI OSErr (*GetEnumerated)(PIActionReference ref, DescriptorEnumTypeID* type, DescriptorEnumID *enumValue);
SPAPI OSErr (*GetProperty)(PIActionReference ref, DescriptorKeyID *value);
SPAPI OSErr (*GetContainer)(PIActionReference ref, PIActionReference *value);
} PSActionReferenceProcs;
//-------------------------------------------------------------------------------
// PIActionParameters structure.
//-------------------------------------------------------------------------------
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
#if WIN32
#pragma pack(push,1)
#endif
typedef struct PIActionParameters
{
PIDialogPlayOptions playInfo;
PIDialogRecordOptions recordInfo;
PIActionDescriptor descriptor;
} PIActionParameters;
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
#if WIN32
#pragma pack(pop)
#endif
//-------------------------------------------------------------------------------
#endif // Rez
//-------------------------------------------------------------------------------
#endif // __PIActions_h__
@@ -0,0 +1,44 @@
//-------------------------------------------------------------------------------
//
// File:
// PIActionsPlugIn.h
//
// Copyright 1991-1998, Adobe Systems Incorporated.
// All Rights Reserved.
//
// Distribution:
// PUBLIC
//
// Description:
// This file describes version 1.0 of Photoshop's actions plug-in module
// interface.
//
// Use:
// Include in Photoshop Action plug-ins.
//
//
// Version history:
// Version 1.0.0 1/15/98 CM Initial compilation.
//
//
//
//-------------------------------------------------------------------------------
#ifndef __PIActionsPlugIn__
#define __PIActionsPlugIn__
#include "PIActions.h"
#include "PIGeneral.h"
#include "SPBasic.h"
#include "SPMData.h"
/********************************************************************************/
typedef struct PSActionsPlugInMessage
{
SPMessageData d;
PIActionParameters *actionParameters; /* For recording and playback */
} PSActionsPlugInMessage;
#endif // __PIActionsPlugIn_h__
@@ -0,0 +1,399 @@
/*
* Name:
* SPAccess.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* SP Access Suite.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/1/1995 DL First version.
* Created by Adobe Systems Incorporated.
*/
#ifndef __SPAccess__
#define __SPAccess__
/*******************************************************************************
**
** Imports
**
**/
#include "SPTypes.h"
#include "SPPlugs.h"
#include "SPMData.h"
#ifdef __cplusplus
extern "C" {
#endif
/*******************************************************************************
**
** Constants
**
**/
/*
* The name and version number of the Plug-in Access suite.
*/
#define kSPAccessSuite "SP Access Suite"
#define kSPAccessSuiteVersion 3
/*
* The access suite sends reload and unload messages to PICA plug-ins.
* They are used to inform the plug-in that it has just been loaded into
* RAM or is about to be unloaded. A plug-in is automatically loaded by
* PICA when the host app or another plug-in calls it or acquires a
* suite that it exports. A plug-in may be unloaded at any time if it
* is not being used.
*
* "Reload" is the very first message that a PICA plug-in receives before
* it is started up (in this case the message really means "Load"). "Unload" is
* the very last message a plug-in receives after it is shut down. In between,
* a plug-in must be prepared to be unloaded and reloaded any time it is not
* being used. "Unload" is the plug-in's opportunity to save state information
* that it will re-instantiate when it is reloaded. How this is done depends
* on the platform and environment.
*
* Here is the sequence of events:
*
* 1) Reload: plug-in does nothing, since it hasn't been started up yet.
* 2) Startup: plug-in initializes globals, adds features to application.
* ...
* n) Unload: plug-in saves globals (using the 'globals' field in the
* SPMessageData structure).
* ...
* o) Reload: plug-in restores globals.
* ...
* p) Unload: plug-in saves globals.
* ...
* z-1) Reload: plug-in restores globals.
* z) Shutdown: plug-in saves preferences, removes features from application.
*
* In addition, a plug-in that exports a suite will need to unload and reload
* the suite's procedure pointers. Unloading the suite means stuffing the
* suite's procedure pointers with the address of the Undefined() function in
* the Basic suite (which is always available). This is a protective measure
* against other plug-ins that may mistakenly use the suite after they have
* released it. Reloading the suite means stuffing the suite's procedure
* pointers with the updated addresses of their functions, since the plug-in
* is likely to be in a new position in memory.
*
* Example:
*
* SPErr UnloadSuite( MySuite *mySuite, SPAccessMessage *message ) {
*
* mySuite->functionA = (void *) message->d.basic->Undefined;
* mySuite->functionB = (void *) message->d.basic->Undefined;
*
* }
*
*
* SPErr ReloadSuite( MySuite *mySuite, SPAccessMessage *message ) {
*
* mySuite->functionA = functionA;
* mySuite->functionB = functionB;
*
* }
*/
#define kSPAccessCaller "SP Access"
#define kSPAccessReloadSelector "Reload"
#define kSPAccessUnloadSelector "Unload"
/*
* kSPFlushAccessType is of interest only to the host application or to the
* rare plug-in that uses the Caches suite. It is the name of the object
* that the Access suite caches and which can be purged when the
* caches are flushed. During a cache flush the SPFlushCachesProc may be
* asked about purging one of these. The SPFlushCachesProc may make any calls
* to the Access suite to collect information about the SPAccessRef in
* question before deciding to purge it or not.
*
* For example, an application may implement a strategy where filter plug-ins
* are purged before window plug-ins:
*
* long myFlushCachesProc( char *type, void *data, SPErr *error ) {
*
* long flush = TRUE;
*
* if ( strcmp( type, kSPFlushAccessType ) == 0 ) {
*
* SPAccessRef access = data;
* SPPluginRef plugin = sAccess->GetAccessPlugin( access, error );
* fail( error );
*
* switch ( myPluginType( plugin ) ) {
*
* case kMyFilterPlugin:
* if ( gPurgeLevel < kFilterPurgeLevel )
* flush = FALSE;
* break;
*
* case kMyWindowPlugin:
* if ( gPurgeLevel < kWindowPurgeLevel )
* flush = FALSE;
* break;
*
* }
*
* }
*
* return flush;
*
* }
*/
#define kSPFlushAccessType "SP Flush Access"
/*******************************************************************************
**
** Types
**
**/
/*
* SPEntry is the prototype for a PICA plug-in's entry point. The parms
* 'caller' and 'selector' tell why the plug-in is being called, and the
* 'message' is any data associated with it. For example, when the Access
* suite calls a plug-in to tell it that it is being unloaded, the caller and
* selector are kSPAccessCaller and kSPAccessUnloadSelector (above), and the
* message is an SPAccessMessage (below).
*
* The prototype is modified by SPAPI, which is used on some platforms to
* standardize the parameter-passing conventions. See SPTypes.h for details.
*/
typedef SPAPI SPErr (*SPEntry)( char *caller, char *selector, void *message );
/*
* An SPAccessRef is an access path to an open PICA plug-in. It is
* returned when you acquire a plug-in (which may cause the plug-in to be
* reloaded) and given up when the plug-in is released. The SPAccessRef is
* used primarily for making calls to a plug-in.
*
* Example:
*
* SPErr SendMessage( SPPluginRef plugin, char *caller, char *selector, void *message, SPErr *error ) {
*
* SPErr result;
* SPAccessRef access;
*
* access = sAccess->AcquirePlugin( plugin, error );
* fail( error );
*
* result = sAccess->CallPlugin( access, caller, selector, message, error );
* fail( error );
*
* sAccess->ReleasePlugin( access, error );
* fail( error );
*
* return result;
*
* }
*
* Access paths are reference-counted, which means it's very important to
* balance all of your calls to AcquirePlugin() and ReleasePlugin(). It also
* means that you don't need to concern yourself with whether an access path
* to a given plug-in already exists. If the plug-in is not loaded, it is
* reloaded and a new access path is created. If it is already loaded, the
* existing access path is referenced and returned. A plug-in will be
* unloaded only if the reference count of its access path is zero.
*/
typedef struct SPAccess *SPAccessRef;
/*
* An SPPlatformAccessInfo is platform-specific information about the access
* path to an open plug-in. On the Mac it contains resource chain information
* and a time stamp of when it was last called. On Windows it contains the
* handle to the plug-in's library. These are used by plug-ins that export
* suites since they must manually establish a resource context within any of
* the suite procedures before they can access resources. This is not
* necessary when a plug-in is called through its entry point, since
* CallPlugin() sets up the resource context for you.
*/
#ifdef MAC_ENV
typedef struct {
void *TopMapHndl;
short CurMap;
} SPMacResChain;
typedef SPMacResChain *SPPlatformAccessRef;
#endif
#ifdef WIN_ENV
typedef void *SPPlatformAccessRef;
#endif
typedef struct { /* resources on Mac, library on Windows */
SPPlatformAccessRef defaultAccess; /* file access for entry and resources unless resourceAccess is used */
SPPlatformAccessRef resourceAccess; /* Used if SetPluginResourceAccess() has been used, otherwise NULL */
unsigned long lastAccessTicks;
} SPPlatformAccessInfo;
/*
* This is the message sent to a plug-in whenever it is called by the Access
* suite. It consists solely of an SPMessageData, which is the standard
* header for all messages sent, and an indicator of when the
* access is occuring. Note that not all access points will necessarily be
* received. For instance, if a plug-in was never unloaded from memory, it's
* sole time of reload access would be kStartup and its only unload
* access point would be kShutdown. A startup or shutdown access point received at
* reload actually means pre-startup and a shutdown access point at unload means
* post-shutdown. kTerminal will only be received with an unload message by a plug-in
* that for one reason or another has an access count when when the application
* terminates. Plug-ins with an access count at termination will be unloaded and
* this forced unload will have kTerminal in its when field. A plug-in that
* has purposely acquired itself to remain in memory should not free any resources
* and not acquire others when this terminal unload is received.
*/
typedef enum {
kStartup = 0,
kRuntime,
kShutdown,
kTerminal
} SPAccessPoint;
typedef struct SPAccessMessage {
SPMessageData d;
SPAccessPoint when;
} SPAccessMessage;
/*******************************************************************************
**
** Suite
**
**/
typedef struct SPAccessSuite {
/*
* SPAccessRef AcquirePlugin( SPPluginRef plugin, SPErr *error );
*
* Given a reference to a PICA plug-in, AcquirePlugin() opens the plug-in
* and prepares it to be called. It returns an access reference, which you must
* use when calling the plug-in and which you must give to ReleasePlugin()
* when you are through.
*
* Access paths are reference-counted, which means it's very important to
* balance all of your calls to AcquirePlugin() and ReleasePlugin(). It also
* means that you don't need to concern yourself with whether an access path
* to a given plug-in already exists. If the plug-in is not loaded, it is
* reloaded and a new access path is created. If it is already loaded, the
* existing access path is referenced and returned. A plug-in will be
* unloaded only if the reference count of its access path is zero.
*
* Here's a trick: You can acquire yourself if you want to stay loaded in
* memory even when you're not being reference by anyone.
*
* PICA plug-ins rarely call one another directly. Usually program
* control flows from plug-in to plug-in through suites, which are layered on
* top of the Access suite. Plug-in adapters (plug-ins that provide protocol
* conversion to non-PICA plug-ins) will add their own access suites to
* provide access to their foreign plug-ins.
*/
SPAPI SPErr (*AcquirePlugin)( SPPluginRef plugin, SPAccessRef *access );
/*
* void ReleasePlugin( SPAccessRef access, SPErr *error );
*
* You must call ReleasePlugin() when you are through with a plug-in that
* you had previously acquired. ReleasePlugin() adjusts the reference count
* of the plug-in, possibly making it eligible for unloading. After
* releasing a plug-in the access reference is no longer valid.
*/
SPAPI SPErr (*ReleasePlugin)( SPAccessRef access );
/*
* SPAccessRef GetPluginAccess( SPPluginRef plugin, SPErr *error );
*
* Given a plug-in, GetPluginAccess() returns an access path to the plug-in
* ONLY if the plug-in is already open. It returns NULL if the plug-in is
* unloaded.
*
* You can use this inside of your plug-in to get the access path to
* yourself. This is necessary when you export a suite, since you need the
* resource chain or library information stored in the access path.
*/
SPAPI SPErr (*GetPluginAccess)( SPPluginRef plugin, SPAccessRef *access );
SPAPI SPErr (*GetAccessPlugin)( SPAccessRef access, SPPluginRef *plugin );
SPAPI SPErr (*GetAccessEntry)( SPAccessRef access, SPEntry *entry );
SPAPI SPErr (*GetAccessCount)( SPAccessRef access, long *count );
SPAPI SPErr (*GetAccessInfo)( SPAccessRef access, SPPlatformAccessInfo *info );
SPAPI SPErr (*GetPluginResourceAccess)( SPPluginRef plugin, SPPlatformAccessRef *resourceAccess );
SPAPI SPErr (*SetPluginResourceAccess)( SPPluginRef plugin, SPPlatformAccessRef resourceAccess );
SPAPI SPErr (*CallPlugin)( SPAccessRef access, char *caller, char *selector, void *message, SPErr *result );
SPAPI SPErr (*GetCurrentPlugin)( SPPluginRef *plugin );
SPAPI SPErr (*SetCurrentPlugin)( SPPluginRef plugin );
} SPAccessSuite;
SPAPI SPErr SPAcquirePlugin( SPPluginRef plugin, SPAccessRef *access );
SPAPI SPErr SPReleasePlugin( SPAccessRef access );
SPAPI SPErr SPGetPluginAccess( SPPluginRef plugin, SPAccessRef *access );
SPAPI SPErr SPGetAccessPlugin( SPAccessRef access, SPPluginRef *plugin );
SPAPI SPErr SPGetAccessEntry( SPAccessRef access, SPEntry *entry );
SPAPI SPErr SPGetAccessCount( SPAccessRef access, long *count );
SPAPI SPErr SPGetAccessInfo( SPAccessRef access, SPPlatformAccessInfo *info );
SPAPI SPErr SPGetPluginResourceAccess( SPPluginRef plugin, SPPlatformAccessRef *resourceAccess );
SPAPI SPErr SPSetPluginResourceAccess( SPPluginRef plugin, SPPlatformAccessRef resourceAccess );
SPAPI SPErr SPCallPlugin( SPAccessRef access, char *caller, char *selector, void *message, SPErr *result );
SPAPI SPErr SPGetCurrentPlugin( SPPluginRef *plugin );
SPAPI SPErr SPSetCurrentPlugin( SPPluginRef plugin );
/*******************************************************************************
**
** Errors
**
**/
#define kSPCantAcquirePluginError '!Acq'
#define kSPCantReleasePluginError '!Rel'
#define kSPPluginAlreadyReleasedError 'AlRl'
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,156 @@
/*
* Name:
* SPAdapters.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* SP Adapters Suite
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/1/1995 DL First version.
* Created by Adobe Systems Incorporated.
*/
#ifndef __SPAdapters__
#define __SPAdapters__
/*******************************************************************************
**
** Imports
**
**/
#include "SPTypes.h"
#include "SPCaches.h"
#include "SPMData.h"
#include "SPProps.h"
#ifdef __cplusplus
extern "C" {
#endif
/*******************************************************************************
**
** Constants
**
**/
#define kSPAdaptersSuite "SP Adapters Suite"
#define kSPAdaptersSuiteVersion 3
#define kSPAdaptersCaller "SP Adapters"
#define kSPAdaptersStartupSelector "Start up"
#define kSPAdaptersShutdownSelector "Shut down"
#define kSPAdaptersDisposeInfoSelector "Dispose info"
#define kSPAdaptersFindPropertySelector "Find property"
#define kSPAdaptersFlushSelector "Flush"
#define kSPAdaptersAboutSelector "About"
#define kSPAdaptersAcquireSuiteHostSelector "Acquire Suite"
#define kSPAdaptersReleaseSuiteHostSelector "Release Suite"
#define kSPRuntimeAdapterList ((SPAdapterListRef)NULL)
/*******************************************************************************
**
** Types
**
**/
typedef struct SPAdapter *SPAdapterRef;
typedef struct SPAdapterList *SPAdapterListRef;
typedef struct SPAdapterListIterator *SPAdapterListIteratorRef;
typedef struct SPAdaptersMessage {
SPMessageData d;
SPAdapterRef adapter;
struct SPPlugin *targetPlugin;
SPErr targetResult;
/* for Find property selector */
PIType vendorID;
PIType propertyKey;
long propertyID;
void *property; /* returned here */
/* for Flush selector */
SPFlushCachesProc flushProc;
long flushed; /* returned here */
/* for Suites selectors */
struct SPSuiteList *suiteList; /* use these if you need name, apiVersion, internalVersion */
struct SPSuite *suite;
struct SPPlugin *host; /* plug-in hosting the suite, to be aquired/released by adapter */
void *suiteProcs; /* returned here if reallocated */
long acquired; /* returned here */
} SPAdaptersMessage;
/*******************************************************************************
**
** Suite
**
**/
typedef struct SPAdaptersSuite {
SPAPI SPErr (*AllocateAdapterList)( struct SPStringPool *stringPool, SPAdapterListRef *adapterList );
SPAPI SPErr (*FreeAdapterList)( SPAdapterListRef adapterList );
SPAPI SPErr (*AddAdapter)( SPAdapterListRef adapterList, struct SPPlugin *host, char *name, long version, SPAdapterRef *adapter );
SPAPI SPErr (*SPFindAdapter)( SPAdapterListRef adapterList, char *name, SPAdapterRef *adapter );
SPAPI SPErr (*NewAdapterListIterator)( SPAdapterListRef adapterList, SPAdapterListIteratorRef *iter );
SPAPI SPErr (*NextAdapter)( SPAdapterListIteratorRef iter, SPAdapterRef *adapter );
SPAPI SPErr (*DeleteAdapterListIterator)( SPAdapterListIteratorRef iter );
SPAPI SPErr (*GetAdapterHost)( SPAdapterRef adapter, struct SPPlugin **plugin );
SPAPI SPErr (*GetAdapterName)( SPAdapterRef adapter, char **name );
SPAPI SPErr (*GetAdapterVersion)( SPAdapterRef adapter, long *version );
} SPAdaptersSuite;
SPAPI SPErr SPAllocateAdapterList( struct SPStringPool *stringPool, SPAdapterListRef *adapterList );
SPAPI SPErr SPFreeAdapterList( SPAdapterListRef adapterList );
SPAPI SPErr SPAddAdapter( SPAdapterListRef adapterList, struct SPPlugin *host, char *name, long version, SPAdapterRef *adapter );
SPAPI SPErr SPFindAdapter( SPAdapterListRef adapterList, char *name, SPAdapterRef *adapter );
SPAPI SPErr SPNewAdapterListIterator( SPAdapterListRef adapterList, SPAdapterListIteratorRef *iter );
SPAPI SPErr SPNextAdapter( SPAdapterListIteratorRef iter, SPAdapterRef *adapter );
SPAPI SPErr SPDeleteAdapterListIterator( SPAdapterListIteratorRef iter );
SPAPI SPErr SPGetAdapterHost( SPAdapterRef adapter, struct SPPlugin **plugin );
SPAPI SPErr SPGetAdapterName( SPAdapterRef adapter, char **name );
SPAPI SPErr SPGetAdapterVersion( SPAdapterRef adapter, long *version );
/*******************************************************************************
**
** Errors
**
**/
#define kSPAdapterAlreadyExistsError 'AdEx'
#define kSPBadAdapterListIteratorError 'BdAL'
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,88 @@
/*
* Name:
* SPBasic.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* SP Basic Suite
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/1/1995 DL First version.
* Created by Adobe Systems Incorporated.
*/
#ifndef __SPBasic__
#define __SPBasic__
/*******************************************************************************
**
** Imports
**
**/
#include "SPTypes.h"
#ifdef __cplusplus
extern "C" {
#endif
/*******************************************************************************
**
** Constants
**
**/
#define kSPBasicSuite "SP Basic Suite"
#define kSPBasicSuiteVersion 4
/*******************************************************************************
**
** Suite
**
**/
typedef struct SPBasicSuite {
SPAPI SPErr (*AcquireSuite)( char *name, long version, void **suite );
SPAPI SPErr (*ReleaseSuite)( char *name, long version );
SPAPI SPBoolean (*IsEqual)( char *token1, char *token2 );
SPAPI SPErr (*AllocateBlock)( long size, void **block );
SPAPI SPErr (*FreeBlock)( void *block );
SPAPI SPErr (*ReallocateBlock)( void *block, long newSize, void **newblock );
SPAPI SPErr (*Undefined)( void );
} SPBasicSuite;
SPAPI SPErr SPBasicAcquireSuite( char *name, long version, void **suite );
SPAPI SPErr SPBasicReleaseSuite( char *name, long version );
SPAPI SPBoolean SPBasicIsEqual( char *token1, char *token2 );
SPAPI SPErr SPBasicAllocateBlock( long size, void **block );
SPAPI SPErr SPBasicFreeBlock( void *block );
SPAPI SPErr SPBasicReallocateBlock( void *block, long newSize, void **newblock );
SPAPI SPErr SPBasicUndefined( void );
/*******************************************************************************
**
** Errors
**
**/
/* Suite errors are in SPSuites.h */
#define kSPBadParameterError 'Parm'
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,84 @@
/*
* Name:
* SPBlockDebug.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* SP Block Debug Suite.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/1/1995 DL First version.
* Created by Adobe Systems Incorporated.
*/
#ifndef __SPBlockDebug__
#define __SPBlockDebug__
/*******************************************************************************
**
** Imports
**
**/
#include "SPTypes.h"
#ifdef __cplusplus
extern "C" {
#endif
/*******************************************************************************
**
** Constants
**
**/
#define kSPBlockDebugSuite "SP Block Debug Suite"
#define kSPBlockDebugSuiteVersion 2
/*******************************************************************************
**
** Suite
**
**/
typedef struct SPBlockDebugSuite {
SPAPI SPErr (*GetBlockDebugEnabled)( long *enabled );
SPAPI SPErr (*SetBlockDebugEnabled)( long debug );
SPAPI SPErr (*GetFirstBlock)( void **block );
SPAPI SPErr (*GetNextBlock)( void *block, void **nextblock );
SPAPI SPErr (*GetBlockDebug)( void *block, char **debug );
} SPBlockDebugSuite;
SPAPI SPErr SPGetBlockDebugEnabled( long *enabled );
SPAPI SPErr SPSetBlockDebugEnabled( long debug );
SPAPI SPErr SPGetFirstBlock( void **block );
SPAPI SPErr SPGetNextBlock( void *block, void **nextblock );
SPAPI SPErr SPGetBlockDebug( void *block, char **debug );
/*******************************************************************************
**
** Errors
**
**/
#define kSPCantChangeBlockDebugNowError '!Now'
#define kSPBlockDebugNotEnabledError '!Nbl'
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,80 @@
/*
* Name:
* SPBlocks.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* SP Blocks Suite.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/1/1995 DL First version.
* Created by Adobe Systems Incorporated.
*/
#ifndef __SPBlocks__
#define __SPBlocks__
/*******************************************************************************
**
** Imports
**
**/
#include "SPTypes.h"
#ifdef __cplusplus
extern "C" {
#endif
/*******************************************************************************
**
** Constants
**
**/
#define kSPBlocksSuite "SP Blocks Suite"
#define kSPBlocksSuiteVersion 2
/*******************************************************************************
**
** Suite
**
**/
typedef struct SPBlocksSuite {
SPAPI SPErr (*AllocateBlock)( long size, char *debug, void **block );
SPAPI SPErr (*FreeBlock)( void *block );
SPAPI SPErr (*ReallocateBlock)( void *block, long newSize, char *debug, void **rblock );
} SPBlocksSuite;
SPAPI SPErr SPAllocateBlock( long size, char *debug, void **block );
SPAPI SPErr SPFreeBlock( void *block );
SPAPI SPErr SPReallocateBlock( void *block, long newSize, char *debug, void **rblock );
/*******************************************************************************
**
** Errors
**
**/
#define kSPOutOfMemoryError 0xFFFFFF6cL /* -108, same as Mac memFullErr */
#define kSPBlockSizeOutOfRangeError 'BkRg'
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,90 @@
/*
* Name:
* SPCaches.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* SP Caches Suite.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/1/1995 DL First version.
* Created by Adobe Systems Incorporated.
*/
#ifndef __SPCaches__
#define __SPCaches__
/*******************************************************************************
**
** Imports
**
**/
#include "SPTypes.h"
#include "SPMData.h"
#ifdef __cplusplus
extern "C" {
#endif
/*******************************************************************************
**
** Constants
**
**/
#define kSPCachesSuite "SP Caches Suite"
#define kSPCachesSuiteVersion 2
/* To receive these, an PIConditionalMessages property must be present
* with the PIAcceptsPurgeCachesMessage flag set. */
#define kSPCacheCaller "SP Cache"
#define kSPPluginPurgeCachesSelector "Plug-in Purge"
/* The plug-in should return one of these two responses when it receives the kSPPluginPurgeCachesSelector */
#define kSPPluginCachesFlushResponse 'pFls'
#define kSPPluginCouldntFlushResponse kSPNoError;
/*******************************************************************************
**
** Types
**
**/
typedef SPErr (*SPFlushCachesProc)( char *type, void *data, long *flushed );
typedef struct SPPurgeCachesMessage {
SPMessageData d;
} SPPurgeCachesMessage;
/*******************************************************************************
**
** Suite
**
**/
typedef struct SPCachesSuite {
SPAPI SPErr (*SPFlushCaches)( SPFlushCachesProc flushProc, long *flushed );
} SPCachesSuite;
SPAPI SPErr SPFlushCaches( SPFlushCachesProc flushProc, long *flushed );
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,69 @@
/*
* Name:
* SPConfig.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* SPConfig.h is the environment configuration file for PICA. It
* defines MAC_ENV or WIN_ENV. These are used to control platform-specific
* sections of code.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/1/1995 DL First version.
* Created by Adobe Systems Incorporated.
*/
#ifndef __SPCnfig__
#define __SPCnfig__
/*
* Metrowerks MacOS 68K and PPC
*/
#ifdef __MWERKS__
#if !defined(__INTEL__) /* mjf was- #if defined(__MC68K__) || defined(__POWERPC__) */
#ifndef MAC_ENV
#define MAC_ENV 1
#endif
#endif
#endif
/*
* Metrowerks Windows
*/
#ifdef __MWERKS__
#ifdef __INTEL__
#ifndef WIN_ENV
#define WIN_ENV 1
#include <x86_prefix.h>
#endif
#endif
#endif
/*
* Windows
*/
#if defined(_WINDOWS) || defined(_MSC_VER) // PSMod, better compiler check
#ifndef WIN_ENV
#define WIN_ENV 1
#endif
#endif
/*
* Make certain that one and only one of the platform constants is defined.
*/
#if !defined(WIN_ENV) && !defined(MAC_ENV)
#error
#endif
#if defined(WIN_ENV) && defined(MAC_ENV)
#error
#endif
#endif
@@ -0,0 +1,167 @@
/*
* Name:
* SPFiles.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Define the SP Files Suite.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/1/1995 DL First version.
* Created by Adobe Systems Incorporated.
*/
#ifndef __SPFiles__
#define __SPFiles__
/*******************************************************************************
**
** Imports
**
**/
#include "SPTypes.h"
#include "SPProps.h"
#ifdef __cplusplus
extern "C" {
#endif
/*******************************************************************************
**
** Constants
**
**/
#define kSPFilesSuite "SP Files Suite"
#define kSPFilesSuiteVersion 3
#define kSPRuntimeFileList ((SPFileListRef)NULL)
#define kFileDoesNotHavePiPL (SPPropertyListRef)0xffffffff
#define kFileHasMulitplePiPLs NULL
/*******************************************************************************
**
** Types
**
**/
#define kMaxPathLength 300
typedef struct SPFile *SPFileRef;
typedef struct SPFileList *SPFileListRef;
typedef struct SPFileListIterator *SPFileListIteratorRef;
#ifdef MAC_ENV
#ifdef __MWERKS__
#pragma options align=mac68k
#endif
typedef struct SPPlatformFileSpecification_t { /* identical to FSSpec */
short vRefNum;
long parID;
unsigned char name[64];
} SPPlatformFileSpecification;
#ifdef __MWERKS__
#pragma options align=reset
#endif
typedef struct {
unsigned long attributes;
unsigned long creationDate;
unsigned long modificationDate;
unsigned long finderType;
unsigned long finderCreator;
unsigned short finderFlags;
} SPPlatformFileInfo;
#endif
#ifdef WIN_ENV
typedef struct SPPlatformFileSpecification_t {
char path[kMaxPathLength];
} SPPlatformFileSpecification;
typedef struct {
unsigned long attributes;
unsigned long lowCreationTime;
unsigned long highCreationTime;
unsigned long lowModificationTime;
unsigned long highModificationTime;
char *extension;
} SPPlatformFileInfo;
#endif
typedef SPBoolean (*SPAddPiPLFilterProc)( SPPlatformFileInfo *info );
/*******************************************************************************
**
** Suite
**
**/
typedef struct SPFilesSuite {
SPAPI SPErr (*AllocateFileList)( SPFileListRef *fileList );
SPAPI SPErr (*FreeFileList)( SPFileListRef fileList );
SPAPI SPErr (*AddFiles)( SPFileListRef fileList, SPPlatformFileSpecification *file );
SPAPI SPErr (*NewFileListIterator)( SPFileListRef fileList, SPFileListIteratorRef *iter );
SPAPI SPErr (*NextFile)( SPFileListIteratorRef iter, SPFileRef *file );
SPAPI SPErr (*DeleteFileListIterator)( SPFileListIteratorRef iter );
SPAPI SPErr (*GetFileSpecification)( SPFileRef file, SPPlatformFileSpecification *fileSpec );
SPAPI SPErr (*GetFileInfo)( SPFileRef file, SPPlatformFileInfo *info );
SPAPI SPErr (*GetIsAPlugin)( SPFileRef file, SPBoolean *isAPlugin );
SPAPI SPErr (*SetIsAPlugin)( SPFileRef file, SPBoolean isAPlugin );
SPAPI SPErr (*GetFilePropertyList)( SPFileRef file, SPPropertyListRef *propertList );
SPAPI SPErr (*SetFilePropertyList)( SPFileRef file, SPPropertyListRef propertList );
} SPFilesSuite;
SPAPI SPErr SPAllocateFileList( SPFileListRef *fileList );
SPAPI SPErr SPFreeFileList( SPFileListRef fileList );
SPAPI SPErr SPAddFiles( SPFileListRef fileList, SPPlatformFileSpecification *file );
SPAPI SPErr SPNewFileListIterator( SPFileListRef fileList, SPFileListIteratorRef *iter );
SPAPI SPErr SPNextFile( SPFileListIteratorRef iter, SPFileRef *file );
SPAPI SPErr SPDeleteFileListIterator( SPFileListIteratorRef iter );
SPAPI SPErr SPGetFileSpecification( SPFileRef file, SPPlatformFileSpecification *fileSpec );
SPAPI SPErr SPGetFileInfo( SPFileRef file, SPPlatformFileInfo *info );
SPAPI SPErr SPGetIsAPlugin( SPFileRef file, SPBoolean *isAPlugin );
SPAPI SPErr SPSetIsAPlugin( SPFileRef file, SPBoolean isAPlugin );
SPAPI SPErr SPGetFilePropertyList( SPFileRef file, SPPropertyListRef *propertList );
SPAPI SPErr SPSetFilePropertyList( SPFileRef file, SPPropertyListRef propertList );
SPAPI SPErr SPAddFilePiPLs( SPFileListRef fileList, SPAddPiPLFilterProc filter );
/*******************************************************************************
**
** Errors
**
**/
#define kSPTroubleAddingFilesError 'TAdd'
#define kSPBadFileListIteratorError 'BFIt'
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,164 @@
/*
* Name:
* SPHost.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* This is the file required for use of PICA.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/1/1995 DL First version.
* Created by Adobe Systems Incorporated.
*/
#ifndef __SPHost__
#define __SPHost__
/*******************************************************************************
**
** Imports
**
**/
#include "SPTypes.h"
#include "SPAccess.h"
#include "SPAdapts.h"
#include "SPBasic.h"
#include "SPBckDbg.h"
#include "SPBlocks.h"
#include "SPCaches.h"
#include "SPFiles.h"
#include "SPInterf.h"
#include "SPPlugs.h"
#include "SPProps.h"
#include "SPRuntme.h"
#include "SPStrngs.h"
#include "SPSuites.h"
#ifdef __cplusplus
extern "C" {
#endif
/*******************************************************************************
**
** Constants
**
**/
/*
* The version number of the host interface. You can compare it to the
* version number that PICA was compiled with to determine that you are
* running the version you think you are. See SPVersion() below.
*
* This number consists of a hi word which is the major version number reflecting
* changes to the SP inteface, and a low word which is the minor revision number,
* for instance indicating bug fixes.
*/
#define kSPVersion 0x00090004
/*
* Options available to the host at init time. They are:
*
* kSPHostBlockDebugOption - block allocation debugging is enabled. See
* SPBckDbg.h for details.
*
* Examples:
*
* SPInit( hostProcs, pluginsFolder, kSPHostNoOptions, error );
* // No debugging.
*
* SPInit( hostProcs, pluginsFolder, kSPHostBlockDebugOption, error );
* // Enable block debugging.
*/
#define kSPHostNoOptions 0
#define kSPHostBlockDebugOption (1<<0L)
/*******************************************************************************
**
** Functions
**
**/
/*
* SPInit() initializes PICA. It is the first call made. It
* initializes its suites and builds the list of application files.
*
* HostProcs points to a filled-in structure of host callbacks, as described
* in SPRuntme.h. It may be NULL, in which case PICA uses its default
* versions for all of the host callbacks. PluginFolder is the file spec of the
* plug-ins folder. The contents of this folder are collected into the application
* files list (see SPFiles.h). Options may be any of the host options described
* above.
*/
SPErr SPInit( SPHostProcs *hostProcs, SPPlatformFileSpecification *pluginFolder, long options );
/*
* SPTerm() terminates PICA. Call this when your application quits.
*/
SPErr SPTerm( void );
/*
* SPStartupPlugins() scans the list of application files and builds the list
* of plug-ins. It then starts them up, calling each in turn with a start up
* message (see SPPlugs.h). Call this sometime after SPInit().
*/
SPErr SPStartupPlugins( void );
/*
* SPShutdownPlugins() shuts down the plug-ins. It calls each in turn with a
* shut down message (see SPPlugs.h). Call this when your application quits
* before calling SPTerm().
*/
SPErr SPShutdownPlugins( void );
/*
* SPSetPPCLoadHeap() sets the destination heap of plug-in accesses on PowerPPC
* Macintoshes. Plug-ins can load into the system heap or the application heap.
*/
#ifdef MAC_ENV
typedef enum {
kAppHeap = 0,
kSysHeap
} SPTargetHeap;
SPErr SPSetPPCLoadHeap( SPTargetHeap target );
#endif
/*
* SPVersion() returns the version number of the PICA host interface (this
* file) for which PICA was built. You can compare this to the constant
* kSPVersion to make sure you're using the version you think you are.
*/
unsigned long SPVersion( void );
/*******************************************************************************
**
** Errors
**
**/
/*
* Some non-descript problem encountered while starting up.
*/
#define kSPTroubleInitializingError 'TIni'
#define kHostCanceledStartupPluginsError 'H!St'
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,106 @@
/*
* Name:
* SPInterface.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* SP Interface Suite
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/1/1995 DL First version.
* Created by Adobe Systems Incorporated.
*/
#ifndef __SPInterface__
#define __SPInterface__
/*******************************************************************************
**
** Imports
**
**/
#include "SPTypes.h"
#include "SPBasic.h"
#include "SPFiles.h"
#include "SPMData.h"
#include "SPPlugs.h"
#include "SPProps.h"
#ifdef __cplusplus
extern "C" {
#endif
/*******************************************************************************
**
** Constants
**
**/
#define kSPInterfaceSuite "SP Interface Suite"
#define kSPInterfaceSuiteVersion 2
#define kSPInterfaceCaller "SP Interface"
#define kSPInterfaceStartupSelector "Startup"
#define kSPInterfaceShutdownSelector "Shutdown"
#define kSPInterfaceAboutSelector "About"
#define kSPSweetPea2Adapter "Sweet Pea 2 Adapter"
#define kSPSweetPea2AdapterVersion 1
/*******************************************************************************
**
** Types
**
**/
typedef struct SPInterfaceMessage {
SPMessageData d;
} SPInterfaceMessage;
/*******************************************************************************
**
** Suite
**
**/
typedef struct SPInterfaceSuite {
SPAPI SPErr (*SendMessage)( SPPluginRef plugin, char *caller, char *selector, void *message, SPErr *result );
SPAPI SPErr (*SetupMessageData)( SPPluginRef plugin, SPMessageData *data );
SPAPI SPErr (*EmptyMessageData)( SPPluginRef plugin, SPMessageData *data );
SPAPI SPErr (*StartupExport)( SPPluginListRef pluginList, char *name, long version, long *started );
} SPInterfaceSuite;
SPAPI SPErr SPSendMessage( SPPluginRef plugin, char *caller, char *selector, void *message, SPErr *result );
SPAPI SPErr SPSetupMessageData( SPPluginRef plugin, SPMessageData *data );
SPAPI SPErr SPEmptyMessageData( SPPluginRef plugin, SPMessageData *data );
SPAPI SPErr SPStartupExport( SPPluginListRef pluginList, char *name, long version,long *started );
/*******************************************************************************
**
** Errors
**
**/
#define kSPNotASweetPeaPluginError 'NSPP'
#define kSPAlreadyInSPCallerError 'AISC'
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,61 @@
/*
* Name:
* SPMessageData.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Define SP Message Data.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/1/1995 DL First Version.
* Created by Adobe Systems Incorporated.
*/
#ifndef __SPMessageData__
#define __SPMessageData__
/*******************************************************************************
**
** Imports
**
**/
#include "SPTypes.h"
#ifdef __cplusplus
extern "C" {
#endif
/*******************************************************************************
**
** Types
**
**/
/* If the message data associated with a call to a plug-in has come from *
* SPSendMessage, or is prepared using SetupMessageData(), this constant *
* will be in the first four bytes of the message, in SPCheck. */
#define kSPValidSPMessageData 'SPCk'
typedef struct SPMessageData {
long SPCheck; /* kSPValidSPMessageData if a valid SPMessage */
struct SPPlugin *self; /* SPPluginRef */
void *globals;
struct SPBasicSuite *basic;
} SPMessageData;
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,174 @@
/*
* Name:
* SPPiPL.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Resource definition of a Plug-in Property List.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/1/1995 DL First Version.
* Created by Adobe Systems Incorporated.
*/
#ifndef __SPPiPL__
#define __SPPiPL__
/*******************************************************************************
**
** Imports and alignment
**
**/
#include "SPTypes.h"
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
/*******************************************************************************
**
** Constants
**
** Note: 4-character long IDs must be defined in hexidecimal, not long
** literal ('long'), due to Windows RC compilers not understanding what
** to do with them.
**
**/
// 'ADBE' Vendor ID for SP-generic apps:
#define PIAdobeVendorID 0x41444245L
// 'ivrs' SP plug-in version:
#define PISPVersionProperty 0x69767273L
// 'impt' Suite import info:
#define PIImportsProperty 0x696D7074L
// 'expt' Suite export info:
#define PIExportsProperty 0x65787074L
// 'ppcR' Power PC Resource info:
#define PIPowerPCCodeResProperty 0x70706352L
// 'heap' Mac PPC-only. If non-existant, loads in host default heap.
// If 0, loads in system heap:
#define PIDestinationHeapProperty 0x68656170L
#define PILoadInAppHeap (1L<<0)
// 'adpt' Adapter version property (a long):
#define PIAdapterProperty 0x61647074L
// 'pinm' Internal plug-in name:
#define PIPluginNameProperty 0x70696E6DL
// 'AcpM' Message flags:
#define PIConditionalMessages 0x4163704DL
#define PIAcceptsPropertyMessage (1L<<0)
#define PISkipShutDownMessage (1L<<1)
#define PIAcceptsPurgeCachesMessage (1L<<2)
#define PISkipStartupMessage (1L<<3)
/*******************************************************************************
**
** General PiPL properties and structures
**
** Many hosts multiply define these properties, so we bracket them
** so they are only defined once.
**
**/
#ifndef kGeneralPiPLPropertiesDefined // Already defined?
#define kGeneralPiPLPropertiesDefined // Only define once.
typedef unsigned long PIType;
#define kCurrentPiPLVersion 0
// 'kind' <PIType> giving the plug-in's kind:
#define PIKindProperty 0x6b696e64L
// 'm68k' <PI68KCodeDesc> 68k code descriptor. See struct below.
#define PI68KCodeProperty 0x6d36386bL
// 'pwpc' <PICFMCodeDesc> PowerPC code descriptor. See struct below.
#define PIPowerPCCodeProperty 0x70777063L
// 'wx86' <PIWin32X86CodeDesc> Win32 Intel code descriptor. See struct below.
#define PIWin32X86CodeProperty 0x77783836L
// 'fx86' <PIWin16X86CodeDesc> Win16 Intel code descriptor. See struct below.
#define PIWin16X86CodeProperty 0x66783836L
typedef struct PIProperty {
PIType vendorID; /* Vendor specific identifier. */
PIType propertyKey; /* Identification key for this property type. */
long propertyID; /* Index within this property type. Must be unique for properties of a given type in a PiPL. */
long propertyLength; /* Length of following data array. Will be rounded to a multiple of 4. */
char propertyData[1]; /* propertyLength bytes long. Must be a multiple of 4. Can be zero? */
} PIProperty;
typedef struct PIPropertyList {
long version; /* Properties datastructure version number. */
long count; /* Number of properties contained. */
PIProperty properties[1]; /* The actual properties. */
} PIPropertyList;
/* Below are structures describing types used in plug-in property lists.
* These structures obey Macintosh 68k alignment and padding rules though
* generally they are laid out so fields have natural alignment and any
* needed padding is explicit in the structure.
*/
typedef struct PI68KCodeDesc {
PIType fType;
short fID;
} PI68KCodeDesc;
typedef struct PICFMCodeDesc {
long fContainerOffset;
long fContainerLength;
unsigned char fEntryName[1];
} PICFMCodeDesc;
typedef struct PIWin32X86CodeDesc {
char fEntryName[1];
} PIWin32X86CodeDesc;
typedef struct PIWin16X86CodeDesc {
char fEntryName[1];
} PIWin16X86CodeDesc;
#endif // kGeneralPiPLPropertiesDefined
/*******************************************************************************
**
** Additional Types
**
**/
typedef struct PICFMCodeResourceDesc {
long fContainerOffset; /* Currently unused, reserved. */
long fContainerLength; /* Set to 0 to use resource size */
PIType fType;
short fID;
unsigned char fEntryName[1];
} PICFMCodeResourceDesc;
/*******************************************************************************/
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
#endif // SPPiPL
@@ -0,0 +1,158 @@
/*
* Name:
* SPPlugins.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* SP Plug-ins Suite
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/1/1995 DL First Version.
* Created by Adobe Systems Incorporated.
*/
#ifndef __SPPlugins__
#define __SPPlugins__
/*******************************************************************************
**
** Imports
**
**/
#include "SPTypes.h"
#include "SPFiles.h"
#include "SPAdapts.h"
#include "SPProps.h"
#include "SPStrngs.h"
#ifdef __cplusplus
extern "C" {
#endif
/*******************************************************************************
**
** Constants
**
**/
#define kSPPluginsSuite "SP Plug-ins Suite"
#define kSPPluginsSuiteVersion 4
#define kSPRuntimePluginList ((SPPluginListRef)NULL)
/*******************************************************************************
**
** Types
**
**/
typedef struct SPPlugin *SPPluginRef;
typedef struct SPPluginList *SPPluginListRef;
typedef struct SPPluginListIterator *SPPluginListIteratorRef;
/*******************************************************************************
**
** Suite
**
**/
typedef struct SPPluginsSuite {
SPAPI SPErr (*AllocatePluginList)( SPStringPoolRef strings, SPPluginListRef *pluginList );
SPAPI SPErr (*FreePluginList)( SPPluginListRef pluginList );
SPAPI SPErr (*AddPlugin)( SPPluginListRef pluginList, SPPlatformFileSpecification *fileSpec, PIPropertyList *PiPL, char *adapterName, void *adapterInfo, SPPluginRef *plugin );
SPAPI SPErr (*NewPluginListIterator)( SPPluginListRef pluginList, SPPluginListIteratorRef *iter );
SPAPI SPErr (*NextPlugin)( SPPluginListIteratorRef iter, SPPluginRef *plugin );
SPAPI SPErr (*DeletePluginListIterator)( SPPluginListIteratorRef iter );
SPAPI SPErr (*GetPluginListNeededSuiteAvailable)( SPPluginListRef pluginList, SPBoolean *available );
SPAPI SPErr (*GetPluginHostEntry)( SPPluginRef plugin, void **host );
SPAPI SPErr (*GetPluginFileSpecification)( SPPluginRef plugin, SPPlatformFileSpecification *fileSpec );
SPAPI SPErr (*GetPluginPropertyList)( SPPluginRef plugin, SPPropertyListRef *propertList );
SPAPI SPErr (*GetPluginGlobals)( SPPluginRef plugin, void **globals );
SPAPI SPErr (*SetPluginGlobals)( SPPluginRef plugin, void *globals );
SPAPI SPErr (*GetPluginStarted)( SPPluginRef plugin, long *started );
SPAPI SPErr (*SetPluginStarted)( SPPluginRef plugin, long started );
SPAPI SPErr (*GetPluginSkipShutdown)( SPPluginRef plugin, long *skipShutdown );
SPAPI SPErr (*SetPluginSkipShutdown)( SPPluginRef plugin, long skipShutdown );
SPAPI SPErr (*GetPluginBroken)( SPPluginRef plugin, long *broken );
SPAPI SPErr (*SetPluginBroken)( SPPluginRef plugin, long broken );
SPAPI SPErr (*GetPluginAdapter)( SPPluginRef plugin, SPAdapterRef *adapter );
SPAPI SPErr (*GetPluginAdapterInfo)( SPPluginRef plugin, void **adapterInfo );
SPAPI SPErr (*SetPluginAdapterInfo)( SPPluginRef plugin, void *adapterInfo );
SPAPI SPErr (*FindPluginProperty)( SPPluginRef plugin, PIType vendorID, PIType propertyKey, long propertyID, PIProperty **p );
SPAPI SPErr (*GetPluginName)( SPPluginRef plugin, char **name );
SPAPI SPErr (*SetPluginName)( SPPluginRef plugin, char *name );
SPAPI SPErr (*GetNamedPlugin)( char *name, SPPluginRef *plugin);
SPAPI SPErr (*SetPluginPropertyList)( SPPluginRef plugin, SPFileRef file );
} SPPluginsSuite;
SPAPI SPErr SPAllocatePluginList( SPStringPoolRef strings, SPPluginListRef *pluginList );
SPAPI SPErr SPFreePluginList( SPPluginListRef pluginList );
SPAPI SPErr SPGetPluginListNeededSuiteAvailable( SPPluginListRef pluginList, SPBoolean *available );
SPAPI SPErr SPAddPlugin( SPPluginListRef pluginList, SPPlatformFileSpecification *fileSpec, PIPropertyList *PiPL, char *adapterName, void *adapterInfo, SPPluginRef *plugin );
SPAPI SPErr SPNewPluginListIterator( SPPluginListRef pluginList, SPPluginListIteratorRef *iter );
SPAPI SPErr SPNextPlugin( SPPluginListIteratorRef iter, SPPluginRef *plugin );
SPAPI SPErr SPDeletePluginListIterator( SPPluginListIteratorRef iter );
SPAPI SPErr SPGetHostPluginEntry( SPPluginRef plugin, void **host );
SPAPI SPErr SPGetPluginFileSpecification( SPPluginRef plugin, SPPlatformFileSpecification *fileSpec );
SPAPI SPErr SPGetPluginPropertyList( SPPluginRef plugin, SPPropertyListRef *propertyList );
SPAPI SPErr SPGetPluginGlobals( SPPluginRef plugin, void **globals );
SPAPI SPErr SPSetPluginGlobals( SPPluginRef plugin, void *globals );
SPAPI SPErr SPGetPluginStarted( SPPluginRef plugin, long *started );
SPAPI SPErr SPSetPluginStarted( SPPluginRef plugin, long started );
SPAPI SPErr SPGetPluginSkipShutdown( SPPluginRef plugin, long *skipShutdown );
SPAPI SPErr SPSetPluginSkipShutdown( SPPluginRef plugin, long skipShutdown );
SPAPI SPErr SPGetPluginBroken( SPPluginRef plugin, long *broken );
SPAPI SPErr SPSetPluginBroken( SPPluginRef plugin, long broken );
SPAPI SPErr SPGetPluginAdapter( SPPluginRef plugin, SPAdapterRef *adapter );
SPAPI SPErr SPGetPluginAdapterInfo( SPPluginRef plugin, void **adapterInfo );
SPAPI SPErr SPSetPluginAdapterInfo( SPPluginRef plugin, void *adapterInfo );
SPAPI SPErr SPFindPluginProperty( SPPluginRef plugin, PIType vendorID, PIType propertyKey, long propertyID, PIProperty **p );
SPAPI SPErr SPGetPluginName( SPPluginRef plugin, char **name );
SPAPI SPErr SPSetPluginName( SPPluginRef plugin, char *name );
SPAPI SPErr SPGetNamedPlugin( char *name, SPPluginRef *plugin);
SPAPI SPErr SPSetPluginPropertyList( SPPluginRef plugin, SPFileRef file );
SPErr SPAddHostPlugin( SPPluginListRef pluginList, void *entry, void *access, char *adapterName, void *adapterInfo, SPPluginRef *plugin );
/* access is SPPlatformAccessRef */
/*******************************************************************************
**
** Errors
**
**/
#define kSPUnknownAdapterError '?Adp'
#define kSPBadPluginListIteratorError 'PiLI'
#define kSPBadPluginHost 'PiH0'
#define kSPCantAddHostPluginError 'AdHo'
#define kSPPluginNotFound 'P!Fd'
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,137 @@
/*
* Name:
* SPProperties.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* SP Properties Suite
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/1/1995 DL First Version.
* Created by Adobe Systems Incorporated.
*/
#ifndef __SPProperties__
#define __SPProperties__
/*******************************************************************************
**
** Imports
**
**/
#include "SPTypes.h"
#include "SPMdata.h"
#include "SPPiPL.h"
#ifdef __cplusplus
extern "C" {
#endif
/*******************************************************************************
**
** Constants
**
**/
#define kSPPropertiesSuite "SP Properties Suite"
#define kSPPropertiesSuiteVersion 2
#define kSPPropertiesCaller "SP Properties"
#define kSPPropertiesAcquireSelector "Acquire"
#define kSPPropertiesReleaseSelector "Release"
/*******************************************************************************
**
** Types
**
**/
typedef struct SPProperty *SPPropertyRef;
typedef struct SPPropertyList *SPPropertyListRef;
typedef struct SPPropertyListIterator *SPPropertyListIteratorRef;
typedef struct SPPropertiesMessage {
SPMessageData d;
PIType vendorID;
PIType propertyKey;
long propertyID;
void *property;
long refCon;
long cacheable;
} SPPropertiesMessage;
/*******************************************************************************
**
** Suite
**
**/
typedef struct SPPropertiesSuite {
SPAPI SPErr (*AllocatePropertyList)( SPPropertyListRef *propertyList );
SPAPI SPErr (*FreePropertyList)( SPPropertyListRef propertyList );
SPAPI SPErr (*AddProperties)( SPPropertyListRef propertyList, PIPropertyList *pList, long refCon, long cacheable );
SPAPI SPErr (*AddProperty)( SPPropertyListRef propertyList, PIType vendorID, PIType propertyKey, long propertyID, PIProperty *p, long refCon, long cacheable, SPPropertyRef *property );
SPAPI SPErr (*FindProperty)( SPPropertyListRef propertyList, PIType vendorID, PIType propertyKey, long propertyID, SPPropertyRef *property );
SPAPI SPErr (*NewPropertyListIterator)( SPPropertyListRef propertyList, SPPropertyListIteratorRef *iter );
SPAPI SPErr (*NextProperty)( SPPropertyListIteratorRef iter, SPPropertyRef *property );
SPAPI SPErr (*DeletePropertyListIterator)( SPPropertyListIteratorRef iter );
SPAPI SPErr (*GetPropertyPIProperty)( SPPropertyRef property, PIProperty **p );
SPAPI SPErr (*GetPropertyRefCon)( SPPropertyRef property, long *refCon );
SPAPI SPErr (*GetPropertyCacheable)( SPPropertyRef property, long *cacheable );
SPAPI SPErr (*GetPropertyAllocatedByPlugin)( SPPropertyRef property, long *allocatedByPlugin );
} SPPropertiesSuite;
SPAPI SPErr SPAllocatePropertyList( SPPropertyListRef *propertyList );
SPAPI SPErr SPFreePropertyList( SPPropertyListRef propertyList );
SPAPI SPErr SPAddProperties( SPPropertyListRef propertyList, PIPropertyList *pList, long refCon, long cacheable );
SPAPI SPErr SPAddProperty( SPPropertyListRef propertyList, PIType vendorID, PIType propertyKey, long propertyID, PIProperty *p, long refCon, long cacheable, SPPropertyRef *property );
SPAPI SPErr SPFindProperty( SPPropertyListRef propertyList, PIType vendorID, PIType propertyKey, long propertyID, SPPropertyRef *property );
SPAPI SPErr SPNewPropertyListIterator( SPPropertyListRef propertyList, SPPropertyListIteratorRef *iter );
SPAPI SPErr SPNextProperty( SPPropertyListIteratorRef iter, SPPropertyRef *property );
SPAPI SPErr SPDeletePropertyListIterator( SPPropertyListIteratorRef iter );
SPAPI SPErr SPGetPropertyPIProperty( SPPropertyRef property, PIProperty **p );
SPAPI SPErr SPGetPropertyRefCon( SPPropertyRef property, long *refCon );
SPAPI SPErr SPGetPropertyCacheable( SPPropertyRef property, long *cacheable );
SPAPI SPErr SPGetPropertyAllocatedByPlugin( SPPropertyRef property, long *allocatedByPlugin );
/*******************************************************************************
**
** Errors
**
**/
#define kSPCorruptPiPLError 'CPPL'
#define kSPBadPropertyListIteratorError 'BPrI'
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,300 @@
/*
* Name:
* SPRuntime.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* SP Runtime Suite.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/1/1995 DL First Version.
* Created by Adobe Systems Incorporated.
*/
#ifndef __SPRuntime__
#define __SPRuntime__
/*******************************************************************************
**
** Imports
**
**/
#include "SPTypes.h"
#include "SPAdapts.h"
#include "SPFiles.h"
#include "SPPlugs.h"
#include "SPStrngs.h"
#include "SPSuites.h"
#include "SPStrngs.h"
#ifdef __cplusplus
extern "C" {
#endif
/*******************************************************************************
**
** Constants
**
**/
#define kSPRuntimeSuite "SP Runtime Suite"
#define kSPRuntimeSuiteVersion 5
/*******************************************************************************
**
** Types
**
**/
/*
* PICA makes callbacks into the host through the host procs. The host
* procs are filled in by the host and passed to PICA at SPInit().
*
* hostData - data that is given back to each host proc when PICA
* calls it. SP does nothing with it itself.
*
* extAllocate - implementation of the Block Suite's AllocateBlock() routine.
* It is identical to ANSI C malloc(). It returns a pointer to the
* beginning of the allocated block or NULL.
*
* extFree - implementation of the Block Suite's FreeBlock() routine. It is
* identical to ANSI C free(). Note that you can pass it NULL.
*
* extReallocate - implementation of the Block Suite's ReallocateBlock()
* routine. It is identical to ANSI C realloc(). It returns a pointer
* to the resized block or NULL. Note that you can pass it NULL or a
* newSize of 0.
*
* intAllocate, intFree, intReallocate - routines used for
* its own memory needs. You may want to allocate blocks differently
* with plug-ins. Plug-ins are unbounded in their memory
* needs, while PICA's memory usage can be approximated.
*
* startupNotify - called as each plug-in is started up. This is intended
* as a way to tell the user what's happening during start up.
* Note that plug-ins may start up at any time, not just during
* SPStartupPlugins().
*
* shutdownNotify - called as each plug-in is shut down. Also intended as
* a way to let users know what's going on.
*
* assertTrap - called when a fatal assert is triggered. PICA does
* not expect execution to continue after an assert.
*
* throwTrap - called when an internal error is thrown. This can be used
* during debugging to catch errors as they happen. It should return
* to allow handling of the error.
*
*
* To aid in getting up and running quickly, you can set any of
* these to NULL and PICA will use a default implementation. However:
* you cannot mix your implementations of the memory routines with
* defaults.
*
*
* The string pool functions replace the default routines used internally
* and exported by the Strings suite. Because they are exported, the behaviors
* listed below should be followed.
*
* allocateStringPool - creates a new string pool instance. The host app and
* PICA have a string pool which can be used by a plug-in, or a plug-in
* can create its own. See the notes in SPStrngs.h on how the pool is
* implemented.
* The function should return kSPNoError if the pool is allocated successfully
* or kSPOutOfMemoryError if allocation fails.
*
* freeStringPool - disposes of the string pool and any associated memory. The
* funtion should return kSPNoError
*
* makeWString - the string pool keeps a list of added strings. When a new string is
* added with MakeWString(), the routine checks to see if it is already in the
* pool. If so, the address of the string instance in the pool is returned. If
* not, it will add it to the pool and return the address of the newly
* created string instance. The behavior is:
*
* if ( string == NULL )
* *wString = NULL;
* returns kSPNoError;
* else if ( string in string pool )
* *wString = found string;
* returns kSPNoError;
* else add string
* if successful
* *wString = new string;
* returns kSPNoError;
* else
* *wString = nil
* returns kSPOutOfMemoryError
*
* appStringPool - if the host application has already allocated a string pool to use,
* it's reference should be passed here. If this value is NULL, PICA will
* allocate the pool when initialized and dispose of it at termination.
*
* filterEvent - a function called for each event allowing the host to cancel it.
* The event type is indicative of what the filter is to do. A file validation
* is called before a directory entry is added to the file list (kAddFile).
* A plug-in validation before a file is checked for PiPL information (kAddPlugin);
* the host might examine the file name/type to determine whether it should be added.
* For these 'add' events the return value is TRUE if the item should be skipped
* or FALSE if should be should be added. The default filter proc, used (if NULL)
* is passed, will skip files/folders in ( ).
* The other event is kSuitesAvailable. It is called when the last suite adding
* plug-in (as determined by available PiPL information) has been added. This is
* a point at which the host can cancel the startup process; for instance, if the host
* requires a suite from a plug-in, this is the time to check for it. If the
* host returns TRUE, the startup process continues. If it returns FALSE, the
* plug-in startup is canceled and the host would likely terminate or startup in
* an alternate manner.
*
* overrideAddPlugins - if supplied, SP will call the host to create the runtime
* plug-in list. This occurs at SPStartupPlugins(). The function takes no parameters
* as it is up to the host to determine how to do this. For instance, the host can do
* this from cached data or, as SP would, from the file list. A returned error will
* stop the plug-in startup process.
*
* overrideStartup - a function called for each SP2 plug-in before it is sent the
* startup message. If the host returns FALSE, SP will startup the plug-in normal.
* If the host returns true, it is assumed that the host has handled the startup
* for the plug-in, so SP will not do anything for the plug-in. This is intended
* to be used with a plug-in caching scheme.
* The host would be responsible, for instance, for defining the cacheable
* information in the PiPL, adding it when the callback is made, and later issuing
* a startup message when the plug-in is actually needed (e.g. when a menu item
* is selected.) Two notes: don't forget to SetPluginStarted(), and make sure
* to use a string pooled char* to kSPInterfaceCaller and kSPInterfaceStartupSelector.
*
* resolveLink - Windows only. If the search for plug-ins is to recurse sub-folders,
* the host needs to suply this routine. When a .lnk file is encountered, the
* resolveLink host callback function will be called and should return a resolved path.
* This is a host callback due to OLE issues such as initialization, which the SP
* libary does not currently handle. If it returns an error code, the result will
* be ignored.
*
*/
/* These are passed in startup and shutdown host notify procs and the filter file proc. */
typedef enum {
kAddFile, /* for startup notify, received after a file has been added as plugin, notifyData is the plug-in ref
for filter file, received before a file is added to a file list, notifyData is a pointer to the SPPlatformFileSpecification */
kAddPlugin, /* for startup notify, after a plug-in has been started, notifyData is SPPluginRef
for filter file, received before a file is checked to see if it is a plugin, notifyData is the files SPFileRef */
kSetMessage, /* used only by startup notify to specify a general message to be
displayed in the splash screen (primarily for adapters), notifyData is char* */
kSuitesAvailable, /* used only by event filter to allow host to check for suites it requires, notifyDatais NULL */
kNoEvent = 0xffffffff
} NotifyEvent;
/* To be compatible w/ other environment besides Metrowerks */
#if defined(MAC_ENV) && defined(__MWERKS__) && !defined(powerc)
#pragma pointers_in_D0
#endif
typedef void *(*SPAllocateProc)( long size, void *hostData );
typedef void (*SPFreeProc)( void *block, void *hostData );
typedef void *(*SPReallocateProc)( void *block, long newSize, void *hostData );
typedef void (*SPStartupNotifyProc)( NotifyEvent event, void *notifyData, void *hostData );
typedef void (*SPShutdownNotifyProc)( NotifyEvent event, void *notifyData, void *hostData );
typedef void (*SPAssertTrapProc)( char *failMessage, void *hostData );
typedef void (*SPThrowTrapProc)( SPErr error, void *hostData );
typedef void (*SPDebugTrapProc)( char *debugMessage, void *hostData );
typedef SPAPI SPErr (*SPAllocateStringPoolProc)( SPStringPoolRef *pool );
typedef SPAPI SPErr (*SPFreeStringPoolProc)( SPStringPoolRef stringPool );
typedef SPAPI SPErr (*SPMakeWStringProc)( SPStringPoolRef stringPool, char *string, char **wString );
typedef SPAPI SPErr (*SPGetHostAccessInfoProc)( SPPlatformAccessInfo *spHostAccessInfo );
typedef SPAPI SPBoolean (*SPFilterEventProc)( NotifyEvent event, void *eventData );
typedef SPAPI SPErr (*SPAddPluginsProc)( void );
typedef SPAPI SPBoolean (*SPOverrideStartupProc)( SPPluginRef currentPlugin );
#ifdef WIN_ENV
typedef SPAPI SPErr (*SPResolveLinkProc)(char *shortcutFile, char *resolvedPath);
#endif
#if defined(MAC_ENV) && defined(__MWERKS__) && !defined(powerc)
#pragma pointers_in_A0
#endif
typedef struct SPHostProcs {
void *hostData;
SPAllocateProc extAllocate;
SPFreeProc extFree;
SPReallocateProc extReallocate;
SPAllocateProc intAllocate;
SPFreeProc intFree;
SPReallocateProc intReallocate;
SPStartupNotifyProc startupNotify;
SPShutdownNotifyProc shutdownNotify;
SPAssertTrapProc assertTrap;
SPThrowTrapProc throwTrap;
SPDebugTrapProc debugTrap;
SPAllocateStringPoolProc allocateStringPool;
SPFreeStringPoolProc freeStringPool;
SPMakeWStringProc makeWString;
SPStringPoolRef appStringPool;
SPFilterEventProc filterEvent;
SPAddPluginsProc overrideAddPlugins;
SPOverrideStartupProc overridePluginStartup;
#ifdef WIN_ENV
SPResolveLinkProc resolveLink;
#endif
} SPHostProcs;
/*******************************************************************************
**
** Suite
**
**/
typedef struct SPRuntimeSuite {
SPAPI SPErr (*GetRuntimeStringPool)( SPStringPoolRef *stringPool );
SPAPI SPErr (*GetRuntimeSuiteList)( SPSuiteListRef *suiteList );
SPAPI SPErr (*GetRuntimeFileList)( SPFileListRef *fileList );
SPAPI SPErr (*GetRuntimePluginList)( SPPluginListRef *pluginList );
SPAPI SPErr (*GetRuntimeAdapterList)( SPAdapterListRef *adapterList );
SPAPI SPErr (*GetRuntimeHostProcs)( SPHostProcs **hostProcs );
SPAPI SPErr (*GetRuntimePluginsFolder)( SPPlatformFileSpecification *pluginFolder );
SPAPI SPErr (*GetRuntimeHostFileSpec)( SPPlatformFileSpecification *hostFileSpec );
} SPRuntimeSuite;
SPAPI SPErr SPGetRuntimeStringPool( SPStringPoolRef *stringPool );
SPAPI SPErr SPGetRuntimeSuiteList( SPSuiteListRef *suiteList );
SPAPI SPErr SPGetRuntimeFileList( SPFileListRef *fileList );
SPAPI SPErr SPGetRuntimePluginList( SPPluginListRef *pluginList );
SPAPI SPErr SPGetRuntimeAdapterList( SPAdapterListRef *adapterList );
SPAPI SPErr SPGetRuntimeHostProcs( SPHostProcs **hostProcs );
SPAPI SPErr SPGetRuntimePluginsFolder( SPPlatformFileSpecification *pluginFolder );
SPAPI SPErr SPSetRuntimePluginsFolder( SPPlatformFileSpecification *pluginFolder );
SPAPI SPErr SPGetRuntimeHostFileSpec( SPPlatformFileSpecification *hostFileSpec );
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,49 @@
/*
* Name:
* SPSTSPrp.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Define "secret" properties and values.
*
* Distribution:
* PRIVATE
*
* Version history:
* 1.0.0 4/1/1995 DL First Version.
* Created by Adobe Systems Incorporated.
*/
#ifndef __SPSTSPrp__
#define __SPSTSPrp__
/*******************************************************************************
**
** Imports
**
**/
#include "SPPiPL.h"
/*******************************************************************************
**
** Constants
**
**/
#define PISuperTopSecretProperty 'StsP'
#define PISuperTopSecretValue 'clEn'
/*******************************************************************************
**
** Types
**
**/
#endif
@@ -0,0 +1,95 @@
/*
* Name:
* SPTypes.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* SP Strings Suite.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/1/1995 DL First Version.
* Created by Adobe Systems Incorporated.
*/
#ifndef __SPStrings__
#define __SPStrings__
/*******************************************************************************
**
** Imports
**
**/
#include "SPTypes.h"
#ifdef __cplusplus
extern "C" {
#endif
/*******************************************************************************
**
** Constants
**
**/
#define kSPStringsSuite "SP Strings Suite"
#define kSPStringsSuiteVersion 2
#define kSPRuntimeStringPool ((SPStringPoolRef)NULL)
/*******************************************************************************
**
** Types
**
**/
/* If you override the default string pool handler by defining host proc routines,
* how the string pool memory allocation and searching is done is up to you. As an example,
* the structure below is similar to what is used by default string pool
* routines. The pool is a sorted list of strings of number count, kept in memory referenced
* by the heap field.
*
* typedef struct SPStringPool {
*
* SPPoolHeapRef heap;
* long count;
*
* } SPStringPool;
*/
typedef struct SPStringPool *SPStringPoolRef;
/*******************************************************************************
**
** Suite
**
**/
typedef struct SPStringsSuite {
SPAPI SPErr (*AllocateStringPool)( SPStringPoolRef *stringPool );
SPAPI SPErr (*FreeStringPool)( SPStringPoolRef stringPool );
SPAPI SPErr (*MakeWString)( SPStringPoolRef stringPool, char *string, char **wString );
} SPStringsSuite;
SPAPI SPErr SPAllocateStringPool( SPStringPoolRef *stringPool );
SPAPI SPErr SPFreeStringPool( SPStringPoolRef stringPool );
SPAPI SPErr SPMakeWString( SPStringPoolRef stringPool, char *string, char **wString );
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,134 @@
/*
* Name:
* SPSuites.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Defines SP API Suites.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/1/1995 DL First Version.
* Created by Adobe Systems Incorporated.
*/
#ifndef __SPSuites__
#define __SPSuites__
/*******************************************************************************
**
** Imports
**
**/
#include "SPTypes.h"
#include "SPAccess.h"
#include "SPPlugs.h"
#include "SPStrngs.h"
#ifdef __cplusplus
extern "C" {
#endif
/*******************************************************************************
**
** Constants
**
**/
#define kSPSuitesSuite "SP Suites Suite"
#define kSPSuitesSuiteVersion 2
#define kSPLatestInternalVersion 0
#define kSPRuntimeSuiteList ((SPSuiteListRef)NULL)
/*******************************************************************************
**
** Types
**
**/
typedef struct SPSuite *SPSuiteRef;
typedef struct SPSuiteList *SPSuiteListRef;
typedef struct SPSuiteListIterator *SPSuiteListIteratorRef;
/*******************************************************************************
**
** Suite
**
**/
typedef struct SPSuitesSuite {
SPAPI SPErr (*AllocateSuiteList)( SPStringPoolRef stringPool, SPPluginListRef plugins, SPSuiteListRef *suiteList );
SPAPI SPErr (*FreeSuiteList)( SPSuiteListRef suiteList );
SPAPI SPErr (*AddSuite)( SPSuiteListRef suiteList, SPPluginRef host, char *name, long apiVersion, long internalVersion, void *suiteProcs, SPSuiteRef *suite );
SPAPI SPErr (*AcquireSuite)( SPSuiteListRef suiteList, char *name, long apiVersion, long internalVersion, void **suiteProcs );
SPAPI SPErr (*ReleaseSuite)( SPSuiteListRef suiteList, char *name, long apiVersion, long internalVersion );
SPAPI SPErr (*FindSuite)( SPSuiteListRef suiteList, char *name, long apiVersion, long internalVersion, SPSuiteRef *suite );
SPAPI SPErr (*NewSuiteListIterator)( SPSuiteListRef suiteList, SPSuiteListIteratorRef *iter );
SPAPI SPErr (*NextSuite)( SPSuiteListIteratorRef iter, SPSuiteRef *suite );
SPAPI SPErr (*DeleteSuiteListIterator)( SPSuiteListIteratorRef iter );
SPAPI SPErr (*GetSuiteHost)( SPSuiteRef suite, SPPluginRef *plugin );
SPAPI SPErr (*GetSuiteName)( SPSuiteRef suite, char **name );
SPAPI SPErr (*GetSuiteAPIVersion)( SPSuiteRef suite, long *version );
SPAPI SPErr (*GetSuiteInternalVersion)( SPSuiteRef suite, long *version );
SPAPI SPErr (*GetSuiteProcs)( SPSuiteRef suite, void **suiteProcs );
SPAPI SPErr (*GetSuiteAcquireCount)( SPSuiteRef suite, long *count );
} SPSuitesSuite;
SPAPI SPErr SPAllocateSuiteList( SPStringPoolRef stringPool, SPPluginListRef plugins, SPSuiteListRef *suiteList );
SPAPI SPErr SPFreeSuiteList( SPSuiteListRef suiteList );
SPAPI SPErr SPAddSuite( SPSuiteListRef suiteList, SPPluginRef host, char *name, long apiVersion, long internalVersion, void *suiteProcs, SPSuiteRef *suite );
SPAPI SPErr SPAcquireSuite( SPSuiteListRef suiteList, char *name, long apiVersion, long internalVersion, void **suiteProcs );
SPAPI SPErr SPReleaseSuite( SPSuiteListRef suiteList, char *name, long apiVersion, long internalVersion );
SPAPI SPErr SPFindSuite( SPSuiteListRef suiteList, char *name, long apiVersion, long internalVersion, SPSuiteRef *suite );
SPAPI SPErr SPNewSuiteListIterator( SPSuiteListRef suiteList, SPSuiteListIteratorRef *iter );
SPAPI SPErr SPNextSuite( SPSuiteListIteratorRef iter, SPSuiteRef *suite );
SPAPI SPErr SPDeleteSuiteListIterator( SPSuiteListIteratorRef iter );
SPAPI SPErr SPGetSuiteHost( SPSuiteRef suite, SPPluginRef *plugin );
SPAPI SPErr SPGetSuiteName( SPSuiteRef suite, char **name );
SPAPI SPErr SPGetSuiteAPIVersion( SPSuiteRef suite, long *version );
SPAPI SPErr SPGetSuiteInternalVersion( SPSuiteRef suite, long *version );
SPAPI SPErr SPGetSuiteProcs( SPSuiteRef suite, void **suiteProcs );
SPAPI SPErr SPGetSuiteAcquireCount( SPSuiteRef suite, long *count );
/*******************************************************************************
**
** Errors
**
**/
#define kSPSuiteNotFoundError 'S!Fd'
#define kSPSuiteAlreadyExistsError 'SExi'
#define kSPSuiteAlreadyReleasedError 'SRel'
#define kSPBadSuiteListIteratorError 'SLIt'
#define kSPBadSuiteInternalVersionError 'SIVs'
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,158 @@
/*
* Name:
* SPTypes.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* These are the basic declarations used by PICA.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/1/1997 DL First Version.
* Created by Adobe Systems Incorporated.
*/
#ifndef __SPTypes__
#define __SPTypes__
/*******************************************************************************
**
** Imports
**
**/
#include "SPConfig.h"
/*
* You can replace SPTypes.h with your own. Define OTHER_SP_TYPES_H on the
* command line or in SPConfig.h to be the name of the replacement file.
*
* Example:
*
* #define OTHER_SP_TYPES_H "MySPTypes.h"
* #include "SPBasic.h" // for example
*
* Your replacement must define TRUE, FALSE, SPErr, etc.
*
*/
#ifdef OTHER_SP_TYPES_H
#include OTHER_SP_TYPES_H
#else
/*******************************************************************************
**
** Constants
**
**/
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef NULL
#ifdef MAC_ENV
#if !defined(__cplusplus) && (defined(__SC__) || defined(THINK_C))
#define NULL ((void *) 0)
#else
#define NULL 0
#endif
#endif
#ifdef WIN_ENV
#ifdef __cplusplus
#define NULL 0
#else
#define NULL ((void *)0)
#endif
#endif
#endif
/*
* SPAPI is placed in front of procedure declarations in the API. On the Mac
* it is 'pascal', which forces consistent calling conventions across different
* compilers. On Windows it's nothing.
*
* Example:
*
* SPAPI void *SPAllocateBlock( long size, char *debug, SPErr *error );
*
*/
#ifdef MAC_ENV
#define SPAPI pascal
#endif
#ifdef WIN_ENV
#define SPAPI
#endif
#ifdef MAC_ENV
/* SPBoolean is the same a Macintosh Boolean. */
typedef unsigned char SPBoolean;
#endif
#ifdef WIN_ENV
/* SPBoolean is the same a Windows BOOL. */
typedef int SPBoolean;
#endif
/*******************************************************************************
**
** Error Handling
**
**/
/*
* Error codes are C strings, with the exception of the code for
* no error, which is NULL. The error can first be compared with kSPNoError to
* test if the function succeeded. If it is not NULL then the error can be
* string-compared with predefined error strings.
*
* Example:
*
* SPErr error = kSPNoError;
*
* block = SPAllocateBlock( size, debug, &error );
* if ( error != kSPNoError ) {
* if ( strcmp( error, kSPOutOfMemoryError ) == 0 )
* FailOutOfMemory();
* ...
* }
*/
typedef long SPErr;
/*
* kSPNoError and kSPUnimplementedError are universal. Other error codes should
* be defined in the appropriate header files.
*/
#define kSPNoError 0x00000000L
#define kSPUnimplementedError '!IMP'
#endif /* OTHER_SP_TYPES_H */
#endif
@@ -0,0 +1,230 @@
//-------------------------------------------------------------------------------
//
// File:
// PIExport.h
//
// Copyright 1990-1991, Thomas Knoll.
// Copyright 1991-1998, Adobe Systems Incorporated.
// All Rights Reserved.
//
// Distribution:
// PUBLIC
//
// Description:
// This file describes version 4.0 of Photoshop's Export module interface.
//
// Use:
// Include in all Export plug-ins.
//
//
// Version history:
// Version 1.0.0 1/1/90 TK Initial compilation.
// Version 2.0.0 10/1/97 Ace Updated for Photoshop 4.0.
//
//-------------------------------------------------------------------------------
#ifndef __PIExport__
#define __PIExport__
#include "PIActions.h"
#include "PIGeneral.h"
#include "SPBasic.h"
/* Operation selectors */
#define exportSelectorAbout 0
#define exportSelectorStart 1
#define exportSelectorContinue 2
#define exportSelectorFinish 3
#define exportSelectorPrepare 4
/* Error return values. The plug-in module may also return standard Macintosh
operating system error codes, or report its own errors, in which case it
can return any positive integer. */
#define exportBadParameters -30200 /* "a problem with the export module interface" */
#define exportBadMode -30201 /* "the export module does not support <mode> images" */
/******************************************************************************/
#define PIExpFlagsProperty 0x65787066 /* 'expf' <Set> Export flags */
/******************************************************************************/
/* Export flag indices. */
#define PIExpSupportsTransparency 0
/******************************************************************************/
/* Pragma to byte align structures; only for Borland C */
#if defined(__BORLANDC__)
#pragma option -a-
#endif
/******************************************************************************/
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
typedef struct ExportRecord
{
int32 serialNumber; /* Host's serial number, to allow
copy protected plug-in modules. */
TestAbortProc abortProc; /* The plug-in module may call this no-argument
BOOLEAN function (using Pascal calling
conventions) several times a second during long
operations to allow the user to abort the operation.
If it returns TRUE, the operation should be aborted
(and a positive error code returned). */
ProgressProc progressProc; /* The plug-in module may call this two-argument
procedure periodically to update a progress
indicator. The first parameter is the number
of operations completed; the second is the total
number of operations. */
int32 maxData; /* Maximum number of bytes that should be
requested at once (the plug-in should reduce
its requests by the size any large buffers
it allocates). The plug-in may reduce this
value in the exportSelectorPrepare routine. */
int16 imageMode; /* Image mode */
Point imageSize; /* Size of image */
int16 depth; /* Bits per sample, currently will be 1 or 8 */
int16 planes; /* Samples per pixel */
Fixed imageHRes; /* Pixels per inch */
Fixed imageVRes; /* Pixels per inch */
LookUpTable redLUT; /* Red LUT, only used for Indexed Color images */
LookUpTable greenLUT; /* Green LUT, only used for Indexed Color images */
LookUpTable blueLUT; /* Blue LUT, only used for Indexed Color images */
Rect theRect; /* Rectangle requested, set to empty rect when done */
int16 loPlane; /* First plane requested */
int16 hiPlane; /* Last plane requested */
void * data; /* A pointer to the requested image data */
int32 rowBytes; /* Spacing between rows */
Str255 filename; /* Document file name */
int16 vRefNum; /* Volume reference number, or zero if none */
Boolean dirty; /* Changes since last saved flag. The plug-in may clear
this field to prevent prompting the user when
closing the document. */
Rect selectBBox; /* Bounding box of current selection, or an empty
rect if there is no current selection. */
OSType hostSig; /* Creator code for host application */
HostProc hostProc; /* Host specific callback procedure */
Handle duotoneInfo; /* Handle to duotone information. */
int16 thePlane; /* Currently selected channel,
or -1 if a composite color channel,
or -2 if all channels. */
PlugInMonitor monitor; /* Information on current monitor */
void * platformData; /* Platform specific hook. */
BufferProcs * bufferProcs; /* Host buffer maintenance procedures. */
ResourceProcs * resourceProcs; /* Host plug-in resource procedures. */
ProcessEventProc processEvent; /* Pass events to the application. */
DisplayPixelsProc displayPixels;/* Display dithered pixels. */
HandleProcs *handleProcs; /* Platform independent handle manipulation. */
/* New in 3.0. */
ColorServicesProc colorServices; /* Routine to access color services. */
GetPropertyProc getPropertyObsolete; /* Use the suite if available */
AdvanceStateProc advanceState; /* Allowed from Start and Continue. */
int16 layerPlanes;
int16 transparencyMask;
int16 layerMasks; /* Zero. */
int16 invertedLayerMasks; /* Zero. */
int16 nonLayerPlanes;
/* Note that the layer mask fields are necessarily zero in 3.0.4 since
the export module receives the merged data and the merged data doesn't
really have a layer mask associated with it. */
/* New in 3.0.4. */
ImageServicesProcs *imageServicesProcs;
/* Suite of image processing callbacks. */
int16 tileWidth; /* The width of the tiles. Zero if not set. */
int16 tileHeight; /* The height of the tiles. Zero if not set. */
Point tileOrigin; /* The origin point for the tiles. */
PropertyProcs *propertyProcs; /* Routines to query and set document and
view properties. The plug-in needs to
dispose of the handle returned for
complex properties (the plug-in also
maintains ownership of handles for
set properties.
*/
/* New in 4.0 */
PIDescriptorParameters *descriptorParameters; /* For recording and playback */
Str255 *errorString; /* For silent and errReportString */
ChannelPortProcs *channelPortProcs;
/* Suite for passing pixels through channel ports. */
ReadImageDocumentDesc *documentInfo; /* The document info for the document being filtered. */
/* New in 5.0 */
SPBasicSuite *sSPBasic; /* SuitePea basic suite */
void *plugInRef; /* plugin reference used by SuitePea*/
int32 transparentIndex; /* if IndexedColor, and < 256, this is the index of the transparent color (for GIF) */
Handle iCCprofileData; /* Handle containing the ICC profile for the image. (NULL if none)
Photoshop allocates the handle using Photoshop's handle suite
The handle is unlocked while calling the plug-in
The handle will be valid from Start to Finish
Photoshop will free the handle after Finish
*/
int32 iCCprofileSize; /* size of profile. */
int32 canUseICCProfiles; /* non-zero if the host can accept/export ICC profiles
if this is zero, you'd better not set or dereference iCCprofileData :-)
*/
char reserved [158]; /* Set to zero */
}
ExportRecord, *ExportRecordPtr;
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
/******************************************************************************/
/* turn off the byte align pragma back to its original state; only for Borland C */
#if defined(__BORLANDC__)
#pragma option -a.
#endif
/******************************************************************************/
#endif // __PIExport_h__
@@ -0,0 +1,438 @@
//-------------------------------------------------------------------------------
//
// File: PIFilter.h
//
// Copyright 1990-1991, Thomas Knoll.
// Copyright 1992-1998, Adobe Systems Incorporated.
// All rights reserved.
//
//
// Distribution:
// PUBLIC
//
// Description:
// This file describes version 4.0 of Photoshop's Filter module interface.
//
// Use:
// Include this file in Filter plug-in projects.
//
// Version History:
// 1.0.0 1/1/1991 TK Initial compilation.
// 2.0.0 10/7/97 Ace Updated for Photoshop 4.0.
//
//-------------------------------------------------------------------------------
#ifndef __PIFilter__
#define __PIFilter__
#include "PIActions.h"
#include "PIGeneral.h"
#include "SPBasic.h"
/* Operation selectors */
#define filterSelectorAbout 0
#define filterSelectorParameters 1
#define filterSelectorPrepare 2
#define filterSelectorStart 3
#define filterSelectorContinue 4
#define filterSelectorFinish 5
/********************************************************************************/
/* We identify the following cases for filtering. These cases are used to index
* the behavior properties and are passed to the filter in the filterCase field.
* of the parameter block.
*/
#define filterCaseUnsupported -1
#define filterCaseFlatImageNoSelection 1
#define filterCaseFlatImageWithSelection 2
#define filterCaseFloatingSelection 3
#define filterCaseEditableTransparencyNoSelection 4
#define filterCaseEditableTransparencyWithSelection 5
#define filterCaseProtectedTransparencyNoSelection 6
#define filterCaseProtectedTransparencyWithSelection 7
/********************************************************************************/
#define filterDataHandlingCantFilter 0
#define filterDataHandlingNone 1
#define filterDataHandlingBlackMat 2
#define filterDataHandlingGrayMat 3
#define filterDataHandlingWhiteMat 4
/* The following modes are only useful for input. */
#define filterDataHandlingDefringe 5
#define filterDataHandlingBlackZap 6
#define filterDataHandlingGrayZap 7
#define filterDataHandlingWhiteZap 8
/* The following mode is only useful for output. */
#define filterDataHandlingFillMask 9
/* More modes for input... */
#define filterDataHandlingBackgroundZap 10
#define filterDataHandlingForegroundZap 11
/********************************************************************************/
/* For FilterCaseInfo structure (defined below) used with PIFilterCaseInfoProperty */
/* Here are the bits in flag1. */
#define PIFilterDontCopyToDestinationBit 0
/* Normally we copy the source data to the destination before filtering.
Setting this bit inhibits that behavior. */
#define PIFilterWorksWithBlankDataBit 1
/* In the editable transparency case, we want to know whether the filter
requires non-blank pixels to do any work. */
#define PIFilterFiltersLayerMaskBit 2
/* In the editable transparency case, do we also want to filter the layer
mask if it is positioned relative to the layer? */
#define PIFilterWritesOutsideSelectionBit 3
/* In the image with selection and layer with selection cases, does the
filter want to write beyond the confines of the selection? (This is
generally rude but in some cases its better than the alternatives. If
you use this, be sure you also think about supporting layer transparency
data as an alternate mask.) */
/********************************************************************************/
#define PIFilterCaseInfoProperty 0x66696369L
/* 'fici' An array of filter case info records using 1 based indexing. */
/********************************************************************************/
/* Error return values. The plug-in module may also return standard Macintosh
operating system error codes, or report its own errors, in which case it
can return any positive integer. */
#define filterBadParameters -30100 /* "a problem with the filter module interface" */
#define filterBadMode -30101 /* "the filter module does not support <mode> images" */
#ifndef RC_INVOKED
/********************************************************************************/
/* Pragma to byte align structures; only for Borland C */
#if defined(__BORLANDC__)
#pragma option -a-
#endif
/********************************************************************************/
/* Packing for Microsoft compiler */
#if WIN32
#pragma pack(push,1)
#endif
/********************************************************************************/
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
/********************************************************************************/
typedef struct FilterCaseInfo
{
char inputHandling;
char outputHandling;
char flags1;
char flags2;
}
FilterCaseInfo;
#if WIN32
#pragma pack(pop)
#endif
/*********************************************************************************/
/* turn off the byte align pragma back to its original state; only for Borland C */
#if defined(__BORLANDC__)
#pragma option -a.
#endif
/*********************************************************************************/
typedef unsigned char FilterColor [4];
#if WIN32
#pragma pack(push,4)
#endif
/********************************************************************************/
typedef struct FilterRecord
{
int32 serialNumber; /* Host's serial number, to allow
copy protected plug-in modules. */
TestAbortProc abortProc; /* The plug-in module may call this no-argument
BOOLEAN function (using Pascal calling
conventions) several times a second during long
operations to allow the user to abort the operation.
If it returns TRUE, the operation should be aborted
(and a positive error code returned). */
ProgressProc progressProc; /* The plug-in module may call this two-argument
procedure periodically to update a progress
indicator. The first parameter is the number
of operations completed; the second is the total
number of operations. */
Handle parameters; /* A handle, initialized to NIL by Photoshop.
This should be used to hold the filter's
current parameters. */
Point imageSize; /* Size of image */
int16 planes; /* Samples per pixel */
Rect filterRect; /* Rectangle to filter */
RGBColor background; /* Current background color */
RGBColor foreground; /* Current foreground color */
int32 maxSpace; /* Maximum possible total of data and buffer space */
int32 bufferSpace; /* If the plug-in filter needs to allocate
large internal buffers, the filterSelectorPrepare
routine should set this field to the number
of bytes the filterSelectorStart routine is
planning to allocate. Relocatable blocks should
be used if possible. */
Rect inRect; /* Requested input rectangle. Must be a subset of
the image's bounding rectangle. */
int16 inLoPlane; /* First requested input plane */
int16 inHiPlane; /* Last requested input plane */
Rect outRect; /* Requested output rectangle. Must be a subset of
filterRect. */
int16 outLoPlane; /* First requested output plane */
int16 outHiPlane; /* Last requested output plane */
void * inData; /* Pointer to input rectangle. If more than one
plane was requested, the data is interleaved. */
int32 inRowBytes; /* Offset between input rows */
void * outData; /* Pointer to output rectangle. If more than one
plane was requested, the data is interleaved. */
int32 outRowBytes; /* Offset between output rows */
Boolean isFloating; /* Set to true if the selection is floating */
Boolean haveMask; /* Set to true if there is a selection mask */
Boolean autoMask; /* If there is a mask, and the selection is not
floating, the plug-in can change this field to
false to turn off auto-masking. */
Rect maskRect; /* Requested mask rectangle. Must be a subset of
filterRect. Should only be used if haveMask is
true. */
void * maskData; /* Pointer to (read only) mask data. */
int32 maskRowBytes; /* Offset between mask rows */
FilterColor backColor; /* Background color in native color space */
FilterColor foreColor; /* Foreground color in native color space */
OSType hostSig; /* Creator code for host application */
HostProc hostProc; /* Host specific callback procedure */
int16 imageMode; /* Image mode */
Fixed imageHRes; /* Pixels per inch */
Fixed imageVRes; /* Pixels per inch */
Point floatCoord; /* Top left coordinate of selection */
Point wholeSize; /* Size of image selection is floating over */
PlugInMonitor monitor; /* Information on current monitor */
void *platformData; /* Platform specific information. */
BufferProcs *bufferProcs; /* The host buffer procedures. */
ResourceProcs *resourceProcs; /* The host plug-in resource procedures. */
ProcessEventProc processEvent; /* Pass event to the application. */
DisplayPixelsProc displayPixels;/* Display dithered pixels. */
HandleProcs *handleProcs; /* Platform independent handle manipulation. */
/* New in 3.0. */
Boolean supportsDummyChannels; /* Does the host support dummy channels? */
Boolean supportsAlternateLayouts; /* Does the host support alternate
data layouts. */
int16 wantLayout; /* The layout to use for the data.
See PIGeneral for the values. */
int16 filterCase; /* Filter case. If zero, then the plug-in
should look at haveMask and isFloating
since older hosts will not set this
field. */
int16 dummyPlaneValue; /* 0..255 = fill value
-1 = leave undefined
All others generate errors. */
void * premiereHook; /* A hook for Premiere. See the Premiere
Developer's Kit. */
AdvanceStateProc advanceState; /* Advance from start to continue or
continue to continue. */
Boolean supportsAbsolute; /* Does the host support absolute plane
indexing? */
Boolean wantsAbsolute; /* Does the plug-in want absolute plane
indexing? (input only) */
GetPropertyProc getPropertyObsolete; /* Use the suite if available */
Boolean cannotUndo; /* If set to TRUE, then undo will not
be enabled for this command. */
Boolean supportsPadding; /* Does the host support requests outside
the image area? */
int16 inputPadding; /* Instructions for padding the input. */
int16 outputPadding; /* Instructions for padding the output. */
int16 maskPadding; /* Padding instructions for the mask. */
char samplingSupport; /* Does the host support sampling the
input and mask? */
char reservedByte; /* Alignment. */
Fixed inputRate; /* Input sample rate. */
Fixed maskRate; /* Mask sample rate. */
ColorServicesProc colorServices; /* Routine to access color services. */
/* Photoshop structures its data as follows for plug-ins when processing
layer data:
target layer channels
transparency mask for target layer
layer mask channels for target layer
inverted layer mask channels for target layer
non-layer channels
When processing non-layer data (including running a filter on the
layer mask alone), Photoshop structures the data as consisting only
of non-layer channels. It indicates this structure through a series
of short counts. The transparency count must be either 0 or 1. */
int16 inLayerPlanes;
int16 inTransparencyMask;
int16 inLayerMasks;
int16 inInvertedLayerMasks;
int16 inNonLayerPlanes;
int16 outLayerPlanes;
int16 outTransparencyMask;
int16 outLayerMasks;
int16 outInvertedLayerMasks;
int16 outNonLayerPlanes;
int16 absLayerPlanes;
int16 absTransparencyMask;
int16 absLayerMasks;
int16 absInvertedLayerMasks;
int16 absNonLayerPlanes;
/* We allow for extra planes in the input and the output. These planes
will be filled with dummyPlaneValue at those times when we build the
buffers. These features will only be available if supportsDummyPlanes
is TRUE. */
int16 inPreDummyPlanes; /* Extra planes to allocate in the input. */
int16 inPostDummyPlanes;
int16 outPreDummyPlanes; /* Extra planes to allocate in the output. */
int16 outPostDummyPlanes;
/* If the plug-in makes use of the layout options, then the following
fields should be obeyed for identifying the steps between components.
The last component in the list will always have a step of one. */
int32 inColumnBytes; /* Step between input columns. */
int32 inPlaneBytes; /* Step between input planes. */
int32 outColumnBytes; /* Step between output columns. */
int32 outPlaneBytes; /* Step between output planes. */
/* New in 3.0.4. */
ImageServicesProcs *imageServicesProcs;
/* Suite of image processing callbacks. */
PropertyProcs *propertyProcs; /* Routines to query and set document and
view properties. The plug-in needs to
dispose of the handle returned for
complex properties (the plug-in also
maintains ownership of handles for
set properties.
*/
int16 inTileHeight; /* Tiling for the input. Zero if not set. */
int16 inTileWidth;
Point inTileOrigin;
int16 absTileHeight; /* Tiling for the absolute data. */
int16 absTileWidth;
Point absTileOrigin;
int16 outTileHeight; /* Tiling for the output. */
int16 outTileWidth;
Point outTileOrigin;
int16 maskTileHeight; /* Tiling for the mask. */
int16 maskTileWidth;
Point maskTileOrigin;
/* New in 4.0 */
PIDescriptorParameters *descriptorParameters; /* For recording and playback */
Str255 *errorString; /* For silent and errReportString */
ChannelPortProcs *channelPortProcs;
/* Suite for passing pixels through channel ports. */
ReadImageDocumentDesc *documentInfo; /* The document info for the document being filtered. */
/* New in 5.0 */
SPBasicSuite *sSPBasic; /* SuitePea basic suite */
void *plugInRef; /* plugin reference used by SuitePea*/
int32 depth; /* bit depth per channel (1,8,16) */
char reserved [66]; /* Set to zero */
}
FilterRecord, *FilterRecordPtr;
#if WIN32
#pragma pack(pop)
#endif
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
/*********************************************************************************/
// ifdef RC_INVOKED
#endif
#endif // __PIFilter_h__
@@ -0,0 +1,313 @@
//-------------------------------------------------------------------------------
//
// File:
// PIFormat.h
//
// Copyright 1991-1998, Adobe Systems Incorporated.
// All Rights Reserved.
//
// Distribution:
// PUBLIC
//
// Description:
// This file describes version 1 of Photoshop's plug-in image format interface.
//
// Use:
// Include in all Format plug-ins.
//
//
// Version history:
// Version 1.0.0 10/9/1997 Ace Initial compilation.
//
//-------------------------------------------------------------------------------
#ifndef __PIFormat__
#define __PIFormat__
#include "PIActions.h"
#include "PIGeneral.h"
#include "SPBasic.h"
/* Operation selectors */
#define formatSelectorAbout 0
#define formatSelectorReadPrepare 1
#define formatSelectorReadStart 2
#define formatSelectorReadContinue 3
#define formatSelectorReadFinish 4
#define formatSelectorOptionsPrepare 5
#define formatSelectorOptionsStart 6
#define formatSelectorOptionsContinue 7
#define formatSelectorOptionsFinish 8
#define formatSelectorEstimatePrepare 9
#define formatSelectorEstimateStart 10
#define formatSelectorEstimateContinue 11
#define formatSelectorEstimateFinish 12
#define formatSelectorWritePrepare 13
#define formatSelectorWriteStart 14
#define formatSelectorWriteContinue 15
#define formatSelectorWriteFinish 16
#define formatSelectorFilterFile 17
/* We keep various pieces of information about the file format in the PiMI resource.
Here is the structure of that resource. */
/******************************************************************************/
#define PIFmtFileTypeProperty 0x666d5443 /* 'fmTC' <TypeCreatorPair> Default file type for file format. */
#define PIReadTypesProperty 0x52645479 /* 'RdTy' <TypeCreatorPair []> File type info for file format plugins */
#define PIFilteredTypesProperty 0x66667454 /* 'fftT' <TypeCreatorPair []> File types to filter for file format plugins */
#define PIReadExtProperty 0x52644578 /* 'RdEx' <OSType []> File type info for file format plugins */
#define PIFilteredExtProperty 0x66667445 /* 'fftE' <OSType []> File types to filter for file format plugins */
#define PIFmtFlagsProperty 0x666d7466 /* 'fmtf' <Set> Format flags */
#define PIFmtMaxSizeProperty 0x6d78737a /* 'mxsz' <Point> Max rows and cols supported by this format. */
#define PIFmtMaxChannelsProperty 0x6d786368 /* 'mxch' <int16 []> Max channels per mode for this format. */
/******************************************************************************/
/* Format flags indices. */
#define PIFmtReadsAllTypesFlag 0
#define PIFmtSavesImageResourcesFlag 1
#define PIFmtCanReadFlag 2
#define PIFmtCanWriteFlag 3
#define PIFmtCanWriteIfReadFlag 4
/******************************************************************************/
/* Pragma to byte align structures; for Borland C */
#if defined(__BORLANDC__)
#pragma option -a-
#endif
/* Pragma to byte align structures; for Microsoft C */
#if WIN32
#pragma pack(push,1)
#endif
/******************************************************************************/
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=mac68k
#endif
typedef struct FormatInfo
{
PlugInInfo plugInInfo; /* The information common to all plug-ins. */
int16 typeCount; /* The number of types in the type list. */
int16 extensionCount; /* The number of extensions in the type list. */
Boolean canRead; /* Can we read using this format? */
Boolean readsAllTypes; /* Can this plug-in read from all files? */
Boolean canWrite; /* Can we write using this format? */
Boolean canWriteIfRead; /* Can we write if we read using this format? */
Boolean savesImageResources; /* Does this file format save the resource data. */
Boolean padFlag; /* Padding */
int16 maxChannels [16]; /* Maximum # of channels with each plug-in mode. */
int16 maxRows; /* Maximum rows allowed in document. */
int16 maxCols; /* Maximum columns allowed in document. */
OSType fileType; /* The file type if we create a file. */
OSType creatorType; /* The creator type if we create a file. */
OSType typeList [1]; /* The types and extensions supported. */
}
FormatInfo;
/******************************************************************************/
/* turn off the byte align pragma back to its original state; only for Borland C */
#if defined(__BORLANDC__)
#pragma option -a.
#endif
/* Pragma to turn off align structures for Microsoft C */
#if WIN32
#pragma pack(pop)
#endif
/******************************************************************************/
/* Error return values. The plug-in module may also return standard Macintosh
operating system error codes, or report its own errors, in which case it
can return any positive integer. */
#define formatBadParameters -30500
#define formatCannotRead -30501
#if WIN32
#pragma pack(push,4)
#endif
typedef struct FormatRecord
{
int32 serialNumber; /* Host's serial number, to allow
copy protected plug-in modules. */
TestAbortProc abortProc; /* The plug-in module may call this no-argument
BOOLEAN function (using Pascal calling
conventions) several times a second during long
operations to allow the user to abort the operation.
If it returns TRUE, the operation should be aborted
(and a positive error code returned). */
ProgressProc progressProc; /* The plug-in module may call this two-argument
procedure periodically to update a progress
indicator. The first parameter is the number
of operations completed; the second is the total
number of operations. */
int32 maxData; /* Maximum number of bytes that should be
passed back at once, plus the size of any
interal buffers. The plug-in may reduce this
value in the formatSelectorPrepare routine. */
int32 minDataBytes; /* Disk space needed for the data fork. */
int32 maxDataBytes; /* Disk space needed for the data fork. */
int32 minRsrcBytes; /* Disk space needed for the resource fork. */
int32 maxRsrcBytes; /* Disk space needed for the resource fork. */
int32 dataFork; /* refnum for the data fork. */
int32 rsrcFork; /* refnum for the resource fork. */
FSSpec * fileSpec; /* Full file specification. */
int16 imageMode; /* Image mode */
Point imageSize; /* Size of image */
int16 depth; /* Bits per sample, currently must be 1 or 8 */
int16 planes; /* Samples per pixel */
Fixed imageHRes; /* Pixels per inch */
Fixed imageVRes; /* Pixels per inch */
LookUpTable redLUT; /* Red LUT, only used for Indexed Color images */
LookUpTable greenLUT; /* Green LUT, only used for Indexed Color images */
LookUpTable blueLUT; /* Blue LUT, only used for Indexed Color images */
void * data; /* A pointer to the returned image data. The
plug-in module is responsible for freeing
this buffer. Should be set to NIL when
all the image data has been returned. */
Rect theRect; /* Rectangle being returned */
int16 loPlane; /* First plane being returned */
int16 hiPlane; /* Last plane being returned */
int16 colBytes; /* Spacing between columns */
int32 rowBytes; /* Spacing between rows */
int32 planeBytes; /* Spacing between planes (ignored if only one
plane is returned at a time) */
PlaneMap planeMap; /* Maps plug-in plane numbers to host plane
numbers. The host initializes this is a linear
mapping. The plug-in may change this mapping if
it sees the data in a different order. */
Boolean canTranspose; /* Is the host able to transpose the image? */
Boolean needTranspose; /* Does the plug-in need the image transposed? */
OSType hostSig; /* Creator code for host application */
HostProc hostProc; /* Host specific callback procedure */
int16 hostModes; /* Used by the host to inform the plug-in which
imageMode values it supports. If the corresponding
bit (LSB = bit 0) is 1, the mode is supported. */
Handle revertInfo; /* Information to be kept with the document for reverting or
saving. Where possible this handle should be used to
avoid bringing up an options dialog. */
NewPIHandleProc hostNewHdl; /* Handle allocation and disposal for revert info. */
DisposePIHandleProc hostDisposeHdl;
Handle imageRsrcData; /* Handle containing the block of resource data. */
int32 imageRsrcSize; /* size of image resources. */
PlugInMonitor monitor; /* The host's monitor. */
void * platformData; /* Platform specific information. */
BufferProcs * bufferProcs; /* The procedures for allocating and */
/* releasing buffers. */
ResourceProcs * resourceProcs; /* Plug-in resource procedures. */
ProcessEventProc processEvent; /* Pass event to the application. */
DisplayPixelsProc displayPixels; /* Display dithered pixels. */
HandleProcs *handleProcs; /* Platform independent handle manipulation. */
/* New in 3.0. */
OSType fileType; /* File-type for filtering */
ColorServicesProc colorServices; /* Routine to access color services. */
AdvanceStateProc advanceState; /* Valid from continue selectors. */
/* New in 3.0.4. */
PropertyProcs *propertyProcs; /* A suite to allow getting and setting image
document properties. */
ImageServicesProcs *imageServicesProcs;
/* The suite of image processing services
callbacks. */
int16 tileWidth; /* The width of the tiles. Zero if not set. */
int16 tileHeight; /* The height of the tiles. Zero if not set. */
Point tileOrigin; /* The origin point for the tiles. */
/* New in 4.0 */
PIDescriptorParameters *descriptorParameters; /* For recording and playback */
Str255 *errorString; /* For silent and errReportString */
/* New in 5.0 */
int32 maxValue; /* used for read with 16bit depth only */
SPBasicSuite *sSPBasic; /* SuitePea basic suite */
void *plugInRef; /* plugin reference used by SuitePea*/
int32 transparentIndex; /* if IndexedColor, and between 0 and 256, this is the index of the transparent color (for GIF) */
Handle iCCprofileData; /* Handle containing the ICC profile for the image. (NULL if none)
For reads:
The handle must be allocated using Photoshop's handle suite.
Photoshop will use the data after the Finish call
and Photoshop will free the handle
For writes:
Photoshop allocates the handle using Photoshop's handle suite
The handle is unlocked while calling the plug-in
The handle will be valid from Start to Finish
Photoshop will free the handle after Finish
*/
int32 iCCprofileSize; /* size of profile. */
int32 canUseICCProfiles; /* non-zero if the host can accept/export ICC profiles
if this is zero, you'd better not set or dereference iCCprofileData :-)
*/
/* Reserved for future expansion */
char reserved [188]; /* Set to zero */
}
FormatRecord, *FormatRecordPtr;
#if WIN32
#pragma pack(pop)
#endif
#if PRAGMA_ALIGN_SUPPORTED
#pragma options align=reset
#endif
#endif // __PIFormat_h__
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,139 @@
//-------------------------------------------------------------------------------
//
// File:
// PIPicker.h
//
// Copyright 1991-1998, Adobe Systems Incorporated.
// All Rights Reserved.
//
// Distribution:
// PUBLIC
//
// Description:
// This file describes version 1.0 of Photoshop's color picker plug-in module
// interface.
//
// Use:
// Use in all color picker plug-ins.
//
//
// Version history:
// 1.0.0 10/9/1997 Ace Initial compilation.
//
//-------------------------------------------------------------------------------
#ifndef __PIPicker__
#define __PIPicker__
#include "PIActions.h"
#include "PIGeneral.h"
#include "SPBasic.h"
/********************************************************************************/
/* Operation selectors */
#define pickerSelectorAbout 0
#define pickerSelectorPick 1
/********************************************************************************/
/* Error return values. The plug-in module may also return standard Macintosh
operating system error codes, or report its own errors, in which case it
can return any positive integer. */
#define pickerBadParameters -30800 /* "of a problem with the plug-in module interface" */
/********************************************************************************/
typedef struct PickParms
{
int16 sourceSpace; // The colorspace the original color is in
int16 resultSpace; // The colorspace of the returned result
// Can be plugIncolorServicesChosenSpace
unsigned16 colorComponents[4]; // Will contain the original color when the
// plugin is called. The plugin will put
// the returned color here as well.
Str255 *pickerPrompt;
}
PickParms;
/********************************************************************************/
typedef struct PIPickerParams
{
/* We start with the fields that are common to pretty much all of the plug-ins. */
int32 serialNumber; /* Host's serial number, to allow
copy protected plug-in modules. */
TestAbortProc abortProc; /* The plug-in module may call this no-argument
BOOLEAN function (using Pascal calling
conventions) several times a second during long
operations to allow the user to abort the operation.
If it returns TRUE, the operation should be aborted
(and a positive error code returned). */
ProgressProc progressProc; /* The plug-in module may call this two-argument
procedure periodically to update a progress
indicator. The first parameter is the number
of operations completed; the second is the total
number of operations. */
OSType hostSig; /* Creator code for host application */
HostProc hostProc; /* Host specific callback procedure */
BufferProcs *bufferProcs; /* The host buffer procedures. */
ResourceProcs *resourceProcs; /* The host plug-in resource procedures. */
ProcessEventProc processEvent; /* Pass event to the application. */
DisplayPixelsProc displayPixels;/* Display dithered pixels. */
HandleProcs *handleProcs; /* Platform independent handle manipulation. */
ColorServicesProc colorServices; /* Routine to access color services. */
ImageServicesProcs *imageServicesProcs;
/* Suite of image processing callbacks. */
PropertyProcs *propertyProcs; /* Routines to query and set document and
view properties. The plug-in needs to
dispose of the handle returned for
complex properties (the plug-in also
maintains ownership of handles for
set properties.
*/
ChannelPortProcs *channelPortProcs;
/* Suite for passing pixels through channel ports. */
PIDescriptorParameters *descriptorParameters; /* For recording and playback */
Str255 *errorString; /* For silent and errReportString */
PlugInMonitor monitor; /* Information on current monitor */
void *platformData; /* Platform specific information. */
char reserved [4]; /* 4 bytes of reserved space. */
/* We follow this with the fields specific to this type of plug-in. */
PickParms pickParms;
SPBasicSuite *sSPBasic; /* SuitePea basic suite */
void *plugInRef; /* plugin reference used by SuitePea*/
/* And, of course, space for future expansion. */
char reservedBlock [252];
}
PIPickerParams, *PickerRecordPtr;
/********************************************************************************/
#endif // __PIPicker_h__
@@ -0,0 +1,145 @@
//-------------------------------------------------------------------------------
//
// File:
// PIProperties.h
//
// Copyright 1994-1998, Adobe Systems Incorporated.
// All Rights Reserved.
//
// Distribution:
// PUBLIC
//
// Description:
// This file contains the public definitions and structures
// for the properties callback suite.
//
// Use:
// If you are working with any properties via the properties
// or action get mechanisms, this documents what is available
// and its basic format.
//
// Version history:
// Version 1.0.0 1/1/1994 MH Created.
// Created for Photoshop 3.0.
//
// Version 1.5.0 1/1/1996 MP Photoshop 4.0.
// Added Photoshop 4.0 properties.
//
// Version 2.0.0 4/1/1997 Ace Photoshop 5.0.
// Updated for new headers for Photoshop 5.0.
//
//-------------------------------------------------------------------------------
#ifndef __PIProperties_h__ // Already defined?
#define __PIProperties_h__
//-------------------------------------------------------------------------------
// Get the number of channels. Returns the number of channels in the simple
// property field:
#define propNumberOfChannels 'nuch'
// Returns a handle containing the characters for the name of the channel:
#define propChannelName 'nmch'
// Returns the image mode using the plugInMode constants. (Simple):
#define propImageMode 'mode'
// Returns the number of channels including the work path. (Simple):
#define propNumberOfPaths 'nupa'
// Returns the name of the indexed path (zero-based). (Complex):
#define propPathName 'nmpa'
// Returns the contents of the indexed path (zero-based). (Complex):
#define propPathContents 'path'
// The index of the work path. -1 if no work path. (Simple):
#define propWorkPathIndex 'wkpa'
// The index of the clipping path. -1 if none. (Simple):
#define propClippingPathIndex 'clpa'
// The index of the target path. -1 if none. (Simple):
#define propTargetPathIndex 'tgpa'
// The file meta information is an IPTC-NAA record (Complex, Modifiable):
#define propCaption 'capt'
// The big nudge distance. Horizontal and vertical components. These are
// represented as a 16.16 values. (Simple, Modifiable):
#define propBigNudgeH 'bndH'
#define propBigNudgeV 'bndV'
// The current interpolation method: 1 = point sample, 2 = bilinear, 3 = bicubic
// (Simple):
#define propInterpolationMethod 'intp'
// The current ruler units. (Simple):
#define propRulerUnits 'rulr'
// Ruler units will be one from this enum:
typedef enum
{
kRulerPixels,
kRulerInches,
kRulerCm,
kRulerPoints,
kRulerPicas,
kRulerPercent
} RulerUnits;
// The current ruler origin. Horizontal and vertical components. These are
// represented as 16.16 values. (Simple, Modifiable):
#define propRulerOriginH 'rorH'
#define propRulerOriginV 'rorV'
// The current major grid rules, in inches, unless propRulerUnits is pixels, and
// then pixels. Represented as 16.16 value. (Simple, Modifiable):
#define propGridMajor 'grmj'
// The current number of grid subdivisions per major rule (Simple, Modifiable):
#define propGridMinor 'grmn'
// The serial number string shown to the user. (Complex):
#define propSerialString 'sstr'
// The hardware gamma table. (PC Only) (Complex):
#define propHardwareGammaTable 'hgam'
// The interface Color scheme:
#define propInterfaceColor 'iclr'
// The watch suspension level. When non-zero, you can make callbacks to the host
// without fear that the watch will start spinning. It is reset to zero at the
// beginning of each call from the host to the plug-in. (Simple, modifiable):
#define propWatchSuspension 'wtch'
// Whether the current image is considered copywritten (Simple, Modifiable).
// These both access the same property. The first can only be used to
// set the flag.
#define propCopyright 'cpyr'
#define propCopyright2 'cpyR'
// Indicate whether a digital signature or watermark is present (Simple, Modifiable).
// The (c) copyright symbol will appear if this is set, OR if the user has checked
// the copyright property in the File Info dialog. Do NOT turn the copyright
// flag off, ever. Use propWatermark to indicate if you've found your digital
// signature or not:
#define propWatermark 'watr'
// The URL for the current image (Complex, Modifiable):
#define propURL 'URL '
// The title of the current document (Complex):
#define propTitle 'titl'
// The width of the current document in pixels (Simple):
#define propDocumentWidth 'docW'
// The height of the current document in pixels (Simple):
#define propDocumentHeight 'docH'
//-------------------------------------------------------------------------------
#endif // __PIProperties_h__
@@ -0,0 +1,101 @@
//-------------------------------------------------------------------------------
//
// File:
// PIResDefines.h
//
// Copyright 1997-1998, Adobe Systems Incorporated.
// All Rights Reserved.
//
// Distribution:
// PUBLIC
//
// Description:
// This file contains the public definitions
// used to create PiPL resources with the
// PiPL master template, PIGeneral.r and PIGeneral.h.
//
// NOTE: Because this is included in both a header
// and a resource template, there are strict rules
// as to how elements can be defined.
//
// Use:
// This file must be included to correctly compile any
// resource (.r) files using the specific flags contained
// here. It is automatically included in PIGeneral.r and
// PIGeneral.h.
//
// Version history:
// Version 1.0.0 10/9/1997 Ace Initial compilation.
// Compiled for Photoshop 5.0, After Effects 3.1, Premiere 5.0.
//
//-------------------------------------------------------------------------------
#ifndef __PIResDefines_h__ // Only include this once.
#define __PIResDefines_h__
//-------------------------------------------------------------------------------
// Definitions -- Latest versions of Photoshop plug-in types
//-------------------------------------------------------------------------------
#define latestAcquireVersion 4
#define latestAcquireSubVersion 0
#define latestExportVersion 4
#define latestExportSubVersion 0
#define latestExtensionVersion 2
#define latestExtensionSubVersion 0
#define latestFilterVersion 4
#define latestFilterSubVersion 0
#define latestFormatVersion 1
#define latestFormatSubVersion 0
#define latestParserVersion 1
#define latestParserSubVersion 0
#define latestSelectionVersion 1
#define latestSelectionSubVersion 0
#define latestPickerVersion 1
#define latestPickerSubVersion 0
#define latestActionsPlugInVersion 1
#define latestActionsPlugInSubVersion 0
//-------------------------------------------------------------------------------
// Definitions -- PIMI property
//-------------------------------------------------------------------------------
#define supportsBitmap 1
#define supportsGrayScale 2
#define supportsIndexedColor 4
#define supportsRGBColor 8
#define supportsCMYKColor 16
#define supportsHSLColor 32
#define supportsHSBColor 64
#define supportsMultichannel 128
#define supportsDuotone 256
#define supportsLABColor 512
#define flagSupportsBitmap 128
#define flagSupportsGrayScale 64
#define flagSupportsIndexedColor 32
#define flagSupportsRGBColor 16
#define flagSupportsCMYKColor 8
#define flagSupportsHSLColor 4
#define flagSupportsHSBColor 2
#define flagSupportsMultichannel 1
#define flagSupportsDuotone 128
#define flagSupportsLABColor 64
//-------------------------------------------------------------------------------
// Definitions -- Premiere corner bits
//-------------------------------------------------------------------------------
#define bitNone (0)
#define bitTop (1<<0)
#define bitRight (1<<1)
#define bitBottom (1<<2)
#define bitLeft (1<<3)
#define bitUpperRight (1<<4)
#define bitLowerRight (1<<5)
#define bitLowerLeft (1<<6)
#define bitUpperLeft (1<<7)
//-------------------------------------------------------------------------------
#endif // __PIResDefines_h__
@@ -0,0 +1,152 @@
//-------------------------------------------------------------------------------
//
// File:
// PISelection.h
//
// Copyright 1996-1998, Adobe Systems Incorporated.
// All Rights Reserved.
//
// Distribution:
// PUBLIC
//
// Description:
// This file describes version 1.0 of Photoshop's selection plug-in module
// interface.
//
// Use:
// Include in all Selection plug-ins.
//
//
// Version history:
// Version 1.0.0 10/9/1997 Ace Initial compilation.
//
//
//
//-------------------------------------------------------------------------------
#ifndef __PISelection__
#define __PISelection__
#include "PIActions.h"
#include "PIGeneral.h"
#include "SPBasic.h"
/********************************************************************************/
/* Operation selectors */
#define selectionSelectorAbout 0
#define selectionSelectorExecute 1
/********************************************************************************/
/* Error return values. The plug-in module may also return standard Macintosh
operating system error codes, or report its own errors, in which case it
can return any positive integer. */
#define selectionBadParameters -30700 /* "a problem with the selection module interface" */
#define selectionBadMode -30701 /* "the selection module does not support <mode> images" */
/********************************************************************************/
typedef struct PISelectionParams
{
/* We start with the fields that are common to pretty much all of the plug-ins. */
int32 serialNumber; /* Host's serial number, to allow
copy protected plug-in modules. */
TestAbortProc abortProc; /* The plug-in module may call this no-argument
BOOLEAN function (using Pascal calling
conventions) several times a second during long
operations to allow the user to abort the operation.
If it returns TRUE, the operation should be aborted
(and a positive error code returned). */
ProgressProc progressProc; /* The plug-in module may call this two-argument
procedure periodically to update a progress
indicator. The first parameter is the number
of operations completed; the second is the total
number of operations. */
OSType hostSig; /* Creator code for host application */
HostProc hostProc; /* Host specific callback procedure */
BufferProcs *bufferProcs; /* The host buffer procedures. */
ResourceProcs *resourceProcs; /* The host plug-in resource procedures. */
ProcessEventProc processEvent; /* Pass event to the application. */
DisplayPixelsProc displayPixels;/* Display dithered pixels. */
HandleProcs *handleProcs; /* Platform independent handle manipulation. */
ColorServicesProc colorServices; /* Routine to access color services. */
ImageServicesProcs *imageServicesProcs;
/* Suite of image processing callbacks. */
PropertyProcs *propertyProcs; /* Routines to query and set document and
view properties. The plug-in needs to
dispose of the handle returned for
complex properties (the plug-in also
maintains ownership of handles for
set properties.
*/
ChannelPortProcs *channelPortProcs;
/* Suite for passing pixels through channel ports. */
PIDescriptorParameters *descriptorParameters; /* For recording and playback */
Str255 *errorString; /* For silent and errReportString */
PlugInMonitor monitor; /* Information on current monitor */
void *platformData; /* Platform specific information. */
char reserved [4]; /* 4 bytes of reserved space. */
/* We follow this with the fields specific to this type of plug-in. */
ReadImageDocumentDesc *documentInfo; /* The document for the selection. */
WriteChannelDesc *newSelection; /* A place to write the new selection. */
Handle newPath; /* The plug-in can return a path instead of
a selection. If the plug-in makes this handle
non-null, any data written into the new
selection will be ignored and the path described
by the handle becomes the work path. The
handle will be disposed of by the host. */
/* We can optionally take the mask and use it to build a new layer or floating
selection filled with the current foreground color.
0 = make selection
1 = make path
2 = make layer/float */
int32 treatment;
int32 supportedTreatments; /* Mask indicating host supported treatments. */
SPBasicSuite *sSPBasic; /* SuitePea basic suite */
void *plugInRef; /* plugin reference used by SuitePea*/
/* And, of course, space for future expansion. */
char reservedBlock [248];
}
PISelectionParams, *SelectionRecordPtr;
/********************************************************************************/
#define piSelMakeMask 0
#define piSelMakeWorkPath 1
#define piSelMakeLayer 2
/********************************************************************************/
#endif // __PISelection_h__
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,477 @@
//-------------------------------------------------------------------------------
//
// File:
// PITypes.h
//
// Copyright 1991-1998, Adobe Systems Incorporated.
// All Rights Reserved.
//
// Distribution:
// PUBLIC
//
// Description:
// This file describes the type definitions used in Photoshop's interface files.
//
// Use:
// Include with all Photoshop plug-in projects.
//
//
// Version history:
// Version 1.0.0 10/9/1997 Ace Initial compilation.
//
//-------------------------------------------------------------------------------
#ifndef __PITypes__
#define __PITypes__
/******************************************************************************/
/* Set up the preprocessor flags to indicate the target platform. */
#ifndef MSWindows
#define MSWindows (MSDOS || WIN32)
#endif
#ifndef Unix
#define Unix (__unix)
#endif
#ifndef Macintosh
#if (Unix || defined(macintosh) || defined(__powerc) || \
defined(__MC68K__) || defined (__POWERPC__) || \
defined(THINK_C)) && \
!MSWindows
#define Macintosh 1
#else
#define Macintosh 0
#endif
#endif /* #ifndef Macintosh */
#ifndef MacintoshOS
#define MacintoshOS (Macintosh && !Unix)
#endif
#ifndef Macintosh68K
#define Macintosh68K (MacintoshOS && m68k)
#endif
#ifndef MacintoshPPC
#define MacintoshPPC (MacintoshOS && __powerc)
#endif
#if defined (__BORLANDC__)
#pragma option -a-
#endif
/******************************************************************************/
/* Set up the flags for the Adobe Graphics Manager. */
#ifdef MAC_ENV
#undef MAC_ENV
#endif
#ifdef WIN_ENV
#undef WIN_ENV
#endif
#if Macintosh
#define MAC_ENV 1
#endif
#if MSWindows
#define WIN_ENV 1
#if WIN32
#define WINNT_ENV 1
#endif
#endif
/******************************************************************************/
/* Some utility defines for C/C++ compatiblity. */
#ifndef START_C_INCLUDE
#ifdef __cplusplus
#define START_C_INCLUDE extern "C" {
#define END_C_INCLUDE }
#else
#define START_C_INCLUDE
#define END_C_INCLUDE
#endif
#endif
#ifndef START_C_CODE
#ifdef __cplusplus
#define START_C_CODE extern "C" {
#define END_C_CODE }
#else
#define START_C_CODE
#define END_C_CODE
#endif
#endif
/******************************************************************************/
#if Macintosh
#ifndef __PSWorld__
#include <Types.h>
#include <Memory.h>
#include <Resources.h>
#include <Quickdraw.h>
#include <Dialogs.h>
#include <OSUtils.h>
#include <ToolUtils.h>
#include <Packages.h>
#include <Errors.h>
#include <Files.h>
#include <Aliases.h>
#include <AppleEvents.h>
#endif
#ifndef TRUE
#define TRUE true
#endif
#ifndef FALSE
#define FALSE false
#endif
#ifndef MACPASCAL
#define MACPASCAL pascal
#endif
#ifndef WINPASCAL
#define WINPASCAL
#endif
#ifndef __MWERKS__
#ifndef far
#define far
#endif
#endif
#ifndef huge
#define huge
#endif
#ifndef __PSWorld__
typedef signed long int32;
typedef signed short int16;
typedef signed char int8;
typedef unsigned long unsigned32;
typedef unsigned short unsigned16;
typedef unsigned char unsigned8;
/* The following types are used by AGM and we arrange to define them so that */
/* we won't have conflicts when working with AGM. */
typedef unsigned8 uint8;
typedef unsigned16 uint16;
typedef unsigned32 uint32;
typedef unsigned char Bool8;
typedef unsigned long Bool32;
#ifndef OTHER_AGM_BASIC_H
#define OTHER_AGM_BASIC_H "PITypes.h"
#endif
#endif /* __PSWorld__ */
typedef struct PlatformData {
short dummy; /* dummy variable required for some compilers. */
} PlatformData;
#endif /* Macintosh */
/******************************************************************************/
#if MSWindows
#define MACPASCAL
#define WINPASCAL pascal
#ifndef __PSWorld__
#include <windows.h>
/* Error codes. */
#define noErr 0
#define userCanceledErr (-128)
#define coercedParamErr 2
#define readErr (-19)
#define writErr (-20)
#define openErr (-23)
#define dskFulErr (-34)
#define ioErr (-36)
#define eofErr (-39) // Also - end of descriptor error.
#define fnfErr (-43)
#define vLckdErr (-46)
#define fLckdErr (-45)
#define paramErr (-50)
#define memFullErr (-108)
#define nilHandleErr (-109)
#define memWZErr (-111)
#define nil NULL
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef true
#define true TRUE
#endif
#ifndef false
#define false FALSE
#endif
typedef signed long int32;
typedef signed short int16;
typedef signed char int8;
typedef unsigned long uint32;
typedef unsigned short uint16;
typedef unsigned char uint8;
typedef unsigned long unsigned32;
typedef unsigned short unsigned16;
typedef unsigned char unsigned8;
typedef long Fixed;
typedef long Fract;
typedef long (*ProcPtr)();
#ifndef __TYPES__
#ifndef __GEOMETRY__
typedef struct Point
{
short v;
short h;
} Point;
typedef struct Rect
{
short top;
short left;
short bottom;
short right;
} Rect;
#endif
#endif
#ifndef __QUICKDRAW__
typedef struct
{
WORD red; /* Magnitude of red component, 16 bit significant.*/
WORD green; /* Magnitude of green component, 16 bit significant.*/
WORD blue; /* Magnitude of blue component, 16 bit significant.*/
} RGBColor;
#endif
#ifndef __OCE__
typedef unsigned long DescType;
#endif
typedef LPSTR Ptr;
typedef LPSTR *Handle;
typedef BYTE Boolean;
typedef DWORD OSType;
typedef short OSErr;
typedef unsigned long ResType;
typedef unsigned char Str255[256]; /* first byte length of string. The string is zero terminated. */
typedef const unsigned char *ConstStr255Param;
typedef struct
{
short vRefNum;
long parID;
Str255 name; /* Pascal String, for Windows files. */
} FSSpec;
#endif
typedef struct PlatformData {
long hwnd; /* window to own dialogs. */
} PlatformData;
short ShowAlert (short stringID); /* Developer implements this */
#endif /* Windows */
/******************************************************************************/
// HACK (SRP): The definition of LookUpTable is done this way because PITypes.h
// is included in PSWorld.h prior to LookUpTable being declared.
typedef unsigned8 PILookUpTable [256];
#ifndef __PSWorld__
/* BULLSHIT: Put this in to get BNT* files to compile. */
/* Common datatypes defined in PSWorld */
typedef PILookUpTable LookUpTable;
typedef unsigned16 LookUpTable8x16 [256];
typedef struct
{
LookUpTable R;
LookUpTable G;
LookUpTable B;
} RGBLookUpTable;
/* Structures to hold colors in various spaces. */
#ifndef __GEOMETRY__
typedef Rect CRect;
#endif
#ifndef __UGEOMETRY__
typedef struct
{
int32 top;
int32 left;
int32 bottom;
int32 right;
} VRect;
typedef struct VPoint
{
int32 v;
int32 h;
} VPoint;
#endif /* __UGEOMETRY__ */
#if MacintoshOS
typedef char TVolumeName [32];
#else
typedef char TVolumeName [256];
#endif /* MacintoshOS */
/******************************************************************************/
/*
* Display Ordering Values. Passed to certain bottlenecks to tell them what
* the data looks like, and used (on non-Macs) in the pmReserved field of a
* pixmap to tag that data. For compatibility, the values are designed to
* match up with some Latitude defined values we created for the Unix 3.0.
* - SLB
*/
enum DisplayByteOrder { /* Data is... */
displayOrderIndexed = 0, /* 8-bit, or otherwise unspecified. */
displayOrderURGB = 1, /* 32-bit, high 8 unused, Mac uses this. */
displayOrderUBGR = 2, /* 32-bit, high 8 unused, Sun, SGI like this. */
displayOrderRGBU = 3, /* 32-bit, low 8 unused, for completeness. */
displayOrderBGRU = 4, /* 32-bit, good for little-endian (PC). */
displayOrderRGBPacked = 5, /* 24-bit, unaligned, currently unsupported!! */
displayOrderBGRPacked = 6 /* 24-bit, unaligned, currently unsupported!! */
};
#endif /* __PSWorld__ */
/******************************************************************************/
/* BULLSHIT: Temporary hack */
typedef struct
{
unsigned8 c;
unsigned8 m;
unsigned8 y;
unsigned8 k;
} CMYKtuple;
typedef struct
{
unsigned8 alpha;
unsigned8 r;
unsigned8 g;
unsigned8 b;
} RGBtuple;
typedef struct
{
unsigned8 alpha;
unsigned8 h;
unsigned8 s;
unsigned8 l;
} HSLtuple;
typedef struct
{
unsigned8 alpha;
unsigned8 h;
unsigned8 s;
unsigned8 b;
} HSBtuple;
typedef struct
{
unsigned8 alpha;
unsigned8 L;
unsigned8 a;
unsigned8 b;
} LABtuple;
typedef struct
{
unsigned16 alpha;
unsigned16 r;
unsigned16 g;
unsigned16 b;
} RGB16tuple;
typedef struct
{
unsigned16 c;
unsigned16 m;
unsigned16 y;
unsigned16 k;
} CMYK16tuple;
typedef struct
{
unsigned16 alpha;
unsigned16 L;
unsigned16 a;
unsigned16 b;
} LAB16tuple;
typedef unsigned8 inverseCLUT [32][32][32];
typedef unsigned32 histogram3 [][32][32];
typedef int16 HueSatTable [1536];
typedef PILookUpTable HueSatMaps[4]; /* general form of RGBLookUpTable */
/* hack for BNTLocal.c et al */
#ifndef __UMonitor__
typedef int16 Short3by3 [3] [3];
#endif /* __UMonitor__ */
/******************************************************************************/
#if defined (__BORLANDC__)
#pragma option -a.
#endif
#endif /* __PITypes_h__ */
@@ -0,0 +1,87 @@
/*
* Name:
* PIBufferSuite.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Photoshop Buffer Suite for Plug-ins
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/1/1998 JF First Version.
* Created by Josh Freeman.
*/
#ifndef __PIBufferSuite__
#define __PIBufferSuite__
#ifdef __cplusplus
extern "C" {
#endif
/******************************************************************************/
#define kPSBufferSuite "Photoshop Buffer Suite for Plug-ins"
//-------------------------------------------------------------------------
// Buffer suite typedefs
//-------------------------------------------------------------------------
typedef SPAPI Ptr (*BufferNewProc) (size_t *pRequestedSize, /* IN/OUT: Actual size returned here. */
size_t minimumSize);
/* Attempts to allocate the number of bytes specified by the
/ variable pointed to by the requested size parameter and if
/ this many bytes cannot be allocated, then the largest possible
/ number (greater than minimumSize) will be allocated and the
/ number of bytes actually allocated will be returned in the
/ requestedSize variable. NULL may be passed as the pointer-
/ to-requestedSize parameter, in which case the specified minimum
/ number of bytes will be allocated. If this minimum number
/ of bytes cannot be allocated, then the function will fail
/ and return NULL. */
typedef SPAPI void (*BufferDisposeProc) (Ptr *ppBuffer);
/* Disposes of the buffer and sets the variable that refers to it
/ to NULL. Does nothing if the buffer pointer is already NULL. */
typedef SPAPI size_t (*BufferGetSizeProc) (Ptr pBuffer);
/* Returns the size of the buffer OR zero if the buffer pointer
/ is invalid. */
typedef SPAPI size_t (*BufferGetSpaceProc) (void);
/* Returns the amount of remaining space available - may not be contiguous */
//-------------------------------------------------------------------------
// Buffer suite version 1
//-------------------------------------------------------------------------
#define kPSBufferSuiteVersion1 1
typedef struct
{
BufferNewProc New;
BufferDisposeProc Dispose;
BufferGetSizeProc GetSize;
BufferGetSpaceProc GetSpace;
} PSBufferSuite1;
/******************************************************************************/
#ifdef __cplusplus
}
#endif
#endif // PIBufferSuite
@@ -0,0 +1,185 @@
/*
* Name:
* PIChannelPortsSuite.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Photoshop ChannelPorts Suite for Plug-ins
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/1/1998 JF First Version.
* Created by Josh Freeman.
*/
#ifndef __PIChannelPortsSuite__
#define __PIChannelPortsSuite__
#include "PIGeneral.h"
#ifdef __cplusplus
extern "C" {
#endif
/******************************************************************************/
#define kPSChannelPortsSuite "Photoshop ChannelPorts Suite for Plug-ins"
/******************************************************************************/
#define kPSChannelPortsSuiteVersion2 2 // we're using version 2
/******************************************************************************/
typedef struct PSChannelPortsSuite1
{
// Determine how many levels we have. Zero if the port is invalid.
SPAPI SPErr (*CountLevels)
(
PIChannelPort port,
int32 *count
);
// Get the depth at a given level. Zero if the port or level is
// invalid.
SPAPI SPErr (*GetDepth)
(
PIChannelPort port,
int32 level,
int32 *depth
);
// Get the bounds for the pixel data. Return an empty rectangle if
// the parameters are invalid.
SPAPI SPErr (*GetDataBounds)
(
PIChannelPort port,
int32 level,
VRect *bounds
);
// Get the bounds to which we can write at a given level.
SPAPI SPErr (*GetWriteLimit)
(
PIChannelPort port,
int32 level,
VRect *writeBounds
);
// Get the tiling information at a given level.
SPAPI SPErr (*GetTilingGrid)
(
PIChannelPort port,
int32 level,
VPoint *tileOrigin,
VPoint *tileSize
);
// Find the rectangle used as the downsample source for a particular
// level in the pyramid. level is set to -1 if no support rectangle
// exists.
SPAPI SPErr (*GetSupportRect)
(
PIChannelPort port,
int32 level, const
VRect *bounds,
int32 *supportLevel,
VRect *supportBounds
);
// Get the dependent rectangle at a particular level.
SPAPI SPErr (*GetDependentRect)
(
PIChannelPort port,
int32 sourceLevel,
const VRect *sourceBounds,
int32 dependentLevel,
VRect *dependentBounds
);
// Can we read from this port?
SPAPI SPErr (*CanRead)
(
PIChannelPort port,
Boolean *canRead
);
// Can we write to this port?
SPAPI SPErr (*CanWrite)
(
PIChannelPort port,
Boolean *canWrite
);
// Read pixels from a given level of the port. If the result is
// noErr, then bounds will reflect the pixels actually read. If
// it reflects an error, then the value of bounds is undefined.
SPAPI SPErr (*ReadPixelsFromLevel)
(
PIChannelPort port,
int32 level,
VRect *bounds,
const PixelMemoryDesc *destination
);
// Write to a level in the pyramid.
SPAPI SPErr (*WritePixelsToBaseLevel)
(
PIChannelPort port,
VRect *bounds,
const PixelMemoryDesc *source
);
// Read scaled data from the pyramid. Adjusts readRect to reflect the area
// actually read.
SPAPI SPErr (*ReadScaledPixels)
(
PIChannelPort port,
VRect *readRect,
const PSScaling *scaling,
const PixelMemoryDesc *destination
);
// If we just want to find out what level would be used for a given scaling,
// we can use the following routine. sourceLevel and sourceRect describe
// where in the pyramid we will be reading from. sourceScalingBounds is the
// bounds used for scaling from this level to the final result.
SPAPI SPErr (*FindSourceForScaledRead)
(
PIChannelPort port,
const VRect *readRect,
const PSScaling *scaling,
int32 dstDepth,
int32 *sourceLevel,
VRect *sourceRect,
VRect *sourceScalingBounds
);
// Create a pixel array and the port to go with it.
SPAPI SPErr (*New)
(
PIChannelPort *port,
const VRect *rect,
int32 depth,
Boolean globalScope
);
// Dispose of a port and set the port to NULL.
SPAPI SPErr(* Dispose)
(
PIChannelPort *port
);
} PSChannelPortsSuite1;
#ifdef __cplusplus
}
#endif
#endif // PIChannelPortsSuite
@@ -0,0 +1,137 @@
/*
* Name:
* PIColorSpaceSuite.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Photoshop ColorSpace Suite for Plug-ins.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/1/1998 JF First Version.
* Created by Josh Freeman.
*/
#ifndef __PIColorSpaceSuite__
#define __PIColorSpaceSuite__
#include "PIGeneral.h"
#include "ASZStringSuite.h"
#ifdef __cplusplus
extern "C" {
#endif
/******************************************************************************/
#define kPSColorSpaceSuite "Photoshop ColorSpace Suite for Plug-ins"
//-------------------------------------------------------------------------
// ColorSpace suite typedefs
//-------------------------------------------------------------------------
// These are defined in PIGeneral.h
/*
Constants for colorSpace fields
#define plugIncolorServicesRGBSpace 0
#define plugIncolorServicesHSBSpace 1
#define plugIncolorServicesCMYKSpace 2
#define plugIncolorServicesLabSpace 3
#define plugIncolorServicesGraySpace 4
#define plugIncolorServicesHSLSpace 5
#define plugIncolorServicesXYZSpace 6
*/
typedef struct Color_T *ColorID;
// formatted as 0RGB, CMYK, 0LAB, 0XYZ, 0HSB, 0HSL, 000Gray
typedef unsigned char Color8[4];
typedef unsigned short Color16[4];
typedef struct
{
unsigned short x;
unsigned short y;
unsigned short z;
} CS_XYZColor;
typedef SPAPI SPErr (*ColorSpace_Make) (ColorID *id);
typedef SPAPI SPErr (*ColorSpace_Delete) (ColorID *id);
typedef SPAPI SPErr (*ColorSpace_StuffComponents) (ColorID id, short colorSpace,
unsigned char component0, unsigned char component1,
unsigned char component2, unsigned char component3);
typedef SPAPI SPErr (*ColorSpace_ExtractComponents) (ColorID id, short colorSpace,
unsigned char *component0, unsigned char *component1,
unsigned char *component2, unsigned char *component3, Boolean *gamutFlag);
typedef SPAPI SPErr (*ColorSpace_StuffXYZ) (ColorID id, CS_XYZColor xyz);
typedef SPAPI SPErr (*ColorSpace_ExtractXYZ) (ColorID id, CS_XYZColor *xyz);
typedef SPAPI SPErr (*ColorSpace_GetNativeSpace) (ColorID id, short *colorSpace);
typedef SPAPI SPErr (*ColorSpace_Convert8) (short inputCSpace, short outputCSpace,
Color8 *colorArray, short count);
typedef SPAPI SPErr (*ColorSpace_Convert16) (short inputCSpace, short outputCSpace,
Color16 *colorArray, short count);
typedef SPAPI SPErr (*ColorSpace_IsBookColor) (ColorID id, Boolean *isBookColor);
typedef SPAPI SPErr (*ColorSpace_ExtractColorName) (ColorID id, ASZString *colorName);
typedef SPAPI SPErr (*ColorSpace_PickColor) (ColorID *id, ASZString promptString);
// these use the Photoshop internal 16 bit range of [0..32768]
// data can be single or multiple channels, as long as the count includes all of it
typedef SPAPI SPErr (*ColorSpace_Convert8to16)( unsigned char *input_data,
unsigned short *output_data,
short count );
typedef SPAPI SPErr (*ColorSpace_Convert16to8)( unsigned short *input_data,
unsigned char *output_data,
short count );
//-------------------------------------------------------------------------
// ColorSpace suite version 1
//-------------------------------------------------------------------------
#define kPSColorSpaceSuiteVersion1 1
typedef struct
{
ColorSpace_Make Make;
ColorSpace_Delete Delete;
ColorSpace_StuffComponents StuffComponents;
ColorSpace_ExtractComponents ExtractComponents;
ColorSpace_StuffXYZ StuffXYZ;
ColorSpace_ExtractXYZ ExtractXYZ;
ColorSpace_Convert8 Convert8;
ColorSpace_Convert16 Convert16;
ColorSpace_GetNativeSpace GetNativeSpace;
ColorSpace_IsBookColor IsBookColor;
ColorSpace_ExtractColorName ExtractColorName;
ColorSpace_PickColor PickColor;
ColorSpace_Convert8to16 Convert8to16;
ColorSpace_Convert16to8 Convert16to8;
} PSColorSpaceSuite1;
/******************************************************************************/
#ifdef __cplusplus
}
#endif
#endif // PIColorSpaceSuite
@@ -0,0 +1,70 @@
//-------------------------------------------------------------------------------
//
// File:
// PIErrorSuite.h
//
// Copyright 1997-1998, Adobe Systems Incorporated.
// All Rights Reserved.
//
// Distribution:
// PUBLIC
//
// Description:
// This file contains the public definitions and structures
// used by plug-ins to manage asserts, debugging, and returning
// errors to the host.
//
// Version history:
// Version 1.0.0 1/8/1998 Ace Photoshop 5.0.
// Created by Andrew Coven.
//
//-------------------------------------------------------------------------------
#ifndef __PIErrorSuite_h__ // Already defined?
#define __PIErrorSuite_h__
//-------------------------------------------------------------------------------
// Includes and alignment.
//-------------------------------------------------------------------------------
#include "ASZStringSuite.h"
#ifdef __cplusplus
extern "C" {
#endif
//-------------------------------------------------------------------------------
// Error suite version 1.
//-------------------------------------------------------------------------------
#define kPSErrorSuite "Photoshop Error Suite for Plug-ins"
#define kPSErrorSuiteVersion1 1
//-------------------------------------------------------------------------------
// Error suite typedefs.
//-------------------------------------------------------------------------------
// Hand the host a Pascal string containing the error string to display to the user.
// The host will make a copy:
typedef SPAPI SPErr (*SetErrorFromPStringProc) (/* IN */ const Str255 errorString);
// Hand the host a C string containing the error string to display to the user.
// The host will make a copy:
typedef SPAPI SPErr (*SetErrorFromCStringProc) (/* IN */ const char* errorString);
// Hand the host a ZString id containing the error string to display to the user.
// The host will make a copy:
typedef SPAPI SPErr (*SetErrorFromZStringProc) (/* IN */ const ASZString zString);
typedef struct PSErrorSuite1
{
SetErrorFromPStringProc SetErrorFromPString;
SetErrorFromCStringProc SetErrorFromCString;
SetErrorFromZStringProc SetErrorFromZString;
} PSErrorSuite1;
//-------------------------------------------------------------------------------
#ifdef __cplusplus
}
#endif
#endif // PIErrorSuite.h
@@ -0,0 +1,62 @@
/*
* Name:
* PIHandleSuite.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* Photoshop Handle Suite for Plug-ins.
*
* Distribution:
* PUBLIC
*
* Version history:
* 1.0.0 4/1/1998 JF First Version.
* Created by Josh Freeman.
*/
#ifndef __PIHandleSuite__
#define __PIHandleSuite__
#include "PIGeneral.h"
#ifdef __cplusplus
extern "C" {
#endif
/******************************************************************************/
#define kPSHandleSuite "Photoshop Handle Suite for Plug-ins"
//-------------------------------------------------------------------------------
// Handle suite typedefs
//-------------------------------------------------------------------------------
typedef MACPASCAL void (*SetPIHandleLockProc) (Handle h, Boolean lock, Ptr *address, Boolean *oldLock);
//-------------------------------------------------------------------------------
// Handle suite version 1
//-------------------------------------------------------------------------------
#define kPSHandleSuiteVersion1 1
typedef struct
{
NewPIHandleProc New;
DisposePIHandleProc Dispose;
SetPIHandleLockProc SetLock;
GetPIHandleSizeProc GetSize;
SetPIHandleSizeProc SetSize;
RecoverSpaceProc RecoverSpace;
} PSHandleSuite1;
/******************************************************************************/
#ifdef __cplusplus
}
#endif
#endif // PIHandleSuite
@@ -0,0 +1,122 @@
/*
* Name:
* PIUIHooksSuite.h
*
* Copyright 1986-1998 Adobe Systems Incorporated.
* All Rights Reserved.
*
* Purpose:
* This file contains all the public definitions and
* structures related to user interface elements.
*
* Use the UIHooks suite to get the main application
* window (on Windows), access a handful of Photoshop
* cursors, and similar utilities.
*
* Distribution:
* PUBLIC
*
* Version history:
* Version 1.0.0 1/1/1998 JF Created for Photoshop 5.0.
* Compiled by Josh Freeman.
*/
#ifndef __PIUIHooksSuite__
#define __PIUIHooksSuite__
//-------------------------------------------------------------------------------
// Includes.
//-------------------------------------------------------------------------------
#include "PIGeneral.h"
//-------------------------------------------------------------------------------
// C++ wrapper.
//-------------------------------------------------------------------------------
#ifdef __cplusplus
extern "C" {
#endif
//-------------------------------------------------------------------------------
// UI hooks suite.
//-------------------------------------------------------------------------------
#define kPSUIHooksSuite "Photoshop UIHooks Suite for Plug-ins"
//-------------------------------------------------------------------------------
// MainAppWindow. Returns Windows parent window HWND, NULL on Mac.
//-------------------------------------------------------------------------------
typedef SPAPI long (*MainAppWindowProc) (void);
//-------------------------------------------------------------------------------
// SetCursor. Sets cursor to some popular Photoshop cursors. Mac and Win.
//-------------------------------------------------------------------------------
// Cursor IDs:
#define kPICursorNone NULL
#define kPICursorArrow "Photoshop Cursor Arrow"
#define kPICursorWatch "Photoshop Cursor Watch"
#define kPICursorWatchContinue "Photoshop Cursor Watch Continue"
#define kPICursorMove "Photoshop Cursor Move"
#define kPICursorHand "Photoshop Cursor Hand"
#define kPICursorGrab "Photoshop Cursor Grab"
#define kPICursorZoomIn "Photoshop Cursor Zoom In"
#define kPICursorZoomOut "Photoshop Cursor Zoom Out"
#define kPICursorZoomLimit "Photoshop Cursor Zoom Limit"
#define kPICursorPencil "Photoshop Cursor Pencil"
#define kPICursorEyedropper "Photoshop Cursor Eyedropper"
#define kPICursorEyedropperPlus "Photoshop Cursor Eyedropper Plus"
#define kPICursorEyedropperMinus "Photoshop Cursor Eyedropper Minus"
#define kPICursorBucket "Photoshop Cursor Bucket"
#define kPICursorCrosshair "Photoshop Cursor Crosshair"
#define kPICursorType "Photoshop Cursor Type"
#define kPICursorPathArrow "Photoshop Cursor Path Arrow"
typedef char* PICursor_t;
typedef SPAPI SPErr (*HostSetCursorProc) (const PICursor_t cursorID);
//-------------------------------------------------------------------------------
// TickCount. Gets the tick count as 60 ticks per second. Mac and Win.
//-------------------------------------------------------------------------------
typedef SPAPI unsigned long (*HostTickCountProc) (void);
//-------------------------------------------------------------------------------
// GetPluginName. Returns the name of the plugins specified by pluginRef.
//-------------------------------------------------------------------------------
typedef SPAPI SPErr (*PluginNameProc) (SPPluginRef pluginRef, ASZString *pluginName);
//-------------------------------------------------------------------------------
// UI hooks suite version 1.
//-------------------------------------------------------------------------------
#define kPSUIHooksSuiteVersion1 1
typedef struct
{
ProcessEventProc processEvent;
DisplayPixelsProc displayPixels;
ProgressProc progressBar;
TestAbortProc testAbort;
MainAppWindowProc MainAppWindow;
HostSetCursorProc SetCursor;
HostTickCountProc TickCount;
PluginNameProc GetPluginName;
} PSUIHooksSuite1;
//-------------------------------------------------------------------------------
// Error codes.
//-------------------------------------------------------------------------------
#define kPSCursorError '!cur'
//-------------------------------------------------------------------------------
// C++ wrapper.
//-------------------------------------------------------------------------------
#ifdef __cplusplus
}
#endif
//-------------------------------------------------------------------------------
#endif // PIUIHooksSuite
@@ -0,0 +1,334 @@
//-------------------------------------------------------------------------------
//
// File:
// DialogUtilities.h
//
// Copyright 1993-1997, Adobe Systems Incorporated.
// All Rights Reserved.
//
// Description:
// This library contains the prototypes, macros, and defines
// related to Macintosh dialog manipulation.
//
// Use:
// DialogUtilities is intended to make Macintosh dialog
// manipulation a little simpler by providing a standard
// suite of functions. Use these routines for whatever you
// need, and feel free to tweak them for your own work. They
// expect A4-globals to be set-up already, and for gStuff to
// be a valid pointer to your global structure's parameter
// block.
//
// Version history:
// Version 1.0.0 3/1/1993 Created for Photoshop 2.5
// Written by Thomas Knoll
//
// Version 1.0.1 4/8/1997 Updated for Photoshop 4.0.1
// Comments fattened out. Reorganized for clarity.
//
//-------------------------------------------------------------------------------
#ifndef __DialogUtilities_H__ // Has this not been defined yet?
#define __DialogUtilities_H__ // Only include this once by predefining it
#include <Dialogs.h> // Macintosh standard dialogs
#include <Types.h> // Macintosh standard types
#include <Gestalt.h> // Macintosh gestalt routines
#include <TextUtils.h> // Macintosh text utilities (GetString())
#include <OSUtils.h> // Macintosh OS Utilities (Delay())
#include <Menus.h> // Macintosh Menu Manager routines (DelMenuItem())
#include "PITypes.h" // Photoshop types
#include "PIGeneral.h" // Photoshop general routines
#include "PIUtilities.h" // SDK Utility routines
//-------------------------------------------------------------------------------
// C++ wrapper
//-------------------------------------------------------------------------------
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
//-------------------------------------------------------------------------------
// Prototypes -- Alerts
//-------------------------------------------------------------------------------
// Display a centered alert:
short ShowAlert (const short alertID);
// Display a cross-platform alert with a version number:
short ShowVersionAlert (Handle hDllInstance,
DialogPtr dp,
const short alertID,
const short stringID,
Str255 versText1,
Str255 versText2);
// Display a cross-platform caution alert from a string:
short ShowAlertType (Handle hDllInstance,
DialogPtr dp,
short alertID,
short stringID,
Str255 minText,
Str255 maxText,
const short alertType);
//-------------------------------------------------------------------------------
// Alert constants and macros
//-------------------------------------------------------------------------------
enum
{ // constants defined for alert routine
PIAlertCaution,
PIAlertStop
};
// Macro to pop a cross-platform caution alert:
#define ShowCaution(h, dp, alertID, stringID, min, max) \
ShowAlertType(h, dp, alertID, stringID, min, max, PIAlertCaution)
// Macro to pop a cross-platform stop alert:
#define ShowStop(h, dp, alertID, stringID, min, max) \
ShowAlertType(h, dp, alertID, stringID, min, max, PIAlertStop)
//-------------------------------------------------------------------------------
// Prototypes -- About dialogs
//-------------------------------------------------------------------------------
// pop an about box:
void ShowAbout (const OSType hostSign, const short dialogID);
//-------------------------------------------------------------------------------
// Prototypes -- Dialog initialization and handling
//-------------------------------------------------------------------------------
// center a dialog template 1/3 of the way down on the main screen:
void CenterDialog (DialogTHndl dt);
// setup a moveable modal
void SetUpMoveableModal (DialogTHndl dt, const OSType hostSig);
// Run a moveable modal dialog (use instead of ModalDialog)
// DON'T CALL THIS WITH NON-MOVEABLE MODALS, IT WILL CRASH
void MoveableModalDialog (DialogPtr dp,
ProcessEventProc processEvent,
ModalFilterProcPtr filter,
short *item);
// Except within the filter procedure for such moveable modal dialogs, we need
// to call the following routine to get the window refcon since
// MoveableModalDialog stomps it.
long GetMoveableWRefCon (DialogPtr dp);
// Dialog filter proc to handle and dispatch basic events:
static pascal Boolean DialogFilter (DialogPtr dp,
EventRecord *event,
short *item);
//-------------------------------------------------------------------------------
// Dialog handling -- Constants and macros
//-------------------------------------------------------------------------------
// Used by MoveableModalDialog, PerformStandardDialogItemHandling:
#define RETURN 0x0D
#define ENTER 0x03
#define PERIOD '.'
#define ESCAPE 0x1B
#define TAB '\t'
// Standard MenuBar height, used by CenterDialog:
#define MenuHeight 20
// Used in DialogFilter, MoveableModalDialog, GetMoveableWRefCon:
typedef struct ModalData
{
long oldRefCon; // old reference value
// ModalFilterProcPtr is defined as: typedef pascal Boolean
// (*ModalFilterProcPtr)(DialogPtr theDialog,
// EventRecord *theEvent,
// short *itemHit)
ModalFilterProcPtr filter;
ProcessEventProc processEvent; // Basic event processor in Events.h
} ModalData;
//-------------------------------------------------------------------------------
// Prototypes -- Dialog outline buttons and groups
//-------------------------------------------------------------------------------
// Set an item hook so that it will outline the OK button in a dialog:
void SetOutlineOK (DialogPtr dp, const short item);
// Dialog proc to outline the OK button:
static pascal void OutlineOK (DialogPtr dp, const short item);
// The following routine sets a user item to be a group box. It expects
// the next item to be the title for the group box:
void SetOutlineGroup (DialogPtr dp, const short item);
// Dialog filter proc to outline a group:
static pascal void OutlineGroup (DialogPtr dp, const short item);
//-------------------------------------------------------------------------------
// Prototypes -- Text manipulation
//-------------------------------------------------------------------------------
// The following routine selects an edit text item:
void SelectTextItem (DialogPtr dp, const short item);
// The following routine extracts the text of a text item:
void FetchText (DialogPtr dp, const short item, Str255 text);
// The following routine sets the text of a text item:
void StuffText (DialogPtr dp, const short item, Str255 text);
//-------------------------------------------------------------------------------
// Prototypes -- Number manipulation, range checking and reporting
//-------------------------------------------------------------------------------
// The following routine stuffs a long value into a text field:
void StuffNumber (DialogPtr dp, const short item, const long value);
// The following routine retrieves the value from a text field.
// It will do range checking and pin the number to bounds. It
// returns noErr (0) if it gets a valid value in the field:
short FetchNumber (DialogPtr dp,
const short item,
const long min,
const long max,
long *value);
// This corresponding alert routine will pop a dialog telling the user the
// range was not valid:
void AlertNumber (DialogPtr dp,
const short item,
const long min,
const long max,
long *value,
Handle hDllInstance,
const short alertID,
const short numberErr);
// Stuffs a double value into a text field:
void StuffDouble (DialogPtr dp,
const short item,
const double value,
const short precision);
// The following routine retrieves a double value from a text field.
// It will do range checking and pin the number to bounds. It
// returns noErr (0) if it gets a valid value in the field:
short FetchDouble (DialogPtr dp,
const short item,
const double min,
const double max,
double *value);
// This corresponding alert routine will pop a dialog telling the user the
// range was not valid:
void AlertDouble (DialogPtr dp,
const short item,
const double min,
const double max,
double *value,
Handle hDllInstance,
const short alertID,
const short numberErr);
//-------------------------------------------------------------------------------
// Number manipulation, range checking and reporting -- constants
//-------------------------------------------------------------------------------
enum
{ // return values for Fetch routines (FetchNumber, FetchDouble, etc.)
// noErr = 0
errOutOfRange = 1,
errNotANumber
};
//-------------------------------------------------------------------------------
// Prototypes -- Setting check box, radio button, pop-up menu and group states
//-------------------------------------------------------------------------------
// Perform standard handling for check boxes and radio buttons. For radio
// buttons, we assume that the group for the radio button extends forward
// and backward in the DITL as long as the item type is radio button:
void ProcessChecksAndRadios (DialogPtr dp, const short item);
// Set the state of a check box (or radio button):
void SetCheckBoxState (DialogPtr dp, const short item, const Boolean checkIt);
// Determine the state of a check box (or radio button):
Boolean GetCheckBoxState (DialogPtr dp, const short item);
// Toggle a check box and return the new state:
Boolean ToggleCheckBoxState (DialogPtr dp, const short item);
// Set a radio group (from first to last item) to reflect the selection:
void SetRadioGroupState (DialogPtr dp,
const short first,
const short last,
const short item);
// Get the selected button within a radio group:
short GetRadioGroupState (DialogPtr dp,
const short first,
const short last);
// Set the value for a pop-up menu:
void SetPopUpMenuValue (DialogPtr dp,
const short item,
const short newValue);
// Get the value for a pop-up menu:
short GetPopUpMenuValue (DialogPtr dp,
const short item);
//-------------------------------------------------------------------------------
// Prototypes -- Showing, hiding, enabling and disabling items
//-------------------------------------------------------------------------------
// Utility routine to show or hide an item:
void ShowHideItem (DialogPtr dp, const short inItem, const Boolean inState);
// Utility routine to disable (grey) a control:
void DisableControl (DialogPtr dp, const short inItem);
// Utility routine to enable a control:
void EnableControl (DialogPtr dp, const short inItem);
// Utility routine to enable (TRUE) or disable (FALSE) a control:
void EnableDisableControl (DialogPtr dp, const short inItem, const Boolean inState);
//-------------------------------------------------------------------------------
// Prototypes -- misc
//-------------------------------------------------------------------------------
// Utility routine to invalidate an item:
void InvalItem (DialogPtr dp, short item);
// Little routine to flash a button set off by a keystroke:
void FlashDialogButton (DialogPtr dp, short item);
// Locate the QuickDraw globals:
QDGlobals *GetQDGlobals (void);
// Set cursor to arrow cursor (requires QDGlobals()):
void SetArrowCursor (void);
//-------------------------------------------------------------------------------
// C++ wrapper
//-------------------------------------------------------------------------------
#ifdef __cplusplus
} // End of extern "C" block.
#endif // __cplusplus
//-------------------------------------------------------------------------------
#endif // __DialogUtilities_H__
@@ -0,0 +1,100 @@
//-------------------------------------------------------------------------------
//
// File:
// FileUtilities.h
//
// Copyright 1996-1997, Adobe Systems Incorporated.
// All Rights Reserved.
//
// Description:
// This library contains prototypes and macros
// to simplify the use of extremely common file
// functions for plug-ins.
//
// Use:
// FileUtilities is intended to group common functions
// into higher-level macros and routines to simplify
// plug-in programming.
//
// Version history:
// Version 1.0.0 6/1/1996 Created for Photoshop 4.0
// Written by Andrew Coven
//
// Version 1.0.1 4/8/1997 Updated for Photoshop 4.0.1
// Comments fattened out. Reorganized for clarity.
//
//-------------------------------------------------------------------------------
#ifndef __FileUtilities_H__ // Have we defined this yet?
#define __FileUtilities_H__ // Define once.
#include "PITypes.h" // Standard Photoshop types.
#include "PIUtilities.h" // Utilities header.
#include "PIDefines.h" // Plug-in definitions.
//-------------------------------------------------------------------------------
// Structures -- Platform specific structures.
//-------------------------------------------------------------------------------
#ifdef __PIWin__
typedef Handle PIPlatformFileHandle;
typedef HFILE FileHandle;
typedef Handle AliasHandle;
typedef struct
{
char fileName [256];
} SFReply;
// Mac toolbox routines need to be implemented for Windows:
OSErr FSWrite(int32 refNum,long *count,void *buffPtr);
OSErr FSRead(int32 refNum,long *count,void *buffPtr);
OSErr SetFPos(int32 refNum, short posMode, long posOff);
#define fsFromStart 0
#elif defined(__PIMac__)
#include <StandardFile.h>
#include <LowMem.h>
// On Macintosh systems, FileHandle is a typedef for RefNum
typedef short FileHandle;
typedef AliasHandle PIPlatformFileHandle;
#endif
//-------------------------------------------------------------------------------
// Prototypes
//-------------------------------------------------------------------------------
Boolean PISetSaveDirectory (Handle alias, Str255 s,
Boolean query,
short *rVRefNum);
Boolean TestAndStoreResult (short *res, OSErr result);
#define TSR(x) TestAndStoreResult (&gResult, x)
Boolean TestAndStoreCancel (short *res, Boolean tocancel);
#define TSC(x) TestAndStoreCancel (&gResult, x)
Boolean PICreateFile (Str255 filename,
short vRefNum,
const ResType creator,
const ResType type,
FileHandle *fRefNum,
short *result);
Boolean PICloseFile (Str255 filename,
short vRefNum,
FileHandle fRefNum,
Boolean sameNames,
Boolean *dirty,
AliasHandle *alias,
short *result);
void PICloseAndOpenWD(const short vRefNum, const long dirID, short *rVRefNum);
//-------------------------------------------------------------------------------
#endif // __FileUtilites_H__
@@ -0,0 +1,152 @@
//-------------------------------------------------------------------------------
//
// File:
// PICA2PSErrorMap.h
//
// Copyright 1997-1998, Adobe Systems Incorporated.
// All Rights Reserved.
//
// Distribution:
// PUBLIC
//
// Description:
// This file contains all the API error codes for Photoshop and
// PICA (Sweet Pea). It maps all the PICA error codes to their
// Photoshop equivalents.
//
// Version history:
// Version 1.0.0 10/9/1997 Ace Initial compilation.
// Updated for new headers for Photoshop 5.0. Broke out
// ResDefines into separate file for PIGeneral.h and PIGeneral.r.
//
//-------------------------------------------------------------------------------
#ifndef __PICA2PSErrorMap_h__ // Already defined?
#define __PICA2PSErrorMap_h__
//-------------------------------------------------------------------------------
// PICA headers.
//-------------------------------------------------------------------------------
#include "SPAccess.h"
#include "SPAdapts.h"
#include "SPBckDbg.h"
#include "SPBlocks.h"
#include "SPFiles.h"
#include "SPHost.h"
#include "SPInterf.h"
#include "SPPlugs.h"
#include "SPProps.h"
#include "SPSuites.h"
#include "ADMDialogGroup.h"
#include "ASHelp.h"
#include "ASTypes.h"
//-------------------------------------------------------------------------------
// Photoshop headers.
//-------------------------------------------------------------------------------
#include "PIAcquire.h"
#include "PIParser.h"
#include "PISelection.h"
#include "PIPicker.h"
#include "PIParser.h"
#include "PIGeneral.h"
#include "PIFormat.h"
#include "PIExtension.h"
#include "PIExport.h"
#include "PIActions.h"
#include "PSErrorDefines.h"
#include "PSErrors.h"
#define noMap -1
typedef struct SPErrorMapEntry
{
OSType suitePeaErrorCode;
OSErr photoshopErrorCode;
};
static SPErrorMapEntry spErrorMap [] =
{
kSPCantAcquirePluginError /* SPAccess.h: '!Acq' */,
noMap /* -12345 */,
kSPCantReleasePluginError /* SPAccess.h: '!Rel' */,
noMap /* -12345 */,
kSPPluginAlreadyReleasedError /* SPAccess.h: 'AlRl' */,
noMap /* -12345 */,
kSPAdapterAlreadyExistsError /* SPAdapts.h: 'AdEx' */,
noMap /* -12345 */,
kSPBadAdapterListIteratorError /* SPAdapts.h: 'BdAL' */,
noMap /* -12345 */,
kSPCantChangeBlockDebugNowError /* SPBlckDbg.h: '!Now' */,
noMap /* -12345 */,
kSPBlockDebugNotEnabledError /* SPBlckDbg.h: '!Nbl' */,
noMap /* -12345 */,
kSPOutOfMemoryError /* SPBlocks.h: 0xFFFFFF6cL (-108) */,
noMap /* -12345 */,
kSPBlockSizeOutOfRangeError /* SPBlocks.h: 'BkRg' */,
noMap /* -12345 */,
kSPTroubleAddingFilesError /* SPFiles.h: 'TAdd' */,
noMap /* -12345 */,
kSPBadFileListIteratorError /* SPFiles.h: 'BFIt' */,
noMap /* -12345 */,
kSPTroubleInitializingError /* SPHost.h: 'TIni' */,
noMap /* -12345 */,
kHostCanceledStartupPluginsError /* SPHost.h: 'H!St' */,
noMap /* -12345 */,
kSPNotASweetPeaPluginError /* SPInterf.h: 'NSPP' */,
noMap /* -12345 */,
kSPAlreadyInSPCallerError /* SPInterf.h: 'AISC' */,
noMap /* -12345 */,
kSPUnknownAdapterError /* SPPlugs.h: '?Adp' */,
noMap /* -12345 */,
kSPBadPluginListIteratorError /* SPPlugs.h: 'PiLI' */,
noMap /* -12345 */,
kSPBadPluginHost /* SPPlugs.h: 'PiH0' */,
errPlugInHostInsufficient /* PIGeneral.h: -30900 */,
kSPCantAddHostPluginError /* SPPlugs.h: 'AdHo' */,
noMap /* -12345 */,
kSPPluginNotFound /* SPPlugs.h: 'P!Fd' */,
errPlugInHostInsufficient /* PIGeneral.h: -30900 */,
kSPCorruptPiPLError /* SPPlugs.h: 'CPPL' */,
noMap /* -12345 */,
kSPBadPropertyListIteratorError /* SPPlugs.h: 'BPrI' */,
noMap /* -12345 */,
kSPSuiteNotFoundError /* SPSuites.h: 'S!Fd' */,
errPlugInHostInsufficient /* PIGeneral.h: -30900 */,
kSPSuiteAlreadyExistsError /* SPSuites.h: 'SExi' */,
noMap /* -12345 */,
kSPSuiteAlreadyReleasedError /* SPSuites.h: 'SRel' */,
noMap /* -12345 */,
kSPBadSuiteListIteratorError /* SPSuites.h: 'SLIt' */,
noMap /* -12345 */,
kSPBadSuiteInternalVersionError /* SPSuites.h: 'SIVs' */,
noMap /* -12345 */,
kDockHostConflictError /* ADMDialogGroup.h: 'DOCK' */,
noMap /* -12345 */,
kTabGroupNotFoundError /* ADMDialogGroup.h: 'T!FD' */,
noMap /* -12345 */,
kAlreadyDockedError /* ADMDialogGroup.h: 'DCKD' */,
noMap /* -12345 */,
kHelpError /* ASHelp.h: '!Hlp' */,
noMap /* -12345 */,
kNoErr /* ASTypes.h: 0 */,
noErr /* PITypes.h: 0 */,
kOutOfMemoryErr /* ASTypes.h: '!MEM' */,
memFullErr /* PITypes.h: -108 */,
kBadParameterErr /* ASTypes.h: 'PARM' */,
paramErr /* PITypes.h: -50 */,
kNotImplementedErr /* ASTypes.h: '!IMP' */,
errPlugInHostInsufficient /* PIGeneral.h: -30900 */,
kCantHappenErr /* ASTypes.h: 'CANT' */,
errPlugInPropertyUndefined /* PIGeneral.h: -30901 */,
kUserCancel /* PIUBasic.h: 'STOP' */,
userCanceledErr /* PITypes.h: -128 */,
};
#undef noMap
//-------------------------------------------------------------------------------
#endif // __PICA2PSErrorMap.h__
@@ -0,0 +1,30 @@
//-------------------------------------------------------------------------------
//
// File:
// PIDebug.h
//
// Copyright 1996-1997, Adobe Systems Incorporated.
// All Rights Reserved.
//
// Description:
// This file contains the prototypes and utilities
// for plug-in debugging.
//
// Use:
// This particular file will define the debug flags to
// build a debug version of the plug-in.
//
// Version history:
// Version 1.0.0 5/29/1997 Created for Photoshop 4.0.1
// Written by Andrew Coven
//
//-------------------------------------------------------------------------------
#ifndef __PIDebug_H__ // Has this not been defined yet?
#define __PIDebug_H__ // Only include this once by predefining it
#ifndef _DEBUG
#define _DEBUG 1
#endif
#endif // __PIDebug_H__
@@ -0,0 +1,86 @@
//-------------------------------------------------------------------------------
//
// File:
// PIDefines.h
//
// Copyright 1996-1997, Adobe Systems Incorporated.
// All Rights Reserved.
//
// Description:
// This file contains the prototypes and definitions
// generic for plug-ins.
//
// Use:
// This particular file will define the flags for
// generic values needed by every plug-in.
//
// Version history:
// Version 1.0.0 5/29/1997 Created for Photoshop 4.0.1
// Written by Andrew Coven
//
//-------------------------------------------------------------------------------
#ifndef __PIDefines_H__ // Has this not been defined yet?
#define __PIDefines_H__ // Only include this once by predefining it
// Create a definition if we're on a Windows machine:
#ifndef __PIWin__
#if MSWindows
#define __PIWin__ 1
#elif (defined(MSDOS) || defined(WIN32) || defined(_WIN32) || defined(__INTEL__))
#define __PIWin__ 1
#endif
#endif
// Create a definition if we're under Metrowerks Codewarrior:
#ifndef __PIMWCW__
#ifdef __MWERKS__
#define __PIMWCW__ 1
#endif
#endif
// Create a definition if we're on a Macintosh:
#ifndef __PIMac__
#if (defined(macintosh) || defined(__MC68K__) || defined(__POWERPC__) || defined(__powerc))
#define __PIMac__ 1
#endif
#endif
// Create a definition if we're on a MC680x0 Macintosh:
#ifndef __PIMac68K__
#if (defined(__PIMac__) && defined(__MC68K__))
#define __PIMac68K__ 1
#endif
#endif
// Create a definition if we're on a PowerPC Macintosh:
#ifndef __PIMacPPC__
#if (defined(__PIMac__) && (defined(__powerc) || defined(__POWERPC__)))
#define __PIMacPPC__ 1
#endif
#endif
// Create a definition if we're on a Mac under Metrowerks Codewarrior:
#ifndef __PIMWCWMac__
#if (defined(__PIMac__) && defined(__PIMWCW__))
#define __PIMWCWMac__ 1
#endif
#endif
// Create a definition if we're on a 68K Macintosh and running Metrowerks:
#ifndef __PIMWCWMac68K__
#if (defined(__PIMac68K__) && defined(__PIMWCW__))
#define __PIMWCWMac68K__ 1
#endif
#endif
// Create a definition if we're on a PPC Macintosh and running Metrowerks:
#ifndef __PIMWCWMacPPC__
#if (defined(__PIMacPPC__) && defined(__PIMWCW__))
#define __PIMWCWMacPPC__ 1
#endif
#endif
//-------------------------------------------------------------------------------
#endif // __PIDefines_H__
@@ -0,0 +1,71 @@
//-------------------------------------------------------------------------------
//
// File:
// PIUActionControlUtils.h
//
// Copyright 1997-1998, Adobe Systems Incorporated.
// All Rights Reserved.
//
// Description:
// This library contains the headers for the macros, and
// routines to simplify the use of suites and also some
// helpful common plug-in functions.
//
// Use:
// PIUActionControlUtils is intended to group common functions
// into higher-level macros and routines to simplify
// plug-in programming.
//
// Version history:
// Version 1.0.0 12/14/1997 Created for Photoshop 5.0
// Written by Andrew Coven.
//
//-------------------------------------------------------------------------------
#ifndef __PIUActionControlUtils_h__
#define __PIUActionControlUtils_h__
#include "PIActions.h"
//-------------------------------------------------------------------------------
// Macintosh Notifier Utilities.
//-------------------------------------------------------------------------------
class PIUActionControlUtils_t
{
public:
// Constructor:
PIUActionControlUtils_t()
{
// Intentionally left blank.
}
// Destructor:
~PIUActionControlUtils_t()
{
// Intentionally left blank.
}
// Takes a string ID and resolves it to its 4-char long ID or
// runtime ID:
DescriptorTypeID ResolveStringID (const char* const idString);
// Takes a 4-character ID and resolves it to its string or
// 4-char string. It is the callers responsibility to
// dispose the string:
char* ResolveTypeID (DescriptorTypeID id);
// Takes a string and parses it for 'key_' or "UUID_String" and
// returns only the characters of interest. It is the callers
// responsibility to dispose the string:
char* ParseStringID (const char* const source);
private:
// None.
protected:
// None.
};
//-------------------------------------------------------------------------------
#endif // __PIUActionControlUtils_h__
@@ -0,0 +1,131 @@
//-------------------------------------------------------------------------------
//
// File:
// PIUActionParams.h
//
// Copyright 1997-1998, Adobe Systems Incorporated.
// All Rights Reserved.
//
// Description:
// This library contains the headers for the macros, and
// routines to simplify the use of suites and also some
// helpful common plug-in functions.
//
// Use:
// PIUBasic is intended to group common functions
// into higher-level macros and routines to simplify
// plug-in programming.
//
// Most expect A4-globals to be set-up already, for
// gStuff to be a valid pointer to your global structure's
// parameter block, and, on Windows, for hDllInstance to
// be a global handle reference to your plug-in DLL.
//
// Version history:
// Version 1.0.0 7/31/1997 Created for Photoshop 5.0
// Written by Andrew Coven.
//
//-------------------------------------------------------------------------------
#ifndef __PIUActionParams_h__
#define __PIUActionParams_h__
#include "PIActions.h"
//-------------------------------------------------------------------------------
// Definitions.
//-------------------------------------------------------------------------------
// This is defined in <AEObjects.h> but was accidentally not included in
// PIActions.h:
#ifndef typeObjectSpecifier
#define typeObjectSpecifier 0x6f626a20 // 'obj '
#endif
//-------------------------------------------------------------------------------
// Action parameters references.
//-------------------------------------------------------------------------------
class PIUActionParams_t
{
public:
// Constructor:
PIUActionParams_t
(
PIActionParameters * actionsParams
);
PIUActionParams_t();
// Copy constructor:
PIUActionParams_t
(
const PIUActionParams_t & source
);
// Assignment operator:
PIUActionParams_t & operator=
(
const PIUActionParams_t & source
);
// Destructor:
~PIUActionParams_t ();
// Check for validity of resource before using:
bool ParamsValid();
// Change the parameter block:
void SetParamBlock
(
PIActionParameters * actionParams
);
// Clear out the parameter descriptor:
SPErr ClearParamDescriptor();
// Fill out param block with return descriptor:
void SetReturnInfo
(
PIActionDescriptor descriptor,
PIDialogRecordOptions recordInfo
);
void SetReturnInfo
(
PIActionDescriptor descriptor
); // Sets recordInfo = dialogOptional.
// Return the playback descriptor and info:
SPErr GetPlayInfo
(
PIActionDescriptor * descriptor,
PIDialogPlayOptions * playInfo
);
// Simpler methods for making and freeing a descriptor:
PIActionDescriptor Make(void);
void Free(PIActionDescriptor* descriptor);
// Read a string from a descriptor and return it as a block
// that you must free when you're done:
char* GetString
(
PIActionDescriptor descriptor,
DescriptorKeyID key
);
private:
// None.
protected:
PIActionParameters * actionParams_;
};
//-------------------------------------------------------------------------------
// Errors.
//-------------------------------------------------------------------------------
#define kPSErrorUnknownStringID '!sid'
//-------------------------------------------------------------------------------
#endif // __PIUActionParams_h__
@@ -0,0 +1,141 @@
//-------------------------------------------------------------------------------
//
// File:
// PIUBasic.h
//
// Copyright 1997-1998, Adobe Systems Incorporated.
// All Rights Reserved.
//
// Description:
// This library contains the headers for the macros, and
// routines to simplify the use of suites and also some
// helpful common plug-in functions.
//
// Use:
// PIUBasic is intended to group common functions
// into higher-level macros and routines to simplify
// plug-in programming.
//
// Version history:
// Version 1.0.0 7/31/1997 Created for Photoshop 5.0
// Written by Andrew Coven.
//
//-------------------------------------------------------------------------------
#ifndef __PIUBasic_H__ // Defined yet?
#define __PIUBasic_H__ // Only define once.
//-------------------------------------------------------------------------------
// Standard includes for both platforms.
//-------------------------------------------------------------------------------
#ifndef Rez
#include "PIUNew.h" // Use this before any other file compiles.
#include "PIUSuites.h" // All suites.
#include "PIProperties.h" // Photoshop properties.
#include "PIAbout.h" // AboutRecord structure.
#include "PIUDispatch.h" // Entrypoint dispatch.
#include "PIUFile.h" // File utilities.
#include "PIUCore.h" // Core SDK utilities.
//-------------------------------------------------------------------------------
// Includes specific to each platform.
//-------------------------------------------------------------------------------
#ifdef __PIWin__
#include <stdlib.h>
#include <winver.h>
// May not need this, but define it for now and we'll check later:
Fixed FixRatio(short numer, short denom);
#else // Macintosh or other:
#include <LowMem.h>
#define PISetRect SetRect
// Macintosh requires an entrypoint named "main":
#define ENTRYPOINT main
#endif // Mac/Win
#endif // Rez
//-------------------------------------------------------------------------------
// Resource string IDs.
//-------------------------------------------------------------------------------
// Some of these are generic. Override if you need to in your .h files:
#ifndef StringResource
#define StringResource 'STR '
#endif
#ifndef ResourceID
#define ResourceID 16000
#endif
#ifndef AboutID
#define AboutID ResourceID
#endif
#ifndef uiID
#define uiID ResourceID+1
#endif
#ifndef ADMAboutID
#define ADMAboutID uiID+1
#endif
#ifndef AlertID
#define AlertID 16990
#endif
#ifndef kBadNumberID
#define kBadNumberID AlertID
#endif
#ifndef kBadDoubleID
#define kBadDoubleID kBadNumberID+1
#endif
#ifndef kNeedVers
#define kNeedVers kBadDoubleID+1
#endif
#ifndef kWrongHost
#define kWrongHost kNeedVers+1
#endif
#ifndef kSuiteMissing
#define kSuiteMissing kWrongHost+1
#endif
// This should be defined in ASType, but for some odd
// reason is missing. Use it just like userCanceledErr:
#ifndef kUserCancel
#define kUserCancel 0x53544f50L // 'STOP'
#endif
//-------------------------------------------------------------------------------
// C++ wrapper
//-------------------------------------------------------------------------------
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
//-------------------------------------------------------------------------------
// C++ wrapper
//-------------------------------------------------------------------------------
#ifdef __cplusplus
} // End of extern "C" block.
#endif // __cplusplus
//-------------------------------------------------------------------------------
#endif // __PIUBasic_H__
@@ -0,0 +1,58 @@
//-------------------------------------------------------------------------------
//
// File:
// PIUConstants.h
//
// Copyright 1997-1998, Adobe Systems Incorporated.
// All Rights Reserved.
//
// Description:
// This library contains the constants and definitions for
// routines that simplify the use of suites and also some
// helpful common plug-in functions.
//
// Use:
// PIUBasic is intended to group common functions
// into higher-level macros and routines to simplify
// plug-in programming.
//
// Version history:
// Version 1.0.0 1/11/1998 Created for Photoshop 5.0
// Written by Andrew Coven.
//
//-------------------------------------------------------------------------------
#ifndef __PIUConstants_h__ // Defined yet?
#define __PIUConstants_h__ // Only define once.
#include <stddef.h>
//-------------------------------------------------------------------------------
// C++ wrapper
//-------------------------------------------------------------------------------
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
//-------------------------------------------------------------------------------
// Definitions.
//-------------------------------------------------------------------------------
const size_t kMaxStr255Len = 255; // Maximum standard string length. (Pascal, etc.)
//-------------------------------------------------------------------------------
// Errors.
//-------------------------------------------------------------------------------
static const SPErr errPIUMissingFunctionParameter = '!fxn';
//-------------------------------------------------------------------------------
// C++ wrapper
//-------------------------------------------------------------------------------
#ifdef __cplusplus
} // End of extern "C" block.
#endif // __cplusplus
//-------------------------------------------------------------------------------
#endif // __PIUConstants_h__
File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More