Palettes.pas 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664
  1. {
  2. File: QD/Palettes.h
  3. Contains: Palette Manager Interfaces.
  4. Version: Quickdraw-262~1
  5. Copyright: © 1987-2008 by Apple Computer, Inc., all rights reserved
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://bugs.freepascal.org
  9. }
  10. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2009 }
  11. {
  12. Modified for use with Free Pascal
  13. Version 308
  14. Please report any bugs to <[email protected]>
  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. {$IFNDEF FPC_DOTTEDUNITS}
  24. unit Palettes;
  25. {$ENDIF FPC_DOTTEDUNITS}
  26. interface
  27. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  28. {$setc GAP_INTERFACES_VERSION := $0308}
  29. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  30. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  31. {$endc}
  32. {$ifc defined CPUPOWERPC and defined CPUI386}
  33. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  34. {$endc}
  35. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  36. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  37. {$endc}
  38. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  39. {$setc __ppc__ := 1}
  40. {$elsec}
  41. {$setc __ppc__ := 0}
  42. {$endc}
  43. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  44. {$setc __ppc64__ := 1}
  45. {$elsec}
  46. {$setc __ppc64__ := 0}
  47. {$endc}
  48. {$ifc not defined __i386__ and defined CPUI386}
  49. {$setc __i386__ := 1}
  50. {$elsec}
  51. {$setc __i386__ := 0}
  52. {$endc}
  53. {$ifc not defined __x86_64__ and defined CPUX86_64}
  54. {$setc __x86_64__ := 1}
  55. {$elsec}
  56. {$setc __x86_64__ := 0}
  57. {$endc}
  58. {$ifc not defined __arm__ and defined CPUARM}
  59. {$setc __arm__ := 1}
  60. {$elsec}
  61. {$setc __arm__ := 0}
  62. {$endc}
  63. {$ifc not defined __arm64__ and defined CPUAARCH64}
  64. {$setc __arm64__ := 1}
  65. {$elsec}
  66. {$setc __arm64__ := 0}
  67. {$endc}
  68. {$ifc defined cpu64}
  69. {$setc __LP64__ := 1}
  70. {$elsec}
  71. {$setc __LP64__ := 0}
  72. {$endc}
  73. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  74. {$error Conflicting definitions for __ppc__ and __i386__}
  75. {$endc}
  76. {$ifc defined __ppc__ and __ppc__}
  77. {$setc TARGET_CPU_PPC := TRUE}
  78. {$setc TARGET_CPU_PPC64 := FALSE}
  79. {$setc TARGET_CPU_X86 := FALSE}
  80. {$setc TARGET_CPU_X86_64 := FALSE}
  81. {$setc TARGET_CPU_ARM := FALSE}
  82. {$setc TARGET_CPU_ARM64 := FALSE}
  83. {$setc TARGET_OS_MAC := TRUE}
  84. {$setc TARGET_OS_IPHONE := FALSE}
  85. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  86. {$setc TARGET_OS_EMBEDDED := FALSE}
  87. {$elifc defined __ppc64__ and __ppc64__}
  88. {$setc TARGET_CPU_PPC := FALSE}
  89. {$setc TARGET_CPU_PPC64 := TRUE}
  90. {$setc TARGET_CPU_X86 := FALSE}
  91. {$setc TARGET_CPU_X86_64 := FALSE}
  92. {$setc TARGET_CPU_ARM := FALSE}
  93. {$setc TARGET_CPU_ARM64 := FALSE}
  94. {$setc TARGET_OS_MAC := TRUE}
  95. {$setc TARGET_OS_IPHONE := FALSE}
  96. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  97. {$setc TARGET_OS_EMBEDDED := FALSE}
  98. {$elifc defined __i386__ and __i386__}
  99. {$setc TARGET_CPU_PPC := FALSE}
  100. {$setc TARGET_CPU_PPC64 := FALSE}
  101. {$setc TARGET_CPU_X86 := TRUE}
  102. {$setc TARGET_CPU_X86_64 := FALSE}
  103. {$setc TARGET_CPU_ARM := FALSE}
  104. {$setc TARGET_CPU_ARM64 := FALSE}
  105. {$ifc defined iphonesim}
  106. {$setc TARGET_OS_MAC := FALSE}
  107. {$setc TARGET_OS_IPHONE := TRUE}
  108. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  109. {$elsec}
  110. {$setc TARGET_OS_MAC := TRUE}
  111. {$setc TARGET_OS_IPHONE := FALSE}
  112. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  113. {$endc}
  114. {$setc TARGET_OS_EMBEDDED := FALSE}
  115. {$elifc defined __x86_64__ and __x86_64__}
  116. {$setc TARGET_CPU_PPC := FALSE}
  117. {$setc TARGET_CPU_PPC64 := FALSE}
  118. {$setc TARGET_CPU_X86 := FALSE}
  119. {$setc TARGET_CPU_X86_64 := TRUE}
  120. {$setc TARGET_CPU_ARM := FALSE}
  121. {$setc TARGET_CPU_ARM64 := FALSE}
  122. {$ifc defined iphonesim}
  123. {$setc TARGET_OS_MAC := FALSE}
  124. {$setc TARGET_OS_IPHONE := TRUE}
  125. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  126. {$elsec}
  127. {$setc TARGET_OS_MAC := TRUE}
  128. {$setc TARGET_OS_IPHONE := FALSE}
  129. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  130. {$endc}
  131. {$setc TARGET_OS_EMBEDDED := FALSE}
  132. {$elifc defined __arm__ and __arm__}
  133. {$setc TARGET_CPU_PPC := FALSE}
  134. {$setc TARGET_CPU_PPC64 := FALSE}
  135. {$setc TARGET_CPU_X86 := FALSE}
  136. {$setc TARGET_CPU_X86_64 := FALSE}
  137. {$setc TARGET_CPU_ARM := TRUE}
  138. {$setc TARGET_CPU_ARM64 := FALSE}
  139. {$setc TARGET_OS_MAC := FALSE}
  140. {$setc TARGET_OS_IPHONE := TRUE}
  141. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  142. {$setc TARGET_OS_EMBEDDED := TRUE}
  143. {$elifc defined __arm64__ and __arm64__}
  144. {$setc TARGET_CPU_PPC := FALSE}
  145. {$setc TARGET_CPU_PPC64 := FALSE}
  146. {$setc TARGET_CPU_X86 := FALSE}
  147. {$setc TARGET_CPU_X86_64 := FALSE}
  148. {$setc TARGET_CPU_ARM := FALSE}
  149. {$setc TARGET_CPU_ARM64 := TRUE}
  150. {$ifc defined ios}
  151. {$setc TARGET_OS_MAC := FALSE}
  152. {$setc TARGET_OS_IPHONE := TRUE}
  153. {$setc TARGET_OS_EMBEDDED := TRUE}
  154. {$elsec}
  155. {$setc TARGET_OS_MAC := TRUE}
  156. {$setc TARGET_OS_IPHONE := FALSE}
  157. {$setc TARGET_OS_EMBEDDED := FALSE}
  158. {$endc}
  159. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  160. {$elsec}
  161. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
  162. {$endc}
  163. {$ifc defined __LP64__ and __LP64__ }
  164. {$setc TARGET_CPU_64 := TRUE}
  165. {$elsec}
  166. {$setc TARGET_CPU_64 := FALSE}
  167. {$endc}
  168. {$ifc defined FPC_BIG_ENDIAN}
  169. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  170. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  171. {$elifc defined FPC_LITTLE_ENDIAN}
  172. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  173. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  174. {$elsec}
  175. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  176. {$endc}
  177. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  178. {$setc CALL_NOT_IN_CARBON := FALSE}
  179. {$setc OLDROUTINENAMES := FALSE}
  180. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  181. {$setc OPAQUE_UPP_TYPES := TRUE}
  182. {$setc OTCARBONAPPLICATION := TRUE}
  183. {$setc OTKERNEL := FALSE}
  184. {$setc PM_USE_SESSION_APIS := TRUE}
  185. {$setc TARGET_API_MAC_CARBON := TRUE}
  186. {$setc TARGET_API_MAC_OS8 := FALSE}
  187. {$setc TARGET_API_MAC_OSX := TRUE}
  188. {$setc TARGET_CARBON := TRUE}
  189. {$setc TARGET_CPU_68K := FALSE}
  190. {$setc TARGET_CPU_MIPS := FALSE}
  191. {$setc TARGET_CPU_SPARC := FALSE}
  192. {$setc TARGET_OS_UNIX := FALSE}
  193. {$setc TARGET_OS_WIN32 := FALSE}
  194. {$setc TARGET_RT_MAC_68881 := FALSE}
  195. {$setc TARGET_RT_MAC_CFM := FALSE}
  196. {$setc TARGET_RT_MAC_MACHO := TRUE}
  197. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  198. {$setc TYPE_BOOL := FALSE}
  199. {$setc TYPE_EXTENDED := FALSE}
  200. {$setc TYPE_LONGLONG := TRUE}
  201. {$IFDEF FPC_DOTTEDUNITS}
  202. uses MacOsApi.MacTypes,MacOsApi.QuickdrawTypes;
  203. {$ELSE FPC_DOTTEDUNITS}
  204. uses MacTypes,QuickdrawTypes;
  205. {$ENDIF FPC_DOTTEDUNITS}
  206. {$endc} {not MACOSALLINCLUDE}
  207. {$ifc TARGET_OS_MAC}
  208. {$ALIGN MAC68K}
  209. const
  210. pmCourteous = 0; {Record use of color on each device touched.}
  211. pmDithered = $0001;
  212. pmTolerant = $0002; {render ciRGB if ciTolerance is exceeded by best match.}
  213. pmAnimated = $0004; {reserve an index on each device touched and render ciRGB.}
  214. pmExplicit = $0008; {no reserve, no render, no record; stuff index into port.}
  215. pmWhite = $0010;
  216. pmBlack = $0020;
  217. pmInhibitG2 = $0100;
  218. pmInhibitC2 = $0200;
  219. pmInhibitG4 = $0400;
  220. pmInhibitC4 = $0800;
  221. pmInhibitG8 = $1000;
  222. pmInhibitC8 = $2000; { NSetPalette Update Constants }
  223. pmNoUpdates = $8000; {no updates}
  224. pmBkUpdates = $A000; {background updates only}
  225. pmFgUpdates = $C000; {foreground updates only}
  226. pmAllUpdates = $E000; {all updates}
  227. type
  228. ColorInfo = record
  229. ciRGB: RGBColor; {true RGB values}
  230. ciUsage: SInt16; {color usage}
  231. ciTolerance: SInt16; {tolerance value}
  232. ciDataFields: array [0..2] of SInt16; {private fields}
  233. end;
  234. ColorInfoPtr = ^ColorInfo;
  235. type
  236. ColorInfoHandle = ^ColorInfoPtr;
  237. Palette = record
  238. pmEntries: SInt16; {entries in pmTable}
  239. pmDataFields: array [0..6] of SInt16; {private fields}
  240. pmInfo: array [0..0] of ColorInfo;
  241. end;
  242. PalettePtr = ^Palette;
  243. type
  244. PaletteHandle = ^PalettePtr;
  245. {$ifc not TARGET_CPU_64}
  246. {
  247. * InitPalettes() *** DEPRECATED ***
  248. *
  249. * Availability:
  250. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  251. * CarbonLib: in CarbonLib 1.0 and later
  252. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  253. }
  254. procedure InitPalettes; external name '_InitPalettes';
  255. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  256. {
  257. * NewPalette() *** DEPRECATED ***
  258. *
  259. * Availability:
  260. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  261. * CarbonLib: in CarbonLib 1.0 and later
  262. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  263. }
  264. function NewPalette( entries: SInt16; srcColors: CTabHandle; srcUsage: SInt16; srcTolerance: SInt16 ): PaletteHandle; external name '_NewPalette';
  265. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  266. {
  267. * GetNewPalette() *** DEPRECATED ***
  268. *
  269. * Availability:
  270. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  271. * CarbonLib: in CarbonLib 1.0 and later
  272. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  273. }
  274. function GetNewPalette( PaletteID: SInt16 ): PaletteHandle; external name '_GetNewPalette';
  275. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  276. {
  277. * DisposePalette() *** DEPRECATED ***
  278. *
  279. * Availability:
  280. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  281. * CarbonLib: in CarbonLib 1.0 and later
  282. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  283. }
  284. procedure DisposePalette( srcPalette: PaletteHandle ); external name '_DisposePalette';
  285. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  286. {
  287. * ActivatePalette() *** DEPRECATED ***
  288. *
  289. * Availability:
  290. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  291. * CarbonLib: in CarbonLib 1.0 and later
  292. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  293. }
  294. procedure ActivatePalette( srcWindow: WindowRef ); external name '_ActivatePalette';
  295. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  296. {
  297. * SetPalette() *** DEPRECATED ***
  298. *
  299. * Availability:
  300. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  301. * CarbonLib: in CarbonLib 1.0 and later
  302. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  303. }
  304. procedure SetPalette( dstWindow: WindowRef; srcPalette: PaletteHandle; cUpdates: Boolean ); external name '_SetPalette';
  305. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  306. {
  307. * NSetPalette() *** DEPRECATED ***
  308. *
  309. * Availability:
  310. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  311. * CarbonLib: in CarbonLib 1.0 and later
  312. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  313. }
  314. procedure NSetPalette( dstWindow: WindowRef; srcPalette: PaletteHandle; nCUpdates: SInt16 ); external name '_NSetPalette';
  315. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  316. {
  317. * GetPalette() *** DEPRECATED ***
  318. *
  319. * Availability:
  320. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  321. * CarbonLib: in CarbonLib 1.0 and later
  322. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  323. }
  324. function GetPalette( srcWindow: WindowRef ): PaletteHandle; external name '_GetPalette';
  325. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  326. {
  327. * CopyPalette() *** DEPRECATED ***
  328. *
  329. * Availability:
  330. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  331. * CarbonLib: in CarbonLib 1.0 and later
  332. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  333. }
  334. procedure CopyPalette( srcPalette: PaletteHandle; dstPalette: PaletteHandle; srcEntry: SInt16; dstEntry: SInt16; dstLength: SInt16 ); external name '_CopyPalette';
  335. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  336. {
  337. * PmForeColor() *** DEPRECATED ***
  338. *
  339. * Availability:
  340. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  341. * CarbonLib: in CarbonLib 1.0 and later
  342. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  343. }
  344. procedure PmForeColor( dstEntry: SInt16 ); external name '_PmForeColor';
  345. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  346. {
  347. * PmBackColor() *** DEPRECATED ***
  348. *
  349. * Availability:
  350. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  351. * CarbonLib: in CarbonLib 1.0 and later
  352. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  353. }
  354. procedure PmBackColor( dstEntry: SInt16 ); external name '_PmBackColor';
  355. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  356. {
  357. * AnimateEntry() *** DEPRECATED ***
  358. *
  359. * Availability:
  360. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  361. * CarbonLib: in CarbonLib 1.0 and later
  362. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  363. }
  364. procedure AnimateEntry( dstWindow: WindowRef; dstEntry: SInt16; const (*var*) srcRGB: RGBColor ); external name '_AnimateEntry';
  365. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  366. {
  367. * [Mac]AnimatePalette() *** DEPRECATED ***
  368. *
  369. * Availability:
  370. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  371. * CarbonLib: in CarbonLib 1.0 and later
  372. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  373. }
  374. procedure MacAnimatePalette( dstWindow: WindowRef; srcCTab: CTabHandle; srcIndex: SInt16; dstEntry: SInt16; dstLength: SInt16 ); external name '_AnimatePalette';
  375. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  376. procedure AnimatePalette( dstWindow: WindowRef; srcCTab: CTabHandle; srcIndex: SInt16; dstEntry: SInt16; dstLength: SInt16 ); external name '_AnimatePalette';
  377. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  378. {
  379. * GetEntryColor() *** DEPRECATED ***
  380. *
  381. * Availability:
  382. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  383. * CarbonLib: in CarbonLib 1.0 and later
  384. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  385. }
  386. procedure GetEntryColor( srcPalette: PaletteHandle; srcEntry: SInt16; var dstRGB: RGBColor ); external name '_GetEntryColor';
  387. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  388. {
  389. * SetEntryColor() *** DEPRECATED ***
  390. *
  391. * Availability:
  392. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  393. * CarbonLib: in CarbonLib 1.0 and later
  394. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  395. }
  396. procedure SetEntryColor( dstPalette: PaletteHandle; dstEntry: SInt16; const (*var*) srcRGB: RGBColor ); external name '_SetEntryColor';
  397. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  398. {
  399. * GetEntryUsage() *** DEPRECATED ***
  400. *
  401. * Availability:
  402. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  403. * CarbonLib: in CarbonLib 1.0 and later
  404. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  405. }
  406. procedure GetEntryUsage( srcPalette: PaletteHandle; srcEntry: SInt16; var dstUsage: SInt16; var dstTolerance: SInt16 ); external name '_GetEntryUsage';
  407. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  408. {
  409. * SetEntryUsage() *** DEPRECATED ***
  410. *
  411. * Availability:
  412. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  413. * CarbonLib: in CarbonLib 1.0 and later
  414. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  415. }
  416. procedure SetEntryUsage( dstPalette: PaletteHandle; dstEntry: SInt16; srcUsage: SInt16; srcTolerance: SInt16 ); external name '_SetEntryUsage';
  417. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  418. {
  419. * CTab2Palette() *** DEPRECATED ***
  420. *
  421. * Availability:
  422. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  423. * CarbonLib: in CarbonLib 1.0 and later
  424. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  425. }
  426. procedure CTab2Palette( srcCTab: CTabHandle; dstPalette: PaletteHandle; srcUsage: SInt16; srcTolerance: SInt16 ); external name '_CTab2Palette';
  427. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  428. {
  429. * Palette2CTab() *** DEPRECATED ***
  430. *
  431. * Availability:
  432. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  433. * CarbonLib: in CarbonLib 1.0 and later
  434. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  435. }
  436. procedure Palette2CTab( srcPalette: PaletteHandle; dstCTab: CTabHandle ); external name '_Palette2CTab';
  437. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  438. {
  439. * Entry2Index() *** DEPRECATED ***
  440. *
  441. * Availability:
  442. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  443. * CarbonLib: in CarbonLib 1.0 and later
  444. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  445. }
  446. function Entry2Index( entry: SInt16 ): SInt32; external name '_Entry2Index';
  447. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  448. {
  449. * RestoreDeviceClut() *** DEPRECATED ***
  450. *
  451. * Availability:
  452. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  453. * CarbonLib: in CarbonLib 1.0 and later
  454. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  455. }
  456. procedure RestoreDeviceClut( gd: GDHandle ); external name '_RestoreDeviceClut';
  457. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  458. {
  459. * [Mac]ResizePalette() *** DEPRECATED ***
  460. *
  461. * Availability:
  462. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  463. * CarbonLib: in CarbonLib 1.0 and later
  464. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  465. }
  466. procedure MacResizePalette( p: PaletteHandle; size: SInt16 ); external name '_ResizePalette';
  467. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  468. procedure ResizePalette( p: PaletteHandle; size: SInt16 ); external name '_ResizePalette';
  469. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  470. {
  471. * SaveFore() *** DEPRECATED ***
  472. *
  473. * Availability:
  474. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  475. * CarbonLib: in CarbonLib 1.0 and later
  476. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  477. }
  478. procedure SaveFore( var c: ColorSpec ); external name '_SaveFore';
  479. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  480. {
  481. * SaveBack() *** DEPRECATED ***
  482. *
  483. * Availability:
  484. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  485. * CarbonLib: in CarbonLib 1.0 and later
  486. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  487. }
  488. procedure SaveBack( var c: ColorSpec ); external name '_SaveBack';
  489. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  490. {
  491. * RestoreFore() *** DEPRECATED ***
  492. *
  493. * Availability:
  494. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  495. * CarbonLib: in CarbonLib 1.0 and later
  496. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  497. }
  498. procedure RestoreFore( const (*var*) c: ColorSpec ); external name '_RestoreFore';
  499. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  500. {
  501. * RestoreBack() *** DEPRECATED ***
  502. *
  503. * Availability:
  504. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  505. * CarbonLib: in CarbonLib 1.0 and later
  506. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  507. }
  508. procedure RestoreBack( const (*var*) c: ColorSpec ); external name '_RestoreBack';
  509. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  510. {
  511. * SetDepth() *** DEPRECATED ***
  512. *
  513. * Availability:
  514. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  515. * CarbonLib: in CarbonLib 1.0 and later
  516. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  517. }
  518. function SetDepth( gd: GDHandle; depth: SInt16; whichFlags: SInt16; flags: SInt16 ): OSErr; external name '_SetDepth';
  519. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  520. {
  521. * HasDepth() *** DEPRECATED ***
  522. *
  523. * Availability:
  524. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  525. * CarbonLib: in CarbonLib 1.0 and later
  526. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  527. }
  528. function HasDepth( gd: GDHandle; depth: SInt16; whichFlags: SInt16; flags: SInt16 ): SInt16; external name '_HasDepth';
  529. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  530. {
  531. * PMgrVersion() *** DEPRECATED ***
  532. *
  533. * Availability:
  534. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  535. * CarbonLib: in CarbonLib 1.0 and later
  536. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  537. }
  538. function PMgrVersion: SInt16; external name '_PMgrVersion';
  539. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  540. {
  541. * SetPaletteUpdates() *** DEPRECATED ***
  542. *
  543. * Availability:
  544. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  545. * CarbonLib: in CarbonLib 1.0 and later
  546. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  547. }
  548. procedure SetPaletteUpdates( p: PaletteHandle; updates: SInt16 ); external name '_SetPaletteUpdates';
  549. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  550. {
  551. * GetPaletteUpdates() *** DEPRECATED ***
  552. *
  553. * Availability:
  554. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  555. * CarbonLib: in CarbonLib 1.0 and later
  556. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  557. }
  558. function GetPaletteUpdates( p: PaletteHandle ): SInt16; external name '_GetPaletteUpdates';
  559. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  560. {
  561. * GetGray() *** DEPRECATED ***
  562. *
  563. * Availability:
  564. * Mac OS X: in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.4
  565. * CarbonLib: in CarbonLib 1.0 and later
  566. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  567. }
  568. function GetGray( device: GDHandle; const (*var*) backGround: RGBColor; var foreGround: RGBColor ): Boolean; external name '_GetGray';
  569. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  570. {$endc} {not TARGET_CPU_64}
  571. {$endc} {TARGET_OS_MAC}
  572. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  573. end.
  574. {$endc} {not MACOSALLINCLUDE}