MacWindows.pas 405 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671
  1. {
  2. File: HIToolbox/MacWindows.h
  3. Contains: Window Manager Interfaces
  4. Version: HIToolbox-624~3
  5. Copyright: © 1997-2008 by Apple Inc., all rights reserved
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://bugs.freepascal.org
  9. }
  10. { Pascal Translation Updated: Peter N Lewis, <[email protected]>, August 2005 }
  11. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2009 }
  12. { Pascal Translation Updated: Gorazd Krosl, <[email protected]>, October 2009 }
  13. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2012 }
  14. {
  15. Modified for use with Free Pascal
  16. Version 308
  17. Please report any bugs to <[email protected]>
  18. }
  19. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  20. {$mode macpas}
  21. {$modeswitch cblocks}
  22. {$packenum 1}
  23. {$macro on}
  24. {$inline on}
  25. {$calling mwpascal}
  26. unit MacWindows;
  27. interface
  28. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  29. {$setc GAP_INTERFACES_VERSION := $0308}
  30. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  31. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  32. {$endc}
  33. {$ifc defined CPUPOWERPC and defined CPUI386}
  34. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  35. {$endc}
  36. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  37. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  38. {$endc}
  39. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  40. {$setc __ppc__ := 1}
  41. {$elsec}
  42. {$setc __ppc__ := 0}
  43. {$endc}
  44. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  45. {$setc __ppc64__ := 1}
  46. {$elsec}
  47. {$setc __ppc64__ := 0}
  48. {$endc}
  49. {$ifc not defined __i386__ and defined CPUI386}
  50. {$setc __i386__ := 1}
  51. {$elsec}
  52. {$setc __i386__ := 0}
  53. {$endc}
  54. {$ifc not defined __x86_64__ and defined CPUX86_64}
  55. {$setc __x86_64__ := 1}
  56. {$elsec}
  57. {$setc __x86_64__ := 0}
  58. {$endc}
  59. {$ifc not defined __arm__ and defined CPUARM}
  60. {$setc __arm__ := 1}
  61. {$elsec}
  62. {$setc __arm__ := 0}
  63. {$endc}
  64. {$ifc not defined __arm64__ and defined CPUAARCH64}
  65. {$setc __arm64__ := 1}
  66. {$elsec}
  67. {$setc __arm64__ := 0}
  68. {$endc}
  69. {$ifc defined cpu64}
  70. {$setc __LP64__ := 1}
  71. {$elsec}
  72. {$setc __LP64__ := 0}
  73. {$endc}
  74. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  75. {$error Conflicting definitions for __ppc__ and __i386__}
  76. {$endc}
  77. {$ifc defined __ppc__ and __ppc__}
  78. {$setc TARGET_CPU_PPC := TRUE}
  79. {$setc TARGET_CPU_PPC64 := FALSE}
  80. {$setc TARGET_CPU_X86 := FALSE}
  81. {$setc TARGET_CPU_X86_64 := FALSE}
  82. {$setc TARGET_CPU_ARM := FALSE}
  83. {$setc TARGET_CPU_ARM64 := FALSE}
  84. {$setc TARGET_OS_MAC := TRUE}
  85. {$setc TARGET_OS_IPHONE := FALSE}
  86. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  87. {$setc TARGET_OS_EMBEDDED := FALSE}
  88. {$elifc defined __ppc64__ and __ppc64__}
  89. {$setc TARGET_CPU_PPC := FALSE}
  90. {$setc TARGET_CPU_PPC64 := TRUE}
  91. {$setc TARGET_CPU_X86 := FALSE}
  92. {$setc TARGET_CPU_X86_64 := FALSE}
  93. {$setc TARGET_CPU_ARM := FALSE}
  94. {$setc TARGET_CPU_ARM64 := FALSE}
  95. {$setc TARGET_OS_MAC := TRUE}
  96. {$setc TARGET_OS_IPHONE := FALSE}
  97. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  98. {$setc TARGET_OS_EMBEDDED := FALSE}
  99. {$elifc defined __i386__ and __i386__}
  100. {$setc TARGET_CPU_PPC := FALSE}
  101. {$setc TARGET_CPU_PPC64 := FALSE}
  102. {$setc TARGET_CPU_X86 := TRUE}
  103. {$setc TARGET_CPU_X86_64 := FALSE}
  104. {$setc TARGET_CPU_ARM := FALSE}
  105. {$setc TARGET_CPU_ARM64 := FALSE}
  106. {$ifc defined iphonesim}
  107. {$setc TARGET_OS_MAC := FALSE}
  108. {$setc TARGET_OS_IPHONE := TRUE}
  109. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  110. {$elsec}
  111. {$setc TARGET_OS_MAC := TRUE}
  112. {$setc TARGET_OS_IPHONE := FALSE}
  113. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  114. {$endc}
  115. {$setc TARGET_OS_EMBEDDED := FALSE}
  116. {$elifc defined __x86_64__ and __x86_64__}
  117. {$setc TARGET_CPU_PPC := FALSE}
  118. {$setc TARGET_CPU_PPC64 := FALSE}
  119. {$setc TARGET_CPU_X86 := FALSE}
  120. {$setc TARGET_CPU_X86_64 := TRUE}
  121. {$setc TARGET_CPU_ARM := FALSE}
  122. {$setc TARGET_CPU_ARM64 := FALSE}
  123. {$ifc defined iphonesim}
  124. {$setc TARGET_OS_MAC := FALSE}
  125. {$setc TARGET_OS_IPHONE := TRUE}
  126. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  127. {$elsec}
  128. {$setc TARGET_OS_MAC := TRUE}
  129. {$setc TARGET_OS_IPHONE := FALSE}
  130. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  131. {$endc}
  132. {$setc TARGET_OS_EMBEDDED := FALSE}
  133. {$elifc defined __arm__ and __arm__}
  134. {$setc TARGET_CPU_PPC := FALSE}
  135. {$setc TARGET_CPU_PPC64 := FALSE}
  136. {$setc TARGET_CPU_X86 := FALSE}
  137. {$setc TARGET_CPU_X86_64 := FALSE}
  138. {$setc TARGET_CPU_ARM := TRUE}
  139. {$setc TARGET_CPU_ARM64 := FALSE}
  140. {$setc TARGET_OS_MAC := FALSE}
  141. {$setc TARGET_OS_IPHONE := TRUE}
  142. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  143. {$setc TARGET_OS_EMBEDDED := TRUE}
  144. {$elifc defined __arm64__ and __arm64__}
  145. {$setc TARGET_CPU_PPC := FALSE}
  146. {$setc TARGET_CPU_PPC64 := FALSE}
  147. {$setc TARGET_CPU_X86 := FALSE}
  148. {$setc TARGET_CPU_X86_64 := FALSE}
  149. {$setc TARGET_CPU_ARM := FALSE}
  150. {$setc TARGET_CPU_ARM64 := TRUE}
  151. {$ifc defined ios}
  152. {$setc TARGET_OS_MAC := FALSE}
  153. {$setc TARGET_OS_IPHONE := TRUE}
  154. {$setc TARGET_OS_EMBEDDED := TRUE}
  155. {$elsec}
  156. {$setc TARGET_OS_MAC := TRUE}
  157. {$setc TARGET_OS_IPHONE := FALSE}
  158. {$setc TARGET_OS_EMBEDDED := FALSE}
  159. {$endc}
  160. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  161. {$elsec}
  162. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
  163. {$endc}
  164. {$ifc defined __LP64__ and __LP64__ }
  165. {$setc TARGET_CPU_64 := TRUE}
  166. {$elsec}
  167. {$setc TARGET_CPU_64 := FALSE}
  168. {$endc}
  169. {$ifc defined FPC_BIG_ENDIAN}
  170. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  171. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  172. {$elifc defined FPC_LITTLE_ENDIAN}
  173. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  174. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  175. {$elsec}
  176. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  177. {$endc}
  178. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  179. {$setc CALL_NOT_IN_CARBON := FALSE}
  180. {$setc OLDROUTINENAMES := FALSE}
  181. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  182. {$setc OPAQUE_UPP_TYPES := TRUE}
  183. {$setc OTCARBONAPPLICATION := TRUE}
  184. {$setc OTKERNEL := FALSE}
  185. {$setc PM_USE_SESSION_APIS := TRUE}
  186. {$setc TARGET_API_MAC_CARBON := TRUE}
  187. {$setc TARGET_API_MAC_OS8 := FALSE}
  188. {$setc TARGET_API_MAC_OSX := TRUE}
  189. {$setc TARGET_CARBON := TRUE}
  190. {$setc TARGET_CPU_68K := FALSE}
  191. {$setc TARGET_CPU_MIPS := FALSE}
  192. {$setc TARGET_CPU_SPARC := FALSE}
  193. {$setc TARGET_OS_UNIX := FALSE}
  194. {$setc TARGET_OS_WIN32 := FALSE}
  195. {$setc TARGET_RT_MAC_68881 := FALSE}
  196. {$setc TARGET_RT_MAC_CFM := FALSE}
  197. {$setc TARGET_RT_MAC_MACHO := TRUE}
  198. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  199. {$setc TYPE_BOOL := FALSE}
  200. {$setc TYPE_EXTENDED := FALSE}
  201. {$setc TYPE_LONGLONG := TRUE}
  202. uses MacTypes,Files,Appearance,HIGeometry,HIObject,HIShape,HIToolbar,Aliases,Collections,Drag,Events,Menus,QDOffscreen,QuickdrawTypes,IconsCore,CFBase,CFArray,CGBase,CGColorSpace,CGContext,CGDirectDisplay,CGWindow,CGWindowLevels,CarbonEventsCore;
  203. {$endc} {not MACOSALLINCLUDE}
  204. {$ifc TARGET_OS_MAC}
  205. {$ALIGN MAC68K}
  206. { Current documentation for the Mac OS X Window Manager is available on the web: }
  207. { <http://developer.apple.com/documentation/Carbon/Reference/Window_Manager/index.html> }
  208. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  209. { ¥ HIWindowRef }
  210. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  211. type
  212. HIWindowRef = WindowRef;
  213. HIWindowRefPtr = ^HIWindowRef;
  214. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  215. { ¥ Property Types }
  216. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  217. type
  218. PropertyCreator = OSType;
  219. PropertyTag = OSType;
  220. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  221. { ¥ Window Classes }
  222. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  223. {
  224. * WindowClass
  225. *
  226. * Summary:
  227. * The types of windows provided by the Window Manager.
  228. *
  229. * Discussion:
  230. * The class of a window determines several aspects of the window:
  231. * its appearance, its initial window attributes, its initial window
  232. * group, and its initial modality. All of these except for the
  233. * window's appearance may be changed later using other Window
  234. * Manager APIs.
  235. }
  236. type
  237. WindowClass = UInt32;
  238. WindowClass_fix = WindowClass; { used as field type when a record declaration contains a WindowClass field identifier }
  239. const
  240. {
  241. * An alert window is used when the application needs the user's
  242. * attention immediately. On Mac OS 9 and earlier, a visible alert
  243. * window will prevent the user from switching to any other
  244. * application. Use kThemeBrushAlertBackgroundActive to draw the
  245. * background of alert windows.
  246. *
  247. * Alert windows support compositing mode in Mac OS X 10.5 and later.
  248. *
  249. *
  250. * Alert windows are initially placed in the modal window group,
  251. * given a modality of kWindowModalityAppModal, and given an
  252. * activation scope of kWindowActivationScopeAll. Available in Mac OS
  253. * 8.5 and later.
  254. }
  255. kAlertWindowClass = 1;
  256. {
  257. * Similar to kAlertWindowClass, but provides a window that is
  258. * movable and that allows switching to other applications. Generally
  259. * you should use this window class rather than kAlertWindowClass.
  260. * Use kThemeBrushAlertBackgroundActive to draw the background of
  261. * movable alert windows.
  262. *
  263. * Movable alert windows support compositing mode in Mac OS X 10.2
  264. * and later.
  265. *
  266. * Movable alert windows are initially placed in the modal window
  267. * group, given a modality of kWindowModalityAppModal, and given an
  268. * activation scope of kWindowActivationScopeAll. Available in Mac OS
  269. * 8.5 and later.
  270. }
  271. kMovableAlertWindowClass = 2;
  272. {
  273. * A modal window is used to display a dialog (but not an alert; use
  274. * kAlertWindowClass for alerts). On Mac OS 9 and earlier, a visible
  275. * modal window will prevent the user from switching to any other
  276. * application. Use kThemeBrushDialogBackgroundActive to draw the
  277. * background of modal windows.
  278. *
  279. * Modal windows support compositing mode in Mac OS X 10.5 and later.
  280. *
  281. *
  282. * Modal windows are initially placed in the modal window group,
  283. * given a modality of kWindowModalityAppModal, and given an
  284. * activation scope of kWindowActivationScopeAll. Available in Mac OS
  285. * 8.5 and later.
  286. }
  287. kModalWindowClass = 3;
  288. {
  289. * Similar to kModalWindowClass, but provides a window that is
  290. * movable and that allows switching to other applications. Generally
  291. * you should use this window class rather than kModalWindowClass. If
  292. * you are using CarbonLib 1.3 or later, or Mac OS X, use
  293. * kThemeBrushMovableModalBackground to draw the background of
  294. * movable modal windows; on earlier versions of CarbonLib, or for
  295. * non-Carbon programming, use kThemeBrushDialogBackgroundActive.
  296. *
  297. *
  298. * Movable modal windows support compositing mode in Mac OS X 10.2
  299. * and later.
  300. *
  301. * Movable modal windows are initially placed in the modal window
  302. * group, given a modality of kWindowModalityAppModal, and given an
  303. * activation scope of kWindowActivationScopeAll. Available in Mac OS
  304. * 8.5 and later.
  305. }
  306. kMovableModalWindowClass = 4;
  307. {
  308. * A floating window is layered above all application windows except
  309. * for alert and modal windows. It is commonly used for palette
  310. * windows, inspectors, and other accessory (non-document) windows.
  311. * Use kThemeBrushUtilityWindowBackgroundActive or
  312. * kThemeBrushDocumentWindowBackground to draw the background of
  313. * floating windows.
  314. *
  315. * Floating windows support compositing mode in Mac OS X 10.2 and
  316. * later.
  317. *
  318. * Floating windows are initially placed in the floating window
  319. * group, given a modality of kWindowModalityNone, and given an
  320. * activation scope of kWindowActivationScopeIndependent. Available
  321. * in Mac OS 8.6 and later.
  322. }
  323. kFloatingWindowClass = 5;
  324. {
  325. * A document window is used for normal application document windows.
  326. * Use kThemeBrushDocumentWindowBackground or your own custom drawing
  327. * to draw the background of a document window.
  328. *
  329. * Document windows support compositing mode in Mac OS X 10.2 and
  330. * later.
  331. *
  332. * Document windows are initially placed in the document window
  333. * group, given a modality of kWindowModalityNone, and given an
  334. * activation scope of kWindowActivationScopeAll. Available in Mac OS
  335. * 8.5 and later.
  336. }
  337. kDocumentWindowClass = 6;
  338. {
  339. * A utility window is similar to a floating window, but it floats
  340. * above the windows of all applications rather than just above the
  341. * windows of the application that creates it. Use
  342. * kThemeBrushUtilityWindowBackgroundActive or
  343. * kThemeBrushDocumentWindowBackground to draw the background of
  344. * utility windows.
  345. *
  346. * Utility windows support compositing mode in Mac OS X 10.2 and
  347. * later.
  348. *
  349. * Utility windows are initially placed in the utility window group,
  350. * given a modality of kWindowModalityNone, and given an activation
  351. * scope of kWindowActivationScopeIndependent. Available in CarbonLib
  352. * 1.1 and later, and in Mac OS X.
  353. }
  354. kUtilityWindowClass = 8;
  355. {
  356. * A help window is used to display help tags. It has no window
  357. * frame. Typically you should use the Help Manager to display help
  358. * tags, rather than creating a help tag window yourself.
  359. *
  360. * Help windows support compositing mode in Mac OS X 10.3 and later.
  361. *
  362. *
  363. * Help windows are initially placed in the help window group, given
  364. * a modality of kWindowModalityNone, and given an activation scope
  365. * of kWindowActivationScopeNone. Available in CarbonLib 1.1 and
  366. * later, and in Mac OS X.
  367. }
  368. kHelpWindowClass = 10;
  369. {
  370. * A sheet window is used to display a dialog that is attached
  371. * directly to its parent window, rather than being a independent
  372. * window. A sheet dialog only prevents interaction with its parent
  373. * window; the user may still interact with other windows in the same
  374. * application. Use kThemeBrushSheetBackgroundOpaque to draw an
  375. * opaque background for sheet windows, or
  376. * kThemeBrushSheetBackgroundTransparent to draw a transparent
  377. * background (the transparent brush is only available in Mac OS X
  378. * 10.1 and later).
  379. *
  380. * Sheet windows support compositing mode in Mac OS X 10.2 and later.
  381. *
  382. *
  383. * Sheet windows are initially placed in the document window group,
  384. * given a modality of kWindowModalityNone, and given an activation
  385. * scope of kWindowActivationScopeAll. Available in CarbonLib 1.3 and
  386. * later, and in Mac OS X; in CarbonLib, a sheet window is actually a
  387. * movable-modal window, which blocks user interaction with all
  388. * windows of the application.
  389. }
  390. kSheetWindowClass = 11;
  391. {
  392. * A toolbar window is used to display a palette of controls. It is
  393. * similar to a floating window, and like a floating window is
  394. * layered above all application windows except for alert and modal
  395. * windows, but is layered beneath floating windows. Use
  396. * kThemeBrushToolbarBackground to draw the background of a toolbar
  397. * window in Mac OS X or later; CarbonLib does not currently support
  398. * kThemeBrushToolbarBackground.
  399. *
  400. * Toolbar windows support compositing mode in Mac OS X 10.3 and
  401. * later.
  402. *
  403. * Toolbar windows are initially placed in the toolbar window group,
  404. * given a modality of kWindowModalityNone, and given an activation
  405. * scope of kWindowActivationScopeNone. Available in CarbonLib 1.1
  406. * and later, and Mac OS X.
  407. }
  408. kToolbarWindowClass = 12;
  409. {
  410. * A plain window has a single-pixel window frame.
  411. * kThemeBrushDocumentWindowBackground,
  412. * kThemeBrushDialogBackgroundActive, and application-specific custom
  413. * drawing are all commonly used to draw the background of a plain
  414. * window.
  415. *
  416. * Plain windows support compositing mode on Mac OS X 10.3 and later.
  417. *
  418. *
  419. * Plain windows are initially placed in the document window group,
  420. * given a modality of kWindowModalityNone, and given an activation
  421. * scope of kWindowActivationScopeAll. Available in CarbonLib 1.2.5
  422. * and later, and Mac OS X.
  423. }
  424. kPlainWindowClass = 13;
  425. {
  426. * An overlay window is a completely transparent window positioned
  427. * above all other windows. Overlay windows are intended as a
  428. * replacement for the pre-Carbon practice of drawing directly into
  429. * the window manager port; by creating a full-screen overlay window
  430. * and drawing into it, you can draw over any window in any
  431. * application without disturbing the contents of the windows
  432. * underneath your drawing.
  433. *
  434. * Overlay windows have a default handler for kEventWindowPaint that
  435. * uses CGContextClearRect to clear the overlay window's alpha
  436. * channel to zero. This ensures the initial transparency of the
  437. * window. You can install your own kEventWindowPaint handler to do
  438. * your own drawing; typically, you would call through to the default
  439. * handler with CallNextEventHandler first, and then use
  440. * QDBeginCGContext to create your own context for drawing. You can
  441. * use either QuickDraw or CoreGraphics to draw into an overlay
  442. * window, but you must use CoreGraphics to draw if you need any of
  443. * your drawing to be non-opaque, since QuickDraw always sets the
  444. * alpha channel of any pixels that it touches to 1.0.
  445. *
  446. * Overlay windows support compositing mode on Mac OS X 10.3 and
  447. * later. You should draw into a compositing overlay window by adding
  448. * a standard or custom HIView and implementing the kEventControlDraw
  449. * event for your view; do not use kEventWindowPaint.
  450. *
  451. * You can also use the standard window event handler together with
  452. * regular controls in an overlay window. When using the standard
  453. * window event handler, you will probably want your
  454. * kEventWindowPaint handler to return eventNotHandledErr (after
  455. * calling the default handler with CallNextEventHandler first) so
  456. * that after the Paint handler returns, the Window Manager will send
  457. * a kEventWindowDrawContent event which the standard window event
  458. * handler can respond to by drawing the controls in the window.
  459. *
  460. *
  461. * Overlay windows are initially placed in the overlay window group,
  462. * given a modality of kWindowModalityNone, and given an activation
  463. * scope of kWindowActivationScopeNone. Available in Mac OS X.
  464. }
  465. kOverlayWindowClass = 14;
  466. {
  467. * A sheet alert window is similar to a sheet window, but is intended
  468. * to display an alert rather than a dialog. On Mac OS X, the
  469. * appearance of a sheet window and a sheet alert window is currently
  470. * identical, but in CarbonLib a sheet alert window has a different
  471. * appearance from a sheet window. Use
  472. * kThemeBrushSheetBackgroundOpaque to draw an opaque background for
  473. * sheet alert windows, or kThemeBrushSheetBackgroundTransparent to
  474. * draw a transparent background (the transparent brush is only
  475. * available in Mac OS X 10.1 and later).
  476. *
  477. * Sheet alert windows support compositing mode in Mac OS X 10.2 and
  478. * later.
  479. *
  480. * Sheet alert windows are initially placed in the document window
  481. * group, given a modality of kWindowModalityNone, and given an
  482. * activation scope of kWindowActivationScopeAll. Available in
  483. * CarbonLib 1.3 and later, and in Mac OS X 10.1 and later; in
  484. * CarbonLib, a sheet alert window is actually a movable alert
  485. * window, which blocks user interaction with all windows of the
  486. * application.
  487. }
  488. kSheetAlertWindowClass = 15;
  489. {
  490. * A alternate plain window is similar to a plain window but has a
  491. * solid black shadow on its right and bottom sides. It is rarely
  492. * used in modern Mac OS applications.
  493. * kThemeBrushDocumentWindowBackground,
  494. * kThemeBrushDialogBackgroundActive, and application-specific custom
  495. * drawing are all commonly used to draw the background of an
  496. * alternate plain window.
  497. *
  498. * Alternate plain windows support compositing mode in Mac OS X 10.5
  499. * and later.
  500. *
  501. * Alternate plain windows are initially placed in the document
  502. * window group, given a modality of kWindowModalityNone, and given
  503. * an activation scope of kWindowActivationScopeAll. Available in
  504. * CarbonLib 1.3 and later, and Mac OS X 10.1 and later.
  505. }
  506. kAltPlainWindowClass = 16;
  507. {
  508. * A simple window is the simplest possible window; it has no window
  509. * frame and its entire content is drawn by the application. Use any
  510. * theme brush or your own custom drawing to draw the background of a
  511. * simple window.
  512. *
  513. * Simple windows support compositing mode in Mac OS X 10.3 and
  514. * later.
  515. *
  516. * Simple windows are initially placed in the document window group,
  517. * given a modality of kWindowModalityNone, and given an activation
  518. * scope of kWindowActivationScopeAll. Available in CarbonLib 1.5 and
  519. * later, and Mac OS X 10.1 and later.
  520. }
  521. kSimpleWindowClass = 18;
  522. {
  523. * A drawer window is used when implementing a drawer user interface,
  524. * in which the drawer window slides out from underneath a document
  525. * window. Use kThemeBrushDrawerBackground or
  526. * kThemeBrushDocumentWindowBackground to draw the background of
  527. * drawer windows.
  528. *
  529. * Drawer windows must always use compositing mode.
  530. *
  531. * Drawer windows are initially placed in the document window group,
  532. * given a modality of kWindowModalityNone, and given an activation
  533. * scope of kWindowActivationScopeAll. Drawer windows must always be
  534. * created using the Compositing window attribute. Available in Mac
  535. * OS X 10.2 or later.
  536. }
  537. kDrawerWindowClass = 20;
  538. {
  539. * Not an actual window class, but a meta-constant that is used with
  540. * GetFrontWindowOfClass, FindWindowOfClass, and GetNextWindowOfClass
  541. * to indicate that there should be no restriction on the class of
  542. * the returned window. Also used with GetWindowGroupOfClass to get
  543. * the root window group.
  544. }
  545. kAllWindowClasses = $FFFFFFFF;
  546. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  547. { ¥ Window Attributes }
  548. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  549. {
  550. * Summary:
  551. * Window attribute bits.
  552. }
  553. const
  554. {
  555. * This window has a close box. Available for windows of
  556. * kDocumentWindowClass, kFloatingWindowClass, and
  557. * kUtilityWindowClass; in Mac OS X 10.5 and later, also available
  558. * for windows of kMovableModalWindowClass.
  559. }
  560. kHIWindowBitCloseBox = 1;
  561. {
  562. * This window has a zoom box. Available for windows of
  563. * kDocumentWindowClass, kFloatingWindowClass, and
  564. * kUtilityWindowClass; in Mac OS X 10.5 and later, also available
  565. * for windows of kMovableModalWindowClass. Note that when this
  566. * attribute is set on a window, both the
  567. * kWindowHorizontalZoomAttribute and kWindowVerticalZoomAttribute
  568. * bits are set automatically.
  569. }
  570. kHIWindowBitZoomBox = 2;
  571. {
  572. * This window has a collapse box. Available for windows of
  573. * kDocumentWindowClass, kFloatingWindowClass, and
  574. * kUtilityWindowClass. For Floating and Utility window classes on
  575. * Mac OS X, this attribute must be added to the window using
  576. * ChangeWindowAttributes after the window is created; it may not be
  577. * added to the window at creation time.
  578. }
  579. kHIWindowBitCollapseBox = 4;
  580. {
  581. * This window can be resized. Available for windows of
  582. * kDocumentWindowClass, kMovableModalWindowClass,
  583. * kFloatingWindowClass, kUtilityWindowClass, and kSheetWindowClass.
  584. }
  585. kHIWindowBitResizable = 5;
  586. {
  587. * This window has a vertical titlebar on the side of the window.
  588. * Available for windows of kFloatingWindowClass and
  589. * kUtilityWindowClass.
  590. }
  591. kHIWindowBitSideTitlebar = 6;
  592. {
  593. * This window has a toolbar button. Available for windows of
  594. * kDocumentWindowClass on Mac OS X.
  595. }
  596. kHIWindowBitToolbarButton = 7;
  597. {
  598. * This window draws its window title and toolbar using a unified
  599. * appearance that has no separator between the two areas. A window
  600. * may not have both kHIWindowBitUnifiedTitleAndToolbar and
  601. * kHIWindowBitTextured. If a window already has the Textured
  602. * attribute, attempting to set the Unified attribute will cause
  603. * ChangeWindowAttributes to return an error, and vice versa. This
  604. * constant was not added to this header file until Mac OS X 10.5,
  605. * but it is actually available at runtime on Mac OS X 10.4 and later
  606. * for windows of kDocumentWindowClass. However, on Mac OS X 10.5 and
  607. * later, kHIWindowBitUnifiedTitleAndToolbar no longer has any
  608. * effect, since all windows with toolbars now have a unified look.
  609. }
  610. kHIWindowBitUnifiedTitleAndToolbar = 8;
  611. {
  612. * This window uses the Textured appearance. Available for document
  613. * windows on Mac OS X 10.2 and later, and for floating windows on
  614. * Mac OS X 10.3 and later. Drawers can also be textured, but
  615. * dynamically adjust their appearance based on their parent window's
  616. * appearance; it is not necessary to specify this attribute for a
  617. * textured drawer.
  618. }
  619. kHIWindowBitTextured = 9;
  620. {
  621. * For Document, Floating, and Utility windows, this attribute allows
  622. * you to hide the title bar of a window. Available in Mac OS X 10.4
  623. * and later.
  624. }
  625. kHIWindowBitNoTitleBar = 10;
  626. {
  627. * Indicates that a textured window should have square corners. By
  628. * default, a textured window has round corners. When this attribute
  629. * is set on a window, the window frame view automatically makes the
  630. * grow box view opaque, and when this attribute is cleared, the
  631. * window frame view automatically makes the grow box view
  632. * transparent. You can change the grow box view transparency after
  633. * modifying this attribute with HIGrowBoxViewSetTransparent.
  634. * Relevant only for textured windows; ignored in non-textured
  635. * windows. Available in Mac OS X 10.5 and later for window classes
  636. * that support the textured appearance.
  637. }
  638. kHIWindowBitTexturedSquareCorners = 11;
  639. {
  640. * Indicates that no border should be drawn between the toolbar and
  641. * window content. Relevant only in textured windows. Ignored in
  642. * non-textured windows. Available in Mac OS X 10.4 and later for
  643. * window classes that support the textured appearance.
  644. }
  645. kHIWindowBitNoTexturedContentSeparator = 12;
  646. {
  647. * Indicates that this window will have rounded bottom corners. By
  648. * default, a window has squared corners, and the assertion of this
  649. * bit turns on rounded bottom corners for the window if the window
  650. * has a bottom bar (set with HIWindowSetContentBorderThickness). If
  651. * the window does not have a bottom bar, this bit is ignored. If the
  652. * window has the kHIWindowBitTextured attribute set, the
  653. * kHIWindowBitRoundBottomBarCorners attribute will be ignored, as
  654. * that type of window defaults to rounded corners and controls the
  655. * squareness with the kHIWindowBitTexturedSquareCorners attribute.
  656. }
  657. kHIWindowBitRoundBottomBarCorners = 13;
  658. {
  659. * This window does not participate in window cycling invoked by
  660. * cmd-~ or the "Focus on Window" hotkey defined in the Keyboards
  661. * preference pane. Available for all windows on Mac OS X 10.2 and
  662. * later.
  663. }
  664. kHIWindowBitDoesNotCycle = 16;
  665. {
  666. * This window receives no update events. Available for all windows.
  667. }
  668. kHIWindowBitNoUpdates = 17;
  669. {
  670. * This window receives no activate events. Available for all windows.
  671. }
  672. kHIWindowBitNoActivates = 18;
  673. {
  674. * This window receives mouse events even for areas of the window
  675. * that are transparent (have an alpha channel component of zero).
  676. * Available for windows of kOverlayWindowClass on Mac OS X 10.0 and
  677. * 10.1, and available for all windows on Mac OS X 10.2 and later.
  678. }
  679. kHIWindowBitOpaqueForEvents = 19;
  680. {
  681. * This window uses composited drawing. This means that the entire
  682. * window is comprised of HIViews, and can be treated thusly. This
  683. * attribute must be specified at window creation, and cannot be
  684. * changed later with ChangeWindowAttributes. Available on Mac OS X
  685. * 10.2 and later.
  686. }
  687. kHIWindowBitCompositing = 20;
  688. {
  689. * This window's backing store can be scaled as necessary for high
  690. * resolution drawing. This attribute is only consulted/respected if
  691. * the app's Info.plist includes NSHighResolutionCapable with a value
  692. * of true. This attribute can only be used when
  693. * kHIWindowBitCompositing is also enabled for the window. When this
  694. * attribute is enabled, you may not draw with QuickDraw in the
  695. * window. You may only specify this attribute at window creation
  696. * time. Available for all windows in 10.7.4 and later.
  697. }
  698. kHIWindowBitHighResolutionCapable = 21;
  699. {
  700. * This window has no shadow. Available for all windows on Mac OS X.
  701. * This attribute is automatically given to windows of
  702. * kOverlayWindowClass.
  703. }
  704. kHIWindowBitNoShadow = 22;
  705. {
  706. * This window can be made visible prior to user login. By default,
  707. * in Mac OS X 10.5 and later no windows can be visible before a user
  708. * logs into the system; this protects the user against certain types
  709. * of malicious use of insecure applications. However, some software,
  710. * such as input methods or other accessibility software, may need to
  711. * deliberately make windows available prior to user login. Such
  712. * software should add this window attribute to its windows.
  713. * Available for all windows in Mac OS X 10.5 and later.
  714. }
  715. kHIWindowBitCanBeVisibleWithoutLogin = 23;
  716. {
  717. * This window is marked so that the window server will drag the
  718. * window automatically. Your application should not call DragWindow
  719. * for this window, else it would confuse the heck out of the drag
  720. * (it would fight with the window server for control). This
  721. * attribute is ignored (async drag is not used) if your window is
  722. * grouped with other windows in a window group that has the
  723. * kWindowGroupAttrMoveTogether attribute. Available for all windows
  724. * on Mac OS X 10.3 and later.
  725. }
  726. kHIWindowBitAsyncDrag = 24;
  727. {
  728. * This window is automatically hidden on suspend and shown on
  729. * resume. Available for all windows. This attribute is automatically
  730. * given to windows of kFloatingWindowClass, kHelpWindowClass, and
  731. * kToolbarWindowClass.
  732. }
  733. kHIWindowBitHideOnSuspend = 25;
  734. {
  735. * This window has the standard Carbon window event handler
  736. * installed. Available for all windows.
  737. }
  738. kHIWindowBitStandardHandler = 26;
  739. {
  740. * This window is automatically hidden during fullscreen mode (when
  741. * the menubar is invisible) and shown afterwards. Available for all
  742. * windows. This attribute is automatically given to windows of
  743. * kUtilityWindowClass.
  744. }
  745. kHIWindowBitHideOnFullScreen = 27;
  746. {
  747. * This window is added to the standard Window menu. Available for
  748. * windows of kDocumentWindowClass. This attribute is automatically
  749. * given to windows of kDocumentWindowClass.
  750. }
  751. kHIWindowBitInWindowMenu = 28;
  752. {
  753. * This window supports live resizing. Available for all windows on
  754. * Mac OS X.
  755. }
  756. kHIWindowBitLiveResize = 29;
  757. {
  758. * This window never receives mouse events, even in areas that are
  759. * opaque. Instead, clicks on the window will be passed through to
  760. * windows beneath it. Available for all windows on Mac OS X 10.2 and
  761. * later.
  762. }
  763. kHIWindowBitIgnoreClicks = 30;
  764. {
  765. * This window will not be repositioned by the default
  766. * kEventWindowConstrain handler in response to changes in monitor
  767. * size, Dock position, and so on. Available for all windows on Mac
  768. * OS X 10.1 and later, and CarbonLib 1.6 and later.
  769. }
  770. kHIWindowBitNoConstrain = 32;
  771. {
  772. * Indicates that this window does not hide when the application is
  773. * hidden. Available for all windows in Mac OS X 10.5 and later. This
  774. * attribute is automatically given to windows of kUtilityWindowClass.
  775. }
  776. kHIWindowBitDoesNotHide = 33;
  777. {
  778. * Indicates that this window automatically installs Drag Manager
  779. * callbacks to detect drag actions, and automatically sends HIView
  780. * drag Carbon events. Setting this attribute is equivalent to
  781. * calling the SetAutomaticControlDragTrackingEnabledForWindow API
  782. * (and calling that API will now set this attribute). Available for
  783. * all windows in Mac OS X 10.5 and later.
  784. }
  785. kHIWindowBitAutoViewDragTracking = 34;
  786. {
  787. * Indicates that this window automatically updates its ColorSync
  788. * profile to the profile of the display containing the greatest area
  789. * of the window. After the profile is set,
  790. * kEventWindowColorSpaceChanged is sent to the window. The standard
  791. * window handler's response is to repaint the entire window.
  792. * Available for all windows in Mac OS X 10.6 and later. This
  793. * attribute is automatically given to all compositing windows.
  794. }
  795. kHIWindowBitAutoCalibration = 36;
  796. {
  797. * Indicates that this window can become fullscreen, and causes the
  798. * enter fullscreen title bar button to be added to the window's
  799. * title bar. Including this bit on a window causes HIToolbox to add
  800. * appropriate Enter/Exit Full Screen menu items to the app's menus,
  801. * which HIToolbox will update appropriately. Only supported for
  802. * windows of kDocumentWindowClass. Available in Mac OS X 10.7 and
  803. * later.
  804. }
  805. kHIWindowBitFullScreenPrimary = 45;
  806. {
  807. * Indicates that this window can coexist on a fullscreen space with
  808. * a fullscreen window of another application, but is not capable of
  809. * becoming fullscreen itself.
  810. * This window attribute is used in conjunction with the
  811. * kHIWindowCanJoinAllSpaces Availability option to allow the window
  812. * to move across FullScreen workspaces. For applications that are
  813. * BackgroundOnly or UIElements, this is the default behavior when
  814. * kHIWindowCanJoinAllSpaces is also set. For other applications,
  815. * kHIWindowBitFullScreenAuxiliary must be specified, and is
  816. * supported for window classes including kUtilityWindowClass, and
  817. * kFloatingWindowClass with a WindowActivationScope of
  818. * kWindowActivationScopeIndependent or kWindowActivationScopeNone.
  819. * Available in Mac OS X 10.7 and later.
  820. }
  821. kHIWindowBitFullScreenAuxiliary = 46;
  822. {
  823. * Summary:
  824. * Window attributes as bitmasks. In Mac OS X 10.5 and later,
  825. * kHIWindowBit constants are preferred.
  826. *
  827. * Discussion:
  828. * Note that the kWindowApplicationScaledAttribute constant provided
  829. * in Mac OS X 10.4 has been removed in Mac OS X 10.5 and later.
  830. * Application-scaled mode was never fully implemented and all
  831. * support for it has been removed from HIToolbox in Mac OS X 10.5.
  832. }
  833. const
  834. {
  835. * A constant with value zero; the lack of any attributes.
  836. }
  837. kWindowNoAttributes = 0;
  838. {
  839. * See kHIWindowBitCloseBox.
  840. }
  841. kWindowCloseBoxAttribute = (1 shl (kHIWindowBitCloseBox - 1));
  842. {
  843. * See kHIWindowBitZoomBox.
  844. }
  845. kWindowHorizontalZoomAttribute = (1 shl (kHIWindowBitZoomBox - 1));
  846. {
  847. * See kHIWindowBitZoomBox.
  848. }
  849. kWindowVerticalZoomAttribute = 1 shl kHIWindowBitZoomBox;
  850. {
  851. * See kHIWindowBitZoomBox.
  852. }
  853. kWindowFullZoomAttribute = kWindowVerticalZoomAttribute or kWindowHorizontalZoomAttribute;
  854. {
  855. * See kHIWindowBitCollapseBox.
  856. }
  857. kWindowCollapseBoxAttribute = (1 shl (kHIWindowBitCollapseBox - 1));
  858. {
  859. * See kHIWindowBitResizable.
  860. }
  861. kWindowResizableAttribute = (1 shl (kHIWindowBitResizable - 1));
  862. {
  863. * See kHIWindowBitSideTitlebar.
  864. }
  865. kWindowSideTitlebarAttribute = (1 shl (kHIWindowBitSideTitlebar - 1));
  866. {
  867. * See kHIWindowBitToolbarButton.
  868. }
  869. kWindowToolbarButtonAttribute = (1 shl (kHIWindowBitToolbarButton - 1));
  870. {
  871. * See kHIWindowBitUnifiedTitleAndToolbar.
  872. }
  873. kWindowUnifiedTitleAndToolbarAttribute = (1 shl (kHIWindowBitUnifiedTitleAndToolbar - 1));
  874. {
  875. * See kHIWindowBitTextured.
  876. }
  877. kWindowMetalAttribute = (1 shl (kHIWindowBitTextured - 1));
  878. {
  879. * See kHIWindowBitNoTitleBar.
  880. }
  881. kWindowNoTitleBarAttribute = (1 shl (kHIWindowBitNoTitleBar - 1));
  882. {
  883. * See kHIWindowBitTexturedSquareCorners.
  884. }
  885. kWindowTexturedSquareCornersAttribute = (1 shl (kHIWindowBitTexturedSquareCorners - 1));
  886. {
  887. * See kHIWindowBitNoTexturedContentSeparator.
  888. }
  889. kWindowMetalNoContentSeparatorAttribute = (1 shl (kHIWindowBitNoTexturedContentSeparator - 1));
  890. kWindowHasRoundBottomBarCornersAttribute = (1 shl (kHIWindowBitRoundBottomBarCorners - 1));
  891. {
  892. * See kHIWindowBitDoesNotCycle.
  893. }
  894. kWindowDoesNotCycleAttribute = (1 shl (kHIWindowBitDoesNotCycle - 1));
  895. {
  896. * See kHIWindowBitNoUpdates.
  897. }
  898. kWindowNoUpdatesAttribute = (1 shl (kHIWindowBitNoUpdates - 1));
  899. {
  900. * See kHIWindowBitNoActivates.
  901. }
  902. kWindowNoActivatesAttribute = (1 shl (kHIWindowBitNoActivates - 1));
  903. {
  904. * See kHIWindowBitOpaqueForEvents.
  905. }
  906. kWindowOpaqueForEventsAttribute = (1 shl (kHIWindowBitOpaqueForEvents - 1));
  907. {
  908. * See kHIWindowBitCompositing.
  909. }
  910. kWindowCompositingAttribute = (1 shl (kHIWindowBitCompositing - 1));
  911. {
  912. * See kHIWindowBitNoShadow.
  913. }
  914. kWindowNoShadowAttribute = (1 shl (kHIWindowBitNoShadow - 1));
  915. {
  916. * See kHIWindowBitCanBeVisibleWithoutLogin.
  917. }
  918. kWindowCanBeVisibleWithoutLoginAttribute = (1 shl (kHIWindowBitCanBeVisibleWithoutLogin - 1));
  919. {
  920. * See kHIWindowBitHideOnSuspend.
  921. }
  922. kWindowHideOnSuspendAttribute = (1 shl (kHIWindowBitHideOnSuspend - 1));
  923. {
  924. * See kHIWindowBitAsyncDrag.
  925. }
  926. kWindowAsyncDragAttribute = (1 shl (kHIWindowBitAsyncDrag - 1));
  927. {
  928. * See kHIWindowBitStandardHandler.
  929. }
  930. kWindowStandardHandlerAttribute = (1 shl (kHIWindowBitStandardHandler - 1));
  931. {
  932. * See kHIWindowBitHideOnFullScreen.
  933. }
  934. kWindowHideOnFullScreenAttribute = (1 shl (kHIWindowBitHideOnFullScreen - 1));
  935. {
  936. * See kHIWindowBitInWindowMenu.
  937. }
  938. kWindowInWindowMenuAttribute = (1 shl (kHIWindowBitInWindowMenu - 1));
  939. {
  940. * See kHIWindowBitLiveResize.
  941. }
  942. kWindowLiveResizeAttribute = (1 shl (kHIWindowBitLiveResize - 1));
  943. {
  944. * See kHIWindowBitIgnoreClicks.
  945. }
  946. kWindowIgnoreClicksAttribute = (1 shl (kHIWindowBitIgnoreClicks - 1));
  947. {
  948. * See kHIWindowBitHighResolutionCapable.
  949. }
  950. kWindowHighResolutionCapableAttribute = (1 shl (kHIWindowBitHighResolutionCapable - 1));
  951. {
  952. * The minimum set of window attributes commonly used by document
  953. * windows.
  954. }
  955. kWindowStandardDocumentAttributes = kWindowCloseBoxAttribute or kWindowFullZoomAttribute or kWindowCollapseBoxAttribute or kWindowResizableAttribute;
  956. {
  957. * The minimum set of window attributes commonly used by floating
  958. * windows.
  959. }
  960. kWindowStandardFloatingAttributes = kWindowCloseBoxAttribute or kWindowCollapseBoxAttribute;
  961. const
  962. {
  963. * See kHIWindowBitNoConstrain.
  964. }
  965. kWindowNoConstrainAttribute = $80000000; // force unsigned by specifying the constant explicitly
  966. type
  967. WindowAttributes = OptionBits;
  968. WindowAttributes_fix = WindowAttributes; { used as field type when a record declaration contains a WindowAttributes field identifier }
  969. {
  970. * Summary:
  971. * DEPRECATED Window attribute bits.
  972. }
  973. const
  974. {
  975. * DEPRECATED name and functionality. Replaced conceptually by
  976. * kHIWindowBitHighResolutionCapable.
  977. }
  978. kHIWindowBitFrameworkScaled = kHIWindowBitHighResolutionCapable;
  979. {
  980. * Summary:
  981. * DEPRECATED Window attribute bitmasks.
  982. }
  983. const
  984. {
  985. * DEPRECATED name and functionality. Replaced conceptually by
  986. * kWindowHighResolutionCapableAttribute.
  987. }
  988. kWindowFrameworkScaledAttribute = kWindowHighResolutionCapableAttribute;
  989. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  990. { ¥ Window Definition Type }
  991. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  992. const
  993. kWindowDefProcType = FourCharCode('WDEF');
  994. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  995. { ¥ Mac OS 7.5 Window Definition Resource IDs }
  996. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  997. const
  998. kStandardWindowDefinition = 0; { for document windows and dialogs}
  999. kRoundWindowDefinition = 1; { old Desk Accessory-style window}
  1000. kFloatingWindowDefinition = 124; { for floating windows}
  1001. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1002. { ¥ Variant Codes }
  1003. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1004. const
  1005. { for use with kStandardWindowDefinition }
  1006. kDocumentWindowVariantCode = 0;
  1007. kModalDialogVariantCode = 1;
  1008. kPlainDialogVariantCode = 2;
  1009. kShadowDialogVariantCode = 3;
  1010. kMovableModalDialogVariantCode = 5;
  1011. kAlertVariantCode = 7;
  1012. kMovableAlertVariantCode = 9; { for use with kFloatingWindowDefinition }
  1013. kSideFloaterVariantCode = 8;
  1014. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1015. { ¥ DefProc IDs }
  1016. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1017. const
  1018. { classic ids }
  1019. documentProc = 0;
  1020. dBoxProc = 1;
  1021. plainDBox = 2;
  1022. altDBoxProc = 3;
  1023. noGrowDocProc = 4;
  1024. movableDBoxProc = 5;
  1025. zoomDocProc = 8;
  1026. zoomNoGrow = 12; { floating window defproc ids }
  1027. floatProc = 1985;
  1028. floatGrowProc = 1987;
  1029. floatZoomProc = 1989;
  1030. floatZoomGrowProc = 1991;
  1031. floatSideProc = 1993;
  1032. floatSideGrowProc = 1995;
  1033. floatSideZoomProc = 1997;
  1034. floatSideZoomGrowProc = 1999;
  1035. const
  1036. { Resource IDs for theme-savvy window defprocs }
  1037. kWindowDocumentDefProcResID = 64;
  1038. kWindowDialogDefProcResID = 65;
  1039. kWindowUtilityDefProcResID = 66;
  1040. kWindowUtilitySideTitleDefProcResID = 67;
  1041. kWindowSheetDefProcResID = 68;
  1042. kWindowSimpleDefProcResID = 69;
  1043. kWindowSheetAlertDefProcResID = 70;
  1044. const
  1045. { Proc IDs for theme-savvy windows }
  1046. kWindowDocumentProc = 1024;
  1047. kWindowGrowDocumentProc = 1025;
  1048. kWindowVertZoomDocumentProc = 1026;
  1049. kWindowVertZoomGrowDocumentProc = 1027;
  1050. kWindowHorizZoomDocumentProc = 1028;
  1051. kWindowHorizZoomGrowDocumentProc = 1029;
  1052. kWindowFullZoomDocumentProc = 1030;
  1053. kWindowFullZoomGrowDocumentProc = 1031;
  1054. const
  1055. { Proc IDs for theme-savvy dialogs }
  1056. kWindowPlainDialogProc = 1040;
  1057. kWindowShadowDialogProc = 1041;
  1058. kWindowModalDialogProc = 1042;
  1059. kWindowMovableModalDialogProc = 1043;
  1060. kWindowAlertProc = 1044;
  1061. kWindowMovableAlertProc = 1045;
  1062. const
  1063. { procIDs available from Mac OS 8.1 (Appearance 1.0.1) forward }
  1064. kWindowMovableModalGrowProc = 1046;
  1065. const
  1066. { Proc IDs for top title bar theme-savvy floating windows }
  1067. kWindowFloatProc = 1057;
  1068. kWindowFloatGrowProc = 1059;
  1069. kWindowFloatVertZoomProc = 1061;
  1070. kWindowFloatVertZoomGrowProc = 1063;
  1071. kWindowFloatHorizZoomProc = 1065;
  1072. kWindowFloatHorizZoomGrowProc = 1067;
  1073. kWindowFloatFullZoomProc = 1069;
  1074. kWindowFloatFullZoomGrowProc = 1071;
  1075. const
  1076. { Proc IDs for side title bar theme-savvy floating windows }
  1077. kWindowFloatSideProc = 1073;
  1078. kWindowFloatSideGrowProc = 1075;
  1079. kWindowFloatSideVertZoomProc = 1077;
  1080. kWindowFloatSideVertZoomGrowProc = 1079;
  1081. kWindowFloatSideHorizZoomProc = 1081;
  1082. kWindowFloatSideHorizZoomGrowProc = 1083;
  1083. kWindowFloatSideFullZoomProc = 1085;
  1084. kWindowFloatSideFullZoomGrowProc = 1087;
  1085. const
  1086. { Proc IDs for sheet windows }
  1087. kWindowSheetProc = 1088; { available in Mac OS X and CarbonLib 1.3 }
  1088. kWindowSheetAlertProc = 1120; { available in Mac OS X 10.1 and CarbonLib 1.3 }
  1089. {
  1090. * Discussion:
  1091. * Window defproc IDs for simple windows
  1092. }
  1093. const
  1094. { Proc IDs for simple windows }
  1095. {
  1096. * A window that has no structure region; the content covers the
  1097. * entire window.
  1098. }
  1099. kWindowSimpleProc = 1104;
  1100. {
  1101. * A window that has a 1-pixel black frame as its structure.
  1102. }
  1103. kWindowSimpleFrameProc = 1105;
  1104. {
  1105. * Discussion:
  1106. * More window defproc IDs.
  1107. }
  1108. const
  1109. {
  1110. * Window defproc ID for overlay-class windows.
  1111. }
  1112. kWindowOverlayProc = 1136;
  1113. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1114. { ¥ System 7 Window Positioning Constants }
  1115. { Passed into StandardAlert and used in ÔWINDÕ, ÔDLOGÕ, and ÔALRTÕ templates }
  1116. { StandardAlert uses zero to specify the default position. Other calls use zero to }
  1117. { specify Òno positionÓ. Do not pass these constants to RepositionWindow. Do not }
  1118. { store these constants in the BasicWindowDescription of a ÔwindÕ resource. }
  1119. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1120. const
  1121. kWindowNoPosition = $0000;
  1122. kWindowDefaultPosition = $0000; { used by StandardAlert}
  1123. kWindowCenterMainScreen = $280A;
  1124. kWindowAlertPositionMainScreen = $300A;
  1125. kWindowStaggerMainScreen = $380A;
  1126. kWindowCenterParentWindow = $A80A;
  1127. kWindowAlertPositionParentWindow = $B00A;
  1128. kWindowStaggerParentWindow = $B80A;
  1129. kWindowCenterParentWindowScreen = $680A;
  1130. kWindowAlertPositionParentWindowScreen = $700A;
  1131. kWindowStaggerParentWindowScreen = $780A;
  1132. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1133. { ¥ Window Positioning Methods }
  1134. { Positioning methods passed to RepositionWindow. }
  1135. { Do not use them in WIND, ALRT, DLOG templates. }
  1136. { Do not confuse these constants with the constants above }
  1137. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1138. {
  1139. * WindowPositionMethod
  1140. *
  1141. * Summary:
  1142. * Positioning methods usable with RepositionWindow.
  1143. *
  1144. * Discussion:
  1145. * These constants are for use solely with the RepositionWindow API.
  1146. * They should not be used in 'WIND', 'ALRT', or 'DLOG' resources.
  1147. }
  1148. type
  1149. WindowPositionMethod = UInt32;
  1150. WindowPositionMethod_fix = WindowPositionMethod; { used as field type when a record declaration contains a WindowPositionMethod field identifier }
  1151. const
  1152. {
  1153. * Centers the window on the main screen.
  1154. }
  1155. kWindowCenterOnMainScreen = 1;
  1156. {
  1157. * Centers the window on its parent window. The parent window must be
  1158. * different from the positioned window.
  1159. }
  1160. kWindowCenterOnParentWindow = 2;
  1161. {
  1162. * Centers the window on the screen containing the largest portion of
  1163. * its parent window. On Mac OS X 10.3 and later, the parent window
  1164. * may be the same as the positioned window. On CarbonLib and earlier
  1165. * versions of Mac OS X, the parent window must be different from the
  1166. * positioned window.
  1167. }
  1168. kWindowCenterOnParentWindowScreen = 3;
  1169. {
  1170. * Cascades the window on the main screen.
  1171. }
  1172. kWindowCascadeOnMainScreen = 4;
  1173. {
  1174. * Cascades the window on its parent window. The parent window must
  1175. * be different from the positioned window.
  1176. }
  1177. kWindowCascadeOnParentWindow = 5;
  1178. {
  1179. * Cascades the window on the screen containing the largest portion
  1180. * of its parent window. On Mac OS X 10.3 and later, the parent
  1181. * window may be the same as the positioned window. On CarbonLib and
  1182. * earlier versions of Mac OS X, the parent window must be different
  1183. * from the positioned window.
  1184. }
  1185. kWindowCascadeOnParentWindowScreen = 6;
  1186. {
  1187. * Cascades the window on the screen containing the largest portion
  1188. * of its parent window, starting below and to the right of its
  1189. * parent window. The parent window must be different from the
  1190. * positioned window. Available in Mac OS X 10.2 and CarbonLib 1.6
  1191. * and later.
  1192. }
  1193. kWindowCascadeStartAtParentWindowScreen = 10;
  1194. {
  1195. * Puts the window into the alert position on the main screen.
  1196. }
  1197. kWindowAlertPositionOnMainScreen = 7;
  1198. {
  1199. * Puts the window into the alert position on its parent window. The
  1200. * parent window must be different from the positioned window.
  1201. }
  1202. kWindowAlertPositionOnParentWindow = 8;
  1203. {
  1204. * Puts the window into the alert position on the screen containing
  1205. * the largest portion of its parent window. On Mac OS X 10.3 and
  1206. * later, the parent window may be the same as the positioned window.
  1207. * On CarbonLib and earlier versions of Mac OS X, the parent window
  1208. * must be different from the positioned window.
  1209. }
  1210. kWindowAlertPositionOnParentWindowScreen = 9;
  1211. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1212. { ¥ GetWindowRegion Types }
  1213. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1214. type
  1215. WindowRegionCode = UInt16;
  1216. const
  1217. { Region values to pass into GetWindowRegion & GetWindowBounds. All regions are reported in global coordinates. }
  1218. kWindowTitleBarRgn = 0;
  1219. kWindowTitleTextRgn = 1;
  1220. kWindowCloseBoxRgn = 2;
  1221. kWindowZoomBoxRgn = 3;
  1222. kWindowDragRgn = 5;
  1223. kWindowGrowRgn = 6;
  1224. kWindowCollapseBoxRgn = 7;
  1225. kWindowTitleProxyIconRgn = 8; { Mac OS 8.5 forward}
  1226. kWindowStructureRgn = 32;
  1227. kWindowContentRgn = 33; { Content area of the window; empty when the window is collapsed}
  1228. kWindowUpdateRgn = 34; { Carbon forward}
  1229. kWindowOpaqueRgn = 35; { Mac OS X: Area of window considered to be opaque. Only valid for windows with alpha channels.}
  1230. kWindowGlobalPortRgn = 40; { Carbon forward - bounds of the windowÕs port in global coordinates; not affected by CollapseWindow}
  1231. kWindowToolbarButtonRgn = 41; { Mac OS X Tiger: the toolbar button area}
  1232. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1233. { ¥ Standard Window Kinds }
  1234. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1235. const
  1236. dialogKind = 2;
  1237. userKind = 8;
  1238. kDialogWindowKind = 2;
  1239. kApplicationWindowKind = 8;
  1240. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1241. { ¥ FindWindow Result Codes }
  1242. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1243. type
  1244. WindowPartCode = SInt16;
  1245. WindowPartCodePtr = ^WindowPartCode; { when a VAR xx: WindowPartCode parameter can be nil, it is changed to xx: WindowPartCodePtr }
  1246. const
  1247. inDesk = 0;
  1248. inNoWindow = 0;
  1249. inMenuBar = 1;
  1250. inSysWindow = 2;
  1251. inContent = 3;
  1252. inDrag = 4;
  1253. inGrow = 5;
  1254. inGoAway = 6;
  1255. inZoomIn = 7;
  1256. inZoomOut = 8;
  1257. inCollapseBox = 11; { Mac OS 8.0 forward}
  1258. inProxyIcon = 12; { Mac OS 8.5 forward}
  1259. inToolbarButton = 13; { Mac OS X forward}
  1260. inStructure = 15; { Mac OS X 10.1 forward}
  1261. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1262. { ¥ Window Definition Hit Test Result Codes }
  1263. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1264. type
  1265. WindowDefPartCode = SInt16;
  1266. const
  1267. wNoHit = 0;
  1268. wInContent = 1;
  1269. wInDrag = 2;
  1270. wInGrow = 3;
  1271. wInGoAway = 4;
  1272. wInZoomIn = 5;
  1273. wInZoomOut = 6;
  1274. wInCollapseBox = 9; { Mac OS 8.0 forward}
  1275. wInProxyIcon = 10; { Mac OS 8.5 forward}
  1276. wInToolbarButton = 11; { Mac OS X forward}
  1277. wInStructure = 13; { Mac OS X 10.1 forward}
  1278. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1279. { ¥ Window Feature Bits }
  1280. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1281. {
  1282. * Summary:
  1283. * Window feature bits
  1284. *
  1285. * Discussion:
  1286. * These feature bits are supplied by window definition functions in
  1287. * response to the kWindowMsgGetFeatures message or the
  1288. * kEventWindowInit Carbon event. A window's feature bits can also
  1289. * be modified dynamically using the HIWindowChangeFeatures API;
  1290. * typically, feature bits are only modified by a window definition
  1291. * or window frame view.
  1292. }
  1293. const
  1294. {
  1295. * Indicates whether the window is resizable. Available on Mac OS 8.0
  1296. * and later. Not supported on Mac OS X; replaced by
  1297. * kWindowResizableAttribute.
  1298. }
  1299. kWindowCanGrow = 1 shl 0;
  1300. {
  1301. * Indicates whether the window can zoom. Available on Mac OS 8.0 and
  1302. * later. Not supported on Mac OS X; replaced by
  1303. * kWindowHorizontal/Vertical/FullZoomAttribute.
  1304. }
  1305. kWindowCanZoom = 1 shl 1;
  1306. {
  1307. * Indicates whether the window can be minimized. Available on Mac OS
  1308. * 8.0 and later. Not supported on Mac OS X; replaced by
  1309. * kWindowCollapseBoxAttribute.
  1310. }
  1311. kWindowCanCollapse = 1 shl 2;
  1312. {
  1313. * Indicates whether the window is application-modal. Available on
  1314. * Mac OS 8.0 and later.
  1315. }
  1316. kWindowIsModal = 1 shl 3;
  1317. {
  1318. * Indicates that the window definition supports the
  1319. * kWindowMsgGetRegion message. Available on Mac OS 8.0 and later.
  1320. * Not supported on Mac OS X. All window definitions that implement
  1321. * the kWindowMsgGetFeatures message automatically get this feature
  1322. * bit on Mac OS X.
  1323. }
  1324. kWindowCanGetWindowRegion = 1 shl 4;
  1325. {
  1326. * Indicates whether the window is an alert. Available on Mac OS 8.0
  1327. * and later.
  1328. }
  1329. kWindowIsAlert = 1 shl 5;
  1330. {
  1331. * Indicates whether the window has a title bar. Available on Mac OS
  1332. * 8.0 and later. This feature is required for async dragging to be
  1333. * enabled for a window.
  1334. }
  1335. kWindowHasTitleBar = 1 shl 6;
  1336. {
  1337. * Indicates that the window definition supports the
  1338. * kWindowMsgDragHilite message. Available on Mac OS 8.5 and later.
  1339. }
  1340. kWindowSupportsDragHilite = 1 shl 7;
  1341. {
  1342. * Indicates that the window definition supports the
  1343. * kWindowMsgModified message. Available on Mac OS 8.5 and later.
  1344. }
  1345. kWindowSupportsModifiedBit = 1 shl 8;
  1346. {
  1347. * Indicates that the window definition supports the
  1348. * kWindowMsgDrawInCurrentPort message. Available on Mac OS 8.5 and
  1349. * later. Not supported on Mac OS X.
  1350. }
  1351. kWindowCanDrawInCurrentPort = 1 shl 9;
  1352. {
  1353. * Indicates that the window definition supports the
  1354. * kWindowMsgSetupProxyDragImage message. Available on Mac OS 8.5 and
  1355. * later.
  1356. }
  1357. kWindowCanSetupProxyDragImage = 1 shl 10;
  1358. {
  1359. * Indicates that the window definition supports the
  1360. * kWindowMsgMeasureTitle message. Available on Mac OS 8.5 and later.
  1361. }
  1362. kWindowCanMeasureTitle = 1 shl 11;
  1363. {
  1364. * Indicates that the window definition wants to receive a
  1365. * kWindowMsgCleanUp message for each existing window when a process
  1366. * is terminated. Available on Mac OS 8.5 and later. Not supported on
  1367. * Mac OS X.
  1368. }
  1369. kWindowWantsDisposeAtProcessDeath = 1 shl 12;
  1370. {
  1371. * Indicates that the window definition supports the
  1372. * kWindowMsgGetGrowImageRegion message. Available on Mac OS X 10.0
  1373. * and later.
  1374. }
  1375. kWindowSupportsGetGrowImageRegion = 1 shl 13;
  1376. {
  1377. * Indicates that the window is entirely opaque. If this feature bit
  1378. * is set, the window will use less memory because no alpha channel
  1379. * information will be stored for the window's pixels. If this
  1380. * feature bit is not set, the Window Manager will send a
  1381. * kEventWindowGetRegion Carbon event to the window with the
  1382. * kWindowOpaqueRgn constant to get a region that describes the
  1383. * opaque area of the window. Available on Mac OS X 10.1 and later.
  1384. }
  1385. kWindowIsOpaque = 1 shl 14;
  1386. {
  1387. * Indicates that the window definition does not require that the
  1388. * current port be the classic Window Manager port. Not supported on
  1389. * Mac OS X.
  1390. }
  1391. kWindowDefSupportsColorGrafPort = $40000002;
  1392. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1393. { ¥ Region Dragging Constants }
  1394. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1395. const
  1396. kMouseUpOutOfSlop = $80008000;
  1397. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1398. { ¥ Window Class Ordering }
  1399. { Special cases for the ÒbehindÓ parameter in window creation calls. }
  1400. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1401. kFirstWindowOfClass = WindowRef(-1);
  1402. kLastWindowOfClass = WindowRef(0);
  1403. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1404. { ¥ Zoom Information Handle }
  1405. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1406. type
  1407. WStateData = record
  1408. userState: Rect; {user zoom state}
  1409. stdState: Rect; {standard zoom state}
  1410. end;
  1411. WStateDataPtr = ^WStateData;
  1412. type
  1413. WStateDataHandle = ^WStateDataPtr;
  1414. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1415. { ¥ Window definition function }
  1416. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1417. {$ifc TARGET_CPU_64}
  1418. type
  1419. WindowDefProcPtr = UnivPtr;
  1420. WindowDefUPP = WindowDefProcPtr;
  1421. {$elsec}
  1422. {
  1423. * WindowDefProcPtr
  1424. *
  1425. * Summary:
  1426. * Callback function for a custom window definition.
  1427. }
  1428. type
  1429. WindowDefProcPtr = function( varCode: SInt16; window: WindowRef; message: SInt16; param: SIGNEDLONG ): SIGNEDLONG;
  1430. WindowDefUPP = WindowDefProcPtr;
  1431. {
  1432. * NewWindowDefUPP()
  1433. *
  1434. * Availability:
  1435. * Mac OS X: in version 10.0 and later in Carbon.framework
  1436. * CarbonLib: in CarbonLib 1.0 and later
  1437. * Non-Carbon CFM: available as macro/inline
  1438. }
  1439. function NewWindowDefUPP( userRoutine: WindowDefProcPtr ): WindowDefUPP; external name '_NewWindowDefUPP';
  1440. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  1441. {
  1442. * DisposeWindowDefUPP()
  1443. *
  1444. * Availability:
  1445. * Mac OS X: in version 10.0 and later in Carbon.framework
  1446. * CarbonLib: in CarbonLib 1.0 and later
  1447. * Non-Carbon CFM: available as macro/inline
  1448. }
  1449. procedure DisposeWindowDefUPP( userUPP: WindowDefUPP ); external name '_DisposeWindowDefUPP';
  1450. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  1451. {
  1452. * InvokeWindowDefUPP()
  1453. *
  1454. * Availability:
  1455. * Mac OS X: in version 10.0 and later in Carbon.framework
  1456. * CarbonLib: in CarbonLib 1.0 and later
  1457. * Non-Carbon CFM: available as macro/inline
  1458. }
  1459. function InvokeWindowDefUPP( varCode: SInt16; window: WindowRef; message: SInt16; param: SIGNEDLONG; userUPP: WindowDefUPP ): SIGNEDLONG; external name '_InvokeWindowDefUPP';
  1460. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  1461. {$endc} {TARGET_CPU_64}
  1462. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1463. { ¥ Window Definition Spec. Used in Carbon to specify the code that defines a window. }
  1464. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1465. const
  1466. kWindowDefProcPtr = 0; { raw proc-ptr based access}
  1467. kWindowDefObjectClass = 1; { event-based definition using a ToolboxObjectClassRef (Carbon 1.1 or later)}
  1468. kWindowDefProcID = 2; { explicit proc ID; overrides the window class default proc ID}
  1469. kWindowDefHIView = 3; { this window uses an HIView as its frame, not a WDEF}
  1470. type
  1471. WindowDefType = UInt32;
  1472. WindowDefSpec = record
  1473. defType: WindowDefType;
  1474. case SInt16 of
  1475. 0: (
  1476. defProc: WindowDefUPP;
  1477. );
  1478. 1: (
  1479. classRef: UnivPtr; { ToolboxObjectClassRef}
  1480. );
  1481. 2: (
  1482. procID: SInt16;
  1483. );
  1484. 3: (
  1485. rootView: UnivPtr; { HIViewRef}
  1486. );
  1487. end;
  1488. WindowDefSpecPtr = ^WindowDefSpec;
  1489. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1490. { ¥ Window Creation & Persistence }
  1491. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1492. {
  1493. About Window Manager Coordinate Spaces
  1494. All Window Manager API that takes a size, position, or rectangle for input, and does not take an
  1495. HICoordinateSpace parameter, expects that its input parameters are given in the 72DPIGlobal coordinate
  1496. space. Likewise, any API that returns a rect or region and that does not take an HICoordinateSpace
  1497. parameter will provide its output in the 72DPIGlobal coordinate space.
  1498. We expect that most developers will want to work primarily in the 72DPIGlobal space. Doing so makes
  1499. your code independent of the current user interface scale factor, and eases source compatibility with
  1500. earlier versions of Mac OS X that do not support resolution independence. However, there are also certain
  1501. cases where your application must express your window's bounds in pixel coordinates; primarily when you
  1502. need to position your windows so they exactly align with each other or with some other fixed location,
  1503. such as the edge of the display. For these cases, you should use the ScreenPixel coordinate space.
  1504. Note that non-integral pixel coordinates are not available in Mac OS X. If you specify non-integral
  1505. coordinates (in either 72DPIGlobal or ScreenPixel coordinate spaces), they will be rounded to the nearest
  1506. integral value in ScreenPixel space when the window is actually positioned or sized.
  1507. }
  1508. {$ifc not TARGET_CPU_64}
  1509. {
  1510. * HIWindowCreate()
  1511. *
  1512. * Summary:
  1513. * Creates a new window.
  1514. *
  1515. * Mac OS X threading:
  1516. * Not thread safe
  1517. *
  1518. * Parameters:
  1519. *
  1520. * inClass:
  1521. * The window class.
  1522. *
  1523. * inAttributes:
  1524. * A zero-terminated array of attribute bit constants, such as
  1525. * kHIWindowBitCloseBox. Each array entry specifies an attribute
  1526. * of the window to set. You may pass NULL if you do not wish to
  1527. * set any attributes.
  1528. *
  1529. * inDefSpec:
  1530. * Contains a custom window proc ID or root view for the window.
  1531. * May be NULL if you don't need to customize the window.
  1532. *
  1533. * inSpace:
  1534. * The coordinate space of the inBounds parameter. This parameter
  1535. * must be either kHICoordSpaceScreenPixels or
  1536. * kHICoordSpace72DPIGlobal.
  1537. *
  1538. * inBounds:
  1539. * The window content bounds, in the coordinate space specified by
  1540. * the inSpace parameter. ¥¥¥Êconsider changing this to structure
  1541. * bounds?
  1542. *
  1543. * outWindow:
  1544. * On exit, contains the new window.
  1545. *
  1546. * Result:
  1547. * An operating system result code.
  1548. *
  1549. * Availability:
  1550. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  1551. * CarbonLib: not available
  1552. * Non-Carbon CFM: not available
  1553. }
  1554. function HIWindowCreate( inClass: WindowClass; {const} inAttributes: SInt32Ptr { can be NULL }; {const} inDefSpec: WindowDefSpecPtr { can be NULL }; inSpace: HICoordinateSpace; const (*var*) inBounds: HIRect; var outWindow: WindowRef ): OSStatus; external name '_HIWindowCreate';
  1555. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1556. {
  1557. Routines available from Mac OS 8.5 forward
  1558. or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
  1559. }
  1560. {
  1561. * CreateNewWindow()
  1562. *
  1563. * Mac OS X threading:
  1564. * Not thread safe
  1565. *
  1566. * Availability:
  1567. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  1568. * CarbonLib: in CarbonLib 1.0 and later
  1569. * Non-Carbon CFM: in WindowsLib 8.5 and later
  1570. }
  1571. function CreateNewWindow( windowClass_: WindowClass; attributes: WindowAttributes; const (*var*) contentBounds: Rect; var outWindow: WindowRef ): OSStatus; external name '_CreateNewWindow';
  1572. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1573. {
  1574. * DisposeWindow()
  1575. *
  1576. * Mac OS X threading:
  1577. * Not thread safe
  1578. *
  1579. * Availability:
  1580. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  1581. * CarbonLib: in CarbonLib 1.0 and later
  1582. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1583. }
  1584. procedure DisposeWindow( window: WindowRef ); external name '_DisposeWindow';
  1585. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1586. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1587. { ¥ Custom Windows }
  1588. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1589. { Routines available from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward}
  1590. {
  1591. * CreateCustomWindow()
  1592. *
  1593. * Mac OS X threading:
  1594. * Not thread safe
  1595. *
  1596. * Availability:
  1597. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  1598. * CarbonLib: in CarbonLib 1.0 and later
  1599. * Non-Carbon CFM: not available
  1600. }
  1601. function CreateCustomWindow( const (*var*) def: WindowDefSpec; windowClass_: WindowClass; attributes: WindowAttributes; const (*var*) contentBounds: Rect; var outWindow: WindowRef ): OSStatus; external name '_CreateCustomWindow';
  1602. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1603. {
  1604. * ReshapeCustomWindow()
  1605. *
  1606. * Mac OS X threading:
  1607. * Not thread safe
  1608. *
  1609. * Availability:
  1610. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  1611. * CarbonLib: in CarbonLib 1.0 and later
  1612. * Non-Carbon CFM: not available
  1613. }
  1614. function ReshapeCustomWindow( window: WindowRef ): OSStatus; external name '_ReshapeCustomWindow';
  1615. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1616. {
  1617. * RegisterWindowDefinition()
  1618. *
  1619. * Summary:
  1620. * Registers or unregisters a binding between a resource ID and a
  1621. * window definition function.
  1622. *
  1623. * Discussion:
  1624. * In the Mac OS 8.x Window Manager, a 'WIND' resource can contain
  1625. * an embedded WDEF procID that is used by the Window Manager as the
  1626. * resource ID of an 'WDEF' resource to lay out and draw the window.
  1627. * The 'WDEF' resource is loaded by the Window Manager when you load
  1628. * the menu with GetNewWindow. Since WDEFs can no longer be packaged
  1629. * as code resources on Carbon, the procID can no longer refer
  1630. * directly to a WDEF resource. However, using
  1631. * RegisterWindowDefinition you can instead specify a
  1632. * UniversalProcPtr pointing to code in your application code
  1633. * fragment.
  1634. *
  1635. * RegisterWindowDefinition is available when linking to CarbonLib
  1636. * 1.1 forward.
  1637. *
  1638. * RegisterWindowDefinition is not available in 64-bit mode because
  1639. * WDEFs and ToolboxObjects are not supported in 64-bit mode.
  1640. *
  1641. * Mac OS X threading:
  1642. * Not thread safe
  1643. *
  1644. * Parameters:
  1645. *
  1646. * inResID:
  1647. * A WDEF proc ID, as used in a 'WIND' resource.
  1648. *
  1649. * inDefSpec:
  1650. * Specifies the WindowDefUPP or ToolboxObjectClassRef that should
  1651. * be used for windows with the given WDEF proc ID. Passing NULL
  1652. * allows you to unregister the window definition that had been
  1653. * associated with the given WDEF proc ID.
  1654. *
  1655. * Availability:
  1656. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  1657. * CarbonLib: in CarbonLib 1.1 and later
  1658. * Non-Carbon CFM: not available
  1659. }
  1660. function RegisterWindowDefinition( inResID: SInt16; const (*var*) inDefSpec: WindowDefSpec ): OSStatus; external name '_RegisterWindowDefinition';
  1661. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1662. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1663. { ¥ Window part tracking }
  1664. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1665. {
  1666. * GetWindowWidgetHilite()
  1667. *
  1668. * Mac OS X threading:
  1669. * Not thread safe
  1670. *
  1671. * Availability:
  1672. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  1673. * CarbonLib: in CarbonLib 1.0 and later
  1674. * Non-Carbon CFM: in WindowsLib 8.5 and later
  1675. }
  1676. function GetWindowWidgetHilite( inWindow: WindowRef; var outHilite: WindowDefPartCode ): OSStatus; external name '_GetWindowWidgetHilite';
  1677. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1678. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1679. { ¥ Window Metainformation Accessors }
  1680. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1681. {
  1682. * IsValidWindowClass()
  1683. *
  1684. * Summary:
  1685. * Indicates whether a window class is supported by the Window
  1686. * Manager.
  1687. *
  1688. * Mac OS X threading:
  1689. * Not thread safe
  1690. *
  1691. * Parameters:
  1692. *
  1693. * inClass:
  1694. * The window class.
  1695. *
  1696. * Availability:
  1697. * Mac OS X: in version 10.1 and later in Carbon.framework [32-bit only]
  1698. * CarbonLib: in CarbonLib 1.5 and later
  1699. * Non-Carbon CFM: not available
  1700. }
  1701. function IsValidWindowClass( inClass: WindowClass ): Boolean; external name '_IsValidWindowClass';
  1702. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  1703. {
  1704. * HIWindowTestAttribute()
  1705. *
  1706. * Summary:
  1707. * Determines whether a window possesses a specified attribute.
  1708. *
  1709. * Discussion:
  1710. * HIWindowTestAttribute takes an attribute bit constant, such as
  1711. * kHIWindowBitCloseBox. You must not use the older attribute
  1712. * bitmask constants, such as kWindowCloseBoxAttribute, with this
  1713. * API.
  1714. *
  1715. * Mac OS X threading:
  1716. * Not thread safe
  1717. *
  1718. * Parameters:
  1719. *
  1720. * inWindow:
  1721. * The window whose attributes to test.
  1722. *
  1723. * inAttr:
  1724. * The attribute bit constant to test.
  1725. *
  1726. * Result:
  1727. * True if the window possesses the specified attribute, or false if
  1728. * not.
  1729. *
  1730. * Availability:
  1731. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  1732. * CarbonLib: not available
  1733. * Non-Carbon CFM: not available
  1734. }
  1735. function HIWindowTestAttribute( inWindow: WindowRef; inAttr: SInt32 ): Boolean; external name '_HIWindowTestAttribute';
  1736. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1737. {
  1738. * HIWindowChangeAttributes()
  1739. *
  1740. * Summary:
  1741. * Changes the attributes of a window.
  1742. *
  1743. * Discussion:
  1744. * HIWindowChangeAttributes takes two arrays of attribute bit
  1745. * constants, such as kHIWindowBitCloseBox. You must not use the
  1746. * older attribute bitmask constants, such as
  1747. * kWindowCloseBoxAttribute, with this API. The first array
  1748. * specifies the attributes to set, and the second specifies the
  1749. * attributes to clear. For example, you might call this API as
  1750. * follows:
  1751. *
  1752. * int setAttr[] = ( kHIWindowBitCloseBox, kHIWindowBitZoomBox, 0
  1753. * );
  1754. * int clearAttr[] = ( kHIWindowBitNoTitleBar, 0 );
  1755. * HIWindowChangeAttributes( window, setAttr, clearAttr );
  1756. *
  1757. * Mac OS X threading:
  1758. * Not thread safe
  1759. *
  1760. * Parameters:
  1761. *
  1762. * inWindow:
  1763. * The window whose attributes to change.
  1764. *
  1765. * inAttrToSet:
  1766. * A zero-terminated array of attribute bit constants, such as
  1767. * kHIWindowBitCloseBox. Each array entry specifies an attribute
  1768. * of the window to set. You may pass NULL if you do not wish to
  1769. * set any attributes.
  1770. *
  1771. * inAttrToClear:
  1772. * A zero-terminated array of attribute bit constants, such as
  1773. * kHIWindowBitCloseBox. Each array entry specifies an attribute
  1774. * of the window to clear. You may pass NULL if you do not wish to
  1775. * clear any attributes.
  1776. *
  1777. * Result:
  1778. * An operating system result code.
  1779. *
  1780. * Availability:
  1781. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  1782. * CarbonLib: not available
  1783. * Non-Carbon CFM: not available
  1784. }
  1785. function HIWindowChangeAttributes( inWindow: WindowRef; {const} inAttrToSet: SInt32Ptr { can be NULL }; {const} inAttrToClear: SInt32Ptr { can be NULL } ): OSStatus; external name '_HIWindowChangeAttributes';
  1786. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1787. {
  1788. * HIWindowIsAttributeAvailable()
  1789. *
  1790. * Summary:
  1791. * Determines if a window attribute is valid for a specified window
  1792. * class.
  1793. *
  1794. * Discussion:
  1795. * This API is useful because some window classes support different
  1796. * attributes on different platforms (for example, floating windows
  1797. * can have collapse boxes on 9, but not on X), and the Window
  1798. * Manager will return an error if you attempt to create a window
  1799. * with attributes that aren't supported for the requested window
  1800. * class. You can use this API to remove attributes that are not
  1801. * supported by the current platform before calling CreateNewWindow.
  1802. *
  1803. * Mac OS X threading:
  1804. * Not thread safe
  1805. *
  1806. * Parameters:
  1807. *
  1808. * inClass:
  1809. * The window class.
  1810. *
  1811. * inAttr:
  1812. * The window attribute bit. You must use an attribute bit
  1813. * constant, such as kHIWindowBitCloseBox. You must not use the
  1814. * older attribute bitmask constants, such as
  1815. * kWindowCloseBoxAttribute.
  1816. *
  1817. * Result:
  1818. * True if the attribute is available for windows of the specifed
  1819. * class, or false if not.
  1820. *
  1821. * Availability:
  1822. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  1823. * CarbonLib: not available
  1824. * Non-Carbon CFM: not available
  1825. }
  1826. function HIWindowIsAttributeAvailable( inClass: WindowClass; inAttr: SInt32 ): Boolean; external name '_HIWindowIsAttributeAvailable';
  1827. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  1828. {
  1829. * GetAvailableWindowAttributes()
  1830. *
  1831. * Summary:
  1832. * Returns the window attributes that are valid for a window class.
  1833. *
  1834. * Discussion:
  1835. * This API is useful because some window classes support different
  1836. * attributes on different platforms (for example, floating windows
  1837. * can have collapse boxes on 9, but not on X), and the Window
  1838. * Manager will return an error if you attempt to create a window
  1839. * with attributes that aren't supported for the requested window
  1840. * class. You can use this API to remove attributes that are not
  1841. * supported by the current platform before calling CreateNewWindow.
  1842. *
  1843. *
  1844. * In Mac OS X 10.5 and later, windows may have more than 32 bits of
  1845. * attributes. GetAvailableWindowAttributes can only return the low
  1846. * 32 bits of window attributes; therefore, we recommend that you
  1847. * use HIWindowIsAttributeAvailable instead of
  1848. * GetAvailableWindowAttributes.
  1849. *
  1850. * Mac OS X threading:
  1851. * Not thread safe
  1852. *
  1853. * Parameters:
  1854. *
  1855. * inClass:
  1856. * The window class.
  1857. *
  1858. * Result:
  1859. * The window attributes that are supported for the specified window
  1860. * class.
  1861. *
  1862. * Availability:
  1863. * Mac OS X: in version 10.1 and later in Carbon.framework [32-bit only]
  1864. * CarbonLib: in CarbonLib 1.5 and later
  1865. * Non-Carbon CFM: not available
  1866. }
  1867. function GetAvailableWindowAttributes( inClass: WindowClass ): WindowAttributes; external name '_GetAvailableWindowAttributes';
  1868. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  1869. {
  1870. * GetWindowClass()
  1871. *
  1872. * Summary:
  1873. * Returns the class of a window.
  1874. *
  1875. * Mac OS X threading:
  1876. * Not thread safe
  1877. *
  1878. * Parameters:
  1879. *
  1880. * window:
  1881. * The window whose class to retrieve.
  1882. *
  1883. * outClass:
  1884. * On exit, contains the window's class.
  1885. *
  1886. * Availability:
  1887. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  1888. * CarbonLib: in CarbonLib 1.0 and later
  1889. * Non-Carbon CFM: in WindowsLib 8.5 and later
  1890. }
  1891. function GetWindowClass( window: WindowRef; var outClass: WindowClass ): OSStatus; external name '_GetWindowClass';
  1892. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1893. {
  1894. * GetWindowAttributes()
  1895. *
  1896. * Summary:
  1897. * Returns the attributes of a window.
  1898. *
  1899. * Discussion:
  1900. * In Mac OS X 10.5 and later, windows may have more than 32 bits of
  1901. * attributes. GetWindowAttributes can only return the low 32 bits
  1902. * of window attributes; therefore, we recommend that you use
  1903. * HIWindowTestAttribute instead of GetWindowAttributes.
  1904. *
  1905. * Mac OS X threading:
  1906. * Not thread safe
  1907. *
  1908. * Parameters:
  1909. *
  1910. * window:
  1911. * The window whose attributes to retrieve.
  1912. *
  1913. * outAttributes:
  1914. * On exit, contains the window's attributes.
  1915. *
  1916. * Availability:
  1917. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  1918. * CarbonLib: in CarbonLib 1.0 and later
  1919. * Non-Carbon CFM: in WindowsLib 8.5 and later
  1920. }
  1921. function GetWindowAttributes( window: WindowRef; var outAttributes: WindowAttributes ): OSStatus; external name '_GetWindowAttributes';
  1922. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1923. {
  1924. * ChangeWindowAttributes()
  1925. *
  1926. * Summary:
  1927. * Sets and clears window attributes.
  1928. *
  1929. * Discussion:
  1930. * In Mac OS X 10.5 and later, windows may have more than 32 bits of
  1931. * attributes. ChangeWindowAttributes can only set or clear the low
  1932. * 32 bits of window attributes; therefore, we recommend that you
  1933. * use HIWindowChangeAttributes instead of ChangeWindowAttributes.
  1934. *
  1935. * Mac OS X threading:
  1936. * Not thread safe
  1937. *
  1938. * Parameters:
  1939. *
  1940. * window:
  1941. * The window whose attributes to modify.
  1942. *
  1943. * setTheseAttributes:
  1944. * The attributes to set.
  1945. *
  1946. * clearTheseAttributes:
  1947. * The attributes to clear.
  1948. *
  1949. * Availability:
  1950. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  1951. * CarbonLib: in CarbonLib 1.0 and later
  1952. * Non-Carbon CFM: not available
  1953. }
  1954. function ChangeWindowAttributes( window: WindowRef; setTheseAttributes: WindowAttributes; clearTheseAttributes: WindowAttributes ): OSStatus; external name '_ChangeWindowAttributes';
  1955. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1956. {
  1957. * HIWindowChangeClass()
  1958. *
  1959. * Summary:
  1960. * Changes the window look and feel of an existing window on the fly.
  1961. *
  1962. * Discussion:
  1963. * HIWindowChangeClass changes the class of a window. Unlike
  1964. * SetWindowClass, this call effectively changes the look and
  1965. * behavior of the window all at once. Because SetWindowClass
  1966. * already existed and had certain behaviour, we could not change it
  1967. * to behave the way HIWindowChangeClass does.
  1968. *
  1969. * This function can convert a window between kDocumentWindowClass,
  1970. * kFloatingWindowClass, kUtilityWindowClass, and
  1971. * kMovableModalWindowClass only. It cannot change a document window
  1972. * into a plain window, for example.
  1973. *
  1974. * The attributes of the window are adjusted to contain only those
  1975. * that are allowed for the new class. It is the callerÕs
  1976. * responsibility to adjust them further after HIWindowChangeClass
  1977. * returns, if necessary.
  1978. *
  1979. * Mac OS X threading:
  1980. * Not thread safe
  1981. *
  1982. * Parameters:
  1983. *
  1984. * inWindow:
  1985. * The window whose class to change.
  1986. *
  1987. * inWindowClass:
  1988. * The new window class.
  1989. *
  1990. * Availability:
  1991. * Mac OS X: in version 10.3 and later in Carbon.framework [32-bit only]
  1992. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1993. * Non-Carbon CFM: not available
  1994. }
  1995. function HIWindowChangeClass( inWindow: WindowRef; inWindowClass: WindowClass ): OSStatus; external name '_HIWindowChangeClass';
  1996. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1997. {$endc} {not TARGET_CPU_64}
  1998. {$ifc not TARGET_CPU_64}
  1999. {
  2000. * HIWindowGetCGWindowID()
  2001. *
  2002. * Summary:
  2003. * Returns the CoreGraphics window ID assigned by the window server
  2004. * when a window was created.
  2005. *
  2006. * Discussion:
  2007. * The window ID is not generally useful with other Carbon API, but
  2008. * may be usable with other Mac OS X APIs that require window IDs,
  2009. * such as OpenGL. You may convert a window ID back to a WindowRef
  2010. * using the HIWindowFromCGWindowID API.
  2011. *
  2012. * Mac OS X threading:
  2013. * Not thread safe
  2014. *
  2015. * Parameters:
  2016. *
  2017. * inWindow:
  2018. * The window whose window ID to return.
  2019. *
  2020. * Result:
  2021. * The window's window ID, or zero if the window is invalid.
  2022. *
  2023. * Availability:
  2024. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  2025. * CarbonLib: not available
  2026. * Non-Carbon CFM: not available
  2027. }
  2028. function HIWindowGetCGWindowID( inWindow: WindowRef ): CGWindowID; external name '_HIWindowGetCGWindowID';
  2029. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  2030. {
  2031. * HIWindowFromCGWindowID()
  2032. *
  2033. * Summary:
  2034. * Returns the window in the current process with a specified
  2035. * CGWindowID, if any.
  2036. *
  2037. * Mac OS X threading:
  2038. * Not thread safe
  2039. *
  2040. * Parameters:
  2041. *
  2042. * inWindowID:
  2043. * A CoreGraphics window ID, as returned by HIWindowGetCGWindowID
  2044. * or CGWindowListCopyWindowInfo.
  2045. *
  2046. * Result:
  2047. * The WindowRef with the specified window ID, or NULL if no such
  2048. * window is found. A valid window ID for a window in another
  2049. * process will cause a NULL return value, since WindowRefs cannot
  2050. * be used across processes.
  2051. *
  2052. * Availability:
  2053. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  2054. * CarbonLib: not available
  2055. * Non-Carbon CFM: not available
  2056. }
  2057. function HIWindowFromCGWindowID( inWindowID: CGWindowID ): WindowRef; external name '_HIWindowFromCGWindowID';
  2058. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  2059. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2060. { ¥ Window Flushing }
  2061. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2062. {
  2063. * HIWindowFlush()
  2064. *
  2065. * Summary:
  2066. * Flushes any dirty areas a window might have.
  2067. *
  2068. * Discussion:
  2069. * This routine allows you to manually flush dirty areas of a window
  2070. * to the screen. If called on a composited window, it will also
  2071. * cause invalid views in the window to be rendered. This API is
  2072. * preferred over calling QDFlushPortBuffer.
  2073. *
  2074. * Mac OS X threading:
  2075. * Not thread safe
  2076. *
  2077. * Parameters:
  2078. *
  2079. * inWindow:
  2080. * The window to flush.
  2081. *
  2082. * Availability:
  2083. * Mac OS X: in version 10.3 and later in Carbon.framework [32-bit only]
  2084. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2085. * Non-Carbon CFM: not available
  2086. }
  2087. function HIWindowFlush( inWindow: WindowRef ): OSStatus; external name '_HIWindowFlush';
  2088. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2089. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2090. { ¥ Window Backing Store Location }
  2091. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2092. {$endc} {not TARGET_CPU_64}
  2093. {
  2094. * Summary:
  2095. * Window backing buffer location constants are used with the
  2096. * HIWindowGet/SetBackingLocation APIs.
  2097. }
  2098. const
  2099. {
  2100. * The window server determines where to locate the window's backing
  2101. * buffer.
  2102. }
  2103. kHIWindowBackingLocationDefault = 0;
  2104. {
  2105. * The window's backing buffer is stored in video memory. In this
  2106. * case, only Quartz may be used to draw into the window. Use of
  2107. * QuickDraw or direct access will force the window's buffer back
  2108. * into main memory.
  2109. }
  2110. kHIWindowBackingLocationVideoMemory = 1;
  2111. {
  2112. * The window's backing buffer is stored in main memory. In this
  2113. * case, Quartz, QuickDraw, and direct access are all allowed for
  2114. * drawing into the window.
  2115. }
  2116. kHIWindowBackingLocationMainMemory = 2;
  2117. type
  2118. HIWindowBackingLocation = UInt32;
  2119. HIWindowBackingLocationPtr = ^HIWindowBackingLocation;
  2120. {$ifc not TARGET_CPU_64}
  2121. {
  2122. * HIWindowSetBackingLocation()
  2123. *
  2124. * Summary:
  2125. * Sets the preferred location for a window's backing buffer.
  2126. *
  2127. * Discussion:
  2128. * In Mac OS X 10.5, the Quartz drawing API supports
  2129. * hardware-accelerated drawing to a window. In order to enable
  2130. * hardware acceleration, a window's buffer must be stored in video
  2131. * memory, rather than in main memory. By default, the location of a
  2132. * window's buffer is managed automatically by the Window Server.
  2133. * Your application can use this API to explicitly control a
  2134. * window's buffer location. You might, for example, need to ensure
  2135. * that the buffer is kept in main memory if you are drawing
  2136. * directly into the buffer without using Quartz. You might
  2137. * explicitly force a window's buffer into video memory if, after
  2138. * comparing performance with and without hardware acceleration, you
  2139. * find that acceleration is always a performance advantage for your
  2140. * application.
  2141. *
  2142. * You may change the backing buffer location of a window at any
  2143. * time, regardless of whether the window is already visible or has
  2144. * been drawn to. However, changing the buffer location of a visible
  2145. * window requires a potentially significant amount of memory
  2146. * traffic between main and video memory, so it is best to set a
  2147. * window's buffer location once before showing the window, and not
  2148. * change it again.
  2149. *
  2150. * The Window Server automatically moves a window's backing buffer
  2151. * into main memory if the buffer is accessed directly. This occurs
  2152. * if you draw into a window using QuickDraw, or if you acquire a
  2153. * pointer to the window buffer using the LockPortBits API. For best
  2154. * performance, if you know that you will be accessing a window's
  2155. * buffer using either QuickDraw or direct access, you should force
  2156. * the window's buffer into main memory before showing the window.
  2157. *
  2158. * Mac OS X threading:
  2159. * Not thread safe
  2160. *
  2161. * Parameters:
  2162. *
  2163. * inWindow:
  2164. * The window whose backing buffer location to set.
  2165. *
  2166. * inLocation:
  2167. * The window's new backing buffer location. You may pass
  2168. * kHIWindowBackingLocationDefault to allow the Window Server to
  2169. * determine the buffer location automatically.
  2170. *
  2171. * Availability:
  2172. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  2173. * CarbonLib: not available
  2174. * Non-Carbon CFM: not available
  2175. }
  2176. function HIWindowSetBackingLocation( inWindow: WindowRef; inLocation: HIWindowBackingLocation ): OSStatus; external name '_HIWindowSetBackingLocation';
  2177. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  2178. {
  2179. * HIWindowGetBackingLocation()
  2180. *
  2181. * Summary:
  2182. * Retrieves the preferred location of a window's backing buffer,
  2183. * and its potential location based on hardware and software
  2184. * configuration.
  2185. *
  2186. * Mac OS X threading:
  2187. * Not thread safe
  2188. *
  2189. * Parameters:
  2190. *
  2191. * inWindow:
  2192. * The window whose backing buffer location to retrieve.
  2193. *
  2194. * outPreferredLocation:
  2195. * On exit, contains the preferred location for the window's
  2196. * backing buffer. A newly created window's preferred location is
  2197. * kHIWindowBackingLocationDefault. If HIWindowSetBackingLocation
  2198. * has been called on a window, this parameter returns the value
  2199. * that was set. You may pass NULL if you don't need this
  2200. * information.
  2201. *
  2202. * Result:
  2203. * The potential location of the window's backing buffer based on
  2204. * hardware and software configuration. This value indicates whether
  2205. * the WindowServer is capable of storing the window's buffer in
  2206. * video or main memory. The determination is based on details of
  2207. * the current hardware and software configuration, such as whether
  2208. * the GPU can be used by the WindowServer to store window buffers
  2209. * and whether the QuartzGL feature is currently enabled for the
  2210. * entire system or the current application. The return value will
  2211. * always be either kHIWindowBackingLocationVideoMemory or
  2212. * kHIWindowBackingLocationMainMemory; it will never be
  2213. * kHIWindowBackingLocationDefault. Your application can use the
  2214. * return value to determine if the current system configuration is
  2215. * fast enough to support your desired level of drawing; if, after
  2216. * performance measurements, you determine that your software
  2217. * requires video-memory storage of window buffers for acceptable
  2218. * performance, you might alert the user if this function returns
  2219. * kHIWindowBackingLocationMainMemory.
  2220. *
  2221. * Note that the return value does not indicate the current location
  2222. * of the window's backing buffer, only its potential location. The
  2223. * current location can change from one moment to the next. Your
  2224. * application generally only needs to know the capability for
  2225. * storing the backing buffer in video memory, not the actual
  2226. * current location.
  2227. *
  2228. * Availability:
  2229. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  2230. * CarbonLib: not available
  2231. * Non-Carbon CFM: not available
  2232. }
  2233. function HIWindowGetBackingLocation( inWindow: WindowRef; outPreferredLocation: HIWindowBackingLocationPtr { can be NULL } ): HIWindowBackingLocation; external name '_HIWindowGetBackingLocation';
  2234. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  2235. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2236. { ¥ Window Buffer Visibility To Other Processes }
  2237. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2238. {$endc} {not TARGET_CPU_64}
  2239. {
  2240. * Summary:
  2241. * Window sharing constants are used with the
  2242. * HIWindowGet/SetSharingType APIs.
  2243. }
  2244. const
  2245. {
  2246. * Window contents may not be read by another process.
  2247. }
  2248. kHIWindowSharingNone = 0;
  2249. {
  2250. * Window contents may be read but not modified by another process.
  2251. }
  2252. kHIWindowSharingReadOnly = 1;
  2253. {
  2254. * Window contents may be read or modified by another process.
  2255. }
  2256. kHIWindowSharingReadWrite = 2;
  2257. type
  2258. HIWindowSharingType = UInt32;
  2259. {$ifc not TARGET_CPU_64}
  2260. {
  2261. * HIWindowSetSharingType()
  2262. *
  2263. * Summary:
  2264. * Sets the visibility to other processes of a window's backing
  2265. * buffer contents.
  2266. *
  2267. * Discussion:
  2268. * In Mac OS X 10.5, a window's backing buffer may be retrieved
  2269. * using the CGWindowListCreateImage and
  2270. * CGWindowListCreateImageFromArray APIs. Some windows may have
  2271. * content that should not be accessible via these APIs, due to
  2272. * security concerns. Your application can use this API to control
  2273. * how visible a window's backing buffer should be to other
  2274. * processes.
  2275. *
  2276. * Note that it is also possible to read the entire contents of a
  2277. * display using OpenGL; setting a window's sharing type with this
  2278. * API does not prevent OpenGL from being able to read the window's
  2279. * content. For example, the built-in screen-sharing software in Mac
  2280. * OS X Mac OS X 10.5 uses OpenGL and a window's content will still
  2281. * be visible via screen-sharing even if its sharing type has been
  2282. * set to None.
  2283. *
  2284. * A window's default sharing state on creation is
  2285. * kHIWindowSharingReadOnly.
  2286. *
  2287. * Mac OS X threading:
  2288. * Not thread safe
  2289. *
  2290. * Parameters:
  2291. *
  2292. * inWindow:
  2293. * The window whose backing buffer visibility to set.
  2294. *
  2295. * inType:
  2296. * The window's new backing buffer visibility.
  2297. *
  2298. * Availability:
  2299. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  2300. * CarbonLib: not available
  2301. * Non-Carbon CFM: not available
  2302. }
  2303. function HIWindowSetSharingType( inWindow: WindowRef; inType: HIWindowSharingType ): OSStatus; external name '_HIWindowSetSharingType';
  2304. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  2305. {
  2306. * HIWindowGetSharingType()
  2307. *
  2308. * Summary:
  2309. * Retrieves the visibility to other processes of a window's backing
  2310. * buffer contents.
  2311. *
  2312. * Mac OS X threading:
  2313. * Not thread safe
  2314. *
  2315. * Parameters:
  2316. *
  2317. * inWindow:
  2318. * The window whose backing buffer visibility to retrieve.
  2319. *
  2320. * Result:
  2321. * The window's backing buffer visibility.
  2322. *
  2323. * Availability:
  2324. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  2325. * CarbonLib: not available
  2326. * Non-Carbon CFM: not available
  2327. }
  2328. function HIWindowGetSharingType( inWindow: WindowRef ): HIWindowSharingType; external name '_HIWindowGetSharingType';
  2329. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  2330. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2331. { ¥ Window Modality }
  2332. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2333. {$endc} {not TARGET_CPU_64}
  2334. {
  2335. * WindowModality
  2336. *
  2337. }
  2338. type
  2339. WindowModality = UInt32;
  2340. const
  2341. {
  2342. * A window does not prevent interaction with any other window in the
  2343. * system.
  2344. }
  2345. kWindowModalityNone = 0;
  2346. {
  2347. * A window prevents interaction with all other windows in the
  2348. * system. Only available in CarbonLib. Mapped to
  2349. * kWindowModalityAppModal in Mac OS X.
  2350. }
  2351. kWindowModalitySystemModal = 1;
  2352. {
  2353. * A window prevents interaction with other windows in the same
  2354. * process.
  2355. }
  2356. kWindowModalityAppModal = 2;
  2357. {
  2358. * A window prevents interaction with a single other window.
  2359. }
  2360. kWindowModalityWindowModal = 3;
  2361. {$ifc not TARGET_CPU_64}
  2362. {
  2363. * SetWindowModality()
  2364. *
  2365. * Summary:
  2366. * Sets the modality of a window.
  2367. *
  2368. * Discussion:
  2369. * The modality of a window is used by the Carbon event manager to
  2370. * automatically determine appropriate event handling.
  2371. *
  2372. * Mac OS X threading:
  2373. * Not thread safe
  2374. *
  2375. * Parameters:
  2376. *
  2377. * inWindow:
  2378. * The window whose modality to set.
  2379. *
  2380. * inModalKind:
  2381. * The new modality for the window.
  2382. *
  2383. * inUnavailableWindow:
  2384. * If the window is becoming window-modal, this parameter
  2385. * specifies the window to which the inWindow parameter is modal.
  2386. * The unavailableWindow will not be available while inWindow is
  2387. * in window-modal state.
  2388. *
  2389. * Availability:
  2390. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  2391. * CarbonLib: in CarbonLib 1.1 and later
  2392. * Non-Carbon CFM: not available
  2393. }
  2394. function SetWindowModality( inWindow: WindowRef; inModalKind: WindowModality; inUnavailableWindow: WindowRef ): OSStatus; external name '_SetWindowModality';
  2395. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2396. {
  2397. * GetWindowModality()
  2398. *
  2399. * Summary:
  2400. * Retrieves the modality of a window.
  2401. *
  2402. * Mac OS X threading:
  2403. * Not thread safe
  2404. *
  2405. * Parameters:
  2406. *
  2407. * inWindow:
  2408. * The window whose modality to retrieve.
  2409. *
  2410. * outModalKind:
  2411. * On exit, contains the modality of the window.
  2412. *
  2413. * outUnavailableWindow:
  2414. * On exit, ifÊthe window is window-modal, contains the target
  2415. * window of the specified window's modality.
  2416. *
  2417. * Availability:
  2418. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  2419. * CarbonLib: in CarbonLib 1.1 and later
  2420. * Non-Carbon CFM: not available
  2421. }
  2422. function GetWindowModality( inWindow: WindowRef; var outModalKind: WindowModality; outUnavailableWindow: WindowRefPtr { can be NULL } ): OSStatus; external name '_GetWindowModality';
  2423. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2424. {
  2425. * HIWindowIsDocumentModalTarget()
  2426. *
  2427. * Summary:
  2428. * Determines if a window is currently the target window of another
  2429. * document modal window, such as a sheet.
  2430. *
  2431. * Mac OS X threading:
  2432. * Not thread safe
  2433. *
  2434. * Parameters:
  2435. *
  2436. * inWindow:
  2437. * The window in question.
  2438. *
  2439. * outOwner:
  2440. * If inWindow is the target of a document modal window, outOwner
  2441. * is set to the document modal window on exit. If this function
  2442. * does not return true, outOwner is undefined. You may pass NULL
  2443. * if you don't want the owner's window ref.
  2444. *
  2445. * Result:
  2446. * A boolean result. A true result indicates that inWindow is
  2447. * currently the target of a document modal window.
  2448. *
  2449. * Availability:
  2450. * Mac OS X: in version 10.3 and later in Carbon.framework [32-bit only]
  2451. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2452. * Non-Carbon CFM: not available
  2453. }
  2454. function HIWindowIsDocumentModalTarget( inWindow: WindowRef; outOwner: WindowRefPtr { can be NULL } ): Boolean; external name '_HIWindowIsDocumentModalTarget';
  2455. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2456. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2457. { ¥ Floating Windows }
  2458. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2459. {
  2460. Routines available from Mac OS 8.6 forward
  2461. or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
  2462. }
  2463. {
  2464. * ShowFloatingWindows()
  2465. *
  2466. * Mac OS X threading:
  2467. * Not thread safe
  2468. *
  2469. * Availability:
  2470. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  2471. * CarbonLib: in CarbonLib 1.0 and later
  2472. * Non-Carbon CFM: in WindowsLib 8.5 and later
  2473. }
  2474. function ShowFloatingWindows: OSStatus; external name '_ShowFloatingWindows';
  2475. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2476. {
  2477. * HideFloatingWindows()
  2478. *
  2479. * Mac OS X threading:
  2480. * Not thread safe
  2481. *
  2482. * Availability:
  2483. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  2484. * CarbonLib: in CarbonLib 1.0 and later
  2485. * Non-Carbon CFM: in WindowsLib 8.5 and later
  2486. }
  2487. function HideFloatingWindows: OSStatus; external name '_HideFloatingWindows';
  2488. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2489. {
  2490. * AreFloatingWindowsVisible()
  2491. *
  2492. * Mac OS X threading:
  2493. * Not thread safe
  2494. *
  2495. * Availability:
  2496. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  2497. * CarbonLib: in CarbonLib 1.0 and later
  2498. * Non-Carbon CFM: in WindowsLib 8.5 and later
  2499. }
  2500. function AreFloatingWindowsVisible: Boolean; external name '_AreFloatingWindowsVisible';
  2501. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2502. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2503. { ¥ Window Groups }
  2504. { The Window Group API allows the creation and management of groups of windows, }
  2505. { allowing control of the z-order, activation, and positioning of the windows. }
  2506. { Internally to the Window Manager, each of the standard window tiers (document, }
  2507. { toolbar, floating, modal, utility, help, and overlay) is implemented as a window }
  2508. { group; you can access the window group for a class with GetWindowGroupOfClass. }
  2509. { You can create your own window groups, if you would like your windows to float, }
  2510. { for example, above the floating window layer but below the modal layer. It is }
  2511. { also possible to create more complex hierarchical arrangements of window groups. }
  2512. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2513. {$endc} {not TARGET_CPU_64}
  2514. type
  2515. WindowGroupRef = ^OpaqueWindowGroupRef; { an opaque type }
  2516. OpaqueWindowGroupRef = record end;
  2517. WindowGroupRefPtr = ^WindowGroupRef; { when a var xx:WindowGroupRef parameter can be nil, it is changed to xx: WindowGroupRefPtr }
  2518. { may be passed as the "behindWindow" parameter to NewCWindow and SendBehind}
  2519. const
  2520. { may be passed as the "behindWindow" parameter to NewCWindow and SendBehind}
  2521. kFirstWindowOfGroup = WindowRef(-1);
  2522. kLastWindowOfGroup = nil;
  2523. { may be passed as the "behindGroup" parameter to SendWindowGroupBehind}
  2524. kFirstWindowGroup = WindowGroupRef(-1);
  2525. kLastWindowGroup = nil;
  2526. {
  2527. * WindowGroupAttributes
  2528. *
  2529. * Summary:
  2530. * These are attributes that may be applied to a window group.
  2531. }
  2532. type
  2533. WindowGroupAttributes = UInt32;
  2534. const
  2535. {
  2536. * Makes the group behave somewhat as a layer of windows that move
  2537. * together. When any window in the group is brought to the front of
  2538. * the group, the entire group will also be brought to the front of
  2539. * the containing group's child hierarchy.
  2540. }
  2541. kWindowGroupAttrSelectAsLayer = 1 shl 0;
  2542. {
  2543. * The positions of the contents of this group with respect to each
  2544. * other cannot be changed. When one item moves, all other items are
  2545. * moved simultaneously. Note that when one window in the group is
  2546. * moved, the bounds of the other windows in the group may be updated
  2547. * asynchronously.
  2548. }
  2549. kWindowGroupAttrMoveTogether = 1 shl 1;
  2550. {
  2551. * The z-order of the contents of this group with respect to each
  2552. * other cannot be changed. When one item changes z-order, all other
  2553. * items are moved simultaneously. For purposes of z-ordering, the
  2554. * group and all its subgroups are effectively treated as if they
  2555. * were a single window in the parent group of this group.
  2556. }
  2557. kWindowGroupAttrLayerTogether = 1 shl 2;
  2558. {
  2559. * The active state of the windows in this group is shared. The
  2560. * windows in the group are activated or deactivated according to the
  2561. * activation scope of the group, but when any window in the group
  2562. * changes activation, all other windows change to match.
  2563. }
  2564. kWindowGroupAttrSharedActivation = 1 shl 3;
  2565. {
  2566. * When any window in this group is collapsed, all other windows in
  2567. * this group are hidden. All subgroups of this group are also
  2568. * examined for the HideOnCollapse attribute, and any windows of any
  2569. * subgroup with this attribute are also hidden. All windows will be
  2570. * shown again when the collapsed window is expanded.
  2571. }
  2572. kWindowGroupAttrHideOnCollapse = 1 shl 4;
  2573. {
  2574. * This window group's window level should be left unchanged. If this
  2575. * attribute is not specified, this window group's window level will
  2576. * be promoted to a value equal to the level of the next FixedLevel
  2577. * window group beneath it in the window group hierarchy.
  2578. }
  2579. kWindowGroupAttrFixedLevel = 1 shl 5;
  2580. {
  2581. * WindowActivationScope
  2582. *
  2583. * Discussion:
  2584. * Every window has a WindowActivationScope. It defines how windows
  2585. * are activated by the Window Manager with respect to other windows
  2586. * in the windowÕs group and in the current process.
  2587. }
  2588. type
  2589. WindowActivationScope = UInt32;
  2590. const
  2591. {
  2592. * Windows with this scope are never activated by the Window Manager.
  2593. * This should be used when the windowÕs visual state does not change
  2594. * based on activation (for example, tooltip windows), or when the
  2595. * client wishes to manually control all activation. The window owner
  2596. * is free to explicitly activate or deactivate windows using the
  2597. * ActivateWindow API.
  2598. }
  2599. kWindowActivationScopeNone = 0;
  2600. {
  2601. * Windows with this scope are always active if visible. Windows with
  2602. * this scope are unaffected by the activation state of other
  2603. * windows. This activation scope is automatically used by floating
  2604. * windows.
  2605. }
  2606. kWindowActivationScopeIndependent = 1;
  2607. {
  2608. * Windows with this scope are activated relative to other windows
  2609. * with the same scope in the current process. Only one window with
  2610. * this scope can be active in the entire process. This activation
  2611. * scope is automatically used by document and dialog windows.
  2612. }
  2613. kWindowActivationScopeAll = 2;
  2614. {
  2615. * Summary:
  2616. * These are constants that can be used for the inNextGroup
  2617. * parameter to GetWindowGroupSibling.
  2618. }
  2619. const
  2620. {
  2621. * Indicates that GetWindowGroupSibling should return the next deeper
  2622. * sibling group in the z-order.
  2623. }
  2624. kNextWindowGroup = true;
  2625. {
  2626. * Indicates that GetWindowGroupSibling should return the next higher
  2627. * sibling group in the z-order.
  2628. }
  2629. kPreviousWindowGroup = false;
  2630. {
  2631. * WindowGroupContentOptions
  2632. *
  2633. * Discussion:
  2634. * Window group contents options are used to control what group
  2635. * content is counted or returned by the CountWindowGroupContents
  2636. * and GetWindowGroupContents APIs.
  2637. }
  2638. type
  2639. WindowGroupContentOptions = UInt32;
  2640. const
  2641. {
  2642. * Indicates that Count/GetWindowGroupContents should return the
  2643. * windows in a group. If this option is not set, these APIs return
  2644. * the groups in a group.
  2645. }
  2646. kWindowGroupContentsReturnWindows = 1 shl 0;
  2647. {
  2648. * Indicates that Count/GetWindowGroupContents should include the
  2649. * contents of groups contained by the specified group. If this
  2650. * option is not set, these APIs only return information about the
  2651. * specified groupÕs contents.
  2652. }
  2653. kWindowGroupContentsRecurse = 1 shl 1;
  2654. {
  2655. * Indicates that Count/GetWindowGroupContents should only include
  2656. * visible windows. Only valid when kWindowGroupContentsReturnWindows
  2657. * is specified.
  2658. }
  2659. kWindowGroupContentsVisible = 1 shl 2;
  2660. {----------------------------------------------------------------------------------}
  2661. { ¥ Group creation, destruction, and refcounting }
  2662. {----------------------------------------------------------------------------------}
  2663. {$ifc not TARGET_CPU_64}
  2664. {
  2665. * CreateWindowGroup()
  2666. *
  2667. * Summary:
  2668. * Creates a new window group.
  2669. *
  2670. * Mac OS X threading:
  2671. * Not thread safe
  2672. *
  2673. * Parameters:
  2674. *
  2675. * inAttributes:
  2676. * Attributes for the new window group.
  2677. *
  2678. * outGroup:
  2679. * On exit, contains the new window group.
  2680. *
  2681. * Availability:
  2682. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  2683. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  2684. * Non-Carbon CFM: not available
  2685. }
  2686. function CreateWindowGroup( inAttributes: WindowGroupAttributes; var outGroup: WindowGroupRef ): OSStatus; external name '_CreateWindowGroup';
  2687. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2688. {
  2689. * RetainWindowGroup()
  2690. *
  2691. * Summary:
  2692. * Increments the refcount of a window group.
  2693. *
  2694. * Mac OS X threading:
  2695. * Not thread safe
  2696. *
  2697. * Parameters:
  2698. *
  2699. * inGroup:
  2700. * The group whose refcount to increment.
  2701. *
  2702. * Availability:
  2703. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  2704. * CarbonLib: in CarbonLib 1.4 and later
  2705. * Non-Carbon CFM: not available
  2706. }
  2707. function RetainWindowGroup( inGroup: WindowGroupRef ): OSStatus; external name '_RetainWindowGroup';
  2708. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2709. {
  2710. * ReleaseWindowGroup()
  2711. *
  2712. * Summary:
  2713. * Releases a refcount on a window group. If the refcount goes to
  2714. * zero, the group is destroyed, and a refcount is released from all
  2715. * contained objects.
  2716. *
  2717. * Mac OS X threading:
  2718. * Not thread safe
  2719. *
  2720. * Parameters:
  2721. *
  2722. * inGroup:
  2723. * The group whose refcount to decrement.
  2724. *
  2725. * Availability:
  2726. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  2727. * CarbonLib: in CarbonLib 1.4 and later
  2728. * Non-Carbon CFM: not available
  2729. }
  2730. function ReleaseWindowGroup( inGroup: WindowGroupRef ): OSStatus; external name '_ReleaseWindowGroup';
  2731. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2732. {
  2733. * GetWindowGroupRetainCount()
  2734. *
  2735. * Summary:
  2736. * Returns the refcount of a window group.
  2737. *
  2738. * Mac OS X threading:
  2739. * Not thread safe
  2740. *
  2741. * Parameters:
  2742. *
  2743. * inGroup:
  2744. * The group whose refcount to return.
  2745. *
  2746. * Availability:
  2747. * Mac OS X: in version 10.1 and later in Carbon.framework [32-bit only]
  2748. * CarbonLib: in CarbonLib 1.4 and later
  2749. * Non-Carbon CFM: not available
  2750. }
  2751. function GetWindowGroupRetainCount( inGroup: WindowGroupRef ): ItemCount; external name '_GetWindowGroupRetainCount';
  2752. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  2753. {
  2754. * GetWindowGroupOfClass()
  2755. *
  2756. * Summary:
  2757. * Gets the window group in which windows of a given class are
  2758. * placed.
  2759. *
  2760. * Discussion:
  2761. * The Window Manager uses window groups internally to manage the
  2762. * ordering of windows of different classes. In some cases, multiple
  2763. * classes are placed within the same group; for example, windows
  2764. * from all of the modal and alert window classes are placed into
  2765. * the same modal window group. The refcount of the group returned
  2766. * by this API is not incremented, and the caller does not need to
  2767. * release the reference.
  2768. *
  2769. * Mac OS X threading:
  2770. * Not thread safe
  2771. *
  2772. * Parameters:
  2773. *
  2774. * windowClass:
  2775. * The class whose window group to retrieve. You may pass
  2776. * kAllWindowClasses to retrieve the root window group.
  2777. *
  2778. * Availability:
  2779. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  2780. * CarbonLib: in CarbonLib 1.4 and later
  2781. * Non-Carbon CFM: not available
  2782. }
  2783. function GetWindowGroupOfClass( windowClass_: WindowClass ): WindowGroupRef; external name '_GetWindowGroupOfClass';
  2784. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2785. {----------------------------------------------------------------------------------}
  2786. { ¥ÊGroup name, attributes, and level }
  2787. {----------------------------------------------------------------------------------}
  2788. {
  2789. * SetWindowGroupName()
  2790. *
  2791. * Summary:
  2792. * Sets the name of a window group.
  2793. *
  2794. * Discussion:
  2795. * The name of a window group is never displayed to the user.
  2796. * However, it is displayed by debugging functions such as
  2797. * DebugPrintWindowGroup. This can be very useful when debugging the
  2798. * structure of your window groups.
  2799. *
  2800. * Mac OS X threading:
  2801. * Not thread safe
  2802. *
  2803. * Parameters:
  2804. *
  2805. * inGroup:
  2806. * The group whose name to set.
  2807. *
  2808. * inName:
  2809. * The name of the group.
  2810. *
  2811. * Availability:
  2812. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  2813. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  2814. * Non-Carbon CFM: not available
  2815. }
  2816. function SetWindowGroupName( inGroup: WindowGroupRef; inName: CFStringRef ): OSStatus; external name '_SetWindowGroupName';
  2817. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2818. {
  2819. * CopyWindowGroupName()
  2820. *
  2821. * Summary:
  2822. * Returns a copy of the name of a window group.
  2823. *
  2824. * Mac OS X threading:
  2825. * Not thread safe
  2826. *
  2827. * Parameters:
  2828. *
  2829. * inGroup:
  2830. * The group whose name to retrieve.
  2831. *
  2832. * outName:
  2833. * On exit, contains the name of the group. It is the caller's
  2834. * responsibility to release the name.
  2835. *
  2836. * Availability:
  2837. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  2838. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  2839. * Non-Carbon CFM: not available
  2840. }
  2841. function CopyWindowGroupName( inGroup: WindowGroupRef; var outName: CFStringRef ): OSStatus; external name '_CopyWindowGroupName';
  2842. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2843. {
  2844. * GetWindowGroupAttributes()
  2845. *
  2846. * Summary:
  2847. * Retrieves the attributes of a window group.
  2848. *
  2849. * Mac OS X threading:
  2850. * Not thread safe
  2851. *
  2852. * Parameters:
  2853. *
  2854. * inGroup:
  2855. * The group whose attributes to retrieve.
  2856. *
  2857. * outAttributes:
  2858. * On exit, the groupÕs attributes.
  2859. *
  2860. * Availability:
  2861. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  2862. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  2863. * Non-Carbon CFM: not available
  2864. }
  2865. function GetWindowGroupAttributes( inGroup: WindowGroupRef; var outAttributes: WindowGroupAttributes ): OSStatus; external name '_GetWindowGroupAttributes';
  2866. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2867. {
  2868. * ChangeWindowGroupAttributes()
  2869. *
  2870. * Summary:
  2871. * Changes the attributes of a window group.
  2872. *
  2873. * Mac OS X threading:
  2874. * Not thread safe
  2875. *
  2876. * Parameters:
  2877. *
  2878. * inGroup:
  2879. * The group whose attributes to change.
  2880. *
  2881. * setTheseAttributes:
  2882. * The attributes to set.
  2883. *
  2884. * clearTheseAttributes:
  2885. * The attributes to clear.
  2886. *
  2887. * Availability:
  2888. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  2889. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  2890. * Non-Carbon CFM: not available
  2891. }
  2892. function ChangeWindowGroupAttributes( inGroup: WindowGroupRef; setTheseAttributes: WindowGroupAttributes; clearTheseAttributes: WindowGroupAttributes ): OSStatus; external name '_ChangeWindowGroupAttributes';
  2893. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2894. {
  2895. * SetWindowGroupLevel()
  2896. *
  2897. * Summary:
  2898. * Sets the CoreGraphics window group level of windows in a group.
  2899. *
  2900. * PLEASE NOTE: Apple does not recommend using this API for most
  2901. * window-ordering purposes. Rather than explicitly setting the
  2902. * level of a window group, it is preferable to position the group
  2903. * in the window group hierarchy so that it is between two standard
  2904. * groups that bracket the desired window level. Doing so will cause
  2905. * your group to automatically adopt the window level of the
  2906. * standard group beneath it. Your code will be more compatible with
  2907. * future versions of Mac OS X if you avoid setting the window level
  2908. * of your groups explicitly.
  2909. *
  2910. * The most common case where it is appropriate to explicitly set a
  2911. * window level for your group is when your group's windows need to
  2912. * be positioned above or below all windows in the standard window
  2913. * groups. In these cases, you should position your group in the
  2914. * group hierarchy above or below all standard groups, and then set
  2915. * the window group level explicitly, if necessary.
  2916. *
  2917. * Discussion:
  2918. * CoreGraphics windows (used to implement all windows in Carbon and
  2919. * Cocoa applications on Mac OS X) are divided into layers specified
  2920. * by a window level. Standard window levels are listed in
  2921. * <CoreGraphics/CGWindowLevel.h>. By default, a new window group
  2922. * has a window level of kCGNormalWindowLevel.
  2923. *
  2924. * When a window is placed into a window group, its window level is
  2925. * determined by the window level of its "base group". This is the
  2926. * containing group that is a child of the root group. For example,
  2927. * if group A is a child of the root group, and group B is a child
  2928. * of group A, and window C is in group B, then window C's base
  2929. * group is group A, and group A's window level determines the level
  2930. * of window C.
  2931. *
  2932. * SetWindowGroupLevel only allows changing the window level of
  2933. * groups that are children of the root group. It returns paramErr
  2934. * for other groups, since a group that is not a child of the root
  2935. * group is not a base group and changing its level has no effect.
  2936. *
  2937. *
  2938. * Changing the level of a group also changes the level of all
  2939. * windows currently contained by the group.
  2940. *
  2941. * In Mac OS X 10.4 and later, SetWindowGroupLevel will set all
  2942. * three window levels associated with a window group: the Active,
  2943. * Inactive, and Promoted levels. It will then immediately determine
  2944. * if the Active level needs to be promoted to a larger value, and
  2945. * if so, set the Promoted level to that value.
  2946. *
  2947. * Mac OS X threading:
  2948. * Not thread safe
  2949. *
  2950. * Parameters:
  2951. *
  2952. * inGroup:
  2953. * The window group whose level to change.
  2954. *
  2955. * inLevel:
  2956. * The new level for the windows in this group.
  2957. *
  2958. * Availability:
  2959. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  2960. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  2961. * Non-Carbon CFM: not available
  2962. }
  2963. function SetWindowGroupLevel( inGroup: WindowGroupRef; inLevel: SInt32 ): OSStatus; external name '_SetWindowGroupLevel';
  2964. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2965. {
  2966. * GetWindowGroupLevel()
  2967. *
  2968. * Summary:
  2969. * Gets the CoreGraphics window group level of windows in a group.
  2970. *
  2971. * Discussion:
  2972. * In Mac OS X 10.4 and later, GetWindowGroupLevel will return
  2973. * either the Promoted window level or the Inactive window level,
  2974. * depending on whether the application is active or inactive.
  2975. *
  2976. * Mac OS X threading:
  2977. * Not thread safe
  2978. *
  2979. * Parameters:
  2980. *
  2981. * inGroup:
  2982. * The window group whose level to return.
  2983. *
  2984. * outLevel:
  2985. * On exit, contains the window level of the windows in this group.
  2986. *
  2987. * Availability:
  2988. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  2989. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  2990. * Non-Carbon CFM: not available
  2991. }
  2992. function GetWindowGroupLevel( inGroup: WindowGroupRef; var outLevel: SInt32 ): OSStatus; external name '_GetWindowGroupLevel';
  2993. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2994. {$endc} {not TARGET_CPU_64}
  2995. {
  2996. * Summary:
  2997. * Parameters to GetWindowGroupLevelOfType and
  2998. * SetWindowGroupLevelOfType
  2999. }
  3000. const
  3001. {
  3002. * The window level that is nominally used for windows in the group
  3003. * when the application is active. However, if a group with a higher
  3004. * window level is positioned below group in the window group
  3005. * hierarchy, this group's active level will be promoted to match the
  3006. * level of the group in front of it. You can determine the actual
  3007. * window level in use for a group using the
  3008. * kWindowGroupLevelPromoted constant.
  3009. }
  3010. kWindowGroupLevelActive = 1;
  3011. {
  3012. * The window level that is used for windows in the group when the
  3013. * application is inactive.
  3014. }
  3015. kWindowGroupLevelInactive = 2;
  3016. {
  3017. * The window level that is actually used for windows in the group
  3018. * when the application is active. This level will either be the same
  3019. * as the Active window level, or will be a larger value to match the
  3020. * level of a group below this group.
  3021. *
  3022. * We do not recommend setting the Promoted window level explicitly,
  3023. * because the promoted level is reset by the Window Manager whenever
  3024. * the window group hierarchy structure changes, and therefore any
  3025. * changes that you may make to the promoted level can be
  3026. * overwritten. In general you should only use this API to set the
  3027. * Active and Inactive window levels.
  3028. }
  3029. kWindowGroupLevelPromoted = 3;
  3030. {$ifc not TARGET_CPU_64}
  3031. {
  3032. * SetWindowGroupLevelOfType()
  3033. *
  3034. * Summary:
  3035. * Sets a CoreGraphics window group level of a window group.
  3036. *
  3037. *
  3038. * PLEASE NOTE: Apple does not recommend using this API for most
  3039. * window-ordering purposes. Rather than explicitly setting the
  3040. * level of a window group, it is preferable to position the group
  3041. * in the window group hierarchy so that it is between two standard
  3042. * groups that bracket the desired window level. Doing so will cause
  3043. * your group to automatically adopt the window level of the
  3044. * standard group beneath it. Your code will be more compatible with
  3045. * future versions of Mac OS X if you avoid setting the window level
  3046. * of your groups explicitly.
  3047. *
  3048. * The most common case where it is appropriate to explicitly set a
  3049. * window level for your group is when your group's windows need to
  3050. * be positioned above or below all windows in the standard window
  3051. * groups. In these cases, you should position your group in the
  3052. * group hierarchy above or below all standard groups, and then set
  3053. * the window group level explicitly, if necessary.
  3054. *
  3055. * Discussion:
  3056. * See the SetWindowGroupLevel API for a general discussion of
  3057. * window levels and window groups.
  3058. *
  3059. * In Mac OS X 10.4 and later, a window group may have multiple
  3060. * window levels associated with it; one level for when the
  3061. * application is active, and another for when the application is
  3062. * inactive. The Window Manager automatically switches each group's
  3063. * level as the application becomes active or inactive. This API can
  3064. * be used to set each level associated with a group.
  3065. *
  3066. * This API can also be used to set the promoted window level that
  3067. * is actually used for windows in the group; however, we do not
  3068. * recommend this usage, because the promoted window level is reset
  3069. * by the Window Manager whenever the window group hierarchy
  3070. * structure changes, and therefore any changes that you may make to
  3071. * the promoted level can be overwritten. In general you should only
  3072. * use this API to set the Active and Inactive window levels.
  3073. *
  3074. *
  3075. * When setting the Active level of a group with the FixedLevel
  3076. * window group attribute, this API will automatically also set the
  3077. * Promoted level to the same value, and also update the Promoted
  3078. * level of any non-FixedLevel groups above the group being modified.
  3079. *
  3080. * Mac OS X threading:
  3081. * Not thread safe
  3082. *
  3083. * Parameters:
  3084. *
  3085. * inGroup:
  3086. * The window group whose level to change.
  3087. *
  3088. * inLevelType:
  3089. * The level type to change (one of kWindowGroupLevelActive,
  3090. * kWindowGroupLevelInactive, or kWindowGroupLevelPromoted).
  3091. *
  3092. * inLevel:
  3093. * The new level for the windows in this group.
  3094. *
  3095. * Availability:
  3096. * Mac OS X: in version 10.4 and later in Carbon.framework [32-bit only]
  3097. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  3098. * Non-Carbon CFM: not available
  3099. }
  3100. function SetWindowGroupLevelOfType( inGroup: WindowGroupRef; inLevelType: UInt32; inLevel: CGWindowLevel ): OSStatus; external name '_SetWindowGroupLevelOfType';
  3101. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  3102. {
  3103. * GetWindowGroupLevelOfType()
  3104. *
  3105. * Summary:
  3106. * Gets a CoreGraphics window level of a window group.
  3107. *
  3108. * Discussion:
  3109. * See the SetWindowGroupLevel API for a general discussion of
  3110. * window levels and window groups.
  3111. *
  3112. * In Mac OS X 10.4 and later, a window group may have multiple
  3113. * window levels associated with it; one level for when the
  3114. * application is active, and another for when the application is
  3115. * inactive. The Window Manager automatically switches each group's
  3116. * level as the application becomes active or inactive. The
  3117. * GetWindowGroupLevelOfType API can be used to get each level
  3118. * associated with a group, including the promoted window level that
  3119. * is actually in use for windows in the group while the application
  3120. * is active.
  3121. *
  3122. * Mac OS X threading:
  3123. * Not thread safe
  3124. *
  3125. * Parameters:
  3126. *
  3127. * inGroup:
  3128. * The window group whose level to retrieve.
  3129. *
  3130. * inLevelType:
  3131. * The level type to retrieve (one of kWindowGroupLevelActive,
  3132. * kWindowGroupLevelInactive, or kWindowGroupLevelPromoted).
  3133. *
  3134. * outLevel:
  3135. * On exit, the level for the windows in this group.
  3136. *
  3137. * Availability:
  3138. * Mac OS X: in version 10.4 and later in Carbon.framework [32-bit only]
  3139. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  3140. * Non-Carbon CFM: not available
  3141. }
  3142. function GetWindowGroupLevelOfType( inGroup: WindowGroupRef; inLevelType: UInt32; var outLevel: CGWindowLevel ): OSStatus; external name '_GetWindowGroupLevelOfType';
  3143. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  3144. {----------------------------------------------------------------------------------}
  3145. { ¥ÊGroup z-ordering }
  3146. {----------------------------------------------------------------------------------}
  3147. {
  3148. * SendWindowGroupBehind()
  3149. *
  3150. * Summary:
  3151. * Changes the z-order of a group, if the group does not have the
  3152. * kWindowGroupAttributeLayerTogether attribute set.
  3153. *
  3154. * Discussion:
  3155. * SendWindowGroupBehind currently requires that the group being
  3156. * moved and the behindGroup have the same parent group.
  3157. *
  3158. * Mac OS X threading:
  3159. * Not thread safe
  3160. *
  3161. * Parameters:
  3162. *
  3163. * inGroup:
  3164. * The group whose z-order to change.
  3165. *
  3166. * behindGroup:
  3167. * The group behind which to position the specified group.
  3168. *
  3169. * Availability:
  3170. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3171. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  3172. * Non-Carbon CFM: not available
  3173. }
  3174. function SendWindowGroupBehind( inGroup: WindowGroupRef; behindGroup: WindowGroupRef ): OSStatus; external name '_SendWindowGroupBehind';
  3175. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3176. {----------------------------------------------------------------------------------}
  3177. { ¥ÊGroup containment hierarchy manipulation }
  3178. {----------------------------------------------------------------------------------}
  3179. {
  3180. * GetWindowGroup()
  3181. *
  3182. * Summary:
  3183. * Gets the window group that contains a window.
  3184. *
  3185. * Discussion:
  3186. * The refcount of the group returned by this API is not
  3187. * incremented, and the caller does not need to release the
  3188. * reference.
  3189. *
  3190. * Mac OS X threading:
  3191. * Not thread safe
  3192. *
  3193. * Parameters:
  3194. *
  3195. * inWindow:
  3196. * The window whose containing group to retrieve.
  3197. *
  3198. * Availability:
  3199. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3200. * CarbonLib: in CarbonLib 1.4 and later
  3201. * Non-Carbon CFM: not available
  3202. }
  3203. function GetWindowGroup( inWindow: WindowRef ): WindowGroupRef; external name '_GetWindowGroup';
  3204. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3205. {
  3206. * SetWindowGroup()
  3207. *
  3208. * Summary:
  3209. * Sets the window group that contains a window.
  3210. *
  3211. * Discussion:
  3212. * The windowÕs z-order relative to windows in the current process
  3213. * may also be changed by this API. If the new window group is
  3214. * z-ordered above the windowÕs current group, the window will be
  3215. * placed at the end of the new group. If the new window group is
  3216. * z-ordered below the windowÕs current group, the window will be
  3217. * placed at the top of the new group. You may not place a window
  3218. * directly into the root group.
  3219. *
  3220. * Mac OS X threading:
  3221. * Not thread safe
  3222. *
  3223. * Parameters:
  3224. *
  3225. * inWindow:
  3226. * The window whose group to change.
  3227. *
  3228. * inNewGroup:
  3229. * The new containing group.
  3230. *
  3231. * Availability:
  3232. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3233. * CarbonLib: in CarbonLib 1.4 and later
  3234. * Non-Carbon CFM: not available
  3235. }
  3236. function SetWindowGroup( inWindow: WindowRef; inNewGroup: WindowGroupRef ): OSStatus; external name '_SetWindowGroup';
  3237. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3238. {
  3239. * IsWindowContainedInGroup()
  3240. *
  3241. * Summary:
  3242. * Indicates whether a window is contained within a group or any of
  3243. * its subgroups.
  3244. *
  3245. * Mac OS X threading:
  3246. * Not thread safe
  3247. *
  3248. * Parameters:
  3249. *
  3250. * inWindow:
  3251. * The window whose containment to examine.
  3252. *
  3253. * inGroup:
  3254. * The group that might contain the window.
  3255. *
  3256. * Availability:
  3257. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3258. * CarbonLib: in CarbonLib 1.4 and later
  3259. * Non-Carbon CFM: not available
  3260. }
  3261. function IsWindowContainedInGroup( inWindow: WindowRef; inGroup: WindowGroupRef ): Boolean; external name '_IsWindowContainedInGroup';
  3262. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3263. {
  3264. * GetWindowGroupParent()
  3265. *
  3266. * Summary:
  3267. * Gets the window group that contains a group.
  3268. *
  3269. * Mac OS X threading:
  3270. * Not thread safe
  3271. *
  3272. * Parameters:
  3273. *
  3274. * inGroup:
  3275. * The group whose containing group to retrieve.
  3276. *
  3277. * outGroup:
  3278. * On exit, the containing window group of the group. The groupÕs
  3279. * refcount is not incremented by this API, and the caller does
  3280. * not need to release the reference.
  3281. *
  3282. * Availability:
  3283. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3284. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  3285. * Non-Carbon CFM: not available
  3286. }
  3287. function GetWindowGroupParent( inGroup: WindowGroupRef ): WindowGroupRef; external name '_GetWindowGroupParent';
  3288. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3289. {
  3290. * SetWindowGroupParent()
  3291. *
  3292. * Summary:
  3293. * Sets the window group that contains a group.
  3294. *
  3295. * Discussion:
  3296. * SetWindowGroupParent currently requires that the group have no
  3297. * windows in it.
  3298. *
  3299. * Mac OS X threading:
  3300. * Not thread safe
  3301. *
  3302. * Parameters:
  3303. *
  3304. * inGroup:
  3305. * The group whose containing group to change.
  3306. *
  3307. * inNewGroup:
  3308. * The new containing group.
  3309. *
  3310. * Availability:
  3311. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3312. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  3313. * Non-Carbon CFM: not available
  3314. }
  3315. function SetWindowGroupParent( inGroup: WindowGroupRef; inNewGroup: WindowGroupRef ): OSStatus; external name '_SetWindowGroupParent';
  3316. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3317. {
  3318. * GetWindowGroupSibling()
  3319. *
  3320. * Summary:
  3321. * Returns the next or previous group of a window group.
  3322. *
  3323. * Mac OS X threading:
  3324. * Not thread safe
  3325. *
  3326. * Parameters:
  3327. *
  3328. * inGroup:
  3329. * The group whose sibling to return.
  3330. *
  3331. * inNextGroup:
  3332. * True to return the next sibling, false to return the previous
  3333. * sibling.
  3334. *
  3335. * Availability:
  3336. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3337. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  3338. * Non-Carbon CFM: not available
  3339. }
  3340. function GetWindowGroupSibling( inGroup: WindowGroupRef; inNextGroup: Boolean ): WindowGroupRef; external name '_GetWindowGroupSibling';
  3341. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3342. {
  3343. * GetWindowGroupOwner()
  3344. *
  3345. * Summary:
  3346. * Returns the window that owns a window group, or NULL if none.
  3347. *
  3348. * Discussion:
  3349. * A window may own one or more window groups. The windows in an
  3350. * owned window group will always be z-ordered above the owner
  3351. * window. Whenever the owner window changes z-order, the windows in
  3352. * the groups owned by the window will be moved also.
  3353. *
  3354. * Mac OS X threading:
  3355. * Not thread safe
  3356. *
  3357. * Parameters:
  3358. *
  3359. * inGroup:
  3360. * The group whose owner to retrieve.
  3361. *
  3362. * Availability:
  3363. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3364. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  3365. * Non-Carbon CFM: not available
  3366. }
  3367. function GetWindowGroupOwner( inGroup: WindowGroupRef ): WindowRef; external name '_GetWindowGroupOwner';
  3368. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3369. {
  3370. * SetWindowGroupOwner()
  3371. *
  3372. * Summary:
  3373. * Sets the window that owns a window group.
  3374. *
  3375. * Discussion:
  3376. * The group and the window must have the same parent group.
  3377. * SetWindowGroupOwner currently requires that the group have no
  3378. * windows in it.
  3379. *
  3380. * Mac OS X threading:
  3381. * Not thread safe
  3382. *
  3383. * Parameters:
  3384. *
  3385. * inGroup:
  3386. * The group whose owner to set.
  3387. *
  3388. * inWindow:
  3389. * The group's new owner.
  3390. *
  3391. * Availability:
  3392. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3393. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  3394. * Non-Carbon CFM: not available
  3395. }
  3396. function SetWindowGroupOwner( inGroup: WindowGroupRef; inWindow: WindowRef ): OSStatus; external name '_SetWindowGroupOwner';
  3397. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3398. {----------------------------------------------------------------------------------}
  3399. { ¥ Inspection of group contents }
  3400. {----------------------------------------------------------------------------------}
  3401. {
  3402. * CountWindowGroupContents()
  3403. *
  3404. * Summary:
  3405. * Counts the windows or groups contained in a group.
  3406. *
  3407. * Mac OS X threading:
  3408. * Not thread safe
  3409. *
  3410. * Parameters:
  3411. *
  3412. * inGroup:
  3413. * The group whose contents to count.
  3414. *
  3415. * inOptions:
  3416. * Specifies how to count the groupÕs contents.
  3417. *
  3418. * Availability:
  3419. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3420. * CarbonLib: in CarbonLib 1.4 and later
  3421. * Non-Carbon CFM: not available
  3422. }
  3423. function CountWindowGroupContents( inGroup: WindowGroupRef; inOptions: WindowGroupContentOptions ): ItemCount; external name '_CountWindowGroupContents';
  3424. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3425. {
  3426. * GetWindowGroupContents()
  3427. *
  3428. * Summary:
  3429. * Retrieves the windows or groups contained in a group.
  3430. *
  3431. * Discussion:
  3432. * The windows or groups returned by this API will be placed into
  3433. * the output buffer in z-order, from highest to lowest.
  3434. *
  3435. * Mac OS X threading:
  3436. * Not thread safe
  3437. *
  3438. * Parameters:
  3439. *
  3440. * inGroup:
  3441. * The group whose contents to retrieve.
  3442. *
  3443. * inOptions:
  3444. * Specifies which content to retrieve.
  3445. *
  3446. * inAllowedItems:
  3447. * The number of items that will fit in the output buffer.
  3448. *
  3449. * outNumItems:
  3450. * On exit, the number of items that were returned. May be NULL.
  3451. *
  3452. * outItems:
  3453. * On entry, points to enough memory to hold inAllowedSize
  3454. * WindowRefs or WindowGroupRefs. On exit, contains *outNumItems
  3455. * WindowRefs or WindowGroupRefs.
  3456. *
  3457. * Availability:
  3458. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3459. * CarbonLib: in CarbonLib 1.4 and later
  3460. * Non-Carbon CFM: not available
  3461. }
  3462. function GetWindowGroupContents( inGroup: WindowGroupRef; inOptions: WindowGroupContentOptions; inAllowedItems: ItemCount; outNumItems: ItemCountPtr { can be NULL }; var outItems: UnivPtr ): OSStatus; external name '_GetWindowGroupContents';
  3463. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3464. {
  3465. * GetIndexedWindow()
  3466. *
  3467. * Summary:
  3468. * Retrieves a specified window from a group.
  3469. *
  3470. * Discussion:
  3471. * GetIndexedWindow is provided as an easier way to get a particular
  3472. * window from a group than using GetWindowGroupContents. If you
  3473. * only need to retrieve, say, the last window in a group, it is
  3474. * easier and more efficient to use GetIndexedWindow. If you need to
  3475. * retrieve all the windows in a group, it is more efficient to use
  3476. * GetWindowGroupContents.
  3477. *
  3478. * Mac OS X threading:
  3479. * Not thread safe
  3480. *
  3481. * Parameters:
  3482. *
  3483. * inGroup:
  3484. * The group containing the window to retrieve.
  3485. *
  3486. * inIndex:
  3487. * The index of the window. This parameter may range from 1 to
  3488. * CountWindowGroupContents( inGroup,
  3489. * kWindowGroupContentsReturnWindows | inOptions );
  3490. *
  3491. * inOptions:
  3492. * Indicates how to locate the specified window.
  3493. * kWindowGroupContentsReturnWindows is implied by this API and
  3494. * does not need to be explicitly specified.
  3495. *
  3496. * outWindow:
  3497. * On exit, the window at the specified index.
  3498. *
  3499. * Availability:
  3500. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3501. * CarbonLib: in CarbonLib 1.4 and later
  3502. * Non-Carbon CFM: not available
  3503. }
  3504. function GetIndexedWindow( inGroup: WindowGroupRef; inIndex: ItemCount; inOptions: WindowGroupContentOptions; var outWindow: WindowRef ): OSStatus; external name '_GetIndexedWindow';
  3505. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3506. {
  3507. * GetWindowIndex()
  3508. *
  3509. * Summary:
  3510. * Retrieves the z-order index of a window inside a group.
  3511. *
  3512. * Discussion:
  3513. * The z-order index of a window is its relative position in z-order
  3514. * inside a group. The index ranges from 1 to the number of windows
  3515. * in the group.
  3516. *
  3517. * Mac OS X threading:
  3518. * Not thread safe
  3519. *
  3520. * Parameters:
  3521. *
  3522. * inWindow:
  3523. * The window whose z-order index to retrieve.
  3524. *
  3525. * inStartGroup:
  3526. * The group on which to base the z-order index. This should be
  3527. * either the containing group of the window, or NULL. If NULL,
  3528. * this API returns the z-order index of the window across the
  3529. * entire process.
  3530. *
  3531. * inOptions:
  3532. * Indicates how to enumerate the specified window.
  3533. * kWindowGroupContentsReturnWindows is implied by this API and
  3534. * does not need to be explicitly specified.
  3535. *
  3536. * outIndex:
  3537. * On exit, contains the windowÕs z-order index.
  3538. *
  3539. * Availability:
  3540. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3541. * CarbonLib: in CarbonLib 1.4 and later
  3542. * Non-Carbon CFM: not available
  3543. }
  3544. function GetWindowIndex( inWindow: WindowRef; inStartGroup: WindowGroupRef; inOptions: WindowGroupContentOptions; var outIndex: ItemCount ): OSStatus; external name '_GetWindowIndex';
  3545. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3546. {----------------------------------------------------------------------------------}
  3547. { ¥ÊWindow activation }
  3548. {----------------------------------------------------------------------------------}
  3549. {
  3550. * ActiveNonFloatingWindow()
  3551. *
  3552. * Summary:
  3553. * Returns the window, among all windows with activation scope of
  3554. * kWindowActivationScopeAll, that is considered active.
  3555. *
  3556. * Discussion:
  3557. * The Mac OS 8.5 Window Manager introduced the
  3558. * FrontNonFloatingWindow API, which was designed to return the
  3559. * window that should be considered active by the application. With
  3560. * the advent of window groups, it is now possible to have a window
  3561. * that looks active (is highlighted, and accepts keyboard input)
  3562. * but to have other non-floating windows grouped above the active
  3563. * window. The ActiveNonFloatingWindow API returns the active window
  3564. * regardless of where it is positioned in the z-order. Most code
  3565. * that currently uses FrontNonFloatingWindow or
  3566. * GetFrontWindowOfClass(kDocumentWindowClass) to get the active
  3567. * window should use ActiveNonFloatingWindow instead.
  3568. *
  3569. * Mac OS X threading:
  3570. * Not thread safe
  3571. *
  3572. * Availability:
  3573. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3574. * CarbonLib: in CarbonLib 1.4 and later
  3575. * Non-Carbon CFM: not available
  3576. }
  3577. function ActiveNonFloatingWindow: WindowRef; external name '_ActiveNonFloatingWindow';
  3578. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3579. {
  3580. * IsWindowActive()
  3581. *
  3582. * Summary:
  3583. * Indicates whether a window is active.
  3584. *
  3585. * Discussion:
  3586. * Whether a window is considered active is determined by its
  3587. * activation scope, hiliting, and z-order. For windows that have an
  3588. * activation scope of kWindowActivationScopeAll, a window is active
  3589. * if it is the window returned by the ActiveNonFloatingWindow API,
  3590. * or if it is in the same window group as the window returned by
  3591. * that API and the window group has the
  3592. * kWindowGroupAttrSharedActivation attribute. For windows that have
  3593. * some other activation scope, the window is active if its window
  3594. * frame is hilited and the window is the frontmost window in its
  3595. * window group.
  3596. *
  3597. * The IsWindowActive API does not indicate whether the window has
  3598. * keyboard focus. To get the window with keyboard focus, use
  3599. * GetUserFocusWindow().
  3600. *
  3601. * Mac OS X threading:
  3602. * Not thread safe
  3603. *
  3604. * Parameters:
  3605. *
  3606. * inWindow:
  3607. * The window whose active state to retrieve.
  3608. *
  3609. * Availability:
  3610. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3611. * CarbonLib: in CarbonLib 1.4 and later
  3612. * Non-Carbon CFM: not available
  3613. }
  3614. function IsWindowActive( inWindow: WindowRef ): Boolean; external name '_IsWindowActive';
  3615. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3616. {
  3617. * ActivateWindow()
  3618. *
  3619. * Summary:
  3620. * Activates or deactivates a window.
  3621. *
  3622. * Discussion:
  3623. * Window activation consists of two steps: hiliting the window
  3624. * frame and sending an activate event to the window. ActivateWindow
  3625. * handles both of these steps and also updates internal Window
  3626. * Manager state. If you just need to hilite the window frame, you
  3627. * may use HiliteWindow. If you need to send an activate event, you
  3628. * should always use ActivateWindow rather than creating and sending
  3629. * the event yourself.
  3630. *
  3631. * Mac OS X threading:
  3632. * Not thread safe
  3633. *
  3634. * Parameters:
  3635. *
  3636. * inWindow:
  3637. * The window to activate or deactivate.
  3638. *
  3639. * inActivate:
  3640. * Whether to activate or deactivate the window.
  3641. *
  3642. * Availability:
  3643. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3644. * CarbonLib: in CarbonLib 1.4 and later
  3645. * Non-Carbon CFM: not available
  3646. }
  3647. function ActivateWindow( inWindow: WindowRef; inActivate: Boolean ): OSStatus; external name '_ActivateWindow';
  3648. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3649. {
  3650. * GetWindowActivationScope()
  3651. *
  3652. * Summary:
  3653. * Retrieves a windowÕs activation scope.
  3654. *
  3655. * Mac OS X threading:
  3656. * Not thread safe
  3657. *
  3658. * Parameters:
  3659. *
  3660. * inWindow:
  3661. * The window whose activation scope to retrieve.
  3662. *
  3663. * outScope:
  3664. * On exit, the windowÕs activation scope.
  3665. *
  3666. * Availability:
  3667. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3668. * CarbonLib: in CarbonLib 1.4 and later
  3669. * Non-Carbon CFM: not available
  3670. }
  3671. function GetWindowActivationScope( inWindow: WindowRef; var outScope: WindowActivationScope ): OSStatus; external name '_GetWindowActivationScope';
  3672. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3673. {
  3674. * SetWindowActivationScope()
  3675. *
  3676. * Summary:
  3677. * Sets a windowÕs activation scope.
  3678. *
  3679. * Mac OS X threading:
  3680. * Not thread safe
  3681. *
  3682. * Parameters:
  3683. *
  3684. * inWindow:
  3685. * The window whose activation scope to set.
  3686. *
  3687. * inScope:
  3688. * The new activation scope.
  3689. *
  3690. * Availability:
  3691. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3692. * CarbonLib: in CarbonLib 1.4 and later
  3693. * Non-Carbon CFM: not available
  3694. }
  3695. function SetWindowActivationScope( inWindow: WindowRef; inScope: WindowActivationScope ): OSStatus; external name '_SetWindowActivationScope';
  3696. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3697. {--------------------------------------------------------------------------------------}
  3698. { ¥ Window Focus }
  3699. { The 'user focus' is where keyboard input goes. We also use the term 'key' applied }
  3700. { to windows to mean this. The user focus window is normally the active non-floating }
  3701. { window or dialog. It is possible to make a floater get the focus, however, by calling}
  3702. { SetUserFocusWindow. After that call, the event model will automatically route key }
  3703. { input to the active keyboard focus of that window, if any. Passing kUserFocusAuto }
  3704. { into the window parameter tells the toolbox to pick what it considers to be the best }
  3705. { candidate for focus. You should call this to restore focus, rather than getting the }
  3706. { focus, setting it to a special window, and then restoring to the saved focus. There }
  3707. { are cases, however, when you might want to restore to an explicit window, but the }
  3708. { typical usage should just be to restore to the kUserFocusAuto focus. }
  3709. { Keep in mind that setting the focus will only last until you restore focus, or the }
  3710. { user starts clicking in other windows. When that happens, the toolbox will auto- }
  3711. { redirect the user focus to a newly selected window. }
  3712. {--------------------------------------------------------------------------------------}
  3713. { pick the most appropriate window for focus}
  3714. {$endc} {not TARGET_CPU_64}
  3715. const kUserFocusAuto = WindowRef(-1);
  3716. {$ifc not TARGET_CPU_64}
  3717. {
  3718. * SetUserFocusWindow()
  3719. *
  3720. * Summary:
  3721. * Sets the window that receives keyboard input.
  3722. *
  3723. * Mac OS X threading:
  3724. * Not thread safe
  3725. *
  3726. * Parameters:
  3727. *
  3728. * inWindow:
  3729. * The window that should receive user input. You may also pass
  3730. * kUserFocusAuto to cause the toolbox to pick a default window
  3731. * for user focus (typically, this will be the active window).
  3732. *
  3733. *
  3734. * If the focus changes to a new window, the
  3735. * kEventWindowFocusAcquired Carbon event will be sent to the
  3736. * newly focused window, and the kEventWindowFocusRelinquish
  3737. * Carbon event will be sent to the previously focused window.
  3738. *
  3739. * Availability:
  3740. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3741. * CarbonLib: in CarbonLib 1.1 and later
  3742. * Non-Carbon CFM: not available
  3743. }
  3744. function SetUserFocusWindow( inWindow: WindowRef ): OSStatus; external name '_SetUserFocusWindow';
  3745. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3746. {
  3747. * GetUserFocusWindow()
  3748. *
  3749. * Summary:
  3750. * Returns the window that receives keyboard input.
  3751. *
  3752. * Mac OS X threading:
  3753. * Not thread safe
  3754. *
  3755. * Result:
  3756. * The window that is currently receiving keyboard input.
  3757. *
  3758. * Availability:
  3759. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3760. * CarbonLib: in CarbonLib 1.1 and later
  3761. * Non-Carbon CFM: not available
  3762. }
  3763. function GetUserFocusWindow: WindowRef; external name '_GetUserFocusWindow';
  3764. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3765. {
  3766. * HIWindowShowsFocus()
  3767. *
  3768. * Summary:
  3769. * Returns whether a window's content should show focus indicators,
  3770. * such as focus rings.
  3771. *
  3772. * Discussion:
  3773. * This API returns true if the window is either the modeless focus
  3774. * or the effective focus.
  3775. *
  3776. * Mac OS X threading:
  3777. * Not thread safe
  3778. *
  3779. * Parameters:
  3780. *
  3781. * inWindow:
  3782. * The window whose status to return.
  3783. *
  3784. * Result:
  3785. * Whether this window's content should show focus indicators.
  3786. *
  3787. * Availability:
  3788. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  3789. * CarbonLib: not available
  3790. * Non-Carbon CFM: not available
  3791. }
  3792. function HIWindowShowsFocus( inWindow: WindowRef ): Boolean; external name '_HIWindowShowsFocus';
  3793. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  3794. {--------------------------------------------------------------------------------------}
  3795. { ¥ Default/Cancel buttons }
  3796. { In our quest to eliminate the need for dialogs when using the new event model, we }
  3797. { have added the following routines which add dialog-like button control to normal }
  3798. { windows. With these routines, you can set the default and cancel buttons for a }
  3799. { window; these work just like the corresponding concepts in dialogs, and when }
  3800. { present, the standard toolbox handlers will handle keyboard input mapping to these }
  3801. { buttons. This means that pressing return or enter will 'press' the default button }
  3802. { and escape or command-period will 'press' the cancel button. }
  3803. {--------------------------------------------------------------------------------------}
  3804. {
  3805. * SetWindowDefaultButton()
  3806. *
  3807. * Mac OS X threading:
  3808. * Not thread safe
  3809. *
  3810. * Availability:
  3811. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3812. * CarbonLib: in CarbonLib 1.1 and later
  3813. * Non-Carbon CFM: not available
  3814. }
  3815. function SetWindowDefaultButton( inWindow: WindowRef; inControl: ControlRef { can be NULL } ): OSStatus; external name '_SetWindowDefaultButton';
  3816. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3817. {
  3818. * SetWindowCancelButton()
  3819. *
  3820. * Mac OS X threading:
  3821. * Not thread safe
  3822. *
  3823. * Availability:
  3824. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3825. * CarbonLib: in CarbonLib 1.1 and later
  3826. * Non-Carbon CFM: not available
  3827. }
  3828. function SetWindowCancelButton( inWindow: WindowRef; inControl: ControlRef { can be NULL } ): OSStatus; external name '_SetWindowCancelButton';
  3829. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3830. {
  3831. * GetWindowDefaultButton()
  3832. *
  3833. * Mac OS X threading:
  3834. * Not thread safe
  3835. *
  3836. * Availability:
  3837. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3838. * CarbonLib: in CarbonLib 1.1 and later
  3839. * Non-Carbon CFM: not available
  3840. }
  3841. function GetWindowDefaultButton( inWindow: WindowRef; var outControl: ControlRef ): OSStatus; external name '_GetWindowDefaultButton';
  3842. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3843. {
  3844. * GetWindowCancelButton()
  3845. *
  3846. * Mac OS X threading:
  3847. * Not thread safe
  3848. *
  3849. * Availability:
  3850. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3851. * CarbonLib: in CarbonLib 1.1 and later
  3852. * Non-Carbon CFM: not available
  3853. }
  3854. function GetWindowCancelButton( inWindow: WindowRef; var outControl: ControlRef ): OSStatus; external name '_GetWindowCancelButton';
  3855. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3856. {----------------------------------------------------------------------------------}
  3857. { ¥ÊThemeBrush and ThemeTextColor support }
  3858. {----------------------------------------------------------------------------------}
  3859. {
  3860. * SetThemeWindowBackground()
  3861. *
  3862. * Mac OS X threading:
  3863. * Not thread safe
  3864. *
  3865. * Availability:
  3866. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3867. * CarbonLib: in CarbonLib 1.0 and later
  3868. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  3869. }
  3870. function SetThemeWindowBackground( inWindow: WindowRef; inBrush: ThemeBrush; inUpdate: Boolean ): OSStatus; external name '_SetThemeWindowBackground';
  3871. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3872. {
  3873. * HIWindowGetThemeBackground()
  3874. *
  3875. * Summary:
  3876. * Gets the the window theme background brush.
  3877. *
  3878. * Discussion:
  3879. * Gets the the window theme background brush which may have been
  3880. * previously set by SetThemeWindowBackground.
  3881. *
  3882. * Mac OS X threading:
  3883. * Not thread safe
  3884. *
  3885. * Parameters:
  3886. *
  3887. * inWindow:
  3888. * The window from which to get the brush.
  3889. *
  3890. * outThemeBrush:
  3891. * On return, inWindow's background brush.
  3892. *
  3893. * Result:
  3894. * An operating system result code. If no brush is found
  3895. * themeNoAppropriateBrushErr will be returned.
  3896. *
  3897. * Availability:
  3898. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  3899. * CarbonLib: not available
  3900. * Non-Carbon CFM: not available
  3901. }
  3902. function HIWindowGetThemeBackground( inWindow: WindowRef; var outThemeBrush: ThemeBrush ): OSStatus; external name '_HIWindowGetThemeBackground';
  3903. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  3904. {
  3905. * SetThemeTextColorForWindow()
  3906. *
  3907. * Summary:
  3908. * Sets a text color which contrasts with a theme brush.
  3909. *
  3910. * Discussion:
  3911. * SetThemeTextColorForWindow sets a text color in the specified
  3912. * window's port that contrasts with the theme brush associated with
  3913. * the specified window, and also matches the inActive parameter.
  3914. * Only a subset of the theme brushes have theme text colors:
  3915. * currently (as of Mac OS 9 and Mac OS X 10.5), the Alert, Dialog,
  3916. * ModelessDialog, and Notification brushes have corresponding text
  3917. * colors. For any other brush, SetThemeTextColorForWindow returns
  3918. * themeNoAppropriateBrushErr and does not modify the text color.
  3919. *
  3920. * Mac OS X threading:
  3921. * Not thread safe
  3922. *
  3923. * Parameters:
  3924. *
  3925. * inWindow:
  3926. * The window whose text color to change.
  3927. *
  3928. * inActive:
  3929. * Whether the text color should indicate an active or inactive
  3930. * state.
  3931. *
  3932. * inDepth:
  3933. * The bit depth of the window's port.
  3934. *
  3935. * inColorDev:
  3936. * Whether the window's port is color or black&white.
  3937. *
  3938. * Result:
  3939. * An operating system result code, including
  3940. * themeNoAppropriateBrushErr if the specified theme brush does not
  3941. * have a corresponding theme text color.
  3942. *
  3943. * Availability:
  3944. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3945. * CarbonLib: in CarbonLib 1.0 and later
  3946. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  3947. }
  3948. function SetThemeTextColorForWindow( inWindow: WindowRef; inActive: Boolean; inDepth: SInt16; inColorDev: Boolean ): OSStatus; external name '_SetThemeTextColorForWindow';
  3949. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3950. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3951. { ¥ Background Image }
  3952. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3953. {
  3954. Routines available from Mac OS 8.5 forward
  3955. or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
  3956. }
  3957. {
  3958. * SetWindowContentColor()
  3959. *
  3960. * Mac OS X threading:
  3961. * Not thread safe
  3962. *
  3963. * Availability:
  3964. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3965. * CarbonLib: in CarbonLib 1.0 and later
  3966. * Non-Carbon CFM: in WindowsLib 8.5 and later
  3967. }
  3968. function SetWindowContentColor( window: WindowRef; const (*var*) color: RGBColor ): OSStatus; external name '_SetWindowContentColor';
  3969. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3970. {
  3971. * GetWindowContentColor()
  3972. *
  3973. * Mac OS X threading:
  3974. * Not thread safe
  3975. *
  3976. * Availability:
  3977. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3978. * CarbonLib: in CarbonLib 1.0 and later
  3979. * Non-Carbon CFM: in WindowsLib 8.5 and later
  3980. }
  3981. function GetWindowContentColor( window: WindowRef; var color: RGBColor ): OSStatus; external name '_GetWindowContentColor';
  3982. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3983. { Routines available from Mac OS 8.5 forward}
  3984. {
  3985. * GetWindowContentPattern()
  3986. *
  3987. * Mac OS X threading:
  3988. * Not thread safe
  3989. *
  3990. * Availability:
  3991. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  3992. * CarbonLib: in CarbonLib 1.0 and later
  3993. * Non-Carbon CFM: in WindowsLib 8.5 and later
  3994. }
  3995. function GetWindowContentPattern( window: WindowRef; outPixPat: PixPatHandle ): OSStatus; external name '_GetWindowContentPattern';
  3996. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3997. {
  3998. * SetWindowContentPattern()
  3999. *
  4000. * Mac OS X threading:
  4001. * Not thread safe
  4002. *
  4003. * Availability:
  4004. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4005. * CarbonLib: in CarbonLib 1.0 and later
  4006. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4007. }
  4008. function SetWindowContentPattern( window: WindowRef; pixPat: PixPatHandle ): OSStatus; external name '_SetWindowContentPattern';
  4009. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4010. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4011. { ¥ Colorspace and Depth }
  4012. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4013. {
  4014. * HIWindowSetColorSpace()
  4015. *
  4016. * Summary:
  4017. * Sets the colorspace used for window content that is drawn by the
  4018. * application with no other specified colorspace.
  4019. *
  4020. * Discussion:
  4021. * Typically this API should be used immediately after a window is
  4022. * created, before the window is made visible. If the window
  4023. * colorspace is changed while the window is visible, the window
  4024. * will be redrawn.
  4025. *
  4026. * Note that setting a colorspace on a window with the
  4027. * kHIWindowBitAutoCalibration attribute prevents the window from
  4028. * receiving automatic color space updates. Clearing the colorspace
  4029. * by passing NULL restores the kHIWindowBitAutoCalibration
  4030. * functionality.
  4031. *
  4032. * Mac OS X threading:
  4033. * Not thread safe
  4034. *
  4035. * Parameters:
  4036. *
  4037. * inWindow:
  4038. * The window whose colorspace to change.
  4039. *
  4040. * inColorSpace:
  4041. * The window's new colorspace. The colorspace will be retained or
  4042. * copied by the window. Pass NULL to clear any previously-set
  4043. * colorspace.
  4044. *
  4045. * Availability:
  4046. * Mac OS X: in version 10.6 and later in Carbon.framework [32-bit only]
  4047. * CarbonLib: not available
  4048. * Non-Carbon CFM: not available
  4049. }
  4050. function HIWindowSetColorSpace( inWindow: WindowRef; inColorSpace: CGColorSpaceRef { can be NULL } ): OSStatus; external name '_HIWindowSetColorSpace';
  4051. (* AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER *)
  4052. {
  4053. * HIWindowCopyColorSpace()
  4054. *
  4055. * Summary:
  4056. * Retrieves the colorspace for a window.
  4057. *
  4058. * Discussion:
  4059. * If this API is called before a color space has been explicitly
  4060. * assigned to a window, the window's default colorspace is returned.
  4061. *
  4062. * Mac OS X threading:
  4063. * Not thread safe
  4064. *
  4065. * Parameters:
  4066. *
  4067. * inWindow:
  4068. * The window whose colorspace to retrieve.
  4069. *
  4070. * Result:
  4071. * The window's colorspace, or NULL if an error occurs. The
  4072. * colorspace has been retained and should be released by the caller
  4073. * when the caller is done with it.
  4074. *
  4075. * Availability:
  4076. * Mac OS X: in version 10.6 and later in Carbon.framework [32-bit only]
  4077. * CarbonLib: not available
  4078. * Non-Carbon CFM: not available
  4079. }
  4080. function HIWindowCopyColorSpace( inWindow: WindowRef ): CGColorSpaceRef; external name '_HIWindowCopyColorSpace';
  4081. (* AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER *)
  4082. {$endc} {not TARGET_CPU_64}
  4083. {
  4084. * Summary:
  4085. * Window backing store depth types.
  4086. }
  4087. const
  4088. {
  4089. * The window is invalid or its backing store pixel size is unknown.
  4090. }
  4091. kHIWindowDepthInvalid = 0;
  4092. {
  4093. * The window's backing store pixel size should be 32 bits.
  4094. }
  4095. kHIWindowDepth32Bit = 1;
  4096. {
  4097. * The window's backing store pixel size should be 64 bits.
  4098. }
  4099. kHIWindowDepth64Bit = 2;
  4100. {
  4101. * The window's backing store pixel size should be the size of a
  4102. * float.
  4103. }
  4104. kHIWindowDepthFloat = 3;
  4105. type
  4106. HIWindowDepth = UInt32;
  4107. {$ifc not TARGET_CPU_64}
  4108. {
  4109. * HIWindowSetDepth() *** DEPRECATED ***
  4110. *
  4111. * Deprecated:
  4112. * This API is not actually functional in Mac OS X 10.6 or Mac OS X
  4113. * 10.7 and should not be used. Applications that need to control
  4114. * the backing store depth of their windows should use NSWindows and
  4115. * the [NSWindow setDepthLimit:] API.
  4116. *
  4117. * Summary:
  4118. * Sets the depth of a window's backing store.
  4119. *
  4120. * Discussion:
  4121. * Typically this API should be used immediately after a window is
  4122. * created, before the window is made visible. If the window depth
  4123. * is changed while the window is visible, the window will be
  4124. * redrawn.
  4125. *
  4126. * Mac OS X threading:
  4127. * Not thread safe
  4128. *
  4129. * Parameters:
  4130. *
  4131. * inWindow:
  4132. * The window whose backing store depth to change.
  4133. *
  4134. * inDepth:
  4135. * The new window depth type. This must be one of
  4136. * kHIWindowDepth32Bit, 64Bit, or Float.
  4137. *
  4138. * Availability:
  4139. * Mac OS X: in version 10.6 and later in Carbon.framework [32-bit only] but deprecated in 10.7
  4140. * CarbonLib: not available
  4141. * Non-Carbon CFM: not available
  4142. }
  4143. function HIWindowSetDepth( inWindow: WindowRef; inDepth: HIWindowDepth ): OSStatus; external name '_HIWindowSetDepth';
  4144. (* AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  4145. {
  4146. * HIWindowGetDepth()
  4147. *
  4148. * Summary:
  4149. * Returns the current depth of the backing store of a window.
  4150. *
  4151. * Discussion:
  4152. * This API returns an HIWindowDepth value corresponding to the
  4153. * actual depth of the backing store. It will return one of
  4154. * kHIWindowDepth32Bit, 64Bit, or Float.
  4155. *
  4156. * Mac OS X threading:
  4157. * Not thread safe
  4158. *
  4159. * Parameters:
  4160. *
  4161. * inWindow:
  4162. * The window whose backing store depth to return.
  4163. *
  4164. * Result:
  4165. * The window's backing store depth type (one of
  4166. * kHIWindowDepth32Bit, 64Bit, or Float), or kHIWindowDepthInvalid
  4167. * if an error occurs.
  4168. *
  4169. * Availability:
  4170. * Mac OS X: in version 10.6 and later in Carbon.framework [32-bit only]
  4171. * CarbonLib: not available
  4172. * Non-Carbon CFM: not available
  4173. }
  4174. function HIWindowGetDepth( inWindow: WindowRef ): HIWindowDepth; external name '_HIWindowGetDepth';
  4175. (* AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER *)
  4176. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4177. { ¥ Scrolling Routines }
  4178. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4179. {$endc} {not TARGET_CPU_64}
  4180. type
  4181. ScrollWindowOptions = UInt32;
  4182. const
  4183. kScrollWindowNoOptions = 0;
  4184. kScrollWindowInvalidate = 1 shl 0; { add the exposed area to the windowÕs update region}
  4185. kScrollWindowEraseToPortBackground = 1 shl 1; { erase the exposed area using the background color/pattern of the windowÕs grafport}
  4186. { Routines available from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward}
  4187. {$ifc not TARGET_CPU_64}
  4188. {
  4189. * ScrollWindowRect()
  4190. *
  4191. * Summary:
  4192. * Moves a rectangular portion of a window by a specified horizontal
  4193. * and vertical amount.
  4194. *
  4195. * Discussion:
  4196. * This API is only recommended for non-composited windows. For a
  4197. * composited window, use HIViewScrollRect or simply invalidate the
  4198. * view and redraw it at its scrolled position.
  4199. *
  4200. * Mac OS X threading:
  4201. * Not thread safe
  4202. *
  4203. * Availability:
  4204. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4205. * CarbonLib: in CarbonLib 1.0 and later
  4206. * Non-Carbon CFM: not available
  4207. }
  4208. function ScrollWindowRect( inWindow: WindowRef; const (*var*) inScrollRect: Rect; inHPixels: SInt16; inVPixels: SInt16; inOptions: ScrollWindowOptions; outExposedRgn: RgnHandle { can be NULL } ): OSStatus; external name '_ScrollWindowRect';
  4209. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4210. {
  4211. * ScrollWindowRegion()
  4212. *
  4213. * Summary:
  4214. * Moves a non-rectangular portion of a window by a specified
  4215. * horizontal and vertical amount.
  4216. *
  4217. * Discussion:
  4218. * This API is only recommended for non-composited windows. For a
  4219. * composited window, use HIViewScrollRect or simply invalidate the
  4220. * view and redraw it at its scrolled position.
  4221. *
  4222. * Mac OS X threading:
  4223. * Not thread safe
  4224. *
  4225. * Availability:
  4226. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4227. * CarbonLib: in CarbonLib 1.0 and later
  4228. * Non-Carbon CFM: not available
  4229. }
  4230. function ScrollWindowRegion( inWindow: WindowRef; inScrollRgn: RgnHandle; inHPixels: SInt16; inVPixels: SInt16; inOptions: ScrollWindowOptions; outExposedRgn: RgnHandle { can be NULL } ): OSStatus; external name '_ScrollWindowRegion';
  4231. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4232. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4233. { ¥ Window List }
  4234. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4235. {$endc} {not TARGET_CPU_64}
  4236. {
  4237. * Summary:
  4238. * Options for the HIWindowFindAtLocation API.
  4239. }
  4240. const
  4241. {
  4242. * Requests that HIWindowFindAtLocation ignore windows of other
  4243. * processes which might obscure your process's windows. That is, if
  4244. * a window in your process is at the specified point, it will be
  4245. * passed back even if some other process's window obscures it.
  4246. }
  4247. kHIWindowIgnoreObscuringWindows = 1 shl 0;
  4248. {$ifc not TARGET_CPU_64}
  4249. {
  4250. * HIWindowFindAtLocation()
  4251. *
  4252. * Summary:
  4253. * Finds a window in the current process at a specified location.
  4254. *
  4255. * Mac OS X threading:
  4256. * Not thread safe
  4257. *
  4258. * Parameters:
  4259. *
  4260. * inLocation:
  4261. * The global location. This may be specified in either screen
  4262. * pixel coordinates or virtual 72DPI coordinates, depending on
  4263. * the inSpace parameter.
  4264. *
  4265. * inSpace:
  4266. * The coordinate space in which the location is expressed. This
  4267. * must be kHICoordSpaceScreenPixel or kHICoordSpace72DPIGlobal.
  4268. *
  4269. * inStartWindow:
  4270. * The window at which to start the search, inclusive. Pass
  4271. * kFirstWindowOfClass (-1) to start the search at the beginning
  4272. * of the window list. Passing NULL will cause the search to start
  4273. * at the end of the window list, and therefore no window will be
  4274. * found.
  4275. *
  4276. * inOptions:
  4277. * Flags allowing you to request optional behavior for this API.
  4278. * If you want the default behavior, pass zero.
  4279. *
  4280. * outWindow:
  4281. * On exit, contains the window in the current process at the
  4282. * specified location, if any.
  4283. *
  4284. * outWindowPart:
  4285. * On exit, identifies the window part that was hit. You may pass
  4286. * NULL if you don't need this information.
  4287. *
  4288. * outWindowLocation:
  4289. * On exit, contains the specified location transformed into
  4290. * window-relative coordinates. This location will take into
  4291. * account any window transform or magnification.
  4292. *
  4293. * Availability:
  4294. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  4295. * CarbonLib: not available
  4296. * Non-Carbon CFM: not available
  4297. }
  4298. function HIWindowFindAtLocation( const (*var*) inLocation: HIPoint; inSpace: HICoordinateSpace; inStartWindow: WindowRef { can be NULL }; inOptions: OptionBits; var outWindow: WindowRef; outWindowPart: WindowPartCodePtr { can be NULL }; outWindowLocation: HIPointPtr { can be NULL } ): OSStatus; external name '_HIWindowFindAtLocation';
  4299. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  4300. {
  4301. * [Mac]FindWindow()
  4302. *
  4303. * Mac OS X threading:
  4304. * Not thread safe
  4305. *
  4306. * Availability:
  4307. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4308. * CarbonLib: in CarbonLib 1.0 and later
  4309. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  4310. }
  4311. {$ifc TARGET_OS_MAC}
  4312. function MacFindWindow( thePoint: Point; var window: WindowRef ): WindowPartCode; external name '_FindWindow';
  4313. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4314. {$endc} {TARGET_OS_MAC}
  4315. function FindWindow( thePoint: Point; var window: WindowRef ): WindowPartCode; external name '_FindWindow';
  4316. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4317. {
  4318. * BringToFront()
  4319. *
  4320. * Mac OS X threading:
  4321. * Not thread safe
  4322. *
  4323. * Availability:
  4324. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4325. * CarbonLib: in CarbonLib 1.0 and later
  4326. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  4327. }
  4328. procedure BringToFront( window: WindowRef ); external name '_BringToFront';
  4329. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4330. {
  4331. * SendBehind()
  4332. *
  4333. * Mac OS X threading:
  4334. * Not thread safe
  4335. *
  4336. * Availability:
  4337. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4338. * CarbonLib: in CarbonLib 1.0 and later
  4339. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  4340. }
  4341. procedure SendBehind( window: WindowRef; behindWindow: WindowRef ); external name '_SendBehind';
  4342. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4343. {
  4344. * SelectWindow()
  4345. *
  4346. * Mac OS X threading:
  4347. * Not thread safe
  4348. *
  4349. * Availability:
  4350. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4351. * CarbonLib: in CarbonLib 1.0 and later
  4352. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  4353. }
  4354. procedure SelectWindow( window: WindowRef ); external name '_SelectWindow';
  4355. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4356. {
  4357. Routines available from Mac OS 8.6 forward
  4358. or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
  4359. }
  4360. {
  4361. * FrontNonFloatingWindow()
  4362. *
  4363. * Mac OS X threading:
  4364. * Not thread safe
  4365. *
  4366. * Availability:
  4367. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4368. * CarbonLib: in CarbonLib 1.0 and later
  4369. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4370. }
  4371. function FrontNonFloatingWindow: WindowRef; external name '_FrontNonFloatingWindow';
  4372. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4373. { Routines available from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward}
  4374. {
  4375. * GetNextWindowOfClass()
  4376. *
  4377. * Mac OS X threading:
  4378. * Not thread safe
  4379. *
  4380. * Availability:
  4381. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4382. * CarbonLib: in CarbonLib 1.0 and later
  4383. * Non-Carbon CFM: not available
  4384. }
  4385. function GetNextWindowOfClass( inWindow: WindowRef; inWindowClass: WindowClass; mustBeVisible: Boolean ): WindowRef; external name '_GetNextWindowOfClass';
  4386. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4387. {
  4388. * GetFrontWindowOfClass()
  4389. *
  4390. * Mac OS X threading:
  4391. * Not thread safe
  4392. *
  4393. * Availability:
  4394. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4395. * CarbonLib: in CarbonLib 1.0 and later
  4396. * Non-Carbon CFM: not available
  4397. }
  4398. function GetFrontWindowOfClass( inWindowClass: WindowClass; mustBeVisible: Boolean ): WindowRef; external name '_GetFrontWindowOfClass';
  4399. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4400. {
  4401. * FindWindowOfClass()
  4402. *
  4403. * Mac OS X threading:
  4404. * Not thread safe
  4405. *
  4406. * Availability:
  4407. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4408. * CarbonLib: in CarbonLib 1.0 and later
  4409. * Non-Carbon CFM: not available
  4410. }
  4411. function FindWindowOfClass( const (*var*) where: Point; inWindowClass: WindowClass; var outWindow: WindowRef; outWindowPart: WindowPartCodePtr { can be NULL } ): OSStatus; external name '_FindWindowOfClass';
  4412. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4413. {$endc} {not TARGET_CPU_64}
  4414. {
  4415. * Summary:
  4416. * Options for the CreateStandardWindowMenu API.
  4417. }
  4418. const
  4419. {
  4420. * Requests the standard window menu include a Rotate Windows menu
  4421. * item. Available in Mac OS X 10.2.
  4422. }
  4423. kWindowMenuIncludeRotate = 1 shl 0;
  4424. {
  4425. * Summary:
  4426. * Constants for use with Get/SetMenuItemProperty to access property
  4427. * data of items in the standard window menu. These constants are
  4428. * supported on Mac OS X 10.5 and later.
  4429. }
  4430. const
  4431. {
  4432. * The property creator for accessing standard window menu item
  4433. * properties.
  4434. }
  4435. kHIWindowMenuCreator = FourCharCode('wind');
  4436. {
  4437. * The property tag for accessing standard window menu item
  4438. * properties that hold WindowRefs. Menu items with the
  4439. * kHICommandSelectWindow command ID will have a property with this
  4440. * tag that contains the WindowRef to be activated when that item is
  4441. * selected. Available in Mac OS X 10.5 and later.
  4442. }
  4443. kHIWindowMenuWindowTag = FourCharCode('wind');
  4444. {$ifc not TARGET_CPU_64}
  4445. {
  4446. * CreateStandardWindowMenu()
  4447. *
  4448. * Discussion:
  4449. * Creates a standard Window menu for your application. You can call
  4450. * this to create a window menu for your application. Once you have
  4451. * the menu, you need to insert it in your menu bar (typically at
  4452. * the end of your menu list) with a call to InsertMenu. To register
  4453. * a window to be tracked by this menu, you either create your
  4454. * window with CreateNewWindow, passing the
  4455. * kWindowInWindowMenuAttribute, or you can use
  4456. * ChangeWindowAttributes after the window is created. The Toolbox
  4457. * takes care of acting on the standard items such as zoom and
  4458. * minimize, as well as bringing selected windows to the front. All
  4459. * you need to do is install it and register your windows and the
  4460. * Toolbox does the rest.
  4461. *
  4462. * You may also add your own menu items to the standard window menu.
  4463. * To do this, we recommend that you use the
  4464. * GetIndMenuItemWithCommandID API to locate one of the standard
  4465. * menu items in the menu which is immediately above or below the
  4466. * location where you wish to insert your items. Then insert your
  4467. * items relative to the position of the standard menu item. Do not
  4468. * attempt to search the menu items yourself without calling
  4469. * GetIndMenuItemWithCommandID; in Mac OS X 10.2,
  4470. * CreateStandardWindowMenu returns an initially empty menu which is
  4471. * populated later when the menu is displayed or when
  4472. * GetIndMenuItemWithCommandID is called, so you will find no items
  4473. * in the menu unless you first call GetIndMenuItemWithCommandID.
  4474. *
  4475. * There is a known bug in all versions of CarbonLib which causes
  4476. * the Zoom, Collapse, and Uncollapse menu items in the standard
  4477. * window menu to be non-functional for windows created by the
  4478. * Dialog Manager. To work around this bug, you can install your own
  4479. * event handlers on the dialog window for kEventWindowZoom,
  4480. * kEventWindowCollapse, and kEventWindowExpand, and handle the
  4481. * event by calling the appropriate Window Manager API.
  4482. *
  4483. * Mac OS X threading:
  4484. * Not thread safe
  4485. *
  4486. * Parameters:
  4487. *
  4488. * inOptions:
  4489. * Requests optional behavior of the standard window menu. Mac OS
  4490. * X 10.2 supports the kWindowMenuIncludeRotate option; in earlier
  4491. * versions of Mac OS X, and in CarbonLib, you must pass zero for
  4492. * this parameter.
  4493. *
  4494. * outMenu:
  4495. * Receives a new menu reference which contains the standard
  4496. * window menu items and commands.
  4497. *
  4498. * Result:
  4499. * An operating system status code.
  4500. *
  4501. * Availability:
  4502. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4503. * CarbonLib: in CarbonLib 1.1 and later
  4504. * Non-Carbon CFM: not available
  4505. }
  4506. function CreateStandardWindowMenu( inOptions: OptionBits; var outMenu: MenuRef ): OSStatus; external name '_CreateStandardWindowMenu';
  4507. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4508. {
  4509. * SetWindowAlternateTitle()
  4510. *
  4511. * Discussion:
  4512. * This API sets an alternate title for a window. The alternate
  4513. * title overrides what is displayed in the Window menu. If you do
  4514. * not set an alternate title, the normal window title is used. You
  4515. * would normally use this if the window title was not expressive
  4516. * enough to be used in the Window menu (or similar text-only
  4517. * situation).
  4518. *
  4519. * Mac OS X threading:
  4520. * Not thread safe
  4521. *
  4522. * Parameters:
  4523. *
  4524. * inWindow:
  4525. * The window to set the alternate title.
  4526. *
  4527. * inTitle:
  4528. * The alternate title for the window. Passing NULL for this
  4529. * parameter will remove any alternate title that might be present.
  4530. *
  4531. * Result:
  4532. * An operating system status code.
  4533. *
  4534. * Availability:
  4535. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4536. * CarbonLib: in CarbonLib 1.1 and later
  4537. * Non-Carbon CFM: not available
  4538. }
  4539. function SetWindowAlternateTitle( inWindow: WindowRef; inTitle: CFStringRef ): OSStatus; external name '_SetWindowAlternateTitle';
  4540. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4541. {
  4542. * CopyWindowAlternateTitle()
  4543. *
  4544. * Discussion:
  4545. * This API gets the alternate title for a window. See the
  4546. * discussion of SetWindowAlternateTitle for more info.
  4547. *
  4548. * Mac OS X threading:
  4549. * Not thread safe
  4550. *
  4551. * Parameters:
  4552. *
  4553. * inWindow:
  4554. * The window to get the alternate title from.
  4555. *
  4556. * outTitle:
  4557. * Receives the alternate title for the window. If the window does
  4558. * not have an alternate title, NULL will be returned in outTitle.
  4559. *
  4560. * Result:
  4561. * An operating system status code.
  4562. *
  4563. * Availability:
  4564. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4565. * CarbonLib: in CarbonLib 1.1 and later
  4566. * Non-Carbon CFM: not available
  4567. }
  4568. function CopyWindowAlternateTitle( inWindow: WindowRef; var outTitle: CFStringRef ): OSStatus; external name '_CopyWindowAlternateTitle';
  4569. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4570. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4571. { ¥ Misc Low-Level stuff }
  4572. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4573. {
  4574. Routines available from Mac OS 8.5 forward
  4575. or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
  4576. }
  4577. {
  4578. * IsValidWindowPtr()
  4579. *
  4580. * Mac OS X threading:
  4581. * Not thread safe
  4582. *
  4583. * Availability:
  4584. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4585. * CarbonLib: in CarbonLib 1.0 and later
  4586. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4587. }
  4588. function IsValidWindowPtr( possibleWindow: WindowRef ): Boolean; external name '_IsValidWindowPtr';
  4589. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4590. function IsValidWindowRef__NAME__IsValidWindowPtr( possibleWindow: WindowRef ): Boolean; external name '_IsValidWindowRef__NAME__IsValidWindowPtr';
  4591. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4592. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4593. { ¥ Various & Sundry Window Accessors }
  4594. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4595. {
  4596. * HiliteWindow()
  4597. *
  4598. * Summary:
  4599. * Hilites or unhilites a window's frame.
  4600. *
  4601. * Discussion:
  4602. * Hiliting a window's frame is not the same as activating the
  4603. * window. A window's hilited state determines whether the window
  4604. * draws its titlebar and associated widgets as if they were the
  4605. * frontmost window of its window group, whereas a window's active
  4606. * state determines whether the window really is the frontmost
  4607. * window of its window group. Activating or deactivating a window
  4608. * automatically adjusts a window's hilited state to match.
  4609. *
  4610. * In general, only very old compatibility code would ever need or
  4611. * want to manually modify a window's hilited state via the
  4612. * HiliteWindow API. Modern clients can typically avoid this API
  4613. * entirely.
  4614. *
  4615. * Mac OS X threading:
  4616. * Not thread safe
  4617. *
  4618. * Parameters:
  4619. *
  4620. * window:
  4621. * The window whose frame you wish to hilite/unhilite.
  4622. *
  4623. * fHilite:
  4624. * Whether to hilite or unhilite the window's frame.
  4625. *
  4626. * Availability:
  4627. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4628. * CarbonLib: in CarbonLib 1.0 and later
  4629. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  4630. }
  4631. procedure HiliteWindow( window: WindowRef; fHilite: Boolean ); external name '_HiliteWindow';
  4632. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4633. {
  4634. * SetWRefCon()
  4635. *
  4636. * Mac OS X threading:
  4637. * Not thread safe
  4638. *
  4639. * Availability:
  4640. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4641. * CarbonLib: in CarbonLib 1.0 and later
  4642. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  4643. }
  4644. procedure SetWRefCon( window: WindowRef; data: SRefCon ); external name '_SetWRefCon';
  4645. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4646. {
  4647. * GetWRefCon()
  4648. *
  4649. * Mac OS X threading:
  4650. * Not thread safe
  4651. *
  4652. * Availability:
  4653. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4654. * CarbonLib: in CarbonLib 1.0 and later
  4655. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  4656. }
  4657. function GetWRefCon( window: WindowRef ): SRefCon; external name '_GetWRefCon';
  4658. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4659. { Routines available from Mac OS 8.0 (Appearance 1.0) forward}
  4660. {
  4661. * GetWindowFeatures()
  4662. *
  4663. * Mac OS X threading:
  4664. * Not thread safe
  4665. *
  4666. * Availability:
  4667. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4668. * CarbonLib: in CarbonLib 1.0 and later
  4669. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  4670. }
  4671. function GetWindowFeatures( window: WindowRef; var outFeatures: UInt32 ): OSStatus; external name '_GetWindowFeatures';
  4672. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4673. {
  4674. * HIWindowCopyShape()
  4675. *
  4676. * Summary:
  4677. * Retrieves a shape describing a specified region of a window.
  4678. *
  4679. * Mac OS X threading:
  4680. * Not thread safe
  4681. *
  4682. * Parameters:
  4683. *
  4684. * inWindow:
  4685. * The window whose shape to return.
  4686. *
  4687. * inRegion:
  4688. * The window region whose shape to return.
  4689. *
  4690. * inSpace:
  4691. * The coordinate space in which the shape should be returned.
  4692. * This must be kHICoordSpaceWindow, kHICoordSpaceScreenPixel, or
  4693. * kHICoordSpace72DPIGlobal.
  4694. *
  4695. * outShape:
  4696. * On exit, contains a shape describing the specified window
  4697. * region. If the region is not supported, this parameter is not
  4698. * modified.
  4699. *
  4700. * Result:
  4701. * An operating system result code. errWindowRegionCodeInvalid is
  4702. * returned if the window does not support the specified window
  4703. * region.
  4704. *
  4705. * Availability:
  4706. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  4707. * CarbonLib: not available
  4708. * Non-Carbon CFM: not available
  4709. }
  4710. function HIWindowCopyShape( inWindow: WindowRef; inRegion: WindowRegionCode; inSpace: HICoordinateSpace; var outShape: HIShapeRef ): OSStatus; external name '_HIWindowCopyShape';
  4711. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  4712. {
  4713. * GetWindowRegion() *** DEPRECATED ***
  4714. *
  4715. * Deprecated:
  4716. * Use HIWindowCopyShape instead.
  4717. *
  4718. * Mac OS X threading:
  4719. * Not thread safe
  4720. *
  4721. * Availability:
  4722. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  4723. * CarbonLib: in CarbonLib 1.0 and later
  4724. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  4725. }
  4726. function GetWindowRegion( window: WindowRef; inRegionCode: WindowRegionCode; ioWinRgn: RgnHandle ): OSStatus; external name '_GetWindowRegion';
  4727. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  4728. {
  4729. * GetWindowStructureWidths()
  4730. *
  4731. * Summary:
  4732. * Returns the width of the structure region on each edge of a
  4733. * window.
  4734. *
  4735. * Discussion:
  4736. * The structure widths are the difference between the content
  4737. * region and the structure region on each edge of a window. For
  4738. * example, if the left edge of the structure region is at x=100,
  4739. * and the left edge of the content region is at x=110, then the
  4740. * structure width for the left side of the window is 10 pixels.
  4741. *
  4742. * Mac OS X threading:
  4743. * Not thread safe
  4744. *
  4745. * Parameters:
  4746. *
  4747. * inWindow:
  4748. * The window for which to get structure widths.
  4749. *
  4750. * outRect:
  4751. * On exit, contains the width of the structure region on each
  4752. * side of the window; the left field of the rectangle contains
  4753. * the structure width on the left side of the window, the top
  4754. * field contains the width on the top side, and so on.
  4755. *
  4756. * Availability:
  4757. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4758. * CarbonLib: in CarbonLib 1.0 and later
  4759. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4760. }
  4761. function GetWindowStructureWidths( inWindow: WindowRef; var outRect: Rect ): OSStatus; external name '_GetWindowStructureWidths';
  4762. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4763. {
  4764. * HIWindowChangeFeatures()
  4765. *
  4766. * Summary:
  4767. * Changes the window features on the fly.
  4768. *
  4769. * Discussion:
  4770. * HIWindowChangeFeatures changes the features of a window. This
  4771. * should only be used by custom window definitions or window frame
  4772. * views.
  4773. *
  4774. * Mac OS X threading:
  4775. * Not thread safe
  4776. *
  4777. * Parameters:
  4778. *
  4779. * inWindow:
  4780. * The window to modify.
  4781. *
  4782. * inSetThese:
  4783. * The feature bits to set.
  4784. *
  4785. * inClearThese:
  4786. * The feature bits to clear.
  4787. *
  4788. * Availability:
  4789. * Mac OS X: in version 10.3 and later in Carbon.framework [32-bit only]
  4790. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  4791. * Non-Carbon CFM: not available
  4792. }
  4793. function HIWindowChangeFeatures( inWindow: WindowRef; inSetThese: UInt64; inClearThese: UInt64 ): OSStatus; external name '_HIWindowChangeFeatures';
  4794. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  4795. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4796. { ¥ Update Events }
  4797. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4798. {
  4799. * BeginUpdate()
  4800. *
  4801. * Summary:
  4802. * Modifies a window's GrafPort state before redrawing the invalid
  4803. * portion of a non-compositing window.
  4804. *
  4805. * Discussion:
  4806. * BeginUpdate copies the window's update region into the window's
  4807. * GrafPort's visible region, and then clears the update region. By
  4808. * setting the visible region to match the update region,
  4809. * BeginUpdate ensures that any subsequent drawing will be clipped
  4810. * to the update region.
  4811. *
  4812. * This API should not be used on a compositing window. Composited
  4813. * windows are drawn automatically by the HIView Manager by sending
  4814. * kEventControlDraw events to the views contained in the window.
  4815. *
  4816. * Mac OS X threading:
  4817. * Not thread safe
  4818. *
  4819. * Parameters:
  4820. *
  4821. * window:
  4822. * The window to update.
  4823. *
  4824. * Availability:
  4825. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4826. * CarbonLib: in CarbonLib 1.0 and later
  4827. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  4828. }
  4829. procedure BeginUpdate( window: WindowRef ); external name '_BeginUpdate';
  4830. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4831. {
  4832. * EndUpdate()
  4833. *
  4834. * Summary:
  4835. * Restores the original state of a window's GrafPort after a
  4836. * non-compositing window has been updated.
  4837. *
  4838. * Discussion:
  4839. * EndUpdate restores the original visible region of a window's
  4840. * GrafPort.
  4841. *
  4842. * This API should not be used on a compositing window. Composited
  4843. * windows are drawn automatically by the HIView Manager by sending
  4844. * kEventControlDraw events to the views contained in the window.
  4845. *
  4846. * Mac OS X threading:
  4847. * Not thread safe
  4848. *
  4849. * Parameters:
  4850. *
  4851. * window:
  4852. * The window that was updated.
  4853. *
  4854. * Availability:
  4855. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4856. * CarbonLib: in CarbonLib 1.0 and later
  4857. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  4858. }
  4859. procedure EndUpdate( window: WindowRef ); external name '_EndUpdate';
  4860. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4861. {
  4862. Routines available from Mac OS 8.5 forward
  4863. or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
  4864. }
  4865. {
  4866. * InvalWindowRgn()
  4867. *
  4868. * Summary:
  4869. * Invalidates a portion of a non-compositing window.
  4870. *
  4871. * Discussion:
  4872. * This API should not be used on a compositing window. To
  4873. * invalidate a portion of a compositing window, use
  4874. * HIViewSetNeedsDisplay or one of its variant APIs.
  4875. *
  4876. * Mac OS X threading:
  4877. * Not thread safe
  4878. *
  4879. * Parameters:
  4880. *
  4881. * window:
  4882. * The window to invalidate.
  4883. *
  4884. * region:
  4885. * The region to invalidate, in local coordinates of the window.
  4886. *
  4887. * Availability:
  4888. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4889. * CarbonLib: in CarbonLib 1.0 and later
  4890. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4891. }
  4892. function InvalWindowRgn( window: WindowRef; region: RgnHandle ): OSStatus; external name '_InvalWindowRgn';
  4893. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4894. {
  4895. * InvalWindowRect()
  4896. *
  4897. * Summary:
  4898. * Invalidates a portion of a non-compositing window.
  4899. *
  4900. * Discussion:
  4901. * This API should not be used on a compositing window. To
  4902. * invalidate a portion of a compositing window, use
  4903. * HIViewSetNeedsDisplay or one of its variant APIs.
  4904. *
  4905. * Mac OS X threading:
  4906. * Not thread safe
  4907. *
  4908. * Parameters:
  4909. *
  4910. * window:
  4911. * The window to invalidate.
  4912. *
  4913. * bounds:
  4914. * The rect to invalidate, in local coordinates of the window.
  4915. *
  4916. * Availability:
  4917. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4918. * CarbonLib: in CarbonLib 1.0 and later
  4919. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4920. }
  4921. function InvalWindowRect( window: WindowRef; const (*var*) bounds: Rect ): OSStatus; external name '_InvalWindowRect';
  4922. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4923. {
  4924. * ValidWindowRgn()
  4925. *
  4926. * Summary:
  4927. * Validates a portion of a non-compositing window.
  4928. *
  4929. * Discussion:
  4930. * This API should not be used on a compositing window. To validate
  4931. * a portion of a compositing window, use HIViewSetNeedsDisplay or
  4932. * one of its variant APIs.
  4933. *
  4934. * Mac OS X threading:
  4935. * Not thread safe
  4936. *
  4937. * Parameters:
  4938. *
  4939. * window:
  4940. * The window to validate.
  4941. *
  4942. * region:
  4943. * The region to validate, in local coordinates of the window.
  4944. *
  4945. * Availability:
  4946. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4947. * CarbonLib: in CarbonLib 1.0 and later
  4948. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4949. }
  4950. function ValidWindowRgn( window: WindowRef; region: RgnHandle ): OSStatus; external name '_ValidWindowRgn';
  4951. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4952. {
  4953. * ValidWindowRect()
  4954. *
  4955. * Summary:
  4956. * Validates a portion of a non-compositing window.
  4957. *
  4958. * Discussion:
  4959. * This API should not be used on a compositing window. To validate
  4960. * a portion of a compositing window, use HIViewSetNeedsDisplay or
  4961. * one of its variant APIs.
  4962. *
  4963. * Mac OS X threading:
  4964. * Not thread safe
  4965. *
  4966. * Parameters:
  4967. *
  4968. * window:
  4969. * The window to validate.
  4970. *
  4971. * bounds:
  4972. * The rect to validate, in local coordinates of the window.
  4973. *
  4974. * Availability:
  4975. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4976. * CarbonLib: in CarbonLib 1.0 and later
  4977. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4978. }
  4979. function ValidWindowRect( window: WindowRef; const (*var*) bounds: Rect ): OSStatus; external name '_ValidWindowRect';
  4980. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4981. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4982. { ¥ Window Titles }
  4983. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4984. {
  4985. * SetWindowTitleWithCFString()
  4986. *
  4987. * Mac OS X threading:
  4988. * Not thread safe
  4989. *
  4990. * Availability:
  4991. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  4992. * CarbonLib: in CarbonLib 1.1 and later
  4993. * Non-Carbon CFM: not available
  4994. }
  4995. function SetWindowTitleWithCFString( inWindow: WindowRef; inString: CFStringRef ): OSStatus; external name '_SetWindowTitleWithCFString';
  4996. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4997. {
  4998. * CopyWindowTitleAsCFString()
  4999. *
  5000. * Mac OS X threading:
  5001. * Not thread safe
  5002. *
  5003. * Availability:
  5004. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  5005. * CarbonLib: in CarbonLib 1.1 and later
  5006. * Non-Carbon CFM: not available
  5007. }
  5008. function CopyWindowTitleAsCFString( inWindow: WindowRef; var outString: CFStringRef ): OSStatus; external name '_CopyWindowTitleAsCFString';
  5009. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5010. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5011. { ¥ Window Proxies }
  5012. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5013. {
  5014. * HIWindowSetProxyFSRef()
  5015. *
  5016. * Summary:
  5017. * Set the proxy icon for a window using an FSRef to an existing
  5018. * file system object (volume, folder, or file).
  5019. *
  5020. * Mac OS X threading:
  5021. * Not thread safe
  5022. *
  5023. * Parameters:
  5024. *
  5025. * window:
  5026. * The window whose proxy icon to set.
  5027. *
  5028. * inRef:
  5029. * The file system object that the window represents. The window's
  5030. * proxy icon is determined by asking Icon Services for the icon
  5031. * of this object.
  5032. *
  5033. * Availability:
  5034. * Mac OS X: in version 10.4 and later in Carbon.framework [32-bit only]
  5035. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  5036. * Non-Carbon CFM: not available
  5037. }
  5038. function HIWindowSetProxyFSRef( window: WindowRef; const (*var*) inRef: FSRef ): OSStatus; external name '_HIWindowSetProxyFSRef';
  5039. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  5040. {
  5041. * HIWindowGetProxyFSRef()
  5042. *
  5043. * Summary:
  5044. * Returns the FSRef used to determine the proxy icon for a window.
  5045. *
  5046. * Discussion:
  5047. * This API will return noErr and a valid FSRef if the window's
  5048. * proxy icon has been specified using the FSRef, FSSpec or alias
  5049. * SetWindowProxy APIs. If the window has no proxy icon, or if the
  5050. * icon was specified with SetWindowProxyCreatorAndType or
  5051. * SetWindowProxyIcon, then an error will be returned.
  5052. *
  5053. * Mac OS X threading:
  5054. * Not thread safe
  5055. *
  5056. * Parameters:
  5057. *
  5058. * window:
  5059. * The window containing the proxy icon to return.
  5060. *
  5061. * outRef:
  5062. * On exit, contains the FSRef to the window's proxy icon.
  5063. *
  5064. * Result:
  5065. * noErr if the window's proxy icon FSRef has been returned;
  5066. * errWindowDoesNotHaveProxy if the window does not have a proxy
  5067. * icon, or if the proxy icon was specified by
  5068. * SetWindowProxyCreatorAndType or SetWindowProxyIcon. Other
  5069. * operating system error codes may also be returned.
  5070. *
  5071. * Availability:
  5072. * Mac OS X: in version 10.4 and later in Carbon.framework [32-bit only]
  5073. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  5074. * Non-Carbon CFM: not available
  5075. }
  5076. function HIWindowGetProxyFSRef( window: WindowRef; var outRef: FSRef ): OSStatus; external name '_HIWindowGetProxyFSRef';
  5077. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  5078. {
  5079. * SetWindowProxyAlias()
  5080. *
  5081. * Summary:
  5082. * Sets the proxy icon for a window using an AliasHandle to an
  5083. * existing file system object (volume, folder, or file).
  5084. *
  5085. * Mac OS X threading:
  5086. * Not thread safe
  5087. *
  5088. * Parameters:
  5089. *
  5090. * inWindow:
  5091. * The window whose proxy icon to set.
  5092. *
  5093. * inAlias:
  5094. * The file system object that the window represents. The windowÕs
  5095. * proxy icon is determined by asking Icon Services for the icon
  5096. * of this object. The Window Manager copies the alias data; the
  5097. * caller may dispose of the alias after SetWindowProxyAlias
  5098. * returns.
  5099. *
  5100. * Availability:
  5101. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  5102. * CarbonLib: in CarbonLib 1.0 and later
  5103. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5104. }
  5105. function SetWindowProxyAlias( inWindow: WindowRef; inAlias: AliasHandle ): OSStatus; external name '_SetWindowProxyAlias';
  5106. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5107. {
  5108. * GetWindowProxyAlias()
  5109. *
  5110. * Summary:
  5111. * Returns the alias used to determine the proxy icon for a window.
  5112. *
  5113. * Discussion:
  5114. * This API will return noErr and a valid alias if the windowÕs
  5115. * proxy icon has been specified using the SetWindowProxyFSSpec or
  5116. * SetWindowProxyAlias APIs. If the window has no proxy icon, or if
  5117. * the icon was specified with another SetWindowProxy API, then an
  5118. * error will be returned.
  5119. *
  5120. * Mac OS X threading:
  5121. * Not thread safe
  5122. *
  5123. * Parameters:
  5124. *
  5125. * window:
  5126. * The window whose proxy icon alias to return.
  5127. *
  5128. * alias:
  5129. * On exit, contains the windowÕs proxy icon alias.
  5130. *
  5131. * Result:
  5132. * noErr if the windowÕs proxy icon alias has been returned;
  5133. * errWindowDoesNotHaveProxy if the window does not have a proxy
  5134. * icon, or if the proxy icon was specified by IconRef or
  5135. * type/creator rather than by FSSpec or alias. Other operating
  5136. * system error codes may also be returned.
  5137. *
  5138. * Availability:
  5139. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  5140. * CarbonLib: in CarbonLib 1.0 and later
  5141. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5142. }
  5143. function GetWindowProxyAlias( window: WindowRef; var alias: AliasHandle ): OSStatus; external name '_GetWindowProxyAlias';
  5144. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5145. {
  5146. * SetWindowProxyCreatorAndType()
  5147. *
  5148. * Summary:
  5149. * Sets the proxy icon for a window using a file type and creator.
  5150. *
  5151. * Mac OS X threading:
  5152. * Not thread safe
  5153. *
  5154. * Parameters:
  5155. *
  5156. * window:
  5157. * The window whose proxy icon to set.
  5158. *
  5159. * fileCreator:
  5160. * The creator code for the file system object that the window
  5161. * represents. The windowÕs proxy icon is determined by asking
  5162. * Icon Services for the icon corresponding to the specified
  5163. * creator code and file type, on the specified volume.
  5164. *
  5165. * fileType:
  5166. * The file type for the file system object that the window
  5167. * represents.
  5168. *
  5169. * vRefNum:
  5170. * The volume reference number for the volume containing the file
  5171. * system object that the window represents. You may pass
  5172. * kOnSystemDisk for this parameter if you don't know which volume
  5173. * will hold the file system object.
  5174. *
  5175. * Availability:
  5176. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  5177. * CarbonLib: in CarbonLib 1.0 and later
  5178. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5179. }
  5180. function SetWindowProxyCreatorAndType( window: WindowRef; fileCreator: OSType; fileType: OSType; vRefNum: SInt16 ): OSStatus; external name '_SetWindowProxyCreatorAndType';
  5181. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5182. {
  5183. * GetWindowProxyIcon()
  5184. *
  5185. * Summary:
  5186. * Returns the proxy icon of a window.
  5187. *
  5188. * Mac OS X threading:
  5189. * Not thread safe
  5190. *
  5191. * Parameters:
  5192. *
  5193. * window:
  5194. * The window whose proxy icon to return.
  5195. *
  5196. * outIcon:
  5197. * On exit, contains the windowÕs proxy icon.
  5198. *
  5199. * Availability:
  5200. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  5201. * CarbonLib: in CarbonLib 1.0 and later
  5202. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5203. }
  5204. function GetWindowProxyIcon( window: WindowRef; var outIcon: IconRef ): OSStatus; external name '_GetWindowProxyIcon';
  5205. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5206. {
  5207. * SetWindowProxyIcon()
  5208. *
  5209. * Summary:
  5210. * Sets a windowÕs proxy icon.
  5211. *
  5212. * Mac OS X threading:
  5213. * Not thread safe
  5214. *
  5215. * Parameters:
  5216. *
  5217. * window:
  5218. * The window whose proxy icon to set.
  5219. *
  5220. * icon:
  5221. * The proxy icon. The Window Manager retains the IconRef; the
  5222. * caller may release the IconRef after SetWindowProxyIcon returns.
  5223. *
  5224. * Availability:
  5225. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  5226. * CarbonLib: in CarbonLib 1.0 and later
  5227. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5228. }
  5229. function SetWindowProxyIcon( window: WindowRef; icon: IconRef ): OSStatus; external name '_SetWindowProxyIcon';
  5230. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5231. {
  5232. * RemoveWindowProxy()
  5233. *
  5234. * Summary:
  5235. * Removes a windowÕs proxy icon.
  5236. *
  5237. * Discussion:
  5238. * When removing the proxy icon, the Window Manager also releases
  5239. * the alias or IconRef, if any, that was used to specify the proxy
  5240. * icon.
  5241. *
  5242. * Mac OS X threading:
  5243. * Not thread safe
  5244. *
  5245. * Parameters:
  5246. *
  5247. * window:
  5248. * The window whose proxy icon to remove.
  5249. *
  5250. * Availability:
  5251. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  5252. * CarbonLib: in CarbonLib 1.0 and later
  5253. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5254. }
  5255. function RemoveWindowProxy( window: WindowRef ): OSStatus; external name '_RemoveWindowProxy';
  5256. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5257. {
  5258. * BeginWindowProxyDrag()
  5259. *
  5260. * Summary:
  5261. * Creates a new drag reference that can be used to drag a windowÕs
  5262. * proxy icon.
  5263. *
  5264. * Discussion:
  5265. * This API is used by applications that need to add their own drag
  5266. * flavors to the drag reference used for a proxy icon drag. Such an
  5267. * application would call BeginWindowProxyDrag to create the drag
  5268. * reference, add its own flavors, call
  5269. * TrackWindowProxyFromExistingDrag to track the proxy icon drag,
  5270. * and then EndWindowProxyDrag to release the drag
  5271. * reference.
  5272. *
  5273. * An application which does not need to add its own drag flavors to
  5274. * the drag reference can simply call TrackWindowProxyDrag.
  5275. *
  5276. * Mac OS X threading:
  5277. * Not thread safe
  5278. *
  5279. * Parameters:
  5280. *
  5281. * window:
  5282. * The window whose proxy icon to drag.
  5283. *
  5284. * outNewDrag:
  5285. * On exit, contains the drag reference for the proxy icon.
  5286. *
  5287. * outDragOutlineRgn:
  5288. * On entry, should be a valid RgnHandle; on exit, the region has
  5289. * been updated with an outline of the proxy icon drag image. This
  5290. * region should be passed to TrackWindowProxyFromExistingDrag;
  5291. * the application may modify it first. On Mac OS X 10.5 and
  5292. * later, you may pass NULL if you don't need the outline region.
  5293. *
  5294. * Availability:
  5295. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  5296. * CarbonLib: in CarbonLib 1.0 and later
  5297. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5298. }
  5299. function BeginWindowProxyDrag( window: WindowRef; var outNewDrag: DragRef; outDragOutlineRgn: RgnHandle ): OSStatus; external name '_BeginWindowProxyDrag';
  5300. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5301. {
  5302. * EndWindowProxyDrag()
  5303. *
  5304. * Summary:
  5305. * Releases a drag reference created by BeginWindowProxyDrag.
  5306. *
  5307. * Mac OS X threading:
  5308. * Not thread safe
  5309. *
  5310. * Parameters:
  5311. *
  5312. * window:
  5313. * The window whose proxy icon drag reference to release.
  5314. *
  5315. * theDrag:
  5316. * The drag reference to release.
  5317. *
  5318. * Availability:
  5319. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  5320. * CarbonLib: in CarbonLib 1.0 and later
  5321. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5322. }
  5323. function EndWindowProxyDrag( window: WindowRef; theDrag: DragRef ): OSStatus; external name '_EndWindowProxyDrag';
  5324. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5325. {
  5326. * HIWindowTrackProxyDrag()
  5327. *
  5328. * Summary:
  5329. * Tracks the drag of a window proxy icon.
  5330. *
  5331. * Discussion:
  5332. * This API is used by applications that need to manage the dragging
  5333. * of the proxy icon in their windows. Applications that use the
  5334. * standard window event hander and that do not need to customize
  5335. * the proxy icon drag process may rely on the standard handler to
  5336. * call this API.
  5337. *
  5338. * An application may choose whether to allow the Window Manager to
  5339. * create the drag reference and populate it with drag flavors, or
  5340. * to create the drag reference itself and adds its own drag
  5341. * flavors. In the first case, an application should pass NULL for
  5342. * the drag reference parameter to this API.In the second case, an
  5343. * application should call BeginWindowProxyDrag to create the drag
  5344. * reference, add its own flavors, call HIWindowTrackProxyDrag to
  5345. * track the proxy icon drag, and then EndWindowProxyDrag to release
  5346. * the drag reference.
  5347. *
  5348. * If you pass a non-NULL drag reference, this routine will not
  5349. * display an outline region for the drag; you are thus expected to
  5350. * set up a drag image via SetDragImageWithCGImage or a similar API.
  5351. * Also, in the non- NULL drag reference case, you should not set
  5352. * the kDragRegionAndImage drag image flag.
  5353. *
  5354. * A proxy icon may only be dragged if the window represented by the
  5355. * proxy icon is not modifed (as indicated by the IsWindowModified
  5356. * API). This restriction is imposed because a proxy icon is a
  5357. * representation of a physical file system object, and dragging the
  5358. * proxy icon may result in the Finder making a copy of the file
  5359. * system object. If the window is modified, then it contains user
  5360. * data that has not yet been saved to disk; making a copy of the
  5361. * file system object would result in a stale copy that did not
  5362. * contain the userÕs current data.
  5363. *
  5364. * By default, all newly created windows are considered to be dirty.
  5365. * The application must call SetWindowModified( window, false )
  5366. * before the proxy icon will be draggable.
  5367. *
  5368. * In Mac OS X 10.3 and later, the proxy icon is also draggable in
  5369. * dirty windows if the proxy icon was provided using the
  5370. * SetWindowProxyIcon or SetWindowProxyCreatorAndType APIs. Dragging
  5371. * is allowed in this case because the window does not represent an
  5372. * actual file system object, and therefore there is no risk of user
  5373. * data loss.
  5374. *
  5375. * Mac OS X threading:
  5376. * Not thread safe
  5377. *
  5378. * Parameters:
  5379. *
  5380. * inWindow:
  5381. * The window whose proxy icon to drag.
  5382. *
  5383. * inEvent:
  5384. * The event that resulted in starting a drag. This will most
  5385. * commonly be kEventControlTrack, but any event with
  5386. * kEventParamMouseLocation and kEventParamKeyModifiers parameters
  5387. * is all that is required.
  5388. *
  5389. * inDrag:
  5390. * The proxy icon drag reference. This parameter may be NULL if
  5391. * you want the Window Manager to create and populate the drag
  5392. * reference itself. The Window Manager will add its own drag
  5393. * flavors to the drag even when the client passes a pre-created
  5394. * drag reference.
  5395. *
  5396. * Result:
  5397. * errUserWantsToDragWindow if the userÕs mouse movements indicated
  5398. * that the user actually wants to drag the window instead of the
  5399. * proxy icon (in this case the application should call DragWindow);
  5400. * windowWrongStateErr if the window was modified and therefore the
  5401. * proxy icon could not be dragged; noErr if the drag succeeded;
  5402. * userCanceledErr if the user canceled the drag. Other operating
  5403. * system result codes may also be returned.
  5404. *
  5405. * Availability:
  5406. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  5407. * CarbonLib: not available
  5408. * Non-Carbon CFM: not available
  5409. }
  5410. function HIWindowTrackProxyDrag( inWindow: WindowRef; inEvent: EventRef; inDrag: DragRef { can be NULL } ): OSStatus; external name '_HIWindowTrackProxyDrag';
  5411. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  5412. {
  5413. * TrackWindowProxyFromExistingDrag()
  5414. *
  5415. * Summary:
  5416. * Tracks the drag of a window proxy icon.
  5417. *
  5418. * Discussion:
  5419. * This API is used by applications that need to add their own drag
  5420. * flavors to the drag reference used for a proxy icon drag. Such an
  5421. * application would call BeginWindowProxyDrag to create the drag
  5422. * reference, add its own flavors, call
  5423. * TrackWindowProxyFromExistingDrag to track the proxy icon drag,
  5424. * and then EndWindowProxyDrag to release the drag
  5425. * reference.
  5426. *
  5427. * An application which does not need to add its own drag flavors to
  5428. * the drag reference can simply call TrackWindowProxyDrag.
  5429. *
  5430. * A proxy icon may only be dragged if the window represented by the
  5431. * proxy icon is not modifed (as indicated by the IsWindowModified
  5432. * API). This restriction is imposed because a proxy icon is a
  5433. * representation of a physical file system object, and dragging the
  5434. * proxy icon may result in the Finder making a copy of the file
  5435. * system object. If the window is modified, then it contains user
  5436. * data that has not yet been saved to disk; making a copy of the
  5437. * file system object would result in a stale copy that did not
  5438. * contain the userÕs current data.
  5439. *
  5440. * By default, all newly created windows are considered to be dirty.
  5441. * The application must call SetWindowModified( window, false )
  5442. * before the proxy icon will be draggable.
  5443. *
  5444. * In Mac OS X 10.3 and later, the proxy icon is also draggable in
  5445. * dirty windows if the proxy icon was provided using the
  5446. * SetWindowProxyIcon or SetWindowProxyCreatorAndType APIs. Dragging
  5447. * is allowed in this case because the window does not represent an
  5448. * actual file system object, and therefore there is no risk of user
  5449. * data loss.
  5450. *
  5451. * Mac OS X threading:
  5452. * Not thread safe
  5453. *
  5454. * Parameters:
  5455. *
  5456. * window:
  5457. * The window whose proxy icon to drag.
  5458. *
  5459. * startPt:
  5460. * The point in global coordinates where the drag originated. This
  5461. * is generally the location of the mouse click in the proxy icon.
  5462. *
  5463. * drag:
  5464. * The proxy icon drag reference.
  5465. *
  5466. * inDragOutlineRgn:
  5467. * The outline of the proxy icon drag image, as returned by
  5468. * BeginWindowProxyDrag. You may pass NULL on Mac OS X 10.5 and
  5469. * later.
  5470. *
  5471. * Result:
  5472. * errUserWantsToDragWindow if the userÕs mouse movements indicated
  5473. * that the user actually wants to drag the window instead of the
  5474. * proxy icon (in this case the application should call DragWindow);
  5475. * windowWrongStateErr if the window was modified and therefore the
  5476. * proxy icon could not be dragged; noErr if the drag succeeded;
  5477. * userCanceledErr if the user canceled the drag. Other operating
  5478. * system result codes may also be returned.
  5479. *
  5480. * Availability:
  5481. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  5482. * CarbonLib: in CarbonLib 1.0 and later
  5483. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5484. }
  5485. function TrackWindowProxyFromExistingDrag( window: WindowRef; startPt: Point; drag: DragRef; inDragOutlineRgn: RgnHandle ): OSStatus; external name '_TrackWindowProxyFromExistingDrag';
  5486. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5487. {
  5488. * TrackWindowProxyDrag()
  5489. *
  5490. * Summary:
  5491. * Tracks the drag of a window proxy icon.
  5492. *
  5493. * Discussion:
  5494. * A proxy icon may only be dragged if the window represented by the
  5495. * proxy icon is not modifed (as indicated by the IsWindowModified
  5496. * API). This restriction is imposed because a proxy icon is a
  5497. * representation of a physical file system object, and dragging the
  5498. * proxy icon may result in the Finder making a copy of the file
  5499. * system object. If the window is modified, then it contains user
  5500. * data that has not yet been saved to disk; making a copy of the
  5501. * file system object would result in a stale copy that did not
  5502. * contain the userÕs current data.
  5503. *
  5504. * By default, all newly created windows are considered to be
  5505. * modified. The application must call SetWindowModified( window,
  5506. * false ) before the proxy icon will be draggable.
  5507. *
  5508. * In Mac OS X 10.3 and later, the proxy icon is also draggable in
  5509. * dirty windows if the proxy icon was provided using the
  5510. * SetWindowProxyIcon or SetWindowProxyCreatorAndType APIs. Dragging
  5511. * is allowed in this case because the window does not represent an
  5512. * actual file system object, and therefore there is no risk of user
  5513. * data loss.
  5514. *
  5515. * Mac OS X threading:
  5516. * Not thread safe
  5517. *
  5518. * Parameters:
  5519. *
  5520. * window:
  5521. * The window whose proxy icon to drag.
  5522. *
  5523. * startPt:
  5524. * The point in global coordinates where the drag originated. This
  5525. * is generally the location of the mouse click in the proxy icon.
  5526. *
  5527. * Result:
  5528. * errUserWantsToDragWindow if the userÕs mouse movements indicated
  5529. * that the user actually wants to drag the window instead of the
  5530. * proxy icon (in this case the application should call DragWindow);
  5531. * windowWrongStateErr if the window was modified and therefore the
  5532. * proxy icon could not be dragged; noErr if the drag succeeded;
  5533. * userCanceledErr if the user canceled the drag. Other operating
  5534. * system result codes may also be returned.
  5535. *
  5536. * Availability:
  5537. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  5538. * CarbonLib: in CarbonLib 1.0 and later
  5539. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5540. }
  5541. function TrackWindowProxyDrag( window: WindowRef; startPt: Point ): OSStatus; external name '_TrackWindowProxyDrag';
  5542. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5543. {
  5544. * IsWindowModified()
  5545. *
  5546. * Summary:
  5547. * Returns whether the window is considered to have unsaved content.
  5548. *
  5549. * Discussion:
  5550. * By default, all newly created windows are considered to be
  5551. * modified. The application must call SetWindowModified( window,
  5552. * false ) to mark the window as unmodified. Until the window is
  5553. * marked as unmodified, the proxy icon will not be draggable.
  5554. *
  5555. * Mac OS X threading:
  5556. * Not thread safe
  5557. *
  5558. * Parameters:
  5559. *
  5560. * window:
  5561. * The window whose modified state to return.
  5562. *
  5563. * Result:
  5564. * true if the window has unsaved changes, or false if not.
  5565. *
  5566. * Availability:
  5567. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  5568. * CarbonLib: in CarbonLib 1.0 and later
  5569. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5570. }
  5571. function IsWindowModified( window: WindowRef ): Boolean; external name '_IsWindowModified';
  5572. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5573. {
  5574. * SetWindowModified()
  5575. *
  5576. * Summary:
  5577. * Sets whether the window is considered to have unsaved content.
  5578. *
  5579. * Discussion:
  5580. * By default, all newly created windows are considered to be
  5581. * modified. The application must call SetWindowModified( window,
  5582. * false ) to mark the window as unmodified. Until the window is
  5583. * marked as unmodified, the proxy icon will not be draggable.
  5584. *
  5585. * Mac OS X threading:
  5586. * Not thread safe
  5587. *
  5588. * Parameters:
  5589. *
  5590. * window:
  5591. * The window whose modified state to return.
  5592. *
  5593. * modified:
  5594. * Whether the window has unsaved changes.
  5595. *
  5596. * Availability:
  5597. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  5598. * CarbonLib: in CarbonLib 1.0 and later
  5599. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5600. }
  5601. function SetWindowModified( window: WindowRef; modified: Boolean ): OSStatus; external name '_SetWindowModified';
  5602. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5603. {
  5604. * IsWindowPathSelectEvent()
  5605. *
  5606. * Summary:
  5607. * Indicates whether a Carbon event describing a click on a windowÕs
  5608. * title should cause a path selection menu to be displayed.
  5609. *
  5610. * Discussion:
  5611. * Windows that have a proxy icon provided using an FSSpec or alias
  5612. * can support a path selection menu, which displays the file system
  5613. * path to the object, one menu item per directory. Making a
  5614. * selection from this item will automatically open the
  5615. * corresponding object in the Finder.
  5616. *
  5617. * Mac OS X threading:
  5618. * Not thread safe
  5619. *
  5620. * Parameters:
  5621. *
  5622. * window:
  5623. * The window on which the click occurred.
  5624. *
  5625. * inEvent:
  5626. * The event. In CarbonLib and in Mac OS X 10.2 and earlier,
  5627. * IsWindowPathSelectEvent only returned true for
  5628. * kEventClassMouse/ kEventMouseDown events. In Mac OS X 10.3 and
  5629. * later, IsWindowPathSelectEvent returns true for any event that
  5630. * has suitable kEventParamMouseLocation and
  5631. * kEventParamKeyModifiers parameters.
  5632. *
  5633. * Result:
  5634. * true if the click should cause a path selection menu to be
  5635. * displayed, or false if not. If this API returns true, the
  5636. * application should call the WindowPathSelect API.
  5637. *
  5638. * Availability:
  5639. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  5640. * CarbonLib: in CarbonLib 1.1 and later
  5641. * Non-Carbon CFM: not available
  5642. }
  5643. function IsWindowPathSelectEvent( window: WindowRef; inEvent: EventRef ): Boolean; external name '_IsWindowPathSelectEvent';
  5644. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5645. {
  5646. * WindowPathSelect()
  5647. *
  5648. * Summary:
  5649. * Displays a path selection menu for a window that has a proxy icon.
  5650. *
  5651. * Discussion:
  5652. * If the application passes NULL for the menu parameter, and the
  5653. * user selects an item from the path selection menu, the Window
  5654. * Manager will automatically request the Finder to display that
  5655. * item, and in CarbonLib 1.3.1 and later and Mac OS X, will also
  5656. * make the Finder be the active application.
  5657. *
  5658. * Mac OS X threading:
  5659. * Not thread safe
  5660. *
  5661. * Parameters:
  5662. *
  5663. * window:
  5664. * The window for which to display the path selection menu.
  5665. *
  5666. * menu:
  5667. * The menu to display. If you pass NULL, the Window Manager
  5668. * automatically creates a suitable menu based on the windowÕs
  5669. * proxy icon.
  5670. *
  5671. * outMenuResult:
  5672. * On exit, the menu ID and menu item index of the selected item;
  5673. * the menu ID is in the high 16 bits of the result, and the menu
  5674. * item index is in the low 16 bits.
  5675. *
  5676. * Result:
  5677. * noErr if the user selected an item from the menu; userCanceledErr
  5678. * if the user closed the menu without making a selection. Other
  5679. * operating system result codes may be returned.
  5680. *
  5681. * Availability:
  5682. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  5683. * CarbonLib: in CarbonLib 1.0 and later
  5684. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5685. }
  5686. function WindowPathSelect( window: WindowRef; menu: MenuRef { can be NULL }; var outMenuResult: SInt32 ): OSStatus; external name '_WindowPathSelect';
  5687. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5688. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5689. { ¥ HiliteWindowFrameForDrag }
  5690. { If you call ShowDragHilite and HideDragHilite, you donÕt need to use this routine. }
  5691. { If you implement custom drag hiliting, you should call HiliteWindowFrameForDrag }
  5692. { when the drag is tracking inside a window with drag-hilited content. }
  5693. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5694. { Routines available from Mac OS 8.5 forward}
  5695. {
  5696. * HiliteWindowFrameForDrag()
  5697. *
  5698. * Mac OS X threading:
  5699. * Not thread safe
  5700. *
  5701. * Availability:
  5702. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  5703. * CarbonLib: in CarbonLib 1.0 and later
  5704. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5705. }
  5706. function HiliteWindowFrameForDrag( window: WindowRef; hilited: Boolean ): OSStatus; external name '_HiliteWindowFrameForDrag';
  5707. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5708. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5709. { ¥ Window Transitions }
  5710. { TransitionWindow displays a window with accompanying animation and sound. }
  5711. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5712. {$endc} {not TARGET_CPU_64}
  5713. {
  5714. * WindowTransitionEffect
  5715. *
  5716. * Summary:
  5717. * Visual effects that are provided by TransitionWindow
  5718. }
  5719. type
  5720. WindowTransitionEffect = UInt32;
  5721. const
  5722. {
  5723. * Finder-like zoom rectangles. Use with TransitionWindow and Show or
  5724. * Hide transition actions. In Mac OS X 10.7 and later, this effect
  5725. * can also be used with the Resize transition action to show the
  5726. * standard animation effect for zooming a window to a new size. The
  5727. * combination of the Zoom effect and the Resize action is only
  5728. * recommended for use with compositing windows.
  5729. }
  5730. kWindowZoomTransitionEffect = 1;
  5731. {
  5732. * Zoom in/out from parent. Use with TransitionWindowAndParent and
  5733. * Show or Hide transition actions. Available in Mac OS X, and in
  5734. * CarbonLib 1.5 and later.
  5735. }
  5736. kWindowSheetTransitionEffect = 2;
  5737. {
  5738. * Slide the window into its new position. Use with TransitionWindow
  5739. * and Move or Resize transition actions. Available in Mac OS X, and
  5740. * in CarbonLib 1.5 and later.
  5741. }
  5742. kWindowSlideTransitionEffect = 3;
  5743. {
  5744. * Fade the window into or out of visibility. Use with the Show or
  5745. * Hide transition actions. Available in Mac OS X 10.3 and later.
  5746. }
  5747. kWindowFadeTransitionEffect = 4;
  5748. {
  5749. * Use the Genie effect that the Dock uses to minimize or maximize a
  5750. * window to show or hide the window. Use with the Show or Hide
  5751. * transition actions. Available in Mac OS X 10.3 and later.
  5752. }
  5753. kWindowGenieTransitionEffect = 5;
  5754. {
  5755. * WindowTransitionAction
  5756. *
  5757. * Summary:
  5758. * Modifications to window state that are provided by
  5759. * TransitionWindow
  5760. }
  5761. type
  5762. WindowTransitionAction = UInt32;
  5763. const
  5764. {
  5765. * Shows the window. Use with the Zoom, Sheet, Fade, or Genie
  5766. * transition effects. For the Zoom, Sheet, and Genie effects, the
  5767. * inRect parameter is the global coordinates from which to start the
  5768. * animation; inRect may be NULL for the Zoom and Sheet effects, and
  5769. * in that case, the animation begins at the center of the window.
  5770. * The Genie effect requires a non-NULL inRect parameter. The Fade
  5771. * effect does not use the inRect parameter.
  5772. }
  5773. kWindowShowTransitionAction = 1;
  5774. {
  5775. * Hides the window. Use with the Zoom, Sheet, Fade, or Genie
  5776. * transition effects. For the Zoom, Sheet, and Genie effects, the
  5777. * inRect parameter is the global coordinates at which to end the
  5778. * animation; inRect may be NULL for the Zoom and Sheet effects, and
  5779. * in that case, the animation ends at the center of the window. The
  5780. * Genie effect requires a non-NULL inRect parameter. The Fade effect
  5781. * does not use the inRect parameter.
  5782. }
  5783. kWindowHideTransitionAction = 2;
  5784. {
  5785. * Moves the window. Use with the Slide transition effect. The inRect
  5786. * parameter is the global coordinates of the window's new structure
  5787. * bounds; inRect must be non-NULL. Available in Mac OS X, and in
  5788. * CarbonLib 1.5 and later.
  5789. }
  5790. kWindowMoveTransitionAction = 3;
  5791. {
  5792. * Resizes the window. Use with the Slide transition effect. In Mac
  5793. * OS X 10.7 and later, the Zoom transition effect is also supported
  5794. * with this action, for use by applications that respond to a zoom
  5795. * box click by resizing the window programmatically without calling
  5796. * the ZoomWindow or ZoomWindowIdeal APIs. The inRect parameter is
  5797. * the global coordinates of the window's new structure bounds;
  5798. * inRect must be non-NULL. Available in Mac OS X, and in CarbonLib
  5799. * 1.5 and later.
  5800. }
  5801. kWindowResizeTransitionAction = 4;
  5802. {$ifc not TARGET_CPU_64}
  5803. {
  5804. * TransitionWindow()
  5805. *
  5806. * Summary:
  5807. * Shows, hides, moves, or resizes a window with appropriate
  5808. * animation and sound.
  5809. *
  5810. * Discussion:
  5811. * In Mac OS X 10.3 and later, this API sends
  5812. * kEventWindowTransitionStarted and kEventWindowTransitionCompleted
  5813. * Carbon events to the transitioning window at the start and end of
  5814. * the transition.
  5815. *
  5816. * Mac OS X threading:
  5817. * Not thread safe
  5818. *
  5819. * Parameters:
  5820. *
  5821. * inWindow:
  5822. * The window on which to act.
  5823. *
  5824. * inEffect:
  5825. * The type of visual effect to use. TransitionWindow supports the
  5826. * Zoom, Slide, Fade, and Genie transition effects. The Slide
  5827. * effect is supported on Mac OS X and in CarbonLib 1.5 and later.
  5828. * The Fade and Genie effects are supported on Mac OS X 10.3 and
  5829. * later.
  5830. *
  5831. * inAction:
  5832. * The action to take on the window. TransitionWindow supports the
  5833. * Show, Hide, Move, and Resize actions. The Move and Resize
  5834. * actions are supported on Mac OS X and in CarbonLib 1.5 and
  5835. * later.
  5836. *
  5837. * inRect:
  5838. * A screen rect in global coordinates. The interpretation of the
  5839. * rect is dependent on the transition action; see the
  5840. * documentation for each action for details. May be NULL for some
  5841. * transition actions.
  5842. *
  5843. * Availability:
  5844. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  5845. * CarbonLib: in CarbonLib 1.0 and later
  5846. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5847. }
  5848. function TransitionWindow( inWindow: WindowRef; inEffect: WindowTransitionEffect; inAction: WindowTransitionAction; {const} inRect: RectPtr { can be NULL } ): OSStatus; external name '_TransitionWindow';
  5849. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5850. {
  5851. * TransitionWindowAndParent()
  5852. *
  5853. * Summary:
  5854. * Shows or hides a window, potentially also moving a second window,
  5855. * with appropriate animation and sound.
  5856. *
  5857. * Discussion:
  5858. * In Mac OS X 10.3 and later, this API sends
  5859. * kEventWindowTransitionStarted and kEventWindowTransitionCompleted
  5860. * Carbon events to the transitioning window at the start and end of
  5861. * the transition.
  5862. *
  5863. * Mac OS X threading:
  5864. * Not thread safe
  5865. *
  5866. * Parameters:
  5867. *
  5868. * inWindow:
  5869. * The window on which to act.
  5870. *
  5871. * inParentWindow:
  5872. * The window to which the primary window is related. For the
  5873. * Sheet effect, this parameter must specify a valid WindowRef; it
  5874. * should be NULL for other effects.
  5875. *
  5876. * inEffect:
  5877. * The type of visual effect to use. TransitionWindowAndParent is
  5878. * most commonly used to perform the Sheet transition effect, but
  5879. * also supports the Zoom, Slide, Fade, and Genie effects.
  5880. *
  5881. * inAction:
  5882. * The action to take on the window. TransitionWindowAndParent
  5883. * supports the Show, Hide, Move, and Resize actions.
  5884. *
  5885. * inRect:
  5886. * A screen rect in global coordinates. The interpretation of the
  5887. * rect is dependent on the transition action; see the
  5888. * documentation for each action for details. May be NULL for some
  5889. * transition actions.
  5890. *
  5891. * Availability:
  5892. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  5893. * CarbonLib: in CarbonLib 1.5 and later
  5894. * Non-Carbon CFM: not available
  5895. }
  5896. function TransitionWindowAndParent( inWindow: WindowRef; inParentWindow: WindowRef; inEffect: WindowTransitionEffect; inAction: WindowTransitionAction; {const} inRect: RectPtr { can be NULL } ): OSStatus; external name '_TransitionWindowAndParent';
  5897. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5898. {$endc} {not TARGET_CPU_64}
  5899. {
  5900. * TransitionWindowOptions
  5901. *
  5902. * Summary:
  5903. * Extensible parameter block for the TransitionWindowWithOptions
  5904. * API.
  5905. }
  5906. type
  5907. TransitionWindowOptions = record
  5908. {
  5909. * The structure version. You must put 0 in this field.
  5910. }
  5911. version: UInt32;
  5912. {
  5913. * The duration of the fade, in seconds. For use with the Sheet,
  5914. * Slide, Fade, and Genie transition effects; ignored for other
  5915. * effects. You may pass 0 to use the default duration. The effect is
  5916. * not guaranteed to last precisely this long, but should be a close
  5917. * approximation.
  5918. }
  5919. duration: EventTime;
  5920. {
  5921. * For use with kWindowSheetTransitionEffect. This is the parent
  5922. * window of the sheet.
  5923. }
  5924. window: WindowRef;
  5925. {
  5926. * This value will be sent as the kEventParamUserData parameter for
  5927. * the kEventWindowTransitionStarted and
  5928. * kEventWindowTransitionCompleted events.
  5929. }
  5930. userData: UnivPtr;
  5931. end;
  5932. TransitionWindowOptionsPtr = ^TransitionWindowOptions;
  5933. {$ifc not TARGET_CPU_64}
  5934. {
  5935. * TransitionWindowWithOptions()
  5936. *
  5937. * Summary:
  5938. * Transitions a window from one state to another with appropriate
  5939. * animation and sound.
  5940. *
  5941. * Mac OS X threading:
  5942. * Not thread safe
  5943. *
  5944. * Parameters:
  5945. *
  5946. * inWindow:
  5947. * The window that should be transitioned.
  5948. *
  5949. * inEffect:
  5950. * The type of visual effect to use.
  5951. *
  5952. * inAction:
  5953. * The action to take on the window.
  5954. *
  5955. * inBounds:
  5956. * A screen rect in global coordinates. The interpretation of the
  5957. * rect is dependent on the transition action; see the
  5958. * documentation for each action for details. May be NULL for some
  5959. * transition actions.
  5960. *
  5961. * inAsync:
  5962. * Whether the transition should run synchronously or
  5963. * asynchronously. If inAsync is true, TransitionWindow will
  5964. * return immediately, and the transition will run using an event
  5965. * loop timer. You must run your event loop for the transition to
  5966. * occur. If inAsync is false, TransitionWindow will block until
  5967. * the transition is completed. In either case, the
  5968. * kEventWindowTransitionStarted and
  5969. * kEventWindowTransitionCompleted Carbon events will be sent to
  5970. * the transitioning window at the start and end of the transition.
  5971. *
  5972. * inOptions:
  5973. * Extra options that are required for some transitions. This
  5974. * parameter may be NULL if the specific transition effect does
  5975. * not require extra information.
  5976. *
  5977. * Availability:
  5978. * Mac OS X: in version 10.3 and later in Carbon.framework [32-bit only]
  5979. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  5980. * Non-Carbon CFM: not available
  5981. }
  5982. function TransitionWindowWithOptions( inWindow: WindowRef; inEffect: WindowTransitionEffect; inAction: WindowTransitionAction; {const} inBounds: HIRectPtr { can be NULL }; inAsync: Boolean; {const} inOptions: TransitionWindowOptionsPtr { can be NULL } ): OSStatus; external name '_TransitionWindowWithOptions';
  5983. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  5984. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5985. { ¥ Window Positioning }
  5986. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5987. {
  5988. * [Mac]MoveWindow()
  5989. *
  5990. * Mac OS X threading:
  5991. * Not thread safe
  5992. *
  5993. * Availability:
  5994. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  5995. * CarbonLib: in CarbonLib 1.0 and later
  5996. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  5997. }
  5998. {$ifc TARGET_OS_MAC}
  5999. procedure MacMoveWindow( window: WindowRef; hGlobal: SInt16; vGlobal: SInt16; front: Boolean ); external name '_MoveWindow';
  6000. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6001. {$endc} {TARGET_OS_MAC}
  6002. procedure MoveWindow( window: WindowRef; hGlobal: SInt16; vGlobal: SInt16; front: Boolean ); external name '_MoveWindow';
  6003. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6004. {
  6005. * SizeWindow()
  6006. *
  6007. * Mac OS X threading:
  6008. * Not thread safe
  6009. *
  6010. * Availability:
  6011. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  6012. * CarbonLib: in CarbonLib 1.0 and later
  6013. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  6014. }
  6015. procedure SizeWindow( window: WindowRef; w: SInt16; h: SInt16; fUpdate: Boolean ); external name '_SizeWindow';
  6016. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6017. {
  6018. * ResizeWindow()
  6019. *
  6020. * Summary:
  6021. * Handles all user interaction while a window is being resized.
  6022. *
  6023. * Discussion:
  6024. * The ResizeWindow function moves either an outline of the window's
  6025. * edges (on Mac OS 9.x and earlier) or the actual window (on Mac OS
  6026. * X) around the screen, following the userÕs cursor movements, and
  6027. * handles all user interaction until the mouse button is released.
  6028. * Unlike the GrowWindow API, there is no need to follow this call
  6029. * with a call to the function SizeWindow, because once the mouse
  6030. * button is released, ResizeWindow resizes the window if the user
  6031. * has changed the window size. Once the resizing is complete,
  6032. * ResizeWindow draws the window in the new size. Your application
  6033. * should call the ResizeWindow function instead of the earlier
  6034. * Window Manager APIs SizeWindow and GrowWindow. Some windows may
  6035. * allow themselves to be resized from any corner or edge, not just
  6036. * the bottom right, and as a result, when the user resizes the
  6037. * window, the window may move on the screen and not merely change
  6038. * size. ResizeWindow informs your application of the new window
  6039. * bounds, so that your application can respond to any changes in
  6040. * the windowÕs position.
  6041. *
  6042. * Mac OS X threading:
  6043. * Not thread safe
  6044. *
  6045. * Parameters:
  6046. *
  6047. * inWindow:
  6048. * The window to be resized.
  6049. *
  6050. * inStartPoint:
  6051. * The point, in global coordinates, at which the original
  6052. * mouse-down occurred.
  6053. *
  6054. * inSizeConstraints:
  6055. * The limits on the vertical and horizontal measurements of the
  6056. * content rectangle, in pixels. Although this parameter is typed
  6057. * as a Rect, the four numbers in the structure represent limits,
  6058. * not screen coordinates. The top, left, bottom, and right fields
  6059. * of the structure specify the minimum vertical measurement
  6060. * (top), the minimum horizontal measurement (left), the maximum
  6061. * vertical measurement (bottom), and the maximum horizontal
  6062. * measurement (right). The minimum dimensions should be large
  6063. * enough to allow a manageable rectangle; 64 pixels on a side is
  6064. * typical. The maximum dimensions can be no greater than 32,767.
  6065. * You can pass NULL to allow the user to resize the window to any
  6066. * size that is contained onscreen.
  6067. *
  6068. * outNewContentRect:
  6069. * On exit, the structure contains the new dimensions of the
  6070. * windowÕs content region, in global coordinates. On Mac OS 9.x
  6071. * and earlier, you must pass a non-NULL value in this parameter;
  6072. * in Carbon, you may pass NULL if you do not need the windowÕs
  6073. * new dimensions.
  6074. *
  6075. * Result:
  6076. * Returns true if the window changed size, or false if not.
  6077. *
  6078. * Availability:
  6079. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  6080. * CarbonLib: in CarbonLib 1.0 and later
  6081. * Non-Carbon CFM: in WindowsLib 8.5 and later
  6082. }
  6083. function ResizeWindow( inWindow: WindowRef; inStartPoint: Point; {const} inSizeConstraints: RectPtr { can be NULL }; outNewContentRect: RectPtr { can be NULL } ): Boolean; external name '_ResizeWindow';
  6084. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6085. {
  6086. * DragWindow()
  6087. *
  6088. * Summary:
  6089. * Allows the user to drag a window to a different position.
  6090. *
  6091. * Mac OS X threading:
  6092. * Not thread safe
  6093. *
  6094. * Parameters:
  6095. *
  6096. * window:
  6097. * The window to drag.
  6098. *
  6099. * startPt:
  6100. * The point in global coordinates where the mouse was clicked on
  6101. * the window.
  6102. *
  6103. * boundsRect:
  6104. * A rect in global coordinates outside of which the window cannot
  6105. * move. May be NULL in CarbonLib and Mac OS X, to indicate that
  6106. * there are no restrictions on window movement. This parameter is
  6107. * ignored by CarbonLib and Mac OS X 10.0 through 10.2; it is
  6108. * obeyed in Mac OS X 10.3 and later.
  6109. *
  6110. * Availability:
  6111. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  6112. * CarbonLib: in CarbonLib 1.0 and later
  6113. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  6114. }
  6115. procedure DragWindow( window: WindowRef; startPt: Point; {const} boundsRect: RectPtr { can be NULL } ); external name '_DragWindow';
  6116. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6117. {
  6118. * ZoomWindow()
  6119. *
  6120. * Mac OS X threading:
  6121. * Not thread safe
  6122. *
  6123. * Availability:
  6124. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  6125. * CarbonLib: in CarbonLib 1.0 and later
  6126. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  6127. }
  6128. procedure ZoomWindow( window: WindowRef; partCode: WindowPartCode; front: Boolean ); external name '_ZoomWindow';
  6129. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6130. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  6131. { ¥ Window Collapsing/Expanding }
  6132. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  6133. { Routines available from Mac OS 8.0 (Appearance 1.0) forward}
  6134. {
  6135. * IsWindowCollapsable()
  6136. *
  6137. * Mac OS X threading:
  6138. * Not thread safe
  6139. *
  6140. * Availability:
  6141. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  6142. * CarbonLib: in CarbonLib 1.0 and later
  6143. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  6144. }
  6145. function IsWindowCollapsable( window: WindowRef ): Boolean; external name '_IsWindowCollapsable';
  6146. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6147. {
  6148. * IsWindowCollapsed()
  6149. *
  6150. * Mac OS X threading:
  6151. * Not thread safe
  6152. *
  6153. * Availability:
  6154. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  6155. * CarbonLib: in CarbonLib 1.0 and later
  6156. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  6157. }
  6158. function IsWindowCollapsed( window: WindowRef ): Boolean; external name '_IsWindowCollapsed';
  6159. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6160. {
  6161. * CollapseWindow()
  6162. *
  6163. * Mac OS X threading:
  6164. * Not thread safe
  6165. *
  6166. * Availability:
  6167. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  6168. * CarbonLib: in CarbonLib 1.0 and later
  6169. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  6170. }
  6171. function CollapseWindow( window: WindowRef; collapse: Boolean ): OSStatus; external name '_CollapseWindow';
  6172. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6173. {
  6174. * CollapseAllWindows()
  6175. *
  6176. * Mac OS X threading:
  6177. * Not thread safe
  6178. *
  6179. * Availability:
  6180. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  6181. * CarbonLib: in CarbonLib 1.0 and later
  6182. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  6183. }
  6184. function CollapseAllWindows( collapse: Boolean ): OSStatus; external name '_CollapseAllWindows';
  6185. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6186. {
  6187. * HIWindowCreateCollapsedDockTileContext()
  6188. *
  6189. * Summary:
  6190. * Creates a CGContextRef that can be used to draw into a collapsed
  6191. * window's Dock tile.
  6192. *
  6193. * Mac OS X threading:
  6194. * Not thread safe
  6195. *
  6196. * Parameters:
  6197. *
  6198. * inWindow:
  6199. * The collapsed window.
  6200. *
  6201. * outContext:
  6202. * On exit, returns a CGContextRef for drawing into the window's
  6203. * Dock tile. You should use
  6204. * HIWindowReleaseCollapsedDockTileContext to release this
  6205. * context. To ensure that drawing to the context appears
  6206. * onscreen, make sure to call CGContextFlush before releasing the
  6207. * context.
  6208. *
  6209. * outContextSize:
  6210. * On exit, returns the size of the context in which the
  6211. * application should draw.
  6212. *
  6213. * Result:
  6214. * An operating system result code. windowWrongStateErr is returned
  6215. * if the window is not collapsed.
  6216. *
  6217. * Availability:
  6218. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  6219. * CarbonLib: not available
  6220. * Non-Carbon CFM: not available
  6221. }
  6222. function HIWindowCreateCollapsedDockTileContext( inWindow: WindowRef; var outContext: CGContextRef; var outContextSize: HISize ): OSStatus; external name '_HIWindowCreateCollapsedDockTileContext';
  6223. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  6224. {
  6225. * HIWindowReleaseCollapsedDockTileContext()
  6226. *
  6227. * Discussion:
  6228. * Releases a CGContextRef and other state created by the
  6229. * HIWindowCreateCollapsedDockTileContext API. You MUST call this
  6230. * instead of CFRelease/CGContextRelease directly, or you may leak
  6231. * system resources.
  6232. *
  6233. * Mac OS X threading:
  6234. * Not thread safe
  6235. *
  6236. * Parameters:
  6237. *
  6238. * inWindow:
  6239. * The collapsed window for which you created the CGContextRef.
  6240. *
  6241. * inContext:
  6242. * The context to release. The context is invalid after this call
  6243. * and should no longer be used. To ensure that drawing to the
  6244. * context appears onscreen, make sure to call CGContextFlush
  6245. * before releasing the context.
  6246. *
  6247. * Result:
  6248. * An operating system result code. windowWrongStateErr is returned
  6249. * if the window is not collapsed.
  6250. *
  6251. * Availability:
  6252. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  6253. * CarbonLib: not available
  6254. * Non-Carbon CFM: not available
  6255. }
  6256. function HIWindowReleaseCollapsedDockTileContext( inWindow: WindowRef; inContext: CGContextRef ): OSStatus; external name '_HIWindowReleaseCollapsedDockTileContext';
  6257. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  6258. {
  6259. * CreateQDContextForCollapsedWindowDockTile() *** DEPRECATED ***
  6260. *
  6261. * Deprecated:
  6262. * Use HIWindowCreateCollapsedDockTileContext instead.
  6263. *
  6264. * Discussion:
  6265. * Creates and returns a CGrafPtr for a collapsed window's tile in
  6266. * the dock. You can use this port to draw into your window's dock
  6267. * tile with Quickdraw. You MUST call
  6268. * ReleaseQDContextForCollapsedWindowDockTile and NOT DisposePort
  6269. * when using this API, as it maintains more state than just the
  6270. * port. If you call DisposePort, you may leak system resources.
  6271. *
  6272. * Mac OS X threading:
  6273. * Not thread safe
  6274. *
  6275. * Parameters:
  6276. *
  6277. * inWindow:
  6278. * The window to create the dock tile port for. If this window is
  6279. * not collapsed, an error is returned.
  6280. *
  6281. * outContext:
  6282. * The Quickdraw port for you to use to draw into. If you wish to
  6283. * use CoreGraphics (Quartz) drawing, call CreateCGContextForPort
  6284. * with this port to obtain a CGContext.
  6285. *
  6286. * Result:
  6287. * An operating system result code. windowWrongStateErr is returned
  6288. * if the window is not collapsed.
  6289. *
  6290. * Availability:
  6291. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  6292. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  6293. * Non-Carbon CFM: not available
  6294. }
  6295. function CreateQDContextForCollapsedWindowDockTile( inWindow: WindowRef; var outContext: CGrafPtr ): OSStatus; external name '_CreateQDContextForCollapsedWindowDockTile';
  6296. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  6297. {
  6298. * ReleaseQDContextForCollapsedWindowDockTile() *** DEPRECATED ***
  6299. *
  6300. * Deprecated:
  6301. * Use HIWindowReleaseCollapsedDockTileContext instead.
  6302. *
  6303. * Discussion:
  6304. * Releases a port and other state created by the
  6305. * CreateQDContextForCollapsedWindowDockTile API. You MUST call this
  6306. * instead of DisposePort directly, or you may leak system resources.
  6307. *
  6308. * Mac OS X threading:
  6309. * Not thread safe
  6310. *
  6311. * Parameters:
  6312. *
  6313. * inWindow:
  6314. * The window you created the port for. If this window is not
  6315. * collapsed, an error is returned.
  6316. *
  6317. * inContext:
  6318. * The Quickdraw context to dispose.
  6319. *
  6320. * Result:
  6321. * An operating system result code. windowWrongStateErr is returned
  6322. * if the window is not collapsed.
  6323. *
  6324. * Availability:
  6325. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  6326. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  6327. * Non-Carbon CFM: not available
  6328. }
  6329. function ReleaseQDContextForCollapsedWindowDockTile( inWindow: WindowRef; inContext: CGrafPtr ): OSStatus; external name '_ReleaseQDContextForCollapsedWindowDockTile';
  6330. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  6331. {
  6332. * UpdateCollapsedWindowDockTile()
  6333. *
  6334. * Discussion:
  6335. * Automatically updates the image of a particular window in the
  6336. * dock to the current contents of the window. Use this for periodic
  6337. * updates, etc. Do not use this for animation purposes, if you want
  6338. * animation, use the above create/release drawing context APIs.
  6339. *
  6340. * Mac OS X threading:
  6341. * Not thread safe
  6342. *
  6343. * Parameters:
  6344. *
  6345. * inWindow:
  6346. * The window to update the dock tile for. If this window is not
  6347. * collapsed, an error is returned.
  6348. *
  6349. * Result:
  6350. * An operating system result code.
  6351. *
  6352. * Availability:
  6353. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  6354. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  6355. * Non-Carbon CFM: not available
  6356. }
  6357. function UpdateCollapsedWindowDockTile( inWindow: WindowRef ): OSStatus; external name '_UpdateCollapsedWindowDockTile';
  6358. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6359. {
  6360. * SetWindowDockTileMenu()
  6361. *
  6362. * Summary:
  6363. * Sets the menu that is displayed by a window's dock tile.
  6364. *
  6365. * Discussion:
  6366. * When a window's dock tile menu is right-clicked or
  6367. * control-clicked, the Dock will always automatically display a
  6368. * menu containing a Close menu item that closes the window. If the
  6369. * application wants to add other additional menu items, it can use
  6370. * the SetWindowDockTileMenu API to provide those items. The items
  6371. * in the specified menu will be combined with the standard items
  6372. * provided by the Dock.
  6373. *
  6374. * Before the menu is actually displayed, it will receive
  6375. * kEventMenuPopulate, kEventMenuOpening, and kEventMenuEnableItems
  6376. * Carbon events, so any event handlers for these events may update
  6377. * the menu appropriately for the current state of the
  6378. * application.
  6379. *
  6380. * The application should set a command ID for each menu item in the
  6381. * dock tile menu, and when that item is chosen, a
  6382. * kEventCommandProcess Carbon event containing the item's command
  6383. * ID will be sent to the window's event target (and from there to
  6384. * the application, if the window does not handle the
  6385. * event).
  6386. *
  6387. * This API increments the refcount of the specified menu.
  6388. *
  6389. * The toolbox provides a default handler for the
  6390. * kEventWindowGetDockTileMenu event that returns the menu specified
  6391. * by the SetWindowDockTileMenu API.
  6392. *
  6393. * Mac OS X threading:
  6394. * Not thread safe
  6395. *
  6396. * Parameters:
  6397. *
  6398. * inWindow:
  6399. * The window for which to set the dock tile menu.
  6400. *
  6401. * inMenu:
  6402. * The menu to display, or NULL to remove the current dock tile
  6403. * menu.
  6404. *
  6405. * Availability:
  6406. * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only]
  6407. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  6408. * Non-Carbon CFM: not available
  6409. }
  6410. function SetWindowDockTileMenu( inWindow: WindowRef; inMenu: MenuRef { can be NULL } ): OSStatus; external name '_SetWindowDockTileMenu';
  6411. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  6412. {
  6413. * GetWindowDockTileMenu()
  6414. *
  6415. * Summary:
  6416. * Returns the menu that is displayed by a window's dock tile.
  6417. *
  6418. * Mac OS X threading:
  6419. * Not thread safe
  6420. *
  6421. * Result:
  6422. * The application's dock tile menu, or NULL if none.
  6423. *
  6424. * Availability:
  6425. * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only]
  6426. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  6427. * Non-Carbon CFM: not available
  6428. }
  6429. function GetWindowDockTileMenu( inWindow: WindowRef ): MenuRef; external name '_GetWindowDockTileMenu';
  6430. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  6431. {
  6432. * HIWindowGetBounds()
  6433. *
  6434. * Summary:
  6435. * Retrieves the bounds of a specified region of a window.
  6436. *
  6437. * Mac OS X threading:
  6438. * Not thread safe
  6439. *
  6440. * Parameters:
  6441. *
  6442. * inWindow:
  6443. * The window whose bounds to return.
  6444. *
  6445. * inRegion:
  6446. * The window region whose bounds to return.
  6447. *
  6448. * inSpace:
  6449. * The coordinate space in which the bounds should be returned.
  6450. * This must be kHICoordSpaceWindow, kHICoordSpaceScreenPixel, or
  6451. * kHICoordSpace72DPIGlobal.
  6452. *
  6453. * outBounds:
  6454. * On exit, contains the bounds of the specified window region. If
  6455. * the region is not supported, this parameter is not modified.
  6456. *
  6457. * Result:
  6458. * An operating system result code. errWindowRegionCodeInvalid is
  6459. * returned if the window does not support the specified window
  6460. * region.
  6461. *
  6462. * Availability:
  6463. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  6464. * CarbonLib: not available
  6465. * Non-Carbon CFM: not available
  6466. }
  6467. function HIWindowGetBounds( inWindow: WindowRef; inRegion: WindowRegionCode; inSpace: HICoordinateSpace; var outBounds: HIRect ): OSStatus; external name '_HIWindowGetBounds';
  6468. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  6469. {
  6470. * HIWindowSetBounds()
  6471. *
  6472. * Summary:
  6473. * Sets the bounds of a window based on either the structure or
  6474. * content region of the window.
  6475. *
  6476. * Mac OS X threading:
  6477. * Not thread safe
  6478. *
  6479. * Parameters:
  6480. *
  6481. * inWindow:
  6482. * The window whose bounds to set.
  6483. *
  6484. * inRegion:
  6485. * The window region on which to base the window's new bounds.
  6486. * This parameter must be either kWindowStructureRgn or
  6487. * kWindowContentRgn.
  6488. *
  6489. * inSpace:
  6490. * The coordinate space in which the bounds are expressed. This
  6491. * must be kHICoordSpaceWindow, kHICoordSpaceScreenPixel, or
  6492. * kHICoordSpace72DPIGlobal.
  6493. *
  6494. * inBounds:
  6495. * The new bounds of the specified window region. If the
  6496. * coordinate space is kHICoordSpaceWindow, then the origin of the
  6497. * bounds is a window-relative value. Therefore, you can use the
  6498. * Window coordinate space to resize a window without first
  6499. * getting its current bounds by setting the origin to (0,0), or
  6500. * you can offset a window from its current position by setting
  6501. * the origin to the offset amount and the size to the window's
  6502. * current size.
  6503. *
  6504. * Result:
  6505. * An operating system result code. errWindowRegionCodeInvalid is
  6506. * returned if the inRegion parameter is any value other than
  6507. * kWindowStructureRgn or kWindowContentRgn.
  6508. *
  6509. * Availability:
  6510. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  6511. * CarbonLib: not available
  6512. * Non-Carbon CFM: not available
  6513. }
  6514. function HIWindowSetBounds( inWindow: WindowRef; inRegion: WindowRegionCode; inSpace: HICoordinateSpace; const (*var*) inBounds: HIRect ): OSStatus; external name '_HIWindowSetBounds';
  6515. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  6516. {
  6517. Routines available from Mac OS 8.5 forward
  6518. or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
  6519. }
  6520. {
  6521. * GetWindowBounds()
  6522. *
  6523. * Mac OS X threading:
  6524. * Not thread safe
  6525. *
  6526. * Availability:
  6527. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  6528. * CarbonLib: in CarbonLib 1.0 and later
  6529. * Non-Carbon CFM: in WindowsLib 8.5 and later
  6530. }
  6531. function GetWindowBounds( window: WindowRef; regionCode: WindowRegionCode; var globalBounds: Rect ): OSStatus; external name '_GetWindowBounds';
  6532. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6533. {
  6534. * SetWindowResizeLimits()
  6535. *
  6536. * Summary:
  6537. * Sets the minimum and maximum content sizes for a window.
  6538. *
  6539. * Discussion:
  6540. * The minimum and maximum sizes are obeyed by ResizeWindow and
  6541. * GrowWindow. The default Carbon event handler installed for all
  6542. * windows will return these sizes in response to
  6543. * kEventWindowGetMinimumSize and kEventWindowGetMaximumSize events.
  6544. * When a window is first created, its minimum and maximum sizes are
  6545. * set to reasonable values (which may change from one system
  6546. * release to the next).
  6547. *
  6548. * Mac OS X threading:
  6549. * Not thread safe
  6550. *
  6551. * Parameters:
  6552. *
  6553. * inWindow:
  6554. * The window whose minimum and maximum sizes to set.
  6555. *
  6556. * inMinLimits:
  6557. * The new minimum size for the content region of the window. Pass
  6558. * NULL if you don't want to set a minimum size.
  6559. *
  6560. * inMaxLimits:
  6561. * The new maximum size for the content region of the window. Pass
  6562. * NULL if you don't want to set a maximum size.
  6563. *
  6564. * Result:
  6565. * An operating system result code.
  6566. *
  6567. * Availability:
  6568. * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only]
  6569. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  6570. * Non-Carbon CFM: not available
  6571. }
  6572. function SetWindowResizeLimits( inWindow: WindowRef; {const} inMinLimits: HISizePtr { can be NULL }; {const} inMaxLimits: HISizePtr { can be NULL } ): OSStatus; external name '_SetWindowResizeLimits';
  6573. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  6574. {
  6575. * GetWindowResizeLimits()
  6576. *
  6577. * Summary:
  6578. * Returns the minimum and maximum content sizes for a window.
  6579. *
  6580. * Discussion:
  6581. * GetWindowResizeLimits returns the minimum and maximum sizes that
  6582. * were set by SetWindowResizeLimits. Note that it does not send
  6583. * kEventWindowGetMinimumSize or kEventWindowGetMaximumSize Carbon
  6584. * events to get these sizes; it simply retrieves the sizes from the
  6585. * WindowRef. It is entirely possible (and quite likely) that a
  6586. * given window will have event handlers for the
  6587. * kEventWindowGetMinimum/MaximumSize events that will modify or
  6588. * override the sizes in the WindowRef; therefore, to accurately
  6589. * determine the desired minimum and maximum sizes, you should send
  6590. * kEventWindowGetMinimum/MaximumSize Carbon events rather than
  6591. * using this API.
  6592. *
  6593. * Mac OS X threading:
  6594. * Not thread safe
  6595. *
  6596. * Parameters:
  6597. *
  6598. * inWindow:
  6599. * The window whose minimum and maximum sizes to retrieve.
  6600. *
  6601. * outMinLimits:
  6602. * On exit, contains the minimum size of the window's content
  6603. * region. Pass NULL if you don't want this information.
  6604. *
  6605. * outMaxLimits:
  6606. * On exit, contains the maximum size of the window's content
  6607. * region. Pass NULL if you don't want this information.
  6608. *
  6609. * Result:
  6610. * An operating system result code.
  6611. *
  6612. * Availability:
  6613. * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only]
  6614. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  6615. * Non-Carbon CFM: not available
  6616. }
  6617. function GetWindowResizeLimits( inWindow: WindowRef; outMinLimits: HISizePtr { can be NULL }; outMaxLimits: HISizePtr { can be NULL } ): OSStatus; external name '_GetWindowResizeLimits';
  6618. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  6619. {
  6620. Routines available from Mac OS 8.5 forward,
  6621. or from Mac OS 8.1 forward when linking to CarbonLib 1.0.2 forward
  6622. }
  6623. {
  6624. * SetWindowBounds()
  6625. *
  6626. * Mac OS X threading:
  6627. * Not thread safe
  6628. *
  6629. * Availability:
  6630. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  6631. * CarbonLib: in CarbonLib 1.0 and later
  6632. * Non-Carbon CFM: in WindowsLib 8.5 and later
  6633. }
  6634. function SetWindowBounds( window: WindowRef; regionCode: WindowRegionCode; const (*var*) globalBounds: Rect ): OSStatus; external name '_SetWindowBounds';
  6635. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6636. {
  6637. * RepositionWindow()
  6638. *
  6639. * Summary:
  6640. * Positions a window according in one of the standard window
  6641. * locations.
  6642. *
  6643. * Mac OS X threading:
  6644. * Not thread safe
  6645. *
  6646. * Parameters:
  6647. *
  6648. * window:
  6649. * The window to position.
  6650. *
  6651. * parentWindow:
  6652. * For some positioning methods, the new location for the
  6653. * positioned window will be calculated based on the parent
  6654. * windowÕs position. On Mac OS X 10.3 and later, some positioning
  6655. * methods allow this parameter to be the same as the window
  6656. * parameter; CarbonLib and earlier versions of Mac OS X require
  6657. * that it be different from the window parameter. See the
  6658. * WindowPositionMethod documentation for details on which methods
  6659. * allow the parent to be the same as the positioned window.
  6660. *
  6661. * method:
  6662. * The window positioning method. This should be one of the
  6663. * WindowPositionMethod constants.
  6664. *
  6665. * Availability:
  6666. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  6667. * CarbonLib: in CarbonLib 1.0 and later
  6668. * Non-Carbon CFM: in WindowsLib 8.5 and later
  6669. }
  6670. function RepositionWindow( window: WindowRef; parentWindow: WindowRef; method: WindowPositionMethod ): OSStatus; external name '_RepositionWindow';
  6671. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6672. {
  6673. * MoveWindowStructure()
  6674. *
  6675. * Mac OS X threading:
  6676. * Not thread safe
  6677. *
  6678. * Availability:
  6679. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  6680. * CarbonLib: in CarbonLib 1.0 and later
  6681. * Non-Carbon CFM: in WindowsLib 8.5 and later
  6682. }
  6683. function MoveWindowStructure( window: WindowRef; hGlobal: SInt16; vGlobal: SInt16 ): OSStatus; external name '_MoveWindowStructure';
  6684. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6685. {
  6686. Routines available from Mac OS 8.5 forward,
  6687. or from Mac OS 8.6 forward when linking to CarbonLib 1.1 forward
  6688. }
  6689. { Routines available from Mac OS 8.5 forward}
  6690. {
  6691. * HIWindowIsInStandardState()
  6692. *
  6693. * Summary:
  6694. * Determines whether a window is currently zoomed in to the user
  6695. * state or zoomed out to the standard state.
  6696. *
  6697. * Discussion:
  6698. * HIWindowIsInStandardState compares the windowÕs current
  6699. * dimensions to those given by the inIdealSize parameter to
  6700. * determine if the window is currently in its standard (zoomed-out)
  6701. * state. Your application may use HIWindowIsInStandardState to
  6702. * decide whether a userÕs click of the zoom box is a request to
  6703. * zoom in to the user state or out to the standard state. Your
  6704. * application may also use HIWindowIsInStandardState to determine
  6705. * the size and position of the standard state that the Window
  6706. * Manager would calculate for a window, given a specified ideal
  6707. * size; this value is returned in the outIdealStandardState
  6708. * parameter.
  6709. *
  6710. * Mac OS X threading:
  6711. * Not thread safe
  6712. *
  6713. * Parameters:
  6714. *
  6715. * inWindow:
  6716. * The window for which to determine the zoom state.
  6717. *
  6718. * inIdealSize:
  6719. * The ideal width and height of the windowÕs content region,
  6720. * regardless of the actual screen device dimensions. If you set
  6721. * idealSize to NULL, HIWindowIsInStandardState examines the
  6722. * dimensions stored in the stdState field of the WStateData
  6723. * structure attached to the window.
  6724. *
  6725. * inSpace:
  6726. * The coordinate space in which the ideal size is expressed and
  6727. * in which the standard state bounds should be returned. This
  6728. * must be kHICoordSpaceScreenPixel or kHICoordSpace72DPIGlobal.
  6729. *
  6730. * outIdealStandardState:
  6731. * On exit, contains the global coordinates for the content region
  6732. * of the window in its standard state, based on the data supplied
  6733. * in the inIdealSize parameter. The coordinates are in either
  6734. * screen pixels or 72DPI virtual coordinates. You may pass NULL
  6735. * if you do not need this information.
  6736. *
  6737. * Result:
  6738. * Returns true if the window is currently in its standard
  6739. * (zoomed-out) state, or false if the window is a non-zoomed-out
  6740. * state.
  6741. *
  6742. * Availability:
  6743. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  6744. * CarbonLib: not available
  6745. * Non-Carbon CFM: not available
  6746. }
  6747. function HIWindowIsInStandardState( inWindow: WindowRef; {const} inIdealSize: HISizePtr { can be NULL }; inSpace: HICoordinateSpace; outIdealStandardState: HIRectPtr { can be NULL } ): Boolean; external name '_HIWindowIsInStandardState';
  6748. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  6749. {
  6750. * IsWindowInStandardState()
  6751. *
  6752. * Summary:
  6753. * Determines whether a window is currently zoomed in to the user
  6754. * state or zoomed out to the standard state.
  6755. *
  6756. * Discussion:
  6757. * IsWindowInStandardState compares the windowÕs current dimensions
  6758. * to those given by the inIdealSize parameter to determine if the
  6759. * window is currently in its standard (zoomed-out) state. Your
  6760. * application may use IsWindowInStandardState to decide whether a
  6761. * userÕs click of the zoom box is a request to zoom in to the user
  6762. * state or out to the standard state. Your application may also use
  6763. * IsWindowInStandardState to determine the size and position of the
  6764. * standard state that the Window Manager would calculate for a
  6765. * window, given a specified ideal size; this value is returned in
  6766. * the outIdealStandardState parameter.
  6767. *
  6768. * Mac OS X threading:
  6769. * Not thread safe
  6770. *
  6771. * Parameters:
  6772. *
  6773. * inWindow:
  6774. * The window for which to determine the zoom state.
  6775. *
  6776. * inIdealSize:
  6777. * The ideal width and height of the windowÕs content region,
  6778. * regardless of the actual screen device dimensions. If you set
  6779. * idealSize to NULL, IsWindowInStandardState examines the
  6780. * dimensions stored in the stdState field of the WStateData
  6781. * structure attached to the window.
  6782. *
  6783. * outIdealStandardState:
  6784. * On exit, contains the global coordinates for the content region
  6785. * of the window in its standard state, based on the data supplied
  6786. * in the inIdealSize parameter. You may pass NULL if you do not
  6787. * need this information.
  6788. *
  6789. * Result:
  6790. * Returns true if the window is currently in its standard
  6791. * (zoomed-out) state, or false if the window is a non-zoomed-out
  6792. * state.
  6793. *
  6794. * Availability:
  6795. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  6796. * CarbonLib: in CarbonLib 1.0 and later
  6797. * Non-Carbon CFM: in WindowsLib 8.5 and later
  6798. }
  6799. function IsWindowInStandardState( inWindow: WindowRef; {const} inIdealSize: PointPtr { can be NULL }; outIdealStandardState: RectPtr { can be NULL } ): Boolean; external name '_IsWindowInStandardState';
  6800. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6801. {
  6802. * ZoomWindowIdeal()
  6803. *
  6804. * Summary:
  6805. * Zooms a window in accordance with human interface guidelines.
  6806. *
  6807. * Discussion:
  6808. * Applications should use the ZoomWindowIdeal API instead of the
  6809. * older ZoomWindow API. When your application calls
  6810. * ZoomWindowIdeal, it automatically conforms to the human interface
  6811. * guidelines for determining a windowÕs standard state: the window
  6812. * is moved as little as possible when switching between user and
  6813. * standard states, the window is zoomed to the screen that contains
  6814. * the largest portion of the window, and the window is positioned
  6815. * in its zoomed-out size to avoid the Dock on Mac OS X.
  6816. *
  6817. * The ZoomWindowIdeal API calculates a windowÕs ideal standard
  6818. * state and updates a windowÕs ideal user state independently of
  6819. * the WStateData structure. Previously, the window definition
  6820. * function was responsible for updating the user state, but because
  6821. * it relies upon the WStateData structure, the window definition
  6822. * function is unaware of the ideal standard state and can no longer
  6823. * track the windowÕs zoom state reliably. The Window Manager
  6824. * provides the GetWindowIdealUserState and SetWindowIdealUserState
  6825. * APIs to access a window's current ideal user state, previously
  6826. * recorded by ZoomWindowIdeal.
  6827. *
  6828. * In Mac OS X 10.7 and later, the ZoomWindowIdeal API automatically
  6829. * uses an animation to resize the window to its new size, if the
  6830. * window uses composited mode.
  6831. *
  6832. * Mac OS X threading:
  6833. * Not thread safe
  6834. *
  6835. * Parameters:
  6836. *
  6837. * inWindow:
  6838. * The window to be zoomed.
  6839. *
  6840. * inPartCode:
  6841. * The direction of the zoom, either inZoomIn or inZoomOut. The
  6842. * value passed in this parameter should generally be determined
  6843. * by calling IsWindowInStandardState; if IsWindowInStandardState
  6844. * returns true, pass inZoomIn, otherwise pass inZoomOut.
  6845. *
  6846. * ioIdealSize:
  6847. * When you specify inZoomIn in the inPartCode parameter, this
  6848. * parameter is unused on entry; you pass a pointer to a Point
  6849. * structure, but do not fill the structure with data. On exit,
  6850. * the Point contains the new height and width of the windowÕs
  6851. * content region, and ZoomWindowIdeal restores the previous ideal
  6852. * user state. When you specify inZoomOut in the inPartCode
  6853. * parameter, you pass the ideal height and width of the windowÕs
  6854. * content region in the Point structure. On return, the Point
  6855. * contains the new height and width of the windowÕs content
  6856. * region; ZoomWindowIdeal saves the current user state of the
  6857. * window and zooms the window to its ideal size for the standard
  6858. * state.
  6859. *
  6860. * Prior to Mac OS X Mac OS X 10.4, the ZoomWindowIdeal API
  6861. * malfunctioned if passed an idealSize that was large enough to
  6862. * cause 16-bit integer overflow when added to the window's
  6863. * current position. Therefore, when specifying the ideal size
  6864. * parameter, you should generally not use values that are close
  6865. * to 32767. It is better to limit your ideal size to, say, 16K.
  6866. *
  6867. * Result:
  6868. * An operating system result code.
  6869. *
  6870. * Availability:
  6871. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  6872. * CarbonLib: in CarbonLib 1.0 and later
  6873. * Non-Carbon CFM: in WindowsLib 8.5 and later
  6874. }
  6875. function ZoomWindowIdeal( inWindow: WindowRef; inPartCode: WindowPartCode; var ioIdealSize: Point ): OSStatus; external name '_ZoomWindowIdeal';
  6876. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6877. {
  6878. * HIWindowGetIdealUserState()
  6879. *
  6880. * Summary:
  6881. * Returns the bounds of a windowÕs content region in its user
  6882. * (zoomed-in) state.
  6883. *
  6884. * Discussion:
  6885. * The HIWindowGetIdealUserState API returns the windowÕs user state
  6886. * most recently recorded by ZoomWindowIdeal.
  6887. *
  6888. * Mac OS X threading:
  6889. * Not thread safe
  6890. *
  6891. * Parameters:
  6892. *
  6893. * inWindow:
  6894. * The window whose ideal user state you wish to retrieve.
  6895. *
  6896. * inSpace:
  6897. * The coordinate space in which the user state bounds should be
  6898. * returned. This must be kHICoordSpaceScreenPixel or
  6899. * kHICoordSpace72DPIGlobal.
  6900. *
  6901. * outUserState:
  6902. * On exit, contains the global coordinates of the windowÕs
  6903. * content region when zoomed in, in either screen pixels or 72DPI
  6904. * virtual coordinates. HIWindowGetIdealUserState automatically
  6905. * returns the windowÕs current content bounds if the window has
  6906. * not yet been zoomed.
  6907. *
  6908. * Result:
  6909. * An operating system result code.
  6910. *
  6911. * Availability:
  6912. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  6913. * CarbonLib: not available
  6914. * Non-Carbon CFM: not available
  6915. }
  6916. function HIWindowGetIdealUserState( inWindow: WindowRef; inSpace: HICoordinateSpace; var outUserState: HIRect ): OSStatus; external name '_HIWindowGetIdealUserState';
  6917. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  6918. {
  6919. * HIWindowSetIdealUserState()
  6920. *
  6921. * Summary:
  6922. * Sets the bounds of a windowÕs content region in its user
  6923. * (zoomed-in) state.
  6924. *
  6925. * Discussion:
  6926. * The windowÕs ideal user state is used by the ZoomWindowIdeal API
  6927. * when zooming in. The ideal user state is ignored by the
  6928. * ZoomWindow API.
  6929. *
  6930. * Mac OS X threading:
  6931. * Not thread safe
  6932. *
  6933. * Parameters:
  6934. *
  6935. * inWindow:
  6936. * The window whose ideal user state to set.
  6937. *
  6938. * inSpace:
  6939. * The coordinate space in which the user state bounds are
  6940. * expressed. This must be kHICoordSpaceScreenPixel or
  6941. * kHICoordSpace72DPIGlobal.
  6942. *
  6943. * inUserState:
  6944. * The global coordinates of the windowÕs content region in its
  6945. * ideal user state, in either screen pixels or 72DPI virtual
  6946. * coordinates.
  6947. *
  6948. * Result:
  6949. * An operating system result code.
  6950. *
  6951. * Availability:
  6952. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  6953. * CarbonLib: not available
  6954. * Non-Carbon CFM: not available
  6955. }
  6956. function HIWindowSetIdealUserState( inWindow: WindowRef; inSpace: HICoordinateSpace; const (*var*) inUserState: HIRect ): OSStatus; external name '_HIWindowSetIdealUserState';
  6957. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  6958. {
  6959. * GetWindowIdealUserState()
  6960. *
  6961. * Summary:
  6962. * Returns the bounds of a windowÕs content region in its user
  6963. * (zoomed-in) state.
  6964. *
  6965. * Discussion:
  6966. * Traditionally, the user (zoomed-in) state of a window has been
  6967. * stored in the WStateData structure attached to a window. This
  6968. * field is updated by the window definition when the user clicks on
  6969. * the zoom box and the window definition determines that the window
  6970. * is currently not zoomed out. When determining whether the window
  6971. * is zoomed out, however, the window definition can only look at
  6972. * the standard state stored in the WStateData field. With the
  6973. * introduction of the ZoomWindowIdeal API, there is a new basis for
  6974. * determining whether a window is zoomed out: the windowÕs ideal
  6975. * size. The window definition does not have access to the windowÕs
  6976. * ideal size, and therefore cannot accurately determine whether a
  6977. * window that is zoomed with ZoomWindowIdeal is in its user state
  6978. * or standard state; therefore, the user state that the window
  6979. * definition stores in the WStateData is also unreliable. The
  6980. * ZoomWindowIdeal API therefore stores the windowÕs user state
  6981. * before zooming out in a new location, which is accessed using the
  6982. * GetWindowIdealUserState API. The GetWindowIdealUserState API
  6983. * returns the windowÕs user state most recently recorded by
  6984. * ZoomWindowIdeal.
  6985. *
  6986. * Mac OS X threading:
  6987. * Not thread safe
  6988. *
  6989. * Parameters:
  6990. *
  6991. * inWindow:
  6992. * The window whose ideal user state you wish to retrieve.
  6993. *
  6994. * outUserState:
  6995. * On exit, contains the global coordinates of the windowÕs
  6996. * content region when zoomed in. On Mac OS X 10.1 and earlier,
  6997. * and CarbonLib 1.5 and earlier, the windowÕs ideal user state is
  6998. * an empty rect with coordinates (0,0,0,0) if the window has
  6999. * never been zoomed out; you should check for an empty rect and
  7000. * use GetWindowBounds with the kWindowContentRgn selector to
  7001. * determine the windowÕs current content region. On later
  7002. * versions of Mac OS X and CarbonLib, GetWindowIdealUserState
  7003. * automatically returns the windowÕs current content bounds if
  7004. * the window has not yet been zoomed.
  7005. *
  7006. * Result:
  7007. * An operating system result code.
  7008. *
  7009. * Availability:
  7010. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  7011. * CarbonLib: in CarbonLib 1.0 and later
  7012. * Non-Carbon CFM: in WindowsLib 8.5 and later
  7013. }
  7014. function GetWindowIdealUserState( inWindow: WindowRef; var outUserState: Rect ): OSStatus; external name '_GetWindowIdealUserState';
  7015. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7016. {
  7017. * SetWindowIdealUserState()
  7018. *
  7019. * Summary:
  7020. * Sets the bounds of a windowÕs content region in its user
  7021. * (zoomed-in) state.
  7022. *
  7023. * Discussion:
  7024. * The windowÕs ideal user state is used by the ZoomWindowIdeal API
  7025. * when zooming in. The ideal user state is ignored by the
  7026. * ZoomWindow API.
  7027. *
  7028. * Mac OS X threading:
  7029. * Not thread safe
  7030. *
  7031. * Parameters:
  7032. *
  7033. * inWindow:
  7034. * The window whose ideal user state to set.
  7035. *
  7036. * inUserState:
  7037. * The global coordinates of the windowÕs content region in its
  7038. * ideal user state.
  7039. *
  7040. * Result:
  7041. * An operating system result code.
  7042. *
  7043. * Availability:
  7044. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  7045. * CarbonLib: in CarbonLib 1.0 and later
  7046. * Non-Carbon CFM: in WindowsLib 8.5 and later
  7047. }
  7048. function SetWindowIdealUserState( inWindow: WindowRef; const (*var*) inUserState: Rect ): OSStatus; external name '_SetWindowIdealUserState';
  7049. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7050. {
  7051. * GetWindowGreatestAreaDevice()
  7052. *
  7053. * Summary:
  7054. * Returns the graphics device with the greatest area of
  7055. * intersection with a specified window region.
  7056. *
  7057. * Discussion:
  7058. * HIWindowGetGreatestAreaDisplay is recommended for use instead of
  7059. * this API.
  7060. *
  7061. * Mac OS X threading:
  7062. * Not thread safe
  7063. *
  7064. * Parameters:
  7065. *
  7066. * inWindow:
  7067. * The window to compare against.
  7068. *
  7069. * inRegion:
  7070. * The window region to compare against.
  7071. *
  7072. * outGreatestDevice:
  7073. * On exit, the graphics device with the greatest intersection.
  7074. * May be NULL.
  7075. *
  7076. * outGreatestDeviceRect:
  7077. * On exit, the bounds of the graphics device with the greatest
  7078. * intersection. May be NULL. If the device with the greatest
  7079. * intersection also contains the menu bar, the device rect will
  7080. * exclude the menu bar area.
  7081. *
  7082. * Availability:
  7083. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  7084. * CarbonLib: in CarbonLib 1.1 and later
  7085. * Non-Carbon CFM: not available
  7086. }
  7087. function GetWindowGreatestAreaDevice( inWindow: WindowRef; inRegion: WindowRegionCode; outGreatestDevice: GDHandlePtr { can be NULL }; outGreatestDeviceRect: RectPtr { can be NULL } ): OSStatus; external name '_GetWindowGreatestAreaDevice';
  7088. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7089. {
  7090. * HIWindowGetGreatestAreaDisplay()
  7091. *
  7092. * Summary:
  7093. * Returns the display with the greatest area of intersection with a
  7094. * specified window region.
  7095. *
  7096. * Mac OS X threading:
  7097. * Not thread safe
  7098. *
  7099. * Parameters:
  7100. *
  7101. * inWindow:
  7102. * The window to compare against.
  7103. *
  7104. * inRegion:
  7105. * The window region to compare against.
  7106. *
  7107. * inSpace:
  7108. * The coordinate space in which the display bounds should be
  7109. * returned. This must be either kHICoordSpaceScreenPixel or
  7110. * kHICoordSpace72DPIGlobal.
  7111. *
  7112. * outGreatestDisplay:
  7113. * On exit, the display with the greatest intersection. May be
  7114. * NULL if you don't need this information.
  7115. *
  7116. * outGreatestDisplayRect:
  7117. * On exit, the bounds of the display with the greatest
  7118. * intersection. May be NULL if you don't need this information.
  7119. * If the device with the greatest intersection also contains the
  7120. * menu bar, the display rect will exclude the menu bar area. This
  7121. * rectangle is returned in the specified coordinate space.
  7122. *
  7123. * Result:
  7124. * An operating system result code.
  7125. *
  7126. * Availability:
  7127. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  7128. * CarbonLib: not available
  7129. * Non-Carbon CFM: not available
  7130. }
  7131. function HIWindowGetGreatestAreaDisplay( inWindow: WindowRef; inRegion: WindowRegionCode; inSpace: HICoordinateSpace; outGreatestDisplay: CGDirectDisplayIDPtr { can be NULL }; outGreatestDisplayRect: HIRectPtr { can be NULL } ): OSStatus; external name '_HIWindowGetGreatestAreaDisplay';
  7132. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  7133. {$endc} {not TARGET_CPU_64}
  7134. {
  7135. * WindowConstrainOptions
  7136. *
  7137. }
  7138. type
  7139. WindowConstrainOptions = UInt32;
  7140. const
  7141. {
  7142. * The window may be resized if necessary to make it fit onscreen.
  7143. }
  7144. kWindowConstrainMayResize = 1 shl 0;
  7145. {
  7146. * The window will be moved even if it doesn't fit entirely onscreen.
  7147. }
  7148. kWindowConstrainMoveRegardlessOfFit = 1 shl 1;
  7149. {
  7150. * Allow partial intersection of the specified window region with the
  7151. * screen, instead of requiring total intersection.
  7152. }
  7153. kWindowConstrainAllowPartial = 1 shl 2;
  7154. {
  7155. * Only calculate the new window bounds; don't actually move the
  7156. * window.
  7157. }
  7158. kWindowConstrainCalcOnly = 1 shl 3;
  7159. {
  7160. * Use TransitionWindow with kWindowSlideTransitionEffect to move
  7161. * windows onscreen. Available in Mac OS X 10.2.
  7162. }
  7163. kWindowConstrainUseTransitionWindow = 1 shl 4;
  7164. {
  7165. * Requests that the window be moved the minimum amount necessary to
  7166. * be onscreen. This option applies if a partial fit is not allowed
  7167. * (kWindowConstrainAllowPartial is not specified) or a partial fit
  7168. * is allowed, but the window is not even partially visible. In
  7169. * either case, the window will be moved just enough to be slightly
  7170. * onscreen. You may customize the minimum amount that is required to
  7171. * be visible by passing the desired dimensions in the inMinimumSize
  7172. * parameter to HIWindowConstrain.
  7173. }
  7174. kWindowConstrainMoveMinimum = 1 shl 6;
  7175. {
  7176. * Requests that when determining the bounds of the window region to
  7177. * be constrained, rather than getting the current bounds of the
  7178. * specified region, the Window Manager should use the bounds
  7179. * provided in the ioBounds parameter to HIWindowConstrain. This
  7180. * allows your application to constrain a window to a hypothetical
  7181. * location; for example, if you plan to move your window such that
  7182. * its content rect is at a certain location, and you want to know in
  7183. * advance before moving the window whether the window would be
  7184. * offscreen at that location, you can use this option.
  7185. }
  7186. kWindowConstrainUseSpecifiedBounds = 1 shl 8;
  7187. {
  7188. * The most common options: don't resize the window, move the window
  7189. * regardless of fit to the screen, require total intersection of the
  7190. * specified window region with the screen, and do actually move the
  7191. * window.
  7192. }
  7193. kWindowConstrainStandardOptions = kWindowConstrainMoveRegardlessOfFit;
  7194. {$ifc not TARGET_CPU_64}
  7195. {
  7196. * HIWindowConstrain()
  7197. *
  7198. * Summary:
  7199. * Moves and resizes a window to be within a specified bounding
  7200. * rectangle.
  7201. *
  7202. * Mac OS X threading:
  7203. * Not thread safe
  7204. *
  7205. * Parameters:
  7206. *
  7207. * inWindow:
  7208. * The window to constrain.
  7209. *
  7210. * inRegionCode:
  7211. * The window region to constrain.
  7212. *
  7213. * inOptions:
  7214. * Flags controlling how the window is constrained.
  7215. *
  7216. * inSpace:
  7217. * The coordinate space in which the inScreenBounds,
  7218. * inMinimumSize, and ioBounds parameters are expressed. This
  7219. * parameter must be either kHICoordSpaceScreenPixels or
  7220. * kHICoordSpace72DPIGlobal.
  7221. *
  7222. * inScreenBounds:
  7223. * A rectangle, in either screen pixel coordinates or 72DPI
  7224. * virtual coordinates, within which to constrain the window. You
  7225. * may pass NULL if you don't need to specify a screen bounds. If
  7226. * NULL, the window is constrained to the screen that has the
  7227. * greatest intersection with the specified window region.
  7228. *
  7229. * inMinimumSize:
  7230. * A minimum size, in either screen pixel dimensions or 72DPI
  7231. * virtual dimensions, that should be kept within the specified
  7232. * screen bounds. This parameter is ignored if the
  7233. * kWindowConstrainMoveMinimum option is not set. Even if that
  7234. * option is set, you may still pass NULL if you don't need to
  7235. * customize the minimum dimensions. If NULL, the minimum size is
  7236. * currently seven 72DPI units in both x and y dimensions, but
  7237. * these values may change in different versions of Mac OS X.
  7238. *
  7239. * ioBounds:
  7240. * On entry, if the inOptions parameter contains
  7241. * kWindowConstrainUseSpecifiedBounds, then this parameter should
  7242. * be a bounding rect of the specified window region, in either
  7243. * screen pixel coordinates or 72DPI global coordinates. The
  7244. * bounding rect does not have to match the actual current bounds
  7245. * of the specified region; it may be a hypothetical bounds that
  7246. * you would like to constrain without actually moving the window
  7247. * to that location.
  7248. *
  7249. * On exit, contains the new structure bounds of the window, in
  7250. * either screen pixel coordinates or 72DPI virtual coordinates.
  7251. * You may pass NULL if you don't need the window bounds returned.
  7252. *
  7253. * Availability:
  7254. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  7255. * CarbonLib: not available
  7256. * Non-Carbon CFM: not available
  7257. }
  7258. function HIWindowConstrain( inWindow: WindowRef; inRegionCode: WindowRegionCode; inOptions: WindowConstrainOptions; inSpace: HICoordinateSpace; {const} inScreenBounds: HIRectPtr { can be NULL }; {const} inMinimumSize: HISizePtr { can be NULL }; ioBounds: HIRectPtr { can be NULL } ): OSStatus; external name '_HIWindowConstrain';
  7259. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  7260. {
  7261. * ConstrainWindowToScreen()
  7262. *
  7263. * Summary:
  7264. * Moves and resizes a window so that it's contained entirely on a
  7265. * single screen.
  7266. *
  7267. * Mac OS X threading:
  7268. * Not thread safe
  7269. *
  7270. * Parameters:
  7271. *
  7272. * inWindowRef:
  7273. * The window to constrain.
  7274. *
  7275. * inRegionCode:
  7276. * The window region to constrain.
  7277. *
  7278. * inOptions:
  7279. * Flags controlling how the window is constrained.
  7280. *
  7281. * inScreenRect:
  7282. * A rectangle, in global coordinates, in which to constrain the
  7283. * window. May be NULL. If NULL, the window is constrained to the
  7284. * screen with the greatest intersection with the specified window
  7285. * region.
  7286. *
  7287. * outStructure:
  7288. * On exit, contains the new structure bounds of the window, in
  7289. * global coordinates. May be NULL.
  7290. *
  7291. * Availability:
  7292. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  7293. * CarbonLib: in CarbonLib 1.1 and later
  7294. * Non-Carbon CFM: not available
  7295. }
  7296. function ConstrainWindowToScreen( inWindowRef: WindowRef; inRegionCode: WindowRegionCode; inOptions: WindowConstrainOptions; {const} inScreenRect: RectPtr { can be NULL }; outStructure: RectPtr { can be NULL } ): OSStatus; external name '_ConstrainWindowToScreen';
  7297. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7298. {
  7299. * GetAvailableWindowPositioningBounds()
  7300. *
  7301. * Summary:
  7302. * Returns the available window positioning bounds on the given
  7303. * screen (i.e., the screen rect minus the MenuBar and Dock if
  7304. * located on that screen).
  7305. *
  7306. * Discussion:
  7307. * HIWindowGetAvailablePositioningBounds is recommended for use
  7308. * instead of this API.
  7309. *
  7310. * Mac OS X threading:
  7311. * Not thread safe
  7312. *
  7313. * Parameters:
  7314. *
  7315. * inDevice:
  7316. * The device for which to find the available bounds. May be NULL
  7317. * to request the bounds of the main device.
  7318. *
  7319. * outAvailableRect:
  7320. * On exit, contains the available bounds for the given device.
  7321. *
  7322. * Availability:
  7323. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  7324. * CarbonLib: in CarbonLib 1.3 and later
  7325. * Non-Carbon CFM: not available
  7326. }
  7327. function GetAvailableWindowPositioningBounds( inDevice: GDHandle; var outAvailableRect: Rect ): OSStatus; external name '_GetAvailableWindowPositioningBounds';
  7328. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7329. {
  7330. * GetAvailableWindowPositioningRegion()
  7331. *
  7332. * Summary:
  7333. * Returns the available window positioning region on the given
  7334. * screen (i.e., the screen rect minus the MenuBar and Dock if
  7335. * located on that screen).
  7336. *
  7337. * Discussion:
  7338. * GetAvailableWindowPositionRegion differs from
  7339. * GetAvailableWindowPositioningBounds in that the Bounds API
  7340. * removes the entire area that may theoretically be covered by the
  7341. * Dock, even if the the Dock does not currently reach from edge to
  7342. * edge of the device on which it is positioned. The Region API
  7343. * includes the area at the sides of the Dock that is not covered by
  7344. * the Dock in the available region.
  7345. *
  7346. * HIWindowCopyAvailablePositioningShape is recommended for use
  7347. * instead of this API.
  7348. *
  7349. * Mac OS X threading:
  7350. * Not thread safe
  7351. *
  7352. * Parameters:
  7353. *
  7354. * inDevice:
  7355. * The device for which to find the available bounds. May be NULL
  7356. * to request the bounds of the main device.
  7357. *
  7358. * ioRgn:
  7359. * On entry, contains a preallocated RgnHandle. On exit, the
  7360. * RgnHandle has been modified to contain the available region for
  7361. * the given device.
  7362. *
  7363. * Availability:
  7364. * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only]
  7365. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  7366. * Non-Carbon CFM: not available
  7367. }
  7368. function GetAvailableWindowPositioningRegion( inDevice: GDHandle; ioRgn: RgnHandle ): OSStatus; external name '_GetAvailableWindowPositioningRegion';
  7369. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  7370. {
  7371. * HIWindowGetAvailablePositioningBounds()
  7372. *
  7373. * Summary:
  7374. * Returns the available window positioning bounds on the given
  7375. * display (the display bounds minus the menu bar and Dock if
  7376. * located on that display).
  7377. *
  7378. * Mac OS X threading:
  7379. * Not thread safe
  7380. *
  7381. * Parameters:
  7382. *
  7383. * inDisplay:
  7384. * The display for which to find the available bounds. May be
  7385. * kCGNullDirectDisplay to request the bounds of the main display.
  7386. *
  7387. * inSpace:
  7388. * The coordinate space in which the positioning bounds should be
  7389. * returned. This must be either kHICoordSpaceScreenPixel or
  7390. * kHICoordSpace72DPIGlobal.
  7391. *
  7392. * outAvailableRect:
  7393. * On exit, contains the available bounds for the given display.
  7394. * This rectangle is returned in the specified coordinate space.
  7395. *
  7396. * Result:
  7397. * An operating system result code.
  7398. *
  7399. * Availability:
  7400. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  7401. * CarbonLib: not available
  7402. * Non-Carbon CFM: not available
  7403. }
  7404. function HIWindowGetAvailablePositioningBounds( inDisplay: CGDirectDisplayID; inSpace: HICoordinateSpace; var outAvailableRect: HIRect ): OSStatus; external name '_HIWindowGetAvailablePositioningBounds';
  7405. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  7406. {
  7407. * HIWindowCopyAvailablePositioningShape()
  7408. *
  7409. * Summary:
  7410. * Returns the available window positioning bounds on the given
  7411. * display (the display bounds minus the menu bar and Dock if
  7412. * located on that display).
  7413. *
  7414. * Discussion:
  7415. * HIWindowCopyAvailablePositioningShape differs from
  7416. * HIWindowGetAvailablePositioningBounds in that the Bounds API
  7417. * removes the entire area that may theoretically be covered by the
  7418. * Dock, even if the the Dock does not currently reach from edge to
  7419. * edge of the device on which it is positioned. The Shape API
  7420. * includes the area at the sides of the Dock that is not covered by
  7421. * the Dock in the available shape.
  7422. *
  7423. * Mac OS X threading:
  7424. * Not thread safe
  7425. *
  7426. * Parameters:
  7427. *
  7428. * inDisplay:
  7429. * The display for which to find the available shape. May be
  7430. * kCGNullDirectDisplay to request the shape of the main display.
  7431. *
  7432. * inSpace:
  7433. * The coordinate space in which the positioning shape should be
  7434. * returned. This must be either kHICoordSpaceScreenPixel or
  7435. * kHICoordSpace72DPIGlobal.
  7436. *
  7437. * outShape:
  7438. * On exit, contains the available shape for the given display.
  7439. * This shape is returned in the specified coordinate space.
  7440. *
  7441. * Result:
  7442. * An operating system result code.
  7443. *
  7444. * Availability:
  7445. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  7446. * CarbonLib: not available
  7447. * Non-Carbon CFM: not available
  7448. }
  7449. function HIWindowCopyAvailablePositioningShape( inDisplay: CGDirectDisplayID; inSpace: HICoordinateSpace; var outShape: HIShapeRef ): OSStatus; external name '_HIWindowCopyAvailablePositioningShape';
  7450. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  7451. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7452. { ¥ Window Visibility }
  7453. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7454. {
  7455. * HideWindow()
  7456. *
  7457. * Mac OS X threading:
  7458. * Not thread safe
  7459. *
  7460. * Availability:
  7461. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  7462. * CarbonLib: in CarbonLib 1.0 and later
  7463. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  7464. }
  7465. procedure HideWindow( window: WindowRef ); external name '_HideWindow';
  7466. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7467. {
  7468. * [Mac]ShowWindow()
  7469. *
  7470. * Mac OS X threading:
  7471. * Not thread safe
  7472. *
  7473. * Availability:
  7474. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  7475. * CarbonLib: in CarbonLib 1.0 and later
  7476. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  7477. }
  7478. {$ifc TARGET_OS_MAC}
  7479. procedure MacShowWindow__NAME__ShowWindow( window: WindowRef ); external name '_MacShowWindow__NAME__ShowWindow';
  7480. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7481. {$endc} {TARGET_OS_MAC}
  7482. procedure ShowWindow( window: WindowRef ); external name '_ShowWindow';
  7483. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7484. {
  7485. * ShowHide()
  7486. *
  7487. * Mac OS X threading:
  7488. * Not thread safe
  7489. *
  7490. * Availability:
  7491. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  7492. * CarbonLib: in CarbonLib 1.0 and later
  7493. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  7494. }
  7495. procedure ShowHide( window: WindowRef; showFlag: Boolean ); external name '_ShowHide';
  7496. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7497. {
  7498. * [Mac]IsWindowVisible()
  7499. *
  7500. * Mac OS X threading:
  7501. * Not thread safe
  7502. *
  7503. * Availability:
  7504. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  7505. * CarbonLib: in CarbonLib 1.0 and later
  7506. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  7507. }
  7508. {$ifc TARGET_OS_MAC}
  7509. function MacIsWindowVisible__NAME__IsWindowVisible( window: WindowRef ): Boolean; external name '_MacIsWindowVisible__NAME__IsWindowVisible';
  7510. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7511. {$endc} {TARGET_OS_MAC}
  7512. function IsWindowVisible( window: WindowRef ): Boolean; external name '_IsWindowVisible';
  7513. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7514. {
  7515. * HIWindowIsOnActiveSpace()
  7516. *
  7517. * Summary:
  7518. * Returns whether a window is attached to the currently active
  7519. * space.
  7520. *
  7521. * Discussion:
  7522. * For visible windows, this API indicates whether the window is
  7523. * currently visible on the active space; for invisible windows, it
  7524. * indicates whether the window would be visible on the active space
  7525. * if it were visible at this moment. The window's visible state
  7526. * still controls whether the window is actually visible or not.
  7527. *
  7528. *
  7529. * Windows that have availability attributes of either
  7530. * kHIWindowCanJoinAllSpaces or kHIWindowMoveToActiveSpace will
  7531. * always return true from this API.
  7532. *
  7533. * Mac OS X threading:
  7534. * Not thread safe
  7535. *
  7536. * Parameters:
  7537. *
  7538. * inWindow:
  7539. * The window to examine.
  7540. *
  7541. * Result:
  7542. * True if the window is attached to the current space or to all
  7543. * spaces, or false if the window is attached solely to some other
  7544. * space.
  7545. *
  7546. * Availability:
  7547. * Mac OS X: in version 10.6 and later in Carbon.framework [32-bit only]
  7548. * CarbonLib: not available
  7549. * Non-Carbon CFM: not available
  7550. }
  7551. function HIWindowIsOnActiveSpace( inWindow: WindowRef ): Boolean; external name '_HIWindowIsOnActiveSpace';
  7552. (* AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER *)
  7553. {
  7554. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  7555. ¥ÊLatent window visibility
  7556. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  7557. }
  7558. {$endc} {not TARGET_CPU_64}
  7559. {
  7560. * WindowLatentVisibility
  7561. *
  7562. * Summary:
  7563. * Reasons why a window is currently invisible when ordinarily it
  7564. * would be visible.
  7565. }
  7566. type
  7567. WindowLatentVisibility = UInt32;
  7568. WindowLatentVisibilityPtr = ^WindowLatentVisibility;
  7569. const
  7570. {
  7571. * Window is a floater and floating windows are hidden
  7572. }
  7573. kWindowLatentVisibleFloater = 1 shl 0;
  7574. {
  7575. * Window has HideOnSuspend and we are suspended
  7576. }
  7577. kWindowLatentVisibleSuspend = 1 shl 1;
  7578. {
  7579. * Window has HideOnFullScreen and we are full-screen
  7580. }
  7581. kWindowLatentVisibleFullScreen = 1 shl 2;
  7582. {
  7583. * Window's process is hidden
  7584. }
  7585. kWindowLatentVisibleAppHidden = 1 shl 3;
  7586. {
  7587. * Window is in an owned group and the owner was collapsed
  7588. }
  7589. kWindowLatentVisibleCollapsedOwner = 1 shl 4;
  7590. {
  7591. * Window is in a HideOnCollapse group and another window in the
  7592. * group was collapsed
  7593. }
  7594. kWindowLatentVisibleCollapsedGroup = 1 shl 5;
  7595. {$ifc not TARGET_CPU_64}
  7596. {
  7597. * IsWindowLatentVisible()
  7598. *
  7599. * Summary:
  7600. * Indicates whether a window is visible onscreen and also whether
  7601. * it is latently visible but not currently onscreen.
  7602. *
  7603. * Discussion:
  7604. * All windows are either onscreen or offscreen. A window that is
  7605. * offscreen may still be latently visible; this occurs, for
  7606. * example, when a floating window is hidden as an application is
  7607. * suspended. The floating window is not visible onscreen, but it is
  7608. * latently visible and is only hidden due to the suspended state of
  7609. * the application; when the application becomes active again, the
  7610. * floating window will be placed back onscreen.
  7611. * IsWindowLatentVisible may be used to determine both the window's
  7612. * onscreen/offscreen status and its latent visibility (if the
  7613. * window is offscreen).
  7614. *
  7615. * Mac OS X threading:
  7616. * Not thread safe
  7617. *
  7618. * Parameters:
  7619. *
  7620. * inWindow:
  7621. * The window whose visibility to return.
  7622. *
  7623. * outLatentVisible:
  7624. * If the window is onscreen, the latent visibility is zero. If
  7625. * the window is offscreen, this parameter is used to return the
  7626. * latent visibility flags of the window. If any of the flags are
  7627. * set, then the window is latently visible.
  7628. *
  7629. * Result:
  7630. * Indicates whether the window is currently onscreen.
  7631. *
  7632. * Availability:
  7633. * Mac OS X: in version 10.1 and later in Carbon.framework [32-bit only]
  7634. * CarbonLib: in CarbonLib 1.5 and later
  7635. * Non-Carbon CFM: not available
  7636. }
  7637. function IsWindowLatentVisible( inWindow: WindowRef; outLatentVisible: WindowLatentVisibilityPtr { can be NULL } ): Boolean; external name '_IsWindowLatentVisible';
  7638. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  7639. {
  7640. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  7641. ¥ÊWindow Availability for ExposŽ
  7642. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  7643. }
  7644. {$endc} {not TARGET_CPU_64}
  7645. {
  7646. * Summary:
  7647. * Window availability options for ExposŽ and Spaces.
  7648. *
  7649. * Discussion:
  7650. * These options are used with the HIWindowGet/ChangeAvailability
  7651. * APIs to override the default behavior of a window in ExposŽ and
  7652. * Spaces. Most applications should not override the default
  7653. * behavior; these options should only be used in special cases. By
  7654. * default, newly created windows of class kDocumentWindowClass are
  7655. * given an availability of zero (meaning that they are available
  7656. * during ExposŽ, and are only visible in the Space in which they
  7657. * were created), and windows from all other window classes are
  7658. * given an availability of kHIWindowExposeHidden.
  7659. }
  7660. const
  7661. {
  7662. * This window is hidden during ExposŽÕs ÒAll windowsÓ and
  7663. * ÒApplication windowsÓ modes, and during the Spaces overview mode.
  7664. * It moves to the current space automatically after a space switch,
  7665. * and does not trigger a space switch when dragged to a space
  7666. * boundary. If this bit is not set, the window is visible during
  7667. * ExposŽ and Spaces.
  7668. }
  7669. kHIWindowBehaviorTransient = 1 shl 0;
  7670. {
  7671. * This window is visible during ExposŽÕs ÒAll windowsÓ and
  7672. * ÒApplication windowsÓ modes, and does not move. It remains in its
  7673. * original position and, when clicked in "Show desktop" mode,
  7674. * receives the mouse event.
  7675. }
  7676. kHIWindowBehaviorStationary = 1 shl 1;
  7677. {
  7678. * This window is visible in all window sets managed by Spaces. If
  7679. * this bit is not set, the window is only visible in the Space where
  7680. * it was created. This bit and the kHIWindowMoveToActiveSpace bit
  7681. * should not both be set.
  7682. }
  7683. kHIWindowCanJoinAllSpaces = 1 shl 8;
  7684. {
  7685. * When made visible, this window is always shown in the current
  7686. * Space, rather than the space in which it was last visible. When
  7687. * activated, this window moves to the active space, rather than
  7688. * forcing a switch to the Space on which it was previously located.
  7689. * This option is typically used with modeless dialog windows such as
  7690. * the Quick Search window in BBEdit. This bit and the
  7691. * kHIWindowCanJoinAllSpaces bit should not both be set.
  7692. }
  7693. kHIWindowMoveToActiveSpace = 1 shl 9;
  7694. {
  7695. * The original name for the constant kHIWindowBehaviorTransient.
  7696. * Please do not use this name.
  7697. }
  7698. kHIWindowExposeHidden = kHIWindowBehaviorTransient;
  7699. {
  7700. * The original name for the constant kHIWindowCanJoinAllSpaces.
  7701. * Please do not use this name.
  7702. }
  7703. kHIWindowVisibleInAllSpaces = kHIWindowCanJoinAllSpaces;
  7704. type
  7705. HIWindowAvailability = OptionBits;
  7706. {$ifc not TARGET_CPU_64}
  7707. {
  7708. * HIWindowGetAvailability()
  7709. *
  7710. * Summary:
  7711. * Returns the availability of a window during ExposŽ.
  7712. *
  7713. * Mac OS X threading:
  7714. * Not thread safe
  7715. *
  7716. * Parameters:
  7717. *
  7718. * inWindow:
  7719. * The window whose availability to return.
  7720. *
  7721. * outAvailability:
  7722. * On exit, contains the window availability.
  7723. *
  7724. * Availability:
  7725. * Mac OS X: in version 10.4 and later in Carbon.framework [32-bit only]
  7726. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  7727. * Non-Carbon CFM: not available
  7728. }
  7729. function HIWindowGetAvailability( inWindow: WindowRef; var outAvailability: HIWindowAvailability ): OSStatus; external name '_HIWindowGetAvailability';
  7730. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  7731. {
  7732. * HIWindowChangeAvailability()
  7733. *
  7734. * Summary:
  7735. * Alters the availability of a window during ExposŽ.
  7736. *
  7737. * Mac OS X threading:
  7738. * Not thread safe
  7739. *
  7740. * Parameters:
  7741. *
  7742. * inWindow:
  7743. * The window whose availability to change.
  7744. *
  7745. * inSetAvailability:
  7746. * The availability bits to set.
  7747. *
  7748. * inClearAvailability:
  7749. * The availability bits to clear.
  7750. *
  7751. * Availability:
  7752. * Mac OS X: in version 10.4 and later in Carbon.framework [32-bit only]
  7753. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  7754. * Non-Carbon CFM: not available
  7755. }
  7756. function HIWindowChangeAvailability( inWindow: WindowRef; inSetAvailability: HIWindowAvailability; inClearAvailability: HIWindowAvailability ): OSStatus; external name '_HIWindowChangeAvailability';
  7757. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  7758. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7759. {
  7760. ¥ Sheets
  7761. Sheets are a new user interface object in Mac OS X. A sheet is a modal alert or dialog,
  7762. but unlike a traditional alert or dialog window (which is visually separate from the
  7763. frontmost document window), a sheet appears to be attached to its parent window; it
  7764. moves and z-orders simultaneously with its parent. Furthermore, sheets on Mac OS X
  7765. use a new type of modality called window modality. A traditional alert or dialog is
  7766. app-modal; it prevents user interaction with all other windows in the current application.
  7767. A sheet is window-modal; it only prevents user interaction with its parent window, and
  7768. events continue to flow to other windows in the application.
  7769. ¥ Sheet Event Handling
  7770. Implementing a sheet window in your application generally requires some modifications
  7771. to your event-handling code. A traditional app-modal window is implemented using a modal
  7772. event loop; your application starts a new event loop (either by processing events itself,
  7773. or by calling ModalDialog), which does not return back to your application's main event
  7774. loop until the app-modal window has closed.
  7775. Starting a new event loop doesn't work with sheets, because typically the modal event loop
  7776. will only handle events destined for the sheet, and not events for other windows, but
  7777. a sheet only blocks events for its parent window, and your application must still handle
  7778. events for the rest of its windows as normal. Therefore, you will usually not use a modal
  7779. event loop to handle events in a sheet. Rather, you will show the sheet window, and then
  7780. return directly back to your main event loop. The Carbon Event Manager automatically
  7781. prevents events from reaching the sheet's parent window; events in your application's
  7782. other windows are still returned to you via WaitNextEvent or your application's Carbon
  7783. event handlers, where you can process them as normal.
  7784. You have several choices for handling events in the sheet itself. A sheet is, at the most
  7785. basic level, simply another window in your application, and you can use any of the standard
  7786. event-handling APIs to receive events in the sheet. For example, you can:
  7787. - receive events in the sheet via WaitNextEvent, and handle them directly in your
  7788. main event loop
  7789. - create the sheet using Dialog Manager APIs, and use IsDialogEvent and DialogSelect
  7790. to handle events in the sheet
  7791. - install Carbon event handlers on the sheet, and respond to events in your handlers
  7792. Which approach you choose is up to you.
  7793. ¥ Sheets in CarbonLib
  7794. The sheet window class, sheet WDEF procIDs, and ShowSheetWindow, HideSheetWindow, and
  7795. GetSheetWindowParent APIs are implemented in CarbonLib starting with version 1.3. However,
  7796. since Mac OS 8 and 9 do not traditionally support a window-modal user interface, sheet
  7797. windows are displayed as app-modal windows by CarbonLib. From your application's perspective,
  7798. event handling for a sheet in CarbonLib is the same as event handling for a sheet on X;
  7799. ShowSheetWindow still returns immediately, and your application should still return back
  7800. to its main event loop and be prepared to handle events in other windows. On CarbonLib,
  7801. your application will simply never receive any user input in any of your other windows;
  7802. since the sheet has application modality, the Carbon Event Manager will discard events
  7803. in any windows other than the sheet.
  7804. ¥ÊCreating a Sheet
  7805. A sheet is just a normal window with a special window class: kSheetWindowClass or
  7806. kSheetAlertWindowClass. As such, it can be created in any of the ways you might create
  7807. a window: NewWindow, NewCWindow, CreateNewWindow, GetNewWindow, GetNewCWindow,
  7808. CreateWindowFromCollection, CreateWindowFromResource, CreateWindowFromNib, NewDialog,
  7809. NewColorDialog, NewFeaturesDialog, or GetNewDialog.
  7810. The Window Manager defines two window classes and two WDEF procIDs for sheets:
  7811. - kSheetWindowClass and kSheetAlertWindowClass
  7812. - kWindowSheetProc and kWindowSheetAlertProc
  7813. The window classes may be used with CreateNewWindow, CreateWindowFromCollection, and
  7814. CreateWindowFromResource; the WDEF procIDs may be used with NewWindow, NewCWindow, NewDialog,
  7815. NewColorDialog, NewFeaturesDialog, and in 'WDEF' and 'DLOG' resources.
  7816. Mac OS X 10.0 only supports kSheetWindowClass and kWindowSheetProc;
  7817. it does not support kSheetAlertWindowClass or kWindowSheetAlertProc. The latter window
  7818. class and procID were added in CarbonLib 1.3 and Mac OS X 10.1. A new window class and
  7819. procID were necessary for CarbonLib support because
  7820. sheets can be used for both alerts ("Do you want to save changes before closing this
  7821. window?") and dialogs (a Navigation Services PutFile dialog). On Mac OS X, sheet windows
  7822. have the same appearance when used for either an alert or a dialog, but on Mac OS 8 and 9,
  7823. alert windows have a different appearance from dialog windows. Two separate window classes
  7824. are necessary for CarbonLib to know whether to display a sheet using a movable alert or a
  7825. movable dialog window. Therefore, it is recommended that you use kSheetAlertWindowClass when
  7826. creating a sheet window that will be used to display an alert, although this is not required.
  7827. ¥ Displaying a Sheet
  7828. A sheet is made visible by calling the ShowSheetWindow API. This API shows the sheet,
  7829. using whatever visual effects are appropriate for the platform, and then returns immediately.
  7830. On Mac OS X, it creates a window group and places the sheet and its parent window into the
  7831. group; it also marks the sheet as window-modal. On CarbonLib, it marks the sheet as app-modal
  7832. but does not create a window group.
  7833. On Mac OS X, before the sheet window is actually made visible, ShowSheetWindow sends a
  7834. kEventWindowDrawContent event to the sheet window, asking it to draw its content into the
  7835. window's offscreen buffer. The sheet must handle this event, or its content area will be
  7836. blank after the sheet becomes visible.
  7837. In some cases, this handler is automatically provided for you:
  7838. - If you create your sheet window using the Dialog Manager, the Dialog Manager
  7839. automatically installs a handler for this event that calls DrawDialog, so you
  7840. don't need to install the handler yourself.
  7841. - If you install the standard Carbon window event handler on your sheet window
  7842. (using kWindowStandardHandlerAttribute or InstallStandardEventHandler), the
  7843. standard handler automatically handles this event and calls DrawControls.
  7844. Typically, your event handling code (whether it uses WaitNextEvent, the Dialog Manager,
  7845. or Carbon event handlers) will receive and respond to events in the sheet until the
  7846. user does something that should cause the sheet to close. This might be clicking in an
  7847. OK or Cancel button, for example. At that time, your event handling code must call either
  7848. HideSheetWindow or DetachSheetWindow. The sheet window will hide, but will not be destroyed,
  7849. so you can use it again later if you want.
  7850. ¥ÊClosing a sheet
  7851. A sheet is normally hidden by calling the HideSheetWindow API. HideSheetWindow provides the
  7852. visual effects of zooming the sheet back into the parent window's title bar and moving the
  7853. parent window back to its original position. In Mac OS X 10.3 and later, the DetachSheetWindow
  7854. API is also available. DetachSheetWindow ungroups the sheet from its parent, releases the
  7855. retain count acquired by ShowSheetWindow on the parent window, and removes all event handlers
  7856. installed by ShowSheetWindow, but does not hide the sheet window; an application would typically
  7857. call DetachSheetWindow and then HideWindow to hide the sheet window without the sheet closing
  7858. animation. This may be useful if, for example, the sheet were being used to ask if changes to
  7859. a modified document should be saved; if the user chooses "DonÕt Save", then the application
  7860. could use DetachSheetWindow and then hide both the sheet and the document immediately, so that
  7861. the document closes as quickly as possible without taking time for the closing animation.
  7862. The Navigation Services Save Changes dialog does this automatically.
  7863. You _must_ call either HideSheetWindow or DetachSheetWindow before destroying a sheet that has
  7864. been shown with ShowSheetWindow. You may not simply dispose of a sheet window without first using
  7865. Hide or DetachSheetWindow; doing so will leave an extra refcount on the parent window, and will
  7866. leave the parent window still embedded in the sheet window group.
  7867. ¥ Sheet Transparency
  7868. Sheets should be transparent so that the user can see some of the document content behind
  7869. the sheet and remember the context in which the sheet was displayed. In Mac OS X 10.1,
  7870. a sheet is made transparent by using the kThemeBrushSheetBackgroundTransparent constant for
  7871. the sheet windowÕs theme background brush. In Mac OS X 10.2 and later, sheets are only
  7872. transparent if this brush is used and if the sheet window uses compositing mode (enabled by
  7873. setting the kWindowCompositingAttribute window attribute when the sheet window is created).
  7874. }
  7875. {
  7876. * ShowSheetWindow()
  7877. *
  7878. * Summary:
  7879. * Shows a sheet window using appropriate visual effects.
  7880. *
  7881. * Discussion:
  7882. * ShowSheetWindow is implemented in both CarbonLib 1.3 and Mac OS
  7883. * X. Since Mac OS 9 does not use a window-modal user interface for
  7884. * alerts and dialogs, ShowSheetWindow in CarbonLib does not bind
  7885. * the sheet to the parent window in the same way that it does on
  7886. * Mac OS X; instead, it shows the sheet like a standard
  7887. * movable-modal dialog window. Sheet windows must use the window
  7888. * classes kSheetWindowClass or kSheetAlertWindowClass to get the
  7889. * right appearance on both platforms.
  7890. *
  7891. * Note that ShowSheetWindow will increment the retain count of the
  7892. * parent window. The retain count is decremented by HideSheetWindow
  7893. * and DetachSheetWindow. You must call one of those APIs before
  7894. * destroying the sheet window.
  7895. *
  7896. * On Mac OS X, ShowSheetWindow sets the modality of the sheet
  7897. * window to kWindowModalityWindowModal.
  7898. *
  7899. * Mac OS X threading:
  7900. * Not thread safe
  7901. *
  7902. * Parameters:
  7903. *
  7904. * inSheet:
  7905. * The sheet window to show.
  7906. *
  7907. * inParentWindow:
  7908. * The sheet's parent window.
  7909. *
  7910. * Result:
  7911. * An operating system result code. ShowSheetWindow checks for the
  7912. * following error conditions, and returns paramErr if any occur:
  7913. * the sheet window must have a window class of kSheetWindowClass or
  7914. * kSheetAlertWindowClass; the sheet and parent windows must not be
  7915. * the same window; the sheet must not have a parent window already;
  7916. * and the parent window must not already be the target of a sheet.
  7917. *
  7918. * Availability:
  7919. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  7920. * CarbonLib: in CarbonLib 1.3 and later
  7921. * Non-Carbon CFM: not available
  7922. }
  7923. function ShowSheetWindow( inSheet: WindowRef; inParentWindow: WindowRef ): OSStatus; external name '_ShowSheetWindow';
  7924. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7925. {
  7926. * HideSheetWindow()
  7927. *
  7928. * Summary:
  7929. * Hides a sheet window using appropriate visual effects.
  7930. *
  7931. * Mac OS X threading:
  7932. * Not thread safe
  7933. *
  7934. * Parameters:
  7935. *
  7936. * inSheet:
  7937. * The sheet window to hide.
  7938. *
  7939. * Availability:
  7940. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  7941. * CarbonLib: in CarbonLib 1.3 and later
  7942. * Non-Carbon CFM: not available
  7943. }
  7944. function HideSheetWindow( inSheet: WindowRef ): OSStatus; external name '_HideSheetWindow';
  7945. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7946. {
  7947. * DetachSheetWindow()
  7948. *
  7949. * Summary:
  7950. * Detaches a sheet window from its parent window without affecting
  7951. * the visibility or position of the sheet or its parent.
  7952. *
  7953. * Discussion:
  7954. * This API may be useful if you want to hide a sheet window without
  7955. * an animation effect. To do that, use DetachSheetWindow to detach
  7956. * the sheet from the parent, and then use HideWindow to hide the
  7957. * sheet, or DisposeWindow to destroy the sheet.
  7958. *
  7959. * Mac OS X threading:
  7960. * Not thread safe
  7961. *
  7962. * Parameters:
  7963. *
  7964. * inSheet:
  7965. * The sheet to detach.
  7966. *
  7967. * Availability:
  7968. * Mac OS X: in version 10.3 and later in Carbon.framework [32-bit only]
  7969. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  7970. * Non-Carbon CFM: not available
  7971. }
  7972. function DetachSheetWindow( inSheet: WindowRef ): OSStatus; external name '_DetachSheetWindow';
  7973. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  7974. {
  7975. * GetSheetWindowParent()
  7976. *
  7977. * Summary:
  7978. * Returns the parent window of a sheet.
  7979. *
  7980. * Mac OS X threading:
  7981. * Not thread safe
  7982. *
  7983. * Parameters:
  7984. *
  7985. * inSheet:
  7986. * The sheet window whose parent to retrieve.
  7987. *
  7988. * outParentWindow:
  7989. * On exit, contains the parent window of the sheet.
  7990. *
  7991. * Availability:
  7992. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  7993. * CarbonLib: in CarbonLib 1.3 and later
  7994. * Non-Carbon CFM: not available
  7995. }
  7996. function GetSheetWindowParent( inSheet: WindowRef; var outParentWindow: WindowRef ): OSStatus; external name '_GetSheetWindowParent';
  7997. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7998. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7999. {
  8000. ¥ Drawers
  8001. Drawers are supported in Carbon by Mac OS X 10.2 and later. To create and use a drawer:
  8002. - Create a window using kDrawerWindowClass. You must also use compositing mode with
  8003. drawers; this mode is enabled by passing kWindowCompositingAttribute to CreateNewWindow.
  8004. - Either install the standard window event handler on the drawer window, or use
  8005. your own Carbon event or WaitNextEvent code to handle user interaction with the
  8006. drawer. If you do not use the standard window event handler, you should call
  8007. ResizeWindow in response to clicks on the grow region of the drawer if you want
  8008. the drawer to be resizable.
  8009. - Set the drawer's parent window with the SetDrawerParent function. The parent is
  8010. the window on which the drawer will open.
  8011. - Optionally, install a Carbon event handler on the drawer or the drawer's parent
  8012. window for the kEventWindowDrawerOpening/Opened/Closing/Closed events, to be notified
  8013. when the drawer has started or finished opening or closing.
  8014. - Optionally, set the drawer's preferred edge on the parent window with the
  8015. SetDrawerPreferredEdge function. If you do not set a preferred edge, the drawer
  8016. opens on the parent's left side on a left-to-right system, or on the parent's right
  8017. side on a right-to-left system.
  8018. - Optionally, set the drawer's offsets with the SetDrawerOffsets function. The offsets
  8019. control the amount of inset between the edge of the parent's content area and the edge
  8020. of the drawer's structure. If you do not set any offsets, the drawer's edges are flush
  8021. with the edges of the parent's content.
  8022. - Optionally, set the drawer's minimum and maximum sizes with the SetWindowResizeLimits
  8023. function. Or, install a Carbon event handler on the drawer to handle the kEventWindow-
  8024. GetMinimumSize and kEventWindowGetMaximumSize events. The drawer's minimum and maximum
  8025. sizes control how small or large it will resize together with the parent. If you do not
  8026. set resize limits, the drawer will be capable of resizing to default small and large
  8027. limits.
  8028. - Call ToggleDrawer to open or close the drawer, or use OpenDrawer or CloseDrawer if
  8029. you require more control over how the drawer opens or closes.
  8030. }
  8031. {$endc} {not TARGET_CPU_64}
  8032. {
  8033. * Summary:
  8034. * Indicates the parent window edge on which a drawer will be shown.
  8035. }
  8036. const
  8037. {
  8038. * This constant is typically used with the OpenDrawer API; it
  8039. * indicates that the drawer should be opened on whatever edge of the
  8040. * parent window has previously been set as the drawer's preferred
  8041. * edge.
  8042. }
  8043. kWindowEdgeDefault = 0;
  8044. {
  8045. * The drawer should open on the top edge of the parent window.
  8046. }
  8047. kWindowEdgeTop = 1 shl 0;
  8048. {
  8049. * The drawer should open on the left edge of the parent window.
  8050. }
  8051. kWindowEdgeLeft = 1 shl 1;
  8052. {
  8053. * The drawer should open on the bottom edge of the parent window.
  8054. }
  8055. kWindowEdgeBottom = 1 shl 2;
  8056. {
  8057. * The drawer should open on the right edge of the parent window.
  8058. }
  8059. kWindowEdgeRight = 1 shl 3;
  8060. {
  8061. * Summary:
  8062. * Indicates the current state of a drawer window.
  8063. }
  8064. const
  8065. {
  8066. * The drawer is opening, but is not yet fully open.
  8067. }
  8068. kWindowDrawerOpening = 1;
  8069. {
  8070. * The drawer is fully open.
  8071. }
  8072. kWindowDrawerOpen = 2;
  8073. {
  8074. * The drawer is closing, but is not yet fully closed.
  8075. }
  8076. kWindowDrawerClosing = 3;
  8077. {
  8078. * The drawer is fully closed.
  8079. }
  8080. kWindowDrawerClosed = 4;
  8081. type
  8082. WindowDrawerState = UInt32;
  8083. {$ifc not TARGET_CPU_64}
  8084. {
  8085. * GetDrawerPreferredEdge()
  8086. *
  8087. * Summary:
  8088. * Returns the preferred parent window edge of a drawer.
  8089. *
  8090. * Discussion:
  8091. * Drawers start out with a preferred parent window edge of
  8092. * kWindowEdgeDefault. On left-to-right systems, the default edge is
  8093. * the left edge of the parent window; on right-to-left systems, the
  8094. * default edge is the right edge. You can set the preferred edge
  8095. * with SetDrawerPreferredEdge. If there's not enough room on the
  8096. * preferred edge, the drawer will automatically switch to the
  8097. * opposite edge.
  8098. *
  8099. * Mac OS X threading:
  8100. * Not thread safe
  8101. *
  8102. * Parameters:
  8103. *
  8104. * inDrawerWindow:
  8105. * The drawer window whose preferred edge to retrieve.
  8106. *
  8107. * Result:
  8108. * The preferred edge of the drawer window.
  8109. *
  8110. * Availability:
  8111. * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only]
  8112. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  8113. * Non-Carbon CFM: not available
  8114. }
  8115. function GetDrawerPreferredEdge( inDrawerWindow: WindowRef ): OptionBits; external name '_GetDrawerPreferredEdge';
  8116. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  8117. {
  8118. * SetDrawerPreferredEdge()
  8119. *
  8120. * Summary:
  8121. * Sets the preferred parent window edge of a drawer.
  8122. *
  8123. * Mac OS X threading:
  8124. * Not thread safe
  8125. *
  8126. * Parameters:
  8127. *
  8128. * inDrawerWindow:
  8129. * The drawer window whose preferred edge to set.
  8130. *
  8131. * inEdge:
  8132. * The preferred edge of the drawer window. Note that although the
  8133. * WindowEdge enumeration has values appropriate for a bitfield,
  8134. * the current implementation does not support receiving more than
  8135. * one edge bit in this parameter. You can also pass
  8136. * kWindowEdgeDefault to allow the Window Manager to pick an edge.
  8137. *
  8138. * Availability:
  8139. * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only]
  8140. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  8141. * Non-Carbon CFM: not available
  8142. }
  8143. function SetDrawerPreferredEdge( inDrawerWindow: WindowRef; inEdge: OptionBits ): OSStatus; external name '_SetDrawerPreferredEdge';
  8144. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  8145. {
  8146. * GetDrawerCurrentEdge()
  8147. *
  8148. * Summary:
  8149. * Returns the current parent window edge on which a drawer is
  8150. * displayed.
  8151. *
  8152. * Discussion:
  8153. * If the drawer window is currently visible, this API returns the
  8154. * parent window edge on which the drawer is displayed. If the
  8155. * drawer is not visible, this API determines on which edge of the
  8156. * parent window the drawer should be displayed, given the current
  8157. * size of the drawer, position of the parent, and preferred edge
  8158. * for the drawer.
  8159. *
  8160. * Mac OS X threading:
  8161. * Not thread safe
  8162. *
  8163. * Parameters:
  8164. *
  8165. * inDrawerWindow:
  8166. * The drawer window whose current edge to retrieve.
  8167. *
  8168. * Result:
  8169. * The current edge of the drawer window.
  8170. *
  8171. * Availability:
  8172. * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only]
  8173. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  8174. * Non-Carbon CFM: not available
  8175. }
  8176. function GetDrawerCurrentEdge( inDrawerWindow: WindowRef ): OptionBits; external name '_GetDrawerCurrentEdge';
  8177. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  8178. {
  8179. * GetDrawerState()
  8180. *
  8181. * Summary:
  8182. * Returns the current state of a drawer: opening, open, closing, or
  8183. * closed.
  8184. *
  8185. * Mac OS X threading:
  8186. * Not thread safe
  8187. *
  8188. * Parameters:
  8189. *
  8190. * inDrawerWindow:
  8191. * The drawer window whose state to retrieve.
  8192. *
  8193. * Result:
  8194. * The current state of the drawer window.
  8195. *
  8196. * Availability:
  8197. * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only]
  8198. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  8199. * Non-Carbon CFM: not available
  8200. }
  8201. function GetDrawerState( inDrawerWindow: WindowRef ): WindowDrawerState; external name '_GetDrawerState';
  8202. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  8203. {
  8204. * GetDrawerParent()
  8205. *
  8206. * Summary:
  8207. * Returns the parent window of a drawer.
  8208. *
  8209. * Mac OS X threading:
  8210. * Not thread safe
  8211. *
  8212. * Parameters:
  8213. *
  8214. * inDrawerWindow:
  8215. * The drawer window whose parent window to retrieve.
  8216. *
  8217. * Result:
  8218. * The drawer's parent window, or NULL if the drawer has no assigned
  8219. * parent.
  8220. *
  8221. * Availability:
  8222. * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only]
  8223. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  8224. * Non-Carbon CFM: not available
  8225. }
  8226. function GetDrawerParent( inDrawerWindow: WindowRef ): WindowRef; external name '_GetDrawerParent';
  8227. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  8228. {
  8229. * SetDrawerParent()
  8230. *
  8231. * Summary:
  8232. * Sets the parent window of a drawer.
  8233. *
  8234. * Discussion:
  8235. * In Mac OS X 10.4 and 10.5, this API incorrectly increments the
  8236. * refcount of the drawer window, and you must either destroy the
  8237. * drawer parent window or use SetDrawerParent( drawer, NULL ) on
  8238. * the drawer window before destroying the drawer. This extra step
  8239. * is not required in Mac OS X 10.2, 10.3, or 10.6 and later; in
  8240. * those versions you may simply release the drawer window when
  8241. * you're done with it and it will be automatically removed from the
  8242. * parent.
  8243. *
  8244. * Mac OS X threading:
  8245. * Not thread safe
  8246. *
  8247. * Parameters:
  8248. *
  8249. * inDrawerWindow:
  8250. * The drawer window whose parent window to set.
  8251. *
  8252. * inParent:
  8253. * The drawer's new parent window, or NULL if the drawer should
  8254. * have no parent.
  8255. *
  8256. * Result:
  8257. * An operating system result code.
  8258. *
  8259. * Availability:
  8260. * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only]
  8261. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  8262. * Non-Carbon CFM: not available
  8263. }
  8264. function SetDrawerParent( inDrawerWindow: WindowRef; inParent: WindowRef ): OSStatus; external name '_SetDrawerParent';
  8265. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  8266. {$endc} {not TARGET_CPU_64}
  8267. {
  8268. * kWindowOffsetUnchanged
  8269. *
  8270. * Discussion:
  8271. * Pass this value to SetDrawerOffsets to indicate that an existing
  8272. * offset should not be changed.
  8273. }
  8274. const
  8275. kWindowOffsetUnchanged = -1.0;
  8276. {$ifc not TARGET_CPU_64}
  8277. {
  8278. * SetDrawerOffsets()
  8279. *
  8280. * Summary:
  8281. * Sets the offsets from the beginning and end of the parent window
  8282. * to the beginning and end of the drawer window.
  8283. *
  8284. * Discussion:
  8285. * The drawer offsets control the positioning of the drawer relative
  8286. * to its parent window. When a drawer is first created, its offsets
  8287. * are zero. When a drawer is positioned, it is initially given a
  8288. * height or width equal to the height or width of the content area
  8289. * of the parent to which it is attached. If a drawer is opening on
  8290. * the left side of its parent, for example, the drawer's height
  8291. * will be the height of the parent's content area. In this case,
  8292. * the top side of the drawer window is called the leading edge of
  8293. * the drawer, and the bottom side of the drawer window is called
  8294. * the trailing edge of the drawer. The drawer's size is then
  8295. * adjusted by the leading and trailing offsets. The leading edge of
  8296. * the drawer is moved inward by an amount equal to the leading
  8297. * offset, and the trailing edge is moved inward by an amount equal
  8298. * to the trailing offset. For example, if the leading and trailing
  8299. * offsets are five and fifteen, then the top edge of a left-opening
  8300. * drawer will be five pixels inside the top edge of the parent
  8301. * window's content area, and the bottom edge of the drawer will be
  8302. * fifteen pixels inside the bottom edge of the parent's content
  8303. * area.
  8304. *
  8305. * Mac OS X threading:
  8306. * Not thread safe
  8307. *
  8308. * Parameters:
  8309. *
  8310. * inDrawerWindow:
  8311. * The drawer window whose offsets to change.
  8312. *
  8313. * inLeadingOffset:
  8314. * The new leading offset, in pixels. Pass kWindowOffsetUnchanged
  8315. * if you don't want to change the leading offset.
  8316. *
  8317. * inTrailingOffset:
  8318. * The new trailing offset, in pixels. Pass kWindowOffsetUnchanged
  8319. * if you don't want to change the trailing offset.
  8320. *
  8321. * Result:
  8322. * An operating system result code.
  8323. *
  8324. * Availability:
  8325. * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only]
  8326. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  8327. * Non-Carbon CFM: not available
  8328. }
  8329. function SetDrawerOffsets( inDrawerWindow: WindowRef; inLeadingOffset: CGFloat; inTrailingOffset: CGFloat ): OSStatus; external name '_SetDrawerOffsets';
  8330. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  8331. {
  8332. * GetDrawerOffsets()
  8333. *
  8334. * Summary:
  8335. * Returns the offsets from the beginning and end of the parent
  8336. * window to the beginning and end of the drawer window.
  8337. *
  8338. * Mac OS X threading:
  8339. * Not thread safe
  8340. *
  8341. * Parameters:
  8342. *
  8343. * inDrawerWindow:
  8344. * The drawer window whose offsets to retrieve.
  8345. *
  8346. * outLeadingOffset:
  8347. * On exit, contains the drawer's leading offset. Pass NULL if you
  8348. * don't need this information returned.
  8349. *
  8350. * outTrailingOffset:
  8351. * On exit, contains the drawer's trailing offset. Pass NULL if
  8352. * you don't need this information returned.
  8353. *
  8354. * Result:
  8355. * An operating system result code.
  8356. *
  8357. * Availability:
  8358. * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only]
  8359. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  8360. * Non-Carbon CFM: not available
  8361. }
  8362. function GetDrawerOffsets( inDrawerWindow: WindowRef; outLeadingOffset: CGFloatPtr { can be NULL }; outTrailingOffset: CGFloatPtr { can be NULL } ): OSStatus; external name '_GetDrawerOffsets';
  8363. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  8364. {
  8365. * ToggleDrawer()
  8366. *
  8367. * Summary:
  8368. * Toggles a drawer from open to closed, or vice versa.
  8369. *
  8370. * Discussion:
  8371. * ToggleDrawer opens the drawer if it is closed, opening, or
  8372. * closing. If the drawer is open, it closes the drawer.
  8373. *
  8374. * ToggleDrawer attempts to open the drawer on its preferred edge,
  8375. * but if there is not enough room on that edge, it will try the
  8376. * opposite edge instead. If there is insufficient room on either
  8377. * edge, the drawer will open on the preferred edge but may extend
  8378. * offscreen, under the Dock, or under the menubar.
  8379. *
  8380. * The opening or closing of the drawer is performed asynchronously;
  8381. * ToggleDrawer installs an event loop timer that opens or closes
  8382. * the drawer after ToggleDrawer returns to the caller. Therefore,
  8383. * the caller must be running its event loop for the drawer to open
  8384. * or close. To open or close the drawer synchronously, use the
  8385. * OpenDrawer or CloseDrawer APIs.
  8386. *
  8387. * ToggleDrawer retains the drawer window while the drawer is
  8388. * opening or closing, and releases it when the drawer is fully
  8389. * opened or closed.
  8390. *
  8391. * ToggleDrawer sends the kEventWindowDrawerOpening,
  8392. * kEventWindowDrawerOpened, kEventWindowDrawerClosing, and
  8393. * kEventWindowDrawerClosed events as the drawer opens or closes.
  8394. *
  8395. * Mac OS X threading:
  8396. * Not thread safe
  8397. *
  8398. * Parameters:
  8399. *
  8400. * inDrawerWindow:
  8401. * The drawer window to open or close.
  8402. *
  8403. * Result:
  8404. * An operating system result code.
  8405. *
  8406. * Availability:
  8407. * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only]
  8408. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  8409. * Non-Carbon CFM: not available
  8410. }
  8411. function ToggleDrawer( inDrawerWindow: WindowRef ): OSStatus; external name '_ToggleDrawer';
  8412. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  8413. {
  8414. * OpenDrawer()
  8415. *
  8416. * Summary:
  8417. * Opens a drawer on a specified parent window edge.
  8418. *
  8419. * Discussion:
  8420. * OpenDrawer may open the drawer either synchronously or
  8421. * asynchronously, depending on the value of the inAsync parameter.
  8422. * If inAsync is true, OpenDrawer installs an event loop timer that
  8423. * opens the drawer after OpenDrawer returns to the caller;
  8424. * therefore, the caller must be running its event loop for the
  8425. * drawer to open. If inAsync is false, OpenDrawer opens the drawer
  8426. * completely before returning to the caller.
  8427. *
  8428. * OpenDrawer retains the drawer window while the drawer is opening,
  8429. * and releases it when the drawer is fully open.
  8430. *
  8431. * OpenDrawer sends the kEventWindowDrawerOpening event to the
  8432. * drawer, the drawer's parent, and the application before opening
  8433. * the drawer. If an event handler for this event returns
  8434. * userCanceledErr, OpenDrawer will return immediately without
  8435. * opening the drawer. OpenDrawer sends the kEventWindowDrawerOpened
  8436. * event to the drawer, the drawer's parent, and the application
  8437. * after the drawer has finished opening.
  8438. *
  8439. * Mac OS X threading:
  8440. * Not thread safe
  8441. *
  8442. * Parameters:
  8443. *
  8444. * inDrawerWindow:
  8445. * The drawer window to open.
  8446. *
  8447. * inEdge:
  8448. * The parent window edge on which to open the drawer. Pass
  8449. * kWindowEdgeDefault to use the drawer's preferred edge. If there
  8450. * is not enough room on the preferred edge, OpenDrawer will try
  8451. * the opposite edge instead. If there is insufficient room on
  8452. * either edge, the drawer will open on the preferred edge but may
  8453. * extend offscreen, under the Dock, or under the menubar.
  8454. *
  8455. * inAsync:
  8456. * Whether to open the drawer synchronously (the drawer is
  8457. * entirely opened before the function call returns) or
  8458. * asynchronously (the drawer opens using an event loop timer
  8459. * after the function call returns).
  8460. *
  8461. * Result:
  8462. * An operating system result code.
  8463. *
  8464. * Availability:
  8465. * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only]
  8466. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  8467. * Non-Carbon CFM: not available
  8468. }
  8469. function OpenDrawer( inDrawerWindow: WindowRef; inEdge: OptionBits; inAsync: Boolean ): OSStatus; external name '_OpenDrawer';
  8470. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  8471. {
  8472. * CloseDrawer()
  8473. *
  8474. * Summary:
  8475. * Closes a drawer.
  8476. *
  8477. * Discussion:
  8478. * CloseDrawer may close the drawer either synchronously or
  8479. * asynchronously, depending on the value of the inAsync parameter.
  8480. * If inAsync is true, CloseDrawer installs an event loop timer that
  8481. * closes the drawer after CloseDrawer returns to the caller;
  8482. * therefore, the caller must be running its event loop for the
  8483. * drawer to close. If inAsync is false, CloseDrawer closes the
  8484. * drawer completely before returning to the caller.
  8485. *
  8486. * CloseDrawer retains the drawer window while the drawer is
  8487. * closing, and releases it when the drawer is fully closed.
  8488. *
  8489. * CloseDrawer sends the kEventWindowDrawerClosing event to the
  8490. * drawer, the drawer's parent, and the application before closing
  8491. * the drawer. If an event handler for this event returns
  8492. * userCanceledErr, CloseDrawer will return immediately without
  8493. * closing the drawer. CloseDrawer sends the
  8494. * kEventWindowDrawerClosed event to the drawer, the drawer's
  8495. * parent, and the application after the drawer has finished closing.
  8496. *
  8497. * Mac OS X threading:
  8498. * Not thread safe
  8499. *
  8500. * Parameters:
  8501. *
  8502. * inDrawerWindow:
  8503. * The drawer window to close.
  8504. *
  8505. * inAsync:
  8506. * Whether to close the drawer synchronously (the drawer is
  8507. * entirely closed before the function call returns) or
  8508. * asynchronously (the drawer closes using an event loop timer
  8509. * after the function call returns).
  8510. *
  8511. * Result:
  8512. * An operating system result code.
  8513. *
  8514. * Availability:
  8515. * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only]
  8516. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  8517. * Non-Carbon CFM: not available
  8518. }
  8519. function CloseDrawer( inDrawerWindow: WindowRef; inAsync: Boolean ): OSStatus; external name '_CloseDrawer';
  8520. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  8521. {
  8522. * HIWindowCopyDrawers()
  8523. *
  8524. * Summary:
  8525. * Returns an array of the drawers that are attached to a window.
  8526. *
  8527. * Mac OS X threading:
  8528. * Not thread safe
  8529. *
  8530. * Parameters:
  8531. *
  8532. * inWindow:
  8533. * The window whose drawers to return.
  8534. *
  8535. * outDrawers:
  8536. * On exit, an array containing WindowRefs. Each array entry is a
  8537. * drawer attached to the specified window. The array will be
  8538. * valid, but empty, if the window has no drawers.
  8539. *
  8540. * Availability:
  8541. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  8542. * CarbonLib: not available
  8543. * Non-Carbon CFM: not available
  8544. }
  8545. function HIWindowCopyDrawers( inWindow: WindowRef; var outDrawers: CFArrayRef ): OSStatus; external name '_HIWindowCopyDrawers';
  8546. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  8547. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  8548. { ¥ Disabling Screen Redraw }
  8549. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  8550. {
  8551. * DisableScreenUpdates()
  8552. *
  8553. * Summary:
  8554. * Temporarily disables redraw of the screen after changes to window
  8555. * geometry or window contents.
  8556. *
  8557. * Discussion:
  8558. * It is appropriate to disable updates if you are moving or
  8559. * resizing multiple windows and you want all of the geometry
  8560. * changes to appear onscreen simulataneously. In most other cases,
  8561. * you should strive to avoid disabling screen updates. The window
  8562. * server will automatically re-enable updates (and print a message
  8563. * to the Console log) if you leave updates disabled for a
  8564. * sufficiently long period of time, currently about 1 second.
  8565. *
  8566. *
  8567. * The window server records the number of calls to
  8568. * DisableScreenUpdates and does not re-enable updates until a
  8569. * matching number of calls to EnableScreenUpdates have been made.
  8570. *
  8571. * Mac OS X threading:
  8572. * Not thread safe
  8573. *
  8574. * Result:
  8575. * An operating system result code. In practice, this API always
  8576. * returns noErr.
  8577. *
  8578. * Availability:
  8579. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  8580. * CarbonLib: in CarbonLib 1.1 and later
  8581. * Non-Carbon CFM: not available
  8582. }
  8583. function DisableScreenUpdates: OSStatus; external name '_DisableScreenUpdates';
  8584. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  8585. {
  8586. * EnableScreenUpdates()
  8587. *
  8588. * Summary:
  8589. * Re-enables redraw of the screen after changes to window geometry
  8590. * or window contents.
  8591. *
  8592. * Discussion:
  8593. * Screen redraw is not actually enabled until the number of calls
  8594. * to EnableScreenUpdates matches the number of calls to
  8595. * DisableScreenUpdates.
  8596. *
  8597. * Mac OS X threading:
  8598. * Not thread safe
  8599. *
  8600. * Result:
  8601. * An operating system result code. In practice, this API always
  8602. * returns noErr.
  8603. *
  8604. * Availability:
  8605. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  8606. * CarbonLib: in CarbonLib 1.1 and later
  8607. * Non-Carbon CFM: not available
  8608. }
  8609. function EnableScreenUpdates: OSStatus; external name '_EnableScreenUpdates';
  8610. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  8611. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  8612. { ¥ Window Toolbars }
  8613. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  8614. {
  8615. * SetWindowToolbar()
  8616. *
  8617. * Discussion:
  8618. * Sets the toolbar for a window. If any other toolbar is currently
  8619. * bound to the window, it is released. This API does NOT add the
  8620. * toolbar button to the window, your application must set the
  8621. * attribute itself.
  8622. *
  8623. * Mac OS X threading:
  8624. * Not thread safe
  8625. *
  8626. * Parameters:
  8627. *
  8628. * inWindow:
  8629. * The window to add the toolbar to.
  8630. *
  8631. * inToolbar:
  8632. * The toolbar to add.
  8633. *
  8634. * Result:
  8635. * An operating system result code.
  8636. *
  8637. * Availability:
  8638. * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only]
  8639. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  8640. * Non-Carbon CFM: not available
  8641. }
  8642. function SetWindowToolbar( inWindow: WindowRef; inToolbar: HIToolbarRef ): OSStatus; external name '_SetWindowToolbar';
  8643. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  8644. {
  8645. * GetWindowToolbar()
  8646. *
  8647. * Discussion:
  8648. * Gets the toolbar of a window, if any.
  8649. *
  8650. * Mac OS X threading:
  8651. * Not thread safe
  8652. *
  8653. * Parameters:
  8654. *
  8655. * inWindow:
  8656. * The window to add the toolbar to.
  8657. *
  8658. * outToolbar:
  8659. * The toolbar. You do not own the toolbar reference returned by
  8660. * this function. Do not release it! It is possible for the
  8661. * toolbar returned to be NULL, indicating there is no toolbar
  8662. * associated with this window. ¥¥¥ NOTE: May need to change the
  8663. * release strategy here.
  8664. *
  8665. * Result:
  8666. * An operating system result code.
  8667. *
  8668. * Availability:
  8669. * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only]
  8670. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  8671. * Non-Carbon CFM: not available
  8672. }
  8673. function GetWindowToolbar( inWindow: WindowRef; var outToolbar: HIToolbarRef ): OSStatus; external name '_GetWindowToolbar';
  8674. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  8675. {
  8676. * ShowHideWindowToolbar()
  8677. *
  8678. * Discussion:
  8679. * Shows or hides a window's toolbar. Optionally, you can ask for
  8680. * the transition to be animated or not. Typically, you would not
  8681. * need to call this other than to set up your window accordingly.
  8682. *
  8683. * Mac OS X threading:
  8684. * Not thread safe
  8685. *
  8686. * Parameters:
  8687. *
  8688. * inWindow:
  8689. * The window to show or hide the toolbar for.
  8690. *
  8691. * inShow:
  8692. * Pass true to show the toolbar, false to hide it.
  8693. *
  8694. * inAnimate:
  8695. * Pass true to animate the transition, false to do it quickly and
  8696. * without fanfare.
  8697. *
  8698. * Result:
  8699. * An operating system result code.
  8700. *
  8701. * Availability:
  8702. * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only]
  8703. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  8704. * Non-Carbon CFM: not available
  8705. }
  8706. function ShowHideWindowToolbar( inWindow: WindowRef; inShow: Boolean; inAnimate: Boolean ): OSStatus; external name '_ShowHideWindowToolbar';
  8707. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  8708. {
  8709. * IsWindowToolbarVisible()
  8710. *
  8711. * Discussion:
  8712. * Returns whether the toolbar (if any) attached to a window is
  8713. * visible. If the window has no toolbar, false is returned.
  8714. *
  8715. * Mac OS X threading:
  8716. * Not thread safe
  8717. *
  8718. * Parameters:
  8719. *
  8720. * inWindow:
  8721. * The window test the toolbar visiblity for.
  8722. *
  8723. * Result:
  8724. * A boolean result indicating whether the toolbar is visible (true)
  8725. * or not (false).
  8726. *
  8727. * Availability:
  8728. * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only]
  8729. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  8730. * Non-Carbon CFM: not available
  8731. }
  8732. function IsWindowToolbarVisible( inWindow: WindowRef ): Boolean; external name '_IsWindowToolbarVisible';
  8733. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  8734. {
  8735. About Custom Toolbar Views
  8736. A window with a custom toolbar view does not have an HIToolbarRef. No API that takes an HIToolbarRef will work.
  8737. When a custom toolbar view is provided for a window, the Window Manager will:
  8738. - set the view's HIViewID to kHIViewWindowToolbarID
  8739. - embed the toolbar view in the root view of the window
  8740. - make the toolbar view invisible
  8741. These aspects of the standard toolbar support also work with custom toolbar views:
  8742. - unmodified clicks on the toolbar button to show and hide the toolbar
  8743. - ShowHideWindowToolbar and IsWindowToolbarVisible
  8744. - kHICommandShow/HideToolbar and kHICommandToggleToolbar
  8745. These aspects of the standard toolbar support do _not_ work with custom toolbar views:
  8746. - option-click on toolbar button to toggle all windows with the same toolbar
  8747. - command-click and command-shift-click on toolbar button to change display mode and size
  8748. - command-option click on toolbar button to display config sheet
  8749. A custom toolbar view must handle these events:
  8750. - kEventControlGetOptimalBounds
  8751. - kEventControlSetData with kHIToolbarViewDrawBackgroundTag
  8752. - kEventControlDraw and draw, or not, as requested by the background tag
  8753. A custom toolbar view may optionally handle:
  8754. - kEventWindowAttributesChanged to be notified when window style changes
  8755. - kHICommandCustomizeToolbar to present its own toolbar customization dialog
  8756. - kHICommandToggleAllToolbars to implement multi-window toggling
  8757. - kHICommandCycleToolbarModeSmaller/Larger to change display mode and size
  8758. A custom toolbar view may need to make itself taller or shorter while the view is visible. To ensure
  8759. correct window redraw when this happens, the window frame view must be involved or notified of the
  8760. change in toolbar size. The correct way to do this depends on the Mac OS X version:
  8761. - for Mac OS X 10.4.x, the toolbar view should use this code:
  8762. WindowRef window = HIViewGetWindow( view );
  8763. DisableScreenUpdates();
  8764. ShowHideWindowToolbar( window, false, false );
  8765. HIViewSetFrame( view, &newBounds );
  8766. ShowHideWindowToolbar( window, true, false );
  8767. EnableScreenUpdates();
  8768. - for Mac OS X 10.5 and later, the toolbar view may either use the above code or may instead
  8769. send a kEventControlOptimalBoundsChanged event to itself. The window frame view will observe
  8770. this event and resize the toolbar view automatically. Note that in this case, the view should
  8771. not resize itself; instead, it should be prepared to receive a kEventControlGetOptimalBounds
  8772. event and return its new optimal size in response.
  8773. }
  8774. {$endc} {not TARGET_CPU_64}
  8775. const
  8776. {
  8777. * A SetControlData tag that is used by the standard window frame
  8778. * view to inform the toolbar view whether the view should draw its
  8779. * background or leave its background transparent. The data for this
  8780. * tag is a Boolean. If the data value is true, the toolbar view
  8781. * should draw its background as it desires. If the data value is
  8782. * false, the toolbar view should leave its background transparent so
  8783. * that the window's root view can show through the toolbar view.
  8784. * Currently, the toolbar view will be asked to leave its background
  8785. * transparent for windows with the textured or unified appearance.
  8786. }
  8787. kHIToolbarViewDrawBackgroundTag = FourCharCode('back');
  8788. {$ifc not TARGET_CPU_64}
  8789. {
  8790. * HIWindowSetToolbarView()
  8791. *
  8792. * Summary:
  8793. * Sets a custom toolbar view for a window.
  8794. *
  8795. * Discussion:
  8796. * This API is provided for use by applications that cannot use the
  8797. * HIToolbarRef API. For best compatibility with future versions of
  8798. * Mac OS X, we highly recommend that you use the HIToolbar API if
  8799. * possible. However, if HIToolbar is not sufficient for your needs,
  8800. * you can provide a custom toolbar view that will be placed at the
  8801. * standard location inside the window frame. You are responsible
  8802. * for defining the appearance and behavior of the view. You cannot
  8803. * use this API to customize the view that is associated with an
  8804. * HIToolbarRef; a window with an HIToolbarRef uses a standard
  8805. * HIToolbox-provided view that cannot be customized. When using a
  8806. * custom toolbar view, no API that takes an HIToolbarRef will work
  8807. * with that window.
  8808. *
  8809. * The HIWIndowSetToolbarView API is available in Mac OS X 10.4.9
  8810. * and later.
  8811. *
  8812. * Mac OS X threading:
  8813. * Not thread safe
  8814. *
  8815. * Parameters:
  8816. *
  8817. * inWindow:
  8818. * The window whose toolbar view to set.
  8819. *
  8820. * inView:
  8821. * The custom toolbar view for the window. You may pass NULL to
  8822. * remove the custom view from the window. Setting a custom view
  8823. * will also remove any HIToolbarRef that is associated with the
  8824. * window.
  8825. *
  8826. * After a custom toolbar view has been set, the window owns the
  8827. * view and will release it automatically when the window is
  8828. * destroyed, or when a different custom view or standard
  8829. * HIToolbar is set for the window.
  8830. *
  8831. * Availability:
  8832. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  8833. * CarbonLib: not available
  8834. * Non-Carbon CFM: not available
  8835. }
  8836. function HIWindowSetToolbarView( inWindow: WindowRef; inView: HIViewRef { can be NULL } ): OSStatus; external name '_HIWindowSetToolbarView';
  8837. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  8838. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  8839. { ¥ Window Transparency }
  8840. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  8841. {
  8842. * SetWindowAlpha()
  8843. *
  8844. * Discussion:
  8845. * Alters the overall alpha of a window, making the entire window
  8846. * (including window frame) either more or less transparent. The
  8847. * alpha is expressed as a floating point value from 0.0 (completely
  8848. * transparent) to 1.0 (completely opaque).
  8849. *
  8850. * Mac OS X threading:
  8851. * Not thread safe
  8852. *
  8853. * Parameters:
  8854. *
  8855. * inWindow:
  8856. * The window whose alpha to modify.
  8857. *
  8858. * inAlpha:
  8859. * The new alpha value.
  8860. *
  8861. * Result:
  8862. * An operating system result code.
  8863. *
  8864. * Availability:
  8865. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  8866. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  8867. * Non-Carbon CFM: not available
  8868. }
  8869. function SetWindowAlpha( inWindow: WindowRef; inAlpha: CGFloat ): OSStatus; external name '_SetWindowAlpha';
  8870. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  8871. {
  8872. * GetWindowAlpha()
  8873. *
  8874. * Discussion:
  8875. * Returns the current overall alpha value for a window. The alpha
  8876. * is expressed as a floating point value from 0.0 (completely
  8877. * transparent) to 1.0 (completely opaque).
  8878. *
  8879. * Mac OS X threading:
  8880. * Not thread safe
  8881. *
  8882. * Parameters:
  8883. *
  8884. * inWindow:
  8885. * The window whose alpha to return.
  8886. *
  8887. * outAlpha:
  8888. * On exit, contains the window's current alpha value.
  8889. *
  8890. * Result:
  8891. * An operating system result code.
  8892. *
  8893. * Availability:
  8894. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  8895. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  8896. * Non-Carbon CFM: not available
  8897. }
  8898. function GetWindowAlpha( inWindow: WindowRef; var outAlpha: CGFloat ): OSStatus; external name '_GetWindowAlpha';
  8899. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  8900. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  8901. { ¥ Window Shadows }
  8902. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  8903. {
  8904. * HIWindowInvalidateShadow()
  8905. *
  8906. * Summary:
  8907. * This API causes a window's shadow to be recalculated.
  8908. *
  8909. * Discussion:
  8910. * HIWindowInvalidateShadow is not typically used by applications.
  8911. * However, it may be useful for applications with customized window
  8912. * frames that change shape dynamically; in this case, after the
  8913. * application has drawn the new window shape, the window shadow
  8914. * must be recalculated to follow the new window shape.
  8915. *
  8916. * This API causes the window shadow to be immediately recalculated
  8917. * and redrawn based on the current contents of the window's back
  8918. * buffer. For best performance and visual appearance, you should
  8919. * follow these steps when invalidating a window shadow: disable
  8920. * updates with DisableScreenUpdates, draw, flush, invalidate the
  8921. * shadow, and enable updates. For a compositing window, after
  8922. * invalidating any views that should be redrawn, you will need to
  8923. * explicitly draw and flush using HIWindowFlush, rather than
  8924. * waiting for the event loop to draw and flush the window, because
  8925. * you cannot disable updates or invalidate the window shadow if
  8926. * drawing is done via the event loop.
  8927. *
  8928. * Mac OS X threading:
  8929. * Not thread safe
  8930. *
  8931. * Parameters:
  8932. *
  8933. * inWindow:
  8934. * The window.
  8935. *
  8936. * Availability:
  8937. * Mac OS X: in version 10.4 and later in Carbon.framework [32-bit only]
  8938. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  8939. * Non-Carbon CFM: not available
  8940. }
  8941. function HIWindowInvalidateShadow( inWindow: WindowRef ): OSStatus; external name '_HIWindowInvalidateShadow';
  8942. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  8943. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  8944. { ¥ Window Scaling for Resolution Independence }
  8945. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  8946. {
  8947. * HIWindowGetBackingScaleFactor()
  8948. *
  8949. * Summary:
  8950. * Returns the scale factor representing the number of backing store
  8951. * pixels corresponding to each linear unit in window space on this
  8952. * WindowRef.
  8953. *
  8954. * Discussion:
  8955. * This is generally only necessary when building a bitmap context
  8956. * or image whose resolution needs to match that of a particular
  8957. * WindowRef. Note that a WindowRef's backing scale factor can
  8958. * change over time, such as when the window moves from one display
  8959. * to another, or when a display's resolution changes, so clients
  8960. * should not cache the value returned by this function.
  8961. * HIWindowGetBackingScaleFactor is only available on Mac OS X
  8962. * Version 10.7.3 and later.
  8963. *
  8964. * Mac OS X threading:
  8965. * Not thread safe
  8966. *
  8967. * Parameters:
  8968. *
  8969. * inWindow:
  8970. * The WindowRef whose backing scale factor to provide.
  8971. *
  8972. * Result:
  8973. * The backing scale factor of the window.
  8974. *
  8975. * Availability:
  8976. * Mac OS X: in version 10.7 and later in Carbon.framework [32-bit only]
  8977. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.7 and later
  8978. * Non-Carbon CFM: not available
  8979. }
  8980. function HIWindowGetBackingScaleFactor( inWindow: WindowRef ): CGFloat; external name '_HIWindowGetBackingScaleFactor';
  8981. (* AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER *)
  8982. {$endc} {not TARGET_CPU_64}
  8983. {
  8984. * HIWindowScaleMode
  8985. *
  8986. * Discussion:
  8987. * A window's scale mode indicates in which resolution-independent
  8988. * scale mode it is operating.
  8989. }
  8990. type
  8991. HIWindowScaleMode = UInt32;
  8992. const
  8993. {
  8994. * The window is not scaled at all because the display scale factor
  8995. * is 1.0.
  8996. }
  8997. kHIWindowScaleModeUnscaled = 0;
  8998. {
  8999. * The window's backing store is being magnified by the window server
  9000. * because the display scale factor != 1.0, and because the window
  9001. * was created without kWindowFrameworkScaledAttribute.
  9002. }
  9003. kHIWindowScaleModeMagnified = 1;
  9004. {
  9005. * The window's context has been scaled to match the display scale
  9006. * factor because the display scale factor != 1.0 and because the
  9007. * window was created with kWindowFrameworkScaledAttribute.
  9008. }
  9009. kHIWindowScaleModeFrameworkScaled = 2;
  9010. {$ifc not TARGET_CPU_64}
  9011. {
  9012. * HIWindowGetScaleMode() *** DEPRECATED ***
  9013. *
  9014. * Summary:
  9015. * Provides the window's scale mode and the application's display
  9016. * scale factor.
  9017. *
  9018. * Discussion:
  9019. * HIWindowGetScaleMode returns the HIWindowScaleMode for the
  9020. * window, which is determined based on the application's display
  9021. * scale factor and any resolution-independence attributes specified
  9022. * at window creation time. Applications and the views within the
  9023. * window can use the scale mode and display scale factor to help
  9024. * draw or layout properly for a particular scale mode.
  9025. *
  9026. * This function is deprecated and should not be used by
  9027. * applications targeting Mac OS X 10.7 or later. Please use an
  9028. * appropriate AppKit API instead. Clients desiring high resolution
  9029. * windows should switch to use NSWindows instead of Carbon
  9030. * WindowRefs.
  9031. *
  9032. * Mac OS X threading:
  9033. * Not thread safe
  9034. *
  9035. * Parameters:
  9036. *
  9037. * inWindow:
  9038. * The WindowRef whose scale mode to provide.
  9039. *
  9040. * outMode:
  9041. * On exit, this is always kHIWindowScaleModeUnscaled.
  9042. *
  9043. * outScaleFactor:
  9044. * On exit, this is always 1.0.
  9045. *
  9046. * Result:
  9047. * An operating system result code.
  9048. *
  9049. * Availability:
  9050. * Mac OS X: in version 10.4 and later in Carbon.framework [32-bit only] but deprecated in 10.7
  9051. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  9052. * Non-Carbon CFM: not available
  9053. }
  9054. function HIWindowGetScaleMode( inWindow: WindowRef; var outMode: HIWindowScaleMode; outScaleFactor: CGFloatPtr { can be NULL } ): OSStatus; external name '_HIWindowGetScaleMode';
  9055. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7 *)
  9056. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9057. { ¥ Window FullScreen Transition }
  9058. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9059. {
  9060. * HIWindowToggleFullScreen()
  9061. *
  9062. * Summary:
  9063. * Causes a window to enter or exit fullscreen.
  9064. *
  9065. * Discussion:
  9066. * If the window is not already fullscreen and the window is capable
  9067. * of becoming fullscreen -- see kHIWindowBitFullScreenPrimary --
  9068. * the window will enter fullscreen. Otherwise, if the window is
  9069. * already fullscreen, the window will exit fullscreen.
  9070. *
  9071. * Mac OS X threading:
  9072. * Not thread safe
  9073. *
  9074. * Parameters:
  9075. *
  9076. * inWindow:
  9077. * The window whose fullscreen state to toggle.
  9078. *
  9079. * Result:
  9080. * An operating system result code.
  9081. *
  9082. * Availability:
  9083. * Mac OS X: in version 10.7 and later in Carbon.framework [32-bit only]
  9084. * CarbonLib: not available
  9085. * Non-Carbon CFM: not available
  9086. }
  9087. function HIWindowToggleFullScreen( inWindow: WindowRef ): OSStatus; external name '_HIWindowToggleFullScreen';
  9088. (* AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER *)
  9089. {
  9090. * HIWindowIsFullScreen()
  9091. *
  9092. * Summary:
  9093. * Returns whether the window is fullscreen.
  9094. *
  9095. * Mac OS X threading:
  9096. * Not thread safe
  9097. *
  9098. * Parameters:
  9099. *
  9100. * inWindow:
  9101. * The window whose fullscreen state to query.
  9102. *
  9103. * Result:
  9104. * A Boolean indicating whether the window is fullscreen: True means
  9105. * fullscreen, and false means not fullscreen.
  9106. *
  9107. * Availability:
  9108. * Mac OS X: in version 10.7 and later in Carbon.framework [32-bit only]
  9109. * CarbonLib: not available
  9110. * Non-Carbon CFM: not available
  9111. }
  9112. function HIWindowIsFullScreen( inWindow: WindowRef ): Boolean; external name '_HIWindowIsFullScreen';
  9113. (* AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER *)
  9114. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9115. { ¥ Window Content Border }
  9116. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9117. {$endc} {not TARGET_CPU_64}
  9118. {
  9119. * HIContentBorderMetrics
  9120. *
  9121. * Summary:
  9122. * Describes the border of the content area of the window that will
  9123. * contain the window frame gradient.
  9124. }
  9125. type
  9126. HIContentBorderMetrics = record
  9127. {
  9128. * Height of the top of the content border area.
  9129. }
  9130. top: CGFloat;
  9131. {
  9132. * Width of the left of the content border area.
  9133. }
  9134. left: CGFloat;
  9135. {
  9136. * Height of the bottom of the content border area.
  9137. }
  9138. bottom: CGFloat;
  9139. {
  9140. * Width of the right of the content border area.
  9141. }
  9142. right: CGFloat;
  9143. end;
  9144. {$ifc not TARGET_CPU_64}
  9145. {
  9146. * HIWindowSetContentBorderThickness()
  9147. *
  9148. * Summary:
  9149. * Sets the thickness of the window border that extends into the
  9150. * content area of the window.
  9151. *
  9152. * Discussion:
  9153. * In Mac OS X 10.5, windows can have a gradient on the top and
  9154. * bottom section of the window which have the appearance and
  9155. * behavior of being part of the window frame. The window frame
  9156. * gradient is drawn or extended into this border and the window is
  9157. * draggable from this area. Functionally, the area actually extends
  9158. * into the content of the window where the client can embed
  9159. * controls or print status messages a la iTunes. This can be set on
  9160. * all non-floating windows.
  9161. *
  9162. * Mac OS X threading:
  9163. * Not thread safe
  9164. *
  9165. * Parameters:
  9166. *
  9167. * inWindow:
  9168. * The window whose content border thickness is being set.
  9169. *
  9170. * inBorderThickness:
  9171. * A pointer to a structure that indicates how much of the content
  9172. * area is used for the frame gradient drawing. Currently only the
  9173. * top and bottom fields are allowed. If any value other than 0 is
  9174. * used for the left or right fields, this function will return
  9175. * paramErr.
  9176. *
  9177. * Result:
  9178. * An operating system result code.
  9179. *
  9180. * Availability:
  9181. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  9182. * CarbonLib: not available
  9183. * Non-Carbon CFM: not available
  9184. }
  9185. function HIWindowSetContentBorderThickness( inWindow: HIWindowRef; const (*var*) inBorderThickness: HIContentBorderMetrics ): OSStatus; external name '_HIWindowSetContentBorderThickness';
  9186. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  9187. {
  9188. * HIWindowGetContentBorderThickness()
  9189. *
  9190. * Summary:
  9191. * Retrieves the border thickness of the content area of the window.
  9192. *
  9193. * Discussion:
  9194. * In Mac OS X 10.5, windows can have a gradient on the top and
  9195. * bottom section of the window which have the appearance and
  9196. * behavior of being part of the window frame. This is actually the
  9197. * border of the content area of the window, and this API returns
  9198. * the metrics of this content border.
  9199. *
  9200. * Mac OS X threading:
  9201. * Not thread safe
  9202. *
  9203. * Parameters:
  9204. *
  9205. * inWindow:
  9206. * The window to be queried.
  9207. *
  9208. * Result:
  9209. * A structure describing the metrics of the content view that is
  9210. * drawn with the window frame appearance.
  9211. *
  9212. * Availability:
  9213. * Mac OS X: in version 10.5 and later in Carbon.framework [32-bit only]
  9214. * CarbonLib: not available
  9215. * Non-Carbon CFM: not available
  9216. }
  9217. function HIWindowGetContentBorderThickness( inWindow: HIWindowRef ): HIContentBorderMetrics; external name '_HIWindowGetContentBorderThickness';
  9218. (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER *)
  9219. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9220. { ¥ Window Properties }
  9221. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9222. {
  9223. Routines available from Mac OS 8.5 forward
  9224. or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
  9225. }
  9226. {
  9227. * GetWindowProperty()
  9228. *
  9229. * Mac OS X threading:
  9230. * Not thread safe
  9231. *
  9232. * Availability:
  9233. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  9234. * CarbonLib: in CarbonLib 1.0 and later
  9235. * Non-Carbon CFM: in WindowsLib 8.5 and later
  9236. }
  9237. function GetWindowProperty( window: WindowRef; propertyCreator_: PropertyCreator; propertyTag_: PropertyTag; bufferSize: ByteCount; actualSize: ByteCountPtr { can be NULL }; propertyBuffer: UnivPtr ): OSStatus; external name '_GetWindowProperty';
  9238. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9239. {
  9240. * GetWindowPropertySize()
  9241. *
  9242. * Mac OS X threading:
  9243. * Not thread safe
  9244. *
  9245. * Availability:
  9246. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  9247. * CarbonLib: in CarbonLib 1.0 and later
  9248. * Non-Carbon CFM: in WindowsLib 8.5 and later
  9249. }
  9250. function GetWindowPropertySize( window: WindowRef; creator: PropertyCreator; tag: PropertyTag; var size: ByteCount ): OSStatus; external name '_GetWindowPropertySize';
  9251. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9252. {
  9253. * SetWindowProperty()
  9254. *
  9255. * Mac OS X threading:
  9256. * Not thread safe
  9257. *
  9258. * Availability:
  9259. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  9260. * CarbonLib: in CarbonLib 1.0 and later
  9261. * Non-Carbon CFM: in WindowsLib 8.5 and later
  9262. }
  9263. function SetWindowProperty( window: WindowRef; propertyCreator_: PropertyCreator; propertyTag_: PropertyTag; propertySize: ByteCount; propertyBuffer: {const} UnivPtr ): OSStatus; external name '_SetWindowProperty';
  9264. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9265. {
  9266. * RemoveWindowProperty()
  9267. *
  9268. * Mac OS X threading:
  9269. * Not thread safe
  9270. *
  9271. * Availability:
  9272. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  9273. * CarbonLib: in CarbonLib 1.0 and later
  9274. * Non-Carbon CFM: in WindowsLib 8.5 and later
  9275. }
  9276. function RemoveWindowProperty( window: WindowRef; propertyCreator_: PropertyCreator; propertyTag_: PropertyTag ): OSStatus; external name '_RemoveWindowProperty';
  9277. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9278. { Routines available from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward}
  9279. {$endc} {not TARGET_CPU_64}
  9280. const
  9281. kWindowPropertyPersistent = $00000001; { whether this property gets saved when flattening the window }
  9282. {$ifc not TARGET_CPU_64}
  9283. {
  9284. * GetWindowPropertyAttributes()
  9285. *
  9286. * Mac OS X threading:
  9287. * Not thread safe
  9288. *
  9289. * Availability:
  9290. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  9291. * CarbonLib: in CarbonLib 1.0 and later
  9292. * Non-Carbon CFM: not available
  9293. }
  9294. function GetWindowPropertyAttributes( window: WindowRef; propertyCreator: OSType; propertyTag: OSType; var attributes: OptionBits ): OSStatus; external name '_GetWindowPropertyAttributes';
  9295. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9296. {
  9297. * ChangeWindowPropertyAttributes()
  9298. *
  9299. * Mac OS X threading:
  9300. * Not thread safe
  9301. *
  9302. * Availability:
  9303. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  9304. * CarbonLib: in CarbonLib 1.0 and later
  9305. * Non-Carbon CFM: not available
  9306. }
  9307. function ChangeWindowPropertyAttributes( window: WindowRef; propertyCreator: OSType; propertyTag: OSType; attributesToSet: OptionBits; attributesToClear: OptionBits ): OSStatus; external name '_ChangeWindowPropertyAttributes';
  9308. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9309. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9310. { ¥ Utilities }
  9311. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9312. {
  9313. * PinRect()
  9314. *
  9315. * Mac OS X threading:
  9316. * Not thread safe
  9317. *
  9318. * Availability:
  9319. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  9320. * CarbonLib: in CarbonLib 1.0 and later
  9321. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  9322. }
  9323. function PinRect( const (*var*) theRect: Rect; thePt: Point ): SIGNEDLONG; external name '_PinRect';
  9324. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9325. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9326. { ¥ Window Part Tracking }
  9327. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9328. {
  9329. * TrackBox()
  9330. *
  9331. * Mac OS X threading:
  9332. * Not thread safe
  9333. *
  9334. * Availability:
  9335. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  9336. * CarbonLib: in CarbonLib 1.0 and later
  9337. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  9338. }
  9339. function TrackBox( window: WindowRef; thePt: Point; partCode: WindowPartCode ): Boolean; external name '_TrackBox';
  9340. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9341. {
  9342. * TrackGoAway()
  9343. *
  9344. * Mac OS X threading:
  9345. * Not thread safe
  9346. *
  9347. * Availability:
  9348. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  9349. * CarbonLib: in CarbonLib 1.0 and later
  9350. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  9351. }
  9352. function TrackGoAway( window: WindowRef; thePt: Point ): Boolean; external name '_TrackGoAway';
  9353. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9354. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9355. { ¥ Window Accessors }
  9356. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9357. {
  9358. * GetWindowGoAwayFlag()
  9359. *
  9360. * Discussion:
  9361. * use GetWindowAttributes in Carbon
  9362. *
  9363. * Availability:
  9364. * Mac OS X: not available [32-bit only]
  9365. * CarbonLib: not available
  9366. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  9367. }
  9368. {
  9369. * GetWindowSpareFlag()
  9370. *
  9371. * Discussion:
  9372. * use GetWindowAttributes in Carbon
  9373. *
  9374. * Availability:
  9375. * Mac OS X: not available [32-bit only]
  9376. * CarbonLib: not available
  9377. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  9378. }
  9379. {
  9380. * GetWindowList()
  9381. *
  9382. * Mac OS X threading:
  9383. * Not thread safe
  9384. *
  9385. * Availability:
  9386. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  9387. * CarbonLib: in CarbonLib 1.0 and later
  9388. * Non-Carbon CFM: in CarbonAccessors.o 1.0.2 and later
  9389. }
  9390. function GetWindowList: WindowRef; external name '_GetWindowList';
  9391. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9392. {
  9393. * GetWindowPort()
  9394. *
  9395. * Mac OS X threading:
  9396. * Not thread safe
  9397. *
  9398. * Availability:
  9399. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  9400. * CarbonLib: in CarbonLib 1.0 and later
  9401. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  9402. }
  9403. function GetWindowPort( window: WindowRef ): CGrafPtr; external name '_GetWindowPort';
  9404. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9405. {
  9406. * GetWindowStructurePort()
  9407. *
  9408. * Mac OS X threading:
  9409. * Not thread safe
  9410. *
  9411. * Availability:
  9412. * Mac OS X: in version 10.1 and later in Carbon.framework [32-bit only]
  9413. * CarbonLib: in CarbonLib 1.5 and later
  9414. * Non-Carbon CFM: not available
  9415. }
  9416. function GetWindowStructurePort( inWindow: WindowRef ): CGrafPtr; external name '_GetWindowStructurePort';
  9417. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  9418. {
  9419. * GetWindowKind()
  9420. *
  9421. * Mac OS X threading:
  9422. * Not thread safe
  9423. *
  9424. * Availability:
  9425. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  9426. * CarbonLib: in CarbonLib 1.0 and later
  9427. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  9428. }
  9429. function GetWindowKind( window: WindowRef ): SInt16; external name '_GetWindowKind';
  9430. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9431. {
  9432. * IsWindowHilited()
  9433. *
  9434. * Summary:
  9435. * Indicates whether a window's frame is hilited.
  9436. *
  9437. * Discussion:
  9438. * See HiliteWindow for a disucssion on the meaning of a window's
  9439. * hilited state.
  9440. *
  9441. * Mac OS X threading:
  9442. * Not thread safe
  9443. *
  9444. * Parameters:
  9445. *
  9446. * window:
  9447. * The window whose hilited state you wish to retrieve.
  9448. *
  9449. * Result:
  9450. * A Boolean indicating whether the window's frame is hilited.
  9451. *
  9452. * Availability:
  9453. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  9454. * CarbonLib: in CarbonLib 1.0 and later
  9455. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  9456. }
  9457. function IsWindowHilited( window: WindowRef ): Boolean; external name '_IsWindowHilited';
  9458. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9459. {
  9460. * IsWindowUpdatePending()
  9461. *
  9462. * Mac OS X threading:
  9463. * Not thread safe
  9464. *
  9465. * Availability:
  9466. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  9467. * CarbonLib: in CarbonLib 1.0 and later
  9468. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  9469. }
  9470. function IsWindowUpdatePending( window: WindowRef ): Boolean; external name '_IsWindowUpdatePending';
  9471. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9472. {
  9473. * [Mac]GetNextWindow()
  9474. *
  9475. * Mac OS X threading:
  9476. * Not thread safe
  9477. *
  9478. * Availability:
  9479. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  9480. * CarbonLib: in CarbonLib 1.0 and later
  9481. * Non-Carbon CFM: in CarbonAccessors.o 1.0.2 and later or as macro/inline
  9482. }
  9483. {$ifc TARGET_OS_MAC}
  9484. function MacGetNextWindow__NAME__GetNextWindow( window: WindowRef ): WindowRef; external name '_MacGetNextWindow__NAME__GetNextWindow';
  9485. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9486. {$endc} {TARGET_OS_MAC}
  9487. function GetNextWindow( window: WindowRef ): WindowRef; external name '_GetNextWindow';
  9488. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9489. {
  9490. * GetPreviousWindow()
  9491. *
  9492. * Summary:
  9493. * Returns the window above a given window in the window list.
  9494. *
  9495. * Mac OS X threading:
  9496. * Not thread safe
  9497. *
  9498. * Parameters:
  9499. *
  9500. * inWindow:
  9501. * The window above this window is returned.
  9502. *
  9503. * Availability:
  9504. * Mac OS X: in version 10.2 and later in Carbon.framework [32-bit only]
  9505. * CarbonLib: in CarbonLib 1.6 and later
  9506. * Non-Carbon CFM: not available
  9507. }
  9508. function GetPreviousWindow( inWindow: WindowRef ): WindowRef; external name '_GetPreviousWindow';
  9509. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  9510. {
  9511. * GetWindowStandardState()
  9512. *
  9513. * Mac OS X threading:
  9514. * Not thread safe
  9515. *
  9516. * Availability:
  9517. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  9518. * CarbonLib: in CarbonLib 1.0 and later
  9519. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  9520. }
  9521. function GetWindowStandardState( window: WindowRef; var rect_: Rect ): RectPtr; external name '_GetWindowStandardState';
  9522. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9523. {
  9524. * GetWindowUserState()
  9525. *
  9526. * Mac OS X threading:
  9527. * Not thread safe
  9528. *
  9529. * Availability:
  9530. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  9531. * CarbonLib: in CarbonLib 1.0 and later
  9532. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  9533. }
  9534. function GetWindowUserState( window: WindowRef; var rect_: Rect ): RectPtr; external name '_GetWindowUserState';
  9535. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9536. {
  9537. * SetWindowKind()
  9538. *
  9539. * Mac OS X threading:
  9540. * Not thread safe
  9541. *
  9542. * Availability:
  9543. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  9544. * CarbonLib: in CarbonLib 1.0 and later
  9545. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  9546. }
  9547. procedure SetWindowKind( window: WindowRef; kind: SInt16 ); external name '_SetWindowKind';
  9548. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9549. {
  9550. * SetWindowStandardState()
  9551. *
  9552. * Mac OS X threading:
  9553. * Not thread safe
  9554. *
  9555. * Availability:
  9556. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  9557. * CarbonLib: in CarbonLib 1.0 and later
  9558. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  9559. }
  9560. procedure SetWindowStandardState( window: WindowRef; const (*var*) rect_: Rect ); external name '_SetWindowStandardState';
  9561. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9562. {
  9563. * SetWindowUserState()
  9564. *
  9565. * Mac OS X threading:
  9566. * Not thread safe
  9567. *
  9568. * Availability:
  9569. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  9570. * CarbonLib: in CarbonLib 1.0 and later
  9571. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  9572. }
  9573. procedure SetWindowUserState( window: WindowRef; const (*var*) rect_: Rect ); external name '_SetWindowUserState';
  9574. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9575. {
  9576. * SetPortWindowPort()
  9577. *
  9578. * Discussion:
  9579. * set the current QuickDraw port to the port associated with the
  9580. * window
  9581. *
  9582. * Mac OS X threading:
  9583. * Not thread safe
  9584. *
  9585. * Availability:
  9586. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  9587. * CarbonLib: in CarbonLib 1.0 and later
  9588. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  9589. }
  9590. procedure SetPortWindowPort( window: WindowRef ); external name '_SetPortWindowPort';
  9591. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9592. {
  9593. * GetWindowPortBounds()
  9594. *
  9595. * Mac OS X threading:
  9596. * Not thread safe
  9597. *
  9598. * Availability:
  9599. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  9600. * CarbonLib: in CarbonLib 1.0 and later
  9601. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  9602. }
  9603. function GetWindowPortBounds( window: WindowRef; var bounds: Rect ): RectPtr; external name '_GetWindowPortBounds';
  9604. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9605. {
  9606. * GetWindowFromPort()
  9607. *
  9608. * Discussion:
  9609. * Needed to Ôcast upÕ to a WindowRef from a GrafPtr
  9610. *
  9611. * Mac OS X threading:
  9612. * Not thread safe
  9613. *
  9614. * Availability:
  9615. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only]
  9616. * CarbonLib: in CarbonLib 1.0 and later
  9617. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  9618. }
  9619. function GetWindowFromPort( port: CGrafPtr ): WindowRef; external name '_GetWindowFromPort';
  9620. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  9621. { old accessors}
  9622. {$endc} {not TARGET_CPU_64}
  9623. {
  9624. * GetWindowDataHandle()
  9625. *
  9626. * Availability:
  9627. * Mac OS X: not available
  9628. * CarbonLib: not available
  9629. * Non-Carbon CFM: available as macro/inline
  9630. }
  9631. {
  9632. * SetWindowDataHandle()
  9633. *
  9634. * Availability:
  9635. * Mac OS X: not available
  9636. * CarbonLib: not available
  9637. * Non-Carbon CFM: available as macro/inline
  9638. }
  9639. {
  9640. * GetWindowZoomFlag()
  9641. *
  9642. * Availability:
  9643. * Mac OS X: not available
  9644. * CarbonLib: not available
  9645. * Non-Carbon CFM: available as macro/inline
  9646. }
  9647. {
  9648. * GetWindowStructureRgn()
  9649. *
  9650. * Availability:
  9651. * Mac OS X: not available
  9652. * CarbonLib: not available
  9653. * Non-Carbon CFM: available as macro/inline
  9654. }
  9655. {
  9656. * GetWindowContentRgn()
  9657. *
  9658. * Availability:
  9659. * Mac OS X: not available
  9660. * CarbonLib: not available
  9661. * Non-Carbon CFM: available as macro/inline
  9662. }
  9663. {
  9664. * GetWindowUpdateRgn()
  9665. *
  9666. * Availability:
  9667. * Mac OS X: not available
  9668. * CarbonLib: not available
  9669. * Non-Carbon CFM: available as macro/inline
  9670. }
  9671. {
  9672. * GetWindowTitleWidth()
  9673. *
  9674. * Availability:
  9675. * Mac OS X: not available
  9676. * CarbonLib: not available
  9677. * Non-Carbon CFM: available as macro/inline
  9678. }
  9679. {--------------------------------------------------------------------------------------}
  9680. { ¥ DEPRECATED }
  9681. { All functions below this point are either deprecated (they continue to function }
  9682. { but are not the most modern nor most efficient solution to a problem), or they are }
  9683. { completely unavailable on Mac OS X. }
  9684. {--------------------------------------------------------------------------------------}
  9685. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9686. { ¥ Window Definition Messages }
  9687. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9688. const
  9689. kWindowMsgDraw = 0;
  9690. kWindowMsgHitTest = 1;
  9691. kWindowMsgCalculateShape = 2;
  9692. kWindowMsgInitialize = 3;
  9693. kWindowMsgCleanUp = 4;
  9694. kWindowMsgDrawGrowOutline = 5;
  9695. kWindowMsgDrawGrowBox = 6;
  9696. { Messages available from Mac OS 8.0 forward}
  9697. const
  9698. kWindowMsgGetFeatures = 7;
  9699. kWindowMsgGetRegion = 8;
  9700. { Messages available from Mac OS 8.5 forward}
  9701. const
  9702. kWindowMsgDragHilite = 9; { parameter boolean indicating on or off}
  9703. kWindowMsgModified = 10; { parameter boolean indicating saved (false) or modified (true)}
  9704. kWindowMsgDrawInCurrentPort = 11; { same as kWindowMsgDraw, but must draw in current port}
  9705. kWindowMsgSetupProxyDragImage = 12; { parameter pointer to SetupWindowProxyDragImageRec}
  9706. kWindowMsgStateChanged = 13; { something about the window's state has changed}
  9707. kWindowMsgMeasureTitle = 14; { measure and return the ideal title width}
  9708. { Messages only available in Carbon}
  9709. const
  9710. kWindowMsgGetGrowImageRegion = 19; { get region to xor during grow/resize. parameter pointer to GetGrowImageRegionRec.}
  9711. { old names}
  9712. const
  9713. wDraw = kWindowMsgDraw;
  9714. wHit = kWindowMsgHitTest;
  9715. wCalcRgns = kWindowMsgCalculateShape;
  9716. wNew = kWindowMsgInitialize;
  9717. wDispose = kWindowMsgCleanUp;
  9718. wGrow = kWindowMsgDrawGrowOutline;
  9719. wDrawGIcon = kWindowMsgDrawGrowBox;
  9720. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9721. { ¥ State-changed Flags for kWindowMsgStateChanged }
  9722. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9723. const
  9724. kWindowStateTitleChanged = 1 shl 0;
  9725. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9726. { ¥ WDEF Message Types }
  9727. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9728. {
  9729. SetupWindowProxyDragImageRec - setup the proxy icon drag image
  9730. Both regions are allocated and disposed by the Window Manager.
  9731. The GWorld is disposed of by the Window Manager, but the WDEF must allocate
  9732. it. See Technote on Drag Manager 1.1 additions for more information and sample code for
  9733. setting up drag images.
  9734. }
  9735. type
  9736. SetupWindowProxyDragImageRec = record
  9737. imageGWorld: GWorldPtr; { locked GWorld containing the drag image - output - can be NULL}
  9738. imageRgn: RgnHandle; { image clip region, contains the portion of the image which gets blitted to screen - preallocated output - if imageGWorld is NULL, this is ignored}
  9739. outlineRgn: RgnHandle; { the outline region used on shallow monitors - preallocated output - must always be non-empty}
  9740. end;
  9741. { MeasureWindowTitleRec - a pointer to this is passed in WDEF param for kWindowMsgMeasureTitle}
  9742. type
  9743. MeasureWindowTitleRec = record
  9744. { output parameters (filled in by the WDEF)}
  9745. fullTitleWidth: SInt16; { text + proxy icon width}
  9746. titleTextWidth: SInt16; { text width}
  9747. { input parameters}
  9748. isUnicodeTitle: Boolean;
  9749. unused: Boolean; { future use}
  9750. end;
  9751. MeasureWindowTitleRecPtr = ^MeasureWindowTitleRec;
  9752. {
  9753. GetGrowImageRegionRec - generate a region to be xored during GrowWindow and ResizeWindow.
  9754. This is passed along with a kWindowMsgGetGrowImageRegion message. On input, the growRect
  9755. parameter is the window's new bounds in global coordinates. The growImageRegion parameter
  9756. will be allocated and disposed automatically; the window definition should alter the
  9757. region appropriately.
  9758. }
  9759. type
  9760. GetGrowImageRegionRecPtr = ^GetGrowImageRegionRec;
  9761. GetGrowImageRegionRec = record
  9762. growRect: Rect;
  9763. growImageRegion: RgnHandle;
  9764. end;
  9765. { GetWindowRegionRec - a pointer to this is passed in WDEF param for kWindowMsgGetRegion}
  9766. type
  9767. GetWindowRegionRec = record
  9768. winRgn: RgnHandle;
  9769. regionCode: WindowRegionCode;
  9770. end;
  9771. GetWindowRegionPtr = ^GetWindowRegionRec;
  9772. GetWindowRegionRecPtr = GetWindowRegionPtr;
  9773. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9774. { ¥ Desktop Pattern Resource ID }
  9775. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9776. const
  9777. deskPatID = 16;
  9778. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9779. { ¥ Window Color Part Codes }
  9780. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9781. const
  9782. wContentColor = 0;
  9783. wFrameColor = 1;
  9784. wTextColor = 2;
  9785. wHiliteColor = 3;
  9786. wTitleBarColor = 4;
  9787. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9788. { ¥ Window Color Table }
  9789. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9790. type
  9791. WinCTabPtr = ^WinCTab;
  9792. WinCTab = record
  9793. wCSeed: SIGNEDLONG; { reserved }
  9794. wCReserved: SInt16; { reserved }
  9795. ctSize: SInt16; { usually 4 for windows }
  9796. ctTable: array [0..4] of ColorSpec;
  9797. end;
  9798. type
  9799. WCTabPtr = WinCTabPtr;
  9800. type
  9801. WCTabHandle = ^WCTabPtr;
  9802. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9803. { ¥ BasicWindowDescription }
  9804. { Contains statically-sized basic attributes of the window, for storage in a }
  9805. { collection item. }
  9806. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  9807. { constants for the version field}
  9808. const
  9809. kWindowDefinitionVersionOne = 1;
  9810. kWindowDefinitionVersionTwo = 2;
  9811. { constants for the stateflags bit field }
  9812. const
  9813. kWindowIsCollapsedState = 1 shl 0;
  9814. type
  9815. BasicWindowDescriptionPtr = ^BasicWindowDescription;
  9816. BasicWindowDescription = record
  9817. descriptionSize: UInt32; { sizeof(BasicWindowDescription)}
  9818. windowContentRect: Rect; { location on screen}
  9819. windowZoomRect: Rect; { location on screen when zoomed out}
  9820. windowRefCon: URefCon; { the refcon - __avoid saving stale pointers here__ }
  9821. windowStateFlags: UInt32; { window state bit flags}
  9822. windowPositionMethod: WindowPositionMethod_fix; { method last used by RepositionWindow to position the window (if any)}
  9823. windowDefinitionVersion: UInt32;
  9824. case SInt16 of
  9825. 0: (
  9826. windowDefProc: SInt16; { defProc and variant}
  9827. windowHasCloseBox: Boolean;
  9828. );
  9829. 1: (
  9830. windowClass: WindowClass_fix; { the class}
  9831. windowAttributes: WindowAttributes_fix; { the attributes}
  9832. );
  9833. end;
  9834. { the window manager stores the default collection items using these IDs}
  9835. const
  9836. kStoredWindowSystemTag = FourCharCode('appl'); { Only Apple collection items will be of this tag}
  9837. kStoredBasicWindowDescriptionID = FourCharCode('sbas'); { BasicWindowDescription}
  9838. kStoredWindowPascalTitleID = FourCharCode('s255'); { pascal title string}
  9839. kStoredWindowTitleCFStringID = FourCharCode('cfst'); { CFString title string}
  9840. {
  9841. * DeskHookProcPtr
  9842. *
  9843. * Summary:
  9844. * Callback function that handles mouse clicks on the desktop.
  9845. }
  9846. type
  9847. DeskHookProcPtr = procedure( mouseClick: Boolean; var theEvent: EventRecord );
  9848. {
  9849. * WindowPaintProcPtr
  9850. *
  9851. * Summary:
  9852. * Callback function that paints a window's content area.
  9853. }
  9854. type
  9855. WindowPaintProcPtr = function( device: GDHandle; qdContext: GrafPtr; window: WindowRef; inClientPaintRgn: RgnHandle; outSystemPaintRgn: RgnHandle; refCon: UnivPtr ): OSStatus;
  9856. DeskHookUPP = DeskHookProcPtr;
  9857. WindowPaintUPP = WindowPaintProcPtr;
  9858. {
  9859. * NewDeskHookUPP()
  9860. *
  9861. * Availability:
  9862. * Mac OS X: not available
  9863. * CarbonLib: not available
  9864. * Non-Carbon CFM: available as macro/inline
  9865. }
  9866. {
  9867. * NewWindowPaintUPP()
  9868. *
  9869. * Availability:
  9870. * Mac OS X: in version 10.0 and later in Carbon.framework
  9871. * CarbonLib: in CarbonLib 1.0 and later
  9872. * Non-Carbon CFM: available as macro/inline
  9873. }
  9874. function NewWindowPaintUPP( userRoutine: WindowPaintProcPtr ): WindowPaintUPP; external name '_NewWindowPaintUPP';
  9875. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  9876. {
  9877. * DisposeDeskHookUPP()
  9878. *
  9879. * Availability:
  9880. * Mac OS X: not available
  9881. * CarbonLib: not available
  9882. * Non-Carbon CFM: available as macro/inline
  9883. }
  9884. {
  9885. * DisposeWindowPaintUPP()
  9886. *
  9887. * Availability:
  9888. * Mac OS X: in version 10.0 and later in Carbon.framework
  9889. * CarbonLib: in CarbonLib 1.0 and later
  9890. * Non-Carbon CFM: available as macro/inline
  9891. }
  9892. procedure DisposeWindowPaintUPP( userUPP: WindowPaintUPP ); external name '_DisposeWindowPaintUPP';
  9893. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  9894. {
  9895. * InvokeDeskHookUPP()
  9896. *
  9897. * Availability:
  9898. * Mac OS X: not available
  9899. * CarbonLib: not available
  9900. * Non-Carbon CFM: available as macro/inline
  9901. }
  9902. {
  9903. * InvokeWindowPaintUPP()
  9904. *
  9905. * Availability:
  9906. * Mac OS X: in version 10.0 and later in Carbon.framework
  9907. * CarbonLib: in CarbonLib 1.0 and later
  9908. * Non-Carbon CFM: available as macro/inline
  9909. }
  9910. function InvokeWindowPaintUPP( device: GDHandle; qdContext: GrafPtr; window: WindowRef; inClientPaintRgn: RgnHandle; outSystemPaintRgn: RgnHandle; refCon: UnivPtr; userUPP: WindowPaintUPP ): OSStatus; external name '_InvokeWindowPaintUPP';
  9911. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  9912. {$ifc not TARGET_CPU_64}
  9913. {
  9914. * NewWindow() *** DEPRECATED ***
  9915. *
  9916. * Deprecated:
  9917. * Use CreateNewWindow instead of NewWindow.
  9918. *
  9919. * Summary:
  9920. * Creates a new window.
  9921. *
  9922. * Mac OS X threading:
  9923. * Not thread safe
  9924. *
  9925. * Availability:
  9926. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  9927. * CarbonLib: in CarbonLib 1.0 and later
  9928. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  9929. }
  9930. function NewWindow( wStorage: UnivPtr; const (*var*) boundsRect: Rect; const (*var*) title: Str255; visible: Boolean; theProc: SInt16; behind: WindowRef; goAwayFlag: Boolean; refCon: SRefCon ): WindowRef; external name '_NewWindow';
  9931. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  9932. {
  9933. * NewCWindow() *** DEPRECATED ***
  9934. *
  9935. * Deprecated:
  9936. * Use CreateNewWindow instead of NewCWindow.
  9937. *
  9938. * Summary:
  9939. * Creates a new window.
  9940. *
  9941. * Mac OS X threading:
  9942. * Not thread safe
  9943. *
  9944. * Availability:
  9945. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  9946. * CarbonLib: in CarbonLib 1.0 and later
  9947. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  9948. }
  9949. function NewCWindow( wStorage: UnivPtr; const (*var*) boundsRect: Rect; const (*var*) title: Str255; visible: Boolean; procID: SInt16; behind: WindowRef; goAwayFlag: Boolean; refCon: SRefCon ): WindowRef; external name '_NewCWindow';
  9950. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  9951. {
  9952. * GetNewCWindow() *** DEPRECATED ***
  9953. *
  9954. * Deprecated:
  9955. * Use nib files and CreateWindowFromNib instead of GetNewCWindow.
  9956. *
  9957. * Summary:
  9958. * Loads a window from a 'WIND' resource.
  9959. *
  9960. * Mac OS X threading:
  9961. * Not thread safe
  9962. *
  9963. * Availability:
  9964. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  9965. * CarbonLib: in CarbonLib 1.0 and later
  9966. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  9967. }
  9968. function GetNewCWindow( windowID: SInt16; wStorage: UnivPtr; behind: WindowRef ): WindowRef; external name '_GetNewCWindow';
  9969. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  9970. {
  9971. * GetNewWindow() *** DEPRECATED ***
  9972. *
  9973. * Deprecated:
  9974. * Use nib files and CreateWindowFromNib instead of GetNewWindow.
  9975. *
  9976. * Summary:
  9977. * Loads a window from a 'WIND' resource.
  9978. *
  9979. * Mac OS X threading:
  9980. * Not thread safe
  9981. *
  9982. * Availability:
  9983. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  9984. * CarbonLib: in CarbonLib 1.0 and later
  9985. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  9986. }
  9987. function GetNewWindow( windowID: SInt16; wStorage: UnivPtr; behind: WindowRef ): WindowRef; external name '_GetNewWindow';
  9988. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  9989. {
  9990. * CreateWindowFromResource() *** DEPRECATED ***
  9991. *
  9992. * Deprecated:
  9993. * Use nib files and CreateWindowFromNib instead of
  9994. * CreateWindowFromResource.
  9995. *
  9996. * Summary:
  9997. * Loads a window from a 'wind' resource.
  9998. *
  9999. * Mac OS X threading:
  10000. * Not thread safe
  10001. *
  10002. * Availability:
  10003. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10004. * CarbonLib: in CarbonLib 1.0 and later
  10005. * Non-Carbon CFM: in WindowsLib 8.5 and later
  10006. }
  10007. function CreateWindowFromResource( resID: SInt16; var outWindow: WindowRef ): OSStatus; external name '_CreateWindowFromResource';
  10008. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10009. {
  10010. * StoreWindowIntoCollection() *** DEPRECATED ***
  10011. *
  10012. * Deprecated:
  10013. * Use HIArchiveEncodeCFType to encode a window to an archive
  10014. * instead of StoreWindowIntoCollection.
  10015. *
  10016. * Summary:
  10017. * Stores a description of a window into a Collection Manager
  10018. * collection.
  10019. *
  10020. * Mac OS X threading:
  10021. * Not thread safe
  10022. *
  10023. * Availability:
  10024. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10025. * CarbonLib: in CarbonLib 1.0 and later
  10026. * Non-Carbon CFM: in WindowsLib 8.5 and later
  10027. }
  10028. function StoreWindowIntoCollection( window: WindowRef; collection_: Collection ): OSStatus; external name '_StoreWindowIntoCollection';
  10029. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10030. {
  10031. * CreateWindowFromCollection() *** DEPRECATED ***
  10032. *
  10033. * Deprecated:
  10034. * Use HIArchiveCopyDecodedCFType to decode a window from an archive
  10035. * instead of CreateWindowFromCollection.
  10036. *
  10037. * Summary:
  10038. * Creates a window from a window description stored in a Collection
  10039. * Manager collection.
  10040. *
  10041. * Mac OS X threading:
  10042. * Not thread safe
  10043. *
  10044. * Availability:
  10045. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10046. * CarbonLib: in CarbonLib 1.0 and later
  10047. * Non-Carbon CFM: in WindowsLib 8.5 and later
  10048. }
  10049. function CreateWindowFromCollection( collection_: Collection; var outWindow: WindowRef ): OSStatus; external name '_CreateWindowFromCollection';
  10050. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10051. {
  10052. * GetWindowOwnerCount() *** DEPRECATED ***
  10053. *
  10054. * Deprecated:
  10055. * In Mac OS X 10.2 and later, use CFGetRetainCount instead of
  10056. * GetWindowOwnerCount.
  10057. *
  10058. * Summary:
  10059. * Returns the retain count of a window.
  10060. *
  10061. * Mac OS X threading:
  10062. * Not thread safe
  10063. *
  10064. * Availability:
  10065. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10066. * CarbonLib: in CarbonLib 1.0 and later
  10067. * Non-Carbon CFM: in WindowsLib 8.5 and later
  10068. }
  10069. function GetWindowOwnerCount( window: WindowRef; var outCount: ItemCount ): OSStatus; external name '_GetWindowOwnerCount';
  10070. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10071. {
  10072. * CloneWindow() *** DEPRECATED ***
  10073. *
  10074. * Deprecated:
  10075. * On Mac OS X 10.2 and later, use CFRetain instead of CloneWindow.
  10076. *
  10077. * Summary:
  10078. * Increments the retain count of a window.
  10079. *
  10080. * Mac OS X threading:
  10081. * Not thread safe
  10082. *
  10083. * Availability:
  10084. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10085. * CarbonLib: in CarbonLib 1.0 and later
  10086. * Non-Carbon CFM: in WindowsLib 8.5 and later
  10087. }
  10088. function CloneWindow( window: WindowRef ): OSStatus; external name '_CloneWindow';
  10089. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10090. {
  10091. * GetWindowRetainCount() *** DEPRECATED ***
  10092. *
  10093. * Deprecated:
  10094. * In Mac OS X 10.2 and later, use CFGetRetainCount instead of
  10095. * GetWindowRetainCount.
  10096. *
  10097. * Summary:
  10098. * Returns the retain count of a window.
  10099. *
  10100. * Mac OS X threading:
  10101. * Not thread safe
  10102. *
  10103. * Availability:
  10104. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10105. * CarbonLib: in CarbonLib 1.1 and later
  10106. * Non-Carbon CFM: not available
  10107. }
  10108. function GetWindowRetainCount( inWindow: WindowRef ): ItemCount; external name '_GetWindowRetainCount';
  10109. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10110. {
  10111. * RetainWindow() *** DEPRECATED ***
  10112. *
  10113. * Deprecated:
  10114. * On Mac OS X 10.2 and later, use CFRetain instead of RetainWindow.
  10115. *
  10116. * Summary:
  10117. * Increments the retain count of a window.
  10118. *
  10119. * Mac OS X threading:
  10120. * Not thread safe
  10121. *
  10122. * Availability:
  10123. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10124. * CarbonLib: in CarbonLib 1.1 and later
  10125. * Non-Carbon CFM: not available
  10126. }
  10127. function RetainWindow( inWindow: WindowRef ): OSStatus; external name '_RetainWindow';
  10128. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10129. {
  10130. * ReleaseWindow() *** DEPRECATED ***
  10131. *
  10132. * Deprecated:
  10133. * On Mac OS X 10.2 and later, use CFRelease instead of
  10134. * ReleaseWindow.
  10135. *
  10136. * Summary:
  10137. * Decrements the retain count of a window, and destroys the window
  10138. * if the retain count falls to zero.
  10139. *
  10140. * Mac OS X threading:
  10141. * Not thread safe
  10142. *
  10143. * Availability:
  10144. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10145. * CarbonLib: in CarbonLib 1.1 and later
  10146. * Non-Carbon CFM: not available
  10147. }
  10148. function ReleaseWindow( inWindow: WindowRef ): OSStatus; external name '_ReleaseWindow';
  10149. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10150. {
  10151. * GetWVariant() *** DEPRECATED ***
  10152. *
  10153. * Deprecated:
  10154. * Use GetWindowAttributes to determine aspects of a window's
  10155. * appearance or behavior.
  10156. *
  10157. * Summary:
  10158. * Retrieves the window variant code for a window.
  10159. *
  10160. * Discussion:
  10161. * The window variant code is the low four bits of a window's
  10162. * procID. This API is no longer recommended for use.
  10163. *
  10164. * Mac OS X threading:
  10165. * Not thread safe
  10166. *
  10167. * Availability:
  10168. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10169. * CarbonLib: in CarbonLib 1.0 and later
  10170. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  10171. }
  10172. function GetWVariant( window: WindowRef ): SInt16; external name '_GetWVariant';
  10173. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10174. {
  10175. * SetWindowClass() *** DEPRECATED ***
  10176. *
  10177. * Deprecated:
  10178. * Use HIWindowChangeClass or SetWindowGroup or
  10179. * ChangeWindowAttributes (or all three) instead of SetWindowClass.
  10180. *
  10181. * Summary:
  10182. * Changes the window class of a window.
  10183. *
  10184. * Discussion:
  10185. * SetWindowClass changes the class of a window. It also changes the
  10186. * window's z-order so that it is grouped with other windows of the
  10187. * same class. It does not change the visual appearance of the
  10188. * window. In CarbonLib, SetWindowClass may not be used to change a
  10189. * non-utility window to have utility window class, or to make a
  10190. * utility window have non-utility class. SetWindowClass is
  10191. * available from CarbonLib 1.1 forward.
  10192. *
  10193. * Mac OS X threading:
  10194. * Not thread safe
  10195. *
  10196. * Parameters:
  10197. *
  10198. * inWindow:
  10199. * The window whose class to change.
  10200. *
  10201. * inWindowClass:
  10202. * The new window class.
  10203. *
  10204. * Availability:
  10205. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10206. * CarbonLib: in CarbonLib 1.1 and later
  10207. * Non-Carbon CFM: not available
  10208. }
  10209. function SetWindowClass( inWindow: WindowRef; inWindowClass: WindowClass ): OSStatus; external name '_SetWindowClass';
  10210. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10211. {$endc} {not TARGET_CPU_64}
  10212. const
  10213. kWindowPaintProcOptionsNone = 0;
  10214. type
  10215. WindowPaintProcOptions = OptionBits;
  10216. {$ifc not TARGET_CPU_64}
  10217. {
  10218. * InstallWindowContentPaintProc() *** DEPRECATED ***
  10219. *
  10220. * Deprecated:
  10221. * Use an event handler for kEventControlDraw on a window's content
  10222. * view instead of installing a window content paint proc.
  10223. *
  10224. * Summary:
  10225. * Installs a callback function that is used by non-compositing
  10226. * windows to erase the window background.
  10227. *
  10228. * Mac OS X threading:
  10229. * Not thread safe
  10230. *
  10231. * Availability:
  10232. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10233. * CarbonLib: in CarbonLib 1.0 and later
  10234. * Non-Carbon CFM: in WindowsLib 9.0 and later
  10235. }
  10236. function InstallWindowContentPaintProc( window: WindowRef; paintProc: WindowPaintUPP; options: WindowPaintProcOptions; refCon: UnivPtr { can be NULL } ): OSStatus; external name '_InstallWindowContentPaintProc';
  10237. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10238. {
  10239. * ClipAbove() *** DEPRECATED ***
  10240. *
  10241. * Deprecated:
  10242. * Do not use this function on Mac OS X; it does nothing.
  10243. *
  10244. * Summary:
  10245. * Sets the clip region of the Window Manager port to be the desktop
  10246. * minus the structure regions of the windows in front of the
  10247. * specified window.
  10248. *
  10249. * Mac OS X threading:
  10250. * Not thread safe
  10251. *
  10252. * Availability:
  10253. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10254. * CarbonLib: in CarbonLib 1.0 and later
  10255. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  10256. }
  10257. procedure ClipAbove( window: WindowRef ); external name '_ClipAbove';
  10258. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10259. {
  10260. * PaintOne() *** DEPRECATED ***
  10261. *
  10262. * Deprecated:
  10263. * Applications never need to call PaintOne. Use InvalWindowRect,
  10264. * InvalWindowRgn, or HIViewSetNeedsDisplay to invalidate a portion
  10265. * of a window.
  10266. *
  10267. * Summary:
  10268. * Repaints a portion of a window's structure and content.
  10269. *
  10270. * Mac OS X threading:
  10271. * Not thread safe
  10272. *
  10273. * Availability:
  10274. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10275. * CarbonLib: in CarbonLib 1.0 and later
  10276. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  10277. }
  10278. procedure PaintOne( window: WindowRef { can be NULL }; clobberedRgn: RgnHandle ); external name '_PaintOne';
  10279. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10280. {
  10281. * PaintBehind() *** DEPRECATED ***
  10282. *
  10283. * Deprecated:
  10284. * Applications never need to call PaintBehind. Use InvalWindowRect,
  10285. * InvalWindowRgn, or HIViewSetNeedsDisplay to invalidate a portion
  10286. * of a window.
  10287. *
  10288. * Summary:
  10289. * Repaints the windows that intersect with a specified region.
  10290. *
  10291. * Mac OS X threading:
  10292. * Not thread safe
  10293. *
  10294. * Availability:
  10295. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10296. * CarbonLib: in CarbonLib 1.0 and later
  10297. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  10298. }
  10299. procedure PaintBehind( startWindow: WindowRef { can be NULL }; clobberedRgn: RgnHandle ); external name '_PaintBehind';
  10300. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10301. {
  10302. * CalcVis() *** DEPRECATED ***
  10303. *
  10304. * Deprecated:
  10305. * The visible region of a window on Mac OS X is managed by the
  10306. * window server. Applications never need to call this function.
  10307. *
  10308. * Summary:
  10309. * Recalculates the visible region of a window.
  10310. *
  10311. * Mac OS X threading:
  10312. * Not thread safe
  10313. *
  10314. * Availability:
  10315. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10316. * CarbonLib: in CarbonLib 1.0 and later
  10317. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  10318. }
  10319. procedure CalcVis( window: WindowRef ); external name '_CalcVis';
  10320. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10321. {
  10322. * CalcVisBehind() *** DEPRECATED ***
  10323. *
  10324. * Deprecated:
  10325. * The visible region of a window on Mac OS X is managed by the
  10326. * window server. Applications never need to call this function.
  10327. *
  10328. * Summary:
  10329. * Recalculates the visible region of windows that intersect with a
  10330. * specified region.
  10331. *
  10332. * Mac OS X threading:
  10333. * Not thread safe
  10334. *
  10335. * Availability:
  10336. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10337. * CarbonLib: in CarbonLib 1.0 and later
  10338. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  10339. }
  10340. procedure CalcVisBehind( startWindow: WindowRef { can be NULL }; clobberedRgn: RgnHandle ); external name '_CalcVisBehind';
  10341. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10342. {
  10343. * CheckUpdate() *** DEPRECATED ***
  10344. *
  10345. * Deprecated:
  10346. * Use AcquireFirstMatchingEventInQueue instead of CheckUpdate.
  10347. *
  10348. * Summary:
  10349. * Searches the event queue for the next available update event.
  10350. *
  10351. * Mac OS X threading:
  10352. * Not thread safe
  10353. *
  10354. * Availability:
  10355. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10356. * CarbonLib: in CarbonLib 1.0 and later
  10357. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  10358. }
  10359. function CheckUpdate( var theEvent: EventRecord ): Boolean; external name '_CheckUpdate';
  10360. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10361. {
  10362. * FrontWindow() *** DEPRECATED ***
  10363. *
  10364. * Deprecated:
  10365. * Use ActiveNonFloatingWindow, FrontNonFloatingWindow, or
  10366. * GetFrontWindowOfClass instead of FrontWindow.
  10367. *
  10368. * Summary:
  10369. * Returns the frontmost visible window in the window list.
  10370. *
  10371. * Discussion:
  10372. * The frontmost visible window is not necessarily a document or
  10373. * dialog window, or even a window created by your application. For
  10374. * example, it may be a menu window, a Text Services Manager
  10375. * bottom-line input window, a help tag, or a floating window. If
  10376. * your code needs the frontmost document or dialog window, use the
  10377. * ActiveNonFloatingWindow or FrontNonFloatingWindow APIs instead of
  10378. * FrontWindow. For compatibility with existing applications,
  10379. * FrontWindow ignores all windows of class kMenuBarWindowClass and
  10380. * instead returns the frontmost visible window behind the menubar.
  10381. *
  10382. * Mac OS X threading:
  10383. * Not thread safe
  10384. *
  10385. * Result:
  10386. * The frontmost visible window, or NULL if no windows are visible.
  10387. *
  10388. * Availability:
  10389. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10390. * CarbonLib: in CarbonLib 1.0 and later
  10391. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  10392. }
  10393. function FrontWindow: WindowRef; external name '_FrontWindow';
  10394. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10395. {
  10396. * SetWindowPic() *** DEPRECATED ***
  10397. *
  10398. * Deprecated:
  10399. * Use an HIImageView placed in the window instead of SetWindowPic.
  10400. *
  10401. * Summary:
  10402. * Causes a picture to be drawn in a window's content area.
  10403. *
  10404. * Mac OS X threading:
  10405. * Not thread safe
  10406. *
  10407. * Availability:
  10408. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10409. * CarbonLib: in CarbonLib 1.0 and later
  10410. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  10411. }
  10412. procedure SetWindowPic( window: WindowRef; pic: PicHandle ); external name '_SetWindowPic';
  10413. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10414. {
  10415. * GetWindowPic() *** DEPRECATED ***
  10416. *
  10417. * Deprecated:
  10418. * If using an HIImageView to draw a window's content, ask the image
  10419. * view for its image instead of calling GetWindowPic.
  10420. *
  10421. * Summary:
  10422. * Retrieves the picture being drawn in a window's content area.
  10423. *
  10424. * Mac OS X threading:
  10425. * Not thread safe
  10426. *
  10427. * Availability:
  10428. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10429. * CarbonLib: in CarbonLib 1.0 and later
  10430. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  10431. }
  10432. function GetWindowPic( window: WindowRef ): PicHandle; external name '_GetWindowPic';
  10433. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10434. {
  10435. * SetWindowProxyFSSpec() *** DEPRECATED ***
  10436. *
  10437. * Deprecated:
  10438. * Use HIWindowSetProxyFSRef instead of SetWindowProxyFSSpec.
  10439. *
  10440. * Summary:
  10441. * Set the proxy icon for a window using an FSSpec to an existing
  10442. * file system object (volume, folder, or file).
  10443. *
  10444. * Mac OS X threading:
  10445. * Not thread safe
  10446. *
  10447. * Parameters:
  10448. *
  10449. * window:
  10450. * The window whose proxy icon to set.
  10451. *
  10452. * inFile:
  10453. * The file system object that the window represents. The windowÕs
  10454. * proxy icon is determined by asking Icon Services for the icon
  10455. * of this object.
  10456. *
  10457. * Availability:
  10458. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10459. * CarbonLib: in CarbonLib 1.0 and later
  10460. * Non-Carbon CFM: in WindowsLib 8.5 and later
  10461. }
  10462. function SetWindowProxyFSSpec( window: WindowRef; const (*var*) inFile: FSSpec ): OSStatus; external name '_SetWindowProxyFSSpec';
  10463. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10464. {
  10465. * GetWindowProxyFSSpec() *** DEPRECATED ***
  10466. *
  10467. * Deprecated:
  10468. * Use HIWindowGetProxyFSRef instead of GetWindowProxyFSSpec.
  10469. *
  10470. * Summary:
  10471. * Returns the FSSpec used to determine the proxy icon for a window.
  10472. *
  10473. * Discussion:
  10474. * This API will return noErr and a valid FSSpec if the windowÕs
  10475. * proxy icon has been specified using the SetWindowProxyFSSpec or
  10476. * SetWindowProxyAlias APIs. If the window has no proxy icon, or if
  10477. * the icon was specified with another SetWindowProxy API, then an
  10478. * error will be returned.
  10479. *
  10480. * Mac OS X threading:
  10481. * Not thread safe
  10482. *
  10483. * Parameters:
  10484. *
  10485. * window:
  10486. * The window whose proxy icon FSSpec to return.
  10487. *
  10488. * outFile:
  10489. * On exit, contains the windowÕs proxy icon FSSpec.
  10490. *
  10491. * Result:
  10492. * noErr if the windowÕs proxy icon FSSpec has been returned;
  10493. * errWindowDoesNotHaveProxy if the window does not have a proxy
  10494. * icon, or if the proxy icon was specified by IconRef or
  10495. * type/creator rather than by FSSpec or alias. Other operating
  10496. * system error codes may also be returned.
  10497. *
  10498. * Availability:
  10499. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10500. * CarbonLib: in CarbonLib 1.0 and later
  10501. * Non-Carbon CFM: in WindowsLib 8.5 and later
  10502. }
  10503. function GetWindowProxyFSSpec( window: WindowRef; var outFile: FSSpec ): OSStatus; external name '_GetWindowProxyFSSpec';
  10504. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10505. {
  10506. * IsWindowPathSelectClick() *** DEPRECATED ***
  10507. *
  10508. * Deprecated:
  10509. * Use IsWindowPathSelectEvent instead of IsWindowPathSelectClick.
  10510. *
  10511. * Summary:
  10512. * Indicates whether an EventRecord describing a click on a windowÕs
  10513. * title should cause a path selection menu to be displayed.
  10514. *
  10515. * Discussion:
  10516. * Windows that have a proxy icon provided using an FSSpec or alias
  10517. * can support a path selection menu, which displays the file system
  10518. * path to the object, one menu item per directory. Making a
  10519. * selection from this item will automatically open the
  10520. * corresponding object in the Finder.
  10521. *
  10522. * Mac OS X threading:
  10523. * Not thread safe
  10524. *
  10525. * Parameters:
  10526. *
  10527. * window:
  10528. * The window on which the click occurred.
  10529. *
  10530. * event:
  10531. * The event. IsWindowPathSelectClick will only return true for
  10532. * mouseDown events.
  10533. *
  10534. * Result:
  10535. * true if the click should cause a path selection menu to be
  10536. * displayed, or false if not. If this API returns true, the
  10537. * application should call the WindowPathSelect API.
  10538. *
  10539. * Availability:
  10540. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10541. * CarbonLib: in CarbonLib 1.0 and later
  10542. * Non-Carbon CFM: in WindowsLib 8.5 and later
  10543. }
  10544. function IsWindowPathSelectClick( window: WindowRef; const (*var*) event: EventRecord ): Boolean; external name '_IsWindowPathSelectClick';
  10545. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10546. {
  10547. * SetWTitle() *** DEPRECATED ***
  10548. *
  10549. * Deprecated:
  10550. * Use SetWindowTitleWithCFString instead of SetWTitle.
  10551. *
  10552. * Summary:
  10553. * Sets the title of a window using a Pascal string.
  10554. *
  10555. * Mac OS X threading:
  10556. * Not thread safe
  10557. *
  10558. * Availability:
  10559. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10560. * CarbonLib: in CarbonLib 1.0 and later
  10561. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  10562. }
  10563. procedure SetWTitle( window: WindowRef; const (*var*) title: Str255 ); external name '_SetWTitle';
  10564. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10565. {
  10566. * GetWTitle() *** DEPRECATED ***
  10567. *
  10568. * Deprecated:
  10569. * Use CopyWindowTitleAsCFString instead of GetWTitle.
  10570. *
  10571. * Summary:
  10572. * Retrieves the title of a window as a Pascal string.
  10573. *
  10574. * Mac OS X threading:
  10575. * Not thread safe
  10576. *
  10577. * Availability:
  10578. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10579. * CarbonLib: in CarbonLib 1.0 and later
  10580. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  10581. }
  10582. procedure GetWTitle( window: WindowRef; var title: Str255 ); external name '_GetWTitle';
  10583. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10584. {
  10585. * DrawGrowIcon() *** DEPRECATED ***
  10586. *
  10587. * Deprecated:
  10588. * DrawGrowIcon is deprecated from Mac OS 8.0 forward. Theme-savvy
  10589. * window defprocs automatically draw the grow box in the window
  10590. * frame.
  10591. *
  10592. * Summary:
  10593. * Draws the grow icon in a window.
  10594. *
  10595. * Mac OS X threading:
  10596. * Not thread safe
  10597. *
  10598. * Availability:
  10599. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10600. * CarbonLib: in CarbonLib 1.0 and later
  10601. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  10602. }
  10603. procedure DrawGrowIcon( window: WindowRef ); external name '_DrawGrowIcon';
  10604. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10605. {
  10606. * GrowWindow() *** DEPRECATED ***
  10607. *
  10608. * Deprecated:
  10609. * Use ResizeWindow instead of GrowWindow.
  10610. *
  10611. * Summary:
  10612. * Tracks the mouse while the user resizes a window, and returns the
  10613. * new width and height.
  10614. *
  10615. * Mac OS X threading:
  10616. * Not thread safe
  10617. *
  10618. * Availability:
  10619. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10620. * CarbonLib: in CarbonLib 1.0 and later
  10621. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  10622. }
  10623. function GrowWindow( window: WindowRef; startPt: Point; {const} bBox: RectPtr { can be NULL } ): SIGNEDLONG; external name '_GrowWindow';
  10624. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10625. {
  10626. * GetGrayRgn() *** DEPRECATED ***
  10627. *
  10628. * Deprecated:
  10629. * To determine the area in which a window may be positioned, use
  10630. * HIWindowCopyAvailablePositioningShape.
  10631. *
  10632. * Summary:
  10633. * Returns a region that covers the desktop area of all active
  10634. * displays.
  10635. *
  10636. * Mac OS X threading:
  10637. * Not thread safe
  10638. *
  10639. * Availability:
  10640. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10641. * CarbonLib: in CarbonLib 1.0 and later
  10642. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  10643. }
  10644. function GetGrayRgn: RgnHandle; external name '_GetGrayRgn';
  10645. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10646. {
  10647. * DragGrayRgn() *** DEPRECATED ***
  10648. *
  10649. * Deprecated:
  10650. * Use a overlay window or other custom drawing instead of
  10651. * DragGrayRgn.
  10652. *
  10653. * Summary:
  10654. * Tracks the mouse as the user drags a gray outline of a region.
  10655. *
  10656. * Mac OS X threading:
  10657. * Not thread safe
  10658. *
  10659. * Availability:
  10660. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10661. * CarbonLib: in CarbonLib 1.0 and later
  10662. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  10663. }
  10664. function DragGrayRgn( theRgn: RgnHandle; startPt: Point; const (*var*) limitRect: Rect; const (*var*) slopRect: Rect; axis: SInt16; actionProc: DragGrayRgnUPP ): SIGNEDLONG; external name '_DragGrayRgn';
  10665. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10666. {
  10667. * DragTheRgn() *** DEPRECATED ***
  10668. *
  10669. * Deprecated:
  10670. * Use a overlay window or other custom drawing instead of
  10671. * DragTheRgn.
  10672. *
  10673. * Summary:
  10674. * Tracks the mouse as the user drags the outline of a region. The
  10675. * outline is drawn using the pattern specified in the DragPattern
  10676. * low-memory global.
  10677. *
  10678. * Mac OS X threading:
  10679. * Not thread safe
  10680. *
  10681. * Availability:
  10682. * Mac OS X: in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
  10683. * CarbonLib: in CarbonLib 1.0 and later
  10684. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  10685. }
  10686. function DragTheRgn( theRgn: RgnHandle; startPt: Point; const (*var*) limitRect: Rect; const (*var*) slopRect: Rect; axis: SInt16; actionProc: DragGrayRgnUPP ): SIGNEDLONG; external name '_DragTheRgn';
  10687. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
  10688. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  10689. { Obsolete symbolic names }
  10690. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  10691. {$endc} {not TARGET_CPU_64}
  10692. const
  10693. kWindowGroupAttrSelectable = kWindowGroupAttrSelectAsLayer;
  10694. kWindowGroupAttrPositionFixed = kWindowGroupAttrMoveTogether;
  10695. kWindowGroupAttrZOrderFixed = kWindowGroupAttrLayerTogether;
  10696. {$endc} {TARGET_OS_MAC}
  10697. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  10698. end.
  10699. {$endc} {not MACOSALLINCLUDE}