Power.pas 59 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657
  1. {
  2. File: OSServices/Power.h
  3. Contains: *** DEPRECATED *** Power Manager Interfaces.
  4. Copyright: (c) 1990-2012 Apple Inc. All rights reserved.
  5. Bugs?: For bug reports, consult the following page on
  6. the World Wide Web:
  7. http://bugs.freepascal.org
  8. }
  9. {
  10. Modified for use with Free Pascal
  11. Version 308
  12. Please report any bugs to <[email protected]>
  13. }
  14. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  15. {$mode macpas}
  16. {$modeswitch cblocks}
  17. {$packenum 1}
  18. {$macro on}
  19. {$inline on}
  20. {$calling mwpascal}
  21. unit Power;
  22. interface
  23. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  24. {$setc GAP_INTERFACES_VERSION := $0308}
  25. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  26. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  27. {$endc}
  28. {$ifc defined CPUPOWERPC and defined CPUI386}
  29. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  30. {$endc}
  31. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  32. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  33. {$endc}
  34. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  35. {$setc __ppc__ := 1}
  36. {$elsec}
  37. {$setc __ppc__ := 0}
  38. {$endc}
  39. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  40. {$setc __ppc64__ := 1}
  41. {$elsec}
  42. {$setc __ppc64__ := 0}
  43. {$endc}
  44. {$ifc not defined __i386__ and defined CPUI386}
  45. {$setc __i386__ := 1}
  46. {$elsec}
  47. {$setc __i386__ := 0}
  48. {$endc}
  49. {$ifc not defined __x86_64__ and defined CPUX86_64}
  50. {$setc __x86_64__ := 1}
  51. {$elsec}
  52. {$setc __x86_64__ := 0}
  53. {$endc}
  54. {$ifc not defined __arm__ and defined CPUARM}
  55. {$setc __arm__ := 1}
  56. {$elsec}
  57. {$setc __arm__ := 0}
  58. {$endc}
  59. {$ifc not defined __arm64__ and defined CPUAARCH64}
  60. {$setc __arm64__ := 1}
  61. {$elsec}
  62. {$setc __arm64__ := 0}
  63. {$endc}
  64. {$ifc defined cpu64}
  65. {$setc __LP64__ := 1}
  66. {$elsec}
  67. {$setc __LP64__ := 0}
  68. {$endc}
  69. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  70. {$error Conflicting definitions for __ppc__ and __i386__}
  71. {$endc}
  72. {$ifc defined __ppc__ and __ppc__}
  73. {$setc TARGET_CPU_PPC := TRUE}
  74. {$setc TARGET_CPU_PPC64 := FALSE}
  75. {$setc TARGET_CPU_X86 := FALSE}
  76. {$setc TARGET_CPU_X86_64 := FALSE}
  77. {$setc TARGET_CPU_ARM := FALSE}
  78. {$setc TARGET_CPU_ARM64 := FALSE}
  79. {$setc TARGET_OS_MAC := TRUE}
  80. {$setc TARGET_OS_IPHONE := FALSE}
  81. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  82. {$setc TARGET_OS_EMBEDDED := FALSE}
  83. {$elifc defined __ppc64__ and __ppc64__}
  84. {$setc TARGET_CPU_PPC := FALSE}
  85. {$setc TARGET_CPU_PPC64 := TRUE}
  86. {$setc TARGET_CPU_X86 := FALSE}
  87. {$setc TARGET_CPU_X86_64 := FALSE}
  88. {$setc TARGET_CPU_ARM := FALSE}
  89. {$setc TARGET_CPU_ARM64 := FALSE}
  90. {$setc TARGET_OS_MAC := TRUE}
  91. {$setc TARGET_OS_IPHONE := FALSE}
  92. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  93. {$setc TARGET_OS_EMBEDDED := FALSE}
  94. {$elifc defined __i386__ and __i386__}
  95. {$setc TARGET_CPU_PPC := FALSE}
  96. {$setc TARGET_CPU_PPC64 := FALSE}
  97. {$setc TARGET_CPU_X86 := TRUE}
  98. {$setc TARGET_CPU_X86_64 := FALSE}
  99. {$setc TARGET_CPU_ARM := FALSE}
  100. {$setc TARGET_CPU_ARM64 := FALSE}
  101. {$ifc defined iphonesim}
  102. {$setc TARGET_OS_MAC := FALSE}
  103. {$setc TARGET_OS_IPHONE := TRUE}
  104. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  105. {$elsec}
  106. {$setc TARGET_OS_MAC := TRUE}
  107. {$setc TARGET_OS_IPHONE := FALSE}
  108. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  109. {$endc}
  110. {$setc TARGET_OS_EMBEDDED := FALSE}
  111. {$elifc defined __x86_64__ and __x86_64__}
  112. {$setc TARGET_CPU_PPC := FALSE}
  113. {$setc TARGET_CPU_PPC64 := FALSE}
  114. {$setc TARGET_CPU_X86 := FALSE}
  115. {$setc TARGET_CPU_X86_64 := TRUE}
  116. {$setc TARGET_CPU_ARM := FALSE}
  117. {$setc TARGET_CPU_ARM64 := FALSE}
  118. {$ifc defined iphonesim}
  119. {$setc TARGET_OS_MAC := FALSE}
  120. {$setc TARGET_OS_IPHONE := TRUE}
  121. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  122. {$elsec}
  123. {$setc TARGET_OS_MAC := TRUE}
  124. {$setc TARGET_OS_IPHONE := FALSE}
  125. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  126. {$endc}
  127. {$setc TARGET_OS_EMBEDDED := FALSE}
  128. {$elifc defined __arm__ and __arm__}
  129. {$setc TARGET_CPU_PPC := FALSE}
  130. {$setc TARGET_CPU_PPC64 := FALSE}
  131. {$setc TARGET_CPU_X86 := FALSE}
  132. {$setc TARGET_CPU_X86_64 := FALSE}
  133. {$setc TARGET_CPU_ARM := TRUE}
  134. {$setc TARGET_CPU_ARM64 := FALSE}
  135. {$setc TARGET_OS_MAC := FALSE}
  136. {$setc TARGET_OS_IPHONE := TRUE}
  137. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  138. {$setc TARGET_OS_EMBEDDED := TRUE}
  139. {$elifc defined __arm64__ and __arm64__}
  140. {$setc TARGET_CPU_PPC := FALSE}
  141. {$setc TARGET_CPU_PPC64 := FALSE}
  142. {$setc TARGET_CPU_X86 := FALSE}
  143. {$setc TARGET_CPU_X86_64 := FALSE}
  144. {$setc TARGET_CPU_ARM := FALSE}
  145. {$setc TARGET_CPU_ARM64 := TRUE}
  146. {$ifc defined ios}
  147. {$setc TARGET_OS_MAC := FALSE}
  148. {$setc TARGET_OS_IPHONE := TRUE}
  149. {$setc TARGET_OS_EMBEDDED := TRUE}
  150. {$elsec}
  151. {$setc TARGET_OS_MAC := TRUE}
  152. {$setc TARGET_OS_IPHONE := FALSE}
  153. {$setc TARGET_OS_EMBEDDED := FALSE}
  154. {$endc}
  155. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  156. {$elsec}
  157. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
  158. {$endc}
  159. {$ifc defined __LP64__ and __LP64__ }
  160. {$setc TARGET_CPU_64 := TRUE}
  161. {$elsec}
  162. {$setc TARGET_CPU_64 := FALSE}
  163. {$endc}
  164. {$ifc defined FPC_BIG_ENDIAN}
  165. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  166. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  167. {$elifc defined FPC_LITTLE_ENDIAN}
  168. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  169. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  170. {$elsec}
  171. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  172. {$endc}
  173. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  174. {$setc CALL_NOT_IN_CARBON := FALSE}
  175. {$setc OLDROUTINENAMES := FALSE}
  176. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  177. {$setc OPAQUE_UPP_TYPES := TRUE}
  178. {$setc OTCARBONAPPLICATION := TRUE}
  179. {$setc OTKERNEL := FALSE}
  180. {$setc PM_USE_SESSION_APIS := TRUE}
  181. {$setc TARGET_API_MAC_CARBON := TRUE}
  182. {$setc TARGET_API_MAC_OS8 := FALSE}
  183. {$setc TARGET_API_MAC_OSX := TRUE}
  184. {$setc TARGET_CARBON := TRUE}
  185. {$setc TARGET_CPU_68K := FALSE}
  186. {$setc TARGET_CPU_MIPS := FALSE}
  187. {$setc TARGET_CPU_SPARC := FALSE}
  188. {$setc TARGET_OS_UNIX := FALSE}
  189. {$setc TARGET_OS_WIN32 := FALSE}
  190. {$setc TARGET_RT_MAC_68881 := FALSE}
  191. {$setc TARGET_RT_MAC_CFM := FALSE}
  192. {$setc TARGET_RT_MAC_MACHO := TRUE}
  193. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  194. {$setc TYPE_BOOL := FALSE}
  195. {$setc TYPE_EXTENDED := FALSE}
  196. {$setc TYPE_LONGLONG := TRUE}
  197. uses MacTypes,Multiprocessing,MacErrors;
  198. {$endc} {not MACOSALLINCLUDE}
  199. {$ifc TARGET_OS_MAC}
  200. {$ALIGN MAC68K}
  201. const
  202. { commands to SleepQRec sleepQProc }
  203. kSleepRequest = 1;
  204. kSleepDemand = 2;
  205. kSleepWakeUp = 3;
  206. kSleepRevoke = 4;
  207. kSleepUnlock = 4;
  208. kSleepDeny = 5; { A non-zero value clients can use to deny requests}
  209. kSleepNow = 6;
  210. kDozeDemand = 7;
  211. kDozeWakeUp = 8;
  212. kDozeRequest = 9; { additional messages for Power Mgr 2.0}
  213. kEnterStandby = 10; { Idle Queue Only}
  214. kEnterRun = 11; { Idle Queue Only}
  215. kSuspendRequest = 12;
  216. kSuspendDemand = 13;
  217. kSuspendRevoke = 14;
  218. kSuspendWakeUp = 15;
  219. kGetPowerLevel = 16;
  220. kSetPowerLevel = 17;
  221. kDeviceInitiatedWake = 18;
  222. kWakeToDoze = 19;
  223. kDozeToFullWakeUp = 20;
  224. kGetPowerInfo = 21;
  225. kGetWakeOnNetInfo = 22;
  226. kSuspendWakeToDoze = 23;
  227. kEnterIdle = 24; { Idle Queue Only}
  228. kStillIdle = 25; { Idle Queue Only}
  229. kExitIdle = 26; { Idle Queue Only}
  230. const
  231. { SleepQRec.sleepQFlags }
  232. noCalls = 1;
  233. noRequest = 2;
  234. slpQType = 16;
  235. sleepQType = 16;
  236. { System Activity Selectors }
  237. { Notes: The IdleActivity selector is not available unless the hasAggressiveIdling PMFeatures bit is set. }
  238. { Use IdleActivity where you used to use OverallAct if necessary. OverallAct will only delay power cycling }
  239. { if it's enabled, and will delay sleep by a small amount when hasAggressiveIdling is set. Don't use }
  240. { IdleActivity unless hasAggressiveIdling is set; when hasAggressiveIdling is not set, the use of IdleActivity }
  241. { is undefined, and well do different things depending on which Power Manager is currently running. }
  242. const
  243. OverallAct = 0; { Delays idle sleep by small amount }
  244. UsrActivity = 1; { Delays idle sleep and dimming by timeout time }
  245. NetActivity = 2; { Delays idle sleep and power cycling by small amount }
  246. HDActivity = 3; { Delays hard drive spindown and idle sleep by small amount }
  247. IdleActivity = 4; { Delays idle sleep by timeout time }
  248. type
  249. SleepQRecPtr = ^SleepQRec;
  250. SleepQProcPtr = function( message: SIGNEDLONG; qRecPtr: SleepQRecPtr ): SIGNEDLONG;
  251. SleepQUPP = SleepQProcPtr;
  252. SleepQRec = record
  253. sleepQLink: SleepQRecPtr; { pointer to next queue element }
  254. sleepQType: SInt16; { queue element type (must be SleepQType) }
  255. sleepQProc: SleepQUPP; { pointer to sleep universal proc ptr }
  256. sleepQFlags: SInt16; { flags }
  257. end;
  258. {
  259. * NewSleepQUPP() *** DEPRECATED ***
  260. *
  261. * Availability:
  262. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  263. * CarbonLib: in CarbonLib 1.0 and later
  264. * Non-Carbon CFM: available as macro/inline
  265. }
  266. function NewSleepQUPP( userRoutine: SleepQProcPtr ): SleepQUPP; external name '_NewSleepQUPP';
  267. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_5,__IPHONE_NA,__IPHONE_NA) *)
  268. {
  269. * DisposeSleepQUPP() *** DEPRECATED ***
  270. *
  271. * Availability:
  272. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  273. * CarbonLib: in CarbonLib 1.0 and later
  274. * Non-Carbon CFM: available as macro/inline
  275. }
  276. procedure DisposeSleepQUPP( userUPP: SleepQUPP ); external name '_DisposeSleepQUPP';
  277. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_5,__IPHONE_NA,__IPHONE_NA) *)
  278. {
  279. * InvokeSleepQUPP() *** DEPRECATED ***
  280. *
  281. * Availability:
  282. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  283. * CarbonLib: in CarbonLib 1.0 and later
  284. * Non-Carbon CFM: available as macro/inline
  285. }
  286. function InvokeSleepQUPP( message: SIGNEDLONG; qRecPtr: SleepQRecPtr; userUPP: SleepQUPP ): SIGNEDLONG; external name '_InvokeSleepQUPP';
  287. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_5,__IPHONE_NA,__IPHONE_NA) *)
  288. {
  289. * GetCPUSpeed() *** DEPRECATED ***
  290. *
  291. * Deprecated:
  292. * Use sysctlbyname("hw.cpufrequency"). Found in <sys/sysctl.h>.
  293. *
  294. * Discussion:
  295. * GetCPUSpeed() returns the current effective clock speed of the
  296. * CPU in megahertz.
  297. *
  298. * Result:
  299. * the current effective clock speed of the CPU in megahertz.
  300. *
  301. * Availability:
  302. * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.8
  303. * CarbonLib: in CarbonLib 1.0 and later
  304. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  305. }
  306. function GetCPUSpeed: SIGNEDLONG; external name '_GetCPUSpeed';
  307. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
  308. {
  309. * SleepQInstall() *** DEPRECATED ***
  310. *
  311. * Deprecated:
  312. * Use IORegisterForSystemPower(). Found in <IOKit/pwr_mgt/IOPMLib.h>.
  313. *
  314. * Discussion:
  315. * Adds an entry to the sleep queue.
  316. *
  317. * Parameters:
  318. *
  319. * qRecPtr:
  320. * A pointer to a sleep queue record to be installed.
  321. *
  322. * Availability:
  323. * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.8
  324. * CarbonLib: in CarbonLib 1.0 and later
  325. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  326. }
  327. procedure SleepQInstall( qRecPtr: SleepQRecPtr ); external name '_SleepQInstall';
  328. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
  329. {
  330. * SleepQRemove() *** DEPRECATED ***
  331. *
  332. * Deprecated:
  333. * Use IODeregisterForSystemPower(). Found in <IOKit/pwr_mgt/IOPMLib.h>.
  334. *
  335. * Discussion:
  336. * Remove an entry from the sleep queue.
  337. *
  338. * Parameters:
  339. *
  340. * qRecPtr:
  341. * A pointer to a sleep queue record to be removed.
  342. *
  343. * Availability:
  344. * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.8
  345. * CarbonLib: in CarbonLib 1.0 and later
  346. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  347. }
  348. procedure SleepQRemove( qRecPtr: SleepQRecPtr ); external name '_SleepQRemove';
  349. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
  350. {
  351. * MaximumProcessorSpeed() *** DEPRECATED ***
  352. *
  353. * Deprecated:
  354. * Use sysctlbyname("hw.cpufrequency_max"). Found in <sys/sysctl.h>.
  355. *
  356. * Discussion:
  357. * MaximumProcessorSpeed() returns the maximum effective clock speed
  358. * of the CPU in megahertz.
  359. *
  360. * Result:
  361. * the maximum effective clock speed of the CPU in megahertz.
  362. *
  363. * Availability:
  364. * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.8
  365. * CarbonLib: in CarbonLib 1.0 and later
  366. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  367. }
  368. function MaximumProcessorSpeed: SInt16; external name '_MaximumProcessorSpeed';
  369. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
  370. {
  371. * MinimumProcessorSpeed() *** DEPRECATED ***
  372. *
  373. * Deprecated:
  374. * Use sysctlbyname("hw.cpufrequency_min"). Found in <sys/sysctl.h>.
  375. *
  376. * Discussion:
  377. * MinimumProcessorSpeed() returns the minimum effective clock speed
  378. * of the CPU in megahertz. Before Mac OS X 10.4, this function
  379. * always returns the maximum cpu speed, not the minimum as expected.
  380. *
  381. * Result:
  382. * the minimum effective clock speed of the CPU in megahertz.
  383. *
  384. * Availability:
  385. * Mac OS X: in version 10.1 and later in CoreServices.framework but deprecated in 10.8
  386. * CarbonLib: in CarbonLib 1.0 and later
  387. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  388. }
  389. function MinimumProcessorSpeed: SInt16; external name '_MinimumProcessorSpeed';
  390. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_1,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
  391. {
  392. * CurrentProcessorSpeed() *** DEPRECATED ***
  393. *
  394. * Deprecated:
  395. * Use sysctlbyname("hw.cpufrequency"). Found in <sys/sysctl.h>.
  396. *
  397. * Discussion:
  398. * CurrentProcessorSpeed() returns the current effective clock speed
  399. * of the CPU in megahertz. Before Mac OS X 10.4, this function
  400. * always returns the maximum cpu speed, not the actual current
  401. * speed the processor is running at. One MHz represents one
  402. * million cycles per second.
  403. *
  404. * Result:
  405. * the current effective clock speed of the CPU in megahertz.
  406. *
  407. * Availability:
  408. * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.8
  409. * CarbonLib: in CarbonLib 1.0 and later
  410. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  411. }
  412. function CurrentProcessorSpeed: SInt16; external name '_CurrentProcessorSpeed';
  413. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
  414. {
  415. * BatteryCount() *** DEPRECATED ***
  416. *
  417. * Deprecated:
  418. * Use IOPowerSources API. Found in <IOKit/ps/IOPowerSources.h>.
  419. *
  420. * Summary:
  421. * Return the count of batteries installed on this computer.
  422. *
  423. * Result:
  424. * the count of batteries installed.
  425. *
  426. * Availability:
  427. * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.8
  428. * CarbonLib: in CarbonLib 1.0 and later
  429. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  430. }
  431. function BatteryCount: SInt16; external name '_BatteryCount';
  432. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
  433. {
  434. * UpdateSystemActivity() *** DEPRECATED ***
  435. *
  436. * Deprecated:
  437. * Use IOPMAssertionCreateWithName(). Found in <IOKit/pwr_mgt/IOPMLib.h>.
  438. *
  439. * Summary:
  440. * You can use the UpdateSystemActivity function to notify the Power
  441. * Manager that activity has taken place.
  442. *
  443. * Discussion:
  444. * The UpdateSystemActivity function is used to notify the Power
  445. * Manager that activity has taken place and the timers used to
  446. * measure idle time should be updated to the time of this call.
  447. * This function can be used by device drivers to prevent the
  448. * computer from entering a low-power mode while critical activity
  449. * is taking place on a particular device. The function is passed a
  450. * parameter indicating the type of activity that has
  451. * occurred.
  452. *
  453. * This function is slightly different from DelaySystemIdle, which
  454. * should be used to prevent sleep or idle during a critical
  455. * section. UpdateSystemActivity simply updates the tick count for
  456. * the activity type selected. Conversely, DelaySystemIdle actually
  457. * moves the counter to some number of ticks into the future, which
  458. * allows the caller to go off and do somethingwithout fear of
  459. * idling.
  460. *
  461. * The valid types of activity are:
  462. * Value Name Value Description
  463. * OverallAct 0 general type of activity
  464. * UsrActivity 1 user activity (i.e.keyboard or mouse)
  465. * NetActivity 2 interaction with network(s)
  466. * HDActivity 3 hard disk or storage device in use
  467. *
  468. * Parameters:
  469. *
  470. * activity:
  471. * The type of activity which has occurred.
  472. *
  473. * Availability:
  474. * Mac OS X: in version 10.0 and later in CoreServices.framework but deprecated in 10.8
  475. * CarbonLib: in CarbonLib 1.0 and later
  476. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  477. }
  478. function UpdateSystemActivity( activity: UInt8 ): OSErr; external name '_UpdateSystemActivity';
  479. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_8,__IPHONE_NA,__IPHONE_NA) *)
  480. {*********************************************************************************************
  481. *
  482. * Everything below this point in this file is deprecated and should not be used
  483. * in new code on Mac OS X. Existing clients should move to non-deprecated
  484. * where possible.
  485. *
  486. *********************************************************************************************}
  487. {$ifc not TARGET_CPU_64}
  488. { Storage Media sleep mode defines }
  489. const
  490. kMediaModeOn = 0; { Media active (Drive spinning and at full power) }
  491. kMediaModeStandBy = 1; { Media standby (not implemented) }
  492. kMediaModeSuspend = 2; { Media Idle (not implemented) }
  493. kMediaModeOff = 3; { Media Sleep (Drive not spinning and at min power, max recovery time) }
  494. const
  495. kMediaPowerCSCode = 70;
  496. { definitions for HDQueueElement.hdFlags }
  497. const
  498. kHDQueuePostBit = 0; { 1 = call this routine on the second pass }
  499. kHDQueuePostMask = 1 shl kHDQueuePostBit;
  500. type
  501. ActivityInfoPtr = ^ActivityInfo;
  502. ActivityInfo = record
  503. ActivityType: SInt16; { Type of activity to be fetched. Same as UpdateSystemActivity Selectors }
  504. ActivityTime: UNSIGNEDLONG; { Time of last activity (in ticks) of specified type. }
  505. end;
  506. { information returned by GetScaledBatteryInfo }
  507. type
  508. BatteryInfoPtr = ^BatteryInfo;
  509. BatteryInfo = record
  510. flags: UInt8; { misc flags (see below) }
  511. warningLevel: UInt8; { scaled warning level (0-255) }
  512. reserved: UInt8; { reserved for internal use }
  513. batteryLevel: UInt8; { scaled battery level (0-255) }
  514. end;
  515. type
  516. ModemByte = SInt8;
  517. BatteryByte = SInt8;
  518. SoundMixerByte = SInt8;
  519. PMResultCode = SIGNEDLONG;
  520. const
  521. { depreciated commands to SleepQRec sleepQProc }
  522. sleepRequest = kSleepRequest;
  523. sleepDemand = kSleepDemand;
  524. sleepWakeUp = kSleepWakeUp;
  525. sleepRevoke = kSleepRevoke;
  526. sleepUnlock = kSleepUnlock;
  527. sleepDeny = kSleepDeny;
  528. sleepNow = kSleepNow;
  529. dozeDemand = kDozeDemand;
  530. dozeWakeUp = kDozeWakeUp;
  531. dozeRequest = kDozeRequest;
  532. enterStandby = kEnterStandby;
  533. enterRun = kEnterRun;
  534. suspendRequestMsg = kSuspendRequest;
  535. suspendDemandMsg = kSuspendDemand;
  536. suspendRevokeMsg = kSuspendRevoke;
  537. suspendWakeUpMsg = kSuspendWakeUp;
  538. getPowerLevel = kGetPowerLevel;
  539. setPowerLevel = kSetPowerLevel;
  540. { Power Handler func messages }
  541. type
  542. PowerLevel = UInt32;
  543. { Power levels corresponding to PCI Bus Power Management Interface Spec (PMIS) }
  544. const
  545. kPMDevicePowerLevel_On = 0; { fully-powered 'On' state (D0 state) }
  546. kPMDevicePowerLevel_D1 = 1; { not used by Apple system SW }
  547. kPMDevicePowerLevel_D2 = 2; { not used by Apple system SW }
  548. kPMDevicePowerLevel_Off = 3; { main PCI bus power 'Off', but PCI standby power available (D3cold state) }
  549. { PowerHandlerProc definition }
  550. {$endc} {not TARGET_CPU_64}
  551. type
  552. RegEntryID = UNSIGNEDLONG;
  553. PowerHandlerProcPtr = function( message: UInt32; param: UnivPtr; refCon: UInt32; var regEntryID_: RegEntryID ): OSStatus;
  554. PowerHandlerUPP = PowerHandlerProcPtr;
  555. {
  556. * NewPowerHandlerUPP()
  557. *
  558. * Availability:
  559. * Mac OS X: not available
  560. * CarbonLib: not available
  561. * Non-Carbon CFM: available as macro/inline
  562. }
  563. {
  564. * DisposePowerHandlerUPP()
  565. *
  566. * Availability:
  567. * Mac OS X: not available
  568. * CarbonLib: not available
  569. * Non-Carbon CFM: available as macro/inline
  570. }
  571. {
  572. * InvokePowerHandlerUPP()
  573. *
  574. * Availability:
  575. * Mac OS X: not available
  576. * CarbonLib: not available
  577. * Non-Carbon CFM: available as macro/inline
  578. }
  579. {$ifc not TARGET_CPU_64}
  580. { Power Mgt Apple Event types and errors }
  581. const
  582. { Bit positions for ModemByte }
  583. modemOnBit = 0;
  584. ringWakeUpBit = 2;
  585. modemInstalledBit = 3;
  586. ringDetectBit = 4;
  587. modemOnHookBit = 5;
  588. const
  589. { masks for ModemByte }
  590. modemOnMask = $01;
  591. ringWakeUpMask = $04;
  592. modemInstalledMask = $08;
  593. ringDetectMask = $10;
  594. modemOnHookMask = $20;
  595. const
  596. { bit positions for BatteryByte }
  597. chargerConnBit = 0;
  598. hiChargeBit = 1;
  599. chargeOverFlowBit = 2;
  600. batteryDeadBit = 3;
  601. batteryLowBit = 4;
  602. connChangedBit = 5;
  603. const
  604. { masks for BatteryByte }
  605. chargerConnMask = $01;
  606. hiChargeMask = $02;
  607. chargeOverFlowMask = $04;
  608. batteryDeadMask = $08;
  609. batteryLowMask = $10;
  610. connChangedMask = $20;
  611. const
  612. { bit positions for SoundMixerByte }
  613. MediaBaySndEnBit = 0;
  614. PCISndEnBit = 1;
  615. ZVSndEnBit = 2;
  616. PCCardSndEnBit = 3;
  617. const
  618. { masks for SoundMixerByte }
  619. MediaBaySndEnMask = $01;
  620. PCISndEnMask = $02;
  621. ZVSndEnMask = $04;
  622. PCCardSndEnMask = $08;
  623. const
  624. { power mgt class}
  625. kAEMacPowerMgtEvt = FourCharCode('pmgt'); { event ids}
  626. kAEMacToWake = FourCharCode('wake');
  627. kAEMacLowPowerSaveData = FourCharCode('pmsd');
  628. kAEMacEmergencySleep = FourCharCode('emsl');
  629. kAEMacEmergencyShutdown = FourCharCode('emsd');
  630. {
  631. These are result values returned by a Power Handler when queries
  632. by the Power Mgr if the device which that Power Handler represents
  633. woke the machine.
  634. }
  635. const
  636. kDeviceDidNotWakeMachine = 0; { device did NOT wake machine}
  637. kDeviceRequestsFullWake = 1; { device did wake machine and requests full wakeup}
  638. kDeviceRequestsWakeToDoze = 2; { device did wake machine and requests partial wakeup}
  639. { bits in bitfield returned by PMFeatures }
  640. const
  641. hasWakeupTimer = 0; { 1=wakeup timer is supported }
  642. hasSharedModemPort = 1; { 1=modem port shared by SCC and internal modem }
  643. hasProcessorCycling = 2; { 1=processor cycling is supported }
  644. mustProcessorCycle = 3; { 1=processor cycling should not be turned off }
  645. hasReducedSpeed = 4; { 1=processor can be started up at reduced speed }
  646. dynamicSpeedChange = 5; { 1=processor speed can be switched dynamically }
  647. hasSCSIDiskMode = 6; { 1=SCSI Disk Mode is supported }
  648. canGetBatteryTime = 7; { 1=battery time can be calculated }
  649. canWakeupOnRing = 8; { 1=can wakeup when the modem detects a ring }
  650. hasDimmingSupport = 9; { 1=has dimming support built in (DPMS standby by default) }
  651. hasStartupTimer = 10; { 1=startup timer is supported }
  652. hasChargeNotification = 11; { 1=client can determine of charge connect status change notifications available }
  653. hasDimSuspendSupport = 12; { 1=supports dimming LCD and CRT to DPMS suspend state }
  654. hasWakeOnNetActivity = 13; { 1=hardware supports wake on network activity }
  655. hasWakeOnLid = 14; { 1=hardware can wake when opened }
  656. canPowerOffPCIBus = 15; { 1=hardware can power off PCI bus during sleep if cards allow }
  657. hasDeepSleep = 16; { 1=hardware supports deep sleep (hibernation) mode }
  658. hasSleep = 17; { 1=hardware supports normal (PowerBook-like) sleep }
  659. supportsServerModeAPIs = 18; { 1=hardware supports server mode API routines }
  660. supportsUPSIntegration = 19; { 1=hardware support UPS integration and reporting }
  661. hasAggressiveIdling = 20; { 1=Power Manager only resets OverallAct on UsrActvity }
  662. supportsIdleQueue = 21; { 1=Power Manager supports the idle queue }
  663. { bits in bitfield returned by GetIntModemInfo and set by SetIntModemState }
  664. const
  665. hasInternalModem = 0; { 1=internal modem installed }
  666. intModemRingDetect = 1; { 1=internal modem has detected a ring }
  667. intModemOffHook = 2; { 1=internal modem is off hook }
  668. intModemRingWakeEnb = 3; { 1=wakeup on ring is enabled }
  669. extModemSelected = 4; { 1=external modem selected }
  670. modemSetBit = 15; { 1=set bit, 0=clear bit (SetIntModemState) }
  671. { bits in BatteryInfo.flags }
  672. { ("chargerConnected" doesn't mean the charger is plugged in) }
  673. const
  674. batteryInstalled = 7; { 1=battery is currently connected }
  675. batteryCharging = 6; { 1=battery is being charged }
  676. chargerConnected = 5; { 1=charger is connected to the PowerBook }
  677. upsConnected = 4; { 1=there is a UPS connected }
  678. upsIsPowerSource = 3; { 1=UPS is source of power }
  679. const
  680. HDPwrQType = $4844; { 'HD' hard disk spindown queue element type }
  681. PMgrStateQType = $504D; { 'PM' Power Manager state queue element type }
  682. { client notification bits in PMgrQueueElement.pmNotifyBits }
  683. const
  684. pmSleepTimeoutChanged = 0;
  685. pmSleepEnableChanged = 1;
  686. pmHardDiskTimeoutChanged = 2;
  687. pmHardDiskSpindownChanged = 3;
  688. pmDimmingTimeoutChanged = 4;
  689. pmDimmingEnableChanged = 5;
  690. pmDiskModeAddressChanged = 6;
  691. pmProcessorCyclingChanged = 7;
  692. pmProcessorSpeedChanged = 8;
  693. pmWakeupTimerChanged = 9;
  694. pmStartupTimerChanged = 10;
  695. pmHardDiskPowerRemovedbyUser = 11;
  696. pmChargeStatusChanged = 12;
  697. pmPowerLevelChanged = 13;
  698. pmWakeOnNetActivityChanged = 14;
  699. const
  700. pmSleepTimeoutChangedMask = 1 shl pmSleepTimeoutChanged;
  701. pmSleepEnableChangedMask = 1 shl pmSleepEnableChanged;
  702. pmHardDiskTimeoutChangedMask = 1 shl pmHardDiskTimeoutChanged;
  703. pmHardDiskSpindownChangedMask = 1 shl pmHardDiskSpindownChanged;
  704. pmDimmingTimeoutChangedMask = 1 shl pmDimmingTimeoutChanged;
  705. pmDimmingEnableChangedMask = 1 shl pmDimmingEnableChanged;
  706. pmDiskModeAddressChangedMask = 1 shl pmDiskModeAddressChanged;
  707. pmProcessorCyclingChangedMask = 1 shl pmProcessorCyclingChanged;
  708. pmProcessorSpeedChangedMask = 1 shl pmProcessorSpeedChanged;
  709. pmWakeupTimerChangedMask = 1 shl pmWakeupTimerChanged;
  710. pmStartupTimerChangedMask = 1 shl pmStartupTimerChanged;
  711. pmHardDiskPowerRemovedbyUserMask = 1 shl pmHardDiskPowerRemovedbyUser;
  712. pmChargeStatusChangedMask = 1 shl pmChargeStatusChanged;
  713. pmPowerLevelChangedMask = 1 shl pmPowerLevelChanged;
  714. pmWakeOnNetActivityChangedMask = 1 shl pmWakeOnNetActivityChanged;
  715. {
  716. Use kIdleQueueDeviceType as the deviceType argument to AddDevicePowerHandler() to get the
  717. handler into the idle queue instead of the device sleep queue.
  718. }
  719. const
  720. kIdleQueueDeviceType = 'idle-queue';
  721. { PCI power management support}
  722. const
  723. kUseDefaultMinimumWakeTime = 0; { Defaults to 5 minutes}
  724. kPowerSummaryVersion = 1; { Version of PowerSummary structure.}
  725. kDevicePowerInfoVersion = 1; { Version of DevicePowerInfo structure.}
  726. const
  727. { PowerSummary flags}
  728. kPCIPowerOffAllowed = 1 shl 0; { PCI power off is allowed.}
  729. const
  730. { DevicePowerInfo flags}
  731. kDevicePCIPowerOffAllowed = 1 shl 0; { PCI power off is allowed for device.}
  732. kDeviceSupportsPMIS = 1 shl 1; { Device supports Power Mgt Interface Spec.}
  733. kDeviceCanAssertPMEDuringSleep = 1 shl 2; { Device can assert PME# during sleep.}
  734. kDeviceUsesCommonLogicPower = 1 shl 3; { Device uses common-logic power}
  735. kDeviceDriverPresent = 1 shl 4; { Driver present for device.}
  736. kDeviceDriverSupportsPowerMgt = 1 shl 5; { Driver installed a power handler.}
  737. type
  738. DevicePowerInfoPtr = ^DevicePowerInfo;
  739. DevicePowerInfo = record
  740. version: UInt32; { Version of this structure.}
  741. regID: RegEntryID; { RegEntryID for device.}
  742. flags: OptionBits; { Flags}
  743. minimumWakeTime: UInt32; { Minimum seconds before sleeping again.}
  744. sleepPowerNeeded: UInt32; { Milliwatts needed in the sleep state.}
  745. end;
  746. type
  747. PowerSummaryPtr = ^PowerSummary;
  748. PowerSummary = record
  749. version: UInt32; { Version of this structure.}
  750. flags: OptionBits; { Flags}
  751. sleepPowerAvailable: UInt32; { Milliwatts available during sleep.}
  752. sleepPowerNeeded: UInt32; { Milliwatts needed during sleep.}
  753. minimumWakeTime: UInt32; { Minimum seconds before sleeping again.}
  754. deviceCount: ItemCount; { Number of device power info records.}
  755. devices: array [0..0] of DevicePowerInfo; { Array of device power info records.}
  756. end;
  757. {$endc} {not TARGET_CPU_64}
  758. type
  759. HDQueueElementPtr = ^HDQueueElement;
  760. PMgrQueueElementPtr = ^PMgrQueueElement;
  761. HDSpindownProcPtr = procedure( theElement: HDQueueElementPtr );
  762. PMgrStateChangeProcPtr = procedure( theElement: PMgrQueueElementPtr; stateBits: SIGNEDLONG );
  763. HDSpindownUPP = HDSpindownProcPtr;
  764. PMgrStateChangeUPP = PMgrStateChangeProcPtr;
  765. {$ifc TARGET_CPU_64}
  766. HDQueueElement = record end;
  767. PMgrQueueElement = record end;
  768. {$elsec} {TARGET_CPU_64}
  769. HDQueueElement = record
  770. hdQLink: HDQueueElementPtr; { pointer to next queue element }
  771. hdQType: SInt16; { queue element type (must be HDPwrQType) }
  772. hdFlags: SInt16; { miscellaneous flags }
  773. hdProc: HDSpindownUPP; { pointer to routine to call }
  774. hdUser: SIGNEDLONG; { user-defined (variable storage, etc.) }
  775. end;
  776. PMgrQueueElement = record
  777. pmQLink: PMgrQueueElementPtr; { pointer to next queue element }
  778. pmQType: SInt16; { queue element type (must be PMgrStateQType) }
  779. pmFlags: SInt16; { miscellaneous flags }
  780. pmNotifyBits: SIGNEDLONG; { bitmap of which changes to be notified for }
  781. pmProc: PMgrStateChangeUPP; { pointer to routine to call }
  782. pmUser: SIGNEDLONG; { user-defined (variable storage, etc.) }
  783. end;
  784. BatteryTimeRecPtr = ^BatteryTimeRec;
  785. BatteryTimeRec = record
  786. expectedBatteryTime: UNSIGNEDLONG; { estimated battery time remaining (seconds) }
  787. minimumBatteryTime: UNSIGNEDLONG; { minimum battery time remaining (seconds) }
  788. maximumBatteryTime: UNSIGNEDLONG; { maximum battery time remaining (seconds) }
  789. timeUntilCharged: UNSIGNEDLONG; { time until battery is fully charged (seconds)}
  790. end;
  791. type
  792. WakeupTimePtr = ^WakeupTime;
  793. WakeupTime = record
  794. wakeTime: UNSIGNEDLONG; { wakeup time (same format as current time) }
  795. wakeEnabled: Boolean; { 1=enable wakeup timer, 0=disable wakeup timer }
  796. filler: SInt8;
  797. end;
  798. type
  799. StartupTimePtr = ^StartupTime;
  800. StartupTime = record
  801. startTime: UNSIGNEDLONG; { startup time (same format as current time) }
  802. startEnabled: Boolean; { 1=enable startup timer, 0=disable startup timer }
  803. filler: SInt8;
  804. end;
  805. {$ifc not TARGET_CPU_64}
  806. {
  807. * SetSpindownDisable() *** DEPRECATED ***
  808. *
  809. * Availability:
  810. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  811. * CarbonLib: in CarbonLib 1.0 and later
  812. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  813. }
  814. procedure SetSpindownDisable( setDisable: Boolean ); external name '_SetSpindownDisable';
  815. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_5,__IPHONE_NA,__IPHONE_NA) *)
  816. {
  817. * PMSelectorCount() *** DEPRECATED ***
  818. *
  819. * Availability:
  820. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  821. * CarbonLib: in CarbonLib 1.0 and later
  822. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  823. }
  824. function PMSelectorCount: SInt16; external name '_PMSelectorCount';
  825. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_5,__IPHONE_NA,__IPHONE_NA) *)
  826. {
  827. * PMFeatures() *** DEPRECATED ***
  828. *
  829. * Availability:
  830. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  831. * CarbonLib: in CarbonLib 1.0 and later
  832. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  833. }
  834. function PMFeatures: UInt32; external name '_PMFeatures';
  835. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_5,__IPHONE_NA,__IPHONE_NA) *)
  836. {
  837. * SetProcessorSpeed() *** DEPRECATED ***
  838. *
  839. * Availability:
  840. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  841. * CarbonLib: in CarbonLib 1.0 and later
  842. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  843. }
  844. function SetProcessorSpeed( fullSpeed: Boolean ): Boolean; external name '_SetProcessorSpeed';
  845. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_5,__IPHONE_NA,__IPHONE_NA) *)
  846. {
  847. * FullProcessorSpeed() *** DEPRECATED ***
  848. *
  849. * Availability:
  850. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  851. * CarbonLib: in CarbonLib 1.0 and later
  852. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  853. }
  854. function FullProcessorSpeed: Boolean; external name '_FullProcessorSpeed';
  855. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_5,__IPHONE_NA,__IPHONE_NA) *)
  856. { The following constants, structures, and functions have all been deprecated on Mac OS X and are not recommended for use.}
  857. {
  858. * DisableWUTime() *** DEPRECATED ***
  859. *
  860. * Availability:
  861. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  862. * CarbonLib: in CarbonLib 1.0 and later
  863. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  864. }
  865. function DisableWUTime: OSErr; external name '_DisableWUTime';
  866. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  867. {
  868. * SetWUTime() *** DEPRECATED ***
  869. *
  870. * Availability:
  871. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  872. * CarbonLib: in CarbonLib 1.0 and later
  873. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  874. }
  875. function SetWUTime( wuTime: SIGNEDLONG ): OSErr; external name '_SetWUTime';
  876. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  877. {$endc} {not TARGET_CPU_64}
  878. {$ifc not TARGET_CPU_64}
  879. {
  880. * GetWUTime() *** DEPRECATED ***
  881. *
  882. * Availability:
  883. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  884. * CarbonLib: in CarbonLib 1.0 and later
  885. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  886. }
  887. function GetWUTime( var wuTime: SIGNEDLONG; var wuFlag: SignedByte ): OSErr; external name '_GetWUTime';
  888. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  889. {
  890. * BatteryStatus() *** DEPRECATED ***
  891. *
  892. * Availability:
  893. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  894. * CarbonLib: in CarbonLib 1.0 and later
  895. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  896. }
  897. function BatteryStatus( var status: SignedByte; var power: SignedByte ): OSErr; external name '_BatteryStatus';
  898. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  899. {
  900. * ModemStatus() *** DEPRECATED ***
  901. *
  902. * Availability:
  903. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  904. * CarbonLib: in CarbonLib 1.0 and later
  905. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  906. }
  907. function ModemStatus( var status: SignedByte ): OSErr; external name '_ModemStatus';
  908. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  909. {$endc} {not TARGET_CPU_64}
  910. {$ifc not TARGET_CPU_64}
  911. {
  912. * IdleUpdate() *** DEPRECATED ***
  913. *
  914. * Deprecated:
  915. * The Power Manager is deprecated in Mac OS X. Some of this
  916. * functionality is provided in similar form in IOKit; some is
  917. * provided in the Carbon and Cocoa frameworks.
  918. *
  919. * Availability:
  920. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  921. * CarbonLib: in CarbonLib 1.0 and later
  922. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  923. }
  924. function IdleUpdate: SIGNEDLONG; external name '_IdleUpdate';
  925. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  926. {
  927. * EnableIdle() *** DEPRECATED ***
  928. *
  929. * Deprecated:
  930. * The Power Manager is deprecated in Mac OS X. Some of this
  931. * functionality is provided in similar form in IOKit; some is
  932. * provided in the Carbon and Cocoa frameworks.
  933. *
  934. * Availability:
  935. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  936. * CarbonLib: in CarbonLib 1.0 and later
  937. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  938. }
  939. procedure EnableIdle; external name '_EnableIdle';
  940. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  941. {
  942. * DisableIdle() *** DEPRECATED ***
  943. *
  944. * Deprecated:
  945. * The Power Manager is deprecated in Mac OS X. Some of this
  946. * functionality is provided in similar form in IOKit; some is
  947. * provided in the Carbon and Cocoa frameworks.
  948. *
  949. * Availability:
  950. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  951. * CarbonLib: in CarbonLib 1.0 and later
  952. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  953. }
  954. procedure DisableIdle; external name '_DisableIdle';
  955. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  956. {
  957. * AOn() *** DEPRECATED ***
  958. *
  959. * Deprecated:
  960. * This function is deprecated on Mac OS X. IOKit may provide
  961. * replacement functionality depending on what this was being used
  962. * for.
  963. *
  964. * Availability:
  965. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  966. * CarbonLib: in CarbonLib 1.0 and later
  967. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  968. }
  969. procedure AOn; external name '_AOn';
  970. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  971. {
  972. * AOnIgnoreModem() *** DEPRECATED ***
  973. *
  974. * Deprecated:
  975. * This function is deprecated on Mac OS X. IOKit may provide
  976. * replacement functionality depending on what this was being used
  977. * for.
  978. *
  979. * Availability:
  980. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  981. * CarbonLib: in CarbonLib 1.0 and later
  982. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  983. }
  984. procedure AOnIgnoreModem; external name '_AOnIgnoreModem';
  985. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  986. {
  987. * BOn() *** DEPRECATED ***
  988. *
  989. * Deprecated:
  990. * This function is deprecated on Mac OS X. IOKit may provide
  991. * replacement functionality depending on what this was being used
  992. * for.
  993. *
  994. * Availability:
  995. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  996. * CarbonLib: in CarbonLib 1.0 and later
  997. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  998. }
  999. procedure BOn; external name '_BOn';
  1000. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1001. {
  1002. * AOff() *** DEPRECATED ***
  1003. *
  1004. * Deprecated:
  1005. * This function is deprecated on Mac OS X. IOKit may provide
  1006. * replacement functionality depending on what this was being used
  1007. * for.
  1008. *
  1009. * Availability:
  1010. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1011. * CarbonLib: in CarbonLib 1.0 and later
  1012. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1013. }
  1014. procedure AOff; external name '_AOff';
  1015. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1016. {
  1017. * BOff() *** DEPRECATED ***
  1018. *
  1019. * Deprecated:
  1020. * This function is deprecated on Mac OS X. IOKit may provide
  1021. * replacement functionality depending on what this was being used
  1022. * for.
  1023. *
  1024. * Availability:
  1025. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1026. * CarbonLib: in CarbonLib 1.0 and later
  1027. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1028. }
  1029. procedure BOff; external name '_BOff';
  1030. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1031. { Public Power Management API }
  1032. {
  1033. * GetSleepTimeout() *** DEPRECATED ***
  1034. *
  1035. * Availability:
  1036. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1037. * CarbonLib: in CarbonLib 1.0 and later
  1038. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1039. }
  1040. function GetSleepTimeout: UInt8; external name '_GetSleepTimeout';
  1041. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1042. {
  1043. * SetSleepTimeout() *** DEPRECATED ***
  1044. *
  1045. * Availability:
  1046. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1047. * CarbonLib: in CarbonLib 1.0 and later
  1048. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1049. }
  1050. procedure SetSleepTimeout( timeout: ByteParameter ); external name '_SetSleepTimeout';
  1051. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1052. {
  1053. * GetHardDiskTimeout() *** DEPRECATED ***
  1054. *
  1055. * Availability:
  1056. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1057. * CarbonLib: in CarbonLib 1.0 and later
  1058. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1059. }
  1060. function GetHardDiskTimeout: UInt8; external name '_GetHardDiskTimeout';
  1061. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1062. {
  1063. * SetHardDiskTimeout() *** DEPRECATED ***
  1064. *
  1065. * Availability:
  1066. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1067. * CarbonLib: in CarbonLib 1.0 and later
  1068. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1069. }
  1070. procedure SetHardDiskTimeout( timeout: ByteParameter ); external name '_SetHardDiskTimeout';
  1071. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1072. {
  1073. * HardDiskPowered() *** DEPRECATED ***
  1074. *
  1075. * Availability:
  1076. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1077. * CarbonLib: in CarbonLib 1.0 and later
  1078. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1079. }
  1080. function HardDiskPowered: Boolean; external name '_HardDiskPowered';
  1081. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1082. {
  1083. * SpinDownHardDisk() *** DEPRECATED ***
  1084. *
  1085. * Availability:
  1086. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1087. * CarbonLib: in CarbonLib 1.0 and later
  1088. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1089. }
  1090. procedure SpinDownHardDisk; external name '_SpinDownHardDisk';
  1091. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1092. {
  1093. * IsSpindownDisabled() *** DEPRECATED ***
  1094. *
  1095. * Availability:
  1096. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1097. * CarbonLib: in CarbonLib 1.0 and later
  1098. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1099. }
  1100. function IsSpindownDisabled: Boolean; external name '_IsSpindownDisabled';
  1101. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1102. {
  1103. * HardDiskQInstall() *** DEPRECATED ***
  1104. *
  1105. * Availability:
  1106. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1107. * CarbonLib: in CarbonLib 1.0 and later
  1108. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1109. }
  1110. function HardDiskQInstall( var theElement: HDQueueElement ): OSErr; external name '_HardDiskQInstall';
  1111. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1112. {
  1113. * HardDiskQRemove() *** DEPRECATED ***
  1114. *
  1115. * Availability:
  1116. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1117. * CarbonLib: in CarbonLib 1.0 and later
  1118. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1119. }
  1120. function HardDiskQRemove( var theElement: HDQueueElement ): OSErr; external name '_HardDiskQRemove';
  1121. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1122. {
  1123. * GetScaledBatteryInfo() *** DEPRECATED ***
  1124. *
  1125. * Availability:
  1126. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1127. * CarbonLib: in CarbonLib 1.0 and later
  1128. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1129. }
  1130. procedure GetScaledBatteryInfo( whichBattery: SInt16; var theInfo: BatteryInfo ); external name '_GetScaledBatteryInfo';
  1131. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1132. {
  1133. * AutoSleepControl() *** DEPRECATED ***
  1134. *
  1135. * Availability:
  1136. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1137. * CarbonLib: in CarbonLib 1.0 and later
  1138. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1139. }
  1140. procedure AutoSleepControl( enableSleep: Boolean ); external name '_AutoSleepControl';
  1141. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1142. {
  1143. * GetIntModemInfo() *** DEPRECATED ***
  1144. *
  1145. * Availability:
  1146. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1147. * CarbonLib: in CarbonLib 1.0 and later
  1148. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1149. }
  1150. function GetIntModemInfo: UInt32; external name '_GetIntModemInfo';
  1151. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1152. {
  1153. * SetIntModemState() *** DEPRECATED ***
  1154. *
  1155. * Availability:
  1156. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1157. * CarbonLib: in CarbonLib 1.0 and later
  1158. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1159. }
  1160. procedure SetIntModemState( theState: SInt16 ); external name '_SetIntModemState';
  1161. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1162. {
  1163. * GetSCSIDiskModeAddress() *** DEPRECATED ***
  1164. *
  1165. * Availability:
  1166. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1167. * CarbonLib: in CarbonLib 1.0 and later
  1168. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1169. }
  1170. function GetSCSIDiskModeAddress: SInt16; external name '_GetSCSIDiskModeAddress';
  1171. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1172. {
  1173. * SetSCSIDiskModeAddress() *** DEPRECATED ***
  1174. *
  1175. * Availability:
  1176. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1177. * CarbonLib: in CarbonLib 1.0 and later
  1178. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1179. }
  1180. procedure SetSCSIDiskModeAddress( scsiAddress: SInt16 ); external name '_SetSCSIDiskModeAddress';
  1181. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1182. {
  1183. * GetWakeupTimer() *** DEPRECATED ***
  1184. *
  1185. * Availability:
  1186. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1187. * CarbonLib: in CarbonLib 1.0 and later
  1188. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1189. }
  1190. procedure GetWakeupTimer( var theTime: WakeupTime ); external name '_GetWakeupTimer';
  1191. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1192. {
  1193. * SetWakeupTimer() *** DEPRECATED ***
  1194. *
  1195. * Availability:
  1196. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1197. * CarbonLib: in CarbonLib 1.0 and later
  1198. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1199. }
  1200. procedure SetWakeupTimer( var theTime: WakeupTime ); external name '_SetWakeupTimer';
  1201. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1202. {
  1203. * IsProcessorCyclingEnabled() *** DEPRECATED ***
  1204. *
  1205. * Availability:
  1206. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1207. * CarbonLib: in CarbonLib 1.0 and later
  1208. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1209. }
  1210. function IsProcessorCyclingEnabled: Boolean; external name '_IsProcessorCyclingEnabled';
  1211. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1212. {
  1213. * EnableProcessorCycling() *** DEPRECATED ***
  1214. *
  1215. * Availability:
  1216. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1217. * CarbonLib: in CarbonLib 1.0 and later
  1218. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1219. }
  1220. procedure EnableProcessorCycling( enable: Boolean ); external name '_EnableProcessorCycling';
  1221. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1222. {
  1223. * GetBatteryVoltage() *** DEPRECATED ***
  1224. *
  1225. * Availability:
  1226. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1227. * CarbonLib: in CarbonLib 1.0 and later
  1228. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1229. }
  1230. function GetBatteryVoltage( whichBattery: SInt16 ): Fixed; external name '_GetBatteryVoltage';
  1231. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1232. {
  1233. * GetBatteryTimes() *** DEPRECATED ***
  1234. *
  1235. * Availability:
  1236. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1237. * CarbonLib: in CarbonLib 1.0 and later
  1238. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1239. }
  1240. procedure GetBatteryTimes( whichBattery: SInt16; var theTimes: BatteryTimeRec ); external name '_GetBatteryTimes';
  1241. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1242. {
  1243. * GetDimmingTimeout() *** DEPRECATED ***
  1244. *
  1245. * Availability:
  1246. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1247. * CarbonLib: in CarbonLib 1.0 and later
  1248. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1249. }
  1250. function GetDimmingTimeout: UInt8; external name '_GetDimmingTimeout';
  1251. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1252. {
  1253. * SetDimmingTimeout() *** DEPRECATED ***
  1254. *
  1255. * Availability:
  1256. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1257. * CarbonLib: in CarbonLib 1.0 and later
  1258. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1259. }
  1260. procedure SetDimmingTimeout( timeout: ByteParameter ); external name '_SetDimmingTimeout';
  1261. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1262. {
  1263. * DimmingControl() *** DEPRECATED ***
  1264. *
  1265. * Availability:
  1266. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1267. * CarbonLib: in CarbonLib 1.0 and later
  1268. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1269. }
  1270. procedure DimmingControl( enableSleep: Boolean ); external name '_DimmingControl';
  1271. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1272. {
  1273. * IsDimmingControlDisabled() *** DEPRECATED ***
  1274. *
  1275. * Availability:
  1276. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1277. * CarbonLib: in CarbonLib 1.0 and later
  1278. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1279. }
  1280. function IsDimmingControlDisabled: Boolean; external name '_IsDimmingControlDisabled';
  1281. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1282. {
  1283. * IsAutoSlpControlDisabled() *** DEPRECATED ***
  1284. *
  1285. * Availability:
  1286. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1287. * CarbonLib: in CarbonLib 1.0 and later
  1288. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1289. }
  1290. function IsAutoSlpControlDisabled: Boolean; external name '_IsAutoSlpControlDisabled';
  1291. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1292. {
  1293. * PMgrStateQInstall() *** DEPRECATED ***
  1294. *
  1295. * Availability:
  1296. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1297. * CarbonLib: in CarbonLib 1.0 and later
  1298. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1299. }
  1300. function PMgrStateQInstall( var theElement: PMgrQueueElement ): OSErr; external name '_PMgrStateQInstall';
  1301. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1302. {
  1303. * PMgrStateQRemove() *** DEPRECATED ***
  1304. *
  1305. * Availability:
  1306. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1307. * CarbonLib: in CarbonLib 1.0 and later
  1308. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1309. }
  1310. function PMgrStateQRemove( var theElement: PMgrQueueElement ): OSErr; external name '_PMgrStateQRemove';
  1311. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1312. {
  1313. * DelaySystemIdle() *** DEPRECATED ***
  1314. *
  1315. * Availability:
  1316. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1317. * CarbonLib: in CarbonLib 1.0 and later
  1318. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1319. }
  1320. function DelaySystemIdle: OSErr; external name '_DelaySystemIdle';
  1321. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1322. {
  1323. * GetStartupTimer() *** DEPRECATED ***
  1324. *
  1325. * Availability:
  1326. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1327. * CarbonLib: in CarbonLib 1.0 and later
  1328. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1329. }
  1330. function GetStartupTimer( var theTime: StartupTime ): OSErr; external name '_GetStartupTimer';
  1331. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1332. {
  1333. * SetStartupTimer() *** DEPRECATED ***
  1334. *
  1335. * Availability:
  1336. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1337. * CarbonLib: in CarbonLib 1.0 and later
  1338. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1339. }
  1340. function SetStartupTimer( var theTime: StartupTime ): OSErr; external name '_SetStartupTimer';
  1341. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1342. {
  1343. * GetLastActivity() *** DEPRECATED ***
  1344. *
  1345. * Availability:
  1346. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1347. * CarbonLib: in CarbonLib 1.0 and later
  1348. * Non-Carbon CFM: in PowerMgrLib 1.0 and later
  1349. }
  1350. function GetLastActivity( var theActivity: ActivityInfo ): OSErr; external name '_GetLastActivity';
  1351. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1352. {
  1353. * GetSoundMixerState() *** DEPRECATED ***
  1354. *
  1355. * Availability:
  1356. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1357. * CarbonLib: in CarbonLib 1.0 and later
  1358. * Non-Carbon CFM: in PowerMgrLib 1.1 and later
  1359. }
  1360. function GetSoundMixerState( var theSoundMixerByte: SoundMixerByte ): OSErr; external name '_GetSoundMixerState';
  1361. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1362. {
  1363. * SetSoundMixerState() *** DEPRECATED ***
  1364. *
  1365. * Availability:
  1366. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1367. * CarbonLib: in CarbonLib 1.0 and later
  1368. * Non-Carbon CFM: in PowerMgrLib 1.1 and later
  1369. }
  1370. function SetSoundMixerState( var theSoundMixerByte: SoundMixerByte ): OSErr; external name '_SetSoundMixerState';
  1371. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1372. {
  1373. * GetDimSuspendState() *** DEPRECATED ***
  1374. *
  1375. * Availability:
  1376. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1377. * CarbonLib: in CarbonLib 1.0 and later
  1378. * Non-Carbon CFM: in PowerMgrLib 1.1 and later
  1379. }
  1380. function GetDimSuspendState: Boolean; external name '_GetDimSuspendState';
  1381. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1382. {
  1383. * SetDimSuspendState() *** DEPRECATED ***
  1384. *
  1385. * Availability:
  1386. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.0
  1387. * CarbonLib: in CarbonLib 1.0 and later
  1388. * Non-Carbon CFM: in PowerMgrLib 1.1 and later
  1389. }
  1390. procedure SetDimSuspendState( dimSuspendState: Boolean ); external name '_SetDimSuspendState';
  1391. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
  1392. {$endc} {not TARGET_CPU_64}
  1393. {$endc} {TARGET_CPU_64}
  1394. {
  1395. * NewHDSpindownUPP()
  1396. *
  1397. * Availability:
  1398. * Mac OS X: in version 10.0 and later in CoreServices.framework
  1399. * CarbonLib: in CarbonLib 1.0 and later
  1400. * Non-Carbon CFM: available as macro/inline
  1401. }
  1402. function NewHDSpindownUPP( userRoutine: HDSpindownProcPtr ): HDSpindownUPP; external name '_NewHDSpindownUPP';
  1403. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_5,__IPHONE_NA,__IPHONE_NA) *)
  1404. {
  1405. * NewPMgrStateChangeUPP() *** DEPRECATED ***
  1406. *
  1407. * Availability:
  1408. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  1409. * CarbonLib: in CarbonLib 1.0 and later
  1410. * Non-Carbon CFM: available as macro/inline
  1411. }
  1412. function NewPMgrStateChangeUPP( userRoutine: PMgrStateChangeProcPtr ): PMgrStateChangeUPP; external name '_NewPMgrStateChangeUPP';
  1413. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_5,__IPHONE_NA,__IPHONE_NA) *)
  1414. {
  1415. * DisposeHDSpindownUPP() *** DEPRECATED ***
  1416. *
  1417. * Availability:
  1418. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  1419. * CarbonLib: in CarbonLib 1.0 and later
  1420. * Non-Carbon CFM: available as macro/inline
  1421. }
  1422. procedure DisposeHDSpindownUPP( userUPP: HDSpindownUPP ); external name '_DisposeHDSpindownUPP';
  1423. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_5,__IPHONE_NA,__IPHONE_NA) *)
  1424. {
  1425. * DisposePMgrStateChangeUPP() *** DEPRECATED ***
  1426. *
  1427. * Availability:
  1428. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  1429. * CarbonLib: in CarbonLib 1.0 and later
  1430. * Non-Carbon CFM: available as macro/inline
  1431. }
  1432. procedure DisposePMgrStateChangeUPP( userUPP: PMgrStateChangeUPP ); external name '_DisposePMgrStateChangeUPP';
  1433. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_5,__IPHONE_NA,__IPHONE_NA) *)
  1434. {
  1435. * InvokeHDSpindownUPP() *** DEPRECATED ***
  1436. *
  1437. * Availability:
  1438. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  1439. * CarbonLib: in CarbonLib 1.0 and later
  1440. * Non-Carbon CFM: available as macro/inline
  1441. }
  1442. procedure InvokeHDSpindownUPP( var theElement: HDQueueElement; userUPP: HDSpindownUPP ); external name '_InvokeHDSpindownUPP';
  1443. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_5,__IPHONE_NA,__IPHONE_NA) *)
  1444. {
  1445. * InvokePMgrStateChangeUPP() *** DEPRECATED ***
  1446. *
  1447. * Availability:
  1448. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  1449. * CarbonLib: in CarbonLib 1.0 and later
  1450. * Non-Carbon CFM: available as macro/inline
  1451. }
  1452. procedure InvokePMgrStateChangeUPP( var theElement: PMgrQueueElement; stateBits: SIGNEDLONG; userUPP: PMgrStateChangeUPP ); external name '_InvokePMgrStateChangeUPP';
  1453. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0,__MAC_10_5,__IPHONE_NA,__IPHONE_NA) *)
  1454. {$endc} {TARGET_OS_MAC}
  1455. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  1456. end.
  1457. {$endc} {not MACOSALLINCLUDE}