HITheme.pas 140 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936
  1. {
  2. File: HIToolbox/HITheme.h
  3. Contains: HIToolbox HITheme interfaces.
  4. Version: HIToolbox-624~3
  5. Copyright: © 1994-2008 by Apple Computer, Inc., all rights reserved.
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://bugs.freepascal.org
  9. }
  10. { Pascal Translation: Peter N Lewis, <[email protected]>, 2004 }
  11. { Pascal Translation Updated: Peter N Lewis, <[email protected]>, August 2005 }
  12. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2009 }
  13. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2012 }
  14. {
  15. Modified for use with Free Pascal
  16. Version 308
  17. Please report any bugs to <[email protected]>
  18. }
  19. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  20. {$mode macpas}
  21. {$packenum 1}
  22. {$macro on}
  23. {$inline on}
  24. {$calling mwpascal}
  25. unit HITheme;
  26. interface
  27. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  28. {$setc GAP_INTERFACES_VERSION := $0308}
  29. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  30. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  31. {$endc}
  32. {$ifc defined CPUPOWERPC and defined CPUI386}
  33. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  34. {$endc}
  35. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  36. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  37. {$endc}
  38. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  39. {$setc __ppc__ := 1}
  40. {$elsec}
  41. {$setc __ppc__ := 0}
  42. {$endc}
  43. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  44. {$setc __ppc64__ := 1}
  45. {$elsec}
  46. {$setc __ppc64__ := 0}
  47. {$endc}
  48. {$ifc not defined __i386__ and defined CPUI386}
  49. {$setc __i386__ := 1}
  50. {$elsec}
  51. {$setc __i386__ := 0}
  52. {$endc}
  53. {$ifc not defined __x86_64__ and defined CPUX86_64}
  54. {$setc __x86_64__ := 1}
  55. {$elsec}
  56. {$setc __x86_64__ := 0}
  57. {$endc}
  58. {$ifc not defined __arm__ and defined CPUARM}
  59. {$setc __arm__ := 1}
  60. {$elsec}
  61. {$setc __arm__ := 0}
  62. {$endc}
  63. {$ifc not defined __arm64__ and defined CPUAARCH64}
  64. {$setc __arm64__ := 1}
  65. {$elsec}
  66. {$setc __arm64__ := 0}
  67. {$endc}
  68. {$ifc defined cpu64}
  69. {$setc __LP64__ := 1}
  70. {$elsec}
  71. {$setc __LP64__ := 0}
  72. {$endc}
  73. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  74. {$error Conflicting definitions for __ppc__ and __i386__}
  75. {$endc}
  76. {$ifc defined __ppc__ and __ppc__}
  77. {$setc TARGET_CPU_PPC := TRUE}
  78. {$setc TARGET_CPU_PPC64 := FALSE}
  79. {$setc TARGET_CPU_X86 := FALSE}
  80. {$setc TARGET_CPU_X86_64 := FALSE}
  81. {$setc TARGET_CPU_ARM := FALSE}
  82. {$setc TARGET_CPU_ARM64 := FALSE}
  83. {$setc TARGET_OS_MAC := TRUE}
  84. {$setc TARGET_OS_IPHONE := FALSE}
  85. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  86. {$setc TARGET_OS_EMBEDDED := FALSE}
  87. {$elifc defined __ppc64__ and __ppc64__}
  88. {$setc TARGET_CPU_PPC := FALSE}
  89. {$setc TARGET_CPU_PPC64 := TRUE}
  90. {$setc TARGET_CPU_X86 := FALSE}
  91. {$setc TARGET_CPU_X86_64 := FALSE}
  92. {$setc TARGET_CPU_ARM := FALSE}
  93. {$setc TARGET_CPU_ARM64 := FALSE}
  94. {$setc TARGET_OS_MAC := TRUE}
  95. {$setc TARGET_OS_IPHONE := FALSE}
  96. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  97. {$setc TARGET_OS_EMBEDDED := FALSE}
  98. {$elifc defined __i386__ and __i386__}
  99. {$setc TARGET_CPU_PPC := FALSE}
  100. {$setc TARGET_CPU_PPC64 := FALSE}
  101. {$setc TARGET_CPU_X86 := TRUE}
  102. {$setc TARGET_CPU_X86_64 := FALSE}
  103. {$setc TARGET_CPU_ARM := FALSE}
  104. {$setc TARGET_CPU_ARM64 := FALSE}
  105. {$ifc defined(iphonesim)}
  106. {$setc TARGET_OS_MAC := FALSE}
  107. {$setc TARGET_OS_IPHONE := TRUE}
  108. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  109. {$elsec}
  110. {$setc TARGET_OS_MAC := TRUE}
  111. {$setc TARGET_OS_IPHONE := FALSE}
  112. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  113. {$endc}
  114. {$setc TARGET_OS_EMBEDDED := FALSE}
  115. {$elifc defined __x86_64__ and __x86_64__}
  116. {$setc TARGET_CPU_PPC := FALSE}
  117. {$setc TARGET_CPU_PPC64 := FALSE}
  118. {$setc TARGET_CPU_X86 := FALSE}
  119. {$setc TARGET_CPU_X86_64 := TRUE}
  120. {$setc TARGET_CPU_ARM := FALSE}
  121. {$setc TARGET_CPU_ARM64 := FALSE}
  122. {$ifc defined(iphonesim)}
  123. {$setc TARGET_OS_MAC := FALSE}
  124. {$setc TARGET_OS_IPHONE := TRUE}
  125. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  126. {$elsec}
  127. {$setc TARGET_OS_MAC := TRUE}
  128. {$setc TARGET_OS_IPHONE := FALSE}
  129. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  130. {$endc}
  131. {$setc TARGET_OS_EMBEDDED := FALSE}
  132. {$elifc defined __arm__ and __arm__}
  133. {$setc TARGET_CPU_PPC := FALSE}
  134. {$setc TARGET_CPU_PPC64 := FALSE}
  135. {$setc TARGET_CPU_X86 := FALSE}
  136. {$setc TARGET_CPU_X86_64 := FALSE}
  137. {$setc TARGET_CPU_ARM := TRUE}
  138. {$setc TARGET_CPU_ARM64 := FALSE}
  139. { will require compiler define when/if other Apple devices with ARM cpus ship }
  140. {$setc TARGET_OS_MAC := FALSE}
  141. {$setc TARGET_OS_IPHONE := TRUE}
  142. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  143. {$setc TARGET_OS_EMBEDDED := TRUE}
  144. {$elifc defined __arm64__ and __arm64__}
  145. {$setc TARGET_CPU_PPC := FALSE}
  146. {$setc TARGET_CPU_PPC64 := FALSE}
  147. {$setc TARGET_CPU_X86 := FALSE}
  148. {$setc TARGET_CPU_X86_64 := FALSE}
  149. {$setc TARGET_CPU_ARM := FALSE}
  150. {$setc TARGET_CPU_ARM64 := TRUE}
  151. { will require compiler define when/if other Apple devices with ARM cpus ship }
  152. {$setc TARGET_OS_MAC := FALSE}
  153. {$setc TARGET_OS_IPHONE := TRUE}
  154. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  155. {$setc TARGET_OS_EMBEDDED := TRUE}
  156. {$elsec}
  157. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
  158. {$endc}
  159. {$ifc defined __LP64__ and __LP64__ }
  160. {$setc TARGET_CPU_64 := TRUE}
  161. {$elsec}
  162. {$setc TARGET_CPU_64 := FALSE}
  163. {$endc}
  164. {$ifc defined FPC_BIG_ENDIAN}
  165. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  166. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  167. {$elifc defined FPC_LITTLE_ENDIAN}
  168. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  169. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  170. {$elsec}
  171. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  172. {$endc}
  173. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  174. {$setc CALL_NOT_IN_CARBON := FALSE}
  175. {$setc OLDROUTINENAMES := FALSE}
  176. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  177. {$setc OPAQUE_UPP_TYPES := TRUE}
  178. {$setc OTCARBONAPPLICATION := TRUE}
  179. {$setc OTKERNEL := FALSE}
  180. {$setc PM_USE_SESSION_APIS := TRUE}
  181. {$setc TARGET_API_MAC_CARBON := TRUE}
  182. {$setc TARGET_API_MAC_OS8 := FALSE}
  183. {$setc TARGET_API_MAC_OSX := TRUE}
  184. {$setc TARGET_CARBON := TRUE}
  185. {$setc TARGET_CPU_68K := FALSE}
  186. {$setc TARGET_CPU_MIPS := FALSE}
  187. {$setc TARGET_CPU_SPARC := FALSE}
  188. {$setc TARGET_OS_UNIX := FALSE}
  189. {$setc TARGET_OS_WIN32 := FALSE}
  190. {$setc TARGET_RT_MAC_68881 := FALSE}
  191. {$setc TARGET_RT_MAC_CFM := FALSE}
  192. {$setc TARGET_RT_MAC_MACHO := TRUE}
  193. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  194. {$setc TYPE_BOOL := FALSE}
  195. {$setc TYPE_EXTENDED := FALSE}
  196. {$setc TYPE_LONGLONG := TRUE}
  197. uses MacTypes,CFBase,CGBase,Appearance,HIShape,HIGeometry,Drag,CFDate,CGContext,MacWindows,Controls,CTFont;
  198. {$endc} {not MACOSALLINCLUDE}
  199. {$ifc TARGET_OS_MAC}
  200. {$ALIGN MAC68K}
  201. { -------------------------------------------------------------------------- }
  202. { HIThemeOrientation information }
  203. { -------------------------------------------------------------------------- }
  204. const
  205. {
  206. * The passed context has an origin at the top left. This is the
  207. * default of a context passed to you by HIToolbox.
  208. }
  209. kHIThemeOrientationNormal = 0;
  210. {
  211. * The passed context has an origin at the bottom left. This is the
  212. * default for a context you create.
  213. }
  214. kHIThemeOrientationInverted = 1;
  215. type
  216. HIThemeOrientation = UInt32;
  217. { -------------------------------------------------------------------------- }
  218. { Splitter types }
  219. { -------------------------------------------------------------------------- }
  220. const
  221. {
  222. * Draw the splitter with its normal appearance.
  223. }
  224. kHIThemeSplitterAdornmentNone = 0;
  225. {
  226. * Draw the splitter with its metal appearance.
  227. }
  228. kHIThemeSplitterAdornmentMetal = 1;
  229. type
  230. HIThemeSplitterAdornment = UInt32;
  231. { -------------------------------------------------------------------------- }
  232. { Window Grow Box }
  233. { -------------------------------------------------------------------------- }
  234. const
  235. {
  236. * The grow box corner for a window that has no scroll bars.
  237. }
  238. kHIThemeGrowBoxKindNormal = 0;
  239. {
  240. * The grow box corner for a window that has no grow box. This sounds
  241. * paradoxical, but this type of grow box, formerly known as the
  242. * "NoGrowBox" is used to fill in the corner left blank by the
  243. * intersection of a horizontal and a vertical scroll bar.
  244. }
  245. kHIThemeGrowBoxKindNone = 1;
  246. type
  247. HIThemeGrowBoxKind = UInt32;
  248. const
  249. {
  250. * Draw the grow box for normal windows.
  251. }
  252. kHIThemeGrowBoxSizeNormal = 0;
  253. {
  254. * Draw the smaller grow box for utility or floating windows.
  255. }
  256. kHIThemeGrowBoxSizeSmall = 1;
  257. type
  258. HIThemeGrowBoxSize = UInt32;
  259. const
  260. {
  261. * The group box is drawn with the primary variant.
  262. }
  263. kHIThemeGroupBoxKindPrimary = 0;
  264. {
  265. * The group box is drawn with the secondary variant.
  266. }
  267. kHIThemeGroupBoxKindSecondary = 1;
  268. {
  269. * The group box is drawn with the primary variant. This group box
  270. * draws opaque. This does not match the Mac OS X 10.3 appearance
  271. * 100%, as the boxes should be transparent, but draws this way for
  272. * the sake of compatibility. Please update to use the newer
  273. * transparent variant.
  274. }
  275. kHIThemeGroupBoxKindPrimaryOpaque = 3;
  276. {
  277. * The group box is drawn with the secondary variant. This group box
  278. * draws opaque. This does not match the Mac OS X 10.3 appearance
  279. * 100%, as the boxes should be transparent, but draws this way for
  280. * the sake of compatibility. Please update to use the newer
  281. * transparent variant.
  282. }
  283. kHIThemeGroupBoxKindSecondaryOpaque = 4;
  284. type
  285. HIThemeGroupBoxKind = UInt32;
  286. const
  287. {
  288. * A header drawn above window content that has no top border of its
  289. * own. (i.e. the same as the status bar in an icon view Finder
  290. * window).
  291. }
  292. kHIThemeHeaderKindWindow = 0;
  293. {
  294. * A header drawn above window content that has a top border of its
  295. * own. (i.e. the same as the status bar in an list view Finder
  296. * window).
  297. }
  298. kHIThemeHeaderKindList = 1;
  299. type
  300. HIThemeHeaderKind = UInt32;
  301. const
  302. {
  303. * The default sized square text field (like Edit Text).
  304. }
  305. kHIThemeFrameTextFieldSquare = 0;
  306. kHIThemeFrameListBox = 1;
  307. {
  308. * The standard sized round text field, as typically used for search
  309. * fields. Available on Mac OS X 10.3 and later.
  310. }
  311. kHIThemeFrameTextFieldRound = 1000;
  312. {
  313. * The small size round text field, as typically used for search
  314. * fields. Available on Mac OS X 10.3 and later.
  315. }
  316. kHIThemeFrameTextFieldRoundSmall = 1001;
  317. {
  318. * The mini size round text field, as typically used for search
  319. * fields. Available on Mac OS X 10.3 and later.
  320. }
  321. kHIThemeFrameTextFieldRoundMini = 1002;
  322. type
  323. HIThemeFrameKind = UInt32;
  324. const
  325. {
  326. * Indicates that a menu title should be drawn in a condensed
  327. * appearance. This constant is used in the
  328. * HIThemeMenuTitleDrawInfo.attributes field.
  329. }
  330. kHIThemeMenuTitleDrawCondensed = 1 shl 0;
  331. { -------------------------------------------------------------------------- }
  332. { DrawInfo }
  333. { -------------------------------------------------------------------------- }
  334. {
  335. * HIScrollBarTrackInfo
  336. *
  337. * Summary:
  338. * Drawing parameters passed to scroll bar drawing and measuring
  339. * theme APIs.
  340. *
  341. * Discussion:
  342. * New in Mac OS X 10.3.
  343. }
  344. type
  345. HIScrollBarTrackInfo = record
  346. {
  347. * The version of this data structure. Currently, it is always 0.
  348. }
  349. version: UInt32;
  350. {
  351. * The ThemeTrackEnableState for the scroll bar to be drawn.
  352. }
  353. enableState: SInt8 {ThemeTrackEnableState};
  354. {
  355. * The ThemeTrackPressState for the scroll bar to be drawn.
  356. }
  357. pressState: SInt8 {ThemeTrackPressState};
  358. {
  359. * The view range size.
  360. }
  361. viewsize: CGFloat;
  362. end;
  363. HIScrollBarTrackInfoPtr = ^HIScrollBarTrackInfo;
  364. {
  365. * HIThemeTrackDrawInfo
  366. *
  367. * Summary:
  368. * Drawing parameters passed to track drawing and measuring theme
  369. * APIs.
  370. *
  371. * Discussion:
  372. * New in Mac OS X 10.3, but based on legacy TrackDrawInfo.
  373. }
  374. type
  375. HIThemeTrackDrawInfo = record
  376. {
  377. * The version of this data structure. Currently, it is always 0.
  378. }
  379. version: UInt32; { current version is 0 }
  380. {
  381. * The ThemeTrackKind of the track being drawn or measured.
  382. }
  383. kind: ThemeTrackKind; { what kind of track this info is for }
  384. {
  385. * An HIRect describing the bounds of the track being drawn or
  386. * measured.
  387. }
  388. bounds: HIRect; { track basis rectangle }
  389. {
  390. * The minimum allowable value for the track being drawn or measured.
  391. }
  392. min: SInt32; { min track value }
  393. {
  394. * The maximum allowable value for the track being drawn or measured.
  395. }
  396. max: SInt32; { max track value }
  397. {
  398. * The value for the track being drawn or measured.
  399. }
  400. value: SInt32; { current thumb value }
  401. {
  402. * Leave this reserved field set to 0.
  403. }
  404. reserved: UInt32;
  405. {
  406. * A set of ThemeTrackAttributes for the track to be drawn or
  407. * measured.
  408. }
  409. attributes: ThemeTrackAttributes; { various track attributes }
  410. {
  411. * A ThemeTrackEnableState describing the state of the track to be
  412. * drawn or measured.
  413. }
  414. enableState: SInt8 {ThemeTrackEnableState}; { enable state }
  415. {
  416. * Leave this reserved field set to 0.
  417. }
  418. filler1: UInt8;
  419. case SInt16 of
  420. 0: (
  421. scrollbar: ScrollBarTrackInfo;
  422. );
  423. 1: (
  424. slider: SliderTrackInfo;
  425. );
  426. 2: (
  427. progress: ProgressTrackInfo;
  428. );
  429. end;
  430. HIThemeTrackDrawInfoPtr = ^HIThemeTrackDrawInfo;
  431. {
  432. * HIThemeAnimationTimeInfo
  433. *
  434. * Summary:
  435. * Time parameters passed to button drawing and measuring theme APIs.
  436. *
  437. * Discussion:
  438. * New in Mac OS X 10.3.
  439. }
  440. type
  441. HIThemeAnimationTimeInfo = record
  442. {
  443. * The CFAbsoluteTime of the beginning of the animation of the
  444. * button. This only applies to buttons that animate -- currently
  445. * only kThemePushButton. All other buttons will ignore this field.
  446. * If there is to be no animation, set this field to 0.
  447. }
  448. start: CFAbsoluteTime;
  449. {
  450. * The CFAbsoluteTime of the current animation frame of the button.
  451. * This only applies to buttons that animate -- currently only
  452. * kThemePushButton. All other buttons will ignore this field. If
  453. * there is to be no animation, set this field to 0.
  454. }
  455. current: CFAbsoluteTime;
  456. end;
  457. HIThemeAnimationTimeInfoPtr = ^HIThemeAnimationTimeInfo;
  458. {
  459. * HIThemeAnimationFrameInfo
  460. *
  461. * Summary:
  462. * Frame parameters passed to button drawing and measuring theme
  463. * APIs.
  464. *
  465. * Discussion:
  466. * New in Mac OS X 10.3.
  467. }
  468. type
  469. HIThemeAnimationFrameInfo = record
  470. {
  471. * The index of the frame of the animation to draw. If the index is
  472. * greater that the maximum number of animation frames, it will be
  473. * modded to calculate which frame to draw.
  474. }
  475. index: UInt32;
  476. end;
  477. HIThemeAnimationFrameInfoPtr = ^HIThemeAnimationFrameInfo;
  478. {
  479. * HIThemeButtonDrawInfo
  480. *
  481. * Summary:
  482. * Drawing parameters passed to button drawing and measuring theme
  483. * APIs.
  484. *
  485. * Discussion:
  486. * New in Mac OS X 10.3.
  487. }
  488. type
  489. HIThemeButtonDrawInfo = record
  490. {
  491. * The version of this data structure. Currently, it is always 0.
  492. }
  493. version: UInt32;
  494. {
  495. * The ThemeDrawState of the button being drawn or measured.
  496. }
  497. state: ThemeDrawState;
  498. {
  499. * A ThemeButtonKind indicating the type of button to be drawn.
  500. }
  501. kind: ThemeButtonKind;
  502. {
  503. * The ThemeButtonValue of the button being drawn or measured.
  504. }
  505. value: ThemeButtonValue;
  506. {
  507. * The ThemeButtonAdornment(s) with which the button is being drawn
  508. * or measured.
  509. }
  510. adornment: ThemeButtonAdornment;
  511. case SInt16 of
  512. 0: (
  513. time: HIThemeAnimationTimeInfo;
  514. );
  515. 1: (
  516. frame: HIThemeAnimationFrameInfo;
  517. );
  518. end;
  519. HIThemeButtonDrawInfoPtr = ^HIThemeButtonDrawInfo;
  520. {
  521. * HIThemeSplitterDrawInfo
  522. *
  523. * Summary:
  524. * Drawing parameters passed to splitter drawing and measuring theme
  525. * APIs.
  526. *
  527. * Discussion:
  528. * New in Mac OS X 10.3.
  529. }
  530. type
  531. HIThemeSplitterDrawInfo = record
  532. {
  533. * The version of this data structure. Currently, it is always 0.
  534. }
  535. version: UInt32;
  536. {
  537. * The ThemeDrawState of the splitter being drawn or measured.
  538. }
  539. state: ThemeDrawState;
  540. {
  541. * The HIThemeSplitterAdornments of the splitter being drawn or
  542. * measured.
  543. }
  544. adornment: HIThemeSplitterAdornment;
  545. end;
  546. HIThemeSplitterDrawInfoPtr = ^HIThemeSplitterDrawInfo;
  547. const
  548. {
  549. * No tab adornments are to be drawn.
  550. }
  551. kHIThemeTabAdornmentNone = 0;
  552. {
  553. * A focus ring is to be drawn around the tab.
  554. }
  555. kHIThemeTabAdornmentFocus = 1 shl 2; { to match button focus adornment }
  556. {
  557. * If available, a leading separator is to be drawn on the tab,
  558. * either to the left or above, depending on orientation. Note that
  559. * tabs overlap and if the separators are drawn over top each other,
  560. * the shadows multiply undesirably. New in Mac OS X 10.4.
  561. }
  562. kHIThemeTabAdornmentLeadingSeparator = 1 shl 3;
  563. {
  564. * If available, a right separator is to be drawn on the tab, either
  565. * to the right or below, depending on the orientation. Note that
  566. * tabs overlap and if the separators are drawn over top each other,
  567. * the shadows multiply undesirably. New in Mac OS X 10.4.
  568. }
  569. kHIThemeTabAdornmentTrailingSeparator = 1 shl 4;
  570. type
  571. HIThemeTabAdornment = UInt32;
  572. {
  573. * Summary:
  574. * These values are similar to kControlSize constants for
  575. * convenience.
  576. }
  577. const
  578. {
  579. * The tabs are normal (large) sized.
  580. }
  581. kHIThemeTabSizeNormal = 0;
  582. {
  583. * The tabs are drawn as the small variant.
  584. }
  585. kHIThemeTabSizeSmall = 1;
  586. {
  587. * The tabs are drawn as the mini variant.
  588. }
  589. kHIThemeTabSizeMini = 3;
  590. type
  591. HIThemeTabSize = UInt32;
  592. {
  593. * Summary:
  594. * Available values for HIThemeTabPosition. These are positions of
  595. * the tabs within the tab control. New in Mac OS X 10.4.
  596. }
  597. const
  598. {
  599. * The first position of a tab control. Left or top tab.
  600. }
  601. kHIThemeTabPositionFirst = 0;
  602. {
  603. * A middle tab.
  604. }
  605. kHIThemeTabPositionMiddle = 1;
  606. {
  607. * The last position of a tab control. Right or bottom tab.
  608. }
  609. kHIThemeTabPositionLast = 2;
  610. {
  611. * The only position of a tab control. It is simultaneously first and
  612. * last. You know, only. There is only one tab. It looks pretty much
  613. * like a button. Please don't use this if you can avoid it. It's
  614. * ugly.
  615. }
  616. kHIThemeTabPositionOnly = 3;
  617. type
  618. HIThemeTabPosition = UInt32;
  619. {
  620. * Summary:
  621. * Available values for HIThemeTabKind.
  622. }
  623. const
  624. kHIThemeTabKindNormal = 0;
  625. type
  626. HIThemeTabKind = UInt32;
  627. {
  628. * HIThemeTabDrawInfo
  629. *
  630. * Summary:
  631. * Drawing parameters passed to tab drawing and measuring theme APIs.
  632. *
  633. * Discussion:
  634. * In Mac OS X 10.4, added kind and position fields.
  635. }
  636. type
  637. HIThemeTabDrawInfo = record
  638. {
  639. * The version of this data structure. Currently, it is always 1.
  640. }
  641. version: UInt32;
  642. {
  643. * A ThemeTabStyle describing the style of the tab to be drawn.
  644. }
  645. style: ThemeTabStyle;
  646. {
  647. * A ThemeTabDirection describing the side on which the tab is being
  648. * drawn.
  649. }
  650. direction: ThemeTabDirection;
  651. {
  652. * An HIThemeTabSize indicating what size of tab to draw.
  653. }
  654. size: HIThemeTabSize;
  655. {
  656. * An HIThemeTabAdornment describing any additional adornments that
  657. * are to be drawn on the tab.
  658. }
  659. adornment: HIThemeTabAdornment; { various tab attributes }
  660. {
  661. * An HIThemeTabKind indicating what kind of tab to draw.
  662. }
  663. kind: HIThemeTabKind;
  664. {
  665. * The HIThemeTabPositions of the tab to be drawn or measured.
  666. }
  667. position: HIThemeTabPosition;
  668. end;
  669. HIThemeTabDrawInfoPtr = ^HIThemeTabDrawInfo;
  670. {
  671. * HIThemeTabDrawInfoVersionZero
  672. *
  673. * Summary:
  674. * This structure is left here as a reference to the previous
  675. * version of the tab drawing parameters. Please use the current
  676. * version.
  677. *
  678. * Discussion:
  679. * Shipped with Mac OS X 10.3.
  680. }
  681. type
  682. HIThemeTabDrawInfoVersionZero = record
  683. version: UInt32;
  684. style: ThemeTabStyle;
  685. direction: ThemeTabDirection;
  686. size: HIThemeTabSize;
  687. adornment: HIThemeTabAdornment; { various tab attributes }
  688. end;
  689. {
  690. * Summary:
  691. * Values for HIThemeTabPaneAdornment.
  692. }
  693. const
  694. kHIThemeTabPaneAdornmentNormal = 0;
  695. type
  696. HIThemeTabPaneAdornment = UInt32;
  697. {
  698. * HIThemeTabPaneDrawInfo
  699. *
  700. * Summary:
  701. * Drawing parameters passed to tab pane drawing and measuring theme
  702. * APIs.
  703. *
  704. * Discussion:
  705. * In Mac OS X 10.4, added kind and adornment fields.
  706. }
  707. type
  708. HIThemeTabPaneDrawInfo = record
  709. {
  710. * The version of this data structure. Currently, it is always 1.
  711. }
  712. version: UInt32;
  713. {
  714. * The ThemeDrawState for the tab pane to be drawn.
  715. }
  716. state: ThemeDrawState;
  717. {
  718. * A ThemeTabDirection describing on which side of the pane the tabs
  719. * will be drawn.
  720. }
  721. direction: ThemeTabDirection;
  722. {
  723. * An HIThemeTabSize indicating what size of tab pane to draw.
  724. }
  725. size: HIThemeTabSize;
  726. {
  727. * An HIThemeTabKind indicating what kind of tab to draw this pane
  728. * for.
  729. }
  730. kind: HIThemeTabKind;
  731. {
  732. * An HIThemeTabPaneAdornment describing any additional adornments
  733. * that are to be drawn on the tab pane.
  734. }
  735. adornment: HIThemeTabPaneAdornment;
  736. end;
  737. {
  738. * HIThemeTabPaneDrawInfoVersionZero
  739. *
  740. * Summary:
  741. * This structure is left here as a reference to the previous
  742. * version of the tab pane drawing parameters. Please use the
  743. * current version.
  744. *
  745. * Discussion:
  746. * Shipped with Mac OS X 10.3.
  747. }
  748. type
  749. HIThemeTabPaneDrawInfoVersionZero = record
  750. version: UInt32;
  751. state: ThemeDrawState;
  752. direction: ThemeTabDirection;
  753. size: HIThemeTabSize;
  754. end;
  755. const
  756. {
  757. * Available in Mac OS X 10.3 and later. Valid fields for this
  758. * version are version and menuType.
  759. }
  760. kHIThemeMenuDrawInfoVersionZero = 0;
  761. {
  762. * Available in Mac OS X 10.5 and later. Valid fields for this
  763. * version are all those in the zero version as well as the
  764. * menuDirection field.
  765. }
  766. kHIThemeMenuDrawInfoVersionOne = 1001;
  767. {
  768. * HIThemeMenuDrawInfo
  769. *
  770. * Summary:
  771. * Drawing parameters passed to menu drawing and measuring theme
  772. * APIs.
  773. *
  774. * Discussion:
  775. * New in Mac OS X 10.3; revised in Mac OS X 10.5.
  776. }
  777. type
  778. HIThemeMenuDrawInfo = record
  779. {
  780. * The version of this data structure. Use
  781. * kHIThemeMenuDrawInfoVersionZero or kHIThemeMenuDrawInfoVersionOne.
  782. }
  783. version: UInt32;
  784. {
  785. * A ThemeMenuType indicating which type of menu is to be drawn.
  786. }
  787. menuType: ThemeMenuType;
  788. {
  789. * Must be zero.
  790. }
  791. reserved1: UNSIGNEDLONG;
  792. {
  793. * Must be zero.
  794. }
  795. reserved2: CGFloat;
  796. {
  797. * kHIMenuRightDirection or kHIMenuLeftDirection as declared in
  798. * <CarbonEvents.h>. Only interpreted if the version is
  799. * kHIThemeMenuDrawInfoVersionOne and the menu type is hierarchical.
  800. }
  801. menuDirection: UInt32;
  802. {
  803. * Must be zero.
  804. }
  805. reserved3: CGFloat;
  806. {
  807. * Must be zero.
  808. }
  809. reserved4: CGFloat;
  810. end;
  811. HIThemeMenuDrawInfoPtr = ^HIThemeMenuDrawInfo;
  812. {
  813. * HIThemeMenuDrawInfoVersionZero
  814. *
  815. * Summary:
  816. * Drawing parameters passed to menu drawing and measuring theme
  817. * APIs.
  818. *
  819. * Discussion:
  820. * New in Mac OS X 10.3.
  821. }
  822. type
  823. HIThemeMenuDrawInfoVersionZero = record
  824. {
  825. * The version of this data structure. Always 0.
  826. }
  827. version: UInt32;
  828. {
  829. * A ThemeMenuType indicating which type of menu is to be drawn.
  830. }
  831. menuType: ThemeMenuType;
  832. end;
  833. HIThemeMenuDrawInfoVersionZeroPtr = ^HIThemeMenuDrawInfoVersionZero;
  834. {
  835. * HIThemeMenuItemDrawInfo
  836. *
  837. * Summary:
  838. * Drawing parameters passed to menu item drawing and measuring
  839. * theme APIs.
  840. *
  841. * Discussion:
  842. * New in Mac OS X 10.3.
  843. }
  844. type
  845. HIThemeMenuItemDrawInfo = record
  846. {
  847. * The version of this data structure. Currently, it is always 0.
  848. }
  849. version: UInt32;
  850. {
  851. * A ThemeMenuItemType indicating what type of menu item is to be
  852. * drawn.
  853. }
  854. itemType: ThemeMenuItemType;
  855. {
  856. * The ThemeMenuState of the menu item to be drawn.
  857. }
  858. state: ThemeMenuState;
  859. end;
  860. HIThemeMenuItemDrawInfoPtr = ^HIThemeMenuItemDrawInfo;
  861. {
  862. * HIThemeFrameDrawInfo
  863. *
  864. * Summary:
  865. * Drawing parameters passed to frame drawing and measuring theme
  866. * APIs.
  867. *
  868. * Discussion:
  869. * New in Mac OS X 10.3.
  870. }
  871. type
  872. HIThemeFrameDrawInfo = record
  873. {
  874. * The version of this data structure. Currently, it is always 0.
  875. }
  876. version: UInt32;
  877. {
  878. * The HIThemeFrameKind of the frame to be drawn.
  879. }
  880. kind: HIThemeFrameKind;
  881. {
  882. * The ThemeDrawState of the frame to be drawn.
  883. }
  884. state: ThemeDrawState;
  885. {
  886. * A Boolean indicating whether the frame is to be drawn with focus
  887. * or without.
  888. }
  889. isFocused: Boolean;
  890. end;
  891. HIThemeFrameDrawInfoPtr = ^HIThemeFrameDrawInfo;
  892. {
  893. * HIThemeGroupBoxDrawInfo
  894. *
  895. * Summary:
  896. * Drawing parameters passed to group box drawing and measuring
  897. * theme APIs.
  898. *
  899. * Discussion:
  900. * New in Mac OS X 10.3.
  901. }
  902. type
  903. HIThemeGroupBoxDrawInfo = record
  904. {
  905. * The version of this data structure. Currently, it is always 0.
  906. }
  907. version: UInt32;
  908. {
  909. * The ThemeDrawState for the group box to be drawn.
  910. }
  911. state: ThemeDrawState;
  912. {
  913. * An HIThemeGroupBoxKind indicating which type of group box is to be
  914. * drawn.
  915. }
  916. kind: HIThemeGroupBoxKind;
  917. end;
  918. HIThemeGroupBoxDrawInfoPtr = ^HIThemeGroupBoxDrawInfo;
  919. {
  920. * HIThemeGrabberDrawInfo
  921. *
  922. * Summary:
  923. * Drawing parameters passed to grabber drawing and measuring theme
  924. * APIs.
  925. *
  926. * Discussion:
  927. * New in Mac OS X 10.3.
  928. }
  929. type
  930. HIThemeGrabberDrawInfo = record
  931. {
  932. * The version of this data structure. Currently, it is always 0.
  933. }
  934. version: UInt32;
  935. {
  936. * The ThemeDrawState for the grabber to be drawn.
  937. }
  938. state: ThemeDrawState;
  939. end;
  940. HIThemeGrabberDrawInfoPtr = ^HIThemeGrabberDrawInfo;
  941. {
  942. * HIThemePlacardDrawInfo
  943. *
  944. * Summary:
  945. * Drawing parameters passed to placard drawing and measuring theme
  946. * APIs.
  947. *
  948. * Discussion:
  949. * New in Mac OS X 10.3.
  950. }
  951. type
  952. HIThemePlacardDrawInfo = record
  953. {
  954. * The version of this data structure. Currently, it is always 0.
  955. }
  956. version: UInt32;
  957. {
  958. * The ThemeDrawState for the placard to be drawn.
  959. }
  960. state: ThemeDrawState;
  961. end;
  962. HIThemePlacardDrawInfoPtr = ^HIThemePlacardDrawInfo;
  963. {
  964. * HIThemeHeaderDrawInfo
  965. *
  966. * Summary:
  967. * Drawing parameters passed to header drawing and measuring theme
  968. * APIs.
  969. *
  970. * Discussion:
  971. * New in Mac OS X 10.3.
  972. }
  973. type
  974. HIThemeHeaderDrawInfo = record
  975. {
  976. * The version of this data structure. Currently, it is always 0.
  977. }
  978. version: UInt32;
  979. {
  980. * The ThemeDrawState for the header to be drawn.
  981. }
  982. state: ThemeDrawState;
  983. {
  984. * The HIThemeHeaderKind for the header to be drawn.
  985. }
  986. kind: HIThemeHeaderKind;
  987. end;
  988. HIThemeHeaderDrawInfoPtr = ^HIThemeHeaderDrawInfo;
  989. {
  990. * HIThemeMenuBarDrawInfo
  991. *
  992. * Summary:
  993. * Drawing parameters passed to HIThemeDrawMenuBarBackground.
  994. *
  995. * Discussion:
  996. * New in Mac OS X 10.3.
  997. }
  998. type
  999. HIThemeMenuBarDrawInfo = record
  1000. {
  1001. * The version of this data structure. Currently, it is always 0.
  1002. }
  1003. version: UInt32;
  1004. {
  1005. * The ThemeMenuBarState for the menu bar to be drawn.
  1006. }
  1007. state: ThemeMenuBarState;
  1008. {
  1009. * The attributes of the menu bar to be drawn.
  1010. }
  1011. attributes: OptionBits;
  1012. end;
  1013. HIThemeMenuBarDrawInfoPtr = ^HIThemeMenuBarDrawInfo;
  1014. {
  1015. * HIThemeMenuTitleDrawInfo
  1016. *
  1017. * Summary:
  1018. * Drawing parameters passed to HIThemeDrawMenuTitle.
  1019. *
  1020. * Discussion:
  1021. * New in Mac OS X 10.3.
  1022. }
  1023. type
  1024. HIThemeMenuTitleDrawInfo = record
  1025. {
  1026. * The version of this data structure. Currently, it is always 0.
  1027. }
  1028. version: UInt32;
  1029. {
  1030. * The ThemeMenuState for the menu title to be drawn.
  1031. }
  1032. state: ThemeMenuState;
  1033. {
  1034. * The attributes of the menu title to be drawn. Must be either 0 or
  1035. * kHIThemeMenuTitleDrawCondensed.
  1036. }
  1037. attributes: OptionBits;
  1038. {
  1039. * The border space between the menu title rect and the menu title
  1040. * text when the menu title spacing is being condensed. This field is
  1041. * only observed by the Appearance Manager when the attributes field
  1042. * contains kHIThemeMenuTitleDrawCondensed. The valid values for this
  1043. * field range from the value returned by GetThemeMenuTitleExtra(
  1044. * &extra, false ) to the value returned by GetThemeMenuTitleExtra(
  1045. * &extra, true ). You may pass 0 in this field to use the minimum
  1046. * condensed title extra.
  1047. }
  1048. condensedTitleExtra: CGFloat;
  1049. end;
  1050. HIThemeMenuTitleDrawInfoPtr = ^HIThemeMenuTitleDrawInfo;
  1051. {
  1052. * HIThemeTickMarkDrawInfo
  1053. *
  1054. * Summary:
  1055. * Drawing parameters passed to tick mark drawing and measuring
  1056. * theme APIs.
  1057. *
  1058. * Discussion:
  1059. * New in Mac OS X 10.3.
  1060. }
  1061. type
  1062. HIThemeTickMarkDrawInfo = record
  1063. {
  1064. * The version of this data structure. Currently, it is always 0.
  1065. }
  1066. version: UInt32;
  1067. {
  1068. * The ThemeDrawState for the tick mark to be drawn.
  1069. }
  1070. state: ThemeDrawState;
  1071. end;
  1072. HIThemeTickMarkDrawInfoPtr = ^HIThemeTickMarkDrawInfo;
  1073. {
  1074. * HIThemeWindowDrawInfo
  1075. *
  1076. * Summary:
  1077. * Drawing parameters passed to window drawing and measuring theme
  1078. * APIs.
  1079. *
  1080. * Discussion:
  1081. * New in Mac OS X 10.3, but based on legacy ThemeWindowMetrics.
  1082. }
  1083. type
  1084. HIThemeWindowDrawInfo = record
  1085. {
  1086. * The version of this data structure. Currently, it is always 0.
  1087. }
  1088. version: UInt32;
  1089. {
  1090. * A ThemeDrawState which describes the state of the window to be
  1091. * drawn.
  1092. }
  1093. state: ThemeDrawState;
  1094. {
  1095. * A ThemeWindowType specifying the type of window to be drawn.
  1096. }
  1097. windowType: ThemeWindowType;
  1098. {
  1099. * The ThemeWindowAttributes describing the window to be drawn.
  1100. }
  1101. attributes: ThemeWindowAttributes;
  1102. {
  1103. * The height of the title of the window.
  1104. }
  1105. titleHeight: CGFloat;
  1106. {
  1107. * The width of the title of the window.
  1108. }
  1109. titleWidth: CGFloat;
  1110. end;
  1111. HIThemeWindowDrawInfoPtr = ^HIThemeWindowDrawInfo;
  1112. {
  1113. * HIThemeWindowWidgetDrawInfo
  1114. *
  1115. * Summary:
  1116. * Drawing parameters passed to window widget drawing and measuring
  1117. * theme APIs.
  1118. *
  1119. * Discussion:
  1120. * New in Mac OS X 10.3, but based on legacy ThemeWindowMetrics.
  1121. }
  1122. type
  1123. HIThemeWindowWidgetDrawInfo = record
  1124. {
  1125. * The version of this data structure. Currently, it is always 0.
  1126. }
  1127. version: UInt32;
  1128. {
  1129. * A ThemeDrawState which describes the state of the widget to be
  1130. * drawn.
  1131. }
  1132. widgetState: ThemeDrawState;
  1133. {
  1134. * A ThemeTitleBarWidget specifying the type of window widget to be
  1135. * drawn.
  1136. }
  1137. widgetType: ThemeTitleBarWidget;
  1138. {
  1139. * A ThemeDrawState which describes the state of the window for which
  1140. * the widget is to be drawn.
  1141. }
  1142. windowState: ThemeDrawState;
  1143. {
  1144. * A ThemeWindowType specifying the type of window to be drawn.
  1145. }
  1146. windowType: ThemeWindowType;
  1147. {
  1148. * The ThemeWindowAttributes describing the window to be drawn.
  1149. }
  1150. attributes: ThemeWindowAttributes;
  1151. {
  1152. * The height of the title of the window.
  1153. }
  1154. titleHeight: CGFloat;
  1155. {
  1156. * The width of the title of the window.
  1157. }
  1158. titleWidth: CGFloat;
  1159. end;
  1160. HIThemeWindowWidgetDrawInfoPtr = ^HIThemeWindowWidgetDrawInfo;
  1161. {
  1162. * HIThemeSeparatorDrawInfo
  1163. *
  1164. * Summary:
  1165. * Drawing parameters passed to separator drawing and measuring
  1166. * theme APIs.
  1167. *
  1168. * Discussion:
  1169. * New in Mac OS X 10.3.
  1170. }
  1171. type
  1172. HIThemeSeparatorDrawInfo = record
  1173. {
  1174. * The version of this data structure. Currently, it is always 0.
  1175. }
  1176. version: UInt32;
  1177. {
  1178. * The ThemeDrawState for the separator to be drawn.
  1179. }
  1180. state: ThemeDrawState;
  1181. end;
  1182. HIThemeSeparatorDrawInfoPtr = ^HIThemeSeparatorDrawInfo;
  1183. {
  1184. * HIThemeScrollBarDelimitersDrawInfo
  1185. *
  1186. * Summary:
  1187. * Drawing parameters passed to separator drawing and measuring
  1188. * theme APIs.
  1189. *
  1190. * Discussion:
  1191. * New in Mac OS X 10.3.
  1192. }
  1193. type
  1194. HIThemeScrollBarDelimitersDrawInfo = record
  1195. {
  1196. * The version of this data structure. Currently, it is always 0.
  1197. }
  1198. version: UInt32;
  1199. {
  1200. * The ThemeDrawState for the separator to be drawn.
  1201. }
  1202. state: ThemeDrawState;
  1203. {
  1204. * A ThemeWindowType specifying the type of window for which to draw
  1205. * the delimiters.
  1206. }
  1207. windowType: ThemeWindowType;
  1208. {
  1209. * The ThemeWindowAttributes of the window for which the scroll bar
  1210. * delimters are to be drawn.
  1211. }
  1212. attributes: ThemeWindowAttributes;
  1213. end;
  1214. HIThemeScrollBarDelimitersDrawInfoPtr = ^HIThemeScrollBarDelimitersDrawInfo;
  1215. {
  1216. * HIThemeChasingArrowsDrawInfo
  1217. *
  1218. * Summary:
  1219. * Drawing parameters passed to chasing arrows drawing and measuring
  1220. * theme APIs.
  1221. *
  1222. * Discussion:
  1223. * New in Mac OS X 10.3.
  1224. }
  1225. type
  1226. HIThemeChasingArrowsDrawInfo = record
  1227. {
  1228. * The version of this data structure. Currently, it is always 0.
  1229. }
  1230. version: UInt32;
  1231. {
  1232. * The ThemeDrawState for the chasing arrows to be drawn.
  1233. }
  1234. state: ThemeDrawState;
  1235. {
  1236. * A UInt32 used to calculate which frame of the chasing arrow
  1237. * animation is to be drawn.
  1238. }
  1239. index: UInt32;
  1240. end;
  1241. HIThemeChasingArrowsDrawInfoPtr = ^HIThemeChasingArrowsDrawInfo;
  1242. {
  1243. * HIThemePopupArrowDrawInfo
  1244. *
  1245. * Summary:
  1246. * Drawing parameters passed to popup arrow drawing and measuring
  1247. * theme APIs.
  1248. *
  1249. * Discussion:
  1250. * New in Mac OS X 10.3.
  1251. }
  1252. type
  1253. HIThemePopupArrowDrawInfo = record
  1254. {
  1255. * The version of this data structure. Currently, it is always 0.
  1256. }
  1257. version: UInt32;
  1258. {
  1259. * The ThemeDrawState for the popup arrow to be drawn.
  1260. }
  1261. state: ThemeDrawState;
  1262. {
  1263. * A ThemeArrowOrientation for the orientation of the popup arrow to
  1264. * be drawn.
  1265. }
  1266. orientation: ThemeArrowOrientation;
  1267. {
  1268. * A ThemePopupArrowSize for the size of the popup arrow to be drawn.
  1269. }
  1270. size: ThemePopupArrowSize;
  1271. end;
  1272. HIThemePopupArrowDrawInfoPtr = ^HIThemePopupArrowDrawInfo;
  1273. {
  1274. * HIThemeGrowBoxDrawInfo
  1275. *
  1276. * Summary:
  1277. * Drawing parameters passed to grow box drawing and measuring theme
  1278. * APIs.
  1279. *
  1280. * Discussion:
  1281. * New in Mac OS X 10.3.
  1282. }
  1283. type
  1284. HIThemeGrowBoxDrawInfo = record
  1285. {
  1286. * The version of this data structure. Currently, it is always 0.
  1287. }
  1288. version: UInt32;
  1289. {
  1290. * The ThemeDrawState for the grow box to be drawn.
  1291. }
  1292. state: ThemeDrawState;
  1293. {
  1294. * A ThemeGrowBoxKind indicating in which kind of grow box to draw.
  1295. }
  1296. kind: HIThemeGrowBoxKind;
  1297. {
  1298. * A ThemeGrowDirection indicating in which direction the window will
  1299. * grow.
  1300. }
  1301. direction: ThemeGrowDirection;
  1302. {
  1303. * An HIThemeGrowBoxSize describing the size of the grow box to draw.
  1304. }
  1305. size: HIThemeGrowBoxSize;
  1306. end;
  1307. HIThemeGrowBoxDrawInfoPtr = ^HIThemeGrowBoxDrawInfo;
  1308. {
  1309. * HIThemeBackgroundDrawInfo
  1310. *
  1311. * Discussion:
  1312. * New in Mac OS X 10.3, but based on legacy TrackDrawInfo.
  1313. }
  1314. type
  1315. HIThemeBackgroundDrawInfo = record
  1316. {
  1317. * The version of this data structure. Currently, it is always 0.
  1318. }
  1319. version: UInt32;
  1320. {
  1321. * The ThemeDrawState of the background to be drawn.
  1322. }
  1323. state: ThemeDrawState;
  1324. {
  1325. * The ThemeBackgroundKind with which to fill the background.
  1326. }
  1327. kind: ThemeBackgroundKind;
  1328. end;
  1329. HIThemeBackgroundDrawInfoPtr = ^HIThemeBackgroundDrawInfo;
  1330. { -------------------------------------------------------------------------- }
  1331. { Buttons }
  1332. { -------------------------------------------------------------------------- }
  1333. {
  1334. * HIThemeDrawButton()
  1335. *
  1336. * Summary:
  1337. * Draw a themed button.
  1338. *
  1339. * Discussion:
  1340. * This generic button drawing theme primitive draws not just a push
  1341. * button, but all of the kinds of buttons described by
  1342. * ThemeButtonKind.
  1343. *
  1344. * Mac OS X threading:
  1345. * Not thread safe
  1346. *
  1347. * Parameters:
  1348. *
  1349. * inBounds:
  1350. * The HIRect in which to draw. Note that this API may draw
  1351. * outside of its bounds.
  1352. *
  1353. * inDrawInfo:
  1354. * An HIThemeButtonDrawInfo describing the button that will be
  1355. * drawn.
  1356. *
  1357. * inContext:
  1358. * The CG context in which the drawing is to be done.
  1359. *
  1360. * inOrientation:
  1361. * An HIThemeOrientation that describes the orientation of the
  1362. * passed in context.
  1363. *
  1364. * outLabelRect:
  1365. * A pointer to an HIRect into which to put the bounds of the
  1366. * label rect.
  1367. *
  1368. * Availability:
  1369. * Mac OS X: in version 10.3 and later in Carbon.framework
  1370. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1371. * Non-Carbon CFM: not available
  1372. }
  1373. function HIThemeDrawButton( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeButtonDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation; outLabelRect: HIRectPtr { can be NULL } ): OSStatus; external name '_HIThemeDrawButton';
  1374. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1375. {
  1376. * HIThemeGetButtonShape()
  1377. *
  1378. * Summary:
  1379. * Get a shape of a themed button.
  1380. *
  1381. * Discussion:
  1382. * This API was mistakenly named as a "Get" API. It behaves as
  1383. * "Copy" API. THE CALLER IS RESPONSIBLE FOR RELEASING THE RETURNED
  1384. * SHAPE.
  1385. *
  1386. * Mac OS X threading:
  1387. * Not thread safe
  1388. *
  1389. * Parameters:
  1390. *
  1391. * inBounds:
  1392. * An HIRect indicating where the button would be drawn.
  1393. *
  1394. * inDrawInfo:
  1395. * An HIThemeButtonDrawInfo describing the button that would be
  1396. * drawn.
  1397. *
  1398. * outShape:
  1399. * A pointer to an HIShapeRef which will be set to the shape of
  1400. * the button that would be drawn. It needs to be released by the
  1401. * caller.
  1402. *
  1403. * Availability:
  1404. * Mac OS X: in version 10.3 and later in Carbon.framework
  1405. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1406. * Non-Carbon CFM: not available
  1407. }
  1408. function HIThemeGetButtonShape( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeButtonDrawInfo; var outShape: HIShapeRef ): OSStatus; external name '_HIThemeGetButtonShape';
  1409. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1410. {
  1411. * HIThemeGetButtonContentBounds()
  1412. *
  1413. * Summary:
  1414. * Get the bounds of a themed button's content.
  1415. *
  1416. * Mac OS X threading:
  1417. * Not thread safe
  1418. *
  1419. * Parameters:
  1420. *
  1421. * inBounds:
  1422. * An HIRect indicating where the button would be drawn.
  1423. *
  1424. * inDrawInfo:
  1425. * An HIThemeButtonDrawInfo describing the button that would be
  1426. * drawn.
  1427. *
  1428. * outBounds:
  1429. * A pointer to an HIRect in which will be returned the rectangle
  1430. * of the button content bounds.
  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 HIThemeGetButtonContentBounds( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeButtonDrawInfo; var outBounds: HIRect ): OSStatus; external name '_HIThemeGetButtonContentBounds';
  1438. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1439. {
  1440. * HIThemeGetButtonBackgroundBounds()
  1441. *
  1442. * Summary:
  1443. * Get the bounds of the background of a themed button.
  1444. *
  1445. * Mac OS X threading:
  1446. * Not thread safe
  1447. *
  1448. * Parameters:
  1449. *
  1450. * inBounds:
  1451. * An HIRect indicating where the button would be drawn.
  1452. *
  1453. * inDrawInfo:
  1454. * An HIThemeButtonDrawInfo describing the button that would be
  1455. * drawn.
  1456. *
  1457. * outBounds:
  1458. * A pointer to an HIRect in which will be returned the rectangle
  1459. * of the button background bounds.
  1460. *
  1461. * Availability:
  1462. * Mac OS X: in version 10.3 and later in Carbon.framework
  1463. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1464. * Non-Carbon CFM: not available
  1465. }
  1466. function HIThemeGetButtonBackgroundBounds( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeButtonDrawInfo; var outBounds: HIRect ): OSStatus; external name '_HIThemeGetButtonBackgroundBounds';
  1467. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1468. {
  1469. * HIThemeDrawChasingArrows()
  1470. *
  1471. * Summary:
  1472. * Draw themed chasing arrows.
  1473. *
  1474. * Discussion:
  1475. * Draw a frame from the chasing arrows animation. The animation
  1476. * frame is based on a modulo value calculated from the index.
  1477. *
  1478. * Mac OS X threading:
  1479. * Not thread safe
  1480. *
  1481. * Parameters:
  1482. *
  1483. * inBounds:
  1484. * An HIRect indicating where the chasing arrows are to be drawn.
  1485. *
  1486. * inDrawInfo:
  1487. * An HIThemeChasingArrowsDrawInfo describing the chasing arrows
  1488. * to be drawn or measured.
  1489. *
  1490. * inContext:
  1491. * The CG context in which the drawing is to be done.
  1492. *
  1493. * inOrientation:
  1494. * An HIThemeOrientation that describes the orientation of the
  1495. * passed in context.
  1496. *
  1497. * Availability:
  1498. * Mac OS X: in version 10.3 and later in Carbon.framework
  1499. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1500. * Non-Carbon CFM: not available
  1501. }
  1502. function HIThemeDrawChasingArrows( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeChasingArrowsDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawChasingArrows';
  1503. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1504. {
  1505. * HIThemeDrawPopupArrow()
  1506. *
  1507. * Summary:
  1508. * Draws a themed popup arrow.
  1509. *
  1510. * Mac OS X threading:
  1511. * Not thread safe
  1512. *
  1513. * Parameters:
  1514. *
  1515. * inBounds:
  1516. * The HIRect in which to draw.
  1517. *
  1518. * inDrawInfo:
  1519. * An HIThemePopupArrowDrawInfo describing the popup arrow to be
  1520. * drawn or measured.
  1521. *
  1522. * inContext:
  1523. * The CG context in which the drawing is to be done.
  1524. *
  1525. * inOrientation:
  1526. * An HIThemeOrientation that describes the orientation of the
  1527. * passed in context.
  1528. *
  1529. * Availability:
  1530. * Mac OS X: in version 10.3 and later in Carbon.framework
  1531. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1532. * Non-Carbon CFM: not available
  1533. }
  1534. function HIThemeDrawPopupArrow( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemePopupArrowDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawPopupArrow';
  1535. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1536. { -------------------------------------------------------------------------- }
  1537. { Menus }
  1538. { -------------------------------------------------------------------------- }
  1539. {
  1540. * HIThemeDrawMenuBarBackground()
  1541. *
  1542. * Summary:
  1543. * Draws the menu bar background for a given area.
  1544. *
  1545. * Mac OS X threading:
  1546. * Not thread safe
  1547. *
  1548. * Parameters:
  1549. *
  1550. * inBounds:
  1551. * The HIRect in which to draw.
  1552. *
  1553. * inDrawInfo:
  1554. * The HIThemeMenuBarDrawInfo of the menu bar to be drawn.
  1555. *
  1556. * inContext:
  1557. * The CG context in which the drawing is to be done.
  1558. *
  1559. * inOrientation:
  1560. * An HIThemeOrientation that describes the orientation of the
  1561. * passed in context.
  1562. *
  1563. * Availability:
  1564. * Mac OS X: in version 10.3 and later in Carbon.framework
  1565. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1566. * Non-Carbon CFM: not available
  1567. }
  1568. function HIThemeDrawMenuBarBackground( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeMenuBarDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawMenuBarBackground';
  1569. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1570. {
  1571. * HIThemeDrawMenuTitle()
  1572. *
  1573. * Summary:
  1574. * Draws the menu title background for a menu.
  1575. *
  1576. * Discussion:
  1577. * This API draws the background of a menu title. It does not draw
  1578. * the menu title text; it is the caller's responsibility to draw
  1579. * the text after this API has returned. The text should be drawn
  1580. * into the bounds returned in the outLabelRect parameter; the
  1581. * caller should ensure that the text is not drawn outside of those
  1582. * bounds, either by truncating or clipping the text.
  1583. *
  1584. * Mac OS X threading:
  1585. * Not thread safe
  1586. *
  1587. * Parameters:
  1588. *
  1589. * inMenuBarRect:
  1590. * An HIRect indicating the bounds of the whole menu bar for which
  1591. * the menu title is to be drawn.
  1592. *
  1593. * inTitleRect:
  1594. * An HIRect for the bounds of the menu title to be drawn.
  1595. *
  1596. * inDrawInfo:
  1597. * The HIThemeMenuTitleDrawInfo of the menu title to be drawn.
  1598. *
  1599. * inContext:
  1600. * The CG context in which the drawing is to be done.
  1601. *
  1602. * inOrientation:
  1603. * An HIThemeOrientation that describes the orientation of the
  1604. * passed in context.
  1605. *
  1606. * outLabelRect:
  1607. * On exit, contains the bounds in which the menu title text
  1608. * should be drawn. May be NULL if you don't need this information.
  1609. *
  1610. * Availability:
  1611. * Mac OS X: in version 10.3 and later in Carbon.framework
  1612. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1613. * Non-Carbon CFM: not available
  1614. }
  1615. 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';
  1616. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1617. {
  1618. * HIThemeDrawMenuBackground()
  1619. *
  1620. * Summary:
  1621. * Draws the theme menu background in a rectangle. This API may
  1622. * draw outside of the specified rectangle.
  1623. *
  1624. * Mac OS X threading:
  1625. * Not thread safe
  1626. *
  1627. * Parameters:
  1628. *
  1629. * inMenuRect:
  1630. * An HIRect indicating the bounds of the whole menu for which the
  1631. * background is to be drawn.
  1632. *
  1633. * inMenuDrawInfo:
  1634. * An HIThemeMenuDrawInfo describing the menu to be drawn.
  1635. *
  1636. * inContext:
  1637. * The CG context in which the drawing is to be done.
  1638. *
  1639. * inOrientation:
  1640. * An HIThemeOrientation that describes the orientation of the
  1641. * passed in context.
  1642. *
  1643. * Availability:
  1644. * Mac OS X: in version 10.3 and later in Carbon.framework
  1645. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1646. * Non-Carbon CFM: not available
  1647. }
  1648. function HIThemeDrawMenuBackground( const (*var*) inMenuRect: HIRect; const (*var*) inMenuDrawInfo: HIThemeMenuDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawMenuBackground';
  1649. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1650. {
  1651. * HIThemeDrawMenuItem()
  1652. *
  1653. * Summary:
  1654. * Draws a themed menu item.
  1655. *
  1656. * Mac OS X threading:
  1657. * Not thread safe
  1658. *
  1659. * Parameters:
  1660. *
  1661. * inMenuRect:
  1662. * An HIRect indicating the bounds of the whole menu for which the
  1663. * menu item is to be drawn.
  1664. *
  1665. * inItemRect:
  1666. * An HIRect for the bounds of the menu item to be drawn.
  1667. *
  1668. * inItemDrawInfo:
  1669. * An HIThemeMenuItemDrawInfo describing the drawing
  1670. * characteristics of the menu item to be drawn.
  1671. *
  1672. * inContext:
  1673. * The CG context in which the drawing is to be done.
  1674. *
  1675. * inOrientation:
  1676. * An HIThemeOrientation that describes the orientation of the
  1677. * passed in context.
  1678. *
  1679. * outContentRect:
  1680. * An HIRect that will be filled with the rectangle describing
  1681. * where the menu item content is to be drawn.
  1682. *
  1683. * Availability:
  1684. * Mac OS X: in version 10.3 and later in Carbon.framework
  1685. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1686. * Non-Carbon CFM: not available
  1687. }
  1688. 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';
  1689. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1690. {
  1691. * HIThemeDrawMenuSeparator()
  1692. *
  1693. * Summary:
  1694. * Draws a themed menu separator.
  1695. *
  1696. * Mac OS X threading:
  1697. * Not thread safe
  1698. *
  1699. * Parameters:
  1700. *
  1701. * inMenuRect:
  1702. * An HIRect indicating the bounds of the whole menu for which the
  1703. * menu separator is to be drawn.
  1704. *
  1705. * inItemRect:
  1706. * An HIRect for the bounds of the menu separator to be drawn.
  1707. *
  1708. * inItemDrawInfo:
  1709. * An HIThemeMenuItemDrawInfo describing the drawing
  1710. * characteristics of the menu item to be drawn.
  1711. *
  1712. * inContext:
  1713. * The CG context in which the drawing is to be done.
  1714. *
  1715. * inOrientation:
  1716. * An HIThemeOrientation that describes the orientation of the
  1717. * passed in context.
  1718. *
  1719. * Availability:
  1720. * Mac OS X: in version 10.3 and later in Carbon.framework
  1721. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1722. * Non-Carbon CFM: not available
  1723. }
  1724. function HIThemeDrawMenuSeparator( const (*var*) inMenuRect: HIRect; const (*var*) inItemRect: HIRect; const (*var*) inItemDrawInfo: HIThemeMenuItemDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawMenuSeparator';
  1725. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1726. {
  1727. * HIThemeGetMenuBackgroundShape()
  1728. *
  1729. * Summary:
  1730. * Gets the shape of the background for a themed menu.
  1731. *
  1732. * Discussion:
  1733. * This shape can extend outside of the bounds of the specified
  1734. * rectangle.
  1735. *
  1736. * Mac OS X threading:
  1737. * Not thread safe
  1738. *
  1739. * Parameters:
  1740. *
  1741. * inMenuRect:
  1742. * An HIRect indicating the bounds of the menu for which the menu
  1743. * background is to be retrieved.
  1744. *
  1745. * inMenuDrawInfo:
  1746. * An HIThemeMenuDrawInfo describing the menu to be measured.
  1747. *
  1748. * outShape:
  1749. * A valid HIShape that will be cleared and filled with the shape
  1750. * of the menu background. It needs to be released by the caller.
  1751. *
  1752. * Availability:
  1753. * Mac OS X: in version 10.3 and later in Carbon.framework
  1754. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1755. * Non-Carbon CFM: not available
  1756. }
  1757. function HIThemeGetMenuBackgroundShape( const (*var*) inMenuRect: HIRect; const (*var*) inMenuDrawInfo: HIThemeMenuDrawInfo; var outShape: HIShapeRef ): OSStatus; external name '_HIThemeGetMenuBackgroundShape';
  1758. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1759. { -------------------------------------------------------------------------- }
  1760. { Segments }
  1761. { -------------------------------------------------------------------------- }
  1762. {
  1763. * Summary:
  1764. * Available values for HIThemeSegmentPosition. These are positions
  1765. * of the segments within the segmented view.
  1766. }
  1767. const
  1768. {
  1769. * The first position of a segmented view.
  1770. }
  1771. kHIThemeSegmentPositionFirst = 0;
  1772. {
  1773. * A middle segment.
  1774. }
  1775. kHIThemeSegmentPositionMiddle = 1;
  1776. {
  1777. * The last position of a segmented view.
  1778. }
  1779. kHIThemeSegmentPositionLast = 2;
  1780. {
  1781. * The only position of a segmented view. It is simultaneously first
  1782. * and last. You know, only. There is only one segment. It looks
  1783. * pretty much like a button. Please don't use this if you can avoid
  1784. * it. It's ugly.
  1785. }
  1786. kHIThemeSegmentPositionOnly = 3;
  1787. type
  1788. HIThemeSegmentPosition = UInt32;
  1789. {
  1790. * Summary:
  1791. * Available values for HIThemeSegmentKind available on Mac OS X
  1792. * 10.4 a later.
  1793. }
  1794. const
  1795. {
  1796. * The segment to use on non-textured windows. Do not use on textured
  1797. * windows.
  1798. }
  1799. kHIThemeSegmentKindNormal = 0;
  1800. {
  1801. * The textured segment. Use on textured windows.
  1802. }
  1803. kHIThemeSegmentKindTextured = 1;
  1804. {
  1805. * This is a synonym for kHIThemeSegmentKindTextured for code
  1806. * compatibility. Please use kHIThemeSegmentKindTextured instead.
  1807. }
  1808. kHIThemeSegmentKindInset = kHIThemeSegmentKindTextured;
  1809. type
  1810. HIThemeSegmentKind = UInt32;
  1811. {
  1812. * Summary:
  1813. * Available values for HIThemeSegmentSize.
  1814. }
  1815. const
  1816. {
  1817. * The normally sized segment.
  1818. }
  1819. kHIThemeSegmentSizeNormal = 0;
  1820. {
  1821. * The small segment. Not available as textured.
  1822. }
  1823. kHIThemeSegmentSizeSmall = 1;
  1824. {
  1825. * The mini segment. Not available as textured.
  1826. }
  1827. kHIThemeSegmentSizeMini = 3;
  1828. type
  1829. HIThemeSegmentSize = UInt32;
  1830. const
  1831. {
  1832. * No segment adornments are to be drawn.
  1833. }
  1834. kHIThemeSegmentAdornmentNone = 0;
  1835. {
  1836. * A focus ring is to be drawn around the segment.
  1837. }
  1838. kHIThemeSegmentAdornmentFocus = 1 shl 2; { to match button focus adornment }
  1839. {
  1840. * If available, a leading separator is to be drawn on the segment.
  1841. * Note that segments overlap and if the separators are drawn over
  1842. * top each other, the shadows multiply undesirably.
  1843. }
  1844. kHIThemeSegmentAdornmentLeadingSeparator = 1 shl 3;
  1845. {
  1846. * If available, a trailing separator is to be drawn on the segment.
  1847. * Note that segments overlap and if the separators are drawn over
  1848. * top each other, the shadows multiply undesirably.
  1849. }
  1850. kHIThemeSegmentAdornmentTrailingSeparator = 1 shl 4;
  1851. type
  1852. HIThemeSegmentAdornment = UInt32;
  1853. {
  1854. * HIThemeSegmentDrawInfo
  1855. *
  1856. * Summary:
  1857. * Drawing parameters passed to segment drawing and measuring theme
  1858. * APIs.
  1859. *
  1860. * Discussion:
  1861. * New in Mac OS X 10.4.
  1862. }
  1863. type
  1864. HIThemeSegmentDrawInfo = record
  1865. {
  1866. * The version of this data structure. Currently, it is always 0.
  1867. }
  1868. version: UInt32;
  1869. {
  1870. * The ThemeDrawState for the segment to be drawn or measured.
  1871. }
  1872. state: ThemeDrawState;
  1873. {
  1874. * The ThemeButtonValue of the segment to be drawn or measured.
  1875. }
  1876. value: ThemeButtonValue;
  1877. size: HIThemeSegmentSize;
  1878. {
  1879. * The HIThemeSegmentKind of the segment to be drawn or measured.
  1880. }
  1881. kind: HIThemeSegmentKind;
  1882. {
  1883. * The HIThemeSegmentPositions of the segment to be drawn or measured.
  1884. }
  1885. position: HIThemeSegmentPosition;
  1886. {
  1887. * The HIThemeSegmentAdornment of the segment to be drawn or measured.
  1888. }
  1889. adornment: HIThemeSegmentAdornment;
  1890. end;
  1891. HIThemeSegmentDrawInfoPtr = ^HIThemeSegmentDrawInfo;
  1892. {
  1893. * HIThemeDrawSegment()
  1894. *
  1895. * Summary:
  1896. * Draw a piece of a segmented view.
  1897. *
  1898. * Discussion:
  1899. * New in Mac OS X 10.4. Please note that segments can draw a
  1900. * separator outside of the specified bounds and the adornments of
  1901. * the individual segments must coordinate their drawing of
  1902. * separators (with the adornment field of the passed in
  1903. * HIThemeSegmentDrawInfo) to avoid overdrawing.
  1904. *
  1905. * Mac OS X threading:
  1906. * Not thread safe
  1907. *
  1908. * Parameters:
  1909. *
  1910. * inBounds:
  1911. * The bounds of the segment to be drawn.
  1912. *
  1913. * inDrawInfo:
  1914. * A HIThemeSegmentDrawInfo describing the segment to be drawn.
  1915. *
  1916. * inContext:
  1917. * The CG context in which the drawing is to be done.
  1918. *
  1919. * inOrientation:
  1920. * An HIThemeOrientation that describes the orientation of the
  1921. * passed in context.
  1922. *
  1923. * Availability:
  1924. * Mac OS X: in version 10.4 and later in Carbon.framework
  1925. * CarbonLib: not available in CarbonLib 1.x
  1926. * Non-Carbon CFM: not available
  1927. }
  1928. function HIThemeDrawSegment( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeSegmentDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawSegment';
  1929. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1930. { -------------------------------------------------------------------------- }
  1931. { Tabs }
  1932. { -------------------------------------------------------------------------- }
  1933. {
  1934. * HIThemeDrawTabPane()
  1935. *
  1936. * Summary:
  1937. * Draws a themed tab pane.
  1938. *
  1939. * Mac OS X threading:
  1940. * Not thread safe
  1941. *
  1942. * Parameters:
  1943. *
  1944. * inRect:
  1945. * The HIRect in which to draw the pane.
  1946. *
  1947. * inDrawInfo:
  1948. * The HIThemeTabPaneDrawInfo of the tab pane to be drawn.
  1949. *
  1950. * inContext:
  1951. * The CG context in which the drawing is to be done.
  1952. *
  1953. * inOrientation:
  1954. * An HIThemeOrientation that describes the orientation of the
  1955. * passed in context.
  1956. *
  1957. * Availability:
  1958. * Mac OS X: in version 10.3 and later in Carbon.framework
  1959. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1960. * Non-Carbon CFM: not available
  1961. }
  1962. function HIThemeDrawTabPane( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeTabPaneDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawTabPane';
  1963. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1964. {
  1965. * HIThemeDrawTab()
  1966. *
  1967. * Summary:
  1968. * Draw a themed tab.
  1969. *
  1970. * Mac OS X threading:
  1971. * Not thread safe
  1972. *
  1973. * Parameters:
  1974. *
  1975. * inRect:
  1976. * The HIRect in which to draw.
  1977. *
  1978. * inDrawInfo:
  1979. * An HIThemeTabDrawInfo describing the tab to be drawn.
  1980. *
  1981. * inContext:
  1982. * The CG context in which the drawing is to be done.
  1983. *
  1984. * inOrientation:
  1985. * An HIThemeOrientation that describes the orientation of the
  1986. * passed in context.
  1987. *
  1988. * outLabelRect:
  1989. * An HIRect into which to put the bounds of the label rect.
  1990. *
  1991. * Availability:
  1992. * Mac OS X: in version 10.3 and later in Carbon.framework
  1993. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1994. * Non-Carbon CFM: not available
  1995. }
  1996. function HIThemeDrawTab( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeTabDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation; outLabelRect: HIRectPtr { can be NULL } ): OSStatus; external name '_HIThemeDrawTab';
  1997. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1998. {
  1999. * HIThemeGetTabPaneDrawShape()
  2000. *
  2001. * Summary:
  2002. * Gets the shape of the draw area relative to the full bounds of
  2003. * the tab+pane.
  2004. *
  2005. * Discussion:
  2006. * This API was mistakenly named as a "Get" API. It behaves as
  2007. * "Copy" API. THE CALLER IS RESPONSIBLE FOR RELEASING THE RETURNED
  2008. * SHAPE.
  2009. *
  2010. * Mac OS X threading:
  2011. * Not thread safe
  2012. *
  2013. * Parameters:
  2014. *
  2015. * inRect:
  2016. * An HIRect indicating the entire tabs area for which the tab
  2017. * pane shape is to be retrieved.
  2018. *
  2019. * inDirection:
  2020. * A ThemeTabDirection describing on which side of the pane the
  2021. * tabs would be drawn.
  2022. *
  2023. * inTabSize:
  2024. * An HIThemeTabSize indicating the size of tab pane that would be
  2025. * drawn.
  2026. *
  2027. * outShape:
  2028. * A pointer to an HIShapeRef which will be set to the shape of
  2029. * the draw area. It needs to be released by the caller.
  2030. *
  2031. * Availability:
  2032. * Mac OS X: in version 10.3 and later in Carbon.framework
  2033. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2034. * Non-Carbon CFM: not available
  2035. }
  2036. function HIThemeGetTabPaneDrawShape( const (*var*) inRect: HIRect; inDirection: ThemeTabDirection; inTabSize: HIThemeTabSize; var outShape: HIShapeRef ): OSStatus; external name '_HIThemeGetTabPaneDrawShape';
  2037. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2038. {
  2039. * HIThemeGetTabPaneContentShape()
  2040. *
  2041. * Summary:
  2042. * Gets the shape of the content area relative to the full bounds of
  2043. * the tab+pane.
  2044. *
  2045. * Discussion:
  2046. * This API was mistakenly named as a "Get" API. It behaves as
  2047. * "Copy" API. THE CALLER IS RESPONSIBLE FOR RELEASING THE RETURNED
  2048. * SHAPE.
  2049. *
  2050. * Mac OS X threading:
  2051. * Not thread safe
  2052. *
  2053. * Parameters:
  2054. *
  2055. * inRect:
  2056. * An HIRect indicating the entire tabs area for which the tab
  2057. * content shape is to be retrieved.
  2058. *
  2059. * inDirection:
  2060. * A ThemeTabDirection describing on which side of the pane the
  2061. * tabs would be drawn.
  2062. *
  2063. * inTabSize:
  2064. * An HIThemeTabSize indicating what size of tab pane that would
  2065. * be drawn.
  2066. *
  2067. * outShape:
  2068. * A pointer to an HIShapeRef which will be set to the shape of
  2069. * the draw content. It needs to be released by the caller.
  2070. *
  2071. * Availability:
  2072. * Mac OS X: in version 10.3 and later in Carbon.framework
  2073. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2074. * Non-Carbon CFM: not available
  2075. }
  2076. function HIThemeGetTabPaneContentShape( const (*var*) inRect: HIRect; inDirection: ThemeTabDirection; inTabSize: HIThemeTabSize; var outShape: HIShapeRef ): OSStatus; external name '_HIThemeGetTabPaneContentShape';
  2077. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2078. {
  2079. * HIThemeGetTabDrawShape()
  2080. *
  2081. * Summary:
  2082. * Gets the shape of the tab drawing area relative to the full
  2083. * bounds of the tab+pane.
  2084. *
  2085. * Discussion:
  2086. * This API was mistakenly named as a "Get" API. It behaves as
  2087. * "Copy" API. THE CALLER IS RESPONSIBLE FOR RELEASING THE RETURNED
  2088. * SHAPE.
  2089. *
  2090. * Mac OS X threading:
  2091. * Not thread safe
  2092. *
  2093. * Parameters:
  2094. *
  2095. * inRect:
  2096. * An HIRect indicating the entire tab+pane area for which the tab
  2097. * shape is to be retrieved.
  2098. *
  2099. * inDrawInfo:
  2100. * An HIThemeTabDrawInfo describing the tab that would be drawn.
  2101. *
  2102. * outShape:
  2103. * A pointer to an HIShapeRef which will be set to the shape of
  2104. * the tab drawing area. It needs to be released by the caller.
  2105. *
  2106. * Availability:
  2107. * Mac OS X: in version 10.3 and later in Carbon.framework
  2108. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2109. * Non-Carbon CFM: not available
  2110. }
  2111. function HIThemeGetTabDrawShape( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeTabDrawInfo; var outShape: HIShapeRef ): OSStatus; external name '_HIThemeGetTabDrawShape';
  2112. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2113. {
  2114. * HIThemeGetTabShape()
  2115. *
  2116. * Summary:
  2117. * Gets the shape for a themed tab.
  2118. *
  2119. * Discussion:
  2120. * This API was mistakenly named as a "Get" API. It behaves as
  2121. * "Copy" API. THE CALLER IS RESPONSIBLE FOR RELEASING THE RETURNED
  2122. * SHAPE.
  2123. *
  2124. * Mac OS X threading:
  2125. * Not thread safe
  2126. *
  2127. * Parameters:
  2128. *
  2129. * inRect:
  2130. * An HIRect indicating the entire tabs area for which the tab
  2131. * shape is to be retrieved.
  2132. *
  2133. * inDrawInfo:
  2134. * An HIThemeTabDrawInfo describing the tab that would be drawn.
  2135. *
  2136. * outShape:
  2137. * A pointer to an HIShapeRef which will be set to the shape of
  2138. * the tab. It needs to be released by the caller.
  2139. *
  2140. * Availability:
  2141. * Mac OS X: in version 10.3 and later in Carbon.framework
  2142. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2143. * Non-Carbon CFM: not available
  2144. }
  2145. function HIThemeGetTabShape( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeTabDrawInfo; var outShape: HIShapeRef ): OSStatus; external name '_HIThemeGetTabShape';
  2146. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2147. { -------------------------------------------------------------------------- }
  2148. { Text }
  2149. { -------------------------------------------------------------------------- }
  2150. const
  2151. {
  2152. * Don't truncate the measured or drawn text.
  2153. }
  2154. kHIThemeTextTruncationNone = 0;
  2155. {
  2156. * During measure or draw, if the text will not fit within the
  2157. * available bounds, truncate the text in the middle of the last
  2158. * visible line.
  2159. }
  2160. kHIThemeTextTruncationMiddle = 1;
  2161. {
  2162. * During measure or draw, if the text will not fit within the
  2163. * available bounds, truncate the text at the end of the last visible
  2164. * line.
  2165. }
  2166. kHIThemeTextTruncationEnd = 2;
  2167. kHIThemeTextTruncationDefault = 3;
  2168. type
  2169. HIThemeTextTruncation = UInt32;
  2170. const
  2171. {
  2172. * The text will be drawn flush with the left side of the bounding
  2173. * box.
  2174. }
  2175. kHIThemeTextHorizontalFlushLeft = 0;
  2176. {
  2177. * The text will be centered within the bounding box.
  2178. }
  2179. kHIThemeTextHorizontalFlushCenter = 1;
  2180. {
  2181. * The text will be drawn flush with the right side of the bounding
  2182. * box.
  2183. }
  2184. kHIThemeTextHorizontalFlushRight = 2;
  2185. kHIThemeTextHorizontalFlushDefault = 3;
  2186. type
  2187. HIThemeTextHorizontalFlush = UInt32;
  2188. const
  2189. {
  2190. * Draw the text vertically flush with the top of the box
  2191. }
  2192. kHIThemeTextVerticalFlushTop = 0;
  2193. {
  2194. * Vertically center the text
  2195. }
  2196. kHIThemeTextVerticalFlushCenter = 1;
  2197. {
  2198. * Draw the text vertically flush with the bottom of the box
  2199. }
  2200. kHIThemeTextVerticalFlushBottom = 2;
  2201. kHIThemeTextVerticalFlushDefault = 3;
  2202. type
  2203. HIThemeTextVerticalFlush = UInt32;
  2204. const
  2205. kHIThemeTextBoxOptionNone = 0;
  2206. {
  2207. * Is the text strongly vertical? This option bit is not correctly
  2208. * respected and will have no effect if used.
  2209. }
  2210. kHIThemeTextBoxOptionStronglyVertical = 1 shl 1;
  2211. {
  2212. * Draw the text with an engraved look, suitable for use on the Mac
  2213. * OS X 10.5 dark window backgrounds or on the bodies of some
  2214. * controls.
  2215. }
  2216. kHIThemeTextBoxOptionEngraved = 1 shl 2;
  2217. {
  2218. * By default, HIThemeDrawTextBox will clip the text to the rectangle
  2219. * specified by the inBounds parameter. With some fonts or styles,
  2220. * text may draw outside of the drawing rectangle and will be
  2221. * clipped. If this bit is set, HIThemeDrawTextBox will not clip
  2222. * drawing to its inBounds parameter. Available in Mac OS X 10.4 and
  2223. * later.
  2224. }
  2225. kHIThemeTextBoxOptionDontClip = 1 shl 18;
  2226. type
  2227. HIThemeTextBoxOptions = OptionBits;
  2228. const
  2229. {
  2230. * Available in Mac OS X 10.3 and later. Valid fields for this
  2231. * version are version, state, fontID, horizontalFlushness,
  2232. * verticalFlushness, options, truncationPosition, truncationMaxLines
  2233. * and truncationHappened.
  2234. }
  2235. kHIThemeTextInfoVersionZero = 0;
  2236. {
  2237. * Available in Mac OS X 10.5 and later. Valid fields for this
  2238. * version are all those in the zero version as well as the font
  2239. * field.
  2240. }
  2241. kHIThemeTextInfoVersionOne = 1;
  2242. {
  2243. * HIThemeTextInfo
  2244. *
  2245. * Summary:
  2246. * Drawing parameters passed to text drawing and measuring theme
  2247. * APIs.
  2248. *
  2249. * Discussion:
  2250. * New in Mac OS X 10.3, this structure is used for measuring and
  2251. * drawing text with the HIThemeGetTextDimensions and
  2252. * HIThemeDrawTextBox APIs. If truncationPosition is
  2253. * kHIThemeTextTruncationNone, the other fields with the truncation
  2254. * prefix are ignored.
  2255. }
  2256. type
  2257. HIThemeTextInfo = record
  2258. {
  2259. * The version of this data structure. Currently, it is always 1.
  2260. }
  2261. version: UInt32;
  2262. {
  2263. * The theme draw state in which to draw the string.
  2264. }
  2265. state: ThemeDrawState;
  2266. {
  2267. * The font in which to draw the string.
  2268. }
  2269. fontID: ThemeFontID;
  2270. {
  2271. * The horizontal flushness of the text. One of the
  2272. * kHIThemeTextHorizontalFlush[Left/Center/Right] constants. When
  2273. * this structure is used for HIThemeGetTextDimensions, this field
  2274. * has no effect on the returned dimensions. However, providing the
  2275. * same flushness that will be used with a subsequent draw will
  2276. * trigger a performance optimization.
  2277. }
  2278. horizontalFlushness: HIThemeTextHorizontalFlush;
  2279. {
  2280. * The vertical flushness of the text. One of the
  2281. * kHIThemeTextVerticalFlush[Top/Center/Bottom] constants. When this
  2282. * paramblock is used for HIThemeGetTextDimensions, this field has no
  2283. * effect on the returned dimensions. However, providing the same
  2284. * flushness that will be used with a subsequent draw will trigger a
  2285. * performance optimization.
  2286. }
  2287. verticalFlushness: HIThemeTextVerticalFlush;
  2288. {
  2289. * Currently, the only option available is for strongly vertical text
  2290. * with the kThemeTextBoxOptionStronglyVertical option bit.
  2291. }
  2292. options: HIThemeTextBoxOptions;
  2293. {
  2294. * Specifies where truncation should occur. If this field is
  2295. * kHIThemeTextTruncationNone, no truncation will occur, and all
  2296. * fields with the truncation prefix will be ignored.
  2297. }
  2298. truncationPosition: HIThemeTextTruncation;
  2299. {
  2300. * The maximum number of lines to measure or draw before truncation
  2301. * occurs. Ignored if truncationPosition is
  2302. * kHIThemeTextTruncationNone.
  2303. }
  2304. truncationMaxLines: UInt32;
  2305. {
  2306. * On output, if the text has been truncated, this is set to true. If
  2307. * the text fit completely within the parameters specified and the
  2308. * text was not truncated, this is set to false.
  2309. }
  2310. truncationHappened: Boolean;
  2311. filler1: UInt8;
  2312. {
  2313. * If fontID is kThemeSpecifiedFont and the version is 1, this
  2314. * CTFontRef will be used for measuring and rendering of the string.
  2315. * If the fontID is anything other than kThemeSpecifiedFont or the
  2316. * version is not 1, this field is ignored.
  2317. }
  2318. font: CTFontRef;
  2319. end;
  2320. HIThemeTextInfoPtr = ^HIThemeTextInfo;
  2321. {
  2322. * HIThemeGetTextDimensions()
  2323. *
  2324. * Summary:
  2325. * Get text dimensions of a string
  2326. *
  2327. * Discussion:
  2328. * This allows you to get various dimension characteristics of a
  2329. * string bound to certain criteria that you specify. It allows you
  2330. * to get the absolute bounds of a string laid out in a single line,
  2331. * or the bounds of a string constrained to a given width.
  2332. *
  2333. * Mac OS X threading:
  2334. * Not thread safe
  2335. *
  2336. * Parameters:
  2337. *
  2338. * inString:
  2339. * A CFStringRef containing the unicode characters you wish to
  2340. * measure. You MUST NOT pass in a CFStringRef that was allocated
  2341. * with any of the "NoCopy" CFString creation APIs; a string
  2342. * created with a "NoCopy" API has transient storage which is
  2343. * incompatible with HIThemeGetTextDimensions's caches.
  2344. *
  2345. * In Mac OS X 10.5 and later, this API may also be passed a
  2346. * CFAttributedStringRef.
  2347. *
  2348. * inWidth:
  2349. * The width to constrain the text before wrapping. If inWidth is
  2350. * 0, the text will not wrap and will be laid out as a single
  2351. * line, unless it contains embedded carriage return or linefeed
  2352. * characters; CR/LF will cause the text to wrap and the resulting
  2353. * measurements will include space for multiple lines of text. If
  2354. * inWidth is not 0, the text will wrap at the given width and the
  2355. * measurements will be returned from the multi-line layout.
  2356. *
  2357. *
  2358. * To force single-line layout even in the presence of embedded
  2359. * CR/LF characters, pass FLT_MAX for inWidth,
  2360. * kHIThemeTextTruncationEnd for inTextInfo.truncationPosition,
  2361. * and 1 for inTextInfo.truncationMaxLines.
  2362. *
  2363. * inTextInfo:
  2364. * The HIThemeTextInfo parameter block specifying additional
  2365. * options for flushness and truncation. The truncationHappened
  2366. * field is the only field that will be written to by this API
  2367. * (and the reason for inTextInfo not being const).
  2368. *
  2369. * outWidth:
  2370. * On output, will contain the width of the string. This width may
  2371. * be smaller than the constrain inWidth parameter if the text has
  2372. * wrapped. It will return the true bounding width of the layout.
  2373. * Can be NULL.
  2374. *
  2375. * outHeight:
  2376. * On output, will contain the height of the string. Can be NULL.
  2377. *
  2378. * outBaseline:
  2379. * On output, will contain the baseline of the string. This is the
  2380. * delta from the top of the text to the baseline of the first
  2381. * line. Can be NULL.
  2382. *
  2383. * Availability:
  2384. * Mac OS X: in version 10.3 and later in Carbon.framework
  2385. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2386. * Non-Carbon CFM: not available
  2387. }
  2388. function HIThemeGetTextDimensions( inString: CFStringRef; inWidth: CGFloat; var inTextInfo: HIThemeTextInfo; outWidth: CGFloatPtr { can be NULL }; outHeight: CGFloatPtr { can be NULL }; outBaseline: CGFloatPtr { can be NULL } ): OSStatus; external name '_HIThemeGetTextDimensions';
  2389. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2390. {
  2391. * HIThemeDrawTextBox()
  2392. *
  2393. * Summary:
  2394. * Draw the string into the given bounding box
  2395. *
  2396. * Discussion:
  2397. * Draw the string into the bounding box given. You can specify
  2398. * options such as truncation and justification as well as
  2399. * determining whether the text was truncated when it was drawn.
  2400. *
  2401. * Mac OS X threading:
  2402. * Not thread safe
  2403. *
  2404. * Parameters:
  2405. *
  2406. * inString:
  2407. * A CFStringRef containing the unicode characters you wish to
  2408. * render. You MUST NOT pass in a CFStringRef that was allocated
  2409. * with any of the "NoCopy" CFString creation APIs; a string
  2410. * created with a "NoCopy" API has transient storage which is
  2411. * incompatible with HIThemeDrawTextBox's caches.
  2412. *
  2413. * In Mac OS X 10.5 and later, this API may also be passed a
  2414. * CFAttributedStringRef.
  2415. *
  2416. * inBounds:
  2417. * The HIRect that bounds where the text is to be drawn
  2418. *
  2419. * inTextInfo:
  2420. * The HIThemeTextInfo parameter block specifying additional
  2421. * options for truncation and flushness. You can control the
  2422. * number of lines drawn by specifying a truncation of
  2423. * kHIThemeTextTruncationMiddle or kHIThemeTextTruncationEnd for
  2424. * the truncationPosition field and then specifying a maximum
  2425. * number of lines to draw before truncation occurs in the
  2426. * truncationMaxLines field. The truncationHappened field is the
  2427. * only field that will be written to by this API (and the reason
  2428. * for inTextInfo not being const).
  2429. *
  2430. * inContext:
  2431. * The CGContextRef into which to draw the text.
  2432. *
  2433. * inOrientation:
  2434. * An HIThemeOrientation that describes the orientation of the
  2435. * passed in context.
  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 HIThemeDrawTextBox( inString: CFStringRef; const (*var*) inBounds: HIRect; var inTextInfo: HIThemeTextInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawTextBox';
  2443. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2444. {
  2445. * HIThemeGetUIFontType()
  2446. *
  2447. * Summary:
  2448. * Returns the CTFontUIFontType for a ThemeFontID
  2449. *
  2450. * Discussion:
  2451. * It is possible to create a CTFontRef that represents a
  2452. * ThemeFontID by using this API in conjunction with
  2453. * CTFontCreateUIFontForLanguage.
  2454. *
  2455. * Suggested usage:
  2456. * CTFontRef font = CTFontCreateUIFontForLanguage(
  2457. * HIThemeGetUIFontType( inFontID ), 0, NULL );
  2458. *
  2459. * Mac OS X threading:
  2460. * Not thread safe
  2461. *
  2462. * Parameters:
  2463. *
  2464. * inFontID:
  2465. * The ThemeFontID to map to a CTFontUIFontType.
  2466. *
  2467. * Result:
  2468. * The CTFontUIFontType that represents the ThemeFontID or
  2469. * kCTFontNoFontType if there is an error.
  2470. *
  2471. * Availability:
  2472. * Mac OS X: in version 10.5 and later in Carbon.framework
  2473. * CarbonLib: not available
  2474. * Non-Carbon CFM: not available
  2475. }
  2476. function HIThemeGetUIFontType( inFontID: ThemeFontID ): CTFontUIFontType; external name '_HIThemeGetUIFontType';
  2477. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  2478. { -------------------------------------------------------------------------- }
  2479. { Tracks }
  2480. { -------------------------------------------------------------------------- }
  2481. {
  2482. * HIThemeDrawTrack()
  2483. *
  2484. * Summary:
  2485. * Draw a themed track item.
  2486. *
  2487. * Discussion:
  2488. * Used to draw any tracked element including sliders and scroll
  2489. * bars.
  2490. *
  2491. * Mac OS X threading:
  2492. * Not thread safe
  2493. *
  2494. * Parameters:
  2495. *
  2496. * inDrawInfo:
  2497. * An HIThemeTrackDrawInfo describing the track that will be drawn.
  2498. *
  2499. * inGhostRect:
  2500. * An HIRect describing the location of the ghost indicator to be
  2501. * drawn. Generally, this should be NULL and the control using
  2502. * this primitive should support live feeback.
  2503. *
  2504. * inContext:
  2505. * The CG context in which the drawing is to be done.
  2506. *
  2507. * inOrientation:
  2508. * An HIThemeOrientation that describes the orientation of the
  2509. * passed in context.
  2510. *
  2511. * Availability:
  2512. * Mac OS X: in version 10.3 and later in Carbon.framework
  2513. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2514. * Non-Carbon CFM: not available
  2515. }
  2516. function HIThemeDrawTrack( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; {const} inGhostRect: HIRectPtr { can be NULL }; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawTrack';
  2517. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2518. {
  2519. * HIThemeDrawTrackTickMarks()
  2520. *
  2521. * Summary:
  2522. * Draws the tick marks for a slider track.
  2523. *
  2524. * Discussion:
  2525. * This primitive only draws evenly distributed tick marks.
  2526. * Internally, it calls HIThemeDrawTickMark to do the actual tick
  2527. * mark drawing, and any custom (non-even distribution) drawing of
  2528. * tick marks should be done with HIThemeDrawTickMark.
  2529. *
  2530. * Mac OS X threading:
  2531. * Not thread safe
  2532. *
  2533. * Parameters:
  2534. *
  2535. * inDrawInfo:
  2536. * An HIThemeTrackDrawInfo describing the track tick marks that
  2537. * will be drawn.
  2538. *
  2539. * inNumTicks:
  2540. * A value indicating the number of tick marks to be drawn.
  2541. *
  2542. * inContext:
  2543. * The CG context in which the drawing is to be done.
  2544. *
  2545. * inOrientation:
  2546. * An HIThemeOrientation that describes the orientation of the
  2547. * passed in context.
  2548. *
  2549. * Availability:
  2550. * Mac OS X: in version 10.3 and later in Carbon.framework
  2551. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2552. * Non-Carbon CFM: not available
  2553. }
  2554. function HIThemeDrawTrackTickMarks( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; inNumTicks: ItemCount; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawTrackTickMarks';
  2555. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2556. {
  2557. * HIThemeDrawTickMark()
  2558. *
  2559. * Summary:
  2560. * Draws a single tick mark.
  2561. *
  2562. * Discussion:
  2563. * This primitive draws a single tick mark and can be used to draw
  2564. * custom tick marks that are not easily drawn by
  2565. * HIThemeDrawTrackTickMarks, which only draws evenly distributed
  2566. * tick marks.
  2567. *
  2568. * Mac OS X threading:
  2569. * Not thread safe
  2570. *
  2571. * Parameters:
  2572. *
  2573. * inBounds:
  2574. * The HIRect in which to draw.
  2575. *
  2576. * inDrawInfo:
  2577. * The HIThemeTickMarkDrawInfo of the tick mark to be drawn.
  2578. *
  2579. * inContext:
  2580. * The CG context in which the drawing is to be done.
  2581. *
  2582. * inOrientation:
  2583. * An HIThemeOrientation that describes the orientation of the
  2584. * passed in context.
  2585. *
  2586. * Availability:
  2587. * Mac OS X: in version 10.3 and later in Carbon.framework
  2588. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2589. * Non-Carbon CFM: not available
  2590. }
  2591. function HIThemeDrawTickMark( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeTickMarkDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawTickMark';
  2592. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2593. {
  2594. * HIThemeGetTrackThumbShape()
  2595. *
  2596. * Summary:
  2597. * Get the thumb shape of a themed track.
  2598. *
  2599. * Discussion:
  2600. * This API was mistakenly named as a "Get" API. It behaves as
  2601. * "Copy" API. THE CALLER IS RESPONSIBLE FOR RELEASING THE RETURNED
  2602. * SHAPE.
  2603. *
  2604. * Mac OS X threading:
  2605. * Not thread safe
  2606. *
  2607. * Parameters:
  2608. *
  2609. * inDrawInfo:
  2610. * An HIThemeTrackDrawInfo describing the track to be measured.
  2611. *
  2612. * outThumbShape:
  2613. * A pointer to an HIShapeRef which will be set to the shape of
  2614. * the themed track's thumb. It needs to be released by the caller.
  2615. *
  2616. * Availability:
  2617. * Mac OS X: in version 10.3 and later in Carbon.framework
  2618. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2619. * Non-Carbon CFM: not available
  2620. }
  2621. function HIThemeGetTrackThumbShape( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; var outThumbShape: HIShapeRef ): OSStatus; external name '_HIThemeGetTrackThumbShape';
  2622. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2623. {
  2624. * HIThemeHitTestTrack()
  2625. *
  2626. * Summary:
  2627. * Hit test the themed track.
  2628. *
  2629. * Discussion:
  2630. * Returns true if the track was hit and fills in outPartHit.
  2631. * Otherwise, returns false.
  2632. *
  2633. * Mac OS X threading:
  2634. * Not thread safe
  2635. *
  2636. * Parameters:
  2637. *
  2638. * inDrawInfo:
  2639. * An HIThemeTabDrawInfo describing the tab that will be drawn.
  2640. *
  2641. * inMousePoint:
  2642. * An HIPoint which will be location basis for the test.
  2643. *
  2644. * outPartHit:
  2645. * A pointer to a ControlPartCode that will be filled with the
  2646. * part hit by the incoming point.
  2647. *
  2648. * Availability:
  2649. * Mac OS X: in version 10.3 and later in Carbon.framework
  2650. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2651. * Non-Carbon CFM: not available
  2652. }
  2653. function HIThemeHitTestTrack( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; const (*var*) inMousePoint: HIPoint; var outPartHit: ControlPartCode ): Boolean; external name '_HIThemeHitTestTrack';
  2654. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2655. {
  2656. * HIThemeGetTrackBounds()
  2657. *
  2658. * Summary:
  2659. * Gets the track bounds of a themed track.
  2660. *
  2661. * Mac OS X threading:
  2662. * Not thread safe
  2663. *
  2664. * Parameters:
  2665. *
  2666. * inDrawInfo:
  2667. * An HIThemeTrackDrawInfo describing the track that will be drawn.
  2668. *
  2669. * outBounds:
  2670. * A pointer to an HIRect in which will be returned the rectangle
  2671. * of the track bounds.
  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 HIThemeGetTrackBounds( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; var outBounds: HIRect ): OSStatus; external name '_HIThemeGetTrackBounds';
  2679. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2680. {
  2681. * HIThemeGetTrackPartBounds()
  2682. *
  2683. * Summary:
  2684. * Returns measurements for the bounds of the a track part,
  2685. * according to the specifics of that track as specified in the
  2686. * incoming draw info record.
  2687. *
  2688. * Discussion:
  2689. * HIThemeGetTrackPartBounds allows you to get the boundaries of
  2690. * individual pieces of a track's theme layout.
  2691. *
  2692. * Mac OS X threading:
  2693. * Not thread safe
  2694. *
  2695. * Parameters:
  2696. *
  2697. * inDrawInfo:
  2698. * An HIThemeTrackDrawInfo describing the track to be measured.
  2699. *
  2700. * inPartCode:
  2701. * A ControlPartCode describing which part to measure. A list of
  2702. * available ControlPartCodes can be retrieved using
  2703. * HIThemeGetTrackParts.
  2704. *
  2705. * outPartBounds:
  2706. * The bounds of the specified part relative to the start
  2707. * rectangle specified in inDrawInfo.
  2708. *
  2709. * Availability:
  2710. * Mac OS X: in version 10.3 and later in Carbon.framework
  2711. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2712. * Non-Carbon CFM: not available
  2713. }
  2714. function HIThemeGetTrackPartBounds( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; inPartCode: ControlPartCode; var outPartBounds: HIRect ): OSStatus; external name '_HIThemeGetTrackPartBounds';
  2715. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2716. {
  2717. * HIThemeGetTrackParts()
  2718. *
  2719. * Summary:
  2720. * Counts the number of parts that make up a track. Optionally
  2721. * returns an array of ControlPartCodes that describe each of the
  2722. * counted parts.
  2723. *
  2724. * Discussion:
  2725. * HIThemeGetTrackParts allows you to count the number of parts that
  2726. * make up a track. This is useful if you need to iterate through
  2727. * the parts of a track and get information about them, i.e. using
  2728. * HIThemeGetTrackPartBounds.
  2729. *
  2730. * Mac OS X threading:
  2731. * Not thread safe
  2732. *
  2733. * Parameters:
  2734. *
  2735. * inDrawInfo:
  2736. * An HIThemeTrackDrawInfo describing the track to be measured.
  2737. *
  2738. * outNumberOfParts:
  2739. * A pointer to a UInt32 in which to return the number of counted
  2740. * parts.
  2741. *
  2742. * inMaxParts:
  2743. * The maximum number of ControlPartCodes that can be copied into
  2744. * the supplied ioPartsBuffer. This value is ignored if
  2745. * ioPartsBuffer is NULL.
  2746. *
  2747. * ioPartsBuffer:
  2748. * An pointer to an array into which HIThemeGetTrackPartBounds
  2749. * will copy ControlPartCodes that describe each of the counted
  2750. * parts. This pointer can be NULL if you are just counting parts.
  2751. *
  2752. * Availability:
  2753. * Mac OS X: in version 10.3 and later in Carbon.framework
  2754. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2755. * Non-Carbon CFM: not available
  2756. }
  2757. function HIThemeGetTrackParts( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; var outNumberOfParts: UInt32; inMaxParts: UInt32; ioPartsBuffer: ControlPartCodePtr { can be NULL } ): OSStatus; external name '_HIThemeGetTrackParts';
  2758. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2759. {
  2760. * HIThemeGetTrackDragRect()
  2761. *
  2762. * Summary:
  2763. * Get the rectangle of the drag area of a themed track.
  2764. *
  2765. * Mac OS X threading:
  2766. * Not thread safe
  2767. *
  2768. * Parameters:
  2769. *
  2770. * inDrawInfo:
  2771. * An HIThemeTrackDrawInfo describing the track to be measured.
  2772. *
  2773. * outDragRect:
  2774. * A pointer to an HIRect in which will be returned the rectangle
  2775. * of the drag area of the track.
  2776. *
  2777. * Availability:
  2778. * Mac OS X: in version 10.3 and later in Carbon.framework
  2779. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2780. * Non-Carbon CFM: not available
  2781. }
  2782. function HIThemeGetTrackDragRect( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; var outDragRect: HIRect ): OSStatus; external name '_HIThemeGetTrackDragRect';
  2783. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2784. {
  2785. * HIThemeGetTrackThumbPositionFromOffset()
  2786. *
  2787. * Summary:
  2788. * Get the track's relative thumb position based on the offset.
  2789. *
  2790. * Mac OS X threading:
  2791. * Not thread safe
  2792. *
  2793. * Parameters:
  2794. *
  2795. * inDrawInfo:
  2796. * An HIThemeTrackDrawInfo describing the track to be measured.
  2797. *
  2798. * inThumbOffset:
  2799. * An HIPoint describing the position of the thumb as an offset
  2800. * from the track bounds.
  2801. *
  2802. * outRelativePosition:
  2803. * On output, the track-relative position calculated from the
  2804. * thumb offset.
  2805. *
  2806. * Availability:
  2807. * Mac OS X: in version 10.3 and later in Carbon.framework
  2808. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2809. * Non-Carbon CFM: not available
  2810. }
  2811. function HIThemeGetTrackThumbPositionFromOffset( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; const (*var*) inThumbOffset: HIPoint; var outRelativePosition: CGFloat ): OSStatus; external name '_HIThemeGetTrackThumbPositionFromOffset';
  2812. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2813. {
  2814. * HIThemeGetTrackThumbPositionFromBounds()
  2815. *
  2816. * Summary:
  2817. * Get the themed track thumb position from its bounds.
  2818. *
  2819. * Mac OS X threading:
  2820. * Not thread safe
  2821. *
  2822. * Parameters:
  2823. *
  2824. * inDrawInfo:
  2825. * A pointer to an HIThemeTrackDrawInfo describing the track to be
  2826. * measured.
  2827. *
  2828. * inThumbBounds:
  2829. * The bounds of the thumb from which the postion is to be
  2830. * calculated.
  2831. *
  2832. * outRelativePosition:
  2833. * On output, the track-relative position calculated from the
  2834. * thumb location.
  2835. *
  2836. * Availability:
  2837. * Mac OS X: in version 10.3 and later in Carbon.framework
  2838. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2839. * Non-Carbon CFM: not available
  2840. }
  2841. function HIThemeGetTrackThumbPositionFromBounds( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; const (*var*) inThumbBounds: HIRect; var outRelativePosition: CGFloat ): OSStatus; external name '_HIThemeGetTrackThumbPositionFromBounds';
  2842. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2843. {
  2844. * HIThemeGetTrackLiveValue()
  2845. *
  2846. * Summary:
  2847. * Get the themed track live value.
  2848. *
  2849. * Mac OS X threading:
  2850. * Not thread safe
  2851. *
  2852. * Parameters:
  2853. *
  2854. * inDrawInfo:
  2855. * An HIThemeTrackDrawInfo describing the track to be measured.
  2856. *
  2857. * inRelativePosition:
  2858. * An HIPoint describing the position of the thumb as an offset
  2859. * from the track bounds.
  2860. *
  2861. * outValue:
  2862. * On output, the track value as calculated from the relative
  2863. * postion of the thumb.
  2864. *
  2865. * Availability:
  2866. * Mac OS X: in version 10.3 and later in Carbon.framework
  2867. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2868. * Non-Carbon CFM: not available
  2869. }
  2870. function HIThemeGetTrackLiveValue( const (*var*) inDrawInfo: HIThemeTrackDrawInfo; inRelativePosition: CGFloat; var outValue: SInt32 ): OSStatus; external name '_HIThemeGetTrackLiveValue';
  2871. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2872. {
  2873. * HIThemeGetScrollBarTrackRect()
  2874. *
  2875. * Summary:
  2876. * Gets the rectangle of the tracking area of a themed scroll bar.
  2877. *
  2878. * Mac OS X threading:
  2879. * Not thread safe
  2880. *
  2881. * Parameters:
  2882. *
  2883. * inBounds:
  2884. * An HIRect indicating the area in which the scroll bar would be
  2885. * drawn.
  2886. *
  2887. * inTrackInfo:
  2888. * An HIScrollBarTrackInfo for the scroll bar that would be drawn.
  2889. * Currently, only the pressState and enableState fields are used.
  2890. *
  2891. * inIsHoriz:
  2892. * A Boolean where true means that the scroll bar would be
  2893. * horizontal and false means that the scroll bar would be
  2894. * vertical.
  2895. *
  2896. * outTrackBounds:
  2897. * A pointer to an HIRect in which will be returned the rectangle
  2898. * of the track area of the scroll bar.
  2899. *
  2900. * Availability:
  2901. * Mac OS X: in version 10.3 and later in Carbon.framework
  2902. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2903. * Non-Carbon CFM: not available
  2904. }
  2905. function HIThemeGetScrollBarTrackRect( const (*var*) inBounds: HIRect; const (*var*) inTrackInfo: HIScrollBarTrackInfo; inIsHoriz: Boolean; var outTrackBounds: HIRect ): OSStatus; external name '_HIThemeGetScrollBarTrackRect';
  2906. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2907. {
  2908. * HIThemeHitTestScrollBarArrows()
  2909. *
  2910. * Summary:
  2911. * Hit test the theme scroll bar arrows to determine where the hit
  2912. * occurred.
  2913. *
  2914. * Mac OS X threading:
  2915. * Not thread safe
  2916. *
  2917. * Parameters:
  2918. *
  2919. * inScrollBarBounds:
  2920. * An HIRect indicating the bounds of the scroll bar that will be
  2921. * hit tested.
  2922. *
  2923. * inTrackInfo:
  2924. * An HIScrollBarTrackInfo for the scroll bar to be drawn.
  2925. * Currently, only the version, pressState and enableState fields
  2926. * are used.
  2927. *
  2928. * inIsHoriz:
  2929. * A Boolean where true means that the scroll bar is to be
  2930. * horizontal and false means that the scroll bar is to be
  2931. * vertical.
  2932. *
  2933. * inPtHit:
  2934. * An HIPoint indicating where the control was hit and which will
  2935. * be used for hit testing.
  2936. *
  2937. * outTrackBounds:
  2938. * A pointer to an HIRect in which will be returned the rectangle
  2939. * of the track area of the scroll bar. Can be NULL.
  2940. *
  2941. * outPartCode:
  2942. * A pointer to a ControlPartCode in which the part code of the
  2943. * hit part will be returned.
  2944. *
  2945. * Availability:
  2946. * Mac OS X: in version 10.3 and later in Carbon.framework
  2947. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2948. * Non-Carbon CFM: not available
  2949. }
  2950. 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';
  2951. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2952. {
  2953. * HIThemeDrawScrollBarDelimiters()
  2954. *
  2955. * Summary:
  2956. * Draw themed scroll bar delimiters.
  2957. *
  2958. * Discussion:
  2959. * Draws the grow lines delimiting the scroll bar areas. Does not
  2960. * draw the size box.
  2961. *
  2962. * Mac OS X threading:
  2963. * Not thread safe
  2964. *
  2965. * Parameters:
  2966. *
  2967. * inContRect:
  2968. * An HIRect indicating the rectangle of the content area of the
  2969. * window to be drawn.
  2970. *
  2971. * inDrawInfo:
  2972. * The HIThemeScrollBarDelimitersDrawInfo of the delimiters to be
  2973. * drawn.
  2974. *
  2975. * inContext:
  2976. * The CG context in which the drawing is to be done.
  2977. *
  2978. * inOrientation:
  2979. * An HIThemeOrientation that describes the orientation of the
  2980. * passed in context.
  2981. *
  2982. * Availability:
  2983. * Mac OS X: in version 10.3 and later in Carbon.framework
  2984. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2985. * Non-Carbon CFM: not available
  2986. }
  2987. function HIThemeDrawScrollBarDelimiters( const (*var*) inContRect: HIRect; const (*var*) inDrawInfo: HIThemeScrollBarDelimitersDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawScrollBarDelimiters';
  2988. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2989. { -------------------------------------------------------------------------- }
  2990. { Windows }
  2991. { -------------------------------------------------------------------------- }
  2992. {
  2993. * HIThemeDrawWindowFrame()
  2994. *
  2995. * Summary:
  2996. * Draws a themed window frame.
  2997. *
  2998. * Mac OS X threading:
  2999. * Not thread safe
  3000. *
  3001. * Parameters:
  3002. *
  3003. * inContRect:
  3004. * An HIRect indicating the rectangle of the content area of the
  3005. * window to be drawn.
  3006. *
  3007. * inDrawInfo:
  3008. * The HIThemeWindowDrawInfo of the window frame to be drawn.
  3009. *
  3010. * inContext:
  3011. * The CG context in which the drawing is to be done.
  3012. *
  3013. * inOrientation:
  3014. * An HIThemeOrientation that describes the orientation of the
  3015. * passed in context.
  3016. *
  3017. * outTitleRect:
  3018. * A pointer to an HIRect into which to put the bounds of the
  3019. * title rect.
  3020. *
  3021. * Availability:
  3022. * Mac OS X: in version 10.3 and later in Carbon.framework
  3023. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3024. * Non-Carbon CFM: not available
  3025. }
  3026. function HIThemeDrawWindowFrame( const (*var*) inContRect: HIRect; const (*var*) inDrawInfo: HIThemeWindowDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation; outTitleRect: HIRectPtr { can be NULL } ): OSStatus; external name '_HIThemeDrawWindowFrame';
  3027. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3028. {
  3029. * HIThemeDrawTitleBarWidget()
  3030. *
  3031. * Summary:
  3032. * Draws the requested theme title bar widget.
  3033. *
  3034. * Discussion:
  3035. * HIThemeDrawTitleBarWidget renders the requested theme title bar
  3036. * widget in the proper location of a window. A common
  3037. * misconception when using this API is that the client must specify
  3038. * the exact location of the widget in the window. The widget will
  3039. * locate itself in the window based relative to the content rect
  3040. * passed in content rectangle -- the contRect parameter. Another
  3041. * common problem is to ignore the window's attributes. The
  3042. * attributes must be set up properly to describe the window for
  3043. * which the widget is to be drawn.
  3044. *
  3045. * Mac OS X threading:
  3046. * Not thread safe
  3047. *
  3048. * Parameters:
  3049. *
  3050. * inContRect:
  3051. * A rectangle describing the window's content area. The widget
  3052. * is drawn relative to the content rectangle of the window, so
  3053. * this parameter does not describe the actual widget bounds, it
  3054. * describes the window's content rectangle.
  3055. *
  3056. * inDrawInfo:
  3057. * The HIThemeWindowWidgetDrawInfo of the window widget to be
  3058. * drawn.
  3059. *
  3060. * inContext:
  3061. * The CG context in which the drawing is to be done.
  3062. *
  3063. * inOrientation:
  3064. * An HIThemeOrientation that describes the orientation of the
  3065. * passed in context.
  3066. *
  3067. * Availability:
  3068. * Mac OS X: in version 10.3 and later in Carbon.framework
  3069. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3070. * Non-Carbon CFM: not available
  3071. }
  3072. function HIThemeDrawTitleBarWidget( const (*var*) inContRect: HIRect; const (*var*) inDrawInfo: HIThemeWindowWidgetDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawTitleBarWidget';
  3073. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3074. {
  3075. * HIThemeDrawGrowBox()
  3076. *
  3077. * Summary:
  3078. * Draws a theme grow box.
  3079. *
  3080. * Mac OS X threading:
  3081. * Not thread safe
  3082. *
  3083. * Parameters:
  3084. *
  3085. * inOrigin:
  3086. * The origin from which to draw the grow box.
  3087. *
  3088. * inDrawInfo:
  3089. * An HIThemeGrowBoxDrawInfo describing the grow box to be drawn
  3090. * or measured.
  3091. *
  3092. * inContext:
  3093. * The CG context in which the drawing is to be done.
  3094. *
  3095. * inOrientation:
  3096. * An HIThemeOrientation that describes the orientation of the
  3097. * passed in context.
  3098. *
  3099. * Availability:
  3100. * Mac OS X: in version 10.3 and later in Carbon.framework
  3101. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3102. * Non-Carbon CFM: not available
  3103. }
  3104. function HIThemeDrawGrowBox( const (*var*) inOrigin: HIPoint; const (*var*) inDrawInfo: HIThemeGrowBoxDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawGrowBox';
  3105. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3106. {
  3107. * HIThemeGetGrowBoxBounds()
  3108. *
  3109. * Summary:
  3110. * Gets the bounds for a grow box.
  3111. *
  3112. * Mac OS X threading:
  3113. * Not thread safe
  3114. *
  3115. * Parameters:
  3116. *
  3117. * inOrigin:
  3118. * The origin from which to draw the grow box.
  3119. *
  3120. * inDrawInfo:
  3121. * An HIThemeGrowBoxDrawInfo describing the grow box to be
  3122. * measured. The state field is ignored.
  3123. *
  3124. * outBounds:
  3125. * A pointer to an HIRect in which will be returned the rectangle
  3126. * of the standalone grow box bounds.
  3127. *
  3128. * Availability:
  3129. * Mac OS X: in version 10.3 and later in Carbon.framework
  3130. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3131. * Non-Carbon CFM: not available
  3132. }
  3133. function HIThemeGetGrowBoxBounds( const (*var*) inOrigin: HIPoint; const (*var*) inDrawInfo: HIThemeGrowBoxDrawInfo; var outBounds: HIRect ): OSStatus; external name '_HIThemeGetGrowBoxBounds';
  3134. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3135. {
  3136. * HIThemeGetWindowShape()
  3137. *
  3138. * Summary:
  3139. * Obtains the specified window shape.
  3140. *
  3141. * Discussion:
  3142. * This API was mistakenly named as a "Get" API. It behaves as
  3143. * "Copy" API. THE CALLER IS RESPONSIBLE FOR RELEASING THE RETURNED
  3144. * SHAPE.
  3145. *
  3146. * Mac OS X threading:
  3147. * Not thread safe
  3148. *
  3149. * Parameters:
  3150. *
  3151. * inContRect:
  3152. * An HIRect indicating the rectangle of the content area of the
  3153. * window that would be drawn.
  3154. *
  3155. * inDrawInfo:
  3156. * The HIThemeWindowDrawInfo of the window frame to be measured.
  3157. *
  3158. * inWinRegion:
  3159. * A WindowRegionCode indicating the desired region for which to
  3160. * return the shape.
  3161. *
  3162. * outShape:
  3163. * A pointer to an HIShapeRef which will be set to the shape of
  3164. * the requested window region. It needs to be released by the
  3165. * caller.
  3166. *
  3167. * Availability:
  3168. * Mac OS X: in version 10.3 and later in Carbon.framework
  3169. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3170. * Non-Carbon CFM: not available
  3171. }
  3172. function HIThemeGetWindowShape( const (*var*) inContRect: HIRect; const (*var*) inDrawInfo: HIThemeWindowDrawInfo; inWinRegion: WindowRegionCode; var outShape: HIShapeRef ): OSStatus; external name '_HIThemeGetWindowShape';
  3173. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3174. {
  3175. * HIThemeGetWindowRegionHit()
  3176. *
  3177. * Summary:
  3178. * Get the window region hit in a themed window.
  3179. *
  3180. * Discussion:
  3181. * Not that this call does not return a region, but a region code.
  3182. *
  3183. * Mac OS X threading:
  3184. * Not thread safe
  3185. *
  3186. * Parameters:
  3187. *
  3188. * inContRect:
  3189. * An HIRect indicating the rectangle of the content area of the
  3190. * window that would be drawn.
  3191. *
  3192. * inDrawInfo:
  3193. * The HIThemeWindowDrawInfo of the window frame to be measured.
  3194. *
  3195. * inPoint:
  3196. * An HIPoint against which the test will occur.
  3197. *
  3198. * outRegionHit:
  3199. * The output WindowRegionCode of hit window region.
  3200. *
  3201. * Availability:
  3202. * Mac OS X: in version 10.3 and later in Carbon.framework
  3203. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3204. * Non-Carbon CFM: not available
  3205. }
  3206. function HIThemeGetWindowRegionHit( const (*var*) inContRect: HIRect; const (*var*) inDrawInfo: HIThemeWindowDrawInfo; const (*var*) inPoint: HIPoint; var outRegionHit: WindowRegionCode ): Boolean; external name '_HIThemeGetWindowRegionHit';
  3207. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3208. { -------------------------------------------------------------------------- }
  3209. { Miscellaneous }
  3210. { -------------------------------------------------------------------------- }
  3211. {
  3212. * HIThemeDrawFrame()
  3213. *
  3214. * Summary:
  3215. * Draws a variety of frames.
  3216. *
  3217. * Mac OS X threading:
  3218. * Not thread safe
  3219. *
  3220. * Parameters:
  3221. *
  3222. * inRect:
  3223. * The HIRect in which to draw.
  3224. *
  3225. * inDrawInfo:
  3226. * An HIThemeFrameDrawInfo describing the frame to be drawn or
  3227. * measured.
  3228. *
  3229. * inContext:
  3230. * The CG context in which the drawing is to be done.
  3231. *
  3232. * inOrientation:
  3233. * An HIThemeOrientation that describes the orientation of the
  3234. * passed in context.
  3235. *
  3236. * Availability:
  3237. * Mac OS X: in version 10.3 and later in Carbon.framework
  3238. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3239. * Non-Carbon CFM: not available
  3240. }
  3241. function HIThemeDrawFrame( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeFrameDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawFrame';
  3242. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3243. {
  3244. * HIThemeDrawGroupBox()
  3245. *
  3246. * Summary:
  3247. * Draws a themed primary group box.
  3248. *
  3249. * Mac OS X threading:
  3250. * Not thread safe
  3251. *
  3252. * Parameters:
  3253. *
  3254. * inRect:
  3255. * The HIRect in which to draw.
  3256. *
  3257. * inDrawInfo:
  3258. * An HIThemeGroupBoxDrawInfo describing the group box to be drawn
  3259. * or measured.
  3260. *
  3261. * inContext:
  3262. * The CG context in which the drawing is to be done.
  3263. *
  3264. * inOrientation:
  3265. * An HIThemeOrientation that describes the orientation of the
  3266. * passed in context.
  3267. *
  3268. * Availability:
  3269. * Mac OS X: in version 10.3 and later in Carbon.framework
  3270. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3271. * Non-Carbon CFM: not available
  3272. }
  3273. function HIThemeDrawGroupBox( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeGroupBoxDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawGroupBox';
  3274. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3275. {
  3276. * HIThemeDrawGenericWell()
  3277. *
  3278. * Summary:
  3279. * Draws a themed generic well.
  3280. *
  3281. * Mac OS X threading:
  3282. * Not thread safe
  3283. *
  3284. * Parameters:
  3285. *
  3286. * inRect:
  3287. * The HIRect in which to draw.
  3288. *
  3289. * inDrawInfo:
  3290. * An HIThemeButtonDrawInfo that describes attributes of the well
  3291. * to be drawn. Set the kThemeAdornmentDefault bit of the
  3292. * adornment field of this structure to also draw the center of
  3293. * the well.
  3294. *
  3295. * inContext:
  3296. * The CG context in which the drawing is to be done.
  3297. *
  3298. * inOrientation:
  3299. * An HIThemeOrientation that describes the orientation of the
  3300. * passed in context.
  3301. *
  3302. * Availability:
  3303. * Mac OS X: in version 10.3 and later in Carbon.framework
  3304. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3305. * Non-Carbon CFM: not available
  3306. }
  3307. function HIThemeDrawGenericWell( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeButtonDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawGenericWell';
  3308. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3309. {
  3310. * HIThemeDrawPaneSplitter()
  3311. *
  3312. * Summary:
  3313. * Draws a themed pane splitter.
  3314. *
  3315. * Mac OS X threading:
  3316. * Not thread safe
  3317. *
  3318. * Parameters:
  3319. *
  3320. * inRect:
  3321. * The HIRect in which to draw.
  3322. *
  3323. * inDrawInfo:
  3324. * The HIThemeSplitterDrawInfo of the pane splitter to be drawn.
  3325. *
  3326. * inContext:
  3327. * The CG context in which the drawing is to be done.
  3328. *
  3329. * inOrientation:
  3330. * An HIThemeOrientation that describes the orientation of the
  3331. * passed in context.
  3332. *
  3333. * Availability:
  3334. * Mac OS X: in version 10.3 and later in Carbon.framework
  3335. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3336. * Non-Carbon CFM: not available
  3337. }
  3338. function HIThemeDrawPaneSplitter( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeSplitterDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawPaneSplitter';
  3339. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3340. {
  3341. * HIThemeDrawGrabber()
  3342. *
  3343. * Summary:
  3344. * Draws a themed grabber.
  3345. *
  3346. * Mac OS X threading:
  3347. * Not thread safe
  3348. *
  3349. * Parameters:
  3350. *
  3351. * inRect:
  3352. * The HIRect in which to draw.
  3353. *
  3354. * inDrawInfo:
  3355. * The HIThemeGrabberDrawInfo of the grabber to be drawn.
  3356. *
  3357. * inContext:
  3358. * The CG context in which the drawing is to be done.
  3359. *
  3360. * inOrientation:
  3361. * An HIThemeOrientation that describes the orientation of the
  3362. * passed in context.
  3363. *
  3364. * Availability:
  3365. * Mac OS X: in version 10.3 and later in Carbon.framework
  3366. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3367. * Non-Carbon CFM: not available
  3368. }
  3369. function HIThemeDrawGrabber( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeGrabberDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawGrabber';
  3370. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3371. {
  3372. * HIThemeDrawPlacard()
  3373. *
  3374. * Summary:
  3375. * Draws a themed placard.
  3376. *
  3377. * Mac OS X threading:
  3378. * Not thread safe
  3379. *
  3380. * Parameters:
  3381. *
  3382. * inRect:
  3383. * The HIRect in which to draw.
  3384. *
  3385. * inDrawInfo:
  3386. * The HIThemePlacardDrawInfo of the placard to be drawn.
  3387. *
  3388. * inContext:
  3389. * The CG context in which the drawing is to be done.
  3390. *
  3391. * inOrientation:
  3392. * An HIThemeOrientation that describes the orientation of the
  3393. * passed in context.
  3394. *
  3395. * Availability:
  3396. * Mac OS X: in version 10.3 and later in Carbon.framework
  3397. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3398. * Non-Carbon CFM: not available
  3399. }
  3400. function HIThemeDrawPlacard( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemePlacardDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawPlacard';
  3401. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3402. {
  3403. * HIThemeDrawHeader()
  3404. *
  3405. * Summary:
  3406. * Draws a themed window header in the specified rectangle.
  3407. *
  3408. * Mac OS X threading:
  3409. * Not thread safe
  3410. *
  3411. * Parameters:
  3412. *
  3413. * inRect:
  3414. * The HIRect in which to draw.
  3415. *
  3416. * inDrawInfo:
  3417. * The HIThemeHeaderDrawInfo of the window frame to be drawn.
  3418. *
  3419. * inContext:
  3420. * The CG context in which the drawing is to be done.
  3421. *
  3422. * inOrientation:
  3423. * An HIThemeOrientation that describes the orientation of the
  3424. * passed in context.
  3425. *
  3426. * Availability:
  3427. * Mac OS X: in version 10.3 and later in Carbon.framework
  3428. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3429. * Non-Carbon CFM: not available
  3430. }
  3431. function HIThemeDrawHeader( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeHeaderDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawHeader';
  3432. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3433. {
  3434. * HIThemeDrawFocusRect()
  3435. *
  3436. * Summary:
  3437. * Draws a themed focus rectangle in the specified rectangle.
  3438. *
  3439. * Mac OS X threading:
  3440. * Not thread safe
  3441. *
  3442. * Parameters:
  3443. *
  3444. * inRect:
  3445. * The HIRect in which to draw.
  3446. *
  3447. * inHasFocus:
  3448. * Pass in true to draw focus. Passing false effectively makes
  3449. * this API a no-op.
  3450. *
  3451. * inContext:
  3452. * The CG context in which the drawing is to be done.
  3453. *
  3454. * inOrientation:
  3455. * An HIThemeOrientation that describes the orientation of the
  3456. * passed in context.
  3457. *
  3458. * Availability:
  3459. * Mac OS X: in version 10.3 and later in Carbon.framework
  3460. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3461. * Non-Carbon CFM: not available
  3462. }
  3463. function HIThemeDrawFocusRect( const (*var*) inRect: HIRect; inHasFocus: Boolean; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawFocusRect';
  3464. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3465. const
  3466. {
  3467. * Draw the visual focus only, and not any of the draw operations
  3468. * that form its shape.
  3469. }
  3470. kHIThemeFocusRingOnly = 0;
  3471. {
  3472. * Draw the visual focus above the results of the draw operations
  3473. * that form its shape.
  3474. }
  3475. kHIThemeFocusRingAbove = 1;
  3476. {
  3477. * Draw the visual focus below the results of the draw operations
  3478. * that form its shape.
  3479. }
  3480. kHIThemeFocusRingBelow = 2;
  3481. type
  3482. HIThemeFocusRing = UInt32;
  3483. {
  3484. * HIThemeBeginFocus()
  3485. *
  3486. * Summary:
  3487. * Begin focus drawing.
  3488. *
  3489. * Discussion:
  3490. * Call HIThemeBeginFocus to begin focus drawing. All drawing
  3491. * operations in the specified context after this call will be drawn
  3492. * with a visual representation of focus. Currently, this is a
  3493. * theme-tinted halo resembling a glow. Note that nothing will be
  3494. * drawn in the specified context until HIThemeEndFocus is called. A
  3495. * call to HIThemeBeginFocus must always be paired with an
  3496. * HIThemeEndFocus call. Nesting these calls will not crash but the
  3497. * results will be odd and is definitely not recommended.
  3498. * HIThemeBegin/EndFocus is designed to replace
  3499. * DrawThemeFocusRegion. For efficiency, clipping the context to the
  3500. * bounds that will be drawn into is highly desirable.
  3501. * HIThemeBeginFocus may do some allocations that are affected by
  3502. * the size of the context's clip at the time it is called -- so an
  3503. * extremely large clip or an unset clip may cause a large,
  3504. * inefficient allocation.
  3505. *
  3506. * Mac OS X threading:
  3507. * Not thread safe
  3508. *
  3509. * Parameters:
  3510. *
  3511. * inContext:
  3512. * The CG context in which the focus is to be drawn.
  3513. *
  3514. * inRing:
  3515. * An HIThemeFocusRing indicating which type of focus is to be
  3516. * drawn.
  3517. *
  3518. * inReserved:
  3519. * Always pass NULL for this parameter.
  3520. *
  3521. * Result:
  3522. * A result code indicating success or failure. Don't call
  3523. * HIThemeEndFocus on the context if HIThemeBeginFocus fails.
  3524. *
  3525. * Availability:
  3526. * Mac OS X: in version 10.5 and later in Carbon.framework
  3527. * CarbonLib: not available
  3528. * Non-Carbon CFM: not available
  3529. }
  3530. function HIThemeBeginFocus( inContext: CGContextRef; inRing: HIThemeFocusRing; inReserved: UnivPtr ): OSStatus; external name '_HIThemeBeginFocus';
  3531. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  3532. {
  3533. * HIThemeEndFocus()
  3534. *
  3535. * Summary:
  3536. * End focus drawing.
  3537. *
  3538. * Discussion:
  3539. * See HIThemeBeginFocus for focus drawing details. Calling
  3540. * HIThemeEndFocus indicates that the drawing operations to be
  3541. * focused are complete.
  3542. *
  3543. * Mac OS X threading:
  3544. * Not thread safe
  3545. *
  3546. * Parameters:
  3547. *
  3548. * inContext:
  3549. * The CG context in which the focus is to be drawn. This needs to
  3550. * be the same context passed to the HIThemeBeginFocus call with
  3551. * which this call to HIThemeEndFocus is paired.
  3552. *
  3553. * Result:
  3554. * A result code indicating success or failure.
  3555. *
  3556. * Availability:
  3557. * Mac OS X: in version 10.5 and later in Carbon.framework
  3558. * CarbonLib: not available
  3559. * Non-Carbon CFM: not available
  3560. }
  3561. function HIThemeEndFocus( inContext: CGContextRef ): OSStatus; external name '_HIThemeEndFocus';
  3562. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  3563. {
  3564. * HIThemeDrawSeparator()
  3565. *
  3566. * Summary:
  3567. * Draw a themed separator element.
  3568. *
  3569. * Mac OS X threading:
  3570. * Not thread safe
  3571. *
  3572. * Parameters:
  3573. *
  3574. * inRect:
  3575. * The HIRect in which to draw.
  3576. *
  3577. * inDrawInfo:
  3578. * The HIThemeSeparatorDrawInfo of the window frame to be drawn.
  3579. *
  3580. * inContext:
  3581. * The CG context in which the drawing is to be done.
  3582. *
  3583. * inOrientation:
  3584. * An HIThemeOrientation that describes the orientation of the
  3585. * passed in context.
  3586. *
  3587. * Availability:
  3588. * Mac OS X: in version 10.3 and later in Carbon.framework
  3589. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3590. * Non-Carbon CFM: not available
  3591. }
  3592. function HIThemeDrawSeparator( const (*var*) inRect: HIRect; const (*var*) inDrawInfo: HIThemeSeparatorDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawSeparator';
  3593. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3594. {
  3595. * HIThemeSetFill()
  3596. *
  3597. * Summary:
  3598. * Set the context fill color to that specified by the requested
  3599. * brush.
  3600. *
  3601. * Discussion:
  3602. * Note that this call does not actually draw anything. It sets the
  3603. * passed context's fill color to that of the specified theme brush.
  3604. * Subsequent fills in the context will be with the color specified
  3605. * by the theme brush.
  3606. *
  3607. * Mac OS X threading:
  3608. * Not thread safe
  3609. *
  3610. * Parameters:
  3611. *
  3612. * inBrush:
  3613. * The ThemeBrush describing the requested fill color.
  3614. *
  3615. * inInfo:
  3616. * Not used. Should always be NULL.
  3617. *
  3618. * inContext:
  3619. * The CG context for which the fill color is to be set.
  3620. *
  3621. * inOrientation:
  3622. * An HIThemeOrientation that describes the orientation of the
  3623. * passed in context.
  3624. *
  3625. * Availability:
  3626. * Mac OS X: in version 10.4 and later in Carbon.framework
  3627. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  3628. * Non-Carbon CFM: not available
  3629. }
  3630. function HIThemeSetFill( inBrush: ThemeBrush; inInfo: UnivPtr; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeSetFill';
  3631. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  3632. {
  3633. * HIThemeSetStroke()
  3634. *
  3635. * Summary:
  3636. * Set the context stroke color to that specified by the requested
  3637. * brush.
  3638. *
  3639. * Discussion:
  3640. * Note that this call does not actually draw anything. It sets the
  3641. * passed context's stroke color to that of the specified theme
  3642. * brush. Subsequent strokes in the context will be with the color
  3643. * specified by the theme brush.
  3644. *
  3645. * Mac OS X threading:
  3646. * Not thread safe
  3647. *
  3648. * Parameters:
  3649. *
  3650. * inBrush:
  3651. * The ThemeBrush describing the requested stroke color.
  3652. *
  3653. * inInfo:
  3654. * Not used. Should always be NULL.
  3655. *
  3656. * inContext:
  3657. * The CG context for which the stroke color is to be set.
  3658. *
  3659. * inOrientation:
  3660. * An HIThemeOrientation that describes the orientation of the
  3661. * passed in context.
  3662. *
  3663. * Availability:
  3664. * Mac OS X: in version 10.4 and later in Carbon.framework
  3665. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  3666. * Non-Carbon CFM: not available
  3667. }
  3668. function HIThemeSetStroke( inBrush: ThemeBrush; inInfo: UnivPtr; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeSetStroke';
  3669. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  3670. {
  3671. * HIThemeSetTextFill()
  3672. *
  3673. * Summary:
  3674. * Set the context text fill color to that specified by the
  3675. * requested brush.
  3676. *
  3677. * Discussion:
  3678. * Note that this call does not actually draw anything. It sets the
  3679. * passed context's text fill color to that of the specified
  3680. * ThemeTextColor. Subsequent text drawing in the context will be
  3681. * with the color specified by the ThemeTextColor.
  3682. *
  3683. * Mac OS X threading:
  3684. * Not thread safe
  3685. *
  3686. * Parameters:
  3687. *
  3688. * inColor:
  3689. * A ThemeTextColor describing the requested text fill color.
  3690. *
  3691. * inInfo:
  3692. * Not used. Should always be NULL.
  3693. *
  3694. * inContext:
  3695. * The CG context for which the fill color is to be set.
  3696. *
  3697. * inOrientation:
  3698. * An HIThemeOrientation that describes the orientation of the
  3699. * passed in context.
  3700. *
  3701. * Availability:
  3702. * Mac OS X: in version 10.4 and later in Carbon.framework
  3703. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  3704. * Non-Carbon CFM: not available
  3705. }
  3706. function HIThemeSetTextFill( inColor: ThemeTextColor; inInfo: UnivPtr; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeSetTextFill';
  3707. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  3708. {
  3709. * HIThemeApplyBackground()
  3710. *
  3711. * Summary:
  3712. * Apply a themed background for a rectangle.
  3713. *
  3714. * Discussion:
  3715. * Note that this call does not actually draw anything. It sets the
  3716. * passed context's fill color to the requested theme background.
  3717. * Subsequent fills in the context will fill with the theme
  3718. * background.
  3719. *
  3720. * Mac OS X threading:
  3721. * Not thread safe
  3722. *
  3723. * Parameters:
  3724. *
  3725. * inBounds:
  3726. * An HIRect enclosing the whole background. This rectangle is
  3727. * used to calculate the pattern phase (if there is one) of the
  3728. * background as it is set up in the context.
  3729. *
  3730. * inDrawInfo:
  3731. * An HIThemeBackgroundDrawInfo describing the background.
  3732. *
  3733. * inContext:
  3734. * The CG context for which the background is to be set.
  3735. *
  3736. * inOrientation:
  3737. * An HIThemeOrientation that describes the orientation of the
  3738. * passed in context.
  3739. *
  3740. * Availability:
  3741. * Mac OS X: in version 10.3 and later in Carbon.framework
  3742. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3743. * Non-Carbon CFM: not available
  3744. }
  3745. function HIThemeApplyBackground( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeBackgroundDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeApplyBackground';
  3746. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3747. {
  3748. * HIThemeDrawBackground()
  3749. *
  3750. * Summary:
  3751. * Draw a themed background for a rectangle.
  3752. *
  3753. * Discussion:
  3754. * Currently, this call only works with kThemeBackgroundMetal.
  3755. *
  3756. * Mac OS X threading:
  3757. * Not thread safe
  3758. *
  3759. * Parameters:
  3760. *
  3761. * inBounds:
  3762. * An HIRect indicating the bounds to fill with the background.
  3763. * For backgrounds that need pattern continuity, such as
  3764. * kThemeBackgroundMetal, this rectangle is the full bounds of the
  3765. * rectangle for which the filling is to occur. If drawing a
  3766. * sub-rectangle of that background, set the clip and draw the
  3767. * full rectangle. This routine has been optimized to not perform
  3768. * calculations on the non-clip part of the drawing bounds.
  3769. *
  3770. * inDrawInfo:
  3771. * An HIThemeBackgroundDrawInfo describing the background to be
  3772. * drawn.
  3773. *
  3774. * inContext:
  3775. * The CG context in which the drawing is to be done.
  3776. *
  3777. * inOrientation:
  3778. * An HIThemeOrientation that describes the orientation of the
  3779. * passed in context.
  3780. *
  3781. * Availability:
  3782. * Mac OS X: in version 10.3 and later in Carbon.framework
  3783. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3784. * Non-Carbon CFM: not available
  3785. }
  3786. function HIThemeDrawBackground( const (*var*) inBounds: HIRect; const (*var*) inDrawInfo: HIThemeBackgroundDrawInfo; inContext: CGContextRef; inOrientation: HIThemeOrientation ): OSStatus; external name '_HIThemeDrawBackground';
  3787. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3788. {
  3789. * HIThemeBrushCreateCGColor()
  3790. *
  3791. * Summary:
  3792. * Create a CGColor for a ThemeBrush.
  3793. *
  3794. * Discussion:
  3795. * Color is an ambiguous term. The color may be a pattern.
  3796. *
  3797. * Mac OS X threading:
  3798. * Not thread safe
  3799. *
  3800. * Parameters:
  3801. *
  3802. * inBrush:
  3803. * The ThemeBrush describing the requested color.
  3804. *
  3805. * outColor:
  3806. * A pointer to a CGColorRef that will be set to the newly created
  3807. * CGColor.
  3808. *
  3809. * Result:
  3810. * An operating system result code.
  3811. *
  3812. * Availability:
  3813. * Mac OS X: in version 10.4 and later in Carbon.framework
  3814. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  3815. * Non-Carbon CFM: not available
  3816. }
  3817. function HIThemeBrushCreateCGColor( inBrush: ThemeBrush; var outColor: CGColorRef ): OSStatus; external name '_HIThemeBrushCreateCGColor';
  3818. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  3819. {
  3820. * HIThemeGetTextColorForThemeBrush()
  3821. *
  3822. * Summary:
  3823. * Returns an appropriate ThemeTextColor that matches a ThemeBrush.
  3824. *
  3825. * Discussion:
  3826. * Creates a ThemeTextColor for use with HIThemeSetTextFill.
  3827. * ThemeTextColors are currently availabe for these theme brushes:
  3828. *
  3829. *
  3830. * kThemeBrushDialogBackgroundActive/Inactive
  3831. *
  3832. * kThemeBrushAlertBackgroundActive/Inactive
  3833. *
  3834. * kThemeBrushModelessDialogBackgroundActive/Inactive
  3835. * <BR> kThemeBrushNotificationWindowBackground
  3836. *
  3837. * Mac OS X threading:
  3838. * Not thread safe
  3839. *
  3840. * Parameters:
  3841. *
  3842. * inBrush:
  3843. * The ThemeBrush describing the requested color.
  3844. *
  3845. * inWindowIsActive:
  3846. * Whether the text color should indicate an active or inactive
  3847. * state.
  3848. *
  3849. * outColor:
  3850. * A pointer to a ThemeTextColor that will be set to the matched
  3851. * color.
  3852. *
  3853. * Result:
  3854. * An operating system result code. themeNoAppropriateBrushErr will
  3855. * be returned if no matching ThemeTextColor exists.
  3856. *
  3857. * Availability:
  3858. * Mac OS X: in version 10.5 and later in Carbon.framework
  3859. * CarbonLib: not available
  3860. * Non-Carbon CFM: not available
  3861. }
  3862. function HIThemeGetTextColorForThemeBrush( inBrush: ThemeBrush; inWindowIsActive: Boolean; var outColor: ThemeTextColor ): OSStatus; external name '_HIThemeGetTextColorForThemeBrush';
  3863. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  3864. { The following routines were in Appearance.h prior to 10.6 }
  3865. {
  3866. * GetThemeMenuSeparatorHeight()
  3867. *
  3868. * Summary:
  3869. * Returns the height of a menu item separator, in points.
  3870. *
  3871. * Mac OS X threading:
  3872. * Not thread safe
  3873. *
  3874. * Parameters:
  3875. *
  3876. * outHeight:
  3877. * On exit, contains the height of a menu item separator, in
  3878. * points.
  3879. *
  3880. * Availability:
  3881. * Mac OS X: in version 10.0 and later in Carbon.framework
  3882. * CarbonLib: in CarbonLib 1.0 and later
  3883. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  3884. }
  3885. function GetThemeMenuSeparatorHeight( var outHeight: SInt16 ): OSStatus; external name '_GetThemeMenuSeparatorHeight';
  3886. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3887. {
  3888. * GetThemeMenuItemExtra()
  3889. *
  3890. * Summary:
  3891. * Returns the extra width and height required for a menu item
  3892. * beyond the height of the text.
  3893. *
  3894. * Mac OS X threading:
  3895. * Not thread safe
  3896. *
  3897. * Parameters:
  3898. *
  3899. * inItemType:
  3900. * The type of menu item. These are defined in Appearance.h.
  3901. *
  3902. * outHeight:
  3903. * Extra height, in points, for this item type.
  3904. *
  3905. * outWidth:
  3906. * Extra width, in points, for this item type.
  3907. *
  3908. * Availability:
  3909. * Mac OS X: in version 10.0 and later in Carbon.framework
  3910. * CarbonLib: in CarbonLib 1.0 and later
  3911. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  3912. }
  3913. function GetThemeMenuItemExtra( inItemType: ThemeMenuItemType; var outHeight: SInt16; var outWidth: SInt16 ): OSStatus; external name '_GetThemeMenuItemExtra';
  3914. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3915. {
  3916. * GetThemeMenuTitleExtra()
  3917. *
  3918. * Summary:
  3919. * Returns the extra width for a menu title, in points.
  3920. *
  3921. * Mac OS X threading:
  3922. * Not thread safe
  3923. *
  3924. * Parameters:
  3925. *
  3926. * outWidth:
  3927. * On exit, contains the extra menu title width, in points.
  3928. *
  3929. * inIsSquished:
  3930. * Indicates whether the menu title is being drawn with a
  3931. * condensed appearance.
  3932. *
  3933. * Availability:
  3934. * Mac OS X: in version 10.0 and later in Carbon.framework
  3935. * CarbonLib: in CarbonLib 1.0 and later
  3936. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  3937. }
  3938. function GetThemeMenuTitleExtra( var outWidth: SInt16; inIsSquished: Boolean ): OSStatus; external name '_GetThemeMenuTitleExtra';
  3939. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3940. { The ThemeMetric values are defined in Appearance.h }
  3941. {
  3942. * Summary:
  3943. * Theme metrics allow you to find out sizes of things in the
  3944. * current environment, such as how wide a scroll bar is, etc.
  3945. *
  3946. * Discussion:
  3947. * ThemeMetrics
  3948. }
  3949. const
  3950. {
  3951. * The width (or height if horizontal) of a scroll bar.
  3952. }
  3953. kThemeMetricScrollBarWidth = 0;
  3954. {
  3955. * The width (or height if horizontal) of a small scroll bar.
  3956. }
  3957. kThemeMetricSmallScrollBarWidth = 1;
  3958. {
  3959. * The height of the non-label part of a check box control.
  3960. }
  3961. kThemeMetricCheckBoxHeight = 2;
  3962. {
  3963. * The height of the non-label part of a radio button control.
  3964. }
  3965. kThemeMetricRadioButtonHeight = 3;
  3966. {
  3967. * The amount of white space surrounding the text Rect of the text
  3968. * inside of an Edit Text control. If you select all of the text in
  3969. * an Edit Text control, you can see the white space. The metric is
  3970. * the number of pixels, per side, that the text Rect is outset to
  3971. * create the whitespace Rect.
  3972. }
  3973. kThemeMetricEditTextWhitespace = 4;
  3974. {
  3975. * The thickness of the Edit Text frame that surrounds the whitespace
  3976. * Rect (that is surrounding the text Rect). The metric is the number
  3977. * of pixels, per side, that the frame Rect is outset from the
  3978. * whitespace Rect.
  3979. }
  3980. kThemeMetricEditTextFrameOutset = 5;
  3981. {
  3982. * The number of pixels that the list box frame is outset from the
  3983. * content of the list box.
  3984. }
  3985. kThemeMetricListBoxFrameOutset = 6;
  3986. {
  3987. * Describes how far outside of the input rect DrawThemeFocusRect and
  3988. * HIThemeDrawFocusRect APIs will draw the focus.
  3989. }
  3990. kThemeMetricFocusRectOutset = 7;
  3991. {
  3992. * The thickness of the frame drawn by DrawThemeGenericWell.
  3993. }
  3994. kThemeMetricImageWellThickness = 8;
  3995. {
  3996. * The number of pixels a scrollbar should overlap (actually
  3997. * underlap) any bounding box which surrounds it and scrollable
  3998. * content. This also includes the window frame when a scrolbar is
  3999. * along an edge of the window.
  4000. }
  4001. kThemeMetricScrollBarOverlap = 9;
  4002. {
  4003. * The height of the large tab of a tab control.
  4004. }
  4005. kThemeMetricLargeTabHeight = 10;
  4006. {
  4007. * The width of the caps (end pieces) of the large tabs of a tab
  4008. * control.
  4009. }
  4010. kThemeMetricLargeTabCapsWidth = 11;
  4011. {
  4012. * The amount to add to the tab height (kThemeMetricLargeTabHeight)
  4013. * to find out the rectangle height to use with the various Tab
  4014. * drawing primitives. This amount is also the amount that each tab
  4015. * overlaps the tab pane.
  4016. }
  4017. kThemeMetricTabFrameOverlap = 12;
  4018. {
  4019. * If less than zero, this indicates that the text should be centered
  4020. * on each tab. If greater than zero, the text should be justified
  4021. * (according to the system script direction) and the amount is the
  4022. * offset from the appropriate edge at which the text should start
  4023. * drawing.
  4024. }
  4025. kThemeMetricTabIndentOrStyle = 13;
  4026. {
  4027. * The amount of space that every tab's drawing rectangle overlaps
  4028. * the one on either side of it.
  4029. }
  4030. kThemeMetricTabOverlap = 14;
  4031. {
  4032. * The height of the small tab of a tab control. This includes the
  4033. * pixels that overlap the tab pane and/or tab pane bar.
  4034. }
  4035. kThemeMetricSmallTabHeight = 15;
  4036. {
  4037. * The width of the caps (end pieces) of the small tabs of a tab
  4038. * control.
  4039. }
  4040. kThemeMetricSmallTabCapsWidth = 16;
  4041. {
  4042. * The height of the push button control.
  4043. }
  4044. kThemeMetricPushButtonHeight = 19;
  4045. {
  4046. * The height of the list header field of the data browser control.
  4047. }
  4048. kThemeMetricListHeaderHeight = 20;
  4049. {
  4050. * The height of a disclosure triangle control. This triangle is the
  4051. * not the center of the disclosure button, but its own control.
  4052. }
  4053. kThemeMetricDisclosureTriangleHeight = 25;
  4054. {
  4055. * The width of a disclosure triangle control.
  4056. }
  4057. kThemeMetricDisclosureTriangleWidth = 26;
  4058. {
  4059. * The height of a little arrows control.
  4060. }
  4061. kThemeMetricLittleArrowsHeight = 27;
  4062. {
  4063. * The width of a little arrows control.
  4064. }
  4065. kThemeMetricLittleArrowsWidth = 28;
  4066. {
  4067. * The height of a popup button control.
  4068. }
  4069. kThemeMetricPopupButtonHeight = 30;
  4070. {
  4071. * The height of a small popup button control.
  4072. }
  4073. kThemeMetricSmallPopupButtonHeight = 31;
  4074. {
  4075. * The height of the large progress bar, not including its shadow.
  4076. }
  4077. kThemeMetricLargeProgressBarThickness = 32;
  4078. {
  4079. * This metric is not used.
  4080. }
  4081. kThemeMetricPullDownHeight = 33;
  4082. {
  4083. * This metric is not used.
  4084. }
  4085. kThemeMetricSmallPullDownHeight = 34;
  4086. {
  4087. * The height of the window grow box control.
  4088. }
  4089. kThemeMetricResizeControlHeight = 38;
  4090. {
  4091. * The height of the small grow box control, such as on utility
  4092. * windows.
  4093. }
  4094. kThemeMetricSmallResizeControlHeight = 39;
  4095. {
  4096. * The height of the horizontal slider control.
  4097. }
  4098. kThemeMetricHSliderHeight = 41;
  4099. {
  4100. * The height of the tick marks for a horizontal slider control.
  4101. }
  4102. kThemeMetricHSliderTickHeight = 42;
  4103. {
  4104. * The width of the vertical slider control.
  4105. }
  4106. kThemeMetricVSliderWidth = 45;
  4107. {
  4108. * The width of the tick marks for a vertical slider control.
  4109. }
  4110. kThemeMetricVSliderTickWidth = 46;
  4111. {
  4112. * The height of the title bar widgets (grow, close, and zoom boxes)
  4113. * for a document window.
  4114. }
  4115. kThemeMetricTitleBarControlsHeight = 49;
  4116. {
  4117. * The width of the non-label part of a check box control.
  4118. }
  4119. kThemeMetricCheckBoxWidth = 50;
  4120. {
  4121. * The width of the non-label part of a radio button control.
  4122. }
  4123. kThemeMetricRadioButtonWidth = 52;
  4124. {
  4125. * The height of the normal bar, not including its shadow.
  4126. }
  4127. kThemeMetricNormalProgressBarThickness = 58;
  4128. {
  4129. * The number of pixels of shadow depth drawn below the progress bar.
  4130. }
  4131. kThemeMetricProgressBarShadowOutset = 59;
  4132. {
  4133. * The number of pixels of shadow depth drawn below the small
  4134. * progress bar.
  4135. }
  4136. kThemeMetricSmallProgressBarShadowOutset = 60;
  4137. {
  4138. * The number of pixels that the content of a primary group box is
  4139. * from the bounds of the control.
  4140. }
  4141. kThemeMetricPrimaryGroupBoxContentInset = 61;
  4142. {
  4143. * The number of pixels that the content of a secondary group box is
  4144. * from the bounds of the control.
  4145. }
  4146. kThemeMetricSecondaryGroupBoxContentInset = 62;
  4147. {
  4148. * Width allocated to draw the mark character in a menu.
  4149. }
  4150. kThemeMetricMenuMarkColumnWidth = 63;
  4151. {
  4152. * Width allocated for the mark character in a menu item when the
  4153. * menu has kMenuAttrExcludesMarkColumn.
  4154. }
  4155. kThemeMetricMenuExcludedMarkColumnWidth = 64;
  4156. {
  4157. * Indent into the interior of the mark column at which the mark
  4158. * character is drawn.
  4159. }
  4160. kThemeMetricMenuMarkIndent = 65;
  4161. {
  4162. * Whitespace at the leading edge of menu item text.
  4163. }
  4164. kThemeMetricMenuTextLeadingEdgeMargin = 66;
  4165. {
  4166. * Whitespace at the trailing edge of menu item text.
  4167. }
  4168. kThemeMetricMenuTextTrailingEdgeMargin = 67;
  4169. {
  4170. * Width per indent level (set by SetMenuItemIndent) of a menu item.
  4171. }
  4172. kThemeMetricMenuIndentWidth = 68;
  4173. {
  4174. * Whitespace at the trailing edge of a menu icon (if the item also
  4175. * has text).
  4176. }
  4177. kThemeMetricMenuIconTrailingEdgeMargin = 69;
  4178. {
  4179. * Discussion:
  4180. * The following metrics are only available in OS X.
  4181. }
  4182. const
  4183. {
  4184. * The height of a disclosure button.
  4185. }
  4186. kThemeMetricDisclosureButtonHeight = 17;
  4187. {
  4188. * The height and the width of the round button control.
  4189. }
  4190. kThemeMetricRoundButtonSize = 18;
  4191. {
  4192. * The height of the non-label part of a small check box control.
  4193. }
  4194. kThemeMetricSmallCheckBoxHeight = 21;
  4195. {
  4196. * The width of a disclosure button.
  4197. }
  4198. kThemeMetricDisclosureButtonWidth = 22;
  4199. {
  4200. * The height of a small disclosure button.
  4201. }
  4202. kThemeMetricSmallDisclosureButtonHeight = 23;
  4203. {
  4204. * The width of a small disclosure button.
  4205. }
  4206. kThemeMetricSmallDisclosureButtonWidth = 24;
  4207. {
  4208. * The height (or width if vertical) of a pane splitter.
  4209. }
  4210. kThemeMetricPaneSplitterHeight = 29;
  4211. {
  4212. * The height of the small push button control.
  4213. }
  4214. kThemeMetricSmallPushButtonHeight = 35;
  4215. {
  4216. * The height of the non-label part of a small radio button control.
  4217. }
  4218. kThemeMetricSmallRadioButtonHeight = 36;
  4219. {
  4220. * The height of the relevance indicator control.
  4221. }
  4222. kThemeMetricRelevanceIndicatorHeight = 37;
  4223. {
  4224. * The height and the width of the large round button control.
  4225. }
  4226. kThemeMetricLargeRoundButtonSize = 40;
  4227. {
  4228. * The height of the small, horizontal slider control.
  4229. }
  4230. kThemeMetricSmallHSliderHeight = 43;
  4231. {
  4232. * The height of the tick marks for a small, horizontal slider
  4233. * control.
  4234. }
  4235. kThemeMetricSmallHSliderTickHeight = 44;
  4236. {
  4237. * The width of the small, vertical slider control.
  4238. }
  4239. kThemeMetricSmallVSliderWidth = 47;
  4240. {
  4241. * The width of the tick marks for a small, vertical slider control.
  4242. }
  4243. kThemeMetricSmallVSliderTickWidth = 48;
  4244. {
  4245. * The width of the non-label part of a small check box control.
  4246. }
  4247. kThemeMetricSmallCheckBoxWidth = 51;
  4248. {
  4249. * The width of the non-label part of a small radio button control.
  4250. }
  4251. kThemeMetricSmallRadioButtonWidth = 53;
  4252. {
  4253. * The minimum width of the thumb of a small, horizontal slider
  4254. * control.
  4255. }
  4256. kThemeMetricSmallHSliderMinThumbWidth = 54;
  4257. {
  4258. * The minimum width of the thumb of a small, vertical slider control.
  4259. }
  4260. kThemeMetricSmallVSliderMinThumbHeight = 55;
  4261. {
  4262. * The offset of the tick marks from the appropriate side of a small
  4263. * horizontal slider control.
  4264. }
  4265. kThemeMetricSmallHSliderTickOffset = 56;
  4266. {
  4267. * The offset of the tick marks from the appropriate side of a small
  4268. * vertical slider control.
  4269. }
  4270. kThemeMetricSmallVSliderTickOffset = 57;
  4271. {
  4272. * Discussion:
  4273. * The following metrics are only available in Mac OS X 10.3 and
  4274. * later.
  4275. }
  4276. const
  4277. kThemeMetricComboBoxLargeBottomShadowOffset = 70;
  4278. kThemeMetricComboBoxLargeRightShadowOffset = 71;
  4279. kThemeMetricComboBoxSmallBottomShadowOffset = 72;
  4280. kThemeMetricComboBoxSmallRightShadowOffset = 73;
  4281. kThemeMetricComboBoxLargeDisclosureWidth = 74;
  4282. kThemeMetricComboBoxSmallDisclosureWidth = 75;
  4283. kThemeMetricRoundTextFieldContentInsetLeft = 76;
  4284. kThemeMetricRoundTextFieldContentInsetRight = 77;
  4285. kThemeMetricRoundTextFieldContentInsetBottom = 78;
  4286. kThemeMetricRoundTextFieldContentInsetTop = 79;
  4287. kThemeMetricRoundTextFieldContentHeight = 80;
  4288. kThemeMetricComboBoxMiniBottomShadowOffset = 81;
  4289. kThemeMetricComboBoxMiniDisclosureWidth = 82;
  4290. kThemeMetricComboBoxMiniRightShadowOffset = 83;
  4291. kThemeMetricLittleArrowsMiniHeight = 84;
  4292. kThemeMetricLittleArrowsMiniWidth = 85;
  4293. kThemeMetricLittleArrowsSmallHeight = 86;
  4294. kThemeMetricLittleArrowsSmallWidth = 87;
  4295. kThemeMetricMiniCheckBoxHeight = 88;
  4296. kThemeMetricMiniCheckBoxWidth = 89;
  4297. kThemeMetricMiniDisclosureButtonHeight = 90;
  4298. kThemeMetricMiniDisclosureButtonWidth = 91;
  4299. kThemeMetricMiniHSliderHeight = 92;
  4300. kThemeMetricMiniHSliderMinThumbWidth = 93;
  4301. kThemeMetricMiniHSliderTickHeight = 94;
  4302. kThemeMetricMiniHSliderTickOffset = 95;
  4303. kThemeMetricMiniPopupButtonHeight = 96;
  4304. kThemeMetricMiniPullDownHeight = 97;
  4305. kThemeMetricMiniPushButtonHeight = 98;
  4306. kThemeMetricMiniRadioButtonHeight = 99;
  4307. kThemeMetricMiniRadioButtonWidth = 100;
  4308. kThemeMetricMiniTabCapsWidth = 101;
  4309. kThemeMetricMiniTabFrameOverlap = 102;
  4310. kThemeMetricMiniTabHeight = 103;
  4311. kThemeMetricMiniTabOverlap = 104;
  4312. kThemeMetricMiniVSliderMinThumbHeight = 105;
  4313. kThemeMetricMiniVSliderTickOffset = 106;
  4314. kThemeMetricMiniVSliderTickWidth = 107;
  4315. kThemeMetricMiniVSliderWidth = 108;
  4316. kThemeMetricRoundTextFieldContentInsetWithIconLeft = 109;
  4317. kThemeMetricRoundTextFieldContentInsetWithIconRight = 110;
  4318. kThemeMetricRoundTextFieldMiniContentHeight = 111;
  4319. kThemeMetricRoundTextFieldMiniContentInsetBottom = 112;
  4320. kThemeMetricRoundTextFieldMiniContentInsetLeft = 113;
  4321. kThemeMetricRoundTextFieldMiniContentInsetRight = 114;
  4322. kThemeMetricRoundTextFieldMiniContentInsetTop = 115;
  4323. kThemeMetricRoundTextFieldMiniContentInsetWithIconLeft = 116;
  4324. kThemeMetricRoundTextFieldMiniContentInsetWithIconRight = 117;
  4325. kThemeMetricRoundTextFieldSmallContentHeight = 118;
  4326. kThemeMetricRoundTextFieldSmallContentInsetBottom = 119;
  4327. kThemeMetricRoundTextFieldSmallContentInsetLeft = 120;
  4328. kThemeMetricRoundTextFieldSmallContentInsetRight = 121;
  4329. kThemeMetricRoundTextFieldSmallContentInsetTop = 122;
  4330. kThemeMetricRoundTextFieldSmallContentInsetWithIconLeft = 123;
  4331. kThemeMetricRoundTextFieldSmallContentInsetWithIconRight = 124;
  4332. kThemeMetricSmallTabFrameOverlap = 125;
  4333. kThemeMetricSmallTabOverlap = 126;
  4334. {
  4335. * The height of a small pane splitter. Should only be used in a
  4336. * window with thick borders, like a metal window.
  4337. }
  4338. kThemeMetricSmallPaneSplitterHeight = 127;
  4339. {
  4340. * Discussion:
  4341. * The following metrics are only available in Mac OS X 10.4 and
  4342. * later.
  4343. }
  4344. const
  4345. {
  4346. * The horizontal start offset for the first tick mark on a
  4347. * horizontal slider.
  4348. }
  4349. kThemeMetricHSliderTickOffset = 128;
  4350. {
  4351. * The vertical start offset for the first tick mark on a vertical
  4352. * slider.
  4353. }
  4354. kThemeMetricVSliderTickOffset = 129;
  4355. {
  4356. * The minimum thumb height for a thumb on a slider.
  4357. }
  4358. kThemeMetricSliderMinThumbHeight = 130;
  4359. kThemeMetricSliderMinThumbWidth = 131;
  4360. {
  4361. * The minimum thumb height for a thumb on a scroll bar.
  4362. }
  4363. kThemeMetricScrollBarMinThumbHeight = 132;
  4364. {
  4365. * The minimum thumb width for a thumb on a scroll bar.
  4366. }
  4367. kThemeMetricScrollBarMinThumbWidth = 133;
  4368. {
  4369. * The minimum thumb height for a thumb on a small scroll bar.
  4370. }
  4371. kThemeMetricSmallScrollBarMinThumbHeight = 134;
  4372. {
  4373. * The minimum thumb width for a thumb on a small scroll bar.
  4374. }
  4375. kThemeMetricSmallScrollBarMinThumbWidth = 135;
  4376. {
  4377. * The height of the round-ended button. (For example, the Kind
  4378. * button in a Finder Search query.)
  4379. }
  4380. kThemeMetricButtonRoundedHeight = 136;
  4381. {
  4382. * The height of the inset round-ended button. (For example, the
  4383. * Servers button in a Finder Search query.)
  4384. }
  4385. kThemeMetricButtonRoundedRecessedHeight = 137;
  4386. {
  4387. * Discussion:
  4388. * The following metrics are only available in Mac OS X 10.5 and
  4389. * later.
  4390. }
  4391. const
  4392. {
  4393. * This metric refers to the appearance of the separator control.
  4394. * That separator is drawn with the HIThemeDrawSeparator theme
  4395. * primitive. This metric is the height of a horizontal separator or
  4396. * the width of a vertical separator.
  4397. }
  4398. kThemeMetricSeparatorSize = 138;
  4399. {
  4400. * The height of the push button control variant that is designed to
  4401. * be used in a textured window.
  4402. }
  4403. kThemeMetricTexturedPushButtonHeight = 139;
  4404. {
  4405. * The height of the small push button control variant that is
  4406. * designed to be used in a textured window.
  4407. }
  4408. kThemeMetricTexturedSmallPushButtonHeight = 140;
  4409. type
  4410. ThemeMetric = UInt32;
  4411. {
  4412. * GetThemeMetric()
  4413. *
  4414. * Summary:
  4415. * Returns a measurement in points for a specified type of user
  4416. * interface element.
  4417. *
  4418. * Mac OS X threading:
  4419. * Not thread safe
  4420. *
  4421. * Parameters:
  4422. *
  4423. * inMetric:
  4424. * The metric to retrieve.
  4425. *
  4426. * outMetric:
  4427. * The size of the specified user interface element, in points.
  4428. *
  4429. * Availability:
  4430. * Mac OS X: in version 10.0 and later in Carbon.framework
  4431. * CarbonLib: in CarbonLib 1.0 and later
  4432. * Non-Carbon CFM: not available
  4433. }
  4434. function GetThemeMetric( inMetric: ThemeMetric; var outMetric: SInt32 ): OSStatus; external name '_GetThemeMetric';
  4435. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4436. {
  4437. * CopyThemeIdentifier()
  4438. *
  4439. * Summary:
  4440. * Retrieves a string identifying the current theme variant, which
  4441. * may be Aqua or Graphite.
  4442. *
  4443. * Mac OS X threading:
  4444. * Not thread safe
  4445. *
  4446. * Parameters:
  4447. *
  4448. * outIdentifier:
  4449. * On exit, contains the theme variant identifier. This string
  4450. * must be released by the caller.
  4451. *
  4452. * Availability:
  4453. * Mac OS X: in version 10.1 and later in Carbon.framework
  4454. * CarbonLib: in CarbonLib 1.4 and later
  4455. * Non-Carbon CFM: not available
  4456. }
  4457. function CopyThemeIdentifier( var outIdentifier: CFStringRef ): OSStatus; external name '_CopyThemeIdentifier';
  4458. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  4459. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4460. { Obsolete symbolic names }
  4461. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4462. const
  4463. kThemeMetricCheckBoxGlyphHeight = kThemeMetricCheckBoxHeight;
  4464. kThemeMetricRadioButtonGlyphHeight = kThemeMetricRadioButtonHeight;
  4465. kThemeMetricDisclosureButtonSize = kThemeMetricDisclosureButtonHeight;
  4466. kThemeMetricBestListHeaderHeight = kThemeMetricListHeaderHeight;
  4467. kThemeMetricSmallProgressBarThickness = kThemeMetricNormalProgressBarThickness; { obsolete }
  4468. kThemeMetricProgressBarThickness = kThemeMetricLargeProgressBarThickness; { obsolete }
  4469. {$endc} {TARGET_OS_MAC}
  4470. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  4471. end.
  4472. {$endc} {not MACOSALLINCLUDE}