4
Contains: Picture Utilities Interfaces.
6
Version: Technology: Mac OS 8.5
7
Release: Universal Interfaces 3.4.2
9
Copyright: � 1990-2002 by Apple Computer, Inc., all rights reserved
11
Bugs?: For bug reports, consult the following page on
14
http://www.freepascal.org/bugs.html
20
Modified for use with Free Pascal
22
Please report any bugs to <gpc@microbizz.nl>
33
{$setc UNIVERSAL_INTERFACES_VERSION := $0342}
34
{$setc GAP_INTERFACES_VERSION := $0200}
36
{$ifc not defined USE_CFSTR_CONSTANT_MACROS}
37
{$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
40
{$ifc defined CPUPOWERPC and defined CPUI386}
41
{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
43
{$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
44
{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
47
{$ifc not defined __ppc__ and defined CPUPOWERPC}
52
{$ifc not defined __i386__ and defined CPUI386}
58
{$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
59
{$error Conflicting definitions for __ppc__ and __i386__}
62
{$ifc defined __ppc__ and __ppc__}
63
{$setc TARGET_CPU_PPC := TRUE}
64
{$setc TARGET_CPU_X86 := FALSE}
65
{$elifc defined __i386__ and __i386__}
66
{$setc TARGET_CPU_PPC := FALSE}
67
{$setc TARGET_CPU_X86 := TRUE}
69
{$error Neither __ppc__ nor __i386__ is defined.}
71
{$setc TARGET_CPU_PPC_64 := FALSE}
73
{$ifc defined FPC_BIG_ENDIAN}
74
{$setc TARGET_RT_BIG_ENDIAN := TRUE}
75
{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
76
{$elifc defined FPC_LITTLE_ENDIAN}
77
{$setc TARGET_RT_BIG_ENDIAN := FALSE}
78
{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
80
{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
82
{$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
83
{$setc CALL_NOT_IN_CARBON := FALSE}
84
{$setc OLDROUTINENAMES := FALSE}
85
{$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
86
{$setc OPAQUE_UPP_TYPES := TRUE}
87
{$setc OTCARBONAPPLICATION := TRUE}
88
{$setc OTKERNEL := FALSE}
89
{$setc PM_USE_SESSION_APIS := TRUE}
90
{$setc TARGET_API_MAC_CARBON := TRUE}
91
{$setc TARGET_API_MAC_OS8 := FALSE}
92
{$setc TARGET_API_MAC_OSX := TRUE}
93
{$setc TARGET_CARBON := TRUE}
94
{$setc TARGET_CPU_68K := FALSE}
95
{$setc TARGET_CPU_MIPS := FALSE}
96
{$setc TARGET_CPU_SPARC := FALSE}
97
{$setc TARGET_OS_MAC := TRUE}
98
{$setc TARGET_OS_UNIX := FALSE}
99
{$setc TARGET_OS_WIN32 := FALSE}
100
{$setc TARGET_RT_MAC_68881 := FALSE}
101
{$setc TARGET_RT_MAC_CFM := FALSE}
102
{$setc TARGET_RT_MAC_MACHO := TRUE}
103
{$setc TYPED_FUNCTION_POINTERS := TRUE}
104
{$setc TYPE_BOOL := FALSE}
105
{$setc TYPE_EXTENDED := FALSE}
106
{$setc TYPE_LONGLONG := TRUE}
107
uses MacTypes,Quickdraw,Palettes;
112
{ verbs for the GetPictInfo, GetPixMapInfo, and NewPictInfo calls }
115
returnColorTable = $0001;
116
returnPalette = $0002;
117
recordComments = $0004;
118
recordFontInfo = $0008;
119
suppressBlackAndWhite = $0010;
121
{ color pick methods }
122
systemMethod = 0; { system color pick method }
123
popularMethod = 1; { method that chooses the most popular set of colors }
124
medianMethod = 2; { method that chooses a good average mix of colors }
127
ColorBankIsCustom = -1;
128
ColorBankIsExactAnd555 = 0;
134
CommentSpecPtr = ^CommentSpec;
136
count: SInt16; { number of occurrances of this comment ID }
137
ID: SInt16; { ID for the comment in the picture }
140
CommentSpecHandle = ^CommentSpecPtr;
141
FontSpecPtr = ^FontSpec;
143
pictFontID: SInt16; { ID of the font in the picture }
144
sysFontID: SInt16; { ID of the same font in the current system file }
145
size: array [0..3] of SInt32; { bit array of all the sizes found (1..127) (bit 0 means > 127) }
146
style: SInt16; { combined style of all occurrances of the font }
147
nameOffset: SInt32; { offset into the fontNamesHdl handle for the font�s name }
150
FontSpecHandle = ^FontSpecPtr;
151
PictInfoPtr = ^PictInfo;
153
version: SInt16; { this is always zero, for now }
154
uniqueColors: SInt32; { the number of actual colors in the picture(s)/pixmap(s) }
155
thePalette: PaletteHandle; { handle to the palette information }
156
theColorTable: CTabHandle; { handle to the color table }
157
hRes: Fixed; { maximum horizontal resolution for all the pixmaps }
158
vRes: Fixed; { maximum vertical resolution for all the pixmaps }
159
depth: SInt16; { maximum depth for all the pixmaps (in the picture) }
160
sourceRect: Rect; { the picture frame rectangle (this contains the entire picture) }
161
textCount: SInt32; { total number of text strings in the picture }
162
lineCount: SInt32; { total number of lines in the picture }
163
rectCount: SInt32; { total number of rectangles in the picture }
164
rRectCount: SInt32; { total number of round rectangles in the picture }
165
ovalCount: SInt32; { total number of ovals in the picture }
166
arcCount: SInt32; { total number of arcs in the picture }
167
polyCount: SInt32; { total number of polygons in the picture }
168
regionCount: SInt32; { total number of regions in the picture }
169
bitMapCount: SInt32; { total number of bitmaps in the picture }
170
pixMapCount: SInt32; { total number of pixmaps in the picture }
171
commentCount: SInt32; { total number of comments in the picture }
172
uniqueComments: SInt32; { the number of unique comments in the picture }
173
commentHandle: CommentSpecHandle; { handle to all the comment information }
174
uniqueFonts: SInt32; { the number of unique fonts in the picture }
175
fontHandle: FontSpecHandle; { handle to the FontSpec information }
176
fontNamesHandle: Handle; { handle to the font names }
181
PictInfoHandle = ^PictInfoPtr;
182
{$ifc TYPED_FUNCTION_POINTERS}
183
InitPickMethodProcPtr = function(colorsRequested: SInt16; var dataRef: UInt32; var colorBankType: SInt16): OSErr;
185
InitPickMethodProcPtr = ProcPtr;
188
{$ifc TYPED_FUNCTION_POINTERS}
189
RecordColorsProcPtr = function(dataRef: UInt32; var colorsArray: RGBColor; colorCount: SInt32; var uniqueColors: SInt32): OSErr;
191
RecordColorsProcPtr = ProcPtr;
194
{$ifc TYPED_FUNCTION_POINTERS}
195
CalcColorTableProcPtr = function(dataRef: UInt32; colorsRequested: SInt16; colorBankPtr: UnivPtr; var resultPtr: CSpecArray): OSErr;
197
CalcColorTableProcPtr = ProcPtr;
200
{$ifc TYPED_FUNCTION_POINTERS}
201
DisposeColorPickMethodProcPtr = function(dataRef: UInt32): OSErr;
203
DisposeColorPickMethodProcPtr = ProcPtr;
206
{$ifc OPAQUE_UPP_TYPES}
207
InitPickMethodUPP = ^SInt32; { an opaque UPP }
209
InitPickMethodUPP = UniversalProcPtr;
211
{$ifc OPAQUE_UPP_TYPES}
212
RecordColorsUPP = ^SInt32; { an opaque UPP }
214
RecordColorsUPP = UniversalProcPtr;
216
{$ifc OPAQUE_UPP_TYPES}
217
CalcColorTableUPP = ^SInt32; { an opaque UPP }
219
CalcColorTableUPP = UniversalProcPtr;
221
{$ifc OPAQUE_UPP_TYPES}
222
DisposeColorPickMethodUPP = ^SInt32; { an opaque UPP }
224
DisposeColorPickMethodUPP = UniversalProcPtr;
228
uppInitPickMethodProcInfo = $00000FA0;
229
uppRecordColorsProcInfo = $00003FE0;
230
uppCalcColorTableProcInfo = $00003EE0;
231
uppDisposeColorPickMethodProcInfo = $000000E0;
233
* NewInitPickMethodUPP()
236
* Non-Carbon CFM: available as macro/inline
237
* CarbonLib: in CarbonLib 1.0 and later
238
* Mac OS X: in version 10.0 and later
240
function NewInitPickMethodUPP(userRoutine: InitPickMethodProcPtr): InitPickMethodUPP; external name '_NewInitPickMethodUPP'; { old name was NewInitPickMethodProc }
242
* NewRecordColorsUPP()
245
* Non-Carbon CFM: available as macro/inline
246
* CarbonLib: in CarbonLib 1.0 and later
247
* Mac OS X: in version 10.0 and later
249
function NewRecordColorsUPP(userRoutine: RecordColorsProcPtr): RecordColorsUPP; external name '_NewRecordColorsUPP'; { old name was NewRecordColorsProc }
251
* NewCalcColorTableUPP()
254
* Non-Carbon CFM: available as macro/inline
255
* CarbonLib: in CarbonLib 1.0 and later
256
* Mac OS X: in version 10.0 and later
258
function NewCalcColorTableUPP(userRoutine: CalcColorTableProcPtr): CalcColorTableUPP; external name '_NewCalcColorTableUPP'; { old name was NewCalcColorTableProc }
260
* NewDisposeColorPickMethodUPP()
263
* Non-Carbon CFM: available as macro/inline
264
* CarbonLib: in CarbonLib 1.0 and later
265
* Mac OS X: in version 10.0 and later
267
function NewDisposeColorPickMethodUPP(userRoutine: DisposeColorPickMethodProcPtr): DisposeColorPickMethodUPP; external name '_NewDisposeColorPickMethodUPP'; { old name was NewDisposeColorPickMethodProc }
269
* DisposeInitPickMethodUPP()
272
* Non-Carbon CFM: available as macro/inline
273
* CarbonLib: in CarbonLib 1.0 and later
274
* Mac OS X: in version 10.0 and later
276
procedure DisposeInitPickMethodUPP(userUPP: InitPickMethodUPP); external name '_DisposeInitPickMethodUPP';
278
* DisposeRecordColorsUPP()
281
* Non-Carbon CFM: available as macro/inline
282
* CarbonLib: in CarbonLib 1.0 and later
283
* Mac OS X: in version 10.0 and later
285
procedure DisposeRecordColorsUPP(userUPP: RecordColorsUPP); external name '_DisposeRecordColorsUPP';
287
* DisposeCalcColorTableUPP()
290
* Non-Carbon CFM: available as macro/inline
291
* CarbonLib: in CarbonLib 1.0 and later
292
* Mac OS X: in version 10.0 and later
294
procedure DisposeCalcColorTableUPP(userUPP: CalcColorTableUPP); external name '_DisposeCalcColorTableUPP';
296
* DisposeDisposeColorPickMethodUPP()
299
* Non-Carbon CFM: available as macro/inline
300
* CarbonLib: in CarbonLib 1.0 and later
301
* Mac OS X: in version 10.0 and later
303
procedure DisposeDisposeColorPickMethodUPP(userUPP: DisposeColorPickMethodUPP); external name '_DisposeDisposeColorPickMethodUPP';
305
* InvokeInitPickMethodUPP()
308
* Non-Carbon CFM: available as macro/inline
309
* CarbonLib: in CarbonLib 1.0 and later
310
* Mac OS X: in version 10.0 and later
312
function InvokeInitPickMethodUPP(colorsRequested: SInt16; var dataRef: UInt32; var colorBankType: SInt16; userRoutine: InitPickMethodUPP): OSErr; external name '_InvokeInitPickMethodUPP'; { old name was CallInitPickMethodProc }
314
* InvokeRecordColorsUPP()
317
* Non-Carbon CFM: available as macro/inline
318
* CarbonLib: in CarbonLib 1.0 and later
319
* Mac OS X: in version 10.0 and later
321
function InvokeRecordColorsUPP(dataRef: UInt32; var colorsArray: RGBColor; colorCount: SInt32; var uniqueColors: SInt32; userRoutine: RecordColorsUPP): OSErr; external name '_InvokeRecordColorsUPP'; { old name was CallRecordColorsProc }
323
* InvokeCalcColorTableUPP()
326
* Non-Carbon CFM: available as macro/inline
327
* CarbonLib: in CarbonLib 1.0 and later
328
* Mac OS X: in version 10.0 and later
330
function InvokeCalcColorTableUPP(dataRef: UInt32; colorsRequested: SInt16; colorBankPtr: UnivPtr; var resultPtr: CSpecArray; userRoutine: CalcColorTableUPP): OSErr; external name '_InvokeCalcColorTableUPP'; { old name was CallCalcColorTableProc }
332
* InvokeDisposeColorPickMethodUPP()
335
* Non-Carbon CFM: available as macro/inline
336
* CarbonLib: in CarbonLib 1.0 and later
337
* Mac OS X: in version 10.0 and later
339
function InvokeDisposeColorPickMethodUPP(dataRef: UInt32; userRoutine: DisposeColorPickMethodUPP): OSErr; external name '_InvokeDisposeColorPickMethodUPP'; { old name was CallDisposeColorPickMethodProc }
344
* Non-Carbon CFM: in InterfaceLib 7.1 and later
345
* CarbonLib: in CarbonLib 1.0 and later
346
* Mac OS X: in version 10.0 and later
348
function GetPictInfo(thePictHandle: PicHandle; var thePictInfo: PictInfo; verb: SInt16; colorsRequested: SInt16; colorPickMethod: SInt16; version: SInt16): OSErr; external name '_GetPictInfo';
353
* Non-Carbon CFM: in InterfaceLib 7.1 and later
354
* CarbonLib: in CarbonLib 1.0 and later
355
* Mac OS X: in version 10.0 and later
357
function GetPixMapInfo(thePixMapHandle: PixMapHandle; var thePictInfo: PictInfo; verb: SInt16; colorsRequested: SInt16; colorPickMethod: SInt16; version: SInt16): OSErr; external name '_GetPixMapInfo';
362
* Non-Carbon CFM: in InterfaceLib 7.1 and later
363
* CarbonLib: in CarbonLib 1.0 and later
364
* Mac OS X: in version 10.0 and later
366
function NewPictInfo(var thePictInfoID: PictInfoID; verb: SInt16; colorsRequested: SInt16; colorPickMethod: SInt16; version: SInt16): OSErr; external name '_NewPictInfo';
371
* Non-Carbon CFM: in InterfaceLib 7.1 and later
372
* CarbonLib: in CarbonLib 1.0 and later
373
* Mac OS X: in version 10.0 and later
375
function RecordPictInfo(thePictInfoID: PictInfoID; thePictHandle: PicHandle): OSErr; external name '_RecordPictInfo';
380
* Non-Carbon CFM: in InterfaceLib 7.1 and later
381
* CarbonLib: in CarbonLib 1.0 and later
382
* Mac OS X: in version 10.0 and later
384
function RecordPixMapInfo(thePictInfoID: PictInfoID; thePixMapHandle: PixMapHandle): OSErr; external name '_RecordPixMapInfo';
389
* Non-Carbon CFM: in InterfaceLib 7.1 and later
390
* CarbonLib: in CarbonLib 1.0 and later
391
* Mac OS X: in version 10.0 and later
393
function RetrievePictInfo(thePictInfoID: PictInfoID; var thePictInfo: PictInfo; colorsRequested: SInt16): OSErr; external name '_RetrievePictInfo';
398
* Non-Carbon CFM: in InterfaceLib 7.1 and later
399
* CarbonLib: in CarbonLib 1.0 and later
400
* Mac OS X: in version 10.0 and later
402
function DisposePictInfo(thePictInfoID: PictInfoID): OSErr; external name '_DisposePictInfo';
403
{$ifc OLDROUTINENAMES}
404
{$ifc CALL_NOT_IN_CARBON}
409
* Non-Carbon CFM: not available
410
* CarbonLib: not available
411
* Mac OS X: not available
413
function DisposPictInfo(thePictInfoID: PictInfoID): OSErr; external name '_DisposPictInfo';
414
{$endc} {CALL_NOT_IN_CARBON}
415
{$endc} {OLDROUTINENAMES}