19 #ifndef __COLLECTIONS__
20 #define __COLLECTIONS__
43 #if PRAGMA_STRUCT_ALIGN
44 #pragma options align = mac68k
45 #elif PRAGMA_STRUCT_PACKPUSH
47 #elif PRAGMA_STRUCT_PACK
57 kCollectionDontWantTag = 0L,
58 kCollectionDontWantId = 0L,
59 kCollectionDontWantSize = 0L,
60 kCollectionDontWantAttributes = 0L,
61 kCollectionDontWantIndex = 0L,
62 kCollectionDontWantData = 0L
68 kCollectionNoAttributes = 0x00000000,
83 kCollectionUser0Bit = 0,
84 kCollectionUser1Bit = 1,
85 kCollectionUser2Bit = 2,
86 kCollectionUser3Bit = 3,
87 kCollectionUser4Bit = 4,
88 kCollectionUser5Bit = 5,
89 kCollectionUser6Bit = 6,
90 kCollectionUser7Bit = 7,
91 kCollectionUser8Bit = 8,
92 kCollectionUser9Bit = 9,
93 kCollectionUser10Bit = 10,
94 kCollectionUser11Bit = 11,
95 kCollectionUser12Bit = 12,
96 kCollectionUser13Bit = 13,
97 kCollectionUser14Bit = 14,
98 kCollectionUser15Bit = 15,
99 kCollectionReserved0Bit = 16,
100 kCollectionReserved1Bit = 17,
101 kCollectionReserved2Bit = 18,
102 kCollectionReserved3Bit = 19,
103 kCollectionReserved4Bit = 20,
104 kCollectionReserved5Bit = 21,
105 kCollectionReserved6Bit = 22,
106 kCollectionReserved7Bit = 23,
107 kCollectionReserved8Bit = 24,
108 kCollectionReserved9Bit = 25,
109 kCollectionReserved10Bit = 26,
110 kCollectionReserved11Bit = 27,
111 kCollectionReserved12Bit = 28,
112 kCollectionReserved13Bit = 29,
113 kCollectionPersistenceBit = 30,
114 kCollectionLockBit = 31
120 kCollectionUser0Mask = 1L << kCollectionUser0Bit,
121 kCollectionUser1Mask = 1L << kCollectionUser1Bit,
122 kCollectionUser2Mask = 1L << kCollectionUser2Bit,
123 kCollectionUser3Mask = 1L << kCollectionUser3Bit,
124 kCollectionUser4Mask = 1L << kCollectionUser4Bit,
125 kCollectionUser5Mask = 1L << kCollectionUser5Bit,
126 kCollectionUser6Mask = 1L << kCollectionUser6Bit,
127 kCollectionUser7Mask = 1L << kCollectionUser7Bit,
128 kCollectionUser8Mask = 1L << kCollectionUser8Bit,
129 kCollectionUser9Mask = 1L << kCollectionUser9Bit,
130 kCollectionUser10Mask = 1L << kCollectionUser10Bit,
131 kCollectionUser11Mask = 1L << kCollectionUser11Bit,
132 kCollectionUser12Mask = 1L << kCollectionUser12Bit,
133 kCollectionUser13Mask = 1L << kCollectionUser13Bit,
134 kCollectionUser14Mask = 1L << kCollectionUser14Bit,
135 kCollectionUser15Mask = 1L << kCollectionUser15Bit,
136 kCollectionReserved0Mask = 1L << kCollectionReserved0Bit,
137 kCollectionReserved1Mask = 1L << kCollectionReserved1Bit,
138 kCollectionReserved2Mask = 1L << kCollectionReserved2Bit,
139 kCollectionReserved3Mask = 1L << kCollectionReserved3Bit,
140 kCollectionReserved4Mask = 1L << kCollectionReserved4Bit,
141 kCollectionReserved5Mask = 1L << kCollectionReserved5Bit,
142 kCollectionReserved6Mask = 1L << kCollectionReserved6Bit,
143 kCollectionReserved7Mask = 1L << kCollectionReserved7Bit,
144 kCollectionReserved8Mask = 1L << kCollectionReserved8Bit,
145 kCollectionReserved9Mask = 1L << kCollectionReserved9Bit,
146 kCollectionReserved10Mask = 1L << kCollectionReserved10Bit,
147 kCollectionReserved11Mask = 1L << kCollectionReserved11Bit,
148 kCollectionReserved12Mask = 1L << kCollectionReserved12Bit,
149 kCollectionReserved13Mask = 1L << kCollectionReserved13Bit,
150 kCollectionPersistenceMask = 1L << kCollectionPersistenceBit,
151 kCollectionLockMask = 1L << kCollectionLockBit
161 typedef CALLBACK_API(OSErr, CollectionFlattenProcPtr)(SInt32 size,
void *data,
163 typedef CALLBACK_API(OSErr, CollectionExceptionProcPtr)(
Collection c,
165 typedef STACK_UPP_TYPE(CollectionFlattenProcPtr) CollectionFlattenUPP;
166 typedef STACK_UPP_TYPE(CollectionExceptionProcPtr) CollectionExceptionUPP;
177 #if !OPAQUE_UPP_TYPES
180 uppCollectionFlattenProcInfo = 0x00000FE0
183 inline CollectionFlattenUPP
187 (ProcPtr)(userRoutine), uppCollectionFlattenProcInfo,
188 GetCurrentArchitecture());
191 #define NewCollectionFlattenUPP(userRoutine) \
192 (CollectionFlattenUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
193 uppCollectionFlattenProcInfo, \
194 GetCurrentArchitecture())
206 CollectionExceptionUPP
208 #if !OPAQUE_UPP_TYPES
211 uppCollectionExceptionProcInfo = 0x000002E0
214 inline CollectionExceptionUPP
218 (ProcPtr)(userRoutine), uppCollectionExceptionProcInfo,
219 GetCurrentArchitecture());
222 #define NewCollectionExceptionUPP(userRoutine) \
223 (CollectionExceptionUPP) NewRoutineDescriptor( \
224 (ProcPtr)(userRoutine), uppCollectionExceptionProcInfo, \
225 GetCurrentArchitecture())
239 #if !OPAQUE_UPP_TYPES
246 #define DisposeCollectionFlattenUPP(userUPP) DisposeRoutineDescriptor(userUPP)
260 #if !OPAQUE_UPP_TYPES
267 #define DisposeCollectionExceptionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
281 CollectionFlattenUPP userUPP);
282 #if !OPAQUE_UPP_TYPES
285 CollectionFlattenUPP userUPP)
287 return (OSErr)CALL_THREE_PARAMETER_UPP(userUPP, uppCollectionFlattenProcInfo,
291 #define InvokeCollectionFlattenUPP(size, data, refCon, userUPP) \
292 (OSErr) CALL_THREE_PARAMETER_UPP((userUPP), uppCollectionFlattenProcInfo, \
293 (size), (data), (refCon))
307 CollectionExceptionUPP userUPP);
308 #if !OPAQUE_UPP_TYPES
311 CollectionExceptionUPP userUPP)
313 return (OSErr)CALL_TWO_PARAMETER_UPP(userUPP, uppCollectionExceptionProcInfo,
317 #define InvokeCollectionExceptionUPP(c, status, userUPP) \
318 (OSErr) CALL_TWO_PARAMETER_UPP((userUPP), uppCollectionExceptionProcInfo, \
323 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
325 #define NewCollectionFlattenProc(userRoutine) \
326 NewCollectionFlattenUPP(userRoutine)
327 #define NewCollectionExceptionProc(userRoutine) \
328 NewCollectionExceptionUPP(userRoutine)
329 #define CallCollectionFlattenProc(userRoutine, size, data, refCon) \
330 InvokeCollectionFlattenUPP(size, data, refCon, userRoutine)
331 #define CallCollectionExceptionProc(userRoutine, c, status) \
332 InvokeCollectionExceptionUPP(c, status, userRoutine)
447 SInt32 newAttributes);
470 const void *itemData);
505 SInt32 whichAttributes, SInt32 newAttributes);
517 SInt32 *itemSize, SInt32 *attributes);
529 const void *itemData);
564 SInt32 newAttributes);
576 SInt32 *
id, SInt32 *itemSize, SInt32 *attributes);
632 SInt32 *itemSize,
void *itemData);
644 SInt32 *
id, SInt32 *index, SInt32 *itemSize,
701 void *refCon, SInt32 whichAttributes,
702 SInt32 matchingAttributes);
724 CollectionExceptionUPP
825 dontWantTag = kCollectionDontWantTag,
826 dontWantId = kCollectionDontWantId,
827 dontWantSize = kCollectionDontWantSize,
828 dontWantAttributes = kCollectionDontWantAttributes,
829 dontWantIndex = kCollectionDontWantIndex,
830 dontWantData = kCollectionDontWantData
835 noCollectionAttributes = kCollectionNoAttributes,
843 collectionUser0Bit = kCollectionUser0Bit,
844 collectionUser1Bit = kCollectionUser1Bit,
845 collectionUser2Bit = kCollectionUser2Bit,
846 collectionUser3Bit = kCollectionUser3Bit,
847 collectionUser4Bit = kCollectionUser4Bit,
848 collectionUser5Bit = kCollectionUser5Bit,
849 collectionUser6Bit = kCollectionUser6Bit,
850 collectionUser7Bit = kCollectionUser7Bit,
851 collectionUser8Bit = kCollectionUser8Bit,
852 collectionUser9Bit = kCollectionUser9Bit,
853 collectionUser10Bit = kCollectionUser10Bit,
854 collectionUser11Bit = kCollectionUser11Bit,
855 collectionUser12Bit = kCollectionUser12Bit,
856 collectionUser13Bit = kCollectionUser13Bit,
857 collectionUser14Bit = kCollectionUser14Bit,
858 collectionUser15Bit = kCollectionUser15Bit,
859 collectionReserved0Bit = kCollectionReserved0Bit,
860 collectionReserved1Bit = kCollectionReserved1Bit,
861 collectionReserved2Bit = kCollectionReserved2Bit,
862 collectionReserved3Bit = kCollectionReserved3Bit,
863 collectionReserved4Bit = kCollectionReserved4Bit,
864 collectionReserved5Bit = kCollectionReserved5Bit,
865 collectionReserved6Bit = kCollectionReserved6Bit,
866 collectionReserved7Bit = kCollectionReserved7Bit,
867 collectionReserved8Bit = kCollectionReserved8Bit,
868 collectionReserved9Bit = kCollectionReserved9Bit,
869 collectionReserved10Bit = kCollectionReserved10Bit,
870 collectionReserved11Bit = kCollectionReserved11Bit,
871 collectionReserved12Bit = kCollectionReserved12Bit,
872 collectionReserved13Bit = kCollectionReserved13Bit,
873 collectionPersistenceBit = kCollectionPersistenceBit,
874 collectionLockBit = kCollectionLockBit
879 collectionUser0Mask = kCollectionUser0Mask,
880 collectionUser1Mask = kCollectionUser1Mask,
881 collectionUser2Mask = kCollectionUser2Mask,
882 collectionUser3Mask = kCollectionUser3Mask,
883 collectionUser4Mask = kCollectionUser4Mask,
884 collectionUser5Mask = kCollectionUser5Mask,
885 collectionUser6Mask = kCollectionUser6Mask,
886 collectionUser7Mask = kCollectionUser7Mask,
887 collectionUser8Mask = kCollectionUser8Mask,
888 collectionUser9Mask = kCollectionUser9Mask,
889 collectionUser10Mask = kCollectionUser10Mask,
890 collectionUser11Mask = kCollectionUser11Mask,
891 collectionUser12Mask = kCollectionUser12Mask,
892 collectionUser13Mask = kCollectionUser13Mask,
893 collectionUser14Mask = kCollectionUser14Mask,
894 collectionUser15Mask = kCollectionUser15Mask,
895 collectionReserved0Mask = kCollectionReserved0Mask,
896 collectionReserved1Mask = kCollectionReserved1Mask,
897 collectionReserved2Mask = kCollectionReserved2Mask,
898 collectionReserved3Mask = kCollectionReserved3Mask,
899 collectionReserved4Mask = kCollectionReserved4Mask,
900 collectionReserved5Mask = kCollectionReserved5Mask,
901 collectionReserved6Mask = kCollectionReserved6Mask,
902 collectionReserved7Mask = kCollectionReserved7Mask,
903 collectionReserved8Mask = kCollectionReserved8Mask,
904 collectionReserved9Mask = kCollectionReserved9Mask,
905 collectionReserved10Mask = kCollectionReserved10Mask,
906 collectionReserved11Mask = kCollectionReserved11Mask,
907 collectionReserved12Mask = kCollectionReserved12Mask,
908 collectionReserved13Mask = kCollectionReserved13Mask,
909 collectionPersistenceMask = kCollectionPersistenceMask,
910 collectionLockMask = kCollectionLockMask
915 #if PRAGMA_STRUCT_ALIGN
916 #pragma options align = reset
917 #elif PRAGMA_STRUCT_PACKPUSH
919 #elif PRAGMA_STRUCT_PACK
923 #ifdef PRAGMA_IMPORT_OFF
Collection NewCollection(void)
OSErr GetIndexedCollectionItemInfo(Collection c, SInt32 index, CollectionTag *tag, SInt32 *id, SInt32 *itemSize, SInt32 *attributes)
SInt32 GetCollectionDefaultAttributes(Collection c)
OSErr ReplaceIndexedCollectionItemHdl(Collection aCollection, SInt32 index, Handle itemData)
void SetCollectionDefaultAttributes(Collection c, SInt32 whichAttributes, SInt32 newAttributes)
OSErr GetIndexedCollectionTag(Collection c, SInt32 tagIndex, CollectionTag *tag)
OSErr FlattenCollectionToHdl(Collection aCollection, Handle flattened)
Collection CloneCollection(Collection c)
CollectionExceptionUPP GetCollectionExceptionProc(Collection c)
OSErr InvokeCollectionFlattenUPP(SInt32 size, void *data, void *refCon, CollectionFlattenUPP userUPP)
OSErr SetCollectionItemInfo(Collection c, CollectionTag tag, SInt32 id, SInt32 whichAttributes, SInt32 newAttributes)
OSErr UnflattenCollectionFromHdl(Collection aCollection, Handle flattened)
Collection GetNewCollection(SInt16 collectionID)
void EmptyCollection(Collection c)
#define NewCollectionFlattenUPP(userRoutine)
Definition: Collections.h:191
OSErr FlattenCollection(Collection c, CollectionFlattenUPP flattenProc, void *refCon)
OSErr ReplaceIndexedCollectionItem(Collection c, SInt32 index, SInt32 itemSize, const void *itemData)
OSErr GetIndexedCollectionItemHdl(Collection aCollection, SInt32 index, Handle itemData)
void SetCollectionExceptionProc(Collection c, CollectionExceptionUPP exceptionProc)
OSErr SetIndexedCollectionItemInfo(Collection c, SInt32 index, SInt32 whichAttributes, SInt32 newAttributes)
OSStatus ReleaseCollection(Collection c)
ItemCount GetCollectionRetainCount(Collection c)
OSErr GetTaggedCollectionItemInfo(Collection c, CollectionTag tag, SInt32 whichItem, SInt32 *id, SInt32 *index, SInt32 *itemSize, SInt32 *attributes)
OSErr AddCollectionItemHdl(Collection aCollection, CollectionTag tag, SInt32 id, Handle itemData)
void PurgeCollectionTag(Collection c, CollectionTag tag)
FourCharCode CollectionTag
Definition: Collections.h:160
OSErr GetIndexedCollectionItem(Collection c, SInt32 index, SInt32 *itemSize, void *itemData)
SInt32 CountTaggedCollectionItems(Collection c, CollectionTag tag)
OSStatus RetainCollection(Collection c)
Boolean CollectionTagExists(Collection c, CollectionTag tag)
OSErr GetCollectionItem(Collection c, CollectionTag tag, SInt32 id, SInt32 *itemSize, void *itemData)
OSErr AddCollectionItem(Collection c, CollectionTag tag, SInt32 id, SInt32 itemSize, const void *itemData)
struct OpaqueCollection * Collection
Definition: Collections.h:158
OSErr UnflattenCollection(Collection c, CollectionFlattenUPP flattenProc, void *refCon)
SInt32 CountCollectionOwners(Collection c)
SInt32 CountCollectionTags(Collection c)
OSErr RemoveIndexedCollectionItem(Collection c, SInt32 index)
OSErr RemoveCollectionItem(Collection c, CollectionTag tag, SInt32 id)
Collection CopyCollection(Collection srcCollection, Collection dstCollection)
void DisposeCollection(Collection c)
OSErr GetCollectionItemHdl(Collection aCollection, CollectionTag tag, SInt32 id, Handle itemData)
OSErr GetTaggedCollectionItem(Collection c, CollectionTag tag, SInt32 whichItem, SInt32 *itemSize, void *itemData)
void DisposeCollectionExceptionUPP(CollectionExceptionUPP userUPP)
OSErr FlattenPartialCollection(Collection c, CollectionFlattenUPP flattenProc, void *refCon, SInt32 whichAttributes, SInt32 matchingAttributes)
void DisposeCollectionFlattenUPP(CollectionFlattenUPP userUPP)
SInt32 CountCollectionItems(Collection c)
#define NewCollectionExceptionUPP(userRoutine)
Definition: Collections.h:222
OSErr InvokeCollectionExceptionUPP(Collection c, OSErr status, CollectionExceptionUPP userUPP)
void PurgeCollection(Collection c, SInt32 whichAttributes, SInt32 matchingAttributes)
@ kCollectionUserAttributes
Definition: Collections.h:70
@ kCollectionDefaultAttributes
Definition: Collections.h:71
@ kCollectionAllAttributes
Definition: Collections.h:69
OSErr GetCollectionItemInfo(Collection c, CollectionTag tag, SInt32 id, SInt32 *index, SInt32 *itemSize, SInt32 *attributes)
Basic Macintosh data types.
unsigned char Boolean
Definition: MacTypes.h:318
Mixed Mode Manager Interfaces.
void DisposeRoutineDescriptor(UniversalProcPtr theUPP)
#define STACK_UPP_TYPE(name)
Definition: MixedMode.h:734
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)