mirror of
https://github.com/ctm/executor.git
synced 2026-03-12 02:41:37 +00:00
All the Executor source as-is from the subversion tree it was last worked on.
This commit is contained in:
32
src/include/ADB.h
Normal file
32
src/include/ADB.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#if !defined (_ADB_H_)
|
||||
#define _ADB_H_
|
||||
|
||||
/*
|
||||
* Copyright 1995 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: ADB.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
SignedByte devType PACKED;
|
||||
SignedByte origADBAddr PACKED;
|
||||
Ptr dbServiceRtPtr PACKED_P;
|
||||
Ptr dbDataAreaAddr PACKED_P;
|
||||
} ADBDataBlock;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Ptr siServiceRtPtr PACKED_P;
|
||||
Ptr siDataAreaAddr PACKED_P;
|
||||
} ADBSetInfoBlock;
|
||||
|
||||
extern void ADBReInit (void);
|
||||
extern OSErr ADBOp (Ptr data, ProcPtr procp, Ptr buffer, INTEGER command);
|
||||
extern INTEGER CountADBs (void);
|
||||
extern OSErr GetIndADB (ADBDataBlock *adbp, INTEGER index);
|
||||
extern OSErr GetADBInfo (ADBDataBlock *adbp, INTEGER address);
|
||||
extern OSErr SetADBInfo (ADBSetInfoBlock *adbp, INTEGER address);
|
||||
|
||||
#endif /* !_ADB_H_ */
|
||||
66
src/include/AliasMgr.h
Normal file
66
src/include/AliasMgr.h
Normal file
@@ -0,0 +1,66 @@
|
||||
|
||||
#if !defined (_ALIASMGR_H_)
|
||||
#define _ALIASMGR_H_
|
||||
|
||||
#include "FileMgr.h"
|
||||
|
||||
typedef ProcPtr AliasFilterProcPtr;
|
||||
typedef Handle AliasHandle;
|
||||
typedef int16 AliasTypeInfo;
|
||||
|
||||
enum
|
||||
{
|
||||
kSystemFolderType = T('m', 'a', 'c', 's'),
|
||||
kDesktopFolderType = T('d', 'e', 's', 'k'),
|
||||
kTrashFolderType = T('t', 'r', 's', 'h'),
|
||||
kWhereToEmptyTrashFolderType = T('e', 'm', 'p', 't'),
|
||||
kPrintMonitorDocsFolderType = T('p', 'r', 'n', 't'),
|
||||
kStartupFolderType = T('s', 't', 'r', 't'),
|
||||
kAppleMenuFolderType = T('a', 'm', 'n', 'u'),
|
||||
kControlPanelFolderType = T('c', 't', 'r', 'l'),
|
||||
kExtensionFolderType = T('e', 'x', 't', 'n'),
|
||||
kPreferencesFolderType = T('p', 'r', 'e', 'f'),
|
||||
kTemporaryFolderType = T('t', 'e', 'm', 'p'),
|
||||
kFontFolderType = T('f', 'o', 'n', 't'),
|
||||
};
|
||||
|
||||
extern pascal trap OSErr C_FindFolder (int16 vRefNum, OSType folderType,
|
||||
Boolean createFolder,
|
||||
int16 *foundVRefNum,
|
||||
int32 *foundDirID);
|
||||
|
||||
extern pascal trap OSErr C_NewAlias (FSSpecPtr fromFile, FSSpecPtr target,
|
||||
AliasHandle *alias);
|
||||
|
||||
extern pascal trap OSErr C_NewAliasMinimal (FSSpecPtr target,
|
||||
AliasHandle *alias);
|
||||
|
||||
extern pascal trap OSErr C_NewAliasMinimalFromFullPath
|
||||
(int16 fullpathLength, Ptr fullpath,
|
||||
Str32 zoneName, Str31 serverName, AliasHandle *alias);
|
||||
|
||||
extern pascal trap OSErr C_UpdateAlias (FSSpecPtr fromFile, FSSpecPtr target,
|
||||
AliasHandle alias,
|
||||
Boolean *wasChanged);
|
||||
|
||||
extern pascal trap OSErr C_ResolveAlias (FSSpecPtr fromFile,
|
||||
AliasHandle alias,
|
||||
FSSpecPtr target,
|
||||
Boolean *wasAliased);
|
||||
|
||||
extern pascal trap OSErr C_ResolveAliasFile (FSSpecPtr theSpec,
|
||||
Boolean resolveAliasChains,
|
||||
Boolean *targetIsFolder,
|
||||
Boolean *wasAliased);
|
||||
|
||||
extern pascal trap OSErr C_MatchAlias (FSSpecPtr fromFile, int32 rulesMask,
|
||||
AliasHandle alias, int16 *aliasCount,
|
||||
FSSpecArrayPtr aliasList,
|
||||
Boolean *needsUpdate,
|
||||
AliasFilterProcPtr aliasFilter,
|
||||
Ptr yourDataPtr);
|
||||
extern pascal trap OSErr C_GetAliasInfo (AliasHandle alias,
|
||||
AliasTypeInfo index,
|
||||
Str63 theString);
|
||||
|
||||
#endif
|
||||
489
src/include/AppleEvents.h
Normal file
489
src/include/AppleEvents.h
Normal file
@@ -0,0 +1,489 @@
|
||||
#if !defined(_AppleEvents_H_)
|
||||
#define _AppleEvents_H_
|
||||
|
||||
/*
|
||||
* Copyright 1996 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: AppleEvents.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#include "EventMgr.h"
|
||||
#include "NotifyMgr.h"
|
||||
|
||||
typedef int32 AEEventClass;
|
||||
typedef int32 AEEventID;
|
||||
typedef int32 AEKeyword;
|
||||
typedef ResType DescType;
|
||||
|
||||
typedef struct AEDesc
|
||||
{
|
||||
DescType descriptorType;
|
||||
Handle dataHandle;
|
||||
} AEDesc;
|
||||
|
||||
/* ### hack, delete */
|
||||
typedef AEDesc descriptor_t;
|
||||
|
||||
#define DESC_TYPE_X(desc) ((desc)->descriptorType)
|
||||
#define DESC_DATA_X(desc) ((desc)->dataHandle)
|
||||
|
||||
#define DESC_TYPE(desc) (CL (DESC_TYPE_X (desc)))
|
||||
#define DESC_DATA(desc) (MR (DESC_DATA_X (desc)))
|
||||
|
||||
typedef struct AEKeyDesc
|
||||
{
|
||||
AEKeyword descKey;
|
||||
AEDesc descContent;
|
||||
} AEKeyDesc;
|
||||
|
||||
typedef AEKeyDesc key_desc_t;
|
||||
|
||||
#define KEY_DESC_KEYWORD_X(keydesc) ((keydesc)->descKey)
|
||||
|
||||
#define KEY_DESC_KEYWORD(keydesc) (CL (KEY_DESC_KEYWORD_X (keydesc)))
|
||||
#define KEY_DESC_CONTENT(keydesc) ((keydesc)->descContent)
|
||||
|
||||
typedef AEDesc AEAddressDesc;
|
||||
typedef AEDesc AEDescList;
|
||||
typedef AEDescList AERecord;
|
||||
typedef AERecord AppleEvent;
|
||||
|
||||
typedef int32 AESendMode;
|
||||
|
||||
#define _kAEReplyMask (0x3)
|
||||
|
||||
#define kAENoReply (0x1)
|
||||
#define kAEQueueReply (0x2)
|
||||
#define kAEWaitReply (0x3)
|
||||
|
||||
#define _kAEInteractMask (0x30)
|
||||
|
||||
#define kAENeverInteract (0x10)
|
||||
#define kAECanInteract (0x20)
|
||||
#define kAEAlwaysInteract (0x30)
|
||||
|
||||
#define kAECanSwitchLayer (0x40)
|
||||
#define kAEDontReconnect (0x80)
|
||||
/* #define kAEWantReceipt ??? */
|
||||
|
||||
typedef int16 AESendPriority;
|
||||
|
||||
typedef uint8 AEEventSource;
|
||||
typedef uint8 AEInteractionAllowed;
|
||||
typedef uint8 AEArrayType;
|
||||
|
||||
enum
|
||||
{
|
||||
kAEInteractWithSelf = 0,
|
||||
kAEInteractWithLocal = 1,
|
||||
kAEInteractWithAll = 2,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
kAEUnknownSource = 0,
|
||||
kAEDirectCall = 1,
|
||||
kAESameProcess = 2,
|
||||
kAELocalProcess = 3,
|
||||
kAERemoteProcess = 4,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
kAEDataArray, kAEPackedArray, kAEHandleArray, kAEDescArray,
|
||||
kAEKeyDescArray
|
||||
};
|
||||
|
||||
typedef union AEArrayData
|
||||
{
|
||||
int16 AEDataArray[1];
|
||||
int8 AEPackedArray[1];
|
||||
Handle AEHandleArray[1];
|
||||
AEDesc AEDescArray[1];
|
||||
AEKeyDesc AEKeyDescArray[1];
|
||||
} AEArrayData;
|
||||
|
||||
typedef AEArrayData *AEArrayDataPointer;
|
||||
|
||||
typedef ProcPtr EventHandlerProcPtr;
|
||||
typedef ProcPtr IdleProcPtr;
|
||||
typedef ProcPtr EventFilterProcPtr;
|
||||
|
||||
/* #### internal */
|
||||
|
||||
typedef struct AE_hdlr
|
||||
{
|
||||
ProcPtr fn PACKED;
|
||||
int32 refcon PACKED;
|
||||
} AE_hdlr_t;
|
||||
|
||||
typedef struct AE_hdlr_selector
|
||||
{
|
||||
int32 sel0 PACKED;
|
||||
int32 sel1 PACKED;
|
||||
} AE_hdlr_selector_t;
|
||||
|
||||
typedef struct AE_hdlr_table_elt
|
||||
{
|
||||
int32 pad_1 PACKED;
|
||||
|
||||
AE_hdlr_selector_t selector PACKED;
|
||||
AE_hdlr_t hdlr PACKED;
|
||||
|
||||
int32 pad_2 PACKED;
|
||||
} AE_hdlr_table_elt_t;
|
||||
|
||||
#define AE_TABLE_ELTS(table) (HxX (table, elts))
|
||||
|
||||
#define AE_TABLE_N_ELTS_X(table) (HxX (table, n_elts))
|
||||
#define AE_TABLE_N_ALLOCATED_BYTES_X(table) \
|
||||
(HxX (table, n_allocated_bytes))
|
||||
|
||||
#define AE_TABLE_N_ELTS(table) \
|
||||
(CL (AE_TABLE_N_ELTS_X (table)))
|
||||
#define AE_TABLE_N_ALLOCATED_BYTES(table) \
|
||||
(CL (AE_TABLE_N_ALLOCATED_BYTES_X (table)))
|
||||
|
||||
typedef struct AE_hdlr_table
|
||||
{
|
||||
int32 pad_1 PACKED;
|
||||
|
||||
int32 n_allocated_bytes PACKED;
|
||||
int32 n_elts PACKED;
|
||||
|
||||
int32 pad_2[10] PACKED;
|
||||
|
||||
AE_hdlr_table_elt_t elts[0] PACKED;
|
||||
} AE_hdlr_table_t;
|
||||
|
||||
typedef AE_hdlr_table_t *AE_hdlr_table_ptr;
|
||||
typedef struct { AE_hdlr_table_ptr p PACKED_P; } HIDDEN_AE_hdlr_table_ptr;
|
||||
typedef HIDDEN_AE_hdlr_table_ptr *AE_hdlr_table_h;
|
||||
|
||||
typedef struct AE_zone_tables
|
||||
{
|
||||
AE_hdlr_table_h event_hdlr_table PACKED_P;
|
||||
AE_hdlr_table_h coercion_hdlr_table PACKED_P;
|
||||
AE_hdlr_table_h special_hdlr_table PACKED_P;
|
||||
|
||||
char pad_1[28] PACKED;
|
||||
|
||||
char unknown_appl_value[4] PACKED;
|
||||
|
||||
char pad_2[8] PACKED;
|
||||
|
||||
/* points to a 32byte handle of unknown contents (at least,
|
||||
sometimes) */
|
||||
Handle unknown_sys_handle PACKED_P;
|
||||
} AE_zone_tables_t;
|
||||
|
||||
typedef AE_zone_tables_t *AE_zone_tables_ptr;
|
||||
typedef struct { AE_zone_tables_ptr p PACKED_P; } HIDDEN_AE_zone_tables_ptr;
|
||||
typedef HIDDEN_AE_zone_tables_ptr *AE_zone_tables_h;
|
||||
|
||||
typedef struct AE_info
|
||||
{
|
||||
char pad_1[340] PACKED;
|
||||
|
||||
/* offset of `appl_zone_tables' is 340; handle to a `struct tables' */
|
||||
AE_zone_tables_h appl_zone_tables PACKED_P;
|
||||
|
||||
char pad_2[36] PACKED;
|
||||
|
||||
/* offset of `system_zone_tables' is 380; handle to a `struct tables' */
|
||||
AE_zone_tables_h system_zone_tables PACKED_P;
|
||||
|
||||
char pad_3[212] PACKED;
|
||||
} AE_info_t;
|
||||
|
||||
typedef AE_info_t *AE_info_ptr;
|
||||
typedef struct { AE_info_ptr p PACKED_P; } HIDDEN_AE_info_ptr;
|
||||
|
||||
extern pascal trap OSErr C__AE_hdlr_table_alloc (int32, int32, int32, int8,
|
||||
AE_hdlr_table_h *);
|
||||
extern pascal trap OSErr C__AE_hdlr_delete (AE_hdlr_table_h, int32,
|
||||
AE_hdlr_selector_t *);
|
||||
extern pascal trap OSErr C__AE_hdlr_lookup (AE_hdlr_table_h, int32,
|
||||
AE_hdlr_selector_t *,
|
||||
AE_hdlr_t *);
|
||||
extern pascal trap OSErr C__AE_hdlr_install (AE_hdlr_table_h, int32,
|
||||
AE_hdlr_selector_t *,
|
||||
AE_hdlr_t *);
|
||||
|
||||
/* private */
|
||||
|
||||
extern boolean_t send_application_open_aevt_p;
|
||||
extern boolean_t application_accepts_open_app_aevt_p;
|
||||
|
||||
/* error codes */
|
||||
|
||||
#define AE_RETURN_ERROR(error) \
|
||||
({ \
|
||||
OSErr _error_ = (error); \
|
||||
\
|
||||
if (_error_ != noErr) \
|
||||
warning_unexpected ("error `%d'", _error_); \
|
||||
return _error_; \
|
||||
})
|
||||
|
||||
#define paramErr (-50)
|
||||
|
||||
#define invalidConnection (-609)
|
||||
|
||||
#define errAECoercionFail (-1700)
|
||||
#define errAEDescNotFound (-1701)
|
||||
#define errAEWrongDataType (-1703)
|
||||
#define errAENotAEDesc (-1704)
|
||||
|
||||
#define errAEEventNotHandled (-1708)
|
||||
#define errAEUnknownAddressType (-1716)
|
||||
|
||||
#define errAEHandlerNotFound (-1717)
|
||||
#define errAEIllegalIndex (-1719)
|
||||
|
||||
|
||||
/* types */
|
||||
|
||||
#define typeFSS (T ('f', 's', 's', ' '))
|
||||
|
||||
#define typeAEList (T ('l', 'i', 's', 't'))
|
||||
#define typeAERecord (T ('r', 'e', 'c', 'o'))
|
||||
#define typeAppleEvent (T ('a', 'e', 'v', 't'))
|
||||
#define typeProcessSerialNumber (T ('p', 's', 'n', ' '))
|
||||
#define typeNull (T ('n', 'u', 'l', 'l'))
|
||||
#define typeApplSignature (T ('s', 'i', 'g', 'n'))
|
||||
|
||||
#define typeType (T ('t', 'y', 'p', 'e'))
|
||||
#define typeWildCard (T ('*', '*', '*', '*'))
|
||||
#define typeAlias (T ('a', 'l', 'i', 's'))
|
||||
|
||||
#define keyAddressAttr (T ('a', 'd', 'd', 'r'))
|
||||
#define keyEventClassAttr (T ('e', 'v', 'c', 'l'))
|
||||
#define keyEventIDAttr (T ('e', 'v', 'i', 'd'))
|
||||
#define keyProcessSerialNumber (T ('p', 's', 'n', ' '))
|
||||
|
||||
#define keyDirectObject (T ('-', '-', '-', '-'))
|
||||
|
||||
#define kCoreEventClass (T ('a', 'e', 'v', 't'))
|
||||
#define kAEOpenApplication (T ('o', 'a', 'p', 'p'))
|
||||
#define kAEOpenDocuments (T ('o', 'd', 'o', 'c'))
|
||||
#define kAEPrintDocuments (T ('p', 'd', 'o', 'c'))
|
||||
#define kAEAnswer (T ('a', 'n', 's', 'r'))
|
||||
#define kAEQuitApplication (T ('q', 'u', 'i', 't'))
|
||||
|
||||
#define keySelectProc (T ('s', 'e', 'l', 'h'))
|
||||
|
||||
/* #### OSL internal */
|
||||
extern ProcPtr AE_OSL_select_fn;
|
||||
|
||||
/* prototypes go here */
|
||||
|
||||
extern pascal trap OSErr C_AEGetCoercionHandler
|
||||
(DescType from_type, DescType to_type,
|
||||
ProcPtr *hdlr_out, int32 *refcon_out,
|
||||
Boolean *from_type_is_desc_p_out, Boolean system_handler_p);
|
||||
|
||||
extern pascal trap OSErr C_AECreateDesc (DescType type,
|
||||
Ptr data, Size data_size,
|
||||
AEDesc *desc_out);
|
||||
extern pascal trap OSErr C_AEDisposeDesc (AEDesc *desc);
|
||||
|
||||
extern pascal trap OSErr C_AECreateDesc (DescType type,
|
||||
Ptr data, Size data_size,
|
||||
AEDesc *desc_out);
|
||||
|
||||
extern pascal trap OSErr C_AECoerceDesc (AEDesc *desc, DescType result_type,
|
||||
AEDesc *desc_out);
|
||||
|
||||
extern pascal trap OSErr C_AEGetKeyPtr (AERecord *record, AEKeyword keyword,
|
||||
DescType desired_type, DescType *type_out,
|
||||
Ptr data, Size max_size, Size *size_out);
|
||||
|
||||
extern pascal trap OSErr C_AEGetKeyDesc (AERecord *record, AEKeyword keyword,
|
||||
DescType desired_type, AEDesc *desc_out);
|
||||
|
||||
extern pascal trap OSErr C_AEPutKeyPtr (AERecord *record, AEKeyword keyword,
|
||||
DescType type, Ptr data, Size data_size);
|
||||
extern pascal trap OSErr C_AEPutKeyDesc (AERecord *record, AEKeyword keyword,
|
||||
AEDesc *desc);
|
||||
|
||||
extern pascal trap OSErr C_AEDeleteParam (AppleEvent *evt, AEKeyword keyword);
|
||||
|
||||
extern pascal trap OSErr C_AEDeleteAttribute (AppleEvent *evt,
|
||||
AEKeyword keyword);
|
||||
|
||||
extern pascal trap OSErr C_AESizeOfKeyDesc (AERecord *record, AEKeyword keyword,
|
||||
DescType *type_out, Size *size_out);
|
||||
|
||||
extern pascal trap OSErr C_AESetInteractionAllowed (AEInteractionAllowed level);
|
||||
|
||||
extern pascal trap OSErr C_AEResetTimer (AppleEvent *evt);
|
||||
|
||||
extern pascal trap OSErr C_AEGetTheCurrentEvent (AppleEvent *return_evt);
|
||||
extern pascal trap OSErr C_AESetTheCurrentEvent (AppleEvent *evt);
|
||||
extern pascal trap OSErr C_AESuspendTheCurrentEvent (AppleEvent *evt);
|
||||
|
||||
extern pascal trap OSErr C_AEResumeTheCurrentEvent (AppleEvent *evt, AppleEvent *reply,
|
||||
EventHandlerProcPtr dispatcher,
|
||||
int32 refcon);
|
||||
extern pascal trap OSErr C_AEProcessEvent (EventRecord *evt);
|
||||
|
||||
extern pascal trap OSErr C_AEGetInteractionAllowed (AEInteractionAllowed *return_level);
|
||||
|
||||
extern pascal trap OSErr C_AEDuplicateDesc (AEDesc *src, AEDesc *dst);
|
||||
|
||||
extern pascal trap OSErr C_AECountItems (AEDescList *list, int32 *count_out);
|
||||
|
||||
extern pascal trap OSErr C_AEDeleteItem (AEDescList *list, int32 index);
|
||||
|
||||
extern pascal trap OSErr C_AEDeleteKeyDesc (AERecord *record, AEKeyword keyword);
|
||||
|
||||
extern pascal trap OSErr C_AEInstallSpecialHandler (AEKeyword function_class,
|
||||
ProcPtr hdlr,
|
||||
Boolean system_handler_p);
|
||||
|
||||
extern pascal trap OSErr C_AERemoveSpecialHandler (AEKeyword function_class,
|
||||
ProcPtr hdlr,
|
||||
Boolean system_handler_p);
|
||||
extern pascal trap OSErr C_AEGetSpecialHandler (AEKeyword function_class,
|
||||
ProcPtr *hdlr_out,
|
||||
Boolean system_handler_p);
|
||||
|
||||
extern pascal trap OSErr C_AESend (AppleEvent *evt, AppleEvent *reply,
|
||||
AESendMode send_mode, AESendPriority send_priority,
|
||||
int32 timeout, IdleProcPtr idle_proc,
|
||||
EventFilterProcPtr filter_proc);
|
||||
|
||||
extern pascal trap OSErr C_AECoercePtr (DescType data_type, Ptr data, Size data_size,
|
||||
DescType result_type, AEDesc *desc_out);
|
||||
|
||||
extern pascal trap OSErr C_AEGetEventHandler (AEEventClass event_class,
|
||||
AEEventID event_id,
|
||||
EventHandlerProcPtr *hdlr, int32 *refcon,
|
||||
Boolean system_handler_p);
|
||||
|
||||
extern pascal trap OSErr C_AERemoveEventHandler (AEEventClass event_class,
|
||||
AEEventID event_id,
|
||||
EventHandlerProcPtr hdlr,
|
||||
Boolean system_handler_p);
|
||||
|
||||
extern pascal trap OSErr C_AESetInteractionAllowed (AEInteractionAllowed level);
|
||||
|
||||
extern pascal trap OSErr C_AEProcessAppleEvent (EventRecord *evt);
|
||||
|
||||
extern pascal trap OSErr C_AEPutDesc (AEDescList *list, int32 index,
|
||||
AEDesc *desc);
|
||||
|
||||
|
||||
extern pascal trap OSErr C_AEPutAttributePtr (AppleEvent *evt, AEKeyword keyword,
|
||||
DescType type, Ptr data, Size size);
|
||||
|
||||
extern pascal trap OSErr C_AEPutAttributeDesc (AppleEvent *evt, AEKeyword keyword,
|
||||
AEDesc *desc);
|
||||
|
||||
extern pascal trap OSErr C_AEGetNthPtr (AEDescList *list, int32 index,
|
||||
DescType desired_type, AEKeyword *keyword_out,
|
||||
DescType *type_out,
|
||||
Ptr data, int32 max_size, int32 *size_out);
|
||||
|
||||
extern pascal trap OSErr C_AEGetAttributePtr (AppleEvent *evt, AEKeyword keyword,
|
||||
DescType desired_type, DescType *type_out,
|
||||
Ptr data, Size max_size, Size *size_out);
|
||||
|
||||
extern pascal trap OSErr C_AEGetArray (AEDescList *list,
|
||||
AEArrayType array_type,
|
||||
AEArrayDataPointer array_ptr, Size max_size,
|
||||
DescType *return_item_type,
|
||||
Size *return_item_size,
|
||||
int32 *return_item_count);
|
||||
|
||||
extern pascal trap OSErr C_AECreateAppleEvent
|
||||
(AEEventClass event_class, AEEventID event_id,
|
||||
AEAddressDesc *target, int16 return_id, int32 transaction_id, AppleEvent *evt);
|
||||
|
||||
extern pascal trap OSErr C_AEInstallCoercionHandler
|
||||
(DescType from_type, DescType to_type,
|
||||
ProcPtr hdlr, int32 refcon, Boolean from_type_is_desc_p, Boolean system_handler_p);
|
||||
|
||||
extern pascal trap OSErr C_AEInstallEventHandler
|
||||
(AEEventClass event_class, AEEventID event_id,
|
||||
EventHandlerProcPtr hdlr, int32 refcon, Boolean system_handler_p);
|
||||
|
||||
extern pascal trap OSErr C_AERemoveCoercionHandler
|
||||
(DescType from_type, DescType to_type,
|
||||
ProcPtr hdlr, Boolean system_handler_p);
|
||||
|
||||
extern pascal trap OSErr C_AEPutArray (AEDescList *list, AEArrayType type,
|
||||
AEArrayDataPointer array_data,
|
||||
DescType item_type,
|
||||
Size item_size, int32 item_count);
|
||||
|
||||
extern pascal trap OSErr C_AECreateList (Ptr list_elt_prefix, Size list_elt_prefix_size,
|
||||
Boolean is_record_p, AEDescList *list_out);
|
||||
|
||||
extern pascal trap OSErr C_AEGetAttributeDesc (AppleEvent *evt, AEKeyword keyword,
|
||||
DescType desired_type, AEDesc *desc_out);
|
||||
|
||||
extern pascal trap OSErr C_AESizeOfAttribute (AppleEvent *evt, AEKeyword keyword,
|
||||
DescType *type_out, Size *size_out);
|
||||
|
||||
extern pascal trap OSErr C_AEGetNthDesc (AEDescList *list, int32 index,
|
||||
DescType desired_type, AEKeyword *keyword_out,
|
||||
AEDesc *desc_out);
|
||||
|
||||
extern pascal trap OSErr C_AESizeOfNthItem (AEDescList *list, int32 index,
|
||||
DescType *type_out, Size *size_out);
|
||||
|
||||
extern pascal trap OSErr C_AEPutPtr (AEDescList *list, int32 index, DescType type,
|
||||
Ptr data, Size data_size);
|
||||
|
||||
extern pascal trap OSErr C_AEInteractWithUser (int32 timeout, NMRecPtr nm_req,
|
||||
IdleProcPtr idle_proc);
|
||||
|
||||
extern void AE_init (void);
|
||||
extern void AE_reinit (void);
|
||||
|
||||
extern pascal trap OSErr C_AEManagerInfo (LONGINT *resultp);
|
||||
|
||||
|
||||
#if !defined (AE_info_H)
|
||||
extern HIDDEN_AE_info_ptr AE_info_H;
|
||||
#endif
|
||||
|
||||
#define AE_info (AE_info_H.p)
|
||||
|
||||
extern pascal trap OSErr C_AEDisposeToken (AEDesc *theToken);
|
||||
extern pascal trap OSErr C_AEREesolve (AEDesc *objectSpecifier,
|
||||
INTEGER callbackFlags,
|
||||
AEDesc *theToken);
|
||||
extern pascal trap OSErr C_AERemoveObjectAccessor (DescType desiredClass,
|
||||
DescType containerType,
|
||||
ProcPtr theAccessor,
|
||||
BOOLEAN isSysHandler);
|
||||
extern pascal trap OSErr C_AEInstallObjectAccessor (DescType desiredClass,
|
||||
DescType containerType,
|
||||
ProcPtr theAccessor,
|
||||
LONGINT refcon,
|
||||
BOOLEAN isSysHandler);
|
||||
extern pascal trap OSErr C_AEGetObjectAccessor (DescType desiredClass,
|
||||
DescType containerType,
|
||||
ProcPtr *theAccessor,
|
||||
LONGINT *accessorRefcon,
|
||||
BOOLEAN isSysHandler);
|
||||
extern pascal trap OSErr C_AECallObjectAccessor (DescType desiredClass,
|
||||
AEDesc *containerToken,
|
||||
DescType containerClass,
|
||||
DescType keyForm,
|
||||
AEDesc *keyData,
|
||||
AEDesc *theToken);
|
||||
extern pascal trap OSErr C_AESetObjectCallbacks (ProcPtr myCompareProc,
|
||||
ProcPtr myCountProc,
|
||||
ProcPtr myDisposeTokenProc,
|
||||
ProcPtr myGetMarkTokenProc,
|
||||
ProcPtr myMarkProc,
|
||||
ProcPtr myAdjustMarksProc,
|
||||
ProcPtr myGetErrDescProc);
|
||||
|
||||
|
||||
#endif /* ! _AppleEvents_H_ */
|
||||
3
src/include/AppleTalk.h
Normal file
3
src/include/AppleTalk.h
Normal file
@@ -0,0 +1,3 @@
|
||||
#if !defined (PortBUse)
|
||||
extern Byte PortBUse;
|
||||
#endif
|
||||
19
src/include/BinaryDecimal.h
Normal file
19
src/include/BinaryDecimal.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#if !defined (__BINDEC__)
|
||||
#define __BINDEC__
|
||||
/*
|
||||
* Copyright 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: BinaryDecimal.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
|
||||
/* DO NOT DELETE THIS LINE */
|
||||
#if !defined (__STDC__)
|
||||
extern void NumToString();
|
||||
extern void StringToNum();
|
||||
#else /* __STDC__ */
|
||||
extern trap void NumToString( LONGINT l, StringPtr s );
|
||||
extern trap void StringToNum( StringPtr s, LONGINT *lp );
|
||||
#endif /* __STDC__ */
|
||||
#endif /* __BINDEC__ */
|
||||
459
src/include/CQuickDraw.h
Normal file
459
src/include/CQuickDraw.h
Normal file
@@ -0,0 +1,459 @@
|
||||
|
||||
#if !defined (_CQUICKDRAW_H_)
|
||||
#define _CQUICKDRAW_H_
|
||||
|
||||
#include "WindowMgr.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
HIDDEN_CGrafPtr *p PACKED_P;
|
||||
} HIDDEN_CGrafPtr_Ptr;
|
||||
|
||||
#define theCPort (STARH (STARH ((HIDDEN_CGrafPtr_Ptr *) SYN68K_TO_US(a5))))
|
||||
#define theCPortX ((*STARH ((HIDDEN_CGrafPtr_Ptr *) SYN68K_TO_US(a5))).p)
|
||||
|
||||
#define minSeed 1024
|
||||
|
||||
typedef struct
|
||||
{
|
||||
LONGINT iTabSeed PACKED;
|
||||
INTEGER iTabRes PACKED;
|
||||
/* can't use [0];
|
||||
make this an unsigned char even tho the mac has SignedByte;
|
||||
it is treated as unsigned */
|
||||
unsigned char iTTable[1] PACKED;
|
||||
} ITab, *ITabPtr;
|
||||
|
||||
typedef struct { ITabPtr p PACKED_P; } HIDDEN_ITabPtr;
|
||||
typedef HIDDEN_ITabPtr *ITabHandle;
|
||||
|
||||
typedef struct GDevice *GDPtr;
|
||||
typedef struct { GDPtr p PACKED_P; } HIDDEN_GDevicePtr;
|
||||
typedef HIDDEN_GDevicePtr *GDHandle;
|
||||
typedef struct { GDHandle p PACKED_P; } HIDDEN_GDHandle;
|
||||
|
||||
typedef struct { struct SProcRec *p PACKED_P; } HIDDEN_SProcPtr;
|
||||
typedef HIDDEN_SProcPtr *SProcHndl;
|
||||
typedef struct SProcRec
|
||||
{
|
||||
SProcHndl nxtSrch PACKED_P;
|
||||
ProcPtr srchProc PACKED_P;
|
||||
} SProcRec, *SProcPtr;
|
||||
|
||||
typedef struct { struct CProcRec *p PACKED_P; } HIDDEN_CProcPtr;
|
||||
typedef HIDDEN_CProcPtr *CProcHndl;
|
||||
typedef struct CProcRec
|
||||
{
|
||||
CProcHndl nxtComp PACKED_P;
|
||||
ProcPtr compProc PACKED_P;
|
||||
} CProcRec, *CProcPtr;
|
||||
|
||||
typedef void *DeviceLoopDrawingProcPtr;
|
||||
|
||||
typedef struct GDevice
|
||||
{
|
||||
INTEGER gdRefNum PACKED;
|
||||
INTEGER gdID PACKED;
|
||||
INTEGER gdType PACKED;
|
||||
ITabHandle gdITable PACKED_P;
|
||||
INTEGER gdResPref PACKED;
|
||||
SProcHndl gdSearchProc PACKED_P;
|
||||
CProcHndl gdCompProc PACKED_P;
|
||||
INTEGER gdFlags PACKED;
|
||||
PixMapHandle gdPMap PACKED_P;
|
||||
LONGINT gdRefCon PACKED;
|
||||
GDHandle gdNextGD PACKED_P;
|
||||
Rect gdRect PACKED;
|
||||
LONGINT gdMode PACKED;
|
||||
INTEGER gdCCBytes PACKED;
|
||||
INTEGER gdCCDepth PACKED;
|
||||
Handle gdCCXData PACKED_P;
|
||||
Handle gdCCXMask PACKED_P;
|
||||
LONGINT gdReserved PACKED;
|
||||
} GDevice;
|
||||
|
||||
typedef uint32 DeviceLoopFlags;
|
||||
|
||||
/* DeviceLoop flags. */
|
||||
#define singleDevices (1 << 0)
|
||||
#define dontMatchSeeds (1 << 1)
|
||||
#define allDevices (1 << 2)
|
||||
|
||||
typedef struct ColorInfo
|
||||
{
|
||||
RGBColor ciRGB PACKED;
|
||||
INTEGER ciUsage PACKED;
|
||||
INTEGER ciTolerance PACKED;
|
||||
INTEGER ciFlags PACKED;
|
||||
LONGINT ciPrivate PACKED;
|
||||
} ColorInfo;
|
||||
|
||||
typedef struct Palette
|
||||
{
|
||||
INTEGER pmEntries PACKED;
|
||||
GrafPtr pmWindow PACKED_P;
|
||||
INTEGER pmPrivate PACKED;
|
||||
LONGINT /* Handle? */ pmDevices PACKED;
|
||||
Handle pmSeeds PACKED;
|
||||
ColorInfo pmInfo[1] PACKED;
|
||||
} Palette, *PalettePtr;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
#define CI_USAGE_TYPE_BITS_X (CWC (0xF))
|
||||
#define CI_USAGE_TYPE_BITS (0xF)
|
||||
pmCourteous = 0,
|
||||
pmDithered = 1,
|
||||
pmTolerant = 2,
|
||||
pmAnimated = 4,
|
||||
pmExplicit = 8,
|
||||
|
||||
pmInhibitG2 = 0x0100,
|
||||
pmInhibitC2 = 0x0200,
|
||||
pmInhibitG4 = 0x0400,
|
||||
pmInhibitC4 = 0x0800,
|
||||
pmInhibitG8 = 0x1000,
|
||||
pmInhibitC8 = 0x2000,
|
||||
} pmColorUsage;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
pmNoUpdates_enum = 0x8000,
|
||||
pmBkUpdates_enum = 0xA000,
|
||||
pmFgUpdates_enum = 0xC000,
|
||||
pmAllUpdates_enum = 0xE000,
|
||||
} pmUpdates;
|
||||
|
||||
#define pmNoUpdates ((INTEGER) pmNoUpdates_enum)
|
||||
#define pmBkUpdates ((INTEGER) pmBkUpdates_enum)
|
||||
#define pmFgUpdates ((INTEGER) pmFgUpdates_enum)
|
||||
#define pmAllUpdates ((INTEGER) pmAllUpdates_enum)
|
||||
|
||||
typedef struct { PalettePtr p PACKED_P; } HIDDEN_PalettePtr;
|
||||
typedef HIDDEN_PalettePtr *PaletteHandle;
|
||||
|
||||
/* return TRUE if `maybe_graphics_world' points to a graphics world,
|
||||
and not a graf port or cgraf port */
|
||||
#define GRAPHICS_WORLD_P(maybe_graphics_world) \
|
||||
(CGrafPort_p(maybe_graphics_world) \
|
||||
&& CPORT_VERSION_X (maybe_graphics_world) & GW_FLAG_BIT_X)
|
||||
|
||||
#define GW_CPORT(graphics_world) ((CGrafPtr) (graphics_world))
|
||||
|
||||
typedef LONGINT GWorldFlags;
|
||||
|
||||
typedef CGrafPort GWorld, *GWorldPtr;
|
||||
|
||||
typedef struct ReqListRec
|
||||
{
|
||||
INTEGER reqLSize PACKED;
|
||||
INTEGER reqLData[1] PACKED;
|
||||
} ReqListRec;
|
||||
|
||||
/* extended version 2 picture datastructures */
|
||||
|
||||
typedef struct OpenCPicParams
|
||||
{
|
||||
Rect srcRect PACKED;
|
||||
Fixed hRes PACKED;
|
||||
Fixed vRes PACKED;
|
||||
int16 version PACKED;
|
||||
int16 reserved1 PACKED;
|
||||
int32 reserved2 PACKED;
|
||||
} OpenCPicParams;
|
||||
|
||||
typedef struct CommonSpec
|
||||
{
|
||||
int16 count PACKED;
|
||||
int16 ID PACKED;
|
||||
} CommentSpec;
|
||||
|
||||
typedef CommentSpec *CommentSpecPtr;
|
||||
typedef struct { CommentSpecPtr p PACKED_P; } HIDDEN_CommentSpecPtr;
|
||||
typedef HIDDEN_CommentSpecPtr *CommentSpecHandle;
|
||||
|
||||
typedef struct FontSpec
|
||||
{
|
||||
int16 pictFontID PACKED;
|
||||
int16 sysFontID PACKED;
|
||||
int32 size[4] PACKED;
|
||||
int16 style PACKED;
|
||||
int32 nameOffset PACKED;
|
||||
} FontSpec;
|
||||
|
||||
typedef FontSpec *FontSpecPtr;
|
||||
typedef struct { FontSpecPtr p PACKED_P; } HIDDEN_FontSpecPtr;
|
||||
typedef HIDDEN_FontSpecPtr *FontSpecHandle;
|
||||
|
||||
typedef struct PictInfo
|
||||
{
|
||||
int16 version PACKED; /* 0 */
|
||||
int32 uniqueColors PACKED; /* 2 */
|
||||
PaletteHandle thePalette PACKED_P; /* 6 */
|
||||
CTabHandle theColorTable PACKED_P; /* 10 */
|
||||
Fixed hRes PACKED; /* 14 */
|
||||
Fixed vRes PACKED; /* 18 */
|
||||
INTEGER depth PACKED; /* 22 */
|
||||
Rect sourceRect PACKED; /* top24, left26, bottom28, right30 */
|
||||
int32 textCount PACKED; /* 32 */
|
||||
int32 lineCount PACKED;
|
||||
int32 rectCount PACKED;
|
||||
int32 rRectCount PACKED;
|
||||
int32 ovalCount PACKED;
|
||||
int32 arcCount PACKED;
|
||||
int32 polyCount PACKED;
|
||||
int32 regionCount PACKED;
|
||||
int32 bitMapCount PACKED;
|
||||
int32 pixMapCount PACKED;
|
||||
int32 commentCount PACKED;
|
||||
|
||||
int32 uniqueComments PACKED;
|
||||
CommentSpecHandle commentHandle PACKED_P;
|
||||
|
||||
int32 uniqueFonts PACKED;
|
||||
FontSpecHandle fontHandle PACKED_P;
|
||||
|
||||
Handle fontNamesHandle PACKED_P;
|
||||
|
||||
int32 reserved1 PACKED;
|
||||
int32 reserved2 PACKED;
|
||||
} PictInfo;
|
||||
|
||||
typedef PictInfo *PictInfoPtr;
|
||||
typedef struct { PictInfoPtr p PACKED_P; } HIDDEN_PictInfoPtr;
|
||||
typedef HIDDEN_PictInfoPtr *PictInfoHandle;
|
||||
|
||||
typedef int32 PictInfoID;
|
||||
|
||||
#define RGBDirect (0x10)
|
||||
#define Indirect (0)
|
||||
/* a pixmap pixelType of `native_rgb_pixel_type' means that the format
|
||||
of the pixmap is the same as that of the screen */
|
||||
#define vdriver_rgb_pixel_type (0xB9)
|
||||
|
||||
#define pixPurge (1 << 0)
|
||||
#define noNewDevice (1 << 1)
|
||||
#define useTempMem (1 << 2)
|
||||
#define keepLocal (1 << 3)
|
||||
#define pixelsPurgeable (1 << 6)
|
||||
#define pixelsLocked (1 << 7)
|
||||
#define mapPix (1 << 16)
|
||||
#define newDepth (1 << 17)
|
||||
#define alignPix (1 << 18)
|
||||
#define newRowBytes (1 << 19)
|
||||
#define reallocPix (1 << 20)
|
||||
#define clipPix (1 << 28)
|
||||
#define stretchPix (1 << 29)
|
||||
#define ditherPix (1 << 30)
|
||||
#define gwFlagErr (1 << 31)
|
||||
|
||||
typedef int16 QDErr;
|
||||
|
||||
/* error codes returned by QDError */
|
||||
#define noErr 0
|
||||
#define paramErr (-50)
|
||||
#define noMemForPictPlaybackErr (-145)
|
||||
#define regionTooBigErr (-147)
|
||||
#define pixmapTooDeepErr (-148)
|
||||
#define nsStackErr (-149)
|
||||
#define cMatchErr (-150)
|
||||
#define cTempMemErr (-151)
|
||||
#define cNoMemErr (-152)
|
||||
#define cRangeErr (-153)
|
||||
#define cProtectErr (-154)
|
||||
#define cDevErr (-155)
|
||||
#define cResErr (-156)
|
||||
#define cDepthErr (-157)
|
||||
#define rgnTooBigErr (-500)
|
||||
|
||||
/* TODO: FIXME -- #warning find out correct value for colReqErr */
|
||||
/* -158 is just a guess */
|
||||
|
||||
#define colReqErr (-158)
|
||||
|
||||
extern pascal trap void C_SetStdCProcs(CQDProcs *cProcs);
|
||||
|
||||
extern pascal trap void C_OpenCPort (CGrafPtr);
|
||||
extern pascal trap void C_InitCPort (CGrafPtr);
|
||||
extern pascal trap void C_CloseCPort (CGrafPtr);
|
||||
extern pascal trap void C_RGBForeColor (RGBColor *);
|
||||
extern pascal trap void C_RGBBackColor (RGBColor *);
|
||||
extern pascal trap void C_GetForeColor (RGBColor *);
|
||||
extern pascal trap void C_GetBackColor (RGBColor *);
|
||||
extern pascal trap void C_PenPixPat (PixPatHandle);
|
||||
extern pascal trap void C_BackPixPat (PixPatHandle);
|
||||
extern pascal trap void C_OpColor (RGBColor *);
|
||||
extern pascal trap void C_HiliteColor (RGBColor *);
|
||||
extern pascal trap PixMapHandle C_NewPixMap ();
|
||||
extern pascal trap void C_DisposPixMap (PixMapHandle);
|
||||
extern pascal trap void C_CopyPixMap (PixMapHandle, PixMapHandle);
|
||||
extern pascal trap PixPatHandle C_NewPixPat ();
|
||||
extern pascal trap void C_DisposPixPat (PixPatHandle);
|
||||
extern pascal trap void C_CopyPixPat (PixPatHandle, PixPatHandle);
|
||||
|
||||
extern pascal trap void C_SetPortPix (PixMapHandle);
|
||||
|
||||
extern pascal trap GDHandle C_NewGDevice (INTEGER, LONGINT);
|
||||
extern pascal trap void C_InitGDevice (INTEGER, LONGINT, GDHandle);
|
||||
extern pascal trap void C_SetDeviceAttribute (GDHandle, INTEGER, BOOLEAN);
|
||||
extern pascal trap void C_SetGDevice (GDHandle);
|
||||
|
||||
extern pascal trap void C_DisposeGDevice (GDHandle);
|
||||
extern pascal trap GDHandle C_GetGDevice ();
|
||||
extern pascal trap GDHandle C_GetDeviceList ();
|
||||
extern pascal trap GDHandle C_GetMainDevice ();
|
||||
extern pascal trap GDHandle C_GetMaxDevice (Rect *);
|
||||
extern pascal trap GDHandle C_GetNextDevice (GDHandle);
|
||||
extern pascal trap void C_DeviceLoop (RgnHandle, DeviceLoopDrawingProcPtr, LONGINT, DeviceLoopFlags);
|
||||
extern pascal trap BOOLEAN C_TestDeviceAttribute (GDHandle, INTEGER);
|
||||
extern pascal trap void C_ScreenRes (INTEGER *, INTEGER *);
|
||||
extern pascal trap INTEGER C_HasDepth (GDHandle, INTEGER, INTEGER, INTEGER);
|
||||
extern pascal trap OSErr C_SetDepth (GDHandle, INTEGER, INTEGER, INTEGER);
|
||||
|
||||
extern pascal trap void C_MakeITable (CTabHandle, ITabHandle, INTEGER);
|
||||
|
||||
extern pascal trap LONGINT C_Color2Index (RGBColor *);
|
||||
extern pascal trap void C_Index2Color (LONGINT, RGBColor *);
|
||||
extern pascal trap LONGINT C_GetCTSeed ();
|
||||
extern pascal trap void C_GetSubTable (CTabHandle, INTEGER, CTabHandle);
|
||||
|
||||
extern pascal trap void C_FillCRoundRect (const Rect *, short, short, PixPatHandle);
|
||||
extern pascal trap void C_FillCRect (Rect *, PixPatHandle);
|
||||
extern pascal trap void C_FillCOval (const Rect *, PixPatHandle);
|
||||
extern pascal trap void C_FillCArc (const Rect *, short, short, PixPatHandle);
|
||||
extern pascal trap void C_FillCPoly (PolyHandle, PixPatHandle);
|
||||
extern pascal trap void C_FillCRgn (RgnHandle, PixPatHandle);
|
||||
|
||||
extern pascal trap void C_InvertColor (RGBColor *);
|
||||
extern pascal trap BOOLEAN C_RealColor (RGBColor *);
|
||||
extern pascal trap void C_ProtectEntry (INTEGER, BOOLEAN);
|
||||
extern pascal trap void C_ReserveEntry (INTEGER, BOOLEAN);
|
||||
extern pascal trap void C_SetEntries (INTEGER, INTEGER, ColorSpec * /* cSpecArray */);
|
||||
extern pascal trap void C_AddSearch (ProcPtr);
|
||||
extern pascal trap void C_AddComp (ProcPtr);
|
||||
extern pascal trap void C_DelSearch (ProcPtr);
|
||||
extern pascal trap void C_DelComp (ProcPtr);
|
||||
extern pascal trap void C_SetClientID (INTEGER);
|
||||
|
||||
extern pascal trap BOOLEAN C_GetGray (GDHandle, RGBColor *, RGBColor *);
|
||||
|
||||
extern pascal trap PixPatHandle C_GetPixPat (INTEGER);
|
||||
|
||||
extern pascal trap INTEGER C_QDError ();
|
||||
|
||||
extern pascal trap CWindowPtr C_NewCWindow (Ptr, Rect *, StringPtr, BOOLEAN, INTEGER, CWindowPtr, BOOLEAN, LONGINT);
|
||||
extern pascal trap CWindowPtr C_GetNewCWindow (INTEGER, Ptr, CWindowPtr);
|
||||
|
||||
extern pascal trap void C_CMY2RGB (CMYColor *, RGBColor *);
|
||||
extern pascal trap void C_RGB2CMY (RGBColor *, CMYColor *);
|
||||
extern pascal trap void C_HSL2RGB (HSLColor *, RGBColor *);
|
||||
extern pascal trap void C_RGB2HSL (RGBColor *, HSLColor *);
|
||||
extern pascal trap void C_HSV2RGB (HSVColor *, RGBColor *);
|
||||
extern pascal trap void C_RGB2HSV (RGBColor *, HSVColor *);
|
||||
extern pascal trap SmallFract C_Fix2SmallFract (Fixed);
|
||||
extern pascal trap Fixed C_SmallFract2Fix (SmallFract);
|
||||
extern pascal trap BOOLEAN C_GetColor (Point, Str255, RGBColor *, RGBColor *);
|
||||
|
||||
extern pascal trap CTabHandle C_GetCTable (INTEGER);
|
||||
extern pascal trap void C_DisposCTable (CTabHandle);
|
||||
|
||||
extern pascal trap void C_InitPalettes ();
|
||||
extern pascal trap PaletteHandle C_NewPalette (INTEGER, CTabHandle, INTEGER, INTEGER);
|
||||
extern pascal trap PaletteHandle C_GetNewPalette (INTEGER);
|
||||
extern pascal trap void C_DisposePalette (PaletteHandle);
|
||||
extern pascal trap void C_ActivatePalette (WindowPtr);
|
||||
extern pascal trap void C_SetPalette (WindowPtr, PaletteHandle, BOOLEAN);
|
||||
extern pascal trap void C_NSetPalette (WindowPtr, PaletteHandle, INTEGER updates);
|
||||
extern pascal trap PaletteHandle C_GetPalette (WindowPtr);
|
||||
|
||||
extern pascal trap void C_PmForeColor (INTEGER);
|
||||
extern pascal trap void C_PmBackColor (INTEGER);
|
||||
extern pascal trap void C_AnimateEntry (WindowPtr, INTEGER, RGBColor *);
|
||||
extern pascal trap void C_AnimatePalette (WindowPtr, CTabHandle, INTEGER, INTEGER, INTEGER);
|
||||
extern pascal trap void C_GetEntryColor (PaletteHandle, INTEGER, RGBColor *);
|
||||
extern pascal trap void C_SetEntryColor (PaletteHandle, INTEGER, RGBColor *);
|
||||
extern pascal trap void C_GetEntryUsage (PaletteHandle, INTEGER, INTEGER *, INTEGER *);
|
||||
extern pascal trap void C_SetEntryUsage (PaletteHandle, INTEGER, INTEGER, INTEGER);
|
||||
extern pascal trap void C_CTab2Palette (CTabHandle, PaletteHandle, INTEGER, INTEGER);
|
||||
extern pascal trap void C_Palette2CTab (PaletteHandle, CTabHandle);
|
||||
|
||||
extern pascal trap CCrsrHandle C_GetCCursor (INTEGER);
|
||||
extern pascal trap void C_SetCCursor (CCrsrHandle);
|
||||
extern pascal trap void C_DisposCCursor (CCrsrHandle);
|
||||
extern pascal trap void C_AllocCursor (void);
|
||||
|
||||
extern pascal trap void C_RestoreClutDevice (GDHandle);
|
||||
extern pascal trap void C_ResizePalette (PaletteHandle, INTEGER);
|
||||
extern pascal trap INTEGER C_PMgrVersion ();
|
||||
extern pascal trap void C_SaveFore (ColorSpec *);
|
||||
extern pascal trap void C_RestoreFore (ColorSpec *);
|
||||
extern pascal trap void C_SaveBack (ColorSpec *);
|
||||
extern pascal trap void C_RestoreBack (ColorSpec *);
|
||||
extern pascal trap void C_SetPaletteUpdates (PaletteHandle, INTEGER);
|
||||
extern pascal trap INTEGER C_GetPaletteUpdates (PaletteHandle);
|
||||
extern pascal trap void C_CopyPalette (PaletteHandle src_palette,
|
||||
PaletteHandle dst_palette,
|
||||
int16 src_start, int16 dst_start,
|
||||
int16 n_entries);
|
||||
|
||||
extern pascal trap void C_SetWinColor (WindowPtr, CTabHandle);
|
||||
extern pascal trap BOOLEAN C_GetAuxWin (WindowPtr, HIDDEN_AuxWinHandle *);
|
||||
|
||||
extern pascal trap void C_GetCWMgrPort (HIDDEN_CGrafPtr *);
|
||||
|
||||
/* QDExtensions trap */
|
||||
extern pascal trap QDErr C_NewGWorld (GWorldPtr *, INTEGER, Rect *, CTabHandle, GDHandle, GWorldFlags);
|
||||
extern pascal trap Boolean C_LockPixels (PixMapHandle);
|
||||
extern pascal trap void C_UnlockPixels (PixMapHandle);
|
||||
extern pascal trap GWorldFlags C_UpdateGWorld (GWorldPtr *, INTEGER, Rect *, CTabHandle, GDHandle, GWorldFlags);
|
||||
extern pascal trap void C_DisposeGWorld (GWorldPtr);
|
||||
extern pascal trap void C_GetGWorld (CGrafPtr *, GDHandle *);
|
||||
extern pascal trap void C_SetGWorld (CGrafPtr, GDHandle);
|
||||
extern pascal trap void C_AllowPurgePixels (PixMapHandle);
|
||||
extern pascal trap void C_NoPurgePixels (PixMapHandle);
|
||||
extern pascal trap GWorldFlags C_GetPixelsState (PixMapHandle);
|
||||
extern pascal trap void C_SetPixelsState (PixMapHandle, GWorldFlags);
|
||||
extern pascal trap Ptr C_GetPixBaseAddr (PixMapHandle);
|
||||
extern pascal trap QDErr C_NewScreenBuffer (Rect *, Boolean, GDHandle *, PixMapHandle *);
|
||||
extern pascal trap void C_DisposeScreenBuffer (PixMapHandle);
|
||||
extern pascal trap GDHandle C_GetGWorldDevice (GWorldPtr);
|
||||
extern pascal trap Boolean C_PixMap32Bit (PixMapHandle);
|
||||
extern pascal trap PixMapHandle C_GetGWorldPixMap (GWorldPtr);
|
||||
extern pascal trap QDErr C_NewTempScreenBuffer (Rect *, Boolean, GDHandle *, PixMapHandle *);
|
||||
extern pascal trap void C_GDeviceChanged (GDHandle);
|
||||
extern pascal trap void C_PortChanged (GrafPtr);
|
||||
extern pascal trap void C_PixPatChanged (PixPatHandle);
|
||||
extern pascal trap void C_CTabChanged (CTabHandle);
|
||||
extern pascal trap Boolean C_QDDone (GrafPtr);
|
||||
|
||||
extern pascal trap LONGINT C_OffscreenVersion ();
|
||||
|
||||
extern pascal trap OSErr C_BitMapToRegion(RgnHandle, const BitMap *);
|
||||
|
||||
extern pascal trap LONGINT C_Entry2Index(INTEGER);
|
||||
extern pascal trap void C_SaveEntries (CTabHandle, CTabHandle, ReqListRec *);
|
||||
extern pascal trap void C_RestoreEntries (CTabHandle, CTabHandle, ReqListRec *);
|
||||
|
||||
extern pascal trap void C_DisposGDevice(GDHandle gdh);
|
||||
|
||||
extern pascal trap OSErr C_DisposePictInfo (PictInfoID);
|
||||
extern pascal trap OSErr C_RecordPictInfo (PictInfoID, PicHandle);
|
||||
extern pascal trap OSErr C_RecordPixMapInfo (PictInfoID, PixMapHandle);
|
||||
extern pascal trap OSErr C_RetrievePictInfo (PictInfoID, PictInfo *, int16);
|
||||
extern pascal trap OSErr C_NewPictInfo (PictInfoID *, int16, int16, int16, int16);
|
||||
extern pascal trap OSErr C_GetPictInfo (PicHandle, PictInfo *, int16, int16, int16, int16);
|
||||
extern pascal trap OSErr C_GetPixMapInfo (PixMapHandle, PictInfo *, int16, int16, int16, int16);
|
||||
|
||||
extern pascal trap PicHandle C_OpenCPicture (OpenCPicParams *newheaderp);
|
||||
|
||||
#if !defined (TheGDevice_H)
|
||||
extern HIDDEN_GDHandle TheGDevice_H;
|
||||
extern HIDDEN_GDHandle MainDevice_H;
|
||||
extern HIDDEN_GDHandle DeviceList_H;
|
||||
#endif
|
||||
|
||||
#define TheGDevice (TheGDevice_H.p)
|
||||
#define MainDevice (MainDevice_H.p)
|
||||
#define DeviceList (DeviceList_H.p)
|
||||
|
||||
#endif /* _CQUICKDRAW_H_ */
|
||||
60
src/include/CommTool.h
Normal file
60
src/include/CommTool.h
Normal file
@@ -0,0 +1,60 @@
|
||||
#if !defined (__COMMTOOL__)
|
||||
#define __COMMTOOL__
|
||||
|
||||
/*
|
||||
* Copyright 1999 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: CommTool.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
QElemPtr qLink PACKED_P;
|
||||
INTEGER qType PACKED;
|
||||
INTEGER crmVersion PACKED;
|
||||
LONGINT crmPrivate PACKED;
|
||||
INTEGER crmReserved PACKED;
|
||||
LONGINT crmDeviceType PACKED;
|
||||
LONGINT crmDeviceID PACKED;
|
||||
LONGINT crmAttributes PACKED;
|
||||
LONGINT crmStatus PACKED;
|
||||
LONGINT crmRefCon PACKED;
|
||||
}
|
||||
CRMRec, *CRMRecPtr;
|
||||
|
||||
typedef OSErr CRMErr;
|
||||
|
||||
enum { crmGenericError = -1, crmNoErr = 0 };
|
||||
enum { curCRMVersion = 1 };
|
||||
enum { crmType = 9 };
|
||||
enum { crmRecVersion = 1 };
|
||||
enum { curCRMSerRecVer = 0 };
|
||||
enum { crmSerialDevice = 1 };
|
||||
|
||||
typedef struct
|
||||
{
|
||||
INTEGER version PACKED;
|
||||
StringHandle inputDriverName PACKED_P;
|
||||
StringHandle outputDriverName PACKED_P;
|
||||
StringHandle name PACKED_P;
|
||||
Handle deviceIcon PACKED;
|
||||
LONGINT ratedSpeed PACKED;
|
||||
LONGINT maxSpeed PACKED;
|
||||
LONGINT reserved PACKED;
|
||||
}
|
||||
CRMSerialRecord, *CRMSerialPtr;
|
||||
|
||||
extern INTEGER CRMGetCRMVersion (void);
|
||||
|
||||
extern QHdrPtr CRMGetHeader (void);
|
||||
|
||||
extern void CRMInstall (QElemPtr);
|
||||
|
||||
extern OSErr CRMRemove (QElemPtr);
|
||||
|
||||
extern QElemPtr CRMSearch (QElemPtr);
|
||||
|
||||
extern CRMErr InitCRM (void);
|
||||
|
||||
#endif
|
||||
27
src/include/Components.h
Normal file
27
src/include/Components.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#if !defined (__COMPONENTS__)
|
||||
#define __COMPONENTS__
|
||||
|
||||
/*
|
||||
* Copyright 1998 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: Components.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
typedef struct ComponentRecord
|
||||
{
|
||||
LONGINT data[1];
|
||||
}
|
||||
ComponentRecord;
|
||||
|
||||
typedef ComponentRecord *Component;
|
||||
|
||||
typedef struct ComponentInstanceRecord
|
||||
{
|
||||
LONGINT data[1];
|
||||
}
|
||||
ComponentInstanceRecord;
|
||||
|
||||
typedef ComponentInstanceRecord *ComponentInstance;
|
||||
|
||||
#endif
|
||||
236
src/include/ControlMgr.h
Normal file
236
src/include/ControlMgr.h
Normal file
@@ -0,0 +1,236 @@
|
||||
#if !defined (__CONTROL__)
|
||||
#define __CONTROL__
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: ControlMgr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
|
||||
#define pushButProc 0
|
||||
#define checkBoxProc 1
|
||||
#define radioButProc 2
|
||||
#define useWFont 8
|
||||
#define scrollBarProc 16
|
||||
|
||||
#define inButton 10
|
||||
#define inCheckBox 11
|
||||
#define inUpButton 20
|
||||
#define inDownButton 21
|
||||
#define inPageUp 22
|
||||
#define inPageDown 23
|
||||
#define inThumb 129
|
||||
|
||||
#define popupFixedWidth (1 << 0)
|
||||
#define popupUseAddResMenu (1 << 2)
|
||||
#define popupUseWFont (1 << 3)
|
||||
|
||||
#define popupTitleBold (1 << 8)
|
||||
#define popupTitleItalic (1 << 9)
|
||||
#define popupTitleUnderline (1 << 10)
|
||||
#define popupTitleOutline (1 << 11)
|
||||
#define popupTitleShadow (1 << 12)
|
||||
#define popupTitleCondense (1 << 13)
|
||||
#define popupTitleExtend (1 << 14)
|
||||
#define popupTitleNoStyle (1 << 15)
|
||||
|
||||
#define popupTitleLeftJust (0x00)
|
||||
#define popupTitleCenterJust (0x01)
|
||||
#define popupTitleRightJust (0xFF)
|
||||
|
||||
#define noConstraint 0
|
||||
#define hAxisOnly 1
|
||||
#define vAxisOnly 2
|
||||
|
||||
#define drawCntl 0
|
||||
#define testCntl 1
|
||||
#define calcCRgns 2
|
||||
#define initCntl 3
|
||||
#define dispCntl 4
|
||||
#define posCntl 5
|
||||
#define thumbCntl 6
|
||||
#define dragCntl 7
|
||||
#define autoTrack 8
|
||||
enum
|
||||
{
|
||||
calcCntlRgn = 10,
|
||||
calcThumbRgn = 11,
|
||||
};
|
||||
|
||||
/* control color table parts */
|
||||
#define cFrameColor 0
|
||||
#define cBodyColor 1
|
||||
#define cTextColor 2
|
||||
#define cThumbColor 3
|
||||
/* #define ??? 4 */
|
||||
#define cArrowsColorLight 5
|
||||
#define cArrowsColorDark 6
|
||||
#define cThumbLight 7
|
||||
#define cThumbDark 8
|
||||
#define cHiliteLight 9
|
||||
#define cHiliteDark 10
|
||||
#define cTitleBarLight 11
|
||||
#define cTitleBarDark 12
|
||||
#define cTingeLight 13
|
||||
#define cTingeDark 14
|
||||
|
||||
typedef struct __cr ControlRecord;
|
||||
typedef ControlRecord *ControlPtr;
|
||||
typedef struct { ControlPtr p PACKED_P; } HIDDEN_ControlPtr;
|
||||
typedef HIDDEN_ControlPtr *ControlHandle;
|
||||
typedef struct { ControlHandle p PACKED_P; } HIDDEN_ControlHandle;
|
||||
|
||||
#include "WindowMgr.h"
|
||||
|
||||
struct __cr {
|
||||
ControlHandle nextControl PACKED_P; /* actually ControlHandle */
|
||||
WindowPtr contrlOwner PACKED_P;
|
||||
Rect contrlRect PACKED;
|
||||
Byte contrlVis PACKED;
|
||||
Byte contrlHilite PACKED;
|
||||
INTEGER contrlValue PACKED;
|
||||
INTEGER contrlMin PACKED;
|
||||
INTEGER contrlMax PACKED;
|
||||
Handle contrlDefProc PACKED_P;
|
||||
Handle contrlData PACKED_P;
|
||||
ProcPtr contrlAction PACKED_P;
|
||||
LONGINT contrlRfCon PACKED;
|
||||
Str255 contrlTitle PACKED;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
LONGINT ccSeed PACKED;
|
||||
INTEGER ccReserved PACKED;
|
||||
INTEGER ctSize PACKED;
|
||||
cSpecArray ctTable PACKED;
|
||||
} CtlCTab, *CCTabPtr;
|
||||
typedef struct { CCTabPtr p PACKED_P; } HIDDEN_CCTabPtr;
|
||||
typedef HIDDEN_CCTabPtr *CCTabHandle;
|
||||
|
||||
typedef struct AuxCtlRec *AuxCtlPtr;
|
||||
typedef struct { AuxCtlPtr p PACKED_P; } HIDDEN_AuxCtlPtr;
|
||||
typedef HIDDEN_AuxCtlPtr *AuxCtlHandle;
|
||||
typedef struct { AuxCtlHandle p PACKED_P; } HIDDEN_AuxCtlHandle;
|
||||
|
||||
typedef struct AuxCtlRec {
|
||||
AuxCtlHandle acNext PACKED_P;
|
||||
ControlHandle acOwner PACKED_P;
|
||||
CCTabHandle acCTable PACKED_P;
|
||||
INTEGER acFlags PACKED;
|
||||
LONGINT acReserved PACKED;
|
||||
LONGINT acRefCon PACKED;
|
||||
} AuxCtlRec;
|
||||
|
||||
#if !defined (AuxCtlHead_H)
|
||||
extern HIDDEN_AuxCtlHandle AuxCtlHead_H;
|
||||
#endif
|
||||
|
||||
#define AuxCtlHead (AuxCtlHead_H.p)
|
||||
|
||||
#if !defined (__STDC__)
|
||||
extern void SetCTitle();
|
||||
extern void GetCTitle();
|
||||
extern void HideControl();
|
||||
extern void ShowControl();
|
||||
extern void HiliteControl();
|
||||
extern void DrawControls();
|
||||
extern void Draw1Control();
|
||||
extern void UpdtControl();
|
||||
extern ControlHandle NewControl();
|
||||
extern ControlHandle GetNewControl();
|
||||
extern void DisposeControl();
|
||||
extern void KillControls();
|
||||
extern void SetCRefCon();
|
||||
extern LONGINT GetCRefCon();
|
||||
extern void SetCtlAction();
|
||||
extern ProcPtr GetCtlAction();
|
||||
extern INTEGER GetCVariant();
|
||||
extern BOOLEAN GetAuxCtl();
|
||||
extern INTEGER FindControl();
|
||||
extern INTEGER TrackControl();
|
||||
extern INTEGER TestControl();
|
||||
extern void SetCtlValue();
|
||||
extern INTEGER GetCtlValue();
|
||||
extern void SetCtlMin();
|
||||
extern INTEGER GetCtlMin();
|
||||
extern void SetCtlMax();
|
||||
extern INTEGER GetCtlMax();
|
||||
extern void MoveControl();
|
||||
extern void DragControl();
|
||||
extern void SizeControl();
|
||||
#else /* __STDC__ */
|
||||
extern pascal trap void C_SetCTitle( ControlHandle c,
|
||||
StringPtr t ); extern pascal trap void P_SetCTitle( ControlHandle c,
|
||||
StringPtr t );
|
||||
extern pascal trap void C_GetCTitle( ControlHandle c,
|
||||
StringPtr t ); extern pascal trap void P_GetCTitle( ControlHandle c,
|
||||
StringPtr t );
|
||||
extern pascal trap void C_HideControl( ControlHandle c ); extern pascal trap void P_HideControl( ControlHandle c);
|
||||
extern pascal trap void C_ShowControl( ControlHandle c ); extern pascal trap void P_ShowControl( ControlHandle c);
|
||||
extern pascal trap void C_HiliteControl( ControlHandle c,
|
||||
INTEGER state ); extern pascal trap void P_HiliteControl( ControlHandle c,
|
||||
INTEGER state );
|
||||
extern pascal trap void C_DrawControls( WindowPtr w ); extern pascal trap void P_DrawControls( WindowPtr w);
|
||||
extern pascal trap void C_Draw1Control( ControlHandle c ); extern pascal trap void P_Draw1Control( ControlHandle c);
|
||||
extern pascal trap void C_UpdtControl( WindowPtr wp,
|
||||
RgnHandle rh ); extern pascal trap void P_UpdtControl( WindowPtr wp,
|
||||
RgnHandle rh );
|
||||
extern pascal trap ControlHandle C_NewControl( WindowPtr wst, Rect *r,
|
||||
StringPtr title, BOOLEAN vis, INTEGER value, INTEGER min,
|
||||
INTEGER max, INTEGER procid, LONGINT rc );extern pascal trap ControlHandle P_NewControl( WindowPtr wst, Rect *r,
|
||||
StringPtr title, BOOLEAN vis, INTEGER value, INTEGER min,
|
||||
INTEGER max, INTEGER procid, LONGINT rc );
|
||||
extern pascal trap ControlHandle C_GetNewControl(
|
||||
INTEGER cid, WindowPtr wst ); extern pascal trap ControlHandle P_GetNewControl(
|
||||
INTEGER cid, WindowPtr wst );
|
||||
extern pascal trap void C_DisposeControl( ControlHandle c ); extern pascal trap void P_DisposeControl( ControlHandle c);
|
||||
extern pascal trap void C_KillControls( WindowPtr w ); extern pascal trap void P_KillControls( WindowPtr w);
|
||||
extern pascal trap void C_SetCRefCon( ControlHandle c,
|
||||
LONGINT data ); extern pascal trap void P_SetCRefCon( ControlHandle c,
|
||||
LONGINT data );
|
||||
extern pascal trap LONGINT C_GetCRefCon( ControlHandle c ); extern pascal trap LONGINT P_GetCRefCon( ControlHandle c);
|
||||
extern pascal trap void C_SetCtlAction( ControlHandle c,
|
||||
ProcPtr a ); extern pascal trap void P_SetCtlAction( ControlHandle c,
|
||||
ProcPtr a );
|
||||
extern pascal trap ProcPtr C_GetCtlAction( ControlHandle c ); extern pascal trap ProcPtr P_GetCtlAction( ControlHandle c);
|
||||
extern pascal trap INTEGER C_GetCVariant( ControlHandle c ); extern pascal trap INTEGER P_GetCVariant( ControlHandle c);
|
||||
extern pascal trap BOOLEAN C_GetAuxCtl( ControlHandle c,
|
||||
HIDDEN_AuxCtlHandle *acHndl ); extern pascal trap BOOLEAN P_GetAuxCtl( ControlHandle c,
|
||||
AuxCtlHandle acHndl );
|
||||
extern pascal trap INTEGER C_FindControl( Point p,
|
||||
WindowPtr w, HIDDEN_ControlHandle *cp ); extern pascal trap INTEGER P_FindControl( Point p,
|
||||
WindowPtr w, HIDDEN_ControlHandle *cp );
|
||||
extern pascal trap INTEGER C_TrackControl(
|
||||
ControlHandle c, Point p, ProcPtr a ); extern pascal trap INTEGER P_TrackControl(
|
||||
ControlHandle c, Point p, ProcPtr a );
|
||||
extern pascal trap INTEGER C_TestControl(
|
||||
ControlHandle c, Point p ); extern pascal trap INTEGER P_TestControl(
|
||||
ControlHandle c, Point p );
|
||||
extern pascal trap void C_SetCtlValue( ControlHandle c,
|
||||
INTEGER v ); extern pascal trap void P_SetCtlValue( ControlHandle c,
|
||||
INTEGER v );
|
||||
extern pascal trap INTEGER C_GetCtlValue(
|
||||
ControlHandle c ); extern pascal trap INTEGER P_GetCtlValue(
|
||||
ControlHandle c );
|
||||
extern pascal trap void C_SetCtlMin( ControlHandle c,
|
||||
INTEGER v ); extern pascal trap void P_SetCtlMin( ControlHandle c,
|
||||
INTEGER v );
|
||||
extern pascal trap INTEGER C_GetCtlMin( ControlHandle c ); extern pascal trap INTEGER P_GetCtlMin( ControlHandle c);
|
||||
extern pascal trap void C_SetCtlMax( ControlHandle c,
|
||||
INTEGER v ); extern pascal trap void P_SetCtlMax( ControlHandle c,
|
||||
INTEGER v );
|
||||
extern pascal trap INTEGER C_GetCtlMax( ControlHandle c ); extern pascal trap INTEGER P_GetCtlMax( ControlHandle c);
|
||||
extern pascal trap void C_MoveControl( ControlHandle c,
|
||||
INTEGER h, INTEGER v ); extern pascal trap void P_MoveControl( ControlHandle c,
|
||||
INTEGER h, INTEGER v );
|
||||
extern pascal trap void C_DragControl( ControlHandle c,
|
||||
Point p, Rect *limit, Rect *slop, INTEGER axis ); extern pascal trap void P_DragControl( ControlHandle c,
|
||||
Point p, Rect *limit, Rect *slop, INTEGER axis );
|
||||
extern pascal trap void C_SizeControl( ControlHandle c,
|
||||
INTEGER width, INTEGER height ); extern pascal trap void P_SizeControl( ControlHandle c,
|
||||
INTEGER width, INTEGER height );
|
||||
extern pascal trap void C_SetCtlColor (ControlHandle ctl, CCTabHandle ctab);
|
||||
#endif /* __STDC__ */
|
||||
#endif /* __CONTROL__ */
|
||||
47
src/include/DeskMgr.h
Normal file
47
src/include/DeskMgr.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#if !defined (__DESKMGR__)
|
||||
#define __DESKMGR__
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: DeskMgr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#define undoCmd 0
|
||||
#define cutCmd 2
|
||||
#define copyCmd 3
|
||||
#define pasteCmd 4
|
||||
#define clearCmd 5
|
||||
|
||||
#define accEvent 64
|
||||
#define accRun 65
|
||||
#define accMenu 67
|
||||
#define accUndo 68
|
||||
|
||||
#if !defined (SEvtEnb)
|
||||
extern Byte SEvtEnb;
|
||||
#endif
|
||||
|
||||
|
||||
/* DO NOT DELETE THIS LINE */
|
||||
#if !defined (__STDC__)
|
||||
extern INTEGER OpenDeskAcc();
|
||||
extern void CloseDeskAcc();
|
||||
extern void SystemClick();
|
||||
extern BOOLEAN SystemEdit();
|
||||
extern void SystemTask();
|
||||
extern BOOLEAN SystemEvent();
|
||||
extern void SystemMenu();
|
||||
#else /* __STDC__ */
|
||||
extern pascal trap INTEGER C_OpenDeskAcc(
|
||||
Str255 acc ); extern pascal trap INTEGER P_OpenDeskAcc(
|
||||
Str255 acc );
|
||||
extern pascal trap void C_CloseDeskAcc( INTEGER rn ); extern pascal trap void P_CloseDeskAcc( INTEGER rn);
|
||||
extern pascal trap void C_SystemClick( EventRecord *evp, WindowPtr wp ); extern pascal trap void P_SystemClick( EventRecord *evp, WindowPtr wp);
|
||||
extern pascal trap BOOLEAN C_SystemEdit( INTEGER editcmd ); extern pascal trap BOOLEAN P_SystemEdit( INTEGER editcmd);
|
||||
extern pascal trap void C_SystemTask( void ); extern pascal trap void P_SystemTask( void );
|
||||
extern pascal trap BOOLEAN C_SystemEvent( EventRecord *evp ); extern pascal trap BOOLEAN P_SystemEvent( EventRecord *evp);
|
||||
extern pascal trap void C_SystemMenu( LONGINT menu ); extern pascal trap void P_SystemMenu( LONGINT menu);
|
||||
#endif /* __STDC__ */
|
||||
#endif /* __DESKMGR__ */
|
||||
144
src/include/DeviceMgr.h
Normal file
144
src/include/DeviceMgr.h
Normal file
@@ -0,0 +1,144 @@
|
||||
#if !defined (__DEVICEMGR__)
|
||||
#define __DEVICEMGR__
|
||||
|
||||
/*
|
||||
* Copyright 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: DeviceMgr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#include "WindowMgr.h"
|
||||
#include "FileMgr.h"
|
||||
|
||||
/*
|
||||
* Note the structure below is similar to that presented on IM-188,
|
||||
* but I don't use offsets to the routines, but pointers to the routines
|
||||
* directly. This means the size of the structure is larger than one
|
||||
* might expect.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
ProcPtr udrvrOpen;
|
||||
ProcPtr udrvrPrime; /* read and write */
|
||||
ProcPtr udrvrCtl; /* control and killio */
|
||||
ProcPtr udrvrStatus;
|
||||
ProcPtr udrvrClose;
|
||||
Str255 udrvrName;
|
||||
} umacdriver, *umacdriverptr;
|
||||
|
||||
typedef struct {
|
||||
INTEGER drvrFlags PACKED;
|
||||
INTEGER drvrDelay PACKED;
|
||||
INTEGER drvrEMask PACKED;
|
||||
INTEGER drvrMenu PACKED;
|
||||
INTEGER drvrOpen PACKED;
|
||||
INTEGER drvrPrime PACKED;
|
||||
INTEGER drvrCtl PACKED;
|
||||
INTEGER drvrStatus PACKED;
|
||||
INTEGER drvrClose PACKED;
|
||||
char drvrName PACKED;
|
||||
} ramdriver;
|
||||
|
||||
typedef ramdriver *ramdriverptr;
|
||||
typedef struct { ramdriverptr p PACKED_P; } HIDDEN_ramdriverptr;
|
||||
typedef HIDDEN_ramdriverptr *ramdriverhand;
|
||||
|
||||
typedef enum { Open, Prime, Ctl, Stat, Close } DriverRoutineType;
|
||||
|
||||
typedef struct {
|
||||
umacdriverptr dCtlDriver PACKED_P; /* not just Ptr */
|
||||
INTEGER dCtlFlags PACKED;
|
||||
QHdr dCtlQHdr PACKED;
|
||||
LONGINT dCtlPosition PACKED;
|
||||
Handle dCtlStorage PACKED_P;
|
||||
INTEGER dCtlRefNum PACKED;
|
||||
LONGINT dCtlCurTicks PACKED;
|
||||
WindowPtr dCtlWindow PACKED_P;
|
||||
INTEGER dCtlDelay PACKED;
|
||||
INTEGER dCtlEMask PACKED;
|
||||
INTEGER dCtlMenu PACKED;
|
||||
} DCtlEntry, *DCtlPtr;
|
||||
typedef struct { DCtlPtr p PACKED_P; } HIDDEN_DCtlPtr;
|
||||
typedef HIDDEN_DCtlPtr *DCtlHandle;
|
||||
typedef struct { DCtlHandle p PACKED_P; } HIDDEN_DCtlHandle;
|
||||
typedef HIDDEN_DCtlHandle *DCtlHandlePtr;
|
||||
typedef struct { DCtlHandlePtr p PACKED_P; } HIDDEN_DCtlHandlePtr;
|
||||
|
||||
#define asyncTrpBit (1 << 10)
|
||||
#define noQueueBit (1 << 9)
|
||||
|
||||
#define NEEDTIMEBIT (1 << 13)
|
||||
|
||||
#define aRdCmd 2
|
||||
#define aWrCmd 3
|
||||
|
||||
#define killCode 1
|
||||
|
||||
#define NDEVICES 48
|
||||
|
||||
#define abortErr (-27)
|
||||
#define badUnitErr (-21)
|
||||
#define controlErr (-17)
|
||||
#define dInstErr (-26)
|
||||
#define dRemovErr (-25)
|
||||
#define notOpenErr (-28)
|
||||
#define openErr (-23)
|
||||
#define readErr (-19)
|
||||
#define statusErr (-18)
|
||||
#define unitEmptyErr (-22)
|
||||
#define writErr (-20)
|
||||
|
||||
typedef struct {
|
||||
OSErr (*open)();
|
||||
OSErr (*prime)();
|
||||
OSErr (*ctl)();
|
||||
OSErr (*status)();
|
||||
OSErr (*close)();
|
||||
StringPtr name;
|
||||
INTEGER refnum;
|
||||
} driverinfo;
|
||||
|
||||
/*
|
||||
* __ROMlib_otherdrivers is initialized to null, but can be used to allow
|
||||
* extra drivers to be called. Have __ROMlib_otherdrivers point to an array
|
||||
* driverinfo (terminated with a null open field) before you call PBOpen
|
||||
* if you have additional drivers to use.
|
||||
*/
|
||||
|
||||
extern driverinfo *__ROMlib_otherdrivers;
|
||||
|
||||
|
||||
#if !defined (UTableBase_H)
|
||||
extern HIDDEN_DCtlHandlePtr UTableBase_H;
|
||||
extern HIDDEN_Ptr VIA_H;
|
||||
extern INTEGER UnitNtryCnt;
|
||||
extern INTEGER UnitNtryCnt;
|
||||
#endif
|
||||
|
||||
#define UTableBase (UTableBase_H.p)
|
||||
#define VIA (VIA_H.p)
|
||||
|
||||
#if !defined (__STDC__)
|
||||
extern OSErr PBControl();
|
||||
extern OSErr PBStatus();
|
||||
extern OSErr PBKillIO();
|
||||
extern OSErr OpenDriver();
|
||||
extern OSErr CloseDriver();
|
||||
extern OSErr Control();
|
||||
extern OSErr Status();
|
||||
extern OSErr KillIO();
|
||||
extern DCtlHandle GetDCtlEntry();
|
||||
#else /* __STDC__ */
|
||||
extern OSErr PBControl( ParmBlkPtr pbp, BOOLEAN a );
|
||||
extern OSErr PBStatus( ParmBlkPtr pbp, BOOLEAN a );
|
||||
extern OSErr PBKillIO( ParmBlkPtr pbp, BOOLEAN a );
|
||||
extern OSErr OpenDriver( StringPtr name, INTEGER *rnp );
|
||||
extern OSErr CloseDriver( INTEGER rn );
|
||||
extern OSErr Control( INTEGER rn, INTEGER code,
|
||||
Ptr param );
|
||||
extern OSErr Status( INTEGER rn, INTEGER code, Ptr param );
|
||||
extern OSErr KillIO( INTEGER rn );
|
||||
extern DCtlHandle GetDCtlEntry( INTEGER rn );
|
||||
#endif /* __STDC__ */
|
||||
#endif /* __DEVICEMGR__ */
|
||||
208
src/include/DialogMgr.h
Normal file
208
src/include/DialogMgr.h
Normal file
@@ -0,0 +1,208 @@
|
||||
#if !defined (_DIALOG_H_)
|
||||
#define _DIALOG_H_
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: DialogMgr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#include "WindowMgr.h"
|
||||
#include "TextEdit.h"
|
||||
|
||||
#define ctrlItem 4
|
||||
#define btnCtrl 0
|
||||
#define chkCtrl 1
|
||||
#define radCtrl 2
|
||||
#define resCtrl 3
|
||||
#define statText 8
|
||||
#define editText 16
|
||||
#define iconItem 32
|
||||
#define picItem 64
|
||||
#define userItem 0
|
||||
#define itemDisable 128
|
||||
|
||||
#define OK 1
|
||||
#define Cancel 2
|
||||
|
||||
#define stopIcon 0
|
||||
#define noteIcon 1
|
||||
#define cautionIcon 2
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WindowRecord window PACKED;
|
||||
Handle items PACKED_P;
|
||||
TEHandle textH PACKED_P;
|
||||
INTEGER editField PACKED;
|
||||
INTEGER editOpen PACKED;
|
||||
INTEGER aDefItem PACKED;
|
||||
} DialogRecord;
|
||||
typedef DialogRecord *DialogPeek;
|
||||
|
||||
typedef CWindowPtr CDialogPtr;
|
||||
typedef WindowPtr DialogPtr;
|
||||
typedef HIDDEN_WindowPtr HIDDEN_DialogPtr;
|
||||
|
||||
/* dialog record accessors */
|
||||
#define DIALOG_WINDOW(dialog) ((WindowPtr) &((DialogPeek) dialog)->window)
|
||||
|
||||
#define DIALOG_ITEMS_X(dialog) (((DialogPeek) (dialog))->items)
|
||||
#define DIALOG_TEXTH_X(dialog) (((DialogPeek) (dialog))->textH)
|
||||
#define DIALOG_EDIT_FIELD_X(dialog) (((DialogPeek) (dialog))->editField)
|
||||
#define DIALOG_EDIT_OPEN_X(dialog) (((DialogPeek) (dialog))->editOpen)
|
||||
#define DIALOG_ADEF_ITEM_X(dialog) (((DialogPeek) (dialog))->aDefItem)
|
||||
|
||||
#define DIALOG_ITEMS(dialog) (MR (DIALOG_ITEMS_X (dialog)))
|
||||
#define DIALOG_TEXTH(dialog) (MR (DIALOG_TEXTH_X (dialog)))
|
||||
#define DIALOG_EDIT_FIELD(dialog) (CW (DIALOG_EDIT_FIELD_X (dialog)))
|
||||
#define DIALOG_EDIT_OPEN(dialog) (CW (DIALOG_EDIT_OPEN_X (dialog)))
|
||||
#define DIALOG_ADEF_ITEM(dialog) (CW (DIALOG_ADEF_ITEM_X (dialog)))
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Rect boundsRect PACKED;
|
||||
INTEGER procID PACKED;
|
||||
BOOLEAN visible PACKED;
|
||||
BOOLEAN filler1 PACKED;
|
||||
BOOLEAN goAwayFlag PACKED;
|
||||
BOOLEAN filler2 PACKED;
|
||||
LONGINT refCon PACKED;
|
||||
INTEGER itemsID PACKED;
|
||||
Str255 title PACKED;
|
||||
} DialogTemplate;
|
||||
|
||||
typedef DialogTemplate *DialogTPtr;
|
||||
typedef struct { DialogTPtr p PACKED_P; } HIDDEN_DialogTPtr;
|
||||
typedef HIDDEN_DialogTPtr *DialogTHndl;
|
||||
|
||||
typedef struct {
|
||||
unsigned boldItm4: 1 PACKED;
|
||||
unsigned boxDrwn4: 1 PACKED;
|
||||
unsigned sound4: 2 PACKED;
|
||||
unsigned boldItm3: 1 PACKED;
|
||||
unsigned boxDrwn3: 1 PACKED;
|
||||
unsigned sound3: 2 PACKED;
|
||||
unsigned boldItm2: 1 PACKED;
|
||||
unsigned boxDrwn2: 1 PACKED;
|
||||
unsigned sound2: 2 PACKED;
|
||||
unsigned boldItm1: 1 PACKED;
|
||||
unsigned boxDrwn1: 1 PACKED;
|
||||
unsigned sound1: 2 PACKED;
|
||||
} StageList;
|
||||
|
||||
typedef struct {
|
||||
Rect boundsRect PACKED;
|
||||
INTEGER itemsID PACKED;
|
||||
StageList stages PACKED;
|
||||
} AlertTemplate;
|
||||
typedef AlertTemplate *AlertTPtr;
|
||||
typedef struct { AlertTPtr p PACKED_P; } HIDDEN_AlertTPtr;
|
||||
typedef HIDDEN_AlertTPtr *AlertTHndl;
|
||||
|
||||
#define overlayDITL 0
|
||||
#define appendDITLRight 1
|
||||
#define appendDITLBottom 2
|
||||
|
||||
typedef int16 DITLMethod;
|
||||
|
||||
#define TEdoFont 1
|
||||
#define TEdoFace 2
|
||||
#define TEdoSize 4
|
||||
#define TEdoColor 8
|
||||
#define TEdoAll 15
|
||||
|
||||
#define TEaddSize 16
|
||||
|
||||
#define doBColor 8192
|
||||
#define doMode 16384
|
||||
#define doFontName 32768
|
||||
|
||||
#if !defined (ResumeProc_H)
|
||||
extern HIDDEN_ProcPtr ResumeProc_H;
|
||||
extern HIDDEN_ProcPtr DABeeper_H;
|
||||
extern HIDDEN_Handle DAStrings_H[4];
|
||||
extern INTEGER ANumber;
|
||||
extern INTEGER ACount;
|
||||
extern INTEGER DlgFont;
|
||||
#endif
|
||||
|
||||
#define ResumeProc (ResumeProc_H.p)
|
||||
#define DABeeper (DABeeper_H.p)
|
||||
|
||||
extern pascal trap INTEGER C_Alert( INTEGER id,
|
||||
ProcPtr fp );
|
||||
extern pascal trap INTEGER C_StopAlert( INTEGER id,
|
||||
ProcPtr fp );
|
||||
extern pascal trap INTEGER C_NoteAlert( INTEGER id,
|
||||
ProcPtr fp );
|
||||
extern pascal trap INTEGER C_CautionAlert( INTEGER id,
|
||||
ProcPtr fp );
|
||||
extern pascal trap void C_CouldAlert( INTEGER id );
|
||||
extern pascal trap void C_FreeAlert( INTEGER id );
|
||||
extern pascal trap void C_CouldDialog( INTEGER id );
|
||||
extern pascal trap void C_FreeDialog( INTEGER id );
|
||||
extern pascal trap DialogPtr C_NewDialog( Ptr dst,
|
||||
Rect *r, StringPtr tit, BOOLEAN vis, INTEGER procid,
|
||||
WindowPtr behind, BOOLEAN gaflag, LONGINT rc, Handle items );
|
||||
extern pascal trap DialogPtr C_GetNewDialog( INTEGER id,
|
||||
Ptr dst, WindowPtr behind );
|
||||
extern pascal trap void C_CloseDialog( DialogPtr dp );
|
||||
extern pascal trap void C_DisposDialog( DialogPtr dp );
|
||||
extern pascal BOOLEAN C_ROMlib_myfilt( DialogPeek dp, EventRecord *evt,
|
||||
INTEGER *ith );
|
||||
|
||||
extern pascal trap void C_ModalDialog( ProcPtr fp,
|
||||
INTEGER *item );
|
||||
extern pascal trap BOOLEAN C_IsDialogEvent(
|
||||
EventRecord *evt );
|
||||
extern pascal trap void C_DrawDialog( DialogPtr dp );
|
||||
extern pascal trap INTEGER C_FindDItem( DialogPtr dp,
|
||||
Point pt );
|
||||
extern pascal trap void C_UpdtDialog( DialogPtr dp,
|
||||
RgnHandle rgn );
|
||||
extern pascal trap BOOLEAN C_DialogSelect(
|
||||
EventRecord *evt, HIDDEN_DialogPtr *dpp, INTEGER *item );
|
||||
extern void DlgCut( DialogPtr dp );
|
||||
extern void DlgCopy( DialogPtr dp );
|
||||
extern void DlgPaste( DialogPtr dp );
|
||||
extern void DlgDelete( DialogPtr dp );
|
||||
extern pascal void C_ROMlib_mysound( INTEGER i );
|
||||
extern pascal trap void C_ErrorSound( ProcPtr sp );
|
||||
extern pascal trap void C_InitDialogs( ProcPtr rp );
|
||||
extern void SetDAFont( INTEGER i );
|
||||
extern pascal trap void C_ParamText( StringPtr p0,
|
||||
StringPtr p1, StringPtr p2, StringPtr p3 );
|
||||
extern pascal trap void C_GetDItem( DialogPtr dp,
|
||||
INTEGER itemno, INTEGER *itype, HIDDEN_Handle *item, Rect *r );
|
||||
extern pascal trap void C_SetDItem( DialogPtr dp,
|
||||
INTEGER itemno, INTEGER itype, Handle item, Rect *r );
|
||||
extern pascal trap void C_GetIText( Handle item,
|
||||
StringPtr text );
|
||||
extern pascal trap void C_SetIText( Handle item,
|
||||
StringPtr text );
|
||||
extern pascal trap void C_SelIText( DialogPtr dp,
|
||||
INTEGER itemno, INTEGER start, INTEGER stop );
|
||||
extern INTEGER GetAlrtStage( void );
|
||||
extern void ResetAlrtStage( void );
|
||||
extern pascal trap void C_HideDItem( DialogPtr dp,
|
||||
INTEGER item );
|
||||
extern pascal trap void C_ShowDItem( DialogPtr dp,
|
||||
INTEGER item );
|
||||
|
||||
extern pascal trap CDialogPtr C_NewCDialog (Ptr, Rect *, StringPtr, BOOLEAN, INTEGER, WindowPtr, BOOLEAN, LONGINT, Handle);
|
||||
|
||||
extern pascal trap OSErr C_GetStdFilterProc (ProcPtr *proc);
|
||||
extern pascal trap OSErr C_SetDialogDefaultItem (DialogPtr dialog,
|
||||
int16 new_item);
|
||||
extern pascal trap OSErr C_SetDialogCancelItem (DialogPtr dialog,
|
||||
int16 new_item);
|
||||
extern pascal trap OSErr C_SetDialogTracksCursor (DialogPtr dialog,
|
||||
Boolean tracks);
|
||||
|
||||
extern void AppendDITL (DialogPtr, Handle, DITLMethod);
|
||||
extern void ShortenDITL (DialogPtr, int16);
|
||||
extern int16 CountDITL (DialogPtr);
|
||||
|
||||
#endif /* _DIALOG_H_ */
|
||||
63
src/include/Disk.h
Normal file
63
src/include/Disk.h
Normal file
@@ -0,0 +1,63 @@
|
||||
#if !defined (__DISK__)
|
||||
#define __DISK__
|
||||
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: Disk.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#define nsDrvErr (-56)
|
||||
#define paramErr (-50)
|
||||
#define wPrErr (-44)
|
||||
#define firstDskErr (-84)
|
||||
#define sectNFErr (-81)
|
||||
#define seekErr (-80)
|
||||
#define spdAdjErr (-79)
|
||||
#define twoSideErr (-78)
|
||||
#define initIWMErr (-77)
|
||||
#define tk0BadErr (-76)
|
||||
#define cantStepErr (-75)
|
||||
#define wrUnderrun (-74)
|
||||
#define badDBtSlp (-73)
|
||||
#define badDCksum (-72)
|
||||
#define noDtaMkErr (-71)
|
||||
#define badBtSlpErr (-70)
|
||||
#define badCksmErr (-69)
|
||||
#define dataVerErr (-68)
|
||||
#define noAdrMkErr (-67)
|
||||
#define noNybErr (-66)
|
||||
#define offLinErr (-65)
|
||||
#define noDriveErr (-64)
|
||||
#define lastDskErr (-64)
|
||||
|
||||
typedef struct {
|
||||
INTEGER track PACKED;
|
||||
SignedByte writeProt PACKED;
|
||||
SignedByte diskInPlace PACKED;
|
||||
SignedByte installed PACKED;
|
||||
SignedByte sides PACKED;
|
||||
QElemPtr qLink PACKED_P;
|
||||
INTEGER qType PACKED;
|
||||
INTEGER dQDrive PACKED;
|
||||
INTEGER dQRefNum PACKED;
|
||||
INTEGER dQFSID PACKED;
|
||||
SignedByte twoSideFmt PACKED;
|
||||
SignedByte needsFlush PACKED;
|
||||
INTEGER diskErrs PACKED;
|
||||
} DrvSts;
|
||||
|
||||
|
||||
/* DO NOT DELETE THIS LINE */
|
||||
#if !defined (__STDC__)
|
||||
extern OSErr DiskEject();
|
||||
extern OSErr SetTagBuffer();
|
||||
extern OSErr DriveStatus();
|
||||
#else /* __STDC__ */
|
||||
extern OSErr DiskEject( INTEGER rn );
|
||||
extern OSErr SetTagBuffer( Ptr bp );
|
||||
extern OSErr DriveStatus( INTEGER dn, DrvSts *statp );
|
||||
#endif /* __STDC__ */
|
||||
#endif /* __DISK__ */
|
||||
43
src/include/DiskInit.h
Normal file
43
src/include/DiskInit.h
Normal file
@@ -0,0 +1,43 @@
|
||||
#if !defined (__DISKINIT__)
|
||||
#define __DISKINIT__
|
||||
|
||||
#include "QuickDraw.h"
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: DiskInit.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#define badMDBErr (-60)
|
||||
#define extFSErr (-58)
|
||||
#define firstDskErr (-84)
|
||||
#define ioErr (-36)
|
||||
#define lastDskErr (-64)
|
||||
#define memFullErr (-108)
|
||||
#define noMacDskErr (-57)
|
||||
#define nsDrvErr (-56)
|
||||
#define paramErr (-50)
|
||||
#define volOnLinErr (-55)
|
||||
|
||||
|
||||
/* DO NOT DELETE THIS LINE */
|
||||
#if !defined (__STDC__)
|
||||
extern void DILoad();
|
||||
extern void DIUnload();
|
||||
extern INTEGER DIBadMount();
|
||||
extern INTEGER dibadmount();
|
||||
extern OSErr DIFormat();
|
||||
extern OSErr DIVerify();
|
||||
extern OSErr DIZero();
|
||||
#else /* __STDC__ */
|
||||
extern void C_DILoad( void );
|
||||
extern void C_DIUnload( void );
|
||||
extern INTEGER C_DIBadMount( Point pt, LONGINT evtmess );
|
||||
extern INTEGER C_dibadmount( Point *ptp, LONGINT evtmess );
|
||||
extern OSErr C_DIFormat( INTEGER dn );
|
||||
extern OSErr C_DIVerify( INTEGER dn );
|
||||
extern OSErr C_DIZero( INTEGER dn, StringPtr vname );
|
||||
#endif /* __STDC__ */
|
||||
#endif /* __DISKINIT__ */
|
||||
277
src/include/EditionMgr.h
Normal file
277
src/include/EditionMgr.h
Normal file
@@ -0,0 +1,277 @@
|
||||
|
||||
#if !defined (_EDITIONMGR_H_)
|
||||
#define _EDITIONMGR_H_
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990, 1995 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: EditionMgr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#include "IntlUtil.h"
|
||||
#include "AliasMgr.h"
|
||||
|
||||
#define declare_subtypes(type) \
|
||||
typedef struct type ## Record type ## Record; \
|
||||
typedef type ## Record *type ## Ptr; \
|
||||
typedef struct { type ## Ptr p PACKED_P; } HIDDEN_ ## type ## Ptr; \
|
||||
typedef HIDDEN_ ## type ## Ptr * type ## Handle
|
||||
|
||||
#define declare_record_subtypes(type) \
|
||||
typedef struct type type; \
|
||||
typedef type *type ## Ptr; \
|
||||
typedef struct { type ## Ptr p PACKED_P; } HIDDEN_ ## type ## Ptr; \
|
||||
typedef HIDDEN_ ## type ## Ptr * type ## Handle
|
||||
|
||||
typedef int32 TimeStamp;
|
||||
typedef Handle EditionRefNum;
|
||||
typedef int16 UpdateMode;
|
||||
typedef SignedByte SectionType;
|
||||
typedef char FormatType[4];
|
||||
|
||||
typedef ProcPtr ExpDialogHookProcPtr;
|
||||
typedef ProcPtr ExpModalFilterProcPtr;
|
||||
typedef ProcPtr FormatIOProcPtr;
|
||||
typedef ProcPtr EditionOpenerProcPtr;
|
||||
|
||||
struct SectionRecord
|
||||
{
|
||||
SignedByte version PACKED;
|
||||
SectionType kind PACKED;
|
||||
UpdateMode mode PACKED;
|
||||
TimeStamp mdDate PACKED;
|
||||
int32 sectionID PACKED;
|
||||
int32 refCon PACKED;
|
||||
AliasHandle alias PACKED_P;
|
||||
|
||||
int32 subPart PACKED;
|
||||
/* ### Section */ Handle nextSection PACKED_P;
|
||||
Handle controlBlock PACKED_P;
|
||||
EditionRefNum refNum PACKED;
|
||||
};
|
||||
|
||||
declare_record_subtypes (Section);
|
||||
|
||||
struct EditionContainerSpec
|
||||
{
|
||||
FSSpec theFile PACKED;
|
||||
ScriptCode theFileScript PACKED;
|
||||
int32 thePart PACKED;
|
||||
Str31 thePartName PACKED;
|
||||
ScriptCode thePartScript PACKED;
|
||||
};
|
||||
|
||||
typedef struct EditionContainerSpec EditionContainerSpec;
|
||||
typedef EditionContainerSpec *EditionContainerSpecPtr;
|
||||
|
||||
struct EditionInfoRecord
|
||||
{
|
||||
TimeStamp crDate PACKED;
|
||||
TimeStamp mdDate PACKED;
|
||||
OSType fdCreator PACKED;
|
||||
OSType fdType PACKED;
|
||||
EditionContainerSpec container PACKED;
|
||||
};
|
||||
|
||||
typedef struct EditionInfoRecord EditionInfoRecord;
|
||||
typedef EditionInfoRecord *EditionInfoPtr;
|
||||
|
||||
struct NewPublisherReply
|
||||
{
|
||||
Boolean canceled PACKED;
|
||||
Boolean replacing PACKED;
|
||||
Boolean usePart PACKED;
|
||||
uint8 _filler;
|
||||
Handle preview PACKED_P;
|
||||
FormatType previewFormat PACKED;
|
||||
EditionContainerSpec container PACKED;
|
||||
};
|
||||
|
||||
typedef struct NewPublisherReply NewPublisherReply;
|
||||
typedef NewPublisherReply *NewPublisherReplyPtr;
|
||||
|
||||
struct NewSubscriberReply
|
||||
{
|
||||
Boolean canceled PACKED;
|
||||
SignedByte formatsMask PACKED;
|
||||
EditionContainerSpec container PACKED;
|
||||
};
|
||||
|
||||
typedef struct NewSubscriberReply NewSubscriberReply;
|
||||
typedef NewSubscriberReply *NewSubscriberReplyPtr;
|
||||
|
||||
struct SectionOptionsReply
|
||||
{
|
||||
Boolean canceled PACKED;
|
||||
Boolean changed PACKED;
|
||||
SectionHandle sectionH PACKED_P;
|
||||
ResType action PACKED;
|
||||
};
|
||||
|
||||
typedef struct SectionOptionsReply SectionOptionsReply;
|
||||
typedef SectionOptionsReply *SectionOptionsReplyPtr;
|
||||
|
||||
typedef uint8 EditionOpenerVerb;
|
||||
|
||||
#define eoOpen (0)
|
||||
#define eoClose (1)
|
||||
#define eoOpenNew (2)
|
||||
#define eoCloseNew (3)
|
||||
#define eoCanSubscribe (4)
|
||||
|
||||
struct EditionOpenerParamBlock
|
||||
{
|
||||
EditionInfoRecord info PACKED;
|
||||
SectionHandle sectionH PACKED_P;
|
||||
FSSpecPtr document PACKED_P;
|
||||
OSType fdCreator PACKED;
|
||||
int32 ioRefNum PACKED;
|
||||
FormatIOProcPtr ioProc PACKED_P;
|
||||
Boolean success PACKED;
|
||||
SignedByte formatsMask PACKED;
|
||||
};
|
||||
|
||||
typedef struct EditionOpenerParamBlock EditionOpenerParamBlock;
|
||||
typedef EditionOpenerParamBlock *EditionOpenerParamBlockPtr;
|
||||
|
||||
typedef uint8 FormatIOVerb;
|
||||
|
||||
#define ioHasFormat (0)
|
||||
#define ioReadFormat (1)
|
||||
#define ioNewFormat (2)
|
||||
#define ioWtriteFormat (3)
|
||||
|
||||
struct FormatIOParamBlock
|
||||
{
|
||||
int32 ioRefNum PACKED;
|
||||
FormatType format PACKED;
|
||||
int32 formatIndex PACKED;
|
||||
int32 offset PACKED;
|
||||
Ptr buffPtr PACKED_P;
|
||||
int32 buffLen PACKED;
|
||||
};
|
||||
|
||||
typedef struct FormatIOParamBlock FormatIOParamBlock;
|
||||
typedef FormatIOParamBlock *FormatIOParamBlockPtr;
|
||||
|
||||
#define noErr 0
|
||||
#define abortErr (-27)
|
||||
#define eofErr (-39)
|
||||
#define fnfErr (-43)
|
||||
#define flLckedErr (-45)
|
||||
#define fBusyErr (-47)
|
||||
#define paramErr (-50)
|
||||
#define rfNumErr (-51)
|
||||
#define permErr (-54)
|
||||
#define wrPermErr (-61)
|
||||
#define noTypeErr (-102)
|
||||
#define memFullErr (-108)
|
||||
#define userCanceledErr (-128)
|
||||
#define editionMgrInitErr (-450)
|
||||
#define badSectionErr (-451)
|
||||
#define notRegisteredSectionErr (-452)
|
||||
#define badSubPartErr (-454)
|
||||
#define multiplePubliserWrn (-460)
|
||||
#define containerNotFoundWrn (-461)
|
||||
#define notThePublisherWrn (-463)
|
||||
|
||||
extern pascal trap OSErr C_InitEditionPack (INTEGER unused);
|
||||
extern pascal trap OSErr C_NewSection (EditionContainerSpecPtr container,
|
||||
FSSpecPtr section_doc,
|
||||
SectionType kind, int32 section_id,
|
||||
UpdateMode initial_mode,
|
||||
SectionHandle *section_out);
|
||||
extern pascal trap OSErr C_RegisterSection (FSSpecPtr section_doc,
|
||||
SectionHandle section,
|
||||
Boolean *alias_was_updated_p_out);
|
||||
extern pascal trap OSErr C_UnRegisterSection (SectionHandle section);
|
||||
extern pascal trap OSErr C_IsRegisteredSection (SectionHandle section);
|
||||
extern pascal trap OSErr C_AssociateSection (SectionHandle section,
|
||||
FSSpecPtr new_section_doc);
|
||||
extern pascal trap OSErr C_CreateEditionContainerFile
|
||||
(FSSpecPtr edition_file, OSType creator,
|
||||
ScriptCode edition_file_name_script);
|
||||
extern pascal trap OSErr C_DeleteEditionContainerFile (FSSpecPtr edition_file);
|
||||
|
||||
extern pascal trap OSErr C_SetEditionFormatMark (EditionRefNum edition,
|
||||
FormatType format,
|
||||
int32 mark);
|
||||
|
||||
extern pascal trap OSErr C_GetEditionFormatMark (EditionRefNum edition,
|
||||
FormatType format,
|
||||
int32 *currentMark);
|
||||
|
||||
extern pascal trap OSErr C_OpenEdition (SectionHandle subscriber_section,
|
||||
EditionRefNum *ref_num);
|
||||
|
||||
extern pascal trap OSErr C_EditionHasFormat (EditionRefNum edition,
|
||||
FormatType format,
|
||||
Size *format_size);
|
||||
extern pascal trap OSErr C_ReadEdition (EditionRefNum edition,
|
||||
FormatType format,
|
||||
Ptr buffer, Size buffer_size);
|
||||
|
||||
extern pascal trap OSErr C_OpenNewEdition (SectionHandle publisher_section,
|
||||
OSType creator,
|
||||
FSSpecPtr publisher_section_doc,
|
||||
EditionRefNum *ref_num);
|
||||
|
||||
extern pascal trap OSErr C_WriteEdition (EditionRefNum edition, FormatType format,
|
||||
Ptr buffer, Size buffer_size);
|
||||
|
||||
extern pascal trap OSErr C_CloseEdition (EditionRefNum edition, Boolean success_p);
|
||||
|
||||
extern pascal trap OSErr C_GetLastEditionContainerUsed
|
||||
(EditionContainerSpecPtr container);
|
||||
|
||||
extern pascal trap OSErr C_NewSubscriberDialog (NewSubscriberReplyPtr reply);
|
||||
extern pascal trap OSErr C_NewPublisherDialog (NewSubscriberReplyPtr reply);
|
||||
extern pascal trap OSErr C_SectionOptionsDialog (SectionOptionsReply *reply);
|
||||
|
||||
extern pascal trap OSErr C_NewSubscriberExpDialog
|
||||
(NewSubscriberReplyPtr reply, Point where,
|
||||
int16 expnasion_ditl_res_id,
|
||||
ExpDialogHookProcPtr dialog_hook,
|
||||
ExpModalFilterProcPtr filter_hook,
|
||||
Ptr data);
|
||||
|
||||
extern pascal trap OSErr C_NewPublisherExpDialog
|
||||
(NewPublisherReplyPtr reply, Point where,
|
||||
int16 expnasion_ditl_res_id,
|
||||
ExpDialogHookProcPtr dialog_hook,
|
||||
ExpModalFilterProcPtr filter_hook,
|
||||
Ptr data);
|
||||
|
||||
extern pascal trap OSErr C_SectionOptionsExpDialog
|
||||
(SectionOptionsReply *reply,
|
||||
Point where, int16 expnasion_ditl_res_id,
|
||||
ExpDialogHookProcPtr dialog_hook,
|
||||
ExpModalFilterProcPtr filter_hook,
|
||||
Ptr data);
|
||||
|
||||
extern pascal trap OSErr C_GetEditionInfo (SectionHandle section,
|
||||
EditionInfoPtr edition_info);
|
||||
|
||||
extern pascal trap OSErr C_GoToPublisherSection
|
||||
(EditionContainerSpecPtr container);
|
||||
|
||||
extern pascal trap OSErr C_GetStandardFormats (EditionContainerSpecPtr container,
|
||||
FormatType *preview_format,
|
||||
Handle preview,
|
||||
Handle publisher_alias,
|
||||
Handle formats);
|
||||
extern pascal trap OSErr C_GetEditionOpenerProc (EditionOpenerProcPtr *opener);
|
||||
extern pascal trap OSErr C_SetEditionOpenerProc (EditionOpenerProcPtr opener);
|
||||
|
||||
extern pascal trap OSErr C_CallEditionOpenerProc
|
||||
(EditionOpenerVerb selector,
|
||||
EditionOpenerParamBlock *param_block,
|
||||
EditionOpenerProcPtr opener);
|
||||
|
||||
extern pascal trap OSErr C_CallFormatIOProc
|
||||
(FormatIOVerb selector,
|
||||
FormatIOParamBlock *param_block,
|
||||
FormatIOProcPtr proc);
|
||||
|
||||
#endif /* _EDITIONMGR_H_ */
|
||||
78
src/include/EventMgr.h
Normal file
78
src/include/EventMgr.h
Normal file
@@ -0,0 +1,78 @@
|
||||
#if !defined (__EVENT__)
|
||||
#define __EVENT__
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: EventMgr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#include "QuickDraw.h"
|
||||
|
||||
#define nullEvent 0
|
||||
#define mouseDown 1
|
||||
#define mouseUp 2
|
||||
#define keyDown 3
|
||||
#define keyUp 4
|
||||
#define autoKey 5
|
||||
#define updateEvt 6
|
||||
#define diskEvt 7
|
||||
#define activateEvt 8
|
||||
#define networkEvt 10
|
||||
#define driverEvt 11
|
||||
#define app1Evt 12
|
||||
#define app2Evt 13
|
||||
#define app3Evt 14
|
||||
#define app4Evt 15
|
||||
#define kHighLevelEvent 23
|
||||
|
||||
#define charCodeMask 0xFFL
|
||||
#define keyCodeMask 0xFF00L
|
||||
|
||||
#define mDownMask 2
|
||||
#define mUpMask 4
|
||||
#define keyDownMask 8
|
||||
#define keyUpMask 16
|
||||
#define autoKeyMask 32
|
||||
#define updateMask 64
|
||||
#define diskMask 128
|
||||
#define activMask 256
|
||||
/* #define networkMask 1024 */
|
||||
#define highLevelEventMask 1024
|
||||
#define driverMask 2048
|
||||
#define app1Mask 4096
|
||||
#define app2Mask 8192
|
||||
#define app3Mask 16384
|
||||
#define app4Mask (-32768)
|
||||
#define everyEvent (-1)
|
||||
|
||||
#define activeFlag 1
|
||||
#define changeFlag 2
|
||||
#define btnState 128
|
||||
#define cmdKey 256
|
||||
#define shiftKey 512
|
||||
#define alphaLock 1024
|
||||
#define optionKey 2048
|
||||
#define ControlKey 4096 /* IM V-196 */
|
||||
|
||||
enum
|
||||
{
|
||||
rightShiftKey = 0x2000,
|
||||
rightOptionKey = 0x4000,
|
||||
rightControlKey = 0x8000
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
INTEGER what PACKED;
|
||||
LONGINT message PACKED;
|
||||
LONGINT when PACKED;
|
||||
Point where PACKED;
|
||||
INTEGER modifiers PACKED;
|
||||
} EventRecord;
|
||||
|
||||
#if !defined (KeyMap)
|
||||
extern unsigned char KeyMap[16];
|
||||
#endif
|
||||
|
||||
#endif /* __EVENT__ */
|
||||
577
src/include/FileMgr.h
Normal file
577
src/include/FileMgr.h
Normal file
@@ -0,0 +1,577 @@
|
||||
#if !defined (_FILEMGR_H_)
|
||||
#define _FILEMGR_H_
|
||||
|
||||
#include "MacTypes.h"
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: FileMgr.h 86 2005-05-25 00:47:12Z ctm $
|
||||
*/
|
||||
|
||||
#define fOnDesk 1
|
||||
#define fHasBundle 8192
|
||||
#define fInvisible 16384
|
||||
#define fTrash (-3)
|
||||
#define fDesktop (-2)
|
||||
#define fDisk 0
|
||||
|
||||
#define fsCurPerm 0
|
||||
#define fsRdPerm 1
|
||||
#define fsWrPerm 2
|
||||
#define fsRdWrPerm 3
|
||||
#define fsRdWrShPerm 4
|
||||
|
||||
#define fsAtMark 0
|
||||
#define fsFromStart 1
|
||||
#define fsFromLEOF 2
|
||||
#define fsFromMark 3
|
||||
#define rdVerify 64
|
||||
|
||||
#define badMDBErr (-60)
|
||||
#define badMovErr (-122)
|
||||
#define bdNamErr (-37)
|
||||
#define dirFulErr (-33)
|
||||
#define dskFulErr (-34)
|
||||
#define dupFNErr (-48)
|
||||
#define eofErr (-39)
|
||||
#define extFSErr (-58)
|
||||
#define fBsyErr (-47)
|
||||
#define fLckdErr (-45)
|
||||
#define fnfErr (-43)
|
||||
#define fnOpnErr (-38)
|
||||
#define fsRnErr (-59)
|
||||
#define gfpErr (-52)
|
||||
#define ioErr (-36)
|
||||
#define memFullErr (-108)
|
||||
#define noMacDskErr (-57)
|
||||
#define nsDrvErr (-56)
|
||||
#define nsvErr (-35)
|
||||
#define opWrErr (-49)
|
||||
#define paramErr (-50)
|
||||
#define permErr (-54)
|
||||
#define posErr (-40)
|
||||
#define rfNumErr (-51)
|
||||
#define tmfoErr (-42)
|
||||
#define volOffLinErr (-53)
|
||||
#define volOnLinErr (-55)
|
||||
#define vLckdErr (-46)
|
||||
#define wrgVolTypErr (-123)
|
||||
#define wrPermErr (-61)
|
||||
#define wPrErr (-44)
|
||||
#define tmwdoErr (-121)
|
||||
#define dirNFErr (-120)
|
||||
#define fsDSIntErr (-127)
|
||||
|
||||
enum
|
||||
{
|
||||
wrgVolTypeErr = -123,
|
||||
diffVolErr = -1303,
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
OSType fdType PACKED;
|
||||
OSType fdCreator PACKED;
|
||||
unsigned short fdFlags PACKED;
|
||||
Point fdLocation PACKED;
|
||||
unsigned short fdFldr PACKED;
|
||||
} FInfo;
|
||||
|
||||
typedef struct {
|
||||
unsigned short fdIconID PACKED;
|
||||
unsigned short fdUnused[4] PACKED;
|
||||
unsigned short fdComment PACKED;
|
||||
LONGINT fdPutAway PACKED;
|
||||
} FXInfo;
|
||||
|
||||
typedef struct {
|
||||
Rect frRect PACKED;
|
||||
unsigned short frFlags PACKED;
|
||||
Point frLocation PACKED;
|
||||
unsigned short frView PACKED;
|
||||
} DInfo;
|
||||
|
||||
typedef struct {
|
||||
Point frScroll PACKED;
|
||||
LONGINT frOpenChain PACKED;
|
||||
unsigned short frUnused PACKED;
|
||||
unsigned short frComment PACKED;
|
||||
LONGINT frPutAway PACKED;
|
||||
} DXInfo;
|
||||
|
||||
typedef enum {
|
||||
ioParamType,
|
||||
fileParamType,
|
||||
volumeParamType,
|
||||
cntrlParamType
|
||||
} ParamBlkType;
|
||||
|
||||
#define COMMONFSQUEUEDEFS \
|
||||
QElemPtr qLink PACKED_P; \
|
||||
INTEGER qType PACKED; \
|
||||
INTEGER ioTrap PACKED; \
|
||||
Ptr ioCmdAddr PACKED_P; \
|
||||
ProcPtr ioCompletion PACKED_P; \
|
||||
OSErr ioResult PACKED; \
|
||||
StringPtr ioNamePtr PACKED_P; \
|
||||
INTEGER ioVRefNum /* PACKED gets added in by guys who use this macro. */
|
||||
|
||||
typedef struct {
|
||||
COMMONFSQUEUEDEFS PACKED;
|
||||
INTEGER ioRefNum PACKED;
|
||||
SignedByte ioVersNum PACKED;
|
||||
SignedByte ioPermssn PACKED;
|
||||
LONGINT ioMisc PACKED; /* should be largest of Ptr, LONGINT */
|
||||
Ptr ioBuffer PACKED_P;
|
||||
LONGINT ioReqCount PACKED;
|
||||
LONGINT ioActCount PACKED;
|
||||
INTEGER ioPosMode PACKED;
|
||||
LONGINT ioPosOffset PACKED;
|
||||
} ioParam;
|
||||
|
||||
typedef struct {
|
||||
COMMONFSQUEUEDEFS PACKED;
|
||||
INTEGER ioFRefNum PACKED;
|
||||
SignedByte ioFVersNum PACKED;
|
||||
SignedByte filler1 PACKED;
|
||||
INTEGER ioFDirIndex PACKED;
|
||||
SignedByte ioFlAttrib PACKED;
|
||||
SignedByte ioFlVersNum PACKED;
|
||||
FInfo ioFlFndrInfo PACKED;
|
||||
LONGINT ioFlNum PACKED;
|
||||
INTEGER ioFlStBlk PACKED;
|
||||
LONGINT ioFlLgLen PACKED;
|
||||
LONGINT ioFlPyLen PACKED;
|
||||
INTEGER ioFlRStBlk PACKED;
|
||||
LONGINT ioFlRLgLen PACKED;
|
||||
LONGINT ioFlRPyLen PACKED;
|
||||
LONGINT ioFlCrDat PACKED;
|
||||
LONGINT ioFlMdDat PACKED;
|
||||
} fileParam;
|
||||
|
||||
typedef struct {
|
||||
COMMONFSQUEUEDEFS PACKED;
|
||||
LONGINT filler2 PACKED;
|
||||
INTEGER ioVolIndex PACKED;
|
||||
LONGINT ioVCrDate PACKED;
|
||||
LONGINT ioVLsBkUp PACKED;
|
||||
unsigned short ioVAtrb PACKED;
|
||||
unsigned short ioVNmFls PACKED;
|
||||
unsigned short ioVDirSt PACKED;
|
||||
unsigned short ioVBlLn PACKED;
|
||||
unsigned short ioVNmAlBlks PACKED;
|
||||
LONGINT ioVAlBlkSiz PACKED;
|
||||
LONGINT ioVClpSiz PACKED;
|
||||
unsigned short ioAlBlSt PACKED;
|
||||
LONGINT ioVNxtFNum PACKED;
|
||||
unsigned short ioVFrBlk PACKED;
|
||||
} volumeParam;
|
||||
|
||||
typedef struct {
|
||||
COMMONFSQUEUEDEFS PACKED;
|
||||
INTEGER ioCRefNum PACKED;
|
||||
INTEGER csCode PACKED;
|
||||
INTEGER csParam[11] PACKED;
|
||||
} cntrlParam;
|
||||
|
||||
typedef union {
|
||||
ioParam ioParam;
|
||||
fileParam fileParam;
|
||||
volumeParam volumeParam;
|
||||
cntrlParam cntrlParam;
|
||||
} ParamBlockRec;
|
||||
typedef ParamBlockRec *ParmBlkPtr;
|
||||
|
||||
typedef struct {
|
||||
COMMONFSQUEUEDEFS PACKED;
|
||||
INTEGER ioRefNum PACKED;
|
||||
SignedByte ioVersNum PACKED;
|
||||
SignedByte ioPermssn PACKED;
|
||||
LONGINT ioMisc PACKED; /* should be largest of Ptr, LONGINT */
|
||||
Ptr ioBuffer PACKED_P;
|
||||
LONGINT ioReqCount PACKED;
|
||||
LONGINT ioActCount PACKED;
|
||||
INTEGER ioPosMode PACKED;
|
||||
LONGINT ioPosOffset PACKED;
|
||||
} HIoParam;
|
||||
|
||||
typedef struct {
|
||||
COMMONFSQUEUEDEFS PACKED;
|
||||
INTEGER ioFRefNum PACKED;
|
||||
SignedByte ioFVersNum PACKED;
|
||||
SignedByte filler1 PACKED;
|
||||
INTEGER ioFDirIndex PACKED;
|
||||
SignedByte ioFlAttrib PACKED;
|
||||
SignedByte ioFlVersNum PACKED;
|
||||
FInfo ioFlFndrInfo PACKED;
|
||||
/*-->*/ LONGINT ioDirID PACKED;
|
||||
INTEGER ioFlStBlk PACKED;
|
||||
LONGINT ioFlLgLen PACKED;
|
||||
LONGINT ioFlPyLen PACKED;
|
||||
INTEGER ioFlRStBlk PACKED;
|
||||
LONGINT ioFlRLgLen PACKED;
|
||||
LONGINT ioFlRPyLen PACKED;
|
||||
LONGINT ioFlCrDat PACKED;
|
||||
LONGINT ioFlMdDat PACKED;
|
||||
} HFileParam;
|
||||
|
||||
typedef struct {
|
||||
COMMONFSQUEUEDEFS PACKED;
|
||||
LONGINT pfiller2 PACKED;
|
||||
INTEGER ioVolIndex PACKED;
|
||||
LONGINT ioVCrDate PACKED;
|
||||
/*-->*/ LONGINT ioVLsMod PACKED;
|
||||
INTEGER ioVAtrb PACKED;
|
||||
unsigned short ioVNmFls PACKED;
|
||||
/*-->*/ unsigned short ioVBitMap PACKED;
|
||||
/*-->*/ unsigned short ioVAllocPtr PACKED;
|
||||
unsigned short ioVNmAlBlks PACKED;
|
||||
LONGINT ioVAlBlkSiz PACKED;
|
||||
LONGINT ioVClpSiz PACKED;
|
||||
unsigned short ioAlBlSt PACKED;
|
||||
/*-->*/ LONGINT ioVNxtCNID PACKED;
|
||||
unsigned short ioVFrBlk PACKED;
|
||||
/*-->*/ unsigned short ioVSigWord PACKED;
|
||||
/*-->*/ INTEGER ioVDrvInfo PACKED;
|
||||
/*-->*/ INTEGER ioVDRefNum PACKED;
|
||||
/*-->*/ INTEGER ioVFSID PACKED;
|
||||
/*-->*/ LONGINT ioVBkUp PACKED;
|
||||
/*-->*/ unsigned short ioVSeqNum PACKED;
|
||||
/*-->*/ LONGINT ioVWrCnt PACKED;
|
||||
/*-->*/ LONGINT ioVFilCnt PACKED;
|
||||
/*-->*/ LONGINT ioVDirCnt PACKED;
|
||||
/*-->*/ LONGINT ioVFndrInfo[8] PACKED;
|
||||
} HVolumeParam;
|
||||
|
||||
typedef union {
|
||||
HIoParam ioParam;
|
||||
HFileParam fileParam;
|
||||
HVolumeParam volumeParam;
|
||||
} HParamBlockRec;
|
||||
typedef HParamBlockRec *HParmBlkPtr;
|
||||
|
||||
typedef enum { hfileInfo, dirInfo } CInfoType;
|
||||
|
||||
#define COMMONCINFODEFS \
|
||||
COMMONFSQUEUEDEFS PACKED; \
|
||||
INTEGER ioFRefNum PACKED; \
|
||||
SignedByte ioFVersNum PACKED; \
|
||||
SignedByte filler1 PACKED; \
|
||||
INTEGER ioFDirIndex PACKED; \
|
||||
SignedByte ioFlAttrib PACKED; \
|
||||
SignedByte ioACUser /* PACKED gets added in by guys who use this macro. */
|
||||
|
||||
typedef struct {
|
||||
COMMONCINFODEFS PACKED;
|
||||
FInfo ioFlFndrInfo PACKED;
|
||||
LONGINT ioDirID PACKED;
|
||||
INTEGER ioFlStBlk PACKED;
|
||||
LONGINT ioFlLgLen PACKED;
|
||||
LONGINT ioFlPyLen PACKED;
|
||||
INTEGER ioFlRStBlk PACKED;
|
||||
LONGINT ioFlRLgLen PACKED;
|
||||
LONGINT ioFlRPyLen PACKED;
|
||||
LONGINT ioFlCrDat PACKED;
|
||||
LONGINT ioFlMdDat PACKED;
|
||||
LONGINT ioFlBkDat PACKED;
|
||||
FXInfo ioFlXFndrInfo PACKED;
|
||||
LONGINT ioFlParID PACKED;
|
||||
LONGINT ioFlClpSiz PACKED;
|
||||
} HFileInfo;
|
||||
|
||||
typedef struct {
|
||||
COMMONCINFODEFS PACKED;
|
||||
DInfo ioDrUsrWds PACKED;
|
||||
LONGINT ioDrDirID PACKED;
|
||||
unsigned short ioDrNmFls PACKED;
|
||||
unsigned short filler3[9] PACKED;
|
||||
LONGINT ioDrCrDat PACKED;
|
||||
LONGINT ioDrMdDat PACKED;
|
||||
LONGINT ioDrBkDat PACKED;
|
||||
DXInfo ioDrFndrInfo PACKED;
|
||||
LONGINT ioDrParID PACKED;
|
||||
} DirInfo;
|
||||
|
||||
typedef union {
|
||||
HFileInfo hFileInfo;
|
||||
DirInfo dirInfo;
|
||||
} CInfoPBRec;
|
||||
typedef CInfoPBRec *CInfoPBPtr;
|
||||
|
||||
typedef struct {
|
||||
COMMONFSQUEUEDEFS PACKED;
|
||||
LONGINT filler1 PACKED;
|
||||
StringPtr ioNewName PACKED_P;
|
||||
LONGINT filler2 PACKED;
|
||||
LONGINT ioNewDirID PACKED;
|
||||
LONGINT filler3[2] PACKED;
|
||||
LONGINT ioDirID PACKED;
|
||||
} CMovePBRec;
|
||||
typedef CMovePBRec *CMovePBPtr;
|
||||
|
||||
typedef struct {
|
||||
COMMONFSQUEUEDEFS PACKED;
|
||||
unsigned short filler1 PACKED; /* should be INTEGER */
|
||||
INTEGER ioWDIndex PACKED;
|
||||
LONGINT ioWDProcID PACKED;
|
||||
INTEGER ioWDVRefNum PACKED;
|
||||
INTEGER filler2[7] PACKED;
|
||||
LONGINT ioWDDirID PACKED;
|
||||
} WDPBRec;
|
||||
typedef WDPBRec *WDPBPtr;
|
||||
|
||||
typedef struct {
|
||||
COMMONFSQUEUEDEFS PACKED;
|
||||
INTEGER ioRefNum PACKED;
|
||||
unsigned short filler PACKED;
|
||||
INTEGER ioFCBIndx PACKED;
|
||||
INTEGER ioFCBobnoxiousfiller PACKED; /* ACK! not in IMIV PACKED, but ThinkC+MPW */
|
||||
LONGINT ioFCBFlNm PACKED;
|
||||
unsigned short ioFCBFlags PACKED;
|
||||
INTEGER ioFCBStBlk PACKED;
|
||||
LONGINT ioFCBEOF PACKED;
|
||||
LONGINT ioFCBPLen PACKED;
|
||||
LONGINT ioFCBCrPs PACKED;
|
||||
INTEGER ioFCBVRefNum PACKED;
|
||||
LONGINT ioFCBClpSiz PACKED;
|
||||
LONGINT ioFCBParID PACKED;
|
||||
} FCBPBRec;
|
||||
typedef FCBPBRec *FCBPBPtr;
|
||||
|
||||
typedef struct {
|
||||
QElemPtr qLink PACKED_P; /* 0 */
|
||||
INTEGER qType PACKED; /* 4 */
|
||||
unsigned short vcbFlags PACKED; /* 6 */
|
||||
unsigned short vcbSigWord PACKED; /* 8 */
|
||||
LONGINT vcbCrDate PACKED; /* 10 */
|
||||
LONGINT vcbLsMod PACKED; /* 14 */
|
||||
unsigned short vcbAtrb PACKED; /* 18 */
|
||||
unsigned short vcbNmFls PACKED; /* 20 */
|
||||
unsigned short vcbVBMSt PACKED; /* 22 */
|
||||
unsigned short vcbAllocPtr PACKED; /* 24 */
|
||||
unsigned short vcbNmAlBlks PACKED; /* 26 */
|
||||
LONGINT vcbAlBlkSiz PACKED; /* 28 */
|
||||
LONGINT vcbClpSiz PACKED; /* 32 */
|
||||
unsigned short vcbAlBlSt PACKED; /* 36 */
|
||||
LONGINT vcbNxtCNID PACKED; /* 38 */
|
||||
unsigned short vcbFreeBks PACKED; /* 42 */
|
||||
Byte vcbVN[28] PACKED; /* 44 */
|
||||
INTEGER vcbDrvNum PACKED; /* 72 */
|
||||
INTEGER vcbDRefNum PACKED; /* 74 */
|
||||
INTEGER vcbFSID PACKED; /* 76 */
|
||||
INTEGER vcbVRefNum PACKED; /* 78 */
|
||||
Ptr vcbMAdr PACKED_P;
|
||||
Ptr vcbBufAdr PACKED_P;
|
||||
unsigned short vcbMLen PACKED;
|
||||
INTEGER vcbDirIndex PACKED;
|
||||
unsigned short vcbDirBlk PACKED;
|
||||
LONGINT vcbVolBkUp PACKED;
|
||||
unsigned short vcbVSeqNum PACKED;
|
||||
LONGINT vcbWrCnt PACKED;
|
||||
LONGINT vcbXTClpSiz PACKED;
|
||||
LONGINT vcbCTClpSiz PACKED;
|
||||
unsigned short vcbNmRtDirs PACKED;
|
||||
LONGINT vcbFilCnt PACKED;
|
||||
LONGINT vcbDirCnt PACKED;
|
||||
LONGINT vcbFndrInfo[8] PACKED;
|
||||
unsigned short vcbVCSize PACKED;
|
||||
unsigned short vcbVBMCSiz PACKED;
|
||||
unsigned short vcbCtlCSiz PACKED;
|
||||
unsigned short vcbXTAlBlks PACKED;
|
||||
unsigned short vcbCTAlBlks PACKED;
|
||||
INTEGER vcbXTRef PACKED;
|
||||
INTEGER vcbCTRef PACKED;
|
||||
Ptr vcbCtlBuf PACKED_P;
|
||||
LONGINT vcbDirIDM PACKED;
|
||||
unsigned short vcbOffsM PACKED;
|
||||
} VCB;
|
||||
|
||||
typedef VCB *VCBPtr;
|
||||
typedef struct { VCBPtr p PACKED_P; } HIDDEN_VCBPtr;
|
||||
|
||||
typedef struct {
|
||||
QElemPtr qLink PACKED_P;
|
||||
INTEGER qType PACKED;
|
||||
INTEGER dQDrive PACKED;
|
||||
INTEGER dQRefNum PACKED;
|
||||
INTEGER dQFSID PACKED;
|
||||
unsigned short dQDrvSz PACKED;
|
||||
unsigned short dQDrvSz2 PACKED;
|
||||
} DrvQEl;
|
||||
|
||||
/* data types introduced by the new high level file system dispatch
|
||||
traps */
|
||||
|
||||
struct FSSpec
|
||||
{
|
||||
INTEGER vRefNum PACKED;
|
||||
LONGINT parID PACKED;
|
||||
Str63 name PACKED;
|
||||
};
|
||||
|
||||
typedef struct FSSpec FSSpec;
|
||||
typedef FSSpec *FSSpecPtr;
|
||||
typedef FSSpecPtr FSSpecArrayPtr;
|
||||
|
||||
#if !defined (FCBSPtr_H)
|
||||
extern HIDDEN_Ptr FCBSPtr_H;
|
||||
extern HIDDEN_VCBPtr DefVCBPtr_H;
|
||||
extern HIDDEN_Ptr WDCBsPtr_H;
|
||||
extern INTEGER BootDrive;
|
||||
extern QHdr DrvQHdr;
|
||||
extern QHdr VCBQHdr;
|
||||
extern QHdr FSQHdr;
|
||||
extern INTEGER DefVRefNum;
|
||||
extern INTEGER FSFCBLen;
|
||||
#endif
|
||||
|
||||
#define FCBSPtr (FCBSPtr_H.p)
|
||||
#define DefVCBPtr (DefVCBPtr_H.p)
|
||||
#define WDCBsPtr (WDCBsPtr_H.p)
|
||||
|
||||
extern OSErr FSOpen( StringPtr filen, INTEGER vrn, INTEGER *rn );
|
||||
extern OSErr OpenRF( StringPtr filen, INTEGER vrn, INTEGER *rn );
|
||||
extern OSErr FSRead( INTEGER rn, LONGINT *count, Ptr buffp );
|
||||
extern OSErr FSWrite( INTEGER rn, LONGINT *count, Ptr buffp );
|
||||
extern OSErr GetFPos( INTEGER rn, LONGINT *filep );
|
||||
extern OSErr SetFPos( INTEGER rn, INTEGER posmode, LONGINT possoff );
|
||||
extern OSErr GetEOF( INTEGER rn, LONGINT *eof );
|
||||
extern OSErr SetEOF( INTEGER rn, LONGINT eof );
|
||||
extern OSErr Allocate( INTEGER rn, LONGINT *count );
|
||||
extern OSErr AllocContig( INTEGER rn, LONGINT *count );
|
||||
extern OSErr FSClose( INTEGER rn );
|
||||
extern void ROMlib_rewinddir( void );
|
||||
extern char *ROMlib_newunixfrommac( char *ip, INTEGER n );
|
||||
extern trap OSErrRET OpenDeny( HParmBlkPtr pb, BOOLEAN a );
|
||||
extern trap OSErrRET PBHGetLogInInfo( HParmBlkPtr pb, BOOLEAN a );
|
||||
extern trap OSErrRET PBHGetDirAccess( HParmBlkPtr pb, BOOLEAN a );
|
||||
extern trap OSErrRET PBHCopyFile( HParmBlkPtr pb, BOOLEAN a );
|
||||
extern trap OSErrRET PBHMapID( HParmBlkPtr pb, BOOLEAN a );
|
||||
extern trap OSErrRET PBHMapName( HParmBlkPtr pb, BOOLEAN a );
|
||||
extern trap OSErrRET PBHSetDirAccess( HParmBlkPtr pb, BOOLEAN a );
|
||||
extern trap OSErrRET PBHMoveRename( HParmBlkPtr pb, BOOLEAN a );
|
||||
extern OSErr Create (StringPtr filen, INTEGER vrn, OSType creator,
|
||||
OSType filtyp );
|
||||
extern OSErr FSDelete( StringPtr filen, INTEGER vrn );
|
||||
extern OSErr GetFInfo( StringPtr filen, INTEGER vrn, FInfo *fndrinfo );
|
||||
extern OSErr HGetFInfo (INTEGER vref, LONGINT dirid, Str255 name,
|
||||
FInfo *fndrinfo);
|
||||
extern OSErr SetFInfo( StringPtr filen, INTEGER vrn,
|
||||
FInfo *fndrinfo );
|
||||
extern OSErr SetFLock( StringPtr filen, INTEGER vrn );
|
||||
extern OSErr RstFLock( StringPtr filen, INTEGER vrn );
|
||||
extern OSErr Rename( StringPtr filen, INTEGER vrn,
|
||||
StringPtr newf );
|
||||
extern unsigned char ROMlib_fromhex( unsigned char c );
|
||||
extern INTEGER ROMlib_UNIX7_to_Mac( char *name, INTEGER length );
|
||||
extern trap void FInitQueue( void );
|
||||
extern trap QHdrPtr GetFSQHdr( void );
|
||||
extern trap QHdrPtr GetVCBQHdr( void );
|
||||
extern trap QHdrPtr GetDrvQHdr( void );
|
||||
extern OSErr GetVInfo( INTEGER drv, StringPtr voln,
|
||||
INTEGER *vrn, LONGINT *freeb );
|
||||
extern OSErr GetVRefNum( INTEGER prn, INTEGER *vrn );
|
||||
extern OSErr GetVol( StringPtr voln, INTEGER *vrn );
|
||||
extern OSErr SetVol( StringPtr voln, INTEGER vrn );
|
||||
extern OSErr FlushVol( StringPtr voln, INTEGER vrn );
|
||||
extern OSErr UnmountVol( StringPtr voln, INTEGER vrn );
|
||||
extern OSErr Eject( StringPtr voln, INTEGER vrn );
|
||||
extern trap OSErrRET PBHRename( HParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBHCreate( HParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBDirCreate( HParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBHDelete( HParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBRead( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBWrite( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBClose( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBHOpen( HParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBOpenDF( HParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBHOpenRF( HParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBGetCatInfo( CInfoPBPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBSetCatInfo( CInfoPBPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBCatMove( CMovePBPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBGetVInfo( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBUnmountVol( ParmBlkPtr pb );
|
||||
extern trap OSErrRET PBEject( ParmBlkPtr pb );
|
||||
extern trap OSErrRET PBAllocate( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBAllocContig( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBHGetFInfo( HParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBSetEOF( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBOpen( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBOpenRF( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBLockRange( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBUnlockRange( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBGetFPos( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBSetFPos( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBGetEOF( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBFlushFile( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBCreate( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBDelete( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBOpenWD( WDPBPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBCloseWD( WDPBPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBGetWDInfo( WDPBPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBGetFInfo( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBSetFInfo( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBHSetFInfo( HParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBSetFLock( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBHSetFLock( HParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBRstFLock( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBHRstFLock( HParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBSetFVers( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBRename( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBGetFCBInfo( FCBPBPtr pb, BOOLEAN async );
|
||||
extern trap OSErr PBMountVol( ParmBlkPtr pb );
|
||||
extern trap OSErrRET PBHGetVInfo( HParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBHGetVolParms( HParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBSetVInfo( HParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBGetVol( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBHGetVol( WDPBPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBSetVol( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBHSetVol( WDPBPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBFlushVol( ParmBlkPtr pb, BOOLEAN async );
|
||||
extern trap OSErrRET PBOffLine( ParmBlkPtr pb );
|
||||
extern trap OSErrRET PBExchangeFiles (ParmBlkPtr pb, BOOLEAN async);
|
||||
extern trap OSErrRET PBCatSearch (ParmBlkPtr pb, BOOLEAN async);
|
||||
extern trap OSErrRET PBCreateFileIDRef (ParmBlkPtr pb, BOOLEAN async);
|
||||
extern trap OSErrRET PBDeleteFileIDRef (ParmBlkPtr pb, BOOLEAN async);
|
||||
extern trap OSErrRET PBResolveFileIDRef (ParmBlkPtr pb, BOOLEAN async);
|
||||
|
||||
/* prototypes for the high level filesystem dispatch traps */
|
||||
extern pascal trap OSErr C_FSMakeFSSpec (int16 vRefNum, int32 dir_id,
|
||||
Str255 file_name, FSSpecPtr spec);
|
||||
extern pascal trap OSErr C_FSpExchangeFiles (FSSpecPtr src, FSSpecPtr dst);
|
||||
extern pascal trap OSErr C_FSpOpenDF (FSSpecPtr spec, SignedByte perms,
|
||||
int16 *refNum_out);
|
||||
extern pascal trap OSErr C_FSpOpenRF (FSSpecPtr spec, SignedByte perms,
|
||||
int16 *refNum_out);
|
||||
extern pascal trap OSErr C_FSpCreate (FSSpecPtr spec,
|
||||
OSType creator, OSType file_type,
|
||||
ScriptCode script);
|
||||
extern pascal trap OSErr C_FSpDirCreate (FSSpecPtr spec, ScriptCode script,
|
||||
int32 *created_dir_id);
|
||||
extern pascal trap OSErr C_FSpDelete (FSSpecPtr spec);
|
||||
|
||||
extern pascal trap OSErr C_FSpGetFInfo (FSSpecPtr spec, FInfo *fndr_info);
|
||||
extern pascal trap OSErr C_FSpSetFInfo (FSSpecPtr spec, FInfo *fndr_info);
|
||||
extern pascal trap OSErr C_FSpSetFLock (FSSpecPtr spec);
|
||||
extern pascal trap OSErr C_FSpRstFLock (FSSpecPtr spec);
|
||||
extern pascal trap OSErr C_FSpRename (FSSpecPtr spec, Str255 new_name);
|
||||
extern pascal trap OSErr C_FSpCatMove (FSSpecPtr src, FSSpecPtr dst);
|
||||
extern pascal trap void C_FSpCreateResFile (FSSpecPtr spec,
|
||||
OSType creator, OSType file_type,
|
||||
ScriptCode script);
|
||||
extern pascal trap INTEGER C_FSpOpenResFile (FSSpecPtr spec, SignedByte perms);
|
||||
extern pascal trap INTEGER C_HOpenResFile (INTEGER vref, LONGINT dirid,
|
||||
Str255 file_name, SignedByte perm);
|
||||
extern pascal trap void C_HCreateResFile (INTEGER vrefnum, LONGINT parid,
|
||||
Str255 name);
|
||||
|
||||
extern OSErr HCreate (INTEGER vref, LONGINT dirid, Str255 name, OSType creator,
|
||||
OSType type);
|
||||
extern OSErr HOpenRF (INTEGER vref, LONGINT dirid, Str255 name,
|
||||
SignedByte perm, INTEGER *refp);
|
||||
|
||||
extern OSErr GetWDInfo (INTEGER wd, INTEGER *vrefp, LONGINT *dirp,
|
||||
LONGINT *procp);
|
||||
|
||||
#endif /* _FILEMGR_H_ */
|
||||
57
src/include/Finder.h
Normal file
57
src/include/Finder.h
Normal file
@@ -0,0 +1,57 @@
|
||||
#if !defined (_FINDER_H_)
|
||||
#define _FINDER_H_
|
||||
|
||||
/*
|
||||
* Copyright 1995 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: Finder.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
QElemPtr qLink PACKED;
|
||||
INTEGER qType PACKED;
|
||||
Ptr ioCmdAddr PACKED;
|
||||
ProcPtr ioCompletion PACKED;
|
||||
OSErr ioResult PACKED;
|
||||
StringPtr ioNamePtr PACKED;
|
||||
INTEGER ioVRefNum PACKED;
|
||||
INTEGER ioDTRefNum PACKED;
|
||||
INTEGER ioIndex PACKED;
|
||||
LONGINT ioTagInfo PACKED;
|
||||
Ptr ioDTBuffer PACKED;
|
||||
LONGINT ioDTReqCount PACKED;
|
||||
LONGINT ioDTActCount PACKED;
|
||||
SignedByte filler1 PACKED;
|
||||
SignedByte ioIconType PACKED;
|
||||
INTEGER filler2 PACKED;
|
||||
LONGINT ioDirID PACKED;
|
||||
OSType ioFileCreator PACKED;
|
||||
OSType ioFileType PACKED;
|
||||
LONGINT ioFiller3 PACKED;
|
||||
LONGINT ioDTLgLen PACKED;
|
||||
LONGINT ioDTPyLen PACKED;
|
||||
INTEGER ioFiller4[14] PACKED;
|
||||
LONGINT ioAPPLParID PACKED;
|
||||
}
|
||||
DTPBRec, *DTPBRecPtr, *DTPBPtr;
|
||||
|
||||
extern OSErr PBDTGetPath (DTPBPtr dtp);
|
||||
extern OSErr PBDTOpenInform (DTPBPtr dtp);
|
||||
extern OSErr PBDTCloseDown (DTPBPtr dtp);
|
||||
extern OSErr PBDTGetIcon (DTPBPtr dtp, BOOLEAN async);
|
||||
extern OSErr PBDTGetIconInfo (DTPBPtr dtp, BOOLEAN async);
|
||||
extern OSErr PBDTGetAPPL (DTPBPtr dtp, BOOLEAN async);
|
||||
extern OSErr PBDTGetComment (DTPBPtr dtp, BOOLEAN async);
|
||||
extern OSErr PBDTAddIcon (DTPBPtr dtp, BOOLEAN async);
|
||||
extern OSErr PBDTAddAPPL (DTPBPtr dtp, BOOLEAN async);
|
||||
extern OSErr PBDTSetComment (DTPBPtr dtp, BOOLEAN async);
|
||||
extern OSErr PBDTRemoveAPPL (DTPBPtr dtp, BOOLEAN async);
|
||||
extern OSErr PBDTRemoveComment (DTPBPtr dtp, BOOLEAN async);
|
||||
extern OSErr PBDTFlush (DTPBPtr dtp, BOOLEAN async);
|
||||
extern OSErr PBDTGetInfo (DTPBPtr dtp, BOOLEAN async);
|
||||
extern OSErr PBDTReset (DTPBPtr dtp, BOOLEAN async);
|
||||
extern OSErr PBDTDelete (DTPBPtr dtp, BOOLEAN async);
|
||||
|
||||
#endif
|
||||
222
src/include/FontMgr.h
Normal file
222
src/include/FontMgr.h
Normal file
@@ -0,0 +1,222 @@
|
||||
#if !defined (_FONTMGR_H_)
|
||||
#define _FONTMGR_H_
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: FontMgr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#include "QuickDraw.h"
|
||||
|
||||
#define systemFont 0
|
||||
#define applFont 1
|
||||
#define newYork 2
|
||||
#define geneva 3
|
||||
#define monaco 4
|
||||
#define venice 5
|
||||
#define london 6
|
||||
#define athens 7
|
||||
#define sanFran 8
|
||||
#define toronto 9
|
||||
#define cairo 11
|
||||
#define losAngeles 12
|
||||
|
||||
#if !defined (NEXT)
|
||||
#define times 20
|
||||
#else /* NEXT */
|
||||
#define timesFont 20
|
||||
#endif /* NEXT */
|
||||
|
||||
#define helvetica 21
|
||||
#define courier 22
|
||||
#define symbol 23
|
||||
#define taliesin 24
|
||||
|
||||
#define commandMark 0x11
|
||||
#define checkMark 0x12
|
||||
#define diamondMark 0x13
|
||||
#define appleMark 0x14
|
||||
|
||||
#define propFont ((INTEGER) 0x9000)
|
||||
#define prpFntH ((INTEGER) 0x9001)
|
||||
#define prpFntW ((INTEGER) 0x9002)
|
||||
#define prpFntHW ((INTEGER) 0x9003)
|
||||
|
||||
#define fixedFont ((INTEGER) 0xB000)
|
||||
#define fxdFntH ((INTEGER) 0xB001)
|
||||
#define fxdFntW ((INTEGER) 0xB002)
|
||||
#define fxdFntHW ((INTEGER) 0xB003)
|
||||
|
||||
#define fontWid ((INTEGER) 0xACB0)
|
||||
|
||||
typedef struct {
|
||||
Fixed ascent PACKED;
|
||||
Fixed descent PACKED;
|
||||
Fixed leading PACKED;
|
||||
Fixed widMax PACKED;
|
||||
Handle wTabHandle PACKED_P;
|
||||
} FMetricRec;
|
||||
|
||||
typedef struct {
|
||||
INTEGER ffFlags PACKED;
|
||||
INTEGER ffFamID PACKED;
|
||||
INTEGER ffFirstChar PACKED;
|
||||
INTEGER ffLastChar PACKED;
|
||||
INTEGER ffAscent PACKED;
|
||||
INTEGER ffDescent PACKED;
|
||||
INTEGER ffLeading PACKED;
|
||||
INTEGER ffWidMax PACKED;
|
||||
LONGINT ffWTabOff PACKED;
|
||||
LONGINT ffKernOff PACKED;
|
||||
LONGINT ffStylOff PACKED;
|
||||
INTEGER ffProperty[9] PACKED;
|
||||
INTEGER ffIntl[2] PACKED;
|
||||
INTEGER ffVersion PACKED;
|
||||
/* FontAssoc ffAssoc PACKED; */
|
||||
/* WidTable ffWidthTab PACKED; */
|
||||
/* StyleTable ffStyTab PACKED; */
|
||||
/* KernTable ffKernTab PACKED; */
|
||||
} FamRec;
|
||||
|
||||
typedef struct {
|
||||
Fixed tabData[256] PACKED;
|
||||
Handle tabFont PACKED_P;
|
||||
LONGINT sExtra PACKED;
|
||||
LONGINT style PACKED;
|
||||
INTEGER fID PACKED;
|
||||
INTEGER fSize PACKED;
|
||||
INTEGER face PACKED;
|
||||
INTEGER device PACKED;
|
||||
Point inNumer PACKED;
|
||||
Point inDenom PACKED;
|
||||
INTEGER aFID PACKED;
|
||||
Handle fHand PACKED_P;
|
||||
BOOLEAN usedFam PACKED;
|
||||
Byte aFace PACKED;
|
||||
INTEGER vOutput PACKED;
|
||||
INTEGER hOutput PACKED;
|
||||
INTEGER vFactor PACKED;
|
||||
INTEGER hFactor PACKED;
|
||||
INTEGER aSize PACKED;
|
||||
INTEGER tabSize PACKED;
|
||||
} WidthTable;
|
||||
|
||||
|
||||
typedef struct {
|
||||
INTEGER family PACKED;
|
||||
INTEGER size PACKED;
|
||||
Style face PACKED;
|
||||
BOOLEAN needBits PACKED;
|
||||
INTEGER device PACKED;
|
||||
Point numer PACKED;
|
||||
Point denom PACKED;
|
||||
} FMInput;
|
||||
|
||||
typedef struct {
|
||||
INTEGER errNum PACKED; /* 0x00 */
|
||||
Handle fontHandle PACKED_P; /* 0x02 */
|
||||
Byte bold PACKED; /* 0x06 */
|
||||
Byte italic PACKED; /* 0x07 */
|
||||
Byte ulOffset PACKED; /* 0x08 */
|
||||
Byte ulShadow PACKED; /* 0x09 */
|
||||
Byte ulThick PACKED; /* 0x0A */
|
||||
Byte shadow PACKED; /* 0x0B */
|
||||
SignedByte extra PACKED; /* 0x0C */
|
||||
Byte ascent PACKED; /* 0x0D */
|
||||
Byte descent PACKED; /* 0x0E */
|
||||
Byte widMax PACKED; /* 0x0F */
|
||||
SignedByte leading PACKED; /* 0x10 */
|
||||
Byte unused PACKED; /* 0x11 */
|
||||
Point numer PACKED; /* 0x12 */
|
||||
Point denom PACKED; /* 0x16 */
|
||||
} FMOutput;
|
||||
|
||||
typedef FMOutput *FMOutPtr;
|
||||
|
||||
typedef struct {
|
||||
INTEGER fontType PACKED;
|
||||
INTEGER firstChar PACKED;
|
||||
INTEGER lastChar PACKED;
|
||||
INTEGER widMax PACKED;
|
||||
INTEGER kernMax PACKED;
|
||||
INTEGER nDescent PACKED;
|
||||
INTEGER fRectWidth PACKED;
|
||||
INTEGER fRectHeight PACKED;
|
||||
INTEGER owTLoc PACKED;
|
||||
INTEGER ascent PACKED;
|
||||
INTEGER descent PACKED;
|
||||
INTEGER leading PACKED;
|
||||
INTEGER rowWords PACKED;
|
||||
/* more stuff is usually appended here ... bitImage PACKED, locTable PACKED, owTable */
|
||||
} FontRec;
|
||||
|
||||
typedef FamRec *FamRecPtr;
|
||||
typedef struct { FamRecPtr p PACKED_P; } HIDDEN_FamRecPtr;
|
||||
typedef HIDDEN_FamRecPtr *FamRecHandle;
|
||||
typedef struct { FamRecHandle p PACKED_P; } HIDDEN_FamRecHandle;
|
||||
|
||||
typedef WidthTable *WidthTablePtr;
|
||||
typedef struct { WidthTablePtr p PACKED_P; } HIDDEN_WidthTablePtr;
|
||||
typedef HIDDEN_WidthTablePtr *WidthTableHandle;
|
||||
typedef struct { WidthTableHandle p PACKED_P; } HIDDEN_WidthTableHandle;
|
||||
|
||||
#if !defined (JSwapFont_H)
|
||||
extern HIDDEN_ProcPtr JSwapFont_H;
|
||||
extern HIDDEN_Handle WidthListHand_H;
|
||||
extern HIDDEN_Handle ROMFont0_H;
|
||||
extern INTEGER ApFontID;
|
||||
extern FMInput ROMlib_myfmi;
|
||||
extern FMOutput ROMlib_fmo;
|
||||
extern Byte FScaleDisable;
|
||||
extern HIDDEN_WidthTablePtr WidthPtr_H;
|
||||
extern HIDDEN_WidthTableHandle WidthTabHandle_H;
|
||||
extern LONGINT IntlSpec;
|
||||
extern INTEGER SysFontFam;
|
||||
extern INTEGER SysFontSiz;
|
||||
extern HIDDEN_FamRecHandle LastFOND_H;
|
||||
extern INTEGER fondid;
|
||||
extern Byte FractEnable;
|
||||
#endif
|
||||
|
||||
#define JSwapFont (JSwapFont_H.p)
|
||||
#define WidthListHand (WidthListHand_H.p)
|
||||
#define ROMFont0 (ROMFont0_H.p)
|
||||
#define WidthPtr (WidthPtr_H.p)
|
||||
#define WidthTabHandle (WidthTabHandle_H.p)
|
||||
#define LastFOND (LastFOND_H.p)
|
||||
|
||||
extern pascal trap void C_InitFonts( void ); extern pascal trap void P_InitFonts( void );
|
||||
extern pascal trap void C_GetFontName( INTEGER fnum,
|
||||
StringPtr fnam ); extern pascal trap void P_GetFontName( INTEGER fnum,
|
||||
StringPtr fnam );
|
||||
extern void ROMlib_GetFontName( LONGINT fnum, char *fnam );
|
||||
extern pascal trap void C_GetFNum( StringPtr fnam,
|
||||
INTEGER *fnum ); extern pascal trap void P_GetFNum( StringPtr fnam,
|
||||
INTEGER *fnum );
|
||||
extern pascal trap BOOLEAN C_RealFont( INTEGER fnum,
|
||||
INTEGER sz ); extern pascal trap BOOLEAN P_RealFont( INTEGER fnum,
|
||||
INTEGER sz );
|
||||
extern pascal trap void C_SetFontLock( BOOLEAN lflag ); extern pascal trap void P_SetFontLock( BOOLEAN lflag);
|
||||
extern pascal trap FMOutPtr C_FMSwapFont( FMInput *fmip );
|
||||
extern pascal trap void C_FontMetrics( FMetricRec *metrp ); extern pascal trap void P_FontMetrics( FMetricRec *metrp);
|
||||
extern pascal trap void C_SetFScaleDisable(
|
||||
BOOLEAN disable ); extern pascal trap void P_SetFScaleDisable(
|
||||
BOOLEAN disable );
|
||||
extern pascal trap void C_SetFractEnable( BOOLEAN enable ); extern pascal trap void P_SetFractEnable( BOOLEAN enable);
|
||||
|
||||
extern pascal trap void C_SetOutlinePreferred (Boolean _outline_perferred_p);
|
||||
extern pascal trap Boolean C_GetOutlinePreferred (void);
|
||||
extern pascal trap Boolean C_IsOutline (Point numer, Point denom);
|
||||
extern pascal trap OSErr C_OutlineMetrics (int16 byte_count, Ptr text,
|
||||
Point numer, Point denom,
|
||||
int16 *y_max, int16 *y_min,
|
||||
Fixed *aw_array, Fixed *lsb_array,
|
||||
Rect *bounds_array);
|
||||
|
||||
extern pascal trap void C_SetPreserveGlyph (Boolean preserve_glyph);
|
||||
extern pascal trap Boolean C_GetPreserveGlyph (void);
|
||||
extern pascal trap OSErr C_FlushFonts (void);
|
||||
|
||||
#endif /* _FONTMGR_H_ */
|
||||
175
src/include/Gestalt.h
Normal file
175
src/include/Gestalt.h
Normal file
@@ -0,0 +1,175 @@
|
||||
#if !defined (__GESTALT__)
|
||||
#define __GESTALT__
|
||||
|
||||
#define gestaltPhysicalRAMSize T('r','a','m',' ')
|
||||
|
||||
#if !defined (USE_WINDOWS_NOT_MAC_TYPEDEFS_AND_DEFINES)
|
||||
|
||||
/*
|
||||
* Copyright 1992 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: Gestalt.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#define gestaltAddressingModeAttr T('a','d','d','r')
|
||||
#define gestaltAliasMgrAttr T('a','l','i','s')
|
||||
#define gestaltApplEventsAttr T('e','v','n','t')
|
||||
#define gestaltAppleTalkVersion T('a','t','l','k')
|
||||
#define gestaltAUXVersion T('a','/','u','x')
|
||||
#define gestaltConnMgrAttr T('c','o','n','n')
|
||||
#define gestaltCRMAttr T('c','r','m',' ')
|
||||
#define gestaltCTBVersion T('c','t','b','v')
|
||||
#define gestaltDBAccessMgrAttr T('d','b','a','c')
|
||||
#define gestaltDITLExtAttr T('d','i','t','l')
|
||||
#define gestaltEasyAccessAttr T('e','a','s','y')
|
||||
#define gestaltEditionMgrAttr T('e','d','t','n')
|
||||
#define gestaltExtToolboxTable T('x','t','t','t')
|
||||
#define gestaltFindFolderAttr T('f','o','l','d')
|
||||
#define gestaltFontMgrAttr T('f','o','n','t')
|
||||
#define gestaltFPUType T('f','p','u',' ')
|
||||
#define gestaltFSAttr T('f','s',' ',' ')
|
||||
#define gestaltFXfrMgrAttr T('f','x','f','r')
|
||||
#define gestaltHardwareAttr T('h','d','w','r')
|
||||
#define gestaltHelpMgrAttr T('h','e','l','p')
|
||||
#define gestaltKeyboardType T('k','b','d',' ')
|
||||
#define gestaltLogicalPageSize T('p','g','s','z')
|
||||
#define gestaltLogicalRAMSize T('l','r','a','m')
|
||||
#define gestaltLowMemorySize T('l','m','e','m')
|
||||
#define gestaltMiscAttr T('m','i','s','c')
|
||||
#define gestaltMMUType T('m','m','u',' ')
|
||||
#define gestaltNotificatinMgrAttr T('n','m','g','r')
|
||||
#define gestaltNuBusConnectors T('s','l','t','c')
|
||||
#define gestaltOSAttr T('o','s',' ',' ')
|
||||
#define gestaltOSTable T('o','s','t','t')
|
||||
#define gestaltParityAttr T('p','r','t','y')
|
||||
#define gestaltPopupAttr T('p','o','p','!')
|
||||
#define gestaltPowerMgrAttr T('p','o','w','r')
|
||||
#define gestaltPPCToolboxAttr T('p','p','c',' ')
|
||||
#define gestaltProcessorType T('p','r','o','c')
|
||||
#define gestaltQuickdrawVersion T('q','d',' ',' ')
|
||||
#define gestaltQuickdrawFeatures T('q','d','r','w')
|
||||
#define gestaltResourceMgrAttr T('r','s','r','c')
|
||||
#define gestaltScriptCount T('s','c','r','#')
|
||||
#define gestaltScriptMgrVersion T('s','c','r','i')
|
||||
#define gestaltSerialAttr T('s','e','r',' ')
|
||||
#define gestaltSoundAttr T('s','n','d',' ')
|
||||
#define gestaltStandardFileAttr T('s','t','d','f')
|
||||
#define gestaltStdNBPAttr T('n','l','u','p')
|
||||
#define gestaltTermMgrAttr T('t','e','r','m')
|
||||
#define gestaltTextEditVersion T('t','e',' ',' ')
|
||||
#define gestaltTimeMgrVersion T('t','m','g','r')
|
||||
#define gestaltToolboxTable T('t','b','b','t')
|
||||
#define gestaltVersion T('v','e','r','s')
|
||||
#define gestaltVMAttr T('v','m',' ',' ')
|
||||
#define gestaltMachineIcon T('m','i','c','n')
|
||||
#define gestaltMachineType T('m','a','c','h')
|
||||
#define gestaltROMSize T('r','o','m',' ')
|
||||
#define gestaltROMVersion T('r','o','m','v')
|
||||
#define gestaltSystemVersion T('s','y','s','v')
|
||||
|
||||
enum
|
||||
{
|
||||
gestaltNativeCPUtype = T('c','p','u','t'),
|
||||
gestaltSysArchitecture = T('s','y','s','a'),
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
gestaltMacQuadra610 = 53,
|
||||
gestaltCPU68040 = 4,
|
||||
|
||||
gestaltCPU601 = 0x101,
|
||||
gestaltCPU603 = 0x103,
|
||||
gestaltCPU604 = 0x104,
|
||||
gestaltCPU603e = 0x106,
|
||||
gestaltCPU603ev = 0x107,
|
||||
gestaltCPU750 = 0x108, /* G3 */
|
||||
gestaltCPU604e = 0x109,
|
||||
gestaltCPU604ev = 0x10A,
|
||||
gestaltCPUG4 = 0x10C, /* determined by running test app on Sybil */
|
||||
|
||||
gestaltNoMMU = 0,
|
||||
gestalt68k = 1,
|
||||
gestaltPowerPC = 2,
|
||||
};
|
||||
|
||||
#define gestalt32BitAddressing 0
|
||||
#define gestalt32BitSysZone 1
|
||||
#define gestalt32BitCapable 2
|
||||
|
||||
/* gestaltHardwareAttr return values */
|
||||
#define gestaltHasVIA1 0
|
||||
#define gestaltHasVIA2 1
|
||||
#define gestaltHasASC 3
|
||||
#define gestaltHasSSC 4
|
||||
#define gestaltHasSCI 7
|
||||
|
||||
#define gestaltEasyAccessOff (1 << 0)
|
||||
#define gestalt68881 1
|
||||
#define gestaltMacKbd 1
|
||||
#define gestalt68040MMu 4
|
||||
#define gestalt68000 1
|
||||
#define gestalt68040 5
|
||||
|
||||
#define gestaltOriginalQD 0
|
||||
#define gestalt8BitQD 0x0100
|
||||
#define gestalt32BitQD 0x0200
|
||||
#define gestalt32BitQD11 0x0210
|
||||
#define gestalt32BitQD12 0x0220
|
||||
#define gestalt32BitQD13 0x0230
|
||||
|
||||
#define gestaltHasColor 0
|
||||
#define gestaltHasDeepGWorlds 1
|
||||
#define gestaltHasDirectPixMaps 2
|
||||
#define gestaltHasGrayishTextOr 3
|
||||
|
||||
#define gestaltTE1 1
|
||||
#define gestaltTE2 2
|
||||
#define gestaltTE3 3
|
||||
#define gestaltTE4 4
|
||||
#define gestaltTE5 5
|
||||
|
||||
#define gestaltDITLExtPresent 0
|
||||
|
||||
#define gestaltStandardTimeMgr 1
|
||||
#define gestaltVMPresent (1 << 0)
|
||||
|
||||
#define gestaltClassic 1
|
||||
#define gestaltMacXL 2
|
||||
#define gestaltMac512KE 3
|
||||
#define gestaltMacPlus 4
|
||||
#define gestaltMacSE 5
|
||||
#define gestaltMacII 6
|
||||
#define gestaltMacIIx 7
|
||||
#define gestaltMacIIcx 8
|
||||
#define gestaltMacSE30 9
|
||||
#define gestaltPortable 10
|
||||
#define gestaltMacIIci 11
|
||||
#define gestaltMacIIfx 13
|
||||
#define gestaltMacClassic 17
|
||||
#define gestaltMacIIsi 18
|
||||
#define gestaltMacLC 19
|
||||
|
||||
enum { gestaltHasFSSpecCalls = (1 << 1) };
|
||||
enum { gestaltStandardFile58 = (1 << 0) };
|
||||
|
||||
enum
|
||||
{
|
||||
gestaltUndefSelectorErr = -5551,
|
||||
gestaltUnknownErr = -5550,
|
||||
gestaltDupSelectorErr = -5552,
|
||||
gestaltLocationErr = -5553,
|
||||
};
|
||||
|
||||
extern trap OSErrRET Gestalt( OSType selector, LONGINT *responsep );
|
||||
extern trap OSErrRET NewGestalt( OSType selector, ProcPtr selFunc);
|
||||
extern trap OSErrRET ReplaceGestalt( OSType selector, ProcPtr selFunc,
|
||||
ProcPtr *oldSelFuncp);
|
||||
|
||||
extern trap OSErrRET C_GestaltTablesOnly( OSType selector,
|
||||
LONGINT *responsep );
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
111
src/include/HelpMgr.h
Normal file
111
src/include/HelpMgr.h
Normal file
@@ -0,0 +1,111 @@
|
||||
#if !defined (_HELPMGR_H_)
|
||||
#define _HELPMGR_H_
|
||||
|
||||
/*
|
||||
* Copyright 1995 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: HelpMgr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#include "TextEdit.h"
|
||||
#include "MenuMgr.h"
|
||||
#include "WindowMgr.h"
|
||||
|
||||
typedef struct HMStringResType
|
||||
{
|
||||
INTEGER hmmResID PACKED;
|
||||
INTEGER hmmIndex PACKED;
|
||||
} HMStringResType;
|
||||
|
||||
typedef struct HMMessageRecord
|
||||
{
|
||||
INTEGER hmmHelpType PACKED;
|
||||
union
|
||||
{
|
||||
Str255 hmmString PACKED;
|
||||
INTEGER hmmPict PACKED;
|
||||
HMStringResType hmmStringRes PACKED;
|
||||
TEHandle hmmTEHandle PACKED_P;
|
||||
PicHandle hmmPictHandle PACKED_P;
|
||||
INTEGER hmmTERes PACKED;
|
||||
INTEGER hmmSTRRes PACKED;
|
||||
} u PACKED;
|
||||
} HMMessageRecord, *HMMessageRecPtr;
|
||||
|
||||
enum
|
||||
{
|
||||
hmHelpDisabled = -850,
|
||||
hmBalloonAborted = -853,
|
||||
hmSameAsLastBalloon = -854,
|
||||
hmHelpManagerNotInited = -855,
|
||||
hmSkippedBalloon = -857,
|
||||
hmWrongVersion = -858,
|
||||
hmUnknownHelpType = -859,
|
||||
hmOperationUnsupported = -861,
|
||||
hmNoBalloonUp = -862,
|
||||
hmCloseViewActive = -863
|
||||
};
|
||||
|
||||
extern trap BOOLEAN C_HMGetBalloons (void);
|
||||
|
||||
extern trap OSErr C_HMSetBalloons (BOOLEAN flag);
|
||||
|
||||
extern trap BOOLEAN C_HMIsBalloon (void);
|
||||
|
||||
extern trap OSErr C_HMShowBalloon (HMMessageRecord *msgp, Point tip,
|
||||
RectPtr alternaterectp, Ptr tipprocptr,
|
||||
INTEGER proc, INTEGER variant,
|
||||
INTEGER method);
|
||||
|
||||
extern trap OSErr C_HMShowMenuBalloon (INTEGER item, INTEGER menuid,
|
||||
LONGINT flags,
|
||||
LONGINT itemreserved, Point tip,
|
||||
RectPtr alternaterectp,
|
||||
Ptr tipproc, INTEGER proc,
|
||||
INTEGER variant);
|
||||
|
||||
extern trap OSErr C_HMRemoveBalloon (void);
|
||||
|
||||
extern trap OSErr C_HMGetHelpMenuHandle (MenuHandle *mhp);
|
||||
|
||||
extern trap OSErr C_HMGetFont (INTEGER *fontp);
|
||||
|
||||
extern trap OSErr C_HMGetFontSize (INTEGER *sizep);
|
||||
|
||||
extern trap OSErr C_HMSetFont (INTEGER font);
|
||||
|
||||
extern trap OSErr C_HMSetFontSize (INTEGER size);
|
||||
|
||||
extern trap OSErr C_HMSetDialogResID (INTEGER resid);
|
||||
|
||||
extern trap OSErr C_HMGetDialogResID (INTEGER *residp);
|
||||
|
||||
extern trap OSErr C_HMSetMenuResID (INTEGER menuid, INTEGER resid);
|
||||
|
||||
extern trap OSErr C_HMGetMenuResID (INTEGER *menuidp, INTEGER *residp);
|
||||
|
||||
extern trap OSErr C_HMScanTemplateItems (INTEGER whichid,
|
||||
INTEGER whicresfile,
|
||||
ResType whictype);
|
||||
|
||||
extern trap OSErr C_HMBalloonRect (HMMessageRecord *messp, Rect *rectp);
|
||||
|
||||
extern trap OSErr C_HMBalloonPict (HMMessageRecord *messp,
|
||||
PicHandle *pictp);
|
||||
|
||||
extern trap OSErr C_HMGetBalloonWindow (WindowPtr *windowpp);
|
||||
|
||||
extern trap OSErr C_HMExtractHelpMsg (ResType type, INTEGER resid,
|
||||
INTEGER msg, INTEGER state,
|
||||
HMMessageRecord *helpmsgp);
|
||||
|
||||
extern OSErr HMGetIndHelpMsg (ResType type, INTEGER resid,
|
||||
INTEGER msg, INTEGER state,
|
||||
LONGINT *options, Point tip,
|
||||
Rect *altrectp, INTEGER *theprocp,
|
||||
INTEGER *variantp,
|
||||
HMMessageRecord *helpmsgp,
|
||||
INTEGER *count);
|
||||
|
||||
#endif /* !_HELPMGR_H_ */
|
||||
212
src/include/Iconutil.h
Normal file
212
src/include/Iconutil.h
Normal file
@@ -0,0 +1,212 @@
|
||||
#if !defined (_ICON_UTIL_H_)
|
||||
#define _ICON_UTIL_H_
|
||||
|
||||
/* Copyright 1986-1996 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: Iconutil.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#define large1BitMask (T ('I', 'C', 'N', '#'))
|
||||
#define large4BitData (T ('i', 'c', 'l', '4'))
|
||||
#define large8BitData (T ('i', 'c', 'l', '8'))
|
||||
#define small1BitMask (T ('i', 'c', 's', '#'))
|
||||
#define small4BitData (T ('i', 'c', 's', '4'))
|
||||
#define small8BitData (T ('i', 'c', 's', '8'))
|
||||
#define mini1BitMask (T ('i', 'c', 'm', '#'))
|
||||
#define mini4BitData (T ('i', 'c', 'm', '4'))
|
||||
#define mini8BitData (T ('i', 'c', 'm', '8'))
|
||||
|
||||
/* IconAlignmentType values */
|
||||
enum
|
||||
{
|
||||
atNone = 0,
|
||||
atVerticalCenter = 1,
|
||||
atTop = 2,
|
||||
atBottom = 3,
|
||||
atHorizontalCenter = 4,
|
||||
atAbsoluteCenter = (atVerticalCenter | atHorizontalCenter), /* 5 */
|
||||
atCenterTop = (atTop | atHorizontalCenter), /* 6 */
|
||||
atCenterBottom = (atBottom | atHorizontalCenter), /* 7 */
|
||||
atLeft = 8,
|
||||
atCenterLeft = (atVerticalCenter | atLeft), /* 9 */
|
||||
atTopLeft = (atTop | atLeft), /* 10 */
|
||||
atBottomLeft = (atBottom | atLeft), /* 11 */
|
||||
atRight = 12,
|
||||
atCenterRight = (atVerticalCenter | atRight), /* 13 */
|
||||
atTopRight = (atTop | atRight), /* 14 */
|
||||
atBottomRight = (atBottom | atRight), /* 15 */
|
||||
};
|
||||
|
||||
/* IconTranformType values */
|
||||
enum
|
||||
{
|
||||
ttNone = 0,
|
||||
ttDisabled = 1,
|
||||
ttOffline = 2,
|
||||
ttOpen = 3,
|
||||
ttLabel1 = 0x0100,
|
||||
ttLabel2 = 0x0200,
|
||||
ttLabel3 = 0x0300,
|
||||
ttLabel4 = 0x0400,
|
||||
ttLabel5 = 0x0500,
|
||||
ttLabel6 = 0x0600,
|
||||
ttLabel7 = 0x0700,
|
||||
ttSelected = 0x4000,
|
||||
ttSelectedDisabled = (ttSelected | ttDisabled),
|
||||
ttSelectedOffline = (ttSelected | ttOffline),
|
||||
ttSelectedOpen = (ttSelected | ttOpen),
|
||||
};
|
||||
|
||||
/* IconSelectorValue values */
|
||||
/* #### what kind of eediot at apple named all the other icon flag
|
||||
types *Type, except this one? */
|
||||
enum
|
||||
{
|
||||
svLarge1Bit = 0x01,
|
||||
svLarge4Bit = 0x02,
|
||||
svLarge8Bit = 0x04,
|
||||
svSmall1Bit = 0x0100,
|
||||
svSmall4Bit = 0x0200,
|
||||
svSmall8Bit = 0x0400,
|
||||
svMini1Bit = 0x010000,
|
||||
svMini4Bit = 0x020000,
|
||||
svMini8Bit = 0x040000,
|
||||
|
||||
svAllLargeData = 0xFF,
|
||||
svAllSmallData = 0xFF00,
|
||||
svAllMiniData = 0xFF0000,
|
||||
|
||||
svAll1BitData = 0x010101,
|
||||
svAll4BitData = 0x020202,
|
||||
svAll8BitData = 0x040404,
|
||||
|
||||
svAllAvailableData = 0xFFFFFF,
|
||||
};
|
||||
|
||||
#define noErr 0
|
||||
#define paramErr (-50)
|
||||
#define noMaskFoundErr (-1000)
|
||||
|
||||
typedef ProcPtr IconActionProcPtr;
|
||||
typedef ProcPtr IconGetterProcPtr;
|
||||
|
||||
typedef uint32 IconSelectorValue;
|
||||
typedef int16 IconAlignmentType;
|
||||
typedef int16 IconTransformType;
|
||||
|
||||
typedef struct CIcon
|
||||
{
|
||||
PixMap iconPMap PACKED;
|
||||
BitMap iconMask PACKED;
|
||||
BitMap iconBMap PACKED;
|
||||
Handle iconData PACKED_P;
|
||||
int16 iconMaskData[1] PACKED;
|
||||
} CIcon, *CIconPtr;
|
||||
typedef struct { CIconPtr p PACKED_P; } HIDDEN_CIconPtr;
|
||||
typedef HIDDEN_CIconPtr *CIconHandle;
|
||||
|
||||
/* icon utility function prototypes */
|
||||
|
||||
extern pascal trap OSErr C_PlotIconID (const Rect *rect,
|
||||
IconAlignmentType align,
|
||||
IconTransformType tranform,
|
||||
short res_id);
|
||||
|
||||
extern pascal trap OSErr C_PlotIconMethod (const Rect *rect,
|
||||
IconAlignmentType align,
|
||||
IconTransformType transform,
|
||||
IconGetterProcPtr method,
|
||||
void *data);
|
||||
extern pascal trap void C_PlotCIcon (const Rect *rect, CIconHandle icon);
|
||||
extern pascal trap void C_PlotIcon (const Rect *rect, Handle icon);
|
||||
extern pascal trap OSErr C_PlotIconHandle (const Rect *rect,
|
||||
IconAlignmentType align,
|
||||
IconTransformType transform,
|
||||
Handle icon);
|
||||
extern pascal trap OSErr C_PlotCIconHandle (const Rect *rect,
|
||||
IconAlignmentType align,
|
||||
IconTransformType transform,
|
||||
CIconHandle icon);
|
||||
extern pascal trap OSErr C_PlotSICNHandle (const Rect *rect,
|
||||
IconAlignmentType align,
|
||||
IconTransformType transform,
|
||||
Handle icon);
|
||||
|
||||
extern pascal trap Handle C_GetIcon (short icon_id);
|
||||
extern pascal trap CIconHandle C_GetCIcon (short icon_id);
|
||||
|
||||
extern pascal trap void C_DisposeCIcon (CIconHandle icon);
|
||||
|
||||
extern pascal trap OSErr C_GetIconSuite (Handle *suite, short res_id,
|
||||
IconSelectorValue selector);
|
||||
extern pascal trap OSErr C_NewIconSuite (Handle *suite);
|
||||
|
||||
extern pascal trap OSErr C_AddIconToSuite (Handle icon_data, Handle suite,
|
||||
ResType type);
|
||||
extern pascal trap OSErr C_GetIconFromSuite (Handle *icon_data,
|
||||
Handle suite, ResType type);
|
||||
extern pascal trap OSErr C_PlotIconSuite (const Rect *rect,
|
||||
IconAlignmentType align,
|
||||
IconTransformType transform,
|
||||
Handle suite);
|
||||
extern pascal trap OSErr C_ForEachIconDo (Handle suite,
|
||||
IconSelectorValue selector,
|
||||
IconActionProcPtr action,
|
||||
void *data);
|
||||
extern pascal trap short C_GetSuiteLabel (Handle suite);
|
||||
extern pascal trap OSErr C_SetSuiteLabel (Handle suite, short label);
|
||||
extern pascal trap OSErr C_GetLabel (short label, RGBColor *label_color,
|
||||
Str255 label_string);
|
||||
extern pascal trap OSErr C_DisposeIconSuite (Handle suite,
|
||||
Boolean dispose_data_p);
|
||||
|
||||
extern pascal trap OSErr C_IconSuiteToRgn (RgnHandle rgn, const Rect *rect,
|
||||
IconAlignmentType align,
|
||||
Handle suite);
|
||||
extern pascal trap OSErr C_IconIDToRgn (RgnHandle rgn, const Rect *rect,
|
||||
IconAlignmentType align,
|
||||
short icon_id);
|
||||
extern pascal trap OSErr C_IconMethodToRgn (RgnHandle rgn, const Rect *rect,
|
||||
IconAlignmentType align,
|
||||
IconGetterProcPtr method,
|
||||
void *data);
|
||||
|
||||
extern pascal trap Boolean C_PtInIconSuite (Point test_pt,
|
||||
const Rect *rect,
|
||||
IconAlignmentType align,
|
||||
Handle suite);
|
||||
extern pascal trap Boolean C_PtInIconID (Point test_pt, const Rect *rect,
|
||||
IconAlignmentType align,
|
||||
short icon_id);
|
||||
extern pascal trap Boolean C_PtInIconMethod (Point test_pt, const Rect *rect,
|
||||
IconAlignmentType align,
|
||||
IconGetterProcPtr method,
|
||||
void *data);
|
||||
extern pascal trap Boolean C_RectInIconSuite (const Rect *test_rect,
|
||||
const Rect *rect,
|
||||
IconAlignmentType align,
|
||||
Handle suite);
|
||||
extern pascal trap Boolean C_RectInIconID (const Rect *test_rect,
|
||||
const Rect *rect,
|
||||
IconAlignmentType align,
|
||||
short icon_id);
|
||||
extern pascal trap Boolean C_RectInIconMethod (const Rect *test_rect,
|
||||
const Rect *rect,
|
||||
IconAlignmentType align,
|
||||
IconGetterProcPtr method,
|
||||
void *data);
|
||||
extern pascal trap OSErr C_MakeIconCache (Handle *cache,
|
||||
IconGetterProcPtr make_icon,
|
||||
void *data);
|
||||
extern pascal trap OSErr C_LoadIconCache (const Rect *rect,
|
||||
IconAlignmentType align,
|
||||
IconTransformType transform,
|
||||
Handle cache);
|
||||
extern pascal trap OSErr C_GetIconCacheData (Handle cache, void **data);
|
||||
extern pascal trap OSErr C_SetIconCacheData (Handle cache, void *data);
|
||||
extern pascal trap OSErr C_GetIconCacheProc (Handle cache,
|
||||
IconGetterProcPtr *proc);
|
||||
extern pascal trap OSErr C_SetIconCacheProc (Handle cache,
|
||||
IconGetterProcPtr proc);
|
||||
#endif /* !_ICON_UTIL_H */
|
||||
184
src/include/IntlUtil.h
Normal file
184
src/include/IntlUtil.h
Normal file
@@ -0,0 +1,184 @@
|
||||
#if !defined (_INTLUTIL_H_)
|
||||
#define _INTLUTIL_H_
|
||||
|
||||
#include "SANE.h"
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990, 1994 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: IntlUtil.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#define currSymLead 16
|
||||
#define currNegSym 32
|
||||
#define currTrailingZ 64
|
||||
#define currLeadingZ 128
|
||||
|
||||
#define mdy 0
|
||||
#define dmy 1
|
||||
#define ymd 2
|
||||
|
||||
#define dayLdingZ 32
|
||||
#define mntLdingZ 64
|
||||
#define century 128
|
||||
|
||||
#define secLeadingZ 32
|
||||
#define minLeadingZ 64
|
||||
#define hrLeadingZ 128
|
||||
|
||||
#define verUS 0
|
||||
#define verFrance 1
|
||||
#define verBritain 2
|
||||
#define verGermany 3
|
||||
#define verItaly 4
|
||||
#define verNetherlands 5
|
||||
#define verBelgiumLux 6
|
||||
#define verSweden 7
|
||||
#define verSpain 8
|
||||
#define verDenmark 9
|
||||
#define verPortugal 10
|
||||
#define verFrCanada 11
|
||||
#define verNorway 12
|
||||
#define verIsreal 13
|
||||
#define verJapan 14
|
||||
#define verAustralia 15
|
||||
#define verArabia 16
|
||||
#define verFinland 17
|
||||
#define verFrSwiss 18
|
||||
#define verGrSwiss 19
|
||||
#define verGreece 20
|
||||
#define verIceland 21
|
||||
#define verMalta 22
|
||||
#define verCyprus 23
|
||||
#define verTurkey 24
|
||||
#define verYugoslavia 25
|
||||
|
||||
typedef struct {
|
||||
Byte decimalPt PACKED;
|
||||
Byte thousSep PACKED;
|
||||
Byte listSep PACKED;
|
||||
Byte currSym1 PACKED;
|
||||
Byte currSym2 PACKED;
|
||||
Byte currSym3 PACKED;
|
||||
Byte currFmt PACKED;
|
||||
Byte dateOrder PACKED;
|
||||
Byte shrtDateFmt PACKED;
|
||||
Byte dateSep PACKED;
|
||||
Byte timeCycle PACKED;
|
||||
Byte timeFmt PACKED;
|
||||
LONGINT mornStr PACKED;
|
||||
LONGINT eveStr PACKED;
|
||||
Byte timeSep PACKED;
|
||||
Byte time1Suff PACKED;
|
||||
Byte time2Suff PACKED;
|
||||
Byte time3Suff PACKED;
|
||||
Byte time4Suff PACKED;
|
||||
Byte time5Suff PACKED;
|
||||
Byte time6Suff PACKED;
|
||||
Byte time7Suff PACKED;
|
||||
Byte time8Suff PACKED;
|
||||
Byte metricSys PACKED;
|
||||
INTEGER intl0Vers PACKED;
|
||||
} Intl0Rec;
|
||||
typedef Intl0Rec *Intl0Ptr;
|
||||
typedef struct { Intl0Ptr p PACKED_P; } HIDDEN_Intl0Ptr;
|
||||
typedef HIDDEN_Intl0Ptr *Intl0Hndl;
|
||||
|
||||
typedef Byte STRING15[16];
|
||||
|
||||
typedef struct {
|
||||
STRING15 days[7] PACKED;
|
||||
STRING15 months[12] PACKED;
|
||||
Byte suppressDay PACKED;
|
||||
Byte lngDateFmt PACKED;
|
||||
Byte dayLeading0 PACKED;
|
||||
Byte abbrLen PACKED;
|
||||
LONGINT st0 PACKED;
|
||||
LONGINT st1 PACKED;
|
||||
LONGINT st2 PACKED;
|
||||
LONGINT st3 PACKED;
|
||||
LONGINT st4 PACKED;
|
||||
INTEGER intl1Vers PACKED;
|
||||
INTEGER localRtn PACKED;
|
||||
} Intl1Rec;
|
||||
typedef Intl1Rec *Intl1Ptr;
|
||||
typedef struct { Intl1Ptr p PACKED_P; } HIDDEN_Intl1Ptr;
|
||||
typedef HIDDEN_Intl1Ptr *Intl1Hndl;
|
||||
|
||||
typedef comp LongDateTime;
|
||||
|
||||
#if !defined (BINCOMPAT)
|
||||
|
||||
typedef enum { shortDate, longDate, abbrevDate } DateForm;
|
||||
|
||||
#else /* BINCOMPAT */
|
||||
|
||||
typedef SignedByte DateForm;
|
||||
#define shortDate 0
|
||||
#define longDate 1
|
||||
#define abbrevDate 2
|
||||
|
||||
#endif /* BINCOMPAT */
|
||||
|
||||
|
||||
/* DO NOT DELETE THIS LINE */
|
||||
|
||||
extern pascal trap void C_IUDatePString( LONGINT date,
|
||||
DateForm form, StringPtr p, Handle h ); extern pascal trap void P_IUDatePString( LONGINT date,
|
||||
DateForm form, StringPtr p, Handle h );
|
||||
extern pascal trap Handle C_IUGetIntl( INTEGER id ); extern pascal trap Handle P_IUGetIntl( INTEGER id);
|
||||
extern pascal trap void C_IUDateString( LONGINT date,
|
||||
DateForm form, StringPtr p ); extern pascal trap void P_IUDateString( LONGINT date,
|
||||
DateForm form, StringPtr p );
|
||||
extern pascal trap void C_IUTimePString( LONGINT date,
|
||||
BOOLEAN secs, StringPtr p, Handle h ); extern pascal trap void P_IUTimePString( LONGINT date,
|
||||
BOOLEAN secs, StringPtr p, Handle h );
|
||||
extern pascal trap void C_IUTimeString( LONGINT date,
|
||||
BOOLEAN secs, StringPtr p ); extern pascal trap void P_IUTimeString( LONGINT date,
|
||||
BOOLEAN secs, StringPtr p );
|
||||
extern pascal trap BOOLEAN C_IUMetric( void ); extern pascal trap BOOLEAN P_IUMetric( void );
|
||||
extern pascal trap void C_IUSetIntl( INTEGER rn,
|
||||
INTEGER id, Handle newh ); extern pascal trap void P_IUSetIntl( INTEGER rn,
|
||||
INTEGER id, Handle newh );
|
||||
|
||||
extern pascal trap INTEGER C_IUMagString (Ptr ptr1, Ptr ptr2, INTEGER len1, INTEGER len2);
|
||||
|
||||
extern INTEGER IUCompString( StringPtr str1,
|
||||
StringPtr str2 );
|
||||
extern pascal trap INTEGER C_IUMagIDString( Ptr ptr1,
|
||||
Ptr ptr2, INTEGER len1, INTEGER len2 ); extern pascal trap INTEGER P_IUMagIDString( Ptr ptr1,
|
||||
Ptr ptr2, INTEGER len1, INTEGER len2 );
|
||||
extern INTEGER IUEqualString( StringPtr str1,
|
||||
StringPtr str2 );
|
||||
extern pascal trap void C_IUMystery( Ptr arg1, Ptr arg2,
|
||||
INTEGER arg3, INTEGER arg4 ); extern pascal trap void P_IUMystery( Ptr arg1, Ptr arg2,
|
||||
INTEGER arg3, INTEGER arg4 );
|
||||
|
||||
extern pascal trap void C_IULDateString(LongDateTime *datetimep,
|
||||
DateForm longflag, Str255 result, Handle intlhand);
|
||||
|
||||
extern pascal trap void C_IULTimeString(LongDateTime *datetimep,
|
||||
BOOLEAN wantseconds, Str255 result, Handle intlhand);
|
||||
|
||||
extern pascal trap void C_IUClearCache( void );
|
||||
|
||||
extern pascal trap INTEGER C_IUMagPString( Ptr ptra, Ptr ptrb, INTEGER lena,
|
||||
INTEGER lenb, Handle itl2hand);
|
||||
|
||||
extern pascal trap INTEGER C_IUMagIDPString( Ptr ptra, Ptr ptrb, INTEGER lena,
|
||||
INTEGER lenb, Handle itl2hand);
|
||||
|
||||
extern pascal trap INTEGER C_IUScriptOrder( ScriptCode script1,
|
||||
ScriptCode script2);
|
||||
|
||||
extern pascal trap INTEGER C_IULangOrder( LangCode l1, LangCode l2);
|
||||
|
||||
extern pascal trap INTEGER C_IUTextOrder( Ptr ptra, Ptr ptrb, INTEGER lena,
|
||||
INTEGER lenb, ScriptCode scripta, ScriptCode bscript, LangCode langa,
|
||||
LangCode langb);
|
||||
|
||||
extern pascal trap void C_IUGetItlTable( ScriptCode script, INTEGER tablecode,
|
||||
Handle *itlhandlep, LONGINT *offsetp, LONGINT *lengthp);
|
||||
|
||||
#endif /* _INTLUTIL_H_ */
|
||||
158
src/include/ListMgr.h
Normal file
158
src/include/ListMgr.h
Normal file
@@ -0,0 +1,158 @@
|
||||
#if !defined (__LIST__)
|
||||
#define __LIST__
|
||||
|
||||
/*
|
||||
* Copyright 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: ListMgr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#include "ControlMgr.h"
|
||||
|
||||
typedef Point Cell;
|
||||
|
||||
#if 1 || !defined(__alpha)
|
||||
typedef Byte DataArray[32001];
|
||||
#else /* defined(__alpha) */
|
||||
typedef Byte DataArray;
|
||||
#warning incorrect typedef to make gcc happy
|
||||
#endif /* defined(__alpha) */
|
||||
|
||||
typedef DataArray *DataPtr;
|
||||
typedef struct { DataPtr p PACKED_P; } HIDDEN_DataPtr;
|
||||
typedef HIDDEN_DataPtr *DataHandle;
|
||||
|
||||
typedef struct {
|
||||
Rect rView PACKED;
|
||||
GrafPtr port PACKED_P;
|
||||
Point indent PACKED;
|
||||
Point cellSize PACKED;
|
||||
Rect visible PACKED;
|
||||
ControlHandle vScroll PACKED_P;
|
||||
ControlHandle hScroll PACKED_P;
|
||||
SignedByte selFlags PACKED;
|
||||
BOOLEAN lActive PACKED;
|
||||
SignedByte lReserved PACKED;
|
||||
SignedByte listFlags PACKED;
|
||||
LONGINT clikTime PACKED;
|
||||
Point clikLoc PACKED;
|
||||
Point mouseLoc PACKED;
|
||||
Ptr lClikLoop PACKED_P;
|
||||
Cell lastClick PACKED;
|
||||
LONGINT refCon PACKED;
|
||||
Handle listDefProc PACKED_P;
|
||||
Handle userHandle PACKED_P;
|
||||
Rect dataBounds PACKED;
|
||||
DataHandle cells PACKED_P;
|
||||
INTEGER maxIndex PACKED;
|
||||
INTEGER cellArray[1] PACKED;
|
||||
} ListRec;
|
||||
typedef ListRec *ListPtr;
|
||||
typedef struct { ListPtr p PACKED_P; } HIDDEN_ListPtr;
|
||||
typedef HIDDEN_ListPtr *ListHandle;
|
||||
|
||||
#define lDoVAutoscroll 2
|
||||
#define lDoHAutoscroll 1
|
||||
|
||||
#define lOnlyOne -128
|
||||
#define lExtendDrag 64
|
||||
#define lNoDisjoint 32
|
||||
|
||||
#define lNoExtend 16
|
||||
#define lNoRect 8
|
||||
#define lUseSense 4
|
||||
#define lNoNilHilite 2
|
||||
|
||||
#define lInitMsg 0
|
||||
#define lDrawMsg 1
|
||||
#define lHiliteMsg 2
|
||||
#define lCloseMsg 3
|
||||
|
||||
|
||||
/* DO NOT DELETE THIS LINE */
|
||||
#if !defined (__STDC__)
|
||||
extern void LFind();
|
||||
extern BOOLEAN LNextCell();
|
||||
extern void LRect();
|
||||
extern BOOLEAN LSearch();
|
||||
extern void LSize();
|
||||
extern INTEGER LAddColumn();
|
||||
extern INTEGER LAddRow();
|
||||
extern void LDelColumn();
|
||||
extern void LDelRow();
|
||||
extern ListHandle LNew();
|
||||
extern void LDispose();
|
||||
extern void LDraw();
|
||||
extern void LDoDraw();
|
||||
extern void LScroll();
|
||||
extern void LAutoScroll();
|
||||
extern void LUpdate();
|
||||
extern void LActivate();
|
||||
extern pascal void ROMlib_mytrack();
|
||||
extern BOOLEAN LClick();
|
||||
extern LONGINT LLastClick();
|
||||
extern void LSetSelect();
|
||||
extern void LAddToCell();
|
||||
extern void LClrCell();
|
||||
extern void LGetCell();
|
||||
extern void LSetCell();
|
||||
extern void LCellSize();
|
||||
extern BOOLEAN LGetSelect();
|
||||
#else /* __STDC__ */
|
||||
extern pascal trap void C_LFind( INTEGER *offsetp,
|
||||
INTEGER *lenp, Cell cell, ListHandle list );
|
||||
extern pascal trap BOOLEAN C_LNextCell( BOOLEAN hnext,
|
||||
BOOLEAN vnext, Cell *cellp, ListHandle list );
|
||||
extern pascal trap void C_LRect( Rect *cellrect,
|
||||
Cell cell, ListHandle list );
|
||||
extern pascal trap BOOLEAN C_LSearch( Ptr dp,
|
||||
INTEGER dl, Ptr proc, Cell *cellp, ListHandle list );
|
||||
extern pascal trap void C_LSize( INTEGER width,
|
||||
INTEGER height, ListHandle list );
|
||||
extern pascal trap INTEGER C_LAddColumn( INTEGER count,
|
||||
INTEGER coln, ListHandle list );
|
||||
extern pascal trap INTEGER C_LAddRow( INTEGER count,
|
||||
INTEGER rown, ListHandle list );
|
||||
extern pascal trap void C_LDelColumn( INTEGER count,
|
||||
INTEGER coln, ListHandle list );
|
||||
extern pascal trap void C_LDelRow( INTEGER count,
|
||||
INTEGER rown, ListHandle list );
|
||||
extern pascal trap ListHandle C_LNew( Rect *rview,
|
||||
Rect *bounds, Point csize, INTEGER proc, WindowPtr wind,
|
||||
BOOLEAN draw, BOOLEAN grow, BOOLEAN scrollh, BOOLEAN scrollv );extern pascal trap ListHandle P_LNew( Rect *rview,
|
||||
Rect *bounds, Point csize, INTEGER proc, WindowPtr wind,
|
||||
BOOLEAN draw, BOOLEAN grow, BOOLEAN scrollh, BOOLEAN scrollv );
|
||||
extern pascal trap void C_LDispose( ListHandle list );
|
||||
extern pascal trap void C_LDraw( Cell cell,
|
||||
ListHandle list );
|
||||
extern pascal trap void C_LDoDraw( BOOLEAN draw,
|
||||
ListHandle list );
|
||||
extern pascal trap void C_LScroll( INTEGER ncol,
|
||||
INTEGER nrow, ListHandle list );
|
||||
extern pascal trap void C_LAutoScroll( ListHandle list );
|
||||
extern pascal trap void C_LUpdate( RgnHandle rgn,
|
||||
ListHandle list );
|
||||
extern pascal trap void C_LActivate( BOOLEAN act,
|
||||
ListHandle list );
|
||||
extern pascal void C_ROMlib_mytrack( ControlHandle ch, INTEGER part );
|
||||
|
||||
extern pascal trap BOOLEAN C_LClick( Point pt,
|
||||
INTEGER mods, ListHandle list );
|
||||
extern pascal trap LONGINT C_LLastClick( ListHandle list );
|
||||
extern pascal trap void C_LSetSelect( BOOLEAN setit,
|
||||
Cell cell, ListHandle list );
|
||||
extern pascal trap void C_LAddToCell( Ptr dp, INTEGER dl,
|
||||
Cell cell, ListHandle list );
|
||||
extern pascal trap void C_LClrCell( Cell cell,
|
||||
ListHandle list );
|
||||
extern pascal trap void C_LGetCell( Ptr dp, INTEGER *dlp,
|
||||
Cell cell, ListHandle list );
|
||||
extern pascal trap void C_LSetCell( Ptr dp, INTEGER dl,
|
||||
Cell cell, ListHandle list );
|
||||
extern pascal trap void C_LCellSize( Point csize,
|
||||
ListHandle list );
|
||||
extern pascal trap BOOLEAN C_LGetSelect( BOOLEAN next,
|
||||
Cell *cellp, ListHandle list );
|
||||
#endif /* __STDC__ */
|
||||
#endif /* __LIST__ */
|
||||
123
src/include/MacTypes.h
Normal file
123
src/include/MacTypes.h
Normal file
@@ -0,0 +1,123 @@
|
||||
|
||||
#if !defined (_MACTYPES_H_)
|
||||
#define _MACTYPES_H_
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990, 1995 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: MacTypes.h 86 2005-05-25 00:47:12Z ctm $
|
||||
*/
|
||||
|
||||
|
||||
#define a5 (EM_A5)
|
||||
|
||||
typedef int8 SignedByte;
|
||||
typedef uint8 Byte;
|
||||
typedef int8 *Ptr;
|
||||
|
||||
typedef struct { Ptr p PACKED_P; } HIDDEN_Ptr;
|
||||
typedef HIDDEN_Ptr *Handle;
|
||||
typedef struct { Handle p PACKED_P; } HIDDEN_Handle;
|
||||
|
||||
typedef BOOLEAN Boolean;
|
||||
|
||||
typedef Byte Str15[16];
|
||||
typedef Byte Str31[32];
|
||||
typedef Byte Str32[33];
|
||||
typedef Byte Str63[64];
|
||||
typedef Byte Str255[256];
|
||||
typedef Byte *StringPtr;
|
||||
|
||||
typedef struct { StringPtr p PACKED_P; } HIDDEN_StringPtr;
|
||||
typedef HIDDEN_StringPtr *StringHandle;
|
||||
|
||||
typedef int (*ProcPtr)();
|
||||
typedef struct { ProcPtr p PACKED_P; } HIDDEN_ProcPtr;
|
||||
|
||||
typedef LONGINT Fixed, Fract;
|
||||
|
||||
/* SmallFract represnts values between 0 and 65535 */
|
||||
typedef unsigned short SmallFract;
|
||||
|
||||
#define MaxSmallFract 0xFFFF
|
||||
|
||||
typedef double Extended;
|
||||
|
||||
typedef LONGINT Size;
|
||||
|
||||
typedef INTEGER OSErr;
|
||||
typedef LONGINT OSType;
|
||||
typedef LONGINT ResType;
|
||||
|
||||
typedef LONGINT OSErrRET; /* for smashing d0 just like the Mac */
|
||||
typedef LONGINT INTEGERRET;
|
||||
typedef LONGINT BOOLEANRET;
|
||||
typedef LONGINT SignedByteRET;
|
||||
|
||||
typedef struct {
|
||||
INTEGER qFlags PACKED;
|
||||
union __qe *qHead PACKED_P; /* actually QElemPtr */
|
||||
union __qe *qTail PACKED_P; /* actually QElemPtr */
|
||||
} QHdr;
|
||||
typedef QHdr *QHdrPtr;
|
||||
typedef union __qe *QElemPtr;
|
||||
|
||||
typedef struct { QElemPtr p PACKED_P; } HIDDEN_QElemPtr;
|
||||
|
||||
#define noErr 0
|
||||
|
||||
/* from Quickdraw.h */
|
||||
typedef struct Point
|
||||
{
|
||||
INTEGER v PACKED;
|
||||
INTEGER h PACKED;
|
||||
} Point;
|
||||
|
||||
#define NULL_POINTP ((Point *) NULL)
|
||||
|
||||
#define ZEROPOINT(p) (p.v = CWC (0), p.h = CWC (0))
|
||||
|
||||
typedef struct Rect
|
||||
{
|
||||
INTEGER top PACKED;
|
||||
INTEGER left PACKED;
|
||||
INTEGER bottom PACKED;
|
||||
INTEGER right PACKED;
|
||||
} Rect;
|
||||
|
||||
typedef Rect *RectPtr;
|
||||
|
||||
#define RECT_WIDTH(r) \
|
||||
({ \
|
||||
const Rect *__r = (r); \
|
||||
CW (__r->right) - CW (__r->left); \
|
||||
})
|
||||
#define RECT_HEIGHT(r) \
|
||||
({ \
|
||||
const Rect *__r = (r); \
|
||||
CW (__r->bottom) - CW (__r->top); \
|
||||
})
|
||||
|
||||
#define NULL_RECTP ((Rect *) NULL)
|
||||
|
||||
#define RECT_ZERO(r) \
|
||||
do \
|
||||
memset (r, 0, sizeof (Rect)); \
|
||||
while (FALSE)
|
||||
|
||||
#define RECT_EQUAL_P(r1, r2) \
|
||||
({ \
|
||||
const uint32 *__p1 = (const uint32 *) (r1); \
|
||||
const uint32 *__p2 = (const uint32 *) (r2); \
|
||||
__p1[0] == __p2[0] && __p1[1] == __p2[1]; \
|
||||
})
|
||||
|
||||
/* from IntlUtil.h */
|
||||
typedef INTEGER ScriptCode;
|
||||
typedef INTEGER LangCode;
|
||||
|
||||
/* DO NOT DELETE THIS LINE */
|
||||
extern INTEGER ROM85;
|
||||
extern INTEGER DSErrCode;
|
||||
#endif /* _MACTYPES_H_ */
|
||||
202
src/include/MemoryMgr.h
Normal file
202
src/include/MemoryMgr.h
Normal file
@@ -0,0 +1,202 @@
|
||||
|
||||
#if !defined (_MEMORY_MGR_H_)
|
||||
#define _MEMORY_MGR_H_
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: MemoryMgr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
|
||||
#define memFullErr (-108)
|
||||
#define memLockedErr (-117)
|
||||
#define memPurErr (-112)
|
||||
#define memWZErr (-111)
|
||||
enum { memAZErr = -113 };
|
||||
#define nilHandleErr (-109)
|
||||
|
||||
#define memROZErr (-99)
|
||||
#define memAdrErr (-110)
|
||||
#define memAZErr (-113)
|
||||
#define memPCErr (-114)
|
||||
#define memBCErr (-115)
|
||||
#define memSCErr (-116)
|
||||
|
||||
typedef struct Zone
|
||||
{
|
||||
Ptr bkLim PACKED_P;
|
||||
Ptr purgePtr PACKED_P;
|
||||
Ptr hFstFree PACKED_P;
|
||||
LONGINT zcbFree PACKED;
|
||||
ProcPtr gzProc PACKED_P;
|
||||
INTEGER moreMast PACKED;
|
||||
INTEGER flags PACKED;
|
||||
INTEGER cntRel PACKED;
|
||||
INTEGER maxRel PACKED;
|
||||
INTEGER cntNRel PACKED;
|
||||
INTEGER maxNRel PACKED;
|
||||
INTEGER cntEmpty PACKED;
|
||||
INTEGER cntHandles PACKED;
|
||||
LONGINT minCBFree PACKED;
|
||||
ProcPtr purgeProc PACKED_P;
|
||||
Ptr sparePtr PACKED_P;
|
||||
Ptr allocPtr PACKED_P;
|
||||
INTEGER heapData PACKED;
|
||||
} Zone;
|
||||
typedef Zone *THz;
|
||||
|
||||
typedef struct { THz p PACKED_P; } HIDDEN_THz;
|
||||
|
||||
#if !defined (MemErr)
|
||||
extern int16 MemErr;
|
||||
extern HIDDEN_Ptr MemTop_H;
|
||||
extern HIDDEN_Ptr BufPtr_H;
|
||||
extern HIDDEN_Ptr HeapEnd_H;
|
||||
extern HIDDEN_THz TheZone_H;
|
||||
extern HIDDEN_Ptr ApplLimit_H;
|
||||
extern HIDDEN_THz SysZone_H;
|
||||
extern HIDDEN_THz ApplZone_H;
|
||||
extern HIDDEN_Ptr ROMBase_H;
|
||||
extern HIDDEN_Ptr heapcheck_H;
|
||||
extern HIDDEN_Handle GZRootHnd_H;
|
||||
extern HIDDEN_ProcPtr IAZNotify_H;
|
||||
extern HIDDEN_Ptr CurrentA5_H;
|
||||
extern HIDDEN_Ptr CurStackBase_H;
|
||||
extern Byte Scratch20[20];
|
||||
extern LONGINT Lo3Bytes;
|
||||
extern LONGINT MinStack;
|
||||
extern LONGINT DefltStack;
|
||||
extern Byte ToolScratch[8];
|
||||
extern Byte Scratch8[8];
|
||||
extern LONGINT OneOne;
|
||||
extern LONGINT MinusOne;
|
||||
extern Byte ApplScratch[12];
|
||||
#endif
|
||||
|
||||
#define MemTop (MemTop_H.p)
|
||||
#define BufPtr (BufPtr_H.p)
|
||||
#define HeapEnd (HeapEnd_H.p)
|
||||
#define TheZone (TheZone_H.p)
|
||||
#define ApplLimit (ApplLimit_H.p)
|
||||
#define SysZone (SysZone_H.p)
|
||||
#define ApplZone (ApplZone_H.p)
|
||||
#define ROMBase (ROMBase_H.p)
|
||||
#define heapcheck (heapcheck_H.p)
|
||||
#define GZRootHnd (GZRootHnd_H.p)
|
||||
#define IAZNotify (IAZNotify_H.p)
|
||||
#define CurrentA5 (CurrentA5_H.p)
|
||||
#define CurStackBase (CurStackBase_H.p)
|
||||
|
||||
/* traps which can have a `sys' or `clear' bit set */
|
||||
|
||||
#define NewEmptyHandle() (_NewEmptyHandle_flags (FALSE))
|
||||
#define NewEmptyHandleSys() (_NewEmptyHandle_flags (TRUE))
|
||||
extern Handle _NewEmptyHandle_flags (boolean_t sys_p);
|
||||
|
||||
#define NewHandle(size) (_NewHandle_flags (size, FALSE, FALSE))
|
||||
#define NewHandleSys(size) (_NewHandle_flags (size, TRUE, FALSE))
|
||||
#define NewHandleClear(size) (_NewHandle_flags (size, FALSE, TRUE))
|
||||
#define NewHandleSysClear(size) (_NewHandle_flags (size, TRUE, TRUE))
|
||||
extern Handle _NewHandle_flags (Size size, boolean_t sys_p, boolean_t clear_p);
|
||||
|
||||
#define RecoverHandle(ptr) (_RecoverHandle_flags (ptr, FALSE))
|
||||
#define RecoverHandleSys(ptr) (_RecoverHandle_flags (ptr, TRUE))
|
||||
extern Handle _RecoverHandle_flags (Ptr p, boolean_t sys_p);
|
||||
|
||||
#define NewPtr(size) (_NewPtr_flags (size, FALSE, FALSE))
|
||||
#define NewPtrSys(size) (_NewPtr_flags (size, TRUE, FALSE))
|
||||
#define NewPtrClear(size) (_NewPtr_flags (size, FALSE, TRUE))
|
||||
#define NewPtrSysClear(size) (_NewPtr_flags (size, TRUE, TRUE))
|
||||
extern Ptr _NewPtr_flags (Size size, boolean_t sys_p, boolean_t clear_p);
|
||||
|
||||
#define FreeMem() (_FreeMem_flags (FALSE))
|
||||
#define FreeMemSys() (_FreeMem_flags (TRUE))
|
||||
extern int32 _FreeMem_flags (boolean_t sys_p);
|
||||
|
||||
#define MaxMem(growp) (_MaxMem_flags (growp, FALSE))
|
||||
#define MaxMemSys(growp) (_MaxMem_flags (growp, TRUE))
|
||||
extern Size _MaxMem_flags (Size *growp, boolean_t sys_p);
|
||||
|
||||
#define CompactMem(needed) (_CompactMem_flags (needed, FALSE))
|
||||
#define CompactMemSys(needed) (_CompactMem_flags (needed, TRUE))
|
||||
extern Size _CompactMem_flags (Size sizeneeded, boolean_t sys_p);
|
||||
|
||||
#define ResrvMem(needed) (_ResrvMem_flags (needed, FALSE))
|
||||
#define ResrvMemSys(needed) (_ResrvMem_flags (needed, TRUE))
|
||||
extern void _ResrvMem_flags (Size needed, boolean_t sys_p);
|
||||
|
||||
#define PurgeMem(needed) (_PurgeMem_flags (needed, FALSE))
|
||||
#define PurgeMemSys(needed) (_PurgeMem_flags (needed, TRUE))
|
||||
extern void _PurgeMem_flags (Size needed, boolean_t sys_p);
|
||||
|
||||
#define MaxBlock() (_MaxBlock_flags (FALSE))
|
||||
#define MaxBlockSys() (_MaxBlock_flags (TRUE))
|
||||
extern Size _MaxBlock_flags (boolean_t sys_p);
|
||||
|
||||
#define PurgeSpace(totalp, congtigp) \
|
||||
(_PurgeSpace_flags (totalp, contigp, FALSE))
|
||||
#define PurgeSpaceSys(totalp, congtigp) \
|
||||
(_PurgeSpace_flags (totalp, contigp, TRUE))
|
||||
extern void _PurgeSpace_flags (Size *totalp, Size *contigp, boolean_t sys_p);
|
||||
|
||||
/* ### cliff bogofunc; should go away */
|
||||
extern void ROMlib_installhandle (Handle sh, Handle dh);
|
||||
|
||||
typedef enum
|
||||
{
|
||||
offset_no_change, /* for when we call InitZone a second time */
|
||||
offset_none, /* use page 0 for page 0 */
|
||||
offset_8k, /* offset is a fixed 8192 */
|
||||
offset_big, /* offset is to big syszone+applzone block */
|
||||
} offset_enum;
|
||||
|
||||
extern void ROMlib_InitZones (offset_enum which);
|
||||
extern OSErr MemError (void);
|
||||
|
||||
extern SignedByte HGetState (Handle h);
|
||||
extern void HSetState (Handle h, SignedByte flags);
|
||||
extern void HLock (Handle h);
|
||||
extern void HUnlock (Handle h);
|
||||
extern void HPurge (Handle h);
|
||||
extern void HNoPurge (Handle h);
|
||||
extern void HSetRBit (Handle h);
|
||||
extern void HClrRBit (Handle h);
|
||||
extern void InitApplZone (void);
|
||||
extern void SetApplBase (Ptr newbase);
|
||||
extern void MoreMasters (void);
|
||||
extern void InitZone (ProcPtr pGrowZone, int16 cMoreMasters,
|
||||
Ptr limitPtr, THz startPtr);
|
||||
extern THz GetZone (void);
|
||||
extern void SetZone (THz hz);
|
||||
extern void DisposHandle (Handle h);
|
||||
extern Size GetHandleSize (Handle h);
|
||||
extern void SetHandleSize (Handle h, Size newsize);
|
||||
extern THz HandleZone (Handle h);
|
||||
extern void ReallocHandle (Handle h, Size size);
|
||||
extern void DisposPtr (Ptr p);
|
||||
extern Size GetPtrSize (Ptr p);
|
||||
extern void SetPtrSize (Ptr p, Size newsize);
|
||||
extern THz PtrZone (Ptr p);
|
||||
extern void BlockMove (Ptr src, Ptr dst, Size cnt);
|
||||
extern void BlockMoveData (Ptr src, Ptr dst, Size cnt);
|
||||
extern void MaxApplZone (void);
|
||||
extern void MoveHHi (Handle h);
|
||||
extern void SetApplLimit (Ptr newlimit);
|
||||
extern void SetGrowZone (ProcPtr newgz);
|
||||
extern void EmptyHandle (Handle h);
|
||||
extern THz SystemZone (void);
|
||||
extern THz ApplicZone (void);
|
||||
extern Size StackSpace (void);
|
||||
|
||||
/* temporary memory functions; see tempmem.c */
|
||||
extern pascal trap int32 C_TempFreeMem (void);
|
||||
extern pascal trap Size C_TempMaxMem (Size *grow);
|
||||
extern pascal trap Ptr C_TempTopMem (void);
|
||||
extern pascal trap Handle C_TempNewHandle (Size logical_size, OSErr *result_code);
|
||||
extern pascal trap void C_TempHLock (Handle h, OSErr *result_code);
|
||||
extern pascal trap void C_TempHUnlock (Handle h, OSErr *result_code);
|
||||
extern pascal trap void C_TempDisposeHandle (Handle h, OSErr *result_code);
|
||||
|
||||
#endif /* _MEMORY_MGR_H_ */
|
||||
206
src/include/MenuMgr.h
Normal file
206
src/include/MenuMgr.h
Normal file
@@ -0,0 +1,206 @@
|
||||
#if !defined (__MENU__)
|
||||
#define __MENU__
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990, 1995 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: MenuMgr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#include "QuickDraw.h"
|
||||
#include "ResourceMgr.h"
|
||||
|
||||
#define noMark 0
|
||||
|
||||
#define mDrawMsg 0
|
||||
#define mChooseMsg 1
|
||||
#define mSizeMsg 2
|
||||
#define mPopUpRect 3
|
||||
|
||||
#define textMenuProc 0
|
||||
|
||||
typedef struct {
|
||||
INTEGER menuID PACKED;
|
||||
INTEGER menuWidth PACKED;
|
||||
INTEGER menuHeight PACKED;
|
||||
Handle menuProc PACKED_P;
|
||||
LONGINT enableFlags PACKED;
|
||||
Str255 menuData PACKED;
|
||||
} MenuInfo;
|
||||
typedef MenuInfo *MenuPtr;
|
||||
typedef struct { MenuPtr p PACKED_P; } HIDDEN_MenuPtr;
|
||||
typedef HIDDEN_MenuPtr *MenuHandle;
|
||||
|
||||
typedef struct MCEntry
|
||||
{
|
||||
INTEGER mctID PACKED;
|
||||
INTEGER mctItem PACKED;
|
||||
RGBColor mctRGB1 PACKED;
|
||||
RGBColor mctRGB2 PACKED;
|
||||
RGBColor mctRGB3 PACKED;
|
||||
RGBColor mctRGB4 PACKED;
|
||||
INTEGER mctReserved PACKED;
|
||||
} MCEntry, *MCEntryPtr;
|
||||
typedef struct { MCEntryPtr p PACKED_P; } HIDDEN_MCEntryPtr;
|
||||
|
||||
typedef MCEntry MCTable[1];
|
||||
|
||||
typedef MCEntry *MCTablePtr;
|
||||
typedef struct { MCTablePtr p PACKED_P; } HIDDEN_MCTablePtr;
|
||||
typedef HIDDEN_MCTablePtr *MCTableHandle;
|
||||
typedef struct { MCTableHandle p PACKED_P; } HIDDEN_MCTableHandle;
|
||||
|
||||
#if !defined (MenuList_H)
|
||||
extern HIDDEN_Handle MenuList_H;
|
||||
extern HIDDEN_ProcPtr MBarHook_H;
|
||||
extern HIDDEN_ProcPtr MenuHook_H;
|
||||
extern HIDDEN_Handle MBDFHndl_H;
|
||||
extern HIDDEN_Handle MBSaveLoc_H;
|
||||
extern HIDDEN_MCTableHandle MenuCInfo_H;
|
||||
extern INTEGER TopMenuItem;
|
||||
extern INTEGER AtMenuBottom;
|
||||
extern INTEGER MBarEnable;
|
||||
extern INTEGER MenuFlash;
|
||||
extern INTEGER TheMenu;
|
||||
extern LONGINT MenuDisable;
|
||||
extern INTEGER MBarHeight;
|
||||
#endif
|
||||
|
||||
#define MenuList (MenuList_H.p)
|
||||
#define MBarHook (MBarHook_H.p)
|
||||
#define MenuHook (MenuHook_H.p)
|
||||
#define MBDFHndl (MBDFHndl_H.p)
|
||||
#define MBSaveLoc (MBSaveLoc_H.p)
|
||||
#define MenuCInfo (MenuCInfo_H.p)
|
||||
|
||||
#if !defined (__STDC__)
|
||||
extern void DrawMenuBar();
|
||||
extern void ClearMenuBar();
|
||||
extern void InitMenus();
|
||||
extern MenuHandle NewMenu();
|
||||
extern void CalcMenuSize();
|
||||
extern MenuHandle GetMenu();
|
||||
extern void DisposeMenu();
|
||||
extern void AppendMenu();
|
||||
extern void AddResMenu();
|
||||
extern void DelMenuItem();
|
||||
extern void InsertResMenu();
|
||||
extern void InsMenuItem();
|
||||
extern void InsertMenu();
|
||||
extern void DeleteMenu();
|
||||
extern Handle GetNewMBar();
|
||||
extern Handle GetMenuBar();
|
||||
extern void SetMenuBar();
|
||||
extern INTEGER ROMlib_mentosix();
|
||||
extern void HiliteMenu();
|
||||
extern LONGINT ROMlib_menuhelper();
|
||||
extern LONGINT MenuSelect();
|
||||
extern void FlashMenuBar();
|
||||
extern LONGINT MenuKey();
|
||||
extern void SetItem();
|
||||
extern void GetItem();
|
||||
extern void DisableItem();
|
||||
extern void EnableItem();
|
||||
extern void CheckItem();
|
||||
extern void SetItemMark();
|
||||
extern void GetItemMark();
|
||||
extern void SetItemIcon();
|
||||
extern void GetItemIcon();
|
||||
extern void SetItemStyle();
|
||||
extern void GetItemStyle();
|
||||
extern INTEGER CountMItems();
|
||||
extern MenuHandle GetMHandle();
|
||||
extern void SetMenuFlash();
|
||||
extern BOOLEAN ROMlib_shouldalarm();
|
||||
extern void InitProcMenu();
|
||||
extern LONGINT MenuChoice();
|
||||
extern void GetItemCmd();
|
||||
extern void SetItemCmd();
|
||||
extern LONGINT PopUpMenuSelect();
|
||||
#else /* __STDC__ */
|
||||
extern pascal trap void C_DrawMenuBar( void ); extern pascal trap void P_DrawMenuBar( void );
|
||||
extern pascal trap void C_ClearMenuBar( void ); extern pascal trap void P_ClearMenuBar( void );
|
||||
extern pascal trap void C_InitMenus( void ); extern pascal trap void P_InitMenus( void );
|
||||
extern pascal trap MenuHandle C_NewMenu( INTEGER mid, StringPtr str ); extern pascal trap MenuHandle P_NewMenu( INTEGER mid, StringPtr str);
|
||||
extern pascal trap void C_CalcMenuSize( MenuHandle mh ); extern pascal trap void P_CalcMenuSize( MenuHandle mh);
|
||||
extern pascal trap MenuHandle C_GetMenu( INTEGER rid ); extern pascal trap MenuHandle P_GetMenu( INTEGER rid);
|
||||
extern pascal trap void C_DisposeMenu( MenuHandle mh ); extern pascal trap void P_DisposeMenu( MenuHandle mh);
|
||||
extern pascal trap void C_AppendMenu( MenuHandle mh, StringPtr str ); extern pascal trap void P_AppendMenu( MenuHandle mh, StringPtr str);
|
||||
extern pascal trap void C_AddResMenu( MenuHandle mh, ResType restype ); extern pascal trap void P_AddResMenu( MenuHandle mh, ResType restype);
|
||||
extern pascal trap void C_DelMenuItem( MenuHandle mh,
|
||||
INTEGER item ); extern pascal trap void P_DelMenuItem( MenuHandle mh,
|
||||
INTEGER item );
|
||||
extern pascal trap void C_InsertResMenu( MenuHandle mh, ResType restype,
|
||||
INTEGER after ); extern pascal trap void P_InsertResMenu( MenuHandle mh, ResType restype,
|
||||
INTEGER after );
|
||||
extern pascal trap void C_InsMenuItem( MenuHandle mh, StringPtr str,
|
||||
INTEGER after ); extern pascal trap void P_InsMenuItem( MenuHandle mh, StringPtr str,
|
||||
INTEGER after );
|
||||
extern pascal trap void C_InsertMenu( MenuHandle mh, INTEGER before ); extern pascal trap void P_InsertMenu( MenuHandle mh, INTEGER before);
|
||||
extern pascal trap void C_DeleteMenu( INTEGER mid ); extern pascal trap void P_DeleteMenu( INTEGER mid);
|
||||
extern pascal trap Handle C_GetNewMBar( INTEGER mbarid ); extern pascal trap Handle P_GetNewMBar( INTEGER mbarid);
|
||||
extern pascal trap Handle C_GetMenuBar( void ); extern pascal trap Handle P_GetMenuBar( void );
|
||||
extern pascal trap void C_SetMenuBar( Handle ml ); extern pascal trap void P_SetMenuBar( Handle ml);
|
||||
extern INTEGER ROMlib_mentosix( INTEGER menuid );
|
||||
extern pascal trap void C_HiliteMenu( INTEGER mid ); extern pascal trap void P_HiliteMenu( INTEGER mid);
|
||||
extern LONGINT ROMlib_menuhelper( MenuHandle mh, Rect *saverp,
|
||||
LONGINT oldwhere, BOOLEAN ispopup, INTEGER nmenusdisplayed );
|
||||
extern pascal trap LONGINT C_MenuSelect( Point p ); extern pascal trap LONGINT P_MenuSelect( Point p);
|
||||
extern pascal trap void C_FlashMenuBar( INTEGER mid ); extern pascal trap void P_FlashMenuBar( INTEGER mid);
|
||||
extern pascal trap LONGINT C_MenuKey( CHAR thec ); extern pascal trap LONGINT P_MenuKey( CHAR thec);
|
||||
extern pascal trap void C_SetItem( MenuHandle mh, INTEGER item,
|
||||
StringPtr str ); extern pascal trap void P_SetItem( MenuHandle mh, INTEGER item,
|
||||
StringPtr str );
|
||||
extern pascal trap void C_GetItem( MenuHandle mh, INTEGER item,
|
||||
StringPtr str ); extern pascal trap void P_GetItem( MenuHandle mh, INTEGER item,
|
||||
StringPtr str );
|
||||
extern pascal trap void C_DisableItem( MenuHandle mh, INTEGER item ); extern pascal trap void P_DisableItem( MenuHandle mh, INTEGER item);
|
||||
extern pascal trap void C_EnableItem( MenuHandle mh, INTEGER item ); extern pascal trap void P_EnableItem( MenuHandle mh, INTEGER item);
|
||||
extern pascal trap void C_CheckItem( MenuHandle mh, INTEGER item,
|
||||
BOOLEAN cflag ); extern pascal trap void P_CheckItem( MenuHandle mh, INTEGER item,
|
||||
BOOLEAN cflag );
|
||||
extern pascal trap void C_SetItemMark( MenuHandle mh, INTEGER item,
|
||||
CHAR mark ); extern pascal trap void P_SetItemMark( MenuHandle mh, INTEGER item,
|
||||
CHAR mark );
|
||||
extern pascal trap void C_GetItemMark( MenuHandle mh, INTEGER item,
|
||||
INTEGER *markp ); extern pascal trap void P_GetItemMark( MenuHandle mh, INTEGER item,
|
||||
INTEGER *markp );
|
||||
extern pascal trap void C_SetItemIcon( MenuHandle mh, INTEGER item,
|
||||
Byte icon ); extern pascal trap void P_SetItemIcon( MenuHandle mh, INTEGER item,
|
||||
Byte icon );
|
||||
extern pascal trap void C_GetItemIcon( MenuHandle mh, INTEGER item,
|
||||
INTEGER *iconp ); extern pascal trap void P_GetItemIcon( MenuHandle mh, INTEGER item,
|
||||
INTEGER *iconp );
|
||||
extern pascal trap void C_SetItemStyle( MenuHandle mh, INTEGER item,
|
||||
INTEGER style ); extern pascal trap void P_SetItemStyle( MenuHandle mh, INTEGER item,
|
||||
INTEGER style );
|
||||
extern pascal trap void C_GetItemStyle( MenuHandle mh, INTEGER item,
|
||||
INTEGER *stylep ); extern pascal trap void P_GetItemStyle( MenuHandle mh, INTEGER item,
|
||||
INTEGER *stylep );
|
||||
extern pascal trap INTEGER C_CountMItems( MenuHandle mh ); extern pascal trap INTEGER P_CountMItems( MenuHandle mh);
|
||||
extern pascal trap MenuHandle C_GetMHandle( INTEGER mid ); extern pascal trap MenuHandle P_GetMHandle( INTEGER mid);
|
||||
extern pascal trap void C_SetMenuFlash( INTEGER i ); extern pascal trap void P_SetMenuFlash( INTEGER i);
|
||||
extern BOOLEAN ROMlib_shouldalarm( void );
|
||||
extern pascal trap void C_InitProcMenu( INTEGER mbid ); extern pascal trap void P_InitProcMenu( INTEGER mbid);
|
||||
extern pascal trap LONGINT C_MenuChoice( void ); extern pascal trap LONGINT P_MenuChoice( void );
|
||||
extern pascal trap void C_GetItemCmd( MenuHandle mh, INTEGER item,
|
||||
CHAR *cmdp ); extern pascal trap void P_GetItemCmd( MenuHandle mh, INTEGER item,
|
||||
CHAR *cmdp );
|
||||
extern pascal trap void C_SetItemCmd( MenuHandle mh, INTEGER item,
|
||||
CHAR cmd ); extern pascal trap void P_SetItemCmd( MenuHandle mh, INTEGER item,
|
||||
CHAR cmd );
|
||||
extern pascal trap LONGINT C_PopUpMenuSelect( MenuHandle mh, INTEGER top,
|
||||
INTEGER left, INTEGER item ); extern pascal trap LONGINT P_PopUpMenuSelect( MenuHandle mh, INTEGER top,
|
||||
INTEGER left, INTEGER item );
|
||||
|
||||
extern pascal trap void C_DelMCEntries (INTEGER, INTEGER);
|
||||
extern pascal trap MCTableHandle C_GetMCInfo ();
|
||||
extern pascal trap void C_SetMCInfo (MCTableHandle);
|
||||
extern pascal trap void C_DispMCInfo (MCTableHandle);
|
||||
extern pascal trap MCEntryPtr C_GetMCEntry (INTEGER, INTEGER);
|
||||
extern pascal trap void C_SetMCEntries (INTEGER, MCTablePtr);
|
||||
extern pascal trap void C_InvalMenuBar (void);
|
||||
|
||||
#endif /* __STDC__ */
|
||||
#endif /* __MENU__ */
|
||||
30
src/include/NotifyMgr.h
Normal file
30
src/include/NotifyMgr.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#if !defined (__NOTIFYMGR__)
|
||||
#define __NOTIFYMGR__
|
||||
|
||||
/*
|
||||
* Copyright 1993 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: NotifyMgr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
QElemPtr qLink PACKED_P;
|
||||
INTEGER qType PACKED;
|
||||
INTEGER nmFlags PACKED;
|
||||
LONGINT nmPrivate PACKED;
|
||||
INTEGER nmReserved PACKED;
|
||||
INTEGER nmMark PACKED;
|
||||
Handle nmIcon PACKED_P;
|
||||
Handle nmSound PACKED_P;
|
||||
StringPtr nmStr PACKED_P;
|
||||
ProcPtr nmResp PACKED_P; /* pascal void myresponse(NMRecPtr foo) */
|
||||
/* value of -1 means remove queue element
|
||||
automatically */
|
||||
LONGINT nmRefCon PACKED;
|
||||
} NMRec, *NMRecPtr;
|
||||
|
||||
extern trap OSErrRET NMInstall( NMRecPtr nmptr );
|
||||
extern trap OSErrRET NMRemove( NMRecPtr nmptr );
|
||||
|
||||
#endif /* __NOTIFYMGR__ */
|
||||
229
src/include/OLDSANE.h
Normal file
229
src/include/OLDSANE.h
Normal file
@@ -0,0 +1,229 @@
|
||||
#if !defined(__SANE__)
|
||||
#define __SANE__
|
||||
|
||||
/*
|
||||
* Copyright 1990, 1991 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: OLDSANE.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
INTEGER exp PACKED;
|
||||
INTEGER man[4] PACKED;
|
||||
} extended80;
|
||||
|
||||
typedef struct {
|
||||
INTEGER exp PACKED;
|
||||
INTEGER zero PACKED;
|
||||
INTEGER man[4] PACKED;
|
||||
} extended96;
|
||||
|
||||
typedef struct {
|
||||
LONGINT hilong PACKED;
|
||||
LONGINT lowlong PACKED;
|
||||
} comp;
|
||||
|
||||
#define SIGDIGLEN 20
|
||||
|
||||
typedef struct {
|
||||
INTEGER sgn PACKED;
|
||||
INTEGER exp PACKED;
|
||||
unsigned char sig[SIGDIGLEN] PACKED;
|
||||
} Decimal;
|
||||
|
||||
typedef enum { FloatDecimal, FixedDecimal = 256 } toobigdecformstyle_t;
|
||||
|
||||
typedef INTEGER DecFormStyle;
|
||||
|
||||
#define DECIMALTYPEMASK 0x0100
|
||||
|
||||
typedef enum {SNaN = 1, QNaN, Infinite, ZeroNum, NormalNum, DenormalNum}
|
||||
NumClass;
|
||||
|
||||
typedef struct {
|
||||
DecFormStyle style PACKED;
|
||||
INTEGER digits PACKED;
|
||||
} DecForm;
|
||||
|
||||
#define Decstr char *
|
||||
|
||||
#define FX_OPERAND 0x0000
|
||||
#define FD_OPERAND 0x0800
|
||||
#define FS_OPERAND 0x1000
|
||||
#define FC_OPERAND 0x3000
|
||||
#define FI_OPERAND 0x2000
|
||||
#define FL_OPERAND 0x2800
|
||||
|
||||
#define Fx2X_OPCODE 0x000E
|
||||
|
||||
#define FI2X (FI_OPERAND + Fx2X_OPCODE)
|
||||
/* DO NOT DELETE THIS LINE */
|
||||
#if !defined (__STDC__)
|
||||
extern pascal void ROMlib_Fcomp2X();
|
||||
extern void ROMlib_Fsetenv();
|
||||
extern void ROMlib_Fgetenv();
|
||||
extern void ROMlib_Fprocentry();
|
||||
extern void ROMlib_Fprocexit();
|
||||
extern void ROMlib_Ftestxcp();
|
||||
extern void ROMlib_FsqrtX();
|
||||
extern void ROMlib_FscalbX();
|
||||
extern void ROMlib_FlogbX();
|
||||
extern void ROMlib_FabsX();
|
||||
extern void ROMlib_FnegX();
|
||||
extern void ROMlib_FrintX();
|
||||
extern void ROMlib_FtintX();
|
||||
extern void ROMlib_Fcpysgnx();
|
||||
extern void ROMlib_Faddx();
|
||||
extern void ROMlib_Fsubx();
|
||||
extern void ROMlib_Fmulx();
|
||||
extern void ROMlib_Fdivx();
|
||||
extern void ROMlib_Fremx();
|
||||
extern void ROMlib_Fcmpx();
|
||||
extern void ROMlib_FcpXx();
|
||||
extern void ROMlib_FX2x();
|
||||
extern void ROMlib_Fx2X();
|
||||
extern void ROMlib_Fx2dec();
|
||||
extern void ROMlib_Fdec2x();
|
||||
extern void ROMlib_Fclassx();
|
||||
extern void ROMlib_FlnX();
|
||||
extern void ROMlib_Flog2X();
|
||||
extern void ROMlib_Fln1X();
|
||||
extern void ROMlib_Flog21X();
|
||||
extern void ROMlib_FexpX();
|
||||
extern void ROMlib_Fexp2X();
|
||||
extern void ROMlib_Fexp1X();
|
||||
extern void ROMlib_Fexp21X();
|
||||
extern void ROMlib_Fxpwri();
|
||||
extern void ROMlib_Fxpwry();
|
||||
extern void ROMlib_Fcompound();
|
||||
extern void ROMlib_Fannuity();
|
||||
extern void ROMlib_FsinX();
|
||||
extern void ROMlib_FcosX();
|
||||
extern void ROMlib_FtanX();
|
||||
extern void ROMlib_FatanX();
|
||||
extern void ROMlib_FrandX();
|
||||
extern void ROMlib_Fdec2str();
|
||||
extern void ROMlib_Fxstr2dec();
|
||||
extern void ROMlib_Fcstr2dec();
|
||||
extern void ROMlib_Fpstr2dec();
|
||||
#else /* __STDC__ */
|
||||
extern pascal void C_ROMlib_Fcomp2X( comp volatile sp, extended80 *
|
||||
volatile dp ); extern pascal void P_ROMlib_Fcomp2X( comp volatile sp, extended80 *
|
||||
volatile dp );
|
||||
extern pascal trap void C_ROMlib_Fsetenv( INTEGER *volatile dp,
|
||||
INTEGER volatile sel ); extern pascal trap void P_ROMlib_Fsetenv( INTEGER *volatile dp,
|
||||
INTEGER volatile sel );
|
||||
extern pascal trap void C_ROMlib_Fgetenv( INTEGER *volatile dp,
|
||||
INTEGER volatile sel ); extern pascal trap void P_ROMlib_Fgetenv( INTEGER *volatile dp,
|
||||
INTEGER volatile sel );
|
||||
extern pascal trap void C_ROMlib_Fprocentry( INTEGER *volatile dp,
|
||||
INTEGER volatile sel ); extern pascal trap void P_ROMlib_Fprocentry( INTEGER *volatile dp,
|
||||
INTEGER volatile sel );
|
||||
extern pascal trap void C_ROMlib_Fprocexit( INTEGER *volatile dp,
|
||||
INTEGER volatile sel ); extern pascal trap void P_ROMlib_Fprocexit( INTEGER *volatile dp,
|
||||
INTEGER volatile sel );
|
||||
extern pascal trap void C_ROMlib_Ftestxcp( INTEGER *volatile dp,
|
||||
INTEGER volatile sel ); extern pascal trap void P_ROMlib_Ftestxcp( INTEGER *volatile dp,
|
||||
INTEGER volatile sel );
|
||||
extern pascal trap void C_ROMlib_FsqrtX( extended80 *volatile dp,
|
||||
unsigned short volatile sel ); extern pascal trap void P_ROMlib_FsqrtX( extended80 *volatile dp,
|
||||
unsigned short volatile sel );
|
||||
extern pascal trap void C_ROMlib_FscalbX( INTEGER *volatile sp,
|
||||
extended80 *volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_FscalbX( INTEGER *volatile sp,
|
||||
extended80 *volatile dp, unsigned short volatile sel );
|
||||
extern pascal trap void C_ROMlib_FlogbX( extended80 *volatile dp,
|
||||
unsigned short volatile sel ); extern pascal trap void P_ROMlib_FlogbX( extended80 *volatile dp,
|
||||
unsigned short volatile sel );
|
||||
extern pascal trap void C_ROMlib_FabsX( extended80 *volatile dp,
|
||||
unsigned short volatile sel ); extern pascal trap void P_ROMlib_FabsX( extended80 *volatile dp,
|
||||
unsigned short volatile sel );
|
||||
extern pascal trap void C_ROMlib_FnegX( extended80 *volatile dp,
|
||||
unsigned short volatile sel ); extern pascal trap void P_ROMlib_FnegX( extended80 *volatile dp,
|
||||
unsigned short volatile sel );
|
||||
extern pascal trap void C_ROMlib_FrintX( extended80 *volatile dp,
|
||||
unsigned short volatile sel ); extern pascal trap void P_ROMlib_FrintX( extended80 *volatile dp,
|
||||
unsigned short volatile sel );
|
||||
extern pascal trap void C_ROMlib_FtintX( extended80 *volatile dp,
|
||||
unsigned short volatile sel ); extern pascal trap void P_ROMlib_FtintX( extended80 *volatile dp,
|
||||
unsigned short volatile sel );
|
||||
extern pascal trap void C_ROMlib_Fcpysgnx( float *volatile sp,
|
||||
float *volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_Fcpysgnx( float *volatile sp,
|
||||
float *volatile dp, unsigned short volatile sel );
|
||||
extern pascal trap void C_ROMlib_Faddx( void *volatile sp, extended80 *
|
||||
volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_Faddx( void *volatile sp, extended80 *
|
||||
volatile dp, unsigned short volatile sel );
|
||||
extern pascal trap void C_ROMlib_Fsubx( void *volatile sp, extended80 *
|
||||
volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_Fsubx( void *volatile sp, extended80 *
|
||||
volatile dp, unsigned short volatile sel );
|
||||
extern pascal trap void C_ROMlib_Fmulx( void *volatile sp, extended80 *
|
||||
volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_Fmulx( void *volatile sp, extended80 *
|
||||
volatile dp, unsigned short volatile sel );
|
||||
extern pascal trap void C_ROMlib_Fdivx( void *volatile sp, extended80 *
|
||||
volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_Fdivx( void *volatile sp, extended80 *
|
||||
volatile dp, unsigned short volatile sel );
|
||||
extern pascal trap void C_ROMlib_Fremx( void *volatile sp,
|
||||
extended80 *volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_Fremx( void *volatile sp,
|
||||
extended80 *volatile dp, unsigned short volatile sel );
|
||||
extern pascal trap void C_ROMlib_Fcmpx( void *volatile sp, extended80 *
|
||||
volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_Fcmpx( void *volatile sp, extended80 *
|
||||
volatile dp, unsigned short volatile sel );
|
||||
extern pascal trap void C_ROMlib_FcpXx( void *volatile sp, extended80 *
|
||||
volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_FcpXx( void *volatile sp, extended80 *
|
||||
volatile dp, unsigned short volatile sel );
|
||||
extern pascal trap void C_ROMlib_FX2x( extended80 *volatile sp, void *
|
||||
volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_FX2x( extended80 *volatile sp, void *
|
||||
volatile dp, unsigned short volatile sel );
|
||||
extern pascal trap void C_ROMlib_Fx2X( void *volatile sp, extended80 *
|
||||
volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_Fx2X( void *volatile sp, extended80 *
|
||||
volatile dp, unsigned short volatile sel );
|
||||
extern pascal trap void C_ROMlib_Fx2dec( DecForm *volatile sp2, void *
|
||||
volatile sp, Decimal *volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_Fx2dec( DecForm *volatile sp2, void *
|
||||
volatile sp, Decimal *volatile dp, unsigned short volatile sel );
|
||||
extern pascal trap void C_ROMlib_Fdec2x( Decimal *volatile sp, void *
|
||||
volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_Fdec2x( Decimal *volatile sp, void *
|
||||
volatile dp, unsigned short volatile sel );
|
||||
extern pascal trap void C_ROMlib_Fclassx( void *volatile sp, INTEGER *
|
||||
volatile dp, unsigned short volatile sel ); extern pascal trap void P_ROMlib_Fclassx( void *volatile sp, INTEGER *
|
||||
volatile dp, unsigned short volatile sel );
|
||||
extern pascal trap void C_ROMlib_FlnX( extended80 *volatile dp ); extern pascal trap void P_ROMlib_FlnX( extended80 *volatile dp);
|
||||
extern pascal trap void C_ROMlib_Flog2X( extended80 *volatile dp ); extern pascal trap void P_ROMlib_Flog2X( extended80 *volatile dp);
|
||||
extern pascal trap void C_ROMlib_Fln1X( extended80 *volatile dp ); extern pascal trap void P_ROMlib_Fln1X( extended80 *volatile dp);
|
||||
extern pascal trap void C_ROMlib_Flog21X( extended80 *volatile dp ); extern pascal trap void P_ROMlib_Flog21X( extended80 *volatile dp);
|
||||
extern pascal trap void C_ROMlib_FexpX( extended80 *volatile dp ); extern pascal trap void P_ROMlib_FexpX( extended80 *volatile dp);
|
||||
extern pascal trap void C_ROMlib_Fexp2X( extended80 *volatile dp ); extern pascal trap void P_ROMlib_Fexp2X( extended80 *volatile dp);
|
||||
extern pascal trap void C_ROMlib_Fexp1X( extended80 *volatile dp ); extern pascal trap void P_ROMlib_Fexp1X( extended80 *volatile dp);
|
||||
extern pascal trap void C_ROMlib_Fexp21X( extended80 *volatile dp ); extern pascal trap void P_ROMlib_Fexp21X( extended80 *volatile dp);
|
||||
extern pascal trap void C_ROMlib_Fxpwri( INTEGER *volatile sp,
|
||||
extended80 *volatile dp ); extern pascal trap void P_ROMlib_Fxpwri( INTEGER *volatile sp,
|
||||
extended80 *volatile dp );
|
||||
extern pascal trap void C_ROMlib_Fxpwry( extended80 *volatile sp,
|
||||
extended80 *volatile dp ); extern pascal trap void P_ROMlib_Fxpwry( extended80 *volatile sp,
|
||||
extended80 *volatile dp );
|
||||
extern pascal trap void C_ROMlib_Fcompound( extended80 *volatile sp2,
|
||||
extended80 *volatile sp, extended80 *volatile dp ); extern pascal trap void P_ROMlib_Fcompound( extended80 *volatile sp2,
|
||||
extended80 *volatile sp, extended80 *volatile dp );
|
||||
extern pascal trap void C_ROMlib_Fannuity( extended80 *volatile sp2,
|
||||
extended80 *volatile sp, extended80 *volatile dp ); extern pascal trap void P_ROMlib_Fannuity( extended80 *volatile sp2,
|
||||
extended80 *volatile sp, extended80 *volatile dp );
|
||||
extern pascal trap void C_ROMlib_FsinX( extended80 *volatile dp ); extern pascal trap void P_ROMlib_FsinX( extended80 *volatile dp);
|
||||
extern pascal trap void C_ROMlib_FcosX( extended80 *volatile dp ); extern pascal trap void P_ROMlib_FcosX( extended80 *volatile dp);
|
||||
extern pascal trap void C_ROMlib_FtanX( extended80 *volatile dp ); extern pascal trap void P_ROMlib_FtanX( extended80 *volatile dp);
|
||||
extern pascal trap void C_ROMlib_FatanX( extended80 *volatile dp ); extern pascal trap void P_ROMlib_FatanX( extended80 *volatile dp);
|
||||
extern pascal trap void C_ROMlib_FrandX( extended80 *volatile dp ); extern pascal trap void P_ROMlib_FrandX( extended80 *volatile dp);
|
||||
extern pascal trap void C_ROMlib_Fdec2str( DecForm *volatile sp2,
|
||||
Decimal *volatile sp, Decstr volatile dp ); extern pascal trap void P_ROMlib_Fdec2str( DecForm *volatile sp2,
|
||||
Decimal *volatile sp, Decstr volatile dp );
|
||||
extern pascal trap void C_ROMlib_Fxstr2dec( Decstr volatile sp2,
|
||||
INTEGER *volatile sp, Decimal *volatile dp2, Byte *volatile dp,
|
||||
INTEGER lastchar ); extern pascal trap void P_ROMlib_Fxstr2dec( Decstr volatile sp2,
|
||||
INTEGER *volatile sp, Decimal *volatile dp2, Byte *volatile dp,
|
||||
INTEGER lastchar );
|
||||
extern pascal trap void C_ROMlib_Fcstr2dec( Decstr volatile sp2,
|
||||
INTEGER *volatile sp, Decimal *volatile dp2, Byte *volatile dp ); extern pascal trap void P_ROMlib_Fcstr2dec( Decstr volatile sp2,
|
||||
INTEGER *volatile sp, Decimal *volatile dp2, Byte *volatile dp );
|
||||
extern pascal trap void C_ROMlib_Fpstr2dec( Decstr volatile sp2,
|
||||
INTEGER *volatile sp, Decimal *volatile dp2, Byte *volatile dp ); extern pascal trap void P_ROMlib_Fpstr2dec( Decstr volatile sp2,
|
||||
INTEGER *volatile sp, Decimal *volatile dp2, Byte *volatile dp );
|
||||
#endif /* __STDC__ */
|
||||
#endif
|
||||
155
src/include/OSEvent.h
Normal file
155
src/include/OSEvent.h
Normal file
@@ -0,0 +1,155 @@
|
||||
#if !defined (_OSEVENT_H_)
|
||||
#define _OSEVENT_H_
|
||||
|
||||
#include "EventMgr.h"
|
||||
#include "PPC.h"
|
||||
|
||||
#include "rsys/commonevt.h"
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990, 1996 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: OSEvent.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#define evtNotEnb 1
|
||||
|
||||
typedef struct {
|
||||
QElemPtr qLink PACKED_P;
|
||||
INTEGER qType PACKED;
|
||||
INTEGER evtQWhat PACKED;
|
||||
LONGINT evtQMessage PACKED;
|
||||
LONGINT evtQWhen PACKED;
|
||||
Point evtQWhere PACKED;
|
||||
INTEGER evtQModifiers PACKED;
|
||||
} EvQEl;
|
||||
|
||||
typedef EvQEl *EvQElPtr;
|
||||
typedef struct { EvQElPtr p PACKED_P; } HIDDEN_EvQElPtr;
|
||||
|
||||
#define osEvt 15
|
||||
#define SUSPENDRESUMEBITS 0x01000000
|
||||
#define SUSPEND (0 << 0)
|
||||
#define RESUME (1 << 0)
|
||||
#define CONVERTCLIPBOARD (1 << 1)
|
||||
#define mouseMovedMessage 0xFA
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SZreserved0 = (1 << 15),
|
||||
SZacceptSuspendResumeEvents = (1 << 14),
|
||||
SZreserved1 = (1 << 13),
|
||||
SZcanBackground = (1 << 12),
|
||||
SZdoesActivateOnFGSwitch = (1 << 11),
|
||||
SZonlyBackground = (1 << 10),
|
||||
SZgetFrontClicks = (1 << 9),
|
||||
SZAcceptAppDiedEvents = (1 << 8),
|
||||
SZis32BitCompatible = (1 << 7),
|
||||
SZisHighLevelEventAware = (1 << 6),
|
||||
SZlocalAndRemoveHLEvents = (1 << 5),
|
||||
SZisStationeryAware = (1 << 4),
|
||||
SZuseTextEditServices = (1 << 3),
|
||||
SZreserved2 = (1 << 2),
|
||||
SZreserved3 = (1 << 1),
|
||||
SZreserved4 = (1 << 0)
|
||||
} SZ_t;
|
||||
|
||||
typedef struct size_info
|
||||
{
|
||||
int16 size_flags PACKED;
|
||||
int32 preferred_size PACKED;
|
||||
int32 minimum_size PACKED;
|
||||
|
||||
/* extra */
|
||||
boolean_t size_resource_present_p;
|
||||
boolean_t application_p;
|
||||
} size_info_t;
|
||||
|
||||
extern size_info_t size_info;
|
||||
|
||||
#if !defined (Ticks_UL)
|
||||
extern HIDDEN_ULONGINT Ticks_UL;
|
||||
extern INTEGER monkeylives;
|
||||
extern INTEGER SysEvtMask;
|
||||
extern QHdr EventQueue;
|
||||
#endif
|
||||
|
||||
#if !defined (SHORT_TICKS)
|
||||
|
||||
#define Ticks (Ticks_UL.u)
|
||||
#define CRACKER_ZERO (0)
|
||||
|
||||
#else
|
||||
|
||||
#if !defined (SHORT_TICKS_SHIFT)
|
||||
#define SHORT_TICKS_SHIFT 0
|
||||
#endif
|
||||
|
||||
#define Ticks ((ULONGINT) (*(unsigned long *)SYN68K_TO_US(0x16c)) \
|
||||
& ((1<<(16+SHORT_TICKS_SHIFT))-1))
|
||||
|
||||
/* This macro evaluates to *(short *) 0x16a, but the assembly code
|
||||
* generated varies depending on what line the macro is invoked!
|
||||
*/
|
||||
|
||||
#define CRACKER_ZERO \
|
||||
(CW(*(short *) ({ volatile long a = __LINE__ * 17; \
|
||||
*&a + ((SYN68K_TO_US(0x16a)) - __LINE__ * 17); })) >> SHORT_TICKS_SHIFT)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
extern void ROMlib_eventdep( void );
|
||||
extern void insertcommonevent( char *xeventp, commonevent *comevtp );
|
||||
extern void ROMlib_zapmap( LONGINT loc, LONGINT val );
|
||||
extern trap OSErrRET PPostEvent( INTEGER evcode,
|
||||
LONGINT evmsg, HIDDEN_EvQElPtr *qelp );
|
||||
extern OSErrRET ROMlib_PPostEvent( INTEGER evcode, LONGINT evmsg,
|
||||
HIDDEN_EvQElPtr *qelp, LONGINT when, Point where, INTEGER butmods );
|
||||
extern trap OSErrRET PostEvent( INTEGER evcode, LONGINT evmsg );
|
||||
extern trap void FlushEvents( INTEGER evmask,
|
||||
INTEGER stopmask );
|
||||
extern trap BOOLEANRET GetOSEvent( INTEGER evmask, EventRecord *eventp );
|
||||
extern trap BOOLEANRET OSEventAvail( INTEGER evmask,
|
||||
EventRecord *eventp );
|
||||
extern trap void SetEventMask( INTEGER evmask );
|
||||
extern QHdrPtr GetEvQHdr( void );
|
||||
|
||||
extern EvQEl *geteventelem (void);
|
||||
|
||||
typedef struct TargetID
|
||||
{
|
||||
int32 sessionID PACKED;
|
||||
PPCPortRec name PACKED;
|
||||
LocationNameRec location PACKED;
|
||||
PPCPortRec recvrName PACKED;
|
||||
} TargetID, TargetIDPtr;
|
||||
|
||||
typedef struct HighLevelEventMsg
|
||||
{
|
||||
int16 HighLevelEventMsgHeaderlength PACKED;
|
||||
int16 version PACKED;
|
||||
int32 reserved1 PACKED;
|
||||
EventRecord theMsgEvent PACKED;
|
||||
int32 userRefCon PACKED;
|
||||
int32 postingOptions PACKED;
|
||||
int32 msgLength PACKED;
|
||||
} HighLevelEventMsg, *HighLevelEventMsgPtr;
|
||||
|
||||
typedef ProcPtr GetSpecificFilterProcPtr;
|
||||
|
||||
#define noOutstandingHLE (-607)
|
||||
#define bufferIsSmall (-608)
|
||||
|
||||
extern pascal trap OSErr C_AcceptHighLevelEvent (TargetID *sender_id_return, int32 *refcon_return, Ptr msg_buf, int32 *msg_length_return);
|
||||
extern pascal trap Boolean C_GetSpecificHighLevelEvent (GetSpecificFilterProcPtr fn, Ptr data, OSErr * err_return);
|
||||
extern pascal trap OSErr C_PostHighLevelEvent (EventRecord *evt, Ptr receiver_id, int32 refcon, Ptr msg_buf, int32 msg_length, int32 post_options);
|
||||
|
||||
/* #### move to rsys/foo.h */
|
||||
extern boolean_t hle_get_event (EventRecord *evt, boolean_t remflag);
|
||||
extern void hle_init (void);
|
||||
extern void hle_reinit (void);
|
||||
extern void hle_reset (void);
|
||||
|
||||
#endif /* !_OSEVENT_H_ */
|
||||
204
src/include/OSUtil.h
Normal file
204
src/include/OSUtil.h
Normal file
@@ -0,0 +1,204 @@
|
||||
#if !defined (__OSUTIL__)
|
||||
#define __OSUTIL__
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: OSUtil.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#include "VRetraceMgr.h"
|
||||
#include "FileMgr.h"
|
||||
#include "OSEvent.h"
|
||||
|
||||
#define macXLMachine 0
|
||||
#define macMachine 1
|
||||
#define UNIXMachine 1127
|
||||
|
||||
#define clkRdErr (-85)
|
||||
#define clkWrErr (-86)
|
||||
#define memFullErr (-108)
|
||||
#define memWZErr (-111)
|
||||
#define nilHandleErr (-109)
|
||||
#define prInitErr (-88)
|
||||
#define prWrErr (-87)
|
||||
|
||||
typedef struct {
|
||||
Byte valid PACKED;
|
||||
Byte aTalkA PACKED;
|
||||
Byte aTalkB PACKED;
|
||||
Byte config PACKED;
|
||||
INTEGER portA PACKED;
|
||||
INTEGER portB PACKED;
|
||||
LONGINT alarm PACKED;
|
||||
INTEGER font PACKED;
|
||||
INTEGER kbdPrint PACKED;
|
||||
INTEGER volClik PACKED;
|
||||
INTEGER misc PACKED;
|
||||
} SysParmType;
|
||||
typedef SysParmType *SysPPtr;
|
||||
|
||||
typedef enum { dummyType, vType, ioQType, drvQType, evType, fsQType } QTypes;
|
||||
|
||||
union __qe {
|
||||
VBLTask vblQElem;
|
||||
ParamBlockRec ioQElem;
|
||||
DrvQEl drvQElem;
|
||||
EvQEl evQElem;
|
||||
VCB vcbQElem;
|
||||
};
|
||||
typedef union __qe QElem;
|
||||
|
||||
typedef struct {
|
||||
INTEGER year PACKED;
|
||||
INTEGER month PACKED;
|
||||
INTEGER day PACKED;
|
||||
INTEGER hour PACKED;
|
||||
INTEGER minute PACKED;
|
||||
INTEGER second PACKED;
|
||||
INTEGER dayOfWeek PACKED;
|
||||
} DateTimeRec;
|
||||
|
||||
typedef struct {
|
||||
INTEGER environsVersion PACKED;
|
||||
INTEGER machineType PACKED;
|
||||
INTEGER systemVersion PACKED;
|
||||
INTEGER processor PACKED;
|
||||
BOOLEAN hasFPU PACKED;
|
||||
BOOLEAN hasColorQD PACKED;
|
||||
INTEGER keyBoardType PACKED;
|
||||
INTEGER atDrvrVersNum PACKED;
|
||||
INTEGER sysVRefNum PACKED;
|
||||
} SysEnvRec, *SysEnvRecPtr;
|
||||
|
||||
#define SYSRECVNUM 2
|
||||
|
||||
/* sysEnv machine types */
|
||||
#define envMachUnknown 0
|
||||
#define env512KE 1
|
||||
#define envMacPlus 2
|
||||
#define envSE 3
|
||||
#define envMacII 4
|
||||
#define envMac -1
|
||||
#define envXL -2
|
||||
|
||||
#define envCPUUnknown 0
|
||||
#define env68000 1
|
||||
#define env68020 3
|
||||
#define env68030 4
|
||||
#define env68040 5
|
||||
|
||||
#define envUnknownKbd 0
|
||||
#define envMacKbd 1
|
||||
#define envMacAndPad 2
|
||||
#define envMacPlusKbd 3
|
||||
#define envAExtendKbd 4
|
||||
#define envStandADBKbd 5
|
||||
|
||||
#define envBadVers (-5501)
|
||||
#define envVersTooBig (-5502)
|
||||
|
||||
#define OSTrap 0
|
||||
#define ToolTrap 1
|
||||
|
||||
|
||||
#if !defined (SysVersion)
|
||||
extern INTEGER SysVersion;
|
||||
extern Byte SPValid;
|
||||
extern Byte SPATalkA;
|
||||
extern Byte SPATalkB;
|
||||
extern Byte SPConfig;
|
||||
extern INTEGER SPPortA;
|
||||
extern INTEGER SPPortB;
|
||||
extern LONGINT SPAlarm;
|
||||
extern INTEGER SPFont;
|
||||
extern Byte SPKbd;
|
||||
extern Byte SPPrint;
|
||||
extern Byte SPVolCtl;
|
||||
extern Byte SPClikCaret;
|
||||
extern Byte SPMisc2;
|
||||
extern ULONGINT Time;
|
||||
extern Byte MMU32Bit;
|
||||
extern Byte MMUType;
|
||||
extern Byte KbdType;
|
||||
#endif
|
||||
|
||||
#if !defined (__STDC__)
|
||||
extern OSErrRET HandToHand();
|
||||
extern OSErrRET PtrToHand();
|
||||
extern OSErrRET PtrToXHand();
|
||||
extern OSErrRET HandAndHand();
|
||||
extern OSErrRET PtrAndHand();
|
||||
extern LONGINT ROMlib_RelString();
|
||||
extern INTEGERRET RelString();
|
||||
extern BOOLEANRET EqualString();
|
||||
extern void ROMlib_UprString();
|
||||
extern void UprString();
|
||||
extern void GetDateTime();
|
||||
extern OSErrRET ReadDateTime();
|
||||
extern OSErrRET SetDateTime();
|
||||
extern void Date2Secs();
|
||||
extern void Secs2Date();
|
||||
extern void GetTime();
|
||||
extern void SetTime();
|
||||
extern OSErrRET InitUtil();
|
||||
extern SysPPtr GetSysPPtr();
|
||||
extern OSErrRET WriteParam();
|
||||
extern void Enqueue();
|
||||
extern OSErrRET Dequeue();
|
||||
extern LONGINT GetTrapAddress();
|
||||
extern LONGINT NGetTrapAddress();
|
||||
extern void SetTrapAddress();
|
||||
extern void Delay();
|
||||
extern void SysBeep();
|
||||
extern void Environs();
|
||||
extern OSErrRET SysEnvirons();
|
||||
extern void Restart();
|
||||
extern void SetUpA5();
|
||||
extern void RestoreA5();
|
||||
extern void GetMMUMode();
|
||||
extern void SwapMMUMode();
|
||||
extern LONGINT StripAddress();
|
||||
#else /* __STDC__ */
|
||||
extern trap OSErrRET HandToHand( HIDDEN_Handle *h );
|
||||
extern trap OSErrRET PtrToHand( Ptr p, HIDDEN_Handle *h, LONGINT s );
|
||||
extern trap OSErrRET PtrToXHand( Ptr p, Handle h, LONGINT s );
|
||||
extern trap OSErrRET HandAndHand( Handle h1, Handle h2 );
|
||||
extern trap OSErrRET PtrAndHand( Ptr p, Handle h, LONGINT s1 );
|
||||
extern LONGINT ROMlib_RelString( unsigned char *s1, unsigned char *s2,
|
||||
BOOLEAN casesig, BOOLEAN diacsig, LONGINT d0 );
|
||||
extern trap INTEGERRET RelString( StringPtr s1, StringPtr s2,
|
||||
BOOLEAN casesig, BOOLEAN diacsig );
|
||||
extern trap BOOLEANRET EqualString( StringPtr s1, StringPtr s2,
|
||||
BOOLEAN casesig, BOOLEAN diacsig );
|
||||
extern void ROMlib_UprString( StringPtr s, BOOLEAN diac, INTEGER len );
|
||||
extern trap void UprString( StringPtr s, BOOLEAN diac );
|
||||
extern void GetDateTime( LONGINT *mactimepointer );
|
||||
extern trap OSErrRET ReadDateTime( LONGINT *secs );
|
||||
extern trap OSErrRET SetDateTime( LONGINT mactime );
|
||||
extern trap void Date2Secs( DateTimeRec *d, LONGINT *s );
|
||||
extern trap void Secs2Date( LONGINT mactime, DateTimeRec *d );
|
||||
extern void GetTime( DateTimeRec *d );
|
||||
extern void SetTime( DateTimeRec *d );
|
||||
extern trap OSErrRET InitUtil( void );
|
||||
extern SysPPtr GetSysPPtr( void );
|
||||
extern trap OSErrRET WriteParam( void );
|
||||
extern trap void Enqueue( QElemPtr e, QHdrPtr h );
|
||||
extern trap OSErrRET Dequeue( QElemPtr e, QHdrPtr h );
|
||||
extern LONGINT GetTrapAddress( INTEGER n );
|
||||
extern LONGINT NGetTrapAddress( INTEGER n, INTEGER ttype );
|
||||
extern void SetTrapAddress( LONGINT addr,
|
||||
INTEGER n );
|
||||
extern trap void Delay( LONGINT n, LONGINT *ftp );
|
||||
extern pascal trap void C_SysBeep( INTEGER i ); extern pascal trap void P_SysBeep( INTEGER i);
|
||||
extern trap void Environs( INTEGER *rom, INTEGER *machine );
|
||||
extern trap OSErrRET SysEnvirons( INTEGER vers, SysEnvRecPtr p );
|
||||
extern void Restart( void );
|
||||
extern void SetUpA5( void );
|
||||
extern void RestoreA5( void );
|
||||
extern void GetMMUMode( INTEGER *ip );
|
||||
extern void SwapMMUMode( Byte *bp );
|
||||
extern LONGINT StripAddress( LONGINT l );
|
||||
#endif /* __STDC__ */
|
||||
#endif /* __OSUTIL__ */
|
||||
47
src/include/PPC.h
Normal file
47
src/include/PPC.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#if !defined (_PPC_H_)
|
||||
#define _PPC_H_
|
||||
|
||||
/* Copyright 1996 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: PPC.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
typedef int16 PPCPortKinds;
|
||||
typedef int16 PPCLocationKind;
|
||||
|
||||
typedef struct EntityName
|
||||
{
|
||||
/* #### bogus */
|
||||
} EntityName;
|
||||
|
||||
typedef struct LocationNameRec
|
||||
{
|
||||
PPCLocationKind locationKindSelector PACKED;
|
||||
|
||||
union
|
||||
{
|
||||
EntityName npbEntity PACKED;
|
||||
Str32 npbType PACKED;
|
||||
} u PACKED;
|
||||
} LocationNameRec;
|
||||
|
||||
typedef struct PPCPortRec
|
||||
{
|
||||
ScriptCode nameScript PACKED;
|
||||
Str32 name PACKED;
|
||||
|
||||
PPCPortKinds portKindsSelector PACKED;
|
||||
|
||||
union
|
||||
{
|
||||
Str32 portTypeStr PACKED;
|
||||
struct
|
||||
{
|
||||
OSType creator PACKED;
|
||||
OSType type PACKED;
|
||||
} port PACKED;
|
||||
} u PACKED;
|
||||
} PPCPortRec, *PPCPortPtr;
|
||||
|
||||
#endif /* !_PPC_H_ */
|
||||
30
src/include/Package.h
Normal file
30
src/include/Package.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#if !defined (__PACKAGE__)
|
||||
#define __PACKAGE__
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990, 1996 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: Package.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
|
||||
#define dskInit 2
|
||||
#define stdFile 3
|
||||
#define flPoint 4
|
||||
#define trFunc 5
|
||||
#define intUtil 6
|
||||
#define bdConv 7
|
||||
|
||||
#if !defined (AppPacks_H)
|
||||
extern HIDDEN_Handle AppPacks_H[8];
|
||||
#endif
|
||||
|
||||
#if !defined (__STDC__)
|
||||
extern void InitPack();
|
||||
extern void InitAllPacks();
|
||||
#else /* __STDC__ */
|
||||
extern pascal trap void C_InitPack( INTEGER packid ); extern pascal trap void P_InitPack( INTEGER packid);
|
||||
extern pascal trap void C_InitAllPacks( void ); extern pascal trap void P_InitAllPacks( void );
|
||||
#endif /* __STDC__ */
|
||||
#endif /* __PACKAGE__ */
|
||||
274
src/include/PrintMgr.h
Normal file
274
src/include/PrintMgr.h
Normal file
@@ -0,0 +1,274 @@
|
||||
#if !defined (__PRINTING__)
|
||||
#define __PRINTING__
|
||||
|
||||
#include "DialogMgr.h"
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: PrintMgr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#define bDraftLoop 0
|
||||
#define bSpoolLoop 1
|
||||
|
||||
#define bDevCItoh 1
|
||||
#define bDevLaser 3
|
||||
|
||||
#define iPFMaxPgs 128
|
||||
|
||||
#define iPrSavPFil (-1)
|
||||
#define controlErr (-17)
|
||||
#define iIOAbort (-27)
|
||||
#define MemFullErr (-108)
|
||||
#define iPrAbort 128
|
||||
|
||||
#define iPrDevCtl 7
|
||||
#define lPrReset 0x10000
|
||||
#define lPrLineFeed 0x30000
|
||||
#define lPrLFSixth 0x3FFFF
|
||||
#define lPrPageEnd 0x20000
|
||||
#define iPrBitsCtl 4
|
||||
#define lScreenBits 0
|
||||
#define lPaintBits 1
|
||||
#define iPrIOCtl 5
|
||||
|
||||
#define sPrDrvr ".Print"
|
||||
#define iPrDrvrRef (-3)
|
||||
|
||||
typedef struct {
|
||||
GrafPort gPort PACKED;
|
||||
QDProcs saveprocs PACKED;
|
||||
LONGINT spare[4] PACKED;
|
||||
BOOLEAN fOurPtr PACKED;
|
||||
BOOLEAN fOurBits PACKED;
|
||||
} TPrPort;
|
||||
typedef TPrPort *TPPrPort;
|
||||
|
||||
typedef struct {
|
||||
INTEGER iDev PACKED;
|
||||
INTEGER iVRes PACKED;
|
||||
INTEGER iHRes PACKED;
|
||||
Rect rPage PACKED;
|
||||
} TPrInfo;
|
||||
|
||||
typedef enum {feedCut, feedFanFold, feedMechCut, feedOther} TFeed;
|
||||
|
||||
typedef struct {
|
||||
INTEGER wDev PACKED;
|
||||
INTEGER iPageV PACKED;
|
||||
INTEGER iPageH PACKED;
|
||||
SignedByte bPort PACKED;
|
||||
char feed PACKED;
|
||||
} TPrStl;
|
||||
|
||||
typedef enum { scanTB, scanBL, scanLR, scanRL } TScan;
|
||||
typedef struct {
|
||||
INTEGER iRowBytes PACKED;
|
||||
INTEGER iBandV PACKED;
|
||||
INTEGER iBandH PACKED;
|
||||
INTEGER iDevBytes PACKED;
|
||||
INTEGER iBands PACKED;
|
||||
SignedByte bPatScale PACKED;
|
||||
SignedByte bULThick PACKED;
|
||||
SignedByte bULOffset PACKED;
|
||||
SignedByte bULShadow PACKED;
|
||||
char scan PACKED;
|
||||
SignedByte bXInfoX PACKED;
|
||||
} TPrXInfo;
|
||||
|
||||
typedef struct {
|
||||
INTEGER iFstPage PACKED;
|
||||
INTEGER iLstPage PACKED;
|
||||
INTEGER iCopies PACKED;
|
||||
SignedByte bJDocLoop PACKED;
|
||||
BOOLEAN fFromUsr PACKED;
|
||||
ProcPtr pIdleProc PACKED_P;
|
||||
StringPtr pFileName PACKED_P;
|
||||
INTEGER iFileVol PACKED;
|
||||
SignedByte bFileVers PACKED;
|
||||
SignedByte bJobX PACKED;
|
||||
} TPrJob;
|
||||
|
||||
typedef struct {
|
||||
INTEGER iPrVersion PACKED;
|
||||
TPrInfo prInfo PACKED;
|
||||
Rect rPaper PACKED;
|
||||
TPrStl prStl PACKED;
|
||||
TPrInfo prInfoPT PACKED;
|
||||
TPrXInfo prXInfo PACKED;
|
||||
TPrJob prJob PACKED;
|
||||
INTEGER printX[19] PACKED;
|
||||
} TPrint;
|
||||
typedef TPrint *TPPrint;
|
||||
typedef struct { TPPrint p PACKED_P; } HIDDEN_TPPrint;
|
||||
typedef HIDDEN_TPPrint *THPrint;
|
||||
|
||||
typedef Rect *TPRect;
|
||||
|
||||
typedef struct {
|
||||
INTEGER iTotPages PACKED;
|
||||
INTEGER iCurPage PACKED;
|
||||
INTEGER iTotCopies PACKED;
|
||||
INTEGER iCurCopy PACKED;
|
||||
INTEGER iTotBands PACKED;
|
||||
INTEGER iCurBand PACKED;
|
||||
BOOLEAN fPgDirty PACKED;
|
||||
BOOLEAN fImaging PACKED;
|
||||
THPrint hPrint PACKED_P;
|
||||
TPPrPort pPRPort PACKED_P;
|
||||
PicHandle hPic PACKED_P;
|
||||
} TPrStatus;
|
||||
|
||||
typedef struct {
|
||||
/* From Technote 095 */
|
||||
DialogRecord dlg PACKED;
|
||||
ProcPtr pFltrProc PACKED_P;
|
||||
ProcPtr pItemProc PACKED_P;
|
||||
THPrint hPrintUsr PACKED_P;
|
||||
BOOLEAN fDoIt PACKED;
|
||||
BOOLEAN fDone PACKED;
|
||||
LONGINT lUser1 PACKED;
|
||||
LONGINT lUser2 PACKED;
|
||||
LONGINT lUser3 PACKED;
|
||||
LONGINT lUser4 PACKED;
|
||||
INTEGER iNumFst PACKED;
|
||||
INTEGER iNumLst PACKED;
|
||||
/* more stuff may be here */
|
||||
} TPrDlg, *TPPrDlg;
|
||||
|
||||
|
||||
#if !defined (PrintErr)
|
||||
extern INTEGER PrintErr;
|
||||
#endif
|
||||
|
||||
#if !defined (__STDC__)
|
||||
extern INTEGER PrError();
|
||||
extern void PrSetError();
|
||||
extern void PrOpen();
|
||||
extern void PrClose();
|
||||
extern void PrDrvrOpen();
|
||||
extern void PrDrvrClose();
|
||||
extern void PrCtlCall();
|
||||
extern Handle PrDrvrDCE();
|
||||
extern INTEGER PrDrvrVers();
|
||||
extern void C_ROMlib_myjobproc();
|
||||
extern pascal BOOLEAN C_ROMlib_stlfilterproc();
|
||||
extern pascal BOOLEAN C_ROMlib_numsonlyfilterproc();
|
||||
extern void C_ROMlib_mystlproc();
|
||||
extern TPPrDlg PrJobInit();
|
||||
extern TPPrDlg PrStlInit();
|
||||
extern BOOLEAN PrDlgMain();
|
||||
extern void PrGeneral();
|
||||
extern void donotPrArc();
|
||||
extern void PrArc();
|
||||
extern void donotPrBits();
|
||||
extern void PrBits();
|
||||
extern void donotPrLine();
|
||||
extern void PrLine();
|
||||
extern void donotPrOval();
|
||||
extern void PrOval();
|
||||
extern void textasPS();
|
||||
extern void donotPrGetPic();
|
||||
extern void PrGetPic();
|
||||
extern void donotPrPutPic();
|
||||
extern void PrPutPic();
|
||||
extern void donotPrPoly();
|
||||
extern void PrPoly();
|
||||
extern void donotPrRRect();
|
||||
extern void PrRRect();
|
||||
extern void donotPrRect();
|
||||
extern void PrRect();
|
||||
extern void donotPrRgn();
|
||||
extern void PrRgn();
|
||||
extern INTEGER PrTxMeas();
|
||||
extern void donotPrText();
|
||||
extern void PrText();
|
||||
extern void PrComment();
|
||||
extern TPPrPort PrOpenDoc();
|
||||
extern void PrOpenPage();
|
||||
extern void PrClosePage();
|
||||
extern void PrCloseDoc();
|
||||
extern void PrPicFile();
|
||||
extern void PrintDefault();
|
||||
extern BOOLEAN PrValidate();
|
||||
extern BOOLEAN PrStlDialog();
|
||||
extern BOOLEAN PrJobDialog();
|
||||
extern void PrJobMerge();
|
||||
#else /* __STDC__ */
|
||||
extern pascal trap INTEGER C_PrError( void );
|
||||
extern pascal trap void C_PrSetError( INTEGER iErr );
|
||||
extern pascal trap void C_PrOpen( void );
|
||||
extern pascal trap void C_PrClose( void );
|
||||
extern pascal trap void C_PrDrvrOpen( void );
|
||||
extern pascal trap void C_PrDrvrClose( void );
|
||||
extern pascal trap void C_PrCtlCall( INTEGER iWhichCtl, LONGINT lParam1,
|
||||
LONGINT lParam2, LONGINT lParam3 );
|
||||
extern pascal trap Handle C_PrDrvrDCE( void );
|
||||
extern pascal trap INTEGER C_PrDrvrVers( void );
|
||||
extern pascal void C_ROMlib_myjobproc( DialogPtr dp, INTEGER itemno );
|
||||
extern pascal BOOLEAN C_ROMlib_stlfilterproc( DialogPeek dp,
|
||||
EventRecord *evt, INTEGER *ith );
|
||||
|
||||
extern pascal BOOLEAN C_ROMlib_numsonlyfilterproc( DialogPeek dp,
|
||||
EventRecord *evt,
|
||||
INTEGER *ith );
|
||||
|
||||
extern pascal void C_ROMlib_mystlproc( DialogPtr dp, INTEGER itemno );
|
||||
extern pascal trap TPPrDlg C_PrJobInit( THPrint hPrint );
|
||||
extern pascal trap TPPrDlg C_PrStlInit( THPrint hPrint );
|
||||
extern pascal trap BOOLEAN C_PrDlgMain( THPrint hPrint, ProcPtr initfptr );
|
||||
extern pascal trap void C_PrGeneral( Ptr pData );
|
||||
extern pascal trap void C_donotPrArc( GrafVerb verb, Rect *r,
|
||||
INTEGER starta, INTEGER arca );
|
||||
extern pascal trap void C_PrArc( GrafVerb verb, Rect *r, INTEGER starta,
|
||||
INTEGER arca );
|
||||
extern pascal trap void C_donotPrBits( BitMap *srcbmp, Rect *srcrp,
|
||||
Rect *dstrp, INTEGER mode,
|
||||
RgnHandle mask );
|
||||
extern pascal trap void C_PrBits( BitMap *srcbmp, Rect *srcrp,
|
||||
Rect *dstrp, INTEGER mode, RgnHandle mask );
|
||||
extern pascal trap void C_donotPrLine( Point p );
|
||||
extern pascal trap void C_PrLine( Point p );
|
||||
extern pascal trap void C_donotPrOval( GrafVerb v, Rect *rp );
|
||||
extern pascal trap void C_PrOval( GrafVerb v, Rect *rp );
|
||||
extern pascal trap void C_textasPS( INTEGER n, Ptr textbufp,
|
||||
Point num, Point den );
|
||||
extern pascal trap void C_donotPrGetPic( Ptr dp, INTEGER bc );
|
||||
extern pascal trap void C_PrGetPic( Ptr dp, INTEGER bc );
|
||||
extern pascal trap void C_donotPrPutPic( Ptr sp, INTEGER bc );
|
||||
extern pascal trap void C_PrPutPic( Ptr sp, INTEGER bc );
|
||||
extern pascal trap void C_donotPrPoly( GrafVerb verb, PolyHandle ph );
|
||||
extern pascal trap void C_PrPoly( GrafVerb verb, PolyHandle ph );
|
||||
extern pascal trap void C_donotPrRRect( GrafVerb verb, Rect *r,
|
||||
INTEGER width, INTEGER height );
|
||||
extern pascal trap void C_PrRRect( GrafVerb verb, Rect *r, INTEGER width,
|
||||
INTEGER height );
|
||||
|
||||
extern pascal trap void C_donotPrRect( GrafVerb v, Rect *rp );
|
||||
extern pascal trap void C_PrRect( GrafVerb v, Rect *rp );
|
||||
extern pascal trap void C_donotPrRgn( GrafVerb verb, RgnHandle rgn );
|
||||
extern pascal trap void C_PrRgn( GrafVerb verb, RgnHandle rgn );
|
||||
extern pascal trap INTEGER C_PrTxMeas( INTEGER n, Ptr p, Point *nump,
|
||||
Point *denp, FontInfo *finfop );
|
||||
extern pascal trap void C_donotPrText( INTEGER n, Ptr textbufp, Point num,
|
||||
Point den );
|
||||
extern pascal trap void C_PrText( INTEGER n, Ptr textbufp, Point num,
|
||||
Point den );
|
||||
extern pascal trap void C_PrComment( INTEGER kind, INTEGER size, Handle hand );
|
||||
extern pascal trap TPPrPort C_PrOpenDoc( THPrint hPrint, TPPrPort port,
|
||||
Ptr pIOBuf );
|
||||
extern pascal trap void C_PrOpenPage( TPPrPort port, TPRect pPageFrame );
|
||||
extern pascal trap void C_PrClosePage( TPPrPort pPrPort );
|
||||
extern pascal trap void C_PrCloseDoc( TPPrPort port );
|
||||
extern pascal trap void C_PrPicFile( THPrint hPrint, TPPrPort pPrPort,
|
||||
Ptr pIOBuf, Ptr pDevBuf,
|
||||
TPrStatus *prStatus );
|
||||
extern pascal trap void C_PrintDefault( THPrint hPrint );
|
||||
extern pascal trap BOOLEAN C_PrValidate( THPrint hPrint );
|
||||
extern pascal trap BOOLEAN C_PrStlDialog( THPrint hPrint );
|
||||
extern pascal trap BOOLEAN C_PrJobDialog( THPrint hPrint );
|
||||
extern pascal trap void C_PrJobMerge( THPrint hPrintSrc, THPrint hPrintDst );
|
||||
#endif /* __STDC__ */
|
||||
#endif /* __PRINTING__ */
|
||||
171
src/include/ProcessMgr.h
Normal file
171
src/include/ProcessMgr.h
Normal file
@@ -0,0 +1,171 @@
|
||||
#if !defined(_PROCESSMGR_H_)
|
||||
#define _PROCESSMGR_H_
|
||||
|
||||
#include "FileMgr.h"
|
||||
#include "PPC.h"
|
||||
|
||||
/*
|
||||
* Copyright 1995, 1996 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: ProcessMgr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
typedef INTEGER LaunchFlags;
|
||||
|
||||
typedef struct ProcessSerialNumber
|
||||
{
|
||||
uint32 highLongOfPSN PACKED;
|
||||
uint32 lowLongOfPSN PACKED;
|
||||
} ProcessSerialNumber;
|
||||
|
||||
/* for now, anyway */
|
||||
|
||||
/*
|
||||
* ARDI implementation of AppParameters. This has not been determined by
|
||||
* looking at the data Apple returns, so it will not play well with anything
|
||||
* that knows the format of this data structure. It's added so we can
|
||||
* support the launching of non-Mac applications from Executor. TODO: figure
|
||||
* out exactly what the mac uses
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32 magic;
|
||||
INTEGER n_fsspec;
|
||||
FSSpec fsspec[0];
|
||||
}
|
||||
ROMlib_AppParameters_t;
|
||||
|
||||
enum { APP_PARAMS_MAGIC = 0xd6434a1b, }; /* chosen from /dev/random */
|
||||
|
||||
typedef ROMlib_AppParameters_t *AppParametersPtr;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
LONGINT reserved1 PACKED;
|
||||
INTEGER reserved2 PACKED;
|
||||
INTEGER launchBlockID PACKED;
|
||||
LONGINT launchEPBLength PACKED;
|
||||
INTEGER launchFileFlags PACKED;
|
||||
LaunchFlags launchControlFlags PACKED;
|
||||
FSSpecPtr launchAppSpec PACKED;
|
||||
ProcessSerialNumber launchProcessSN PACKED;
|
||||
LONGINT launchPreferredSize PACKED;
|
||||
LONGINT launchMinimumSize PACKED;
|
||||
LONGINT launchAvailableSize PACKED;
|
||||
AppParametersPtr launchAppParameters PACKED;
|
||||
}
|
||||
LaunchParamBlockRec;
|
||||
|
||||
enum { extendedBlock = 0x4C43 };
|
||||
enum { extendedBlockLen = sizeof (LaunchParamBlockRec) - 12 };
|
||||
enum { launchContinue = 0x4000 };
|
||||
|
||||
|
||||
#define PSN_EQ_P(psn0, psn1) \
|
||||
((psn0).highLongOfPSN == (psn1).highLongOfPSN \
|
||||
&& (psn0).lowLongOfPSN == (psn1).lowLongOfPSN)
|
||||
|
||||
typedef struct ProcessInfoRec
|
||||
{
|
||||
uint32 processInfoLength PACKED;
|
||||
StringPtr processName PACKED_P;
|
||||
ProcessSerialNumber processNumber PACKED;
|
||||
uint32 processType PACKED;
|
||||
OSType processSignature PACKED;
|
||||
uint32 processMode PACKED;
|
||||
Ptr processLocation PACKED_P;
|
||||
uint32 processSize PACKED;
|
||||
uint32 processFreeMem PACKED;
|
||||
ProcessSerialNumber processLauncher PACKED;
|
||||
uint32 processLaunchDate PACKED;
|
||||
uint32 processActiveTime PACKED;
|
||||
FSSpecPtr processAppSpec PACKED_P;
|
||||
} ProcessInfoRec;
|
||||
typedef ProcessInfoRec *ProcessInfoPtr;
|
||||
|
||||
#define PROCESS_INFO_SERIAL_NUMBER(info) ((info)->processNumber)
|
||||
#define PROCESS_INFO_LAUNCHER(info) ((info)->processLauncher)
|
||||
|
||||
#define PROCESS_INFO_LENGTH_X(info) ((info)->processInfoLength)
|
||||
#define PROCESS_INFO_NAME_X(info) ((info)->processName)
|
||||
#define PROCESS_INFO_TYPE_X(info) ((info)->processType)
|
||||
#define PROCESS_INFO_SIGNATURE_X(info) ((info)->processSignature)
|
||||
#define PROCESS_INFO_MODE_X(info) ((info)->processMode)
|
||||
#define PROCESS_INFO_LOCATION_X(info) ((info)->processLocation)
|
||||
#define PROCESS_INFO_SIZE_X(info) ((info)->processSize)
|
||||
#define PROCESS_INFO_FREE_MEM_X(info) ((info)->processFreeMem)
|
||||
#define PROCESS_INFO_LAUNCH_DATE_X(info) ((info)->processLaunchDate)
|
||||
#define PROCESS_INFO_ACTIVE_TIME_X(info) ((info)->processActiveTime)
|
||||
|
||||
#define PROCESS_INFO_LENGTH(info) (CL (PROCESS_INFO_LENGTH_X (info)))
|
||||
#define PROCESS_INFO_NAME(info) (CL (PROCESS_INFO_NAME_X (info)))
|
||||
#define PROCESS_INFO_TYPE(info) (CL (PROCESS_INFO_TYPE_X (info)))
|
||||
#define PROCESS_INFO_SIGNATURE(info) (CL (PROCESS_INFO_SIGNATURE_X (info)))
|
||||
#define PROCESS_INFO_MODE(info) (CL (PROCESS_INFO_MODE_X (info)))
|
||||
#define PROCESS_INFO_LOCATION(info) (CL (PROCESS_INFO_LOCATION_X (info)))
|
||||
#define PROCESS_INFO_SIZE(info) (CL (PROCESS_INFO_SIZE_X (info)))
|
||||
#define PROCESS_INFO_FREE_MEM(info) (CL (PROCESS_INFO_FREE_MEM_X (info)))
|
||||
#define PROCESS_INFO_LAUNCH_DATE(info) (CL (PROCESS_INFO_LAUNCH_DATE_X (info)))
|
||||
#define PROCESS_INFO_ACTIVE_TIME(info) (CL (PROCESS_INFO_ACTIVE_TIME_X (info)))
|
||||
|
||||
/* flags for the `processMode' field of the `ProcessInformationRec'
|
||||
record */
|
||||
|
||||
#define modeDeskAccessory 0x00020000
|
||||
#define modeMultiLaunch 0x00010000
|
||||
#define modeNeedSuspendResume 0x00004000
|
||||
#define modeCanBackground 0x00001000
|
||||
#define modeDoesActivateOnFGSwitch 0x00000800
|
||||
#define modeOnlyBackground 0x00000400
|
||||
#define modeGetFrontClicks 0x00000200
|
||||
#define modeGetAppDiedMsg 0x00000100
|
||||
#define mode32BitCompatible 0x00000080
|
||||
#define modeHighLevelEventAware 0x00000040
|
||||
#define modeLocalAndRemoteHLEvents 0x00000020
|
||||
#define modeStationeryAware 0x00000010
|
||||
#define modeUseTextEditServices 0x00000008
|
||||
|
||||
#define kNoProcess (0)
|
||||
#define kSystemProcess (1)
|
||||
#define kCurrentProcess (2)
|
||||
|
||||
#define paramErr (-50)
|
||||
#define procNotFound (-600)
|
||||
|
||||
extern void process_create (boolean_t desk_accessory_p,
|
||||
uint32 type, uint32 signature);
|
||||
|
||||
extern pascal trap OSErr C_GetCurrentProcess
|
||||
(ProcessSerialNumber *serial_number);
|
||||
|
||||
extern pascal trap OSErr C_GetNextProcess (ProcessSerialNumber *serial_number);
|
||||
|
||||
extern pascal trap OSErr C_GetProcessInformation
|
||||
(ProcessSerialNumber *serial_number,
|
||||
ProcessInfoPtr info);
|
||||
|
||||
extern pascal trap OSErr C_SameProcess (ProcessSerialNumber *serial_number0,
|
||||
ProcessSerialNumber *serial_number1,
|
||||
Boolean *same_out);
|
||||
extern pascal trap OSErr C_GetFrontProcess
|
||||
(ProcessSerialNumber *serial_number, void *dummy);
|
||||
|
||||
extern pascal trap OSErr C_SetFrontProcess
|
||||
(ProcessSerialNumber *serial_number);
|
||||
|
||||
extern pascal trap OSErr C_WakeUpProcess (ProcessSerialNumber *serial_number);
|
||||
|
||||
extern pascal trap OSErr C_GetProcessSerialNumberFromPortName
|
||||
(PPCPortPtr port_name,
|
||||
ProcessSerialNumber *serial_number);
|
||||
|
||||
extern pascal trap OSErr C_GetPortNameFromProcessSerialNumber
|
||||
(PPCPortPtr port_name,
|
||||
ProcessSerialNumber *serial_number);
|
||||
|
||||
extern OSErr NewLaunch( StringPtr appl, INTEGER vrefnum,
|
||||
LaunchParamBlockRec *lpbp );
|
||||
|
||||
#endif
|
||||
670
src/include/QuickDraw.h
Normal file
670
src/include/QuickDraw.h
Normal file
@@ -0,0 +1,670 @@
|
||||
#if !defined (_QUICKDRAW_H_)
|
||||
#define _QUICKDRAW_H_
|
||||
|
||||
/*
|
||||
* Copyright 1986 - 2000 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: QuickDraw.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
|
||||
enum { grafSize = 206 }; /* number of bytes InitGraf needs */
|
||||
|
||||
#define srcCopy 0
|
||||
#define srcOr 1
|
||||
#define srcXor 2
|
||||
#define srcBic 3
|
||||
#define notSrcCopy 4
|
||||
#define notSrcOr 5
|
||||
#define notSrcXor 6
|
||||
#define notSrcBic 7
|
||||
|
||||
#define patCopy 8
|
||||
#define patOr 9
|
||||
#define patXor 10
|
||||
#define patBic 11
|
||||
#define notPatCopy 12
|
||||
#define notPatOr 13
|
||||
#define notPatXor 14
|
||||
#define notPatBic 15
|
||||
|
||||
#define grayishTextOr 49
|
||||
|
||||
#define hilite 50
|
||||
|
||||
#define blackColor 33
|
||||
#define whiteColor 30
|
||||
#define redColor 205
|
||||
#define greenColor 341
|
||||
#define blueColor 409
|
||||
#define cyanColor 273
|
||||
#define magentaColor 137
|
||||
#define yellowColor 69
|
||||
|
||||
#define picLParen 0
|
||||
#define picRParen 1
|
||||
|
||||
typedef enum { bold=1, italic=2, underline=4, outline=8,
|
||||
shadow=16, condense=32, extend=64 } StyleItem;
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* The enum doesn't suffice since some compilers will complain if you
|
||||
* try do bitwise arithmetic with the members of an enum
|
||||
*
|
||||
* Unfortunately, we can't do the #defines below because there are structures
|
||||
* that have fields named "bold".
|
||||
*/
|
||||
|
||||
#define bold 1
|
||||
#define italic 2
|
||||
#define underline 4
|
||||
#define outline 8
|
||||
#define shadow 16
|
||||
#define condense 32
|
||||
#define extend 64
|
||||
#endif /* 0 */
|
||||
|
||||
typedef SignedByte Style;
|
||||
|
||||
typedef struct {
|
||||
INTEGER rgnSize PACKED;
|
||||
Rect rgnBBox PACKED;
|
||||
} Region;
|
||||
|
||||
typedef Region *RgnPtr;
|
||||
typedef struct { RgnPtr p PACKED_P; } HIDDEN_RgnPtr;
|
||||
typedef HIDDEN_RgnPtr *RgnHandle;
|
||||
typedef struct { RgnHandle p PACKED_P; } HIDDEN_RgnHandle;
|
||||
|
||||
typedef struct {
|
||||
Ptr baseAddr PACKED_P;
|
||||
INTEGER rowBytes PACKED;
|
||||
Rect bounds PACKED;
|
||||
} BitMap;
|
||||
|
||||
typedef Byte Pattern[8];
|
||||
typedef INTEGER Bits16[16];
|
||||
|
||||
typedef struct {
|
||||
Bits16 data PACKED;
|
||||
Bits16 mask PACKED;
|
||||
Point hotSpot PACKED;
|
||||
} Cursor;
|
||||
|
||||
typedef Cursor *CursPtr;
|
||||
typedef struct { CursPtr p PACKED_P; } HIDDEN_CursPtr;
|
||||
typedef HIDDEN_CursPtr *CursHandle;
|
||||
|
||||
typedef SignedByte GrafVerb;
|
||||
#define frame 0
|
||||
#define paint 1
|
||||
#define erase 2
|
||||
#define invert 3
|
||||
#define fill 4
|
||||
|
||||
typedef struct {
|
||||
INTEGER polySize PACKED;
|
||||
Rect polyBBox PACKED;
|
||||
Point polyPoints[1] PACKED;
|
||||
} Polygon;
|
||||
|
||||
typedef Polygon *PolyPtr;
|
||||
typedef struct { PolyPtr p PACKED_P; } HIDDEN_PolyPtr;
|
||||
typedef HIDDEN_PolyPtr *PolyHandle;
|
||||
|
||||
typedef struct {
|
||||
INTEGER ascent PACKED;
|
||||
INTEGER descent PACKED;
|
||||
INTEGER widMax PACKED;
|
||||
INTEGER leading PACKED;
|
||||
} FontInfo;
|
||||
|
||||
typedef struct {
|
||||
pascal trap void (*textProc)(INTEGER bc, Ptr textb, Point num, Point den) PACKED_P;
|
||||
pascal trap void (*lineProc)(Point drawto) PACKED_P;
|
||||
pascal trap void (*rectProc)(GrafVerb verb, Rect *rp) PACKED_P;
|
||||
pascal trap void (*rRectProc)(GrafVerb verb, Rect *rp, INTEGER ow,
|
||||
INTEGER oh) PACKED_P;
|
||||
pascal trap void (*ovalProc)(GrafVerb verb, Rect *rp) PACKED_P;
|
||||
pascal trap void (*arcProc)(GrafVerb verb, Rect *rp, INTEGER ang,
|
||||
INTEGER arc) PACKED_P;
|
||||
pascal trap void (*polyProc)(GrafVerb verb, PolyHandle poly) PACKED_P;
|
||||
pascal trap void (*rgnProc)(GrafVerb verb, RgnHandle rgn) PACKED_P;
|
||||
pascal trap void (*bitsProc)(BitMap *srcb, Rect *srcr, Rect *dstr,
|
||||
INTEGER mod, RgnHandle mask) PACKED_P;
|
||||
pascal trap void (*commentProc)(INTEGER kind, INTEGER size, Handle data) PACKED_P;
|
||||
pascal trap INTEGER (*txMeasProc)(INTEGER bc, Ptr texta, Point *numer,
|
||||
Point *denom, FontInfo *info) PACKED_P;
|
||||
pascal trap void (*getPicProc)(Ptr data, INTEGER bc) PACKED_P;
|
||||
pascal trap void (*putPicProc)(Ptr data, INTEGER bc) PACKED_P;
|
||||
} QDProcs;
|
||||
|
||||
typedef QDProcs *QDProcsPtr;
|
||||
|
||||
typedef struct {
|
||||
INTEGER device PACKED;
|
||||
BitMap portBits PACKED;
|
||||
Rect portRect PACKED;
|
||||
RgnHandle visRgn PACKED_P;
|
||||
RgnHandle clipRgn PACKED_P;
|
||||
Pattern bkPat PACKED;
|
||||
Pattern fillPat PACKED;
|
||||
Point pnLoc PACKED;
|
||||
Point pnSize PACKED;
|
||||
INTEGER pnMode PACKED;
|
||||
Pattern pnPat PACKED;
|
||||
INTEGER pnVis PACKED;
|
||||
INTEGER txFont PACKED;
|
||||
Style txFace PACKED;
|
||||
Byte filler PACKED;
|
||||
INTEGER txMode PACKED;
|
||||
INTEGER txSize PACKED;
|
||||
Fixed spExtra PACKED;
|
||||
LONGINT fgColor PACKED;
|
||||
LONGINT bkColor PACKED;
|
||||
INTEGER colrBit PACKED;
|
||||
INTEGER patStretch PACKED;
|
||||
Handle picSave PACKED_P;
|
||||
Handle rgnSave PACKED_P;
|
||||
Handle polySave PACKED_P;
|
||||
QDProcsPtr grafProcs PACKED_P;
|
||||
} GrafPort;
|
||||
|
||||
typedef GrafPort *GrafPtr;
|
||||
typedef struct { GrafPtr p PACKED_P; } HIDDEN_GrafPtr;
|
||||
|
||||
typedef struct {
|
||||
INTEGER picSize PACKED;
|
||||
Rect picFrame PACKED;
|
||||
} Picture;
|
||||
|
||||
typedef Picture *PicPtr;
|
||||
typedef struct { PicPtr p PACKED_P; } HIDDEN_PicPtr;
|
||||
typedef HIDDEN_PicPtr *PicHandle;
|
||||
|
||||
typedef struct {
|
||||
Point pnLoc PACKED;
|
||||
Point pnSize PACKED;
|
||||
INTEGER pnMode PACKED;
|
||||
Pattern pnPat PACKED;
|
||||
} PenState;
|
||||
|
||||
/* IMV stuff is used when we parse Version 2 pictures, but the IMV calls
|
||||
are not supported in V1.0 */
|
||||
|
||||
typedef enum { blend=32, addPin, addOver, subPin,
|
||||
transparent, adMax, subOver, adMin,
|
||||
mask=64 } colormodes;
|
||||
|
||||
#define pHiliteBit 0
|
||||
|
||||
#define defQDColors 127
|
||||
|
||||
typedef struct {
|
||||
unsigned short red PACKED;
|
||||
unsigned short green PACKED;
|
||||
unsigned short blue PACKED;
|
||||
} RGBColor;
|
||||
|
||||
typedef struct {
|
||||
SmallFract hue PACKED;
|
||||
SmallFract saturation PACKED;
|
||||
SmallFract value PACKED;
|
||||
} HSVColor;
|
||||
|
||||
typedef struct {
|
||||
SmallFract hue PACKED;
|
||||
SmallFract saturation PACKED;
|
||||
SmallFract lightness PACKED;
|
||||
} HSLColor;
|
||||
|
||||
typedef struct {
|
||||
SmallFract cyan PACKED;
|
||||
SmallFract magenta PACKED;
|
||||
SmallFract yellow PACKED;
|
||||
} CMYColor;
|
||||
|
||||
typedef struct ColorSpec
|
||||
{
|
||||
INTEGER value PACKED;
|
||||
RGBColor rgb PACKED;
|
||||
} ColorSpec;
|
||||
|
||||
typedef ColorSpec cSpecArray[1]; /* can't use 0 */
|
||||
|
||||
typedef struct {
|
||||
LONGINT ctSeed PACKED;
|
||||
unsigned short ctFlags PACKED;
|
||||
INTEGER ctSize PACKED;
|
||||
cSpecArray ctTable PACKED;
|
||||
} ColorTable, *CTabPtr;
|
||||
|
||||
typedef struct { CTabPtr p PACKED_P; } HIDDEN_CTabPtr;
|
||||
typedef HIDDEN_CTabPtr *CTabHandle;
|
||||
typedef struct { CTabHandle p PACKED_P; } HIDDEN_CTabHandle;
|
||||
|
||||
typedef struct {
|
||||
Ptr textProc PACKED_P;
|
||||
Ptr lineProc PACKED_P;
|
||||
Ptr rectProc PACKED_P;
|
||||
Ptr rRectProc PACKED_P;
|
||||
Ptr ovalProc PACKED_P;
|
||||
Ptr arcProc PACKED_P;
|
||||
Ptr polyProc PACKED_P;
|
||||
Ptr rgnProc PACKED_P;
|
||||
Ptr bitsProc PACKED_P;
|
||||
Ptr commentProc PACKED_P;
|
||||
Ptr txMeasProc PACKED_P;
|
||||
Ptr getPicProc PACKED_P;
|
||||
Ptr putPicProc PACKED_P;
|
||||
Ptr opcodeProc PACKED_P;
|
||||
Ptr newProc1Proc PACKED_P;
|
||||
Ptr newProc2Proc PACKED_P;
|
||||
Ptr newProc3Proc PACKED_P;
|
||||
Ptr newProc4Proc PACKED_P;
|
||||
Ptr newProc5Proc PACKED_P;
|
||||
Ptr newProc6Proc PACKED_P;
|
||||
} CQDProcs, *CQDProcsPtr;
|
||||
|
||||
typedef struct {
|
||||
Ptr baseAddr PACKED_P;
|
||||
INTEGER rowBytes PACKED;
|
||||
Rect bounds PACKED;
|
||||
INTEGER pmVersion PACKED;
|
||||
INTEGER packType PACKED;
|
||||
LONGINT packSize PACKED;
|
||||
Fixed hRes PACKED;
|
||||
Fixed vRes PACKED;
|
||||
INTEGER pixelType PACKED;
|
||||
INTEGER pixelSize PACKED;
|
||||
INTEGER cmpCount PACKED;
|
||||
INTEGER cmpSize PACKED;
|
||||
LONGINT planeBytes PACKED;
|
||||
CTabHandle pmTable PACKED_P;
|
||||
LONGINT pmReserved PACKED;
|
||||
} PixMap, *PixMapPtr;
|
||||
typedef struct { PixMapPtr p PACKED_P; } HIDDEN_PixMapPtr;
|
||||
typedef HIDDEN_PixMapPtr *PixMapHandle;
|
||||
typedef struct { PixMapHandle p PACKED_P; } HIDDEN_PixMapHandle;
|
||||
|
||||
enum pixmap_pixel_types
|
||||
{
|
||||
chunky_pixel_type,
|
||||
chunky_planar_pixel_type,
|
||||
planar_pixel_type,
|
||||
};
|
||||
|
||||
#define ROWMASK 0x1FFF
|
||||
|
||||
typedef struct {
|
||||
INTEGER patType PACKED;
|
||||
PixMapHandle patMap PACKED_P;
|
||||
Handle patData PACKED_P;
|
||||
Handle patXData PACKED_P;
|
||||
INTEGER patXValid PACKED;
|
||||
Handle patXMap PACKED_P;
|
||||
Pattern pat1Data PACKED;
|
||||
} PixPat, *PixPatPtr;
|
||||
typedef struct { PixPatPtr p PACKED_P; } HIDDEN_PixPatPtr;
|
||||
typedef HIDDEN_PixPatPtr *PixPatHandle;
|
||||
typedef struct { PixPatHandle p PACKED_P; } HIDDEN_PixPatHandle;
|
||||
|
||||
typedef struct {
|
||||
INTEGER device PACKED;
|
||||
PixMapHandle portPixMap PACKED_P;
|
||||
INTEGER portVersion PACKED;
|
||||
Handle grafVars PACKED_P;
|
||||
INTEGER chExtra PACKED;
|
||||
INTEGER pnLocHFrac PACKED;
|
||||
Rect portRect PACKED;
|
||||
RgnHandle visRgn PACKED_P;
|
||||
RgnHandle clipRgn PACKED_P;
|
||||
PixPatHandle bkPixPat PACKED_P;
|
||||
RGBColor rgbFgColor PACKED;
|
||||
RGBColor rgbBkColor PACKED;
|
||||
Point pnLoc PACKED;
|
||||
Point pnSize PACKED;
|
||||
INTEGER pnMode PACKED;
|
||||
PixPatHandle pnPixPat PACKED_P;
|
||||
PixPatHandle fillPixPat PACKED_P;
|
||||
INTEGER pnVis PACKED;
|
||||
INTEGER txFont PACKED;
|
||||
Style txFace PACKED;
|
||||
Byte filler PACKED;
|
||||
INTEGER txMode PACKED;
|
||||
INTEGER txSize PACKED;
|
||||
Fixed spExtra PACKED;
|
||||
LONGINT fgColor PACKED;
|
||||
LONGINT bkColor PACKED;
|
||||
INTEGER colrBit PACKED;
|
||||
INTEGER patStretch PACKED;
|
||||
Handle picSave PACKED_P;
|
||||
Handle rgnSave PACKED_P;
|
||||
Handle polySave PACKED_P;
|
||||
CQDProcsPtr grafProcs PACKED_P;
|
||||
} CGrafPort, *CGrafPtr;
|
||||
|
||||
typedef struct { CGrafPtr p PACKED_P; } HIDDEN_CGrafPtr;
|
||||
|
||||
typedef struct {
|
||||
INTEGER crsrType PACKED;
|
||||
PixMapHandle crsrMap PACKED_P;
|
||||
Handle crsrData PACKED_P;
|
||||
Handle crsrXData PACKED_P;
|
||||
INTEGER crsrXValid PACKED;
|
||||
Handle crsrXHandle PACKED_P;
|
||||
Bits16 crsr1Data PACKED;
|
||||
Bits16 crsrMask PACKED;
|
||||
Point crsrHotSpot PACKED;
|
||||
LONGINT crsrXTable PACKED;
|
||||
LONGINT crsrID PACKED;
|
||||
} CCrsr, *CCrsrPtr;
|
||||
typedef struct { CCrsrPtr p PACKED_P; } HIDDEN_CCrsrPtr;
|
||||
typedef HIDDEN_CCrsrPtr *CCrsrHandle;
|
||||
|
||||
typedef struct {
|
||||
uint16 red PACKED;
|
||||
uint16 green PACKED;
|
||||
uint16 blue PACKED;
|
||||
int32 matchData PACKED;
|
||||
} MatchRec;
|
||||
|
||||
typedef struct { HIDDEN_GrafPtr *p PACKED_P; } HIDDEN_GrafPtr_Ptr;
|
||||
typedef struct { Byte *p PACKED_P; } HIDDEN_BytePtr;
|
||||
|
||||
#define thePort (STARH(STARH((HIDDEN_GrafPtr_Ptr *) (long) SYN68K_TO_US(a5))))
|
||||
#define thePortX ((*STARH((HIDDEN_GrafPtr_Ptr *) (long) SYN68K_TO_US(a5))).p)
|
||||
#define white (STARH((HIDDEN_BytePtr *)(long) SYN68K_TO_US(a5)) -8)
|
||||
#define black (STARH((HIDDEN_BytePtr *)(long) SYN68K_TO_US(a5)) -16)
|
||||
#define gray (STARH((HIDDEN_BytePtr *)(long) SYN68K_TO_US(a5)) -24)
|
||||
#define ltGray (STARH((HIDDEN_BytePtr *)(long) SYN68K_TO_US(a5)) -32)
|
||||
#define dkGray (STARH((HIDDEN_BytePtr *)(long) SYN68K_TO_US(a5)) -40)
|
||||
#define arrowX (* (Cursor *) (STARH((HIDDEN_BytePtr *)(long) SYN68K_TO_US(a5))-108))
|
||||
#define screenBitsX (* (BitMap *) (STARH((HIDDEN_BytePtr *)(long) SYN68K_TO_US(a5))-122))
|
||||
#define randSeed CL(* (LONGINT *) (STARH((HIDDEN_BytePtr *)(long) SYN68K_TO_US(a5))-126))
|
||||
#define randSeedX ((* (LONGINT *) (STARH((HIDDEN_BytePtr *)(long) SYN68K_TO_US(a5))-126)))
|
||||
|
||||
#if !defined (RndSeed_L)
|
||||
extern HIDDEN_LONGINT RndSeed_L;
|
||||
extern Byte HiliteMode; /* not really supported in ROMlib-V1.0 */
|
||||
extern RGBColor HiliteRGB; /* not really supported in ROMlib-V1.0 */
|
||||
extern HIDDEN_ProcPtr JInitCrsr_H;
|
||||
|
||||
extern HIDDEN_ProcPtr JHideCursor_H;
|
||||
extern HIDDEN_ProcPtr JShowCursor_H;
|
||||
extern HIDDEN_ProcPtr JShieldCursor_H;
|
||||
extern HIDDEN_ProcPtr JSetCrsr_H;
|
||||
extern HIDDEN_ProcPtr JCrsrObscure_H;
|
||||
extern HIDDEN_ProcPtr JUnknown574_H;
|
||||
|
||||
extern HIDDEN_Ptr ScrnBase_H;
|
||||
extern HIDDEN_ProcPtr JCrsrTask_H;
|
||||
extern HIDDEN_Ptr Key1Trans_H;
|
||||
extern HIDDEN_Ptr Key2Trans_H;
|
||||
extern INTEGER ScrVRes;
|
||||
extern INTEGER ScrHRes;
|
||||
extern INTEGER ScreenRow;
|
||||
extern Point MouseLocation;
|
||||
extern Point MouseLocation2;
|
||||
extern BOOLEAN CrsrVis;
|
||||
extern Byte CrsrBusy;
|
||||
extern INTEGER CrsrState;
|
||||
extern LONGINT mousemask;
|
||||
extern LONGINT mouseoffset;
|
||||
extern Byte HiliteMode;
|
||||
#endif
|
||||
|
||||
#define RndSeed (RndSeed_L.l)
|
||||
#define JInitCrsr (JInitCrsr_H.p)
|
||||
#define JHideCursor (JHideCursor_H.p)
|
||||
#define JShowCursor (JShowCursor_H.p)
|
||||
#define JShieldCursor (JShieldCursor_H.p)
|
||||
#define JSetCrsr (JSetCrsr_H.p)
|
||||
#define JCrsrObscure (JCrsrObscure_H.p)
|
||||
#define JUnknown574 (JUnknown574_H.p)
|
||||
#define JCrsrTask (JCrsrTask_H.p)
|
||||
#define ScrnBase (ScrnBase_H.p)
|
||||
#define Key1Trans (Key1Trans_H.p)
|
||||
#define Key2Trans (Key2Trans_H.p)
|
||||
|
||||
extern trap void C_CopyBits (BitMap *src_bitmap, BitMap *dst_bitmap,
|
||||
const Rect *src_rect, const Rect *dst_rect,
|
||||
INTEGER mode, RgnHandle mask);
|
||||
|
||||
extern trap void C_ScrollRect( Rect *rp, INTEGER dh, INTEGER dv,
|
||||
RgnHandle updatergn );
|
||||
extern pascal trap void C_ForeColor( LONGINT c );
|
||||
extern pascal trap void C_BackColor( LONGINT c );
|
||||
extern pascal trap void C_ColorBit( INTEGER b );
|
||||
extern pascal trap void C_SetCursor( Cursor *cp );
|
||||
extern pascal trap void C_InitCursor( void );
|
||||
extern pascal trap void C_HideCursor( void );
|
||||
extern pascal trap void C_ShowCursor( void );
|
||||
extern pascal trap void C_ObscureCursor( void );
|
||||
extern pascal trap void C_ShieldCursor( Rect *rp, Point p );
|
||||
extern pascal trap void C_InitGraf( Ptr gp );
|
||||
extern pascal trap void C_SetPort( GrafPtr p );
|
||||
extern pascal trap void C_InitPort( GrafPtr p );
|
||||
extern pascal trap void C_OpenPort( GrafPtr p );
|
||||
extern pascal trap void C_ClosePort( GrafPtr p );
|
||||
extern pascal trap void C_GetPort( HIDDEN_GrafPtr *pp );
|
||||
extern pascal trap void C_GrafDevice( INTEGER d );
|
||||
extern pascal trap void C_SetPortBits( BitMap *bm );
|
||||
extern pascal trap void C_PortSize( INTEGER w, INTEGER h );
|
||||
extern pascal trap void C_MovePortTo( INTEGER lg, INTEGER tg );
|
||||
extern pascal trap void C_SetOrigin( INTEGER h, INTEGER v );
|
||||
extern pascal trap void C_SetClip( RgnHandle r );
|
||||
extern pascal trap void C_GetClip( RgnHandle r );
|
||||
extern pascal trap void C_ClipRect( Rect *r );
|
||||
extern pascal trap void C_BackPat( Pattern pp );
|
||||
extern pascal trap void C_SeedFill( Ptr srcp, Ptr dstp,
|
||||
INTEGER srcr, INTEGER dstr, INTEGER height, INTEGER width,
|
||||
INTEGER seedh, INTEGER seedv );
|
||||
extern pascal trap void C_CalcMask( Ptr srcp, Ptr dstp,
|
||||
INTEGER srcr, INTEGER dstr, INTEGER height, INTEGER width );
|
||||
extern pascal trap void C_CopyMask( BitMap *srcbp,
|
||||
BitMap *mskbp, BitMap *dstbp, Rect *srcrp, Rect *
|
||||
mskrp, Rect *dstrp );
|
||||
extern a0trap INTEGER *GetMaskTable( void );
|
||||
extern pascal trap void C_OpColor( RGBColor *colorp );
|
||||
extern pascal trap void C_RGBBackColor( RGBColor *colorp );
|
||||
extern pascal trap void C_PenPixPat( PixPatHandle ph );
|
||||
extern pascal trap void C_HiliteColor( RGBColor *colorp );
|
||||
extern pascal trap void C_CharExtra( Fixed Extra );
|
||||
extern pascal trap void C_BackPixPat( PixPatHandle ph );
|
||||
extern pascal trap void C_RGBForeColor( RGBColor *colorp );
|
||||
extern pascal trap void C_MakeRGBPat( PixPatHandle ph,
|
||||
RGBColor *colorp );
|
||||
extern pascal trap void C_DisposPixPat( PixPatHandle pph );
|
||||
extern pascal trap INTEGER C_Random( void );
|
||||
extern pascal trap BOOLEAN C_GetPixel( INTEGER h, INTEGER v );
|
||||
extern pascal trap void C_StuffHex( register Ptr p, StringPtr s );
|
||||
extern pascal trap void C_ScalePt( Point *pt, Rect *srcr, Rect *dstr );
|
||||
extern pascal trap void C_MapPt( Point *pt, Rect *srcr, Rect *dstr );
|
||||
extern pascal trap void C_MapRect( Rect *r, Rect *srcr, Rect *dstr );
|
||||
extern pascal trap void C_MapRgn( RgnHandle rh, Rect *srcr, Rect *dstr );
|
||||
extern pascal trap void C_MapPoly( PolyHandle poly, Rect *srcr,
|
||||
Rect *dstr );
|
||||
extern pascal trap void C_HidePen( void );
|
||||
extern pascal trap void C_ShowPen( void );
|
||||
extern pascal trap void C_GetPen( Point *ptp );
|
||||
extern pascal trap void C_GetPenState( PenState *ps );
|
||||
extern pascal trap void C_SetPenState( PenState *ps );
|
||||
extern pascal trap void C_PenSize( INTEGER w, INTEGER h );
|
||||
extern pascal trap void C_PenMode( INTEGER m );
|
||||
extern pascal trap void C_PenPat( Pattern pp );
|
||||
extern pascal trap void C_PenNormal( void );
|
||||
extern pascal trap void C_MoveTo( INTEGER h, INTEGER v );
|
||||
extern pascal trap void C_Move( INTEGER dh, INTEGER dv );
|
||||
extern pascal trap void C_LineTo( INTEGER h, INTEGER v );
|
||||
extern pascal trap void C_Line( INTEGER dh, INTEGER dv );
|
||||
extern pascal trap void C_DrawPicture( PicHandle pic, Rect *destrp );
|
||||
extern pascal trap PicHandle C_OpenPicture( Rect *pf );
|
||||
extern pascal trap void C_ClosePicture( void );
|
||||
extern pascal trap void C_PicComment( INTEGER kind, INTEGER size,
|
||||
Handle hand );
|
||||
extern pascal trap void C_ReadComment( INTEGER kind, INTEGER size,
|
||||
Handle hand );
|
||||
extern pascal trap void C_KillPicture( PicHandle pic );
|
||||
extern pascal trap void C_AddPt( Point src, Point *dst );
|
||||
extern pascal trap void C_SubPt( Point src, Point *dst );
|
||||
extern pascal trap void C_SetPt( Point *pt, INTEGER h, INTEGER v );
|
||||
extern pascal trap BOOLEAN C_EqualPt( Point p1, Point p2 );
|
||||
extern pascal trap void C_LocalToGlobal( Point *pt );
|
||||
extern pascal trap void C_GlobalToLocal( Point *pt );
|
||||
extern pascal trap PolyHandle C_OpenPoly( void );
|
||||
extern pascal trap void C_ClosePoly( void );
|
||||
extern pascal trap void C_KillPoly( PolyHandle poly );
|
||||
extern pascal trap void C_OffsetPoly( PolyHandle poly,
|
||||
INTEGER dh, INTEGER dv );
|
||||
extern pascal trap void C_SetRect( Rect *r, INTEGER left, INTEGER top,
|
||||
INTEGER right, INTEGER bottom );
|
||||
extern pascal trap void C_OffsetRect( Rect *r, INTEGER dh, INTEGER dv );
|
||||
extern pascal trap void C_InsetRect( Rect *r, INTEGER dh, INTEGER dv );
|
||||
|
||||
|
||||
|
||||
|
||||
extern pascal trap BOOLEAN C_EmptyRect( Rect *r );
|
||||
extern pascal trap BOOLEAN C_SectRect (const Rect *s1, const Rect *s2, Rect *dest);
|
||||
extern pascal trap void C_UnionRect( Rect *s1, Rect *s2, Rect *dest );
|
||||
extern pascal trap BOOLEAN C_PtInRect( Point p, Rect *r );
|
||||
extern pascal trap void C_Pt2Rect( Point p1, Point p2, Rect *dest );
|
||||
extern pascal trap void C_PtToAngle( Rect *rp, Point p, INTEGER *angle );
|
||||
extern pascal trap BOOLEAN C_EqualRect( const Rect *r1, const Rect *r2 );
|
||||
extern pascal trap RgnHandle C_NewRgn( void );
|
||||
extern pascal trap void C_OpenRgn( void );
|
||||
extern pascal trap void C_CopyRgn( RgnHandle s, RgnHandle d );
|
||||
extern pascal trap void C_CloseRgn( RgnHandle rh );
|
||||
extern pascal trap void C_DisposeRgn( RgnHandle rh );
|
||||
extern pascal trap void C_SetEmptyRgn( RgnHandle rh );
|
||||
extern pascal trap void C_SetRectRgn( RgnHandle rh, INTEGER left,
|
||||
INTEGER top, INTEGER right, INTEGER bottom );
|
||||
extern pascal trap void C_RectRgn( RgnHandle rh, Rect *rect );
|
||||
extern pascal trap void C_OffsetRgn( RgnHandle rh, INTEGER dh,
|
||||
INTEGER dv );
|
||||
extern pascal trap BOOLEAN C_PtInRgn( Point p, RgnHandle rh );
|
||||
extern pascal trap void C_InsetRgn( RgnHandle rh, INTEGER dh, INTEGER dv );
|
||||
extern pascal trap void C_SectRgn( RgnHandle s1, RgnHandle s2,
|
||||
RgnHandle dest );
|
||||
extern pascal trap void C_UnionRgn( RgnHandle s1, RgnHandle s2,
|
||||
RgnHandle dest );
|
||||
extern pascal trap void C_DiffRgn( RgnHandle s1, RgnHandle s2,
|
||||
RgnHandle dest );
|
||||
extern pascal trap void C_XorRgn( RgnHandle s1, RgnHandle s2,
|
||||
RgnHandle dest );
|
||||
extern pascal trap BOOLEAN C_RectInRgn( Rect *rp,
|
||||
RgnHandle rh );
|
||||
extern pascal trap BOOLEAN C_EqualRgn( RgnHandle r1, RgnHandle r2 );
|
||||
extern pascal trap BOOLEAN C_EmptyRgn( RgnHandle rh );
|
||||
extern void ROMlib_printrgn( RgnHandle h );
|
||||
extern void ROMlib_printpairs( INTEGER *p, LONGINT n );
|
||||
extern pascal trap void C_FrameRect( Rect *r );
|
||||
extern pascal trap void C_PaintRect( Rect *r );
|
||||
extern pascal trap void C_EraseRect( Rect *r );
|
||||
extern pascal trap void C_InvertRect( Rect *r );
|
||||
extern pascal trap void C_FillRect( Rect *r, Pattern pat );
|
||||
extern pascal trap void C_FrameOval( Rect *r );
|
||||
extern pascal trap void C_PaintOval( Rect *r );
|
||||
extern pascal trap void C_EraseOval( Rect *r );
|
||||
extern pascal trap void C_InvertOval( Rect *r );
|
||||
extern pascal trap void C_FillOval( Rect *r, Pattern pat );
|
||||
extern pascal trap void C_FrameRoundRect( Rect *r, INTEGER ow,
|
||||
INTEGER oh );
|
||||
extern pascal trap void C_PaintRoundRect( Rect *r, INTEGER ow,
|
||||
INTEGER oh );
|
||||
extern pascal trap void C_EraseRoundRect( Rect *r, INTEGER ow,
|
||||
INTEGER oh );
|
||||
extern pascal trap void C_InvertRoundRect( Rect *r, INTEGER ow,
|
||||
INTEGER oh );
|
||||
extern pascal trap void C_FillRoundRect( Rect *r, INTEGER ow,
|
||||
INTEGER oh, Pattern pat );
|
||||
extern pascal trap void C_FrameArc( Rect *r, INTEGER start,
|
||||
INTEGER angle );
|
||||
extern pascal trap void C_PaintArc( Rect *r, INTEGER start,
|
||||
INTEGER angle );
|
||||
extern pascal trap void C_EraseArc( Rect *r, INTEGER start,
|
||||
INTEGER angle );
|
||||
extern pascal trap void C_InvertArc( Rect *r, INTEGER start,
|
||||
INTEGER angle );
|
||||
extern pascal trap void C_FillArc( Rect *r, INTEGER start,
|
||||
INTEGER angle, Pattern pat );
|
||||
extern pascal trap void C_FrameRgn( RgnHandle rh );
|
||||
extern pascal trap void C_PaintRgn( RgnHandle rh );
|
||||
extern pascal trap void C_EraseRgn( RgnHandle rh );
|
||||
extern pascal trap void C_InvertRgn( RgnHandle rh );
|
||||
extern pascal trap void C_FillRgn( RgnHandle rh, Pattern pat );
|
||||
extern pascal trap void C_FramePoly( PolyHandle poly );
|
||||
extern pascal trap void C_PaintPoly( PolyHandle poly );
|
||||
extern pascal trap void C_ErasePoly( PolyHandle poly );
|
||||
extern pascal trap void C_InvertPoly( PolyHandle poly );
|
||||
extern pascal trap void C_FillPoly( PolyHandle poly, Pattern pat );
|
||||
extern pascal trap void C_SetStdProcs( QDProcs *procs );
|
||||
extern pascal trap void C_StdArc( GrafVerb verb, Rect *r,
|
||||
INTEGER starta, INTEGER arca );
|
||||
|
||||
extern pascal trap void C_StdBits (BitMap *srcbmp,
|
||||
const Rect *srcrp, const Rect *dstrp,
|
||||
INTEGER mode, RgnHandle mask);
|
||||
extern void StdBitsPicSaveFlag (BitMap *srcbmp,
|
||||
const Rect *srcrp, const Rect *dstrp,
|
||||
INTEGER mode, RgnHandle mask, BOOLEAN savepic);
|
||||
|
||||
|
||||
extern void ROMlib_printsegs( INTEGER *ip );
|
||||
extern pascal trap void C_StdLine( Point p );
|
||||
extern pascal trap void C_StdOval( GrafVerb v, Rect *rp );
|
||||
extern pascal trap void C_StdComment( INTEGER kind, INTEGER size,
|
||||
Handle hand );
|
||||
extern pascal trap void C_StdGetPic( Ptr dp, INTEGER bc );
|
||||
extern pascal trap void C_StdPutPic( Ptr sp, INTEGER bc );
|
||||
extern pascal trap void C_StdPoly( GrafVerb verb, PolyHandle ph );
|
||||
extern pascal trap void C_StdRRect( GrafVerb verb, Rect *r,
|
||||
INTEGER width, INTEGER height );
|
||||
extern pascal trap void C_StdRect( GrafVerb v, Rect *rp );
|
||||
extern pascal trap void C_StdRgn( GrafVerb verb, RgnHandle rgn );
|
||||
extern pascal trap void C_StdText( INTEGER n, Ptr textbufp,
|
||||
Point num, Point den );
|
||||
extern pascal trap INTEGER C_StdTxMeas( INTEGER n, Ptr p,
|
||||
Point *nump, Point *denp, FontInfo *finfop );
|
||||
extern INTEGER ROMlib_StdTxMeas( LONGINT n, Ptr p,
|
||||
Point *nump, Point *denp, FontInfo *finfop );
|
||||
extern pascal trap void C_MeasureText( INTEGER n, Ptr text,
|
||||
Ptr chars );
|
||||
extern pascal trap void C_TextFont( INTEGER f );
|
||||
extern pascal trap void C_TextFace( INTEGER thef );
|
||||
extern pascal trap void C_TextMode( INTEGER m );
|
||||
extern pascal trap void C_TextSize( INTEGER s );
|
||||
extern pascal trap void C_SpaceExtra( Fixed e );
|
||||
extern pascal trap void C_DrawChar( CHAR thec );
|
||||
extern pascal trap void C_DrawString( StringPtr s );
|
||||
extern pascal trap void C_DrawText( Ptr tb, INTEGER fb, INTEGER bc );
|
||||
extern pascal trap INTEGER C_CharWidth( CHAR thec );
|
||||
extern pascal trap INTEGER C_StringWidth( StringPtr s );
|
||||
extern pascal trap INTEGER C_TextWidth( Ptr tb, INTEGER fb, INTEGER bc );
|
||||
extern pascal trap void C_GetFontInfo( FontInfo *ip );
|
||||
|
||||
extern pascal trap void C_GetCPixel( INTEGER h, INTEGER v, RGBColor *colorp );
|
||||
extern pascal trap void C_SetCPixel( INTEGER h, INTEGER v,
|
||||
RGBColor *colorp);
|
||||
|
||||
extern pascal trap void C_SeedCFill( BitMap *srcbp, BitMap *dstbp,
|
||||
Rect *srcrp, Rect *dstrp, INTEGER seedh, INTEGER seedv,
|
||||
ProcPtr matchprocp, LONGINT matchdata);
|
||||
|
||||
extern pascal trap void C_CalcCMask( BitMap *srcbp, BitMap *dstbp,
|
||||
Rect *srcrp, Rect *dstrp, RGBColor *seedrgbp, ProcPtr matchprocp,
|
||||
LONGINT matchdata);
|
||||
extern pascal trap void C_IMVI_CopyDeepMask (
|
||||
BitMap *srcBits,
|
||||
BitMap *maskBits,
|
||||
BitMap *dstBits,
|
||||
Rect *srcRect,
|
||||
Rect *maskRect,
|
||||
Rect *dstRect,
|
||||
INTEGER mode,
|
||||
RgnHandle maskRgn);
|
||||
|
||||
#endif /* _QUICKDRAW_H_ */
|
||||
55
src/include/QuickTime.h
Normal file
55
src/include/QuickTime.h
Normal file
@@ -0,0 +1,55 @@
|
||||
#if !defined (__QUICKTIME__)
|
||||
#define __QUICKTIME__
|
||||
|
||||
/*
|
||||
* Copyright 1998 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: QuickTime.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#include "Components.h"
|
||||
#include "CQuickDraw.h"
|
||||
#include "FileMgr.h"
|
||||
|
||||
typedef struct MovieRecord
|
||||
{
|
||||
LONGINT data[1];
|
||||
}
|
||||
MovieRecord;
|
||||
|
||||
typedef MovieRecord *Movie;
|
||||
|
||||
typedef LONGINT TimeValue;
|
||||
|
||||
extern pascal trap OSErr C_EnterMovies (void);
|
||||
extern pascal trap void C_ExitMovies (void);
|
||||
extern pascal trap void C_MoviesTask (Movie movie, LONGINT maxmillisecs);
|
||||
extern pascal trap OSErr C_PrerollMovie (Movie movie, TimeValue time,
|
||||
Fixed rate);
|
||||
extern pascal trap void C_SetMovieActive (Movie movie, BOOLEAN active);
|
||||
extern pascal trap void C_StartMovie (Movie movie);
|
||||
extern pascal trap void C_StopMovie (Movie movie);
|
||||
extern pascal trap void C_GoToBeginningOfMovie (Movie movie);
|
||||
extern pascal trap void C_SetMovieGWorld (Movie movie, CGrafPtr cgrafp,
|
||||
GDHandle gdh);
|
||||
extern pascal trap OSErr C_UpdateMovie (Movie movie);
|
||||
extern pascal trap void C_DisposeMovie (Movie movie);
|
||||
extern pascal trap INTEGER C_GetMovieVolume (Movie movie);
|
||||
extern pascal trap OSErr C_CloseMovieFile (INTEGER refnum);
|
||||
extern pascal trap BOOLEAN C_IsMovieDone (Movie movie);
|
||||
extern pascal trap OSErr C_NewMovieFromFile (Movie *moviep, INTEGER refnum,
|
||||
INTEGER *residp,
|
||||
StringPtr resnamep,
|
||||
INTEGER flags,
|
||||
BOOLEAN *datarefwaschangedp);
|
||||
extern pascal trap Fixed C_GetMoviePreferredRate (Movie movie);
|
||||
extern pascal trap void C_GetMovieBox (Movie movie, Rect *boxp);
|
||||
extern pascal trap void C_SetMovieBox (Movie movie, const Rect *boxp);
|
||||
extern pascal trap ComponentInstance C_NewMovieController (Movie movie,
|
||||
const Rect *mrectp,
|
||||
LONGINT flags);
|
||||
extern pascal trap void C_DisposeMovieController (ComponentInstance cntrller);
|
||||
extern pascal trap OSErr C_OpenMovieFile (const FSSpec *filespecp,
|
||||
INTEGER *refnump, uint8 perm);
|
||||
#endif
|
||||
135
src/include/ResourceMgr.h
Normal file
135
src/include/ResourceMgr.h
Normal file
@@ -0,0 +1,135 @@
|
||||
|
||||
#if !defined (_RESOURCE_H_)
|
||||
#define _RESOURCE_H_
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: ResourceMgr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
|
||||
/* resource attribute masks */
|
||||
#define resSysHeap 64
|
||||
#define resPurgeable 32
|
||||
#define resLocked 16
|
||||
#define resProtected 8
|
||||
#define resPreload 4
|
||||
#define resChanged 2
|
||||
enum { resCompressed = 1 };
|
||||
|
||||
/* resource manager return codes */
|
||||
|
||||
enum { CantDecompress = -186 };
|
||||
|
||||
#define resNotFound (-192)
|
||||
#define resFNotFound (-193)
|
||||
#define addResFailed (-194)
|
||||
#define rmvResFailed (-196)
|
||||
|
||||
/* IMIV */
|
||||
#define resAttrErr (-198)
|
||||
#define mapReadErr (-199)
|
||||
|
||||
/* IMVI */
|
||||
|
||||
enum { resourceInMemory = -188, inputOutOfBounds = -190 };
|
||||
|
||||
/* resource file attribute masks */
|
||||
#define mapReadOnly 128
|
||||
#define mapCompact 64
|
||||
#define mapChanged 32
|
||||
|
||||
#if !defined (TopMapHndl_H)
|
||||
extern HIDDEN_Handle TopMapHndl_H;
|
||||
extern HIDDEN_Handle SysMapHndl_H;
|
||||
extern HIDDEN_ProcPtr ResErrProc_H;
|
||||
extern INTEGER SysMap;
|
||||
extern INTEGER CurMap;
|
||||
extern BOOLEAN ResLoad;
|
||||
extern INTEGER ResErr;
|
||||
extern Byte SysResName[20];
|
||||
#endif
|
||||
|
||||
#define TopMapHndl (TopMapHndl_H.p)
|
||||
#define SysMapHndl (SysMapHndl_H.p)
|
||||
#define ResErrProc (ResErrProc_H.p)
|
||||
|
||||
extern BOOLEAN ROMlib_InstallxDEF( ProcPtr thedef, ResType typ,
|
||||
INTEGER id );
|
||||
extern pascal trap void C_SetResLoad( BOOLEAN load ); extern pascal trap void P_SetResLoad( BOOLEAN load);
|
||||
extern pascal trap INTEGER C_CountResources( ResType typ ); extern pascal trap INTEGER P_CountResources( ResType typ);
|
||||
extern pascal trap INTEGER C_Count1Resources(
|
||||
ResType typ ); extern pascal trap INTEGER P_Count1Resources(
|
||||
ResType typ );
|
||||
extern pascal trap Handle C_GetIndResource( ResType typ, INTEGER indx ); extern pascal trap Handle P_GetIndResource( ResType typ, INTEGER indx);
|
||||
extern pascal trap Handle C_Get1IndResource( ResType typ,
|
||||
INTEGER i ); extern pascal trap Handle P_Get1IndResource( ResType typ,
|
||||
INTEGER i );
|
||||
extern pascal trap Handle C_GetResource( ResType typ, INTEGER id ); extern pascal trap Handle P_GetResource( ResType typ, INTEGER id);
|
||||
extern pascal trap Handle C_Get1Resource( ResType typ,
|
||||
INTEGER id ); extern pascal trap Handle P_Get1Resource( ResType typ,
|
||||
INTEGER id );
|
||||
extern pascal trap Handle C_GetNamedResource( ResType typ, StringPtr nam ); extern pascal trap Handle P_GetNamedResource( ResType typ, StringPtr nam);
|
||||
extern pascal trap Handle C_Get1NamedResource( ResType typ,
|
||||
StringPtr s ); extern pascal trap Handle P_Get1NamedResource( ResType typ,
|
||||
StringPtr s );
|
||||
extern pascal trap void C_LoadResource( Handle volatile res ); extern pascal trap void P_LoadResource( Handle volatile res);
|
||||
extern pascal trap void C_ReleaseResource( Handle res ); extern pascal trap void P_ReleaseResource( Handle res);
|
||||
extern pascal trap void C_DetachResource( Handle res ); extern pascal trap void P_DetachResource( Handle res);
|
||||
extern pascal trap INTEGER C_UniqueID( ResType typ ); extern pascal trap INTEGER P_UniqueID( ResType typ);
|
||||
extern pascal trap INTEGER C_Unique1ID( ResType typ ); extern pascal trap INTEGER P_Unique1ID( ResType typ);
|
||||
extern pascal trap void C_GetResInfo( Handle res, INTEGER *id,
|
||||
ResType *typ, StringPtr name ); extern pascal trap void P_GetResInfo( Handle res, INTEGER *id,
|
||||
ResType *typ, StringPtr name );
|
||||
extern pascal trap INTEGER C_GetResAttrs( Handle res ); extern pascal trap INTEGER P_GetResAttrs( Handle res);
|
||||
extern LONGINT ROMlib_SizeResource( Handle res, BOOLEAN usehandle );
|
||||
extern pascal trap LONGINT C_SizeResource( Handle res ); extern pascal trap LONGINT P_SizeResource( Handle res);
|
||||
extern pascal trap INTEGER C_CountTypes( void ); extern pascal trap INTEGER P_CountTypes( void );
|
||||
extern pascal trap INTEGER C_Count1Types( void ); extern pascal trap INTEGER P_Count1Types( void );
|
||||
extern pascal trap void C_GetIndType( ResType *typ, INTEGER indx ); extern pascal trap void P_GetIndType( ResType *typ, INTEGER indx);
|
||||
extern pascal trap void C_Get1IndType( ResType *typ,
|
||||
INTEGER indx ); extern pascal trap void P_Get1IndType( ResType *typ,
|
||||
INTEGER indx );
|
||||
extern pascal trap LONGINT C_MaxSizeRsrc( Handle h ); extern pascal trap LONGINT P_MaxSizeRsrc( Handle h);
|
||||
extern pascal trap LONGINT C_RsrcMapEntry( Handle h ); extern pascal trap LONGINT P_RsrcMapEntry( Handle h);
|
||||
extern pascal trap Handle C_RGetResource( ResType typ, INTEGER id ); extern pascal trap Handle P_RGetResource( ResType typ, INTEGER id);
|
||||
extern pascal trap INTEGER C_InitResources( void ); extern pascal trap INTEGER P_InitResources( void );
|
||||
extern pascal trap void C_RsrcZoneInit( void ); extern pascal trap void P_RsrcZoneInit( void );
|
||||
extern pascal trap INTEGER C_ResError( void ); extern pascal trap INTEGER P_ResError( void );
|
||||
extern pascal trap INTEGER C_GetResFileAttrs( INTEGER rn ); extern pascal trap INTEGER P_GetResFileAttrs( INTEGER rn);
|
||||
extern pascal trap void C_SetResFileAttrs( INTEGER rn, INTEGER attrs ); extern pascal trap void P_SetResFileAttrs( INTEGER rn, INTEGER attrs);
|
||||
extern pascal trap void C_SetResInfo( Handle res, INTEGER id,
|
||||
StringPtr name ); extern pascal trap void P_SetResInfo( Handle res, INTEGER id,
|
||||
StringPtr name );
|
||||
extern pascal trap void C_SetResAttrs( Handle res, INTEGER attrs ); extern pascal trap void P_SetResAttrs( Handle res, INTEGER attrs);
|
||||
extern pascal trap void C_ChangedResource( Handle res ); extern pascal trap void P_ChangedResource( Handle res);
|
||||
extern pascal trap void C_AddResource( Handle data, ResType typ,
|
||||
INTEGER id, StringPtr name ); extern pascal trap void P_AddResource( Handle data, ResType typ,
|
||||
INTEGER id, StringPtr name );
|
||||
extern pascal trap void C_RmveResource( Handle res ); extern pascal trap void P_RmveResource( Handle res);
|
||||
extern pascal trap void C_UpdateResFile( INTEGER rn ); extern pascal trap void P_UpdateResFile( INTEGER rn);
|
||||
extern pascal trap void C_WriteResource( Handle res ); extern pascal trap void P_WriteResource( Handle res);
|
||||
extern pascal trap void C_SetResPurge( BOOLEAN install ); extern pascal trap void P_SetResPurge( BOOLEAN install);
|
||||
extern pascal trap void C_CreateResFile( StringPtr fn ); extern pascal trap void P_CreateResFile( StringPtr fn);
|
||||
extern pascal trap INTEGER C_OpenRFPerm( StringPtr fn,
|
||||
INTEGER vref, Byte perm ); extern pascal trap INTEGER P_OpenRFPerm( StringPtr fn,
|
||||
INTEGER vref, Byte perm );
|
||||
extern pascal trap INTEGER C_OpenResFile( StringPtr fn ); extern pascal trap INTEGER P_OpenResFile( StringPtr fn);
|
||||
extern pascal trap void C_CloseResFile( INTEGER rn ); extern pascal trap void P_CloseResFile( INTEGER rn);
|
||||
extern pascal trap INTEGER C_CurResFile( void ); extern pascal trap INTEGER P_CurResFile( void );
|
||||
extern pascal trap INTEGER C_HomeResFile( Handle res ); extern pascal trap INTEGER P_HomeResFile( Handle res);
|
||||
extern pascal trap void C_UseResFile( INTEGER rn ); extern pascal trap void P_UseResFile( INTEGER rn);
|
||||
|
||||
extern pascal trap void C_ReadPartialResource (Handle resource,
|
||||
int32 offset,
|
||||
Ptr buffer, int32 count);
|
||||
extern pascal trap void C_WritePartialResource (Handle resource,
|
||||
int32 offset,
|
||||
Ptr buffer, int32 count);
|
||||
extern pascal trap void C_SetResourceSize (Handle resource, int32 size);
|
||||
|
||||
extern pascal Handle C_GetNextFOND (Handle fondHandle);
|
||||
|
||||
#endif /* _RESOURCE_H_ */
|
||||
286
src/include/SANE.h
Normal file
286
src/include/SANE.h
Normal file
@@ -0,0 +1,286 @@
|
||||
#if !defined(__SANE__)
|
||||
#define __SANE__
|
||||
|
||||
/*
|
||||
* Copyright 1990, 1991 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: SANE.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
|
||||
/* Big-endian 64 bit "comp" data type. Note that this has a NaN value! */
|
||||
typedef union {
|
||||
struct {
|
||||
ULONGINT hi PACKED;
|
||||
ULONGINT lo PACKED;
|
||||
} hilo PACKED;
|
||||
signed long long val PACKED;
|
||||
} comp_t;
|
||||
|
||||
|
||||
/* Now we have a version of this in "native" byte order. */
|
||||
#if defined (LITTLEENDIAN)
|
||||
typedef union {
|
||||
struct {
|
||||
ULONGINT lo PACKED;
|
||||
ULONGINT hi PACKED;
|
||||
} hilo PACKED;
|
||||
signed long long val PACKED;
|
||||
} native_comp_t;
|
||||
#else /* Not LITTLEENDIAN */
|
||||
typedef comp_t native_comp_t;
|
||||
#endif /* Not LITTLEENDIAN */
|
||||
|
||||
|
||||
/* "Packed" IEEE 80 bit FP representation (zero field omitted). */
|
||||
typedef struct {
|
||||
/* Sign and exponent. */
|
||||
union {
|
||||
#if !defined (LITTLEENDIAN)
|
||||
struct { /* Here for added efficiency when BIGENDIAN. */
|
||||
unsigned short sgn:1;
|
||||
unsigned short exp:15;
|
||||
} s PACKED;
|
||||
#endif
|
||||
unsigned short sgn_and_exp PACKED;
|
||||
} se PACKED;
|
||||
|
||||
/* Mantissa. */
|
||||
union {
|
||||
struct {
|
||||
ULONGINT man_hi PACKED;
|
||||
ULONGINT man_lo PACKED;
|
||||
} hilo PACKED;
|
||||
unsigned long long man PACKED;
|
||||
} man PACKED;
|
||||
} x80_t;
|
||||
|
||||
|
||||
/* For backwards compatibility with old stuff. */
|
||||
typedef x80_t extended80;
|
||||
typedef comp_t comp;
|
||||
|
||||
/* Begin old stuff: */
|
||||
|
||||
/* This only makes sense on the 68k. */
|
||||
#if defined (mc68000)
|
||||
typedef struct {
|
||||
INTEGER exp PACKED;
|
||||
INTEGER zero PACKED;
|
||||
INTEGER man[4] PACKED;
|
||||
} extended96;
|
||||
#endif
|
||||
|
||||
#define SIGDIGLEN 20
|
||||
|
||||
typedef struct {
|
||||
unsigned char sgn PACKED;
|
||||
unsigned char unused_filler PACKED;
|
||||
INTEGER exp PACKED;
|
||||
unsigned char sig[SIGDIGLEN] PACKED;
|
||||
} Decimal;
|
||||
|
||||
typedef enum { FloatDecimal, FixedDecimal = 256 } toobigdecformstyle_t;
|
||||
|
||||
typedef INTEGER DecFormStyle;
|
||||
|
||||
#define DECIMALTYPEMASK 0x0100
|
||||
|
||||
typedef enum {SNaN = 1, QNaN, Infinite, ZeroNum, NormalNum, DenormalNum}
|
||||
NumClass;
|
||||
|
||||
typedef struct {
|
||||
DecFormStyle style PACKED;
|
||||
INTEGER digits PACKED;
|
||||
} DecForm;
|
||||
|
||||
#define Decstr char *
|
||||
|
||||
#define FX_OPERAND 0x0000
|
||||
#define FD_OPERAND 0x0800
|
||||
#define FS_OPERAND 0x1000
|
||||
#define FC_OPERAND 0x3000
|
||||
#define FI_OPERAND 0x2000
|
||||
#define FL_OPERAND 0x2800
|
||||
|
||||
#define Fx2X_OPCODE 0x000E
|
||||
|
||||
#define FI2X (FI_OPERAND + Fx2X_OPCODE)
|
||||
|
||||
#define FCMP_RETURN_TYPE void
|
||||
|
||||
/* DO NOT DELETE THIS LINE */
|
||||
#if !defined (__STDC__)
|
||||
extern pascal void ROMlib_Fcomp2X();
|
||||
extern void ROMlib_Fsetenv();
|
||||
extern void ROMlib_Fgetenv();
|
||||
extern void ROMlib_Fprocentry();
|
||||
extern void ROMlib_Fprocexit();
|
||||
extern void ROMlib_Ftestxcp();
|
||||
extern void ROMlib_FsqrtX();
|
||||
extern void ROMlib_FscalbX();
|
||||
extern void ROMlib_FlogbX();
|
||||
extern void ROMlib_FabsX();
|
||||
extern void ROMlib_FnegX();
|
||||
extern void ROMlib_FrintX();
|
||||
extern void ROMlib_FtintX();
|
||||
extern void ROMlib_Fcpysgnx();
|
||||
extern void ROMlib_Faddx();
|
||||
extern void ROMlib_Fsubx();
|
||||
extern void ROMlib_Fmulx();
|
||||
extern void ROMlib_Fdivx();
|
||||
extern void ROMlib_Fremx();
|
||||
extern FCMP_RETURN_TYPE ROMlib_Fcmpx();
|
||||
extern FCMP_RETURN_TYPE ROMlib_FcpXx();
|
||||
extern void ROMlib_FX2x();
|
||||
extern void ROMlib_Fx2X();
|
||||
extern void ROMlib_Fx2dec();
|
||||
extern void ROMlib_Fdec2x();
|
||||
extern void ROMlib_Fclassx();
|
||||
extern void ROMlib_FlnX();
|
||||
extern void ROMlib_Flog2X();
|
||||
extern void ROMlib_Fln1X();
|
||||
extern void ROMlib_Flog21X();
|
||||
extern void ROMlib_FexpX();
|
||||
extern void ROMlib_Fexp2X();
|
||||
extern void ROMlib_Fexp1X();
|
||||
extern void ROMlib_Fexp21X();
|
||||
extern void ROMlib_Fxpwri();
|
||||
extern void ROMlib_Fxpwry();
|
||||
extern void ROMlib_Fcompound();
|
||||
extern void ROMlib_Fannuity();
|
||||
extern void ROMlib_FsinX();
|
||||
extern void ROMlib_FcosX();
|
||||
extern void ROMlib_FtanX();
|
||||
extern void ROMlib_FatanX();
|
||||
extern void ROMlib_FrandX();
|
||||
extern void ROMlib_Fdec2str();
|
||||
extern void ROMlib_Fxstr2dec();
|
||||
extern void ROMlib_Fcstr2dec();
|
||||
extern void ROMlib_Fpstr2dec();
|
||||
#else /* __STDC__ */
|
||||
extern pascal void C_ROMlib_Fcomp2X( comp sp, extended80 *
|
||||
dp ); extern pascal void P_ROMlib_Fcomp2X( comp sp, extended80 *
|
||||
dp );
|
||||
extern pascal trap void C_ROMlib_Fsetenv( INTEGER *dp,
|
||||
INTEGER sel ); extern pascal trap void P_ROMlib_Fsetenv( INTEGER *dp,
|
||||
INTEGER sel );
|
||||
extern pascal trap void C_ROMlib_Fgetenv( INTEGER *dp,
|
||||
INTEGER sel ); extern pascal trap void P_ROMlib_Fgetenv( INTEGER *dp,
|
||||
INTEGER sel );
|
||||
extern pascal trap void C_ROMlib_Fprocentry( INTEGER *dp,
|
||||
INTEGER sel ); extern pascal trap void P_ROMlib_Fprocentry( INTEGER *dp,
|
||||
INTEGER sel );
|
||||
extern pascal trap void C_ROMlib_Fprocexit( INTEGER *dp,
|
||||
INTEGER sel ); extern pascal trap void P_ROMlib_Fprocexit( INTEGER *dp,
|
||||
INTEGER sel );
|
||||
extern pascal trap void C_ROMlib_Ftestxcp( INTEGER *dp,
|
||||
INTEGER sel ); extern pascal trap void P_ROMlib_Ftestxcp( INTEGER *dp,
|
||||
INTEGER sel );
|
||||
extern pascal trap void C_ROMlib_FsqrtX( extended80 *dp,
|
||||
unsigned short sel ); extern pascal trap void P_ROMlib_FsqrtX( extended80 *dp,
|
||||
unsigned short sel );
|
||||
extern pascal trap void C_ROMlib_FscalbX( INTEGER *sp,
|
||||
extended80 *dp, unsigned short sel ); extern pascal trap void P_ROMlib_FscalbX( INTEGER *sp,
|
||||
extended80 *dp, unsigned short sel );
|
||||
extern pascal trap void C_ROMlib_FlogbX( extended80 *dp,
|
||||
unsigned short sel ); extern pascal trap void P_ROMlib_FlogbX( extended80 *dp,
|
||||
unsigned short sel );
|
||||
extern pascal trap void C_ROMlib_FabsX( extended80 *dp,
|
||||
unsigned short sel ); extern pascal trap void P_ROMlib_FabsX( extended80 *dp,
|
||||
unsigned short sel );
|
||||
extern pascal trap void C_ROMlib_FnegX( extended80 *dp,
|
||||
unsigned short sel ); extern pascal trap void P_ROMlib_FnegX( extended80 *dp,
|
||||
unsigned short sel );
|
||||
extern pascal trap void C_ROMlib_FrintX( extended80 *dp,
|
||||
unsigned short sel ); extern pascal trap void P_ROMlib_FrintX( extended80 *dp,
|
||||
unsigned short sel );
|
||||
extern pascal trap void C_ROMlib_FtintX( extended80 *dp,
|
||||
unsigned short sel ); extern pascal trap void P_ROMlib_FtintX( extended80 *dp,
|
||||
unsigned short sel );
|
||||
extern pascal trap void C_ROMlib_Fcpysgnx( x80_t *sp,
|
||||
x80_t *dp, unsigned short sel ); extern pascal trap void P_ROMlib_Fcpysgnx( x80_t *sp,
|
||||
x80_t *dp, unsigned short sel );
|
||||
extern pascal trap void C_ROMlib_Faddx( void *sp, extended80 *
|
||||
dp, unsigned short sel ); extern pascal trap void P_ROMlib_Faddx( void *sp, extended80 *
|
||||
dp, unsigned short sel );
|
||||
extern pascal trap void C_ROMlib_Fsubx( void *sp, extended80 *
|
||||
dp, unsigned short sel ); extern pascal trap void P_ROMlib_Fsubx( void *sp, extended80 *
|
||||
dp, unsigned short sel );
|
||||
extern pascal trap void C_ROMlib_Fmulx( void *sp, extended80 *
|
||||
dp, unsigned short sel ); extern pascal trap void P_ROMlib_Fmulx( void *sp, extended80 *
|
||||
dp, unsigned short sel );
|
||||
extern pascal trap void C_ROMlib_Fdivx( void *sp, extended80 *
|
||||
dp, unsigned short sel ); extern pascal trap void P_ROMlib_Fdivx( void *sp, extended80 *
|
||||
dp, unsigned short sel );
|
||||
extern pascal trap void C_ROMlib_Fremx( void *sp,
|
||||
extended80 *dp, unsigned short sel ); extern pascal trap void P_ROMlib_Fremx( void *sp,
|
||||
extended80 *dp, unsigned short sel );
|
||||
extern pascal trap FCMP_RETURN_TYPE C_ROMlib_Fcmpx( void *sp, extended80 *
|
||||
dp, unsigned short sel ); extern pascal trap void P_ROMlib_Fcmpx( void *sp, extended80 *
|
||||
dp, unsigned short sel );
|
||||
extern pascal trap FCMP_RETURN_TYPE C_ROMlib_FcpXx( void *sp, extended80 *
|
||||
dp, unsigned short sel ); extern pascal trap void P_ROMlib_FcpXx( void *sp, extended80 *
|
||||
dp, unsigned short sel );
|
||||
extern pascal trap void C_ROMlib_FX2x( extended80 *sp, void *
|
||||
dp, unsigned short sel ); extern pascal trap void P_ROMlib_FX2x( extended80 *sp, void *
|
||||
dp, unsigned short sel );
|
||||
extern pascal trap void C_ROMlib_Fx2X( void *sp, extended80 *
|
||||
dp, unsigned short sel ); extern pascal trap void P_ROMlib_Fx2X( void *sp, extended80 *
|
||||
dp, unsigned short sel );
|
||||
extern pascal trap void C_ROMlib_Fx2dec( DecForm *sp2, void *
|
||||
sp, Decimal *dp, unsigned short sel ); extern pascal trap void P_ROMlib_Fx2dec( DecForm *sp2, void *
|
||||
sp, Decimal *dp, unsigned short sel );
|
||||
extern pascal trap void C_ROMlib_Fdec2x( Decimal *sp, void *
|
||||
dp, unsigned short sel ); extern pascal trap void P_ROMlib_Fdec2x( Decimal *sp, void *
|
||||
dp, unsigned short sel );
|
||||
extern pascal trap void C_ROMlib_Fclassx( void *sp, INTEGER *
|
||||
dp, unsigned short sel ); extern pascal trap void P_ROMlib_Fclassx( void *sp, INTEGER *
|
||||
dp, unsigned short sel );
|
||||
extern pascal trap void C_ROMlib_FlnX( extended80 *dp ); extern pascal trap void P_ROMlib_FlnX( extended80 *dp);
|
||||
extern pascal trap void C_ROMlib_Flog2X( extended80 *dp ); extern pascal trap void P_ROMlib_Flog2X( extended80 *dp);
|
||||
extern pascal trap void C_ROMlib_Fln1X( extended80 *dp ); extern pascal trap void P_ROMlib_Fln1X( extended80 *dp);
|
||||
extern pascal trap void C_ROMlib_Flog21X( extended80 *dp ); extern pascal trap void P_ROMlib_Flog21X( extended80 *dp);
|
||||
extern pascal trap void C_ROMlib_FexpX( extended80 *dp ); extern pascal trap void P_ROMlib_FexpX( extended80 *dp);
|
||||
extern pascal trap void C_ROMlib_Fexp2X( extended80 *dp ); extern pascal trap void P_ROMlib_Fexp2X( extended80 *dp);
|
||||
extern pascal trap void C_ROMlib_Fexp1X( extended80 *dp ); extern pascal trap void P_ROMlib_Fexp1X( extended80 *dp);
|
||||
extern pascal trap void C_ROMlib_Fexp21X( extended80 *dp ); extern pascal trap void P_ROMlib_Fexp21X( extended80 *dp);
|
||||
extern pascal trap void C_ROMlib_Fxpwri( INTEGER *sp,
|
||||
extended80 *dp ); extern pascal trap void P_ROMlib_Fxpwri( INTEGER *sp,
|
||||
extended80 *dp );
|
||||
extern pascal trap void C_ROMlib_Fxpwry( extended80 *sp,
|
||||
extended80 *dp ); extern pascal trap void P_ROMlib_Fxpwry( extended80 *sp,
|
||||
extended80 *dp );
|
||||
extern pascal trap void C_ROMlib_Fcompound( extended80 *sp2,
|
||||
extended80 *sp, extended80 *dp ); extern pascal trap void P_ROMlib_Fcompound( extended80 *sp2,
|
||||
extended80 *sp, extended80 *dp );
|
||||
extern pascal trap void C_ROMlib_Fannuity( extended80 *sp2,
|
||||
extended80 *sp, extended80 *dp ); extern pascal trap void P_ROMlib_Fannuity( extended80 *sp2,
|
||||
extended80 *sp, extended80 *dp );
|
||||
extern pascal trap void C_ROMlib_FsinX( extended80 *dp ); extern pascal trap void P_ROMlib_FsinX( extended80 *dp);
|
||||
extern pascal trap void C_ROMlib_FcosX( extended80 *dp ); extern pascal trap void P_ROMlib_FcosX( extended80 *dp);
|
||||
extern pascal trap void C_ROMlib_FtanX( extended80 *dp ); extern pascal trap void P_ROMlib_FtanX( extended80 *dp);
|
||||
extern pascal trap void C_ROMlib_FatanX( extended80 *dp ); extern pascal trap void P_ROMlib_FatanX( extended80 *dp);
|
||||
extern pascal trap void C_ROMlib_FrandX( extended80 *dp ); extern pascal trap void P_ROMlib_FrandX( extended80 *dp);
|
||||
extern pascal trap void C_ROMlib_Fdec2str( DecForm *sp2,
|
||||
Decimal *sp, Decstr dp ); extern pascal trap void P_ROMlib_Fdec2str( DecForm *sp2,
|
||||
Decimal *sp, Decstr dp );
|
||||
extern pascal trap void C_ROMlib_Fxstr2dec( Decstr sp2,
|
||||
INTEGER *sp, Decimal *dp2, Byte *dp,
|
||||
INTEGER lastchar ); extern pascal trap void P_ROMlib_Fxstr2dec( Decstr sp2,
|
||||
INTEGER *sp, Decimal *dp2, Byte *dp,
|
||||
INTEGER lastchar );
|
||||
extern pascal trap void C_ROMlib_Fcstr2dec( Decstr sp2,
|
||||
INTEGER *sp, Decimal *dp2, Byte *dp ); extern pascal trap void P_ROMlib_Fcstr2dec( Decstr sp2,
|
||||
INTEGER *sp, Decimal *dp2, Byte *dp );
|
||||
extern pascal trap void C_ROMlib_Fpstr2dec( Decstr sp2,
|
||||
INTEGER *sp, Decimal *dp2, Byte *dp ); extern pascal trap void P_ROMlib_Fpstr2dec( Decstr sp2,
|
||||
INTEGER *sp, Decimal *dp2, Byte *dp );
|
||||
extern pascal trap void C_ROMlib_Fsethv( LONGINT * hvp, unsigned short sel );
|
||||
extern pascal trap void C_ROMlib_Fgethv( LONGINT * hvp, unsigned short sel );
|
||||
|
||||
extern pascal trap void C_ROMlib_FnextX (uint8 *x, uint8 *y,
|
||||
unsigned short sel);
|
||||
#endif /* __STDC__ */
|
||||
#endif
|
||||
56
src/include/ScrapMgr.h
Normal file
56
src/include/ScrapMgr.h
Normal file
@@ -0,0 +1,56 @@
|
||||
#if !defined (__SCRAP__)
|
||||
#define __SCRAP__
|
||||
|
||||
#include "ResourceMgr.h"
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: ScrapMgr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#define noScrapErr (-100)
|
||||
#define noTypeErr (-102)
|
||||
|
||||
typedef struct {
|
||||
LONGINT scrapSize PACKED;
|
||||
Handle scrapHandle PACKED_P;
|
||||
INTEGER scrapCount PACKED;
|
||||
INTEGER scrapState PACKED;
|
||||
StringPtr scrapName PACKED_P;
|
||||
} ScrapStuff;
|
||||
typedef ScrapStuff *PScrapStuff;
|
||||
|
||||
|
||||
#if !defined (ScrapHandle_H)
|
||||
extern HIDDEN_Handle ScrapHandle_H;
|
||||
extern HIDDEN_StringPtr ScrapName_H;
|
||||
extern LONGINT ScrapSize;
|
||||
extern INTEGER ScrapCount;
|
||||
extern INTEGER ScrapState;
|
||||
#endif
|
||||
|
||||
#define ScrapHandle (ScrapHandle_H.p)
|
||||
#define ScrapName (ScrapName_H.p)
|
||||
|
||||
#if !defined (__STDC__)
|
||||
extern PScrapStuff InfoScrap();
|
||||
extern LONGINT UnloadScrap();
|
||||
extern LONGINT LoadScrap();
|
||||
extern LONGINT ROMlib_ZeroScrap();
|
||||
extern LONGINT ZeroScrap();
|
||||
extern LONGINT PutScrap();
|
||||
extern LONGINT GetScrap();
|
||||
#else /* __STDC__ */
|
||||
extern pascal trap PScrapStuff C_InfoScrap( void ); extern pascal trap PScrapStuff P_InfoScrap( void );
|
||||
extern pascal trap LONGINT C_UnloadScrap( void ); extern pascal trap LONGINT P_UnloadScrap( void );
|
||||
extern pascal trap LONGINT C_LoadScrap( void ); extern pascal trap LONGINT P_LoadScrap( void );
|
||||
extern LONGINT ROMlib_ZeroScrap( void );
|
||||
extern pascal trap LONGINT C_ZeroScrap( void ); extern pascal trap LONGINT P_ZeroScrap( void );
|
||||
extern pascal trap LONGINT C_PutScrap( LONGINT len, ResType rest, Ptr p ); extern pascal trap LONGINT P_PutScrap( LONGINT len, ResType rest, Ptr p);
|
||||
extern pascal trap LONGINT C_GetScrap( Handle h, ResType rest,
|
||||
LONGINT *off ); extern pascal trap LONGINT P_GetScrap( Handle h, ResType rest,
|
||||
LONGINT *off );
|
||||
#endif /* __STDC__ */
|
||||
#endif /* __SCRAP__ */
|
||||
349
src/include/ScriptMgr.h
Normal file
349
src/include/ScriptMgr.h
Normal file
@@ -0,0 +1,349 @@
|
||||
#if !defined (_SCRIPTMGR_H_)
|
||||
#define _SCRIPTMGR_H_
|
||||
|
||||
/*
|
||||
* Copyright 1991 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: ScriptMgr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#include "SANE.h"
|
||||
#include "IntlUtil.h"
|
||||
|
||||
typedef INTEGER String2DateStatus;
|
||||
|
||||
#define smRoman 0
|
||||
|
||||
#define smCharPunct 0
|
||||
#define smCharAscii 1
|
||||
#define smCharEuro 7
|
||||
|
||||
#define smPunctNormal 0x0000
|
||||
#define smPunctNumber 0x0100
|
||||
#define smPunctSymbol 0x0200
|
||||
#define smPunctBlank 0x0300
|
||||
|
||||
#define smCharLeft 0x0000
|
||||
#define smCharRight 0x2000
|
||||
|
||||
#define smCharLower 0x0000
|
||||
#define smCharUpper 0x4000
|
||||
|
||||
#define smChar1byte 0x0000
|
||||
#define smChar2byte 0x8000
|
||||
|
||||
#define smTransAscii 0
|
||||
#define smTransNative 1
|
||||
#define smTransLower 16384
|
||||
#define smTransUpper 32768
|
||||
#define smMaskAscii 1
|
||||
#define smMaskNative 2
|
||||
#define smMaskAll -1
|
||||
|
||||
#define smScriptVersion 0
|
||||
#define smScriptMunged 2
|
||||
#define smScriptEnabled 4
|
||||
#define smScriptRight 6
|
||||
#define smScriptJust 8
|
||||
#define smScriptRedraw 10
|
||||
#define smScriptSysFond 12
|
||||
#define smScriptAppFond 14
|
||||
#define smScriptNumber 16
|
||||
#define smScriptDate 18
|
||||
#define smScriptSort 20
|
||||
#define smScriptRsvd1 22
|
||||
#define smScriptRsvd2 24
|
||||
#define smScriptRsvd3 26
|
||||
#define smScriptRsvd4 28
|
||||
#define smScriptRsvd5 30
|
||||
#define smScriptKeys 32
|
||||
#define smScriptIcon 34
|
||||
#define smScriptPrint 36
|
||||
#define smScriptTrap 38
|
||||
#define smScriptCreator 40
|
||||
#define smScriptFile 42
|
||||
#define smScriptName 44
|
||||
|
||||
#define smVersion 0
|
||||
#define smMunged 2
|
||||
#define smEnabled 4
|
||||
#define smBiDirect 6
|
||||
#define smFontForce 8
|
||||
#define smIntlForce 10
|
||||
#define smForced 12
|
||||
#define smDefault 14
|
||||
#define smPrint 16
|
||||
#define smSysScript 18
|
||||
#define smAppScript 20
|
||||
#define smKeyScript 22
|
||||
#define smSysRef 24
|
||||
#define smKeyCache 26
|
||||
#define smKeySwap 28
|
||||
|
||||
enum { smKCHRCache = 38 };
|
||||
|
||||
#define smVerbNotFound (-1)
|
||||
|
||||
#define smBreakWord 0
|
||||
#define smBreakChar 1
|
||||
#define smBreakOverflow 2
|
||||
|
||||
/* TruncText return codes */
|
||||
#define NotTruncated 0
|
||||
#define Truncated 1
|
||||
#define TruncErr (-1)
|
||||
|
||||
typedef uint8 StyledLineBreakCode;
|
||||
|
||||
typedef struct DateCacheRec
|
||||
{
|
||||
int16 hidden[256] PACKED;
|
||||
} DateCacheRec, *DateCachePtr;
|
||||
|
||||
typedef struct LongDateRec
|
||||
{
|
||||
int16 era PACKED;
|
||||
int16 year PACKED;
|
||||
int16 month PACKED;
|
||||
int16 day PACKED;
|
||||
int16 hour PACKED;
|
||||
int16 minute PACKED;
|
||||
int16 second PACKED;
|
||||
int16 dayOfWeek PACKED;
|
||||
int16 dayOfYear PACKED;
|
||||
int16 weekOfYear PACKED;
|
||||
int16 pm PACKED;
|
||||
int16 res1 PACKED;
|
||||
int16 res2 PACKED;
|
||||
int16 res3 PACKED;
|
||||
} LongDateRec, *LongDatePtr;
|
||||
|
||||
typedef INTEGER TruncCode;
|
||||
typedef int16 JustStyleCode;
|
||||
|
||||
typedef int8 CharByteTable[256];
|
||||
|
||||
typedef int16 ScriptRunStatus; /* Not sure this is correct, since in IM
|
||||
ScriptRunStatus is a record with two
|
||||
Signed Bytes */
|
||||
|
||||
typedef INTEGER FormatStatus;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Byte fLength PACKED;
|
||||
Byte fVersion PACKED;
|
||||
SignedByte data[253] PACKED;
|
||||
}
|
||||
NumFormatStringRec;
|
||||
|
||||
typedef union
|
||||
{
|
||||
CHAR a[2];
|
||||
INTEGER b;
|
||||
}
|
||||
WideChar;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
INTEGER size PACKED;
|
||||
WideChar data[10] PACKED;
|
||||
}
|
||||
WideCharArr;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
INTEGER version PACKED;
|
||||
WideChar data[31] PACKED;
|
||||
WideCharArr pePlus PACKED;
|
||||
WideCharArr peMinus PACKED;
|
||||
WideCharArr peMinusPlus PACKED;
|
||||
WideCharArr altNumTable PACKED;
|
||||
CHAR reserved[20] PACKED;
|
||||
}
|
||||
NumberParts;
|
||||
|
||||
typedef extended80 Extended80;
|
||||
|
||||
typedef short ToggleResults;
|
||||
|
||||
typedef unsigned char LongDateField;
|
||||
|
||||
typedef char DateDelta;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
long togFlags PACKED;
|
||||
ResType amChars PACKED;
|
||||
ResType pmChars PACKED;
|
||||
long reserved[4] PACKED;
|
||||
}
|
||||
TogglePB;
|
||||
|
||||
|
||||
enum { smSystemScript = -1 };
|
||||
|
||||
#if !defined (TESysJust)
|
||||
extern INTEGER TESysJust;
|
||||
#endif
|
||||
|
||||
extern pascal trap LONGINT C_VisibleLength (Ptr textp, LONGINT len);
|
||||
|
||||
extern pascal trap void C_LongDate2Secs (LongDateRec *ldatep,
|
||||
ULONGINT *secs_outp);
|
||||
|
||||
extern pascal trap void C_LongSecs2Date (ULONGINT *secs_inp,
|
||||
LongDateRec *ldatep);
|
||||
|
||||
extern pascal trap LONGINT C_GetEnvirons( INTEGER verb ); extern pascal trap LONGINT P_GetEnvirons( INTEGER verb);
|
||||
extern pascal trap OSErr C_SetEnvirons( INTEGER verb, LONGINT param ); extern pascal trap OSErr P_SetEnvirons( INTEGER verb, LONGINT param);
|
||||
extern pascal trap LONGINT C_GetScript( INTEGER script, INTEGER verb ); extern pascal trap LONGINT P_GetScript( INTEGER script, INTEGER verb);
|
||||
extern pascal trap OSErr C_SetScript( INTEGER script, INTEGER verb,
|
||||
LONGINT param ); extern pascal trap OSErr P_SetScript( INTEGER script, INTEGER verb,
|
||||
LONGINT param );
|
||||
extern pascal trap INTEGER C_Font2Script( INTEGER fontnum ); extern pascal trap INTEGER P_Font2Script( INTEGER fontnum);
|
||||
extern pascal trap INTEGER C_Transliterate( Handle srch, Handle dsth,
|
||||
INTEGER target, LONGINT srcmask ); extern pascal trap INTEGER P_Transliterate( Handle srch, Handle dsth,
|
||||
INTEGER target, LONGINT srcmask );
|
||||
extern pascal trap INTEGER C_FontScript( void ); extern pascal trap INTEGER P_FontScript( void );
|
||||
extern pascal trap INTEGER C_IntlScript( void ); extern pascal trap INTEGER P_IntlScript( void );
|
||||
extern pascal trap void C_KeyScript( INTEGER scriptcode ); extern pascal trap void P_KeyScript( INTEGER scriptcode);
|
||||
extern pascal trap INTEGER C_CharType( Ptr textbufp, INTEGER offset ); extern pascal trap INTEGER P_CharType( Ptr textbufp, INTEGER offset);
|
||||
extern pascal trap void C_MeasureJust( Ptr textbufp, INTEGER length,
|
||||
INTEGER slop, Ptr charlocs ); extern pascal trap void P_MeasureJust( Ptr textbufp, INTEGER length,
|
||||
INTEGER slop, Ptr charlocs );
|
||||
extern pascal trap INTEGER C_Pixel2Char( Ptr textbufp, INTEGER len,
|
||||
INTEGER slop, INTEGER pixwidth, BOOLEAN *leftsidep ); extern pascal trap INTEGER P_Pixel2Char( Ptr textbufp, INTEGER len,
|
||||
INTEGER slop, INTEGER pixwidth, BOOLEAN *leftsidep );
|
||||
extern pascal trap INTEGER C_Char2Pixel( Ptr textbufp, INTEGER len,
|
||||
INTEGER slop, INTEGER offset, SignedByte dir ); extern pascal trap INTEGER P_Char2Pixel( Ptr textbufp, INTEGER len,
|
||||
INTEGER slop, INTEGER offset, SignedByte dir );
|
||||
extern pascal trap void C_FindWord( Ptr textbufp, INTEGER length,
|
||||
INTEGER offset, BOOLEAN leftside, Ptr breaks, INTEGER *offsets ); extern pascal trap void P_FindWord( Ptr textbufp, INTEGER length,
|
||||
INTEGER offset, BOOLEAN leftside, Ptr breaks, INTEGER *offsets );
|
||||
extern pascal trap void C_HiliteText( Ptr textbufp, INTEGER firstoffset,
|
||||
INTEGER secondoffset, INTEGER *offsets ); extern pascal trap void P_HiliteText( Ptr textbufp, INTEGER firstoffset,
|
||||
INTEGER secondoffset, INTEGER *offsets );
|
||||
extern pascal trap void C_DrawJust( Ptr textbufp, INTEGER length,
|
||||
INTEGER slop ); extern pascal trap void P_DrawJust( Ptr textbufp, INTEGER length,
|
||||
INTEGER slop );
|
||||
extern pascal trap String2DateStatus C_String2Time( Ptr textp,
|
||||
LONGINT len, Ptr cachep, LONGINT *lenusedp, HIDDEN_Ptr *datetimep ); extern pascal trap String2DateStatus P_String2Time( Ptr textp,
|
||||
LONGINT len, Ptr cachep, LONGINT *lenusedp, HIDDEN_Ptr *datetimep );
|
||||
extern INTEGER GetSysFont( void );
|
||||
extern INTEGER GetAppFont( void );
|
||||
extern INTEGER GetMBarHeight( void );
|
||||
extern INTEGER GetSysJust( void );
|
||||
extern void SetSysJust( INTEGER just );
|
||||
extern pascal trap OSErr C_InitDateCache( DateCachePtr theCache ); extern pascal trap OSErr P_InitDateCache( DateCachePtr theCache);
|
||||
extern pascal trap INTEGER C_CharByte( Ptr textBuf, INTEGER textOffset ); extern pascal trap INTEGER P_CharByte( Ptr textBuf, INTEGER textOffset);
|
||||
|
||||
extern pascal trap String2DateStatus C_String2Date (Ptr text, int32 length,
|
||||
DateCachePtr cache,
|
||||
int32 *length_used_ret,
|
||||
LongDatePtr date_time);
|
||||
extern pascal trap StyledLineBreakCode C_StyledLineBreak (Ptr textp, int32 length,
|
||||
int32 text_start, int32 text_end,
|
||||
int32 flags,
|
||||
Fixed *text_width_fp,
|
||||
int32 *text_offset);
|
||||
|
||||
extern pascal trap void C_NMeasureJust (Ptr text, int32 length,
|
||||
Fixed slop, Ptr charLocs,
|
||||
JustStyleCode run_pos,
|
||||
Point numer, Point denom);
|
||||
|
||||
extern pascal trap Boolean C_ParseTable (CharByteTable table);
|
||||
extern pascal trap Boolean C_FillParseTable (CharByteTable table,
|
||||
ScriptCode script);
|
||||
|
||||
extern pascal trap INTEGER C_ReplaceText (Handle base_text, Handle subst_text,
|
||||
Str15 key);
|
||||
extern pascal trap INTEGER C_TruncString (INTEGER width, Str255 string,
|
||||
TruncCode code);
|
||||
|
||||
extern pascal trap FormatStatus C_StringToExtended
|
||||
(Str255 string, NumFormatStringRec *formatp,
|
||||
NumberParts *partsp, Extended80 *xp);
|
||||
|
||||
extern pascal trap FormatStatus C_ExtendedToString (Extended80 *xp,
|
||||
NumFormatStringRec *formatp, NumberParts *partsp, Str255 string);
|
||||
|
||||
extern pascal trap FormatStatus C_StringToFormatRec (Str255 in_string,
|
||||
NumberParts *partsp, NumFormatStringRec *out_string);
|
||||
|
||||
extern pascal trap ToggleResults C_ToggleDate (LongDateTime *lsecsp,
|
||||
LongDateField field, DateDelta delta, INTEGER ch, TogglePB *paramsp);
|
||||
|
||||
extern pascal trap Fixed C_PortionLine (
|
||||
Ptr textPtr,
|
||||
LONGINT textLen,
|
||||
JustStyleCode styleRunPosition,
|
||||
Point numer,
|
||||
Point denom);
|
||||
|
||||
extern pascal trap void C_DrawJustified (
|
||||
Ptr textPtr,
|
||||
LONGINT textLength,
|
||||
Fixed slop,
|
||||
JustStyleCode styleRunPosition,
|
||||
Point numer,
|
||||
Point denom);
|
||||
|
||||
extern pascal trap ScriptRunStatus C_FindScriptRun (
|
||||
Ptr textPtr,
|
||||
LONGINT textLen,
|
||||
LONGINT *lenUsedp);
|
||||
|
||||
extern pascal trap INTEGER C_PixelToChar (
|
||||
Ptr textBuf,
|
||||
LONGINT textLen,
|
||||
Fixed slop,
|
||||
Fixed pixelWidth,
|
||||
BOOLEAN *leadingEdgep,
|
||||
Fixed *widthRemainingp,
|
||||
JustStyleCode styleRunPosition,
|
||||
Point numer,
|
||||
Point denom);
|
||||
|
||||
extern pascal trap INTEGER C_CharToPixel (
|
||||
Ptr textBuf,
|
||||
LONGINT textLen,
|
||||
Fixed slop,
|
||||
LONGINT offset,
|
||||
INTEGER direction,
|
||||
JustStyleCode styleRunPosition,
|
||||
Point numer,
|
||||
Point denom);
|
||||
|
||||
extern pascal trap void C_LowercaseText (
|
||||
Ptr textp,
|
||||
INTEGER len,
|
||||
ScriptCode script);
|
||||
|
||||
extern pascal trap void C_UppercaseText (
|
||||
Ptr textp,
|
||||
INTEGER len,
|
||||
ScriptCode script);
|
||||
|
||||
extern pascal trap void C_StripDiacritics (
|
||||
Ptr textp,
|
||||
INTEGER len,
|
||||
ScriptCode script);
|
||||
|
||||
extern pascal trap void C_UppercaseStripDiacritics (
|
||||
Ptr textp,
|
||||
INTEGER len,
|
||||
ScriptCode script);
|
||||
|
||||
extern INTEGER C_CharacterByteType (Ptr textBuf, INTEGER textOffset,
|
||||
ScriptCode script);
|
||||
|
||||
extern INTEGER C_CharacterType (Ptr textbufp, INTEGER offset,
|
||||
ScriptCode script);
|
||||
|
||||
extern INTEGER C_TransliterateText (Handle srch, Handle dsth, INTEGER target,
|
||||
LONGINT srcmask, ScriptCode script);
|
||||
|
||||
#endif /* _SCRIPTMGR_H_ */
|
||||
63
src/include/SegmentLdr.h
Normal file
63
src/include/SegmentLdr.h
Normal file
@@ -0,0 +1,63 @@
|
||||
#if !defined (__SEGMENT__)
|
||||
#define __SEGMENT__
|
||||
|
||||
/*
|
||||
* Copyright 1989 - 1995 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: SegmentLdr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
|
||||
#include "rsys/noreturn.h"
|
||||
|
||||
extern _NORET_1_ pascal trap void C_ExitToShell( void ) _NORET_2_;
|
||||
|
||||
#if !defined (USE_WINDOWS_NOT_MAC_TYPEDEFS_AND_DEFINES)
|
||||
|
||||
#define appOpen 0
|
||||
#define appPrint 1
|
||||
|
||||
typedef struct {
|
||||
INTEGER vRefNum PACKED;
|
||||
OSType fType PACKED;
|
||||
INTEGER versNum PACKED;
|
||||
Str255 fName PACKED;
|
||||
} AppFile;
|
||||
|
||||
|
||||
#define hwParamErr (-502)
|
||||
|
||||
|
||||
#if !defined (AppParmHandle_H)
|
||||
extern HIDDEN_Handle AppParmHandle_H;
|
||||
extern Byte loadtrap;
|
||||
extern Byte FinderName[16];
|
||||
extern INTEGER CurApRefNum;
|
||||
extern Byte CurApName[34];
|
||||
extern INTEGER CurJTOffset;
|
||||
extern INTEGER CurPageOption;
|
||||
#endif
|
||||
|
||||
#define AppParmHandle (AppParmHandle_H.p)
|
||||
|
||||
extern void flushcache (void);
|
||||
|
||||
extern trap void HWPriv( LONGINT d0, LONGINT a0 );
|
||||
extern char *ROMlib_undotdot( char *origp );
|
||||
extern void CountAppFiles( INTEGER *messagep,
|
||||
INTEGER *countp );
|
||||
extern void GetAppFiles( INTEGER index, AppFile *filep );
|
||||
extern void ClrAppFiles( INTEGER index );
|
||||
extern pascal trap void C_GetAppParms( StringPtr namep,
|
||||
INTEGER *rnp, HIDDEN_Handle *aphandp ); extern pascal trap void P_GetAppParms( StringPtr namep,
|
||||
INTEGER *rnp, HIDDEN_Handle *aphandp );
|
||||
extern pascal trap void P_ExitToShell( void );
|
||||
extern pascal trap void Launch( StringPtr appl, INTEGER vrefnum );
|
||||
extern pascal trap void Chain( StringPtr appl, INTEGER vrefnum );
|
||||
extern pascal trap void C_UnloadSeg( Ptr addr ); extern pascal trap void P_UnloadSeg( Ptr addr);
|
||||
extern pascal trap void C_LoadSeg( INTEGER volatile segno ); extern pascal trap void P_LoadSeg( INTEGER volatile segno);
|
||||
extern pascal trap void C_UnloadSeg( Ptr addr ); extern pascal trap void P_UnloadSeg( Ptr addr);
|
||||
#endif
|
||||
|
||||
#endif /* __SEGMENT__ */
|
||||
130
src/include/Serial.h
Normal file
130
src/include/Serial.h
Normal file
@@ -0,0 +1,130 @@
|
||||
#if !defined (__SERIAL__)
|
||||
#define __SERIAL__
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: Serial.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#if defined (USE_WINDOWS_NOT_MAC_TYPEDEFS_AND_DEFINES)
|
||||
#define __Byte uint8
|
||||
#define __SignedByte int8
|
||||
#define __OSErr int32
|
||||
#define __Ptr void *
|
||||
#else
|
||||
#define __Byte Byte
|
||||
#define __SignedByte SignedByte
|
||||
#define __OSErr OSErr
|
||||
#define __Ptr Ptr
|
||||
#endif
|
||||
|
||||
#define baud300 380
|
||||
#define baud600 189
|
||||
#define baud1200 94
|
||||
#define baud1800 62
|
||||
#define baud2400 46
|
||||
#define baud3600 30
|
||||
#define baud4800 22
|
||||
#define baud7200 14
|
||||
#define baud9600 10
|
||||
#define baud19200 4
|
||||
#define baud57600 0
|
||||
|
||||
#define stop10 16384
|
||||
#define stop15 (-32768)
|
||||
#define stop20 (-16384)
|
||||
|
||||
#define noParity 0
|
||||
#define oddParity 4096
|
||||
#define evenParity 12288
|
||||
|
||||
#define data5 0
|
||||
#define data6 2048
|
||||
#define data7 1024
|
||||
#define data8 3072
|
||||
|
||||
#define swOverrunErr 1
|
||||
#define parityErr 16
|
||||
#define hwOverrunErr 32
|
||||
#define framingErr 64
|
||||
|
||||
#define ctsEvent 32
|
||||
#define breakEvent 128
|
||||
|
||||
#define xOffWasSent 0x80
|
||||
|
||||
#if !defined (BINCOMPAT)
|
||||
|
||||
typedef enum { sPortA, sPortB } SPortSel;
|
||||
|
||||
#else /* BINCOMPAT */
|
||||
|
||||
typedef __SignedByte SPortSel;
|
||||
#define sPortA 0
|
||||
#define sPortB 1
|
||||
|
||||
#endif /* BINCOMPAT */
|
||||
|
||||
typedef struct {
|
||||
__Byte fXOn PACKED;
|
||||
__Byte fCTS PACKED;
|
||||
__Byte xOn PACKED;
|
||||
__Byte xOff PACKED;
|
||||
__Byte errs PACKED;
|
||||
__Byte evts PACKED;
|
||||
__Byte fInX PACKED;
|
||||
__Byte null PACKED;
|
||||
} SerShk;
|
||||
|
||||
typedef struct {
|
||||
__Byte cumErrs PACKED;
|
||||
__Byte xOffSent PACKED;
|
||||
__Byte rdPend PACKED;
|
||||
__Byte wrPend PACKED;
|
||||
__Byte ctsHold PACKED;
|
||||
__Byte xOffHold PACKED;
|
||||
} SerStaRec;
|
||||
|
||||
#define MODEMINAME ".AIn"
|
||||
#define MODEMONAME ".AOut"
|
||||
#define PRNTRINAME ".AIn"
|
||||
#define PRNTRONAME ".AOut"
|
||||
#define MODEMIRNUM (-6)
|
||||
#define MODEMORNUM (-7)
|
||||
#define PRNTRIRNUM (-8)
|
||||
#define PRNTRORNUM (-9)
|
||||
|
||||
|
||||
/* DO NOT DELETE THIS LINE */
|
||||
#if !defined (__STDC__)
|
||||
extern __OSErr RAMSDOpen();
|
||||
extern void RAMSDClose();
|
||||
extern __OSErr SerReset();
|
||||
extern __OSErr SerSetBuf();
|
||||
extern __OSErr SerHShake();
|
||||
extern __OSErr SerSetBrk();
|
||||
extern __OSErr SerClrBrk();
|
||||
extern __OSErr SerGetBuf();
|
||||
extern __OSErr SerStatus();
|
||||
#else /* __STDC__ */
|
||||
extern __OSErr RAMSDOpen( SPortSel port );
|
||||
extern void RAMSDClose( SPortSel port );
|
||||
extern __OSErr SerReset( INTEGER rn, INTEGER config );
|
||||
extern __OSErr SerSetBuf( INTEGER rn, __Ptr p, INTEGER len );
|
||||
extern __OSErr SerHShake( INTEGER rn, SerShk flags );
|
||||
extern __OSErr SerSetBrk( INTEGER rn );
|
||||
extern __OSErr SerClrBrk( INTEGER rn );
|
||||
extern __OSErr SerGetBuf( INTEGER rn, LONGINT *lp );
|
||||
extern __OSErr SerStatus( INTEGER rn, SerStaRec *serstap );
|
||||
#endif /* __STDC__ */
|
||||
|
||||
#if defined (USE_WINDOWS_NOT_MAC_TYPEDEFS_AND_DEFINES)
|
||||
#undef __Byte
|
||||
#undef __SignedByte
|
||||
#undef __OSErr
|
||||
#undef __Ptr
|
||||
#endif
|
||||
|
||||
#endif /* __SERIAL__ */
|
||||
15
src/include/ShutDown.h
Normal file
15
src/include/ShutDown.h
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
/* shutdown manager define/routines */
|
||||
|
||||
#define sdOnPowerOff 1
|
||||
#define sdOnRestart 2
|
||||
#define sdOnUnmount 4
|
||||
#define sdOnDrivers 8
|
||||
#define sdOnRestartOrPower (sdOnPowerOff + sdOnRestart)
|
||||
|
||||
extern pascal trap void C_ShutDwnPower (void);
|
||||
extern pascal trap void C_ShutDwnStart (void);
|
||||
extern pascal trap void C_ShutDwnInstall (ProcPtr shutdown_proc,
|
||||
int16 flags);
|
||||
extern pascal trap void C_ShutDwnRemove (ProcPtr shutdown_proc);
|
||||
|
||||
80
src/include/SoundDvr.h
Normal file
80
src/include/SoundDvr.h
Normal file
@@ -0,0 +1,80 @@
|
||||
#if !defined (__SOUND__)
|
||||
#define __SOUND__
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: SoundDvr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
|
||||
#define swMode (-1)
|
||||
#define ftMode 1
|
||||
#define ffMode 0
|
||||
|
||||
typedef Byte FreeWave[30001];
|
||||
typedef struct {
|
||||
INTEGER mode PACKED;
|
||||
Fixed fcount PACKED;
|
||||
FreeWave waveBytes PACKED;
|
||||
} FFSynthRec;
|
||||
typedef FFSynthRec *FFSynthPtr;
|
||||
|
||||
typedef struct {
|
||||
INTEGER tcount PACKED;
|
||||
INTEGER amplitude PACKED;
|
||||
INTEGER tduration PACKED;
|
||||
} Tone;
|
||||
typedef Tone Tones[5001];
|
||||
|
||||
typedef struct {
|
||||
INTEGER mode PACKED;
|
||||
Tones triplets PACKED;
|
||||
} SWSynthRec;
|
||||
typedef SWSynthRec *SWSynthPtr;
|
||||
|
||||
#if 1|| !defined(__alpha)
|
||||
typedef Byte Wave[256];
|
||||
#else /* defined(__alpha) */
|
||||
typedef Byte Wave;
|
||||
#warning improper Wave typedef
|
||||
#endif /* defined(__alpha) */
|
||||
|
||||
typedef Wave *WavePtr;
|
||||
|
||||
typedef struct {
|
||||
INTEGER fduration PACKED;
|
||||
Fixed sound1Rate PACKED;
|
||||
LONGINT sound1Phase PACKED;
|
||||
Fixed sound2Rate PACKED;
|
||||
LONGINT sound2Phase PACKED;
|
||||
Fixed sound3Rate PACKED;
|
||||
LONGINT sound3Phase PACKED;
|
||||
Fixed sound4Rate PACKED;
|
||||
LONGINT sound4Phase PACKED;
|
||||
WavePtr sound1Wave PACKED_P;
|
||||
WavePtr sound2Wave PACKED_P;
|
||||
WavePtr sound3Wave PACKED_P;
|
||||
WavePtr sound4Wave PACKED_P;
|
||||
} FTSoundRec;
|
||||
typedef FTSoundRec *FTSndRecPtr;
|
||||
typedef struct { FTSndRecPtr p PACKED_P; } HIDDEN_FTSndRecPtr;
|
||||
|
||||
typedef struct {
|
||||
INTEGER mode PACKED;
|
||||
FTSndRecPtr sndRec PACKED_P;
|
||||
} FTSynthRec;
|
||||
typedef FTSynthRec *FTsynthPtr;
|
||||
|
||||
|
||||
#if !defined (SoundBase_H)
|
||||
extern HIDDEN_Ptr SoundBase_H;
|
||||
extern Byte SdVolume;
|
||||
extern Byte SoundActive;
|
||||
extern INTEGER CurPitch;
|
||||
#endif
|
||||
|
||||
#define SoundBase (SoundBase_H.p)
|
||||
|
||||
#endif /* __SOUND__ */
|
||||
367
src/include/SoundMgr.h
Normal file
367
src/include/SoundMgr.h
Normal file
@@ -0,0 +1,367 @@
|
||||
#if !defined (__SOUNDMGR__)
|
||||
#define __SOUNDMGR__
|
||||
|
||||
/*
|
||||
* Copyright 1992 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: SoundMgr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#include "QuickDraw.h"
|
||||
|
||||
typedef struct {
|
||||
INTEGER cmd PACKED;
|
||||
INTEGER param1 PACKED;
|
||||
LONGINT param2 PACKED;
|
||||
} SndCommand;
|
||||
|
||||
#define stdQLength 128
|
||||
|
||||
enum
|
||||
{
|
||||
stdSH = 0, /* standard sound header */
|
||||
cmpSH = 0xFE, /* compressed sound header */
|
||||
extSH = 0xFF, /* extended sound header */
|
||||
};
|
||||
|
||||
typedef struct _SndChannel {
|
||||
struct _SndChannel *nextChan PACKED_P;
|
||||
Ptr firstMod PACKED_P;
|
||||
ProcPtr callBack PACKED_P;
|
||||
LONGINT userInfo PACKED;
|
||||
LONGINT wait PACKED;
|
||||
SndCommand cmdInProg PACKED;
|
||||
INTEGER flags PACKED;
|
||||
INTEGER qLength PACKED;
|
||||
INTEGER qHead PACKED;
|
||||
INTEGER qTail PACKED;
|
||||
SndCommand queue[stdQLength] PACKED;
|
||||
} SndChannel, *SndChannelPtr;
|
||||
|
||||
#define SND_CHAN_FLAGS_X(c) (c->flags)
|
||||
#define SND_CHAN_FLAGS(c) (CW (SND_CHAN_FLAGS_X (c)))
|
||||
|
||||
typedef struct { SndChannelPtr p PACKED_P; } HIDDEN_SndChannelPtr;
|
||||
|
||||
enum {
|
||||
nullCmd,
|
||||
initCmd,
|
||||
freeCmd,
|
||||
quietCmd,
|
||||
flushCmd,
|
||||
waitCmd = 10,
|
||||
pauseCmd,
|
||||
resumeCmd,
|
||||
callBackCmd,
|
||||
syncCmd,
|
||||
emptyCmd,
|
||||
tickleCmd = 20,
|
||||
requestNextCmd,
|
||||
howOftenCmd,
|
||||
wakeUpCmd,
|
||||
availableCmd,
|
||||
noteCmd = 40,
|
||||
restCmd,
|
||||
freqCmd,
|
||||
ampCmd,
|
||||
timbreCmd,
|
||||
waveTableCmd = 60,
|
||||
phaseCmd,
|
||||
soundCmd = 80,
|
||||
bufferCmd,
|
||||
rateCmd,
|
||||
midiDataCmd = 100,
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
LONGINT offset PACKED;
|
||||
LONGINT nsamples PACKED;
|
||||
LONGINT rate PACKED;
|
||||
LONGINT altbegin PACKED;
|
||||
LONGINT altend PACKED;
|
||||
INTEGER basenote PACKED;
|
||||
unsigned char buf[1] PACKED;
|
||||
} soundbuffer_t;
|
||||
|
||||
typedef struct _SoundHeader {
|
||||
Ptr samplePtr PACKED_P;
|
||||
LONGINT length PACKED;
|
||||
Fixed sampleRate PACKED;
|
||||
LONGINT loopStart PACKED;
|
||||
LONGINT loopEnd PACKED;
|
||||
Byte encode PACKED;
|
||||
Byte baseFrequency PACKED;
|
||||
Byte sampleArea[0] PACKED;
|
||||
} SoundHeader, *SoundHeaderPtr;
|
||||
|
||||
typedef struct _ExtSoundHeader {
|
||||
Ptr samplePtr PACKED_P;
|
||||
LONGINT numChannels PACKED;
|
||||
Fixed sampleRate PACKED;
|
||||
LONGINT loopStart PACKED;
|
||||
LONGINT loopEnd PACKED;
|
||||
Byte encode PACKED;
|
||||
Byte baseFrequency PACKED;
|
||||
LONGINT numFrames PACKED;
|
||||
Extended AIFFSampleRate PACKED; /* ??? should be Extended80 */
|
||||
Ptr MarkerChunk PACKED;
|
||||
Ptr instrumentChunks PACKED;
|
||||
Ptr AESRecording PACKED;
|
||||
INTEGER sampleSize PACKED;
|
||||
INTEGER futureUse1 PACKED;
|
||||
LONGINT futureUse2 PACKED;
|
||||
LONGINT futureUse3 PACKED;
|
||||
LONGINT futureUse4 PACKED;
|
||||
Byte sampleArea[0] PACKED;
|
||||
} ExtSoundHeader, *ExtSoundHeaderPtr;
|
||||
|
||||
enum {
|
||||
noteSynth = 1,
|
||||
waveTableSynth = 3,
|
||||
sampledSynth = 5,
|
||||
MIDISynthIn = 7,
|
||||
MIDISynthOut = 9,
|
||||
};
|
||||
|
||||
#define badChannel (-205)
|
||||
#define badFormat (-206)
|
||||
#define noHardware (-200)
|
||||
#define notEnoughHardware (-201)
|
||||
#define queueFull (-203)
|
||||
#define resProblem (-204)
|
||||
|
||||
#if !defined (SoundActive)
|
||||
extern Byte SoundActive;
|
||||
#endif
|
||||
|
||||
enum {
|
||||
soundactiveoff = 0,
|
||||
soundactive5 = 5,
|
||||
soundactiveinplay = 0x81,
|
||||
soundactivenone = 0xFF,
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
LONGINT dbNumFrames PACKED;
|
||||
LONGINT dbFlags PACKED;
|
||||
LONGINT dbUserInfo[2] PACKED;
|
||||
Byte dbSoundData[0] PACKED;
|
||||
} SndDoubleBuffer, *SndDoubleBufferPtr;
|
||||
|
||||
enum {
|
||||
dbBufferReady = 1,
|
||||
dbLastBuffer = 4
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
INTEGER dbhNumChannels PACKED;
|
||||
INTEGER dbhSampleSize PACKED;
|
||||
INTEGER dbhCompressionID PACKED;
|
||||
INTEGER dbhPacketSize PACKED;
|
||||
Fixed dbhSampleRate PACKED;
|
||||
SndDoubleBufferPtr dbhBufferPtr[2] PACKED;
|
||||
ProcPtr dbhDoubleBack PACKED;
|
||||
} SndDoubleBufferHeader, *SndDoubleBufferHeaderPtr;
|
||||
|
||||
typedef struct _SCSTATUS {
|
||||
Fixed scStartTime PACKED;
|
||||
Fixed scEndTime PACKED;
|
||||
Fixed scCurrentTime PACKED;
|
||||
Boolean scChannelBusy PACKED;
|
||||
Boolean scChannelDisposed PACKED;
|
||||
Boolean scChannelPaused PACKED;
|
||||
Boolean scUnused PACKED;
|
||||
LONGINT scChannelAttributes PACKED;
|
||||
LONGINT scCPULoad PACKED;
|
||||
} SCStatus, *SCStatusPtr;
|
||||
|
||||
#if 1 /* stub definitions */
|
||||
typedef void *SMStatusPtr;
|
||||
typedef LONGINT NumVersion;
|
||||
typedef void *AudioSelectionPtr;
|
||||
typedef void *SPBPtr;
|
||||
#endif
|
||||
|
||||
typedef unsigned long UnsignedFixed;
|
||||
typedef Ptr CompressionInfoPtr;
|
||||
|
||||
extern trap void C_SndGetSysBeepState(INTEGER *statep);
|
||||
|
||||
extern trap OSErr C_SndSetSysBeepState(INTEGER state);
|
||||
|
||||
|
||||
extern trap OSErr C_SndChannelStatus(SndChannelPtr chanp, INTEGER length,
|
||||
SCStatusPtr statusp);
|
||||
|
||||
extern trap OSErr C_SndManagerStatus(INTEGER length, SMStatusPtr statusp);
|
||||
|
||||
extern trap NumVersion C_SndSoundManagerVersion( void );
|
||||
|
||||
extern trap NumVersion C_MACEVersion( void );
|
||||
|
||||
extern trap NumVersion C_SPBVersion( void );
|
||||
|
||||
extern trap OSErr C_SndStartFilePlay(SndChannelPtr chanp,
|
||||
INTEGER refnum, INTEGER resnum, LONGINT buffersize, Ptr bufferp,
|
||||
AudioSelectionPtr theselectionp, ProcPtr completionp, BOOLEAN async);
|
||||
|
||||
extern trap OSErr C_SndPauseFilePlay(SndChannelPtr chanp);
|
||||
|
||||
extern trap OSErr C_SndStopFilePlay(SndChannelPtr chanp, BOOLEAN async);
|
||||
|
||||
|
||||
extern trap OSErr C_SndPlayDoubleBuffer(SndChannelPtr chanp,
|
||||
SndDoubleBufferHeaderPtr paramp);
|
||||
|
||||
|
||||
extern trap void C_Comp3to1(Ptr inp, Ptr outp, LONGINT cnt,
|
||||
Ptr instatep, Ptr outstatep, LONGINT numchannels, LONGINT whichchannel);
|
||||
|
||||
extern trap void C_Comp6to1(Ptr inp, Ptr outp, LONGINT cnt,
|
||||
Ptr instatep, Ptr outstatep, LONGINT numchannels, LONGINT whichchannel);
|
||||
|
||||
extern trap void C_Exp1to3(Ptr inp, Ptr outp, LONGINT cnt, Ptr instatep,
|
||||
Ptr outstatep, LONGINT numchannels, LONGINT whichchannel);
|
||||
|
||||
extern trap void C_Exp1to6(Ptr inp, Ptr outp, LONGINT cnt, Ptr instatep,
|
||||
Ptr outstatep, LONGINT numchannels, LONGINT whichchannel);
|
||||
|
||||
|
||||
extern trap OSErr C_SndRecord(ProcPtr filterp, Point corner,
|
||||
OSType quality, Handle *sndhandlep);
|
||||
|
||||
extern trap OSErr C_SndRecordToFile(ProcPtr filterp, Point corner,
|
||||
OSType quality, INTEGER refnum);
|
||||
|
||||
|
||||
extern trap OSErr C_SPBOpenDevice(Str255 name, INTEGER permission,
|
||||
LONGINT *inrefnump);
|
||||
|
||||
extern trap OSErr C_SPBCloseDevice(LONGINT inrefnum);
|
||||
|
||||
extern trap OSErr C_SPBRecord(SPBPtr inparamp, BOOLEAN async);
|
||||
|
||||
extern trap OSErr C_SPBRecordToFile(INTEGER refnum, SPBPtr inparamp,
|
||||
BOOLEAN async);
|
||||
|
||||
extern trap OSErr C_SPBPauseRecording(LONGINT refnum);
|
||||
|
||||
extern trap OSErr C_SPBResumeRecording(LONGINT refnum);
|
||||
|
||||
extern trap OSErr C_SPBStopRecording(LONGINT refnum);
|
||||
|
||||
extern trap OSErr C_SPBGetRecordingStatus(LONGINT refnum,
|
||||
INTEGER *recordingstatus, INTEGER *meterlevel,
|
||||
LONGINT *totalsampstorecord, LONGINT *numsampsrecorded,
|
||||
LONGINT *totalmsecstorecord, LONGINT *numbermsecsrecorded);
|
||||
|
||||
|
||||
extern trap OSErr C_SPBGetDeviceInfo(LONGINT refnum, OSType info,
|
||||
Ptr infop);
|
||||
|
||||
extern trap OSErr C_SPBSetDeviceInfo(LONGINT refnum, OSType info,
|
||||
Ptr infop);
|
||||
|
||||
|
||||
extern trap OSErr C_SetupSndHeader(Handle sndhandle, INTEGER numchannels,
|
||||
Fixed rate, INTEGER size, OSType compresion, INTEGER basefreq,
|
||||
LONGINT numbytes, INTEGER *headerlenp);
|
||||
|
||||
extern trap OSErr C_SetupAIFFHeader(INTEGER refnum, INTEGER numchannels,
|
||||
Fixed samplerate, INTEGER samplesize, OSType compression,
|
||||
LONGINT numbytes, LONGINT numframes);
|
||||
|
||||
extern trap OSErr C_SPBSignInDevice(INTEGER refnum, Str255 name);
|
||||
|
||||
extern trap OSErr C_SPBSignOutDevice(INTEGER refnum);
|
||||
|
||||
extern trap OSErr C_SPBGetIndexedDevice(INTEGER count, Str255 name,
|
||||
Handle *deviceiconhandlep);
|
||||
|
||||
extern trap OSErr C_SPBMillisecondsToBytes(LONGINT refnum,
|
||||
LONGINT *millip);
|
||||
|
||||
extern trap OSErr C_SPBBytesToMilliseconds(LONGINT refnum,
|
||||
LONGINT *bytecountp);
|
||||
|
||||
extern trap OSErr C_GetSysBeepVolume (LONGINT *levelp);
|
||||
|
||||
extern trap OSErr C_SetSysBeepVolume (LONGINT level);
|
||||
|
||||
extern trap OSErr C_GetDefaultOutputVolume (LONGINT *levelp);
|
||||
|
||||
extern trap OSErr C_SetDefaultOutputVolume (LONGINT level);
|
||||
|
||||
extern trap OSErr C_GetSoundHeaderOffset (Handle sndHandle, LONGINT *offset);
|
||||
|
||||
extern trap UnsignedFixed C_UnsignedFixedMulDiv (UnsignedFixed value,
|
||||
UnsignedFixed multiplier,
|
||||
UnsignedFixed divisor);
|
||||
|
||||
extern trap OSErr C_GetCompressionInfo (INTEGER compressionID, OSType format,
|
||||
INTEGER numChannels,
|
||||
INTEGER sampleSize,
|
||||
CompressionInfoPtr cp);
|
||||
|
||||
extern trap OSErr C_SetSoundPreference (OSType theType, Str255 name,
|
||||
Handle settings);
|
||||
|
||||
extern trap OSErr C_GetSoundPreference (OSType theType, Str255 name,
|
||||
Handle settings);
|
||||
|
||||
extern trap OSErr C_SndGetInfo (SndChannelPtr chan, OSType selector,
|
||||
void * infoPtr);
|
||||
|
||||
extern trap OSErr C_SndSetInfo (SndChannelPtr chan, OSType selector,
|
||||
void *infoPtr);
|
||||
|
||||
|
||||
/* DO NOT DELETE THIS LINE */
|
||||
#if !defined (__STDC__)
|
||||
extern void StartSound();
|
||||
extern void StopSound();
|
||||
extern BOOLEAN SoundDone();
|
||||
extern void GetSoundVol();
|
||||
extern void SetSoundVol();
|
||||
extern pascal trap OSErr SndPlay();
|
||||
extern pascal trap OSErr SndNewChannel();
|
||||
extern pascal trap OSErr SndAddModifier();
|
||||
extern pascal trap OSErr SndDoCommand();
|
||||
extern pascal trap OSErr SndDoImmediate();
|
||||
extern pascal trap OSErr SndControl();
|
||||
extern pascal trap OSErr SndDisposeChannel();
|
||||
#else /* __STDC__ */
|
||||
extern void StartSound( Ptr srec, LONGINT nb, ProcPtr comp );
|
||||
extern void StopSound( void );
|
||||
extern BOOLEAN SoundDone( void );
|
||||
extern void GetSoundVol( INTEGER *volp );
|
||||
extern void SetSoundVol( INTEGER vol );
|
||||
extern trap OSErr C_SndPlay( SndChannelPtr chanp, Handle sndh,
|
||||
BOOLEAN async ); extern pascal trap OSErr P_SndPlay( SndChannelPtr chanp, Handle sndh,
|
||||
BOOLEAN async );
|
||||
extern trap OSErr C_SndNewChannel( HIDDEN_SndChannelPtr *chanpp,
|
||||
INTEGER synth, LONGINT init, ProcPtr userroutinep ); extern pascal trap OSErr P_SndNewChannel( HIDDEN_SndChannelPtr *chanpp,
|
||||
INTEGER synth, LONGINT init, ProcPtr userroutinep );
|
||||
extern trap OSErr C_SndAddModifier( SndChannelPtr chanp,
|
||||
ProcPtr mod, INTEGER id, LONGINT init ); extern pascal trap OSErr P_SndAddModifier( SndChannelPtr chanp,
|
||||
ProcPtr mod, INTEGER id, LONGINT init );
|
||||
extern trap OSErr C_SndDoCommand( SndChannelPtr chanp,
|
||||
SndCommand *cmdp, BOOLEAN nowait ); extern pascal trap OSErr P_SndDoCommand( SndChannelPtr chanp,
|
||||
SndCommand *cmdp, BOOLEAN nowait );
|
||||
extern trap OSErr C_SndDoImmediate( SndChannelPtr chanp,
|
||||
SndCommand *cmdp ); extern pascal trap OSErr P_SndDoImmediate( SndChannelPtr chanp,
|
||||
SndCommand *cmdp );
|
||||
extern trap OSErr C_SndControl( INTEGER id, SndCommand *cmdp ); extern pascal trap OSErr P_SndControl( INTEGER id, SndCommand *cmdp);
|
||||
extern trap OSErr C_SndDisposeChannel( SndChannelPtr chanp,
|
||||
BOOLEAN quitnow ); extern pascal trap OSErr P_SndDisposeChannel( SndChannelPtr chanp,
|
||||
BOOLEAN quitnow );
|
||||
extern void C_FinaleUnknown1( void );
|
||||
extern OSErr C_FinaleUnknown2( ResType, LONGINT, Ptr, Ptr);
|
||||
extern long C_DirectorUnknown3 (void);
|
||||
extern INTEGER C_DirectorUnknown4 (ResType, INTEGER, Ptr, Ptr);
|
||||
|
||||
#endif /* __STDC__ */
|
||||
#endif /* __SOUNDMGR__ */
|
||||
41
src/include/StartMgr.h
Normal file
41
src/include/StartMgr.h
Normal file
@@ -0,0 +1,41 @@
|
||||
#if !defined (__STARTMGR__)
|
||||
#define __STARTMGR__
|
||||
|
||||
/*
|
||||
* Copyright 1994 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: StartMgr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
|
||||
typedef union {
|
||||
struct {
|
||||
SignedByte sdExtDevID;
|
||||
SignedByte sdPartition;
|
||||
SignedByte sdSlotNum;
|
||||
SignedByte sdSRsrcID;
|
||||
} slotDev;
|
||||
struct {
|
||||
SignedByte sdReserved1;
|
||||
SignedByte sdReserved2;
|
||||
INTEGER sdRefNum;
|
||||
} scsiDev;
|
||||
} DefStartRec, *DefStartPtr;
|
||||
|
||||
typedef struct {
|
||||
SignedByte sdSlot;
|
||||
SignedByte sdSResource;
|
||||
} DefVideoRec, *DefVideoPtr;
|
||||
|
||||
typedef struct {
|
||||
SignedByte sdReserved;
|
||||
SignedByte sdOSType;
|
||||
} DefOSRec, *DefOSPtr;
|
||||
|
||||
|
||||
#if !defined (CPUFlag)
|
||||
extern Byte CPUFlag;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
154
src/include/StdFilePkg.h
Normal file
154
src/include/StdFilePkg.h
Normal file
@@ -0,0 +1,154 @@
|
||||
#if !defined (__STDFILE__)
|
||||
#define __STDFILE__
|
||||
|
||||
#include "DialogMgr.h"
|
||||
#include "FileMgr.h"
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990, 1995 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: StdFilePkg.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#define putDlgID (-3999)
|
||||
|
||||
#define putSave 1
|
||||
#define putCancel 2
|
||||
#define putEject 5
|
||||
#define putDrive 6
|
||||
#define putName 7
|
||||
|
||||
#define getDlgID (-4000)
|
||||
|
||||
#define getOpen 1
|
||||
#define getCancel 3
|
||||
#define getEject 5
|
||||
#define getDrive 6
|
||||
#define getNmList 7
|
||||
#define getScroll 8
|
||||
|
||||
typedef struct {
|
||||
BOOLEAN good PACKED;
|
||||
BOOLEAN copy PACKED;
|
||||
OSType fType PACKED;
|
||||
INTEGER vRefNum PACKED;
|
||||
INTEGER version PACKED;
|
||||
Str63 fName PACKED;
|
||||
} SFReply;
|
||||
|
||||
typedef OSType SFTypeList[4];
|
||||
|
||||
#if !defined (SFSaveDisk)
|
||||
extern INTEGER SFSaveDisk;
|
||||
extern LONGINT CurDirStore;
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
BOOLEAN sfGood PACKED;
|
||||
BOOLEAN sfReplacing PACKED;
|
||||
OSType sfType PACKED;
|
||||
FSSpec sfFile PACKED;
|
||||
ScriptCode sfScript PACKED;
|
||||
INTEGER sfFlags PACKED;
|
||||
BOOLEAN sfIsFolder PACKED;
|
||||
BOOLEAN sfIsVolume PACKED;
|
||||
LONGINT sfReserved1 PACKED;
|
||||
INTEGER sfReserved2 PACKED;
|
||||
} StandardFileReply;
|
||||
|
||||
typedef ProcPtr FileFilterYDProcPtr;
|
||||
typedef ProcPtr DlgHookYDProcPtr;
|
||||
typedef ProcPtr ModalFilterYDProcPtr;
|
||||
typedef ProcPtr ActivateYDProcPtr;
|
||||
|
||||
enum
|
||||
{
|
||||
sfItemOpenButton = 1,
|
||||
sfItemCancelButton = 2,
|
||||
sfItemBalloonHelp = 3,
|
||||
sfItemVolumeUser = 4,
|
||||
sfItemEjectButton = 5,
|
||||
sfItemDesktopButton = 6,
|
||||
sfItemFileListUser = 7,
|
||||
sfItemPopUpMenuUser = 8,
|
||||
sfItemDividerLinePict = 9,
|
||||
|
||||
sfItemFileNameTextEdit = 10, /* Put only */
|
||||
sfItemPromptStaticText = 11,
|
||||
sfItemNewFolderUser = 12,
|
||||
};
|
||||
|
||||
enum { sfPutDialogID = -6043, sfGetDialogID = -6042 };
|
||||
|
||||
#if !defined (UNIV)
|
||||
#define UNIV
|
||||
#endif
|
||||
|
||||
#if !defined (__STDC__)
|
||||
|
||||
extern pascal void ROMlib_filebox();
|
||||
extern void SFPPutFile();
|
||||
extern void SFPutFile();
|
||||
extern void SFPGetFile();
|
||||
extern void SFGetFile();
|
||||
|
||||
#else /* __STDC__ */
|
||||
|
||||
extern pascal void C_ROMlib_filebox( DialogPeek dp, INTEGER which );
|
||||
extern pascal void P_ROMlib_filebox( DialogPeek dp, INTEGER which );
|
||||
|
||||
extern pascal trap void C_SFPPutFile( Point p, StringPtr prompt,
|
||||
StringPtr name, ProcPtr dh, SFReply *rep, INTEGER dig, ProcPtr fp );
|
||||
extern pascal trap void P_SFPPutFile( Point p, StringPtr prompt,
|
||||
StringPtr name, ProcPtr dh, SFReply *rep, INTEGER dig, ProcPtr fp );
|
||||
|
||||
extern pascal trap void C_SFPutFile( Point p, StringPtr prompt, StringPtr name,
|
||||
ProcPtr dh, SFReply *rep );
|
||||
extern pascal trap void P_SFPutFile( Point p, StringPtr prompt, StringPtr name,
|
||||
ProcPtr dh, SFReply *rep );
|
||||
|
||||
extern pascal trap void C_SFPGetFile( Point p, StringPtr prompt, ProcPtr filef,
|
||||
INTEGER numt, SFTypeList tl, ProcPtr dh, SFReply *rep,
|
||||
INTEGER dig, ProcPtr fp );
|
||||
extern pascal trap void P_SFPGetFile( Point p, StringPtr prompt, ProcPtr filef,
|
||||
INTEGER numt, SFTypeList tl, ProcPtr dh, SFReply *rep,
|
||||
INTEGER dig, ProcPtr fp );
|
||||
|
||||
extern pascal trap void C_SFGetFile( Point p, StringPtr prompt, ProcPtr filef,
|
||||
INTEGER numt, SFTypeList tl, ProcPtr dh, SFReply *rep );
|
||||
extern pascal trap void P_SFGetFile( Point p, StringPtr prompt, ProcPtr filef,
|
||||
INTEGER numt, SFTypeList tl, ProcPtr dh, SFReply *rep );
|
||||
|
||||
extern pascal trap void C_StandardGetFile (ProcPtr filef, INTEGER numt,
|
||||
SFTypeList tl,
|
||||
StandardFileReply *replyp);
|
||||
|
||||
extern pascal trap void C_StandardPutFile (Str255 prompt, Str255 defaultname,
|
||||
StandardFileReply *replyp);
|
||||
|
||||
extern pascal trap void C_CustomPutFile (Str255 prompt, Str255 defaultName,
|
||||
StandardFileReply *replyp,
|
||||
INTEGER dlgid, Point where,
|
||||
DlgHookYDProcPtr dlghook,
|
||||
ModalFilterYDProcPtr filterproc,
|
||||
Ptr activeList,
|
||||
ActivateYDProcPtr activateproc,
|
||||
UNIV Ptr yourdatap);
|
||||
|
||||
extern pascal trap void C_CustomGetFile (FileFilterYDProcPtr filefilter,
|
||||
INTEGER numtypes,
|
||||
SFTypeList typelist,
|
||||
StandardFileReply *replyp,
|
||||
INTEGER dlgid, Point where,
|
||||
DlgHookYDProcPtr dlghook,
|
||||
ModalFilterYDProcPtr filterproc,
|
||||
Ptr activeList,
|
||||
ActivateYDProcPtr activateproc,
|
||||
UNIV Ptr yourdatap);
|
||||
|
||||
#endif /* __STDC__ */
|
||||
|
||||
|
||||
#endif /* __STDFILE__ */
|
||||
26
src/include/SysErr.h
Normal file
26
src/include/SysErr.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#if !defined (_SYSERR_H_)
|
||||
#define _SYSERR_H_
|
||||
|
||||
/*
|
||||
* Copyright 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: SysErr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
typedef enum { EXIST_YES = 0, EXIST_NO = 0xFF } exist_enum_t;
|
||||
|
||||
#if !defined (DSAlertTab_H)
|
||||
extern HIDDEN_Ptr DSAlertTab_H;
|
||||
extern Rect DSAlertRect;
|
||||
extern Byte WWExist;
|
||||
extern Byte QDExist;
|
||||
#endif
|
||||
|
||||
#define DSAlertTab (DSAlertTab_H.p)
|
||||
|
||||
extern char syserr_msg[];
|
||||
|
||||
extern pascal void C_SysError (short errorcode);
|
||||
|
||||
#endif /* !_SYSERR_H_ */
|
||||
0
src/include/SysError.h
Normal file
0
src/include/SysError.h
Normal file
588
src/include/TextEdit.h
Normal file
588
src/include/TextEdit.h
Normal file
@@ -0,0 +1,588 @@
|
||||
#if !defined (_TEXTEDIT_H_)
|
||||
#define _TEXTEDIT_H_
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990, 1995 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: TextEdit.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#include "QuickDraw.h"
|
||||
|
||||
/* new justification defines, accepted by `TESetAlignment ()' and
|
||||
`TETextBox ()' */
|
||||
#define teFlushDefault 0
|
||||
#define teCenter 1
|
||||
#define teFlushRight (-1)
|
||||
#define teFlushLeft (-2)
|
||||
|
||||
/* older justification defines */
|
||||
#define teJustLeft 0
|
||||
#define teJustCenter 1
|
||||
#define teJustRight (-1)
|
||||
#define teForceLeft (-2)
|
||||
|
||||
#define doFont 1
|
||||
#define doFace 2
|
||||
#define doSize 4
|
||||
#define doColor 8
|
||||
#define doAll 15
|
||||
#define addSize 16
|
||||
#define doToggle 32
|
||||
|
||||
#define teFind 0
|
||||
#define teHilite 1
|
||||
#define teDraw -1
|
||||
#define teCaret -2
|
||||
|
||||
#define caret_vis (-1)
|
||||
#define caret_invis (255)
|
||||
#define hilite_vis (0)
|
||||
|
||||
#define teFAutoScroll (0)
|
||||
#define teFTextBuffering (1)
|
||||
#define teFOutlineHilite (2)
|
||||
#define teFInlineInput (3)
|
||||
#define teFUseTextServices (4)
|
||||
|
||||
#define teBitClear (0)
|
||||
#define teBitSet (1)
|
||||
#define teBitTest (-1)
|
||||
|
||||
typedef struct {
|
||||
Rect destRect PACKED;
|
||||
Rect viewRect PACKED;
|
||||
Rect selRect PACKED;
|
||||
INTEGER lineHeight PACKED;
|
||||
INTEGER fontAscent PACKED;
|
||||
Point selPoint PACKED;
|
||||
INTEGER selStart PACKED;
|
||||
INTEGER selEnd PACKED;
|
||||
INTEGER active PACKED;
|
||||
ProcPtr wordBreak PACKED_P;
|
||||
ProcPtr clikLoop PACKED_P;
|
||||
LONGINT clickTime PACKED;
|
||||
INTEGER clickLoc PACKED;
|
||||
LONGINT caretTime PACKED;
|
||||
INTEGER caretState PACKED;
|
||||
INTEGER just PACKED;
|
||||
INTEGER teLength PACKED;
|
||||
Handle hText PACKED_P;
|
||||
INTEGER recalBack PACKED;
|
||||
INTEGER recalLines PACKED;
|
||||
INTEGER clikStuff PACKED;
|
||||
INTEGER crOnly PACKED;
|
||||
INTEGER txFont PACKED;
|
||||
Style txFace PACKED;
|
||||
Byte filler PACKED;
|
||||
INTEGER txMode PACKED;
|
||||
INTEGER txSize PACKED;
|
||||
GrafPtr inPort PACKED_P;
|
||||
ProcPtr highHook PACKED_P;
|
||||
ProcPtr caretHook PACKED_P;
|
||||
INTEGER nLines PACKED;
|
||||
INTEGER lineStarts[1] PACKED;
|
||||
} TERec;
|
||||
|
||||
typedef TERec *TEPtr;
|
||||
typedef struct { TEPtr p PACKED_P; } HIDDEN_TEPtr;
|
||||
typedef HIDDEN_TEPtr *TEHandle;
|
||||
|
||||
typedef struct {
|
||||
INTEGER startChar PACKED;
|
||||
INTEGER styleIndex PACKED;
|
||||
} StyleRun;
|
||||
|
||||
typedef struct {
|
||||
INTEGER stCount PACKED;
|
||||
INTEGER stHeight PACKED;
|
||||
INTEGER stAscent PACKED;
|
||||
INTEGER stFont PACKED;
|
||||
Style stFace PACKED;
|
||||
Byte filler PACKED;
|
||||
INTEGER stSize PACKED;
|
||||
RGBColor stColor PACKED;
|
||||
} STElement;
|
||||
|
||||
typedef STElement TEStyleTable[1];
|
||||
typedef STElement *STPtr;
|
||||
typedef struct { STPtr p PACKED_P; } HIDDEN_STPtr;
|
||||
typedef HIDDEN_STPtr *STHandle;
|
||||
|
||||
typedef struct {
|
||||
INTEGER lhHeight PACKED;
|
||||
INTEGER lhAscent PACKED;
|
||||
} LHElement;
|
||||
|
||||
typedef LHElement LHTable[1];
|
||||
typedef LHElement *LHPtr;
|
||||
typedef struct { LHPtr p PACKED_P; } HIDDEN_LHPtr;
|
||||
typedef HIDDEN_LHPtr *LHHandle;
|
||||
|
||||
typedef struct {
|
||||
INTEGER tsFont PACKED;
|
||||
Style tsFace PACKED;
|
||||
Byte filler PACKED;
|
||||
INTEGER tsSize PACKED;
|
||||
RGBColor tsColor PACKED;
|
||||
} TextStyle;
|
||||
|
||||
typedef struct {
|
||||
LONGINT scrpStartChar PACKED;
|
||||
INTEGER scrpHeight PACKED;
|
||||
INTEGER scrpAscent PACKED;
|
||||
INTEGER scrpFont PACKED;
|
||||
Style scrpFace PACKED;
|
||||
Byte filler PACKED;
|
||||
INTEGER scrpSize PACKED;
|
||||
RGBColor scrpColor PACKED;
|
||||
} ScrpSTElement;
|
||||
|
||||
typedef ScrpSTElement ScrpSTTable[1];
|
||||
|
||||
typedef struct {
|
||||
INTEGER scrpNStyles PACKED;
|
||||
ScrpSTTable scrpStyleTab PACKED;
|
||||
} StScrpRec;
|
||||
|
||||
typedef StScrpRec *StScrpPtr;
|
||||
typedef struct { StScrpPtr p PACKED_P; } HIDDEN_StScrpPtr;
|
||||
typedef HIDDEN_StScrpPtr *StScrpHandle;
|
||||
|
||||
typedef struct {
|
||||
LONGINT TEReserved PACKED;
|
||||
StScrpHandle nullScrap PACKED_P;
|
||||
} NullSTRec;
|
||||
|
||||
typedef NullSTRec *NullSTPtr;
|
||||
typedef struct { NullSTPtr p PACKED_P; } HIDDEN_NullSTPtr;
|
||||
typedef HIDDEN_NullSTPtr *NullSTHandle;
|
||||
|
||||
typedef struct {
|
||||
INTEGER nRuns PACKED;
|
||||
INTEGER nStyles PACKED;
|
||||
STHandle styleTab PACKED_P;
|
||||
LHHandle lhTab PACKED_P;
|
||||
LONGINT teRefCon PACKED;
|
||||
NullSTHandle nullStyle PACKED_P;
|
||||
StyleRun runs[1] PACKED;
|
||||
} TEStyleRec;
|
||||
|
||||
typedef TEStyleRec *TEStylePtr;
|
||||
typedef struct { TEStylePtr p PACKED_P; } HIDDEN_TEStylePtr;
|
||||
typedef HIDDEN_TEStylePtr *TEStyleHandle;
|
||||
|
||||
typedef Byte Chars[1], *CharsPtr, **CharsHandle;
|
||||
|
||||
/* accessors! */
|
||||
|
||||
#define TE_DO_TEXT(te, start, end, what) \
|
||||
({ \
|
||||
int16 retval; \
|
||||
\
|
||||
LOCK_HANDLE_EXCURSION_1 \
|
||||
(te, \
|
||||
{ \
|
||||
retval = ROMlib_call_TEDoText (STARH (te), start, end, what); \
|
||||
}); \
|
||||
retval; \
|
||||
})
|
||||
#define TE_CHAR_TO_POINT(te, sel, pt) \
|
||||
({ \
|
||||
LOCK_HANDLE_EXCURSION_1 \
|
||||
(te, \
|
||||
{ \
|
||||
te_char_to_point (STARH (te), sel, pt); \
|
||||
}); \
|
||||
})
|
||||
|
||||
/* no need to lock te, since `te_char_to_lineno' cannot move memory
|
||||
blocks */
|
||||
#define TE_CHAR_TO_LINENO(te, sel) \
|
||||
te_char_to_lineno (STARH (te), sel)
|
||||
|
||||
#define TE_DEST_RECT(te) (HxX ((te), destRect))
|
||||
#define TE_VIEW_RECT(te) (HxX ((te), viewRect))
|
||||
#define TE_SEL_RECT(te) (HxX ((te), selRect))
|
||||
#define TE_SEL_POINT(te) (HxX ((te), selPoint))
|
||||
#define TE_LINE_STARTS(te) (HxX ((te), lineStarts))
|
||||
#define TE_GET_STYLE(te) \
|
||||
({ \
|
||||
TEStyleHandle retval; \
|
||||
\
|
||||
if (!TE_STYLIZED_P (te)) \
|
||||
retval = NULL; \
|
||||
else \
|
||||
retval = MR (*(TEStyleHandle *) &TE_TX_FONT_X (te)); \
|
||||
retval; \
|
||||
})
|
||||
|
||||
extern void ROMlib_sledgehammer_te (TEHandle te);
|
||||
#if ERROR_SUPPORTED_P (ERROR_TEXT_EDIT_SLAM)
|
||||
#define TE_SLAM(te) \
|
||||
({ \
|
||||
if (ERROR_ENABLED_P (ERROR_TEXT_EDIT_SLAM)) \
|
||||
ROMlib_sledgehammer_te (te); \
|
||||
})
|
||||
#else /* No ERROR_TEXT_EDIT_SLAM */
|
||||
#define TE_SLAM(te)
|
||||
#endif /* No ERROR_TEXT_EDIT_SLAM */
|
||||
|
||||
#define TE_TX_FACE(te) (HxX ((te), txFace))
|
||||
|
||||
#define TE_STYLIZED_P(te) (HxX ((te), txSize) == CWC (-1))
|
||||
#define TE_LINE_HEIGHT_X(te) (HxX ((te), lineHeight))
|
||||
#define TE_FONT_ASCENT_X(te) (HxX ((te), fontAscent))
|
||||
#define TE_LENGTH_X(te) (HxX ((te), teLength))
|
||||
#define TE_ACTIVE_X(te) (HxX ((te), active))
|
||||
#define TE_CARET_STATE_X(te) (HxX ((te), caretState))
|
||||
#define TE_SEL_START_X(te) (HxX ((te), selStart))
|
||||
#define TE_SEL_END_X(te) (HxX ((te), selEnd))
|
||||
#define TE_N_LINES_X(te) (HxX ((te), nLines))
|
||||
#define TE_HTEXT_X(te) (HxX ((te), hText))
|
||||
#define TE_CLICK_STUFF_X(te) (HxX ((te), clikStuff))
|
||||
#define TE_CLICK_LOC_X(te) (HxX ((te), clickLoc))
|
||||
#define TE_CLICK_TIME_X(te) (HxX ((te), clickTime))
|
||||
#define TE_JUST_X(te) (HxX ((te), just))
|
||||
#define TE_TX_FONT_X(te) (HxX ((te), txFont))
|
||||
#define TE_TX_SIZE_X(te) (HxX ((te), txSize))
|
||||
#define TE_TX_MODE_X(te) (HxX ((te), txMode))
|
||||
#define TE_IN_PORT_X(te) (HxX ((te), inPort))
|
||||
|
||||
#define TE_LINE_HEIGHT(te) (CW (TE_LINE_HEIGHT_X (te)))
|
||||
#define TE_FONT_ASCENT(te) (CW (TE_FONT_ASCENT_X (te)))
|
||||
#define TE_LENGTH(te) (CW (TE_LENGTH_X (te)))
|
||||
#define TE_ACTIVE(te) (CW (TE_ACTIVE_X (te)))
|
||||
#define TE_CARET_STATE(te) (CW (TE_CARET_STATE_X (te)))
|
||||
#define TE_SEL_START(te) (CW (TE_SEL_START_X (te)))
|
||||
#define TE_SEL_END(te) (CW (TE_SEL_END_X (te)))
|
||||
#define TE_N_LINES(te) (CW (TE_N_LINES_X (te)))
|
||||
#define TE_CLICK_STUFF(te) (CW (TE_CLICK_STUFF_X (te)))
|
||||
#define TE_CLICK_LOC(te) (CW (TE_CLICK_LOC_X (te)))
|
||||
#define TE_CLICK_TIME(te) (CL (TE_CLICK_TIME_X (te)))
|
||||
#define TE_HTEXT(te) (MR (TE_HTEXT_X (te)))
|
||||
#define TE_JUST(te) (CW (TE_JUST_X (te)))
|
||||
#define TE_TX_FONT(te) (CW (TE_TX_FONT_X (te)))
|
||||
#define TE_TX_SIZE(te) (CW (TE_TX_SIZE_X (te)))
|
||||
#define TE_TX_MODE(te) (CW (TE_TX_MODE_X (te)))
|
||||
#define TE_IN_PORT(te) (MR (TE_IN_PORT_X (te)))
|
||||
|
||||
#define TE_FLAGS_X(te) (HxX (TEHIDDENH (te), flags))
|
||||
#define TE_FLAGS(te) (CL (TE_FLAGS_X (te)))
|
||||
|
||||
#if !defined (NDEBUG)
|
||||
#define TEP_DO_TEXT(tep, start, end, what) \
|
||||
({ \
|
||||
Handle te; \
|
||||
\
|
||||
te = RecoverHandle ((Ptr) tep); \
|
||||
gui_assert (te && (HGetState (te) & LOCKBIT)); \
|
||||
ROMlib_call_TEDoText (tep, start, end, what); \
|
||||
})
|
||||
#else
|
||||
#define TEP_DO_TEXT(tep, start, end, what) \
|
||||
({ ROMlib_call_TEDoText (tep, start, end, what); })
|
||||
#endif
|
||||
|
||||
#if !defined (NDEBUG)
|
||||
#define TEP_CHAR_TO_POINT(tep, sel, pt) \
|
||||
({ \
|
||||
Handle te; \
|
||||
\
|
||||
te = RecoverHandle ((Ptr) tep); \
|
||||
gui_assert (te && (HGetState (te) & LOCKBIT)); \
|
||||
te_char_to_point (tep, sel, pt); \
|
||||
})
|
||||
#else
|
||||
#define TEP_CHAR_TO_POINT(tep, sel, pt) \
|
||||
({ te_char_to_point (tep, sel, pt); })
|
||||
#endif
|
||||
#define TEP_CHAR_TO_LINENO(tep, sel) \
|
||||
te_char_to_lineno (tep, sel)
|
||||
|
||||
#define TEP_SLAM(tep) \
|
||||
({ \
|
||||
Handle te; \
|
||||
\
|
||||
te = RecoverHandle (tep) \
|
||||
ROMlib_sledgehammer_te (te); \
|
||||
})
|
||||
|
||||
#define TEP_SEL_RECT(te) ((tep)->selRect)
|
||||
#define TEP_DEST_RECT(tep) ((tep)->destRect)
|
||||
#define TEP_VIEW_RECT(tep) ((tep)->viewRect)
|
||||
#define TEP_LINE_STARTS(tep) ((tep)->lineStarts)
|
||||
#define TEP_SEL_POINT(tep) ((tep)->selPoint)
|
||||
#define TEP_TX_FACE(tep) ((tep)->txFace)
|
||||
#define TEP_GET_STYLE(tep) \
|
||||
({ \
|
||||
TEStyleHandle retval; \
|
||||
\
|
||||
if (!TEP_STYLIZED_P (tep)) \
|
||||
retval = NULL; \
|
||||
else \
|
||||
retval = MR (*(TEStyleHandle *) &TEP_TX_FONT_X (tep)); \
|
||||
retval; \
|
||||
})
|
||||
|
||||
|
||||
#define TEP_STYLIZED_P(tep) ((tep)->txSize == CWC (-1))
|
||||
#define TEP_LINE_HEIGHT_X(tep) ((tep)->lineHeight)
|
||||
#define TEP_FONT_ASCENT_X(tep) ((tep)->fontAscent)
|
||||
#define TEP_LENGTH_X(tep) ((tep)->teLength)
|
||||
#define TEP_ACTIVE_X(tep) ((tep)->active)
|
||||
#define TEP_CARET_STATE_X(tep) ((tep)->caretState)
|
||||
#define TEP_SEL_START_X(tep) ((tep)->selStart)
|
||||
#define TEP_SEL_END_X(tep) ((tep)->selEnd)
|
||||
#define TEP_N_LINES_X(tep) ((tep)->nLines)
|
||||
#define TEP_HTEXT_X(tep) ((tep)->hText)
|
||||
#define TEP_CLICK_STUFF_X(tep) ((tep)->clikStuff)
|
||||
#define TEP_CLICK_LOC_X(tep) ((tep)->clickLoc)
|
||||
#define TEP_JUST_X(tep) ((tep)->just)
|
||||
#define TEP_TX_FONT_X(tep) ((tep)->txFont)
|
||||
#define TEP_TX_SIZE_X(tep) ((tep)->txSize)
|
||||
#define TEP_IN_PORT_X(tep) ((tep)->inPort)
|
||||
|
||||
#define TEP_LINE_HEIGHT(tep) (CW (TEP_LINE_HEIGHT_X (tep)))
|
||||
#define TEP_FONT_ASCENT(tep) (CW (TEP_FONT_ASCENT_X (tep)))
|
||||
#define TEP_LENGTH(tep) (CW (TEP_LENGTH_X (tep)))
|
||||
#define TEP_ACTIVE(tep) (CW (TEP_ACTIVE_X (tep)))
|
||||
#define TEP_CARET_STATE(tep) (CW (TEP_CARET_STATE_X (tep)))
|
||||
#define TEP_SEL_START(tep) (CW (TEP_SEL_START_X (tep)))
|
||||
#define TEP_SEL_END(tep) (CW (TEP_SEL_END_X (tep)))
|
||||
#define TEP_N_LINES(tep) (CW (TEP_N_LINES_X (tep)))
|
||||
#define TEP_CLICK_STUFF(tep) (CW (TEP_CLICK_STUFF_X (tep)))
|
||||
#define TEP_CLICK_LOC(tep) (CL (TEP_CLICK_LOC_X (tep)))
|
||||
#define TEP_HTEXT(tep) (MR (TEP_HTEXT_X (tep)))
|
||||
#define TEP_JUST(tep) (CW (TEP_JUST_X (tep)))
|
||||
#define TEP_TX_FONT(tep) (CW (TEP_TX_FONT_X (tep)))
|
||||
#define TEP_TX_SIZE(tep) (CW (TEP_TX_SIZE_X (tep)))
|
||||
#define TEP_IN_PORT(tep) (MR (TEP_IN_PORT_X (tep)))
|
||||
|
||||
#define TEP_HEIGHT_FOR_LINE(tep, lineno) \
|
||||
(TEP_STYLIZED_P (tep) && TEP_LINE_HEIGHT_X (tep) == CWC (-1) \
|
||||
? ({ \
|
||||
TEStyleHandle te_style = TEP_GET_STYLE (tep); \
|
||||
LHElement *lh = STARH (TE_STYLE_LH_TABLE (te_style)); \
|
||||
LH_HEIGHT (&lh[lineno]); \
|
||||
}) \
|
||||
: TEP_LINE_HEIGHT (tep))
|
||||
#define TEP_ASCENT_FOR_LINE(tep, lineno) \
|
||||
(TEP_STYLIZED_P (tep) && TEP_FONT_ASCENT_X (tep) == CWC (-1) \
|
||||
? ({ \
|
||||
TEStyleHandle te_style = TEP_GET_STYLE (tep); \
|
||||
LHElement *lh = STARH (TE_STYLE_LH_TABLE (te_style)); \
|
||||
LH_ASCENT (&lh[lineno]); \
|
||||
}) \
|
||||
: TEP_FONT_ASCENT (tep))
|
||||
|
||||
#define TEP_TEXT_WIDTH(tep, text, start, len) \
|
||||
(TEP_STYLIZED_P (tep) \
|
||||
? ROMlib_StyleTextWidth (tep, start, len) \
|
||||
: TextWidth (text, start, len))
|
||||
|
||||
#define LINE_START_X(line_starts, index) \
|
||||
((line_starts)[index])
|
||||
#define LINE_START(line_starts, index) \
|
||||
(CW (LINE_START_X (line_starts, index)))
|
||||
|
||||
#define TE_STYLE_SIZE_FOR_N_RUNS(n_runs) \
|
||||
(sizeof (TEStyleRec) \
|
||||
- sizeof TE_STYLE_RUNS ((TEStyleHandle) NULL) \
|
||||
+ (n_runs + 1) * sizeof *TE_STYLE_RUNS ((TEStyleHandle) NULL))
|
||||
|
||||
#define TE_STYLE_N_RUNS_X(te_style) (HxX ((te_style), nRuns))
|
||||
#define TE_STYLE_N_STYLES_X(te_style) (HxX ((te_style), nStyles))
|
||||
#define TE_STYLE_RUNS(te_style) (HxX ((te_style), runs))
|
||||
#define TE_STYLE_RUN(te_style, run_i) \
|
||||
(&TE_STYLE_RUNS (te_style)[run_i])
|
||||
#define TE_STYLE_STYLE_TABLE_X(te_style) \
|
||||
(HxX ((te_style), styleTab))
|
||||
#define TE_STYLE_LH_TABLE_X(te_style) \
|
||||
(HxX ((te_style), lhTab))
|
||||
#define TE_STYLE_NULL_STYLE_X(te_style) \
|
||||
(HxX ((te_style), nullStyle))
|
||||
|
||||
#define TE_STYLE_N_RUNS(te_style) (CW (TE_STYLE_N_RUNS_X (te_style)))
|
||||
#define TE_STYLE_N_STYLES(te_style) (CW (TE_STYLE_N_STYLES_X (te_style)))
|
||||
#define TE_STYLE_STYLE_TABLE(te_style) \
|
||||
(MR (TE_STYLE_STYLE_TABLE_X (te_style)))
|
||||
#define TE_STYLE_LH_TABLE(te_style) \
|
||||
(MR (TE_STYLE_LH_TABLE_X (te_style)))
|
||||
#define TE_STYLE_NULL_STYLE(te_style) \
|
||||
(MR (TE_STYLE_NULL_STYLE_X (te_style)))
|
||||
|
||||
#define TE_STYLE_NULL_SCRAP(te_style) \
|
||||
(NULL_STYLE_NULL_SCRAP (TE_STYLE_NULL_STYLE (te_style)))
|
||||
|
||||
#define NULL_STYLE_NULL_SCRAP_X(null_style) \
|
||||
(HxX ((null_style), nullScrap))
|
||||
#define NULL_STYLE_NULL_SCRAP(null_style) \
|
||||
(MR (NULL_STYLE_NULL_SCRAP_X (null_style)))
|
||||
|
||||
#define SCRAP_N_STYLES_X(scrap) \
|
||||
(HxX ((scrap), scrpNStyles))
|
||||
|
||||
#define SCRAP_ST_ELT(scrap, elt_i) \
|
||||
(&(HxX ((scrap), scrpStyleTab))[elt_i])
|
||||
#define SCRAP_N_STYLES(scrap) \
|
||||
(CW (SCRAP_N_STYLES_X (scrap)))
|
||||
|
||||
#define SCRAP_SIZE_FOR_N_STYLES(n_styles) \
|
||||
(sizeof (StScrpRec) + ((n_styles) - 1) * sizeof (ScrpSTElement))
|
||||
|
||||
#define RUN_START_CHAR_X(run) (STYLE_RUN_START_CHAR_X (run))
|
||||
#define RUN_STYLE_INDEX_X(run) (STYLE_RUN_STYLE_INDEX_X (run))
|
||||
|
||||
#define RUN_START_CHAR(run) (STYLE_RUN_START_CHAR (run))
|
||||
#define RUN_STYLE_INDEX(run) (STYLE_RUN_STYLE_INDEX (run))
|
||||
|
||||
#define STYLE_RUN_START_CHAR_X(run) ((run)->startChar)
|
||||
#define STYLE_RUN_STYLE_INDEX_X(run) ((run)->styleIndex)
|
||||
|
||||
#define STYLE_RUN_START_CHAR(run) (CW (STYLE_RUN_START_CHAR_X (run)))
|
||||
#define STYLE_RUN_STYLE_INDEX(run) (CW (STYLE_RUN_STYLE_INDEX_X (run)))
|
||||
|
||||
#define TS_FACE(ts) ((ts)->tsFace)
|
||||
|
||||
#define TS_FONT_X(ts) ((ts)->tsFont)
|
||||
#define TS_SIZE_X(ts) ((ts)->tsSize)
|
||||
#define TS_COLOR(ts) ((ts)->tsColor)
|
||||
|
||||
#define TS_FONT(ts) (CW (TS_FONT_X (ts)))
|
||||
#define TS_SIZE(ts) (CW (TS_SIZE_X (ts)))
|
||||
|
||||
#define LH_HEIGHT_X(lh) ((lh)->lhHeight)
|
||||
#define LH_HEIGHT(lh) (CW (LH_HEIGHT_X (lh)))
|
||||
#define LH_ASCENT_X(lh) ((lh)->lhAscent)
|
||||
#define LH_ASCENT(lh) (CW (LH_ASCENT_X (lh)))
|
||||
|
||||
#define STYLE_TABLE_SIZE_FOR_N_STYLES(n_styles) \
|
||||
((n_styles) * sizeof (STElement))
|
||||
|
||||
#define ST_ELT(st, st_elt_i) \
|
||||
(&STARH (st)[st_elt_i])
|
||||
|
||||
#define ST_ELT_FACE(st_elt) ((st_elt)->stFace)
|
||||
|
||||
#define ST_ELT_COUNT_X(st_elt) ((st_elt)->stCount)
|
||||
#define ST_ELT_HEIGHT_X(st_elt) ((st_elt)->stHeight)
|
||||
#define ST_ELT_ASCENT_X(st_elt) ((st_elt)->stAscent)
|
||||
#define ST_ELT_FONT_X(st_elt) ((st_elt)->stFont)
|
||||
#define ST_ELT_SIZE_X(st_elt) ((st_elt)->stSize)
|
||||
#define ST_ELT_COLOR(st_elt) ((st_elt)->stColor)
|
||||
|
||||
#define ST_ELT_COUNT(st_elt) (CW (ST_ELT_COUNT_X (st_elt)))
|
||||
#define ST_ELT_HEIGHT(st_elt) (CW (ST_ELT_HEIGHT_X (st_elt)))
|
||||
#define ST_ELT_ASCENT(st_elt) (CW (ST_ELT_ASCENT_X (st_elt)))
|
||||
#define ST_ELT_FONT(st_elt) (CW (ST_ELT_FONT_X (st_elt)))
|
||||
#define ST_ELT_SIZE(st_elt) (CW (ST_ELT_SIZE_X (st_elt)))
|
||||
|
||||
#define SCRAP_ELT_START_CHAR_X(scrap_elt) \
|
||||
((scrap_elt)->scrpStartChar)
|
||||
#define SCRAP_ELT_START_CHAR(scrap_elt) \
|
||||
(CL (SCRAP_ELT_START_CHAR_X (scrap_elt)))
|
||||
|
||||
extern boolean_t adjust_attrs (TextStyle *orig_attrs, TextStyle *new_attrs,
|
||||
TextStyle *dst_attrs, TextStyle *continuous_attrs,
|
||||
int16 mode);
|
||||
extern int16 make_style_run_at (TEStyleHandle te_style, int16 sel);
|
||||
extern int16 get_style_index (TEStyleHandle te_style, TextStyle *attrs,
|
||||
int incr_count_p);
|
||||
extern void release_style_index (TEStyleHandle te_style, int16 style_index);
|
||||
extern void stabilize_style_info (TEStyleHandle te_style);
|
||||
extern void te_style_combine_runs (TEStyleHandle te_style);
|
||||
|
||||
#if !defined (TEDoText_H)
|
||||
extern HIDDEN_ProcPtr TEDoText_H;
|
||||
extern HIDDEN_Handle TEScrpHandle_H;
|
||||
extern INTEGER TEScrpLength;
|
||||
#endif
|
||||
|
||||
#define TEDoText (TEDoText_H.p)
|
||||
#define TEScrpHandle (TEScrpHandle_H.p)
|
||||
|
||||
extern pascal trap void C_TESetText( Ptr p, LONGINT ln, TEHandle teh ); extern pascal trap void P_TESetText( Ptr p, LONGINT ln, TEHandle teh);
|
||||
extern pascal trap CharsHandle C_TEGetText( TEHandle teh ); extern pascal trap CharsHandle P_TEGetText( TEHandle teh);
|
||||
extern pascal trap void C_TESetJust( INTEGER j, TEHandle teh ); extern pascal trap void P_TESetJust( INTEGER j, TEHandle teh);
|
||||
extern pascal trap void C_TEUpdate( Rect *r, TEHandle teh ); extern pascal trap void P_TEUpdate( Rect *r, TEHandle teh);
|
||||
extern pascal trap void C_TextBox( Ptr p, LONGINT ln, Rect *r,
|
||||
INTEGER j ); extern pascal trap void P_TextBox( Ptr p, LONGINT ln, Rect *r,
|
||||
INTEGER j );
|
||||
extern pascal trap void C_TEScroll( INTEGER dh, INTEGER dv, TEHandle teh ); extern pascal trap void P_TEScroll( INTEGER dh, INTEGER dv, TEHandle teh);
|
||||
extern pascal trap void C_TEKey( CHAR thec, TEHandle teh ); extern pascal trap void P_TEKey( CHAR thec, TEHandle teh);
|
||||
extern pascal trap void C_TECopy( TEHandle teh ); extern pascal trap void P_TECopy( TEHandle teh);
|
||||
extern pascal trap void C_TECut( TEHandle teh ); extern pascal trap void P_TECut( TEHandle teh);
|
||||
extern pascal trap void C_TEPaste( TEHandle teh ); extern pascal trap void P_TEPaste( TEHandle teh);
|
||||
extern pascal trap void C_TEDelete( TEHandle teh ); extern pascal trap void P_TEDelete( TEHandle teh);
|
||||
extern pascal trap void C_TEInsert( Ptr p, LONGINT ln, TEHandle teh ); extern pascal trap void P_TEInsert( Ptr p, LONGINT ln, TEHandle teh);
|
||||
extern pascal trap void C_TEPinScroll( INTEGER dh,
|
||||
INTEGER dv, TEHandle teh ); extern pascal trap void P_TEPinScroll( INTEGER dh,
|
||||
INTEGER dv, TEHandle teh );
|
||||
extern void ROMlib_teautoloop( TEHandle teh );
|
||||
extern pascal trap void C_TESelView( TEHandle teh ); extern pascal trap void P_TESelView( TEHandle teh);
|
||||
extern pascal trap void C_TEAutoView( BOOLEAN autoflag,
|
||||
TEHandle teh ); extern pascal trap void P_TEAutoView( BOOLEAN autoflag,
|
||||
TEHandle teh );
|
||||
extern pascal trap TEHandle C_TEStylNew( Rect *dst, Rect *view ); extern pascal trap TEHandle P_TEStylNew( Rect *dst, Rect *view);
|
||||
extern pascal trap void C_SetStylHandle( TEStyleHandle theHandle,
|
||||
TEHandle teh ); extern pascal trap void P_SetStylHandle( TEStyleHandle theHandle,
|
||||
TEHandle teh );
|
||||
extern pascal trap TEStyleHandle C_GetStylHandle( TEHandle teh ); extern pascal trap TEStyleHandle P_GetStylHandle( TEHandle teh);
|
||||
extern pascal trap StScrpHandle C_GetStylScrap( TEHandle teh ); extern pascal trap StScrpHandle P_GetStylScrap( TEHandle teh);
|
||||
extern pascal trap void C_TEStylInsert( Ptr text, LONGINT length,
|
||||
StScrpHandle hST, TEHandle teh ); extern pascal trap void P_TEStylInsert( Ptr text, LONGINT length,
|
||||
StScrpHandle hST, TEHandle teh );
|
||||
extern pascal trap INTEGER C_TEGetOffset( Point pt, TEHandle teh ); extern pascal trap INTEGER P_TEGetOffset( Point pt, TEHandle teh);
|
||||
extern pascal trap LONGINT C_TEGetPoint( INTEGER offset, TEHandle teh ); extern pascal trap LONGINT P_TEGetPoint( INTEGER offset, TEHandle teh);
|
||||
extern pascal trap int32 C_TEGetHeight (LONGINT endLine, LONGINT startLine, TEHandle teh);
|
||||
extern pascal trap LONGINT P_TEGetHeight( LONGINT endLine,
|
||||
LONGINT startLine, TEHandle teh );
|
||||
extern pascal trap void C_TEGetStyle( INTEGER offset,
|
||||
TextStyle *theStyle, INTEGER *lineHeight, INTEGER *fontAscent,
|
||||
TEHandle teh ); extern pascal trap void P_TEGetStyle( INTEGER offset,
|
||||
TextStyle *theStyle, INTEGER *lineHeight, INTEGER *fontAscent,
|
||||
TEHandle teh );
|
||||
extern pascal trap void C_TEStylPaste( TEHandle teh ); extern pascal trap void P_TEStylPaste( TEHandle teh);
|
||||
extern pascal trap void C_TESetStyle( INTEGER mode, TextStyle *newStyle,
|
||||
BOOLEAN redraw, TEHandle teh ); extern pascal trap void P_TESetStyle( INTEGER mode, TextStyle *newStyle,
|
||||
BOOLEAN redraw, TEHandle teh );
|
||||
extern pascal trap void C_TEReplaceStyle( INTEGER mode,
|
||||
TextStyle *oldStyle, TextStyle *newStyle, BOOLEAN redraw, TEHandle teh ); extern pascal trap void P_TEReplaceStyle( INTEGER mode,
|
||||
TextStyle *oldStyle, TextStyle *newStyle, BOOLEAN redraw, TEHandle teh );
|
||||
extern pascal trap BOOLEAN C_TEContinuousStyle( INTEGER *modep,
|
||||
TextStyle *thestyle, TEHandle teh ); extern pascal trap BOOLEAN P_TEContinuousStyle( INTEGER *modep,
|
||||
TextStyle *thestyle, TEHandle teh );
|
||||
extern pascal trap void C_SetStylScrap( LONGINT start, LONGINT stop,
|
||||
StScrpHandle newstyles, BOOLEAN redraw, TEHandle teh ); extern pascal trap void P_SetStylScrap( LONGINT start, LONGINT stop,
|
||||
StScrpHandle newstyles, BOOLEAN redraw, TEHandle teh );
|
||||
extern pascal trap void C_TECustomHook( INTEGER sel, HIDDEN_ProcPtr *addr,
|
||||
TEHandle teh ); extern pascal trap void P_TECustomHook( INTEGER sel, HIDDEN_ProcPtr *addr,
|
||||
TEHandle teh );
|
||||
extern pascal trap LONGINT C_TENumStyles( LONGINT start, LONGINT stop,
|
||||
TEHandle teh ); extern pascal trap LONGINT P_TENumStyles( LONGINT start, LONGINT stop,
|
||||
TEHandle teh );
|
||||
extern pascal trap void C_TEInit( void ); extern pascal trap void P_TEInit( void );
|
||||
extern pascal trap TEHandle C_TENew( Rect *dst, Rect *view ); extern pascal trap TEHandle P_TENew( Rect *dst, Rect *view);
|
||||
extern pascal trap void C_TEDispose( TEHandle teh ); extern pascal trap void P_TEDispose( TEHandle teh);
|
||||
extern pascal trap void C_TEIdle( TEHandle teh ); extern pascal trap void P_TEIdle( TEHandle teh);
|
||||
extern pascal trap void C_TEClick( Point p, BOOLEAN ext, TEHandle teh ); extern pascal trap void P_TEClick( Point p, BOOLEAN ext, TEHandle teh);
|
||||
extern pascal trap void C_TESetSelect( LONGINT start, LONGINT stop,
|
||||
TEHandle teh ); extern pascal trap void P_TESetSelect( LONGINT start, LONGINT stop,
|
||||
TEHandle teh );
|
||||
extern pascal trap void C_TEActivate( TEHandle teh ); extern pascal trap void P_TEActivate( TEHandle teh);
|
||||
extern pascal trap void C_TEDeactivate( TEHandle teh ); extern pascal trap void P_TEDeactivate( TEHandle teh);
|
||||
extern void SetWordBreak( ProcPtr wb, TEHandle teh );
|
||||
extern void SetClikLoop( ProcPtr cp, TEHandle teh );
|
||||
extern pascal trap void C_TECalText( TEHandle teh ); extern pascal trap void P_TECalText( TEHandle teh);
|
||||
extern OSErr TEFromScrap( void );
|
||||
extern OSErr TEToScrap( void );
|
||||
extern Handle TEScrapHandle( void );
|
||||
extern LONGINT TEGetScrapLen( void );
|
||||
extern void TESetScrapLen( LONGINT ln );
|
||||
|
||||
extern pascal trap int16 C_TEFeatureFlag (int16 feature, int16 action,
|
||||
TEHandle te);
|
||||
|
||||
#endif /* _TEXTEDIT_H_ */
|
||||
27
src/include/ThinkC.h
Normal file
27
src/include/ThinkC.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#if !defined (__THINKCDOTH__)
|
||||
#define __THINKCDOTH__
|
||||
/*
|
||||
* Copyright 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: ThinkC.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
|
||||
#if !defined (__STDC__)
|
||||
extern void CDebugStr();
|
||||
#else /* __STDC__ */
|
||||
extern void CDebugStr( StringPtr p );
|
||||
#endif /* __STDC__ */
|
||||
|
||||
/* DO NOT DELETE THIS LINE */
|
||||
#if !defined (__STDC__)
|
||||
extern StringPtr CtoPstr();
|
||||
extern char *PtoCstr();
|
||||
extern void DebugStr();
|
||||
#else /* __STDC__ */
|
||||
extern StringPtr CtoPstr( char *str );
|
||||
extern char *PtoCstr( StringPtr str );
|
||||
extern pascal trap void C_DebugStr( StringPtr p ); extern pascal trap void P_DebugStr( StringPtr p);
|
||||
#endif /* __STDC__ */
|
||||
#endif /* __THINKCDOTH__ */
|
||||
30
src/include/TimeMgr.h
Normal file
30
src/include/TimeMgr.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#if !defined (__TIMEMGR__)
|
||||
#define __TIMEMGR__
|
||||
|
||||
/*
|
||||
* Copyright 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: TimeMgr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
|
||||
typedef struct {
|
||||
QElemPtr qLink PACKED_P;
|
||||
INTEGER qType PACKED;
|
||||
ProcPtr tmAddr PACKED_P;
|
||||
LONGINT tmCount PACKED; /* I don't trust IMIV-301 */
|
||||
} TMTask;
|
||||
|
||||
|
||||
/* DO NOT DELETE THIS LINE */
|
||||
#if !defined (__STDC__)
|
||||
extern void InsTime();
|
||||
extern void RmvTime();
|
||||
extern void PrimeTime();
|
||||
#else /* __STDC__ */
|
||||
extern void InsTime( QElemPtr taskp );
|
||||
extern void RmvTime( QElemPtr taskp );
|
||||
extern void PrimeTime( QElemPtr taskp, LONGINT count );
|
||||
#endif /* __STDC__ */
|
||||
#endif /* __TIMEMGR__ */
|
||||
57
src/include/ToolboxEvent.h
Normal file
57
src/include/ToolboxEvent.h
Normal file
@@ -0,0 +1,57 @@
|
||||
#if !defined (__TOOLEVENT__)
|
||||
#define __TOOLEVENT__
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: ToolboxEvent.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
|
||||
#include "EventMgr.h"
|
||||
|
||||
#if !defined (KeyThresh)
|
||||
extern INTEGER KeyThresh;
|
||||
extern INTEGER KeyRepThresh;
|
||||
extern LONGINT DoubleTime;
|
||||
extern LONGINT CaretTime;
|
||||
extern Byte ScrDmpEnb;
|
||||
#endif
|
||||
|
||||
#if !defined (__STDC__)
|
||||
extern void ROMlib_alarmoffmbar();
|
||||
extern LONGINT KeyTrans();
|
||||
extern BOOLEAN GetNextEvent();
|
||||
extern BOOLEAN WaitNextEvent();
|
||||
extern BOOLEAN EventAvail();
|
||||
extern void GetMouse();
|
||||
extern BOOLEAN Button();
|
||||
extern BOOLEAN StillDown();
|
||||
extern BOOLEAN WaitMouseUp();
|
||||
extern void GetKeys();
|
||||
extern LONGINT TickCount();
|
||||
extern LONGINT GetDblTime();
|
||||
extern LONGINT GetCaretTime();
|
||||
#else /* __STDC__ */
|
||||
extern void ROMlib_alarmoffmbar( void );
|
||||
extern pascal trap LONGINT C_KeyTrans( Ptr mapp, unsigned short code,
|
||||
LONGINT *state ); extern pascal trap LONGINT P_KeyTrans( Ptr mapp, unsigned short code,
|
||||
LONGINT *state );
|
||||
extern pascal trap BOOLEAN C_GetNextEvent( INTEGER em,
|
||||
EventRecord *evt ); extern pascal trap BOOLEAN P_GetNextEvent( INTEGER em,
|
||||
EventRecord *evt );
|
||||
extern pascal trap BOOLEAN C_WaitNextEvent( INTEGER mask,
|
||||
EventRecord *evp, LONGINT sleep, RgnHandle mousergn ); extern pascal trap BOOLEAN P_WaitNextEvent( INTEGER mask,
|
||||
EventRecord *evp, LONGINT sleep, RgnHandle mousergn );
|
||||
extern pascal trap BOOLEAN C_EventAvail( INTEGER em, EventRecord *evt ); extern pascal trap BOOLEAN P_EventAvail( INTEGER em, EventRecord *evt);
|
||||
extern pascal trap void C_GetMouse( Point *p ); extern pascal trap void P_GetMouse( Point *p);
|
||||
extern pascal trap BOOLEAN C_Button( void ); extern pascal trap BOOLEAN P_Button( void );
|
||||
extern pascal trap BOOLEAN C_StillDown( void ); extern pascal trap BOOLEAN P_StillDown( void );
|
||||
extern pascal trap BOOLEAN C_WaitMouseUp( void ); extern pascal trap BOOLEAN P_WaitMouseUp( void );
|
||||
extern pascal trap void C_GetKeys( unsigned char *keys ); extern pascal trap void P_GetKeys( unsigned char *keys);
|
||||
extern pascal trap LONGINT C_TickCount( void ); extern pascal trap LONGINT P_TickCount( void );
|
||||
extern LONGINT GetDblTime( void );
|
||||
extern LONGINT GetCaretTime( void );
|
||||
#endif /* __STDC__ */
|
||||
#endif /* __TOOLEVENT__ */
|
||||
89
src/include/ToolboxUtil.h
Normal file
89
src/include/ToolboxUtil.h
Normal file
@@ -0,0 +1,89 @@
|
||||
#if !defined (_TOOLBOX_UTIL_H_)
|
||||
#define _TOOLBOX_UTIL_H_
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: ToolboxUtil.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#include "QuickDraw.h"
|
||||
#include "SANE.h"
|
||||
|
||||
#define sysPatListID 0
|
||||
|
||||
#define iBeamCursor 1
|
||||
#define crossCursor 2
|
||||
#define plusCursor 3
|
||||
#define watchCursor 4
|
||||
|
||||
typedef struct {
|
||||
LONGINT hiLong PACKED;
|
||||
LONGINT loLong PACKED;
|
||||
} Int64Bit;
|
||||
|
||||
#if 1 || !defined(__alpha)
|
||||
typedef Pattern *PatPtr;
|
||||
#else /* defined(__alpha) */
|
||||
typedef char *PatPtr;
|
||||
#warning "Bad PatPtr def ... 'cause of problems with my gcc mods -- ctm"
|
||||
#endif /* defined(__alpha) */
|
||||
|
||||
typedef struct { PatPtr p PACKED_P; } HIDDEN_PatPtr;
|
||||
typedef HIDDEN_PatPtr *PatHandle;
|
||||
|
||||
/* DO NOT DELETE THIS LINE */
|
||||
extern pascal trap Fract C_FracSqrt( Fract x ); extern pascal trap Fract P_FracSqrt( Fract x);
|
||||
extern pascal trap Fract C_FracSin( Fixed x ); extern pascal trap Fract P_FracSin( Fixed x);
|
||||
extern Fixed FixATan2( LONGINT x, LONGINT y );
|
||||
extern pascal trap Fixed C_FixAtan2( LONGINT x, LONGINT y ); extern pascal trap Fixed P_FixAtan2( LONGINT x, LONGINT y);
|
||||
extern pascal trap Fract C_FracCos( Fixed x ); extern pascal trap Fract P_FracCos( Fixed x);
|
||||
extern pascal trap Fixed C_FixRatio( INTEGER n, INTEGER d ); extern pascal trap Fixed P_FixRatio( INTEGER n, INTEGER d);
|
||||
extern pascal trap Fixed C_FixMul( Fixed a, Fixed b ); extern pascal trap Fixed P_FixMul( Fixed a, Fixed b);
|
||||
extern pascal trap INTEGER C_FixRound( Fixed x ); extern pascal trap INTEGER P_FixRound( Fixed x);
|
||||
extern pascal trap StringHandle C_NewString( StringPtr s ); extern pascal trap StringHandle P_NewString( StringPtr s);
|
||||
extern pascal trap void C_SetString( StringHandle h, StringPtr s ); extern pascal trap void P_SetString( StringHandle h, StringPtr s);
|
||||
extern pascal trap StringHandle C_GetString( INTEGER i ); extern pascal trap StringHandle P_GetString( INTEGER i);
|
||||
extern void GetIndString( StringPtr s, INTEGER sid, INTEGER index );
|
||||
extern pascal trap LONGINT C_Munger( Handle h, LONGINT off, Ptr p1,
|
||||
LONGINT len1, Ptr p2, LONGINT len2 ); extern pascal trap LONGINT P_Munger( Handle h, LONGINT off, Ptr p1,
|
||||
LONGINT len1, Ptr p2, LONGINT len2 );
|
||||
extern pascal trap void C_PackBits( HIDDEN_Ptr *sp, HIDDEN_Ptr *dp, INTEGER len ); extern pascal trap void P_PackBits( HIDDEN_Ptr *sp, HIDDEN_Ptr *dp, INTEGER len);
|
||||
extern pascal trap void C_UnpackBits( HIDDEN_Ptr *sp, HIDDEN_Ptr *dp, INTEGER len ); extern pascal trap void P_UnpackBits( HIDDEN_Ptr *sp, HIDDEN_Ptr *dp, INTEGER len);
|
||||
extern pascal trap BOOLEAN C_BitTst( Ptr bp, LONGINT bn ); extern pascal trap BOOLEAN P_BitTst( Ptr bp, LONGINT bn);
|
||||
extern pascal trap void C_BitSet( Ptr bp, LONGINT bn ); extern pascal trap void P_BitSet( Ptr bp, LONGINT bn);
|
||||
extern pascal trap void C_BitClr( Ptr bp, LONGINT bn ); extern pascal trap void P_BitClr( Ptr bp, LONGINT bn);
|
||||
extern pascal trap LONGINT C_BitAnd( LONGINT a, LONGINT b ); extern pascal trap LONGINT P_BitAnd( LONGINT a, LONGINT b);
|
||||
extern pascal trap LONGINT C_BitOr( LONGINT a, LONGINT b ); extern pascal trap LONGINT P_BitOr( LONGINT a, LONGINT b);
|
||||
extern pascal trap LONGINT C_BitXor( LONGINT a, LONGINT b ); extern pascal trap LONGINT P_BitXor( LONGINT a, LONGINT b);
|
||||
extern pascal trap LONGINT C_BitNot( LONGINT a ); extern pascal trap LONGINT P_BitNot( LONGINT a);
|
||||
extern pascal trap LONGINT C_BitShift( LONGINT a, INTEGER n ); extern pascal trap LONGINT P_BitShift( LONGINT a, INTEGER n);
|
||||
extern pascal trap INTEGER C_HiWord( LONGINT a ); extern pascal trap INTEGER P_HiWord( LONGINT a);
|
||||
extern pascal trap INTEGER C_LoWord( LONGINT a ); extern pascal trap INTEGER P_LoWord( LONGINT a);
|
||||
extern pascal trap void C_LongMul( LONGINT a, LONGINT b, Int64Bit *c ); extern pascal trap void P_LongMul( LONGINT a, LONGINT b, Int64Bit *c);
|
||||
extern void ScreenRes( INTEGER *hp, INTEGER *vp );
|
||||
extern pascal trap PatHandle C_GetPattern( INTEGER id ); extern pascal trap PatHandle P_GetPattern( INTEGER id);
|
||||
extern void GetIndPattern( Byte *op, INTEGER plistid, INTEGER index );
|
||||
extern pascal trap CursHandle C_GetCursor( INTEGER id ); extern pascal trap CursHandle P_GetCursor( INTEGER id);
|
||||
extern pascal trap PicHandle C_GetPicture( INTEGER id ); extern pascal trap PicHandle P_GetPicture( INTEGER id);
|
||||
extern pascal trap LONGINT C_DeltaPoint( Point a, Point b ); extern pascal trap LONGINT P_DeltaPoint( Point a, Point b);
|
||||
extern pascal trap Fixed C_SlopeFromAngle( INTEGER a ); extern pascal trap Fixed P_SlopeFromAngle( INTEGER a);
|
||||
extern pascal trap INTEGER C_AngleFromSlope( Fixed s ); extern pascal trap INTEGER P_AngleFromSlope( Fixed s);
|
||||
extern pascal trap Fract C_FracMul( Fract x, Fract y ); extern pascal trap Fract P_FracMul( Fract x, Fract y);
|
||||
extern pascal trap Fixed C_FixDiv( Fixed x, Fixed y ); extern pascal trap Fixed P_FixDiv( Fixed x, Fixed y);
|
||||
extern pascal trap Fract C_FracDiv( Fract x, Fract y ); extern pascal trap Fract P_FracDiv( Fract x, Fract y);
|
||||
extern pascal trap Fixed C_Long2Fix( LONGINT x ); extern pascal trap Fixed P_Long2Fix( LONGINT x);
|
||||
extern pascal trap LONGINT C_Fix2Long( Fixed x ); extern pascal trap LONGINT P_Fix2Long( Fixed x);
|
||||
extern pascal trap Fract C_Fix2Frac( Fixed x ); extern pascal trap Fract P_Fix2Frac( Fixed x);
|
||||
extern pascal trap Fixed C_Frac2Fix( Fract x ); extern pascal trap Fixed P_Frac2Fix( Fract x);
|
||||
extern Extended Fix2X( Fixed x );
|
||||
extern Fixed X2Fix( Extended *xp );
|
||||
extern Extended Frac2X( Fract x );
|
||||
extern Fract X2Frac( Extended *xp );
|
||||
extern pascal trap void C_R_Fix2X( Fixed x, extended80 *ret );
|
||||
extern pascal trap void C_R_Frac2X( Fract x, extended80 *ret );
|
||||
extern pascal trap Fixed C_R_X2Fix( extended80 *x );
|
||||
extern pascal trap Fract C_R_X2Frac( extended80 *x );
|
||||
|
||||
#endif /* _TOOLBOX_UTIL_H_ */
|
||||
69
src/include/VDriver.h
Normal file
69
src/include/VDriver.h
Normal file
@@ -0,0 +1,69 @@
|
||||
#if !defined (__VDRIVER__)
|
||||
#define __VDRIVER__
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: VDriver.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#include "FileMgr.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
COMMONFSQUEUEDEFS PACKED;
|
||||
INTEGER ioRefNum PACKED;
|
||||
INTEGER csCode PACKED;
|
||||
Ptr csParam PACKED_P;
|
||||
} VDParamBlock;
|
||||
|
||||
typedef VDParamBlock *VDParamBlockPtr;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Ptr csTable PACKED_P;
|
||||
INTEGER csStart PACKED;
|
||||
INTEGER csCount PACKED;
|
||||
} VDEntryRecord;
|
||||
|
||||
typedef VDEntryRecord *VDEntRecPtr;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Ptr csGTable PACKED_P;
|
||||
} VDGammaRecord;
|
||||
|
||||
typedef VDGammaRecord *VDGamRecPtr;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
INTEGER csMode PACKED;
|
||||
LONGINT csData PACKED;
|
||||
INTEGER csPage PACKED;
|
||||
Ptr csBaseAddr PACKED_P;
|
||||
} VDPgInfo;
|
||||
|
||||
typedef VDPgInfo *VDPgInfoPtr;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
SignedByte flag PACKED;
|
||||
} VDFlagRec;
|
||||
|
||||
typedef VDFlagRec *VDFlagPtr;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
SignedByte spID; PACKED;
|
||||
} VDDefModeRec;
|
||||
|
||||
typedef VDDefModeRec *VDDefModePtr;
|
||||
|
||||
|
||||
#endif /* !__VDRIVER__ */
|
||||
34
src/include/VRetraceMgr.h
Normal file
34
src/include/VRetraceMgr.h
Normal file
@@ -0,0 +1,34 @@
|
||||
#if !defined (__VRETRACE__)
|
||||
#define __VRETRACE__
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: VRetraceMgr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#define qErr (-1)
|
||||
#define vTypErr (-2)
|
||||
|
||||
typedef struct {
|
||||
QElemPtr qLink PACKED_P;
|
||||
INTEGER qType PACKED;
|
||||
ProcPtr vblAddr PACKED_P;
|
||||
INTEGER vblCount PACKED;
|
||||
INTEGER vblPhase PACKED;
|
||||
} VBLTask;
|
||||
typedef VBLTask *VBLTaskPtr;
|
||||
|
||||
#if !defined (VBLQueue)
|
||||
extern QHdr VBLQueue;
|
||||
#endif
|
||||
|
||||
extern void ROMlib_clockonoff( LONGINT onoroff );
|
||||
extern trap OSErrRET VInstall( VBLTaskPtr vtaskp );
|
||||
extern trap OSErrRET VRemove( VBLTaskPtr vtaskp );
|
||||
extern QHdrPtr GetVBLQHdr( void );
|
||||
extern trap OSErrRET SlotVInstall( VBLTaskPtr vtaskp, INTEGER slot );
|
||||
extern trap OSErrRET SlotVRemove( VBLTaskPtr vtaskp, INTEGER slot );
|
||||
|
||||
#endif /* __VRETRACE__ */
|
||||
285
src/include/WindowMgr.h
Normal file
285
src/include/WindowMgr.h
Normal file
@@ -0,0 +1,285 @@
|
||||
#if !defined (__WINDOW__)
|
||||
#define __WINDOW__
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: WindowMgr.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#include "QuickDraw.h"
|
||||
#include "EventMgr.h"
|
||||
|
||||
#define documentProc 0
|
||||
#define dBoxProc 1
|
||||
#define plainDBox 2
|
||||
#define altDBoxProc 3
|
||||
#define noGrowDocProc 4
|
||||
#define movableDBoxProc 5
|
||||
#define rDocProc 16
|
||||
|
||||
#define dialogKind 2
|
||||
#define userKind 8
|
||||
|
||||
#define inDesk 0
|
||||
#define inMenuBar 1
|
||||
#define inSysWindow 2
|
||||
#define inContent 3
|
||||
#define inDrag 4
|
||||
#define inGrow 5
|
||||
#define inGoAway 6
|
||||
|
||||
#define noConstraint 0
|
||||
#define hAxisOnly 1
|
||||
#define vAxisOnly 2
|
||||
|
||||
#define wDraw 0
|
||||
#define wHit 1
|
||||
#define wCalcRgns 2
|
||||
#define wNew 3
|
||||
#define wDispose 4
|
||||
#define wGrow 5
|
||||
#define wDrawGIcon 6
|
||||
|
||||
#define wNoHit 0
|
||||
#define wInContent 1
|
||||
#define wInDrag 2
|
||||
#define wInGrow 3
|
||||
#define wInGoAway 4
|
||||
|
||||
/* color table entries */
|
||||
|
||||
#define wContentColor 0
|
||||
#define wFrameColor 1
|
||||
#define wTextColor 2
|
||||
#define wHiliteColor 3
|
||||
#define wTitleBarColor 4
|
||||
#define wHiliteColorLight 5
|
||||
#define wHiliteColorDark 6
|
||||
#define wTitleBarLight 7
|
||||
#define wTitleBarDark 8
|
||||
#define wDialogLight 9
|
||||
#define wDialogDark 10
|
||||
#define wTingeLight 11
|
||||
#define wTingeDark 12
|
||||
|
||||
#define deskPatID 16
|
||||
|
||||
|
||||
typedef GrafPtr WindowPtr;
|
||||
typedef HIDDEN_GrafPtr HIDDEN_WindowPtr;
|
||||
|
||||
typedef CGrafPtr CWindowPtr;
|
||||
|
||||
typedef struct __wr WindowRecord;
|
||||
typedef WindowRecord *WindowPeek;
|
||||
typedef struct { WindowPeek p PACKED_P; } HIDDEN_WindowPeek;
|
||||
|
||||
#include "ControlMgr.h"
|
||||
|
||||
struct __wr {
|
||||
GrafPort port PACKED;
|
||||
INTEGER windowKind PACKED;
|
||||
BOOLEAN visible PACKED;
|
||||
BOOLEAN hilited PACKED;
|
||||
BOOLEAN goAwayFlag PACKED;
|
||||
BOOLEAN spareFlag PACKED;
|
||||
RgnHandle strucRgn PACKED_P;
|
||||
RgnHandle contRgn PACKED_P;
|
||||
RgnHandle updateRgn PACKED_P;
|
||||
Handle windowDefProc PACKED_P;
|
||||
Handle dataHandle PACKED_P;
|
||||
StringHandle titleHandle PACKED_P;
|
||||
INTEGER titleWidth PACKED;
|
||||
ControlHandle controlList PACKED_P; /* is really a ControlHandle */
|
||||
WindowPeek nextWindow PACKED_P; /* is really a WindowPeek */
|
||||
PicHandle windowPic PACKED_P;
|
||||
LONGINT refCon PACKED;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
Rect userState PACKED,
|
||||
stdState PACKED;
|
||||
} WStateData;
|
||||
|
||||
#define inZoomIn 7
|
||||
#define inZoomOut 8
|
||||
|
||||
#define wInZoomIn 5
|
||||
#define wInZoomOut 6
|
||||
|
||||
typedef struct AuxWinRec *AuxWinPtr;
|
||||
typedef struct { AuxWinPtr p PACKED_P; } HIDDEN_AuxWinPtr;
|
||||
typedef HIDDEN_AuxWinPtr *AuxWinHandle;
|
||||
typedef struct { AuxWinHandle p PACKED_P; } HIDDEN_AuxWinHandle;
|
||||
|
||||
typedef struct AuxWinRec {
|
||||
AuxWinHandle awNext PACKED_P;
|
||||
WindowPtr awOwner PACKED_P;
|
||||
CTabHandle awCTable PACKED_P;
|
||||
Handle dialogCItem PACKED_P;
|
||||
LONGINT awFlags PACKED;
|
||||
CTabHandle awReserved PACKED_P;
|
||||
LONGINT awRefCon PACKED;
|
||||
} AuxWinRec;
|
||||
|
||||
#if !defined (WindowList_H)
|
||||
extern HIDDEN_WindowPeek WindowList_H;
|
||||
extern HIDDEN_GrafPtr WMgrPort_H;
|
||||
extern HIDDEN_CGrafPtr WMgrCPort_H;
|
||||
extern HIDDEN_RgnHandle OldStructure_H;
|
||||
extern HIDDEN_RgnHandle OldContent_H;
|
||||
extern HIDDEN_RgnHandle GrayRgn_H;
|
||||
extern HIDDEN_RgnHandle SaveVisRgn_H;
|
||||
extern HIDDEN_ProcPtr DragHook_H;
|
||||
extern HIDDEN_WindowPtr CurActivate_H;
|
||||
extern HIDDEN_WindowPtr CurDeactive_H;
|
||||
extern HIDDEN_ProcPtr DeskHook_H;
|
||||
extern HIDDEN_WindowPtr GhostWindow_H;
|
||||
extern HIDDEN_AuxWinHandle AuxWinHead_H;
|
||||
extern HIDDEN_PixPatHandle DeskCPat_H;
|
||||
extern INTEGER SaveUpdate;
|
||||
extern INTEGER PaintWhite;
|
||||
extern Pattern DragPattern;
|
||||
extern Pattern DeskPattern;
|
||||
#endif
|
||||
|
||||
#define WindowList (WindowList_H.p)
|
||||
#define WMgrPort (WMgrPort_H.p)
|
||||
#define WMgrCPort (WMgrCPort_H.p)
|
||||
#define OldStructure (OldStructure_H.p)
|
||||
#define OldContent (OldContent_H.p)
|
||||
#define GrayRgn (GrayRgn_H.p)
|
||||
#define SaveVisRgn (SaveVisRgn_H.p)
|
||||
#define DragHook (DragHook_H.p)
|
||||
#define CurActivate (CurActivate_H.p)
|
||||
#define CurDeactive (CurDeactive_H.p)
|
||||
#define DeskHook (DeskHook_H.p)
|
||||
#define GhostWindow (GhostWindow_H.p)
|
||||
#define AuxWinHead (AuxWinHead_H.p)
|
||||
#define DeskCPat (DeskCPat_H.p)
|
||||
|
||||
#if !defined (__STDC__)
|
||||
extern void SetWTitle();
|
||||
extern void GetWTitle();
|
||||
extern WindowPtr FrontWindow();
|
||||
extern void HiliteWindow();
|
||||
extern void BringToFront();
|
||||
extern void SelectWindow();
|
||||
extern void ShowHide();
|
||||
extern void HideWindow();
|
||||
extern void ShowWindow();
|
||||
extern void SendBehind();
|
||||
extern void DrawGrowIcon();
|
||||
extern void InitWindows();
|
||||
extern void GetWMgrPort();
|
||||
extern WindowPtr NewWindow();
|
||||
extern WindowPtr GetNewWindow();
|
||||
extern void CloseWindow();
|
||||
extern void DisposeWindow();
|
||||
extern void SetWRefCon();
|
||||
extern LONGINT GetWRefCon();
|
||||
extern void SetWindowPic();
|
||||
extern PicHandle GetWindowPic();
|
||||
extern LONGINT PinRect();
|
||||
extern LONGINT DragTheRgn();
|
||||
extern LONGINT DragGrayRgn();
|
||||
extern void ClipAbove();
|
||||
extern BOOLEAN CheckUpdate();
|
||||
extern void SaveOld();
|
||||
extern void PaintOne();
|
||||
extern void PaintBehind();
|
||||
extern void CalcVis();
|
||||
extern void CalcVisBehind();
|
||||
extern void DrawNew();
|
||||
extern INTEGER GetWVariant();
|
||||
extern INTEGER FindWindow();
|
||||
extern BOOLEAN TrackBox();
|
||||
extern BOOLEAN TrackGoAway();
|
||||
extern void ZoomWindow();
|
||||
extern void MoveWindow();
|
||||
extern void DragWindow();
|
||||
extern LONGINT GrowWindow();
|
||||
extern void SizeWindow();
|
||||
extern void InvalRect();
|
||||
extern void InvalRgn();
|
||||
extern void ValidRect();
|
||||
extern void ValidRgn();
|
||||
extern void BeginUpdate();
|
||||
extern void EndUpdate();
|
||||
#else /* __STDC__ */
|
||||
extern pascal trap void C_SetWTitle( WindowPtr w, StringPtr t ); extern pascal trap void P_SetWTitle( WindowPtr w, StringPtr t);
|
||||
extern pascal trap void C_GetWTitle( WindowPtr w, StringPtr t ); extern pascal trap void P_GetWTitle( WindowPtr w, StringPtr t);
|
||||
extern pascal trap WindowPtr C_FrontWindow( void ); extern pascal trap WindowPtr P_FrontWindow( void );
|
||||
extern pascal trap void C_HiliteWindow( WindowPtr w, BOOLEAN flag ); extern pascal trap void P_HiliteWindow( WindowPtr w, BOOLEAN flag);
|
||||
extern pascal trap void C_BringToFront( WindowPtr w ); extern pascal trap void P_BringToFront( WindowPtr w);
|
||||
extern pascal trap void C_SelectWindow( WindowPtr w ); extern pascal trap void P_SelectWindow( WindowPtr w);
|
||||
extern pascal trap void C_ShowHide( WindowPtr w, BOOLEAN flag ); extern pascal trap void P_ShowHide( WindowPtr w, BOOLEAN flag);
|
||||
extern pascal trap void C_HideWindow( WindowPtr w ); extern pascal trap void P_HideWindow( WindowPtr w);
|
||||
extern pascal trap void C_ShowWindow( WindowPtr w ); extern pascal trap void P_ShowWindow( WindowPtr w);
|
||||
extern pascal trap void C_SendBehind( WindowPtr w, WindowPtr behind ); extern pascal trap void P_SendBehind( WindowPtr w, WindowPtr behind);
|
||||
extern pascal trap void C_DrawGrowIcon( WindowPtr w ); extern pascal trap void P_DrawGrowIcon( WindowPtr w);
|
||||
extern pascal trap void C_InitWindows( void ); extern pascal trap void P_InitWindows( void );
|
||||
extern pascal trap void C_GetWMgrPort( HIDDEN_GrafPtr *wp ); extern pascal trap void P_GetWMgrPort( HIDDEN_GrafPtr *wp);
|
||||
extern pascal trap WindowPtr C_NewWindow( Ptr wst, Rect *r,
|
||||
StringPtr title, BOOLEAN vis, INTEGER procid, WindowPtr behind,
|
||||
BOOLEAN gaflag, LONGINT rc );extern pascal trap WindowPtr P_NewWindow( Ptr wst, Rect *r,
|
||||
StringPtr title, BOOLEAN vis, INTEGER procid, WindowPtr behind,
|
||||
BOOLEAN gaflag, LONGINT rc );
|
||||
extern pascal trap WindowPtr C_GetNewWindow( INTEGER wid, Ptr wst,
|
||||
WindowPtr behind ); extern pascal trap WindowPtr P_GetNewWindow( INTEGER wid, Ptr wst,
|
||||
WindowPtr behind );
|
||||
extern pascal trap void C_CloseWindow( WindowPtr w ); extern pascal trap void P_CloseWindow( WindowPtr w);
|
||||
extern pascal trap void C_DisposeWindow( WindowPtr w ); extern pascal trap void P_DisposeWindow( WindowPtr w);
|
||||
extern pascal trap void C_SetWRefCon( WindowPtr w, LONGINT data ); extern pascal trap void P_SetWRefCon( WindowPtr w, LONGINT data);
|
||||
extern pascal trap LONGINT C_GetWRefCon( WindowPtr w ); extern pascal trap LONGINT P_GetWRefCon( WindowPtr w);
|
||||
extern pascal trap void C_SetWindowPic( WindowPtr w, PicHandle p ); extern pascal trap void P_SetWindowPic( WindowPtr w, PicHandle p);
|
||||
extern pascal trap PicHandle C_GetWindowPic( WindowPtr w ); extern pascal trap PicHandle P_GetWindowPic( WindowPtr w);
|
||||
extern pascal trap LONGINT C_PinRect( Rect *r, Point p ); extern pascal trap LONGINT P_PinRect( Rect *r, Point p);
|
||||
extern pascal trap LONGINT C_DragTheRgn( RgnHandle rgn, Point startp,
|
||||
Rect *limit, Rect *slop, INTEGER axis, ProcPtr proc ); extern pascal trap LONGINT P_DragTheRgn( RgnHandle rgn, Point startp,
|
||||
Rect *limit, Rect *slop, INTEGER axis, ProcPtr proc );
|
||||
extern pascal trap LONGINT C_DragGrayRgn( RgnHandle rgn, Point startp,
|
||||
Rect *limit, Rect *slop, INTEGER axis, ProcPtr proc ); extern pascal trap LONGINT P_DragGrayRgn( RgnHandle rgn, Point startp,
|
||||
Rect *limit, Rect *slop, INTEGER axis, ProcPtr proc );
|
||||
extern pascal trap void C_ClipAbove( WindowPeek w ); extern pascal trap void P_ClipAbove( WindowPeek w);
|
||||
extern pascal trap BOOLEAN C_CheckUpdate( EventRecord *ev ); extern pascal trap BOOLEAN P_CheckUpdate( EventRecord *ev);
|
||||
extern pascal trap void C_SaveOld( WindowPeek w ); extern pascal trap void P_SaveOld( WindowPeek w);
|
||||
extern pascal trap void C_PaintOne( WindowPeek w, RgnHandle clobbered ); extern pascal trap void P_PaintOne( WindowPeek w, RgnHandle clobbered);
|
||||
extern pascal trap void C_PaintBehind( WindowPeek w, RgnHandle clobbered ); extern pascal trap void P_PaintBehind( WindowPeek w, RgnHandle clobbered);
|
||||
extern pascal trap void C_CalcVis( WindowPeek w ); extern pascal trap void P_CalcVis( WindowPeek w);
|
||||
extern pascal trap void C_CalcVisBehind( WindowPeek w,
|
||||
RgnHandle clobbered ); extern pascal trap void P_CalcVisBehind( WindowPeek w,
|
||||
RgnHandle clobbered );
|
||||
extern pascal trap void C_DrawNew( WindowPeek w, BOOLEAN flag ); extern pascal trap void P_DrawNew( WindowPeek w, BOOLEAN flag);
|
||||
extern pascal trap INTEGER C_GetWVariant( WindowPtr w ); extern pascal trap INTEGER P_GetWVariant( WindowPtr w);
|
||||
extern pascal trap INTEGER C_FindWindow( Point p, HIDDEN_WindowPtr *wpp ); extern pascal trap INTEGER P_FindWindow( Point p, HIDDEN_WindowPtr *wpp);
|
||||
extern pascal trap BOOLEAN C_TrackBox( WindowPtr wp,
|
||||
Point pt, INTEGER part ); extern pascal trap BOOLEAN P_TrackBox( WindowPtr wp,
|
||||
Point pt, INTEGER part );
|
||||
extern pascal trap BOOLEAN C_TrackGoAway( WindowPtr w, Point p ); extern pascal trap BOOLEAN P_TrackGoAway( WindowPtr w, Point p);
|
||||
extern pascal trap void C_ZoomWindow( WindowPtr wp,
|
||||
INTEGER part, BOOLEAN front ); extern pascal trap void P_ZoomWindow( WindowPtr wp,
|
||||
INTEGER part, BOOLEAN front );
|
||||
extern pascal trap void C_MoveWindow( WindowPtr wp, INTEGER h, INTEGER v,
|
||||
BOOLEAN front ); extern pascal trap void P_MoveWindow( WindowPtr wp, INTEGER h, INTEGER v,
|
||||
BOOLEAN front );
|
||||
extern pascal trap void C_DragWindow( WindowPtr wp, Point p, Rect *rp ); extern pascal trap void P_DragWindow( WindowPtr wp, Point p, Rect *rp);
|
||||
extern pascal trap LONGINT C_GrowWindow( WindowPtr w, Point startp,
|
||||
Rect *rp ); extern pascal trap LONGINT P_GrowWindow( WindowPtr w, Point startp,
|
||||
Rect *rp );
|
||||
extern pascal trap void C_SizeWindow( WindowPtr w, INTEGER width,
|
||||
INTEGER height, BOOLEAN flag ); extern pascal trap void P_SizeWindow( WindowPtr w, INTEGER width,
|
||||
INTEGER height, BOOLEAN flag );
|
||||
extern pascal trap void C_InvalRect( Rect *r ); extern pascal trap void P_InvalRect( Rect *r);
|
||||
extern pascal trap void C_InvalRgn( RgnHandle r ); extern pascal trap void P_InvalRgn( RgnHandle r);
|
||||
extern pascal trap void C_ValidRect( Rect *r ); extern pascal trap void P_ValidRect( Rect *r);
|
||||
extern pascal trap void C_ValidRgn( RgnHandle r ); extern pascal trap void P_ValidRgn( RgnHandle r);
|
||||
extern pascal trap void C_BeginUpdate( WindowPtr w ); extern pascal trap void P_BeginUpdate( WindowPtr w);
|
||||
extern pascal trap void C_EndUpdate( WindowPtr w ); extern pascal trap void P_EndUpdate( WindowPtr w);
|
||||
extern pascal trap void C_SetWinColor (WindowPtr w, CTabHandle new_w_ctab);
|
||||
extern pascal trap void C_SetDeskCPat( PixPatHandle );
|
||||
extern pascal trap void P_SetDeskCPat( PixPatHandle );
|
||||
#endif /* __STDC__ */
|
||||
#endif /* __WINDOW__ */
|
||||
10
src/include/paramline.h
Normal file
10
src/include/paramline.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#if !defined (__PARAMLINE_H__)
|
||||
#define __PARAMLINE_H__
|
||||
|
||||
extern int count_params (const char *p, int n);
|
||||
|
||||
extern char *get_param (const char **bufpp, int *nleftp);
|
||||
|
||||
extern void paramline_to_argcv (const char *cmdp, int *argcp, char ***argvp);
|
||||
|
||||
#endif
|
||||
3
src/include/pascal.h
Normal file
3
src/include/pascal.h
Normal file
@@ -0,0 +1,3 @@
|
||||
/*
|
||||
* $Id: pascal.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
560
src/include/rsys/Olibcproto.h
Normal file
560
src/include/rsys/Olibcproto.h
Normal file
@@ -0,0 +1,560 @@
|
||||
#if !defined(__OLIBCPROTO__)
|
||||
#define __OLIBCPROTO__
|
||||
|
||||
/*
|
||||
* Copyright 1990, 1991 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: Olibcproto.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#include <MacTypes.h>
|
||||
|
||||
#if defined(BINCOMPAT) && 0
|
||||
#include <rsys/pragmal.h>
|
||||
#endif /* BINCOMPAT */
|
||||
|
||||
#ifdef SPARC
|
||||
#include <alloca.h>
|
||||
#endif /* SPARC */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifndef ALREADYSEENSYSTYPES
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
#if !defined(__alpha)
|
||||
#include <sys/vfs.h>
|
||||
#else
|
||||
#include <sys/mount.h>
|
||||
#include <termio.h>
|
||||
#endif
|
||||
|
||||
#ifndef SYSV
|
||||
#include <sys/time.h>
|
||||
#else /* SYSV */
|
||||
#include <time.h>
|
||||
#endif /* SYSV */
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
#if 0
|
||||
#include <sys/dir.h>
|
||||
#endif
|
||||
|
||||
#if !defined(MSDOS)
|
||||
#include <ndbm.h>
|
||||
#else /* defined(MSDOS) */
|
||||
typedef struct {
|
||||
char *dptr;
|
||||
int dsize;
|
||||
} datum;
|
||||
#endif /* defined(MSDOS) */
|
||||
|
||||
#include <errno.h>
|
||||
#include <sys/file.h>
|
||||
|
||||
#if defined(SUN) || defined(LINUX)
|
||||
#include <sys/resource.h>
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
#if defined(GO32)
|
||||
#include <../include/dos.h>
|
||||
#endif
|
||||
|
||||
#if !defined (SYSV) && !defined (__alpha) && !defined(MSDOS) && !defined (LINUX)
|
||||
#include <sys/ttydev.h>
|
||||
#endif /* !SYSV && !__alpha && !MSDOS && !LINUX */
|
||||
|
||||
#if defined(__alpha) || defined(GO32)
|
||||
extern void sync(void);
|
||||
#endif
|
||||
|
||||
#if defined(__alpha)
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
extern void bzero(void *str, int len);
|
||||
extern void bcopy(void *src, void *dst, int len);
|
||||
extern int gethostname(char *addr, int len);
|
||||
extern int statfs(const char *path, struct statfs *buf, int length);
|
||||
extern void *alloca(size_t size);
|
||||
extern int setuid(uid_t uid);
|
||||
extern int seteuid(uid_t uid);
|
||||
|
||||
#if !defined (XTC)
|
||||
extern pid_t wait3(union wait *statusp, int options, struct rusage *resp);
|
||||
extern pid_t wait4(pid_t process_id, union wait *statusp, int options,
|
||||
struct rusage *resp);
|
||||
#endif /* !XTC */
|
||||
|
||||
extern char *getwd(char *pathname);
|
||||
extern int ioctl(int d, unsigned long request, void *argp);
|
||||
#endif
|
||||
|
||||
#include <dirent.h>
|
||||
#ifdef SYSV
|
||||
#include <fcntl.h>
|
||||
#include <sys/signal.h>
|
||||
#include <unistd.h>
|
||||
#define MAXPATHLEN 1024
|
||||
|
||||
struct timeval {
|
||||
LONGINT tv_sec;
|
||||
LONGINT tv_usec;
|
||||
};
|
||||
|
||||
struct itimerval {
|
||||
struct timeval it_interval;
|
||||
struct timeval it_value;
|
||||
};
|
||||
|
||||
#define ITIMER_REAL 0
|
||||
|
||||
struct sigcontext {
|
||||
int foo;
|
||||
};
|
||||
|
||||
#define sigmask(n) (1L << ((n)-1))
|
||||
|
||||
#endif /* SYSV */
|
||||
|
||||
#if defined(NEXT)
|
||||
|
||||
#if 0 && defined(mc68000) && (!defined(NX_CURRENT_COMPILER_RELEASE) || \
|
||||
(NX_CURRENT_COMPILER_RELEASE < NX_COMPILER_RELEASE_3_0))
|
||||
|
||||
#include <mach.h>
|
||||
#include <sys/loader.h>
|
||||
#include <nextdev/disk.h>
|
||||
#include <nextdev/scsireg.h>
|
||||
|
||||
#else
|
||||
|
||||
#if !defined (STRICT_OPENSTEP)
|
||||
#include <mach/mach.h>
|
||||
/* define _ARCHITECTURE_BYTE_ORDER_H_ so that <mach-o/loader.h>
|
||||
doesn't include <architecture/byte_order.h>, which results in
|
||||
_many_ NSxxx swap functions ending up in ROMlib non-optimized
|
||||
objects. this depends on the fact that we don't use MH_CIGAM,
|
||||
which is defined in terms of NXSwapInt */
|
||||
#define _ARCHITECTURE_BYTE_ORDER_H_
|
||||
#include <mach-o/loader.h>
|
||||
#endif
|
||||
|
||||
#include <bsd/dev/disk.h>
|
||||
#include <bsd/dev/scsireg.h>
|
||||
|
||||
#endif
|
||||
|
||||
/* #include <nextdev/fd_extern.h> */
|
||||
#include <appkit/publicWraps.h>
|
||||
#include <dpsclient/event.h>
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(MSDOS)
|
||||
#include <sys/ioctl.h>
|
||||
#endif
|
||||
|
||||
#include <ctype.h>
|
||||
#include <math.h>
|
||||
#include <pwd.h>
|
||||
|
||||
#if !defined (LINUX)
|
||||
|
||||
#ifndef __STDC__
|
||||
|
||||
extern int _flsbuf();
|
||||
extern void abort();
|
||||
extern int access();
|
||||
extern char *alloca();
|
||||
extern double atan2();
|
||||
extern int atoi();
|
||||
extern void bcopy();
|
||||
extern char *brk();
|
||||
extern void bzero();
|
||||
extern int chdir();
|
||||
|
||||
#ifndef AVIION
|
||||
extern int chmod();
|
||||
#endif /* AVIION */
|
||||
|
||||
extern int close();
|
||||
|
||||
#ifndef SYSV
|
||||
extern void closedir();
|
||||
#else /* SYSV */
|
||||
extern int closedir();
|
||||
#endif /* SYSV */
|
||||
|
||||
extern double cos();
|
||||
extern int creat();
|
||||
extern void dbm_close();
|
||||
extern int dbm_delete();
|
||||
extern datum dbm_fetch();
|
||||
extern datum dbm_firstkey();
|
||||
extern datum dbm_nextkey();
|
||||
extern int dbm_store();
|
||||
extern DBM *dbm_open();
|
||||
extern int dup();
|
||||
extern int execlp();
|
||||
extern int execl();
|
||||
extern void exit();
|
||||
extern int flock();
|
||||
extern int fork();
|
||||
extern int fprintf();
|
||||
extern LONGINT free();
|
||||
extern int fstat();
|
||||
extern int ftruncate();
|
||||
extern char *getenv();
|
||||
extern int gethostname();
|
||||
extern int getpid();
|
||||
extern struct passwd *getpwuid();
|
||||
extern int gettimeofday();
|
||||
extern int geteuid();
|
||||
extern int getuid();
|
||||
extern char *getwd();
|
||||
extern struct tm *gmtime();
|
||||
extern char *index();
|
||||
extern int ioctl();
|
||||
extern int kill();
|
||||
extern struct tm *localtime();
|
||||
extern int lockf();
|
||||
extern LONGINT lseek();
|
||||
extern int lstat();
|
||||
extern char *malloc();
|
||||
extern char *memcpy();
|
||||
|
||||
#ifndef AVIION
|
||||
extern int mkdir();
|
||||
#endif /* AVIION */
|
||||
|
||||
extern int open();
|
||||
extern DIR *opendir();
|
||||
extern int pipe();
|
||||
extern int printf();
|
||||
extern int qsort();
|
||||
extern int rand();
|
||||
extern int read();
|
||||
|
||||
#ifndef SYSV
|
||||
extern struct direct *readdir();
|
||||
#else /* SYSV */
|
||||
extern struct dirent *readdir();
|
||||
#endif /* SYSV */
|
||||
|
||||
extern char *realloc();
|
||||
extern int rename();
|
||||
extern char *rindex();
|
||||
extern int rmdir();
|
||||
extern char *sbrk();
|
||||
extern LONGINT setitimer();
|
||||
extern int settimeofday();
|
||||
extern int setuid();
|
||||
extern LONGINT sigblock();
|
||||
extern int (*signal())();
|
||||
extern int sigpause();
|
||||
extern LONGINT sigsetmask();
|
||||
extern double sin();
|
||||
|
||||
#if !defined(AVIION) && !defined(VAX)
|
||||
#ifndef MACBLITZ
|
||||
extern char *sprintf();
|
||||
#endif /* MACBLITZ */
|
||||
#endif /* AVIION */
|
||||
|
||||
extern double sqrt();
|
||||
|
||||
#if !defined(VAX)
|
||||
extern int stat();
|
||||
#endif /* !defined(VAX) */
|
||||
|
||||
extern int statfs();
|
||||
|
||||
extern int strcmp();
|
||||
extern char *strchr();
|
||||
extern char *strcpy();
|
||||
extern int strlen();
|
||||
extern int strncmp();
|
||||
extern char *strncpy();
|
||||
extern void sync();
|
||||
extern LONGINT syscall();
|
||||
extern LONGINT time();
|
||||
|
||||
#ifndef AVIION
|
||||
extern int umask();
|
||||
#endif /* AVIION */
|
||||
|
||||
extern int unlink();
|
||||
extern int utimes();
|
||||
extern char *valloc();
|
||||
extern int wait3();
|
||||
extern int write();
|
||||
|
||||
#else /* __STDC__ */
|
||||
|
||||
#if !defined(__alpha) && !defined(NEXT)
|
||||
|
||||
extern LONGINT getuid( void );
|
||||
|
||||
#ifndef SYSV
|
||||
extern LONGINT settimeofday( const struct timeval *tp,
|
||||
const struct timezone *tzp );
|
||||
#endif /* SYSV */
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* NOTE: the next two routines aren't available under Mach (on the NeXT)
|
||||
* (on the NeXT we define them in mman.c).
|
||||
*/
|
||||
|
||||
#if !defined(MSDOS) && !defined(__alpha)
|
||||
|
||||
extern char *brk(char *addr);
|
||||
|
||||
extern char *sbrk( LONGINT incr );
|
||||
|
||||
#ifndef NEXT
|
||||
extern LONGINT _flsbuf( ULONGINT c, FILE *p );
|
||||
|
||||
extern void abort( void );
|
||||
|
||||
extern LONGINT access( const char *path, LONGINT mode );
|
||||
|
||||
#if !defined(SUN)
|
||||
extern void *alloca( LONGINT size );
|
||||
#endif !defined(SUN)
|
||||
|
||||
extern double atan2( double x, double y );
|
||||
|
||||
extern int atoi( const char *numstring );
|
||||
|
||||
extern void bcopy( const void *src, void *dst, LONGINT length );
|
||||
|
||||
extern void bzero( void *p, LONGINT length );
|
||||
|
||||
extern LONGINT chdir( const char *path );
|
||||
|
||||
#ifndef AVIION
|
||||
extern LONGINT chmod( const char *path, LONGINT mode );
|
||||
#endif /* AVIION */
|
||||
|
||||
extern LONGINT close( LONGINT fd );
|
||||
|
||||
#if defined (SYSV)
|
||||
extern int closedir( DIR *dirp );
|
||||
#else /* !SYSV */
|
||||
extern void closedir( DIR *dirp );
|
||||
#endif /* !SYSV */
|
||||
|
||||
extern double cos( double angle );
|
||||
|
||||
extern LONGINT creat( const char *name, LONGINT mode );
|
||||
|
||||
extern void dbm_close( DBM *dbp );
|
||||
|
||||
extern int dbm_delete( DBM *db, datum key );
|
||||
|
||||
extern datum dbm_fetch( DBM *db, datum key );
|
||||
|
||||
extern datum dbm_firstkey( DBM *db );
|
||||
|
||||
extern datum dbm_nextkey( DBM *db );
|
||||
|
||||
extern int dbm_store( DBM *db, datum key, datum contents, LONGINT flags );
|
||||
|
||||
extern DBM *dbm_open( const char *name, LONGINT flags, LONGINT mode );
|
||||
|
||||
extern LONGINT dup( LONGINT oldfd );
|
||||
|
||||
extern LONGINT execl( char *name, char *arg0, ... );
|
||||
|
||||
extern LONGINT execlp( const char *name, const char *arg0, ...);
|
||||
|
||||
extern void exit( LONGINT status );
|
||||
|
||||
extern LONGINT flock( LONGINT fd, LONGINT operation );
|
||||
|
||||
extern LONGINT fork( void );
|
||||
|
||||
#ifndef SYSV
|
||||
extern int fprintf(FILE *stream, const char *format, ...);
|
||||
#endif /* SYSV */
|
||||
|
||||
extern LONGINT free( void *ptr );
|
||||
|
||||
extern LONGINT fstat( LONGINT fd, struct stat *buf );
|
||||
|
||||
extern LONGINT ftruncate(LONGINT fd, ULONGINT length);
|
||||
|
||||
extern char *getenv( const char *name );
|
||||
|
||||
extern LONGINT gethostname( char *name, LONGINT len );
|
||||
|
||||
extern LONGINT getpid( void );
|
||||
|
||||
extern struct passwd *getpwuid( LONGINT uid );
|
||||
|
||||
#ifndef SYSV
|
||||
extern LONGINT gettimeofday( struct timeval *dp, struct timezone *tzp );
|
||||
#endif /* SYSV */
|
||||
|
||||
extern LONGINT geteuid( void );
|
||||
|
||||
extern char *getwd( char pathname[MAXPATHLEN] );
|
||||
|
||||
extern struct tm *gmtime( LONGINT *clock );
|
||||
|
||||
extern LONGINT ioctl( LONGINT d, LONGINT request, void *argp );
|
||||
|
||||
extern LONGINT kill( LONGINT pid, LONGINT sig );
|
||||
|
||||
extern char *index( const char *str, LONGINT c );
|
||||
|
||||
extern struct tm *localtime( LONGINT *clock );
|
||||
|
||||
extern LONGINT lockf( LONGINT fd, LONGINT cmd, LONGINT size );
|
||||
|
||||
extern LONGINT lseek( LONGINT d, LONGINT offset, LONGINT whence );
|
||||
|
||||
extern LONGINT lstat( const char *path, struct stat *sbufp );
|
||||
|
||||
extern void *malloc( ULONGINT size );
|
||||
|
||||
#if !defined(SUN) && !defined(X)
|
||||
extern char *memcpy( void *dst, const void *src, LONGINT len );
|
||||
#endif
|
||||
|
||||
#ifndef AVIION
|
||||
extern LONGINT mkdir( const char *path, LONGINT mode);
|
||||
#endif /* AVIION */
|
||||
|
||||
extern LONGINT open( const char *path, LONGINT flags, ... );
|
||||
|
||||
extern DIR *opendir( const char *filename );
|
||||
|
||||
extern LONGINT pipe( LONGINT fildes[2] );
|
||||
|
||||
#ifndef SYSV
|
||||
extern int printf(const char *format, ...);
|
||||
#endif /* SYSV */
|
||||
|
||||
extern LONGINT qsort(void *base, LONGINT nel, LONGINT width, LONGINT (*compar)());
|
||||
|
||||
extern LONGINT rand( void );
|
||||
|
||||
extern LONGINT read( LONGINT fd, const void *buf, LONGINT nbytes );
|
||||
|
||||
#ifndef SYSV
|
||||
extern struct direct *readdir( DIR *dirp );
|
||||
#else /* SYSV */
|
||||
extern struct dirent *readdir( DIR *dirp );
|
||||
#endif /* SYSV */
|
||||
|
||||
extern void *realloc( void *ptr, ULONGINT size );
|
||||
|
||||
extern LONGINT rename( const char *from, const char *to );
|
||||
|
||||
extern char *rindex( const char *str, LONGINT c );
|
||||
|
||||
extern LONGINT rmdir( const char *path );
|
||||
|
||||
extern LONGINT setitimer( LONGINT which, const struct itimerval *value,
|
||||
struct itimerval *ovalue );
|
||||
|
||||
|
||||
extern LONGINT setuid( LONGINT uid );
|
||||
|
||||
extern LONGINT sigblock( LONGINT mask );
|
||||
|
||||
#ifndef SYSV
|
||||
extern int
|
||||
(*signal( LONGINT sig, LONGINT (*func)(LONGINT signo, LONGINT code,
|
||||
struct sigcontext *scp) ))();
|
||||
#else /* SYSV */
|
||||
extern int (*signal( LONGINT sig, LONGINT (*func)(LONGINT signo, LONGINT code) ))();
|
||||
#endif /* SYSV */
|
||||
|
||||
extern LONGINT sigpause( LONGINT mask );
|
||||
|
||||
extern LONGINT sigsetmask( LONGINT mask );
|
||||
|
||||
extern double sin( double angle );
|
||||
|
||||
#ifndef SYSV
|
||||
extern char *sprintf(char *str, const char *format, ...);
|
||||
#endif /* SYSV */
|
||||
|
||||
extern double sqrt( double d );
|
||||
|
||||
#if !defined(VAX)
|
||||
extern LONGINT stat( const char *path, struct stat *sbufp );
|
||||
#endif /* !defined(VAX) */
|
||||
|
||||
extern LONGINT statfs( const char *path, struct statfs *sbufp );
|
||||
|
||||
extern char *strchr( const char *str, LONGINT c );
|
||||
|
||||
extern LONGINT strcmp( const char *str1, const char *str2 );
|
||||
|
||||
extern char *strcpy( char *dst, const char *src );
|
||||
|
||||
extern LONGINT strlen( const char *str );
|
||||
|
||||
extern LONGINT strncmp( const char *str1, const char *str2, LONGINT len );
|
||||
|
||||
extern char *strncpy( char *dst, const char *src, LONGINT n );
|
||||
|
||||
extern void sync( void );
|
||||
|
||||
extern LONGINT syscall( LONGINT callno, ... );
|
||||
|
||||
extern LONGINT time( LONGINT *tloc );
|
||||
|
||||
#ifndef AVIION
|
||||
extern LONGINT umask( LONGINT mask );
|
||||
#endif /* AVIION */
|
||||
|
||||
extern LONGINT unlink( const char *path );
|
||||
|
||||
extern LONGINT utimes( const char *file, struct timeval tvp[2] );
|
||||
|
||||
extern void *valloc( unsigned size );
|
||||
|
||||
extern LONGINT wait3( union wait *status, LONGINT options, struct rusage *rusage );
|
||||
|
||||
extern LONGINT write( LONGINT fd, void *buf, LONGINT nbytes );
|
||||
|
||||
#else /* NEXT */
|
||||
#include <libc.h>
|
||||
/* #include <pwd.h> */
|
||||
|
||||
#endif /* NEXT */
|
||||
|
||||
#endif /* !defined(MSDOS) */
|
||||
|
||||
#endif /* __STDC__ */
|
||||
|
||||
#else /* LINUX */
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined (DEBUG_MALLOC)
|
||||
#include <dmalloc.h>
|
||||
#endif
|
||||
|
||||
#endif /* LINUX */
|
||||
|
||||
#if defined(BINCOMPAT) && 0
|
||||
#include <rsys/pragmas.h>
|
||||
#endif /* BINCOMPAT */
|
||||
|
||||
#endif /* !__OLIBCPROTO__ */
|
||||
11
src/include/rsys/PSstrings.h
Normal file
11
src/include/rsys/PSstrings.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#if !defined(__rsys_PSstrings__)
|
||||
#define __rsys_PSstrings__
|
||||
|
||||
extern const char ROMlib_doc_begin[];
|
||||
extern const char ROMlib_doc_prolog[];
|
||||
extern const char ROMlib_doc_end_prolog[];
|
||||
extern const char ROMlib_doc_end[];
|
||||
extern const char ROMlib_page_begin[];
|
||||
extern const char ROMlib_page_end[];
|
||||
|
||||
#endif /* !defined(__rsys_PSstrings__) */
|
||||
192
src/include/rsys/Xdefs.h
Normal file
192
src/include/rsys/Xdefs.h
Normal file
@@ -0,0 +1,192 @@
|
||||
#if !defined(__XDEFS__)
|
||||
#define __XDEFS__
|
||||
|
||||
/*
|
||||
* Copyright 1989 - 1993 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: Xdefs.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#if defined (BINCOMPAT)
|
||||
#include "rsys/pragmal.h"
|
||||
#endif /* BINCOMPAT */
|
||||
|
||||
#define NeedFunctionPrototypes 1
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/Xatom.h>
|
||||
|
||||
#define INTERESTINGEVENTS (KeyPressMask | \
|
||||
KeyReleaseMask | \
|
||||
ButtonPressMask | \
|
||||
ButtonReleaseMask | \
|
||||
EnterWindowMask | \
|
||||
LeaveWindowMask | \
|
||||
ExposureMask)
|
||||
|
||||
#if !defined(__alpha)
|
||||
#if defined (BINCOMPAT)
|
||||
#undef Bool
|
||||
#define Bool LONGINT
|
||||
#endif /* BINCOMPAT */
|
||||
|
||||
#if !defined (__STDC__)
|
||||
|
||||
extern int XAutoRepeatOff();
|
||||
extern int XAutoRepeatOn();
|
||||
extern int XBell();
|
||||
extern int XChangeProperty();
|
||||
extern int XChangeWindowAttributes();
|
||||
extern Bool XCheckTypedEvent();
|
||||
extern Bool XCheckWindowEvent();
|
||||
extern int XClearWindow();
|
||||
extern int XConvertSelection();
|
||||
extern int XDefineCursor();
|
||||
extern int XFree();
|
||||
extern int XFreeCursor();
|
||||
extern int XFreeGC();
|
||||
extern int XFreePixmap();
|
||||
extern int XGeometry();
|
||||
extern Status XGetGeometry();
|
||||
extern Window XGetSelectionOwner();
|
||||
extern int XGetWindowProperty();
|
||||
extern Atom XInternAtom();
|
||||
extern int XMapWindow();
|
||||
extern int XNextEvent();
|
||||
extern int XPutImage();
|
||||
extern Bool XQueryPointer();
|
||||
extern int XSelectInput();
|
||||
extern Status XSendEvent();
|
||||
extern int XSetSelectionOwner();
|
||||
extern int XSetStandardProperties();
|
||||
extern int XSetWMHints();
|
||||
extern int XSync();
|
||||
extern int XWarpPointer();
|
||||
|
||||
#else /* __STDC__ */
|
||||
|
||||
#if !defined (NEXT)
|
||||
|
||||
extern LONGINT XAutoRepeatOff( Display *dp );
|
||||
|
||||
extern LONGINT XAutoRepeatOn( Display *dp );
|
||||
|
||||
extern LONGINT XBell( Display *dp, LONGINT percent );
|
||||
|
||||
extern LONGINT XChangeProperty( Display *dp, Window w, Atom property, Atom type,
|
||||
LONGINT format, LONGINT mode, unsigned char *data, LONGINT nelements );
|
||||
|
||||
extern LONGINT XChangeWindowAttributes( Display *dp, Window w,
|
||||
ULONGINT valuemask, XSetWindowAttributes *attribp );
|
||||
|
||||
extern Bool XCheckTypedEvent( Display *dp, LONGINT eventtype, XEvent *evp );
|
||||
|
||||
extern Bool XCheckWindowEvent( Display *dp, Window w, LONGINT evtmask,
|
||||
XEvent *evp );
|
||||
|
||||
extern LONGINT XClearWindow( Display *dp, Window w );
|
||||
|
||||
extern LONGINT XConvertSelection( Display *dp, Atom selection, Atom target,
|
||||
Atom prop, Window requestor, Time time );
|
||||
|
||||
extern GC XCreateGC( Display *disp, Drawable d, ULONGINT val,
|
||||
XGCValues *vals );
|
||||
|
||||
extern XImage *XCreateImage( Display *disp, Visual *vis, ULONGINT depth,
|
||||
LONGINT format, LONGINT offset, char *data, ULONGINT width,
|
||||
ULONGINT height, LONGINT pad, LONGINT bytesperline );
|
||||
|
||||
extern Pixmap XCreatePixmap( Display *dp, Drawable d, ULONGINT width,
|
||||
ULONGINT height, ULONGINT depth);
|
||||
|
||||
extern Cursor XCreatePixmapCursor( Display *disp, Pixmap source, Pixmap mask,
|
||||
XColor *fgcolor, XColor *bgcolor, ULONGINT x, ULONGINT y );
|
||||
|
||||
extern Window XCreateSimpleWindow( Display *disp, Window parent, LONGINT x,
|
||||
LONGINT y, ULONGINT width, ULONGINT height,
|
||||
ULONGINT borderwidth, ULONGINT border,
|
||||
ULONGINT background);
|
||||
|
||||
extern LONGINT XDefineCursor( Display *dp, Window w, Cursor cursor );
|
||||
|
||||
extern char *XDisplayName( char *string );
|
||||
|
||||
extern LONGINT XFlush( Display *disp );
|
||||
|
||||
extern LONGINT XFree( char *data );
|
||||
|
||||
extern LONGINT XFreeCursor( Display *dp, Cursor cursor );
|
||||
|
||||
extern LONGINT XFreeGC( Display *dp, GC gc );
|
||||
|
||||
extern LONGINT XFreePixmap( Display *dp, Pixmap pixmap );
|
||||
|
||||
extern LONGINT XGeometry( Display *dp, LONGINT screen, char *pos, char *defpos,
|
||||
ULONGINT bwidth, ULONGINT fwidth,
|
||||
ULONGINT fheight, LONGINT xaddr, LONGINT yaddr,
|
||||
LONGINT *xret, LONGINT *yret, LONGINT *widret, LONGINT *heightret );
|
||||
|
||||
extern char *XGetDefault( Display *dp, char *prog, char *option );
|
||||
|
||||
extern Status XGetGeometry( Display *dp, Drawable d, Window *rootret,
|
||||
LONGINT *xret, LONGINT *yret, ULONGINT *widthret,
|
||||
ULONGINT *heightret, ULONGINT *borderret,
|
||||
ULONGINT *depthret );
|
||||
|
||||
extern Window XGetSelectionOwner( Display* dp, Atom a );
|
||||
|
||||
extern LONGINT XGetWindowProperty( Display *dp, Window w, Atom prop, LONGINT offset,
|
||||
LONGINT length, Bool delete, Atom req_type, Atom *act_type,
|
||||
LONGINT *act_fmt, ULONGINT *nitems, ULONGINT *bytesleft,
|
||||
unsigned char **data );
|
||||
|
||||
extern Atom XInternAtom( Display *dp, char *name, Bool only_if_exists );
|
||||
|
||||
extern KeySym XLookupKeysym( XKeyEvent *keyevt, LONGINT index );
|
||||
|
||||
extern LONGINT XMapWindow( Display *dp, Window w );
|
||||
|
||||
extern LONGINT XNextEvent( Display *dp, XEvent *evtp );
|
||||
|
||||
extern Display *XOpenDisplay( char *dispname );
|
||||
|
||||
extern LONGINT XPutImage( Display *dp, Drawable d, GC gc, XImage *imagep,
|
||||
LONGINT srcx, LONGINT srcy, LONGINT destx, LONGINT desty,
|
||||
ULONGINT width, ULONGINT height );
|
||||
|
||||
extern Bool XQueryPointer( Display *dp, Window w, Window *rootret,
|
||||
Window *childret, LONGINT *rootxret, LONGINT *rootyret,
|
||||
LONGINT *winxret, LONGINT *winyret, ULONGINT *maskret );
|
||||
|
||||
extern LONGINT XSelectInput( Display *dp, Window w, LONGINT eventmask );
|
||||
|
||||
extern Status XSendEvent( Display *dp, Window w, Bool propogate, LONGINT evtmask,
|
||||
XEvent *event );
|
||||
|
||||
extern LONGINT XSetSelectionOwner( Display *dp, Atom a, Window w,
|
||||
ULONGINT time);
|
||||
|
||||
extern LONGINT XSetStandardProperties( Display *dp, Window w, char *wname,
|
||||
char *iconname, Pixmap iconpix, char **argv,
|
||||
LONGINT argc, XSizeHints *hints );
|
||||
|
||||
extern LONGINT XSetWMHints( Display *dp, Window w, XWMHints *wmhintp );
|
||||
|
||||
extern LONGINT XSync( Display *dp, Bool discard );
|
||||
|
||||
extern LONGINT XWarpPointer( Display *dp, Window srcw, Window dstw, LONGINT srcx,
|
||||
LONGINT srcy, ULONGINT srcwidth,
|
||||
ULONGINT srcheight, LONGINT destx, LONGINT desty );
|
||||
|
||||
#endif /* NEXT */
|
||||
|
||||
#endif /* __STDC__ */
|
||||
|
||||
#endif /* !defined(__alpha) */
|
||||
|
||||
#if defined (BINCOMPAT)
|
||||
#include "rsys/pragmas.h"
|
||||
#endif /* BINCOMPAT */
|
||||
#endif
|
||||
11
src/include/rsys/aboutbox.h
Normal file
11
src/include/rsys/aboutbox.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#if !defined (_RSYS_ABOUTBOX_H_)
|
||||
#define _RSYS_ABOUTBOX_H_
|
||||
|
||||
#if defined (SUPPORT_ABOUT_EXECUTOR_BOX)
|
||||
|
||||
extern StringPtr about_box_menu_name_pstr;
|
||||
extern void do_about_box (void);
|
||||
|
||||
#endif /* SUPPORT_ABOUT_EXECUTOR_BOX */
|
||||
|
||||
#endif /* !_RSYS_ABOUTBOX_H_ */
|
||||
10
src/include/rsys/aboutpanel.h
Normal file
10
src/include/rsys/aboutpanel.h
Normal file
@@ -0,0 +1,10 @@
|
||||
#if !defined(__RSYS_ABOUTPANEL__)
|
||||
#define __RSYS_ABOUTPANEL__
|
||||
|
||||
extern void ROMlib_circledefault(DialogPtr dp);
|
||||
|
||||
#if !defined (SUPPORT_ABOUT_EXECUTOR_BOX)
|
||||
#define ABOUTOKITEM 1
|
||||
#endif
|
||||
|
||||
#endif /* !defined(__RSYS_ABOUTPANEL__) */
|
||||
17
src/include/rsys/adb.h
Normal file
17
src/include/rsys/adb.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#if !defined(_RSYS_ADB_H_)
|
||||
#define _RSYS_ADB_H_
|
||||
|
||||
/*
|
||||
* Copyright 1995 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: adb.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#include "ADB.h"
|
||||
|
||||
extern void C_adb_service_stub (void);
|
||||
extern void adb_apeiron_hack (boolean_t deltas_p, ...);
|
||||
extern void reset_adb_vector (void);
|
||||
|
||||
#endif
|
||||
28
src/include/rsys/appearance.h
Normal file
28
src/include/rsys/appearance.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#if !defined(_APPEARANCE_H_)
|
||||
#define _APPEARANCE_H_
|
||||
|
||||
/*
|
||||
* Copyright 2000 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: appearance.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
/*
|
||||
NOTE: this is not an attempt to recreate Apple's appearance manager.
|
||||
this is just a hack to make it so that end-users can ask for a different
|
||||
set of WDEFs, CDEFs, etc. at run time
|
||||
*/
|
||||
|
||||
typedef enum
|
||||
{
|
||||
appearance_sys7,
|
||||
appearance_win3,
|
||||
}
|
||||
appearance_t;
|
||||
|
||||
extern void ROMlib_set_appearance (void);
|
||||
extern boolean_t ROMlib_parse_appearance (const char *appearance_str);
|
||||
extern appearance_t ROMlib_get_appearance (void);
|
||||
|
||||
#endif
|
||||
13
src/include/rsys/arch.h
Normal file
13
src/include/rsys/arch.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#if !defined (_RSYS_ARCH_H_)
|
||||
#define _RSYS_ARCH_H_
|
||||
|
||||
/*
|
||||
* Copyright 1995 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: arch.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
extern boolean_t arch_init (void);
|
||||
|
||||
#endif /* !_RSYS_ARCH_H_ */
|
||||
16
src/include/rsys/arrowkeys.h
Normal file
16
src/include/rsys/arrowkeys.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#if !defined(__ARROWKEYS__)
|
||||
#define __ARROWKEYS__
|
||||
|
||||
/*
|
||||
* Copyright 1989, 1990 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: arrowkeys.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#define ASCIILEFTARROW 0x1C
|
||||
#define ASCIIRIGHTARROW 0x1D
|
||||
#define ASCIIUPARROW 0x1E
|
||||
#define ASCIIDOWNARROW 0x1F
|
||||
|
||||
#endif
|
||||
0
src/include/rsys/assert.h
Normal file
0
src/include/rsys/assert.h
Normal file
13
src/include/rsys/autorefresh.h
Normal file
13
src/include/rsys/autorefresh.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#if !defined (_RSYS_SCREENCHECKSUM_H_)
|
||||
#define _RSYS_SCREENCHECKSUM_H_
|
||||
|
||||
/* Milliseconds between checks for refresh mode. */
|
||||
#define AUTOREFRESH_CHECK_MSECS 1000
|
||||
|
||||
#define NUM_AUTOREFRESH_STRIPS 8U
|
||||
|
||||
extern boolean_t do_autorefresh_p;
|
||||
extern void note_executor_changed_screen (int top, int bottom);
|
||||
extern boolean_t autodetect_refresh (void);
|
||||
|
||||
#endif /* !_RSYS_SCREENCHECKSUM_H_ */
|
||||
38
src/include/rsys/blockdev.h
Normal file
38
src/include/rsys/blockdev.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#if !defined (_RSYS_BLOCKDEV_H_)
|
||||
#define _RSYS_BLOCKDEV_H_
|
||||
|
||||
typedef struct _blockdev_t
|
||||
{
|
||||
uint32 block_size;
|
||||
uint32 max_xfer_size; /* Max number of bytes to transfer at once. */
|
||||
int fd;
|
||||
uint32 fpos; /* Current file position. */
|
||||
boolean_t locked_p; /* read-only? */
|
||||
boolean_t removable_p;
|
||||
|
||||
/* Don't call these directly! Go through the appropriate blockdev
|
||||
* function.
|
||||
*/
|
||||
int (*read_func) (int fd, void *buf, int nbytes);
|
||||
int (*write_func) (int fd, const void *buf, int nbytes);
|
||||
off_t (*seek_func) (int fd, off_t where);
|
||||
int (*close_func) (int fd);
|
||||
|
||||
/* Other things that might be useful?
|
||||
volume_size
|
||||
*/
|
||||
|
||||
/* Internal use only. */
|
||||
uint32 dcache_tag; /* unique number for dcache lookups. */
|
||||
boolean_t valid_p; /* valid blockdev_t record? */
|
||||
} blockdev_t;
|
||||
|
||||
|
||||
extern boolean_t blockdev_read (blockdev_t *b, uint32 offset, void *buf,
|
||||
uint32 num_bytes);
|
||||
extern boolean_t blockdev_write (blockdev_t *b, uint32 offset, const void *buf,
|
||||
uint32 num_bytes);
|
||||
extern boolean_t blockdev_seek_set (blockdev_t *b, uint32 offset);
|
||||
extern void blockdev_close (blockdev_t *b);
|
||||
|
||||
#endif /* !_RSYS_BLOCKDEV_H_ */
|
||||
109
src/include/rsys/blockinterrupts.h
Normal file
109
src/include/rsys/blockinterrupts.h
Normal file
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
* Copyright 1992, 1995 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: blockinterrupts.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#if !defined (_BLOCKINTERRUPTS_H_)
|
||||
#define _BLOCKINTERRUPTS_H_
|
||||
|
||||
#include "rsys/time.h"
|
||||
|
||||
typedef uint32 real_int_state_t;
|
||||
|
||||
#if defined (MSDOS)
|
||||
# include <dpmi.h>
|
||||
|
||||
# define block_real_ints() \
|
||||
((real_int_state_t) __dpmi_get_and_disable_virtual_interrupt_state ())
|
||||
# define restore_real_ints(n) \
|
||||
((void) __dpmi_get_and_set_virtual_interrupt_state (n))
|
||||
#else
|
||||
# define block_real_ints() \
|
||||
((real_int_state_t) sigblock (sigmask (SIGALRM)))
|
||||
# define restore_real_ints(n) \
|
||||
((void) sigsetmask (n))
|
||||
#endif
|
||||
|
||||
|
||||
#if defined (SYN68K)
|
||||
typedef uint8 virtual_int_state_t;
|
||||
extern virtual_int_state_t _virtual_interrupts_blocked;
|
||||
|
||||
/* A virtual_int_state_t is a four bit value. The low bit controls
|
||||
* whether Executor sees the interrupts as masked. The other three
|
||||
* bits are the old interrupt mask from the 68k status register.
|
||||
*/
|
||||
# define block_virtual_ints() \
|
||||
({ virtual_int_state_t _old_state; \
|
||||
_old_state = ((_virtual_interrupts_blocked & TRUE) \
|
||||
| ((cpu_state.sr >> 7) & 0xE)); \
|
||||
cpu_state.sr |= (7 << 8); /* int mask = 7 */ \
|
||||
_virtual_interrupts_blocked = TRUE; \
|
||||
_old_state; \
|
||||
})
|
||||
# define restore_virtual_ints(n) \
|
||||
do { \
|
||||
virtual_int_state_t _new_int_state = (n); \
|
||||
_virtual_interrupts_blocked = _new_int_state & 1; \
|
||||
cpu_state.sr = (cpu_state.sr & ~(7 << 8)) | ((_new_int_state & 0xE) << 7); \
|
||||
/* Now force a recheck, in case an interrupt really did come in \
|
||||
* but was masked out so it got ignored. \
|
||||
*/ \
|
||||
cpu_state.interrupt_status_changed = INTERRUPT_STATUS_CHANGED; \
|
||||
} while (0)
|
||||
|
||||
#else /* !SYN68K */
|
||||
|
||||
typedef real_int_state_t virtual_int_state_t;
|
||||
# define block_virtual_ints() ((virtual_int_state_t) block_real_ints())
|
||||
# define restore_virtual_ints(n) restore_real_ints ((real_int_state_t) (n))
|
||||
|
||||
#endif /* !SYN68K */
|
||||
|
||||
|
||||
#if defined (MSDOS)
|
||||
# define IF_MSDOS(x) x
|
||||
#else
|
||||
# define IF_MSDOS(x)
|
||||
#endif
|
||||
|
||||
|
||||
#if defined (SYN68K)
|
||||
|
||||
#if defined (MSDOS)
|
||||
#include "dosevq.h"
|
||||
#endif
|
||||
|
||||
extern void do_virtual_interrupt (void);
|
||||
#define check_virtual_interrupt() \
|
||||
do \
|
||||
{ \
|
||||
if (!_virtual_interrupts_blocked) \
|
||||
{ \
|
||||
IF_MSDOS (dosevq_note_mouse_interrupt ()); \
|
||||
if (INTERRUPT_PENDING ()) \
|
||||
do_virtual_interrupt (); \
|
||||
} \
|
||||
} while (0)
|
||||
#else /* !SYN68K */
|
||||
# define check_virtual_interrupt()
|
||||
#endif /* !SYN68K */
|
||||
|
||||
|
||||
#define BLOCK_VIRTUAL_INTERRUPTS_EXCURSION(body) \
|
||||
do { \
|
||||
virtual_int_state_t __vstate = block_virtual_ints (); \
|
||||
{ body } \
|
||||
restore_virtual_ints (__vstate); \
|
||||
} while (0)
|
||||
|
||||
#define BLOCK_REAL_INTERRUPTS_EXCURSION(body) \
|
||||
do { \
|
||||
real_int_state_t __rstate = block_real_ints (); \
|
||||
{ body } \
|
||||
restore_real_ints (__rstate); \
|
||||
} while (0)
|
||||
|
||||
#endif /* !_BLOCKINTERRUPTS_H_ */
|
||||
154
src/include/rsys/byteswap.h
Normal file
154
src/include/rsys/byteswap.h
Normal file
@@ -0,0 +1,154 @@
|
||||
#if !defined (_BYTESWAP_H_)
|
||||
#define _BYTESWAP_H_
|
||||
|
||||
#if !defined (BIGENDIAN) && !defined (LITTLEENDIAN)
|
||||
# error "One of BIGENDIAN or LITTLEENDIAN must be #defined"
|
||||
#endif
|
||||
|
||||
#if defined (BIGENDIAN)
|
||||
|
||||
#define CW(rhs) (rhs)
|
||||
#define CL(rhs) (rhs)
|
||||
#define CWC(rhs) (rhs)
|
||||
#define CLC(rhs) (rhs)
|
||||
#define CWV(rhs) (rhs)
|
||||
#define CLV(rhs) (rhs)
|
||||
#define Cx(rhs) (rhs)
|
||||
|
||||
#define MR(rhs) (rhs) /* Mac to ROMlib */
|
||||
#define RM(rhs) (rhs) /* ROMlib to Mac */
|
||||
|
||||
#define CLC_NULL NULL
|
||||
|
||||
#else /* !defined (BIGENDIAN) */
|
||||
|
||||
#define CW(n) ((typeof (n)) (long) swap16 ((unsigned short) (long) (n)))
|
||||
#define CL(n) ((typeof (n)) swap32 ((unsigned long) ((n)|0)))
|
||||
|
||||
#if 0
|
||||
#define MR(n) ((typeof (n))(n ? ((swap32 ((unsigned long) (n))) + ROMlib_offset) : 0))
|
||||
#define RM(n) ((typeof (n))(n ? ((swap32 ((unsigned long) (n)- ROMlib_offset)) ) : 0))
|
||||
#else
|
||||
#define MR(n) ((typeof (n))({ typeof (n) _t = n; _t ? ((swap32 ((unsigned long) (_t))) + ROMlib_offset) : 0;}))
|
||||
#define RM(n) ((typeof (n))({ typeof (n) _t = n; _t ? ((swap32 ((unsigned long) (_t)- ROMlib_offset)) ) : 0;}))
|
||||
#endif
|
||||
|
||||
#define CWC(n) ((typeof (n)) (signed short) ((((n) << 8) & 0xFF00) \
|
||||
| (((n) >> 8) & 0x00FF)))
|
||||
#define CLC(n) ((typeof (n)) (long) ( (((long) ((n)|0) & 0x000000FF) << 24) \
|
||||
| (((long) (n) & 0x0000FF00) << 8) \
|
||||
| (((long) (n) & 0x00FF0000) >> 8) \
|
||||
| (((unsigned long) (n) & 0xFF000000) \
|
||||
>> 24)))
|
||||
|
||||
#define CLC_NULL NULL
|
||||
|
||||
/* These are better versions of CW and CL, but should not be nested
|
||||
* because of exponential growth in the preprocessed code size.
|
||||
*/
|
||||
#define CWV(n) \
|
||||
((typeof (n)) (__builtin_constant_p ((long) (n)) ? CWC (n) : CW (n)))
|
||||
#define CLV(n) \
|
||||
((typeof (n)) (__builtin_constant_p ((long) (n)) ? CLC (n) : CL (n)))
|
||||
|
||||
/* This will cause a link error for an invalid Cx. */
|
||||
extern int bad_cx_splosion;
|
||||
|
||||
#define Cx(rhs) (sizeof(rhs) == 1 ? \
|
||||
(rhs) \
|
||||
: \
|
||||
sizeof(rhs) == 2 ? \
|
||||
CW (rhs) \
|
||||
: \
|
||||
(sizeof(rhs) == 4 || sizeof(rhs) == 8) ? \
|
||||
CL ((rhs)|0) \
|
||||
: \
|
||||
(typeof (rhs)) bad_cx_splosion)
|
||||
|
||||
|
||||
#endif /* !defined (BIGENDIAN) */
|
||||
|
||||
#define CB(rhs) (rhs)
|
||||
#define CBC(rhs) (rhs)
|
||||
#define CBV(rhs) (rhs)
|
||||
|
||||
#define STARH(h) MR ((h)->p)
|
||||
#define Hx(handle, field) Cx (STARH(handle)->field)
|
||||
#define HxP(handle, field) MR (STARH(handle)->field)
|
||||
#define HxX(handle, field) (STARH(handle)->field)
|
||||
|
||||
#if defined (BIGENDIAN)
|
||||
|
||||
#define SWAP_POINT(pt) (pt)
|
||||
|
||||
#define SWAPPED_OPW(big_endian_lvalue, op, v) \
|
||||
((void) ((big_endian_lvalue) op##= (v)))
|
||||
#define SWAPPED_OPL(big_endian_lvalue, op, v) \
|
||||
((void) ((big_endian_lvalue) op##= (v)))
|
||||
#define CMPW_P(big_endian_v, op, native_endian_v) \
|
||||
((big_endian_v) op (native_endian_v))
|
||||
#define CMPL_P(big_endian_v, op, native_endian_v) \
|
||||
((big_endian_v) op (native_endian_v))
|
||||
|
||||
#else /* !BIGENDIAN */
|
||||
|
||||
#define SWAP_POINT(pt) \
|
||||
({ \
|
||||
Point __pt_ = (pt); \
|
||||
\
|
||||
__pt_.h = CW (__pt_.h); \
|
||||
__pt_.v = CW (__pt_.v); \
|
||||
\
|
||||
__pt_; \
|
||||
})
|
||||
|
||||
#define SWAPPED_OPW(big_endian_lvalue, op, v) \
|
||||
((void) \
|
||||
(((#op[0] == '&' || #op[0] == '|' || #op[0] == '^') && #op[1] == '\0') \
|
||||
? ((big_endian_lvalue) op##= CWV (v)) \
|
||||
: ((big_endian_lvalue) = CW (CW (big_endian_lvalue) op (v)))))
|
||||
#define SWAPPED_OPL(big_endian_lvalue, op, v) \
|
||||
((void) \
|
||||
(((#op[0] == '&' || #op[0] == '|' || #op[0] == '^') && #op[1] == '\0') \
|
||||
? ((big_endian_lvalue) op##= CLV (v)) \
|
||||
: ((big_endian_lvalue) = CL (CL (big_endian_lvalue) op (v)))))
|
||||
|
||||
/* This compares a big endian 16 bit value to a native endian value,
|
||||
* using the specified operator. The operator must be one of
|
||||
* ==, !=, <, >, <=, >=.
|
||||
*/
|
||||
#define CMPW_P(big_endian_v, op, native_endian_v) \
|
||||
((__builtin_constant_p ((long) (native_endian_v)) \
|
||||
&& (native_endian_v) == 0) \
|
||||
? ((#op[0] == '>' && #op[1] == '=') \
|
||||
? !((big_endian_v) & CWC (0x8000)) \
|
||||
: ((#op[0] == '<' && #op[1] == '\0') \
|
||||
? (((big_endian_v) & CWC (0x8000)) != 0) \
|
||||
: (((#op[0] == '=' || #op[0] == '!') && #op[1] == '=') \
|
||||
? ((big_endian_v) op CWC (0)) \
|
||||
: CWV (big_endian_v) op 0))) \
|
||||
: (((#op[0] == '=' || #op[0] == '!') && #op[1] == '=') \
|
||||
? ((big_endian_v) op CWV (native_endian_v)) \
|
||||
: CWV (big_endian_v) op (native_endian_v)))
|
||||
|
||||
/* This compares a big endian 32 bit value to a native endian value,
|
||||
* using the specified operator. The operator must be one of
|
||||
* ==, !=, <, >, <=, >=.
|
||||
*/
|
||||
#define CMPL_P(big_endian_v, op, native_endian_v) \
|
||||
((__builtin_constant_p ((long) (native_endian_v)) \
|
||||
&& (native_endian_v) == 0) \
|
||||
? ((#op[0] == '>' && #op[1] == '=') \
|
||||
? !((big_endian_v) & CLC (0x80000000)) \
|
||||
: ((#op[0] == '<' && #op[1] == '\0') \
|
||||
? (((big_endian_v) & CLC (0x80000000)) != 0) \
|
||||
: (((#op[0] == '=' || #op[0] == '!') && #op[1] == '=') \
|
||||
? ((big_endian_v) op CLC (0)) \
|
||||
: CLV (big_endian_v) op 0))) \
|
||||
: (((#op[0] == '=' || #op[0] == '!') && #op[1] == '=') \
|
||||
? ((big_endian_v) op CLV (native_endian_v)) \
|
||||
: CLV (big_endian_v) op (native_endian_v)))
|
||||
|
||||
#endif /* !BIGENDIAN */
|
||||
|
||||
#endif /* !_BYTESWAP_H_ */
|
||||
267
src/include/rsys/cfm.h
Normal file
267
src/include/rsys/cfm.h
Normal file
@@ -0,0 +1,267 @@
|
||||
#if !defined(_cfm_h_)
|
||||
#define _cfm_h_
|
||||
|
||||
#include "FileMgr.h"
|
||||
|
||||
/*
|
||||
* Copyright 2000 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: cfm.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
enum
|
||||
{
|
||||
kUnresolvedCFragSymbolAddress = 0
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32 reserved0 PACKED;
|
||||
uint32 reserved1 PACKED;
|
||||
uint32 version PACKED;
|
||||
uint32 reserved2 PACKED;
|
||||
uint32 reserved3 PACKED;
|
||||
uint32 reserved4 PACKED;
|
||||
uint32 reserved5 PACKED;
|
||||
int32 n_descripts PACKED;
|
||||
}
|
||||
cfrg_resource_t;
|
||||
|
||||
#define CFRG_VERSION_X(cfrg) ((cfgr)->version)
|
||||
#define CFRG_VERSION(cfrg) (CL (CFRG_VERSION_X (cfgr)))
|
||||
|
||||
#define CFRG_N_DESCRIPTS_X(cfrg) ((cfrg)->n_descripts)
|
||||
#define CFRG_N_DESCRIPTS(cfrg) (CL (CFRG_N_DESCRIPTS_X (cfrg)))
|
||||
|
||||
typedef struct
|
||||
{
|
||||
OSType isa PACKED;
|
||||
uint32 update_level PACKED;
|
||||
uint32 current_version PACKED;
|
||||
uint32 oldest_definition_version PACKED;
|
||||
uint32 stack_size PACKED;
|
||||
int16 appl_library_dir PACKED;
|
||||
uint8 fragment_type PACKED;
|
||||
uint8 fragment_location PACKED;
|
||||
int32 offset_to_fragment PACKED;
|
||||
int32 fragment_length PACKED;
|
||||
uint32 reserved0 PACKED;
|
||||
uint32 reserved1 PACKED;
|
||||
uint16 cfir_length PACKED;
|
||||
unsigned char name[1] PACKED;
|
||||
}
|
||||
cfir_t;
|
||||
|
||||
#define CFIR_ISA_X(cfir) ((cfir)->isa)
|
||||
#define CFIR_ISA(cfir) (CL (CFIR_ISA_X (cfir)))
|
||||
|
||||
#define CFIR_TYPE_X(cfir) ((cfir)->fragment_type)
|
||||
#define CFIR_TYPE(cfir) (CB (CFIR_TYPE_X (cfir)))
|
||||
|
||||
#define CFIR_LOCATION_X(cfir) ((cfir)->fragment_location)
|
||||
#define CFIR_LOCATION(cfir) (CL (CFIR_LOCATION_X(cfir)))
|
||||
|
||||
#define CFIR_LENGTH_X(cfir) ((cfir)->cfir_length)
|
||||
#define CFIR_LENGTH(cfir) (CL (CFIR_LENGTH_X(cfir)))
|
||||
|
||||
#define CFIR_OFFSET_TO_FRAGMENT_X(cfir) ((cfir)->offset_to_fragment)
|
||||
#define CFIR_OFFSET_TO_FRAGMENT(cfir) (CL (CFIR_OFFSET_TO_FRAGMENT_X(cfir)))
|
||||
|
||||
#define CFIR_FRAGMENT_LENGTH_X(cfir) ((cfir)->fragment_length)
|
||||
#define CFIR_FRAGMENT_LENGTH(cfir) (CL (CFIR_FRAGMENT_LENGTH_X(cfir)))
|
||||
|
||||
#define CFIR_NAME(cfir) ((cfir)->name)
|
||||
|
||||
enum
|
||||
{
|
||||
kImportLibraryCFrag,
|
||||
kApplicationCFrag,
|
||||
kDropInAdditionCFrag,
|
||||
kStubLibraryCFrag,
|
||||
kWeakStubLibraryCFrag,
|
||||
};
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
kWholeFork = 0
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
kInMem, kOnDiskFlat, kOnDiskSegmented,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
kPowerPCArch = T('p', 'w', 'p', 'c'),
|
||||
kMotorola68KArch = T('m', '6', '8', 'k'),
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
kLoadLib = 1, /* deprecated */
|
||||
kReferenceCFrag = 1,
|
||||
kFindLib = 2,
|
||||
kLoadNewCopy = 5,
|
||||
}
|
||||
LoadFlags;
|
||||
|
||||
typedef struct MemFragment
|
||||
{
|
||||
Ptr address PACKED;
|
||||
uint32 length PACKED;
|
||||
BOOLEAN inPlace PACKED;
|
||||
}
|
||||
MemFragment;
|
||||
|
||||
typedef struct DiskFragment
|
||||
{
|
||||
FSSpecPtr fileSpec PACKED;
|
||||
uint32 offset PACKED;
|
||||
uint32 length PACKED;
|
||||
}
|
||||
DiskFragment;
|
||||
|
||||
typedef struct SegmentedFragment
|
||||
{
|
||||
FSSpecPtr fileSpec PACKED;
|
||||
OSType rsrcType PACKED;
|
||||
INTEGER rsrcID PACKED;
|
||||
}
|
||||
SegmentedFragment;
|
||||
|
||||
typedef struct FragmentLocator
|
||||
{
|
||||
uint32 where PACKED;
|
||||
union
|
||||
{
|
||||
MemFragment inMem;
|
||||
DiskFragment onDisk;
|
||||
SegmentedFragment inSegs;
|
||||
}
|
||||
u PACKED;
|
||||
}
|
||||
FragmentLocator;
|
||||
|
||||
typedef struct InitBlock
|
||||
{
|
||||
uint32 contextID PACKED;
|
||||
uint32 closureID PACKED;
|
||||
FragmentLocator fragLocator PACKED;
|
||||
Ptr libName PACKED;
|
||||
uint32 reserved4a PACKED;
|
||||
uint32 reserved4b PACKED;
|
||||
uint32 reserved4c PACKED;
|
||||
uint32 reserved4d PACKED;
|
||||
}
|
||||
InitBlock;
|
||||
|
||||
typedef struct CFragConnection *ConnectionID;
|
||||
|
||||
extern OSErr C_GetDiskFragment (FSSpecPtr fsp, LONGINT offset, LONGINT length,
|
||||
Str63 fragname, LoadFlags flags,
|
||||
ConnectionID *connp, Ptr *mainAddrp,
|
||||
Str255 errname);
|
||||
|
||||
typedef uint8 SymClass;
|
||||
|
||||
extern OSErr C_FindSymbol (ConnectionID connID, Str255 symName, Ptr *symAddr,
|
||||
SymClass *symClass);
|
||||
|
||||
|
||||
extern char *ROMlib_p2cstr (StringPtr str);
|
||||
|
||||
/* NOTE: The following data structures are just for proof-of-concept
|
||||
use. They are not going to be compatible with what is really on a
|
||||
Macintosh, but they may be good enough to get PS5.5 limping. */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
syn68k_addr_t start;
|
||||
uint32 length;
|
||||
uint32 ref_count;
|
||||
uint8 perms;
|
||||
}
|
||||
section_info_t;
|
||||
|
||||
typedef struct CFragConnection
|
||||
{
|
||||
FragmentLocator frag;
|
||||
struct PEFLoaderInfoHeader *lihp;
|
||||
uint32 ref_count;
|
||||
uint32 n_sects;
|
||||
section_info_t sects[0];
|
||||
}
|
||||
CFragConnection_t;
|
||||
|
||||
enum
|
||||
{
|
||||
fragConnectionIDNotFound = -2801,
|
||||
fragSymbolNotFound = -2802,
|
||||
fragLibNotFound = -2804,
|
||||
fragNoMem = -2809
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ConnectionID cid;
|
||||
int32 n_symbols;
|
||||
int32 first_symbol;
|
||||
}
|
||||
lib_t;
|
||||
|
||||
#define LIB_CID_X(l) ((l)->cid)
|
||||
#define LIB_CID(l) (CL (LIB_CID_X (l)))
|
||||
|
||||
#define LIB_N_SYMBOLS_X(l) ((l)->n_symbols)
|
||||
#define LIB_N_SYMBOLS(l) (CL (LIB_N_SYMBOLS_X (l)))
|
||||
|
||||
#define LIB_FIRST_SYMBOL_X(l) ((l)->first_symbol)
|
||||
#define LIB_FIRST_SYMBOL(l) (CL (LIB_FIRST_SYMBOL_X (l)))
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32 n_libs;
|
||||
lib_t libs[0];
|
||||
}
|
||||
CFragClosure_t;
|
||||
|
||||
#define N_LIBS_X(c) ((c)->n_libs)
|
||||
#define N_LIBS(c) (CL (N_LIBS_X (c)))
|
||||
|
||||
typedef CFragClosure_t *CFragClosureID;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
const char *symbol_name;
|
||||
void *value;
|
||||
}
|
||||
map_entry_t;
|
||||
|
||||
extern cfir_t *ROMlib_find_cfrg (Handle cfrg, OSType arch, uint8 type,
|
||||
Str255 name);
|
||||
|
||||
extern OSErr C_CloseConnection (ConnectionID *cidp);
|
||||
|
||||
|
||||
extern OSErr C_GetSharedLibrary (Str63 library, OSType arch,
|
||||
LoadFlags loadflags,
|
||||
ConnectionID *cidp, Ptr *mainaddrp,
|
||||
Str255 errName);
|
||||
|
||||
extern OSErr C_GetMemFragment (void * addr, uint32 length, Str63 fragname,
|
||||
LoadFlags flags, ConnectionID *connp,
|
||||
Ptr *mainAddrp, Str255 errname);
|
||||
|
||||
extern OSErr C_CountSymbols (ConnectionID id, LONGINT *countp);
|
||||
|
||||
extern OSErr C_GetIndSymbol (ConnectionID id, LONGINT index,
|
||||
Str255 name, Ptr *addrp,
|
||||
SymClass *classp);
|
||||
|
||||
extern ConnectionID ROMlib_new_connection (uint32 n_sects);
|
||||
extern void ROMlib_release_tracking_values (void);
|
||||
|
||||
#endif
|
||||
40
src/include/rsys/checkpoint.h
Normal file
40
src/include/rsys/checkpoint.h
Normal file
@@ -0,0 +1,40 @@
|
||||
#if !defined(_CHECKPOINT_H_)
|
||||
#define _CHECKPOINT_H_
|
||||
|
||||
/*
|
||||
* Copyright 1997 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: checkpoint.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#define CHECKPOINT_FILE "failure.txt"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
boolean_t sound_fails;
|
||||
boolean_t aspi_fails;
|
||||
uint32 bad_macdrives;
|
||||
uint32 bad_dosdrives;
|
||||
}
|
||||
checkpoint_t;
|
||||
|
||||
typedef enum
|
||||
{
|
||||
begin,
|
||||
end,
|
||||
}
|
||||
checkpoint_option;
|
||||
|
||||
extern checkpoint_t *checkpointp;
|
||||
|
||||
extern checkpoint_t *checkpoint_init (void);
|
||||
extern void checkpoint_sound (checkpoint_t *cp, checkpoint_option option);
|
||||
extern void checkpoint_aspi (checkpoint_t *cp, checkpoint_option option);
|
||||
extern void checkpoint_macdrive (checkpoint_t *cp, checkpoint_option option,
|
||||
uint32 drive);
|
||||
extern void checkpoint_dosdrives (checkpoint_t *cp, checkpoint_option option,
|
||||
uint32 drive);
|
||||
extern void disable_checkpointing (void);
|
||||
|
||||
#endif
|
||||
21
src/include/rsys/cleanup.h
Normal file
21
src/include/rsys/cleanup.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#if !defined(__RSYS_CLEANUP__)
|
||||
#define __RSYS_CLEANUP__
|
||||
|
||||
/*
|
||||
* Copyright 1998 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: cleanup.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
|
||||
#if defined (MSDOS) || defined (CYGWIN32)
|
||||
|
||||
#define CLEANUP_BATCH_FILE_NAME "+/cleanup.bat"
|
||||
|
||||
extern void add_to_cleanup (const char *s, ...);
|
||||
extern void call_cleanup_bat (void);
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* !defined(__RSYS_CLEANUP__) */
|
||||
14
src/include/rsys/color_wheel_bits.h
Normal file
14
src/include/rsys/color_wheel_bits.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#if !defined(_COLOR_WHEEL_BITS_H_)
|
||||
#define _COLOR_WHEEL_BITS_H_
|
||||
|
||||
/*
|
||||
* Copyright 1998 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: color_wheel_bits.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
extern char color_wheel_bits_8[];
|
||||
extern char color_wheel_bits_4[];
|
||||
|
||||
#endif
|
||||
67
src/include/rsys/common.h
Normal file
67
src/include/rsys/common.h
Normal file
@@ -0,0 +1,67 @@
|
||||
#if !defined (_COMMON_H_)
|
||||
#define _COMMON_H_
|
||||
|
||||
#if defined (_WIN32) && !defined(WIN32)
|
||||
#define WIN32 /* evil hackage needed to make SDL happy */
|
||||
#endif
|
||||
|
||||
/* #include this first, so we know what wrapper we are. */
|
||||
#include "rsys/wrappers.h"
|
||||
|
||||
/* #include this second, so we know what release type we are. */
|
||||
#include "rsys/release.h"
|
||||
|
||||
#if defined (COMPILE_FOR_HOST)
|
||||
#include "host-os-config.h"
|
||||
#include "host-arch-config.h"
|
||||
#else /* !COMPILE_FOR_HOST */
|
||||
#include "target-os-config.h"
|
||||
#include "target-arch-config.h"
|
||||
#endif /* !COMPILE_FOR_HOST */
|
||||
|
||||
#if !defined (CYGWIN32) && defined (USE_WINDOWS_NOT_MAC_TYPEDEFS_AND_DEFINES)
|
||||
#undef USE_WINDOWS_NOT_MAC_TYPEDEFS_AND_DEFINES
|
||||
#endif
|
||||
|
||||
#if !defined (LINUX) && !defined (MSDOS) && !defined (NEXT) && !defined(CYGWIN32)
|
||||
# error "Unsupported host"
|
||||
#endif
|
||||
|
||||
#include "rsys/cruft.h"
|
||||
#include "rsys/macros.h"
|
||||
#include "rsys/types.h"
|
||||
#include "rsys/mactype.h"
|
||||
#include "rsys/byteswap.h"
|
||||
|
||||
#if !defined USE_WINDOWS_NOT_MAC_TYPEDEFS_AND_DEFINES
|
||||
#include <syn68k_public.h>
|
||||
#include "MacTypes.h"
|
||||
#include "rsys/trapdecl.h"
|
||||
#include "rsys/stubify.h"
|
||||
#include "rsys/slash.h"
|
||||
#include "rsys/error.h"
|
||||
#include "rsys/lowglobals.h"
|
||||
#endif
|
||||
|
||||
#if !defined (COMPILE_FOR_HOST)
|
||||
#include "front-end-config.h"
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
}
|
||||
host_spf_reply_block;
|
||||
|
||||
typedef enum { get, put } getorput_t;
|
||||
typedef enum { original_sf, new_sf, new_custom_sf } sf_flavor_t;
|
||||
|
||||
extern boolean_t host_has_spfcommon (void);
|
||||
extern boolean_t host_spfcommon (host_spf_reply_block *replyp,
|
||||
const char *prompt, const char *filename,
|
||||
void *fp, void *filef, int numt,
|
||||
void *tl, getorput_t getorput,
|
||||
sf_flavor_t flavor,
|
||||
void *activeList, void *activateproc,
|
||||
void *yourdatap);
|
||||
|
||||
#endif /* !_COMMON_H_ */
|
||||
32
src/include/rsys/commonevt.h
Normal file
32
src/include/rsys/commonevt.h
Normal file
@@ -0,0 +1,32 @@
|
||||
#if !defined (_COMMONEVT_H_)
|
||||
#define _COMMONEVT_H_
|
||||
|
||||
/*
|
||||
* commonevents are Xevents with the X constants changed to constants that
|
||||
* we have control of. This means that only one source module actually has
|
||||
* to include X include files. This is necessary since both QuickDraw and
|
||||
* X have their own idea of what the type "Cursor" should be.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
enum { commonkeypress, commonkeyrelease, commonbuttonpress,
|
||||
commonbuttonrelease, commonexpose, commonenternotify,
|
||||
commonleavenotify, commonmotionnotify } type PACKED;
|
||||
INTEGER button PACKED;
|
||||
INTEGER x PACKED;
|
||||
INTEGER y PACKED;
|
||||
LONGINT state PACKED;
|
||||
} commonevent;
|
||||
|
||||
#define commonshiftmask (1 << 0)
|
||||
#define commonlockmask (1 << 1)
|
||||
#define commoncontrolmask (1 << 2)
|
||||
#define commonmod1mask (1 << 3)
|
||||
#define commonbutton2mask (1 << 4)
|
||||
#define commonbutton1mask (1 << 5)
|
||||
|
||||
#define commonbutton1 1
|
||||
#define commonbutton2 2
|
||||
#define commonbutton3 3
|
||||
|
||||
#endif /* !_COMMONEVT_H_ */
|
||||
25
src/include/rsys/cookie.h
Normal file
25
src/include/rsys/cookie.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#if !defined(_RSYS_COOKIE_H_)
|
||||
#define _RSYS_COOKIE_H_
|
||||
|
||||
/*
|
||||
* Copyright 1998 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: cookie.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
long version;
|
||||
long day;
|
||||
}
|
||||
cookie_t;
|
||||
|
||||
#if defined (CYGWIN32)
|
||||
|
||||
extern int win_retrieve_cookie (cookie_t *cookiep);
|
||||
extern int win_leave_cookie (const cookie_t *cookiep);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
747
src/include/rsys/cquick.h
Normal file
747
src/include/rsys/cquick.h
Normal file
@@ -0,0 +1,747 @@
|
||||
#if !defined (_CQUICK_H_)
|
||||
#define _CQUICK_H_
|
||||
|
||||
#include "CQuickDraw.h"
|
||||
|
||||
#include "rsys/rgbutil.h"
|
||||
|
||||
#define SET_HILITE_BIT() \
|
||||
(BitSet ((Ptr) &HiliteMode, pHiliteBit))
|
||||
|
||||
#define CLEAR_HILITE_BIT() \
|
||||
(BitClr ((Ptr) &HiliteMode, pHiliteBit))
|
||||
|
||||
typedef struct GrafVars
|
||||
{
|
||||
RGBColor rgbOpColor PACKED;
|
||||
RGBColor rgbHiliteColor PACKED;
|
||||
Handle pmFgColor PACKED_P;
|
||||
INTEGER pmFgIndex PACKED;
|
||||
Handle pmBkColor PACKED_P;
|
||||
INTEGER pmBkIndex PACKED;
|
||||
INTEGER pmFlags PACKED;
|
||||
|
||||
} GrafVars, *GrafVarsPtr;
|
||||
typedef struct { GrafVarsPtr p PACKED_P; } HIDDEN_GrafVarsPtr, *GrafVarsHandle;
|
||||
|
||||
#define SAFE_PTR(ptr) (gui_assert (ptr))
|
||||
#define SAFE_HANDLE(handle) (gui_assert (handle), gui_assert ((handle)->p))
|
||||
|
||||
/* CGrafPort accessors
|
||||
|
||||
these macros provide accessors for both GrafPort and CGrafPort
|
||||
types. for those members which exist in both, PORT_... accessors
|
||||
are provided. when the member exists in both types but reside in
|
||||
different locations in the structures, the PORT_FIELD accessor is
|
||||
used, otherwise a strait `->' reference is used. for GrafPort only
|
||||
members PORT_... accessors are provided, for CGrafPort only
|
||||
members, CPORT_... accessors are provided.
|
||||
|
||||
FIXME: all accessors explictly cast thier arguments to the
|
||||
appropriate type; this allows the use of these macros with
|
||||
WindowPeek and WindowPtr arguments. _i'm not sure if this will
|
||||
lead to type errors_. */
|
||||
|
||||
/* determine if the given port is a CGrafPort by checking the high two
|
||||
bits of the CGrafPort::portVersion/GrafPort::portBits::rowBytes */
|
||||
#define CGrafPort_p(port) ((((char *)(port))[6] & 0xC0) == 0xC0)
|
||||
|
||||
|
||||
static inline CGrafPtr ASSERT_CPORT(void *port)
|
||||
{
|
||||
#if !defined (NDEBUG)
|
||||
gui_assert (CGrafPort_p (port));
|
||||
#endif
|
||||
return (CGrafPtr) port;
|
||||
}
|
||||
|
||||
static inline GrafPtr ASSERT_NOT_CPORT(void *port)
|
||||
{
|
||||
#if !defined (NDEBUG)
|
||||
gui_assert (!CGrafPort_p (port));
|
||||
#endif
|
||||
return (GrafPtr) port;
|
||||
}
|
||||
|
||||
/* field accessors that exist in both types but at different locations */
|
||||
/* return the offset of the given field for the given port
|
||||
determines the type of the port using CGrafPort_p () */
|
||||
#define PORT_FIELD_OFFSET(field, port) (CGrafPort_p (port) \
|
||||
? offsetof (CGrafPort, field) \
|
||||
: offsetof (GrafPort, field))
|
||||
|
||||
/* return the field of the port */
|
||||
#define PORT_FIELD(port, field) \
|
||||
(*(typeof (((GrafPtr) (port))->field) *) ((char *) (port) \
|
||||
+ PORT_FIELD_OFFSET (field, port)))
|
||||
|
||||
/* aggregate type fields do not require byte swapping */
|
||||
#define PORT_RECT(port) PORT_FIELD (port, portRect)
|
||||
#define PORT_PEN_LOC(port) PORT_FIELD (port, pnLoc)
|
||||
#define PORT_PEN_SIZE(port) PORT_FIELD (port, pnSize)
|
||||
|
||||
/* big endian byte order */
|
||||
#define PORT_VIS_REGION_X(port) PORT_FIELD (port, visRgn)
|
||||
#define PORT_CLIP_REGION_X(port) PORT_FIELD (port, clipRgn)
|
||||
#define PORT_PEN_MODE_X(port) PORT_FIELD (port, pnMode)
|
||||
/* native byte order */
|
||||
#define PORT_VIS_REGION(port) (MR (PORT_VIS_REGION_X (port)))
|
||||
#define PORT_CLIP_REGION(port) (MR (PORT_CLIP_REGION_X (port)))
|
||||
#define PORT_PEN_MODE(port) (CW (PORT_PEN_MODE_X (port)))
|
||||
|
||||
/* field accessors for members which exist in both types and are in
|
||||
the same location */
|
||||
/* big endian byte order */
|
||||
#define PORT_DEVICE_X(port) (((GrafPtr) (port))->device)
|
||||
#define PORT_PEN_VIS_X(port) (((GrafPtr) (port))->pnVis)
|
||||
#define PORT_TX_FONT_X(port) (((GrafPtr) (port))->txFont)
|
||||
#define PORT_TX_FACE_X(port) (((GrafPtr) (port))->txFace)
|
||||
#define PORT_TX_MODE_X(port) (((GrafPtr) (port))->txMode)
|
||||
#define PORT_TX_SIZE_X(port) (((GrafPtr) (port))->txSize)
|
||||
#define PORT_SP_EXTRA_X(port) (((GrafPtr) (port))->spExtra)
|
||||
#define PORT_FG_COLOR_X(port) (((GrafPtr) (port))->fgColor)
|
||||
#define PORT_BK_COLOR_X(port) (((GrafPtr) (port))->bkColor)
|
||||
#define PORT_COLR_BIT_X(port) (((GrafPtr) (port))->colrBit)
|
||||
#define PORT_PAT_STRETCH_X(port) (((GrafPtr) (port))->patStretch)
|
||||
#define PORT_PIC_SAVE_X(port) (((GrafPtr) (port))->picSave)
|
||||
#define PORT_REGION_SAVE_X(port) (((GrafPtr) (port))->rgnSave)
|
||||
#define PORT_POLY_SAVE_X(port) (((GrafPtr) (port))->polySave)
|
||||
/* NOTE: this returns a different type depending if
|
||||
the argument is a CGrafPort or not */
|
||||
#define PORT_GRAF_PROCS_X(port) (((GrafPtr) (port))->grafProcs)
|
||||
/* native byte order */
|
||||
#define PORT_DEVICE(port) (CW (PORT_DEVICE_X (port)))
|
||||
#define PORT_PEN_VIS(port) (CW (PORT_PEN_VIS_X (port)))
|
||||
#define PORT_TX_FONT(port) (CW (PORT_TX_FONT_X (port)))
|
||||
#define PORT_TX_FACE(port) (PORT_TX_FACE_X (port))
|
||||
#define PORT_TX_MODE(port) (CW (PORT_TX_MODE_X (port)))
|
||||
#define PORT_TX_SIZE(port) (CW (PORT_TX_SIZE_X (port)))
|
||||
#define PORT_SP_EXTRA(port) (CL (PORT_SP_EXTRA_X (port)))
|
||||
#define PORT_FG_COLOR(port) (CL (PORT_FG_COLOR_X (port)))
|
||||
#define PORT_BK_COLOR(port) (CL (PORT_BK_COLOR_X (port)))
|
||||
#define PORT_COLR_BIT(port) (CW (PORT_COLR_BIT_X (port)))
|
||||
#define PORT_PAT_STRETCH(port) (CW (PORT_PAT_STRETCH_X (port)))
|
||||
#define PORT_PIC_SAVE(port) (MR (PORT_PIC_SAVE_X (port)))
|
||||
#define PORT_REGION_SAVE(port) (MR (PORT_REGION_SAVE_X (port)))
|
||||
#define PORT_POLY_SAVE(port) (MR (PORT_POLY_SAVE_X (port)))
|
||||
/* NOTE: this returns a different type depending if
|
||||
the argument is a CGrafPort or not */
|
||||
#define PORT_GRAF_PROCS(port) (MR (PORT_GRAF_PROCS_X (port)))
|
||||
|
||||
/* accessors for fields which exist only in basic quickdraw graphics
|
||||
ports */
|
||||
#define PORT_BITS(port) (ASSERT_NOT_CPORT(port)->portBits)
|
||||
|
||||
#define PORT_BK_PAT(port) (ASSERT_NOT_CPORT(port)->bkPat)
|
||||
|
||||
#define PORT_FILL_PAT(port) (ASSERT_NOT_CPORT(port)->fillPat)
|
||||
|
||||
#define PORT_PEN_PAT(port) (ASSERT_NOT_CPORT(port)->pnPat)
|
||||
|
||||
/* accessors for fields which exist only in color quick draw graphics
|
||||
ports */
|
||||
/* aggregate type fields do not require byte swapping */
|
||||
|
||||
#define CPORT_RGB_FG_COLOR(cport) (ASSERT_CPORT(cport)->rgbFgColor)
|
||||
|
||||
#define CPORT_RGB_BK_COLOR(cport) (ASSERT_CPORT(cport)->rgbBkColor)
|
||||
/* big endian byte order */
|
||||
#define CPORT_PIXMAP_X(cport) (ASSERT_CPORT(cport)->portPixMap)
|
||||
|
||||
#define CPORT_PIXMAP_X_NO_ASSERT(cport) (((CGrafPtr) (cport))->portPixMap)
|
||||
|
||||
#define CPORT_VERSION_X(cport) (ASSERT_CPORT(cport)->portVersion)
|
||||
|
||||
#define CPORT_VERSION_X_NO_ASSERT(cport) (((CGrafPtr) (cport))->portVersion)
|
||||
|
||||
#define CPORT_CH_EXTRA_X(cport) (ASSERT_CPORT(cport)->chExtra)
|
||||
|
||||
#define CPORT_PENLOC_HFRAC_X(cport) (ASSERT_CPORT(cport)->pnLocHFrac)
|
||||
|
||||
#define CPORT_BK_PIXPAT_X(cport) (ASSERT_CPORT(cport)->bkPixPat)
|
||||
|
||||
#define CPORT_FILL_PIXPAT_X(cport) (ASSERT_CPORT(cport)->fillPixPat)
|
||||
|
||||
#define CPORT_PEN_PIXPAT_X(cport) (ASSERT_CPORT(cport)->pnPixPat)
|
||||
|
||||
#define CPORT_GRAFVARS_X(cport) (ASSERT_CPORT(cport)->grafVars)
|
||||
|
||||
/* native byte order */
|
||||
#define CPORT_PIXMAP(cport) (MR (CPORT_PIXMAP_X (cport)))
|
||||
#define CPORT_VERSION(cport) (CW (CPORT_VERSION_X (cport)))
|
||||
#define CPORT_CH_EXTRA(cport) (CW (CPORT_CH_EXTRA_X (cport)))
|
||||
#define CPORT_PENLOC_HFRAC(cport) (CW (CPORT_PENLOC_HFRAC_X (cport)))
|
||||
#define CPORT_BK_PIXPAT(cport) (MR (CPORT_BK_PIXPAT_X (cport)))
|
||||
#define CPORT_FILL_PIXPAT(cport) (MR (CPORT_FILL_PIXPAT_X (cport)))
|
||||
#define CPORT_PEN_PIXPAT(cport) (MR (CPORT_PEN_PIXPAT_X (cport)))
|
||||
#define CPORT_GRAFVARS(cport) ((GrafVarsHandle) MR (CPORT_GRAFVARS_X (cport)))
|
||||
|
||||
#define CPORT_OP_COLOR(cport) \
|
||||
(HxX ((GrafVarsHandle) CPORT_GRAFVARS (cport), rgbOpColor))
|
||||
#define CPORT_HILITE_COLOR(cport) \
|
||||
(HxX ((GrafVarsHandle) CPORT_GRAFVARS (cport), rgbHiliteColor))
|
||||
|
||||
/* general purpose accessor functions */
|
||||
/* return the bounds of a port, whether it is a GrafPort or CGrafPort */
|
||||
#define PORT_BOUNDS(port) \
|
||||
(*(Rect *) (CGrafPort_p (port) \
|
||||
? &PIXMAP_BOUNDS (CPORT_PIXMAP ((CGrafPtr) port)) \
|
||||
: &(PORT_BITS ((GrafPtr) port).bounds)))
|
||||
|
||||
#define PORT_BASEADDR_X(port) \
|
||||
(CGrafPort_p (port) \
|
||||
? PIXMAP_BASEADDR_X (CPORT_PIXMAP ((CGrafPtr) port)) \
|
||||
: PORT_BITS ((GrafPtr) port).baseAddr)
|
||||
#define PORT_BASEADDR(port) (MR (PORT_BASEADDR_X (port)))
|
||||
|
||||
/* return TRUE if the given bitmap has the same baseAddr, rowBytes and
|
||||
bounds as thePort's bits (portBits or portPixMap) */
|
||||
#define BITMAP_IS_THEPORT_P(bitmap) \
|
||||
(! memcmp (bitmap, \
|
||||
(CGrafPort_p (thePort) \
|
||||
? (BitMap *) STARH (CPORT_PIXMAP (theCPort)) \
|
||||
: &PORT_BITS (thePort)), \
|
||||
sizeof (BitMap)))
|
||||
|
||||
/* Return the port bits of the given port suitable for passing
|
||||
too StdBits () or CopyBits ();
|
||||
offsetof (GrafPort, portBits) == offsetof (CGrafPort, portPixMap) */
|
||||
#define PORT_BITS_FOR_COPY(port) \
|
||||
((BitMap *) ((char *) (port) + offsetof (GrafPort, portBits)))
|
||||
|
||||
#define IS_PIXMAP_PTR_P(ptr) \
|
||||
((((BitMap *) ptr) -> rowBytes & CWC (1 << 15)) \
|
||||
&& !(((BitMap *) ptr) -> rowBytes & CWC (1 << 14)))
|
||||
|
||||
/* PixMap accessors */
|
||||
#define PIXMAP_BOUNDS(pixmap) (HxX (pixmap, bounds))
|
||||
|
||||
/* big endian byte order */
|
||||
#define PIXMAP_BASEADDR_X(pixmap) (HxX (pixmap, baseAddr))
|
||||
|
||||
#define ROWBYTES_VALUE_BITS (0x3FFF)
|
||||
#define ROWBYTES_VALUE_BITS_X (CWC (ROWBYTES_VALUE_BITS))
|
||||
|
||||
#define ROWBYTES_FLAG_BITS (3 << 14)
|
||||
#define ROWBYTES_FLAG_BITS_X (CWC (ROWBYTES_FLAG_BITS))
|
||||
#define PIXMAP_FLAGS_X(pixmap) \
|
||||
(HxX (pixmap, rowBytes) & ROWBYTES_FLAG_BITS_X)
|
||||
#define PIXMAP_FLAGS(pixmap) (CW (PIXMAP_FLAGS_X (pixmap)))
|
||||
|
||||
/* ### phase out; eventually i'd like to see consistent use of
|
||||
`row_bytes', not `rowbytes' */
|
||||
#define PIXMAP_DEFAULT_ROWBYTES_X (CWC (1 << 15))
|
||||
#define PIXMAP_DEFAULT_ROWBYTES (1 << 15)
|
||||
|
||||
#define PIXMAP_DEFAULT_ROW_BYTES_X (CWC (1 << 15))
|
||||
#define PIXMAP_DEFAULT_ROW_BYTES (1 << 15)
|
||||
|
||||
/* the high two bits of the rowbytes field of a {c}grafport/pixmap
|
||||
is reserved; and has the following meaning(s): */
|
||||
#define PIXMAP_FLAG_BITS_X (CWC (2 << 14))
|
||||
#define CPORT_FLAG_BITS_X (CWC (3 << 14))
|
||||
|
||||
/* this bit of the port version field of a cgrafport indicates
|
||||
the cgrafptr is really a gworldptr */
|
||||
#define GW_FLAG_BIT_X (CWC (1))
|
||||
|
||||
#define GWorld_p(port) \
|
||||
(CGrafPort_p (port) \
|
||||
&& (CPORT_VERSION_X (port) & GW_FLAG_BIT_X))
|
||||
|
||||
#define PIXMAP_ROWBYTES_X(pixmap) \
|
||||
(HxX (pixmap, rowBytes) & ROWBYTES_VALUE_BITS_X)
|
||||
#define PIXMAP_ROWBYTES(pixmap) (CW (PIXMAP_ROWBYTES_X (pixmap)))
|
||||
|
||||
#define PIXMAP_SET_ROWBYTES_X(pixmap, value) \
|
||||
(HxX (pixmap, rowBytes) \
|
||||
= (((value) & ROWBYTES_VALUE_BITS_X) | PIXMAP_FLAGS_X (pixmap)))
|
||||
|
||||
#define PIXMAP_VERSION_X(pixmap) (HxX (pixmap, pmVersion))
|
||||
#define PIXMAP_PACK_TYPE_X(pixmap) (HxX (pixmap, packType))
|
||||
#define PIXMAP_PACK_SIZE_X(pixmap) (HxX (pixmap, packSize))
|
||||
#define PIXMAP_HRES_X(pixmap) (HxX (pixmap, hRes))
|
||||
#define PIXMAP_VRES_X(pixmap) (HxX (pixmap, vRes))
|
||||
#define PIXMAP_PIXEL_TYPE_X(pixmap) (HxX (pixmap, pixelType))
|
||||
#define PIXMAP_PIXEL_SIZE_X(pixmap) (HxX (pixmap, pixelSize))
|
||||
#define PIXMAP_CMP_COUNT_X(pixmap) (HxX (pixmap, cmpCount))
|
||||
#define PIXMAP_CMP_SIZE_X(pixmap) (HxX (pixmap, cmpSize))
|
||||
#define PIXMAP_PLANE_BYTES_X(pixmap) (HxX (pixmap, planeBytes))
|
||||
#define PIXMAP_TABLE_X(pixmap) (HxX (pixmap, pmTable))
|
||||
|
||||
#define PIXMAP_ASSERT_NOT_SCREEN(pixmap) \
|
||||
gui_assert (! active_screen_addr_p (pixmap))
|
||||
|
||||
/* used for initializing this field to zero for future
|
||||
compatibility */
|
||||
#define PIXMAP_RESERVED_X(pixmap) (HxX (pixmap, pmReserved))
|
||||
/* native byte order */
|
||||
#define PIXMAP_BASEADDR(pixmap) (MR (PIXMAP_BASEADDR_X (pixmap)))
|
||||
|
||||
#define PIXMAP_VERSION(pixmap) (Cx (PIXMAP_VERSION_X (pixmap)))
|
||||
#define PIXMAP_PACK_TYPE(pixmap) (Cx (PIXMAP_PACK_TYPE_X (pixmap)))
|
||||
#define PIXMAP_PACK_SIZE(pixmap) (Cx (PIXMAP_PACK_SIZE_X (pixmap)))
|
||||
#define PIXMAP_HRES(pixmap) (Cx (PIXMAP_HRES_X (pixmap)))
|
||||
#define PIXMAP_VRES(pixmap) (Cx (PIXMAP_VRES_X (pixmap)))
|
||||
#define PIXMAP_PIXEL_TYPE(pixmap) (Cx (PIXMAP_PIXEL_TYPE_X (pixmap)))
|
||||
#define PIXMAP_PIXEL_SIZE(pixmap) (Cx (PIXMAP_PIXEL_SIZE_X (pixmap)))
|
||||
#define PIXMAP_CMP_COUNT(pixmap) (Cx (PIXMAP_CMP_COUNT_X (pixmap)))
|
||||
#define PIXMAP_CMP_SIZE(pixmap) (Cx (PIXMAP_CMP_SIZE_X (pixmap)))
|
||||
#define PIXMAP_PLANE_BYTES(pixmap) (Cx (PIXMAP_PLANE_BYTES_X (pixmap)))
|
||||
#define PIXMAP_TABLE(pixmap) (MR (PIXMAP_TABLE_X (pixmap)))
|
||||
#define PIXMAP_TABLE_AS_OFFSET(pixmap) (CL ((int32) PIXMAP_TABLE_X (pixmap)))
|
||||
|
||||
#define WRAPPER_PIXMAP_FOR_COPY(wrapper_decl_name) \
|
||||
BitMap *wrapper_decl_name = (BitMap *) alloca (sizeof (BitMap))
|
||||
|
||||
#define WRAPPER_SET_PIXMAP_X(wrapper, pixmap_h) \
|
||||
do \
|
||||
{ \
|
||||
(wrapper)->rowBytes = CWC (3 << 14); \
|
||||
(wrapper)->baseAddr = (Ptr) (pixmap_h); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
/* PixPat accessors */
|
||||
enum pixpat_pattern_types
|
||||
{
|
||||
pixpat_type_orig = 0,
|
||||
pixpat_type_color = 1,
|
||||
pixpat_type_rgb = 2,
|
||||
|
||||
pixpat_old_style_pattern = 0,
|
||||
pixpat_color_pattern = 1,
|
||||
pixpat_rgb_pattern = 2,
|
||||
};
|
||||
#define PIXPAT_1DATA(pixpat) (HxX (pixpat, pat1Data))
|
||||
|
||||
/* big endian byte order */
|
||||
#if 0
|
||||
#define PIXPAT_TYPE_X(pixpat) (HxX (pixpat, patType))
|
||||
#define PIXPAT_MAP_X(pixpat) (HxX (pixpat, patMap))
|
||||
#define PIXPAT_DATA_X(pixpat) (HxX (pixpat, patData))
|
||||
#define PIXPAT_XDATA_X(pixpat) (HxX (pixpat, patXData))
|
||||
#define PIXPAT_XVALID_X(pixpat) (HxX (pixpat, patXValid))
|
||||
#define PIXPAT_XMAP_X(pixpat) (HxX (pixpat, patXMap))
|
||||
#else
|
||||
#define PIXPAT_TYPE_X(pixpat) (MR ((pixpat)->p)->patType)
|
||||
#define PIXPAT_MAP_X(pixpat) (MR ((pixpat)->p)->patMap)
|
||||
#define PIXPAT_DATA_X(pixpat) (MR ((pixpat)->p)->patData)
|
||||
#define PIXPAT_XDATA_X(pixpat) (MR ((pixpat)->p)->patXData)
|
||||
#define PIXPAT_XVALID_X(pixpat) (MR ((pixpat)->p)->patXValid)
|
||||
#define PIXPAT_XMAP_X(pixpat) (MR ((pixpat)->p)->patXMap)
|
||||
#endif
|
||||
/* native byte order */
|
||||
#define PIXPAT_TYPE(pixpat) (CW (PIXPAT_TYPE_X (pixpat)))
|
||||
#define PIXPAT_MAP(pixpat) (MR (PIXPAT_MAP_X (pixpat)))
|
||||
#define PIXPAT_DATA(pixpat) (MR (PIXPAT_DATA_X (pixpat)))
|
||||
#define PIXPAT_DATA_AS_OFFSET(pixpat) (CL ((int32) PIXPAT_DATA_X (pixpat)))
|
||||
#define PIXPAT_XDATA(pixpat) (MR (PIXPAT_XDATA_X (pixpat)))
|
||||
#define PIXPAT_XVALID(pixpat) (CW (PIXPAT_XVALID_X (pixpat)))
|
||||
#define PIXPAT_XMAP(pixpat) ((PixMapHandle) MR (PIXPAT_XMAP_X (pixpat)))
|
||||
|
||||
/* BitMap accessors
|
||||
NOTE: these take `BitMap *'s, not BitMap handles */
|
||||
#define BITMAP_BOUNDS(bitmap) ((bitmap)->bounds)
|
||||
|
||||
#define BITMAP_FLAGS_X(bitmap) \
|
||||
((bitmap)->rowBytes & ROWBYTES_FLAG_BITS_X)
|
||||
#define BITMAP_FLAGS(pixmap) (CW (PIXMAP_FLAGS_X (pixmap)))
|
||||
|
||||
#define BITMAP_DEFAULT_ROWBYTES_X (CWC (0))
|
||||
|
||||
#define BITMAP_ROWBYTES_X(bitmap) \
|
||||
((unsigned short) (bitmap)->rowBytes & ~ROWBYTES_FLAG_BITS_X)
|
||||
#define BITMAP_ROWBYTES(bitmap) (CW (BITMAP_ROWBYTES_X (bitmap)))
|
||||
|
||||
#define BITMAP_SET_ROWBYTES_X(bitmap, value) \
|
||||
((bitmap)->rowBytes = (((value) & ~ROWBYTES_FLAG_BITS_X) \
|
||||
| BITMAP_FLAGS_X (bitmap)))
|
||||
|
||||
#define BITMAP_BASEADDR_X(bitmap) ((bitmap)->baseAddr)
|
||||
#define BITMAP_BASEADDR(bitmap) (MR (BITMAP_BASEADDR_X (bitmap)))
|
||||
|
||||
#define BITMAP_P(bitmap) (! ((bitmap)->rowBytes & PIXMAP_FLAG_BITS_X))
|
||||
|
||||
typedef BitMap blt_bitmap_t;
|
||||
|
||||
/* color table accessors */
|
||||
/* number of bytes of storage needed for a color table whose max
|
||||
element (number of elements - 1) is `max_elt' */
|
||||
#define CTAB_STORAGE_FOR_SIZE(max_elt) \
|
||||
(sizeof (ColorTable) + ((max_elt) * sizeof (ColorSpec)))
|
||||
|
||||
/* color table flags */
|
||||
#define CTAB_GDEVICE_BIT_X (CWC (1 << 15))
|
||||
#define CTAB_GDEVICE_BIT (1 << 15)
|
||||
|
||||
#define CTAB_TABLE(ctab) (HxX ((ctab), ctTable))
|
||||
|
||||
#define CTAB_SEED_X(ctab) (HxX ((ctab), ctSeed))
|
||||
#define CTAB_FLAGS_X(ctab) (HxX ((ctab), ctFlags))
|
||||
#define CTAB_SIZE_X(ctab) (HxX ((ctab), ctSize))
|
||||
|
||||
#define CTAB_SEED(ctab) (Cx (CTAB_SEED_X (ctab)))
|
||||
#define CTAB_FLAGS(ctab) (Cx (CTAB_FLAGS_X (ctab)))
|
||||
#define CTAB_SIZE(ctab) (Cx (CTAB_SIZE_X (ctab)))
|
||||
|
||||
/* flags for the value bits of device-type color
|
||||
tables */
|
||||
#define CTAB_VALUE_ID_BITS_X CWC (0xFF)
|
||||
#define CTAB_VALUE_ID_BITS (0xFF)
|
||||
|
||||
#define CTAB_RESERVED_BIT_X (CWC (0x4000))
|
||||
#define CTAB_RESERVED_BIT (0x4000)
|
||||
|
||||
#define CTAB_PROTECTED_BIT_X (CWC (0x8000))
|
||||
#define CTAB_PROTECTED_BIT (0x8000)
|
||||
|
||||
#define CTAB_TOLERANT_BIT_X (CWC (0x2000))
|
||||
#define CTAB_TOLERANT_BIT (0x2000)
|
||||
|
||||
#define CTAB_PENDING_BIT_X (CWC (0x1000))
|
||||
#define CTAB_PENDING_BIT (0x1000)
|
||||
|
||||
/* accessor macro to avoid byte swap. */
|
||||
#define COLORSPEC_VALUE_LOW_BYTE(cspec) (((uint8 *)&((cspec)->value))[1])
|
||||
|
||||
/* inverse color table accessors */
|
||||
#define ITAB_TABLE(itab) (HxX ((itab), iTTable))
|
||||
|
||||
#define ITAB_SEED_X(itab) (HxX ((itab), iTabSeed))
|
||||
#define ITAB_RES_X(itab) (HxX ((itab), iTabRes))
|
||||
|
||||
#define ITAB_SEED(itab) (Cx (ITAB_SEED_X (itab)))
|
||||
#define ITAB_RES(itab) (Cx (ITAB_RES_X (itab)))
|
||||
|
||||
/* graphics device accessors */
|
||||
#define GD_RECT(gdhandle) (HxX (gdhandle, gdRect))
|
||||
#define GD_BOUNDS(gdhandle) PIXMAP_BOUNDS (GD_PMAP (gdhandle))
|
||||
|
||||
#define GD_REF_NUM_X(gdhandle) (HxX (gdhandle, gdRefNum))
|
||||
#define GD_ID_X(gdhandle) (HxX (gdhandle, gdID))
|
||||
#define GD_TYPE_X(gdhandle) (HxX (gdhandle, gdType))
|
||||
#define GD_ITABLE_X(gdhandle) (HxX (gdhandle, gdITable))
|
||||
#define GD_RES_PREF_X(gdhandle) (HxX (gdhandle, gdResPref))
|
||||
#define GD_SEARCH_PROC_X(gdhandle) (HxX (gdhandle, gdSearchProc))
|
||||
#define GD_COMP_PROC_X(gdhandle) (HxX (gdhandle, gdCompProc))
|
||||
#define GD_FLAGS_X(gdhandle) (HxX (gdhandle, gdFlags))
|
||||
#define GD_PMAP_X(gdhandle) (HxX (gdhandle, gdPMap))
|
||||
#define GD_REF_CON_X(gdhandle) (HxX (gdhandle, gdRefCon))
|
||||
#define GD_NEXT_GD_X(gdhandle) (HxX (gdhandle, gdNextGD))
|
||||
#define GD_MODE_X(gdhandle) (HxX (gdhandle, gdMode))
|
||||
|
||||
#define GD_CCBYTES_X(gdhandle) (HxX (gdhandle, gdCCBytes))
|
||||
#define GD_CCDEPTH_X(gdhandle) (HxX (gdhandle, gdCCDepth))
|
||||
#define GD_CCXDATA_X(gdhandle) (HxX (gdhandle, gdCCXData))
|
||||
#define GD_CCXMASK_X(gdhandle) (HxX (gdhandle, gdCCXMask))
|
||||
|
||||
#define GD_RESERVED_X(gdhandle) (HxX (gdhandle, gdReserved))
|
||||
|
||||
#define GD_REF_NUM(gdhandle) (Cx (GD_REF_NUM_X (gdhandle)))
|
||||
#define GD_ID(gdhandle) (Cx (GD_ID_X (gdhandle)))
|
||||
#define GD_TYPE(gdhandle) (Cx (GD_TYPE_X (gdhandle)))
|
||||
#define GD_ITABLE(gdhandle) (MR (GD_ITABLE_X (gdhandle)))
|
||||
#define GD_RES_PREF(gdhandle) (Cx (GD_RES_PREF_X (gdhandle)))
|
||||
#define GD_SEARCH_PROC(gdhandle) (MR (GD_SEARCH_PROC_X (gdhandle)))
|
||||
#define GD_COMP_PROC(gdhandle) (MR (GD_COMP_PROC_X (gdhandle)))
|
||||
#define GD_FLAGS(gdhandle) (Cx (GD_FLAGS_X (gdhandle)))
|
||||
#define GD_PMAP(gdhandle) (MR (GD_PMAP_X (gdhandle)))
|
||||
#define GD_REF_CON(gdhandle) (Cx (GD_REF_CON_X (gdhandle)))
|
||||
#define GD_NEXT_GD(gdhandle) (MR (GD_NEXT_GD_X (gdhandle)))
|
||||
#define GD_MODE(gdhandle) (Cx (GD_MODE_X (gdhandle)))
|
||||
|
||||
#define GD_CCBYTES(gdhandle) (CW (GD_CCBYTES_X (gdhandle)))
|
||||
#define GD_CCDEPTH(gdhandle) (CW (GD_CCDEPTH_X (gdhandle)))
|
||||
#define GD_CCXDATA(gdhandle) (MR (GD_CCXDATA_X (gdhandle)))
|
||||
#define GD_CCXMASK(gdhandle) (MR (GD_CCXMASK_X (gdhandle)))
|
||||
|
||||
/* color icon accessors */
|
||||
#define CICON_PMAP(cicon) (HxX (cicon, iconPMap))
|
||||
#define CICON_MASK(cicon) (HxX (cicon, iconMask))
|
||||
#define CICON_BMAP(cicon) (HxX (cicon, iconBMap))
|
||||
#define CICON_MASK_DATA(cicon) (HxX (cicon, iconMaskData))
|
||||
|
||||
#define CICON_DATA_X(cicon) (HxX (cicon, iconData))
|
||||
#define CICON_DATA(cicon) (MR (CICON_DATA_X (cicon)))
|
||||
|
||||
#define CICON_P(icon) \
|
||||
({ \
|
||||
Handle _icon; \
|
||||
CIconHandle _cicon; \
|
||||
uint32 icon_size; \
|
||||
\
|
||||
_icon = (Handle) (icon); \
|
||||
icon_size = GetHandleSize (_icon); \
|
||||
_cicon = (CIconHandle) _icon; \
|
||||
\
|
||||
((icon_size < sizeof (CIcon)) \
|
||||
? FALSE \
|
||||
: (icon_size == (sizeof (CIcon) \
|
||||
- sizeof (int16) \
|
||||
+ (RECT_HEIGHT (&BITMAP_BOUNDS (&CICON_PMAP (_cicon))) \
|
||||
* (BITMAP_ROWBYTES (&CICON_BMAP (_cicon)) \
|
||||
+ BITMAP_ROWBYTES (&CICON_MASK (_cicon))))))); \
|
||||
})
|
||||
|
||||
/* palette accessors */
|
||||
/* number of bytes of storage needed for a palette which
|
||||
contains `n_entries' entries */
|
||||
#define PALETTE_STORAGE_FOR_ENTRIES(n_entries) \
|
||||
(sizeof (Palette) + ((n_entries - 1) * sizeof (ColorInfo)))
|
||||
|
||||
#define PALETTE_DATA_FIELDS(palette) (HxX (palette, pmDataFields))
|
||||
#define PALETTE_INFO(palette) (HxX (palette, pmInfo))
|
||||
|
||||
#define PALETTE_ENTRIES_X(palette) (HxX (palette, pmEntries))
|
||||
#define PALETTE_WINDOW_X(palette) (HxX (palette, pmWindow))
|
||||
#define PALETTE_PRIVATE_X(palette) (HxX (palette, pmPrivate))
|
||||
#define PALETTE_DEVICES_X(palette) (HxX (palette, pmDevices))
|
||||
#define PALETTE_SEEDS_X(palette) (HxX (palette, pmSeeds))
|
||||
|
||||
#define PALETTE_ENTRIES(palette) (CW (PALETTE_ENTRIES_X (palette)))
|
||||
#define PALETTE_WINDOW(palette) (MR (PALETTE_WINDOW_X (palette)))
|
||||
#define PALETTE_PRIVATE(palette) (CW (PALETTE_PRIVATE_X (palette)))
|
||||
#define PALETTE_DEVICES(palette) (MR (PALETTE_DEVICES_X (palette)))
|
||||
#define PALETTE_SEEDS(palette) (MR (PALETTE_SEEDS_X (palette)))
|
||||
|
||||
#define PALETTE_UPDATE_FLAG_BITS_X (CWC (0xE000))
|
||||
#define PALETTE_UPDATE_FLAG_BITS (0xE000)
|
||||
|
||||
#define CINFO_RESERVED_INDEX_BIT_X (CWC (0x8000))
|
||||
#define CINFO_RESERVED_INDEX_BIT (0x8000)
|
||||
|
||||
/* color cursor accessors */
|
||||
#define CCRSR_1DATA(ccrsr) (HxX (ccrsr, crsr1Data))
|
||||
#define CCRSR_MASK(ccrsr) (HxX (ccrsr, crsrMask))
|
||||
#define CCRSR_HOT_SPOT(ccrsr) (HxX (ccrsr, crsrHotSpot))
|
||||
|
||||
#define CCRSR_TYPE_X(ccrsr) (HxX (ccrsr, crsrType))
|
||||
#define CCRSR_MAP_X(ccrsr) (HxX (ccrsr, crsrMap))
|
||||
#define CCRSR_DATA_X(ccrsr) (HxX (ccrsr, crsrData))
|
||||
#define CCRSR_XDATA_X(ccrsr) (HxX (ccrsr, crsrXData))
|
||||
#define CCRSR_XVALID_X(ccrsr) (HxX (ccrsr, crsrXValid))
|
||||
#define CCRSR_XHANDLE_X(ccrsr) (HxX (ccrsr, crsrXHandle))
|
||||
#define CCRSR_XTABLE_X(ccrsr) (HxX (ccrsr, crsrXTable))
|
||||
#define CCRSR_ID_X(ccrsr) (HxX (ccrsr, crsrID))
|
||||
|
||||
#define CCRSR_TYPE(ccrsr) (CW (CCRSR_TYPE_X (ccrsr)))
|
||||
#define CCRSR_MAP(ccrsr) (MR (CCRSR_MAP_X (ccrsr)))
|
||||
#define CCRSR_DATA(ccrsr) (MR (CCRSR_DATA_X (ccrsr)))
|
||||
#define CCRSR_XDATA(ccrsr) (MR (CCRSR_XDATA_X (ccrsr)))
|
||||
#define CCRSR_XVALID(ccrsr) (CW (CCRSR_XVALID_X (ccrsr)))
|
||||
#define CCRSR_XHANDLE(ccrsr) (MR (CCRSR_XHANDLE_X (ccrsr)))
|
||||
#define CCRSR_XTABLE(ccrsr) (CL (CCRSR_XTABLE_X (ccrsr)))
|
||||
#define CCRSR_ID(ccrsr) (CL (CCRSR_ID_X (ccrsr)))
|
||||
|
||||
extern void cursor_reset_current_cursor (void);
|
||||
|
||||
#define IMV_XFER_MODE_P(mode) ((mode) >= blend && (mode) <= adMin)
|
||||
#define active_screen_addr_p(bitmap) \
|
||||
((bitmap)->baseAddr == PIXMAP_BASEADDR_X (GD_PMAP (MR (MainDevice))))
|
||||
|
||||
/* gd flags */
|
||||
#define gdDevType 0
|
||||
#define burstDevice 7
|
||||
#define ext32Device 8
|
||||
#define ramInit 10
|
||||
#define mainScreen 11
|
||||
#define allInit 12
|
||||
#define screenDevice 13
|
||||
#define noDriver 14
|
||||
#define screenActive 15
|
||||
|
||||
/* gd modes */
|
||||
#define GD_8BIT_INDIRECT_MODE 1
|
||||
|
||||
/* graphics device types */
|
||||
#define clutType 0
|
||||
#define fixedType 1
|
||||
#define directType 2
|
||||
|
||||
/* utilities for saving and restoring the drawing state (traditional
|
||||
pen state, color, and text state */
|
||||
typedef struct draw_state
|
||||
{
|
||||
PenState pen_state;
|
||||
|
||||
/* used only when the control owner is a cgrafport */
|
||||
RGBColor fg_color;
|
||||
RGBColor bk_color;
|
||||
|
||||
int32 fg;
|
||||
int32 bk;
|
||||
|
||||
/* text draw state */
|
||||
Style tx_face;
|
||||
int16 tx_font;
|
||||
int16 tx_mode;
|
||||
int16 tx_size;
|
||||
} draw_state_t;
|
||||
|
||||
extern void draw_state_save (draw_state_t *draw_state);
|
||||
extern void draw_state_restore (draw_state_t *draw_state);
|
||||
|
||||
extern struct qd_color_elt
|
||||
{
|
||||
RGBColor rgb;
|
||||
LONGINT value;
|
||||
} ROMlib_QDColors[];
|
||||
|
||||
typedef struct write_back_data
|
||||
{
|
||||
PixMap src_pm, dst_pm;
|
||||
Rect src_rect, dst_rect;
|
||||
} write_back_data_t;
|
||||
|
||||
void pixmap_free_copy (PixMap *pm);
|
||||
void pixmap_copy (const PixMap *src_pm, const Rect *src_rect,
|
||||
PixMap *return_pm, Rect *return_rect);
|
||||
boolean_t pixmap_copy_if_screen (const PixMap *src_pm, const Rect *src_rect,
|
||||
write_back_data_t *write_back_data);
|
||||
|
||||
extern int ROMlib_Cursor_color_p;
|
||||
extern Cursor ROMlib_Cursor;
|
||||
extern CCrsrHandle ROMlib_CCursor;
|
||||
|
||||
extern ColorSpec ctab_1bpp_values[];
|
||||
extern ColorSpec ctab_2bpp_values[];
|
||||
extern ColorSpec ctab_4bpp_values[];
|
||||
extern ColorSpec ctab_8bpp_values[];
|
||||
|
||||
extern ColorSpec ROMlib_white_cspec;
|
||||
extern ColorSpec ROMlib_black_cspec;
|
||||
extern ColorSpec ROMlib_gray_cspec;
|
||||
#define ROMlib_white_rgb_color (ROMlib_white_cspec.rgb)
|
||||
#define ROMlib_black_rgb_color (ROMlib_black_cspec.rgb)
|
||||
#define ROMlib_gray_rgb_color (ROMlib_gray_cspec.rgb)
|
||||
|
||||
extern Rect ROMlib_pattern_bounds;
|
||||
|
||||
extern CTabHandle ROMlib_dont_depthconv_ctab;
|
||||
extern CTabHandle ROMlib_bw_ctab;
|
||||
extern CTabHandle no_stdbits_color_conversion_color_table;
|
||||
extern CTabHandle validate_relative_bw_ctab ();
|
||||
extern CTabHandle validate_fg_bk_ctab ();
|
||||
|
||||
extern const int ROMlib_log2[];
|
||||
extern const uint32 ROMlib_pixel_tile_scale[];
|
||||
extern const uint32 ROMlib_pixel_size_mask[];
|
||||
|
||||
extern CTabHandle default_w_ctab;
|
||||
extern AuxWinHandle default_aux_win;
|
||||
extern AuxWinHandle *lookup_aux_win (WindowPtr w);
|
||||
|
||||
extern void ROMlib_color_init ();
|
||||
|
||||
extern Rect ROMlib_cursor_rect;
|
||||
|
||||
extern void ROMlib_blt_rgn_update_dirty_rect
|
||||
(RgnHandle, int16, boolean_t, int,
|
||||
const PixMap *, PixMap *,
|
||||
const Rect *, const Rect *,
|
||||
uint32, uint32);
|
||||
|
||||
extern void convert_pixmap (const PixMap *old_pixmap, PixMap *new_pixmap,
|
||||
const Rect *rect, CTabPtr conv_table);
|
||||
|
||||
#define ROMlib_invalidate_conversion_tables()
|
||||
/* extern void ROMlib_invalidate_conversion_tables (void); */
|
||||
|
||||
extern void scale_blt_bitmap (const blt_bitmap_t *src_bitmap,
|
||||
blt_bitmap_t *dst_bitmap,
|
||||
const Rect *old_rect, const Rect *new_rect,
|
||||
int log2_bits_per_pixel);
|
||||
|
||||
void
|
||||
convert_pixmap_with_IMV_mode (const PixMap *src1, const PixMap *src2,
|
||||
PixMap *dst,
|
||||
CTabHandle src1_ctabh, CTabHandle src2_ctabh,
|
||||
ITabHandle itabh,
|
||||
const Rect *r1, const Rect *r2,
|
||||
int16 mode, const RGBColor *op_color,
|
||||
boolean_t tile_src1_p,
|
||||
int pat_x_offset, int pat_y_offset);
|
||||
|
||||
void
|
||||
convert_transparent (const PixMap *src1, const PixMap *src2,
|
||||
PixMap *dst,
|
||||
const Rect *r1, const Rect *r2,
|
||||
int16 mode,
|
||||
boolean_t tile_src1_p,
|
||||
int pat_x_offset, int pat_y_offset);
|
||||
|
||||
extern void pm_front_window_maybe_changed_hook (void);
|
||||
extern void pm_window_closed (WindowPtr w);
|
||||
|
||||
extern void ctl_color_init (void);
|
||||
|
||||
extern CTabHandle ROMlib_empty_ctab (int size);
|
||||
extern void ROMlib_copy_ctab (CTabHandle src, CTabHandle dst);
|
||||
|
||||
extern PixPatHandle ROMlib_pattern_to_pixpat (Pattern p);
|
||||
|
||||
extern void ROMlib_blt_pn (RgnHandle, INTEGER);
|
||||
extern void ROMlib_blt_fill (RgnHandle, INTEGER);
|
||||
extern void ROMlib_blt_bk (RgnHandle, INTEGER);
|
||||
|
||||
extern void ROMlib_fill_pat (Pattern);
|
||||
extern void ROMlib_fill_pixpat (PixPatHandle);
|
||||
|
||||
extern RGBColor *ROMlib_qd_color_to_rgb (LONGINT);
|
||||
|
||||
extern void gd_allocate_main_device (void);
|
||||
extern void gd_set_main_device_bpp (void);
|
||||
extern void gd_set_bpp (GDHandle gd, boolean_t color_p, boolean_t fixed_p,
|
||||
int bpp);
|
||||
extern void ROMlib_InitGWorlds (void);
|
||||
|
||||
extern void pixmap_set_pixel_fields (PixMap *pixmap, int bpp);
|
||||
extern const rgb_spec_t *pixmap_rgb_spec (const PixMap *pixmap);
|
||||
|
||||
extern void pixmap_black_white (const PixMap *pixmap,
|
||||
uint32 *black_return, uint32 *white_return);
|
||||
extern void gd_black_white (GDHandle gdh,
|
||||
uint32 *black_return, uint32 *white_return);
|
||||
|
||||
extern rgb_spec_t mac_16bpp_rgb_spec, mac_32bpp_rgb_spec;
|
||||
|
||||
extern int average_color (GDHandle gdev,
|
||||
RGBColor *c1, RGBColor *c2, int ratio,
|
||||
RGBColor *out);
|
||||
|
||||
extern int16 xStdTxMeas (int16 n, uint8 *p, Point *nump, Point *denp,
|
||||
FontInfo *finfop, int16 *charlocp);
|
||||
|
||||
extern void ROMlib_fg_bk (uint32 *fg_pixel_out, uint32 *bk_pixel_out,
|
||||
RGBColor *fg_rgb_out, RGBColor *bk_rgb_out,
|
||||
const rgb_spec_t *rgb_spec,
|
||||
boolean_t active_screen_addr_p,
|
||||
boolean_t src_blt_p);
|
||||
|
||||
extern void canonical_from_bogo_color (uint32 index,
|
||||
const rgb_spec_t *rgb_spec,
|
||||
uint32 *pixel_out,
|
||||
RGBColor *rgb_out);
|
||||
|
||||
#define AVERAGE_COLOR(c1, c2, ratio, out) \
|
||||
(average_color (MR (TheGDevice), (c1), (c2), (ratio), (out)))
|
||||
|
||||
extern Handle ROMlib_copy_handle (Handle);
|
||||
|
||||
#define DEFAULT_ITABLE_RESOLUTION 4
|
||||
|
||||
/* this probably belongs elsewhere as well */
|
||||
#define THEPORT_SAVE_EXCURSION(thePort_new, body) \
|
||||
do { GrafPtr thePort_saveX = thePortX; \
|
||||
SetPort (thePort_new); \
|
||||
body \
|
||||
thePortX = thePort_saveX; } while (0)
|
||||
|
||||
#define THEGDEVICE_SAVE_EXCURSION(TheGDevice_new, body) \
|
||||
do { GDHandle TheGDevice_save = MR (TheGDevice); \
|
||||
SetGDevice (TheGDevice_new); \
|
||||
body \
|
||||
SetGDevice (TheGDevice_save); } while (0)
|
||||
|
||||
#endif /* _CQUICK_H_ */
|
||||
14
src/include/rsys/crc.h
Normal file
14
src/include/rsys/crc.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#if !defined (_RSYS_CRC_H_)
|
||||
#define _RSYS_CRC_H_
|
||||
|
||||
/*
|
||||
* Copyright 1995 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: crc.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
extern short getthecrc(ResType type, long id);
|
||||
extern unsigned short ROMlib_crcccitt(unsigned char *data, long length);
|
||||
|
||||
#endif /* _RSYS_CRC_H_ */
|
||||
39
src/include/rsys/cruft.h
Normal file
39
src/include/rsys/cruft.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#if !defined (_CRUFT_H_)
|
||||
#define _CRUFT_H_
|
||||
|
||||
/* These are old #defines, for backwards compatibility, or #defines that
|
||||
* I don't understand why we want them.
|
||||
*/
|
||||
|
||||
#if !defined (BINCOMPAT)
|
||||
# define BINCOMPAT
|
||||
#endif
|
||||
|
||||
#if !defined (PRIVATE)
|
||||
# define PRIVATE
|
||||
#endif
|
||||
|
||||
#if !defined (PUBLIC)
|
||||
# define PUBLIC
|
||||
#endif
|
||||
|
||||
#if !defined (pascal)
|
||||
# define pascal
|
||||
#endif
|
||||
|
||||
#if !defined (trap)
|
||||
# define trap
|
||||
#endif
|
||||
|
||||
#if !defined (a0trap)
|
||||
# define a0trap
|
||||
#endif
|
||||
|
||||
#if !defined (OSASSIGN)
|
||||
# define OSASSIGN(d, s) ((d) = (s))
|
||||
#endif
|
||||
|
||||
#define TRAPBEGIN()
|
||||
#define TRAPEND()
|
||||
|
||||
#endif /* !_CRUFT_H_ */
|
||||
132
src/include/rsys/ctl.h
Normal file
132
src/include/rsys/ctl.h
Normal file
@@ -0,0 +1,132 @@
|
||||
#if !defined(_CTL_H_)
|
||||
#define _CTL_H_
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990, 1995 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: ctl.h 85 2005-05-24 22:06:13Z ctm $
|
||||
*/
|
||||
|
||||
#include "ControlMgr.h"
|
||||
#include "MenuMgr.h"
|
||||
#include "MemoryMgr.h"
|
||||
#include "ResourceMgr.h"
|
||||
|
||||
#include "rsys/mman.h"
|
||||
#include "rsys/cquick.h"
|
||||
#include "rsys/pstuff.h"
|
||||
|
||||
extern const ColorSpec default_ctl_colors[];
|
||||
extern CTabHandle default_ctl_ctab;
|
||||
extern AuxCtlHandle default_aux_ctl;
|
||||
|
||||
/* accessor macros */
|
||||
#define CTL_RECT(ctl) (HxX (ctl, contrlRect))
|
||||
#define CTL_TITLE(ctl) (HxX (ctl, contrlTitle))
|
||||
|
||||
#define CTL_NEXT_CONTROL_X(ctl) (HxX (ctl, nextControl))
|
||||
#define CTL_OWNER_X(ctl) (HxX (ctl, contrlOwner))
|
||||
#define CTL_VIS_X(ctl) (HxX (ctl, contrlVis))
|
||||
#define CTL_HILITE_X(ctl) (HxX (ctl, contrlHilite))
|
||||
#define CTL_VALUE_X(ctl) (HxX (ctl, contrlValue))
|
||||
#define CTL_MIN_X(ctl) (HxX (ctl, contrlMin))
|
||||
#define CTL_MAX_X(ctl) (HxX (ctl, contrlMax))
|
||||
|
||||
#define CTL_DEFPROC_X(ctl) (HxX (ctl, contrlDefProc))
|
||||
#define CTL_DATA_X(ctl) (HxX (ctl, contrlData))
|
||||
#define CTL_ACTION_X(ctl) (HxX (ctl, contrlAction))
|
||||
#define CTL_REF_CON_X(ctl) (HxX (ctl, contrlRfCon))
|
||||
|
||||
#define CTL_NEXT_CONTROL(ctl) (MR (CTL_NEXT_CONTROL_X (ctl)))
|
||||
#define CTL_OWNER(ctl) (MR (CTL_OWNER_X (ctl)))
|
||||
#define CTL_VIS(ctl) (CTL_VIS_X (ctl))
|
||||
#define CTL_HILITE(ctl) ((uint8) CTL_HILITE_X (ctl))
|
||||
#define CTL_VALUE(ctl) (CW (CTL_VALUE_X (ctl)))
|
||||
#define CTL_MIN(ctl) (CW (CTL_MIN_X (ctl)))
|
||||
#define CTL_MAX(ctl) (CW (CTL_MAX_X (ctl)))
|
||||
#define CTL_DEFPROC(ctl) (MR (CTL_DEFPROC_X (ctl)))
|
||||
#define CTL_DATA(ctl) ((RgnHandle) MR (CTL_DATA_X (ctl)))
|
||||
#define CTL_ACTION(ctl) (MR (CTL_ACTION_X (ctl)))
|
||||
#define CTL_ACTION_AS_LONG(ctl) (CL ((LONGINT) CTL_ACTION_X (ctl)))
|
||||
#define CTL_REF_CON(ctl) (CL (CTL_REF_CON_X (ctl)))
|
||||
|
||||
extern CTabHandle default_ctl_ctab;
|
||||
extern AuxCtlHandle *lookup_aux_ctl (ControlHandle ctl);
|
||||
|
||||
extern int32 C_cdef0 (int16 var, ControlHandle ctl, int16 mess,
|
||||
int32 param);
|
||||
extern int32 C_cdef16 (int16 var, ControlHandle ctl, int16 mess,
|
||||
int32 param);
|
||||
extern int32 C_cdef1008 (int16 var, ControlHandle ctl, int16 mess,
|
||||
int32 param);
|
||||
|
||||
#define VAR(w) (GetCVariant((w)))
|
||||
|
||||
extern BOOLEAN ROMlib_dirtyvariant;
|
||||
|
||||
extern void sb_ctl_init (void);
|
||||
|
||||
typedef pascal LONGINT
|
||||
(*ctlfuncp)(INTEGER var, ControlHandle ctl, INTEGER mess, LONGINT param);
|
||||
|
||||
extern LONGINT ROMlib_ctlcall (ControlHandle c, INTEGER i, LONGINT l);
|
||||
#define CTLCALL(c, i, l) ROMlib_ctlcall((c), (i), (l))
|
||||
|
||||
#define CTL_CALL_EXCURSION(control, body) \
|
||||
THEPORT_SAVE_EXCURSION (CTL_OWNER (control), { body })
|
||||
|
||||
#define ENTIRECONTROL 0
|
||||
#define MAXPARTCODE 253
|
||||
#define INACTIVE 255
|
||||
#define ALLINDICATORS 129
|
||||
|
||||
#define POPUP_MENU_X(popup) (HxX (popup, menu))
|
||||
#define POPUP_MENU_ID_X(popup) (HxX (popup, menu_id))
|
||||
|
||||
#define POPUP_MENU_ID(popup) (CW (POPUP_MENU_ID_X (popup)))
|
||||
#define POPUP_MENU(popup) (MR (POPUP_MENU_X (popup)))
|
||||
|
||||
#define POPUP_TITLE_WIDTH(popup) (HxX (popup, title_width))
|
||||
#define POPUP_FLAGS(popup) (HxX (popup, flags))
|
||||
|
||||
struct popup_data
|
||||
{
|
||||
MenuHandle menu PACKED_P;
|
||||
int16 menu_id PACKED;
|
||||
|
||||
/* private fields */
|
||||
int16 title_width;
|
||||
int flags;
|
||||
};
|
||||
|
||||
typedef struct popup_data popup_data_t;
|
||||
typedef popup_data_t *popup_data_ptr;
|
||||
typedef struct { popup_data_ptr p PACKED_P; } hidden_popup_data_ptr;
|
||||
typedef hidden_popup_data_ptr *popup_data_handle;
|
||||
|
||||
extern BOOLEAN ROMlib_cdef0_is_rectangular;
|
||||
|
||||
extern void image_arrow_up_active_init (void);
|
||||
extern void image_arrow_up_inactive_init (void);
|
||||
extern void image_arrow_down_active_init (void);
|
||||
extern void image_arrow_down_inactive_init (void);
|
||||
extern void image_arrow_left_active_init (void);
|
||||
extern void image_arrow_left_inactive_init (void);
|
||||
extern void image_arrow_right_active_init (void);
|
||||
extern void image_arrow_right_inactive_init (void);
|
||||
extern void image_thumb_horiz_init (void);
|
||||
extern void image_thumb_vert_init (void);
|
||||
extern void image_active_init (void);
|
||||
extern void image_ractive_init (void);
|
||||
extern void image_go_away_init (void);
|
||||
extern void image_grow_init (void);
|
||||
extern void image_zoom_init (void);
|
||||
extern void image_apple_init (void);
|
||||
|
||||
extern void C_new_draw_scroll (INTEGER depth, INTEGER flags, GDHandle target,
|
||||
LONGINT l);
|
||||
|
||||
extern void C_new_pos_ctl (INTEGER depth, INTEGER flags, GDHandle target,
|
||||
LONGINT l);
|
||||
#endif /* !_CTL_H_ */
|
||||
1158
src/include/rsys/ctopflags.h
Normal file
1158
src/include/rsys/ctopflags.h
Normal file
File diff suppressed because it is too large
Load Diff
103
src/include/rsys/custom.h
Normal file
103
src/include/rsys/custom.h
Normal file
@@ -0,0 +1,103 @@
|
||||
#if !defined(_custom_h_)
|
||||
#define _custom_h_
|
||||
|
||||
/*
|
||||
* Copyright 1998 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: custom.h 131 2006-05-10 19:23:20Z ctm $
|
||||
*/
|
||||
|
||||
/*
|
||||
* misc. quantities needed by both Executor and the customization tool.
|
||||
*/
|
||||
|
||||
enum { CUSTOM_BLOCK_SIZE = 393216, }; /* enough room for splash screen
|
||||
and license */
|
||||
|
||||
#define CUSTOM_MAGIC 0xf6e0c5c9cb52e1bfLL
|
||||
|
||||
/* the following strings need to be unique in their first four characters */
|
||||
|
||||
#define CUSTOM_CHECKSUM "checksum"
|
||||
#define CUSTOM_CREATORS "creators"
|
||||
#define CUSTOM_LICENSE "license"
|
||||
#define CUSTOM_FIRST_SN "sn_first"
|
||||
#define CUSTOM_LAST_SN "sn_last"
|
||||
#define CUSTOM_SPLASH "splash"
|
||||
#define CUSTOM_ABOUT_BOX "about_box"
|
||||
#define CUSTOM_COPYRIGHT_INFO "copyright_info"
|
||||
#define CUSTOM_THANK_YOU_INFO "thank_you_info"
|
||||
#define CUSTOM_REGISTRATION_INSTRUCTIONS "registration_instructions"
|
||||
#define CUSTOM_MAGIC_VOLUMES "magic_volumes"
|
||||
#define CUSTOM_MUST_REGISTER "must_register"
|
||||
#define CUSTOM_MAC_CDROM "mac_cdrom"
|
||||
#define CUSTOM_DEMO_IDENTIFIER "demo_id"
|
||||
#define CUSTOM_DISABLE_COMMAND_KEYS "command_key_disable"
|
||||
#define CUSTOM_RESTART_STRING "restart_string"
|
||||
#define CUSTOM_MENU_ABOUT_STRING "menu_about_string"
|
||||
#define CUSTOM_VERSION_STRING "version_string"
|
||||
#define CUSTOM_SUFFIX_MAPS "suffix_maps"
|
||||
#define CUSTOM_DEFAULT_APP "default_app"
|
||||
#define CUSTOM_DEMO_DAYS "days_of_demo"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32 magic;
|
||||
uint32 length;
|
||||
}
|
||||
header_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint64 magic;
|
||||
header_t headers[0];
|
||||
uint8 filler[CUSTOM_BLOCK_SIZE - sizeof (uint64)];
|
||||
}
|
||||
custom_block_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
header_t head;
|
||||
uint32 val;
|
||||
}
|
||||
custom_val_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
header_t head;
|
||||
uint32 vals[0];
|
||||
}
|
||||
custom_vals_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
header_t head;
|
||||
uint8 chars[0];
|
||||
}
|
||||
custom_chars_t;
|
||||
|
||||
extern custom_val_t *ROMlib_checksump;
|
||||
extern custom_vals_t *ROMlib_creatorsp;
|
||||
extern custom_chars_t *ROMlib_licensep;
|
||||
extern custom_val_t *ROMlib_first_snp;
|
||||
extern custom_val_t *ROMlib_last_snp;
|
||||
extern custom_chars_t *ROMlib_splashp;
|
||||
extern custom_val_t *ROMlib_about_boxp;
|
||||
extern custom_val_t *ROMlib_must_registerp;
|
||||
extern custom_chars_t *ROMlib_copyright_infop;
|
||||
extern custom_chars_t *ROMlib_thank_you_infop;
|
||||
extern custom_chars_t *ROMlib_registration_instructionsp;
|
||||
extern custom_chars_t *ROMlib_magic_volumesp;
|
||||
extern custom_chars_t *ROMlib_mac_cdromp;
|
||||
extern custom_chars_t *ROMlib_mac_demo_idp;
|
||||
extern custom_val_t *ROMlib_disable_command_key_equivsp;
|
||||
extern custom_chars_t *ROMlib_restart_stringp;
|
||||
extern custom_chars_t *ROMlib_menu_about_stringp;
|
||||
extern custom_chars_t *ROMlib_suffix_mapsp;
|
||||
extern custom_chars_t *ROMlib_default_appp;
|
||||
extern custom_val_t *ROMlib_days_of_demop;
|
||||
|
||||
extern void ROMlib_do_custom (void);
|
||||
|
||||
#endif
|
||||
22
src/include/rsys/dcache.h
Normal file
22
src/include/rsys/dcache.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#if !defined (_RSYS_DCACHE_H_)
|
||||
#define _RSYS_DCACHE_H_
|
||||
|
||||
typedef uint32 (*write_callback_funcp_t) (uint32 fd, const void *buf,
|
||||
uint32 offset, uint32 count);
|
||||
|
||||
typedef uint32 (*read_callback_funcp_t) (uint32 fd, void *buf,
|
||||
uint32 offset, uint32 count);
|
||||
|
||||
extern boolean_t dcache_set_enabled (boolean_t enabled_p);
|
||||
|
||||
extern uint32 dcache_read (uint32 fd, void *buf, uint32 offset, uint32 count,
|
||||
read_callback_funcp_t read_callback);
|
||||
|
||||
extern uint32 dcache_write (uint32 fd, const void *buf, uint32 offset,
|
||||
uint32 count, write_callback_funcp_t write_callback);
|
||||
|
||||
extern boolean_t dcache_invalidate (uint32 fd, boolean_t flush_p);
|
||||
extern boolean_t dcache_flush (uint32 fd);
|
||||
extern boolean_t dcache_invalidate_all (boolean_t flush_p);
|
||||
|
||||
#endif /* !_RSYS_DCACHE_H_ */
|
||||
0
src/include/rsys/debug.h
Normal file
0
src/include/rsys/debug.h
Normal file
130
src/include/rsys/depthconv.h
Normal file
130
src/include/rsys/depthconv.h
Normal file
@@ -0,0 +1,130 @@
|
||||
#if !defined (_DEPTHCONV_H_)
|
||||
#define _DEPTHCONV_H_
|
||||
|
||||
#include "rsys/rgbutil.h"
|
||||
#include "CQuickDraw.h"
|
||||
|
||||
|
||||
/* Public API */
|
||||
typedef void (*depthconv_func_t) (const void *table,
|
||||
const uint8 *src_base, int src_row_bytes,
|
||||
uint8 *dst_base, int dst_row_bytes,
|
||||
int top, int left, int bottom, int right);
|
||||
|
||||
/* Each of these functions fills in TABLE_SPACE with some private tables,
|
||||
* returns the size of those tables in *TABLE_SIZE, and returns a pointer
|
||||
* to a function to perform the desired translation. If TABLE_SPACE is
|
||||
* NULL, it is ignored. You can make one call to the function with a NULL
|
||||
* TABLE_SPACE, note the table size, allocate space for it, and then
|
||||
* call it again with the real table space. If TABLE_SIZE is NULL,
|
||||
* it is also ignored.
|
||||
*/
|
||||
extern depthconv_func_t
|
||||
depthconv_make_raw_table (void *table_space, unsigned in_bpp,
|
||||
unsigned out_bpp, uint32 *table_size,
|
||||
const uint32 *mapping);
|
||||
extern depthconv_func_t
|
||||
depthconv_make_ind_to_ind_table (void *table_space, unsigned in_bpp,
|
||||
unsigned out_bpp, uint32 *table_size,
|
||||
const ColorSpec *mapping);
|
||||
extern depthconv_func_t
|
||||
depthconv_make_ind_to_rgb_table (void *table_space, unsigned in_bpp,
|
||||
uint32 *table_size, const ColorSpec *mapping,
|
||||
const rgb_spec_t *dst_rgb_spec);
|
||||
|
||||
extern depthconv_func_t
|
||||
depthconv_make_rgb_to_ind_table (void *table_space, unsigned out_bpp,
|
||||
uint32 *table_size, CTabHandle mapping,
|
||||
ITabHandle itab,
|
||||
const rgb_spec_t *src_rgb_spec);
|
||||
|
||||
extern depthconv_func_t
|
||||
depthconv_make_rgb_to_rgb_table (void *table_space, uint32 *table_size,
|
||||
const rgb_spec_t *src_rgb_spec,
|
||||
const rgb_spec_t *dst_rgb_spec);
|
||||
|
||||
|
||||
/* This is the largest possible table size.
|
||||
* The largest table is 1bpp -> 32bpp, which requires about 8K of space.
|
||||
* We add a little extra cruft to handle the stored log2_in_bpp as
|
||||
* well as excess to assure that we can align the array just the way
|
||||
* we want it.
|
||||
*/
|
||||
#define DEPTHCONV_MAX_TABLE_SIZE (sizeof (uint32) + 32 * 256 + 31)
|
||||
#define DEPTHCONV_MAX_UINT32_TABLE_SIZE \
|
||||
((DEPTHCONV_MAX_TABLE_SIZE + sizeof (uint32) - 1) / sizeof (uint32))
|
||||
|
||||
/* ------- END public API ------- */
|
||||
|
||||
|
||||
/* Private data, shared between dcmaketables.c and dcconvert.c. */
|
||||
|
||||
/* These are INTERNAL types used to store lookup tables used for conversion. */
|
||||
typedef uint8 depthconv_8_1_data_t[8][256];
|
||||
typedef uint8 depthconv_4_1_data_t[4][256];
|
||||
typedef uint8 depthconv_2_1_data_t[2][256];
|
||||
typedef uint8 depthconv_1_1_data_t[256];
|
||||
typedef uint16 depthconv_1_2_data_t[256][4];
|
||||
typedef uint32 depthconv_1_4_data_t[256];
|
||||
typedef uint32 depthconv_1_8_data_t[256][2];
|
||||
typedef uint32 depthconv_1_16_data_t[256][4];
|
||||
typedef uint32 depthconv_1_32_data_t[256][8];
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32 log2_in_bpp;
|
||||
const rgb_spec_t *src_rgb_spec;
|
||||
CTabHandle swapped_ctab;
|
||||
ITabHandle swapped_itab;
|
||||
} depthconv_rgb_to_ind_data_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32 log2_in_bpp;
|
||||
const rgb_spec_t *src_rgb_spec;
|
||||
const rgb_spec_t *dst_rgb_spec;
|
||||
} depthconv_rgb_to_rgb_data_t;
|
||||
|
||||
extern const int depthconv_ind_src_table_alignment[];
|
||||
#define DEPTHCONV_TABLE_ALIGNMENT(log2_in_bpp, log2_out_bpp) \
|
||||
depthconv_ind_src_table_alignment[(log2_in_bpp) - (log2_out_bpp) + 5]
|
||||
#define DEPTHCONV_ALIGN_TABLE(t, log2_in_bpp, log2_out_bpp) \
|
||||
((void *)((((unsigned long)(t)) \
|
||||
+ sizeof (uint32) \
|
||||
+ (DEPTHCONV_TABLE_ALIGNMENT (log2_in_bpp, log2_out_bpp)) - 1) \
|
||||
& ~((DEPTHCONV_TABLE_ALIGNMENT (log2_in_bpp, log2_out_bpp)) - 1)))
|
||||
|
||||
|
||||
#define DEPTHCONV_DECL(func_name) \
|
||||
extern void func_name (const void *raw_table, \
|
||||
const uint8 *src_base, int src_row_bytes, \
|
||||
uint8 *dst_base, int dst_row_bytes, \
|
||||
int top, int left, int bottom, int right)
|
||||
|
||||
DEPTHCONV_DECL (depthconv_copy);
|
||||
DEPTHCONV_DECL (depthconv_1_1);
|
||||
DEPTHCONV_DECL (depthconv_1_2);
|
||||
DEPTHCONV_DECL (depthconv_1_4);
|
||||
DEPTHCONV_DECL (depthconv_1_8);
|
||||
DEPTHCONV_DECL (depthconv_1_16);
|
||||
DEPTHCONV_DECL (depthconv_1_32);
|
||||
DEPTHCONV_DECL (depthconv_2_1);
|
||||
DEPTHCONV_DECL (depthconv_4_1);
|
||||
DEPTHCONV_DECL (depthconv_8_1);
|
||||
DEPTHCONV_DECL (depthconv_16_1);
|
||||
DEPTHCONV_DECL (depthconv_16_2);
|
||||
DEPTHCONV_DECL (depthconv_16_4);
|
||||
DEPTHCONV_DECL (depthconv_16_8);
|
||||
DEPTHCONV_DECL (depthconv_16_16);
|
||||
DEPTHCONV_DECL (depthconv_16_32);
|
||||
DEPTHCONV_DECL (depthconv_32_1);
|
||||
DEPTHCONV_DECL (depthconv_32_2);
|
||||
DEPTHCONV_DECL (depthconv_32_4);
|
||||
DEPTHCONV_DECL (depthconv_32_8);
|
||||
DEPTHCONV_DECL (depthconv_32_16);
|
||||
DEPTHCONV_DECL (depthconv_32_32);
|
||||
|
||||
#undef DEPTHCONV_DECL
|
||||
|
||||
|
||||
#endif /* !_DEPTHCONV_H_ */
|
||||
13
src/include/rsys/desk.h
Normal file
13
src/include/rsys/desk.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#if !defined(_RSYS_DESK_H_)
|
||||
#define _RSYS_DESK_H__
|
||||
|
||||
/*
|
||||
* Copyright 1995 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: desk.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
enum { DESK_ACC_MIN = 12, DESK_ACC_MAX = 31 };
|
||||
|
||||
#endif
|
||||
6
src/include/rsys/desperate.h
Normal file
6
src/include/rsys/desperate.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#if !defined (_RSYS_DESPERATE_H_)
|
||||
#define _RSYS_DESPERATE_H_
|
||||
|
||||
extern boolean_t handle_desperate_switch (int *argcp, char ***argvp);
|
||||
|
||||
#endif /* _RSYS_DESPERATE_H_ */
|
||||
2
src/include/rsys/device.h
Normal file
2
src/include/rsys/device.h
Normal file
@@ -0,0 +1,2 @@
|
||||
#define RAMBASEDBIT (1 << 6)
|
||||
#define DRIVEROPENBIT (1 << 5)
|
||||
13
src/include/rsys/dirtyrect.h
Normal file
13
src/include/rsys/dirtyrect.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#if !defined (_DIRTYRECT_H_)
|
||||
#define _DIRTYRECT_H_
|
||||
|
||||
#include "host_bltmacros.h"
|
||||
|
||||
extern void dirty_rect_accrue (int top, int left, int bottom, int right);
|
||||
extern void dirty_rect_update_screen (void);
|
||||
extern boolean_t dirty_rect_subsumed_p (int top, int left, int bottom,
|
||||
int right);
|
||||
|
||||
extern int num_dirty_rects;
|
||||
|
||||
#endif /* !_DIRTYRECT_H_ */
|
||||
12
src/include/rsys/drive_flags.h
Normal file
12
src/include/rsys/drive_flags.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#if !defined(__rsys_drive_flags__)
|
||||
#define __rsys_drive_flags__
|
||||
|
||||
typedef unsigned char drive_flags_t;
|
||||
enum {
|
||||
DRIVE_FLAGS_LOCKED = 1,
|
||||
DRIVE_FLAGS_FIXED = 2,
|
||||
DRIVE_FLAGS_FLOPPY = 4
|
||||
};
|
||||
|
||||
|
||||
#endif /* !defined(__rsys_drive_flags__) */
|
||||
61
src/include/rsys/dump.h
Normal file
61
src/include/rsys/dump.h
Normal file
@@ -0,0 +1,61 @@
|
||||
|
||||
#if defined (THINK_C)
|
||||
#include <stdio.h>
|
||||
#include "Palettes.h"
|
||||
#endif
|
||||
|
||||
extern int dump_verbosity;
|
||||
extern FILE *o_fp;
|
||||
|
||||
extern void dump_init (char *dst);
|
||||
|
||||
#define dump_handle(x) dump_handle_real ((Handle) x)
|
||||
extern void dump_handle_real (Handle x);
|
||||
|
||||
#define dump_ptr(x) dump_ptr_real ((Ptr) x)
|
||||
extern void dump_ptr_real (Ptr x);
|
||||
|
||||
extern void dump_rect (Rect *r);
|
||||
extern void dump_pattern (Pattern x);
|
||||
extern void dump_point (Point x);
|
||||
extern void dump_bits16 (Bits16 data);
|
||||
extern void dump_bitmap (BitMap *x, Rect *rect);
|
||||
extern void dump_bitmap_null_rect (BitMap *x);
|
||||
extern void dump_bitmap_data (BitMap *x, int depth, Rect *rect);
|
||||
extern void dump_grafport (GrafPtr x);
|
||||
extern void dump_grafport_real (GrafPtr x);
|
||||
extern void dump_cgrafport_real (CGrafPtr x);
|
||||
extern void dump_rgb_color (RGBColor *x);
|
||||
extern void dump_ctab (CTabHandle ctab);
|
||||
extern void dump_itab (ITabHandle itab);
|
||||
extern void dump_pixpat (PixPatHandle pixpat);
|
||||
extern void dump_pixmap_ptr (PixMapPtr x, Rect *rect);
|
||||
extern void dump_pixmap (PixMapHandle pixmap, Rect *rect);
|
||||
extern void dump_pixmap_null_rect (PixMapHandle pixmap);
|
||||
extern void dump_theport (void);
|
||||
extern void dump_gdevice (GDHandle gdev);
|
||||
extern void dump_thegdevice (void);
|
||||
extern void dump_maindevice (void);
|
||||
extern void dump_palette (PaletteHandle palette);
|
||||
extern void dump_qdprocs (QDProcsPtr x);
|
||||
extern void dump_aux_win_list (void);
|
||||
extern void dump_cqdprocs (CQDProcsPtr x);
|
||||
extern void dump_aux_win (AuxWinHandle awh);
|
||||
extern void dump_ccrsr (CCrsrHandle ccrsr);
|
||||
|
||||
extern void dump_wmgrport (void);
|
||||
extern void dump_wmgrcport (void);
|
||||
|
||||
extern void dump_string (unsigned char *s);
|
||||
extern void dump_string_handle (StringHandle sh);
|
||||
|
||||
extern void dump_window_peek (WindowPeek w);
|
||||
extern void dump_dialog_peek (DialogPeek w);
|
||||
|
||||
extern void dump_window_list (WindowPeek w);
|
||||
extern void dump_rgn (RgnHandle rgn);
|
||||
|
||||
extern void dump_finish (void);
|
||||
|
||||
extern void dump_set_field (int field);
|
||||
extern void dump_clear_field (int field);
|
||||
162
src/include/rsys/emustubs.h
Normal file
162
src/include/rsys/emustubs.h
Normal file
@@ -0,0 +1,162 @@
|
||||
#if !defined(_RSYS_EMUSTUBS_H_)
|
||||
#define _RSYS_EMUSTUBS_H_
|
||||
|
||||
/*
|
||||
* Copyright 1995, 1998 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: emustubs.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
extern void ROMlib_GetTrapAddress_helper (uint32 *d0p, uint32 d1, uint32 *a0p);
|
||||
extern void ROMlib_reset_bad_trap_addresses (void);
|
||||
extern void C_pack8_unknown_selector (void);
|
||||
|
||||
extern syn68k_addr_t _Unimplemented (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _SwapMMUMode (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Launch (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Chain (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _FInitQueue (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _InitZone (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _GetZone (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _SetZone (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _FreeMem (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _MaxMem (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _NewPtr (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _DisposPtr (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _SetPtrSize (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _GetPtrSize (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _NewHandle (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _DisposHandle (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _SetHandleSize (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _GetHandleSize (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _HandleZone (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _ReallocHandle (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _RecoverHandle (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _HLock (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _HUnlock (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _EmptyHandle (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _InitApplZone (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _SetApplLimit (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _BlockMove (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _PostEvent (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _OSEventAvail (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _GetOSEvent (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _FlushEvents (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _VInstall (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _VRemove (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _SlotManager (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _SlotVInstall (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _SlotVRemove (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _MoreMasters (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _ReadDateTime (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _SetDateTime (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Delay (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _EqualString (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _DrvrInstall (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _DrvrRemove (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _ResrvMem (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _GetTrapAddress (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _SetTrapAddress (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _PtrZone (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _HPurge (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _HNoPurge (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _SetGrowZone (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _CompactMem (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _PurgeMem (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _RelString (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _UprString (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _StripAddress (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _SetApplBase (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _InsTime (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _RmvTime (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _PrimeTime (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _NMInstall (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _NMRemove (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _HFSDispatch (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _MaxBlock (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _PurgeSpace (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _MaxApplZone (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _MoveHHi (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _StackSpace (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _NewEmptyHandle (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _HSetRBit (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _HClrRBit (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _HGetState (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _HSetState (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _CountADBs (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _GetIndADB (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _GetADBInfo (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _SetADBInfo (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _ADBReInit (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _ADBOp (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _SysEnvirons (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _HWPriv (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Microseconds (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Gestalt (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _ResourceStub (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _TEDispatch (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _ScriptUtil (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _PrGlue (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Dequeue (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Enqueue (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t __GetResource (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Secs2Date (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Date2Secs (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _HandToHand (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _PtrToXHand (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _PtrToHand (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _HandAndHand (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Pack0 (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Pack2 (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Pack3 (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Pack4 (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Pack5 (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Pack6 (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Pack7 (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Pack8 (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Pack11 (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Pack12 (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _PtrAndHand (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _LoadSeg (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Pack14 (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Pack15 (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _CommToolboxDispatch (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _OSDispatch (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _FontDispatch (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _HighLevelFSDispatch (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _ResourceDispatch (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _DialogDispatch (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _modeswitch (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _WackyQD32Trap (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _PaletteDispatch (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _QDExtensions (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _ShutDown (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _AliasDispatch (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _WriteParam (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _InitUtil (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _flushcache (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Key1Trans (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Key2Trans (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Fix2X (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _Frac2X (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _SCSIDispatch (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _IMVI_LowerText (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _SoundDispatch (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _QuickTime (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _IconDispatch (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _GetDefaultStartup (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _SetDefaultStartup (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _GetVideoDefault (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _SetVideoDefault (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _GetOSDefault (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _SetOSDefault (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _IMVI_ReadXPRam (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _bad_trap_unimplemented (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _PhysicalGestalt (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _IMVI_PPC (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _HFSRoutines (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _CodeFragment (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
extern syn68k_addr_t _MixedMode (syn68k_addr_t ignoreme, void **ignoreme2);
|
||||
|
||||
#endif
|
||||
193
src/include/rsys/error.h
Normal file
193
src/include/rsys/error.h
Normal file
@@ -0,0 +1,193 @@
|
||||
#if !defined(_ERROR_H_)
|
||||
#define _ERROR_H_
|
||||
|
||||
/*
|
||||
* Copyright 1986, 1989, 1990, 1995 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: error.h 74 2004-12-30 03:38:55Z ctm $
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "rsys/noreturn.h"
|
||||
|
||||
|
||||
/*
|
||||
* Classes of warnings:
|
||||
*
|
||||
* warning_unimplemented: unimplemented code
|
||||
* warning_unexpected: unexpected parameter or return value
|
||||
* warning_trace_info: program flow trace information
|
||||
*
|
||||
* Classes of logs:
|
||||
|
||||
* warning_trap_failure: trap returning some sort of failure
|
||||
* filesystem call & retval logging (will help Quark)
|
||||
*
|
||||
* Classes of tests:
|
||||
*
|
||||
* memory manager slamming
|
||||
* text edit slamming
|
||||
*/
|
||||
|
||||
/* Can't use an enum here, since the preprocessor needs to be able to
|
||||
* constant fold expressions involving these values so we can
|
||||
* conditionally compile stuff.
|
||||
*/
|
||||
#define ERROR_UNIMPLEMENTED 0
|
||||
#define ERROR_UNEXPECTED 1
|
||||
#define ERROR_TRACE_INFO 2
|
||||
#define ERROR_ERRNO 3
|
||||
#define ERROR_TRAP_FAILURE 4
|
||||
#define ERROR_FILESYSTEM_LOG 5
|
||||
#define ERROR_MEMORY_MANAGER_SLAM 6
|
||||
#define ERROR_TEXT_EDIT_SLAM 7
|
||||
#define ERROR_SOUND_LOG 8
|
||||
#define ERROR_FLOATING_POINT 9
|
||||
|
||||
|
||||
/* This is a bit mask for those errors for which we should compile
|
||||
* in support. This way we can conditionally compile in only
|
||||
* the code we want. */
|
||||
#if !defined (ERROR_SUPPORTED_MASK)
|
||||
#define ERROR_SUPPORTED_MASK (~0) /* Compile in support for all errors. */
|
||||
#endif
|
||||
|
||||
#define ERROR_BIT_MASK(err) (1 << (err))
|
||||
|
||||
/* Returns TRUE iff that error is supported by this compile. */
|
||||
#define ERROR_SUPPORTED_P(err) \
|
||||
((ERROR_SUPPORTED_MASK & ERROR_BIT_MASK (err)) != 0)
|
||||
|
||||
/* Returns TRUE iff that error is enabled at runtime. */
|
||||
#define ERROR_ENABLED_P(err) \
|
||||
((ROMlib_debug_level & ERROR_SUPPORTED_MASK & ERROR_BIT_MASK (err)) != 0)
|
||||
|
||||
extern uint32_t ROMlib_debug_level;
|
||||
|
||||
extern bool error_parse_option_string (const char *options);
|
||||
extern bool error_set_enabled (int err, bool enabled_p);
|
||||
|
||||
|
||||
#define gui_assert(expr) \
|
||||
((void) ((expr) \
|
||||
? 0 \
|
||||
: (gui_fatal ("failed assertion `" # expr "'"), 0)))
|
||||
|
||||
/* ### eventually this should be nuked */
|
||||
#define gui_abort() gui_fatal ("abort")
|
||||
|
||||
#define gui_fatal(fmt, args...) \
|
||||
_gui_fatal (__FILE__, __LINE__, __PRETTY_FUNCTION__, fmt , ## args)
|
||||
|
||||
extern _NORET_1_ void _gui_fatal (const char *file, int line, const char *fn,
|
||||
const char *fmt, ...) _NORET_2_;
|
||||
|
||||
#define warning_helper(error, type, fmt, args...) \
|
||||
_warning (error, type, __FILE__, __LINE__, \
|
||||
__PRETTY_FUNCTION__, fmt , ## args)
|
||||
|
||||
extern void _warning (int error, const char *type, const char *file, int line,
|
||||
const char *fn, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 6, 7)));
|
||||
|
||||
#if ERROR_SUPPORTED_P (ERROR_UNIMPLEMENTED)
|
||||
# define warning_unimplemented(fmt, args...) \
|
||||
warning_helper(ERROR_UNIMPLEMENTED, \
|
||||
"unimplemented feature", \
|
||||
fmt , ## args)
|
||||
#else
|
||||
# define warning_unimplemented(fmt, args...)
|
||||
#endif
|
||||
|
||||
|
||||
#if ERROR_SUPPORTED_P (ERROR_UNEXPECTED)
|
||||
# define warning_unexpected(fmt, args...) \
|
||||
warning_helper(ERROR_UNEXPECTED, \
|
||||
"unexpected event", \
|
||||
fmt , ## args)
|
||||
#else
|
||||
# define warning_unexpected(fmt, args...)
|
||||
#endif
|
||||
|
||||
|
||||
#if ERROR_SUPPORTED_P (ERROR_FILESYSTEM_LOG)
|
||||
# define warning_fs_log(fmt, args...) \
|
||||
warning_helper(ERROR_FILESYSTEM_LOG, \
|
||||
"filesystem", \
|
||||
fmt , ## args)
|
||||
#else
|
||||
# define warning_fs_log(fmt, args...)
|
||||
#endif
|
||||
|
||||
|
||||
#if ERROR_SUPPORTED_P (ERROR_TRACE_INFO)
|
||||
# define warning_trace_info(fmt, args...) \
|
||||
warning_helper(ERROR_TRACE_INFO, \
|
||||
"trace info", \
|
||||
fmt , ## args)
|
||||
#else
|
||||
# define warning_trace_info(fmt, args...)
|
||||
#endif
|
||||
|
||||
|
||||
#if ERROR_SUPPORTED_P (ERROR_TRAP_FAILURE)
|
||||
# define warning_trap_failure(fmt, args...) \
|
||||
warning_helper(ERROR_TRAP_FAILURE, \
|
||||
"trap failure", \
|
||||
fmt , ## args)
|
||||
#else
|
||||
# define warning_trap_failure(fmt, args...)
|
||||
#endif
|
||||
|
||||
|
||||
#if ERROR_SUPPORTED_P (ERROR_SOUND_LOG)
|
||||
extern void _sound_warning (const char *file, int line, const char *fn,
|
||||
const char *fmt, ...);
|
||||
# define warning_sound_log(fmt, args...) \
|
||||
_sound_warning (__FILE__, __LINE__, __PRETTY_FUNCTION__, fmt , ## args)
|
||||
#else
|
||||
# define warning_sound_log(fmt, args...)
|
||||
#endif
|
||||
|
||||
#if ERROR_SUPPORTED_P (ERROR_FLOATING_POINT)
|
||||
# define warning_floating_point(fmt, args...) \
|
||||
warning_helper(ERROR_FLOATING_POINT, \
|
||||
"FP", \
|
||||
fmt , ## args)
|
||||
#else
|
||||
# define warning_floating_point(fmt, args...)
|
||||
#endif
|
||||
|
||||
#define errno_fatal(fmt, args...) \
|
||||
_errno_fatal (__FILE__, __LINE__, __PRETTY_FUNCTION__, fmt , ## args)
|
||||
extern _NORET_1_ void _errno_fatal (const char *file, int line, const char *fn,
|
||||
const char *fmt, ...) _NORET_2_
|
||||
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6)
|
||||
/* Older gcc's don't like two __attribute__ directives at once. */
|
||||
__attribute__ ((format (printf, 4, 5)))
|
||||
#endif
|
||||
;
|
||||
|
||||
|
||||
#if ERROR_SUPPORTED_P (ERROR_ERRNO)
|
||||
# define warning_errno(fmt, args...) \
|
||||
_errno_warning (__FILE__, __LINE__, __PRETTY_FUNCTION__, fmt , ## args)
|
||||
extern void _errno_warning (const char *file, int line, const char *fn,
|
||||
const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 4, 5)));
|
||||
#else
|
||||
# define warning_errno(fmt, args...)
|
||||
#endif
|
||||
|
||||
|
||||
#if defined (SUPPORT_LOG_ERR_TO_RAM)
|
||||
extern bool log_err_to_ram_p;
|
||||
extern void error_dump_ram_err_buf (const char *separator_message);
|
||||
#endif
|
||||
|
||||
extern const char NULL_STRING[];
|
||||
|
||||
#endif /* !_ERROR_H_ */
|
||||
58
src/include/rsys/everything.h
Normal file
58
src/include/rsys/everything.h
Normal file
@@ -0,0 +1,58 @@
|
||||
#undef pascal
|
||||
#define pascal
|
||||
|
||||
#undef a0trap
|
||||
#define a0trap
|
||||
|
||||
#undef trap
|
||||
#define trap
|
||||
|
||||
#include "rsys/common.h"
|
||||
|
||||
#include "QuickDraw.h"
|
||||
#include "ControlMgr.h"
|
||||
#include "WindowMgr.h"
|
||||
#include "CQuickDraw.h"
|
||||
#include "FileMgr.h"
|
||||
#include "DeviceMgr.h"
|
||||
#include "DialogMgr.h"
|
||||
#include "FontMgr.h"
|
||||
#include "MemoryMgr.h"
|
||||
#include "ListMgr.h"
|
||||
#include "MenuMgr.h"
|
||||
#include "ResourceMgr.h"
|
||||
#include "OSEvent.h"
|
||||
#include "Disk.h"
|
||||
#include "PrintMgr.h"
|
||||
#include "ScrapMgr.h"
|
||||
#include "Serial.h"
|
||||
#include "StdFilePkg.h"
|
||||
#include "IntlUtil.h"
|
||||
#include "OSUtil.h"
|
||||
#include "SegmentLdr.h"
|
||||
#include "ToolboxEvent.h"
|
||||
#include "ToolboxUtil.h"
|
||||
#include "VRetraceMgr.h"
|
||||
#include "DeskMgr.h"
|
||||
#include "Package.h"
|
||||
#include "SysErr.h"
|
||||
#include "SANE.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "SoundMgr.h"
|
||||
#include "NotifyMgr.h"
|
||||
#include "ShutDown.h"
|
||||
#include "Gestalt.h"
|
||||
#include "AppleEvents.h"
|
||||
#include "ProcessMgr.h"
|
||||
#include "AliasMgr.h"
|
||||
#include "EditionMgr.h"
|
||||
#include "HelpMgr.h"
|
||||
#include "Iconutil.h"
|
||||
#include "PPC.h"
|
||||
#include "QuickTime.h"
|
||||
|
||||
#include "rsys/file.h"
|
||||
#include "rsys/adb.h"
|
||||
#include "rsys/soundopts.h"
|
||||
#include "rsys/cfm.h"
|
||||
#include "rsys/mixed_mode.h"
|
||||
17
src/include/rsys/evil.h
Normal file
17
src/include/rsys/evil.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#if !defined(_EVIL_H_)
|
||||
#define _EVIL_H_
|
||||
|
||||
/*
|
||||
* Copyright 1998 by Abacus Research and Development, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* $Id: evil.h 63 2004-12-24 18:19:43Z ctm $
|
||||
*/
|
||||
|
||||
#define EVIL_ILLUSTRATOR_7_HACK
|
||||
|
||||
#if defined (EVIL_ILLUSTRATOR_7_HACK)
|
||||
extern BOOLEAN ROMlib_evil_illustrator_7_hack;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user