1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820 |
- {
- File: HIToolbox/HIView.h
-
- Contains: HIView routines
-
- Version: HIToolbox-219.4.81~2
-
- Copyright: © 2001-2005 by Apple Computer, Inc., all rights reserved.
-
- Bugs?: For bug reports, consult the following page on
- the World Wide Web:
-
- http://www.freepascal.org/bugs.html
-
- }
- { File: HIView.p(.pas) }
- { }
- { Contains: CodeWarrior Pascal( GPC) translation of Apple's Mac OS X 10.3 HIView.h }
- { Translation compatible with make-gpc-interfaces.pl generated MWPInterfaces }
- { (GPCPInterfaces). For the 10.2 available APIs, the CodeWarrior Pascal translation }
- { is linkable with Mac OS X 10.2.x or higher CFM CarbonLib and the GPC translation is }
- { linkable with Mac OS X 10.2.x or higher Mach-O Carbon.framework. For the 10.3 }
- { available APIs, the CodeWarrior Pascal translation is only selectively linkable with }
- { Mac OS X 10.3.x or higher CFM CarbonLib and the GPC translation is linkable with Mac }
- { OS X 10.3.x or higher Mach-O Carbon.framework. }
- { }
- { Version: 1.1 }
- { }
- { Pascal Translation: Gale Paeper, <[email protected]>, 2004 }
- { }
- { Copyright: Subject to the constraints of Apple's original rights, you're free to use this }
- { translation as you deem fit. }
- { }
- { Bugs?: This is an AS IS translation with no express guarentees of any kind. }
- { If you do find a bug, please help out the Macintosh Pascal programming community by }
- { reporting your bug finding and possible fix to either personal e-mail to Gale Paeper }
- { or a posting to the MacPascal mailing list. }
- {
- Change History (most recent first ):
- <4> 4/8/04 GRP Completed new additions from HIView.h, version HIToolbox-145.33~1.
- <3> ?/?/04 PNL Added most new additions from HIView.h, version HIToolbox-145.33~1.
- <2> 10/02/04 GRP Added support for GPC as well as CodeWarrior Pascal.
- <1> 9/8/03 GRP First Pascal translation of HIView.h, version HIToolbox-123.6~10.
- }
- { Translation assisted by: }
- {This file was processed by Dan's Source Converter}
- {version 1.3 (this version modified by Ingemar Ragnemalm)}
- { Pascal Translation Updated: Peter N Lewis, <[email protected]>, August 2005 }
- {
- Modified for use with Free Pascal
- Version 200
- Please report any bugs to <[email protected]>
- }
- {$mode macpas}
- {$packenum 1}
- {$macro on}
- {$inline on}
- {$CALLING MWPASCAL}
- unit HIView;
- interface
- {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
- {$setc GAP_INTERFACES_VERSION := $0200}
- {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
- {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
- {$endc}
- {$ifc defined CPUPOWERPC and defined CPUI386}
- {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
- {$endc}
- {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
- {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
- {$endc}
- {$ifc not defined __ppc__ and defined CPUPOWERPC}
- {$setc __ppc__ := 1}
- {$elsec}
- {$setc __ppc__ := 0}
- {$endc}
- {$ifc not defined __i386__ and defined CPUI386}
- {$setc __i386__ := 1}
- {$elsec}
- {$setc __i386__ := 0}
- {$endc}
- {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
- {$error Conflicting definitions for __ppc__ and __i386__}
- {$endc}
- {$ifc defined __ppc__ and __ppc__}
- {$setc TARGET_CPU_PPC := TRUE}
- {$setc TARGET_CPU_X86 := FALSE}
- {$elifc defined __i386__ and __i386__}
- {$setc TARGET_CPU_PPC := FALSE}
- {$setc TARGET_CPU_X86 := TRUE}
- {$elsec}
- {$error Neither __ppc__ nor __i386__ is defined.}
- {$endc}
- {$setc TARGET_CPU_PPC_64 := FALSE}
- {$ifc defined FPC_BIG_ENDIAN}
- {$setc TARGET_RT_BIG_ENDIAN := TRUE}
- {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
- {$elifc defined FPC_LITTLE_ENDIAN}
- {$setc TARGET_RT_BIG_ENDIAN := FALSE}
- {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
- {$elsec}
- {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
- {$endc}
- {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
- {$setc CALL_NOT_IN_CARBON := FALSE}
- {$setc OLDROUTINENAMES := FALSE}
- {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
- {$setc OPAQUE_UPP_TYPES := TRUE}
- {$setc OTCARBONAPPLICATION := TRUE}
- {$setc OTKERNEL := FALSE}
- {$setc PM_USE_SESSION_APIS := TRUE}
- {$setc TARGET_API_MAC_CARBON := TRUE}
- {$setc TARGET_API_MAC_OS8 := FALSE}
- {$setc TARGET_API_MAC_OSX := TRUE}
- {$setc TARGET_CARBON := TRUE}
- {$setc TARGET_CPU_68K := FALSE}
- {$setc TARGET_CPU_MIPS := FALSE}
- {$setc TARGET_CPU_SPARC := FALSE}
- {$setc TARGET_OS_MAC := TRUE}
- {$setc TARGET_OS_UNIX := FALSE}
- {$setc TARGET_OS_WIN32 := FALSE}
- {$setc TARGET_RT_MAC_68881 := FALSE}
- {$setc TARGET_RT_MAC_CFM := FALSE}
- {$setc TARGET_RT_MAC_MACHO := TRUE}
- {$setc TYPED_FUNCTION_POINTERS := TRUE}
- {$setc TYPE_BOOL := FALSE}
- {$setc TYPE_EXTENDED := FALSE}
- {$setc TYPE_LONGLONG := TRUE}
- uses MacTypes,CFArray,CFBase,CGContext,CGImage,CarbonEventsCore,Drag,Events,Quickdraw,Menus,Appearance,Controls,CarbonEvents,HIGeometry,Icons,HIShape;
- {$ALIGN MAC68K}
- type
- HIViewRef = ControlRef;
- type
- HIViewID = ControlID;
- {
- * kHIViewWindowContentID
- *
- * Discussion:
- * The standard view ID for the content view of a window.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- {GRP translation note: kHIViewWindowContentID is really a C language external constant exported from
- CarbonLib (Carbon.framework). Treating it as an externally declared variable works as long as it
- used as a READ ONLY variable. CodeWarrior Pascal has no capability for enforcing READ ONLY usage
- so it is up to the programmer to obey the READ ONLY rule. GPC does enforce READ ONLY usage with the
- attribute (const).}
-
- {WARNING: The CFM CarbonLib export for kHIViewWindowContentID is broken. For CFM CodeWarrior Pascal,
- some workarounds are:
- 1. Use CFBundle loading and CFBundleGetDataPointerForName to obtain the correct data.
- 2. For composting windows, the correct data can be obtained with code similar to:
- ignoreResult := GetRootControl( theWind, theContentRoot );
- ignoreResult := GetControlID( theContentRoot, theContentControlID );
- The correct data for kHIViewWindowContentID is in theContentControlID.
- }
- var kHIViewWindowContentID: HIViewID; external name '_kHIViewWindowContentID'; (* attribute const *)
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * kHIViewWindowGrowBoxID
- *
- * Discussion:
- * The standard view ID for the grow box view of a window. Not all
- * windows have grow boxes, so be aware that you might not find this
- * view if you look for it.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- {GRP translation note: kHIViewWindowGrowBoxID is really a C language external constant exported from
- CarbonLib (Carbon.framework). Treating it as an externally declared variable works as long as it
- used as a READ ONLY variable. CodeWarrior Pascal has no capability for enforcing READ ONLY usage
- so it is up to the programmer to obey the READ ONLY rule. GPC does enforce READ ONLY usage with the
- attribute (const).}
- var kHIViewWindowGrowBoxID: HIViewID; external name '_kHIViewWindowGrowBoxID'; (* attribute const *)
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * Discussion:
- * HIViewZOrderOp
- }
- const
- {
- * Indicates we wish to order a view above another view.
- }
- kHIViewZOrderAbove = 1;
- {
- * Indicates we wish to order a view below another view.
- }
- kHIViewZOrderBelow = 2;
- type
- HIViewZOrderOp = UInt32;
- {
- * HIViewFrameMetrics
- *
- * Summary:
- * Describes the offsets from the structure to the content area of a
- * view; for example, the top metric is the difference between the
- * vertical coordinate of the top edge of the viewÕs structure
- * region and the vertical coordinate of the top edge of the viewÕs
- * content region. This structure is returned by a view in response
- * to a kEventControlGetFrameMetrics event.
- }
- type
- HIViewFrameMetrics = record
- {
- * Height of the top of the structure area.
- }
- top: Float32;
- {
- * Width of the left of the structure area.
- }
- left: Float32;
- {
- * Height of the bottom of the structure area.
- }
- bottom: Float32;
- {
- * Width of the right of the structure area.
- }
- right: Float32;
- end;
- {==============================================================================}
- { ATTRIBUTES }
- {==============================================================================}
- {
- * Summary:
- * View attributes are generally determined by clients of the view;
- * the view itself should observe the attributes and behave
- * accordingly.
- *
- * Discussion:
- * View Attributes
- }
- const
- {
- * When set, the control will send the command it generates to the
- * user focus and propagate as it would naturally from there. The
- * default is to send the command to itself and then to its parent
- * and so forth.
- }
- kHIViewAttributeSendCommandToUserFocus = 1 shl 0;
- {
- * Indicates that a text editing control should behave appropriately
- * for editing fields in a dialog; specifically, the control should
- * ignore the Return, Enter, Escape, and Tab keys, and allow them to
- * be processed by other participants in the event flow. Available on
- * Mac OS X 10.3 and later.
- }
- kHIViewAttributeIsFieldEditor = 1 shl 1;
- {
- * Legacy synonym for kHIViewAttributeSendCommandToUserFocus. Please
- * use it instead.
- }
- kHIViewSendCommandToUserFocus = kHIViewAttributeSendCommandToUserFocus;
- {
- * HIView features
- *
- * Summary:
- * View feature flags are generally determined by the view itself,
- * and are not typically changed by clients of the view.
- }
- const
- {
- * This view supports using the ghosting protocol when live tracking
- * is not enabled.
- }
- kHIViewFeatureSupportsGhosting = 1 shl 0;
- {
- * This view allows subviews to be embedded within it.
- }
- kHIViewFeatureAllowsSubviews = 1 shl 1;
- {
- * If this view is clicked, the keyboard focus should be set to this
- * view automatically. This is primarily used for edit text controls.
- }
- kHIViewFeatureGetsFocusOnClick = 1 shl 8;
- {
- * This view supports the live feedback protocol. Necessary to
- * implement live scroll bar tracking. Clients of a view should never
- * disable this.
- }
- kHIViewFeatureSupportsLiveFeedback = 1 shl 10;
- {
- * This view can be put into a radio group. Radio buttons and bevel
- * buttons report this behavior.
- }
- kHIViewFeatureSupportsRadioBehavior = 1 shl 11;
- {
- * This view supports the auto-toggle protocol and should at the very
- * least auto- toggle from off to on and back. The view can support a
- * carbon event for more advanced auto-toggling of its value. The tab
- * view supports this, for example, so that when a tab is clicked its
- * value changes automatically.
- }
- kHIViewFeatureAutoToggles = 1 shl 14;
- {
- * This is merely informational. Turning it off would not necessarily
- * disable any timer a view might be using, but it could obey this
- * bit if it so desired.
- }
- kHIViewFeatureIdlesWithTimer = 1 shl 23;
- {
- * This tells the control manager that the up button part increases
- * the value of the control instead of decreasing it. For example,
- * the Little Arrows (Spinner) control increase its value when the up
- * button is pressed. Scroll bars, on the other hand, decrease the
- * value when their up buttons are pressed.
- }
- kHIViewFeatureInvertsUpDownValueMeaning = 1 shl 24;
- {
- * This is an optimization for determining a view's opaque region.
- * When set, the view system just uses the view's structure region,
- * and can usually avoid having to call the view at all.
- }
- kHIViewFeatureIsOpaque = 1 shl 25;
- {
- * This is an optimization for determining what gets invalidated when
- * views are dirtied. For example, on a metal window, the content
- * view is actually fully transparent, so invalidating it doesn't
- * really help things. By telling the control manager that the view
- * is transparent and does not do any drawing, we can avoid trying to
- * invalidate it and instead invalidate views behind it.
- }
- kHIViewFeatureDoesNotDraw = 1 shl 27;
- {
- * Indicates to the Control Manager that this view doesn't use the
- * special part codes for indicator, inactive, and disabled.
- * Available in Mac OS X 10.3 and later.
- }
- kHIViewFeatureDoesNotUseSpecialParts = 1 shl 28;
- {
- * This is an optimization for determining the clickable region of a
- * window (used for metal windows, for example, when doing async
- * window dragging). The presence of this bit tells us not to bother
- * asking the control for the clickable region. A view like the
- * visual separator would set this bit. It's typically used in
- * conjunction with the kHIViewFeatureDoesNotDraw bit.
- }
- kHIViewFeatureIgnoresClicks = 1 shl 29;
- {
- * HIView valid feature sets
- *
- * Summary:
- * These are sets of features that are available on the version of
- * Mac OS X corresponding to that named in the constant.
- }
- const
- kHIViewValidFeaturesForPanther = $3B804D03;
- {
- * HIView feature synonyms
- *
- * Summary:
- * Legacy synonyms for HIView feature bit names. Please use the
- * newer names.
- }
- const
- kHIViewSupportsGhosting = kHIViewFeatureSupportsGhosting;
- kHIViewAllowsSubviews = kHIViewFeatureAllowsSubviews;
- kHIViewGetsFocusOnClick = kHIViewFeatureGetsFocusOnClick;
- kHIViewSupportsLiveFeedback = kHIViewFeatureSupportsLiveFeedback;
- kHIViewSupportsRadioBehavior = kHIViewFeatureSupportsRadioBehavior;
- kHIViewAutoToggles = kHIViewFeatureAutoToggles;
- kHIViewIdlesWithTimer = kHIViewFeatureIdlesWithTimer;
- kHIViewInvertsUpDownValueMeaning = kHIViewFeatureInvertsUpDownValueMeaning;
- kHIViewIsOpaque = kHIViewFeatureIsOpaque;
- kHIViewDoesNotDraw = kHIViewFeatureDoesNotDraw;
- kHIViewDoesNotUseSpecialParts = kHIViewFeatureDoesNotUseSpecialParts;
- kHIViewIgnoresClicks = kHIViewFeatureIgnoresClicks;
- type
- HIViewFeatures = UInt64;
- {==============================================================================}
- { VIEW PART CODES }
- {==============================================================================}
- type
- HIViewPartCode = ControlPartCode;
- HIViewPartCodePtr = ^HIViewPartCode;
- {
- * HIViewPartCodes
- *
- }
- const
- kHIViewNoPart = 0;
- kHIViewIndicatorPart = 129;
- kHIViewDisabledPart = 254;
- kHIViewInactivePart = 255;
- {
- * Use this constant when not referring to a specific part, but
- * rather the entire view.
- }
- kHIViewEntireView = kHIViewNoPart;
- {
- * HIView Meta-Parts
- *
- * Summary:
- * A meta-part is a part used in a call to the HIViewCopyShape API.
- * These parts are parts that might be defined by a view. They
- * define a region of a view. Along with these parts, you can also
- * pass in normal part codes to get the regions of those parts. Not
- * all views fully support this feature.
- }
- const
- {
- * The structure region is the total area over which the view draws.
- }
- kHIViewStructureMetaPart = -1;
- {
- * The content region is only defined by views that can embed other
- * views. It is the area that embedded content can live.
- }
- kHIViewContentMetaPart = -2;
- {
- * Mac OS X 10.2 or later
- }
- kHIViewOpaqueMetaPart = -3;
- {
- * Mac OS X 10.3 or later, only used for async window dragging.
- * Default is structure region.
- }
- kHIViewClickableMetaPart = -4;
- {
- * HIView Focus Parts
- *
- }
- const
- {
- * Tells view to clear its focus
- }
- kHIViewFocusNoPart = kHIViewNoPart;
- {
- * Tells view to focus on the next part
- }
- kHIViewFocusNextPart = -1;
- {
- * Tells view to focus on the previous part
- }
- kHIViewFocusPrevPart = -2;
- {==============================================================================}
- { CONTENT }
- {==============================================================================}
- type
- HIViewImageContentType = ControlContentType;
- type
- HIViewImageContentInfo = ControlImageContentInfo;
- type
- HIViewContentType = SInt16;
- {
- * HIViewContentTypes
- *
- }
- const
- {
- * The view has no content besides text.
- }
- kHIViewContentTextOnly = 0;
- {
- * The view has no content.
- }
- kHIViewContentNone = 0;
- {
- * The view's content is an IconSuiteRef.
- }
- kHIViewContentIconSuiteRef = 129;
- {
- * The view's content is an IconRef.
- }
- kHIViewContentIconRef = 132;
- {
- * The view's content is a CGImageRef.
- }
- kHIViewContentCGImageRef = 134;
- {
- * HIViewContentInfo
- }
- type
- HIViewContentInfo = record
- {
- * The type of content referenced in the content union.
- }
- contentType: HIViewContentType;
- case SInt16 of
- 0: (
- iconSuite: IconSuiteRef;
- );
- 1: (
- iconRef: IconRef_fix;
- );
- 2: (
- imageRef: CGImageRef;
- );
- end;
- type
- HIViewContentInfoPtr = ^HIViewContentInfo;
- {==============================================================================}
- { ERROR CODES }
- {==============================================================================}
- {
- * Discussion:
- * View/Control Error Codes
- }
- const
- {
- * This value will be returned from an HIView API or a Control
- * Manager API when an action that is only supported on a compositing
- * window is attempted on a non-compositing window. This doesn't
- * necessarily mean that the API is only callable for compositing
- * windows; sometimes the legality of the action is based on other
- * parameters of the API. See HIViewAddSubview for one particular use
- * of this error code.
- }
- errNeedsCompositedWindow = -30598;
- {==============================================================================}
- { HIOBJECT SUPPORT }
- { Setting Initial Bounds }
- { When creating a view using HIObjectCreate, you can set the initial bounds }
- { automatically by passing in an initialization event into HIObjectCreate }
- { with a kEventParamBounds parameter as typeHIRect or typeQDRectangle. }
- {==============================================================================}
- { The HIObject class ID for the HIView class. }
- {$ifc USE_CFSTR_CONSTANT_MACROS}
- {$definec kHIViewClassID CFSTRP('com.apple.hiview')}
- {$endc}
- {==============================================================================}
- { EMBEDDING }
- {==============================================================================}
- {
- * HIViewGetRoot()
- *
- * Discussion:
- * Returns the root view for a window.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inWindow:
- * The window to get the root for.
- *
- * Result:
- * The root view for the window, or NULL if an invalid window is
- * passed.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetRoot( inWindow: WindowRef ): HIViewRef; external name '_HIViewGetRoot';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewAddSubview()
- *
- * Discussion:
- * Adds a subview to the given parent. The new subview is added to
- * the front of the list of subviews (i.e., it is made topmost).
- *
- * The subview being added is not retained by the new parent view.
- * Do not release the view after adding it, or it will cease to
- * exist. All views in a window will be released automatically when
- * the window is destroyed.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inParent:
- * The view which will receive the new subview.
- *
- * inNewChild:
- * The subview being added.
- *
- * Result:
- * An operating system result code.
- * errNeedsCompositedWindow will be returned when you try to embed
- * into the content view in a non-compositing window; you can only
- * embed into the content view in compositing windows.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewAddSubview( inParent: HIViewRef; inNewChild: HIViewRef ): OSStatus; external name '_HIViewAddSubview';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewRemoveFromSuperview()
- *
- * Discussion:
- * Removes a view from its parent.
- * The subview being removed from the parent is not released and
- * still exists.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to remove.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewRemoveFromSuperview( inView: HIViewRef ): OSStatus; external name '_HIViewRemoveFromSuperview';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewGetSuperview()
- *
- * Discussion:
- * Returns a view's parent view.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view whose parent you are interested in getting.
- *
- * Result:
- * An HIView reference, or NULL if this view has no parent or is
- * invalid.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetSuperview( inView: HIViewRef ): HIViewRef; external name '_HIViewGetSuperview';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewGetFirstSubview()
- *
- * Discussion:
- * Returns the first subview of a container. The first subview is
- * the topmost subview in z-order.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view whose subview you are fetching.
- *
- * Result:
- * An HIView reference, or NULL if this view has no subviews or is
- * invalid.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetFirstSubview( inView: HIViewRef ): HIViewRef; external name '_HIViewGetFirstSubview';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewGetLastSubview()
- *
- * Discussion:
- * Returns the last subview of a container. The last subview is the
- * bottommost subview in z-order.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view whose subview you are fetching.
- *
- * Result:
- * An HIView reference, or NULL if this view has no subviews or is
- * invalid.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetLastSubview( inView: HIViewRef ): HIViewRef; external name '_HIViewGetLastSubview';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewGetNextView()
- *
- * Discussion:
- * Returns the next view after the one given, in z-order.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to use as reference.
- *
- * Result:
- * An HIView reference, or NULL if this view has no view behind it
- * or is invalid.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetNextView( inView: HIViewRef ): HIViewRef; external name '_HIViewGetNextView';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewGetPreviousView()
- *
- * Discussion:
- * Returns the previous view before the one given, in z-order.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to use as reference.
- *
- * Result:
- * An HIView reference, or NULL if this view has no view in front of
- * it or is invalid.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetPreviousView( inView: HIViewRef ): HIViewRef; external name '_HIViewGetPreviousView';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewCountSubviews()
- *
- * Summary:
- * Counts the number of subviews embedded in a view.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view for which to count subviews.
- *
- * outSubviewCount:
- *
- * Result:
- * The number of subviews of the specified view.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewCountSubviews( inView: HIViewRef ): CFIndex; external name '_HIViewCountSubviews';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewGetIndexedSubview()
- *
- * Summary:
- * Get the Nth subview of a view.
- *
- * Discussion:
- * Instead of calling HIViewGetIndexedSubview repeatedly, it may be
- * more efficient to iterate through the subviews of a view with
- * calls HIViewGetFirstSubview and HIViewGetNextView.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view whose indexed sub-view is being requested.
- *
- * inSubviewIndex:
- * The index of the subview to get.
- *
- * outSubview:
- * An HIViewRef to be filled with the indexed subview.
- *
- * Result:
- * A result code indicating success or failure.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetIndexedSubview( inView: HIViewRef; inSubviewIndex: CFIndex; var outSubview: HIViewRef ): OSStatus; external name '_HIViewGetIndexedSubview';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewSetZOrder()
- *
- * Discussion:
- * Allows you to change the front-to-back ordering of sibling views.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view whose Z-order you wish to change.
- *
- * inOp:
- * Indicates to order inView above or below inOther.
- *
- * inOther:
- * Another optional view to use as a reference. You can pass NULL
- * to mean an absolute position. For example, passing
- * kHIViewZOrderAbove and NULL will move a view to the front of
- * all of its siblings. Likewise, passing kHIViewZOrderBelow and
- * NULL will move it to the back.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSetZOrder( inView: HIViewRef; inOp: HIViewZOrderOp; inOther: HIViewRef { can be NULL } ): OSStatus; external name '_HIViewSetZOrder';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {==============================================================================}
- { STATE and VALUES }
- {==============================================================================}
- {
- * HIViewKind
- }
- type
- HIViewKind = record
- {
- * The signature of the view. Apple reserves all signatures made up
- * of only lowercase characters.
- }
- signature: OSType;
- {
- * The kind of the view. Apple reserves all kinds made up of only
- * lowercase characters.
- }
- kind: OSType;
- end;
- {
- * View signature kind
- *
- }
- const
- {
- * The signature of all HIToolbox views.
- }
- kHIViewKindSignatureApple = $6170706C (* 'appl' *);
- {
- * HIViewSetVisible()
- *
- * Discussion:
- * Hides or shows a view. Marks the area the view will occupy or
- * used to occupy as needing to be redrawn later.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to hide or show.
- *
- * inVisible:
- * A boolean value which indicates whether you wish to hide the
- * view (false) or show the view (true).
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSetVisible( inView: HIViewRef; inVisible: Boolean ): OSStatus; external name '_HIViewSetVisible';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewIsVisible()
- *
- * Summary:
- * Returns whether a view is visible.
- *
- * Discussion:
- * Note that HIViewIsVisible returns a view's effective visibility,
- * which is determined both by the view's own visibility and the
- * visibility of its parent views. If a parent view is invisible,
- * then this view is considered to be invisible also.
- *
- * Latent visibility can be determined with HIViewIsLatentlyVisible.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view whose visibility you wish to determine.
- *
- * Result:
- * A boolean value indicating whether the view is visible (true) or
- * hidden (false).
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewIsVisible( inView: HIViewRef ): Boolean; external name '_HIViewIsVisible';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewIsLatentlyVisible()
- *
- * Summary:
- * Returns whether or not a view is latently visible.
- *
- * Discussion:
- * The view's visibility is also affected by the visibility of its
- * parents; if any parent view is invisible, this view is considered
- * invisible as well. HIViewIsLatentlyVisible returns whether a view
- * is latently visible, even if its parents are invisible.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view whose latent visibility is to be checked.
- *
- * Result:
- * True if the view is latently visible, otherwise false.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewIsLatentlyVisible( inView: HIViewRef ): Boolean; external name '_HIViewIsLatentlyVisible';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewSetHilite()
- *
- * Summary:
- * Changes the highlighting of a view.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view on which to set the highlight.
- *
- * inHilitePart:
- * An HIViewPartCode indicating the part of the view to highlight.
- *
- * Result:
- * A result code indicating success or failure.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSetHilite( inView: HIViewRef; inHilitePart: HIViewPartCode ): OSStatus; external name '_HIViewSetHilite';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewIsActive()
- *
- * Summary:
- * Returns whether or not a view is active.
- *
- * Discussion:
- * The view's active state is also affected by the active state of
- * its parents; if any parent view is inactive, this view is
- * considered inactive as well. HIViewIsActive can optionally check
- * to see if a view is latently active, even if its parents are
- * inactive.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view whose active state is to be checked.
- *
- * outIsLatentActive:
- * A pointer to a Boolean to be filled in with the latent active
- * state of the view. The Boolean is set to true if the view is
- * latently active, otherwise false. Can be NULL.
- *
- * Result:
- * True if the view is active, otherwise false.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewIsActive( inView: HIViewRef; outIsLatentActive: BooleanPtr { can be NULL } ): Boolean; external name '_HIViewIsActive';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewSetActivated()
- *
- * Summary:
- * Sets whether or not a view is active or inactive. If any children
- * of the view have a latent active state, they will be adjusted
- * accordingly.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to activate or deactivate.
- *
- * inSetActivated:
- * True if setting the view to active, false if setting the view
- * to inactive.
- *
- * Result:
- * A result code indicating success or failure.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSetActivated( inView: HIViewRef; inSetActivated: Boolean ): OSStatus; external name '_HIViewSetActivated';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewIsEnabled()
- *
- * Summary:
- * Tests whether or not a view is enabled.
- *
- * Discussion:
- * The view's enabled state is also affected by the enabled state of
- * its parents; if any parent view is disabled, this view is
- * considered disabled as well. HIViewIsEnabled can optionally check
- * to see if a view is latently enabled, even if its parents are
- * disabled.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to test.
- *
- * outIsLatentEnabled:
- * A pointer to a Boolean to be filled in with the latent enabled
- * state of the view. The Boolean is set to true if the view is
- * latently enabled, otherwise false. Can be NULL.
- *
- * Result:
- * True if the view is enabled, otherwise false.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewIsEnabled( inView: HIViewRef; outIsLatentEnabled: BooleanPtr { can be NULL } ): Boolean; external name '_HIViewIsEnabled';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewSetEnabled()
- *
- * Summary:
- * Sets whether or not a view (and any subviews) are enabled or
- * disabled.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to enable or disable.
- *
- * inSetEnabled:
- * True if setting the view to enabled, false if setting the view
- * to disabled.
- *
- * Result:
- * A result code indicating success or failure.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSetEnabled( inView: HIViewRef; inSetEnabled: Boolean ): OSStatus; external name '_HIViewSetEnabled';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewIsCompositingEnabled()
- *
- * Summary:
- * Returns whether a view is being used in a compositing hierarchy.
- *
- * Discussion:
- * A view that supports both compositing mode and non-compositing
- * mode can use this routine to determine which mode it is currently
- * running in. Looking for a window's kWindowCompositingAttribute is
- * not sufficient, since some windows with that attribute have some
- * of its views in non-compositing mode and vice-versa.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view whose compositing state you wish to determine.
- *
- * Result:
- * A boolean value indicating whether the view is in compositing
- * mode (true) or non-compositing mode (false).
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewIsCompositingEnabled( inView: HIViewRef ): Boolean; external name '_HIViewIsCompositingEnabled';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewSetText()
- *
- * Summary:
- * Sets the text of a view to the specified string.
- *
- * Discussion:
- * The "text" of the view is the text that will be displayed when
- * drawing the view. This API first attempts to set the view's text
- * (generally successful on views that handle the
- * kControlEditTextCFStringTag SetControlData tag). If the attempt
- * is unsuccessful, the view's title is set instead.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view whose text is being set.
- *
- * inText:
- * The text to set for the view. The string is copied by the view,
- * and may be released by the caller afterwards.
- *
- * Result:
- * A result code indicating success or failure.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSetText( inView: HIViewRef; inText: CFStringRef ): OSStatus; external name '_HIViewSetText';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewCopyText()
- *
- * Summary:
- * Makes a copy of the view's text as a CFString.
- *
- * Discussion:
- * The "text" of the view is the text that will be displayed when
- * drawing the view. This API first attempts to get the view's text
- * (generally successful on views that handle the
- * kControlEditTextCFStringTag GetControlData tag). If the attempt
- * is unsuccessful, the view's title is copied instead.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view for which to get the text.
- *
- * Result:
- * A CFStringRef containing a copy of the view's text. The caller of
- * HIViewCopyText is responsible for releasing the returned text.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewCopyText( inView: HIViewRef ): CFStringRef; external name '_HIViewCopyText';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewGetValue()
- *
- * Summary:
- * Gets a view's value.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view for which to get the value.
- *
- * Result:
- * The view's value.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetValue( inView: HIViewRef ): SInt32; external name '_HIViewGetValue';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewSetValue()
- *
- * Summary:
- * Sets a view's value.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view whose value is to be set.
- *
- * inValue:
- * The new value.
- *
- * Result:
- * A result code indicating success or failure.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSetValue( inView: HIViewRef; inValue: SInt32 ): OSStatus; external name '_HIViewSetValue';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewGetMinimum()
- *
- * Summary:
- * Gets a view's minimum value.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view for which to get the minimum value.
- *
- * Result:
- * The view's minimum value.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetMinimum( inView: HIViewRef ): SInt32; external name '_HIViewGetMinimum';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewSetMinimum()
- *
- * Summary:
- * Sets a view's minimum value.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view whose minimum value is to be set.
- *
- * inMinimum:
- * The new minimum value.
- *
- * Result:
- * A result code indicating success or failure.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSetMinimum( inView: HIViewRef; inMinimum: SInt32 ): OSStatus; external name '_HIViewSetMinimum';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewGetMaximum()
- *
- * Summary:
- * Gets a view's maximum value.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view for which to get the maximum value.
- *
- * Result:
- * The view's maximum value.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetMaximum( inView: HIViewRef ): SInt32; external name '_HIViewGetMaximum';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewSetMaximum()
- *
- * Summary:
- * Sets a view's maximum value.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view whose maximum value is to be set.
- *
- * inMaximum:
- * The new maximum value.
- *
- * Result:
- * A result code indicating success or failure.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSetMaximum( inView: HIViewRef; inMaximum: SInt32 ): OSStatus; external name '_HIViewSetMaximum';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewGetViewSize()
- *
- * Summary:
- * Gets a view's view size.
- *
- * Discussion:
- * The view size is the size of the content to which a view's
- * display is proportioned. Most commonly used to set the
- * proportional size of a scroll bar's thumb indicator.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view for which to get the view size.
- *
- * Result:
- * The view size.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetViewSize( inView: HIViewRef ): SInt32; external name '_HIViewGetViewSize';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewSetViewSize()
- *
- * Summary:
- * Sets a view's view size.
- *
- * Discussion:
- * The view size is the size of the content to which a view's
- * display is proportioned. Most commonly used to set the
- * proportional size of a scroll bar's thumb indicator.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view whose view size is to be set.
- *
- * inViewSize:
- * The new view size.
- *
- * Result:
- * A result code indicating success or failure.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSetViewSize( inView: HIViewRef; inViewSize: SInt32 ): OSStatus; external name '_HIViewSetViewSize';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewIsValid()
- *
- * Summary:
- * HIViewIsValid tests to see if the passed in view is a view that
- * HIToolbox knows about. It does not sanity check the data in the
- * view.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to test for validity.
- *
- * Result:
- * True if the view is a valid view, otherwise, false.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewIsValid( inView: HIViewRef ): Boolean; external name '_HIViewIsValid';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewSetID()
- *
- * Summary:
- * Sets the HIViewID of a view.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view for which to set the ID.
- *
- * inID:
- * The ID to set on the view.
- *
- * Result:
- * A result code indicating success or failure.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSetID( inView: HIViewRef; inID: HIViewID ): OSStatus; external name '_HIViewSetID';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewGetID()
- *
- * Summary:
- * Gets the HIViewID of a view.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view for which to get the ID.
- *
- * outID:
- * A pointer to an HIViewID to be filled with the view's ID.
- *
- * Result:
- * A result code indicating success or failure.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetID( inView: HIViewRef; var outID: HIViewID ): OSStatus; external name '_HIViewGetID';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewSetCommandID()
- *
- * Summary:
- * Sets the command ID of a view.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view for which to set the command ID.
- *
- * inCommandID:
- * The command ID to set on the view.
- *
- * Result:
- * A result code indicating success or failure.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSetCommandID( inView: HIViewRef; inCommandID: UInt32 ): OSStatus; external name '_HIViewSetCommandID';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewGetCommandID()
- *
- * Summary:
- * Gets the command ID of a view.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view for which to get the command ID.
- *
- * outCommandID:
- * A pointer to a UInt32 to fill with the view's command id.
- *
- * Result:
- * A result code indicating success or failure.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetCommandID( inView: HIViewRef; var outCommandID: UInt32 ): OSStatus; external name '_HIViewGetCommandID';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewGetKind()
- *
- * Summary:
- * Returns the kind of the given view.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view whose kind to get.
- *
- * outViewKind:
- * On successful exit, this will contain the view signature and
- * kind. See ControlDefinitions.h or HIView.h for the kinds of
- * each system view.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetKind( inView: HIViewRef; var outViewKind: HIViewKind ): OSStatus; external name '_HIViewGetKind';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {==============================================================================}
- { POSITIONING }
- {==============================================================================}
- {
- * HIViewGetBounds()
- *
- * Discussion:
- * Returns the local bounds of a view. The local bounds are the
- * coordinate system that is completely view-relative. A view's top
- * left coordinate starts out at 0, 0. Most operations are done in
- * these local coordinates. Moving a view is done via the frame
- * instead.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view whose bounds you wish to determine.
- *
- * outRect:
- * The local bounds of the view.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetBounds( inView: HIViewRef; var outRect: HIRect ): OSStatus; external name '_HIViewGetBounds';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewGetFrame()
- *
- * Discussion:
- * Returns the frame of a view. The frame is the bounds of a view
- * relative to its parent's local coordinate system.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view whose frame you wish to determine.
- *
- * outRect:
- * The frame of the view.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetFrame( inView: HIViewRef; var outRect: HIRect ): OSStatus; external name '_HIViewGetFrame';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewSetFrame()
- *
- * Discussion:
- * Sets the frame of a view. This effectively moves the view within
- * its parent. It also marks the view (and anything that was exposed
- * behind it) to be redrawn.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view whose frame you wish to change.
- *
- * inRect:
- * The new frame of the view.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSetFrame( inView: HIViewRef; const (*var*) inRect: HIRect ): OSStatus; external name '_HIViewSetFrame';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewMoveBy()
- *
- * Discussion:
- * Moves a view by a certain distance, relative to its current
- * location. This affects a view's frame, but not its bounds.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view you wish to move.
- *
- * inDX:
- * The horizontal distance to move the view. Negative values move
- * the view to the left, positive values to the right.
- *
- * inDY:
- * The vertical distance to move the view. Negative values move
- * the view upward, positive values downward.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewMoveBy( inView: HIViewRef; inDX: Float32; inDY: Float32 ): OSStatus; external name '_HIViewMoveBy';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewPlaceInSuperviewAt()
- *
- * Discussion:
- * Places a view at an absolute location within its parent. This
- * affects the view's frame, but not its bounds.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view you wish to position.
- *
- * inX:
- * The absolute horizontal coordinate at which to position the
- * view.
- *
- * inY:
- * The absolute vertical coordinate at which to position the view.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewPlaceInSuperviewAt( inView: HIViewRef; inX: Float32; inY: Float32 ): OSStatus; external name '_HIViewPlaceInSuperviewAt';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewReshapeStructure()
- *
- * Discussion:
- * This is for use by custom views. If a view decides that its
- * structure will change shape, it should call this. This tells the
- * Toolbox to recalc things and invalidate as appropriate. You might
- * use this when gaining/losing a focus ring, for example.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to reshape and invalidate.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewReshapeStructure( inView: HIViewRef ): OSStatus; external name '_HIViewReshapeStructure';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewRegionChanged()
- *
- * Discussion:
- * Allows a view to tell the view system that a region of itself has
- * changed. The view system might choose to react in some way. For
- * example, if a view's clickable region has changed, this can be
- * called to tell the Toolbox to resync the region it uses for async
- * window dragging, if enabled. Likewise, if a view's opaque region
- * changes, we can adjust the window's opaque shape as well. When
- * views are moved, resizes, this stuff is taken care of for you. So
- * this only need be called when there's a change in your view that
- * occurs outside of those times.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to deal with.
- *
- * inRegionCode:
- * The region that was changed. This can only be the structure
- * opaque, and clickable regions at present.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HIViewRegionChanged( inView: HIViewRef; inRegionCode: HIViewPartCode ): OSStatus; external name '_HIViewRegionChanged';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HIViewCopyShape()
- *
- * Summary:
- * Copies the shape of a part of a view. See the discussion on
- * meta-parts in this header for more information
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view for which to copy the shape.
- *
- * inPart:
- * The part of the view whose shape is to be copied.
- *
- * outShape:
- * On exit, contains a newly created shape. The caller of
- * HIViewCopyShape is responsible for releasing the copied shape.
- *
- * Result:
- * A result code indicating success or failure.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewCopyShape( inView: HIViewRef; inPart: HIViewPartCode; var outShape: HIShapeRef ): OSStatus; external name '_HIViewCopyShape';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewGetOptimalBounds()
- *
- * Summary:
- * Obtain a view's optimal size and/or text placement.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to examine.
- *
- * outBounds:
- * A pointer to an HIRect to be filled with the view's optimal
- * bounds. Can be NULL.
- *
- * outBaseLineOffset:
- * A pointer to a float to be filled with the view's optimal text
- * placement. Can be NULL.
- *
- * Result:
- * A result code indicating success or failure.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetOptimalBounds( inView: HIViewRef; outBounds: HIRectPtr { can be NULL }; outBaseLineOffset: Float32Ptr { can be NULL } ): OSStatus; external name '_HIViewGetOptimalBounds';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {==============================================================================}
- { HIT TESTING/EVENT HANDLING }
- {==============================================================================}
- {
- * HIViewGetViewForMouseEvent()
- *
- * Discussion:
- * Returns the appropriate view to handle a mouse event. This is a
- * little higher-level than HIViewGetSubviewHit. This routine will
- * find the deepest view that should handle the mouse event, but
- * along the way, it sends Carbon Events to each view asking it to
- * return the appropriate subview. This allows parent views to catch
- * clicks on their subviews. This is the recommended function to use
- * before processing mouse events. Using one of the more primitive
- * functions may result in an undefined behavior. In general we
- * recommend the use of the Standard Window Handler instead of
- * calling this function yourself.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to start from. You should pass the window's root view.
- *
- * inEvent:
- * The mouse event in question.
- *
- * outView:
- * The view that the mouse event should be sent to.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetViewForMouseEvent( inView: HIViewRef; inEvent: EventRef; var outView: HIViewRef ): OSStatus; external name '_HIViewGetViewForMouseEvent';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewClick()
- *
- * Discussion:
- * After a successful call to HIViewGetViewForMouseEvent for a mouse
- * down event, you should call this function to have the view handle
- * the click. In general we recommend the use of the Standard Window
- * Handler instead of calling this function yourself.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to handle the event.
- *
- * inEvent:
- * The mouse event to handle.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewClick( inView: HIViewRef; inEvent: EventRef ): OSStatus; external name '_HIViewClick';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewSimulateClick()
- *
- * Discussion:
- * This function is used to simulate a mouse click on a given view.
- * It sends a kEventControlSimulateHit event to the specified view,
- * and also sends kEventControlHit and (if the Hit event is not
- * handled) kEventCommandProcess events.
- *
- * Note that not all windows will respond to the events that are
- * sent by this API. A fully Carbon-event-based window most likely
- * will respond exactly as if the user had really clicked in the
- * view. A window that is handled using classic EventRecord-based
- * APIs (WaitNextEvent or ModalDialog) will typically not respond at
- * all; to simulate a click in such a window, you may need to post a
- * mouse-down/mouse-up pair, or use a Dialog Manager event filter
- * proc to simulate a hit in a dialog item.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to test the part hit.
- *
- * inPartToClick:
- * The part the view should consider to be clicked.
- *
- * inModifiers:
- * The modifiers the view can consider for its click action.
- *
- * outPartClicked:
- * The part that was hit, can be kControlNoPart if no action
- * occurred. May be NULL if you don't need the part code returned.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSimulateClick( inView: HIViewRef; inPartToClick: HIViewPartCode; inModifiers: UInt32; outPartClicked: HIViewPartCodePtr { can be NULL } ): OSStatus; external name '_HIViewSimulateClick';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewGetPartHit()
- *
- * Discussion:
- * Given a view, and a view-relative point, this function returns
- * the part code hit as determined by the view.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to test the part hit.
- *
- * inPoint:
- * The view-relative point to use.
- *
- * outPart:
- * The part hit by inPoint.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetPartHit( inView: HIViewRef; const (*var*) inPoint: HIPoint; var outPart: HIViewPartCode ): OSStatus; external name '_HIViewGetPartHit';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewGetSubviewHit()
- *
- * Discussion:
- * Returns the child of the given view hit by the point passed in.
- * This is more primitive than using HIViewGetViewForMouseEvent, and
- * should be used only in non-event-handling cases.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view you wish to start from.
- *
- * inPoint:
- * The mouse coordinate to use. This is passed in the local
- * coordinate system of inView.
- *
- * inDeep:
- * Pass true to find the deepest child hit, false to go only one
- * level deep (just check direct children of inView).
- *
- * outView:
- * The view hit by inPoint, or NULL if no subview was hit.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetSubviewHit( inView: HIViewRef; const (*var*) inPoint: HIPoint; inDeep: Boolean; var outView: HIViewRef ): OSStatus; external name '_HIViewGetSubviewHit';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {==============================================================================}
- { HIView-based tracking areas }
- {==============================================================================}
- type
- HIViewTrackingAreaRef = ^SInt32; { an opaque 32-bit type }
- const
- kEventParamHIViewTrackingArea = $63747261 (* 'ctra' *); { typeHIViewTrackingAreaRef}
- typeHIViewTrackingAreaRef = $63747261 (* 'ctra' *);
- {
- * kEventClassControl / kEventControlTrackingAreaEntered
- *
- * Summary:
- * The mouse has entered a tracking area owned by your control.
- *
- * Discussion:
- * If you have installed a mouse tracking area in your view, you
- * will receive this event when the mouse enters that area. The
- * tracking area reference is sent with the event.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * --> kEventParamHIViewTrackingArea (in, typeHIViewTrackingAreaRef)
- * The tracking area that was entered.
- *
- * --> kEventParamKeyModifiers (in, typeUInt32)
- * The keyboard modifiers that were in effect when the mouse
- * entered.
- *
- * --> kEventParamMouseLocation (in, typeHIPoint)
- * The location of the mouse in view coordinates.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available
- }
- const
- kEventControlTrackingAreaEntered = 23;
- {
- * kEventClassControl / kEventControlTrackingAreaExited
- *
- * Summary:
- * The mouse has exited a tracking area owned by your control.
- *
- * Discussion:
- * If you have installed a mouse tracking area in your view, you
- * will receive this event when the mouse leaves that area. The
- * tracking area reference is sent with the event.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * --> kEventParamHIViewTrackingArea (in, typeHIViewTrackingAreaRef)
- * The tracking area that was entered.
- *
- * --> kEventParamKeyModifiers (in, typeUInt32)
- * The keyboard modifiers that were in effect when the mouse
- * left.
- *
- * --> kEventParamMouseLocation (in, typeHIPoint)
- * The location of the mouse in view coordinates. This point
- * may or may not lie on the boundary of the mouse region. It
- * is merely where the mouse was relative to the view when the
- * exit event was generated.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available
- }
- const
- kEventControlTrackingAreaExited = 24;
- type
- HIViewTrackingAreaID = UInt64;
- {
- * HIViewNewTrackingArea()
- *
- * Summary:
- * Creates a new tracking area for a view.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to create a tracking area for.
- *
- * inShape:
- * The shape to use. Pass NULL to indicate the entire structure
- * region of the view is to be used.
- *
- * inID:
- * An identifier for this tracking area. This value is completely
- * up to the view to define. Pass zero if you don't care.
- *
- * outRef:
- * A reference to the newly created tracking area. This references
- * is NOT refcounted.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewNewTrackingArea( inView: HIViewRef; inShape: HIShapeRef { can be NULL }; inID: HIViewTrackingAreaID; var outRef: HIViewTrackingAreaRef ): OSStatus; external name '_HIViewNewTrackingArea';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewChangeTrackingArea()
- *
- * Summary:
- * Alters the shape of an existing tracking area.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inArea:
- * The area to change.
- *
- * inShape:
- * The shape to use. Pass NULL to indicate the entire structure
- * region of the view is to be used.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewChangeTrackingArea( inArea: HIViewTrackingAreaRef; inShape: HIShapeRef ): OSStatus; external name '_HIViewChangeTrackingArea';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewGetTrackingAreaID()
- *
- * Summary:
- * Retrieves the HIViewTrackingAreaID of an existing tracking area.
- * This value was set upon creation of the HIViewTrackingArea.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inArea:
- * The area whose HIViewTrackingAreaID to retrieve.
- *
- * outID:
- * The HIViewTrackingAreaID for this tracking area.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetTrackingAreaID( inArea: HIViewTrackingAreaRef; var outID: HIViewTrackingAreaID ): OSStatus; external name '_HIViewGetTrackingAreaID';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewDisposeTrackingArea()
- *
- * Summary:
- * Disposes an existing tracking area. The reference is considered
- * to be invalid after calling this function.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inArea:
- * The area to dispose.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewDisposeTrackingArea( inArea: HIViewTrackingAreaRef ): OSStatus; external name '_HIViewDisposeTrackingArea';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {==============================================================================}
- { DISPLAY }
- {==============================================================================}
- {
- * HIViewGetNeedsDisplay()
- *
- * Discussion:
- * Returns true if the view passed in or any subview of it requires
- * redrawing (i.e. part of it has been invalidated).
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to inspect.
- *
- * Result:
- * A boolean result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetNeedsDisplay( inView: HIViewRef ): Boolean; external name '_HIViewGetNeedsDisplay';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewSetNeedsDisplay()
- *
- * Discussion:
- * Marks a view as needing to be completely redrawn, or completely
- * valid. If the view is not visible, or is obscured completely by
- * other views, no action is taken.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to mark dirty.
- *
- * inNeedsDisplay:
- * A boolean which indicates whether inView needs to be redrawn or
- * not.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSetNeedsDisplay( inView: HIViewRef; inNeedsDisplay: Boolean ): OSStatus; external name '_HIViewSetNeedsDisplay';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewSetNeedsDisplayInRect()
- *
- * Discussion:
- * Marks a portion of a view as needing to be redrawn, or valid. If
- * the view is not visible, or is obscured completely by other
- * views, no action is taken. The rectangle passed is effectively
- * intersected with the view's visible region. It should be in
- * view-relative coordinates.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to mark dirty.
- *
- * inRect:
- * The rectangle encompassing the area to mark dirty or clean.
- *
- * inNeedsDisplay:
- * A boolean which indicates whether or not inRect should be added
- * to the invalid region or removed from it.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSetNeedsDisplayInRect( inView: HIViewRef; const (*var*) inRect: HIRect; inNeedsDisplay: Boolean ): OSStatus; external name '_HIViewSetNeedsDisplayInRect';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewSetNeedsDisplayInShape()
- *
- * Discussion:
- * Marks a portion of a view as needing to be redrawn, or valid. If
- * the view is not visible, or is obscured completely by other
- * views, no action is taken. The shape passed is effectively
- * intersected with the view's visible region. It should be in
- * view-relative coordinates.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to mark dirty.
- *
- * inArea:
- * The area to mark dirty or clean.
- *
- * inNeedsDisplay:
- * A boolean which indicates whether or not inArea should be added
- * to the invalid region or removed from it.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSetNeedsDisplayInShape( inView: HIViewRef; inArea: HIShapeRef; inNeedsDisplay: Boolean ): OSStatus; external name '_HIViewSetNeedsDisplayInShape';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewSetNeedsDisplayInRegion()
- *
- * Discussion:
- * Marks a portion of a view as needing to be redrawn, or valid. If
- * the view is not visible, or is obscured completely by other
- * views, no action is taken. The region passed is effectively
- * intersected with the view's visible region. It should be in
- * view-relative coordinates.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to mark dirty.
- *
- * inRgn:
- * The region to mark dirty or clean.
- *
- * inNeedsDisplay:
- * A boolean which indicates whether or not inRgn should be added
- * to the invalid region or removed from it.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSetNeedsDisplayInRegion( inView: HIViewRef; inRgn: RgnHandle; inNeedsDisplay: Boolean ): OSStatus; external name '_HIViewSetNeedsDisplayInRegion';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewRender()
- *
- * Discussion:
- * Renders the invalid portions of a view (as marked with
- * HIViewSetNeedsDisplay[InRegion]) immediately. Normally, these
- * areas are redrawn at event loop time, but there might be
- * situations where you need an immediate draw. Use this sparingly,
- * as it does cause a fully composited draw for the area of the
- * view; that is, all other views that intersect the area of the
- * specified view will also be drawn. Calling this for several views
- * at a particular level of a hierarchy can be costly. We highly
- * recommend that you only pass the root view of a window to this
- * API. The behavior of this API when passed a non-root view was
- * poorly defined in Mac OS X 10.3 and has changed in Mac OS X 10.4.
- * In 10.3, calling this API on a non-root view would entirely
- * validate all of the views in the window that intersect the
- * specified view, including portions that did not intersect the
- * specified view and so were not actually drawn. In 10.4, calling
- * this API on a non-root view will only validate those portions of
- * each view that intersect the specified view.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to draw.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HIViewRender( inView: HIViewRef ): OSStatus; external name '_HIViewRender';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HIViewFlashDirtyArea()
- *
- * Discussion:
- * Debugging aid. Flashes the region which would be redrawn at the
- * next draw time for an entire window.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inWindow:
- * The window to flash the dirty region for.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewFlashDirtyArea( inWindow: WindowRef ): OSStatus; external name '_HIViewFlashDirtyArea';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewGetSizeConstraints()
- *
- * Discussion:
- * Return the minimum and maximum size for a control. A control must
- * respond to this protocol to get meaningful results. These sizes
- * can be used to help autoposition subviews, for example.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to inspect.
- *
- * outMinSize:
- * The minimum size the view can be. May be NULL if you don't need
- * this information.
- *
- * outMaxSize:
- * The maximum size the view can be. May be NULL if you don't need
- * this information.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetSizeConstraints( inView: HIViewRef; outMinSize: HISizePtr { can be NULL }; outMaxSize: HISizePtr { can be NULL } ): OSStatus; external name '_HIViewGetSizeConstraints';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {==============================================================================}
- { COORDINATE SYSTEM CONVERSION }
- {==============================================================================}
- {
- * HIViewConvertPoint()
- *
- * Discussion:
- * Converts a point from one view to another. Both views must have a
- * common ancestor, i.e. they must both be in the same window.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * ioPoint:
- * The point to convert.
- *
- * inSourceView:
- * The view whose coordinate system ioPoint is starting out in.
- * You can pass NULL to indicate that ioPoint is a window-relative
- * point.
- *
- * inDestView:
- * The view whose coordinate system ioPoint should end up in. You
- * can pass NULL to indicate that ioPoint is a window-relative
- * point.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewConvertPoint( var ioPoint: HIPoint; inSourceView: HIViewRef; inDestView: HIViewRef ): OSStatus; external name '_HIViewConvertPoint';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewConvertRect()
- *
- * Discussion:
- * Converts a rectangle from one view to another. Both views must
- * have a common ancestor, i.e. they must both be in the same window.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * ioRect:
- * The rectangle to convert.
- *
- * inSourceView:
- * The view whose coordinate system ioRect is starting out in. You
- * can pass NULL to indicate that ioRect is a window-relative
- * rectangle.
- *
- * inDestView:
- * The view whose coordinate system ioRect should end up in. You
- * can pass NULL to indicate that ioRect is a window-relative
- * rectangle.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewConvertRect( var ioRect: HIRect; inSourceView: HIViewRef; inDestView: HIViewRef ): OSStatus; external name '_HIViewConvertRect';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewConvertRegion()
- *
- * Discussion:
- * Converts a region from one view to another. Both views must have
- * a common ancestor, i.e. they must both be in the same window.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * ioRgn:
- * The region to convert.
- *
- * inSourceView:
- * The view whose coordinate system ioRgn is starting out in. You
- * can pass NULL to indicate that ioRgn is a window-relative
- * region.
- *
- * inDestView:
- * The view whose coordinate system ioRgn should end up in. You
- * can pass NULL to indicate that ioRgn is a window-relative
- * region.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewConvertRegion( ioRgn: RgnHandle; inSourceView: HIViewRef; inDestView: HIViewRef ): OSStatus; external name '_HIViewConvertRegion';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewSetDrawingEnabled()
- *
- * Discussion:
- * Turns control drawing on or off. You can use this to ensure that
- * no drawing events are sent to the control. Even Draw1Control will
- * not draw! HIViewSetNeedsDisplay is also rendered useless when
- * drawing is off.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to enable or disable drawing for.
- *
- * inEnabled:
- * A boolean value indicating whether drawing should be on (true)
- * or off (false).
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSetDrawingEnabled( inView: HIViewRef; inEnabled: Boolean ): OSStatus; external name '_HIViewSetDrawingEnabled';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewIsDrawingEnabled()
- *
- * Discussion:
- * Determines if drawing is currently enabled for a control.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to get the drawing state for.
- *
- * Result:
- * A boolean value indicating whether drawing is on (true) or off
- * (false).
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewIsDrawingEnabled( inView: HIViewRef ): Boolean; external name '_HIViewIsDrawingEnabled';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewScrollRect()
- *
- * Discussion:
- * Scrolls a view's contents, or a portion thereof. A view's
- * contents are the pixels that it or any of its descendent views
- * has drawn into. This will actually blit the contents of the view
- * as appropriate to scroll, and then invalidate those portions
- * which need to be redrawn. Be warned that this is a raw bit
- * scroll. Anything that might overlap the target view will get
- * thrashed as well.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to scroll. The bits drawn by the view's descendent
- * views will also be scrolled.
- *
- * inRect:
- * The rect to scroll. Pass NULL to mean the entire view. The rect
- * passed cannot be bigger than the view's bounds. It must be in
- * the local coordinate system of the view.
- *
- * inDX:
- * The horizontal distance to scroll. Positive values shift to the
- * right, negative values shift to the left.
- *
- * inDY:
- * The vertical distance to scroll. Positive values shift
- * downward, negative values shift upward.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewScrollRect( inView: HIViewRef; {const} inRect: HIRectPtr { can be NULL }; inDX: Float32; inDY: Float32 ): OSStatus; external name '_HIViewScrollRect';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewSetBoundsOrigin()
- *
- * Discussion:
- * This API sets the origin of the view. This effectively also moves
- * all subcontrols of a view as well. This call will NOT invalidate
- * the view. This is because you might want to move the contents
- * with HIViewScrollRect instead of redrawing the complete content.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view whose origin you wish to adjust.
- *
- * inX:
- * The X coordinate.
- *
- * inY:
- * The Y coordinate.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSetBoundsOrigin( inView: HIViewRef; inX: Float32; inY: Float32 ): OSStatus; external name '_HIViewSetBoundsOrigin';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {==============================================================================}
- { KEYBOARD FOCUS }
- {==============================================================================}
- {
- * HIViewAdvanceFocus()
- *
- * Discussion:
- * Advances the focus to the next most appropriate view. Unless
- * overriden in some fashion (either by overriding certain carbon
- * events or using the HIViewSetNextFocus API), the Toolbox will use
- * a spacially determinant method of focusing, attempting to focus
- * left to right, top to bottom in a window, taking groups of
- * controls into account.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inRootForFocus:
- * The subtree to manipulate. The focus will never leave
- * inRootToFocus. Typically you would pass the content of the
- * window, or the root. If focused on the toolbar, for example,
- * the focus is limited to the toolbar only. In this case, the
- * Toolbox passes the toolbar view in as the focus root for
- * example.
- *
- * inModifiers:
- * The EventModifiers of the keyboard event that ultimately caused
- * the call to HIViewAdvanceFocus. These modifiers are used to
- * determine the focus direction as well as other alternate
- * focusing behaviors.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewAdvanceFocus( inRootForFocus: HIViewRef; inModifiers: EventModifiers ): OSStatus; external name '_HIViewAdvanceFocus';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewGetFocusPart()
- *
- * Discussion:
- * Returns the currently focused part of the given view.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to inquire about.
- *
- * outFocusPart:
- * The part currently focused.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetFocusPart( inView: HIViewRef; var outFocusPart: HIViewPartCode ): OSStatus; external name '_HIViewGetFocusPart';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewSubtreeContainsFocus()
- *
- * Discussion:
- * Given a view, this function checks to see if it or any of its
- * children currently are the keyboard focus. If so, true is
- * returned as the function result.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSubtreeStart:
- * The view to start searching at.
- *
- * Result:
- * A boolean result.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSubtreeContainsFocus( inSubtreeStart: HIViewRef ): Boolean; external name '_HIViewSubtreeContainsFocus';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewSetNextFocus()
- *
- * Discussion:
- * This function hard-wires the next sibling view to shift focus to
- * whenever the keyboard focus is advanced.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to set the next focus view for. This parameter and the
- * inNextFocus parameter must both have the same parent view.
- *
- * inNextFocus:
- * The view to set focus to next. This parameter and the inView
- * parameter must both have the same parent view. Pass NULL to
- * tell the view system to use the default rules.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSetNextFocus( inView: HIViewRef; inNextFocus: HIViewRef { can be NULL } ): OSStatus; external name '_HIViewSetNextFocus';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewSetFirstSubViewFocus()
- *
- * Discussion:
- * This function hard-wires the first subview to shift focus to
- * whenever the keyboard focus is advanced and the container view is
- * entered.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inParent:
- * The parent view.
- *
- * inSubView:
- * The first child which should receive focus. Pass NULL to tell
- * the view system to use the default rules.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSetFirstSubViewFocus( inParent: HIViewRef; inSubView: HIViewRef { can be NULL } ): OSStatus; external name '_HIViewSetFirstSubViewFocus';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {==============================================================================}
- { LAYOUT }
- { Mac OS X 10.3 provides a layout engine for HIViews that allows applications }
- { to specify the layout relationships between multiple views. The layout }
- { engine will automatically reposition and resize views that have layout }
- { information when necessary. }
- {==============================================================================}
- {
- * Summary:
- * Since horizontal and vertical bindings are very similar in
- * application, except along different axes, the binding kinds have
- * been abstracted to minimum and maximum. Synonyms have been
- * provided for convenience. You are encouraged to use them.
- *
- * Discussion:
- * HIBindingKind constants.
- }
- const
- {
- * No binding is to occur.
- }
- kHILayoutBindNone = 0;
- {
- * Bind to the minimum of the axis.
- }
- kHILayoutBindMin = 1;
- {
- * Bind to the maximum of the axis.
- }
- kHILayoutBindMax = 2;
- kHILayoutBindLeft = kHILayoutBindMin;
- kHILayoutBindRight = kHILayoutBindMax;
- {
- * Synonyms for convenience and clarity.
- }
- kHILayoutBindTop = kHILayoutBindMin;
- kHILayoutBindBottom = kHILayoutBindMax;
- type
- HIBindingKind = UInt16;
- {
- * HISideBinding
- *
- * Summary:
- * A binding for a side of an HIView.
- *
- * Discussion:
- * A side binding is entirely related to the change of the parent's
- * position or size (but only as the size affects the maximum edge
- * position). A side binding doesn't mean "move to where my
- * relative's side is" but rather "move as my relative's side has
- * moved".
- }
- type
- HISideBinding = record
- {
- * An HIViewRef to the view to which this side is bound. Can be NULL,
- * indicating that the the side is bound to its parent view.
- }
- toView: HIViewRef; { NULL means parent}
- {
- * An HIBindingKind indicating the bind kind.
- }
- kind: HIBindingKind;
- {
- * Not currently used. Must be set to 0.
- }
- offset: Float32;
- end;
- {
- const HISideBinding kHISideNoBinding = ( NULL, kHILayoutBindNone );
- }
- {
- * HIBinding
- *
- * Summary:
- * A set of Top, Left, Bottom, and Right bindings for an HIView.
- }
- type
- HIBinding = record
- {
- * The top side bindings.
- }
- top: HISideBinding;
- {
- * The left side bindings.
- }
- left: HISideBinding;
- {
- * The bottom side bindings.
- }
- bottom: HISideBinding;
- {
- * The right side bindings.
- }
- right: HISideBinding;
- end;
- {
- const HIBinding kHINoBinding = ( kHISideNoBinding, kHISideNoBinding, kHISideNoBinding, kHISideNoBinding );
- }
- {
- * Discussion:
- * HIScaleKind constants.
- }
- const
- {
- * The scale is determined from the axis size.
- }
- kHILayoutScaleAbsolute = 0;
- type
- HIScaleKind = UInt16;
- {
- * HIAxisScale
- *
- * Summary:
- * A scale description for an axis of an HIView.
- }
- type
- HIAxisScale = record
- {
- * An HIViewRef to the view to which this axis is scaled. Can be
- * NULL, indicating that the the axis is scaled relative to its
- * parent view.
- }
- toView: HIViewRef; { NULL means parent}
- {
- * An HIScaleKind describing the type of scaling to be applied.
- * Currently, this field can't be anything other than
- * kScalingAbsolute.
- }
- kind: HIScaleKind;
- {
- * A float indicating how much to scale the HIView. 0 indicates no
- * scaling. A value of 1 indicates that the view is to always have
- * the same axial size.
- }
- ratio: Float32;
- end;
- {
- * HIScaling
- *
- * Summary:
- * A set of scaling descriptions for the axes of an HIView.
- }
- type
- HIScaling = record
- {
- * An HIAxisScale describing the horizontal scaling for an HIView.
- }
- x: HIAxisScale;
- y: HIAxisScale;
- end;
- {
- * Summary:
- * Since horizontal and vertical positions are very similar in
- * application, except along different axes, the position kinds have
- * been abstracted to minimum and maximum. Synonyms have been
- * provided for convenience. You are encouraged to use them.
- *
- * Discussion:
- * HIPositionKind constants.
- }
- const
- {
- * No positioning is to occur.
- }
- kHILayoutPositionNone = 0;
- {
- * Centered positioning will occur. The view will be centered
- * relative to the specified view.
- }
- kHILayoutPositionCenter = 1;
- {
- * Minimum positioning will occur. The view will be left or top
- * aligned relative to the specified view.
- }
- kHILayoutPositionMin = 2;
- {
- * Maximum positioning will occur. The view will be right or bottom
- * aligned relative to the specified view.
- }
- kHILayoutPositionMax = 3;
- {
- * Synonyms for convenience and clarity.
- }
- kHILayoutPositionLeft = kHILayoutPositionMin;
- kHILayoutPositionRight = kHILayoutPositionMax;
- kHILayoutPositionTop = kHILayoutPositionMin;
- kHILayoutPositionBottom = kHILayoutPositionMax;
- type
- HIPositionKind = UInt16;
- {
- * HIAxisPosition
- *
- * Summary:
- * An axial position description for an HIView.
- }
- type
- HIAxisPosition = record
- {
- * An HIViewRef to the view relative to which a view will be
- * positioned. Can be NULL, indicating that the the view is
- * positioned relative to its parent view.
- }
- toView: HIViewRef; { NULL means parent}
- {
- * An HIPositionKind indicating the kind of positioning to apply.
- }
- kind: HIPositionKind;
- {
- * After the position kind has been applied, the origin component
- * that corresponds to the positioning axis is offet by this value.
- * (ex: Left aligned + 10 ).
- }
- offset: Float32;
- end;
- {
- * HIPositioning
- *
- * Summary:
- * A positioning description for an HIView.
- }
- type
- HIPositioning = record
- {
- * An HIAxisPosition describing the horizontal positioning for an
- * HIView.
- }
- x: HIAxisPosition;
- y: HIAxisPosition;
- end;
- {
- * HILayoutInfo
- *
- * Summary:
- * A layout description for an HIView.
- *
- * Discussion:
- * The different layout transformations are applied sequentially to
- * the HIView. First, the bindings are applied. Note that the
- * bindings are applied recursively to a container's HIViews. This
- * requires care on your part, especially when applying
- * inter-relational bindings. Then the scaling (which could
- * potentially override some of the previously applied bindings).
- * Then the positioning (which could potentially override some of
- * the previously applied bindings).
- }
- type
- HILayoutInfo = record
- {
- * The version of the structure. The current version is
- * kHILayoutInfoVersionZero.
- }
- version: UInt32;
- {
- * An HIBinding structure describing the kinds of bindings to apply
- * to the sides of an HIView.
- }
- binding: HIBinding;
- {
- * An HIScaling structure describing the axial scaling to apply to an
- * HIView.
- }
- scale: HIScaling;
- {
- * An HIPositioning structure positioning to apply to an HIView.
- }
- position: HIPositioning;
- end;
- const
- kHILayoutInfoVersionZero = 0;
- {
- const HILayoutInfo kHILayoutInfoNone = (
- kHILayoutInfoVersionZero,
- kHINoBinding,
- ( ( NULL, 0.0 ), ( NULL, 0.0 ) ),
- ( ( NULL, kHILayoutPositionNone ), ( NULL, kHILayoutPositionNone ) ) );
- }
- {
- * HIViewGetLayoutInfo()
- *
- * Summary:
- * Get the layout info of an HIView.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The HIView whose layout info is to be retreived.
- *
- * outLayoutInfo:
- * A pointer to an HILayoutInfo record into which to copy the
- * layout info of the HIView. The version field of this record
- * must be valid or the call will fail.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetLayoutInfo( inView: HIViewRef; var outLayoutInfo: HILayoutInfo ): OSStatus; external name '_HIViewGetLayoutInfo';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HIViewSetLayoutInfo()
- *
- * Summary:
- * Set the layout info of an HIView.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The HIView whose layout info is to be retreived.
- *
- * inLayoutInfo:
- * A pointer to an HILayoutInfo record from which to copy the
- * layout info for the HIView.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSetLayoutInfo( inView: HIViewRef; const (*var*) inLayoutInfo: HILayoutInfo ): OSStatus; external name '_HIViewSetLayoutInfo';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HIViewSuspendLayout()
- *
- * Summary:
- * Suspends all layout handling for this layout and its children.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The HIView whose layout handling is to be suspended.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HIViewSuspendLayout( inView: HIViewRef ): OSStatus; external name '_HIViewSuspendLayout';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HIViewResumeLayout()
- *
- * Summary:
- * Resumes all layout handling for this layout and its children.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The HIView whose layout handling is to be resumed.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HIViewResumeLayout( inView: HIViewRef ): OSStatus; external name '_HIViewResumeLayout';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HIViewIsLayoutActive()
- *
- * Summary:
- * Tests the view to determine if layout is active or suspended.
- * Note that this test does not determine whether or not the view
- * has a valid layout, only whether or not the layout engine is
- * active for the view.
- *
- * Discussion:
- * The view's layout active state is also affected by the layout
- * active state of its parents; if any parent view has inactive
- * layout, this view is considered to have inactive layout as well.
- * See HIViewIsLayoutLatentlyActive if latent layout active state is
- * required.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The HIView whose layout handling is to be tested.
- *
- * Result:
- * True if the view would respond to any linked relative's changes,
- * otherwise false.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HIViewIsLayoutActive( inView: HIViewRef ): Boolean; external name '_HIViewIsLayoutActive';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HIViewIsLayoutLatentlyActive()
- *
- * Summary:
- * The view's layout active state is also affected by the layout
- * active state of its parents; if any parent view has inactive
- * layout, this view is considered to have inactive layout as well.
- * HIViewIsLayoutLatentlyActive returns whether a view's layout is
- * latently active, even if one of its parent's layouts is not.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The HIView whose latent layout handling is to be tested.
- *
- * Result:
- * True if the view would latently respond to any linked relative's
- * changes, otherwise false.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewIsLayoutLatentlyActive( inView: HIViewRef ): Boolean; external name '_HIViewIsLayoutLatentlyActive';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewApplyLayout()
- *
- * Summary:
- * Applies the current layout into to the specified view. Side
- * bindings have no effect, but positioning and scaling will occur,
- * in that order.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The HIView whose layout info is to be applied.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HIViewApplyLayout( inView: HIViewRef ): OSStatus; external name '_HIViewApplyLayout';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {==============================================================================}
- { MISCELLANEOUS }
- {==============================================================================}
- {
- * HIViewGetWindow()
- *
- * Discussion:
- * Returns a reference to the window a given view is bound to. If
- * the view reference passed is invalid, or the view is not embedded
- * into any window, NULL is returned.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to query.
- *
- * Result:
- * A window reference.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetWindow( inView: HIViewRef ): WindowRef; external name '_HIViewGetWindow';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HIViewFindByID()
- *
- * Discussion:
- * Allows you to find a particular view by its ID. Currently, this
- * call uses the ControlID type as its IDs.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inStartView:
- * The view to start searching at.
- *
- * inID:
- * The ID of the view you are looking for.
- *
- * outControl:
- * Receives the control if found.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewFindByID( inStartView: HIViewRef; inID: HIViewID; var outControl: HIViewRef ): OSStatus; external name '_HIViewFindByID';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewGetAttributes()
- *
- * Discussion:
- * Allows you to get the attributes of a view.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to inspect.
- *
- * outAttrs:
- * The attributes of the view.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetAttributes( inView: HIViewRef; var outAttrs: OptionBits ): OSStatus; external name '_HIViewGetAttributes';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewChangeAttributes()
- *
- * Discussion:
- * Allows you to change the attributes of a view. You can
- * simultaneously set and clear attributes.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to muck with.
- *
- * inAttrsToSet:
- * The attributes you wish to set.
- *
- * inAttrsToClear:
- * The attributes you wish to clear.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewChangeAttributes( inView: HIViewRef; inAttrsToSet: OptionBits; inAttrsToClear: OptionBits ): OSStatus; external name '_HIViewChangeAttributes';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewCreateOffscreenImage()
- *
- * Discussion:
- * Creates an CGImageRef for the view passed in. The view and any
- * children it has are rendered in the resultant image.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view you wish to create an image of.
- *
- * inOptions:
- * Options. Currently you must pass 0.
- *
- * outFrame:
- * The frame of the view within the resultant image. It is in the
- * coordinate system of the image, where 0,0 is the top left
- * corner of the image. This is so you can know exactly where the
- * control lives in the image when the control draws outside its
- * bounds for things such as shadows.
- *
- * outImage:
- * The image of the view, including anything that would be drawn
- * outside the view's frame.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewCreateOffscreenImage( inView: HIViewRef; inOptions: OptionBits; outFrame: HIRectPtr { can be NULL }; var outImage: CGImageRef ): OSStatus; external name '_HIViewCreateOffscreenImage';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewDrawCGImage()
- *
- * Discussion:
- * Draws an image in the right direction for an HIView. This is
- * functionally the same as CGContextDrawImage, but it flips the
- * context appropriately so that the image is drawn correctly.
- * Because HIViews have their origin at the top, left, you are
- * really drawing upside-down, so if you were to use the CG image
- * drawing, you'd see what I mean! This call attempts to insulate
- * you from that fact.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inContext:
- * The context to draw in.
- *
- * inBounds:
- * The bounds to draw the image into.
- *
- * inImage:
- * The image to draw.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIViewDrawCGImage( inContext: CGContextRef; const (*var*) inBounds: HIRect; inImage: CGImageRef ): OSStatus; external name '_HIViewDrawCGImage';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIViewGetFeatures()
- *
- * Discussion:
- * Returns the features for the current view. This only returns
- * feature bits for the HIView space. Older Control Manager features
- * such as kControlSupportsDataAccess are not returned.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to query
- *
- * outFeatures:
- * On output, the features for the view.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetFeatures( inView: HIViewRef; var outFeatures: HIViewFeatures ): OSStatus; external name '_HIViewGetFeatures';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HIViewChangeFeatures()
- *
- * Discussion:
- * Allows you to change a view's features on the fly. Typically,
- * this is up to the view itself to control. For example, it might
- * decide that under some situations it is opaque and other others
- * it is transparent. In general entities outside of the view itself
- * should not call this function. The only exception might be UI
- * building tools, where it would want to make sure a view always
- * responds to clicks, for example, so it could override mouse
- * tracking to drag items around.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to change
- *
- * inFeaturesToSet:
- * The features to enable
- *
- * inFeaturesToClear:
- * The features to disable
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HIViewChangeFeatures( inView: HIViewRef; inFeaturesToSet: HIViewFeatures; inFeaturesToClear: HIViewFeatures ): OSStatus; external name '_HIViewChangeFeatures';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * Summary:
- * Constants for use with the HICreateTransformedCGImage API.
- }
- const
- {
- * No visual transform should be applied.
- }
- kHITransformNone = $00;
- {
- * The image should be transformed to use a disabled appearance. This
- * transform should not be combined with any other transform.
- }
- kHITransformDisabled = $01;
- {
- * The image should be transformed to use a selected appearance. This
- * transform should not be combined with any other transform.
- }
- kHITransformSelected = $4000;
- {
- * HICreateTransformedCGImage()
- *
- * Summary:
- * Creates a new CGImage with a standard selected or disabled
- * appearance.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inImage:
- * The original image.
- *
- * inTransform:
- * The transform to apply to the image.
- *
- * outImage:
- * The new image. This image should be released by the caller.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HICreateTransformedCGImage( inImage: CGImageRef; inTransform: OptionBits; var outImage: CGImageRef ): OSStatus; external name '_HICreateTransformedCGImage';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIViewGetEventTarget()
- *
- * Discussion:
- * Returns the EventTargetRef for the specified view. Once you
- * obtain this reference, you can send events to the target and
- * install event handler on it.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to return the target for.
- *
- * Result:
- * An EventTargetRef.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIViewGetEventTarget( inView: HIViewRef ): EventTargetRef; external name '_HIViewGetEventTarget';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {==============================================================================}
- { HIGrowBoxView }
- { The grow box view is a new view starting in Mac OS 10.2. It can be used in }
- { both the new compositing mode, as well as the traditional control manager }
- { mode. Like all new HIFoo views, this view is created invisibly. You must }
- { show the view after creation if you want to, like, see it and stuff. }
- {==============================================================================}
- { The HIObject class ID for the HIGrowBoxView class. }
- {$ifc USE_CFSTR_CONSTANT_MACROS}
- {$definec kHIGrowBoxViewClassID CFSTRP('com.apple.higrowboxview')}
- {$endc}
- { Control Kind}
- const
- kControlKindHIGrowBoxView = $67726F77 (* 'grow' *);
- { Currently there is no direct creation API for the grow box, so you must use }
- { HIObjectCreate if you wish to create one directly. Normally, a window will }
- { create one for you, so you should generally never need to do this. }
- {
- * HIGrowBoxViewSetTransparent()
- *
- * Discussion:
- * Sets a grow box view as transparent, meaning it will draw the
- * grow box lines over any content below it. When not transparent,
- * it's an opaque white square with the grow lines.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inGrowBoxView:
- * The grow box view reference.
- *
- * inTransparent:
- * Pass true to make the grow view use its transparent look, false
- * to give it the opaque look.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIGrowBoxViewSetTransparent( inGrowBoxView: HIViewRef; inTransparent: Boolean ): OSStatus; external name '_HIGrowBoxViewSetTransparent';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIGrowBoxViewIsTransparent()
- *
- * Discussion:
- * Returns true if a grow box view is set to be transparent.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inGrowBoxView:
- * The grow box view reference.
- *
- * Result:
- * A boolean result.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIGrowBoxViewIsTransparent( inGrowBoxView: HIViewRef ): Boolean; external name '_HIGrowBoxViewIsTransparent';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {==============================================================================}
- { HIScrollView }
- { The scroll view is a new view starting in Mac OS 10.2. It can be used in }
- { the new compositing mode ONLY due to the nature of how it works. Like all }
- { new HIFoo views, this view is created invisibly. You must show the view }
- { after creation if you want to, like, see it and stuff. }
- { The HIScrollView will set the frame of the contained view when its bounds }
- { change, so it is not necessary to set up the layout of the embedded view. }
- { Using an HIScrollView requires a few steps: }
- { 1. Install your scrollable content view into the HIScrollView instance using }
- { HIViewAddSubview. }
- { 2. If the scrollable content view doesn't already handle the }
- { kEventScrollableGetInfo and kEventScrollableScrollTo events, you must }
- { install handlers on your scrollable content view and handle those events }
- { manually. More details on those events can be found below. }
- { 3. If the scrollable content view doesn't already send out the }
- { kEventScrollableInfoChanged event to its parent view, you must send this }
- { event to the HIScrollView instance whenever your scrollable content }
- { view's size or origin changes. More details on this even can be found }
- { below. }
- {==============================================================================}
- { The HIObject class ID for the HIScrollView class. }
- {$ifc USE_CFSTR_CONSTANT_MACROS}
- {$definec kHIScrollViewClassID CFSTRP('com.apple.HIScrollView')}
- {$endc}
- { Control Kind}
- const
- kControlKindHIScrollView = $7363726C (* 'scrl' *);
- {
- kEventClassScrollable quick reference:
-
- kEventScrollableGetInfo = 1,
- kEventScrollableInfoChanged = 2,
- %% kEventScrollableEmbedded = 3,
- %% kEventScrollableRemoved = 4,
- kEventScrollableScrollTo = 10
- }
- const
- kEventClassScrollable = $7363726C (* 'scrl' *);
- const
- kEventParamImageSize = $696D737A (* 'imsz' *); { typeHISize}
- kEventParamViewSize = $7677737A (* 'vwsz' *); { typeHISize}
- kEventParamLineSize = $6C6E737A (* 'lnsz' *); { typeHISize}
- kEventParamOrigin = $6F72676E (* 'orgn' *); { typeHIPoint}
- {
- * kEventClassScrollable / kEventScrollableGetInfo
- *
- * Summary:
- * Requests information from an HIScrollViewÕs scrollable view about
- * its size and origin.
- *
- * Discussion:
- * This event is sent by an HIScrollView to its scrollable view to
- * determine the current size and origin of the scrollable view. A
- * scrollable view must implement this event in order to scroll
- * properly inside an HIScrollView.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * <-- kEventParamImageSize (out, typeHISize)
- * On exit, contains the size of the entire scrollable view.
- *
- * <-- kEventParamViewSize (out, typeHISize)
- * On exit, contains the amount of the scrollable view that is
- * visible.
- *
- * <-- kEventParamLineSize (out, typeHISize)
- * On exit, contains the amount that should be scrolled in
- * response to a single click on a scrollbar arrow.
- *
- * <-- kEventParamOrigin (out, typeHIPoint)
- * On exit, contains the scrollable viewÕs current origin (the
- * view-relative coordinate that is drawn at the top left
- * corner of its frame). These coordinates should always be
- * greater than or equal to zero. They should be less than or
- * equal to the viewÕs image size minus its view size.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available
- }
- const
- kEventScrollableGetInfo = 1;
- {
- * kEventClassScrollable / kEventScrollableInfoChanged
- *
- * Summary:
- * Notification that the size or origin of an HIScrollViewÕs
- * scrollable view has changed.
- *
- * Discussion:
- * This event is not sent by HIScrollView itself; rather, it may be
- * sent to an instance of HIScrollView to notify the scroll view
- * that the size or origin of its scrollable view have changed. The
- * HIScrollView responds to this event by sending a
- * kEventScrollableGetInfo to its scrollable view. It then updates
- * the scroll bars appropriately to reflect the new reality of the
- * scrollable view. It does NOT move the origin of the scrollable
- * view at all. It is just a notification to allow the scroll view
- * to sync up with its scrollable view.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available
- }
- const
- kEventScrollableInfoChanged = 2;
- {
- * kEventClassScrollable / kEventScrollableScrollTo
- *
- * Summary:
- * Requests that an HIScrollViewÕs scrollable view should scroll to
- * a particular origin.
- *
- * Discussion:
- * This event is sent by an HIScrollView to its scrollable view to
- * request that the scrollable view update its current origin and
- * redraw. Typically, a scrollable view will record its current
- * origin in its own instance data; it should update the origin in
- * response to this event. A scrollable view should also use either
- * HIViewScrollRect to scroll its content, or HIViewSetNeedsDisplay
- * to cause itself to redraw using the new origin point. A
- * scrollable view must implement this event in order to scroll
- * properly inside an HIScrollView.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * --> kEventParamOrigin (in, typeHIPoint)
- * The new origin for the scrollable view. The origin
- * coordinates will vary from (0,0) to scrollable viewÕs image
- * size minus its view size.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available
- }
- const
- kEventScrollableScrollTo = 10;
- {
- * Summary:
- * HIScrollView options
- }
- const
- {
- * This indicates that a vertical scroll bar is desired.
- }
- kHIScrollViewOptionsVertScroll = 1 shl 0;
- {
- * This indicates that a horizontal scroll bar is desired.
- }
- kHIScrollViewOptionsHorizScroll = 1 shl 1;
- {
- * This indicates that space for a grow box should be taken into
- * account when laying out scroll bars. On Mac OS X 10.3 and earlier,
- * if both the horizontal and vertical scroll bars are requested,
- * this attribute is assumed. On Mac OS X 10.4 and later, this
- * attribute is *NOT* assumed; this allows the scroll view to support
- * auto-hiding of the two scroll bars independently on Mac OS X 10.4
- * and later. If you want to preserve space for the grow box on all
- * systems, specify this option bit.
- }
- kHIScrollViewOptionsAllowGrow = 1 shl 2;
- kHIScrollViewValidOptions = kHIScrollViewOptionsVertScroll or kHIScrollViewOptionsHorizScroll or kHIScrollViewOptionsAllowGrow;
- {
- * HIScrollViewAction
- *
- * Summary:
- * HIScrollView navigation actions. See HIScrollViewNavigate for
- * more information.
- }
- type
- HIScrollViewAction = UInt32;
- const
- {
- * The scroll view should move to the top of the content.
- }
- kHIScrollViewScrollToTop = 1 shl 0;
- {
- * The scroll view should move to the bottom of the content.
- }
- kHIScrollViewScrollToBottom = 1 shl 1;
- {
- * The scroll view should move to the left of the content.
- }
- kHIScrollViewScrollToLeft = 1 shl 2;
- {
- * The scroll view should move to the right of the content.
- }
- kHIScrollViewScrollToRight = 1 shl 3;
- {
- * The scroll view should page up.
- }
- kHIScrollViewPageUp = 1 shl 4;
- {
- * The scroll view should page down.
- }
- kHIScrollViewPageDown = 1 shl 5;
- {
- * The scroll view should page left.
- }
- kHIScrollViewPageLeft = 1 shl 6;
- {
- * The scroll view should page right.
- }
- kHIScrollViewPageRight = 1 shl 7;
- {
- * HIScrollViewCreate()
- *
- * Discussion:
- * Creates a scroll view. This view has 3 parts, essentially. It can
- * have one or two scroll bars (horizontal/vertical), and a view to
- * be scrolled. The view to be scrolled is merely added via
- * HIViewAddSubview. The scroll view will automatically connect it
- * up appropriately. **** THIS MAY CHANGE
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inOptions:
- * Options for our scroll view. You must specify either a
- * horizontal or a vertical scroll bar. If neither is passed, an
- * error is returned.
- *
- * outView:
- * The new scroll view.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIScrollViewCreate( inOptions: OptionBits; var outView: HIViewRef ): OSStatus; external name '_HIScrollViewCreate';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIScrollViewSetScrollBarAutoHide()
- *
- * Discussion:
- * Sets a scroll view's scroll bars to auto-hide when the entire
- * scrollable view it is managing can be fully displayed in its
- * bounds. This is similar to the behavior you see in the Preview
- * application.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to affect.
- *
- * inAutoHide:
- * The new auto-hide setting (true == auto-hide).
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIScrollViewSetScrollBarAutoHide( inView: HIViewRef; inAutoHide: Boolean ): OSStatus; external name '_HIScrollViewSetScrollBarAutoHide';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIScrollViewGetScrollBarAutoHide()
- *
- * Discussion:
- * Gets a scroll view's current scroll bar auto-hide setting.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to examine.
- *
- * Result:
- * A boolean result.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIScrollViewGetScrollBarAutoHide( inView: HIViewRef ): Boolean; external name '_HIScrollViewGetScrollBarAutoHide';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIScrollViewNavigate()
- *
- * Discussion:
- * Allows you to programmatically change what portion of a scroll
- * view's target you are seeing. For example, you can move to the
- * beginning or end of a document. You can also page up, down, left
- * and right. In general, you should not call this from embedded
- * content (i.e. the scrollable view inside the scroll view). For
- * those cases, you should instead position yourself appropriately
- * and tell the scroll view you changed via the
- * kEventScrollableInfoChanged carbon event. This routine merely is
- * a programmatic way to scroll as one would by hand using the
- * scroll bars.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The scroll view to affect.
- *
- * inAction:
- * The action to take.
- *
- * Result:
- * A operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HIScrollViewNavigate( inView: HIViewRef; inAction: HIScrollViewAction ): OSStatus; external name '_HIScrollViewNavigate';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HIScrollViewCanNavigate()
- *
- * Discussion:
- * Allows you to tell whether it is currently possible to navigate
- * somehow in a scroll view. For example, if a scroll view is
- * already at the top of the scrollable content, it is not possible
- * to navigate upward, so home and page up actions would not be
- * possible. You might use this function to help you update the
- * state of menu items or the like.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view to examine.
- *
- * inAction:
- * The action to test.
- *
- * Result:
- * A boolean result.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HIScrollViewCanNavigate( inView: HIViewRef; inAction: HIScrollViewAction ): Boolean; external name '_HIScrollViewCanNavigate';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {==============================================================================}
- { HIImageView }
- { The image view is a new view starting in Mac OS 10.2. It can only be used }
- { in a compositing window. Like all new HIFoo views, this view is initially }
- { invisible. You must show the view after creation. }
- {==============================================================================}
- { The HIObject class ID for the HIImageView class. }
- {$ifc USE_CFSTR_CONSTANT_MACROS}
- {$definec kHIImageViewClassID CFSTRP('com.apple.HIImageView')}
- {$endc}
- { ControlKind}
- const
- kControlKindHIImageView = $696D6167 (* 'imag' *);
- {
- * HIImageViewCreate()
- *
- * Discussion:
- * Creates an image view. The view responds to the scrollable
- * interface and can be used in a scrolling view. You can pass an
- * image initially, or set one later.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inImage:
- * An initial image, or NULL. You can set the image later via
- * SetControlData.
- *
- * outControl:
- * The new image view.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIImageViewCreate( inImage: CGImageRef { can be NULL }; var outControl: ControlRef ): OSStatus; external name '_HIImageViewCreate';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- const
- kHIImageViewImageTag = $696D6167 (* 'imag' *); { CGImageRef (THIS TAG IS GOING AWAY!!! USE THE APIS BELOW!)}
- {
- * HIImageViewSetOpaque()
- *
- * Discussion:
- * Allows you to set whether an image view should be treated as
- * opaque. If this is set to true, the image view can make certain
- * optimizations for compositing and scrolling. The alpha-related
- * image view APIs are rendered useless if opacity it set to true.
- * An image view, when created, is transparent by default.
- *
- * NOTE: In Mac OS X 10.2, this control was documented as being
- * opaque by default, but the implementation did not enforce that.
- * So in Mac OS X 10.3 and beyond, the control is transparent by
- * default, and you can make it opaque by calling
- * HIImageViewSetOpaque.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The image view to affect.
- *
- * inOpaque:
- * The new opacity setting. Pass true to indicate you want the
- * image to be treated as opaque.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIImageViewSetOpaque( inView: HIViewRef; inOpaque: Boolean ): OSStatus; external name '_HIImageViewSetOpaque';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIImageViewIsOpaque()
- *
- * Discussion:
- * Allows you to determine whether an image view is opaque or not.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The image view to query.
- *
- * Result:
- * A boolean result, where true indicates the image view is opaque.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIImageViewIsOpaque( inView: HIViewRef ): Boolean; external name '_HIImageViewIsOpaque';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIImageViewSetAlpha()
- *
- * Discussion:
- * Allows you to set the alpha for an image, making it more or less
- * transparent. An alpha of 1.0 is fully opaque, and 0.0 is fully
- * transparent. The default alpha for an image is 1.0.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The image view to affect.
- *
- * inAlpha:
- * The new alpha value.
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIImageViewSetAlpha( inView: HIViewRef; inAlpha: Float32 ): OSStatus; external name '_HIImageViewSetAlpha';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIImageViewGetAlpha()
- *
- * Discussion:
- * Allows you to get the alpha for an image. An alpha of 1.0 is
- * fully opaque, and 0.0 is fully transparent.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The image view to query.
- *
- * Result:
- * A floating point number representing the alpha from 0.0 through
- * 1.0.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIImageViewGetAlpha( inView: HIViewRef ): Float32; external name '_HIImageViewGetAlpha';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIImageViewSetScaleToFit()
- *
- * Discussion:
- * Normally an image view will clip to the view's bounds. Using this
- * API, you can instead tell the image view to size the image to fit
- * into the view bounds specified.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The image view to affect.
- *
- * inScaleToFit:
- * A boolean indicating whether the image should be scaled to fit
- * the view bounds (true) or merely clip to the view bounds
- * (false).
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIImageViewSetScaleToFit( inView: HIViewRef; inScaleToFit: Boolean ): OSStatus; external name '_HIImageViewSetScaleToFit';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIImageViewGetScaleToFit()
- *
- * Discussion:
- * Returns whether or not an image view will scale the image it
- * displays to the view bounds or merely clip to the view bounds. A
- * true result means it scales.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The image view to query.
- *
- * Result:
- * A boolean result.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIImageViewGetScaleToFit( inView: HIViewRef ): Boolean; external name '_HIImageViewGetScaleToFit';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIImageViewSetImage()
- *
- * Discussion:
- * Sets the image to display in an image view. The image passed in
- * is retained by the view, so you may release the image after
- * calling this API if you no longer need to reference it.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The image view to affect.
- *
- * inImage:
- * The image to set.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIImageViewSetImage( inView: HIViewRef; inImage: CGImageRef { can be NULL } ): OSStatus; external name '_HIImageViewSetImage';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIImageViewCopyImage()
- *
- * Discussion:
- * Gets the image for an image view. If there is no image set on the
- * view, or the view ref is invalid, NULL is returned. The image is
- * retained, so you should take care to release it when you are
- * finished with it.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The image view to query.
- *
- * Result:
- * A CoreGraphics (Quartz) image ref.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIImageViewCopyImage( inView: HIViewRef ): CGImageRef; external name '_HIImageViewCopyImage';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {==============================================================================}
- { HIComboBox }
- { The combo box is a new view starting in Mac OS 10.2. It can be used in }
- { both the new compositing mode, as well as the traditional control manager }
- { mode. Like all new HIFoo views, this view is created invisible. You must }
- { show the view after creation if you want to, like, see it and stuff. }
- {==============================================================================}
- { The HIObject class ID for the HIComboBox class. }
- {$ifc USE_CFSTR_CONSTANT_MACROS}
- {$definec kHIComboBoxClassID CFSTRP('com.apple.HIComboBox')}
- {$endc}
- {
- kEventClassHIComboBox quick reference:
-
- kEventComboBoxListItemSelected = 1
- }
- const
- kEventClassHIComboBox = $68696362 (* 'hicb' *);
- const
- kEventParamComboBoxListSelectedItemIndex = $63626C69 (* 'cbli' *);
- {
- * kEventClassHIComboBox / kEventComboBoxListItemSelected
- *
- * Summary:
- * Notification that an item in the ComboBox disclosure list has
- * been selected.
- *
- * Discussion:
- * This event is sent as a notification when an item in the ComboBox
- * disclosure list has been selected. This event is sent to all
- * handlers installed on the control. This does not imply that the
- * selection has been accepted; for that you will need to register
- * for the kEventClassTextField/kEventTextAccepted event; you can
- * register for that event in order to make live selections however.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * --> kEventParamDirectObject (in, typeControlRef)
- * The ComboBox view that has sent the notification.
- *
- * --> kEventParamComboBoxListSelectedItemIndex (in, typeCFIndex)
- * The index of the combo box list item that has been selected.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available
- }
- const
- kEventComboBoxListItemSelected = 1;
- {
- * Summary:
- * ComboBox attributes
- }
- const
- {
- * A constant with value zero; the lack of any attributes.
- }
- kHIComboBoxNoAttributes = 0;
- {
- * The control will attempt to auto complete the text the user is
- * typing with an item in the ComboBox list that is the closest
- * appropriate match.
- }
- kHIComboBoxAutoCompletionAttribute = 1 shl 0;
- {
- * The control will disclose the ComboBox list after the user enters
- * text.
- }
- kHIComboBoxAutoDisclosureAttribute = 1 shl 1;
- {
- * The items in the ComboBox list will be automatically sorted in
- * alphabetical order.
- }
- kHIComboBoxAutoSortAttribute = 1 shl 2;
- {
- * The ComboBox list will be automatically sized to fit the Human
- * Interface Guidelines.
- }
- kHIComboBoxAutoSizeListAttribute = 1 shl 3;
- {
- * The minimum set of ComboBox attributes commonly used.
- }
- kHIComboBoxStandardAttributes = kHIComboBoxAutoCompletionAttribute or kHIComboBoxAutoDisclosureAttribute or kHIComboBoxAutoSizeListAttribute;
- { ControlKind}
- const
- kControlKindHIComboBox = $63626278 (* 'cbbx' *);
- { ComboBox Part codes}
- const
- kHIComboBoxEditTextPart = 5;
- kHIComboBoxDisclosurePart = 28;
- {
- The ComboBox view supports these tags previously defined for the EditUnicodeText control.
- These tags are available through Get/SetControlData with a ControlPartCode of kHIComboBoxEditTextPart:
-
- kControlFontStyleTag
- kControlEditTextFixedTextTag
- kControlEditTextTextTag
- kControlEditTextKeyFilterTag
- kControlEditTextValidationProcTag
- kControlEditUnicodeTextPostUpdateProcTag
- kControlEditTextSelectionTag
- kControlEditTextKeyScriptBehaviorTag
- kControlEditTextCharCount
- kControlEditTextCFStringTag
- }
- {
- * Discussion:
- * ComboBox ControlData tags available with Mac OS X 10.2 and later.
- }
- const
- {
- * Extract the contents of the ComboBox list as a CFArray. The
- * CFArray will be retained: if you get the array, you own it and
- * will be required to release it; if you set it the toolbox makes a
- * copy of it and you are free to release your reference.
- }
- kHIComboBoxListTag = $63626C73 (* 'cbls' *); { CFArrayRef; bumps the refCount on get/retains on set}
- {
- * The width of the ComboBox list. This can be customized. This
- * disables the autosize attribute.
- }
- kHIComboBoxListPixelWidthTag = $63626C77 (* 'cblw' *); { UInt32 }
- {
- * The height of the ComboBox list. This can be customized. This
- * disables the autosize attribute.
- }
- kHIComboBoxListPixelHeightTag = $63626C68 (* 'cblh' *); { UInt32}
- {
- * The number of visible items in the list. This can be customized.
- * This disables the autosize attribute.
- }
- kHIComboBoxNumVisibleItemsTag = $63626E69 (* 'cbni' *); { UInt32}
- {
- * HIComboBoxCreate()
- *
- * Summary:
- * Creates a combo box control. The new control is initially
- * invisible.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * boundsRect:
- * The bounding box of the control.
- *
- * text:
- * The default text in the editable portion of the control. Can be
- * NULL.
- *
- * style:
- * The font style of the both editable text and the text in the
- * disclosure list. Can be NULL.
- *
- * list:
- * The default values available in the disclosure list. Can be
- * NULL.
- *
- * inAttributes:
- * The default attributes of the combo box.
- *
- * outComboBox:
- * On exit, contains the new control.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIComboBoxCreate( const (*var*) boundsRect: HIRect; text: CFStringRef { can be NULL }; {const} style: ControlFontStyleRecPtr { can be NULL }; list: CFArrayRef { can be NULL }; inAttributes: OptionBits; var outComboBox: HIViewRef ): OSStatus; external name '_HIComboBoxCreate';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIComboBoxGetItemCount()
- *
- * Summary:
- * Get the number of items in the combo box disclosure list.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inComboBox:
- * The combo box.
- *
- * Result:
- * The number of items in the combo box disclosure list.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIComboBoxGetItemCount( inComboBox: HIViewRef ): ItemCount; external name '_HIComboBoxGetItemCount';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIComboBoxInsertTextItemAtIndex()
- *
- * Summary:
- * Inserts a CFString in the disclosure list
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inComboBox:
- * The combo box whose disclosure list the text will be inserted
- * in.
- *
- * inIndex:
- * The index that the text should be inserted in. If the index
- * does not fall within the number of items in the combo box list,
- * it will be appended to the end of the list.
- *
- * inText:
- * The text item to be inserted in the combo box disclosure list.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIComboBoxInsertTextItemAtIndex( inComboBox: HIViewRef; inIndex: CFIndex; inText: CFStringRef ): OSStatus; external name '_HIComboBoxInsertTextItemAtIndex';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIComboBoxAppendTextItem()
- *
- * Summary:
- * Appends a text item to the combo box disclosure list.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inComboBox:
- * The combo box whose disclosure list the text will be appended
- * to.
- *
- * inText:
- * The text item to be appended to the combo box disclosure list.
- *
- * outIndex:
- * On exit, the index of the new item. Can be NULL if the caller
- * does not require this information.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIComboBoxAppendTextItem( inComboBox: HIViewRef; inText: CFStringRef; outIndex: CFIndexPtr { can be NULL } ): OSStatus; external name '_HIComboBoxAppendTextItem';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIComboBoxCopyTextItemAtIndex()
- *
- * Summary:
- * Copy the text from the combo box disclosure list
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inComboBox:
- * The combo box that contains the text item you would like to
- * copy.
- *
- * inIndex:
- * The index of the text item. Will return paramErr if the index
- * is out of bounds of the combo box list.
- *
- * outString:
- * A copy of the string at the given index. Remember this is now
- * your copy that you will need to release.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIComboBoxCopyTextItemAtIndex( inComboBox: HIViewRef; inIndex: CFIndex; var outString: CFStringRef ): OSStatus; external name '_HIComboBoxCopyTextItemAtIndex';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIComboBoxRemoveItemAtIndex()
- *
- * Summary:
- * Remove an item from a combo box disclosure list.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inComboBox:
- * The combo box that contains the disclosure list that you would
- * like to remove an item from.
- *
- * inIndex:
- * The index of the item to remove.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIComboBoxRemoveItemAtIndex( inComboBox: HIViewRef; inIndex: CFIndex ): OSStatus; external name '_HIComboBoxRemoveItemAtIndex';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIComboBoxChangeAttributes()
- *
- * Summary:
- * Change the attributes of a combo box
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inComboBox:
- * The combo box whose attributes you would like to change.
- *
- * inAttributesToSet:
- * The attributes to set.
- *
- * inAttributesToClear:
- * The attributes to clear.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIComboBoxChangeAttributes( inComboBox: HIViewRef; inAttributesToSet: OptionBits; inAttributesToClear: OptionBits ): OSStatus; external name '_HIComboBoxChangeAttributes';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIComboBoxGetAttributes()
- *
- * Summary:
- * Get the attributes of a combo box.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inComboBox:
- * The combo box whose attributes you would like to obtain.
- *
- * outAttributes:
- * The attributes of the combo box.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.2 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
- * Non-Carbon CFM: not available
- }
- function HIComboBoxGetAttributes( inComboBox: HIViewRef; var outAttributes: OptionBits ): OSStatus; external name '_HIComboBoxGetAttributes';
- (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
- {
- * HIComboBoxIsListVisible()
- *
- * Summary:
- * Returns whether the combo box list is currently disclosed.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inComboBox:
- * The combo box whose list visibility you would like to obtain.
- *
- * Result:
- * A boolean value indicating whether the combo box list is
- * disclosed (true) or hidden (false).
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIComboBoxIsListVisible( inComboBox: HIViewRef ): Boolean; external name '_HIComboBoxIsListVisible';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIComboBoxSetListVisible()
- *
- * Summary:
- * Hides or shows the combo box list.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inComboBox:
- * The combo box whose list will be hidden or shown.
- *
- * inVisible:
- * A boolean value indicating whether you wish to hide the list
- * (false) or show the list (true).
- *
- * Result:
- * An operating system result code.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
- * Non-Carbon CFM: not available
- }
- function HIComboBoxSetListVisible( inComboBox: HIViewRef; inVisible: Boolean ): OSStatus; external name '_HIComboBoxSetListVisible';
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {==============================================================================}
- { HISearchField }
- { HISearchField is a new view available in Mac OS X 10.3. }
- { This view is designed to be used for applications that provide searching }
- { functionality. Visually, it is a standard text field optionally adorned }
- { with a search icon on the left and/or a cancel image on the right. }
- { When the user has accepted the text by pressing the return or enter key }
- { a Carbon Event of kEventClassTextField / kEventTextAccepted will be sent }
- { to the control. This will be the indication that the search should begin. }
- { This control will also respond to all the standard control tags that are }
- { used by the EditUnicodeText control. }
- {==============================================================================}
- { The HIObject class ID for the HISearchField class. }
- {$ifc USE_CFSTR_CONSTANT_MACROS}
- {$definec kHISearchFieldClassID CFSTRP('com.apple.HISearchField')}
- {$endc}
- { ControlKind}
- const
- kControlKindHISearchField = $73726664 (* 'srfd' *);
- { HISearchField part codes}
- const
- kControlSearchFieldCancelPart = 30;
- kControlSearchFieldMenuPart = 31;
- {
- The SearchField view supports those tags previously defined for the EditUnicodeText control.
- These tags are available through Get/SetControlData with ControlPartCode of kControlEditTextPart:
-
- kControlFontStyleTag
- kControlEditTextFixedTextTag
- kControlEditTextTextTag
- kControlEditTextKeyFilterTag
- kControlEditTextValidationProcTag
- kControlEditUnicodeTextPostUpdateProcTag
- kControlEditTextSelectionTag
- kControlEditTextKeyScriptBehaviorTag
- kControlEditTextCharCount
- kControlEditTextCFStringTag
- }
- {
- * Summary:
- * HISearchField attributes
- }
- const
- {
- * A constant with value zero; the lack of any attributes.
- }
- kHISearchFieldNoAttributes = 0;
- {
- * This view contains the cancel icon in the text field.
- }
- kHISearchFieldAttributesCancel = 1 shl 0;
- {
- * This view contains the search icon in the text field. If a menu is
- * associated with the search field, this attribute is implicitly set
- * and the search icon will display with a menu disclosure badge.
- * Available in Mac OS X 10.4 and later.
- }
- kHISearchFieldAttributesSearchIcon = 1 shl 1;
- { Event Classes}
- const
- kEventClassSearchField = $73726664 (* 'srfd' *);
- {
- * kEventClassSearchField / kEventSearchFieldCancelClicked
- *
- * Summary:
- * Notification that the cancel icon has been depressed.
- *
- * Discussion:
- * This event is sent by the HISearchField view if the cancel icon
- * is enabled (attribute of kHISearchFieldAtttributesCancel), and
- * the cancel has been clicked.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * --> kEventParamDirectObject (in, typeControlRef)
- * The HISearchField that has sent the notification.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available
- }
- const
- kEventSearchFieldCancelClicked = 1;
- {
- * kEventClassSearchField / kEventSearchFieldSearchClicked
- *
- * Summary:
- * Notification that the search icon has been depressed.
- *
- * Discussion:
- * This event is sent by the HISearchField view if the search icon
- * is enabled (attribute of kHISearchFieldAttributesSearchIcon or a
- * menu is associated with the search field), and the search icon
- * has been clicked. If a menu is associated with the search field,
- * the search field will handle the display and tracking of the menu
- * by default. This event is sent to the search field only, it will
- * not propagate.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * --> kEventParamDirectObject (in, typeControlRef)
- * The HISearchField that has sent the notification.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available
- }
- const
- kEventSearchFieldSearchClicked = 2;
- {
- * HISearchFieldCreate()
- *
- * Summary:
- * Creates a search field control. The new control is initially
- * invisible.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inBounds:
- * The initial bounds of the view. If this parameter is NULL, the
- * view defaults to have empty bounds ( 0, 0, 0, 0 ).
- *
- * inAttributes:
- * The initial attributes of the search field. Indicates whether
- * the field should contain the cancel icon.
- *
- * inSearchMenu:
- * The menu to be associated with this search field. If
- * inSearchMenu is non-NULL, it will be retained by the search
- * field and the search icon will be enabled in the left side of
- * the text field. If this parameter is NULL, the view will not
- * display the search icon in the left portion of the text field.
- * You are expected to install handlers on this menu to handle the
- * visual appearance of the menu (for example, to draw check marks
- * or enable items when the menu receives the
- * kEventMenuEnableItems Carbon Event), and to keep track of what
- * action should be performed by associating HICommands with each
- * menu item and installing a handler for the (
- * kEventClassCommand, kEventCommandProcess ) Carbon Event.
- *
- * inDescriptiveText:
- * The text to be displayed in the text field when the field does
- * not have focus and contains no user entered text. This is meant
- * to be an indication of what the search criteria is. For
- * example, you may wish to identify to the user that the search
- * will cover the "Subject" or "Contents" of a selected range of
- * items. If inDescriptiveText is non-NULL it will be retained by
- * the search field.
- *
- * outRef:
- * On exit, contains the new view.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISearchFieldCreate( {const} inBounds: HIRectPtr { can be NULL }; inAttributes: OptionBits; inSearchMenu: MenuRef { can be NULL }; inDescriptiveText: CFStringRef { can be NULL }; var outRef: HIViewRef ): OSStatus; external name '_HISearchFieldCreate';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HISearchFieldSetSearchMenu()
- *
- * Summary:
- * Set the search menu associated with the view.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSearchField:
- * The search field to associate the search menu with.
- *
- * inSearchMenu:
- * The menu to associate with the search field. If there is
- * already a menu associated with the search field, that menu will
- * be released. If inSearchMenu is non-NULL, it will be retained
- * by the search field and the search icon will be enabled in the
- * left side of the text field. You are expected to install
- * handlers on this menu to handle the visual appearance of the
- * menu (for example, to draw check marks or enable items when the
- * menu receives the kEventMenuEnableItems Carbon Event), and to
- * keep track of what action should be performed by associating
- * HICommands with each menu item and installing a handler for the
- * ( kEventClassCommand, kEventCommandProcess ) Carbon Event. If
- * inSearchMenu is NULL, the search icon will be removed from the
- * left side of the text field and no menu will be associated with
- * this field.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISearchFieldSetSearchMenu( inSearchField: HIViewRef; inSearchMenu: MenuRef { can be NULL } ): OSStatus; external name '_HISearchFieldSetSearchMenu';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HISearchFieldGetSearchMenu()
- *
- * Summary:
- * Get the menu that is associated with the search field
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSearchField:
- * The search field you wish to retrieve the search menu from.
- *
- * outSearchMenu:
- * On exit, will contain the menu that is associated with search
- * field. The menu will _not_ be retained on output and this
- * parameter cannot be NULL.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISearchFieldGetSearchMenu( inSearchField: HIViewRef; var outSearchMenu: MenuRef ): OSStatus; external name '_HISearchFieldGetSearchMenu';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HISearchFieldChangeAttributes()
- *
- * Summary:
- * Set the attributes for the given search field.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSearchField:
- * The search field to change the attributes of.
- *
- * inAttributesToSet:
- * The attributes to set.
- *
- * inAttributesToClear:
- * The attributes to clear.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISearchFieldChangeAttributes( inSearchField: HIViewRef; inAttributesToSet: OptionBits; inAttributesToClear: OptionBits ): OSStatus; external name '_HISearchFieldChangeAttributes';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HISearchFieldGetAttributes()
- *
- * Summary:
- * Returns the attributes of the search field.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSearchField:
- * The search field to get the attributes of.
- *
- * outAttributes:
- * On exit, will contain the attributes of the search field. This
- * parameter cannot be NULL.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISearchFieldGetAttributes( inSearchField: HIViewRef; var outAttributes: OptionBits ): OSStatus; external name '_HISearchFieldGetAttributes';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HISearchFieldSetDescriptiveText()
- *
- * Summary:
- * Set the description of the search action of the search field.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSearchField:
- * The search field to change the description of.
- *
- * inDescription:
- * The new description for the search field. If the search field
- * contains a description, it will be released. If inDescription
- * is non-NULL, it will be retained by the search field. If it is
- * NULL, no description will be associated with the search field.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISearchFieldSetDescriptiveText( inSearchField: HIViewRef; inDescription: CFStringRef { can be NULL } ): OSStatus; external name '_HISearchFieldSetDescriptiveText';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HISearchFieldCopyDescriptiveText()
- *
- * Summary:
- * Get the description that is associated with the search field.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSearchField:
- * The search field you wish to retrieve the description from.
- *
- * outDescription:
- * On exit, will contain the description that is associated with
- * the search field. This parameter cannot be NULL. If there is no
- * description associated with the search field, outDescription
- * will be set to NULL. If there is a description, a CFStringRef
- * will be created that contains the contents of the description.
- * You posess ownership of this string and will need to release it
- * when you no longer need it.
- *
- * Result:
- * An operating system status code.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISearchFieldCopyDescriptiveText( inSearchField: HIViewRef; var outDescription: CFStringRef ): OSStatus; external name '_HISearchFieldCopyDescriptiveText';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {==============================================================================}
- { Text field events }
- { A text field is the part of some controls that you can enter text into. }
- { A text field is common to the EditText, EditUnicodeText, ComboBox, }
- { HISearchField, and HITextView views. The kEventClassTextField event allows }
- { you to receive notifications when the text has been accepted by the user. }
- { For example, you can install a handler for a }
- { kEventClassTextField / kEventTextAccepted event on a HISearchField view to }
- { receive a notification that the user has initiated a search by hitting the }
- { return or enter key. You can also filter the text that will replace a }
- { selection before the change has been made to either accept or reject the }
- { replacement. }
- {==============================================================================}
- {
- kEventClassTextField quick reference:
-
- kEventTextAccepted = 1,
- kEventTextShouldChangeInRange = 2,
- kEventTextDidChange = 3
- }
- const
- kEventClassTextField = $74786664 (* 'txfd' *);
- const
- kEventParamTextSelection = $7478736C (* 'txsl' *); { typeCFRange}
- kEventParamCandidateText = $74737478 (* 'tstx' *); { typeCFStringRef}
- kEventParamReplacementText = $74727478 (* 'trtx' *); { typeCFStringRef}
- kEventParamUnconfirmedRange = $74756E72 (* 'tunr' *); { typeCFRange}
- kEventParamUnconfirmedText = $7478756E (* 'txun' *); { typeCFStringRef}
- {
- * kEventClassTextField / kEventTextAccepted
- *
- * Summary:
- * Notification that the text in a control's editable text field has
- * been accepted.
- *
- * Discussion:
- * This event is sent as a notification when the text contained in a
- * control's editable text field has been accepted by the user. Text
- * is accepted when the user presses return or enter on the keyboard
- * for the EditUnicodeText, HIComboBox, and HISearchField controls,
- * or when the text has changed in the field and the field loses
- * focus for the EditUnicodeText, HIComboBox, HISearchField and
- * HITextView controls.
- *
- * This event is sent to the control containing the text field only,
- * it will not propagate. It is sent to all handlers installed on
- * the control containing the text field.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * --> kEventParamDirectObject (in, typeControlRef)
- * The editable text field that has sent the notification.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available
- }
- const
- kEventTextAccepted = 1;
- {
- * kEventClassTextField / kEventTextShouldChangeInRange
- *
- * Summary:
- * Returns whether the text should be changed in editable text
- * fields.
- *
- * Discussion:
- * There are several editable text field views, such as the
- * HIComboBox, HISearchField, HITextView, and EditUnicodeText
- * controls. There are times when you may require fine-grained
- * control over what text is inserted into the text field and either
- * accept the changes, reject them or modify what is to be entered.
- * This event is sent whenever the text is about to be modified in a
- * text field, either by user input or in other scenarios such as a
- * paste from the clipboard, spell-checking word correction, or Mac
- * OS X Service operation. You can change what text is inserted by
- * providing a replacement string as a parameter to this event. This
- * event is only sent for Unicode text controls; it is not sent for
- * the classic non-Unicode EditText control.
- *
- * This event is not sent prior to programmatic modification of the
- * text field contents using SetControlData.
- *
- * This event is not sent while an active inline editing session is
- * in progress. Once the inline text has been confirmed, this event
- * will be sent prior to the confirmed text being inserted into the
- * text field. If you need control over keystrokes during an inline
- * editing session, you can use the kEventTextInputFilterText event.
- *
- *
- * This event is sent to the control containing the text field only;
- * it will not propagate.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * --> kEventParamTextSelection (in, typeCFRange)
- * The range of the selection that is about to be changed. The
- * units of the selection are in the same units that are
- * returned in a EditTextSelectionRec, when called with
- * GetControlData using kControlEditTextSelectionTag.
- *
- * --> kEventParamCandidateText (in, typeCFStringRef)
- * The text that is going to replace the selection. Note that
- * this string was originally created with
- * CFStringCreateWithCharactersNoCopy, and the original text
- * has a limited lifespan. If for some reason you need to
- * retain the text past the end of your event handler, you
- * should extract the characters from the string with
- * CFStringGetCharacters, and then store those characters or
- * create a new CFString from them.
- *
- * <-- kEventParamReplacementText (out, typeCFStringRef)
- * On output, can contain optional replacement text.
- *
- * Result:
- * If noErr is returned from your handler and the
- * kEventParamReplacementText parameter is added to the event, then
- * the contents of that parameter, rather than the candidate text,
- * will be added to the text field.
- *
- * If noErr is returned from your handler and the
- * kEventParamReplacementText parameter is _not_ added to the event,
- * then the candidate text will be filtered out and no text will be
- * entered in the text field. The current selection will be deleted,
- * however.
- *
- * If userCanceledErr is returned from your handler, then no text
- * will be entered in the text field and the current selection will
- * remain unchanged. Effectively, the editing operation will be
- * ignored.
- *
- * If eventNotHandledErr is returned from your handler, the contents
- * of the kEventParamReplacementText parameter are ignored, and the
- * candidate text will replace the selection.
- *
- * Any other return value will result in the default behavior, as if
- * eventNotHandledErr had been returned.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available
- }
- const
- kEventTextShouldChangeInRange = 2;
- {
- * kEventClassTextField / kEventTextDidChange
- *
- * Summary:
- * Indicates that the contents of an editable text field have
- * changed.
- *
- * Discussion:
- * This event is sent by all of the Unicode-based editable text
- * views: HIComboBox, HISearchField, HITextView and EditUnicodeText.
- * This event is not sent for the classic non-Unicode EditText
- * control.
- *
- * Note that this event is sent after inline editing operations,
- * such as pressing a dead key, or using a input method that creates
- * an inline editing hole. Most clients of this event should ignore
- * the event during inline editing, and only respond to changes to
- * the text after inline editing completes. A client can check for
- * the presence of the kEventParamUnconfirmedRange parameter to
- * determine whether inline editing is currently active; if this
- * parameter is present, the client may wish to ignore the event.
- *
- *
- * This event is not sent after programmatic modification of the
- * text field contents using SetControlData.
- *
- * This event is sent only to the control containing the text field;
- * it will not propagate. It is sent to all handlers registered for
- * it.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * --> kEventParamUnconfirmedRange (in, typeCFRange)
- * If the text field currently has an open inline hole, this
- * parameter contains the range of text inside the hole. This
- * parameter is optional and is only present during inline
- * editing.
- *
- * --> kEventParamUnconfirmedText (in, typeCFStringRef)
- * If the text field currently has an open inline hole, this
- * parameter contains the non-confirmed text currently being
- * edited inside the hole. This parameter is optional and is
- * only present during inline editing. Note that this string
- * was originally created with
- * CFStringCreateWithCharactersNoCopy, and the original text
- * has a limited lifespan. If for some reason you need to
- * retain the text past the end of your event handler, you
- * should extract the characters from the string with
- * CFStringGetCharacters, and then store those characters or
- * create a new CFString from them.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available
- }
- const
- kEventTextDidChange = 3;
- {==============================================================================}
- { HIMenuView }
- { HIMenuView and HIStandardMenuView are new views available in Mac OS X 10.3. }
- { HIMenuView is intended for use as a base class for custom menu item views; }
- { it does not draw or handle events itself, but provides useful functionality }
- { that all menu views need to implement. HIStandardMenuView is the standard }
- { HIView used by the Menu Manager to draw menu item content, beginning with }
- { Mac OS X 10.3. It can also be subclassed by custom menu item views. }
- { Both of these views are meant to be used only in compositing windows. }
- { Because HIMenuView and HIStandardMenuView are not typically created }
- { directly by applications, no API is provided to create instances of these }
- { views. If you need to create an instance of either view, you can use }
- { HIObjectCreate. }
- {==============================================================================}
- { the HIObject class ID for the HIMenuView class}
- {$ifc USE_CFSTR_CONSTANT_MACROS}
- {$definec kHIMenuViewClassID CFSTRP('com.apple.HIMenuView')}
- {$endc}
- { the HIObject class ID for the standard menu HIView class}
- {$ifc USE_CFSTR_CONSTANT_MACROS}
- {$definec kHIStandardMenuViewClassID CFSTRP('com.apple.HIStandardMenuView')}
- {$endc}
- { Control Kinds (only used in Mac OS X 10.4 and later)}
- const
- kControlKindHIMenuView = $6D656E75 (* 'menu' *);
- kControlKindHIStandardMenuView = $736D6E75 (* 'smnu' *);
- {
- The kEventHIObjectInitialize event for HIMenuView and HIStandardMenuView is expected to contain
- the following parameters. Be sure to include these parameters in the init event if you create an
- instance of these views with HIObjectCreate.
-
- --> kEventParamMenuRef (in, typeMenuRef)
- The menu that the view should draw.
- }
- {
- * kHIViewMenuContentID
- *
- * Summary:
- * The HIViewID for the menu content view. The Menu Manager assigns
- * this view ID to all menu content views.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available
- * Non-Carbon CFM: not available
- }
- var kHIViewMenuContentID: HIViewID; external name '_kHIViewMenuContentID'; (* attribute const *)
- (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
- {
- * HIMenuViewGetMenu()
- *
- * Summary:
- * Returns the MenuRef that is associated with an HIView that is a
- * subclass of HIMenuView.
- *
- * Discussion:
- * An HIMenuView subclass might use this API to determine the menu
- * that it should draw.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inView:
- * The view whose menu to return.
- *
- * Result:
- * The MenuRef associated with the HIView, or NULL if an HIView is
- * passed that is not a subclass of HIMenuView.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HIMenuViewGetMenu( inView: HIViewRef ): MenuRef; external name '_HIMenuViewGetMenu';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HIMenuGetContentView()
- *
- * Summary:
- * Returns the HIViewRef that will be used to draw menu content for
- * this menu, if any.
- *
- * Discussion:
- * If the content view has not yet been created, the Menu Manager
- * will create the content view using the view class ID and
- * initialization event associated with the menu. Note that the menu
- * content view is not the same as the window content view; the menu
- * content view is embedded inside the window content view. If the
- * menu uses an MDEF instead of an HIView to draw its content, noErr
- * is returned but the output HIViewRef is set to NULL.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inMenu:
- * The menu.
- *
- * inMenuType:
- * The type of menu for which the menu content view should be
- * returned. The same MenuRef may have multiple content views,
- * depending on the menu type being displayed.
- *
- * outView:
- * On exit, contains the view. May be set to NULL if the menu does
- * not use an HIView to draw its content. The caller should not
- * release this view.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HIMenuGetContentView( inMenu: MenuRef; inMenuType: ThemeMenuType; var outView: HIViewRef ): OSStatus; external name '_HIMenuGetContentView';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {==============================================================================}
- { HISegmentedView }
- { HISegmentedView is a new view available in Mac OS X 10.3. }
- { Examples of the segmented view are the Finder's icon/column/list view }
- { switcher, and the back/forward buttons in Open panels. }
- { The segmented view operates as a group of buttons, each of which can be }
- { configured with different behaviors and content. }
- { Accessibility Notes: Those of you who wish to customize the accessibility }
- { information provided for individual segments of the segmented view -- by }
- { handling various kEventClassAccessibility Carbon Events, by calling }
- { HIObjectSetAuxiliaryAccessibilityAttribute, etc. -- need to know how to }
- { interpret and/or build AXUIElementRefs that represent individual segments. }
- { The AXUIElement representing an individual segment will/must be constructed }
- { using the segmented view's HIViewRef and the UInt64 identifier of the }
- { one-based index of the segment the element refers to. As usual, a UInt64 }
- { identifier of zero represents the segmented view as a whole. You must }
- { neither interpret nor create segmented view elements whose identifiers are }
- { greater than the count of segments in the segmented view. }
- {==============================================================================}
- { The HIObject class ID for the HISegmentedView class. }
- {$ifc USE_CFSTR_CONSTANT_MACROS}
- {$definec kHISegmentedViewClassID CFSTRP('com.apple.HISegmentedView')}
- {$endc}
- { Control Kind}
- const
- kHISegmentedViewKind = $73676D74 (* 'sgmt' *);
- {
- * HISegmentedViewCreate()
- *
- * Summary:
- * Creates a segmented view. This is the type of view you would use
- * to implement the icon/column/list view switcher as seen in the
- * Finder. After creating a segmented view, you need to set the
- * number of segments via HISegmentedViewSetSegmentCount. Each
- * segment can be configured independently with via the other
- * HISegmentedView APIs. Changing the number of segments and
- * configuring each segment will change the appearance of the
- * segmented view. After you configure the view, you may want to
- * call GetBestControlRect on the view and resize it so the content
- * will fit optimally. The value of the whole segmented view
- * corresponds to the index of the currently selected segment with
- * the radio behavior. If you set the value of the whole segmented
- * view to n via SetControl32BitValue, every radio-behavior segment
- * will have its value set to zero except for the segment at index
- * n; if segment n also has the radio behavior, it will have its
- * value set to one. When a radio-behavior segment is clicked, the
- * value of the whole segmented view will be set to the segment's
- * index. The segmented view works in both compositing and
- * non-compositing modes.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inBounds:
- * The bounds of the view to be created. Can be NULL, in which
- * case the view is created with CGRectZero bounds.
- *
- * outRef:
- * A valid pointer to an HIViewRef. On successful completion of
- * this routine, the destination HIViewRef will be filled with the
- * HIViewRef of the newly created view.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISegmentedViewCreate( {const} inBounds: HIRectPtr { can be NULL }; var outRef: HIViewRef ): OSStatus; external name '_HISegmentedViewCreate';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HISegmentedViewSetSegmentCount()
- *
- * Summary:
- * Sets the number of segments for the segmented view. Any previous
- * segments beyond the new count will have their content released.
- * All new segments beyond the previous count be initialized with
- * the most basic settings possible: Momentary, no attributes, zero
- * value, enabled, no command, no label, no content, and
- * auto-calculated content width. You should configure any new
- * segments to match your needs.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSegmentedView:
- * The segmented view for which the content is to be set.
- *
- * inSegmentCount:
- * A positive integer indicating how many segments the view is to
- * have.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISegmentedViewSetSegmentCount( inSegmentedView: HIViewRef; inSegmentCount: UInt32 ): OSStatus; external name '_HISegmentedViewSetSegmentCount';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HISegmentedViewGetSegmentCount()
- *
- * Summary:
- * Get the number of segments in the segmented view.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSegmentedView:
- * The segmented view for which the content is to be set.
- *
- * Result:
- * A UInt32 indicating the number of segments in the segmented view.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISegmentedViewGetSegmentCount( inSegmentedView: HIViewRef ): UInt32; external name '_HISegmentedViewGetSegmentCount';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * Summary:
- * HISegmentBehavior constants
- }
- const
- {
- * Pops back up after being pressed, just like a push button.
- }
- kHISegmentBehaviorMomentary = 1;
- {
- * Stays pressed until another segment with the radio behavior is
- * pressed. This makes the segment behave like a radio button. After
- * this segment is clicked, the segmented view's value will be
- * changed to this segment's one-based index.
- }
- kHISegmentBehaviorRadio = 2;
- {
- * Like a check box. When clicked, it toggles back and forth between
- * checked and unchecked states.
- }
- kHISegmentBehaviorToggles = 3;
- {
- * After being pressed, this type of segment stays pressed until you
- * programatically unpress it.
- }
- kHISegmentBehaviorSticky = 4;
- type
- HISegmentBehavior = UInt32;
- {
- * HISegmentedViewSetSegmentBehavior()
- *
- * Summary:
- * Changes the behavior of an individual segment of a segmented
- * view. By default, a segment has the kHISegmentBehaviorMomentary
- * behavior.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSegmentedView:
- * The segmented view which owns the segment whose behavior you
- * want to change.
- *
- * inSegmentIndexOneBased:
- * The one-based index of the segment whose behavior you want to
- * change. This must be a non-zero value that is no higher than
- * the segmented view's current segment count.
- *
- * inBehavior:
- * A HISegmentBehavior describing the behavior you wish the
- * segment to have.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISegmentedViewSetSegmentBehavior( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inBehavior: HISegmentBehavior ): OSStatus; external name '_HISegmentedViewSetSegmentBehavior';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HISegmentedViewGetSegmentBehavior()
- *
- * Summary:
- * Returns the behavior of an individual segment of a segmented view.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSegmentedView:
- * The segmented view which owns the segment being queried.
- *
- * inSegmentIndexOneBased:
- * The one-based index of the segment whose behavior you desire.
- * This must be a non-zero value that is no higher than the
- * segmented view's current segment count.
- *
- * Result:
- * A HISegmentBehavior describing the behavior of the given segment.
- * If you pass an illegal segment index, the result is undefined.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISegmentedViewGetSegmentBehavior( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): HISegmentBehavior; external name '_HISegmentedViewGetSegmentBehavior';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * Summary:
- * HISegmentedView segment attributes
- *
- * Discussion:
- * These attribute bits are for use with
- * HISegmentedViewChangeSegmentAttributes and
- * HISegmentedViewGetSegmentAttributes.
- }
- const
- {
- * Pass this to indicate no attributes at all.
- }
- kHISegmentNoAttributes = 0;
- {
- * If this attribute bit is set, the command that gets sent out when
- * the segment is clicked will be directed at the user focus instead
- * of up the segmented view's containment hierarchy.
- }
- kHISegmentSendCmdToUserFocus = 1 shl 0;
- {
- * HISegmentedViewChangeSegmentAttributes()
- *
- * Summary:
- * Changes the attributes of an individual segment of a segmented
- * view. By default, a segment has no attribute bits set.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSegmentedView:
- * The segmented view which owns the segment whose attributes you
- * want to change.
- *
- * inSegmentIndexOneBased:
- * The one-based index of the segment whose attributes you want to
- * change. This must be a non-zero value that is no higher than
- * the segmented view's current segment count.
- *
- * inAttributesToSet:
- * The attribute bits you wish to set/enable for the segment.
- *
- * inAttributesToClear:
- * The attribute bits you wish to clear/disable for the segment.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISegmentedViewChangeSegmentAttributes( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inAttributesToSet: OptionBits; inAttributesToClear: OptionBits ): OSStatus; external name '_HISegmentedViewChangeSegmentAttributes';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HISegmentedViewGetSegmentAttributes()
- *
- * Summary:
- * Returns the attributes of an individual segment of a segmented
- * view.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSegmentedView:
- * The segmented view which owns the segment being queried.
- *
- * inSegmentIndexOneBased:
- * The one-based index of the segment whose attributes you desire.
- * This must be a non-zero value that is no higher than the
- * segmented view's current segment count.
- *
- * Result:
- * The attribute bits that are set/enabled for the given segment. If
- * you pass an illegal segment index, the result is undefined.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISegmentedViewGetSegmentAttributes( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): OptionBits; external name '_HISegmentedViewGetSegmentAttributes';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HISegmentedViewSetSegmentValue()
- *
- * Summary:
- * Change the value of an individual segment of a segmented view.
- * This is only meaningful for segments with the sticky, toggles, or
- * radio behaviors. If you set the value of momentary segments to
- * something other than zero, the behavior is undefined.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSegmentedView:
- * The segmented view which owns the segment whose value you want
- * to change.
- *
- * inSegmentIndexOneBased:
- * The one-based index of the segment whose value you want to
- * change. This must be a non-zero value that is no higher than
- * the segmented view's current segment count.
- *
- * inValue:
- * The value you wish the segment to have. Zero means
- * unpressed/unselected and one means pressed/selected. Other
- * values will result in undefined behavior.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISegmentedViewSetSegmentValue( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inValue: SInt32 ): OSStatus; external name '_HISegmentedViewSetSegmentValue';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HISegmentedViewGetSegmentValue()
- *
- * Summary:
- * Determine the value of an individual segment of a segmented view.
- * This is only meaningful for segments with the sticky, toggles, or
- * radio behaviors. The value of a momentary segment is undefined.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSegmentedView:
- * The segmented view which owns the segment being queried.
- *
- * inSegmentIndexOneBased:
- * The one-based index of the segment whose value you desire. This
- * must be a non-zero value that is no higher than the segmented
- * view's current segment count.
- *
- * Result:
- * A SInt32 indicating the value of the given segment. If you pass
- * an illegal segment index, the result is undefined.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISegmentedViewGetSegmentValue( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): SInt32; external name '_HISegmentedViewGetSegmentValue';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HISegmentedViewSetSegmentEnabled()
- *
- * Summary:
- * Enable or disable an individual segment of a segmented view.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSegmentedView:
- * The segmented view which owns the segment to enable or disable.
- *
- * inSegmentIndexOneBased:
- * The one-based index of the segment to disable or enable. This
- * must be a non-zero value that is no higher than the segmented
- * view's current segment count.
- *
- * inEnabled:
- * A Boolean indicating whether the segment is to become enabled
- * or disabled.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISegmentedViewSetSegmentEnabled( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inEnabled: Boolean ): OSStatus; external name '_HISegmentedViewSetSegmentEnabled';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HISegmentedViewIsSegmentEnabled()
- *
- * Summary:
- * Test an individual segment of a segmented view to see if it is
- * enabled or disabled.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSegmentedView:
- * The segmented view which owns the segment being queried.
- *
- * inSegmentIndexOneBased:
- * The one-based index of the segment to test. This must be a
- * non-zero value that is no higher than the segmented view's
- * current segment count.
- *
- * Result:
- * True if the segment is enabled or false if the segment is
- * disabled. If you pass an illegal segment index, the result is
- * undefined.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISegmentedViewIsSegmentEnabled( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): Boolean; external name '_HISegmentedViewIsSegmentEnabled';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HISegmentedViewSetSegmentCommand()
- *
- * Summary:
- * Set the command ID for the given segment. By default, the command
- * is zero. If you set any non-zero command ID, the segmented view
- * will send an HICommand whenever the segment is clicked. By
- * default, the command is sent to the segmented view and up the
- * containment hierarchy. You can request that the command start at
- * the user focus instead by turning on the
- * kHISegmentSendCmdToUserFocus attribute for the segment.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSegmentedView:
- * The segmented view which owns the segment whose command you
- * wish to set.
- *
- * inSegmentIndexOneBased:
- * The one-based index of the segment whose command you wish to
- * set. This must be a non-zero value that is no higher than the
- * segmented view's current segment count.
- *
- * inCommand:
- * The command ID you wish to associate with the segment. A value
- * of zero signifies "no command".
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISegmentedViewSetSegmentCommand( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inCommand: UInt32 ): OSStatus; external name '_HISegmentedViewSetSegmentCommand';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HISegmentedViewGetSegmentCommand()
- *
- * Summary:
- * Get the command ID associated with the given segment.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSegmentedView:
- * The segmented view which owns the segment being queried.
- *
- * inSegmentIndexOneBased:
- * The one-based index of the segment to query. This must be a
- * non-zero value that is no higher than the segmented view's
- * current segment count.
- *
- * Result:
- * Returns the command ID associated with the segment. If you pass
- * an illegal segment index, the result is undefined.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISegmentedViewGetSegmentCommand( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): UInt32; external name '_HISegmentedViewGetSegmentCommand';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HISegmentedViewSetSegmentLabel()
- *
- * Summary:
- * Set the label string for the given segment. By default, a segment
- * has no label string.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSegmentedView:
- * The segmented view which owns the segment whose label you wish
- * to set.
- *
- * inSegmentIndexOneBased:
- * The one-based index of the segment whose label you wish to set.
- * This must be a non-zero value that is no higher than the
- * segmented view's current segment count.
- *
- * inLabel:
- * A CFStringRef with the text of the label. The segmented view
- * will copy the string passed in. You may pass NULL or an empty
- * CFStringRef if you wish to eliminate the label from the segment.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISegmentedViewSetSegmentLabel( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inLabel: CFStringRef ): OSStatus; external name '_HISegmentedViewSetSegmentLabel';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HISegmentedViewCopySegmentLabel()
- *
- * Summary:
- * Get the label associated with the given segment.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSegmentedView:
- * The segmented view which owns the segment being queried.
- *
- * inSegmentIndexOneBased:
- * The one-based index of the segment to query. This must be a
- * non-zero value that is no higher than the segmented view's
- * current segment count.
- *
- * outLabel:
- * On exit, outLabel will be a copy of the label associated with
- * the segment; you must release this string. If there is no label
- * associated with the segment, outLabel will be set to NULL.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISegmentedViewCopySegmentLabel( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; var outLabel: CFStringRef ): OSStatus; external name '_HISegmentedViewCopySegmentLabel';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HISegmentedViewSetSegmentContentWidth()
- *
- * Summary:
- * Sets whether you want the segment to automatically calculate its
- * own width or whether you want to determine the segment's width
- * manually. The content width is the horizontal area taken up by a
- * segment's label and/or image.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSegmentedView:
- * The segmented view which owns the segment whose content width
- * you wish to set.
- *
- * inSegmentIndexOneBased:
- * The one-based index of the segment whose content width you wish
- * to set. This must be a non-zero value that is no higher than
- * the segmented view's current segment count.
- *
- * inAutoCalculateWidth:
- * A Boolean indicating whether you want the segment to calculate
- * its own width. If you pass true, the inWidth parameter is
- * ignored.
- *
- * inWidth:
- * If you passed false in inAutoCalculateWidth, this parameter
- * specifies the width you want to manually associate with the
- * segment. If you pass a negative width, the behavior is
- * undefined.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISegmentedViewSetSegmentContentWidth( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; inAutoCalculateWidth: Boolean; inWidth: Float32 ): OSStatus; external name '_HISegmentedViewSetSegmentContentWidth';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HISegmentedViewGetSegmentContentWidth()
- *
- * Summary:
- * Get the content width of the given segment. This also optionall
- * passes back a Boolean indicating whether the width was
- * automatically calculated. The content width is the horizontal
- * area taken up by a segment's label and/or image.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSegmentedView:
- * The segmented view which owns the segment being queried.
- *
- * inSegmentIndexOneBased:
- * The one-based index of the segment to query. This must be a
- * non-zero value that is no higher than the segmented view's
- * current segment count.
- *
- * outAutoCalculated:
- * On exit, this is a Boolean indicating whether the width was
- * automatically calculated. You may pass NULL if you don't need
- * this information.
- *
- * Result:
- * Returns the width of the content for the given segment. If you
- * pass an illegal segment index, the result is undefined.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISegmentedViewGetSegmentContentWidth( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; outAutoCalculated: BooleanPtr { can be NULL } ): Float32; external name '_HISegmentedViewGetSegmentContentWidth';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HISegmentedViewSetSegmentImage()
- *
- * Summary:
- * Sets or clears the image associated with a given segment.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSegmentedView:
- * The segmented view which owns the segment whose image you wish
- * to set.
- *
- * inSegmentIndexOneBased:
- * The one-based index of the segment whose image you wish to set.
- * This must be a non-zero value that is no higher than the
- * segmented view's current segment count.
- *
- * inImage:
- * An HIViewImageContentInfo structure with the image information
- * for the given segment. Segments only support three types of
- * image content: kControlNoContent (no image),
- * kControlContentIconRef, and kControlContentCGImageRef.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISegmentedViewSetSegmentImage( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; const (*var*) inImage: HIViewImageContentInfo ): OSStatus; external name '_HISegmentedViewSetSegmentImage';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HISegmentedViewGetSegmentImageContentType()
- *
- * Summary:
- * Get the type of image content drawn by the given segment. You
- * will need to call this before calling
- * HISegmentedViewCopySegmentImage so you know what type of image
- * content to request from the latter API.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSegmentedView:
- * The segmented view which owns the segment being queried.
- *
- * inSegmentIndexOneBased:
- * The one-based index of the segment to query. This must be a
- * non-zero value that is no higher than the segmented view's
- * current segment count.
- *
- * Result:
- * Returns the image content type of the image drawn by the given
- * segment. If you pass an illegal segment index, the result is
- * undefined.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISegmentedViewGetSegmentImageContentType( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32 ): HIViewImageContentType; external name '_HISegmentedViewGetSegmentImageContentType';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {
- * HISegmentedViewCopySegmentImage()
- *
- * Summary:
- * Gives you a copy of the image (if any) drawn by the given
- * segment. You are responsible for releasing any image passed back
- * by this function. You request the image by asking for a
- * particular type of image. If the segment isn't using the
- * requested type of image, an error will be returned. If you wish
- * to know the actual type of image displayed by the segment, you
- * can call HISegmentedViewGetSegmentImageContentType.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * inSegmentedView:
- * The segmented view which owns the segment being queried.
- *
- * inSegmentIndexOneBased:
- * The one-based index of the segment to query. This must be a
- * non-zero value that is no higher than the segmented view's
- * current segment count.
- *
- * ioImage:
- * On entry, you must fill out the contentType field of this
- * structure with the type of image you desire. On exit, if that
- * type of image is used by the segment, the appropriate field of
- * the union will be filled in with a copy of the image. You are
- * responsible for releasing the image.
- *
- * Availability:
- * Mac OS X: in version 10.3 and later in Carbon.framework
- * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
- * Non-Carbon CFM: not available
- }
- function HISegmentedViewCopySegmentImage( inSegmentedView: HIViewRef; inSegmentIndexOneBased: UInt32; var ioImage: HIViewImageContentInfo ): OSStatus; external name '_HISegmentedViewCopySegmentImage';
- (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
- {==============================================================================}
- { Clock view events }
- {==============================================================================}
- const
- kEventClassClockView = $636C6F63 (* 'cloc' *);
- {
- * kEventClassClockView / kEventClockDateOrTimeChanged
- *
- * Summary:
- * Allows clients to determine when the user has changed the date or
- * time in the clock control.
- *
- * Discussion:
- * This event is sent by the clock control when the user has changed
- * the date or time. Clients could register for this notification in
- * order to update some state based on the date or time in the
- * clock, for instance. This event is sent to the view only, it will
- * not propagate. It is sent to all handlers installed on the
- * control.
- *
- * Mac OS X threading:
- * Not thread safe
- *
- * Parameters:
- *
- * --> kEventParamDirectObject (in, typeControlRef)
- * The view whose date has changed.
- *
- * Availability:
- * Mac OS X: in version 10.4 and later in Carbon.framework
- * CarbonLib: not available
- }
- const
- kEventClockDateOrTimeChanged = 1;
- end.
|