HITheme.pas 108 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774
  1. {
  2. File: HIToolbox/HITheme.h
  3. Contains: HIToolbox HITheme interfaces.
  4. Version: HIToolbox-219.4.81~2
  5. Copyright: © 1994-2005 by Apple Computer, Inc., all rights reserved.
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://www.freepascal.org/bugs.html
  9. }
  10. { Pascal Translation: Peter N Lewis, <[email protected]>, 2004 }
  11. { Pascal Translation Updated: Peter N Lewis, <[email protected]>, August 2005 }
  12. {
  13. Modified for use with Free Pascal
  14. Version 200
  15. Please report any bugs to <[email protected]>
  16. }
  17. {$mode macpas}
  18. {$packenum 1}
  19. {$macro on}
  20. {$inline on}
  21. {$CALLING MWPASCAL}
  22. unit HITheme;
  23. interface
  24. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  25. {$setc GAP_INTERFACES_VERSION := $0200}
  26. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  27. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  28. {$endc}
  29. {$ifc defined CPUPOWERPC and defined CPUI386}
  30. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  31. {$endc}
  32. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  33. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  34. {$endc}
  35. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  36. {$setc __ppc__ := 1}
  37. {$elsec}
  38. {$setc __ppc__ := 0}
  39. {$endc}
  40. {$ifc not defined __i386__ and defined CPUI386}
  41. {$setc __i386__ := 1}
  42. {$elsec}
  43. {$setc __i386__ := 0}
  44. {$endc}
  45. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  46. {$error Conflicting definitions for __ppc__ and __i386__}
  47. {$endc}
  48. {$ifc defined __ppc__ and __ppc__}
  49. {$setc TARGET_CPU_PPC := TRUE}
  50. {$setc TARGET_CPU_X86 := FALSE}
  51. {$elifc defined __i386__ and __i386__}
  52. {$setc TARGET_CPU_PPC := FALSE}
  53. {$setc TARGET_CPU_X86 := TRUE}
  54. {$elsec}
  55. {$error Neither __ppc__ nor __i386__ is defined.}
  56. {$endc}
  57. {$setc TARGET_CPU_PPC_64 := FALSE}
  58. {$ifc defined FPC_BIG_ENDIAN}
  59. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  60. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  61. {$elifc defined FPC_LITTLE_ENDIAN}
  62. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  63. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  64. {$elsec}
  65. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  66. {$endc}
  67. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  68. {$setc CALL_NOT_IN_CARBON := FALSE}
  69. {$setc OLDROUTINENAMES := FALSE}
  70. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  71. {$setc OPAQUE_UPP_TYPES := TRUE}
  72. {$setc OTCARBONAPPLICATION := TRUE}
  73. {$setc OTKERNEL := FALSE}
  74. {$setc PM_USE_SESSION_APIS := TRUE}
  75. {$setc TARGET_API_MAC_CARBON := TRUE}
  76. {$setc TARGET_API_MAC_OS8 := FALSE}
  77. {$setc TARGET_API_MAC_OSX := TRUE}
  78. {$setc TARGET_CARBON := TRUE}
  79. {$setc TARGET_CPU_68K := FALSE}
  80. {$setc TARGET_CPU_MIPS := FALSE}
  81. {$setc TARGET_CPU_SPARC := FALSE}
  82. {$setc TARGET_OS_MAC := TRUE}
  83. {$setc TARGET_OS_UNIX := FALSE}
  84. {$setc TARGET_OS_WIN32 := FALSE}
  85. {$setc TARGET_RT_MAC_68881 := FALSE}
  86. {$setc TARGET_RT_MAC_CFM := FALSE}
  87. {$setc TARGET_RT_MAC_MACHO := TRUE}
  88. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  89. {$setc TYPE_BOOL := FALSE}
  90. {$setc TYPE_EXTENDED := FALSE}
  91. {$setc TYPE_LONGLONG := TRUE}
  92. uses MacTypes,CFBase,CGBase,Appearance,HIShape,HIGeometry,Drag,CFDate,CGContext,MacWindows,Controls;
  93. {$ALIGN MAC68K}
  94. { -------------------------------------------------------------------------- }
  95. { HIThemeOrientation information }
  96. { -------------------------------------------------------------------------- }
  97. const
  98. {
  99. * The passed context has an origin at the top left. This is the
  100. * default of a context passed to you by HIToolbox.
  101. }
  102. kHIThemeOrientationNormal = 0;
  103. {
  104. * The passed context has an origin at the bottom left. This is the
  105. * default for a context you create.
  106. }
  107. kHIThemeOrientationInverted = 1;
  108. type
  109. HIThemeOrientation = UInt32;
  110. { -------------------------------------------------------------------------- }
  111. { Splitter types }
  112. { -------------------------------------------------------------------------- }
  113. const
  114. {
  115. * Draw the splitter with its normal appearance.
  116. }
  117. kHIThemeSplitterAdornmentNone = 0;
  118. {
  119. * Draw the splitter with its metal appearance.
  120. }
  121. kHIThemeSplitterAdornmentMetal = 1;
  122. type
  123. HIThemeSplitterAdornment = UInt32;
  124. { -------------------------------------------------------------------------- }
  125. { Window Grow Box }
  126. { -------------------------------------------------------------------------- }
  127. const
  128. {
  129. * The grow box corner for a window that has no scroll bars.
  130. }
  131. kHIThemeGrowBoxKindNormal = 0;
  132. {
  133. * The grow box corner for a window that has no grow box. This sounds
  134. * paradoxical, but this type of grow box, formerly known as the
  135. * "NoGrowBox" is used to fill in the corner left blank by the
  136. * intersection of a horizontal and a vertical scroll bar.
  137. }
  138. kHIThemeGrowBoxKindNone = 1;
  139. type
  140. HIThemeGrowBoxKind = UInt32;
  141. const
  142. {
  143. * Draw the grow box for normal windows.
  144. }
  145. kHIThemeGrowBoxSizeNormal = 0;
  146. {
  147. * Draw the smaller grow box for utility or floating windows.
  148. }
  149. kHIThemeGrowBoxSizeSmall = 1;
  150. type
  151. HIThemeGrowBoxSize = UInt32;
  152. const
  153. {
  154. * The group box is drawn with the primary variant.
  155. }
  156. kHIThemeGroupBoxKindPrimary = 0;
  157. {
  158. * The group box is drawn with the secondary variant.
  159. }
  160. kHIThemeGroupBoxKindSecondary = 1;
  161. {
  162. * The group box is drawn with the primary variant. This group box
  163. * draws opaque. This does not match the Mac OS X 10.3 appearance
  164. * 100%, as the boxes should be transparent, but draws this way for
  165. * the sake of compatibility. Please update to use the newer
  166. * transparent variant.
  167. }
  168. kHIThemeGroupBoxKindPrimaryOpaque = 3;
  169. {
  170. * The group box is drawn with the secondary variant. This group box
  171. * draws opaque. This does not match the Mac OS X 10.3 appearance
  172. * 100%, as the boxes should be transparent, but draws this way for
  173. * the sake of compatibility. Please update to use the newer
  174. * transparent variant.
  175. }
  176. kHIThemeGroupBoxKindSecondaryOpaque = 4;
  177. type
  178. HIThemeGroupBoxKind = UInt32;
  179. const
  180. {
  181. * A header drawn above window content that has no top border of its
  182. * own. (i.e. the same as the status bar in an icon view Finder
  183. * window).
  184. }
  185. kHIThemeHeaderKindWindow = 0;
  186. {
  187. * A header drawn above window content that has a top border of its
  188. * own. (i.e. the same as the status bar in an list view Finder
  189. * window).
  190. }
  191. kHIThemeHeaderKindList = 1;
  192. type
  193. HIThemeHeaderKind = UInt32;
  194. const
  195. {
  196. * The default sized square text field (like Edit Text).
  197. }
  198. kHIThemeFrameTextFieldSquare = 0;
  199. kHIThemeFrameListBox = 1;
  200. type
  201. HIThemeFrameKind = UInt32;
  202. const
  203. {
  204. * Indicates that a menu title should be drawn in a condensed
  205. * appearance. This constant is used in the
  206. * HIThemeMenuTitleDrawInfo.attributes field.
  207. }
  208. kHIThemeMenuTitleDrawCondensed = 1 shl 0;
  209. { -------------------------------------------------------------------------- }
  210. { DrawInfo }
  211. { -------------------------------------------------------------------------- }
  212. {
  213. * HIScrollBarTrackInfo
  214. *
  215. * Summary:
  216. * Drawing parameters passed to scroll bar drawing and measuring
  217. * theme APIs.
  218. *
  219. * Discussion:
  220. * New in Mac OS X 10.3.
  221. }
  222. type
  223. HIScrollBarTrackInfo = record
  224. {
  225. * The version of this data structure. Currently, it is always 0.
  226. }
  227. version: UInt32;
  228. {
  229. * The ThemeTrackEnableState for the scroll bar to be drawn.
  230. }
  231. enableState: SInt8 {ThemeTrackEnableState};
  232. {
  233. * The ThemeTrackPressState for the scroll bar to be drawn.
  234. }
  235. pressState: SInt8 {ThemeTrackPressState};
  236. {
  237. * The view range size.
  238. }
  239. viewsize: Float32;
  240. end;
  241. HIScrollBarTrackInfoPtr = ^HIScrollBarTrackInfo;
  242. {
  243. * HIThemeTrackDrawInfo
  244. *
  245. * Summary:
  246. * Drawing parameters passed to track drawing and measuring theme
  247. * APIs.
  248. *
  249. * Discussion:
  250. * New in Mac OS X 10.3, but based on legacy TrackDrawInfo.
  251. }
  252. type
  253. HIThemeTrackDrawInfo = record
  254. {
  255. * The version of this data structure. Currently, it is always 0.
  256. }
  257. version: UInt32; { current version is 0 }
  258. {
  259. * The ThemeTrackKind of the track being drawn or measured.
  260. }
  261. kind: ThemeTrackKind; { what kind of track this info is for }
  262. {
  263. * An HIRect describing the bounds of the track being drawn or
  264. * measured.
  265. }
  266. bounds: HIRect; { track basis rectangle }
  267. {
  268. * The minimum allowable value for the track being drawn or measured.
  269. }
  270. min: SInt32; { min track value }
  271. {
  272. * The maximum allowable value for the track being drawn or measured.
  273. }
  274. max: SInt32; { max track value }
  275. {
  276. * The value for the track being drawn or measured.
  277. }
  278. value: SInt32; { current thumb value }
  279. {
  280. * Leave this reserved field set to 0.
  281. }
  282. reserved: UInt32;
  283. {
  284. * A set of ThemeTrackAttributes for the track to be drawn or
  285. * measured.
  286. }
  287. attributes: ThemeTrackAttributes; { various track attributes }
  288. {
  289. * A ThemeTrackEnableState describing the state of the track to be
  290. * drawn or measured.
  291. }
  292. enableState: SInt8 {ThemeTrackEnableState}; { enable state }
  293. {
  294. * Leave this reserved field set to 0.
  295. }
  296. filler1: SInt8;
  297. case SInt16 of
  298. 0: (
  299. scrollbar: ScrollBarTrackInfo;
  300. );
  301. 1: (
  302. slider: SliderTrackInfo;
  303. );
  304. 2: (
  305. progress: ProgressTrackInfo;
  306. );
  307. end;
  308. HIThemeTrackDrawInfoPtr = ^HIThemeTrackDrawInfo;
  309. {
  310. * HIThemeAnimationTimeInfo
  311. *
  312. * Summary:
  313. * Time parameters passed to button drawing and measuring theme APIs.
  314. *
  315. * Discussion:
  316. * New in Mac OS X 10.3.
  317. }
  318. type
  319. HIThemeAnimationTimeInfo = record
  320. {
  321. * The CFAbsoluteTime of the beginning of the animation of the
  322. * button. This only applies to buttons that animate -- currently
  323. * only kThemePushButton. All other buttons will ignore this field.
  324. * If there is to be no animation, set this field to 0.
  325. }
  326. start: CFAbsoluteTime;
  327. {
  328. * The CFAbsoluteTime of the current animation frame of the button.
  329. * This only applies to buttons that animate -- currently only
  330. * kThemePushButton. All other buttons will ignore this field. If
  331. * there is to be no animation, set this field to 0.
  332. }
  333. current: CFAbsoluteTime;
  334. end;
  335. HIThemeAnimationTimeInfoPtr = ^HIThemeAnimationTimeInfo;
  336. {
  337. * HIThemeAnimationFrameInfo
  338. *
  339. * Summary:
  340. * Frame parameters passed to button drawing and measuring theme
  341. * APIs.
  342. *
  343. * Discussion:
  344. * New in Mac OS X 10.3.
  345. }
  346. type
  347. HIThemeAnimationFrameInfo = record
  348. {
  349. * The index of the frame of the animation to draw. If the index is
  350. * greater that the maximum number of animation frames, it will be
  351. * modded to calculate which frame to draw.
  352. }
  353. index: UInt32;
  354. end;
  355. HIThemeAnimationFrameInfoPtr = ^HIThemeAnimationFrameInfo;
  356. {
  357. * HIThemeButtonDrawInfo
  358. *
  359. * Summary:
  360. * Drawing parameters passed to button drawing and measuring theme
  361. * APIs.
  362. *
  363. * Discussion:
  364. * New in Mac OS X 10.3.
  365. }
  366. type
  367. HIThemeButtonDrawInfo = record
  368. {
  369. * The version of this data structure. Currently, it is always 0.
  370. }
  371. version: UInt32;
  372. {
  373. * The ThemeDrawState of the button being drawn or measured.
  374. }
  375. state: ThemeDrawState;
  376. {
  377. * A ThemeButtonKind indicating the type of button to be drawn.
  378. }
  379. kind: ThemeButtonKind;
  380. {
  381. * The ThemeButtonValue of the button being drawn or measured.
  382. }
  383. value: ThemeButtonValue;
  384. {
  385. * The ThemeButtonAdornment(s) with which the button is being drawn
  386. * or measured.
  387. }
  388. adornment: ThemeButtonAdornment;
  389. case SInt16 of
  390. 0: (
  391. time: HIThemeAnimationTimeInfo;
  392. );
  393. 1: (
  394. frame: HIThemeAnimationFrameInfo;
  395. );
  396. end;
  397. HIThemeButtonDrawInfoPtr = ^HIThemeButtonDrawInfo;
  398. {
  399. * HIThemeSplitterDrawInfo
  400. *
  401. * Summary:
  402. * Drawing parameters passed to splitter drawing and measuring theme
  403. * APIs.
  404. *
  405. * Discussion:
  406. * New in Mac OS X 10.3.
  407. }
  408. type
  409. HIThemeSplitterDrawInfo = record
  410. {
  411. * The version of this data structure. Currently, it is always 0.
  412. }
  413. version: UInt32;
  414. {
  415. * The ThemeDrawState of the splitter being drawn or measured.
  416. }
  417. state: ThemeDrawState;
  418. {
  419. * The HIThemeSplitterAdornments of the splitter being drawn or
  420. * measured.
  421. }
  422. adornment: HIThemeSplitterAdornment;
  423. end;
  424. HIThemeSplitterDrawInfoPtr = ^HIThemeSplitterDrawInfo;
  425. const
  426. {
  427. * No tab adornments are to be drawn.
  428. }
  429. kHIThemeTabAdornmentNone = 0;
  430. {
  431. * A focus ring is to be drawn around the tab.
  432. }
  433. kHIThemeTabAdornmentFocus = 1 shl 2; { to match button focus adornment }
  434. {
  435. * If available, a leading separator is to be drawn on the tab,
  436. * either to the left or above, depending on orientation. Note that
  437. * tabs overlap and if the separators are drawn over top each other,
  438. * the shadows multiply undesirably. New in Mac OS X 10.4.
  439. }
  440. kHIThemeTabAdornmentLeadingSeparator = 1 shl 3;
  441. {
  442. * If available, a right separator is to be drawn on the tab, either
  443. * to the right or below, depending on the orientation. Note that
  444. * tabs overlap and if the separators are drawn over top each other,
  445. * the shadows multiply undesirably. New in Mac OS X 10.4.
  446. }
  447. kHIThemeTabAdornmentTrailingSeparator = 1 shl 4;
  448. type
  449. HIThemeTabAdornment = UInt32;
  450. {
  451. * Summary:
  452. * These values are similar to kControlSize constants for
  453. * convenience.
  454. }
  455. const
  456. {
  457. * The tabs are normal (large) sized.
  458. }
  459. kHIThemeTabSizeNormal = 0;
  460. {
  461. * The tabs are drawn as the small variant.
  462. }
  463. kHIThemeTabSizeSmall = 1;
  464. {
  465. * The tabs are drawn as the mini variant.
  466. }
  467. kHIThemeTabSizeMini = 3;
  468. type
  469. HIThemeTabSize = UInt32;
  470. {
  471. * Summary:
  472. * Available values for HIThemeTabPosition. These are positions of
  473. * the tabs within the tab control. New in Mac OS X 10.4.
  474. }
  475. const
  476. {
  477. * The first position of a tab control. Left or top tab.
  478. }
  479. kHIThemeTabPositionFirst = 0;
  480. {
  481. * A middle tab.
  482. }
  483. kHIThemeTabPositionMiddle = 1;
  484. {
  485. * The last position of a tab control. Right or bottom tab.
  486. }
  487. kHIThemeTabPositionLast = 2;
  488. {
  489. * The only position of a tab control. It is simultaneously first and
  490. * last. You know, only. There is only one tab. It looks pretty much
  491. * like a button. Please don't use this if you can avoid it. It's
  492. * ugly.
  493. }
  494. kHIThemeTabPositionOnly = 3;
  495. type
  496. HIThemeTabPosition = UInt32;
  497. {
  498. * Summary:
  499. * Available values for HIThemeTabKind.
  500. }
  501. const
  502. kHIThemeTabKindNormal = 0;
  503. type
  504. HIThemeTabKind = UInt32;
  505. {
  506. * HIThemeTabDrawInfo
  507. *
  508. * Summary:
  509. * Drawing parameters passed to tab drawing and measuring theme APIs.
  510. *
  511. * Discussion:
  512. * In Mac OS X 10.4, added kind and position fields.
  513. }
  514. type
  515. HIThemeTabDrawInfo = record
  516. {
  517. * The version of this data structure. Currently, it is always 1.
  518. }
  519. version: UInt32;
  520. {
  521. * A ThemeTabStyle describing the style of the tab to be drawn.
  522. }
  523. style: ThemeTabStyle;
  524. {
  525. * A ThemeTabDirection describing the side on which the tab is being
  526. * drawn.
  527. }
  528. direction: ThemeTabDirection;
  529. {
  530. * An HIThemeTabSize indicating what size of tab to draw.
  531. }
  532. size: HIThemeTabSize;
  533. {
  534. * An HIThemeTabAdornment describing any additional adornments that
  535. * are to be drawn on the tab.
  536. }
  537. adornment: HIThemeTabAdornment; { various tab attributes }
  538. {
  539. * An HIThemeTabKind indicating what kind of tab to draw.
  540. }
  541. kind: HIThemeTabKind;
  542. {
  543. * The HIThemeTabPositions of the tab to be drawn or measured.
  544. }
  545. position: HIThemeTabPosition;
  546. end;
  547. HIThemeTabDrawInfoPtr = ^HIThemeTabDrawInfo;
  548. {
  549. * HIThemeTabDrawInfoVersionZero
  550. *
  551. * Summary:
  552. * This structure is left here as a reference to the previous
  553. * version of the tab drawing parameters. Please use the current
  554. * version.
  555. *
  556. * Discussion:
  557. * Shipped with Mac OS X 10.3.
  558. }
  559. type
  560. HIThemeTabDrawInfoVersionZero = record
  561. version: UInt32;
  562. style: ThemeTabStyle;
  563. direction: ThemeTabDirection;
  564. size: HIThemeTabSize;
  565. adornment: HIThemeTabAdornment; { various tab attributes }
  566. end;
  567. {
  568. * Summary:
  569. * Values for HIThemeTabPaneAdornment.
  570. }
  571. const
  572. kHIThemeTabPaneAdornmentNormal = 0;
  573. type
  574. HIThemeTabPaneAdornment = UInt32;
  575. {
  576. * HIThemeTabPaneDrawInfo
  577. *
  578. * Summary:
  579. * Drawing parameters passed to tab pane drawing and measuring theme
  580. * APIs.
  581. *
  582. * Discussion:
  583. * In Mac OS X 10.4, added kind and adornment fields.
  584. }
  585. type
  586. HIThemeTabPaneDrawInfo = record
  587. {
  588. * The version of this data structure. Currently, it is always 0.
  589. }
  590. version: UInt32;
  591. {
  592. * The ThemeDrawState for the tab pane to be drawn.
  593. }
  594. state: ThemeDrawState;
  595. {
  596. * A ThemeTabDirection describing on which side of the pane the tabs
  597. * will be drawn.
  598. }
  599. direction: ThemeTabDirection;
  600. {
  601. * An HIThemeTabSize indicating what size of tab pane to draw.
  602. }
  603. size: HIThemeTabSize;
  604. {
  605. * An HIThemeTabKind indicating what kind of tab to draw this pane
  606. * for.
  607. }
  608. kind: HIThemeTabKind;
  609. {
  610. * An HIThemeTabPaneAdornment describing any additional adornments
  611. * that are to be drawn on the tab pane.
  612. }
  613. adornment: HIThemeTabPaneAdornment;
  614. end;
  615. {
  616. * HIThemeTabPaneDrawInfoVersionZero
  617. *
  618. * Summary:
  619. * This structure is left here as a reference to the previous
  620. * version of the tab pane drawing parameters. Please use the
  621. * current version.
  622. *
  623. * Discussion:
  624. * Shipped with Mac OS X 10.3.
  625. }
  626. type
  627. HIThemeTabPaneDrawInfoVersionZero = record
  628. version: UInt32;
  629. state: ThemeDrawState;
  630. direction: ThemeTabDirection;
  631. size: HIThemeTabSize;
  632. end;
  633. {
  634. * HIThemeMenuDrawInfo
  635. *
  636. * Summary:
  637. * Drawing parameters passed to menu drawing and measuring theme
  638. * APIs.
  639. *
  640. * Discussion:
  641. * New in Mac OS X 10.3.
  642. }
  643. type
  644. HIThemeMenuDrawInfo = record
  645. {
  646. * The version of this data structure. Currently, it is always 0.
  647. }
  648. version: UInt32;
  649. {
  650. * A ThemeMenuType indicating which type of menu is to be drawn.
  651. }
  652. menuType: ThemeMenuType;
  653. end;
  654. HIThemeMenuDrawInfoPtr = ^HIThemeMenuDrawInfo;
  655. {
  656. * HIThemeMenuItemDrawInfo
  657. *
  658. * Summary:
  659. * Drawing parameters passed to menu item drawing and measuring
  660. * theme APIs.
  661. *
  662. * Discussion:
  663. * New in Mac OS X 10.3.
  664. }
  665. type
  666. HIThemeMenuItemDrawInfo = record
  667. {
  668. * The version of this data structure. Currently, it is always 0.
  669. }
  670. version: UInt32;
  671. {
  672. * A ThemeMenuItemType indicating what type of menu item is to be
  673. * drawn.
  674. }
  675. itemType: ThemeMenuItemType;
  676. {
  677. * The ThemeMenuState of the menu item to be drawn.
  678. }
  679. state: ThemeMenuState;
  680. end;
  681. HIThemeMenuItemDrawInfoPtr = ^HIThemeMenuItemDrawInfo;
  682. {
  683. * HIThemeFrameDrawInfo
  684. *
  685. * Summary:
  686. * Drawing parameters passed to frame drawing and measuring theme
  687. * APIs.
  688. *
  689. * Discussion:
  690. * New in Mac OS X 10.3.
  691. }
  692. type
  693. HIThemeFrameDrawInfo = record
  694. {
  695. * The version of this data structure. Currently, it is always 0.
  696. }
  697. version: UInt32;
  698. {
  699. * The HIThemeFrameKind of the frame to be drawn.
  700. }
  701. kind: HIThemeFrameKind;
  702. {
  703. * The ThemeDrawState of the frame to be drawn.
  704. }
  705. state: ThemeDrawState;
  706. {
  707. * A Boolean indicating whether the frame is to be drawn with focus
  708. * or without.
  709. }
  710. isFocused: Boolean;
  711. end;
  712. HIThemeFrameDrawInfoPtr = ^HIThemeFrameDrawInfo;
  713. {
  714. * HIThemeGroupBoxDrawInfo
  715. *
  716. * Summary:
  717. * Drawing parameters passed to group box drawing and measuring
  718. * theme APIs.
  719. *
  720. * Discussion:
  721. * New in Mac OS X 10.3.
  722. }
  723. type
  724. HIThemeGroupBoxDrawInfo = record
  725. {
  726. * The version of this data structure. Currently, it is always 0.
  727. }
  728. version: UInt32;
  729. {
  730. * The ThemeDrawState for the group box to be drawn.
  731. }
  732. state: ThemeDrawState;
  733. {
  734. * An HIThemeGroupBoxKind indicating which type of group box is to be
  735. * drawn.
  736. }
  737. kind: HIThemeGroupBoxKind;
  738. end;
  739. HIThemeGroupBoxDrawInfoPtr = ^HIThemeGroupBoxDrawInfo;
  740. {
  741. * HIThemeGrabberDrawInfo
  742. *
  743. * Summary:
  744. * Drawing parameters passed to grabber drawing and measuring theme
  745. * APIs.
  746. *
  747. * Discussion:
  748. * New in Mac OS X 10.3.
  749. }
  750. type
  751. HIThemeGrabberDrawInfo = record
  752. {
  753. * The version of this data structure. Currently, it is always 0.
  754. }
  755. version: UInt32;
  756. {
  757. * The ThemeDrawState for the grabber to be drawn.
  758. }
  759. state: ThemeDrawState;
  760. end;
  761. HIThemeGrabberDrawInfoPtr = ^HIThemeGrabberDrawInfo;
  762. {
  763. * HIThemePlacardDrawInfo
  764. *
  765. * Summary:
  766. * Drawing parameters passed to placard drawing and measuring theme
  767. * APIs.
  768. *
  769. * Discussion:
  770. * New in Mac OS X 10.3.
  771. }
  772. type
  773. HIThemePlacardDrawInfo = record
  774. {
  775. * The version of this data structure. Currently, it is always 0.
  776. }
  777. version: UInt32;
  778. {
  779. * The ThemeDrawState for the placard to be drawn.
  780. }
  781. state: ThemeDrawState;
  782. end;
  783. HIThemePlacardDrawInfoPtr = ^HIThemePlacardDrawInfo;
  784. {
  785. * HIThemeHeaderDrawInfo
  786. *
  787. * Summary:
  788. * Drawing parameters passed to header drawing and measuring theme
  789. * APIs.
  790. *
  791. * Discussion:
  792. * New in Mac OS X 10.3.
  793. }
  794. type
  795. HIThemeHeaderDrawInfo = record
  796. {
  797. * The version of this data structure. Currently, it is always 0.
  798. }
  799. version: UInt32;
  800. {
  801. * The ThemeDrawState for the header to be drawn.
  802. }
  803. state: ThemeDrawState;
  804. {
  805. * The HIThemeHeaderKind for the header to be drawn.
  806. }
  807. kind: HIThemeHeaderKind;
  808. end;
  809. HIThemeHeaderDrawInfoPtr = ^HIThemeHeaderDrawInfo;
  810. {
  811. * HIThemeMenuBarDrawInfo
  812. *
  813. * Summary:
  814. * Drawing parameters passed to HIThemeDrawMenuBarBackground.
  815. *
  816. * Discussion:
  817. * New in Mac OS X 10.3.
  818. }
  819. type
  820. HIThemeMenuBarDrawInfo = record
  821. {
  822. * The version of this data structure. Currently, it is always 0.
  823. }
  824. version: UInt32;
  825. {
  826. * The ThemeMenuBarState for the menu bar to be drawn.
  827. }
  828. state: ThemeMenuBarState;
  829. {
  830. * The attributes of the menu bar to be drawn.
  831. }
  832. attributes: UInt32;
  833. end;
  834. HIThemeMenuBarDrawInfoPtr = ^HIThemeMenuBarDrawInfo;
  835. {
  836. * HIThemeMenuTitleDrawInfo
  837. *
  838. * Summary:
  839. * Drawing parameters passed to HIThemeDrawMenuTitle.
  840. *
  841. * Discussion:
  842. * New in Mac OS X 10.3.
  843. }
  844. type
  845. HIThemeMenuTitleDrawInfo = record
  846. {
  847. * The version of this data structure. Currently, it is always 0.
  848. }
  849. version: UInt32;
  850. {
  851. * The ThemeMenuState for the menu title to be drawn.
  852. }
  853. state: ThemeMenuState;
  854. {
  855. * The attributes of the menu title to be drawn. Must be either 0 or
  856. * kHIThemeMenuTitleDrawCondensed.
  857. }
  858. attributes: UInt32;
  859. {
  860. * The border space between the menu title rect and the menu title
  861. * text when the menu title spacing is being condensed. This field is
  862. * only observed by the Appearance Manager when the attributes field
  863. * contains kHIThemeMenuTitleDrawCondensed. The valid values for this
  864. * field range from the value returned by GetThemeMenuTitleExtra(
  865. * &extra, false ) to the value returned by GetThemeMenuTitleExtra(
  866. * &extra, true ). You may pass 0 in this field to use the minimum
  867. * condensed title extra.
  868. }
  869. condensedTitleExtra: Float32;
  870. end;
  871. HIThemeMenuTitleDrawInfoPtr = ^HIThemeMenuTitleDrawInfo;
  872. {
  873. * HIThemeTickMarkDrawInfo
  874. *
  875. * Summary:
  876. * Drawing parameters passed to tick mark drawing and measuring
  877. * theme APIs.
  878. *
  879. * Discussion:
  880. * New in Mac OS X 10.3.
  881. }
  882. type
  883. HIThemeTickMarkDrawInfo = record
  884. {
  885. * The version of this data structure. Currently, it is always 0.
  886. }
  887. version: UInt32;
  888. {
  889. * The ThemeDrawState for the tick mark to be drawn.
  890. }
  891. state: ThemeDrawState;
  892. end;
  893. HIThemeTickMarkDrawInfoPtr = ^HIThemeTickMarkDrawInfo;
  894. {
  895. * HIThemeWindowDrawInfo
  896. *
  897. * Summary:
  898. * Drawing parameters passed to window drawing and measuring theme
  899. * APIs.
  900. *
  901. * Discussion:
  902. * New in Mac OS X 10.3, but based on legacy ThemeWindowMetrics.
  903. }
  904. type
  905. HIThemeWindowDrawInfo = record
  906. {
  907. * The version of this data structure. Currently, it is always 0.
  908. }
  909. version: UInt32;
  910. {
  911. * A ThemeDrawState which describes the state of the window to be
  912. * drawn.
  913. }
  914. state: ThemeDrawState;
  915. {
  916. * A ThemeWindowType specifying the type of window to be drawn.
  917. }
  918. windowType: ThemeWindowType;
  919. {
  920. * The ThemeWindowAttributes describing the window to be drawn.
  921. }
  922. attributes: ThemeWindowAttributes;
  923. {
  924. * The height of the title of the window.
  925. }
  926. titleHeight: Float32;
  927. {
  928. * The width of the title of the window.
  929. }
  930. titleWidth: Float32;
  931. end;
  932. HIThemeWindowDrawInfoPtr = ^HIThemeWindowDrawInfo;
  933. {
  934. * HIThemeWindowWidgetDrawInfo
  935. *
  936. * Summary:
  937. * Drawing parameters passed to window widget drawing and measuring
  938. * theme APIs.
  939. *
  940. * Discussion:
  941. * New in Mac OS X 10.3, but based on legacy ThemeWindowMetrics.
  942. }
  943. type
  944. HIThemeWindowWidgetDrawInfo = record
  945. {
  946. * The version of this data structure. Currently, it is always 0.
  947. }
  948. version: UInt32;
  949. {
  950. * A ThemeDrawState which describes the state of the widget to be
  951. * drawn.
  952. }
  953. widgetState: ThemeDrawState;
  954. {
  955. * A ThemeTitleBarWidget specifying the type of window widget to be
  956. * drawn.
  957. }
  958. widgetType: ThemeTitleBarWidget;
  959. {
  960. * A ThemeDrawState which describes the state of the window for which
  961. * the widget is to be drawn.
  962. }
  963. windowState: ThemeDrawState;
  964. {
  965. * A ThemeWindowType specifying the type of window to be drawn.
  966. }
  967. windowType: ThemeWindowType;
  968. {
  969. * The ThemeWindowAttributes describing the window to be drawn.
  970. }
  971. attributes: ThemeWindowAttributes;
  972. {
  973. * The height of the title of the window.
  974. }
  975. titleHeight: Float32;
  976. {
  977. * The width of the title of the window.
  978. }
  979. titleWidth: Float32;
  980. end;
  981. HIThemeWindowWidgetDrawInfoPtr = ^HIThemeWindowWidgetDrawInfo;
  982. {
  983. * HIThemeSeparatorDrawInfo
  984. *
  985. * Summary:
  986. * Drawing parameters passed to separator drawing and measuring
  987. * theme APIs.
  988. *
  989. * Discussion:
  990. * New in Mac OS X 10.3.
  991. }
  992. type
  993. HIThemeSeparatorDrawInfo = record
  994. {
  995. * The version of this data structure. Currently, it is always 0.
  996. }
  997. version: UInt32;
  998. {
  999. * The ThemeDrawState for the separator to be drawn.
  1000. }
  1001. state: ThemeDrawState;
  1002. end;
  1003. HIThemeSeparatorDrawInfoPtr = ^HIThemeSeparatorDrawInfo;
  1004. {
  1005. * HIThemeScrollBarDelimitersDrawInfo
  1006. *
  1007. * Summary:
  1008. * Drawing parameters passed to separator drawing and measuring
  1009. * theme APIs.
  1010. *
  1011. * Discussion:
  1012. * New in Mac OS X 10.3.
  1013. }
  1014. type
  1015. HIThemeScrollBarDelimitersDrawInfo = record
  1016. {
  1017. * The version of this data structure. Currently, it is always 0.
  1018. }
  1019. version: UInt32;
  1020. {
  1021. * The ThemeDrawState for the separator to be drawn.
  1022. }
  1023. state: ThemeDrawState;
  1024. {
  1025. * A ThemeWindowType specifying the type of window for which to draw
  1026. * the delimiters.
  1027. }
  1028. windowType: ThemeWindowType;
  1029. {
  1030. * The ThemeWindowAttributes of the window for which the scroll bar
  1031. * delimters are to be drawn.
  1032. }
  1033. attributes: ThemeWindowAttributes;
  1034. end;
  1035. HIThemeScrollBarDelimitersDrawInfoPtr = ^HIThemeScrollBarDelimitersDrawInfo;
  1036. {
  1037. * HIThemeChasingArrowsDrawInfo
  1038. *
  1039. * Summary:
  1040. * Drawing parameters passed to chasing arrows drawing and measuring
  1041. * theme APIs.
  1042. *
  1043. * Discussion:
  1044. * New in Mac OS X 10.3.
  1045. }
  1046. type
  1047. HIThemeChasingArrowsDrawInfo = record
  1048. {
  1049. * The version of this data structure. Currently, it is always 0.
  1050. }
  1051. version: UInt32;
  1052. {
  1053. * The ThemeDrawState for the chasing arrows to be drawn.
  1054. }
  1055. state: ThemeDrawState;
  1056. {
  1057. * A UInt32 used to calculate which frame of the chasing arrow
  1058. * animation is to be drawn.
  1059. }
  1060. index: UInt32;
  1061. end;
  1062. HIThemeChasingArrowsDrawInfoPtr = ^HIThemeChasingArrowsDrawInfo;
  1063. {
  1064. * HIThemePopupArrowDrawInfo
  1065. *
  1066. * Summary:
  1067. * Drawing parameters passed to popup arrow drawing and measuring
  1068. * theme APIs.
  1069. *
  1070. * Discussion:
  1071. * New in Mac OS X 10.3.
  1072. }
  1073. type
  1074. HIThemePopupArrowDrawInfo = record
  1075. {
  1076. * The version of this data structure. Currently, it is always 0.
  1077. }
  1078. version: UInt32;
  1079. {
  1080. * The ThemeDrawState for the popup arrow to be drawn.
  1081. }
  1082. state: ThemeDrawState;
  1083. {
  1084. * A ThemeArrowOrientation for the orientation of the popup arrow to
  1085. * be drawn.
  1086. }
  1087. orientation: ThemeArrowOrientation;
  1088. {
  1089. * A ThemePopupArrowSize for the size of the popup arrow to be drawn.
  1090. }
  1091. size: ThemePopupArrowSize;
  1092. end;
  1093. HIThemePopupArrowDrawInfoPtr = ^HIThemePopupArrowDrawInfo;
  1094. {
  1095. * HIThemeGrowBoxDrawInfo
  1096. *
  1097. * Summary:
  1098. * Drawing parameters passed to grow box drawing and measuring theme
  1099. * APIs.
  1100. *
  1101. * Discussion:
  1102. * New in Mac OS X 10.3.
  1103. }
  1104. type
  1105. HIThemeGrowBoxDrawInfo = record
  1106. {
  1107. * The version of this data structure. Currently, it is always 0.
  1108. }
  1109. version: UInt32;
  1110. {
  1111. * The ThemeDrawState for the grow box to be drawn.
  1112. }
  1113. state: ThemeDrawState;
  1114. {
  1115. * A ThemeGrowBoxKind indicating in which kind of grow box to draw.
  1116. }
  1117. kind: HIThemeGrowBoxKind;
  1118. {
  1119. * A ThemeGrowDirection indicating in which direction the window will
  1120. * grow.
  1121. }
  1122. direction: ThemeGrowDirection;
  1123. {
  1124. * An HIThemeGrowBoxSize describing the size of the grow box to draw.
  1125. }
  1126. size: HIThemeGrowBoxSize;
  1127. end;
  1128. HIThemeGrowBoxDrawInfoPtr = ^HIThemeGrowBoxDrawInfo;
  1129. {
  1130. * HIThemeBackgroundDrawInfo
  1131. *
  1132. * Discussion:
  1133. * New in Mac OS X 10.3, but based on legacy TrackDrawInfo.
  1134. }
  1135. type
  1136. HIThemeBackgroundDrawInfo = record
  1137. {
  1138. * The version of this data structure. Currently, it is always 0.
  1139. }
  1140. version: UInt32;
  1141. {
  1142. * The ThemeDrawState of the background to be drawn. Currently,
  1143. * HIThemeDrawBackground backgrounds do not have state, so this field
  1144. * has no meaning. Set it to kThemeStateActive.
  1145. }
  1146. state: ThemeDrawState;
  1147. {
  1148. * The ThemeBackgroundKind with which to fill the background.
  1149. }
  1150. kind: ThemeBackgroundKind;
  1151. end;
  1152. HIThemeBackgroundDrawInfoPtr = ^HIThemeBackgroundDrawInfo;
  1153. { -------------------------------------------------------------------------- }
  1154. { Buttons }
  1155. { -------------------------------------------------------------------------- }
  1156. {
  1157. * HIThemeDrawButton()
  1158. *
  1159. * Summary:
  1160. * Draw a themed button.
  1161. *
  1162. * Discussion:
  1163. * This generic button drawing theme primitive draws not just a push
  1164. * button, but all of the kinds of buttons described by
  1165. * ThemeButtonKind.
  1166. *
  1167. * Mac OS X threading:
  1168. * Not thread safe
  1169. *
  1170. * Parameters:
  1171. *
  1172. * inBounds:
  1173. * The HIRect in which to draw. Note that this API may draw
  1174. * outside of its bounds.
  1175. *
  1176. * inDrawInfo:
  1177. * An HIThemeButtonDrawInfo describing the button that will be
  1178. * drawn.
  1179. *
  1180. * inContext:
  1181. * The CG context in which the drawing is to be done.
  1182. *
  1183. * inOrientation:
  1184. * An HIThemeOrientation that describes the orientation of the
  1185. * passed in context.
  1186. *
  1187. * outLabelRect:
  1188. * A pointer to an HIRect into which to put the bounds of the
  1189. * label rect.
  1190. *
  1191. * Availability:
  1192. * Mac OS X: in version 10.3 and later in Carbon.framework
  1193. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1194. * Non-Carbon CFM: not available
  1195. }
  1196. function HIThemeDrawButton( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeButtonDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation; outLabelRect: HIRectPtr { can be NULL } ): OSStatus; external name '_HIThemeDrawButton';
  1197. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1198. {
  1199. * HIThemeGetButtonShape()
  1200. *
  1201. * Summary:
  1202. * Get a shape of a themed button.
  1203. *
  1204. * Discussion:
  1205. * This API was mistakenly named as a "Get" API. It behaves as
  1206. * "Copy" API. THE CALLER IS RESPONSIBLE FOR RELEASING THE RETURNED
  1207. * SHAPE.
  1208. *
  1209. * Mac OS X threading:
  1210. * Not thread safe
  1211. *
  1212. * Parameters:
  1213. *
  1214. * inBounds:
  1215. * The HIRect in which to draw.
  1216. *
  1217. * inDrawInfo:
  1218. * An HIThemeButtonDrawInfo describing the button that will be
  1219. * drawn.
  1220. *
  1221. * outShape:
  1222. * A pointer to an HIShapeRef which will be set to the shape of
  1223. * the button. Needs to be released by caller.
  1224. *
  1225. * Availability:
  1226. * Mac OS X: in version 10.3 and later in Carbon.framework
  1227. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1228. * Non-Carbon CFM: not available
  1229. }
  1230. function HIThemeGetButtonShape( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeButtonDrawInfo; var outShape: HIShapeRef ): OSStatus; external name '_HIThemeGetButtonShape';
  1231. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1232. {
  1233. * HIThemeGetButtonContentBounds()
  1234. *
  1235. * Summary:
  1236. * Get the bounds of a themed button's content.
  1237. *
  1238. * Mac OS X threading:
  1239. * Not thread safe
  1240. *
  1241. * Parameters:
  1242. *
  1243. * inBounds:
  1244. * An HIRect indicating where the button is to be drawn.
  1245. *
  1246. * inDrawInfo:
  1247. * An HIThemeButtonDrawInfo describing the button that will be
  1248. * drawn.
  1249. *
  1250. * outBounds:
  1251. * A pointer to an HIRect in which will be returned the rectangle
  1252. * of the button content bounds.
  1253. *
  1254. * Availability:
  1255. * Mac OS X: in version 10.3 and later in Carbon.framework
  1256. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1257. * Non-Carbon CFM: not available
  1258. }
  1259. function HIThemeGetButtonContentBounds( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeButtonDrawInfo; var outBounds: HIRect ): OSStatus; external name '_HIThemeGetButtonContentBounds';
  1260. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1261. {
  1262. * HIThemeGetButtonBackgroundBounds()
  1263. *
  1264. * Summary:
  1265. * Get the bounds of the background of a themed button.
  1266. *
  1267. * Mac OS X threading:
  1268. * Not thread safe
  1269. *
  1270. * Parameters:
  1271. *
  1272. * inBounds:
  1273. * An HIRect indicating where the button is to be drawn.
  1274. *
  1275. * inDrawInfo:
  1276. * An HIThemeButtonDrawInfo describing the button that will be
  1277. * drawn.
  1278. *
  1279. * outBounds:
  1280. * A pointer to an HIRect in which will be returned the rectangle
  1281. * of the button background bounds.
  1282. *
  1283. * Availability:
  1284. * Mac OS X: in version 10.3 and later in Carbon.framework
  1285. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1286. * Non-Carbon CFM: not available
  1287. }
  1288. function HIThemeGetButtonBackgroundBounds( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeButtonDrawInfo; var outBounds: HIRect ): OSStatus; external name '_HIThemeGetButtonBackgroundBounds';
  1289. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1290. {
  1291. * HIThemeDrawChasingArrows()
  1292. *
  1293. * Summary:
  1294. * Draw themed chasing arrows.
  1295. *
  1296. * Discussion:
  1297. * Draw a frame from the chasing arrows animation. The animation
  1298. * frame is based on a modulo value calculated from the index.
  1299. *
  1300. * Mac OS X threading:
  1301. * Not thread safe
  1302. *
  1303. * Parameters:
  1304. *
  1305. * inBounds:
  1306. * An HIRect indicating where the chasing arrows are to be drawn.
  1307. *
  1308. * inDrawInfo:
  1309. * An HIThemeChasingArrowsDrawInfo describing the chasing arrows
  1310. * to be drawn or measured.
  1311. *
  1312. * inContext:
  1313. * The CG context in which the drawing is to be done.
  1314. *
  1315. * inOrientation:
  1316. * An HIThemeOrientation that describes the orientation of the
  1317. * passed in context.
  1318. *
  1319. * Availability:
  1320. * Mac OS X: in version 10.3 and later in Carbon.framework
  1321. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1322. * Non-Carbon CFM: not available
  1323. }
  1324. function HIThemeDrawChasingArrows( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeChasingArrowsDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawChasingArrows';
  1325. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1326. {
  1327. * HIThemeDrawPopupArrow()
  1328. *
  1329. * Summary:
  1330. * Draws a themed popup arrow.
  1331. *
  1332. * Mac OS X threading:
  1333. * Not thread safe
  1334. *
  1335. * Parameters:
  1336. *
  1337. * inBounds:
  1338. * The HIRect in which to draw.
  1339. *
  1340. * inDrawInfo:
  1341. * An HIThemePopupArrowDrawInfo describing the popup arrow to be
  1342. * drawn or measured.
  1343. *
  1344. * inContext:
  1345. * The CG context in which the drawing is to be done.
  1346. *
  1347. * inOrientation:
  1348. * An HIThemeOrientation that describes the orientation of the
  1349. * passed in context.
  1350. *
  1351. * Availability:
  1352. * Mac OS X: in version 10.3 and later in Carbon.framework
  1353. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1354. * Non-Carbon CFM: not available
  1355. }
  1356. function HIThemeDrawPopupArrow( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemePopupArrowDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawPopupArrow';
  1357. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1358. { -------------------------------------------------------------------------- }
  1359. { Menus }
  1360. { -------------------------------------------------------------------------- }
  1361. {
  1362. * HIThemeDrawMenuBarBackground()
  1363. *
  1364. * Summary:
  1365. * Draws the menu bar background for a given area.
  1366. *
  1367. * Mac OS X threading:
  1368. * Not thread safe
  1369. *
  1370. * Parameters:
  1371. *
  1372. * inBounds:
  1373. * The HIRect in which to draw.
  1374. *
  1375. * inDrawInfo:
  1376. * The HIThemeMenuBarDrawInfo of the menu bar to be drawn.
  1377. *
  1378. * inContext:
  1379. * The CG context in which the drawing is to be done.
  1380. *
  1381. * inOrientation:
  1382. * An HIThemeOrientation that describes the orientation of the
  1383. * passed in context.
  1384. *
  1385. * Availability:
  1386. * Mac OS X: in version 10.3 and later in Carbon.framework
  1387. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1388. * Non-Carbon CFM: not available
  1389. }
  1390. function HIThemeDrawMenuBarBackground( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeMenuBarDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawMenuBarBackground';
  1391. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1392. {
  1393. * HIThemeDrawMenuTitle()
  1394. *
  1395. * Summary:
  1396. * Draws the menu title background for a menu.
  1397. *
  1398. * Discussion:
  1399. * This API draws the background of a menu title. It does not draw
  1400. * the menu title text; it is the caller's responsibility to draw
  1401. * the text after this API has returned. The text should be drawn
  1402. * into the bounds returned in the outLabelRect parameter; the
  1403. * caller should ensure that the text is not drawn outside of those
  1404. * bounds, either by truncating or clipping the text.
  1405. *
  1406. * Mac OS X threading:
  1407. * Not thread safe
  1408. *
  1409. * Parameters:
  1410. *
  1411. * inMenuBarRect:
  1412. * An HIRect indicating the bounds of the whole menu bar for which
  1413. * the menu title is to be drawn.
  1414. *
  1415. * inTitleRect:
  1416. * An HIRect for the bounds of the menu title to be drawn.
  1417. *
  1418. * inDrawInfo:
  1419. * The HIThemeMenuTitleDrawInfo of the menu title to be drawn.
  1420. *
  1421. * inContext:
  1422. * The CG context in which the drawing is to be done.
  1423. *
  1424. * inOrientation:
  1425. * An HIThemeOrientation that describes the orientation of the
  1426. * passed in context.
  1427. *
  1428. * outLabelRect:
  1429. * On exit, contains the bounds in which the menu title text
  1430. * should be drawn. May be NULL if you don't need this information.
  1431. *
  1432. * Availability:
  1433. * Mac OS X: in version 10.3 and later in Carbon.framework
  1434. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1435. * Non-Carbon CFM: not available
  1436. }
  1437. function HIThemeDrawMenuTitle( const (*var*) inMenuBarRect: HIRect; const (*var*) inTitleRect: HIRect; const (*var*) inDrawInfo: HIThemeMenuTitleDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation; outLabelRect: HIRectPtr { can be NULL } ): OSStatus; external name '_HIThemeDrawMenuTitle';
  1438. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1439. {
  1440. * HIThemeDrawMenuBackground()
  1441. *
  1442. * Summary:
  1443. * Draws the theme menu background in a rectangle. This API may
  1444. * draw outside of the specified rectangle.
  1445. *
  1446. * Mac OS X threading:
  1447. * Not thread safe
  1448. *
  1449. * Parameters:
  1450. *
  1451. * inMenuRect:
  1452. * An HIRect indicating the bounds of the whole menu for which the
  1453. * background is to be drawn.
  1454. *
  1455. * inMenuDrawInfo:
  1456. * An HIThemeMenuDrawInfo describing the menu to be drawn.
  1457. *
  1458. * inContext:
  1459. * The CG context in which the drawing is to be done.
  1460. *
  1461. * inOrientation:
  1462. * An HIThemeOrientation that describes the orientation of the
  1463. * passed in context.
  1464. *
  1465. * Availability:
  1466. * Mac OS X: in version 10.3 and later in Carbon.framework
  1467. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1468. * Non-Carbon CFM: not available
  1469. }
  1470. function HIThemeDrawMenuBackground( const (*var*) inMenuRect: HIRect; const (*var*) inMenuDrawInfo: HIThemeMenuDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawMenuBackground';
  1471. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1472. {
  1473. * HIThemeDrawMenuItem()
  1474. *
  1475. * Summary:
  1476. * Draws a themed menu item.
  1477. *
  1478. * Mac OS X threading:
  1479. * Not thread safe
  1480. *
  1481. * Parameters:
  1482. *
  1483. * inMenuRect:
  1484. * An HIRect indicating the bounds of the whole menu for which the
  1485. * menu item is to be drawn.
  1486. *
  1487. * inItemRect:
  1488. * An HIRect for the bounds of the menu item to be drawn.
  1489. *
  1490. * inItemDrawInfo:
  1491. * An HIThemeMenuItemDrawInfo describing the drawing
  1492. * characteristics of the menu item to be drawn.
  1493. *
  1494. * inContext:
  1495. * The CG context in which the drawing is to be done.
  1496. *
  1497. * inOrientation:
  1498. * An HIThemeOrientation that describes the orientation of the
  1499. * passed in context.
  1500. *
  1501. * outContentRect:
  1502. * An HIRect that will be filled with the rectangle describing
  1503. * where the menu item content is to be drawn.
  1504. *
  1505. * Availability:
  1506. * Mac OS X: in version 10.3 and later in Carbon.framework
  1507. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1508. * Non-Carbon CFM: not available
  1509. }
  1510. function HIThemeDrawMenuItem( const (*var*) inMenuRect: HIRect; const (*var*) inItemRect: HIRect; const (*var*) inItemDrawInfo: HIThemeMenuItemDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation; var outContentRect: HIRect ): OSStatus; external name '_HIThemeDrawMenuItem';
  1511. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1512. {
  1513. * HIThemeDrawMenuSeparator()
  1514. *
  1515. * Summary:
  1516. * Draws a themed menu separator.
  1517. *
  1518. * Mac OS X threading:
  1519. * Not thread safe
  1520. *
  1521. * Parameters:
  1522. *
  1523. * inMenuRect:
  1524. * An HIRect indicating the bounds of the whole menu for which the
  1525. * menu separator is to be drawn.
  1526. *
  1527. * inItemRect:
  1528. * An HIRect for the bounds of the menu separator to be drawn.
  1529. *
  1530. * inItemDrawInfo:
  1531. * An HIThemeMenuItemDrawInfo describing the drawing
  1532. * characteristics of the menu item to be drawn.
  1533. *
  1534. * inContext:
  1535. * The CG context in which the drawing is to be done.
  1536. *
  1537. * inOrientation:
  1538. * An HIThemeOrientation that describes the orientation of the
  1539. * passed in context.
  1540. *
  1541. * Availability:
  1542. * Mac OS X: in version 10.3 and later in Carbon.framework
  1543. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1544. * Non-Carbon CFM: not available
  1545. }
  1546. function HIThemeDrawMenuSeparator( const (*var*) inMenuRect: HIRect; const (*var*) inItemRect: HIRect; const (*var*) inItemDrawInfo: HIThemeMenuItemDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawMenuSeparator';
  1547. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1548. {
  1549. * HIThemeGetMenuBackgroundShape()
  1550. *
  1551. * Summary:
  1552. * Gets the shape of the background for a themed menu.
  1553. *
  1554. * Discussion:
  1555. * This shape can extend outside of the bounds of the specified
  1556. * rectangle.
  1557. *
  1558. * Mac OS X threading:
  1559. * Not thread safe
  1560. *
  1561. * Parameters:
  1562. *
  1563. * inMenuRect:
  1564. * An HIRect indicating the bounds of the menu for which the menu
  1565. * background is to be drawn.
  1566. *
  1567. * inMenuDrawInfo:
  1568. * An HIThemeMenuDrawInfo describing the menu to be measured.
  1569. *
  1570. * outShape:
  1571. * A valid HIShape that will be cleared and filled with the shape
  1572. * of the menu background.
  1573. *
  1574. * Availability:
  1575. * Mac OS X: in version 10.3 and later in Carbon.framework
  1576. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1577. * Non-Carbon CFM: not available
  1578. }
  1579. function HIThemeGetMenuBackgroundShape( const (*var*) inMenuRect: HIRect; const (*var*) inMenuDrawInfo: HIThemeMenuDrawInfo; var outShape: HIShapeRef ): OSStatus; external name '_HIThemeGetMenuBackgroundShape';
  1580. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1581. { -------------------------------------------------------------------------- }
  1582. { Segments }
  1583. { -------------------------------------------------------------------------- }
  1584. {
  1585. * Summary:
  1586. * Available values for HIThemeSegmentPosition. These are positions
  1587. * of the segments within the segmented view.
  1588. }
  1589. const
  1590. {
  1591. * The first position of a segmented view.
  1592. }
  1593. kHIThemeSegmentPositionFirst = 0;
  1594. {
  1595. * A middle segment.
  1596. }
  1597. kHIThemeSegmentPositionMiddle = 1;
  1598. {
  1599. * The last position of a segmented view.
  1600. }
  1601. kHIThemeSegmentPositionLast = 2;
  1602. {
  1603. * The only position of a segmented view. It is simultaneously first
  1604. * and last. You know, only. There is only one segment. It looks
  1605. * pretty much like a button. Please don't use this if you can avoid
  1606. * it. It's ugly.
  1607. }
  1608. kHIThemeSegmentPositionOnly = 3;
  1609. type
  1610. HIThemeSegmentPosition = UInt32;
  1611. {
  1612. * Summary:
  1613. * Available values for HIThemeSegmentKind.
  1614. }
  1615. const
  1616. {
  1617. * The outset looking segment. Do not use on metal or metal-like
  1618. * windows.
  1619. }
  1620. kHIThemeSegmentKindNormal = 0;
  1621. {
  1622. * The inset segment. Use on metal or metal-like windows.
  1623. }
  1624. kHIThemeSegmentKindInset = 1;
  1625. type
  1626. HIThemeSegmentKind = UInt32;
  1627. {
  1628. * Summary:
  1629. * Available values for HIThemeSegmentSize.
  1630. }
  1631. const
  1632. {
  1633. * The normally sized segment.
  1634. }
  1635. kHIThemeSegmentSizeNormal = 0;
  1636. {
  1637. * The small segment. Not available with as inset.
  1638. }
  1639. kHIThemeSegmentSizeSmall = 1;
  1640. {
  1641. * The mini segment. Not available with as inset.
  1642. }
  1643. kHIThemeSegmentSizeMini = 3;
  1644. type
  1645. HIThemeSegmentSize = UInt32;
  1646. const
  1647. {
  1648. * No segment adornments are to be drawn.
  1649. }
  1650. kHIThemeSegmentAdornmentNone = 0;
  1651. {
  1652. * A focus ring is to be drawn around the segment.
  1653. }
  1654. kHIThemeSegmentAdornmentFocus = 1 shl 2; { to match button focus adornment }
  1655. {
  1656. * If available, a leading separator is to be drawn on the segment.
  1657. * Note that segments overlap and if the separators are drawn over
  1658. * top each other, the shadows multiply undesirably.
  1659. }
  1660. kHIThemeSegmentAdornmentLeadingSeparator = 1 shl 3;
  1661. {
  1662. * If available, a trailing separator is to be drawn on the segment.
  1663. * Note that segments overlap and if the separators are drawn over
  1664. * top each other, the shadows multiply undesirably.
  1665. }
  1666. kHIThemeSegmentAdornmentTrailingSeparator = 1 shl 4;
  1667. type
  1668. HIThemeSegmentAdornment = UInt32;
  1669. {
  1670. * HIThemeSegmentDrawInfo
  1671. *
  1672. * Summary:
  1673. * Drawing parameters passed to segment drawing and measuring theme
  1674. * APIs.
  1675. *
  1676. * Discussion:
  1677. * New in Mac OS X 10.4.
  1678. }
  1679. type
  1680. HIThemeSegmentDrawInfo = record
  1681. {
  1682. * The version of this data structure. Currently, it is always 0.
  1683. }
  1684. version: UInt32;
  1685. {
  1686. * The ThemeDrawState for the segment to be drawn or measured.
  1687. }
  1688. state: ThemeDrawState;
  1689. {
  1690. * The ThemeButtonValue of the segment to be drawn or measured.
  1691. }
  1692. value: ThemeButtonValue;
  1693. size: HIThemeSegmentSize;
  1694. {
  1695. * The HIThemeSegmentKind of the segment to be drawn or measured.
  1696. }
  1697. kind: HIThemeSegmentKind;
  1698. {
  1699. * The HIThemeSegmentPositions of the segment to be drawn or measured.
  1700. }
  1701. position: HIThemeSegmentPosition;
  1702. {
  1703. * The HIThemeSegmentAdornment of the segment to be drawn or measured.
  1704. }
  1705. adornment: HIThemeSegmentAdornment;
  1706. end;
  1707. HIThemeSegmentDrawInfoPtr = ^HIThemeSegmentDrawInfo;
  1708. {
  1709. * HIThemeDrawSegment()
  1710. *
  1711. * Summary:
  1712. * Draw a piece of a segmented view.
  1713. *
  1714. * Discussion:
  1715. * New in Mac OS X 10.4. Please note that segments can draw a
  1716. * separator outside of the specified bounds and the adornments of
  1717. * the individual segments must coordinate their drawing of
  1718. * separators (with the adornment field of the passed in
  1719. * HIThemeSegmentDrawInfo) to avoid overdrawing.
  1720. *
  1721. * Mac OS X threading:
  1722. * Not thread safe
  1723. *
  1724. * Parameters:
  1725. *
  1726. * inBounds:
  1727. * The bounds of the segment to be drawn.
  1728. *
  1729. * inDrawInfo:
  1730. * A HIThemeSegmentDrawInfo describing the segment to be drawn.
  1731. *
  1732. * inContext:
  1733. * The CG context in which the drawing is to be done.
  1734. *
  1735. * inOrientation:
  1736. * An HIThemeOrientation that describes the orientation of the
  1737. * passed in context.
  1738. *
  1739. * Availability:
  1740. * Mac OS X: in version 10.4 and later in Carbon.framework
  1741. * CarbonLib: not available in CarbonLib 1.x
  1742. * Non-Carbon CFM: not available
  1743. }
  1744. function HIThemeDrawSegment( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeSegmentDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawSegment';
  1745. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1746. { -------------------------------------------------------------------------- }
  1747. { Tabs }
  1748. { -------------------------------------------------------------------------- }
  1749. {
  1750. * HIThemeDrawTabPane()
  1751. *
  1752. * Summary:
  1753. * Draws a themed tab pane.
  1754. *
  1755. * Mac OS X threading:
  1756. * Not thread safe
  1757. *
  1758. * Parameters:
  1759. *
  1760. * inRect:
  1761. * The HIRect in which to draw the pane.
  1762. *
  1763. * inDrawInfo:
  1764. * The HIThemeTabPaneDrawInfo of the tab pane to be drawn.
  1765. *
  1766. * inContext:
  1767. * The CG context in which the drawing is to be done.
  1768. *
  1769. * inOrientation:
  1770. * An HIThemeOrientation that describes the orientation of the
  1771. * passed in context.
  1772. *
  1773. * Availability:
  1774. * Mac OS X: in version 10.3 and later in Carbon.framework
  1775. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1776. * Non-Carbon CFM: not available
  1777. }
  1778. function HIThemeDrawTabPane( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeTabPaneDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawTabPane';
  1779. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1780. {
  1781. * HIThemeDrawTab()
  1782. *
  1783. * Summary:
  1784. * Draw a themed tab.
  1785. *
  1786. * Mac OS X threading:
  1787. * Not thread safe
  1788. *
  1789. * Parameters:
  1790. *
  1791. * inRect:
  1792. * The HIRect in which to draw.
  1793. *
  1794. * inDrawInfo:
  1795. * An HIThemeTabDrawInfo describing the tab to be drawn.
  1796. *
  1797. * inContext:
  1798. * The CG context in which the drawing is to be done.
  1799. *
  1800. * inOrientation:
  1801. * An HIThemeOrientation that describes the orientation of the
  1802. * passed in context.
  1803. *
  1804. * outLabelRect:
  1805. * An HIRect into which to put the bounds of the label rect.
  1806. *
  1807. * Availability:
  1808. * Mac OS X: in version 10.3 and later in Carbon.framework
  1809. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1810. * Non-Carbon CFM: not available
  1811. }
  1812. function HIThemeDrawTab( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeTabDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation; outLabelRect: HIRectPtr { can be NULL } ): OSStatus; external name '_HIThemeDrawTab';
  1813. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1814. {
  1815. * HIThemeGetTabPaneDrawShape()
  1816. *
  1817. * Summary:
  1818. * Gets the shape of the draw area relative to the full bounds of
  1819. * the tab+pane.
  1820. *
  1821. * Discussion:
  1822. * This API was mistakenly named as a "Get" API. It behaves as
  1823. * "Copy" API. THE CALLER IS RESPONSIBLE FOR RELEASING THE RETURNED
  1824. * SHAPE.
  1825. *
  1826. * Mac OS X threading:
  1827. * Not thread safe
  1828. *
  1829. * Parameters:
  1830. *
  1831. * inRect:
  1832. * The HIRect for which to get the shape.
  1833. *
  1834. * inDirection:
  1835. * A ThemeTabDirection describing on which side of the pane the
  1836. * tabs will be drawn.
  1837. *
  1838. * inTabSize:
  1839. * An HIThemeTabSize indicating what size of tab pane to draw.
  1840. *
  1841. * outShape:
  1842. * A pointer to an HIShapeRef which will be set to the shape of
  1843. * the draw area. Needs to be released by caller.
  1844. *
  1845. * Availability:
  1846. * Mac OS X: in version 10.3 and later in Carbon.framework
  1847. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1848. * Non-Carbon CFM: not available
  1849. }
  1850. function HIThemeGetTabPaneDrawShape( const (*var*) inRect: HIRect; inDirection: ThemeTabDirection; inTabSize: HIThemeTabSize; var outShape: HIShapeRef ): OSStatus; external name '_HIThemeGetTabPaneDrawShape';
  1851. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1852. {
  1853. * HIThemeGetTabPaneContentShape()
  1854. *
  1855. * Summary:
  1856. * Gets the shape of the content area relative to the full bounds of
  1857. * the tab+pane.
  1858. *
  1859. * Discussion:
  1860. * This API was mistakenly named as a "Get" API. It behaves as
  1861. * "Copy" API. THE CALLER IS RESPONSIBLE FOR RELEASING THE RETURNED
  1862. * SHAPE.
  1863. *
  1864. * Mac OS X threading:
  1865. * Not thread safe
  1866. *
  1867. * Parameters:
  1868. *
  1869. * inRect:
  1870. * The HIRect for which to get the shape.
  1871. *
  1872. * inDirection:
  1873. * A ThemeTabDirection describing on which side of the pane the
  1874. * tabs will be drawn.
  1875. *
  1876. * inTabSize:
  1877. * An HIThemeTabSize indicating what size of tab pane to draw.
  1878. *
  1879. * outShape:
  1880. * A pointer to an HIShapeRef which will be set to the shape of
  1881. * the draw content. Needs to be released by caller.
  1882. *
  1883. * Availability:
  1884. * Mac OS X: in version 10.3 and later in Carbon.framework
  1885. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1886. * Non-Carbon CFM: not available
  1887. }
  1888. function HIThemeGetTabPaneContentShape( const (*var*) inRect: HIRect; inDirection: ThemeTabDirection; inTabSize: HIThemeTabSize; var outShape: HIShapeRef ): OSStatus; external name '_HIThemeGetTabPaneContentShape';
  1889. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1890. {
  1891. * HIThemeGetTabDrawShape()
  1892. *
  1893. * Summary:
  1894. * Gets the shape of the tab drawing area relative to the full
  1895. * bounds of the tab+pane.
  1896. *
  1897. * Discussion:
  1898. * This API was mistakenly named as a "Get" API. It behaves as
  1899. * "Copy" API. THE CALLER IS RESPONSIBLE FOR RELEASING THE RETURNED
  1900. * SHAPE.
  1901. *
  1902. * Mac OS X threading:
  1903. * Not thread safe
  1904. *
  1905. * Parameters:
  1906. *
  1907. * inRect:
  1908. * The HIRect for which to get the shape.
  1909. *
  1910. * inDrawInfo:
  1911. * An HIThemeTabDrawInfo describing the tab that will be drawn.
  1912. *
  1913. * outShape:
  1914. * A pointer to an HIShapeRef which will be set to the shape of
  1915. * the tab drawing area. Needs to be released by caller.
  1916. *
  1917. * Availability:
  1918. * Mac OS X: in version 10.3 and later in Carbon.framework
  1919. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1920. * Non-Carbon CFM: not available
  1921. }
  1922. function HIThemeGetTabDrawShape( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeTabDrawInfo; var outShape: HIShapeRef ): OSStatus; external name '_HIThemeGetTabDrawShape';
  1923. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1924. {
  1925. * HIThemeGetTabShape()
  1926. *
  1927. * Summary:
  1928. * Gets the shape for a themed tab.
  1929. *
  1930. * Discussion:
  1931. * This API was mistakenly named as a "Get" API. It behaves as
  1932. * "Copy" API. THE CALLER IS RESPONSIBLE FOR RELEASING THE RETURNED
  1933. * SHAPE.
  1934. *
  1935. * Mac OS X threading:
  1936. * Not thread safe
  1937. *
  1938. * Parameters:
  1939. *
  1940. * inRect:
  1941. * An HIRect indicating the entire tabs area for which the tab
  1942. * shape is to be retrieved.
  1943. *
  1944. * inDrawInfo:
  1945. * An HIThemeTabDrawInfo describing the tab that will be drawn.
  1946. *
  1947. * outShape:
  1948. * A pointer to an HIShapeRef which will be set to the shape of
  1949. * the tab. Needs to be released by caller.
  1950. *
  1951. * Availability:
  1952. * Mac OS X: in version 10.3 and later in Carbon.framework
  1953. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1954. * Non-Carbon CFM: not available
  1955. }
  1956. function HIThemeGetTabShape( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeTabDrawInfo; var outShape: HIShapeRef ): OSStatus; external name '_HIThemeGetTabShape';
  1957. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1958. { -------------------------------------------------------------------------- }
  1959. { Text }
  1960. { -------------------------------------------------------------------------- }
  1961. const
  1962. {
  1963. * Don't truncate the measured or drawn text.
  1964. }
  1965. kHIThemeTextTruncationNone = 0;
  1966. {
  1967. * During measure or draw, if the text will not fit within the
  1968. * available bounds, truncate the text in the middle of the last
  1969. * visible line.
  1970. }
  1971. kHIThemeTextTruncationMiddle = 1;
  1972. {
  1973. * During measure or draw, if the text will not fit within the
  1974. * available bounds, truncate the text at the end of the last visible
  1975. * line.
  1976. }
  1977. kHIThemeTextTruncationEnd = 2;
  1978. type
  1979. HIThemeTextTruncation = UInt32;
  1980. const
  1981. {
  1982. * The text will be drawn flush with the left side of the bounding
  1983. * box.
  1984. }
  1985. kHIThemeTextHorizontalFlushLeft = 0;
  1986. {
  1987. * The text will be centered within the bounding box.
  1988. }
  1989. kHIThemeTextHorizontalFlushCenter = 1;
  1990. {
  1991. * The text will be drawn flush with the right side of the bounding
  1992. * box.
  1993. }
  1994. kHIThemeTextHorizontalFlushRight = 2;
  1995. type
  1996. HIThemeTextHorizontalFlush = UInt32;
  1997. const
  1998. {
  1999. * Draw the text vertically flush with the top of the box
  2000. }
  2001. kHIThemeTextVerticalFlushTop = 0;
  2002. {
  2003. * Vertically center the text
  2004. }
  2005. kHIThemeTextVerticalFlushCenter = 1;
  2006. {
  2007. * Draw the text vertically flush with the bottom of the box
  2008. }
  2009. kHIThemeTextVerticalFlushBottom = 2;
  2010. type
  2011. HIThemeTextVerticalFlush = UInt32;
  2012. const
  2013. kHIThemeTextBoxOptionNone = 0;
  2014. kHIThemeTextBoxOptionStronglyVertical = 1 shl 1;
  2015. type
  2016. HIThemeTextBoxOptions = OptionBits;
  2017. const
  2018. kHIThemeTextInfoVersionZero = 0;
  2019. {
  2020. * HIThemeTextInfo
  2021. *
  2022. * Summary:
  2023. * Drawing parameters passed to text drawing and measuring theme
  2024. * APIs.
  2025. *
  2026. * Discussion:
  2027. * New in Mac OS X 10.3, this structure is used for measuring and
  2028. * drawing text with the HIThemeGetTextDimensions and
  2029. * HIThemeDrawTextBox APIs. If truncationPosition is
  2030. * kHIThemeTextTruncationNone, the other fields with the truncation
  2031. * prefix are ignored.
  2032. }
  2033. type
  2034. HIThemeTextInfo = record
  2035. {
  2036. * The version of this data structure. Currently, it is always 0.
  2037. }
  2038. version: UInt32; { current version is 0 }
  2039. {
  2040. * The theme draw state in which to draw the string.
  2041. }
  2042. state: ThemeDrawState;
  2043. {
  2044. * The font in which to draw the string.
  2045. }
  2046. fontID: ThemeFontID;
  2047. {
  2048. * The horizontal flushness of the text. One of the
  2049. * kHIThemeTextHorizontalFlush[Left/Center/Right] constants. When
  2050. * this structure is used for HIThemeGetTextDimensions, this field
  2051. * has no effect on the returned dimensions. However, providing the
  2052. * same flushness that will be used with a subsequent draw will
  2053. * trigger a performance optimization.
  2054. }
  2055. horizontalFlushness: HIThemeTextHorizontalFlush; { kHIThemeTextHorizontalFlush[Left/Center/Right] }
  2056. {
  2057. * The vertical flushness of the text. One of the
  2058. * kHIThemeTextVerticalFlush[Top/Center/Bottom] constants. When this
  2059. * paramblock is used for HIThemeGetTextDimensions, this field has no
  2060. * effect on the returned dimensions. However, providing the same
  2061. * flushness that will be used with a subsequent draw will trigger a
  2062. * performance optimization.
  2063. }
  2064. verticalFlushness: HIThemeTextVerticalFlush; { kHIThemeTextVerticalFlush[Top/Center/Bottom] }
  2065. {
  2066. * Currently, the only option available is for strongly vertical text
  2067. * with the kThemeTextBoxOptionStronglyVertical option bit.
  2068. }
  2069. options: HIThemeTextBoxOptions; { includes kHIThemeTextBoxOptionStronglyVertical }
  2070. {
  2071. * Specifies where truncation should occur. If this field is
  2072. * kHIThemeTruncationNone, no truncation will occur, and all fields
  2073. * with the truncation prefix will be ignored.
  2074. }
  2075. truncationPosition: HIThemeTextTruncation; { kHIThemeTextTruncation[None/Middle/End], If none the following field is ignored }
  2076. {
  2077. * The maximum number of lines to measure or draw before truncation
  2078. * occurs. Ignored if truncationPosition is kHIThemeTruncationNone.
  2079. }
  2080. truncationMaxLines: UInt32; { the maximum number of lines before truncation occurs }
  2081. {
  2082. * On output, if the text has been truncated, this is set to true. If
  2083. * the text fit completely within the parameters specified and the
  2084. * text was not truncated, this is set to false.
  2085. }
  2086. truncationHappened: Boolean; { on output, whether truncation needed to happen }
  2087. end;
  2088. HIThemeTextInfoPtr = ^HIThemeTextInfo;
  2089. {
  2090. * HIThemeGetTextDimensions()
  2091. *
  2092. * Summary:
  2093. * Get text dimensions of a string
  2094. *
  2095. * Discussion:
  2096. * This allows you to get various dimension characteristics of a
  2097. * string bound to certain criteria that you specify. It allows you
  2098. * to get the absolute bounds of a string laid out in a single line,
  2099. * or the bounds of a string constrained to a given width.
  2100. *
  2101. * Mac OS X threading:
  2102. * Not thread safe
  2103. *
  2104. * Parameters:
  2105. *
  2106. * inString:
  2107. * A CFStringRef containing the unicode characters you wish to
  2108. * measure. You MUST NOT pass in a CFStringRef that was allocated
  2109. * with any of the "NoCopy" CFString creation APIs; a string
  2110. * created with a "NoCopy" API has transient storage which is
  2111. * incompatible with HIThemeGetTextDimensions's caches.
  2112. *
  2113. * inWidth:
  2114. * The width to constrain the text before wrapping. If inWidth is
  2115. * 0, the text will not wrap and will be laid out as a single
  2116. * line, unless it contains embedded carriage return or linefeed
  2117. * characters; CR/LF will cause the text to wrap and the resulting
  2118. * measurements will include space for multiple lines of text. If
  2119. * inWidth is not 0, the text will wrap at the given width and the
  2120. * measurements will be returned from the multi-line layout.
  2121. *
  2122. *
  2123. * To force single-line layout even in the presence of embedded
  2124. * CR/LF characters, pass FLT_MAX for inWidth,
  2125. * kHIThemeTextTruncationEnd for inTextInfo.truncationPosition,
  2126. * and 1 for inTextInfo.truncationMaxLines.
  2127. *
  2128. * inTextInfo:
  2129. * The HIThemeTextInfo parameter block specifying additional
  2130. * options for flushness and truncation. The truncationHappened
  2131. * field is the only field that will be written to by this API
  2132. * (and the reason for inTextInfo not being const).
  2133. *
  2134. * outWidth:
  2135. * On output, will contain the width of the string. This width may
  2136. * be smaller than the constrain inWidth parameter if the text has
  2137. * wrapped. It will return the true bounding width of the layout.
  2138. * Can be NULL.
  2139. *
  2140. * outHeight:
  2141. * On output, will contain the height of the string. Can be NULL.
  2142. *
  2143. * outBaseline:
  2144. * On output, will contain the baseline of the string. This is the
  2145. * delta from the top of the text to the baseline of the first
  2146. * line. Can be NULL.
  2147. *
  2148. * Availability:
  2149. * Mac OS X: in version 10.3 and later in Carbon.framework
  2150. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2151. * Non-Carbon CFM: not available
  2152. }
  2153. function HIThemeGetTextDimensions( inString: CFStringRef; inWidth: Float32; var inTextInfo: HIThemeTextInfo; outWidth: Float32Ptr { can be NULL }; outHeight: Float32Ptr { can be NULL }; outBaseline: Float32Ptr { can be NULL } ): OSStatus; external name '_HIThemeGetTextDimensions';
  2154. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2155. {
  2156. * HIThemeDrawTextBox()
  2157. *
  2158. * Summary:
  2159. * Draw the string into the given bounding box
  2160. *
  2161. * Discussion:
  2162. * Draw the string into the bounding box given. You can specify
  2163. * options such as truncation and justification as well as
  2164. * determining whether the text was truncated when it was drawn.
  2165. *
  2166. * Mac OS X threading:
  2167. * Not thread safe
  2168. *
  2169. * Parameters:
  2170. *
  2171. * inString:
  2172. * A CFStringRef containing the unicode characters you wish to
  2173. * render. You MUST NOT pass in a CFStringRef that was allocated
  2174. * with any of the "NoCopy" CFString creation APIs; a string
  2175. * created with a "NoCopy" API has transient storage which is
  2176. * incompatible with HIThemeDrawTextBox's caches.
  2177. *
  2178. * inBounds:
  2179. * The HIRect that bounds where the text is to be drawn
  2180. *
  2181. * inTextInfo:
  2182. * The HIThemeTextInfo parameter block specifying additional
  2183. * options for truncation and flushness. You can control the
  2184. * number of lines drawn by specifying a truncation of
  2185. * kHIThemeTextTruncationMiddle or kHIThemeTextTruncationEnd for
  2186. * the truncationPosition field and then specifying a maximum
  2187. * number of lines to draw before truncation occurs in the
  2188. * truncationMaxLines field. The truncationHappened field is the
  2189. * only field that will be written to by this API (and the reason
  2190. * for inTextInfo not being const).
  2191. *
  2192. * inContext:
  2193. * The CGContextRef into which to draw the text.
  2194. *
  2195. * inOrientation:
  2196. * An HIThemeOrientation that describes the orientation of the
  2197. * passed in context.
  2198. *
  2199. * Availability:
  2200. * Mac OS X: in version 10.3 and later in Carbon.framework
  2201. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2202. * Non-Carbon CFM: not available
  2203. }
  2204. function HIThemeDrawTextBox( inString: CFStringRef; const (*var*) inBounds: HIRect; var inTextInfo: HIThemeTextInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawTextBox';
  2205. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2206. { -------------------------------------------------------------------------- }
  2207. { Tracks }
  2208. { -------------------------------------------------------------------------- }
  2209. {
  2210. * HIThemeDrawTrack()
  2211. *
  2212. * Summary:
  2213. * Draw a themed track item.
  2214. *
  2215. * Discussion:
  2216. * Used to draw any tracked element including sliders and scroll
  2217. * bars.
  2218. *
  2219. * Mac OS X threading:
  2220. * Not thread safe
  2221. *
  2222. * Parameters:
  2223. *
  2224. * inDrawInfo:
  2225. * An HIThemeTrackDrawInfo describing the track that will be drawn.
  2226. *
  2227. * inGhostRect:
  2228. * An HIRect describing the location of the ghost indicator to be
  2229. * drawn. Generally, this should be NULL and the control using
  2230. * this primitive should support live feeback.
  2231. *
  2232. * inContext:
  2233. * The CG context in which the drawing is to be done.
  2234. *
  2235. * inOrientation:
  2236. * An HIThemeOrientation that describes the orientation of the
  2237. * passed in context.
  2238. *
  2239. * Availability:
  2240. * Mac OS X: in version 10.3 and later in Carbon.framework
  2241. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2242. * Non-Carbon CFM: not available
  2243. }
  2244. function HIThemeDrawTrack( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; {const} inGhostRect: HIRectPtr { can be NULL }; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawTrack';
  2245. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2246. {
  2247. * HIThemeDrawTrackTickMarks()
  2248. *
  2249. * Summary:
  2250. * Draws the tick marks for a slider track.
  2251. *
  2252. * Discussion:
  2253. * This primitive only draws evenly distributed tick marks.
  2254. * Internally, it calls HIThemeDrawTickMark to do the actual tick
  2255. * mark drawing, and any custom (non-even distribution) drawing of
  2256. * tick marks should be done with HIThemeDrawTickMark.
  2257. *
  2258. * Mac OS X threading:
  2259. * Not thread safe
  2260. *
  2261. * Parameters:
  2262. *
  2263. * inDrawInfo:
  2264. * An HIThemeTrackDrawInfo describing the track tick marks that
  2265. * will be drawn.
  2266. *
  2267. * inNumTicks:
  2268. * A value indicating the number of tick marks to be drawn.
  2269. *
  2270. * inContext:
  2271. * The CG context in which the drawing is to be done.
  2272. *
  2273. * inOrientation:
  2274. * An HIThemeOrientation that describes the orientation of the
  2275. * passed in context.
  2276. *
  2277. * Availability:
  2278. * Mac OS X: in version 10.3 and later in Carbon.framework
  2279. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2280. * Non-Carbon CFM: not available
  2281. }
  2282. function HIThemeDrawTrackTickMarks( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; inNumTicks: ItemCount; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawTrackTickMarks';
  2283. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2284. {
  2285. * HIThemeDrawTickMark()
  2286. *
  2287. * Summary:
  2288. * Draws a single tick mark.
  2289. *
  2290. * Discussion:
  2291. * This primitive draws a single tick mark and can be used to draw
  2292. * custom tick marks that are not easily drawn by
  2293. * HIThemeDrawTrackTickMarks, which only draws evenly distributed
  2294. * tick marks.
  2295. *
  2296. * Mac OS X threading:
  2297. * Not thread safe
  2298. *
  2299. * Parameters:
  2300. *
  2301. * inBounds:
  2302. * The HIRect in which to draw.
  2303. *
  2304. * inDrawInfo:
  2305. * The HIThemeTickMarkDrawInfo of the tick mark to be drawn.
  2306. *
  2307. * inContext:
  2308. * The CG context in which the drawing is to be done.
  2309. *
  2310. * inOrientation:
  2311. * An HIThemeOrientation that describes the orientation of the
  2312. * passed in context.
  2313. *
  2314. * Availability:
  2315. * Mac OS X: in version 10.3 and later in Carbon.framework
  2316. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2317. * Non-Carbon CFM: not available
  2318. }
  2319. function HIThemeDrawTickMark( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeTickMarkDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawTickMark';
  2320. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2321. {
  2322. * HIThemeGetTrackThumbShape()
  2323. *
  2324. * Summary:
  2325. * Get the thumb shape of a themed track.
  2326. *
  2327. * Discussion:
  2328. * This API was mistakenly named as a "Get" API. It behaves as
  2329. * "Copy" API. THE CALLER IS RESPONSIBLE FOR RELEASING THE RETURNED
  2330. * SHAPE.
  2331. *
  2332. * Mac OS X threading:
  2333. * Not thread safe
  2334. *
  2335. * Parameters:
  2336. *
  2337. * inDrawInfo:
  2338. * An HIThemeTrackDrawInfo describing the track to be measured.
  2339. *
  2340. * outThumbShape:
  2341. * A pointer to an HIShapeRef which will be set to the shape of
  2342. * the themed track's thumb. Needs to be released by caller.
  2343. *
  2344. * Availability:
  2345. * Mac OS X: in version 10.3 and later in Carbon.framework
  2346. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2347. * Non-Carbon CFM: not available
  2348. }
  2349. function HIThemeGetTrackThumbShape( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; var outThumbShape: HIShapeRef ): OSStatus; external name '_HIThemeGetTrackThumbShape';
  2350. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2351. {
  2352. * HIThemeHitTestTrack()
  2353. *
  2354. * Summary:
  2355. * Hit test the themed track.
  2356. *
  2357. * Discussion:
  2358. * Returns true if the track was hit and fills in outPartHit.
  2359. * Otherwise, returns false.
  2360. *
  2361. * Mac OS X threading:
  2362. * Not thread safe
  2363. *
  2364. * Parameters:
  2365. *
  2366. * inDrawInfo:
  2367. * An HIThemeTabDrawInfo describing the tab that will be drawn.
  2368. *
  2369. * inMousePoint:
  2370. * An HIPoint which will be location basis for the test.
  2371. *
  2372. * outPartHit:
  2373. * A pointer to a ControlPartCode that will be filled with the
  2374. * part hit by the incoming point.
  2375. *
  2376. * Availability:
  2377. * Mac OS X: in version 10.3 and later in Carbon.framework
  2378. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2379. * Non-Carbon CFM: not available
  2380. }
  2381. function HIThemeHitTestTrack( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; const (*var*) inMousePoint: HIPoint; var outPartHit: ControlPartCode ): Boolean; external name '_HIThemeHitTestTrack';
  2382. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2383. {
  2384. * HIThemeGetTrackBounds()
  2385. *
  2386. * Summary:
  2387. * Gets the track bounds of a themed track.
  2388. *
  2389. * Mac OS X threading:
  2390. * Not thread safe
  2391. *
  2392. * Parameters:
  2393. *
  2394. * inDrawInfo:
  2395. * An HIThemeTrackDrawInfo describing the track that will be drawn.
  2396. *
  2397. * outBounds:
  2398. * A pointer to an HIRect in which will be returned the rectangle
  2399. * of the track bounds.
  2400. *
  2401. * Availability:
  2402. * Mac OS X: in version 10.3 and later in Carbon.framework
  2403. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2404. * Non-Carbon CFM: not available
  2405. }
  2406. function HIThemeGetTrackBounds( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; var outBounds: HIRect ): OSStatus; external name '_HIThemeGetTrackBounds';
  2407. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2408. {
  2409. * HIThemeGetTrackPartBounds()
  2410. *
  2411. * Summary:
  2412. * Returns measurements for the bounds of the a track part,
  2413. * according to the specifics of that track as specified in the
  2414. * incoming draw info record.
  2415. *
  2416. * Discussion:
  2417. * HIThemeGetTrackPartBounds allows you to get the boundaries of
  2418. * individual pieces of a track's theme layout.
  2419. *
  2420. * Mac OS X threading:
  2421. * Not thread safe
  2422. *
  2423. * Parameters:
  2424. *
  2425. * inDrawInfo:
  2426. * An HIThemeTrackDrawInfo describing the track to be measured.
  2427. *
  2428. * inPartCode:
  2429. * A ControlPartCode describing which part to measure. A list of
  2430. * available ControlPartCodes can be retrieved using
  2431. * HIThemeGetTrackParts.
  2432. *
  2433. * outPartBounds:
  2434. * The bounds of the specified part relative to the start
  2435. * rectangle specified in inDrawInfo.
  2436. *
  2437. * Availability:
  2438. * Mac OS X: in version 10.3 and later in Carbon.framework
  2439. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2440. * Non-Carbon CFM: not available
  2441. }
  2442. function HIThemeGetTrackPartBounds( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; inPartCode: ControlPartCode; var outPartBounds: HIRect ): OSStatus; external name '_HIThemeGetTrackPartBounds';
  2443. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2444. {
  2445. * HIThemeGetTrackParts()
  2446. *
  2447. * Summary:
  2448. * Counts the number of parts that make up a track. Optionally
  2449. * returns an array of ControlPartCodes that describe each of the
  2450. * counted parts.
  2451. *
  2452. * Discussion:
  2453. * HIThemeGetTrackParts allows you to count the number of parts that
  2454. * make up a track. This is useful if you need to iterate through
  2455. * the parts of a track and get information about them, i.e. using
  2456. * HIThemeGetTrackPartBounds.
  2457. *
  2458. * Mac OS X threading:
  2459. * Not thread safe
  2460. *
  2461. * Parameters:
  2462. *
  2463. * inDrawInfo:
  2464. * An HIThemeTrackDrawInfo describing the track to be measured.
  2465. *
  2466. * outNumberOfParts:
  2467. * A pointer to a UInt32 in which to return the number of counted
  2468. * parts.
  2469. *
  2470. * inMaxParts:
  2471. * The maximum number of ControlPartCodes that can be copied into
  2472. * the supplied ioPartsBuffer. This value is ignored if
  2473. * ioPartsBuffer is NULL.
  2474. *
  2475. * ioPartsBuffer:
  2476. * An pointer to an array into which HIThemeGetTrackPartBounds
  2477. * will copy ControlPartCodes that describe each of the counted
  2478. * parts. This pointer can be NULL if you are just counting parts.
  2479. *
  2480. * Availability:
  2481. * Mac OS X: in version 10.3 and later in Carbon.framework
  2482. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2483. * Non-Carbon CFM: not available
  2484. }
  2485. function HIThemeGetTrackParts( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; var outNumberOfParts: UInt32; inMaxParts: UInt32; ioPartsBuffer: ControlPartCodePtr { can be NULL } ): OSStatus; external name '_HIThemeGetTrackParts';
  2486. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2487. {
  2488. * HIThemeGetTrackDragRect()
  2489. *
  2490. * Summary:
  2491. * Get the rectangle of the drag area of a themed track.
  2492. *
  2493. * Mac OS X threading:
  2494. * Not thread safe
  2495. *
  2496. * Parameters:
  2497. *
  2498. * inDrawInfo:
  2499. * An HIThemeTrackDrawInfo describing the track to be measured.
  2500. *
  2501. * outDragRect:
  2502. * A pointer to an HIRect in which will be returned the rectangle
  2503. * of the drag area of the track.
  2504. *
  2505. * Availability:
  2506. * Mac OS X: in version 10.3 and later in Carbon.framework
  2507. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2508. * Non-Carbon CFM: not available
  2509. }
  2510. function HIThemeGetTrackDragRect( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; var outDragRect: HIRect ): OSStatus; external name '_HIThemeGetTrackDragRect';
  2511. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2512. {
  2513. * HIThemeGetTrackThumbPositionFromOffset()
  2514. *
  2515. * Summary:
  2516. * Get the track's relative thumb position based on the offset.
  2517. *
  2518. * Mac OS X threading:
  2519. * Not thread safe
  2520. *
  2521. * Parameters:
  2522. *
  2523. * inDrawInfo:
  2524. * An HIThemeTrackDrawInfo describing the track to be measured.
  2525. *
  2526. * inThumbOffset:
  2527. * An HIPoint describing the position of the thumb as an offset
  2528. * from the track bounds.
  2529. *
  2530. * outRelativePosition:
  2531. * On output, the track-relative position calculated from the
  2532. * thumb offset.
  2533. *
  2534. * Availability:
  2535. * Mac OS X: in version 10.3 and later in Carbon.framework
  2536. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2537. * Non-Carbon CFM: not available
  2538. }
  2539. function HIThemeGetTrackThumbPositionFromOffset( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; const (*var*) inThumbOffset: HIPoint; var outRelativePosition: Float32 ): OSStatus; external name '_HIThemeGetTrackThumbPositionFromOffset';
  2540. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2541. {
  2542. * HIThemeGetTrackThumbPositionFromBounds()
  2543. *
  2544. * Summary:
  2545. * Get the themed track thumb position from its bounds.
  2546. *
  2547. * Mac OS X threading:
  2548. * Not thread safe
  2549. *
  2550. * Parameters:
  2551. *
  2552. * inDrawInfo:
  2553. * A pointer to an HIThemeTrackDrawInfo describing the track to be
  2554. * measured.
  2555. *
  2556. * inThumbBounds:
  2557. * The bounds of the thumb from which the postion is to be
  2558. * calculated.
  2559. *
  2560. * outRelativePosition:
  2561. * On output, the track-relative position calculated from the
  2562. * thumb location.
  2563. *
  2564. * Availability:
  2565. * Mac OS X: in version 10.3 and later in Carbon.framework
  2566. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2567. * Non-Carbon CFM: not available
  2568. }
  2569. function HIThemeGetTrackThumbPositionFromBounds( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; const (*var*) inThumbBounds: HIRect; var outRelativePosition: Float32 ): OSStatus; external name '_HIThemeGetTrackThumbPositionFromBounds';
  2570. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2571. {
  2572. * HIThemeGetTrackLiveValue()
  2573. *
  2574. * Summary:
  2575. * Get the themed track live value.
  2576. *
  2577. * Mac OS X threading:
  2578. * Not thread safe
  2579. *
  2580. * Parameters:
  2581. *
  2582. * inDrawInfo:
  2583. * An HIThemeTrackDrawInfo describing the track to be measured.
  2584. *
  2585. * inRelativePosition:
  2586. * An HIPoint describing the position of the thumb as an offset
  2587. * from the track bounds.
  2588. *
  2589. * outValue:
  2590. * On output, the track value as calculated from the relative
  2591. * postion of the thumb.
  2592. *
  2593. * Availability:
  2594. * Mac OS X: in version 10.3 and later in Carbon.framework
  2595. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2596. * Non-Carbon CFM: not available
  2597. }
  2598. function HIThemeGetTrackLiveValue( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; inRelativePosition: Float32; var outValue: SInt32 ): OSStatus; external name '_HIThemeGetTrackLiveValue';
  2599. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2600. {
  2601. * HIThemeGetScrollBarTrackRect()
  2602. *
  2603. * Summary:
  2604. * Gets the rectangle of the tracking area of a themed scroll bar.
  2605. *
  2606. * Mac OS X threading:
  2607. * Not thread safe
  2608. *
  2609. * Parameters:
  2610. *
  2611. * inBounds:
  2612. * An HIRect indicating the area in which the scroll bar will be
  2613. * drawn.
  2614. *
  2615. * inTrackInfo:
  2616. * An HIScrollBarTrackInfo for the scroll bar to be drawn.
  2617. * Currently, only the pressState and enableState fields are used.
  2618. *
  2619. * inIsHoriz:
  2620. * A Boolean where true means that the scroll bar is to be
  2621. * horizontal and false means that the scroll bar is to be
  2622. * vertical.
  2623. *
  2624. * outTrackBounds:
  2625. * A pointer to an HIRect in which will be returned the rectangle
  2626. * of the track area of the scroll bar.
  2627. *
  2628. * Availability:
  2629. * Mac OS X: in version 10.3 and later in Carbon.framework
  2630. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2631. * Non-Carbon CFM: not available
  2632. }
  2633. function HIThemeGetScrollBarTrackRect( const (*var*) inBounds: HIRect; const (*var*) inTrackInfo: HIScrollBarTrackInfo; inIsHoriz: Boolean; var outTrackBounds: HIRect ): OSStatus; external name '_HIThemeGetScrollBarTrackRect';
  2634. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2635. {
  2636. * HIThemeHitTestScrollBarArrows()
  2637. *
  2638. * Summary:
  2639. * Hit test the theme scroll bar arrows to determine where the hit
  2640. * occurred.
  2641. *
  2642. * Mac OS X threading:
  2643. * Not thread safe
  2644. *
  2645. * Parameters:
  2646. *
  2647. * inScrollBarBounds:
  2648. * An HIRect indicating the bounds of the scroll bar that will be
  2649. * hit tested.
  2650. *
  2651. * inTrackInfo:
  2652. * An HIScrollBarTrackInfo for the scroll bar to be drawn.
  2653. * Currently, only the version, pressState and enableState fields
  2654. * are used.
  2655. *
  2656. * inIsHoriz:
  2657. * A Boolean where true means that the scroll bar is to be
  2658. * horizontal and false means that the scroll bar is to be
  2659. * vertical.
  2660. *
  2661. * inPtHit:
  2662. * An HIPoint indicating where the control was hit and which will
  2663. * be used for hit testing.
  2664. *
  2665. * outTrackBounds:
  2666. * A pointer to an HIRect in which will be returned the rectangle
  2667. * of the track area of the scroll bar. Can be NULL.
  2668. *
  2669. * outPartCode:
  2670. * A pointer to a ControlPartCode in which the part code of the
  2671. * hit part will be returned.
  2672. *
  2673. * Availability:
  2674. * Mac OS X: in version 10.3 and later in Carbon.framework
  2675. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2676. * Non-Carbon CFM: not available
  2677. }
  2678. function HIThemeHitTestScrollBarArrows( const (*var*) inScrollBarBounds: HIRect; const (*var*) inTrackInfo: HIScrollBarTrackInfo; inIsHoriz: Boolean; const (*var*) inPtHit: HIPoint; outTrackBounds: HIRectPtr { can be NULL }; var outPartCode: ControlPartCode ): Boolean; external name '_HIThemeHitTestScrollBarArrows';
  2679. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2680. {
  2681. * HIThemeDrawScrollBarDelimiters()
  2682. *
  2683. * Summary:
  2684. * Draw themed scroll bar delimiters.
  2685. *
  2686. * Discussion:
  2687. * Draws the grow lines delimiting the scroll bar areas. Does not
  2688. * draw the size box.
  2689. *
  2690. * Mac OS X threading:
  2691. * Not thread safe
  2692. *
  2693. * Parameters:
  2694. *
  2695. * inContRect:
  2696. * An HIRect indicating the rectangle of the content area of the
  2697. * window to be drawn.
  2698. *
  2699. * inDrawInfo:
  2700. * The HIThemeScrollBarDelimitersDrawInfo of the delimiters to be
  2701. * drawn.
  2702. *
  2703. * inContext:
  2704. * The CG context in which the drawing is to be done.
  2705. *
  2706. * inOrientation:
  2707. * An HIThemeOrientation that describes the orientation of the
  2708. * passed in context.
  2709. *
  2710. * Availability:
  2711. * Mac OS X: in version 10.3 and later in Carbon.framework
  2712. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2713. * Non-Carbon CFM: not available
  2714. }
  2715. function HIThemeDrawScrollBarDelimiters( const (*var*) inContRect: HIRect; const (*var*) inDrawInfo: HIThemeScrollBarDelimitersDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawScrollBarDelimiters';
  2716. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2717. { -------------------------------------------------------------------------- }
  2718. { Windows }
  2719. { -------------------------------------------------------------------------- }
  2720. {
  2721. * HIThemeDrawWindowFrame()
  2722. *
  2723. * Summary:
  2724. * Draws a themed window frame.
  2725. *
  2726. * Mac OS X threading:
  2727. * Not thread safe
  2728. *
  2729. * Parameters:
  2730. *
  2731. * inContRect:
  2732. * An HIRect indicating the rectangle of the content area of the
  2733. * window to be drawn.
  2734. *
  2735. * inDrawInfo:
  2736. * The HIThemeWindowDrawInfo of the window frame to be drawn.
  2737. *
  2738. * inContext:
  2739. * The CG context in which the drawing is to be done.
  2740. *
  2741. * inOrientation:
  2742. * An HIThemeOrientation that describes the orientation of the
  2743. * passed in context.
  2744. *
  2745. * outTitleRect:
  2746. * A pointer to an HIRect into which to put the bounds of the
  2747. * title rect.
  2748. *
  2749. * Availability:
  2750. * Mac OS X: in version 10.3 and later in Carbon.framework
  2751. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2752. * Non-Carbon CFM: not available
  2753. }
  2754. function HIThemeDrawWindowFrame( const (*var*) inContRect: HIRect; const (*var*) inDrawInfo: HIThemeWindowDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation; outTitleRect: HIRectPtr { can be NULL } ): OSStatus; external name '_HIThemeDrawWindowFrame';
  2755. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2756. {
  2757. * HIThemeDrawTitleBarWidget()
  2758. *
  2759. * Summary:
  2760. * Draws the requested theme title bar widget.
  2761. *
  2762. * Discussion:
  2763. * HIThemeDrawTitleBarWidget renders the requested theme title bar
  2764. * widget in the proper location of a window. A common
  2765. * misconception when using this API is that the client must specify
  2766. * the exact location of the widget in the window. The widget will
  2767. * locate itself in the window based relative to the content rect
  2768. * passed in content rectangle -- the contRect parameter. Another
  2769. * common problem is to ignore the window's attributes. The
  2770. * attributes must be set up properly to describe the window for
  2771. * which the widget is to be drawn.
  2772. *
  2773. * Mac OS X threading:
  2774. * Not thread safe
  2775. *
  2776. * Parameters:
  2777. *
  2778. * inContRect:
  2779. * A rectangle describing the window's content area. The widget
  2780. * is drawn relative to the content rectangle of the window, so
  2781. * this parameter does not describe the actual widget bounds, it
  2782. * describes the window's content rectangle.
  2783. *
  2784. * inDrawInfo:
  2785. * The HIThemeWindowWidgetDrawInfo of the window widget to be
  2786. * drawn.
  2787. *
  2788. * inContext:
  2789. * The CG context in which the drawing is to be done.
  2790. *
  2791. * inOrientation:
  2792. * An HIThemeOrientation that describes the orientation of the
  2793. * passed in context.
  2794. *
  2795. * Availability:
  2796. * Mac OS X: in version 10.3 and later in Carbon.framework
  2797. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2798. * Non-Carbon CFM: not available
  2799. }
  2800. function HIThemeDrawTitleBarWidget( const (*var*) inContRect: HIRect; const (*var*) inDrawInfo: HIThemeWindowWidgetDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawTitleBarWidget';
  2801. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2802. {
  2803. * HIThemeDrawGrowBox()
  2804. *
  2805. * Summary:
  2806. * Draws a theme grow box.
  2807. *
  2808. * Mac OS X threading:
  2809. * Not thread safe
  2810. *
  2811. * Parameters:
  2812. *
  2813. * inOrigin:
  2814. * The origin from which to draw the grow box.
  2815. *
  2816. * inDrawInfo:
  2817. * An HIThemeGrowBoxDrawInfo describing the grow box to be drawn
  2818. * or measured.
  2819. *
  2820. * inContext:
  2821. * The CG context in which the drawing is to be done.
  2822. *
  2823. * inOrientation:
  2824. * An HIThemeOrientation that describes the orientation of the
  2825. * passed in context.
  2826. *
  2827. * Availability:
  2828. * Mac OS X: in version 10.3 and later in Carbon.framework
  2829. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2830. * Non-Carbon CFM: not available
  2831. }
  2832. function HIThemeDrawGrowBox( const (*var*) inOrigin: HIPoint; const (*var*) inDrawInfo: HIThemeGrowBoxDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawGrowBox';
  2833. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2834. {
  2835. * HIThemeGetGrowBoxBounds()
  2836. *
  2837. * Summary:
  2838. * Gets the bounds for a grow box.
  2839. *
  2840. * Mac OS X threading:
  2841. * Not thread safe
  2842. *
  2843. * Parameters:
  2844. *
  2845. * inOrigin:
  2846. * The origin from which to draw the grow box.
  2847. *
  2848. * inDrawInfo:
  2849. * An HIThemeGrowBoxDrawInfo describing the grow box to be drawn
  2850. * or measured. The state field is ignored.
  2851. *
  2852. * outBounds:
  2853. * A pointer to an HIRect in which will be returned the rectangle
  2854. * of the standalone grow box bounds.
  2855. *
  2856. * Availability:
  2857. * Mac OS X: in version 10.3 and later in Carbon.framework
  2858. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2859. * Non-Carbon CFM: not available
  2860. }
  2861. function HIThemeGetGrowBoxBounds( const (*var*) inOrigin: HIPoint; const (*var*) inDrawInfo: HIThemeGrowBoxDrawInfo; var outBounds: HIRect ): OSStatus; external name '_HIThemeGetGrowBoxBounds';
  2862. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2863. {
  2864. * HIThemeGetWindowShape()
  2865. *
  2866. * Summary:
  2867. * Obtains the specified window shape.
  2868. *
  2869. * Discussion:
  2870. * This API was mistakenly named as a "Get" API. It behaves as
  2871. * "Copy" API. THE CALLER IS RESPONSIBLE FOR RELEASING THE RETURNED
  2872. * SHAPE.
  2873. *
  2874. * Mac OS X threading:
  2875. * Not thread safe
  2876. *
  2877. * Parameters:
  2878. *
  2879. * inContRect:
  2880. * An HIRect indicating the rectangle of the content area of the
  2881. * window to be drawn.
  2882. *
  2883. * inDrawInfo:
  2884. * The HIThemeWindowDrawInfo of the window frame to be measured.
  2885. *
  2886. * inWinRegion:
  2887. * A WindowRegionCode indicating the desired region for which to
  2888. * return the shape.
  2889. *
  2890. * outShape:
  2891. * A pointer to an HIShapeRef which will be set to the shape of
  2892. * the requested window region. Needs to be released by caller.
  2893. *
  2894. * Availability:
  2895. * Mac OS X: in version 10.3 and later in Carbon.framework
  2896. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2897. * Non-Carbon CFM: not available
  2898. }
  2899. function HIThemeGetWindowShape( const (*var*) inContRect: HIRect; const (*var*) inDrawInfo: HIThemeWindowDrawInfo; inWinRegion: WindowRegionCode; var outShape: HIShapeRef ): OSStatus; external name '_HIThemeGetWindowShape';
  2900. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2901. {
  2902. * HIThemeGetWindowRegionHit()
  2903. *
  2904. * Summary:
  2905. * Get the window region hit in a themed window.
  2906. *
  2907. * Discussion:
  2908. * Not that this call does not return a region, but a region code.
  2909. *
  2910. * Mac OS X threading:
  2911. * Not thread safe
  2912. *
  2913. * Parameters:
  2914. *
  2915. * inContRect:
  2916. * An HIRect indicating the rectangle of the content area of the
  2917. * window to be drawn.
  2918. *
  2919. * inDrawInfo:
  2920. * The HIThemeWindowDrawInfo of the window frame to be measured.
  2921. *
  2922. * inPoint:
  2923. * An HIPoint against which the test will occur.
  2924. *
  2925. * outRegionHit:
  2926. * The output WindowRegionCode of hit window region.
  2927. *
  2928. * Availability:
  2929. * Mac OS X: in version 10.3 and later in Carbon.framework
  2930. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2931. * Non-Carbon CFM: not available
  2932. }
  2933. function HIThemeGetWindowRegionHit( const (*var*) inContRect: HIRect; const (*var*) inDrawInfo: HIThemeWindowDrawInfo; const (*var*) inPoint: HIPoint; var outRegionHit: WindowRegionCode ): Boolean; external name '_HIThemeGetWindowRegionHit';
  2934. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2935. { -------------------------------------------------------------------------- }
  2936. { Miscellaneous }
  2937. { -------------------------------------------------------------------------- }
  2938. {
  2939. * HIThemeDrawFrame()
  2940. *
  2941. * Summary:
  2942. * Draws a variety of frames frame.
  2943. *
  2944. * Mac OS X threading:
  2945. * Not thread safe
  2946. *
  2947. * Parameters:
  2948. *
  2949. * inRect:
  2950. * The HIRect in which to draw.
  2951. *
  2952. * inDrawInfo:
  2953. * An HIThemeFrameDrawInfo describing the frame to be drawn or
  2954. * measured.
  2955. *
  2956. * inContext:
  2957. * The CG context in which the drawing is to be done.
  2958. *
  2959. * inOrientation:
  2960. * An HIThemeOrientation that describes the orientation of the
  2961. * passed in context.
  2962. *
  2963. * Availability:
  2964. * Mac OS X: in version 10.3 and later in Carbon.framework
  2965. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2966. * Non-Carbon CFM: not available
  2967. }
  2968. function HIThemeDrawFrame( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeFrameDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawFrame';
  2969. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2970. {
  2971. * HIThemeDrawGroupBox()
  2972. *
  2973. * Summary:
  2974. * Draws a themed primary group box.
  2975. *
  2976. * Mac OS X threading:
  2977. * Not thread safe
  2978. *
  2979. * Parameters:
  2980. *
  2981. * inRect:
  2982. * The HIRect in which to draw.
  2983. *
  2984. * inDrawInfo:
  2985. * An HIThemeGroupBoxDrawInfo describing the group box to be drawn
  2986. * or measured.
  2987. *
  2988. * inContext:
  2989. * The CG context in which the drawing is to be done.
  2990. *
  2991. * inOrientation:
  2992. * An HIThemeOrientation that describes the orientation of the
  2993. * passed in context.
  2994. *
  2995. * Availability:
  2996. * Mac OS X: in version 10.3 and later in Carbon.framework
  2997. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2998. * Non-Carbon CFM: not available
  2999. }
  3000. function HIThemeDrawGroupBox( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeGroupBoxDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawGroupBox';
  3001. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3002. {
  3003. * HIThemeDrawGenericWell()
  3004. *
  3005. * Summary:
  3006. * Draws a themed generic well.
  3007. *
  3008. * Mac OS X threading:
  3009. * Not thread safe
  3010. *
  3011. * Parameters:
  3012. *
  3013. * inRect:
  3014. * The HIRect in which to draw.
  3015. *
  3016. * inDrawInfo:
  3017. * An HIThemeButtonDrawInfo that describes attributes of the well
  3018. * to be drawn.
  3019. *
  3020. * inContext:
  3021. * The CG context in which the drawing is to be done.
  3022. *
  3023. * inOrientation:
  3024. * An HIThemeOrientation that describes the orientation of the
  3025. * passed in context.
  3026. *
  3027. * Availability:
  3028. * Mac OS X: in version 10.3 and later in Carbon.framework
  3029. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3030. * Non-Carbon CFM: not available
  3031. }
  3032. function HIThemeDrawGenericWell( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeButtonDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawGenericWell';
  3033. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3034. {
  3035. * HIThemeDrawPaneSplitter()
  3036. *
  3037. * Summary:
  3038. * Draws a themed pane splitter.
  3039. *
  3040. * Mac OS X threading:
  3041. * Not thread safe
  3042. *
  3043. * Parameters:
  3044. *
  3045. * inRect:
  3046. * The HIRect in which to draw.
  3047. *
  3048. * inDrawInfo:
  3049. * The HIThemeSplitterDrawInfo of the pane splitter to be drawn.
  3050. *
  3051. * inContext:
  3052. * The CG context in which the drawing is to be done.
  3053. *
  3054. * inOrientation:
  3055. * An HIThemeOrientation that describes the orientation of the
  3056. * passed in context.
  3057. *
  3058. * Availability:
  3059. * Mac OS X: in version 10.3 and later in Carbon.framework
  3060. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3061. * Non-Carbon CFM: not available
  3062. }
  3063. function HIThemeDrawPaneSplitter( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeSplitterDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawPaneSplitter';
  3064. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3065. {
  3066. * HIThemeDrawGrabber()
  3067. *
  3068. * Summary:
  3069. * Draws a themed grabber.
  3070. *
  3071. * Mac OS X threading:
  3072. * Not thread safe
  3073. *
  3074. * Parameters:
  3075. *
  3076. * inRect:
  3077. * The HIRect in which to draw.
  3078. *
  3079. * inDrawInfo:
  3080. * The HIThemeGrabberDrawInfo of the grabber to be drawn.
  3081. *
  3082. * inContext:
  3083. * The CG context in which the drawing is to be done.
  3084. *
  3085. * inOrientation:
  3086. * An HIThemeOrientation that describes the orientation of the
  3087. * passed in context.
  3088. *
  3089. * Availability:
  3090. * Mac OS X: in version 10.3 and later in Carbon.framework
  3091. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3092. * Non-Carbon CFM: not available
  3093. }
  3094. function HIThemeDrawGrabber( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeGrabberDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawGrabber';
  3095. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3096. {
  3097. * HIThemeDrawPlacard()
  3098. *
  3099. * Summary:
  3100. * Draws a themed placard.
  3101. *
  3102. * Mac OS X threading:
  3103. * Not thread safe
  3104. *
  3105. * Parameters:
  3106. *
  3107. * inRect:
  3108. * The HIRect in which to draw.
  3109. *
  3110. * inDrawInfo:
  3111. * The HIThemePlacardDrawInfo of the placard to be drawn.
  3112. *
  3113. * inContext:
  3114. * The CG context in which the drawing is to be done.
  3115. *
  3116. * inOrientation:
  3117. * An HIThemeOrientation that describes the orientation of the
  3118. * passed in context.
  3119. *
  3120. * Availability:
  3121. * Mac OS X: in version 10.3 and later in Carbon.framework
  3122. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3123. * Non-Carbon CFM: not available
  3124. }
  3125. function HIThemeDrawPlacard( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemePlacardDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawPlacard';
  3126. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3127. {
  3128. * HIThemeDrawHeader()
  3129. *
  3130. * Summary:
  3131. * Draws a themed window header in the specified rectangle.
  3132. *
  3133. * Mac OS X threading:
  3134. * Not thread safe
  3135. *
  3136. * Parameters:
  3137. *
  3138. * inRect:
  3139. * The HIRect in which to draw.
  3140. *
  3141. * inDrawInfo:
  3142. * The HIThemeHeaderDrawInfo of the window frame to be drawn.
  3143. *
  3144. * inContext:
  3145. * The CG context in which the drawing is to be done.
  3146. *
  3147. * inOrientation:
  3148. * An HIThemeOrientation that describes the orientation of the
  3149. * passed in context.
  3150. *
  3151. * Availability:
  3152. * Mac OS X: in version 10.3 and later in Carbon.framework
  3153. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3154. * Non-Carbon CFM: not available
  3155. }
  3156. function HIThemeDrawHeader( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeHeaderDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawHeader';
  3157. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3158. {
  3159. * HIThemeDrawFocusRect()
  3160. *
  3161. * Summary:
  3162. * Draws a themed focus rectangle in the specified rectangle.
  3163. *
  3164. * Mac OS X threading:
  3165. * Not thread safe
  3166. *
  3167. * Parameters:
  3168. *
  3169. * inRect:
  3170. * The HIRect in which to draw.
  3171. *
  3172. * inHasFocus:
  3173. * Pass in true to draw focus. Passing false effectively makes
  3174. * this API a no-op.
  3175. *
  3176. * inContext:
  3177. * The CG context in which the drawing is to be done.
  3178. *
  3179. * inOrientation:
  3180. * An HIThemeOrientation that describes the orientation of the
  3181. * passed in context.
  3182. *
  3183. * Availability:
  3184. * Mac OS X: in version 10.3 and later in Carbon.framework
  3185. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3186. * Non-Carbon CFM: not available
  3187. }
  3188. function HIThemeDrawFocusRect( const (*var*) inRect: HIRect; inHasFocus: Boolean; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawFocusRect';
  3189. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3190. {
  3191. * HIThemeDrawSeparator()
  3192. *
  3193. * Summary:
  3194. * Draw a themed separator element.
  3195. *
  3196. * Mac OS X threading:
  3197. * Not thread safe
  3198. *
  3199. * Parameters:
  3200. *
  3201. * inRect:
  3202. * The HIRect in which to draw.
  3203. *
  3204. * inDrawInfo:
  3205. * The HIThemeSeparatorDrawInfo of the window frame to be drawn.
  3206. *
  3207. * inContext:
  3208. * The CG context in which the drawing is to be done.
  3209. *
  3210. * inOrientation:
  3211. * An HIThemeOrientation that describes the orientation of the
  3212. * passed in context.
  3213. *
  3214. * Availability:
  3215. * Mac OS X: in version 10.3 and later in Carbon.framework
  3216. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3217. * Non-Carbon CFM: not available
  3218. }
  3219. function HIThemeDrawSeparator( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeSeparatorDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawSeparator';
  3220. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3221. {
  3222. * HIThemeSetFill()
  3223. *
  3224. * Summary:
  3225. * Set the context fill color to that specified by the requested
  3226. * brush.
  3227. *
  3228. * Discussion:
  3229. * Note that this call does not actually draw anything. It sets the
  3230. * passed context's fill color to that of the specified theme brush.
  3231. * Subsequent fills in the context will be with the color specified
  3232. * by the theme brush.
  3233. *
  3234. * Mac OS X threading:
  3235. * Not thread safe
  3236. *
  3237. * Parameters:
  3238. *
  3239. * inBrush:
  3240. * The ThemeBrush describing the requested fill color.
  3241. *
  3242. * inInfo:
  3243. * Not used. Should always be NULL.
  3244. *
  3245. * inContext:
  3246. * The CG context for which the fill color is to be set.
  3247. *
  3248. * inOrientation:
  3249. * An HIThemeOrientation that describes the orientation of the
  3250. * passed in context.
  3251. *
  3252. * Availability:
  3253. * Mac OS X: in version 10.4 and later in Carbon.framework
  3254. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  3255. * Non-Carbon CFM: not available
  3256. }
  3257. function HIThemeSetFill( inBrush: ThemeBrush; inInfo: UnivPtr; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeSetFill';
  3258. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  3259. {
  3260. * HIThemeSetStroke()
  3261. *
  3262. * Summary:
  3263. * Set the context stroke color to that specified by the requested
  3264. * brush.
  3265. *
  3266. * Discussion:
  3267. * Note that this call does not actually draw anything. It sets the
  3268. * passed context's stroke color to that of the specified theme
  3269. * brush. Subsequent strokes in the context will be with the color
  3270. * specified by the theme brush.
  3271. *
  3272. * Mac OS X threading:
  3273. * Not thread safe
  3274. *
  3275. * Parameters:
  3276. *
  3277. * inBrush:
  3278. * The ThemeBrush describing the requested stroke color.
  3279. *
  3280. * inInfo:
  3281. * Not used. Should always be NULL.
  3282. *
  3283. * inContext:
  3284. * The CG context for which the stroke color is to be set.
  3285. *
  3286. * inOrientation:
  3287. * An HIThemeOrientation that describes the orientation of the
  3288. * passed in context.
  3289. *
  3290. * Availability:
  3291. * Mac OS X: in version 10.4 and later in Carbon.framework
  3292. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  3293. * Non-Carbon CFM: not available
  3294. }
  3295. function HIThemeSetStroke( inBrush: ThemeBrush; inInfo: UnivPtr; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeSetStroke';
  3296. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  3297. {
  3298. * HIThemeSetTextFill()
  3299. *
  3300. * Summary:
  3301. * Set the context text fill color to that specified by the
  3302. * requested brush.
  3303. *
  3304. * Discussion:
  3305. * Note that this call does not actually draw anything. It sets the
  3306. * passed context's text fill color to that of the specified
  3307. * ThemeTextColor. Subsequent text drawing in the context will be
  3308. * with the color specified by the ThemeTextColor.
  3309. *
  3310. * Mac OS X threading:
  3311. * Not thread safe
  3312. *
  3313. * Parameters:
  3314. *
  3315. * inColor:
  3316. * A ThemeTextColor describing the requested text fill color.
  3317. *
  3318. * inInfo:
  3319. * Not used. Should always be NULL.
  3320. *
  3321. * inContext:
  3322. * The CG context for which the fill color is to be set.
  3323. *
  3324. * inOrientation:
  3325. * An HIThemeOrientation that describes the orientation of the
  3326. * passed in context.
  3327. *
  3328. * Availability:
  3329. * Mac OS X: in version 10.4 and later in Carbon.framework
  3330. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  3331. * Non-Carbon CFM: not available
  3332. }
  3333. function HIThemeSetTextFill( inColor: ThemeTextColor; inInfo: UnivPtr; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeSetTextFill';
  3334. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  3335. {
  3336. * HIThemeApplyBackground()
  3337. *
  3338. * Summary:
  3339. * Apply a themed background for a rectangle.
  3340. *
  3341. * Discussion:
  3342. * Note that this call does not actually draw anything. It sets the
  3343. * passed context's fill color to the requested theme background.
  3344. * Subsequent fills in the context will fill with the theme
  3345. * background.
  3346. *
  3347. * Mac OS X threading:
  3348. * Not thread safe
  3349. *
  3350. * Parameters:
  3351. *
  3352. * inBounds:
  3353. * An HIRect enclosing the whole background. This rectangle is
  3354. * used to calculate the pattern phase (if there is one) of the
  3355. * background as it is set up in the context.
  3356. *
  3357. * inDrawInfo:
  3358. * An HIThemeBackgroundDrawInfo describing the background.
  3359. *
  3360. * inContext:
  3361. * The CG context for which the background is to be set.
  3362. *
  3363. * inOrientation:
  3364. * An HIThemeOrientation that describes the orientation of the
  3365. * passed in context.
  3366. *
  3367. * Availability:
  3368. * Mac OS X: in version 10.3 and later in Carbon.framework
  3369. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3370. * Non-Carbon CFM: not available
  3371. }
  3372. function HIThemeApplyBackground( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeBackgroundDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeApplyBackground';
  3373. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3374. {
  3375. * HIThemeDrawBackground()
  3376. *
  3377. * Summary:
  3378. * Draw a themed background for a rectangle.
  3379. *
  3380. * Discussion:
  3381. * Currently, this call only works with kThemeBackgroundMetal.
  3382. *
  3383. * Mac OS X threading:
  3384. * Not thread safe
  3385. *
  3386. * Parameters:
  3387. *
  3388. * inBounds:
  3389. * An HIRect indicating the bounds to fill with the background.
  3390. * For backgrounds that need pattern continuity, such as
  3391. * kThemeBackgroundMetal, this rectangle is the full bounds of the
  3392. * rectangle for which the filling is to occur. If drawing a
  3393. * sub-rectangle of that background, set the clip and draw the
  3394. * full rectangle. This routine has been optimized to not perform
  3395. * calculations on the non-clip part of the drawing bounds.
  3396. *
  3397. * inDrawInfo:
  3398. * An HIThemeBackgroundDrawInfo describing the background to be
  3399. * drawn.
  3400. *
  3401. * inContext:
  3402. * The CG context in which the drawing is to be done.
  3403. *
  3404. * inOrientation:
  3405. * An HIThemeOrientation that describes the orientation of the
  3406. * passed in context.
  3407. *
  3408. * Availability:
  3409. * Mac OS X: in version 10.3 and later in Carbon.framework
  3410. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3411. * Non-Carbon CFM: not available
  3412. }
  3413. function HIThemeDrawBackground( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeBackgroundDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawBackground';
  3414. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3415. {
  3416. * HIThemeBrushCreateCGColor()
  3417. *
  3418. * Summary:
  3419. * Create a CGColor for a ThemeBrush.
  3420. *
  3421. * Discussion:
  3422. * Color is an ambiguous term. The color may be a pattern.
  3423. *
  3424. * Mac OS X threading:
  3425. * Not thread safe
  3426. *
  3427. * Parameters:
  3428. *
  3429. * inBrush:
  3430. * The ThemeBrush describing the requested color.
  3431. *
  3432. * outColor:
  3433. * A pointer to a CGColorRef that will be set to the newly created
  3434. * CGColor.
  3435. *
  3436. * Result:
  3437. * An operating system result code.
  3438. *
  3439. * Availability:
  3440. * Mac OS X: in version 10.4 and later in Carbon.framework
  3441. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  3442. * Non-Carbon CFM: not available
  3443. }
  3444. function HIThemeBrushCreateCGColor( inBrush: ThemeBrush; var outColor: CGColorRef ): OSStatus; external name '_HIThemeBrushCreateCGColor';
  3445. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  3446. end.