Power.pas 59 KB

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