19 #ifndef __COMPONENTS__
20 #define __COMPONENTS__
51 #if PRAGMA_STRUCT_ALIGN
52 #pragma options align = mac68k
53 #elif PRAGMA_STRUCT_PACKPUSH
55 #elif PRAGMA_STRUCT_PACK
61 kAppleManufacturer = FOUR_CHAR_CODE(
'appl'),
63 FOUR_CHAR_CODE(
'thng'),
65 FOUR_CHAR_CODE(
'thga')
70 kAnyComponentType = 0,
71 kAnyComponentSubType = 0,
72 kAnyComponentManufacturer = 0,
73 kAnyComponentFlagsMask = 0
78 cmpIsMissing = 1L << 29,
79 cmpWantsRegisterMessage = 1L << 31
84 kComponentOpenSelect = -1,
102 componentDoAutoVersion = (1 << 0),
103 componentWantsUnregister = (1 << 1),
104 componentAutoVersionIncludeFlags = (1 << 2),
105 componentHasMultiplePlatforms = (1 << 3),
106 componentLoadResident = (1 << 4)
112 defaultComponentIdentical = 0,
113 defaultComponentAnyFlags = 1,
114 defaultComponentAnyManufacturer = 2,
115 defaultComponentAnySubType = 4,
116 defaultComponentAnyFlagsAnyManufacturer =
117 (defaultComponentAnyFlags + defaultComponentAnyManufacturer),
118 defaultComponentAnyFlagsAnyManufacturerAnySubType =
119 (defaultComponentAnyFlags + defaultComponentAnyManufacturer +
120 defaultComponentAnySubType)
126 registerComponentGlobal = 1,
127 registerComponentNoDuplicates = 2,
128 registerComponentAfterExisting = 4,
129 registerComponentAliasesOnly = 8
134 OSType componentType;
171 long componentVersion;
238 typedef long ComponentResult;
246 platformPowerPCNativeEntryPoint = 5
251 mpWorkFlagDoWork = (1 << 0),
252 mpWorkFlagDoCompletion = (1 << 1),
253 mpWorkFlagCopyWorkBlock = (1 << 2),
254 mpWorkFlagDontBlock = (1 << 3),
255 mpWorkFlagGetProcessorCount = (1 << 4),
256 mpWorkFlagGetIsRunning = (1 << 6)
262 cmpAliasOnlyThisFile = 1
270 UInt16 processorCount;
278 typedef CALLBACK_API(ComponentResult, ComponentMPWorkFunctionProcPtr)(
280 typedef CALLBACK_API(ComponentResult,
282 Handle componentStorage);
283 typedef CALLBACK_API(OSErr, GetMissingComponentResourceProcPtr)(
284 Component c, OSType resType,
short resID,
void *refCon, Handle *resource);
286 ComponentMPWorkFunctionUPP;
287 typedef STACK_UPP_TYPE(ComponentRoutineProcPtr) ComponentRoutineUPP;
289 GetMissingComponentResourceUPP;
311 #if !OPAQUE_UPP_TYPES
317 (ProcPtr)(userRoutine), (
ProcInfoType)procInfo, GetCurrentArchitecture());
320 #define NewComponentFunctionUPP(userRoutine, procInfo) \
321 ((ComponentFunctionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), \
322 (ProcInfoType)procInfo, \
323 GetCurrentArchitecture()))
342 #if !OPAQUE_UPP_TYPES
344 inline DEFINE_API(
void)
350 #define DisposeComponentFunctionUPP(userUPP) (DisposeRoutineDescriptor(userUPP))
354 #if TARGET_RT_MAC_CFM
368 extern UniversalProcPtr CallComponentUPP;
371 #define ComponentCallNow(callNumber, paramSize) );
432 Handle componentName, Handle componentInfo,
433 Handle componentIcon);
540 short resourceID, Handle *theResource);
553 GetMissingComponentResourceUPP missingProc,
554 void *refCon,
void *atomContainerPtr);
566 short strListID,
short index);
661 Handle *theResource);
704 #if CALL_NOT_IN_CARBON
768 #if TARGET_CPU_PPC && TARGET_OS_MAC
778 CallComponentFunctionWithStorageProcInfo(Handle storage,
784 #define CallComponentFunctionWithStorageProcInfo(storage, params, func, \
786 CallComponentFunctionWithStorage(storage, params, func)
1027 ComponentMPWorkFunctionUPP *workFunction,
1040 short resourceID, Handle *resource);
1047 #if CALL_NOT_IN_CARBON
1088 ComponentMPWorkFunctionUPP
1090 #if !OPAQUE_UPP_TYPES
1093 uppComponentMPWorkFunctionProcInfo = 0x000003F0
1096 inline ComponentMPWorkFunctionUPP
1100 (ProcPtr)(userRoutine), uppComponentMPWorkFunctionProcInfo,
1101 GetCurrentArchitecture());
1104 #define NewComponentMPWorkFunctionUPP(userRoutine) \
1105 (ComponentMPWorkFunctionUPP) NewRoutineDescriptor( \
1106 (ProcPtr)(userRoutine), uppComponentMPWorkFunctionProcInfo, \
1107 GetCurrentArchitecture())
1121 #if !OPAQUE_UPP_TYPES
1124 uppComponentRoutineProcInfo = 0x000003F0
1127 inline ComponentRoutineUPP
1131 uppComponentRoutineProcInfo,
1132 GetCurrentArchitecture());
1135 #define NewComponentRoutineUPP(userRoutine) \
1136 (ComponentRoutineUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
1137 uppComponentRoutineProcInfo, \
1138 GetCurrentArchitecture())
1150 GetMissingComponentResourceUPP
1152 GetMissingComponentResourceProcPtr userRoutine);
1153 #if !OPAQUE_UPP_TYPES
1156 uppGetMissingComponentResourceProcInfo = 0x0000FBE0
1160 GetMissingComponentResourceProcPtr userRoutine)
1163 (ProcPtr)(userRoutine), uppGetMissingComponentResourceProcInfo,
1164 GetCurrentArchitecture());
1167 #define NewGetMissingComponentResourceUPP(userRoutine) \
1168 (GetMissingComponentResourceUPP) NewRoutineDescriptor( \
1169 (ProcPtr)(userRoutine), uppGetMissingComponentResourceProcInfo, \
1170 GetCurrentArchitecture())
1184 #if !OPAQUE_UPP_TYPES
1192 #define DisposeComponentMPWorkFunctionUPP(userUPP) \
1193 DisposeRoutineDescriptor(userUPP)
1207 #if !OPAQUE_UPP_TYPES
1214 #define DisposeComponentRoutineUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1228 #if !OPAQUE_UPP_TYPES
1236 #define DisposeGetMissingComponentResourceUPP(userUPP) \
1237 DisposeRoutineDescriptor(userUPP)
1252 ComponentMPWorkFunctionUPP userUPP);
1253 #if !OPAQUE_UPP_TYPES
1255 inline ComponentResult
1258 ComponentMPWorkFunctionUPP userUPP)
1260 return (ComponentResult)CALL_TWO_PARAMETER_UPP(
1261 userUPP, uppComponentMPWorkFunctionProcInfo, globalRefCon,
header);
1264 #define InvokeComponentMPWorkFunctionUPP(globalRefCon, header, userUPP) \
1265 (ComponentResult) CALL_TWO_PARAMETER_UPP( \
1266 (userUPP), uppComponentMPWorkFunctionProcInfo, (globalRefCon), (header))
1280 ComponentRoutineUPP userUPP);
1281 #if !OPAQUE_UPP_TYPES
1284 Handle componentStorage,
1285 ComponentRoutineUPP userUPP)
1287 return (ComponentResult)CALL_TWO_PARAMETER_UPP(
1288 userUPP, uppComponentRoutineProcInfo, cp, componentStorage);
1291 #define InvokeComponentRoutineUPP(cp, componentStorage, userUPP) \
1292 (ComponentResult) CALL_TWO_PARAMETER_UPP( \
1293 (userUPP), uppComponentRoutineProcInfo, (cp), (componentStorage))
1307 void *refCon, Handle *resource,
1308 GetMissingComponentResourceUPP userUPP);
1309 #if !OPAQUE_UPP_TYPES
1313 void *refCon, Handle *resource,
1314 GetMissingComponentResourceUPP userUPP)
1316 return (OSErr)CALL_FIVE_PARAMETER_UPP(userUPP,
1317 uppGetMissingComponentResourceProcInfo,
1318 c, resType, resID, refCon, resource);
1321 #define InvokeGetMissingComponentResourceUPP(c, resType, resID, refCon, \
1322 resource, userUPP) \
1323 (OSErr) CALL_FIVE_PARAMETER_UPP((userUPP), \
1324 uppGetMissingComponentResourceProcInfo, (c), \
1325 (resType), (resID), (refCon), (resource))
1329 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
1331 #define NewComponentMPWorkFunctionProc(userRoutine) \
1332 NewComponentMPWorkFunctionUPP(userRoutine)
1333 #define NewComponentRoutineProc(userRoutine) NewComponentRoutineUPP(userRoutine)
1334 #define NewGetMissingComponentResourceProc(userRoutine) \
1335 NewGetMissingComponentResourceUPP(userRoutine)
1336 #define CallComponentMPWorkFunctionProc(userRoutine, globalRefCon, header) \
1337 InvokeComponentMPWorkFunctionUPP(globalRefCon, header, userRoutine)
1338 #define CallComponentRoutineProc(userRoutine, cp, componentStorage) \
1339 InvokeComponentRoutineUPP(cp, componentStorage, userRoutine)
1340 #define CallGetMissingComponentResourceProc(userRoutine, c, resType, resID, \
1342 InvokeGetMissingComponentResourceUPP(c, resType, resID, refCon, resource, \
1351 uppComponentFunctionImplementedProcInfo = 0x000002F0,
1352 uppGetComponentVersionProcInfo = 0x000000F0,
1353 uppComponentSetTargetProcInfo = 0x000003F0,
1354 uppCallComponentOpenProcInfo = 0x000003F0,
1355 uppCallComponentCloseProcInfo = 0x000003F0,
1356 uppCallComponentCanDoProcInfo = 0x000002F0,
1357 uppCallComponentVersionProcInfo = 0x000000F0,
1358 uppCallComponentRegisterProcInfo = 0x000000F0,
1359 uppCallComponentTargetProcInfo = 0x000003F0,
1360 uppCallComponentUnregisterProcInfo = 0x000000F0,
1361 uppCallComponentGetMPWorkFunctionProcInfo = 0x00000FF0,
1362 uppCallComponentGetPublicResourceProcInfo = 0x00003BF0
1365 #if PRAGMA_STRUCT_ALIGN
1366 #pragma options align = reset
1367 #elif PRAGMA_STRUCT_PACKPUSH
1369 #elif PRAGMA_STRUCT_PACK
1373 #ifdef PRAGMA_IMPORT_OFF
1376 #pragma import reset
Component CaptureComponent(Component capturedComponent, Component capturingComponent)
OSErr GetComponentIndString(Component aComponent, Str255 theString, short strListID, short index)
long GetComponentRefcon(Component aComponent)
OSErr GetComponentPublicResource(Component aComponent, OSType resourceType, short resourceID, Handle *theResource)
void SetComponentRefcon(Component aComponent, long theRefcon)
@ kComponentResourceType
Definition: Components.h:62
@ kComponentAliasResourceType
Definition: Components.h:64
UniversalProcPtr ComponentFunctionUPP
Definition: Components.h:295
long RegisterComponentResourceFile(short resRefNum, short global)
ComponentResult CallComponentClose(ComponentInstance ci, ComponentInstance self)
ComponentResult CallComponentDispatch(ComponentParameters *cp)
@ platformInterpreted
Definition: Components.h:244
@ platformWin32
Definition: Components.h:245
@ platformPowerPC
Definition: Components.h:242
ComponentFunctionUPP NewComponentFunctionUPP(ProcPtr userRoutine, ProcInfoType procInfo)
Component FindNextComponent(Component aComponent, ComponentDescription *looking)
long CallComponentFunction(ComponentParameters *params, ComponentFunctionUPP func)
long ComponentSetTarget(ComponentInstance ci, ComponentInstance target)
ComponentResult CallComponentGetMPWorkFunction(ComponentInstance ci, ComponentMPWorkFunctionUPP *workFunction, void **refCon)
#define NewGetMissingComponentResourceUPP(userRoutine)
Definition: Components.h:1167
long GetComponentTypeModSeed(OSType componentType)
OSErr GetComponentPublicResourceList(OSType resourceType, short resourceID, long flags, ComponentDescription *cd, GetMissingComponentResourceUPP missingProc, void *refCon, void *atomContainerPtr)
OSErr UnregisterComponent(Component aComponent)
void DisposeComponentRoutineUPP(ComponentRoutineUPP userUPP)
OSErr SetDefaultComponent(Component aComponent, short flags)
void SetComponentInstanceA5(ComponentInstance aComponentInstance, long theA5)
ComponentResult InvokeComponentMPWorkFunctionUPP(void *globalRefCon, ComponentMPWorkFunctionHeaderRecordPtr header, ComponentMPWorkFunctionUPP userUPP)
ComponentResult CallComponentGetPublicResource(ComponentInstance ci, OSType resourceType, short resourceID, Handle *resource)
OSErr CloseComponentResFile(short refnum)
void SetComponentInstanceError(ComponentInstance aComponentInstance, OSErr theError)
OSErr GetComponentInfo(Component aComponent, ComponentDescription *cd, Handle componentName, Handle componentInfo, Handle componentIcon)
ComponentResult CallComponentRegister(ComponentInstance ci)
ComponentInstance OpenComponent(Component aComponent)
long CallComponentFunctionWithStorage(Handle storage, ComponentParameters *params, ComponentFunctionUPP func)
ComponentResult CallComponentVersion(ComponentInstance ci)
void SetComponentInstanceStorage(ComponentInstance aComponentInstance, Handle theStorage)
OSErr CloseComponent(ComponentInstance aComponentInstance)
OSErr OpenAComponentResFile(Component aComponent, short *resRef)
void DisposeComponentMPWorkFunctionUPP(ComponentMPWorkFunctionUPP userUPP)
OSErr OpenAComponent(Component aComponent, ComponentInstance *ci)
ComponentInstance OpenDefaultComponent(OSType componentType, OSType componentSubType)
OSErr GetComponentInstanceError(ComponentInstance aComponentInstance)
Component ResolveComponentAlias(Component aComponent)
ComponentResult CallComponentTarget(ComponentInstance ci, ComponentInstance target)
#define NewComponentRoutineUPP(userRoutine)
Definition: Components.h:1135
void DisposeGetMissingComponentResourceUPP(GetMissingComponentResourceUPP userUPP)
long GetComponentInstanceA5(ComponentInstance aComponentInstance)
#define NewComponentMPWorkFunctionUPP(userRoutine)
Definition: Components.h:1104
ComponentResult CallComponentOpen(ComponentInstance ci, ComponentInstance self)
OSErr InvokeGetMissingComponentResourceUPP(Component c, OSType resType, short resID, void *refCon, Handle *resource, GetMissingComponentResourceUPP userUPP)
OSErr GetComponentPublicIndString(Component aComponent, Str255 theString, short strListID, short index)
long DelegateComponentCall(ComponentParameters *originalParams, ComponentInstance ci)
Component RegisterComponentResource(ComponentResourceHandle cr, short global)
long CountComponents(ComponentDescription *looking)
long CountComponentInstances(Component aComponent)
Handle GetComponentInstanceStorage(ComponentInstance aComponentInstance)
void DisposeComponentFunctionUPP(ComponentFunctionUPP userUPP)
ComponentResult CallComponent(ComponentInstance ci, ComponentParameters *cp)
long ComponentFunctionImplemented(ComponentInstance ci, short ftnNumber)
long GetComponentListModSeed(void)
long GetComponentVersion(ComponentInstance ci)
@ kComponentUnregisterSelect
Definition: Components.h:90
@ kComponentTargetSelect
Definition: Components.h:89
@ kComponentGetPublicResourceSelect
Definition: Components.h:95
@ kComponentExecuteWiredActionSelect
Definition: Components.h:92
@ kComponentCloseSelect
Definition: Components.h:85
@ kComponentVersionSelect
Definition: Components.h:87
@ kComponentRegisterSelect
Definition: Components.h:88
@ kComponentGetMPWorkFunctionSelect
Definition: Components.h:91
@ kComponentCanDoSelect
Definition: Components.h:86
OSErr OpenADefaultComponent(OSType componentType, OSType componentSubType, ComponentInstance *ci)
ComponentResult CallComponentCanDo(ComponentInstance ci, short ftnNumber)
OSErr GetComponentResource(Component aComponent, OSType resType, short resID, Handle *theResource)
OSErr GetComponentIconSuite(Component aComponent, Handle *iconSuite)
OSErr UncaptureComponent(Component aComponent)
ComponentResult InvokeComponentRoutineUPP(ComponentParameters *cp, Handle componentStorage, ComponentRoutineUPP userUPP)
ComponentResult CallComponentUnregister(ComponentInstance ci)
short OpenComponentResFile(Component aComponent)
File Manager (MFS, HFS, and HFS+) Interfaces.
Basic Macintosh data types.
Mixed Mode Manager Interfaces.
unsigned long ProcInfoType
Definition: MixedMode.h:151
void DisposeRoutineDescriptor(UniversalProcPtr theUPP)
#define STACK_UPP_TYPE(name)
Definition: MixedMode.h:734
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)
Definition: Components.h:199
ComponentDescription aliasCD
Definition: Components.h:201
Definition: Components.h:133
OSType componentManufacturer
Definition: Components.h:136
unsigned long componentFlags
Definition: Components.h:138
unsigned long componentFlagsMask
Definition: Components.h:140
OSType componentSubType
Definition: Components.h:135
Definition: Components.h:220
Definition: Components.h:206
UInt8 paramSize
Definition: Components.h:208
short what
Definition: Components.h:209
Definition: Components.h:214
Definition: Components.h:170
long componentRegisterFlags
Definition: Components.h:172
short componentIconFamily
Definition: Components.h:173
Definition: Components.h:152
ResourceSpec componentIcon
Definition: Components.h:157
ResourceSpec component
Definition: Components.h:154
ResourceSpec componentName
Definition: Components.h:155
ResourceSpec componentInfo
Definition: Components.h:156
Definition: Components.h:183
short componentIconFamily
Definition: Components.h:191
ResourceSpec componentName
Definition: Components.h:186
long componentRegisterFlags
Definition: Components.h:190
ResourceSpec component
Definition: Components.h:185
ResourceSpec componentIcon
Definition: Components.h:188
ComponentPlatformInfo platformArray[1]
Definition: Components.h:193
ResourceSpec componentInfo
Definition: Components.h:187
long componentVersion
Definition: Components.h:189
long count
Definition: Components.h:192
Definition: Components.h:232
Definition: Components.h:226
Definition: Components.h:146
short resID
Definition: Components.h:148