1 {
2 File: CarbonCore/Resources.h
3
4 Contains: Resource Manager Interfaces.
5 The contents of this header file are deprecated.
6 Use Foundation or CoreFoundation bundles instead.
7
8 Copyright: � 1985-2011 by Apple Inc. All rights reserved.
9 }
10 {
11 Modified for use with Free Pascal
12 Version 308
13 Please report any bugs to <gpc@microbizz.nl>
14 }
15
16 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
17 {$mode macpas}
18 {$modeswitch cblocks}
19 {$packenum 1}
20 {$macro on}
21 {$inline on}
22 {$calling mwpascal}
23
24 unit Resources;
25 interface
26 {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
27 {$setc GAP_INTERFACES_VERSION := $0308}
28
29 {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
30 {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
31 {$endc}
32
33 {$ifc defined CPUPOWERPC and defined CPUI386}
34 {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
35 {$endc}
36 {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
37 {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
38 {$endc}
39
40 {$ifc not defined __ppc__ and defined CPUPOWERPC32}
41 {$setc __ppc__ := 1}
42 {$elsec}
43 {$setc __ppc__ := 0}
44 {$endc}
45 {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
46 {$setc __ppc64__ := 1}
47 {$elsec}
48 {$setc __ppc64__ := 0}
49 {$endc}
50 {$ifc not defined __i386__ and defined CPUI386}
51 {$setc __i386__ := 1}
52 {$elsec}
53 {$setc __i386__ := 0}
54 {$endc}
55 {$ifc not defined __x86_64__ and defined CPUX86_64}
56 {$setc __x86_64__ := 1}
57 {$elsec}
58 {$setc __x86_64__ := 0}
59 {$endc}
60 {$ifc not defined __arm__ and defined CPUARM}
61 {$setc __arm__ := 1}
62 {$elsec}
63 {$setc __arm__ := 0}
64 {$endc}
65 {$ifc not defined __arm64__ and defined CPUAARCH64}
66 {$setc __arm64__ := 1}
67 {$elsec}
68 {$setc __arm64__ := 0}
69 {$endc}
70
71 {$ifc defined cpu64}
72 {$setc __LP64__ := 1}
73 {$elsec}
74 {$setc __LP64__ := 0}
75 {$endc}
76
77
78 {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
79 {$error Conflicting definitions for __ppc__ and __i386__}
80 {$endc}
81
82 {$ifc defined __ppc__ and __ppc__}
83 {$setc TARGET_CPU_PPC := TRUE}
84 {$setc TARGET_CPU_PPC64 := FALSE}
85 {$setc TARGET_CPU_X86 := FALSE}
86 {$setc TARGET_CPU_X86_64 := FALSE}
87 {$setc TARGET_CPU_ARM := FALSE}
88 {$setc TARGET_CPU_ARM64 := FALSE}
89 {$setc TARGET_OS_MAC := TRUE}
90 {$setc TARGET_OS_IPHONE := FALSE}
91 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
92 {$setc TARGET_OS_EMBEDDED := FALSE}
93 {$elifc defined __ppc64__ and __ppc64__}
94 {$setc TARGET_CPU_PPC := FALSE}
95 {$setc TARGET_CPU_PPC64 := TRUE}
96 {$setc TARGET_CPU_X86 := FALSE}
97 {$setc TARGET_CPU_X86_64 := FALSE}
98 {$setc TARGET_CPU_ARM := FALSE}
99 {$setc TARGET_CPU_ARM64 := FALSE}
100 {$setc TARGET_OS_MAC := TRUE}
101 {$setc TARGET_OS_IPHONE := FALSE}
102 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
103 {$setc TARGET_OS_EMBEDDED := FALSE}
104 {$elifc defined __i386__ and __i386__}
105 {$setc TARGET_CPU_PPC := FALSE}
106 {$setc TARGET_CPU_PPC64 := FALSE}
107 {$setc TARGET_CPU_X86 := TRUE}
108 {$setc TARGET_CPU_X86_64 := FALSE}
109 {$setc TARGET_CPU_ARM := FALSE}
110 {$setc TARGET_CPU_ARM64 := FALSE}
111 {$ifc defined iphonesim}
112 {$setc TARGET_OS_MAC := FALSE}
113 {$setc TARGET_OS_IPHONE := TRUE}
114 {$setc TARGET_IPHONE_SIMULATOR := TRUE}
115 {$elsec}
116 {$setc TARGET_OS_MAC := TRUE}
117 {$setc TARGET_OS_IPHONE := FALSE}
118 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
119 {$endc}
120 {$setc TARGET_OS_EMBEDDED := FALSE}
121 {$elifc defined __x86_64__ and __x86_64__}
122 {$setc TARGET_CPU_PPC := FALSE}
123 {$setc TARGET_CPU_PPC64 := FALSE}
124 {$setc TARGET_CPU_X86 := FALSE}
125 {$setc TARGET_CPU_X86_64 := TRUE}
126 {$setc TARGET_CPU_ARM := FALSE}
127 {$setc TARGET_CPU_ARM64 := FALSE}
128 {$ifc defined iphonesim}
129 {$setc TARGET_OS_MAC := FALSE}
130 {$setc TARGET_OS_IPHONE := TRUE}
131 {$setc TARGET_IPHONE_SIMULATOR := TRUE}
132 {$elsec}
133 {$setc TARGET_OS_MAC := TRUE}
134 {$setc TARGET_OS_IPHONE := FALSE}
135 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
136 {$endc}
137 {$setc TARGET_OS_EMBEDDED := FALSE}
138 {$elifc defined __arm__ and __arm__}
139 {$setc TARGET_CPU_PPC := FALSE}
140 {$setc TARGET_CPU_PPC64 := FALSE}
141 {$setc TARGET_CPU_X86 := FALSE}
142 {$setc TARGET_CPU_X86_64 := FALSE}
143 {$setc TARGET_CPU_ARM := TRUE}
144 {$setc TARGET_CPU_ARM64 := FALSE}
145 {$setc TARGET_OS_MAC := FALSE}
146 {$setc TARGET_OS_IPHONE := TRUE}
147 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
148 {$setc TARGET_OS_EMBEDDED := TRUE}
149 {$elifc defined __arm64__ and __arm64__}
150 {$setc TARGET_CPU_PPC := FALSE}
151 {$setc TARGET_CPU_PPC64 := FALSE}
152 {$setc TARGET_CPU_X86 := FALSE}
153 {$setc TARGET_CPU_X86_64 := FALSE}
154 {$setc TARGET_CPU_ARM := FALSE}
155 {$setc TARGET_CPU_ARM64 := TRUE}
156 {$ifc defined ios}
157 {$setc TARGET_OS_MAC := FALSE}
158 {$setc TARGET_OS_IPHONE := TRUE}
159 {$setc TARGET_OS_EMBEDDED := TRUE}
160 {$elsec}
161 {$setc TARGET_OS_MAC := TRUE}
162 {$setc TARGET_OS_IPHONE := FALSE}
163 {$setc TARGET_OS_EMBEDDED := FALSE}
164 {$endc}
165 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
166 {$elsec}
167 {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
168 {$endc}
169
170 {$ifc defined __LP64__ and __LP64__ }
171 {$setc TARGET_CPU_64 := TRUE}
172 {$elsec}
173 {$setc TARGET_CPU_64 := FALSE}
174 {$endc}
175
176 {$ifc defined FPC_BIG_ENDIAN}
177 {$setc TARGET_RT_BIG_ENDIAN := TRUE}
178 {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
179 {$elifc defined FPC_LITTLE_ENDIAN}
180 {$setc TARGET_RT_BIG_ENDIAN := FALSE}
181 {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
182 {$elsec}
183 {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
184 {$endc}
185 {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
186 {$setc CALL_NOT_IN_CARBON := FALSE}
187 {$setc OLDROUTINENAMES := FALSE}
188 {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
189 {$setc OPAQUE_UPP_TYPES := TRUE}
190 {$setc OTCARBONAPPLICATION := TRUE}
191 {$setc OTKERNEL := FALSE}
192 {$setc PM_USE_SESSION_APIS := TRUE}
193 {$setc TARGET_API_MAC_CARBON := TRUE}
194 {$setc TARGET_API_MAC_OS8 := FALSE}
195 {$setc TARGET_API_MAC_OSX := TRUE}
196 {$setc TARGET_CARBON := TRUE}
197 {$setc TARGET_CPU_68K := FALSE}
198 {$setc TARGET_CPU_MIPS := FALSE}
199 {$setc TARGET_CPU_SPARC := FALSE}
200 {$setc TARGET_OS_UNIX := FALSE}
201 {$setc TARGET_OS_WIN32 := FALSE}
202 {$setc TARGET_RT_MAC_68881 := FALSE}
203 {$setc TARGET_RT_MAC_CFM := FALSE}
204 {$setc TARGET_RT_MAC_MACHO := TRUE}
205 {$setc TYPED_FUNCTION_POINTERS := TRUE}
206 {$setc TYPE_BOOL := FALSE}
207 {$setc TYPE_EXTENDED := FALSE}
208 {$setc TYPE_LONGLONG := TRUE}
209 uses MacTypes,Files;
210 {$endc} {not MACOSALLINCLUDE}
211
212
213 {$ifc TARGET_OS_MAC}
214
215 {$ALIGN POWER}
216
217
218 {
219 These typedefs were originally created for the Copland Resource Mangager
220 }
221 type
222 ResID = SInt16;
223 ResAttributes = SInt16;
224 ResFileAttributes = SInt16;
225 ResourceCount = SInt16;
226 ResourceIndex = SInt16;
227 ResFileRefNum = FSIORefNum;
228 { Resource Attribute Bits }
229 const
230 resSysRefBit = 7; {reference to system/local reference}
231 resSysHeapBit = 6; {In system/in application heap}
232 resPurgeableBit = 5; {Purgeable/not purgeable}
233 resLockedBit = 4; {Locked/not locked}
234 resProtectedBit = 3; {Protected/not protected}
235 resPreloadBit = 2; {Read in at OpenResource?}
236 resChangedBit = 1; {Existing resource changed since last update}
237
238 { Resource Attribute Masks}
239 const
240 resSysHeap = 64; {System or application heap?}
241 resPurgeable = 32; {Purgeable resource?}
242 resLocked = 16; {Load it in locked?}
243 resProtected = 8; {Protected?}
244 resPreload = 4; {Load in on OpenResFile?}
245 resChanged = 2; {Resource changed?}
246
247 { Resource Fork Attribute Bits}
248 const
249 mapReadOnlyBit = 7; {is this file read-only?}
250 mapCompactBit = 6; {Is a compact necessary?}
251 mapChangedBit = 5; {Is it necessary to write map?}
252
253 { Resource Fork Attribute Masks}
254 const
255 mapReadOnly = 128; {Resource file read-only}
256 mapCompact = 64; {Compact resource file}
257 mapChanged = 32; {Write map out at update}
258
259 { Resource File Ref Num constants}
260 const
261 kResFileNotOpened = -1; {ref num return as error when opening a resource file}
262 kSystemResFile = 0; {this is the default ref num to the system file}
263
264
265 type
266 ResErrProcPtr = procedure( thErr: OSErr );
267 ResErrUPP = ResErrProcPtr;
268 {
269 * NewResErrUPP()
270 *
271 * Availability:
272 * Mac OS X: in version 10.0 and later in CoreServices.framework
273 * CarbonLib: in CarbonLib 1.0 and later
274 * Non-Carbon CFM: available as macro/inline
275 }
NewResErrUPPnull276 function NewResErrUPP( userRoutine: ResErrProcPtr ): ResErrUPP; external name '_NewResErrUPP';
277 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
278
279 {
280 * DisposeResErrUPP()
281 *
282 * Availability:
283 * Mac OS X: in version 10.0 and later in CoreServices.framework
284 * CarbonLib: in CarbonLib 1.0 and later
285 * Non-Carbon CFM: available as macro/inline
286 }
287 procedure DisposeResErrUPP( userUPP: ResErrUPP ); external name '_DisposeResErrUPP';
288 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
289
290 {
291 * InvokeResErrUPP()
292 *
293 * Availability:
294 * Mac OS X: in version 10.0 and later in CoreServices.framework
295 * CarbonLib: in CarbonLib 1.0 and later
296 * Non-Carbon CFM: available as macro/inline
297 }
298 procedure InvokeResErrUPP( thErr: OSErr; userUPP: ResErrUPP ); external name '_InvokeResErrUPP';
299 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
300
301 { QuickTime 3.0}
302 type
theResourcenull303 ResourceEndianFilterPtr = function( theResource: Handle; currentlyNativeEndian: Boolean ): OSErr;
304 {
305 * CloseResFile()
306 *
307 * Mac OS X threading:
308 * Not thread safe
309 *
310 * Availability:
311 * Mac OS X: in version 10.0 and later in CoreServices.framework
312 * CarbonLib: in CarbonLib 1.0 and later
313 * Non-Carbon CFM: in InterfaceLib 7.1 and later
314 }
315 procedure CloseResFile( refNum: ResFileRefNum ); external name '_CloseResFile';
316 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
317
318
319 {
320 * ResError()
321 *
322 * Mac OS X threading:
323 * Not thread safe
324 *
325 * Availability:
326 * Mac OS X: in version 10.0 and later in CoreServices.framework
327 * CarbonLib: in CarbonLib 1.0 and later
328 * Non-Carbon CFM: in InterfaceLib 7.1 and later
329 }
ResErrornull330 function ResError: OSErr; external name '_ResError';
331 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
332
333
334 {
335 * CurResFile()
336 *
337 * Mac OS X threading:
338 * Not thread safe
339 *
340 * Availability:
341 * Mac OS X: in version 10.0 and later in CoreServices.framework
342 * CarbonLib: in CarbonLib 1.0 and later
343 * Non-Carbon CFM: in InterfaceLib 7.1 and later
344 }
CurResFilenull345 function CurResFile: ResFileRefNum; external name '_CurResFile';
346 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
347
348
349 {
350 * HomeResFile()
351 *
352 * Mac OS X threading:
353 * Not thread safe
354 *
355 * Availability:
356 * Mac OS X: in version 10.0 and later in CoreServices.framework
357 * CarbonLib: in CarbonLib 1.0 and later
358 * Non-Carbon CFM: in InterfaceLib 7.1 and later
359 }
HomeResFilenull360 function HomeResFile( theResource: Handle ): ResFileRefNum; external name '_HomeResFile';
361 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
362
363
364 {
365 * UseResFile()
366 *
367 * Mac OS X threading:
368 * Not thread safe
369 *
370 * Availability:
371 * Mac OS X: in version 10.0 and later in CoreServices.framework
372 * CarbonLib: in CarbonLib 1.0 and later
373 * Non-Carbon CFM: in InterfaceLib 7.1 and later
374 }
375 procedure UseResFile( refNum: ResFileRefNum ); external name '_UseResFile';
376 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
377
378
379 {
380 * CountTypes()
381 *
382 * Mac OS X threading:
383 * Not thread safe
384 *
385 * Availability:
386 * Mac OS X: in version 10.0 and later in CoreServices.framework
387 * CarbonLib: in CarbonLib 1.0 and later
388 * Non-Carbon CFM: in InterfaceLib 7.1 and later
389 }
CountTypesnull390 function CountTypes: ResourceCount; external name '_CountTypes';
391 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
392
393
394 {
395 * Count1Types()
396 *
397 * Mac OS X threading:
398 * Not thread safe
399 *
400 * Availability:
401 * Mac OS X: in version 10.0 and later in CoreServices.framework
402 * CarbonLib: in CarbonLib 1.0 and later
403 * Non-Carbon CFM: in InterfaceLib 7.1 and later
404 }
Count1Typesnull405 function Count1Types: ResourceCount; external name '_Count1Types';
406 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
407
408
409 {
410 * GetIndType()
411 *
412 * Mac OS X threading:
413 * Not thread safe
414 *
415 * Availability:
416 * Mac OS X: in version 10.0 and later in CoreServices.framework
417 * CarbonLib: in CarbonLib 1.0 and later
418 * Non-Carbon CFM: in InterfaceLib 7.1 and later
419 }
420 procedure GetIndType( var theType: ResType; itemIndex: ResourceIndex ); external name '_GetIndType';
421 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
422
423
424 {
425 * Get1IndType()
426 *
427 * Mac OS X threading:
428 * Not thread safe
429 *
430 * Availability:
431 * Mac OS X: in version 10.0 and later in CoreServices.framework
432 * CarbonLib: in CarbonLib 1.0 and later
433 * Non-Carbon CFM: in InterfaceLib 7.1 and later
434 }
435 procedure Get1IndType( var theType: ResType; itemIndex: ResourceIndex ); external name '_Get1IndType';
436 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
437
438
439 {
440 * SetResLoad()
441 *
442 * Mac OS X threading:
443 * Not thread safe
444 *
445 * Availability:
446 * Mac OS X: in version 10.0 and later in CoreServices.framework
447 * CarbonLib: in CarbonLib 1.0 and later
448 * Non-Carbon CFM: in InterfaceLib 7.1 and later
449 }
450 procedure SetResLoad( load: Boolean ); external name '_SetResLoad';
451 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
452
453
454 {
455 * CountResources()
456 *
457 * Mac OS X threading:
458 * Not thread safe
459 *
460 * Availability:
461 * Mac OS X: in version 10.0 and later in CoreServices.framework
462 * CarbonLib: in CarbonLib 1.0 and later
463 * Non-Carbon CFM: in InterfaceLib 7.1 and later
464 }
CountResourcesnull465 function CountResources( theType: ResType ): ResourceCount; external name '_CountResources';
466 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
467
468
469 {
470 * Count1Resources()
471 *
472 * Mac OS X threading:
473 * Not thread safe
474 *
475 * Availability:
476 * Mac OS X: in version 10.0 and later in CoreServices.framework
477 * CarbonLib: in CarbonLib 1.0 and later
478 * Non-Carbon CFM: in InterfaceLib 7.1 and later
479 }
Count1Resourcesnull480 function Count1Resources( theType: ResType ): ResourceCount; external name '_Count1Resources';
481 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
482
483
484 {
485 * GetIndResource()
486 *
487 * Mac OS X threading:
488 * Not thread safe
489 *
490 * Availability:
491 * Mac OS X: in version 10.0 and later in CoreServices.framework
492 * CarbonLib: in CarbonLib 1.0 and later
493 * Non-Carbon CFM: in InterfaceLib 7.1 and later
494 }
GetIndResourcenull495 function GetIndResource( theType: ResType; itemIndex: ResourceIndex ): Handle; external name '_GetIndResource';
496 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
497
498
499 {
500 * Get1IndResource()
501 *
502 * Mac OS X threading:
503 * Not thread safe
504 *
505 * Availability:
506 * Mac OS X: in version 10.0 and later in CoreServices.framework
507 * CarbonLib: in CarbonLib 1.0 and later
508 * Non-Carbon CFM: in InterfaceLib 7.1 and later
509 }
Get1IndResourcenull510 function Get1IndResource( theType: ResType; itemIndex: ResourceIndex ): Handle; external name '_Get1IndResource';
511 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
512
513
514 {
515 * GetResource()
516 *
517 * Mac OS X threading:
518 * Not thread safe
519 *
520 * Availability:
521 * Mac OS X: in version 10.0 and later in CoreServices.framework
522 * CarbonLib: in CarbonLib 1.0 and later
523 * Non-Carbon CFM: in InterfaceLib 7.1 and later
524 }
GetResourcenull525 function GetResource( theType: ResType; theID: ResID ): Handle; external name '_GetResource';
526 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
527
528
529 {
530 * Get1Resource()
531 *
532 * Mac OS X threading:
533 * Not thread safe
534 *
535 * Availability:
536 * Mac OS X: in version 10.0 and later in CoreServices.framework
537 * CarbonLib: in CarbonLib 1.0 and later
538 * Non-Carbon CFM: in InterfaceLib 7.1 and later
539 }
Get1Resourcenull540 function Get1Resource( theType: ResType; theID: ResID ): Handle; external name '_Get1Resource';
541 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
542
543
544 {
545 * GetNamedResource()
546 *
547 * Mac OS X threading:
548 * Not thread safe
549 *
550 * Availability:
551 * Mac OS X: in version 10.0 and later in CoreServices.framework
552 * CarbonLib: in CarbonLib 1.0 and later
553 * Non-Carbon CFM: in InterfaceLib 7.1 and later
554 }
GetNamedResourcenull555 function GetNamedResource( theType: ResType; const (*var*) name: Str255 ): Handle; external name '_GetNamedResource';
556 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
557
558
559 {
560 * Get1NamedResource()
561 *
562 * Mac OS X threading:
563 * Not thread safe
564 *
565 * Availability:
566 * Mac OS X: in version 10.0 and later in CoreServices.framework
567 * CarbonLib: in CarbonLib 1.0 and later
568 * Non-Carbon CFM: in InterfaceLib 7.1 and later
569 }
Get1NamedResourcenull570 function Get1NamedResource( theType: ResType; const (*var*) name: Str255 ): Handle; external name '_Get1NamedResource';
571 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
572
573
574 {
575 * [Mac]LoadResource()
576 *
577 * Mac OS X threading:
578 * Not thread safe
579 *
580 * Availability:
581 * Mac OS X: in version 10.0 and later in CoreServices.framework
582 * CarbonLib: in CarbonLib 1.0 and later
583 * Non-Carbon CFM: in InterfaceLib 7.1 and later
584 }
585 procedure MacLoadResource( theResource: Handle ); external name '_MacLoadResource';
586 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
587
588
589 {
590 * ReleaseResource()
591 *
592 * Mac OS X threading:
593 * Not thread safe
594 *
595 * Availability:
596 * Mac OS X: in version 10.0 and later in CoreServices.framework
597 * CarbonLib: in CarbonLib 1.0 and later
598 * Non-Carbon CFM: in InterfaceLib 7.1 and later
599 }
600 procedure ReleaseResource( theResource: Handle ); external name '_ReleaseResource';
601 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
602
603
604 {
605 * DetachResource()
606 *
607 * Mac OS X threading:
608 * Not thread safe
609 *
610 * Availability:
611 * Mac OS X: in version 10.0 and later in CoreServices.framework
612 * CarbonLib: in CarbonLib 1.0 and later
613 * Non-Carbon CFM: in InterfaceLib 7.1 and later
614 }
615 procedure DetachResource( theResource: Handle ); external name '_DetachResource';
616 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
617
618
619 {
620 * UniqueID()
621 *
622 * Mac OS X threading:
623 * Not thread safe
624 *
625 * Availability:
626 * Mac OS X: in version 10.0 and later in CoreServices.framework
627 * CarbonLib: in CarbonLib 1.0 and later
628 * Non-Carbon CFM: in InterfaceLib 7.1 and later
629 }
UniqueIDnull630 function UniqueID( theType: ResType ): ResID; external name '_UniqueID';
631 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
632
633
634 {
635 * Unique1ID()
636 *
637 * Mac OS X threading:
638 * Not thread safe
639 *
640 * Availability:
641 * Mac OS X: in version 10.0 and later in CoreServices.framework
642 * CarbonLib: in CarbonLib 1.0 and later
643 * Non-Carbon CFM: in InterfaceLib 7.1 and later
644 }
Unique1IDnull645 function Unique1ID( theType: ResType ): ResID; external name '_Unique1ID';
646 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
647
648
649 {
650 * GetResAttrs()
651 *
652 * Mac OS X threading:
653 * Not thread safe
654 *
655 * Availability:
656 * Mac OS X: in version 10.0 and later in CoreServices.framework
657 * CarbonLib: in CarbonLib 1.0 and later
658 * Non-Carbon CFM: in InterfaceLib 7.1 and later
659 }
GetResAttrsnull660 function GetResAttrs( theResource: Handle ): ResAttributes; external name '_GetResAttrs';
661 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
662
663
664 {
665 * GetResInfo()
666 *
667 * Mac OS X threading:
668 * Not thread safe
669 *
670 * Availability:
671 * Mac OS X: in version 10.0 and later in CoreServices.framework
672 * CarbonLib: in CarbonLib 1.0 and later
673 * Non-Carbon CFM: in InterfaceLib 7.1 and later
674 }
675 procedure GetResInfo( theResource: Handle; var theID: ResID; var theType: ResType; var name: Str255 ); external name '_GetResInfo';
676 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
677
678
679 {
680 * SetResInfo()
681 *
682 * Mac OS X threading:
683 * Not thread safe
684 *
685 * Availability:
686 * Mac OS X: in version 10.0 and later in CoreServices.framework
687 * CarbonLib: in CarbonLib 1.0 and later
688 * Non-Carbon CFM: in InterfaceLib 7.1 and later
689 }
690 procedure SetResInfo( theResource: Handle; theID: ResID; const (*var*) name: Str255 ); external name '_SetResInfo';
691 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
692
693
694 {
695 * AddResource()
696 *
697 * Mac OS X threading:
698 * Not thread safe
699 *
700 * Availability:
701 * Mac OS X: in version 10.0 and later in CoreServices.framework
702 * CarbonLib: in CarbonLib 1.0 and later
703 * Non-Carbon CFM: in InterfaceLib 7.1 and later
704 }
705 procedure AddResource( theData: Handle; theType: ResType; theID: ResID; const (*var*) name: Str255 ); external name '_AddResource';
706 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
707
708
709 {
710 * GetResourceSizeOnDisk()
711 *
712 * Mac OS X threading:
713 * Not thread safe
714 *
715 * Availability:
716 * Mac OS X: in version 10.0 and later in CoreServices.framework
717 * CarbonLib: in CarbonLib 1.0 and later
718 * Non-Carbon CFM: in InterfaceLib 7.1 and later
719 }
GetResourceSizeOnDisknull720 function GetResourceSizeOnDisk( theResource: Handle ): SIGNEDLONG; external name '_GetResourceSizeOnDisk';
721 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
722
723
724 {
725 * GetMaxResourceSize()
726 *
727 * Mac OS X threading:
728 * Not thread safe
729 *
730 * Availability:
731 * Mac OS X: in version 10.0 and later in CoreServices.framework
732 * CarbonLib: in CarbonLib 1.0 and later
733 * Non-Carbon CFM: in InterfaceLib 7.1 and later
734 }
GetMaxResourceSizenull735 function GetMaxResourceSize( theResource: Handle ): SIGNEDLONG; external name '_GetMaxResourceSize';
736 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
737
738
739 {
740 * SetResAttrs()
741 *
742 * Mac OS X threading:
743 * Not thread safe
744 *
745 * Availability:
746 * Mac OS X: in version 10.0 and later in CoreServices.framework
747 * CarbonLib: in CarbonLib 1.0 and later
748 * Non-Carbon CFM: in InterfaceLib 7.1 and later
749 }
750 procedure SetResAttrs( theResource: Handle; attrs: ResAttributes ); external name '_SetResAttrs';
751 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
752
753
754 {
755 * ChangedResource()
756 *
757 * Mac OS X threading:
758 * Not thread safe
759 *
760 * Availability:
761 * Mac OS X: in version 10.0 and later in CoreServices.framework
762 * CarbonLib: in CarbonLib 1.0 and later
763 * Non-Carbon CFM: in InterfaceLib 7.1 and later
764 }
765 procedure ChangedResource( theResource: Handle ); external name '_ChangedResource';
766 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
767
768
769 {
770 * RemoveResource()
771 *
772 * Mac OS X threading:
773 * Not thread safe
774 *
775 * Availability:
776 * Mac OS X: in version 10.0 and later in CoreServices.framework
777 * CarbonLib: in CarbonLib 1.0 and later
778 * Non-Carbon CFM: in InterfaceLib 7.1 and later
779 }
780 procedure RemoveResource( theResource: Handle ); external name '_RemoveResource';
781 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
782
783
784 {
785 * UpdateResFile()
786 *
787 * Mac OS X threading:
788 * Not thread safe
789 *
790 * Availability:
791 * Mac OS X: in version 10.0 and later in CoreServices.framework
792 * CarbonLib: in CarbonLib 1.0 and later
793 * Non-Carbon CFM: in InterfaceLib 7.1 and later
794 }
795 procedure UpdateResFile( refNum: ResFileRefNum ); external name '_UpdateResFile';
796 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
797
798
799 {
800 * WriteResource()
801 *
802 * Mac OS X threading:
803 * Not thread safe
804 *
805 * Availability:
806 * Mac OS X: in version 10.0 and later in CoreServices.framework
807 * CarbonLib: in CarbonLib 1.0 and later
808 * Non-Carbon CFM: in InterfaceLib 7.1 and later
809 }
810 procedure WriteResource( theResource: Handle ); external name '_WriteResource';
811 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
812
813
814 {
815 * SetResPurge()
816 *
817 * Mac OS X threading:
818 * Not thread safe
819 *
820 * Availability:
821 * Mac OS X: in version 10.0 and later in CoreServices.framework
822 * CarbonLib: in CarbonLib 1.0 and later
823 * Non-Carbon CFM: in InterfaceLib 7.1 and later
824 }
825 procedure SetResPurge( install: Boolean ); external name '_SetResPurge';
826 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
827
828
829 {
830 * GetResFileAttrs()
831 *
832 * Mac OS X threading:
833 * Not thread safe
834 *
835 * Availability:
836 * Mac OS X: in version 10.0 and later in CoreServices.framework
837 * CarbonLib: in CarbonLib 1.0 and later
838 * Non-Carbon CFM: in InterfaceLib 7.1 and later
839 }
GetResFileAttrsnull840 function GetResFileAttrs( refNum: ResFileRefNum ): ResFileAttributes; external name '_GetResFileAttrs';
841 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
842
843
844 {
845 * SetResFileAttrs()
846 *
847 * Mac OS X threading:
848 * Not thread safe
849 *
850 * Availability:
851 * Mac OS X: in version 10.0 and later in CoreServices.framework
852 * CarbonLib: in CarbonLib 1.0 and later
853 * Non-Carbon CFM: in InterfaceLib 7.1 and later
854 }
855 procedure SetResFileAttrs( refNum: ResFileRefNum; attrs: ResFileAttributes ); external name '_SetResFileAttrs';
856 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
857
858
859 {
860 * ReadPartialResource()
861 *
862 * Mac OS X threading:
863 * Not thread safe
864 *
865 * Availability:
866 * Mac OS X: in version 10.0 and later in CoreServices.framework
867 * CarbonLib: in CarbonLib 1.0 and later
868 * Non-Carbon CFM: in InterfaceLib 7.1 and later
869 }
870 procedure ReadPartialResource( theResource: Handle; offset: SIGNEDLONG; buffer: UnivPtr; count: SIGNEDLONG ); external name '_ReadPartialResource';
871 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
872
873
874 {
875 * WritePartialResource()
876 *
877 * Mac OS X threading:
878 * Not thread safe
879 *
880 * Availability:
881 * Mac OS X: in version 10.0 and later in CoreServices.framework
882 * CarbonLib: in CarbonLib 1.0 and later
883 * Non-Carbon CFM: in InterfaceLib 7.1 and later
884 }
885 procedure WritePartialResource( theResource: Handle; offset: SIGNEDLONG; buffer: {const} UnivPtr; count: SIGNEDLONG ); external name '_WritePartialResource';
886 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
887
888
889 {
890 * SetResourceSize()
891 *
892 * Mac OS X threading:
893 * Not thread safe
894 *
895 * Availability:
896 * Mac OS X: in version 10.0 and later in CoreServices.framework
897 * CarbonLib: in CarbonLib 1.0 and later
898 * Non-Carbon CFM: in InterfaceLib 7.1 and later
899 }
900 procedure SetResourceSize( theResource: Handle; newSize: SIGNEDLONG ); external name '_SetResourceSize';
901 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
902
903
904 {
905 * GetNextFOND()
906 *
907 * Mac OS X threading:
908 * Not thread safe
909 *
910 * Availability:
911 * Mac OS X: in version 10.0 and later in CoreServices.framework
912 * CarbonLib: in CarbonLib 1.0 and later
913 * Non-Carbon CFM: in InterfaceLib 7.1 and later
914 }
GetNextFONDnull915 function GetNextFOND( fondHandle: Handle ): Handle; external name '_GetNextFOND';
916 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
917
918
919 { QuickTime 3.0}
920 {
921 * RegisterResourceEndianFilter()
922 *
923 * Availability:
924 * Mac OS X: not available
925 * CarbonLib: not available
926 * Non-Carbon CFM: not available
927 }
928
929
930 {
931 _________________________________________________________________________________________________________
932
933 � RESOURCE CHAIN LOCATION - for use with the Resource Manager chain manipulation routines under Carbon.
934 _________________________________________________________________________________________________________
935 }
936
937 type
938 RsrcChainLocation = SInt16;
939 const
940 kRsrcChainBelowSystemMap = 0; { Below the system's resource map}
941 kRsrcChainBelowApplicationMap = 1; { Below the application's resource map}
942 kRsrcChainAboveApplicationMap = 2; { Above the application's resource map}
943 kRsrcChainAboveAllMaps = 4; { Above all resource maps}
944
945 {
946 If the file is already in the resource chain, it is removed and re-inserted at the specified location
947 If the file has been detached, it is added to the resource chain at the specified location
948 Returns resFNotFound if it's not currently open.
949 }
950 {
951 * InsertResourceFile()
952 *
953 * Mac OS X threading:
954 * Not thread safe
955 *
956 * Availability:
957 * Mac OS X: in version 10.0 and later in CoreServices.framework
958 * CarbonLib: in CarbonLib 1.0 and later
959 * Non-Carbon CFM: not available
960 }
InsertResourceFilenull961 function InsertResourceFile( refNum: ResFileRefNum; where: RsrcChainLocation ): OSErr; external name '_InsertResourceFile';
962 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
963
964
965 {
966 If the file is not currently in the resource chain, this returns resNotFound
967 Otherwise, the resource file is removed from the resource chain.
968 }
969 {
970 * DetachResourceFile()
971 *
972 * Mac OS X threading:
973 * Not thread safe
974 *
975 * Availability:
976 * Mac OS X: in version 10.0 and later in CoreServices.framework
977 * CarbonLib: in CarbonLib 1.0 and later
978 * Non-Carbon CFM: not available
979 }
DetachResourceFilenull980 function DetachResourceFile( refNum: ResFileRefNum ): OSErr; external name '_DetachResourceFile';
981 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
982
983
984 {
985 GetTopResourceFile returns the refNum of the top most resource map in the current resource chain. If
986 the resource chain is empty it returns resFNotFound.
987 }
988 {
989 * GetTopResourceFile()
990 *
991 * Mac OS X threading:
992 * Not thread safe
993 *
994 * Availability:
995 * Mac OS X: in version 10.0 and later in CoreServices.framework
996 * CarbonLib: in CarbonLib 1.0.2 and later
997 * Non-Carbon CFM: not available
998 }
GetTopResourceFilenull999 function GetTopResourceFile( var refNum: ResFileRefNum ): OSErr; external name '_GetTopResourceFile';
1000 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
1001
1002
1003 {
1004 GetNextResourceFile can be used to iterate over resource files in the resource chain. By passing a
1005 valid refNum in curRefNum it will return in nextRefNum the refNum of the next file in
1006 the chain. If curRefNum is not found in the resource chain, GetNextResourceFile returns resFNotFound.
1007 When the end of the chain is reached GetNextResourceFile will return noErr and nextRefNum will be NIL.
1008 }
1009 {
1010 * GetNextResourceFile()
1011 *
1012 * Mac OS X threading:
1013 * Not thread safe
1014 *
1015 * Availability:
1016 * Mac OS X: in version 10.0 and later in CoreServices.framework
1017 * CarbonLib: in CarbonLib 1.0.2 and later
1018 * Non-Carbon CFM: not available
1019 }
GetNextResourceFilenull1020 function GetNextResourceFile( curRefNum: ResFileRefNum; var nextRefNum: ResFileRefNum ): OSErr; external name '_GetNextResourceFile';
1021 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
1022
1023
1024 {
1025 * FSOpenResFile()
1026 *
1027 * Mac OS X threading:
1028 * Not thread safe
1029 *
1030 * Availability:
1031 * Mac OS X: in version 10.0 and later in CoreServices.framework
1032 * CarbonLib: in CarbonLib 1.1 and later
1033 * Non-Carbon CFM: in InterfaceLib 9.1 and later
1034 }
FSOpenResFilenull1035 function FSOpenResFile( const (*var*) ref: FSRef; permission: SInt8 ): ResFileRefNum; external name '_FSOpenResFile';
1036 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
1037
1038
1039 {
1040 * FSCreateResFile()
1041 *
1042 * Mac OS X threading:
1043 * Not thread safe
1044 *
1045 * Availability:
1046 * Mac OS X: in version 10.0 and later in CoreServices.framework
1047 * CarbonLib: in CarbonLib 1.1 and later
1048 * Non-Carbon CFM: in InterfaceLib 9.1 and later
1049 }
1050 procedure FSCreateResFile( const (*var*) parentRef: FSRef; nameLength: UniCharCount; name: UniCharPtr; whichInfo: FSCatalogInfoBitmap; {const} catalogInfo: FSCatalogInfoPtr { can be NULL }; newRef: FSRefPtr { can be NULL }; newSpec: FSSpecPtr { can be NULL } ); external name '_FSCreateResFile';
1051 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
1052
1053
1054 {
1055 Returns true if the resource file is already open and known by the Resource Manager (i.e., it is
1056 either in the current resource chain or it's a detached resource file.) If it's in the resource
1057 chain, the inChain Boolean is set to true on exit and true is returned. If it's an open file, but
1058 the file is currently detached, inChain is set to false and true is returned. If the file is open,
1059 the refNum to the file is returned.
1060 }
1061 {
1062 * FSResourceFileAlreadyOpen()
1063 *
1064 * Mac OS X threading:
1065 * Not thread safe
1066 *
1067 * Availability:
1068 * Mac OS X: in version 10.0 and later in CoreServices.framework
1069 * CarbonLib: in CarbonLib 1.1 and later
1070 * Non-Carbon CFM: in InterfaceLib 9.1 and later
1071 }
FSResourceFileAlreadyOpennull1072 function FSResourceFileAlreadyOpen( const (*var*) resourceFileRef: FSRef; var inChain: Boolean; var refNum: ResFileRefNum ): Boolean; external name '_FSResourceFileAlreadyOpen';
1073 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
1074
1075
1076 {
1077 FSOpenOrphanResFile should be used to open a resource file that is persistent across all contexts,
1078 because using OpenResFile normally loads a map and all preloaded resources into the application
1079 context. FSOpenOrphanResFile loads everything into the system context and detaches the file
1080 from the context in which it was opened. If the file is already in the resource chain and a new
1081 instance is not opened, FSOpenOrphanResFile will return a paramErr.
1082 Use with care, as can and will fail if the map is very large or a lot of preload
1083 resources exist.
1084 }
1085 {
1086 * FSOpenOrphanResFile()
1087 *
1088 * Mac OS X threading:
1089 * Not thread safe
1090 *
1091 * Availability:
1092 * Mac OS X: in version 10.5 and later in CoreServices.framework
1093 * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.5 and later
1094 * Non-Carbon CFM: not available
1095 }
FSOpenOrphanResFilenull1096 function FSOpenOrphanResFile( const (*var*) ref: FSRef; permission: SignedByte; var refNum: ResFileRefNum ): OSErr; external name '_FSOpenOrphanResFile';
1097 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
1098
1099
1100 {
1101 * FSCreateResourceFile()
1102 *
1103 * Summary:
1104 * Creates a new resource file.
1105 *
1106 * Discussion:
1107 * This function creates a new file and initializes the specified
1108 * named fork as an empty resource fork. This function allows for
1109 * the creation of data fork only files which can be used for
1110 * storing resources. Passing in a null name defaults to using the
1111 * data fork.
1112 *
1113 * Mac OS X threading:
1114 * Not thread safe
1115 *
1116 * Parameters:
1117 *
1118 * parentRef:
1119 * The directory where the file is to be created
1120 *
1121 * nameLength:
1122 * Number of Unicode characters in the file's name
1123 *
1124 * name:
1125 * A pointer to the Unicode name
1126 *
1127 * whichInfo:
1128 * Which catalog info fields to set
1129 *
1130 * catalogInfo:
1131 * The values for catalog info fields to set; may be NULL
1132 *
1133 * forkNameLength:
1134 * The length of the fork name (in Unicode characters)
1135 *
1136 * forkName:
1137 * The name of the fork to initialize (in Unicode); may be NULL
1138 *
1139 * newRef:
1140 * A pointer to the FSRef for the new file; may be NULL
1141 *
1142 * newSpec:
1143 * A pointer to the FSSpec for the new directory; may be NULL.
1144 * Ignored on 64 bit.
1145 *
1146 * Availability:
1147 * Mac OS X: in version 10.0 and later in CoreServices.framework
1148 * CarbonLib: in CarbonLib 1.3 and later
1149 * Non-Carbon CFM: not available
1150 }
FSCreateResourceFilenull1151 function FSCreateResourceFile( const (*var*) parentRef: FSRef; nameLength: UniCharCount; name: UniCharPtr; whichInfo: FSCatalogInfoBitmap; {const} catalogInfo: FSCatalogInfoPtr { can be NULL }; forkNameLength: UniCharCount; {const} forkName: UniCharPtr { can be NULL }; newRef: FSRefPtr { can be NULL }; newSpec: FSSpecPtr { can be NULL } ): OSErr; external name '_FSCreateResourceFile';
1152 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
1153
1154
1155 {
1156 * FSCreateResourceFork()
1157 *
1158 * Summary:
1159 * Creates the named forked and initializes it as an empty resource
1160 * fork.
1161 *
1162 * Discussion:
1163 * This function allows a resource fork to be added to an existing
1164 * file. Passing in a null forkname will result in the data fork
1165 * being used. If the named fork already exists this function does
1166 * nothing and returns errFSForkExists.
1167 *
1168 * Mac OS X threading:
1169 * Not thread safe
1170 *
1171 * Parameters:
1172 *
1173 * ref:
1174 * The file to add the fork to
1175 *
1176 * forkNameLength:
1177 * The length of the fork name (in Unicode characters)
1178 *
1179 * forkName:
1180 * The name of the fork to open (in Unicode); may be NULL
1181 *
1182 * flags:
1183 * Pass in zero
1184 *
1185 * Availability:
1186 * Mac OS X: in version 10.2 and later in CoreServices.framework
1187 * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
1188 * Non-Carbon CFM: not available
1189 }
FSCreateResourceForknull1190 function FSCreateResourceFork( const (*var*) ref: FSRef; forkNameLength: UniCharCount; {const} forkName: UniCharPtr { can be NULL }; flags: UInt32 ): OSErr; external name '_FSCreateResourceFork';
1191 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
1192
1193
1194 {
1195 * FSOpenResourceFile()
1196 *
1197 * Summary:
1198 * Opens the specified named fork as a resource fork.
1199 *
1200 * Discussion:
1201 * This function allows any named fork of a file to be used for
1202 * storing resources. Passing in a null forkname will result in the
1203 * data fork being used.
1204 *
1205 * Mac OS X threading:
1206 * Not thread safe
1207 *
1208 * Parameters:
1209 *
1210 * ref:
1211 * The file containing the fork to open
1212 *
1213 * forkNameLength:
1214 * The length of the fork name (in Unicode characters)
1215 *
1216 * forkName:
1217 * The name of the fork to open (in Unicode); may be NULL
1218 *
1219 * permissions:
1220 * The access (read and/or write) you want
1221 *
1222 * refNum:
1223 * On exit the reference number for accessing the open fork
1224 *
1225 * Availability:
1226 * Mac OS X: in version 10.0 and later in CoreServices.framework
1227 * CarbonLib: in CarbonLib 1.3 and later
1228 * Non-Carbon CFM: not available
1229 }
FSOpenResourceFilenull1230 function FSOpenResourceFile( const (*var*) ref: FSRef; forkNameLength: UniCharCount; {const} forkName: UniCharPtr { can be NULL }; permissions: SInt8; var refNum: ResFileRefNum ): OSErr; external name '_FSOpenResourceFile';
1231 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
1232
1233
1234 { Deprecated Functions -------------------------------------------------------}
1235
1236 { use FSOpenResourceFile instead}
1237 {$ifc not TARGET_CPU_64}
1238 {
1239 * OpenRFPerm() *** DEPRECATED ***
1240 *
1241 * Mac OS X threading:
1242 * Not thread safe
1243 *
1244 * Availability:
1245 * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
1246 * CarbonLib: in CarbonLib 1.0 and later
1247 * Non-Carbon CFM: in InterfaceLib 7.1 and later
1248 }
OpenRFPermnull1249 function OpenRFPerm( const (*var*) fileName: Str255; vRefNum: FSVolumeRefNum; permission: SInt8 ): ResFileRefNum; external name '_OpenRFPerm';
1250 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
1251
1252
1253 { use FSOpenResourceFile instead}
1254 {
1255 * HOpenResFile() *** DEPRECATED ***
1256 *
1257 * Mac OS X threading:
1258 * Not thread safe
1259 *
1260 * Availability:
1261 * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
1262 * CarbonLib: in CarbonLib 1.0 and later
1263 * Non-Carbon CFM: in InterfaceLib 7.1 and later
1264 }
HOpenResFilenull1265 function HOpenResFile( vRefNum: FSVolumeRefNum; dirID: SIGNEDLONG; const (*var*) fileName: Str255; permission: SInt8 ): ResFileRefNum; external name '_HOpenResFile';
1266 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
1267
1268
1269 { use FSCreateResourceFile instead}
1270 {
1271 * HCreateResFile() *** DEPRECATED ***
1272 *
1273 * Mac OS X threading:
1274 * Not thread safe
1275 *
1276 * Availability:
1277 * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
1278 * CarbonLib: in CarbonLib 1.0 and later
1279 * Non-Carbon CFM: in InterfaceLib 7.1 and later
1280 }
1281 procedure HCreateResFile( vRefNum: FSVolumeRefNum; dirID: SIGNEDLONG; const (*var*) fileName: Str255 ); external name '_HCreateResFile';
1282 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
1283
1284
1285 { use FSOpenResourceFile instead}
1286 {
1287 * FSpOpenResFile() *** DEPRECATED ***
1288 *
1289 * Mac OS X threading:
1290 * Not thread safe
1291 *
1292 * Availability:
1293 * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
1294 * CarbonLib: in CarbonLib 1.0 and later
1295 * Non-Carbon CFM: in InterfaceLib 7.1 and later
1296 }
FSpOpenResFilenull1297 function FSpOpenResFile( const (*var*) spec: FSSpec; permission: SignedByte ): ResFileRefNum; external name '_FSpOpenResFile';
1298 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
1299
1300
1301 { use FSCreateResourceFile instead}
1302 {
1303 * FSpCreateResFile() *** DEPRECATED ***
1304 *
1305 * Mac OS X threading:
1306 * Not thread safe
1307 *
1308 * Availability:
1309 * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
1310 * CarbonLib: in CarbonLib 1.0 and later
1311 * Non-Carbon CFM: in InterfaceLib 7.1 and later
1312 }
1313 procedure FSpCreateResFile( const (*var*) spec: FSSpec; creator: OSType; fileType: OSType; scriptTag: ScriptCode ); external name '_FSpCreateResFile';
1314 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
1315
1316
1317 { use FSResourceFileAlreadyOpen instead}
1318 {
1319 * FSpResourceFileAlreadyOpen() *** DEPRECATED ***
1320 *
1321 * Mac OS X threading:
1322 * Not thread safe
1323 *
1324 * Availability:
1325 * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
1326 * CarbonLib: in CarbonLib 1.0 and later
1327 * Non-Carbon CFM: in InterfaceLib 9.0 and later
1328 }
FSpResourceFileAlreadyOpennull1329 function FSpResourceFileAlreadyOpen( const (*var*) resourceFile: FSSpec; var inChain: Boolean; var refNum: ResFileRefNum ): Boolean; external name '_FSpResourceFileAlreadyOpen';
1330 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
1331
1332
1333 { use FSOpenOrphanResFile instead}
1334 {
1335 * FSpOpenOrphanResFile() *** DEPRECATED ***
1336 *
1337 * Mac OS X threading:
1338 * Not thread safe
1339 *
1340 * Availability:
1341 * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
1342 * CarbonLib: in CarbonLib 1.0 and later
1343 * Non-Carbon CFM: not available
1344 }
FSpOpenOrphanResFilenull1345 function FSpOpenOrphanResFile( const (*var*) spec: FSSpec; permission: SignedByte; var refNum: ResFileRefNum ): OSErr; external name '_FSpOpenOrphanResFile';
1346 (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
1347
1348
1349 {$endc} {not TARGET_CPU_64}
1350
1351 {$endc} {TARGET_OS_MAC}
1352 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
1353
1354 end.
1355 {$endc} {not MACOSALLINCLUDE}
1356