MacWindows.pas 299 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860
  1. {
  2. File: HIToolbox/MacWindows.h
  3. Contains: Window Manager Interfaces
  4. Version: HIToolbox-219.4.81~2
  5. Copyright: © 1997-2005 by Apple Computer, Inc., all rights reserved
  6. Bugs?: For bug reports, consult the following page on
  7. the World Wide Web:
  8. http://www.freepascal.org/bugs.html
  9. }
  10. { Pascal Translation Updated: Peter N Lewis, <[email protected]>, August 2005 }
  11. {
  12. Modified for use with Free Pascal
  13. Version 200
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$mode macpas}
  17. {$packenum 1}
  18. {$macro on}
  19. {$inline on}
  20. {$CALLING MWPASCAL}
  21. unit MacWindows;
  22. interface
  23. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  24. {$setc GAP_INTERFACES_VERSION := $0200}
  25. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  26. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  27. {$endc}
  28. {$ifc defined CPUPOWERPC and defined CPUI386}
  29. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  30. {$endc}
  31. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  32. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  33. {$endc}
  34. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  35. {$setc __ppc__ := 1}
  36. {$elsec}
  37. {$setc __ppc__ := 0}
  38. {$endc}
  39. {$ifc not defined __i386__ and defined CPUI386}
  40. {$setc __i386__ := 1}
  41. {$elsec}
  42. {$setc __i386__ := 0}
  43. {$endc}
  44. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  45. {$error Conflicting definitions for __ppc__ and __i386__}
  46. {$endc}
  47. {$ifc defined __ppc__ and __ppc__}
  48. {$setc TARGET_CPU_PPC := TRUE}
  49. {$setc TARGET_CPU_X86 := FALSE}
  50. {$elifc defined __i386__ and __i386__}
  51. {$setc TARGET_CPU_PPC := FALSE}
  52. {$setc TARGET_CPU_X86 := TRUE}
  53. {$elsec}
  54. {$error Neither __ppc__ nor __i386__ is defined.}
  55. {$endc}
  56. {$setc TARGET_CPU_PPC_64 := FALSE}
  57. {$ifc defined FPC_BIG_ENDIAN}
  58. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  59. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  60. {$elifc defined FPC_LITTLE_ENDIAN}
  61. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  62. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  63. {$elsec}
  64. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  65. {$endc}
  66. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  67. {$setc CALL_NOT_IN_CARBON := FALSE}
  68. {$setc OLDROUTINENAMES := FALSE}
  69. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  70. {$setc OPAQUE_UPP_TYPES := TRUE}
  71. {$setc OTCARBONAPPLICATION := TRUE}
  72. {$setc OTKERNEL := FALSE}
  73. {$setc PM_USE_SESSION_APIS := TRUE}
  74. {$setc TARGET_API_MAC_CARBON := TRUE}
  75. {$setc TARGET_API_MAC_OS8 := FALSE}
  76. {$setc TARGET_API_MAC_OSX := TRUE}
  77. {$setc TARGET_CARBON := TRUE}
  78. {$setc TARGET_CPU_68K := FALSE}
  79. {$setc TARGET_CPU_MIPS := FALSE}
  80. {$setc TARGET_CPU_SPARC := FALSE}
  81. {$setc TARGET_OS_MAC := TRUE}
  82. {$setc TARGET_OS_UNIX := FALSE}
  83. {$setc TARGET_OS_WIN32 := FALSE}
  84. {$setc TARGET_RT_MAC_68881 := FALSE}
  85. {$setc TARGET_RT_MAC_CFM := FALSE}
  86. {$setc TARGET_RT_MAC_MACHO := TRUE}
  87. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  88. {$setc TYPE_BOOL := FALSE}
  89. {$setc TYPE_EXTENDED := FALSE}
  90. {$setc TYPE_LONGLONG := TRUE}
  91. uses MacTypes,CFBase,Files,Appearance,CarbonEvents,HIToolbar,Aliases,AppleEvents,Collections,Drag,Events,Menus,MixedMode,QDOffscreen,Quickdraw,TextCommon,Icons,MacErrors,CFString,CGWindowLevels,HIGeometry,CarbonEventsCore;
  92. {$ALIGN MAC68K}
  93. { Current documentation for the Mac OS Window Manager is available on the web: }
  94. { <http://developer.apple.com/techpubs/macos8/HumanInterfaceToolbox/WindowManager/windowmanager.html> }
  95. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  96. { ¥ HIWindowRef }
  97. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  98. type
  99. HIWindowRef = WindowRef;
  100. HIWindowRefPtr = ^HIWindowRef;
  101. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  102. { ¥ Property Types }
  103. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  104. type
  105. PropertyCreator = OSType;
  106. type
  107. PropertyTag = OSType;
  108. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  109. { ¥ Window Classes }
  110. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  111. {
  112. * WindowClass
  113. *
  114. * Summary:
  115. * The types of windows provided by the Window Manager.
  116. *
  117. * Discussion:
  118. * The class of a window determines several aspects of the window:
  119. * its appearance, its initial window attributes, its initial window
  120. * group, and its initial modality. All of these except for the
  121. * window's appearance may be changed later using other Window
  122. * Manager APIs.
  123. }
  124. type
  125. WindowClass = UInt32;
  126. WindowClass_fix = WindowClass; { used as field type when a record declaration contains a WindowClass field identifier }
  127. const
  128. {
  129. * An alert window is used when the application needs the user's
  130. * attention immediately. On Mac OS 9 and earlier, a visible alert
  131. * window will prevent the user from switching to any other
  132. * application. Use kThemeBrushAlertBackgroundActive to draw the
  133. * background of alert windows. Alert windows are initially placed in
  134. * the modal window group, given a modality of
  135. * kWindowModalityAppModal, and given an activation scope of
  136. * kWindowActivationScopeAll. Available in Mac OS 8.5 and later.
  137. }
  138. kAlertWindowClass = 1;
  139. {
  140. * Similar to kAlertWindowClass, but provides a window that is
  141. * movable and that allows switching to other applications. Generally
  142. * you should use this window class rather than kAlertWindowClass.
  143. * Use kThemeBrushAlertBackgroundActive to draw the background of
  144. * movable alert windows. Movable alert windows are initially placed
  145. * in the modal window group, given a modality of
  146. * kWindowModalityAppModal, and given an activation scope of
  147. * kWindowActivationScopeAll. Available in Mac OS 8.5 and later.
  148. }
  149. kMovableAlertWindowClass = 2;
  150. {
  151. * A modal window is used to display a dialog (but not an alert; use
  152. * kAlertWindowClass for alerts). On Mac OS 9 and earlier, a visible
  153. * modal window will prevent the user from switching to any other
  154. * application. Use kThemeBrushDialogBackgroundActive to draw the
  155. * background of modal windows. Modal windows are initially placed in
  156. * the modal window group, given a modality of
  157. * kWindowModalityAppModal, and given an activation scope of
  158. * kWindowActivationScopeAll. Available in Mac OS 8.5 and later.
  159. }
  160. kModalWindowClass = 3;
  161. {
  162. * Similar to kModalWindowClass, but provides a window that is
  163. * movable and that allows switching to other applications. Generally
  164. * you should use this window class rather than kModalWindowClass. If
  165. * you are using CarbonLib 1.3 or later, or Mac OS X, use
  166. * kThemeBrushMovableModalBackground to draw the background of
  167. * movable modal windows; on earlier versions of CarbonLib, or for
  168. * non-Carbon programming, use kThemeBrushDialogBackgroundActive.
  169. * Movable modal windows are initially placed in the modal window
  170. * group, given a modality of kWindowModalityAppModal, and given an
  171. * activation scope of kWindowActivationScopeAll. Available in Mac OS
  172. * 8.5 and later.
  173. }
  174. kMovableModalWindowClass = 4;
  175. {
  176. * A floating window is layered above all application windows except
  177. * for alert and modal windows. It is commonly used for palette
  178. * windows, inspectors, and other accessory (non-document) windows.
  179. * Use kThemeBrushUtilityWindowBackgroundActive or
  180. * kThemeBrushDocumentWindowBackground to draw the background of
  181. * floating windows. Floating windows are initially placed in the
  182. * floating window group, given a modality of kWindowModalityNone,
  183. * and given an activation scope of
  184. * kWindowActivationScopeIndependent. Available in Mac OS 8.6 and
  185. * later.
  186. }
  187. kFloatingWindowClass = 5;
  188. {
  189. * A document window is used for normal application document windows.
  190. * Use kThemeBrushDocumentWindowBackground or your own custom drawing
  191. * to draw the background of a document window. Document windows are
  192. * initially placed in the document window group, given a modality of
  193. * kWindowModalityNone, and given an activation scope of
  194. * kWindowActivationScopeAll. Available in Mac OS 8.5 and later.
  195. }
  196. kDocumentWindowClass = 6;
  197. {
  198. * A utility window is similar to a floating window, but it floats
  199. * above the windows of all applications rather than just above the
  200. * windows of the application that creates it. Use
  201. * kThemeBrushUtilityWindowBackgroundActive or
  202. * kThemeBrushDocumentWindowBackground to draw the background of
  203. * utility windows. Utility windows are initially placed in the
  204. * utility window group, given a modality of kWindowModalityNone, and
  205. * given an activation scope of kWindowActivationScopeIndependent.
  206. * Available in CarbonLib 1.1 and later, and in Mac OS X.
  207. }
  208. kUtilityWindowClass = 8;
  209. {
  210. * A help window is used to display help tags. It has no window
  211. * frame. Typically you should use the Help Manager to display help
  212. * tags, rather than creating a help tag window yourself. Help
  213. * windows are initially placed in the help window group, given a
  214. * modality of kWindowModalityNone, and given an activation scope of
  215. * kWindowActivationScopeNone. Available in CarbonLib 1.1 and later,
  216. * and in Mac OS X.
  217. }
  218. kHelpWindowClass = 10;
  219. {
  220. * A sheet window is used to display a dialog that is attached
  221. * directly to its parent window, rather than being a independent
  222. * window. A sheet dialog only prevents interaction with its parent
  223. * window; the user may still interact with other windows in the same
  224. * application. Use kThemeBrushSheetBackgroundOpaque to draw an
  225. * opaque background for sheet windows, or
  226. * kThemeBrushSheetBackgroundTransparent to draw a transparent
  227. * background (the transparent brush is only available in Mac OS X
  228. * 10.1 and later). Sheet windows are initially placed in the
  229. * document window group, given a modality of kWindowModalityNone,
  230. * and given an activation scope of kWindowActivationScopeAll.
  231. * Available in CarbonLib 1.3 and later, and in Mac OS X; in
  232. * CarbonLib, a sheet window is actually a movable-modal window,
  233. * which blocks user interaction with all windows of the application.
  234. }
  235. kSheetWindowClass = 11;
  236. {
  237. * A toolbar window is used to display a palette of controls. It is
  238. * similar to a floating window, and like a floating window is
  239. * layered above all application windows except for alert and modal
  240. * windows, but is layered beneath floating windows. Use
  241. * kThemeBrushToolbarBackground to draw the background of a toolbar
  242. * window in Mac OS X or later; CarbonLib does not currently support
  243. * kThemeBrushToolbarBackground. Toolbar windows are initially placed
  244. * in the toolbar window group, given a modality of
  245. * kWindowModalityNone, and given an activation scope of
  246. * kWindowActivationScopeNone. Available in CarbonLib 1.1 and later,
  247. * and Mac OS X.
  248. }
  249. kToolbarWindowClass = 12;
  250. {
  251. * A plain window has a single-pixel window frame.
  252. * kThemeBrushDocumentWindowBackground,
  253. * kThemeBrushDialogBackgroundActive, and application-specific custom
  254. * drawing are all commonly used to draw the background of a plain
  255. * window. Plain windows are initially placed in the document window
  256. * group, given a modality of kWindowModalityNone, and given an
  257. * activation scope of kWindowActivationScopeAll. Available in
  258. * CarbonLib 1.2.5 and later, and Mac OS X.
  259. }
  260. kPlainWindowClass = 13;
  261. {
  262. * An overlay window is a completely transparent window positioned
  263. * above all other windows. Overlay windows are intended as a
  264. * replacement for the pre-Carbon practice of drawing directly into
  265. * the window manager port; by creating a full-screen overlay window
  266. * and drawing into it, you can draw over any window in any
  267. * application without disturbing the contents of the windows
  268. * underneath your drawing. Overlay windows have a default handler
  269. * for kEventWindowPaint that uses CGContextClearRect to clear the
  270. * overlay window's alpha channel to zero. This ensures the initial
  271. * transparency of the window. You can install your own
  272. * kEventWindowPaint handler to do your own drawing; typically, you
  273. * would call through to the default handler with
  274. * CallNextEventHandler first, and then use QDBeginCGContext to
  275. * create your own context for drawing. You can use either QuickDraw
  276. * or CoreGraphics to draw into an overlay window, but you must use
  277. * CoreGraphics to draw if you need any of your drawing to be
  278. * non-opaque, since QuickDraw always sets the alpha channel of any
  279. * pixels that it touches to 1.0. You can also use the standard
  280. * window event handler together with regular controls in an overlay
  281. * window. When using the standard window event handler, you will
  282. * probably want your kEventWindowPaint handler to return
  283. * eventNotHandledErr (after calling the default handler with
  284. * CallNextEventHandler first) so that after the Paint handler
  285. * returns, the Window Manager will send a kEventWindowDrawContent
  286. * event which the standard window event handler can respond to by
  287. * drawing the controls in the window. Overlay windows are initially
  288. * placed in the overlay window group, given a modality of
  289. * kWindowModalityNone, and given an activation scope of
  290. * kWindowActivationScopeNone. Available in Mac OS X.
  291. }
  292. kOverlayWindowClass = 14;
  293. {
  294. * A sheet alert window is similar to a sheet window, but is intended
  295. * to display an alert rather than a dialog. On Mac OS X, the
  296. * appearance of a sheet window and a sheet alert window is currently
  297. * identical, but in CarbonLib a sheet alert window has a different
  298. * appearance from a sheet window. Use
  299. * kThemeBrushSheetBackgroundOpaque to draw an opaque background for
  300. * sheet alert windows, or kThemeBrushSheetBackgroundTransparent to
  301. * draw a transparent background (the transparent brush is only
  302. * available in Mac OS X 10.1 and later). Sheet alert windows are
  303. * initially placed in the document window group, given a modality of
  304. * kWindowModalityNone, and given an activation scope of
  305. * kWindowActivationScopeAll. Available in CarbonLib 1.3 and later,
  306. * and in Mac OS X 10.1 and later; in CarbonLib, a sheet alert window
  307. * is actually a movable alert window, which blocks user interaction
  308. * with all windows of the application.
  309. }
  310. kSheetAlertWindowClass = 15;
  311. {
  312. * A alternate plain window is similar to a plain window but has a
  313. * solid black shadow on its right and bottom sides. It is rarely
  314. * used in modern Mac OS applications.
  315. * kThemeBrushDocumentWindowBackground,
  316. * kThemeBrushDialogBackgroundActive, and application-specific custom
  317. * drawing are all commonly used to draw the background of an
  318. * alternate plain window. Alternate plain windows are initially
  319. * placed in the document window group, given a modality of
  320. * kWindowModalityNone, and given an activation scope of
  321. * kWindowActivationScopeAll. Available in CarbonLib 1.3 and later,
  322. * and Mac OS X 10.1 and later.
  323. }
  324. kAltPlainWindowClass = 16;
  325. {
  326. * A simple window is the simplest possible window; it has no window
  327. * frame and its entire content is drawn by the application. Use any
  328. * theme brush or your own custom drawing to draw the background of a
  329. * simple window. Simple windows are initially placed in the document
  330. * window group, given a modality of kWindowModalityNone, and given
  331. * an activation scope of kWindowActivationScopeAll. Available in
  332. * CarbonLib 1.5 and later, and Mac OS X 10.1 and later.
  333. }
  334. kSimpleWindowClass = 18;
  335. {
  336. * A drawer window is used when implementing a drawer user interface,
  337. * in which the drawer window slides out from underneath a document
  338. * window. Use kThemeBrushDrawerBackground or
  339. * kThemeBrushDocumentWindowBackground to draw the background of
  340. * drawer windows. Drawer windows are initially placed in the
  341. * document window group, given a modality of kWindowModalityNone,
  342. * and given an activation scope of kWindowActivationScopeAll. Drawer
  343. * windows should always be created using the Compositing window
  344. * attribute. Available in Mac OS X 10.2 or later.
  345. }
  346. kDrawerWindowClass = 20;
  347. {
  348. * Not an actual window class, but a meta-constant that is used with
  349. * GetFrontWindowOfClass, FindWindowOfClass, and GetNextWindowOfClass
  350. * to indicate that there should be no restriction on the class of
  351. * the returned window. Also used with GetWindowGroupOfClass to get
  352. * the root window group.
  353. }
  354. kAllWindowClasses = $FFFFFFFF;
  355. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  356. { ¥ Window Attributes }
  357. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  358. type
  359. WindowAttributes = UInt32;
  360. WindowAttributes_fix = WindowAttributes; { used as field type when a record declaration contains a WindowAttributes field identifier }
  361. {
  362. * Summary:
  363. * Window attributes
  364. }
  365. const
  366. {
  367. * A constant with value zero; the lack of any attributes.
  368. }
  369. kWindowNoAttributes = 0;
  370. {
  371. * This window has a close box. Available for windows of
  372. * kDocumentWindowClass, kFloatingWindowClass, and
  373. * kUtilityWindowClass.
  374. }
  375. kWindowCloseBoxAttribute = 1 shl 0;
  376. {
  377. * This window changes width when zooming. Available for windows of
  378. * kDocumentWindowClass, kFloatingWindowClass, and
  379. * kUtilityWindowClass.
  380. }
  381. kWindowHorizontalZoomAttribute = 1 shl 1;
  382. {
  383. * This window changes height when zooming. Available for windows of
  384. * kDocumentWindowClass, kFloatingWindowClass, and
  385. * kUtilityWindowClass.
  386. }
  387. kWindowVerticalZoomAttribute = 1 shl 2;
  388. {
  389. * This window changes both width and height when zooming. Available
  390. * for windows of kDocumentWindowClass, kFloatingWindowClass, and
  391. * kUtilityWindowClass.
  392. }
  393. kWindowFullZoomAttribute = kWindowVerticalZoomAttribute or kWindowHorizontalZoomAttribute;
  394. {
  395. * This window has a collapse box. Available for windows of
  396. * kDocumentWindowClass and, on Mac OS 9, kFloatingWindowClass and
  397. * kUtilityWindowClass; not available for windows of
  398. * kFloatingWindowClass or kUtilityWindowClass on Mac OS X.
  399. }
  400. kWindowCollapseBoxAttribute = 1 shl 3;
  401. {
  402. * This window can be resized. Available for windows of
  403. * kDocumentWindowClass, kMovableModalWindowClass,
  404. * kFloatingWindowClass, kUtilityWindowClass, and kSheetWindowClass.
  405. }
  406. kWindowResizableAttribute = 1 shl 4;
  407. {
  408. * This window has a vertical titlebar on the side of the window.
  409. * Available for windows of kFloatingWindowClass and
  410. * kUtilityWindowClass.
  411. }
  412. kWindowSideTitlebarAttribute = 1 shl 5;
  413. {
  414. * This window has a toolbar button. Available for windows of
  415. * kDocumentWindowClass on Mac OS X.
  416. }
  417. kWindowToolbarButtonAttribute = 1 shl 6;
  418. {
  419. * This window uses the Metal appearance. Available for document
  420. * windows on Mac OS X 10.2 and later, and for floating windows on
  421. * Mac OS X 10.3 and later. Drawers can also be metal, but
  422. * dynamically adjust their appearance based on their parent window's
  423. * appearance; it is not necessary to specify this attribute for a
  424. * metal drawer.
  425. }
  426. kWindowMetalAttribute = 1 shl 8;
  427. {
  428. * For Document, Floating, and Utility windows, this attribute allows
  429. * you to hide the title bar of a window. For Mac OS X 10.4 or later.
  430. }
  431. kWindowNoTitleBarAttribute = 1 shl 9;
  432. {
  433. * Indicates that no border should be drawn between the toolbar and
  434. * window content. Relevant only in metal windows. Ignored in
  435. * non-metal windows. Available in Mac OS X 10.4 and later for
  436. * window classes that support metal.
  437. }
  438. kWindowMetalNoContentSeparatorAttribute = 1 shl 11;
  439. {
  440. * This window does not participate in window cycling invoked by
  441. * cmd-~ or the "Focus on Window" hotkey defined in the Keyboards
  442. * preference pane. Available for all windows on Mac OS X 10.2 and
  443. * later.
  444. }
  445. kWindowDoesNotCycleAttribute = 1 shl 15;
  446. {
  447. * This window receives no update events. Available for all windows.
  448. }
  449. kWindowNoUpdatesAttribute = 1 shl 16;
  450. {
  451. * This window receives no activate events. Available for all windows.
  452. }
  453. kWindowNoActivatesAttribute = 1 shl 17;
  454. {
  455. * This window receives mouse events even for areas of the window
  456. * that are transparent (have an alpha channel component of zero).
  457. * Available for windows of kOverlayWindowClass on Mac OS X 10.0 and
  458. * 10.1, and available for all windows on Mac OS X 10.2 and later.
  459. }
  460. kWindowOpaqueForEventsAttribute = 1 shl 18;
  461. {
  462. * This window uses composited drawing. This means that the entire
  463. * window is comprised of HIViews, and can be treated thusly. This
  464. * attribute must be specified at window creation, and cannot be
  465. * changed later with ChangeWindowAttributes. Available on Mac OS X
  466. * 10.2 and later.
  467. }
  468. kWindowCompositingAttribute = 1 shl 19;
  469. {
  470. * This window has no shadow. Available for all windows on Mac OS X.
  471. * This attribute is automatically given to windows of
  472. * kOverlayWindowClass.
  473. }
  474. kWindowNoShadowAttribute = 1 shl 21;
  475. {
  476. * This window is automatically hidden on suspend and shown on
  477. * resume. Available for all windows. This attribute is automatically
  478. * given to windows of kFloatingWindowClass, kHelpWindowClass, and
  479. * kToolbarWindowClass.
  480. }
  481. kWindowHideOnSuspendAttribute = 1 shl 24;
  482. {
  483. * This window is marked so that the window server will drag the
  484. * window automatically. Your application should not call DragWindow
  485. * for this window, else it would confuse the heck out of the drag
  486. * (it would fight with the window server for control). This
  487. * attribute is ignored (async drag is not used) if your window is
  488. * grouped with other windows in a window group that has the
  489. * kWindowGroupAttrMoveTogether attribute. Available for all windows
  490. * on Mac OS X 10.3 and later.
  491. }
  492. kWindowAsyncDragAttribute = 1 shl 23;
  493. {
  494. * This window has the standard Carbon window event handler
  495. * installed. Available for all windows.
  496. }
  497. kWindowStandardHandlerAttribute = 1 shl 25;
  498. {
  499. * This window is automatically hidden during fullscreen mode (when
  500. * the menubar is invisible) and shown afterwards. Available for all
  501. * windows. This attribute is automatically given to windows of
  502. * kUtilityWindowClass.
  503. }
  504. kWindowHideOnFullScreenAttribute = 1 shl 26;
  505. {
  506. * This window is added to the standard Window menu. Available for
  507. * windows of kDocumentWindowClass. This attribute is automatically
  508. * given to windows of kDocumentWindowClass.
  509. }
  510. kWindowInWindowMenuAttribute = 1 shl 27;
  511. {
  512. * This window supports live resizing. Available for all windows on
  513. * Mac OS X.
  514. }
  515. kWindowLiveResizeAttribute = 1 shl 28;
  516. {
  517. * This window never receives mouse events, even in areas that are
  518. * opaque. Instead, clicks on the window will be passed through to
  519. * windows beneath it. Available for all windows on Mac OS X 10.2 and
  520. * later.
  521. }
  522. kWindowIgnoreClicksAttribute = 1 shl 29;
  523. {
  524. * This window will not be repositioned by the default
  525. * kEventWindowConstrain handler in response to changes in monitor
  526. * size, Dock position, and so on. Available for all windows on Mac
  527. * OS X 10.1 and later, and CarbonLib 1.6 and later.
  528. }
  529. kWindowNoConstrainAttribute = 1 shl 31;
  530. {
  531. * This window's context should be scaled to match the display scale
  532. * factor. This attribute can only be used when
  533. * kWindowCompositingAttribute is also enabled. When this attribute
  534. * is enabled, you may not draw with QuickDraw in the window. If this
  535. * attribute is enabled and if the scale factor is something other
  536. * than 1.0, the window's scale mode will be
  537. * kHIWindowScaleModeFrameworkScaled. It is illegal to specify both
  538. * this attribute and kWindowApplicationScaledAttribute. You may only
  539. * specify this attribute at window creation time. Available for all
  540. * windows in Mac OS X 10.4 and later.
  541. }
  542. kWindowFrameworkScaledAttribute = 1 shl 20;
  543. {
  544. * This attribute indicates that the details of
  545. * resolution-independent scaling will be taken care of primarily by
  546. * the application. This is valid for both compositing and
  547. * non-compositing windows. Resolution-independent windows that draw
  548. * with QuickDraw must use this attribute bit. If this attribute is
  549. * enabled and if the scale factor is something other than 1.0, the
  550. * window's scale mode will be kHIWindowScaleModeApplicationScaled.
  551. * It is illegal to specify both this attribute and
  552. * kWindowFrameworkScaledAttribute. You may only specify this
  553. * attribute at window creation time. Available for all windows in
  554. * Mac OS X 10.4 and later.
  555. }
  556. kWindowApplicationScaledAttribute = 1 shl 30;
  557. {
  558. * The minimum set of window attributes commonly used by document
  559. * windows.
  560. }
  561. kWindowStandardDocumentAttributes = kWindowCloseBoxAttribute or kWindowFullZoomAttribute or kWindowCollapseBoxAttribute or kWindowResizableAttribute;
  562. {
  563. * The minimum set of window attributes commonly used by floating
  564. * windows.
  565. }
  566. kWindowStandardFloatingAttributes = kWindowCloseBoxAttribute or kWindowCollapseBoxAttribute;
  567. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  568. { ¥ Window Definition Type }
  569. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  570. const
  571. kWindowDefProcType = $57444546 (* 'WDEF' *);
  572. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  573. { ¥ Mac OS 7.5 Window Definition Resource IDs }
  574. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  575. const
  576. kStandardWindowDefinition = 0; { for document windows and dialogs}
  577. kRoundWindowDefinition = 1; { old da-style window}
  578. kFloatingWindowDefinition = 124; { for floating windows}
  579. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  580. { ¥ Variant Codes }
  581. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  582. const
  583. { for use with kStandardWindowDefinition }
  584. kDocumentWindowVariantCode = 0;
  585. kModalDialogVariantCode = 1;
  586. kPlainDialogVariantCode = 2;
  587. kShadowDialogVariantCode = 3;
  588. kMovableModalDialogVariantCode = 5;
  589. kAlertVariantCode = 7;
  590. kMovableAlertVariantCode = 9; { for use with kFloatingWindowDefinition }
  591. kSideFloaterVariantCode = 8;
  592. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  593. { ¥ DefProc IDs }
  594. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  595. const
  596. { classic ids }
  597. documentProc = 0;
  598. dBoxProc = 1;
  599. plainDBox = 2;
  600. altDBoxProc = 3;
  601. noGrowDocProc = 4;
  602. movableDBoxProc = 5;
  603. zoomDocProc = 8;
  604. zoomNoGrow = 12; { floating window defproc ids }
  605. floatProc = 1985;
  606. floatGrowProc = 1987;
  607. floatZoomProc = 1989;
  608. floatZoomGrowProc = 1991;
  609. floatSideProc = 1993;
  610. floatSideGrowProc = 1995;
  611. floatSideZoomProc = 1997;
  612. floatSideZoomGrowProc = 1999;
  613. const
  614. { Resource IDs for theme-savvy window defprocs }
  615. kWindowDocumentDefProcResID = 64;
  616. kWindowDialogDefProcResID = 65;
  617. kWindowUtilityDefProcResID = 66;
  618. kWindowUtilitySideTitleDefProcResID = 67;
  619. kWindowSheetDefProcResID = 68;
  620. kWindowSimpleDefProcResID = 69;
  621. kWindowSheetAlertDefProcResID = 70;
  622. const
  623. { Proc IDs for theme-savvy windows }
  624. kWindowDocumentProc = 1024;
  625. kWindowGrowDocumentProc = 1025;
  626. kWindowVertZoomDocumentProc = 1026;
  627. kWindowVertZoomGrowDocumentProc = 1027;
  628. kWindowHorizZoomDocumentProc = 1028;
  629. kWindowHorizZoomGrowDocumentProc = 1029;
  630. kWindowFullZoomDocumentProc = 1030;
  631. kWindowFullZoomGrowDocumentProc = 1031;
  632. const
  633. { Proc IDs for theme-savvy dialogs }
  634. kWindowPlainDialogProc = 1040;
  635. kWindowShadowDialogProc = 1041;
  636. kWindowModalDialogProc = 1042;
  637. kWindowMovableModalDialogProc = 1043;
  638. kWindowAlertProc = 1044;
  639. kWindowMovableAlertProc = 1045;
  640. const
  641. { procIDs available from Mac OS 8.1 (Appearance 1.0.1) forward }
  642. kWindowMovableModalGrowProc = 1046;
  643. const
  644. { Proc IDs for top title bar theme-savvy floating windows }
  645. kWindowFloatProc = 1057;
  646. kWindowFloatGrowProc = 1059;
  647. kWindowFloatVertZoomProc = 1061;
  648. kWindowFloatVertZoomGrowProc = 1063;
  649. kWindowFloatHorizZoomProc = 1065;
  650. kWindowFloatHorizZoomGrowProc = 1067;
  651. kWindowFloatFullZoomProc = 1069;
  652. kWindowFloatFullZoomGrowProc = 1071;
  653. const
  654. { Proc IDs for side title bar theme-savvy floating windows }
  655. kWindowFloatSideProc = 1073;
  656. kWindowFloatSideGrowProc = 1075;
  657. kWindowFloatSideVertZoomProc = 1077;
  658. kWindowFloatSideVertZoomGrowProc = 1079;
  659. kWindowFloatSideHorizZoomProc = 1081;
  660. kWindowFloatSideHorizZoomGrowProc = 1083;
  661. kWindowFloatSideFullZoomProc = 1085;
  662. kWindowFloatSideFullZoomGrowProc = 1087;
  663. const
  664. { Proc IDs for sheet windows }
  665. kWindowSheetProc = 1088; { available in Mac OS X and CarbonLib 1.3 }
  666. kWindowSheetAlertProc = 1120; { available in Mac OS X 10.1 and CarbonLib 1.3 }
  667. {
  668. * Discussion:
  669. * Window defproc IDs for simple windows
  670. }
  671. const
  672. { Proc IDs for simple windows }
  673. {
  674. * A window that has no structure region; the content covers the
  675. * entire window.
  676. }
  677. kWindowSimpleProc = 1104;
  678. {
  679. * A window that has a 1-pixel black frame as its structure.
  680. }
  681. kWindowSimpleFrameProc = 1105;
  682. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  683. { ¥ System 7 Window Positioning Constants }
  684. { Passed into StandardAlert and used in ÔWINDÕ, ÔDLOGÕ, and ÔALRTÕ templates }
  685. { StandardAlert uses zero to specify the default position. Other calls use zero to }
  686. { specify Òno positionÓ. Do not pass these constants to RepositionWindow. Do not }
  687. { store these constants in the BasicWindowDescription of a ÔwindÕ resource. }
  688. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  689. const
  690. kWindowNoPosition = $0000;
  691. kWindowDefaultPosition = $0000; { used by StandardAlert}
  692. kWindowCenterMainScreen = $280A;
  693. kWindowAlertPositionMainScreen = $300A;
  694. kWindowStaggerMainScreen = $380A;
  695. kWindowCenterParentWindow = $A80A;
  696. kWindowAlertPositionParentWindow = $B00A;
  697. kWindowStaggerParentWindow = $B80A;
  698. kWindowCenterParentWindowScreen = $680A;
  699. kWindowAlertPositionParentWindowScreen = $700A;
  700. kWindowStaggerParentWindowScreen = $780A;
  701. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  702. { ¥ Window Positioning Methods }
  703. { Positioning methods passed to RepositionWindow. }
  704. { Do not use them in WIND, ALRT, DLOG templates. }
  705. { Do not confuse these constants with the constants above }
  706. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  707. {
  708. * WindowPositionMethod
  709. *
  710. * Summary:
  711. * Positioning methods usable with RepositionWindow.
  712. *
  713. * Discussion:
  714. * These constants are for use solely with the RepositionWindow API.
  715. * They should not be used in 'WIND', 'ALRT', or 'DLOG' resources.
  716. }
  717. type
  718. WindowPositionMethod = UInt32;
  719. WindowPositionMethod_fix = WindowPositionMethod; { used as field type when a record declaration contains a WindowPositionMethod field identifier }
  720. const
  721. {
  722. * Centers the window on the main screen.
  723. }
  724. kWindowCenterOnMainScreen = 1;
  725. {
  726. * Centers the window on its parent window. The parent window must be
  727. * different from the positioned window.
  728. }
  729. kWindowCenterOnParentWindow = 2;
  730. {
  731. * Centers the window on the screen containing the largest portion of
  732. * its parent window. On Mac OS X 10.3 and later, the parent window
  733. * may be the same as the positioned window. On CarbonLib and earlier
  734. * versions of Mac OS X, the parent window must be different from the
  735. * positioned window.
  736. }
  737. kWindowCenterOnParentWindowScreen = 3;
  738. {
  739. * Cascades the window on the main screen.
  740. }
  741. kWindowCascadeOnMainScreen = 4;
  742. {
  743. * Cascades the window on its parent window. The parent window must
  744. * be different from the positioned window.
  745. }
  746. kWindowCascadeOnParentWindow = 5;
  747. {
  748. * Cascades the window on the screen containing the largest portion
  749. * of its parent window. On Mac OS X 10.3 and later, the parent
  750. * window may be the same as the positioned window. On CarbonLib and
  751. * earlier versions of Mac OS X, the parent window must be different
  752. * from the positioned window.
  753. }
  754. kWindowCascadeOnParentWindowScreen = 6;
  755. {
  756. * Cascades the window on the screen containing the largest portion
  757. * of its parent window, starting below and to the right of its
  758. * parent window. The parent window must be different from the
  759. * positioned window. Available in Mac OS X 10.2 and CarbonLib 1.6
  760. * and later.
  761. }
  762. kWindowCascadeStartAtParentWindowScreen = 10;
  763. {
  764. * Puts the window into the alert position on the main screen.
  765. }
  766. kWindowAlertPositionOnMainScreen = 7;
  767. {
  768. * Puts the window into the alert position on its parent window. The
  769. * parent window must be different from the positioned window.
  770. }
  771. kWindowAlertPositionOnParentWindow = 8;
  772. {
  773. * Puts the window into the alert position on the screen containing
  774. * the largest portion of its parent window. On Mac OS X 10.3 and
  775. * later, the parent window may be the same as the positioned window.
  776. * On CarbonLib and earlier versions of Mac OS X, the parent window
  777. * must be different from the positioned window.
  778. }
  779. kWindowAlertPositionOnParentWindowScreen = 9;
  780. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  781. { ¥ GetWindowRegion Types }
  782. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  783. type
  784. WindowRegionCode = UInt16;
  785. const
  786. { Region values to pass into GetWindowRegion & GetWindowBounds. All regions are reported in global coordinates. }
  787. kWindowTitleBarRgn = 0;
  788. kWindowTitleTextRgn = 1;
  789. kWindowCloseBoxRgn = 2;
  790. kWindowZoomBoxRgn = 3;
  791. kWindowDragRgn = 5;
  792. kWindowGrowRgn = 6;
  793. kWindowCollapseBoxRgn = 7;
  794. kWindowTitleProxyIconRgn = 8; { Mac OS 8.5 forward}
  795. kWindowStructureRgn = 32;
  796. kWindowContentRgn = 33; { Content area of the window; empty when the window is collapsed}
  797. kWindowUpdateRgn = 34; { Carbon forward}
  798. kWindowOpaqueRgn = 35; { Mac OS X: Area of window considered to be opaque. Only valid for windows with alpha channels.}
  799. kWindowGlobalPortRgn = 40; { Carbon forward - bounds of the windowÕs port in global coordinates; not affected by CollapseWindow}
  800. kWindowToolbarButtonRgn = 41; { Mac OS X Tiger: the toolbar button area}
  801. { GetWindowRegionRec - a pointer to this is passed in WDEF param for kWindowMsgGetRegion}
  802. type
  803. GetWindowRegionRec = record
  804. winRgn: RgnHandle;
  805. regionCode: WindowRegionCode;
  806. end;
  807. GetWindowRegionPtr = ^GetWindowRegionRec;
  808. GetWindowRegionRecPtr = GetWindowRegionPtr;
  809. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  810. { ¥ WDEF Message Types }
  811. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  812. {
  813. SetupWindowProxyDragImageRec - setup the proxy icon drag image
  814. Both regions are allocated and disposed by the Window Manager.
  815. The GWorld is disposed of by the Window Manager, but the WDEF must allocate
  816. it. See Technote on Drag Manager 1.1 additions for more information and sample code for
  817. setting up drag images.
  818. }
  819. type
  820. SetupWindowProxyDragImageRec = record
  821. imageGWorld: GWorldPtr; { locked GWorld containing the drag image - output - can be NULL}
  822. 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}
  823. outlineRgn: RgnHandle; { the outline region used on shallow monitors - preallocated output - must always be non-empty}
  824. end;
  825. { MeasureWindowTitleRec - a pointer to this is passed in WDEF param for kWindowMsgMeasureTitle}
  826. type
  827. MeasureWindowTitleRec = record
  828. { output parameters (filled in by the WDEF)}
  829. fullTitleWidth: SInt16; { text + proxy icon width}
  830. titleTextWidth: SInt16; { text width}
  831. { input parameters}
  832. isUnicodeTitle: Boolean;
  833. unused: Boolean; { future use}
  834. end;
  835. MeasureWindowTitleRecPtr = ^MeasureWindowTitleRec;
  836. {
  837. GetGrowImageRegionRec - generate a region to be xored during GrowWindow and ResizeWindow.
  838. This is passed along with a kWindowMsgGetGrowImageRegion message. On input, the growRect
  839. parameter is the window's new bounds in global coordinates. The growImageRegion parameter
  840. will be allocated and disposed automatically; the window definition should alter the
  841. region appropriately.
  842. }
  843. type
  844. GetGrowImageRegionRecPtr = ^GetGrowImageRegionRec;
  845. GetGrowImageRegionRec = record
  846. growRect: Rect;
  847. growImageRegion: RgnHandle;
  848. end;
  849. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  850. { ¥ Standard Window Kinds }
  851. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  852. const
  853. dialogKind = 2;
  854. userKind = 8;
  855. kDialogWindowKind = 2;
  856. kApplicationWindowKind = 8;
  857. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  858. { ¥ FindWindow Result Codes }
  859. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  860. type
  861. WindowPartCode = SInt16;
  862. WindowPartCodePtr = ^WindowPartCode; { when a VAR xx: WindowPartCode parameter can be nil, it is changed to xx: WindowPartCodePtr }
  863. const
  864. inDesk = 0;
  865. inNoWindow = 0;
  866. inMenuBar = 1;
  867. inSysWindow = 2;
  868. inContent = 3;
  869. inDrag = 4;
  870. inGrow = 5;
  871. inGoAway = 6;
  872. inZoomIn = 7;
  873. inZoomOut = 8;
  874. inCollapseBox = 11; { Mac OS 8.0 forward}
  875. inProxyIcon = 12; { Mac OS 8.5 forward}
  876. inToolbarButton = 13; { Mac OS X forward}
  877. inStructure = 15; { Mac OS X 10.1 forward}
  878. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  879. { ¥ Window Definition Hit Test Result Codes }
  880. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  881. type
  882. WindowDefPartCode = SInt16;
  883. const
  884. wNoHit = 0;
  885. wInContent = 1;
  886. wInDrag = 2;
  887. wInGrow = 3;
  888. wInGoAway = 4;
  889. wInZoomIn = 5;
  890. wInZoomOut = 6;
  891. wInCollapseBox = 9; { Mac OS 8.0 forward}
  892. wInProxyIcon = 10; { Mac OS 8.5 forward}
  893. wInToolbarButton = 11; { Mac OS X forward}
  894. wInStructure = 13; { Mac OS X 10.1 forward}
  895. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  896. { ¥ Window Definition Messages }
  897. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  898. const
  899. kWindowMsgDraw = 0;
  900. kWindowMsgHitTest = 1;
  901. kWindowMsgCalculateShape = 2;
  902. kWindowMsgInitialize = 3;
  903. kWindowMsgCleanUp = 4;
  904. kWindowMsgDrawGrowOutline = 5;
  905. kWindowMsgDrawGrowBox = 6;
  906. { Messages available from Mac OS 8.0 forward}
  907. const
  908. kWindowMsgGetFeatures = 7;
  909. kWindowMsgGetRegion = 8;
  910. { Messages available from Mac OS 8.5 forward}
  911. const
  912. kWindowMsgDragHilite = 9; { parameter boolean indicating on or off}
  913. kWindowMsgModified = 10; { parameter boolean indicating saved (false) or modified (true)}
  914. kWindowMsgDrawInCurrentPort = 11; { same as kWindowMsgDraw, but must draw in current port}
  915. kWindowMsgSetupProxyDragImage = 12; { parameter pointer to SetupWindowProxyDragImageRec}
  916. kWindowMsgStateChanged = 13; { something about the window's state has changed}
  917. kWindowMsgMeasureTitle = 14; { measure and return the ideal title width}
  918. { Messages only available in Carbon}
  919. const
  920. kWindowMsgGetGrowImageRegion = 19; { get region to xor during grow/resize. parameter pointer to GetGrowImageRegionRec.}
  921. { old names}
  922. const
  923. wDraw = 0;
  924. wHit = 1;
  925. wCalcRgns = 2;
  926. wNew = 3;
  927. wDispose = 4;
  928. wGrow = 5;
  929. wDrawGIcon = 6;
  930. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  931. { ¥ State-changed Flags for kWindowMsgStateChanged }
  932. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  933. const
  934. kWindowStateTitleChanged = 1 shl 0;
  935. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  936. { ¥ Window Feature Bits }
  937. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  938. {
  939. * Summary:
  940. * Window feature bits
  941. *
  942. * Discussion:
  943. * These feature bits are supplied by window definition functions in
  944. * response to the kWindowMsgGetFeatures message or the
  945. * kEventWindowInit Carbon event. A window's feature bits can also
  946. * be modified dynamically using the HIWindowChangeFeatures API;
  947. * typically, feature bits are only modified by a window definition
  948. * or window frame view.
  949. }
  950. const
  951. {
  952. * Indicates whether the window is resizable. Available on Mac OS 8.0
  953. * and later. Not supported on Mac OS X; replaced by
  954. * kWindowResizableAttribute.
  955. }
  956. kWindowCanGrow = 1 shl 0;
  957. {
  958. * Indicates whether the window can zoom. Available on Mac OS 8.0 and
  959. * later. Not supported on Mac OS X; replaced by
  960. * kWindowHorizontal/Vertical/FullZoomAttribute.
  961. }
  962. kWindowCanZoom = 1 shl 1;
  963. {
  964. * Indicates whether the window can be minimized. Available on Mac OS
  965. * 8.0 and later. Not supported on Mac OS X; replaced by
  966. * kWindowCollapseBoxAttribute.
  967. }
  968. kWindowCanCollapse = 1 shl 2;
  969. {
  970. * Indicates whether the window is application-modal. Available on
  971. * Mac OS 8.0 and later.
  972. }
  973. kWindowIsModal = 1 shl 3;
  974. {
  975. * Indicates that the window definition supports the
  976. * kWindowMsgGetRegion message. Available on Mac OS 8.0 and later.
  977. * Not supported on Mac OS X. All window definitions that implement
  978. * the kWindowMsgGetFeatures message automatically get this feature
  979. * bit on Mac OS X.
  980. }
  981. kWindowCanGetWindowRegion = 1 shl 4;
  982. {
  983. * Indicates whether the window is an alert. Available on Mac OS 8.0
  984. * and later.
  985. }
  986. kWindowIsAlert = 1 shl 5;
  987. {
  988. * Indicates whether the window has a title bar. Available on Mac OS
  989. * 8.0 and later. This feature is required for async dragging to be
  990. * enabled for a window.
  991. }
  992. kWindowHasTitleBar = 1 shl 6;
  993. {
  994. * Indicates that the window definition supports the
  995. * kWindowMsgDragHilite message. Available on Mac OS 8.5 and later.
  996. }
  997. kWindowSupportsDragHilite = 1 shl 7;
  998. {
  999. * Indicates that the window definition supports the
  1000. * kWindowMsgModified message. Available on Mac OS 8.5 and later.
  1001. }
  1002. kWindowSupportsModifiedBit = 1 shl 8;
  1003. {
  1004. * Indicates that the window definition supports the
  1005. * kWindowMsgDrawInCurrentPort message. Available on Mac OS 8.5 and
  1006. * later. Not supported on Mac OS X.
  1007. }
  1008. kWindowCanDrawInCurrentPort = 1 shl 9;
  1009. {
  1010. * Indicates that the window definition supports the
  1011. * kWindowMsgSetupProxyDragImage message. Available on Mac OS 8.5 and
  1012. * later.
  1013. }
  1014. kWindowCanSetupProxyDragImage = 1 shl 10;
  1015. {
  1016. * Indicates that the window definition supports the
  1017. * kWindowMsgMeasureTitle message. Available on Mac OS 8.5 and later.
  1018. }
  1019. kWindowCanMeasureTitle = 1 shl 11;
  1020. {
  1021. * Indicates that the window definition wants to receive a
  1022. * kWindowMsgCleanUp message for each existing window when a process
  1023. * is terminated. Available on Mac OS 8.5 and later. Not supported on
  1024. * Mac OS X.
  1025. }
  1026. kWindowWantsDisposeAtProcessDeath = 1 shl 12;
  1027. {
  1028. * Indicates that the window definition supports the
  1029. * kWindowMsgGetGrowImageRegion message. Available on Mac OS X 10.0
  1030. * and later.
  1031. }
  1032. kWindowSupportsGetGrowImageRegion = 1 shl 13;
  1033. {
  1034. * Indicates that the window is entirely opaque. If this feature bit
  1035. * is set, the window will use less memory because no alpha channel
  1036. * information will be stored for the window's pixels. If this
  1037. * feature bit is not set, the Window Manager will send a
  1038. * kEventWindowGetRegion Carbon event to the window with the
  1039. * kWindowOpaqueRgn constant to get a region that describes the
  1040. * opaque area of the window. Available on Mac OS X 10.1 and later.
  1041. }
  1042. kWindowIsOpaque = 1 shl 14;
  1043. {
  1044. * Indicates that the window definition does not require that the
  1045. * current port be the classic Window Manager port. Not supported on
  1046. * Mac OS X.
  1047. }
  1048. kWindowDefSupportsColorGrafPort = $40000002;
  1049. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1050. { ¥ Desktop Pattern Resource ID }
  1051. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1052. const
  1053. deskPatID = 16;
  1054. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1055. { ¥ Window Color Part Codes }
  1056. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1057. const
  1058. wContentColor = 0;
  1059. wFrameColor = 1;
  1060. wTextColor = 2;
  1061. wHiliteColor = 3;
  1062. wTitleBarColor = 4;
  1063. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1064. { ¥ Region Dragging Constants }
  1065. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1066. const
  1067. kMouseUpOutOfSlop = $80008000;
  1068. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1069. { ¥ Window Color Table }
  1070. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1071. type
  1072. WinCTabPtr = ^WinCTab;
  1073. WinCTab = record
  1074. wCSeed: SInt32; { reserved }
  1075. wCReserved: SInt16; { reserved }
  1076. ctSize: SInt16; { usually 4 for windows }
  1077. ctTable: array [0..4] of ColorSpec;
  1078. end;
  1079. type
  1080. WCTabPtr = WinCTabPtr;
  1081. type
  1082. WCTabHandle = ^WCTabPtr;
  1083. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1084. { ¥ BasicWindowDescription }
  1085. { Contains statically-sized basic attributes of the window, for storage in a }
  1086. { collection item. }
  1087. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1088. { constants for the version field}
  1089. const
  1090. kWindowDefinitionVersionOne = 1;
  1091. kWindowDefinitionVersionTwo = 2;
  1092. { constants for the stateflags bit field }
  1093. const
  1094. kWindowIsCollapsedState = 1 shl 0;
  1095. type
  1096. BasicWindowDescriptionPtr = ^BasicWindowDescription;
  1097. BasicWindowDescription = record
  1098. descriptionSize: UInt32; { sizeof(BasicWindowDescription)}
  1099. windowContentRect: Rect; { location on screen}
  1100. windowZoomRect: Rect; { location on screen when zoomed out}
  1101. windowRefCon: UInt32; { the refcon - __avoid saving stale pointers here__ }
  1102. windowStateFlags: UInt32; { window state bit flags}
  1103. windowPositionMethod: WindowPositionMethod_fix; { method last used by RepositionWindow to position the window (if any)}
  1104. windowDefinitionVersion: UInt32;
  1105. case SInt16 of
  1106. 0: (
  1107. windowDefProc: SInt16; { defProc and variant }
  1108. windowHasCloseBox: Boolean;
  1109. );
  1110. 1: (
  1111. windowClass: WindowClass_fix; { the class }
  1112. windowAttributes: WindowAttributes_fix; { the attributes }
  1113. );
  1114. end;
  1115. { the window manager stores the default collection items using these IDs}
  1116. const
  1117. kStoredWindowSystemTag = $6170706C (* 'appl' *); { Only Apple collection items will be of this tag}
  1118. kStoredBasicWindowDescriptionID = $73626173 (* 'sbas' *); { BasicWindowDescription}
  1119. kStoredWindowPascalTitleID = $73323535 (* 's255' *); { pascal title string}
  1120. kStoredWindowTitleCFStringID = $63667374 (* 'cfst' *); { CFString title string}
  1121. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1122. { ¥ Window Class Ordering }
  1123. { Special cases for the ÒbehindÓ parameter in window creation calls. }
  1124. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1125. kFirstWindowOfClass = WindowRef(-1);
  1126. kLastWindowOfClass = WindowRef(0);
  1127. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1128. { ¥ Zoom Information Handle }
  1129. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1130. type
  1131. WStateData = record
  1132. userState: Rect; {user zoom state}
  1133. stdState: Rect; {standard zoom state}
  1134. end;
  1135. type
  1136. WStateDataPtr = ^WStateData;
  1137. type
  1138. WStateDataHandle = ^WStateDataPtr;
  1139. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1140. { ¥ MixedMode & ProcPtrs }
  1141. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1142. type
  1143. WindowDefProcPtr = function( varCode: SInt16; window: WindowRef; message: SInt16; param: SInt32 ): SInt32;
  1144. type
  1145. DeskHookProcPtr = procedure( mouseClick: Boolean; var theEvent: EventRecord );
  1146. type
  1147. WindowPaintProcPtr = function( device: GDHandle; qdContext: GrafPtr; window: WindowRef; inClientPaintRgn: RgnHandle; outSystemPaintRgn: RgnHandle; refCon: UnivPtr ): OSStatus;
  1148. type
  1149. WindowDefUPP = WindowDefProcPtr;
  1150. type
  1151. DeskHookUPP = DeskHookProcPtr;
  1152. type
  1153. WindowPaintUPP = WindowPaintProcPtr;
  1154. {
  1155. * NewWindowDefUPP()
  1156. *
  1157. * Availability:
  1158. * Mac OS X: in version 10.0 and later in Carbon.framework
  1159. * CarbonLib: in CarbonLib 1.0 and later
  1160. * Non-Carbon CFM: available as macro/inline
  1161. }
  1162. function NewWindowDefUPP( userRoutine: WindowDefProcPtr ): WindowDefUPP; external name '_NewWindowDefUPP';
  1163. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1164. {
  1165. * NewDeskHookUPP()
  1166. *
  1167. * Availability:
  1168. * Mac OS X: not available
  1169. * CarbonLib: not available
  1170. * Non-Carbon CFM: available as macro/inline
  1171. }
  1172. {
  1173. * NewWindowPaintUPP()
  1174. *
  1175. * Availability:
  1176. * Mac OS X: in version 10.0 and later in Carbon.framework
  1177. * CarbonLib: in CarbonLib 1.0 and later
  1178. * Non-Carbon CFM: available as macro/inline
  1179. }
  1180. function NewWindowPaintUPP( userRoutine: WindowPaintProcPtr ): WindowPaintUPP; external name '_NewWindowPaintUPP';
  1181. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1182. {
  1183. * DisposeWindowDefUPP()
  1184. *
  1185. * Availability:
  1186. * Mac OS X: in version 10.0 and later in Carbon.framework
  1187. * CarbonLib: in CarbonLib 1.0 and later
  1188. * Non-Carbon CFM: available as macro/inline
  1189. }
  1190. procedure DisposeWindowDefUPP( userUPP: WindowDefUPP ); external name '_DisposeWindowDefUPP';
  1191. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1192. {
  1193. * DisposeDeskHookUPP()
  1194. *
  1195. * Availability:
  1196. * Mac OS X: not available
  1197. * CarbonLib: not available
  1198. * Non-Carbon CFM: available as macro/inline
  1199. }
  1200. {
  1201. * DisposeWindowPaintUPP()
  1202. *
  1203. * Availability:
  1204. * Mac OS X: in version 10.0 and later in Carbon.framework
  1205. * CarbonLib: in CarbonLib 1.0 and later
  1206. * Non-Carbon CFM: available as macro/inline
  1207. }
  1208. procedure DisposeWindowPaintUPP( userUPP: WindowPaintUPP ); external name '_DisposeWindowPaintUPP';
  1209. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1210. {
  1211. * InvokeWindowDefUPP()
  1212. *
  1213. * Availability:
  1214. * Mac OS X: in version 10.0 and later in Carbon.framework
  1215. * CarbonLib: in CarbonLib 1.0 and later
  1216. * Non-Carbon CFM: available as macro/inline
  1217. }
  1218. function InvokeWindowDefUPP( varCode: SInt16; window: WindowRef; message: SInt16; param: SInt32; userUPP: WindowDefUPP ): SInt32; external name '_InvokeWindowDefUPP';
  1219. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1220. {
  1221. * InvokeDeskHookUPP()
  1222. *
  1223. * Availability:
  1224. * Mac OS X: not available
  1225. * CarbonLib: not available
  1226. * Non-Carbon CFM: available as macro/inline
  1227. }
  1228. {
  1229. * InvokeWindowPaintUPP()
  1230. *
  1231. * Availability:
  1232. * Mac OS X: in version 10.0 and later in Carbon.framework
  1233. * CarbonLib: in CarbonLib 1.0 and later
  1234. * Non-Carbon CFM: available as macro/inline
  1235. }
  1236. function InvokeWindowPaintUPP( device: GDHandle; qdContext: GrafPtr; window: WindowRef; inClientPaintRgn: RgnHandle; outSystemPaintRgn: RgnHandle; refCon: UnivPtr; userUPP: WindowPaintUPP ): OSStatus; external name '_InvokeWindowPaintUPP';
  1237. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1238. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1239. { ¥ Window Definition Spec. Used in Carbon to specify the code that defines a window. }
  1240. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1241. const
  1242. kWindowDefProcPtr = 0; { raw proc-ptr based access}
  1243. kWindowDefObjectClass = 1; { event-based definition (Carbon 1.1 or later)}
  1244. kWindowDefProcID = 2; { explicit proc ID; overrides the window class default proc ID}
  1245. kWindowDefHIView = 3; { this window uses a view as its frame, not a WDEF}
  1246. type
  1247. WindowDefType = UInt32;
  1248. type
  1249. WindowDefSpecPtr = ^WindowDefSpec;
  1250. WindowDefSpec = record
  1251. defType: WindowDefType;
  1252. case SInt16 of
  1253. 0: (
  1254. defProc: WindowDefUPP;
  1255. );
  1256. 1: (
  1257. classRef: UnivPtr;
  1258. );
  1259. 2: (
  1260. procID: SInt16;
  1261. );
  1262. 3: (
  1263. rootView: UnivPtr;
  1264. );
  1265. end;
  1266. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1267. { ¥ Window Creation & Persistence }
  1268. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1269. {
  1270. * GetNewCWindow()
  1271. *
  1272. * Mac OS X threading:
  1273. * Not thread safe
  1274. *
  1275. * Availability:
  1276. * Mac OS X: in version 10.0 and later in Carbon.framework
  1277. * CarbonLib: in CarbonLib 1.0 and later
  1278. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1279. }
  1280. function GetNewCWindow( windowID: SInt16; wStorage: UnivPtr; behind: WindowRef ): WindowRef; external name '_GetNewCWindow';
  1281. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1282. {
  1283. * NewWindow()
  1284. *
  1285. * Mac OS X threading:
  1286. * Not thread safe
  1287. *
  1288. * Availability:
  1289. * Mac OS X: in version 10.0 and later in Carbon.framework
  1290. * CarbonLib: in CarbonLib 1.0 and later
  1291. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1292. }
  1293. function NewWindow( wStorage: UnivPtr; const (*var*) boundsRect: Rect; const (*var*) title: Str255; visible: Boolean; theProc: SInt16; behind: WindowRef; goAwayFlag: Boolean; refCon: SInt32 ): WindowRef; external name '_NewWindow';
  1294. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1295. {
  1296. * GetNewWindow()
  1297. *
  1298. * Mac OS X threading:
  1299. * Not thread safe
  1300. *
  1301. * Availability:
  1302. * Mac OS X: in version 10.0 and later in Carbon.framework
  1303. * CarbonLib: in CarbonLib 1.0 and later
  1304. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1305. }
  1306. function GetNewWindow( windowID: SInt16; wStorage: UnivPtr; behind: WindowRef ): WindowRef; external name '_GetNewWindow';
  1307. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1308. {
  1309. * NewCWindow()
  1310. *
  1311. * Mac OS X threading:
  1312. * Not thread safe
  1313. *
  1314. * Availability:
  1315. * Mac OS X: in version 10.0 and later in Carbon.framework
  1316. * CarbonLib: in CarbonLib 1.0 and later
  1317. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1318. }
  1319. function NewCWindow( wStorage: UnivPtr; const (*var*) boundsRect: Rect; const (*var*) title: Str255; visible: Boolean; procID: SInt16; behind: WindowRef; goAwayFlag: Boolean; refCon: SInt32 ): WindowRef; external name '_NewCWindow';
  1320. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1321. {
  1322. * DisposeWindow()
  1323. *
  1324. * Mac OS X threading:
  1325. * Not thread safe
  1326. *
  1327. * Availability:
  1328. * Mac OS X: in version 10.0 and later in Carbon.framework
  1329. * CarbonLib: in CarbonLib 1.0 and later
  1330. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1331. }
  1332. procedure DisposeWindow( window: WindowRef ); external name '_DisposeWindow';
  1333. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1334. {
  1335. * [Mac]CloseWindow()
  1336. *
  1337. * Availability:
  1338. * Mac OS X: not available
  1339. * CarbonLib: not available
  1340. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1341. }
  1342. {
  1343. Routines available from Mac OS 8.5 forward
  1344. or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
  1345. }
  1346. {
  1347. * CreateNewWindow()
  1348. *
  1349. * Mac OS X threading:
  1350. * Not thread safe
  1351. *
  1352. * Availability:
  1353. * Mac OS X: in version 10.0 and later in Carbon.framework
  1354. * CarbonLib: in CarbonLib 1.0 and later
  1355. * Non-Carbon CFM: in WindowsLib 8.5 and later
  1356. }
  1357. function CreateNewWindow( windowClass_: WindowClass; attributes: WindowAttributes; const (*var*) contentBounds: Rect; var outWindow: WindowRef ): OSStatus; external name '_CreateNewWindow';
  1358. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1359. { Routines available from Mac OS 8.5 forward}
  1360. { Create a window from a ÔwindÕ resource}
  1361. {
  1362. * CreateWindowFromResource()
  1363. *
  1364. * Mac OS X threading:
  1365. * Not thread safe
  1366. *
  1367. * Availability:
  1368. * Mac OS X: in version 10.0 and later in Carbon.framework
  1369. * CarbonLib: in CarbonLib 1.0 and later
  1370. * Non-Carbon CFM: in WindowsLib 8.5 and later
  1371. }
  1372. function CreateWindowFromResource( resID: SInt16; var outWindow: WindowRef ): OSStatus; external name '_CreateWindowFromResource';
  1373. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1374. { window persistence}
  1375. {
  1376. * StoreWindowIntoCollection()
  1377. *
  1378. * Mac OS X threading:
  1379. * Not thread safe
  1380. *
  1381. * Availability:
  1382. * Mac OS X: in version 10.0 and later in Carbon.framework
  1383. * CarbonLib: in CarbonLib 1.0 and later
  1384. * Non-Carbon CFM: in WindowsLib 8.5 and later
  1385. }
  1386. function StoreWindowIntoCollection( window: WindowRef; collection_: Collection ): OSStatus; external name '_StoreWindowIntoCollection';
  1387. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1388. {
  1389. * CreateWindowFromCollection()
  1390. *
  1391. * Mac OS X threading:
  1392. * Not thread safe
  1393. *
  1394. * Availability:
  1395. * Mac OS X: in version 10.0 and later in Carbon.framework
  1396. * CarbonLib: in CarbonLib 1.0 and later
  1397. * Non-Carbon CFM: in WindowsLib 8.5 and later
  1398. }
  1399. function CreateWindowFromCollection( collection_: Collection; var outWindow: WindowRef ): OSStatus; external name '_CreateWindowFromCollection';
  1400. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1401. { window refcounting}
  1402. {
  1403. * GetWindowOwnerCount()
  1404. *
  1405. * Mac OS X threading:
  1406. * Not thread safe
  1407. *
  1408. * Availability:
  1409. * Mac OS X: in version 10.0 and later in Carbon.framework
  1410. * CarbonLib: in CarbonLib 1.0 and later
  1411. * Non-Carbon CFM: in WindowsLib 8.5 and later
  1412. }
  1413. function GetWindowOwnerCount( window: WindowRef; var outCount: UInt32 ): OSStatus; external name '_GetWindowOwnerCount';
  1414. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1415. {
  1416. * CloneWindow()
  1417. *
  1418. * Mac OS X threading:
  1419. * Not thread safe
  1420. *
  1421. * Availability:
  1422. * Mac OS X: in version 10.0 and later in Carbon.framework
  1423. * CarbonLib: in CarbonLib 1.0 and later
  1424. * Non-Carbon CFM: in WindowsLib 8.5 and later
  1425. }
  1426. function CloneWindow( window: WindowRef ): OSStatus; external name '_CloneWindow';
  1427. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1428. {
  1429. * GetWindowRetainCount()
  1430. *
  1431. * Summary:
  1432. * Returns the retain count of a window.
  1433. *
  1434. * Discussion:
  1435. * This API is equivalent to GetWindowOwnerCount. For consistency
  1436. * with CoreFoundation and Carbon Events, it is preferred over
  1437. * GetWindowOwnerCount. Both APIs will continue to be supported.
  1438. *
  1439. * Mac OS X threading:
  1440. * Not thread safe
  1441. *
  1442. * Parameters:
  1443. *
  1444. * inWindow:
  1445. * The window whose retain count to retrieve.
  1446. *
  1447. * Availability:
  1448. * Mac OS X: in version 10.0 and later in Carbon.framework
  1449. * CarbonLib: in CarbonLib 1.1 and later
  1450. * Non-Carbon CFM: not available
  1451. }
  1452. function GetWindowRetainCount( inWindow: WindowRef ): ItemCount; external name '_GetWindowRetainCount';
  1453. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1454. {
  1455. * RetainWindow()
  1456. *
  1457. * Summary:
  1458. * Increments the retain count of a window.
  1459. *
  1460. * Discussion:
  1461. * This API is equivalent to CloneWindow. For consistency with
  1462. * CoreFoundation and Carbon Events, it is preferred over
  1463. * CloneWindow. Both APIs will continue to be supported.
  1464. *
  1465. * Mac OS X threading:
  1466. * Not thread safe
  1467. *
  1468. * Parameters:
  1469. *
  1470. * inWindow:
  1471. * The window whose retain count to increment.
  1472. *
  1473. * Availability:
  1474. * Mac OS X: in version 10.0 and later in Carbon.framework
  1475. * CarbonLib: in CarbonLib 1.1 and later
  1476. * Non-Carbon CFM: not available
  1477. }
  1478. function RetainWindow( inWindow: WindowRef ): OSStatus; external name '_RetainWindow';
  1479. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1480. {
  1481. * ReleaseWindow()
  1482. *
  1483. * Summary:
  1484. * Decrements the retain count of a window, and destroys the window
  1485. * if the retain count falls to zero.
  1486. *
  1487. * Discussion:
  1488. * This API is equivalent to DisposeWindow. For consistency with
  1489. * CoreFoundation and Carbon Events, it is preferred over
  1490. * DisposeWindow. Both APIs will continue to be supported.
  1491. *
  1492. * Mac OS X threading:
  1493. * Not thread safe
  1494. *
  1495. * Parameters:
  1496. *
  1497. * inWindow:
  1498. * The window whose retain count to decrement.
  1499. *
  1500. * Availability:
  1501. * Mac OS X: in version 10.0 and later in Carbon.framework
  1502. * CarbonLib: in CarbonLib 1.1 and later
  1503. * Non-Carbon CFM: not available
  1504. }
  1505. function ReleaseWindow( inWindow: WindowRef ): OSStatus; external name '_ReleaseWindow';
  1506. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1507. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1508. { ¥ Custom Windows }
  1509. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1510. { Routines available from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward}
  1511. {
  1512. * CreateCustomWindow()
  1513. *
  1514. * Mac OS X threading:
  1515. * Not thread safe
  1516. *
  1517. * Availability:
  1518. * Mac OS X: in version 10.0 and later in Carbon.framework
  1519. * CarbonLib: in CarbonLib 1.0 and later
  1520. * Non-Carbon CFM: not available
  1521. }
  1522. function CreateCustomWindow( const (*var*) def: WindowDefSpec; windowClass_: WindowClass; attributes: WindowAttributes; const (*var*) contentBounds: Rect; var outWindow: WindowRef ): OSStatus; external name '_CreateCustomWindow';
  1523. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1524. {
  1525. * ReshapeCustomWindow()
  1526. *
  1527. * Mac OS X threading:
  1528. * Not thread safe
  1529. *
  1530. * Availability:
  1531. * Mac OS X: in version 10.0 and later in Carbon.framework
  1532. * CarbonLib: in CarbonLib 1.0 and later
  1533. * Non-Carbon CFM: not available
  1534. }
  1535. function ReshapeCustomWindow( window: WindowRef ): OSStatus; external name '_ReshapeCustomWindow';
  1536. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1537. {
  1538. * RegisterWindowDefinition()
  1539. *
  1540. * Summary:
  1541. * Registers or unregisters a binding between a resource ID and a
  1542. * window definition function.
  1543. *
  1544. * Discussion:
  1545. * In the Mac OS 8.x Window Manager, a 'WIND' resource can contain
  1546. * an embedded WDEF procID that is used by the Window Manager as the
  1547. * resource ID of an 'WDEF' resource to lay out and draw the window.
  1548. * The 'WDEF' resource is loaded by the Window Manager when you load
  1549. * the menu with GetNewWindow. Since WDEFs can no longer be packaged
  1550. * as code resources on Carbon, the procID can no longer refer
  1551. * directly to a WDEF resource. However, using
  1552. * RegisterWindowDefinition you can instead specify a
  1553. * UniversalProcPtr pointing to code in your application code
  1554. * fragment. RegisterWindowDefinition is available when linking to
  1555. * CarbonLib 1.1 forward.
  1556. *
  1557. * Mac OS X threading:
  1558. * Not thread safe
  1559. *
  1560. * Parameters:
  1561. *
  1562. * inResID:
  1563. * A WDEF proc ID, as used in a 'WIND' resource.
  1564. *
  1565. * inDefSpec:
  1566. * Specifies the WindowDefUPP that should be used for windows with
  1567. * the given WDEF proc ID. Passing NULL allows you to unregister
  1568. * the window definition that had been associated with the given
  1569. * WDEF proc ID.
  1570. *
  1571. * Availability:
  1572. * Mac OS X: in version 10.0 and later in Carbon.framework
  1573. * CarbonLib: in CarbonLib 1.1 and later
  1574. * Non-Carbon CFM: not available
  1575. }
  1576. function RegisterWindowDefinition( inResID: SInt16; const (*var*) inDefSpec: WindowDefSpec ): OSStatus; external name '_RegisterWindowDefinition';
  1577. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1578. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1579. { ¥ Window part tracking }
  1580. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1581. {
  1582. Routines available from Mac OS 8.5 forward
  1583. (or from Mac OS 8.6 forward when linking to CarbonLib 1.1 forward)
  1584. }
  1585. {
  1586. * GetWindowWidgetHilite()
  1587. *
  1588. * Mac OS X threading:
  1589. * Not thread safe
  1590. *
  1591. * Availability:
  1592. * Mac OS X: in version 10.0 and later in Carbon.framework
  1593. * CarbonLib: in CarbonLib 1.0 and later
  1594. * Non-Carbon CFM: in WindowsLib 8.5 and later
  1595. }
  1596. function GetWindowWidgetHilite( inWindow: WindowRef; var outHilite: WindowDefPartCode ): OSStatus; external name '_GetWindowWidgetHilite';
  1597. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1598. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1599. { ¥ Window Metainformation Accessors }
  1600. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1601. {
  1602. * IsValidWindowClass()
  1603. *
  1604. * Summary:
  1605. * Indicates whether a window class is supported by the Window
  1606. * Manager.
  1607. *
  1608. * Mac OS X threading:
  1609. * Not thread safe
  1610. *
  1611. * Parameters:
  1612. *
  1613. * inClass:
  1614. * The window class.
  1615. *
  1616. * Availability:
  1617. * Mac OS X: in version 10.1 and later in Carbon.framework
  1618. * CarbonLib: in CarbonLib 1.5 and later
  1619. * Non-Carbon CFM: not available
  1620. }
  1621. function IsValidWindowClass( inClass: WindowClass ): Boolean; external name '_IsValidWindowClass';
  1622. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  1623. {
  1624. * GetAvailableWindowAttributes()
  1625. *
  1626. * Summary:
  1627. * Returns the window attributes that are valid for a window class.
  1628. *
  1629. * Discussion:
  1630. * This API is useful because some window classes support different
  1631. * attributes on different platforms (for example, floating windows
  1632. * can have collapse boxes on 9, but not on X), and the Window
  1633. * Manager will return an error if you attempt to create a window
  1634. * with attributes that aren't supported for the requested window
  1635. * class. You can use this API to remove attributes that are not
  1636. * supported by the current platform before calling CreateNewWindow.
  1637. *
  1638. * Mac OS X threading:
  1639. * Not thread safe
  1640. *
  1641. * Parameters:
  1642. *
  1643. * inClass:
  1644. * The window class.
  1645. *
  1646. * Result:
  1647. * The window attributes that are supported for the specified window
  1648. * class.
  1649. *
  1650. * Availability:
  1651. * Mac OS X: in version 10.1 and later in Carbon.framework
  1652. * CarbonLib: in CarbonLib 1.5 and later
  1653. * Non-Carbon CFM: not available
  1654. }
  1655. function GetAvailableWindowAttributes( inClass: WindowClass ): WindowAttributes; external name '_GetAvailableWindowAttributes';
  1656. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  1657. {
  1658. Routines available from Mac OS 8.5 forward
  1659. or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
  1660. }
  1661. {
  1662. * GetWindowClass()
  1663. *
  1664. * Mac OS X threading:
  1665. * Not thread safe
  1666. *
  1667. * Availability:
  1668. * Mac OS X: in version 10.0 and later in Carbon.framework
  1669. * CarbonLib: in CarbonLib 1.0 and later
  1670. * Non-Carbon CFM: in WindowsLib 8.5 and later
  1671. }
  1672. function GetWindowClass( window: WindowRef; var outClass: WindowClass ): OSStatus; external name '_GetWindowClass';
  1673. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1674. {
  1675. * GetWindowAttributes()
  1676. *
  1677. * Mac OS X threading:
  1678. * Not thread safe
  1679. *
  1680. * Availability:
  1681. * Mac OS X: in version 10.0 and later in Carbon.framework
  1682. * CarbonLib: in CarbonLib 1.0 and later
  1683. * Non-Carbon CFM: in WindowsLib 8.5 and later
  1684. }
  1685. function GetWindowAttributes( window: WindowRef; var outAttributes: WindowAttributes ): OSStatus; external name '_GetWindowAttributes';
  1686. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1687. {
  1688. Routines available from Mac OS 9.0 forward
  1689. or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
  1690. }
  1691. {
  1692. * ChangeWindowAttributes()
  1693. *
  1694. * Mac OS X threading:
  1695. * Not thread safe
  1696. *
  1697. * Availability:
  1698. * Mac OS X: in version 10.0 and later in Carbon.framework
  1699. * CarbonLib: in CarbonLib 1.0 and later
  1700. * Non-Carbon CFM: not available
  1701. }
  1702. function ChangeWindowAttributes( window: WindowRef; setTheseAttributes: WindowAttributes; clearTheseAttributes: WindowAttributes ): OSStatus; external name '_ChangeWindowAttributes';
  1703. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1704. {
  1705. WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
  1706. WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
  1707. SetWindowClass will disappear at some point in the future. Instead of SetWindowClass,
  1708. you should use SetWindowGroup to move a window into the group of the desired
  1709. class. This API is very dangerous in that is actually does change the class
  1710. of the window, but class was meant to be an immutable property of the window.
  1711. At the very least, this API will be modified to only change the layer of the
  1712. window to match the layer that the specified class normally lives in. Consider
  1713. yourself warned!
  1714. WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
  1715. WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
  1716. }
  1717. {
  1718. * SetWindowClass()
  1719. *
  1720. * Summary:
  1721. * Changes the window class of a window.
  1722. *
  1723. * Discussion:
  1724. * SetWindowClass changes the class of a window. It also changes the
  1725. * window's z-order so that it is grouped with other windows of the
  1726. * same class. It does not change the visual appearance of the
  1727. * window. In CarbonLib, SetWindowClass may not be used to change a
  1728. * non-utility window to have utility window class, or to make a
  1729. * utility window have non-utility class. SetWindowClass is
  1730. * available from CarbonLib 1.1 forward.
  1731. *
  1732. * Mac OS X threading:
  1733. * Not thread safe
  1734. *
  1735. * Parameters:
  1736. *
  1737. * inWindow:
  1738. * The window whose class to change.
  1739. *
  1740. * inWindowClass:
  1741. * The new window class.
  1742. *
  1743. * Availability:
  1744. * Mac OS X: in version 10.0 and later in Carbon.framework
  1745. * CarbonLib: in CarbonLib 1.1 and later
  1746. * Non-Carbon CFM: not available
  1747. }
  1748. function SetWindowClass( inWindow: WindowRef; inWindowClass: WindowClass ): OSStatus; external name '_SetWindowClass';
  1749. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1750. {
  1751. * HIWindowChangeClass()
  1752. *
  1753. * Summary:
  1754. * Changes the window look and feel of an existing window on the fly.
  1755. *
  1756. * Discussion:
  1757. * HIWindowChangeClass changes the class of a window. Unlike
  1758. * SetWindowClass, this call effectively changes the look and
  1759. * behavior of the window all at once. Because SetWindowClass
  1760. * already existed and had certain behaviour, we could not change it
  1761. * to behave the way HIWindowChangeClass does.
  1762. *
  1763. * This function can convert a window between kDocumentWindowClass,
  1764. * kFloatingWindowClass, kUtilityWindowClass, and
  1765. * kMovableModalWindowClass only. It cannot change a document window
  1766. * into a plain window, for example.
  1767. *
  1768. * The attributes of the window are adjusted to contain only those
  1769. * that are allowed for the new class. It is the callerÕs
  1770. * responsibility to adjust them further after HIWindowChangeClass
  1771. * returns, if necessary.
  1772. *
  1773. * Mac OS X threading:
  1774. * Not thread safe
  1775. *
  1776. * Parameters:
  1777. *
  1778. * inWindow:
  1779. * The window whose class to change.
  1780. *
  1781. * inWindowClass:
  1782. * The new window class.
  1783. *
  1784. * Availability:
  1785. * Mac OS X: in version 10.3 and later in Carbon.framework
  1786. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1787. * Non-Carbon CFM: not available
  1788. }
  1789. function HIWindowChangeClass( inWindow: HIWindowRef; inWindowClass: WindowClass ): OSStatus; external name '_HIWindowChangeClass';
  1790. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1791. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1792. { ¥ Window Flushing }
  1793. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1794. {
  1795. * HIWindowFlush()
  1796. *
  1797. * Summary:
  1798. * Flushes any dirty areas a window might have.
  1799. *
  1800. * Discussion:
  1801. * This routine allows you to manually flush dirty areas of a window
  1802. * to the screen. In the past, one would use QDFlushPortBuffer, but
  1803. * as we move away from grafports, that type of stuff doesn't make
  1804. * much sense these days. This is the preferred routine to flush
  1805. * window buffers in Mac OS X 10.3 and beyond.
  1806. *
  1807. * Mac OS X threading:
  1808. * Not thread safe
  1809. *
  1810. * Parameters:
  1811. *
  1812. * inWindow:
  1813. * The window to flush.
  1814. *
  1815. * Availability:
  1816. * Mac OS X: in version 10.3 and later in Carbon.framework
  1817. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1818. * Non-Carbon CFM: not available
  1819. }
  1820. function HIWindowFlush( inWindow: HIWindowRef ): OSStatus; external name '_HIWindowFlush';
  1821. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1822. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1823. { ¥ Window Modality }
  1824. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1825. {
  1826. * WindowModality
  1827. *
  1828. }
  1829. type
  1830. WindowModality = UInt32;
  1831. const
  1832. {
  1833. * A window does not prevent interaction with any other window in the
  1834. * system.
  1835. }
  1836. kWindowModalityNone = 0;
  1837. {
  1838. * A window prevents interaction with all other windows in the
  1839. * system. Only available in CarbonLib. Mapped to
  1840. * kWindowModalityAppModal in Mac OS X.
  1841. }
  1842. kWindowModalitySystemModal = 1;
  1843. {
  1844. * A window prevents interaction with other windows in the same
  1845. * process.
  1846. }
  1847. kWindowModalityAppModal = 2;
  1848. {
  1849. * A window prevents interaction with a single other window.
  1850. }
  1851. kWindowModalityWindowModal = 3;
  1852. {
  1853. * SetWindowModality()
  1854. *
  1855. * Summary:
  1856. * Sets the modality of a window.
  1857. *
  1858. * Discussion:
  1859. * The modality of a window is used by the Carbon event manager to
  1860. * automatically determine appropriate event handling.
  1861. *
  1862. * Mac OS X threading:
  1863. * Not thread safe
  1864. *
  1865. * Parameters:
  1866. *
  1867. * inWindow:
  1868. * The window whose modality to set.
  1869. *
  1870. * inModalKind:
  1871. * The new modality for the window.
  1872. *
  1873. * inUnavailableWindow:
  1874. * If the window is becoming window-modal, this parameter
  1875. * specifies the window to which the inWindow parameter is modal.
  1876. * The unavailableWindow will not be available while inWindow is
  1877. * in window-modal state.
  1878. *
  1879. * Availability:
  1880. * Mac OS X: in version 10.0 and later in Carbon.framework
  1881. * CarbonLib: in CarbonLib 1.1 and later
  1882. * Non-Carbon CFM: not available
  1883. }
  1884. function SetWindowModality( inWindow: WindowRef; inModalKind: WindowModality; inUnavailableWindow: WindowRef ): OSStatus; external name '_SetWindowModality';
  1885. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1886. {
  1887. * GetWindowModality()
  1888. *
  1889. * Summary:
  1890. * Retrieves the modality of a window.
  1891. *
  1892. * Mac OS X threading:
  1893. * Not thread safe
  1894. *
  1895. * Parameters:
  1896. *
  1897. * inWindow:
  1898. * The window whose modality to retrieve.
  1899. *
  1900. * outModalKind:
  1901. * On exit, contains the modality of the window.
  1902. *
  1903. * outUnavailableWindow:
  1904. * On exit, ifÊthe window is window-modal, contains the target
  1905. * window of the specified window's modality.
  1906. *
  1907. * Availability:
  1908. * Mac OS X: in version 10.0 and later in Carbon.framework
  1909. * CarbonLib: in CarbonLib 1.1 and later
  1910. * Non-Carbon CFM: not available
  1911. }
  1912. function GetWindowModality( inWindow: WindowRef; var outModalKind: WindowModality; outUnavailableWindow: WindowRefPtr { can be NULL } ): OSStatus; external name '_GetWindowModality';
  1913. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1914. {
  1915. * HIWindowIsDocumentModalTarget()
  1916. *
  1917. * Summary:
  1918. * Determines if a window is currently the target window of another
  1919. * document modal window, such as a sheet.
  1920. *
  1921. * Mac OS X threading:
  1922. * Not thread safe
  1923. *
  1924. * Parameters:
  1925. *
  1926. * inWindow:
  1927. * The window in question.
  1928. *
  1929. * outOwner:
  1930. * If inWindow is the target of a document modal window, outOwner
  1931. * is set to the document modal window on exit. If this function
  1932. * does not return true, outOwner is undefined. You may pass NULL
  1933. * if you don't want the owner's window ref.
  1934. *
  1935. * Result:
  1936. * A boolean result. A true result indicates that inWindow is
  1937. * currently the target of a document modal window.
  1938. *
  1939. * Availability:
  1940. * Mac OS X: in version 10.3 and later in Carbon.framework
  1941. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1942. * Non-Carbon CFM: not available
  1943. }
  1944. function HIWindowIsDocumentModalTarget( inWindow: HIWindowRef; outOwner: HIWindowRefPtr { can be NULL } ): Boolean; external name '_HIWindowIsDocumentModalTarget';
  1945. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1946. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1947. { ¥ Floating Windows }
  1948. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1949. {
  1950. Routines available from Mac OS 8.6 forward
  1951. or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
  1952. }
  1953. {
  1954. * ShowFloatingWindows()
  1955. *
  1956. * Mac OS X threading:
  1957. * Not thread safe
  1958. *
  1959. * Availability:
  1960. * Mac OS X: in version 10.0 and later in Carbon.framework
  1961. * CarbonLib: in CarbonLib 1.0 and later
  1962. * Non-Carbon CFM: in WindowsLib 8.5 and later
  1963. }
  1964. function ShowFloatingWindows: OSStatus; external name '_ShowFloatingWindows';
  1965. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1966. {
  1967. * HideFloatingWindows()
  1968. *
  1969. * Mac OS X threading:
  1970. * Not thread safe
  1971. *
  1972. * Availability:
  1973. * Mac OS X: in version 10.0 and later in Carbon.framework
  1974. * CarbonLib: in CarbonLib 1.0 and later
  1975. * Non-Carbon CFM: in WindowsLib 8.5 and later
  1976. }
  1977. function HideFloatingWindows: OSStatus; external name '_HideFloatingWindows';
  1978. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1979. {
  1980. * AreFloatingWindowsVisible()
  1981. *
  1982. * Mac OS X threading:
  1983. * Not thread safe
  1984. *
  1985. * Availability:
  1986. * Mac OS X: in version 10.0 and later in Carbon.framework
  1987. * CarbonLib: in CarbonLib 1.0 and later
  1988. * Non-Carbon CFM: in WindowsLib 8.5 and later
  1989. }
  1990. function AreFloatingWindowsVisible: Boolean; external name '_AreFloatingWindowsVisible';
  1991. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1992. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1993. { ¥ Window Groups }
  1994. { The Window Group API allows the creation and management of groups of windows, }
  1995. { allowing control of the z-order, activation, and positioning of the windows. }
  1996. { Internally to the Window Manager, each of the standard window tiers (document, }
  1997. { toolbar, floating, modal, utility, help, and overlay) is implemented as a window }
  1998. { group; you can access the window group for a class with GetWindowGroupOfClass. }
  1999. { You can create your own window groups, if you would like your windows to float, }
  2000. { for example, above the floating window layer but below the modal layer. It is }
  2001. { also possible to create more complex hierarchical arrangements of window groups. }
  2002. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2003. type
  2004. WindowGroupRef = ^SInt32; { an opaque 32-bit type }
  2005. WindowGroupRefPtr = ^WindowGroupRef; { when a var xx:WindowGroupRef parameter can be nil, it is changed to xx: WindowGroupRefPtr }
  2006. { may be passed as the "behindWindow" parameter to NewCWindow and SendBehind}
  2007. const
  2008. { may be passed as the "behindWindow" parameter to NewCWindow and SendBehind}
  2009. kFirstWindowOfGroup = WindowRef(-1);
  2010. kLastWindowOfGroup = nil;
  2011. { may be passed as the "behindGroup" parameter to SendWindowGroupBehind}
  2012. kFirstWindowGroup = WindowGroupRef(-1);
  2013. kLastWindowGroup = nil;
  2014. {
  2015. * WindowGroupAttributes
  2016. *
  2017. * Summary:
  2018. * These are attributes that may be applied to a window group.
  2019. }
  2020. type
  2021. WindowGroupAttributes = UInt32;
  2022. const
  2023. {
  2024. * Makes the group behave somewhat as a layer of windows that move
  2025. * together. When any window in the group is brought to the front of
  2026. * the group, the entire group will also be brought to the front of
  2027. * the containing group's child hierarchy.
  2028. }
  2029. kWindowGroupAttrSelectAsLayer = 1 shl 0;
  2030. {
  2031. * The positions of the contents of this group with respect to each
  2032. * other cannot be changed. When one item moves, all other items are
  2033. * moved simultaneously.
  2034. }
  2035. kWindowGroupAttrMoveTogether = 1 shl 1;
  2036. {
  2037. * The z-order of the contents of this group with respect to each
  2038. * other cannot be changed. When one item changes z-order, all other
  2039. * items are moved simultaneously. For purposes of z-ordering, the
  2040. * group and all its subgroups are effectively treated as if they
  2041. * were a single window in the parent group of this group.
  2042. }
  2043. kWindowGroupAttrLayerTogether = 1 shl 2;
  2044. {
  2045. * The active state of the windows in this group is shared. The
  2046. * windows in the group are activated or deactivated according to the
  2047. * activation scope of the group, but when any window in the group
  2048. * changes activation, all other windows change to match.
  2049. }
  2050. kWindowGroupAttrSharedActivation = 1 shl 3;
  2051. {
  2052. * When any window in this group is collapsed, all other windows in
  2053. * this group are hidden. All subgroups of this group are also
  2054. * examined for the HideOnCollapse attribute, and any windows of any
  2055. * subgroup with this attribute are also hidden. All windows will be
  2056. * shown again when the collapsed window is expanded.
  2057. }
  2058. kWindowGroupAttrHideOnCollapse = 1 shl 4;
  2059. {
  2060. * This window group's window level should be left unchanged. If this
  2061. * attribute is not specified, this window group's window level will
  2062. * be promoted to a value equal to the level of the next FixedLevel
  2063. * window group beneath it in the window group hierarchy.
  2064. }
  2065. kWindowGroupAttrFixedLevel = 1 shl 5;
  2066. {
  2067. * WindowActivationScope
  2068. *
  2069. * Discussion:
  2070. * Every window has a WindowActivationScope. It defines how windows
  2071. * are activated by the Window Manager with respect to other windows
  2072. * in the windowÕs group and in the current process.
  2073. }
  2074. type
  2075. WindowActivationScope = UInt32;
  2076. const
  2077. {
  2078. * Windows with this scope are never activated by the Window Manager.
  2079. * This should be used when the windowÕs visual state does not change
  2080. * based on activation (for example, tooltip windows), or when the
  2081. * client wishes to manually control all activation. The window owner
  2082. * is free to explicitly activate windows using the ActivateWindow
  2083. * and DeactivateWindow APIs.
  2084. }
  2085. kWindowActivationScopeNone = 0;
  2086. {
  2087. * Windows with this scope are always active if visible. Windows with
  2088. * this scope are unaffected by the activation state of other
  2089. * windows. This activation scope is automatically used by floating
  2090. * windows.
  2091. }
  2092. kWindowActivationScopeIndependent = 1;
  2093. {
  2094. * Windows with this scope are activated relative to other windows
  2095. * with the same scope in the current process. Only one window with
  2096. * this scope can be active in the entire process. This activation
  2097. * scope is automatically used by document and dialog windows.
  2098. }
  2099. kWindowActivationScopeAll = 2;
  2100. {
  2101. * Summary:
  2102. * These are constants that can be used for the inNextGroup
  2103. * parameter to GetWindowGroupSibling.
  2104. }
  2105. const
  2106. {
  2107. * Indicates that GetWindowGroupSibling should return the next deeper
  2108. * sibling group in the z-order.
  2109. }
  2110. kNextWindowGroup = true;
  2111. {
  2112. * Indicates that GetWindowGroupSibling should return the next higher
  2113. * sibling group in the z-order.
  2114. }
  2115. kPreviousWindowGroup = false;
  2116. {
  2117. * WindowGroupContentOptions
  2118. *
  2119. * Discussion:
  2120. * Window group contents options are used to control what group
  2121. * content is counted or returned by the CountWindowGroupContents
  2122. * and GetWindowGroupContents APIs.
  2123. }
  2124. type
  2125. WindowGroupContentOptions = UInt32;
  2126. const
  2127. {
  2128. * Indicates that Count/GetWindowGroupContents should return the
  2129. * windows in a group. If this option is not set, these APIs return
  2130. * the groups in a group.
  2131. }
  2132. kWindowGroupContentsReturnWindows = 1 shl 0;
  2133. {
  2134. * Indicates that Count/GetWindowGroupContents should include the
  2135. * contents of groups contained by the specified group. If this
  2136. * option is not set, these APIs only return information about the
  2137. * specified groupÕs contents.
  2138. }
  2139. kWindowGroupContentsRecurse = 1 shl 1;
  2140. {
  2141. * Indicates that Count/GetWindowGroupContents should only include
  2142. * visible windows. Only valid when kWindowGroupContentsReturnWindows
  2143. * is specified.
  2144. }
  2145. kWindowGroupContentsVisible = 1 shl 2;
  2146. {----------------------------------------------------------------------------------}
  2147. { ¥ Group creation, destruction, and refcounting }
  2148. {----------------------------------------------------------------------------------}
  2149. {
  2150. * CreateWindowGroup()
  2151. *
  2152. * Summary:
  2153. * Creates a new window group.
  2154. *
  2155. * Mac OS X threading:
  2156. * Not thread safe
  2157. *
  2158. * Parameters:
  2159. *
  2160. * inAttributes:
  2161. * Attributes for the new window group.
  2162. *
  2163. * outGroup:
  2164. * On exit, contains the new window group.
  2165. *
  2166. * Availability:
  2167. * Mac OS X: in version 10.0 and later in Carbon.framework
  2168. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  2169. * Non-Carbon CFM: not available
  2170. }
  2171. function CreateWindowGroup( inAttributes: WindowGroupAttributes; var outGroup: WindowGroupRef ): OSStatus; external name '_CreateWindowGroup';
  2172. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2173. {
  2174. * RetainWindowGroup()
  2175. *
  2176. * Summary:
  2177. * Increments the refcount of a window group.
  2178. *
  2179. * Mac OS X threading:
  2180. * Not thread safe
  2181. *
  2182. * Parameters:
  2183. *
  2184. * inGroup:
  2185. * The group whose refcount to increment.
  2186. *
  2187. * Availability:
  2188. * Mac OS X: in version 10.0 and later in Carbon.framework
  2189. * CarbonLib: in CarbonLib 1.4 and later
  2190. * Non-Carbon CFM: not available
  2191. }
  2192. function RetainWindowGroup( inGroup: WindowGroupRef ): OSStatus; external name '_RetainWindowGroup';
  2193. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2194. {
  2195. * ReleaseWindowGroup()
  2196. *
  2197. * Summary:
  2198. * Releases a refcount on a window group. If the refcount goes to
  2199. * zero, the group is destroyed, and a refcount is released from all
  2200. * contained objects.
  2201. *
  2202. * Mac OS X threading:
  2203. * Not thread safe
  2204. *
  2205. * Parameters:
  2206. *
  2207. * inGroup:
  2208. * The group whose refcount to decrement.
  2209. *
  2210. * Availability:
  2211. * Mac OS X: in version 10.0 and later in Carbon.framework
  2212. * CarbonLib: in CarbonLib 1.4 and later
  2213. * Non-Carbon CFM: not available
  2214. }
  2215. function ReleaseWindowGroup( inGroup: WindowGroupRef ): OSStatus; external name '_ReleaseWindowGroup';
  2216. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2217. {
  2218. * GetWindowGroupRetainCount()
  2219. *
  2220. * Summary:
  2221. * Returns the refcount of a window group.
  2222. *
  2223. * Mac OS X threading:
  2224. * Not thread safe
  2225. *
  2226. * Parameters:
  2227. *
  2228. * inGroup:
  2229. * The group whose refcount to return.
  2230. *
  2231. * Availability:
  2232. * Mac OS X: in version 10.1 and later in Carbon.framework
  2233. * CarbonLib: in CarbonLib 1.4 and later
  2234. * Non-Carbon CFM: not available
  2235. }
  2236. function GetWindowGroupRetainCount( inGroup: WindowGroupRef ): ItemCount; external name '_GetWindowGroupRetainCount';
  2237. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  2238. {
  2239. * GetWindowGroupOfClass()
  2240. *
  2241. * Summary:
  2242. * Gets the window group in which windows of a given class are
  2243. * placed.
  2244. *
  2245. * Discussion:
  2246. * The Window Manager uses window groups internally to manage the
  2247. * ordering of windows of different classes. In some cases, multiple
  2248. * classes are placed within the same group; for example, windows
  2249. * from all of the modal and alert window classes are placed into
  2250. * the same modal window group. The refcount of the group returned
  2251. * by this API is not incremented, and the caller does not need to
  2252. * release the reference.
  2253. *
  2254. * Mac OS X threading:
  2255. * Not thread safe
  2256. *
  2257. * Parameters:
  2258. *
  2259. * windowClass:
  2260. * The class whose window group to retrieve. You may pass
  2261. * kAllWindowClasses to retrieve the root window group.
  2262. *
  2263. * Availability:
  2264. * Mac OS X: in version 10.0 and later in Carbon.framework
  2265. * CarbonLib: in CarbonLib 1.4 and later
  2266. * Non-Carbon CFM: not available
  2267. }
  2268. function GetWindowGroupOfClass( windowClass_: WindowClass ): WindowGroupRef; external name '_GetWindowGroupOfClass';
  2269. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2270. {----------------------------------------------------------------------------------}
  2271. { ¥ÊGroup name, attributes, and level }
  2272. {----------------------------------------------------------------------------------}
  2273. {
  2274. * SetWindowGroupName()
  2275. *
  2276. * Summary:
  2277. * Sets the name of a window group.
  2278. *
  2279. * Discussion:
  2280. * The name of a window group is never displayed to the user.
  2281. * However, it is displayed by debugging functions such as
  2282. * DebugPrintWindowGroup. This can be very useful when debugging the
  2283. * structure of your window groups.
  2284. *
  2285. * Mac OS X threading:
  2286. * Not thread safe
  2287. *
  2288. * Parameters:
  2289. *
  2290. * inGroup:
  2291. * The group whose name to set.
  2292. *
  2293. * inName:
  2294. * The name of the group.
  2295. *
  2296. * Availability:
  2297. * Mac OS X: in version 10.0 and later in Carbon.framework
  2298. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  2299. * Non-Carbon CFM: not available
  2300. }
  2301. function SetWindowGroupName( inGroup: WindowGroupRef; inName: CFStringRef ): OSStatus; external name '_SetWindowGroupName';
  2302. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2303. {
  2304. * CopyWindowGroupName()
  2305. *
  2306. * Summary:
  2307. * Returns a copy of the name of a window group.
  2308. *
  2309. * Mac OS X threading:
  2310. * Not thread safe
  2311. *
  2312. * Parameters:
  2313. *
  2314. * inGroup:
  2315. * The group whose name to retrieve.
  2316. *
  2317. * outName:
  2318. * On exit, contains the name of the group. It is the caller's
  2319. * responsibility to release the name.
  2320. *
  2321. * Availability:
  2322. * Mac OS X: in version 10.0 and later in Carbon.framework
  2323. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  2324. * Non-Carbon CFM: not available
  2325. }
  2326. function CopyWindowGroupName( inGroup: WindowGroupRef; var outName: CFStringRef ): OSStatus; external name '_CopyWindowGroupName';
  2327. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2328. {
  2329. * GetWindowGroupAttributes()
  2330. *
  2331. * Summary:
  2332. * Retrieves the attributes of a window group.
  2333. *
  2334. * Mac OS X threading:
  2335. * Not thread safe
  2336. *
  2337. * Parameters:
  2338. *
  2339. * inGroup:
  2340. * The group whose attributes to retrieve.
  2341. *
  2342. * outAttributes:
  2343. * On exit, the groupÕs attributes.
  2344. *
  2345. * Availability:
  2346. * Mac OS X: in version 10.0 and later in Carbon.framework
  2347. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  2348. * Non-Carbon CFM: not available
  2349. }
  2350. function GetWindowGroupAttributes( inGroup: WindowGroupRef; var outAttributes: WindowGroupAttributes ): OSStatus; external name '_GetWindowGroupAttributes';
  2351. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2352. {
  2353. * ChangeWindowGroupAttributes()
  2354. *
  2355. * Summary:
  2356. * Changes the attributes of a window group.
  2357. *
  2358. * Mac OS X threading:
  2359. * Not thread safe
  2360. *
  2361. * Parameters:
  2362. *
  2363. * inGroup:
  2364. * The group whose attributes to change.
  2365. *
  2366. * setTheseAttributes:
  2367. * The attributes to set.
  2368. *
  2369. * clearTheseAttributes:
  2370. * The attributes to clear.
  2371. *
  2372. * Availability:
  2373. * Mac OS X: in version 10.0 and later in Carbon.framework
  2374. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  2375. * Non-Carbon CFM: not available
  2376. }
  2377. function ChangeWindowGroupAttributes( inGroup: WindowGroupRef; setTheseAttributes: WindowGroupAttributes; clearTheseAttributes: WindowGroupAttributes ): OSStatus; external name '_ChangeWindowGroupAttributes';
  2378. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2379. {
  2380. * SetWindowGroupLevel()
  2381. *
  2382. * Summary:
  2383. * Sets the CoreGraphics window group level of windows in a group.
  2384. *
  2385. * Discussion:
  2386. * CoreGraphics windows (used to implement all windows in Carbon and
  2387. * Cocoa applications on Mac OS X) are divided into layers specified
  2388. * by a window level. Standard window levels are listed in
  2389. * <CoreGraphics/CGWindowLevel.h>. By default, a new window group
  2390. * has a window level of kCGNormalWindowLevel.
  2391. *
  2392. * When a window is placed into a window group, its window level is
  2393. * determined by the window level of its "base group". This is the
  2394. * containing group that is a child of the root group. For example,
  2395. * if group A is a child of the root group, and group B is a child
  2396. * of group A, and window C is in group B, then window C's base
  2397. * group is group A, and group A's window level determines the level
  2398. * of window C.
  2399. *
  2400. * SetWindowGroupLevel only allows changing the window level of
  2401. * groups that are children of the root group. It returns paramErr
  2402. * for other groups, since a group that is not a child of the root
  2403. * group is not a base group and changing its level has no effect.
  2404. *
  2405. *
  2406. * Changing the level of a group also changes the level of all
  2407. * windows currently contained by the group.
  2408. *
  2409. * In Mac OS X 10.4 and later, SetWindowGroupLevel will set all
  2410. * three window levels associated with a window group: the Active,
  2411. * Inactive, and Promoted levels. It will then immediately determine
  2412. * if the Active level needs to be promoted to a larger value, and
  2413. * if so, set the Promoted level to that value.
  2414. *
  2415. * Mac OS X threading:
  2416. * Not thread safe
  2417. *
  2418. * Parameters:
  2419. *
  2420. * inGroup:
  2421. * The window group whose level to change.
  2422. *
  2423. * inLevel:
  2424. * The new level for the windows in this group.
  2425. *
  2426. * Availability:
  2427. * Mac OS X: in version 10.0 and later in Carbon.framework
  2428. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  2429. * Non-Carbon CFM: not available
  2430. }
  2431. function SetWindowGroupLevel( inGroup: WindowGroupRef; inLevel: SInt32 ): OSStatus; external name '_SetWindowGroupLevel';
  2432. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2433. {
  2434. * GetWindowGroupLevel()
  2435. *
  2436. * Summary:
  2437. * Gets the CoreGraphics window group level of windows in a group.
  2438. *
  2439. * Discussion:
  2440. * In Mac OS X 10.4 and later, GetWindowGroupLevel will return
  2441. * either the Promoted window level or the Inactive window level,
  2442. * depending on whether the application is active or inactive.
  2443. *
  2444. * Mac OS X threading:
  2445. * Not thread safe
  2446. *
  2447. * Parameters:
  2448. *
  2449. * inGroup:
  2450. * The window group whose level to return.
  2451. *
  2452. * outLevel:
  2453. * On exit, contains the window level of the windows in this group.
  2454. *
  2455. * Availability:
  2456. * Mac OS X: in version 10.0 and later in Carbon.framework
  2457. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  2458. * Non-Carbon CFM: not available
  2459. }
  2460. function GetWindowGroupLevel( inGroup: WindowGroupRef; var outLevel: SInt32 ): OSStatus; external name '_GetWindowGroupLevel';
  2461. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2462. {
  2463. * Summary:
  2464. * Parameters to GetWindowGroupLevelOfType and
  2465. * SetWindowGroupLevelOfType
  2466. }
  2467. const
  2468. {
  2469. * The window level that is nominally used for windows in the group
  2470. * when the application is active. However, if a group with a higher
  2471. * window level is positioned below group in the window group
  2472. * hierarchy, this group's active level will be promoted to match the
  2473. * level of the group in front of it. You can determine the actual
  2474. * window level in use for a group using the
  2475. * kWindowGroupLevelPromoted constant.
  2476. }
  2477. kWindowGroupLevelActive = 1;
  2478. {
  2479. * The window level that is used for windows in the group when the
  2480. * application is inactive.
  2481. }
  2482. kWindowGroupLevelInactive = 2;
  2483. {
  2484. * The window level that is actually used for windows in the group
  2485. * when the application is active. This level will either be the same
  2486. * as the Active window level, or will be a larger value to match the
  2487. * level of a group below this group.
  2488. *
  2489. * We do not recommend setting the Promoted window level explicitly,
  2490. * because the promoted level is reset by the Window Manager whenever
  2491. * the window group hierarchy structure changes, and therefore any
  2492. * changes that you may make to the promoted level can be
  2493. * overwritten. In general you should only use this API to set the
  2494. * Active and Inactive window levels.
  2495. }
  2496. kWindowGroupLevelPromoted = 3;
  2497. {
  2498. * SetWindowGroupLevelOfType()
  2499. *
  2500. * Summary:
  2501. * Sets a CoreGraphics window group level of a window group.
  2502. *
  2503. * Discussion:
  2504. * See the SetWindowGroupLevel API for a general discussion of
  2505. * window levels and window groups.
  2506. *
  2507. * In Mac OS X 10.4 and later, a window group may have multiple
  2508. * window levels associated with it; one level for when the
  2509. * application is active, and another for when the application is
  2510. * inactive. The Window Manager automatically switches each group's
  2511. * level as the application becomes active or inactive. This API can
  2512. * be used to set each level associated with a group.
  2513. *
  2514. * This API can also be used to set the promoted window level that
  2515. * is actually used for windows in the group; however, we do not
  2516. * recommend this usage, because the promoted window level is reset
  2517. * by the Window Manager whenever the window group hierarchy
  2518. * structure changes, and therefore any changes that you may make to
  2519. * the promoted level can be overwritten. In general you should only
  2520. * use this API to set the Active and Inactive window levels.
  2521. *
  2522. *
  2523. * When setting the Active level of a group with the FixedLevel
  2524. * window group attribute, this API will automatically also set the
  2525. * Promoted level to the same value, and also update the Promoted
  2526. * level of any non-FixedLevel groups above the group being modified.
  2527. *
  2528. * Mac OS X threading:
  2529. * Not thread safe
  2530. *
  2531. * Parameters:
  2532. *
  2533. * inGroup:
  2534. * The window group whose level to change.
  2535. *
  2536. * inLevelType:
  2537. * The level type to change (one of kWindowGroupLevelActive,
  2538. * kWindowGroupLevelInactive, or kWindowGroupLevelPromoted).
  2539. *
  2540. * inLevel:
  2541. * The new level for the windows in this group.
  2542. *
  2543. * Availability:
  2544. * Mac OS X: in version 10.4 and later in Carbon.framework
  2545. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  2546. * Non-Carbon CFM: not available
  2547. }
  2548. function SetWindowGroupLevelOfType( inGroup: WindowGroupRef; inLevelType: UInt32; inLevel: CGWindowLevel ): OSStatus; external name '_SetWindowGroupLevelOfType';
  2549. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  2550. {
  2551. * GetWindowGroupLevelOfType()
  2552. *
  2553. * Summary:
  2554. * Gets a CoreGraphics window level of a window group.
  2555. *
  2556. * Discussion:
  2557. * See the SetWindowGroupLevel API for a general discussion of
  2558. * window levels and window groups.
  2559. *
  2560. * In Mac OS X 10.4 and later, a window group may have multiple
  2561. * window levels associated with it; one level for when the
  2562. * application is active, and another for when the application is
  2563. * inactive. The Window Manager automatically switches each group's
  2564. * level as the application becomes active or inactive. The
  2565. * GetWindowGroupLevelOfType API can be used to get each level
  2566. * associated with a group, including the promoted window level that
  2567. * is actually in use for windows in the group while the application
  2568. * is active.
  2569. *
  2570. * Mac OS X threading:
  2571. * Not thread safe
  2572. *
  2573. * Parameters:
  2574. *
  2575. * inGroup:
  2576. * The window group whose level to retrieve.
  2577. *
  2578. * inLevelType:
  2579. * The level type to retrieve (one of kWindowGroupLevelActive,
  2580. * kWindowGroupLevelInactive, or kWindowGroupLevelPromoted).
  2581. *
  2582. * outLevel:
  2583. * On exit, the level for the windows in this group.
  2584. *
  2585. * Availability:
  2586. * Mac OS X: in version 10.4 and later in Carbon.framework
  2587. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  2588. * Non-Carbon CFM: not available
  2589. }
  2590. function GetWindowGroupLevelOfType( inGroup: WindowGroupRef; inLevelType: UInt32; var outLevel: CGWindowLevel ): OSStatus; external name '_GetWindowGroupLevelOfType';
  2591. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  2592. {----------------------------------------------------------------------------------}
  2593. { ¥ÊGroup z-ordering }
  2594. {----------------------------------------------------------------------------------}
  2595. {
  2596. * SendWindowGroupBehind()
  2597. *
  2598. * Summary:
  2599. * Changes the z-order of a group, if the group does not have the
  2600. * kWindowGroupAttributeLayerTogether attribute set.
  2601. *
  2602. * Discussion:
  2603. * SendWindowGroupBehind currently requires that the group being
  2604. * moved and the behindGroup have the same parent group.
  2605. *
  2606. * Mac OS X threading:
  2607. * Not thread safe
  2608. *
  2609. * Parameters:
  2610. *
  2611. * inGroup:
  2612. * The group whose z-order to change.
  2613. *
  2614. * behindGroup:
  2615. * The group behind which to position the specified group.
  2616. *
  2617. * Availability:
  2618. * Mac OS X: in version 10.0 and later in Carbon.framework
  2619. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  2620. * Non-Carbon CFM: not available
  2621. }
  2622. function SendWindowGroupBehind( inGroup: WindowGroupRef; behindGroup: WindowGroupRef ): OSStatus; external name '_SendWindowGroupBehind';
  2623. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2624. {----------------------------------------------------------------------------------}
  2625. { ¥ÊGroup containment hierarchy manipulation }
  2626. {----------------------------------------------------------------------------------}
  2627. {
  2628. * GetWindowGroup()
  2629. *
  2630. * Summary:
  2631. * Gets the window group that contains a window.
  2632. *
  2633. * Discussion:
  2634. * The refcount of the group returned by this API is not
  2635. * incremented, and the caller does not need to release the
  2636. * reference.
  2637. *
  2638. * Mac OS X threading:
  2639. * Not thread safe
  2640. *
  2641. * Parameters:
  2642. *
  2643. * inWindow:
  2644. * The window whose containing group to retrieve.
  2645. *
  2646. * Availability:
  2647. * Mac OS X: in version 10.0 and later in Carbon.framework
  2648. * CarbonLib: in CarbonLib 1.4 and later
  2649. * Non-Carbon CFM: not available
  2650. }
  2651. function GetWindowGroup( inWindow: WindowRef ): WindowGroupRef; external name '_GetWindowGroup';
  2652. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2653. {
  2654. * SetWindowGroup()
  2655. *
  2656. * Summary:
  2657. * Sets the window group that contains a window.
  2658. *
  2659. * Discussion:
  2660. * The windowÕs z-order relative to windows in the current process
  2661. * may also be changed by this API. If the new window group is
  2662. * z-ordered above the windowÕs current group, the window will be
  2663. * placed at the end of the new group. If the new window group is
  2664. * z-ordered below the windowÕs current group, the window will be
  2665. * placed at the top of the new group. You may not place a window
  2666. * directly into the root group.
  2667. *
  2668. * Mac OS X threading:
  2669. * Not thread safe
  2670. *
  2671. * Parameters:
  2672. *
  2673. * inWindow:
  2674. * The window whose group to change.
  2675. *
  2676. * inNewGroup:
  2677. * The new containing group.
  2678. *
  2679. * Availability:
  2680. * Mac OS X: in version 10.0 and later in Carbon.framework
  2681. * CarbonLib: in CarbonLib 1.4 and later
  2682. * Non-Carbon CFM: not available
  2683. }
  2684. function SetWindowGroup( inWindow: WindowRef; inNewGroup: WindowGroupRef ): OSStatus; external name '_SetWindowGroup';
  2685. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2686. {
  2687. * IsWindowContainedInGroup()
  2688. *
  2689. * Summary:
  2690. * Indicates whether a window is contained within a group or any of
  2691. * its subgroups.
  2692. *
  2693. * Mac OS X threading:
  2694. * Not thread safe
  2695. *
  2696. * Parameters:
  2697. *
  2698. * inWindow:
  2699. * The window whose containment to examine.
  2700. *
  2701. * inGroup:
  2702. * The group that might contain the window.
  2703. *
  2704. * Availability:
  2705. * Mac OS X: in version 10.0 and later in Carbon.framework
  2706. * CarbonLib: in CarbonLib 1.4 and later
  2707. * Non-Carbon CFM: not available
  2708. }
  2709. function IsWindowContainedInGroup( inWindow: WindowRef; inGroup: WindowGroupRef ): Boolean; external name '_IsWindowContainedInGroup';
  2710. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2711. {
  2712. * GetWindowGroupParent()
  2713. *
  2714. * Summary:
  2715. * Gets the window group that contains a group.
  2716. *
  2717. * Mac OS X threading:
  2718. * Not thread safe
  2719. *
  2720. * Parameters:
  2721. *
  2722. * inGroup:
  2723. * The group whose containing group to retrieve.
  2724. *
  2725. * outGroup:
  2726. * On exit, the containing window group of the group. The groupÕs
  2727. * refcount is not incremented by this API, and the caller does
  2728. * not need to release the reference.
  2729. *
  2730. * Availability:
  2731. * Mac OS X: in version 10.0 and later in Carbon.framework
  2732. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  2733. * Non-Carbon CFM: not available
  2734. }
  2735. function GetWindowGroupParent( inGroup: WindowGroupRef ): WindowGroupRef; external name '_GetWindowGroupParent';
  2736. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2737. {
  2738. * SetWindowGroupParent()
  2739. *
  2740. * Summary:
  2741. * Sets the window group that contains a group.
  2742. *
  2743. * Discussion:
  2744. * SetWindowGroupParent currently requires that the group have no
  2745. * windows in it.
  2746. *
  2747. * Mac OS X threading:
  2748. * Not thread safe
  2749. *
  2750. * Parameters:
  2751. *
  2752. * inGroup:
  2753. * The group whose containing group to change.
  2754. *
  2755. * inNewGroup:
  2756. * The new containing group.
  2757. *
  2758. * Availability:
  2759. * Mac OS X: in version 10.0 and later in Carbon.framework
  2760. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  2761. * Non-Carbon CFM: not available
  2762. }
  2763. function SetWindowGroupParent( inGroup: WindowGroupRef; inNewGroup: WindowGroupRef ): OSStatus; external name '_SetWindowGroupParent';
  2764. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2765. {
  2766. * GetWindowGroupSibling()
  2767. *
  2768. * Summary:
  2769. * Returns the next or previous group of a window group.
  2770. *
  2771. * Mac OS X threading:
  2772. * Not thread safe
  2773. *
  2774. * Parameters:
  2775. *
  2776. * inGroup:
  2777. * The group whose sibling to return.
  2778. *
  2779. * inNextGroup:
  2780. * True to return the next sibling, false to return the previous
  2781. * sibling.
  2782. *
  2783. * Availability:
  2784. * Mac OS X: in version 10.0 and later in Carbon.framework
  2785. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  2786. * Non-Carbon CFM: not available
  2787. }
  2788. function GetWindowGroupSibling( inGroup: WindowGroupRef; inNextGroup: Boolean ): WindowGroupRef; external name '_GetWindowGroupSibling';
  2789. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2790. {
  2791. * GetWindowGroupOwner()
  2792. *
  2793. * Summary:
  2794. * Returns the window that owns a window group, or NULL if none.
  2795. *
  2796. * Discussion:
  2797. * A window may own one or more window groups. The windows in an
  2798. * owned window group will always be z-ordered above the owner
  2799. * window. Whenever the owner window changes z-order, the windows in
  2800. * the groups owned by the window will be moved also.
  2801. *
  2802. * Mac OS X threading:
  2803. * Not thread safe
  2804. *
  2805. * Parameters:
  2806. *
  2807. * inGroup:
  2808. * The group whose owner to retrieve.
  2809. *
  2810. * Availability:
  2811. * Mac OS X: in version 10.0 and later in Carbon.framework
  2812. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  2813. * Non-Carbon CFM: not available
  2814. }
  2815. function GetWindowGroupOwner( inGroup: WindowGroupRef ): WindowRef; external name '_GetWindowGroupOwner';
  2816. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2817. {
  2818. * SetWindowGroupOwner()
  2819. *
  2820. * Summary:
  2821. * Sets the window that owns a window group.
  2822. *
  2823. * Discussion:
  2824. * The group and the window must have the same parent group.
  2825. * SetWindowGroupOwner currently requires that the group have no
  2826. * windows in it.
  2827. *
  2828. * Mac OS X threading:
  2829. * Not thread safe
  2830. *
  2831. * Parameters:
  2832. *
  2833. * inGroup:
  2834. * The group whose owner to set.
  2835. *
  2836. * inWindow:
  2837. * The group's new owner.
  2838. *
  2839. * Availability:
  2840. * Mac OS X: in version 10.0 and later in Carbon.framework
  2841. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  2842. * Non-Carbon CFM: not available
  2843. }
  2844. function SetWindowGroupOwner( inGroup: WindowGroupRef; inWindow: WindowRef ): OSStatus; external name '_SetWindowGroupOwner';
  2845. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2846. {----------------------------------------------------------------------------------}
  2847. { ¥ Inspection of group contents }
  2848. {----------------------------------------------------------------------------------}
  2849. {
  2850. * CountWindowGroupContents()
  2851. *
  2852. * Summary:
  2853. * Counts the windows or groups contained in a group.
  2854. *
  2855. * Mac OS X threading:
  2856. * Not thread safe
  2857. *
  2858. * Parameters:
  2859. *
  2860. * inGroup:
  2861. * The group whose contents to count.
  2862. *
  2863. * inOptions:
  2864. * Specifies how to count the groupÕs contents.
  2865. *
  2866. * Availability:
  2867. * Mac OS X: in version 10.0 and later in Carbon.framework
  2868. * CarbonLib: in CarbonLib 1.4 and later
  2869. * Non-Carbon CFM: not available
  2870. }
  2871. function CountWindowGroupContents( inGroup: WindowGroupRef; inOptions: WindowGroupContentOptions ): ItemCount; external name '_CountWindowGroupContents';
  2872. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2873. {
  2874. * GetWindowGroupContents()
  2875. *
  2876. * Summary:
  2877. * Retrieves the windows or groups contained in a group.
  2878. *
  2879. * Discussion:
  2880. * The windows or groups returned by this API will be placed into
  2881. * the output buffer in z-order, from highest to lowest.
  2882. *
  2883. * Mac OS X threading:
  2884. * Not thread safe
  2885. *
  2886. * Parameters:
  2887. *
  2888. * inGroup:
  2889. * The group whose contents to retrieve.
  2890. *
  2891. * inOptions:
  2892. * Specifies which content to retrieve.
  2893. *
  2894. * inAllowedItems:
  2895. * The number of items that will fit in the output buffer.
  2896. *
  2897. * outNumItems:
  2898. * On exit, the number of items that were returned. May be NULL.
  2899. *
  2900. * outItems:
  2901. * On entry, points to enough memory to hold inAllowedSize
  2902. * WindowRefs or WindowGroupRefs. On exit, contains *outNumItems
  2903. * WindowRefs or WindowGroupRefs.
  2904. *
  2905. * Availability:
  2906. * Mac OS X: in version 10.0 and later in Carbon.framework
  2907. * CarbonLib: in CarbonLib 1.4 and later
  2908. * Non-Carbon CFM: not available
  2909. }
  2910. function GetWindowGroupContents( inGroup: WindowGroupRef; inOptions: WindowGroupContentOptions; inAllowedItems: ItemCount; outNumItems: ItemCountPtr { can be NULL }; var outItems: UnivPtr ): OSStatus; external name '_GetWindowGroupContents';
  2911. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2912. {
  2913. * GetIndexedWindow()
  2914. *
  2915. * Summary:
  2916. * Retrieves a specified window from a group.
  2917. *
  2918. * Discussion:
  2919. * GetIndexedWindow is provided as an easier way to get a particular
  2920. * window from a group than using GetWindowGroupContents. If you
  2921. * only need to retrieve, say, the last window in a group, it is
  2922. * easier and more efficient to use GetIndexedWindow. If you need to
  2923. * retrieve all the windows in a group, it is more efficient to use
  2924. * GetWindowGroupContents.
  2925. *
  2926. * Mac OS X threading:
  2927. * Not thread safe
  2928. *
  2929. * Parameters:
  2930. *
  2931. * inGroup:
  2932. * The group containing the window to retrieve.
  2933. *
  2934. * inIndex:
  2935. * The index of the window. This parameter may range from 1 to
  2936. * CountWindowGroupContents( inGroup,
  2937. * kWindowGroupContentsReturnWindows | inOptions );
  2938. *
  2939. * inOptions:
  2940. * Indicates how to locate the specified window.
  2941. * kWindowGroupContentsReturnWindows is implied by this API and
  2942. * does not need to be explicitly specified.
  2943. *
  2944. * outWindow:
  2945. * On exit, the window at the specified index.
  2946. *
  2947. * Availability:
  2948. * Mac OS X: in version 10.0 and later in Carbon.framework
  2949. * CarbonLib: in CarbonLib 1.4 and later
  2950. * Non-Carbon CFM: not available
  2951. }
  2952. function GetIndexedWindow( inGroup: WindowGroupRef; inIndex: UInt32; inOptions: WindowGroupContentOptions; var outWindow: WindowRef ): OSStatus; external name '_GetIndexedWindow';
  2953. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2954. {
  2955. * GetWindowIndex()
  2956. *
  2957. * Summary:
  2958. * Retrieves the z-order index of a window inside a group.
  2959. *
  2960. * Discussion:
  2961. * The z-order index of a window is its relative position in z-order
  2962. * inside a group. The index ranges from 1 to the number of windows
  2963. * in the group.
  2964. *
  2965. * Mac OS X threading:
  2966. * Not thread safe
  2967. *
  2968. * Parameters:
  2969. *
  2970. * inWindow:
  2971. * The window whose z-order index to retrieve.
  2972. *
  2973. * inStartGroup:
  2974. * The group on which to base the z-order index. This should be
  2975. * either the containing group of the window, or NULL. If NULL,
  2976. * this API returns the z-order index of the window across the
  2977. * entire process.
  2978. *
  2979. * inOptions:
  2980. * Indicates how to enumerate the specified window.
  2981. * kWindowGroupContentsReturnWindows is implied by this API and
  2982. * does not need to be explicitly specified.
  2983. *
  2984. * outIndex:
  2985. * On exit, contains the windowÕs z-order index.
  2986. *
  2987. * Availability:
  2988. * Mac OS X: in version 10.0 and later in Carbon.framework
  2989. * CarbonLib: in CarbonLib 1.4 and later
  2990. * Non-Carbon CFM: not available
  2991. }
  2992. function GetWindowIndex( inWindow: WindowRef; inStartGroup: WindowGroupRef; inOptions: WindowGroupContentOptions; var outIndex: UInt32 ): OSStatus; external name '_GetWindowIndex';
  2993. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2994. {----------------------------------------------------------------------------------}
  2995. { ¥ÊWindow activation }
  2996. {----------------------------------------------------------------------------------}
  2997. {
  2998. * ActiveNonFloatingWindow()
  2999. *
  3000. * Summary:
  3001. * Returns the window, among all windows with activation scope of
  3002. * kWindowActivationScopeAll, that is considered active.
  3003. *
  3004. * Discussion:
  3005. * The Mac OS 8.5 Window Manager introduced the
  3006. * FrontNonFloatingWindow API, which was designed to return the
  3007. * window that should be considered active by the application. With
  3008. * the advent of window groups, it is now possible to have a window
  3009. * that looks active (is highlighted, and accepts keyboard input)
  3010. * but to have other non-floating windows grouped above the active
  3011. * window. The ActiveNonFloatingWindow API returns the active window
  3012. * regardless of where it is positioned in the z-order. Most code
  3013. * that currently uses FrontNonFloatingWindow or
  3014. * GetFrontWindowOfClass(kDocumentWindowClass) to get the active
  3015. * window should use ActiveNonFloatingWindow instead.
  3016. *
  3017. * Mac OS X threading:
  3018. * Not thread safe
  3019. *
  3020. * Availability:
  3021. * Mac OS X: in version 10.0 and later in Carbon.framework
  3022. * CarbonLib: in CarbonLib 1.4 and later
  3023. * Non-Carbon CFM: not available
  3024. }
  3025. function ActiveNonFloatingWindow: WindowRef; external name '_ActiveNonFloatingWindow';
  3026. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3027. {
  3028. * IsWindowActive()
  3029. *
  3030. * Summary:
  3031. * Indicates whether a window is active.
  3032. *
  3033. * Discussion:
  3034. * The active state of a window is simply determined by whether its
  3035. * window frame is drawn using an active appearance. This does not
  3036. * indicate whether the window has keyboard focus. To get the window
  3037. * with keyboard focus, use GetUserFocusWindow().
  3038. *
  3039. * Mac OS X threading:
  3040. * Not thread safe
  3041. *
  3042. * Parameters:
  3043. *
  3044. * inWindow:
  3045. * The window whose active state to retrieve.
  3046. *
  3047. * Availability:
  3048. * Mac OS X: in version 10.0 and later in Carbon.framework
  3049. * CarbonLib: in CarbonLib 1.4 and later
  3050. * Non-Carbon CFM: not available
  3051. }
  3052. function IsWindowActive( inWindow: WindowRef ): Boolean; external name '_IsWindowActive';
  3053. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3054. {
  3055. * ActivateWindow()
  3056. *
  3057. * Summary:
  3058. * Activates or deactivates a window.
  3059. *
  3060. * Discussion:
  3061. * Window activation consists of two steps: hiliting the window
  3062. * frame and sending an activate event to the window. ActivateWindow
  3063. * handles both of these steps and also updates internal Window
  3064. * Manager state. If you just need to hilite the window frame, you
  3065. * may use HiliteWindow. If you need to send an activate event, you
  3066. * should always use ActivateWindow rather than creating and sending
  3067. * the event yourself.
  3068. *
  3069. * Mac OS X threading:
  3070. * Not thread safe
  3071. *
  3072. * Parameters:
  3073. *
  3074. * inWindow:
  3075. * The window to activate or deactivate.
  3076. *
  3077. * inActivate:
  3078. * Whether to activate or deactivate the window.
  3079. *
  3080. * Availability:
  3081. * Mac OS X: in version 10.0 and later in Carbon.framework
  3082. * CarbonLib: in CarbonLib 1.4 and later
  3083. * Non-Carbon CFM: not available
  3084. }
  3085. function ActivateWindow( inWindow: WindowRef; inActivate: Boolean ): OSStatus; external name '_ActivateWindow';
  3086. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3087. {
  3088. * GetWindowActivationScope()
  3089. *
  3090. * Summary:
  3091. * Retrieves a windowÕs activation scope.
  3092. *
  3093. * Mac OS X threading:
  3094. * Not thread safe
  3095. *
  3096. * Parameters:
  3097. *
  3098. * inWindow:
  3099. * The window whose activation scope to retrieve.
  3100. *
  3101. * outScope:
  3102. * On exit, the windowÕs activation scope.
  3103. *
  3104. * Availability:
  3105. * Mac OS X: in version 10.0 and later in Carbon.framework
  3106. * CarbonLib: in CarbonLib 1.4 and later
  3107. * Non-Carbon CFM: not available
  3108. }
  3109. function GetWindowActivationScope( inWindow: WindowRef; var outScope: WindowActivationScope ): OSStatus; external name '_GetWindowActivationScope';
  3110. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3111. {
  3112. * SetWindowActivationScope()
  3113. *
  3114. * Summary:
  3115. * Sets a windowÕs activation scope.
  3116. *
  3117. * Mac OS X threading:
  3118. * Not thread safe
  3119. *
  3120. * Parameters:
  3121. *
  3122. * inWindow:
  3123. * The window whose activation scope to set.
  3124. *
  3125. * inScope:
  3126. * The new activation scope.
  3127. *
  3128. * Availability:
  3129. * Mac OS X: in version 10.0 and later in Carbon.framework
  3130. * CarbonLib: in CarbonLib 1.4 and later
  3131. * Non-Carbon CFM: not available
  3132. }
  3133. function SetWindowActivationScope( inWindow: WindowRef; inScope: WindowActivationScope ): OSStatus; external name '_SetWindowActivationScope';
  3134. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3135. {----------------------------------------------------------------------------------}
  3136. { ¥ÊDebugging Utilities }
  3137. {----------------------------------------------------------------------------------}
  3138. {
  3139. * DebugPrintWindowGroup()
  3140. *
  3141. * Summary:
  3142. * Prints the contents of a window group to stdout.
  3143. *
  3144. * Mac OS X threading:
  3145. * Not thread safe
  3146. *
  3147. * Parameters:
  3148. *
  3149. * inGroup:
  3150. * The group whose contents to print.
  3151. *
  3152. * Availability:
  3153. * Mac OS X: in version 10.0 and later in Carbon.framework
  3154. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  3155. * Non-Carbon CFM: not available
  3156. }
  3157. procedure DebugPrintWindowGroup( inGroup: WindowGroupRef ); external name '_DebugPrintWindowGroup';
  3158. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3159. {
  3160. * DebugPrintAllWindowGroups()
  3161. *
  3162. * Summary:
  3163. * Prints the full window group hierarchy, starting at the root
  3164. * group.
  3165. *
  3166. * Mac OS X threading:
  3167. * Not thread safe
  3168. *
  3169. * Availability:
  3170. * Mac OS X: in version 10.0 and later in Carbon.framework
  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. procedure DebugPrintAllWindowGroups; external name '_DebugPrintAllWindowGroups';
  3175. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3176. {----------------------------------------------------------------------------------}
  3177. { ¥ÊThemeBrush and ThemeTextColor support }
  3178. {----------------------------------------------------------------------------------}
  3179. {
  3180. * SetThemeWindowBackground()
  3181. *
  3182. * Mac OS X threading:
  3183. * Not thread safe
  3184. *
  3185. * Availability:
  3186. * Mac OS X: in version 10.0 and later in Carbon.framework
  3187. * CarbonLib: in CarbonLib 1.0 and later
  3188. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  3189. }
  3190. function SetThemeWindowBackground( inWindow: WindowRef; inBrush: ThemeBrush; inUpdate: Boolean ): OSStatus; external name '_SetThemeWindowBackground';
  3191. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3192. {
  3193. * SetThemeTextColorForWindow()
  3194. *
  3195. * Summary:
  3196. * Sets a text color which contrasts with a theme brush.
  3197. *
  3198. * Discussion:
  3199. * SetThemeTextColorForWindow sets a text color in the specified
  3200. * window's port which contrasts with the specified brush and also
  3201. * matches the inActive parameter. Only a subset of the theme
  3202. * brushes have theme text colors: currently (as of Mac OS 9 and Mac
  3203. * OS X 10.1), the Alert, Dialog, ModelessDialog, and Notification
  3204. * brushes have corresponding text colors. For any other brush,
  3205. * SetThemeTextColorForWindow returns themeNoAppropriateBrushErr and
  3206. * does not modify the text color.
  3207. *
  3208. * Mac OS X threading:
  3209. * Not thread safe
  3210. *
  3211. * Parameters:
  3212. *
  3213. * inWindow:
  3214. * The window whose text color to change.
  3215. *
  3216. * inActive:
  3217. * Whether the text color should indicate an active or inactive
  3218. * state.
  3219. *
  3220. * inDepth:
  3221. * The bit depth of the window's port.
  3222. *
  3223. * inColorDev:
  3224. * Whether the window's port is color or black&white.
  3225. *
  3226. * Result:
  3227. * An operating system result code, including
  3228. * themeNoAppropriateBrushErr if the specified theme brush does not
  3229. * have a corresponding theme text color.
  3230. *
  3231. * Availability:
  3232. * Mac OS X: in version 10.0 and later in Carbon.framework
  3233. * CarbonLib: in CarbonLib 1.0 and later
  3234. * Non-Carbon CFM: in AppearanceLib 1.1 and later
  3235. }
  3236. function SetThemeTextColorForWindow( inWindow: WindowRef; inActive: Boolean; inDepth: SInt16; inColorDev: Boolean ): OSStatus; external name '_SetThemeTextColorForWindow';
  3237. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3238. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3239. { ¥ Background Image }
  3240. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3241. { SetWinColor is not available in Carbon.}
  3242. {
  3243. * SetWinColor()
  3244. *
  3245. * Availability:
  3246. * Mac OS X: not available
  3247. * CarbonLib: not available
  3248. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3249. }
  3250. { SetDeskCPat is not available in Carbon.}
  3251. {
  3252. * SetDeskCPat()
  3253. *
  3254. * Availability:
  3255. * Mac OS X: not available
  3256. * CarbonLib: not available
  3257. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3258. }
  3259. {
  3260. Routines available from Mac OS 8.5 forward
  3261. or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
  3262. }
  3263. {
  3264. * SetWindowContentColor()
  3265. *
  3266. * Mac OS X threading:
  3267. * Not thread safe
  3268. *
  3269. * Availability:
  3270. * Mac OS X: in version 10.0 and later in Carbon.framework
  3271. * CarbonLib: in CarbonLib 1.0 and later
  3272. * Non-Carbon CFM: in WindowsLib 8.5 and later
  3273. }
  3274. function SetWindowContentColor( window: WindowRef; const (*var*) color: RGBColor ): OSStatus; external name '_SetWindowContentColor';
  3275. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3276. {
  3277. * GetWindowContentColor()
  3278. *
  3279. * Mac OS X threading:
  3280. * Not thread safe
  3281. *
  3282. * Availability:
  3283. * Mac OS X: in version 10.0 and later in Carbon.framework
  3284. * CarbonLib: in CarbonLib 1.0 and later
  3285. * Non-Carbon CFM: in WindowsLib 8.5 and later
  3286. }
  3287. function GetWindowContentColor( window: WindowRef; var color: RGBColor ): OSStatus; external name '_GetWindowContentColor';
  3288. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3289. { Routines available from Mac OS 8.5 forward}
  3290. {
  3291. * GetWindowContentPattern()
  3292. *
  3293. * Mac OS X threading:
  3294. * Not thread safe
  3295. *
  3296. * Availability:
  3297. * Mac OS X: in version 10.0 and later in Carbon.framework
  3298. * CarbonLib: in CarbonLib 1.0 and later
  3299. * Non-Carbon CFM: in WindowsLib 8.5 and later
  3300. }
  3301. function GetWindowContentPattern( window: WindowRef; outPixPat: PixPatHandle ): OSStatus; external name '_GetWindowContentPattern';
  3302. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3303. {
  3304. * SetWindowContentPattern()
  3305. *
  3306. * Mac OS X threading:
  3307. * Not thread safe
  3308. *
  3309. * Availability:
  3310. * Mac OS X: in version 10.0 and later in Carbon.framework
  3311. * CarbonLib: in CarbonLib 1.0 and later
  3312. * Non-Carbon CFM: in WindowsLib 8.5 and later
  3313. }
  3314. function SetWindowContentPattern( window: WindowRef; pixPat: PixPatHandle ): OSStatus; external name '_SetWindowContentPattern';
  3315. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3316. { Routines available from Mac OS 9.0 forward}
  3317. type
  3318. WindowPaintProcOptions = OptionBits;
  3319. const
  3320. kWindowPaintProcOptionsNone = 0;
  3321. {
  3322. * InstallWindowContentPaintProc()
  3323. *
  3324. * Mac OS X threading:
  3325. * Not thread safe
  3326. *
  3327. * Availability:
  3328. * Mac OS X: in version 10.0 and later in Carbon.framework
  3329. * CarbonLib: in CarbonLib 1.0 and later
  3330. * Non-Carbon CFM: in WindowsLib 9.0 and later
  3331. }
  3332. function InstallWindowContentPaintProc( window: WindowRef; paintProc: WindowPaintUPP; options: WindowPaintProcOptions; refCon: UnivPtr { can be NULL } ): OSStatus; external name '_InstallWindowContentPaintProc';
  3333. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3334. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3335. { ¥ Scrolling Routines }
  3336. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3337. type
  3338. ScrollWindowOptions = UInt32;
  3339. const
  3340. kScrollWindowNoOptions = 0;
  3341. kScrollWindowInvalidate = 1 shl 0; { add the exposed area to the windowÕs update region}
  3342. kScrollWindowEraseToPortBackground = 1 shl 1; { erase the exposed area using the background color/pattern of the windowÕs grafport}
  3343. { Routines available from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward}
  3344. {
  3345. * ScrollWindowRect()
  3346. *
  3347. * Mac OS X threading:
  3348. * Not thread safe
  3349. *
  3350. * Availability:
  3351. * Mac OS X: in version 10.0 and later in Carbon.framework
  3352. * CarbonLib: in CarbonLib 1.0 and later
  3353. * Non-Carbon CFM: not available
  3354. }
  3355. function ScrollWindowRect( inWindow: WindowRef; const (*var*) inScrollRect: Rect; inHPixels: SInt16; inVPixels: SInt16; inOptions: ScrollWindowOptions; outExposedRgn: RgnHandle { can be NULL } ): OSStatus; external name '_ScrollWindowRect';
  3356. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3357. {
  3358. * ScrollWindowRegion()
  3359. *
  3360. * Mac OS X threading:
  3361. * Not thread safe
  3362. *
  3363. * Availability:
  3364. * Mac OS X: in version 10.0 and later in Carbon.framework
  3365. * CarbonLib: in CarbonLib 1.0 and later
  3366. * Non-Carbon CFM: not available
  3367. }
  3368. function ScrollWindowRegion( inWindow: WindowRef; inScrollRgn: RgnHandle; inHPixels: SInt16; inVPixels: SInt16; inOptions: ScrollWindowOptions; outExposedRgn: RgnHandle { can be NULL } ): OSStatus; external name '_ScrollWindowRegion';
  3369. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3370. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3371. { ¥ Low-Level Region & Painting Routines }
  3372. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3373. {
  3374. * ClipAbove()
  3375. *
  3376. * Mac OS X threading:
  3377. * Not thread safe
  3378. *
  3379. * Availability:
  3380. * Mac OS X: in version 10.0 and later in Carbon.framework
  3381. * CarbonLib: in CarbonLib 1.0 and later
  3382. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3383. }
  3384. procedure ClipAbove( window: WindowRef ); external name '_ClipAbove';
  3385. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3386. { SaveOld/DrawNew are not available in Carbon. Use ReshapeCustomWindow instead.}
  3387. {
  3388. * SaveOld()
  3389. *
  3390. * Availability:
  3391. * Mac OS X: not available
  3392. * CarbonLib: not available
  3393. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3394. }
  3395. {
  3396. * DrawNew()
  3397. *
  3398. * Availability:
  3399. * Mac OS X: not available
  3400. * CarbonLib: not available
  3401. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3402. }
  3403. {
  3404. * PaintOne()
  3405. *
  3406. * Mac OS X threading:
  3407. * Not thread safe
  3408. *
  3409. * Availability:
  3410. * Mac OS X: in version 10.0 and later in Carbon.framework
  3411. * CarbonLib: in CarbonLib 1.0 and later
  3412. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3413. }
  3414. procedure PaintOne( window: WindowRef { can be NULL }; clobberedRgn: RgnHandle ); external name '_PaintOne';
  3415. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3416. {
  3417. * PaintBehind()
  3418. *
  3419. * Mac OS X threading:
  3420. * Not thread safe
  3421. *
  3422. * Availability:
  3423. * Mac OS X: in version 10.0 and later in Carbon.framework
  3424. * CarbonLib: in CarbonLib 1.0 and later
  3425. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3426. }
  3427. procedure PaintBehind( startWindow: WindowRef { can be NULL }; clobberedRgn: RgnHandle ); external name '_PaintBehind';
  3428. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3429. {
  3430. * CalcVis()
  3431. *
  3432. * Mac OS X threading:
  3433. * Not thread safe
  3434. *
  3435. * Availability:
  3436. * Mac OS X: in version 10.0 and later in Carbon.framework
  3437. * CarbonLib: in CarbonLib 1.0 and later
  3438. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3439. }
  3440. procedure CalcVis( window: WindowRef ); external name '_CalcVis';
  3441. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3442. {
  3443. * CalcVisBehind()
  3444. *
  3445. * Mac OS X threading:
  3446. * Not thread safe
  3447. *
  3448. * Availability:
  3449. * Mac OS X: in version 10.0 and later in Carbon.framework
  3450. * CarbonLib: in CarbonLib 1.0 and later
  3451. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3452. }
  3453. procedure CalcVisBehind( startWindow: WindowRef { can be NULL }; clobberedRgn: RgnHandle ); external name '_CalcVisBehind';
  3454. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3455. {
  3456. * CheckUpdate()
  3457. *
  3458. * Mac OS X threading:
  3459. * Not thread safe
  3460. *
  3461. * Availability:
  3462. * Mac OS X: in version 10.0 and later in Carbon.framework
  3463. * CarbonLib: in CarbonLib 1.0 and later
  3464. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3465. }
  3466. function CheckUpdate( var theEvent: EventRecord ): Boolean; external name '_CheckUpdate';
  3467. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3468. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3469. { ¥ Window List }
  3470. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3471. {
  3472. * [Mac]FindWindow()
  3473. *
  3474. * Mac OS X threading:
  3475. * Not thread safe
  3476. *
  3477. * Availability:
  3478. * Mac OS X: in version 10.0 and later in Carbon.framework
  3479. * CarbonLib: in CarbonLib 1.0 and later
  3480. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3481. }
  3482. function FindWindow( thePoint: Point; var window: WindowRef ): WindowPartCode; external name '_FindWindow';
  3483. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3484. function MacFindWindow( thePoint: Point; var window: WindowRef ): WindowPartCode; external name '_FindWindow';
  3485. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3486. {
  3487. * FrontWindow()
  3488. *
  3489. * Summary:
  3490. * Returns the frontmost visible window in the window list.
  3491. *
  3492. * Discussion:
  3493. * The frontmost visible window is not necessarily a document or
  3494. * dialog window, or even a window created by your application. For
  3495. * example, it may be a menu window, a Text Services Manager
  3496. * bottom-line input window, a help tag, or a floating window. If
  3497. * your code needs the frontmost document or dialog window, use the
  3498. * ActiveNonFloatingWindow or FrontNonFloatingWindow APIs instead of
  3499. * FrontWindow. For compatibility with existing applications,
  3500. * FrontWindow ignores all windows of class kMenuBarWindowClass and
  3501. * instead returns the frontmost visible window behind the menubar.
  3502. *
  3503. * Mac OS X threading:
  3504. * Not thread safe
  3505. *
  3506. * Result:
  3507. * The frontmost visible window, or NULL if no windows are visible.
  3508. *
  3509. * Availability:
  3510. * Mac OS X: in version 10.0 and later in Carbon.framework
  3511. * CarbonLib: in CarbonLib 1.0 and later
  3512. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3513. }
  3514. function FrontWindow: WindowRef; external name '_FrontWindow';
  3515. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3516. {
  3517. * BringToFront()
  3518. *
  3519. * Mac OS X threading:
  3520. * Not thread safe
  3521. *
  3522. * Availability:
  3523. * Mac OS X: in version 10.0 and later in Carbon.framework
  3524. * CarbonLib: in CarbonLib 1.0 and later
  3525. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3526. }
  3527. procedure BringToFront( window: WindowRef ); external name '_BringToFront';
  3528. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3529. {
  3530. * SendBehind()
  3531. *
  3532. * Mac OS X threading:
  3533. * Not thread safe
  3534. *
  3535. * Availability:
  3536. * Mac OS X: in version 10.0 and later in Carbon.framework
  3537. * CarbonLib: in CarbonLib 1.0 and later
  3538. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3539. }
  3540. procedure SendBehind( window: WindowRef; behindWindow: WindowRef ); external name '_SendBehind';
  3541. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3542. {
  3543. * SelectWindow()
  3544. *
  3545. * Mac OS X threading:
  3546. * Not thread safe
  3547. *
  3548. * Availability:
  3549. * Mac OS X: in version 10.0 and later in Carbon.framework
  3550. * CarbonLib: in CarbonLib 1.0 and later
  3551. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3552. }
  3553. procedure SelectWindow( window: WindowRef ); external name '_SelectWindow';
  3554. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3555. {
  3556. Routines available from Mac OS 8.6 forward
  3557. or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
  3558. }
  3559. {
  3560. * FrontNonFloatingWindow()
  3561. *
  3562. * Mac OS X threading:
  3563. * Not thread safe
  3564. *
  3565. * Availability:
  3566. * Mac OS X: in version 10.0 and later in Carbon.framework
  3567. * CarbonLib: in CarbonLib 1.0 and later
  3568. * Non-Carbon CFM: in WindowsLib 8.5 and later
  3569. }
  3570. function FrontNonFloatingWindow: WindowRef; external name '_FrontNonFloatingWindow';
  3571. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3572. { Routines available from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward}
  3573. {
  3574. * GetNextWindowOfClass()
  3575. *
  3576. * Mac OS X threading:
  3577. * Not thread safe
  3578. *
  3579. * Availability:
  3580. * Mac OS X: in version 10.0 and later in Carbon.framework
  3581. * CarbonLib: in CarbonLib 1.0 and later
  3582. * Non-Carbon CFM: not available
  3583. }
  3584. function GetNextWindowOfClass( inWindow: WindowRef; inWindowClass: WindowClass; mustBeVisible: Boolean ): WindowRef; external name '_GetNextWindowOfClass';
  3585. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3586. {
  3587. * GetFrontWindowOfClass()
  3588. *
  3589. * Mac OS X threading:
  3590. * Not thread safe
  3591. *
  3592. * Availability:
  3593. * Mac OS X: in version 10.0 and later in Carbon.framework
  3594. * CarbonLib: in CarbonLib 1.0 and later
  3595. * Non-Carbon CFM: not available
  3596. }
  3597. function GetFrontWindowOfClass( inWindowClass: WindowClass; mustBeVisible: Boolean ): WindowRef; external name '_GetFrontWindowOfClass';
  3598. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3599. {
  3600. * FindWindowOfClass()
  3601. *
  3602. * Mac OS X threading:
  3603. * Not thread safe
  3604. *
  3605. * Availability:
  3606. * Mac OS X: in version 10.0 and later in Carbon.framework
  3607. * CarbonLib: in CarbonLib 1.0 and later
  3608. * Non-Carbon CFM: not available
  3609. }
  3610. function FindWindowOfClass( const (*var*) where: Point; inWindowClass: WindowClass; var outWindow: WindowRef; outWindowPart: WindowPartCodePtr { can be NULL } ): OSStatus; external name '_FindWindowOfClass';
  3611. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3612. {
  3613. * Summary:
  3614. * Options for the CreateStandardWindowMenu API.
  3615. }
  3616. const
  3617. {
  3618. * Requests the standard window menu include a Rotate Windows menu
  3619. * item. Available in Mac OS X 10.2.
  3620. }
  3621. kWindowMenuIncludeRotate = 1 shl 0;
  3622. {
  3623. * CreateStandardWindowMenu()
  3624. *
  3625. * Discussion:
  3626. * Creates a standard Window menu for your application. You can call
  3627. * this to create a window menu for your application. Once you have
  3628. * the menu, you need to insert it in your menu bar (typically at
  3629. * the end of your menu list) with a call to InsertMenu. To register
  3630. * a window to be tracked by this menu, you either create your
  3631. * window with CreateNewWindow, passing the
  3632. * kWindowInWindowMenuAttribute, or you can use
  3633. * ChangeWindowAttributes after the window is created. The Toolbox
  3634. * takes care of acting on the standard items such as zoom and
  3635. * minimize, as well as bringing selected windows to the front. All
  3636. * you need to do is install it and register your windows and the
  3637. * Toolbox does the rest.
  3638. *
  3639. * You may also add your own menu items to the standard window menu.
  3640. * To do this, we recommend that you use the
  3641. * GetIndMenuItemWithCommandID API to locate one of the standard
  3642. * menu items in the menu which is immediately above or below the
  3643. * location where you wish to insert your items. Then insert your
  3644. * items relative to the position of the standard menu item. Do not
  3645. * attempt to search the menu items yourself without calling
  3646. * GetIndMenuItemWithCommandID; in Mac OS X 10.2,
  3647. * CreateStandardWindowMenu returns an initially empty menu which is
  3648. * populated later when the menu is displayed or when
  3649. * GetIndMenuItemWithCommandID is called, so you will find no items
  3650. * in the menu unless you first call GetIndMenuItemWithCommandID.
  3651. *
  3652. * There is a known bug in all versions of CarbonLib which causes
  3653. * the Zoom, Collapse, and Uncollapse menu items in the standard
  3654. * window menu to be non-functional for windows created by the
  3655. * Dialog Manager. To work around this bug, you can install your own
  3656. * event handlers on the dialog window for kEventWindowZoom,
  3657. * kEventWindowCollapse, and kEventWindowExpand, and handle the
  3658. * event by calling the appropriate Window Manager API.
  3659. *
  3660. * Mac OS X threading:
  3661. * Not thread safe
  3662. *
  3663. * Parameters:
  3664. *
  3665. * inOptions:
  3666. * Requests optional behavior of the standard window menu. Mac OS
  3667. * X 10.2 supports the kWindowMenuIncludeRotate option; in earlier
  3668. * versions of Mac OS X, and in CarbonLib, you must pass zero for
  3669. * this parameter.
  3670. *
  3671. * outMenu:
  3672. * Receives a new menu reference which contains the standard
  3673. * window menu items and commands.
  3674. *
  3675. * Result:
  3676. * An operating system status code.
  3677. *
  3678. * Availability:
  3679. * Mac OS X: in version 10.0 and later in Carbon.framework
  3680. * CarbonLib: in CarbonLib 1.1 and later
  3681. * Non-Carbon CFM: not available
  3682. }
  3683. function CreateStandardWindowMenu( inOptions: OptionBits; var outMenu: MenuRef ): OSStatus; external name '_CreateStandardWindowMenu';
  3684. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3685. {
  3686. * SetWindowAlternateTitle()
  3687. *
  3688. * Discussion:
  3689. * This API sets an alternate title for a window. The alternate
  3690. * title overrides what is displayed in the Window menu. If you do
  3691. * not set an alternate title, the normal window title is used. You
  3692. * would normally use this if the window title was not expressive
  3693. * enough to be used in the Window menu (or similar text-only
  3694. * situation).
  3695. *
  3696. * Mac OS X threading:
  3697. * Not thread safe
  3698. *
  3699. * Parameters:
  3700. *
  3701. * inWindow:
  3702. * The window to set the alternate title.
  3703. *
  3704. * inTitle:
  3705. * The alternate title for the window. Passing NULL for this
  3706. * parameter will remove any alternate title that might be present.
  3707. *
  3708. * Result:
  3709. * An operating system status code.
  3710. *
  3711. * Availability:
  3712. * Mac OS X: in version 10.0 and later in Carbon.framework
  3713. * CarbonLib: in CarbonLib 1.1 and later
  3714. * Non-Carbon CFM: not available
  3715. }
  3716. function SetWindowAlternateTitle( inWindow: WindowRef; inTitle: CFStringRef ): OSStatus; external name '_SetWindowAlternateTitle';
  3717. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3718. {
  3719. * CopyWindowAlternateTitle()
  3720. *
  3721. * Discussion:
  3722. * This API gets the alternate title for a window. See the
  3723. * discussion of SetWindowAlternateTitle for more info.
  3724. *
  3725. * Mac OS X threading:
  3726. * Not thread safe
  3727. *
  3728. * Parameters:
  3729. *
  3730. * inWindow:
  3731. * The window to get the alternate title from.
  3732. *
  3733. * outTitle:
  3734. * Receives the alternate title for the window. If the window does
  3735. * not have an alternate title, NULL will be returned in outTitle.
  3736. *
  3737. * Result:
  3738. * An operating system status code.
  3739. *
  3740. * Availability:
  3741. * Mac OS X: in version 10.0 and later in Carbon.framework
  3742. * CarbonLib: in CarbonLib 1.1 and later
  3743. * Non-Carbon CFM: not available
  3744. }
  3745. function CopyWindowAlternateTitle( inWindow: WindowRef; var outTitle: CFStringRef ): OSStatus; external name '_CopyWindowAlternateTitle';
  3746. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3747. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3748. { ¥ Misc Low-Level stuff }
  3749. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3750. {
  3751. * InitWindows()
  3752. *
  3753. * Availability:
  3754. * Mac OS X: not available
  3755. * CarbonLib: not available
  3756. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3757. }
  3758. { The window manager port does not exist in Carbon. }
  3759. { We are investigating replacement technologies. }
  3760. {
  3761. * GetWMgrPort()
  3762. *
  3763. * Availability:
  3764. * Mac OS X: not available
  3765. * CarbonLib: not available
  3766. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3767. }
  3768. {
  3769. * GetCWMgrPort()
  3770. *
  3771. * Availability:
  3772. * Mac OS X: not available
  3773. * CarbonLib: not available
  3774. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3775. }
  3776. {
  3777. Routines available from Mac OS 8.5 forward
  3778. or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
  3779. }
  3780. {
  3781. * IsValidWindowPtr()
  3782. *
  3783. * Mac OS X threading:
  3784. * Not thread safe
  3785. *
  3786. * Availability:
  3787. * Mac OS X: in version 10.0 and later in Carbon.framework
  3788. * CarbonLib: in CarbonLib 1.0 and later
  3789. * Non-Carbon CFM: in WindowsLib 8.5 and later
  3790. }
  3791. function IsValidWindowPtr( possibleWindow: WindowRef ): Boolean; external name '_IsValidWindowPtr';
  3792. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3793. function IsValidWindowRef__NAME__IsValidWindowPtr( possibleWindow: WindowRef ): Boolean; external name '_IsValidWindowRef__NAME__IsValidWindowPtr';
  3794. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3795. {
  3796. Routines available from Mac OS 8.6 forward
  3797. InitFloatingWindows is not available in Carbon;
  3798. window ordering is always active for Carbon clients
  3799. }
  3800. {
  3801. * InitFloatingWindows()
  3802. *
  3803. * Availability:
  3804. * Mac OS X: not available
  3805. * CarbonLib: not available
  3806. * Non-Carbon CFM: in WindowsLib 8.5 and later
  3807. }
  3808. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3809. { ¥ Various & Sundry Window Accessors }
  3810. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3811. {
  3812. * HiliteWindow()
  3813. *
  3814. * Summary:
  3815. * Hilites or unhilites a window's frame.
  3816. *
  3817. * Discussion:
  3818. * Hiliting a window's frame is not the same as activating the
  3819. * window. A window's hilited state determines whether the window
  3820. * draws its titlebar and associated widgets as if they were the
  3821. * frontmost window of its window group, whereas a window's active
  3822. * state determines whether the window really is the frontmost
  3823. * window of its window group. Activating or deactivating a window
  3824. * automatically adjusts a window's hilited state to match.
  3825. *
  3826. * In general, only very old compatibility code would ever need or
  3827. * want to manually modify a window's hilited state via the
  3828. * HiliteWindow API. Modern clients can typically avoid this API
  3829. * entirely.
  3830. *
  3831. * Mac OS X threading:
  3832. * Not thread safe
  3833. *
  3834. * Parameters:
  3835. *
  3836. * window:
  3837. * The window whose frame you wish to hilite/unhilite.
  3838. *
  3839. * fHilite:
  3840. * Whether to hilite or unhilite the window's frame.
  3841. *
  3842. * Availability:
  3843. * Mac OS X: in version 10.0 and later in Carbon.framework
  3844. * CarbonLib: in CarbonLib 1.0 and later
  3845. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3846. }
  3847. procedure HiliteWindow( window: WindowRef; fHilite: Boolean ); external name '_HiliteWindow';
  3848. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3849. {
  3850. * SetWRefCon()
  3851. *
  3852. * Mac OS X threading:
  3853. * Not thread safe
  3854. *
  3855. * Availability:
  3856. * Mac OS X: in version 10.0 and later in Carbon.framework
  3857. * CarbonLib: in CarbonLib 1.0 and later
  3858. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3859. }
  3860. procedure SetWRefCon( window: WindowRef; data: SInt32 ); external name '_SetWRefCon';
  3861. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3862. {
  3863. * GetWRefCon()
  3864. *
  3865. * Mac OS X threading:
  3866. * Not thread safe
  3867. *
  3868. * Availability:
  3869. * Mac OS X: in version 10.0 and later in Carbon.framework
  3870. * CarbonLib: in CarbonLib 1.0 and later
  3871. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3872. }
  3873. function GetWRefCon( window: WindowRef ): SInt32; external name '_GetWRefCon';
  3874. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3875. {
  3876. * SetWindowPic()
  3877. *
  3878. * Mac OS X threading:
  3879. * Not thread safe
  3880. *
  3881. * Availability:
  3882. * Mac OS X: in version 10.0 and later in Carbon.framework
  3883. * CarbonLib: in CarbonLib 1.0 and later
  3884. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3885. }
  3886. procedure SetWindowPic( window: WindowRef; pic: PicHandle ); external name '_SetWindowPic';
  3887. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3888. {
  3889. * GetWindowPic()
  3890. *
  3891. * Mac OS X threading:
  3892. * Not thread safe
  3893. *
  3894. * Availability:
  3895. * Mac OS X: in version 10.0 and later in Carbon.framework
  3896. * CarbonLib: in CarbonLib 1.0 and later
  3897. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3898. }
  3899. function GetWindowPic( window: WindowRef ): PicHandle; external name '_GetWindowPic';
  3900. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3901. {
  3902. * GetWVariant()
  3903. *
  3904. * Mac OS X threading:
  3905. * Not thread safe
  3906. *
  3907. * Availability:
  3908. * Mac OS X: in version 10.0 and later in Carbon.framework
  3909. * CarbonLib: in CarbonLib 1.0 and later
  3910. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  3911. }
  3912. function GetWVariant( window: WindowRef ): SInt16; external name '_GetWVariant';
  3913. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3914. { Routines available from Mac OS 8.0 (Appearance 1.0) forward}
  3915. {
  3916. * GetWindowFeatures()
  3917. *
  3918. * Mac OS X threading:
  3919. * Not thread safe
  3920. *
  3921. * Availability:
  3922. * Mac OS X: in version 10.0 and later in Carbon.framework
  3923. * CarbonLib: in CarbonLib 1.0 and later
  3924. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  3925. }
  3926. function GetWindowFeatures( window: WindowRef; var outFeatures: UInt32 ): OSStatus; external name '_GetWindowFeatures';
  3927. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3928. {
  3929. * GetWindowRegion()
  3930. *
  3931. * Mac OS X threading:
  3932. * Not thread safe
  3933. *
  3934. * Availability:
  3935. * Mac OS X: in version 10.0 and later in Carbon.framework
  3936. * CarbonLib: in CarbonLib 1.0 and later
  3937. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  3938. }
  3939. function GetWindowRegion( window: WindowRef; inRegionCode: WindowRegionCode; ioWinRgn: RgnHandle ): OSStatus; external name '_GetWindowRegion';
  3940. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3941. {
  3942. * GetWindowStructureWidths()
  3943. *
  3944. * Summary:
  3945. * Returns the width of the structure region on each edge of a
  3946. * window.
  3947. *
  3948. * Discussion:
  3949. * The structure widths are the difference between the content
  3950. * region and the structure region on each edge of a window. For
  3951. * example, if the left edge of the structure region is at x=100,
  3952. * and the left edge of the content region is at x=110, then the
  3953. * structure width for the left side of the window is 10 pixels.
  3954. *
  3955. * Mac OS X threading:
  3956. * Not thread safe
  3957. *
  3958. * Parameters:
  3959. *
  3960. * inWindow:
  3961. * The window for which to get structure widths.
  3962. *
  3963. * outRect:
  3964. * On exit, contains the width of the structure region on each
  3965. * side of the window; the left field of the rectangle contains
  3966. * the structure width on the left side of the window, the top
  3967. * field contains the width on the top side, and so on.
  3968. *
  3969. * Availability:
  3970. * Mac OS X: in version 10.0 and later in Carbon.framework
  3971. * CarbonLib: in CarbonLib 1.0 and later
  3972. * Non-Carbon CFM: in WindowsLib 8.5 and later
  3973. }
  3974. function GetWindowStructureWidths( inWindow: WindowRef; var outRect: Rect ): OSStatus; external name '_GetWindowStructureWidths';
  3975. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3976. {
  3977. * HIWindowChangeFeatures()
  3978. *
  3979. * Summary:
  3980. * Changes the window features on the fly.
  3981. *
  3982. * Discussion:
  3983. * HIWindowChangeFeatures changes the features of a window. This
  3984. * should only be used by custom window definitions or window frame
  3985. * views.
  3986. *
  3987. * Mac OS X threading:
  3988. * Not thread safe
  3989. *
  3990. * Parameters:
  3991. *
  3992. * inWindow:
  3993. * The window to modify.
  3994. *
  3995. * inSetThese:
  3996. * The feature bits to set.
  3997. *
  3998. * inClearThese:
  3999. * The feature bits to clear.
  4000. *
  4001. * Availability:
  4002. * Mac OS X: in version 10.3 and later in Carbon.framework
  4003. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  4004. * Non-Carbon CFM: not available
  4005. }
  4006. function HIWindowChangeFeatures( inWindow: WindowRef; inSetThese: UInt64; inClearThese: UInt64 ): OSStatus; external name '_HIWindowChangeFeatures';
  4007. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  4008. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4009. { ¥ Update Events }
  4010. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4011. {
  4012. These aren't present in Carbon. Please use the InvalWindowRect, etc. routines
  4013. below instead.
  4014. }
  4015. {
  4016. * InvalRect()
  4017. *
  4018. * Availability:
  4019. * Mac OS X: not available
  4020. * CarbonLib: not available
  4021. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  4022. }
  4023. {
  4024. * InvalRgn()
  4025. *
  4026. * Availability:
  4027. * Mac OS X: not available
  4028. * CarbonLib: not available
  4029. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  4030. }
  4031. {
  4032. * ValidRect()
  4033. *
  4034. * Availability:
  4035. * Mac OS X: not available
  4036. * CarbonLib: not available
  4037. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  4038. }
  4039. {
  4040. * ValidRgn()
  4041. *
  4042. * Availability:
  4043. * Mac OS X: not available
  4044. * CarbonLib: not available
  4045. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  4046. }
  4047. {
  4048. * BeginUpdate()
  4049. *
  4050. * Mac OS X threading:
  4051. * Not thread safe
  4052. *
  4053. * Availability:
  4054. * Mac OS X: in version 10.0 and later in Carbon.framework
  4055. * CarbonLib: in CarbonLib 1.0 and later
  4056. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  4057. }
  4058. procedure BeginUpdate( window: WindowRef ); external name '_BeginUpdate';
  4059. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4060. {
  4061. * EndUpdate()
  4062. *
  4063. * Mac OS X threading:
  4064. * Not thread safe
  4065. *
  4066. * Availability:
  4067. * Mac OS X: in version 10.0 and later in Carbon.framework
  4068. * CarbonLib: in CarbonLib 1.0 and later
  4069. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  4070. }
  4071. procedure EndUpdate( window: WindowRef ); external name '_EndUpdate';
  4072. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4073. {
  4074. Routines available from Mac OS 8.5 forward
  4075. or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
  4076. }
  4077. {
  4078. * InvalWindowRgn()
  4079. *
  4080. * Mac OS X threading:
  4081. * Not thread safe
  4082. *
  4083. * Availability:
  4084. * Mac OS X: in version 10.0 and later in Carbon.framework
  4085. * CarbonLib: in CarbonLib 1.0 and later
  4086. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4087. }
  4088. function InvalWindowRgn( window: WindowRef; region: RgnHandle ): OSStatus; external name '_InvalWindowRgn';
  4089. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4090. {
  4091. * InvalWindowRect()
  4092. *
  4093. * Mac OS X threading:
  4094. * Not thread safe
  4095. *
  4096. * Availability:
  4097. * Mac OS X: in version 10.0 and later in Carbon.framework
  4098. * CarbonLib: in CarbonLib 1.0 and later
  4099. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4100. }
  4101. function InvalWindowRect( window: WindowRef; const (*var*) bounds: Rect ): OSStatus; external name '_InvalWindowRect';
  4102. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4103. {
  4104. * ValidWindowRgn()
  4105. *
  4106. * Mac OS X threading:
  4107. * Not thread safe
  4108. *
  4109. * Availability:
  4110. * Mac OS X: in version 10.0 and later in Carbon.framework
  4111. * CarbonLib: in CarbonLib 1.0 and later
  4112. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4113. }
  4114. function ValidWindowRgn( window: WindowRef; region: RgnHandle ): OSStatus; external name '_ValidWindowRgn';
  4115. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4116. {
  4117. * ValidWindowRect()
  4118. *
  4119. * Mac OS X threading:
  4120. * Not thread safe
  4121. *
  4122. * Availability:
  4123. * Mac OS X: in version 10.0 and later in Carbon.framework
  4124. * CarbonLib: in CarbonLib 1.0 and later
  4125. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4126. }
  4127. function ValidWindowRect( window: WindowRef; const (*var*) bounds: Rect ): OSStatus; external name '_ValidWindowRect';
  4128. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4129. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4130. { ¥ DrawGrowIcon }
  4131. { DrawGrowIcon is deprecated from Mac OS 8.0 forward. Theme-savvy window defprocs }
  4132. { include the grow box in the window frame. }
  4133. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4134. {
  4135. * DrawGrowIcon()
  4136. *
  4137. * Mac OS X threading:
  4138. * Not thread safe
  4139. *
  4140. * Availability:
  4141. * Mac OS X: in version 10.0 and later in Carbon.framework
  4142. * CarbonLib: in CarbonLib 1.0 and later
  4143. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  4144. }
  4145. procedure DrawGrowIcon( window: WindowRef ); external name '_DrawGrowIcon';
  4146. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4147. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4148. { ¥ Window Titles }
  4149. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4150. {
  4151. * SetWTitle()
  4152. *
  4153. * Mac OS X threading:
  4154. * Not thread safe
  4155. *
  4156. * Availability:
  4157. * Mac OS X: in version 10.0 and later in Carbon.framework
  4158. * CarbonLib: in CarbonLib 1.0 and later
  4159. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  4160. }
  4161. procedure SetWTitle( window: WindowRef; const (*var*) title: Str255 ); external name '_SetWTitle';
  4162. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4163. {
  4164. * GetWTitle()
  4165. *
  4166. * Mac OS X threading:
  4167. * Not thread safe
  4168. *
  4169. * Availability:
  4170. * Mac OS X: in version 10.0 and later in Carbon.framework
  4171. * CarbonLib: in CarbonLib 1.0 and later
  4172. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  4173. }
  4174. procedure GetWTitle( window: WindowRef; var title: Str255 ); external name '_GetWTitle';
  4175. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4176. {
  4177. * SetWindowTitleWithCFString()
  4178. *
  4179. * Mac OS X threading:
  4180. * Not thread safe
  4181. *
  4182. * Availability:
  4183. * Mac OS X: in version 10.0 and later in Carbon.framework
  4184. * CarbonLib: in CarbonLib 1.1 and later
  4185. * Non-Carbon CFM: not available
  4186. }
  4187. function SetWindowTitleWithCFString( inWindow: WindowRef; inString: CFStringRef ): OSStatus; external name '_SetWindowTitleWithCFString';
  4188. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4189. {
  4190. * CopyWindowTitleAsCFString()
  4191. *
  4192. * Mac OS X threading:
  4193. * Not thread safe
  4194. *
  4195. * Availability:
  4196. * Mac OS X: in version 10.0 and later in Carbon.framework
  4197. * CarbonLib: in CarbonLib 1.1 and later
  4198. * Non-Carbon CFM: not available
  4199. }
  4200. function CopyWindowTitleAsCFString( inWindow: WindowRef; var outString: CFStringRef ): OSStatus; external name '_CopyWindowTitleAsCFString';
  4201. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4202. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4203. { ¥ Window Proxies }
  4204. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4205. {
  4206. * SetWindowProxyFSSpec()
  4207. *
  4208. * Summary:
  4209. * Set the proxy icon for a window using an FSSpec to an existing
  4210. * file system object (volume, folder, or file).
  4211. *
  4212. * Mac OS X threading:
  4213. * Not thread safe
  4214. *
  4215. * Parameters:
  4216. *
  4217. * window:
  4218. * The window whose proxy icon to set.
  4219. *
  4220. * inFile:
  4221. * The file system object that the window represents. The windowÕs
  4222. * proxy icon is determined by asking Icon Services for the icon
  4223. * of this object.
  4224. *
  4225. * Availability:
  4226. * Mac OS X: in version 10.0 and later in Carbon.framework
  4227. * CarbonLib: in CarbonLib 1.0 and later
  4228. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4229. }
  4230. function SetWindowProxyFSSpec( window: WindowRef; const (*var*) inFile: FSSpec ): OSStatus; external name '_SetWindowProxyFSSpec';
  4231. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4232. {
  4233. * GetWindowProxyFSSpec()
  4234. *
  4235. * Summary:
  4236. * Returns the FSSpec used to determine the proxy icon for a window.
  4237. *
  4238. * Discussion:
  4239. * This API will return noErr and a valid FSSpec if the windowÕs
  4240. * proxy icon has been specified using the SetWindowProxyFSSpec or
  4241. * SetWindowProxyAlias APIs. If the window has no proxy icon, or if
  4242. * the icon was specified with another SetWindowProxy API, then an
  4243. * error will be returned.
  4244. *
  4245. * Mac OS X threading:
  4246. * Not thread safe
  4247. *
  4248. * Parameters:
  4249. *
  4250. * window:
  4251. * The window whose proxy icon FSSpec to return.
  4252. *
  4253. * outFile:
  4254. * On exit, contains the windowÕs proxy icon FSSpec.
  4255. *
  4256. * Result:
  4257. * noErr if the windowÕs proxy icon FSSpec has been returned;
  4258. * errWindowDoesNotHaveProxy if the window does not have a proxy
  4259. * icon, or if the proxy icon was specified by IconRef or
  4260. * type/creator rather than by FSSpec or alias. Other operating
  4261. * system error codes may also be returned.
  4262. *
  4263. * Availability:
  4264. * Mac OS X: in version 10.0 and later in Carbon.framework
  4265. * CarbonLib: in CarbonLib 1.0 and later
  4266. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4267. }
  4268. function GetWindowProxyFSSpec( window: WindowRef; var outFile: FSSpec ): OSStatus; external name '_GetWindowProxyFSSpec';
  4269. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4270. {
  4271. * HIWindowSetProxyFSRef()
  4272. *
  4273. * Summary:
  4274. * Set the proxy icon for a window using an FSRef to an existing
  4275. * file system object (volume, folder, or file).
  4276. *
  4277. * Mac OS X threading:
  4278. * Not thread safe
  4279. *
  4280. * Parameters:
  4281. *
  4282. * window:
  4283. * The window whose proxy icon to set.
  4284. *
  4285. * inRef:
  4286. * The file system object that the window represents. The window's
  4287. * proxy icon is determined by asking Icon Services for the icon
  4288. * of this object.
  4289. *
  4290. * Availability:
  4291. * Mac OS X: in version 10.4 and later in Carbon.framework
  4292. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  4293. * Non-Carbon CFM: not available
  4294. }
  4295. function HIWindowSetProxyFSRef( window: WindowRef; const (*var*) inRef: FSRef ): OSStatus; external name '_HIWindowSetProxyFSRef';
  4296. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  4297. {
  4298. * HIWindowGetProxyFSRef()
  4299. *
  4300. * Summary:
  4301. * Returns the FSRef used to determine the proxy icon for a window.
  4302. *
  4303. * Discussion:
  4304. * This API will return noErr and a valid FSRef if the window's
  4305. * proxy icon has been specified using the FSRef, FSSpec or alias
  4306. * SetWindowProxy APIs. If the window has no proxy icon, or if the
  4307. * icon was specified with SetWindowProxyCreatorAndType or
  4308. * SetWindowProxyIcon, then an error will be returned.
  4309. *
  4310. * Mac OS X threading:
  4311. * Not thread safe
  4312. *
  4313. * Parameters:
  4314. *
  4315. * window:
  4316. * The window containing the proxy icon to return.
  4317. *
  4318. * outRef:
  4319. * On exit, contains the FSRef to the window's proxy icon.
  4320. *
  4321. * Result:
  4322. * noErr if the window's proxy icon FSRef has been returned;
  4323. * errWindowDoesNotHaveProxy if the window does not have a proxy
  4324. * icon, or if the proxy icon was specified by
  4325. * SetWindowProxyCreatorAndType or SetWindowProxyIcon. Other
  4326. * operating system error codes may also be returned.
  4327. *
  4328. * Availability:
  4329. * Mac OS X: in version 10.4 and later in Carbon.framework
  4330. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  4331. * Non-Carbon CFM: not available
  4332. }
  4333. function HIWindowGetProxyFSRef( window: WindowRef; var outRef: FSRef ): OSStatus; external name '_HIWindowGetProxyFSRef';
  4334. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  4335. {
  4336. * SetWindowProxyAlias()
  4337. *
  4338. * Summary:
  4339. * Sets the proxy icon for a window using an AliasHandle to an
  4340. * existing file system object (volume, folder, or file).
  4341. *
  4342. * Mac OS X threading:
  4343. * Not thread safe
  4344. *
  4345. * Parameters:
  4346. *
  4347. * inWindow:
  4348. * The window whose proxy icon to set.
  4349. *
  4350. * inAlias:
  4351. * The file system object that the window represents. The windowÕs
  4352. * proxy icon is determined by asking Icon Services for the icon
  4353. * of this object. The Window Manager copies the alias data; the
  4354. * caller may dispose of the alias after SetWindowProxyAlias
  4355. * returns.
  4356. *
  4357. * Availability:
  4358. * Mac OS X: in version 10.0 and later in Carbon.framework
  4359. * CarbonLib: in CarbonLib 1.0 and later
  4360. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4361. }
  4362. function SetWindowProxyAlias( inWindow: WindowRef; inAlias: AliasHandle ): OSStatus; external name '_SetWindowProxyAlias';
  4363. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4364. {
  4365. * GetWindowProxyAlias()
  4366. *
  4367. * Summary:
  4368. * Returns the alias used to determine the proxy icon for a window.
  4369. *
  4370. * Discussion:
  4371. * This API will return noErr and a valid alias if the windowÕs
  4372. * proxy icon has been specified using the SetWindowProxyFSSpec or
  4373. * SetWindowProxyAlias APIs. If the window has no proxy icon, or if
  4374. * the icon was specified with another SetWindowProxy API, then an
  4375. * error will be returned.
  4376. *
  4377. * Mac OS X threading:
  4378. * Not thread safe
  4379. *
  4380. * Parameters:
  4381. *
  4382. * window:
  4383. * The window whose proxy icon alias to return.
  4384. *
  4385. * alias:
  4386. * On exit, contains the windowÕs proxy icon alias.
  4387. *
  4388. * Result:
  4389. * noErr if the windowÕs proxy icon alias has been returned;
  4390. * errWindowDoesNotHaveProxy if the window does not have a proxy
  4391. * icon, or if the proxy icon was specified by IconRef or
  4392. * type/creator rather than by FSSpec or alias. Other operating
  4393. * system error codes may also be returned.
  4394. *
  4395. * Availability:
  4396. * Mac OS X: in version 10.0 and later in Carbon.framework
  4397. * CarbonLib: in CarbonLib 1.0 and later
  4398. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4399. }
  4400. function GetWindowProxyAlias( window: WindowRef; var alias: AliasHandle ): OSStatus; external name '_GetWindowProxyAlias';
  4401. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4402. {
  4403. * SetWindowProxyCreatorAndType()
  4404. *
  4405. * Summary:
  4406. * Sets the proxy icon for a window using a file type and creator.
  4407. *
  4408. * Mac OS X threading:
  4409. * Not thread safe
  4410. *
  4411. * Parameters:
  4412. *
  4413. * window:
  4414. * The window whose proxy icon to set.
  4415. *
  4416. * fileCreator:
  4417. * The creator code for the file system object that the window
  4418. * represents. The windowÕs proxy icon is determined by asking
  4419. * Icon Services for the icon corresponding to the specified
  4420. * creator code and file type, on the specified volume.
  4421. *
  4422. * fileType:
  4423. * The file type for the file system object that the window
  4424. * represents.
  4425. *
  4426. * vRefNum:
  4427. * The volume reference number for the volume containing the file
  4428. * system object that the window represents. You may pass
  4429. * kOnSystemDisk for this parameter if you don't know which volume
  4430. * will hold the file system object.
  4431. *
  4432. * Availability:
  4433. * Mac OS X: in version 10.0 and later in Carbon.framework
  4434. * CarbonLib: in CarbonLib 1.0 and later
  4435. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4436. }
  4437. function SetWindowProxyCreatorAndType( window: WindowRef; fileCreator: OSType; fileType: OSType; vRefNum: SInt16 ): OSStatus; external name '_SetWindowProxyCreatorAndType';
  4438. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4439. {
  4440. * GetWindowProxyIcon()
  4441. *
  4442. * Summary:
  4443. * Returns the proxy icon of a window.
  4444. *
  4445. * Mac OS X threading:
  4446. * Not thread safe
  4447. *
  4448. * Parameters:
  4449. *
  4450. * window:
  4451. * The window whose proxy icon to return.
  4452. *
  4453. * outIcon:
  4454. * On exit, contains the windowÕs proxy icon.
  4455. *
  4456. * Availability:
  4457. * Mac OS X: in version 10.0 and later in Carbon.framework
  4458. * CarbonLib: in CarbonLib 1.0 and later
  4459. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4460. }
  4461. function GetWindowProxyIcon( window: WindowRef; var outIcon: IconRef ): OSStatus; external name '_GetWindowProxyIcon';
  4462. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4463. {
  4464. * SetWindowProxyIcon()
  4465. *
  4466. * Summary:
  4467. * Sets a windowÕs proxy icon.
  4468. *
  4469. * Mac OS X threading:
  4470. * Not thread safe
  4471. *
  4472. * Parameters:
  4473. *
  4474. * window:
  4475. * The window whose proxy icon to set.
  4476. *
  4477. * icon:
  4478. * The proxy icon. The Window Manager retains the IconRef; the
  4479. * caller may release the IconRef after SetWindowProxyIcon returns.
  4480. *
  4481. * Availability:
  4482. * Mac OS X: in version 10.0 and later in Carbon.framework
  4483. * CarbonLib: in CarbonLib 1.0 and later
  4484. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4485. }
  4486. function SetWindowProxyIcon( window: WindowRef; icon: IconRef ): OSStatus; external name '_SetWindowProxyIcon';
  4487. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4488. {
  4489. * RemoveWindowProxy()
  4490. *
  4491. * Summary:
  4492. * Removes a windowÕs proxy icon.
  4493. *
  4494. * Discussion:
  4495. * When removing the proxy icon, the Window Manager also releases
  4496. * the alias or IconRef, if any, that was used to specify the proxy
  4497. * icon.
  4498. *
  4499. * Mac OS X threading:
  4500. * Not thread safe
  4501. *
  4502. * Parameters:
  4503. *
  4504. * window:
  4505. * The window whose proxy icon to remove.
  4506. *
  4507. * Availability:
  4508. * Mac OS X: in version 10.0 and later in Carbon.framework
  4509. * CarbonLib: in CarbonLib 1.0 and later
  4510. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4511. }
  4512. function RemoveWindowProxy( window: WindowRef ): OSStatus; external name '_RemoveWindowProxy';
  4513. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4514. {
  4515. * BeginWindowProxyDrag()
  4516. *
  4517. * Summary:
  4518. * Creates a new drag reference that can be used to drag a windowÕs
  4519. * proxy icon.
  4520. *
  4521. * Discussion:
  4522. * This API is used by applications that need to add their own drag
  4523. * flavors to the drag reference used for a proxy icon drag. Such an
  4524. * application would call BeginWindowProxyDrag to create the drag
  4525. * reference, add its own flavors, call
  4526. * TrackWindowProxyFromExistingDrag to track the proxy icon drag,
  4527. * and then EndWindowProxyDrag to release the drag
  4528. * reference.
  4529. *
  4530. * An application which does not need to add its own drag flavors to
  4531. * the drag reference can simply call TrackWindowProxyDrag.
  4532. *
  4533. * Mac OS X threading:
  4534. * Not thread safe
  4535. *
  4536. * Parameters:
  4537. *
  4538. * window:
  4539. * The window whose proxy icon to drag.
  4540. *
  4541. * outNewDrag:
  4542. * On exit, contains the drag reference for the proxy icon.
  4543. *
  4544. * outDragOutlineRgn:
  4545. * On entry, should be a valid RgnHandle; on exit, the region has
  4546. * been updated with an outline of the proxy icon drag image. This
  4547. * region should be passed to TrackWindowProxyFromExistingDrag;
  4548. * the application may modify it first.
  4549. *
  4550. * Availability:
  4551. * Mac OS X: in version 10.0 and later in Carbon.framework
  4552. * CarbonLib: in CarbonLib 1.0 and later
  4553. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4554. }
  4555. function BeginWindowProxyDrag( window: WindowRef; var outNewDrag: DragReference; outDragOutlineRgn: RgnHandle ): OSStatus; external name '_BeginWindowProxyDrag';
  4556. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4557. {
  4558. * EndWindowProxyDrag()
  4559. *
  4560. * Summary:
  4561. * Releases a drag reference created by BeginWindowProxyDrag.
  4562. *
  4563. * Mac OS X threading:
  4564. * Not thread safe
  4565. *
  4566. * Parameters:
  4567. *
  4568. * window:
  4569. * The window whose proxy icon drag reference to release.
  4570. *
  4571. * theDrag:
  4572. * The drag reference to release.
  4573. *
  4574. * Availability:
  4575. * Mac OS X: in version 10.0 and later in Carbon.framework
  4576. * CarbonLib: in CarbonLib 1.0 and later
  4577. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4578. }
  4579. function EndWindowProxyDrag( window: WindowRef; theDrag: DragReference ): OSStatus; external name '_EndWindowProxyDrag';
  4580. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4581. {
  4582. * TrackWindowProxyFromExistingDrag()
  4583. *
  4584. * Summary:
  4585. * Tracks the drag of a window proxy icon.
  4586. *
  4587. * Discussion:
  4588. * This API is used by applications that need to add their own drag
  4589. * flavors to the drag reference used for a proxy icon drag. Such an
  4590. * application would call BeginWindowProxyDrag to create the drag
  4591. * reference, add its own flavors, call
  4592. * TrackWindowProxyFromExistingDrag to track the proxy icon drag,
  4593. * and then EndWindowProxyDrag to release the drag
  4594. * reference.
  4595. *
  4596. * An application which does not need to add its own drag flavors to
  4597. * the drag reference can simply call TrackWindowProxyDrag.
  4598. *
  4599. * A proxy icon may only be dragged if the window represented by the
  4600. * proxy icon is not modifed (as indicated by the IsWindowModified
  4601. * API). This restriction is imposed because a proxy icon is a
  4602. * representation of a physical file system object, and dragging the
  4603. * proxy icon may result in the Finder making a copy of the file
  4604. * system object. If the window is modified, then it contains user
  4605. * data that has not yet been saved to disk; making a copy of the
  4606. * file system object would result in a stale copy that did not
  4607. * contain the userÕs current data.
  4608. *
  4609. * By default, all newly created windows are considered to be dirty.
  4610. * The application must call SetWindowModified( window, false )
  4611. * before the proxy icon will be draggable.
  4612. *
  4613. * In Mac OS X 10.3 and later, the proxy icon is also draggable in
  4614. * dirty windows if the proxy icon was provided using the
  4615. * SetWindowProxyIcon or SetWindowProxyCreatorAndType APIs. Dragging
  4616. * is allowed in this case because the window does not represent an
  4617. * actual file system object, and therefore there is no risk of user
  4618. * data loss.
  4619. *
  4620. * Mac OS X threading:
  4621. * Not thread safe
  4622. *
  4623. * Parameters:
  4624. *
  4625. * window:
  4626. * The window whose proxy icon to drag.
  4627. *
  4628. * startPt:
  4629. * The point in global coordinates where the drag originated. This
  4630. * is generally the location of the mouse click in the proxy icon.
  4631. *
  4632. * drag:
  4633. * The proxy icon drag reference.
  4634. *
  4635. * inDragOutlineRgn:
  4636. * The outline of the proxy icon drag image, as returned by
  4637. * BeginWindowProxyDrag.
  4638. *
  4639. * Result:
  4640. * errUserWantsToDragWindow if the userÕs mouse movements indicated
  4641. * that the user actually wants to drag the window instead of the
  4642. * proxy icon (in this case the application should call DragWindow);
  4643. * windowWrongStateErr if the window was modified and therefore the
  4644. * proxy icon could not be dragged; noErr if the drag succeeded;
  4645. * userCanceledErr if the user canceled the drag. Other operating
  4646. * system result codes may also be returned.
  4647. *
  4648. * Availability:
  4649. * Mac OS X: in version 10.0 and later in Carbon.framework
  4650. * CarbonLib: in CarbonLib 1.0 and later
  4651. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4652. }
  4653. function TrackWindowProxyFromExistingDrag( window: WindowRef; startPt: Point; drag: DragReference; inDragOutlineRgn: RgnHandle ): OSStatus; external name '_TrackWindowProxyFromExistingDrag';
  4654. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4655. {
  4656. * TrackWindowProxyDrag()
  4657. *
  4658. * Summary:
  4659. * Tracks the drag of a window proxy icon.
  4660. *
  4661. * Discussion:
  4662. * A proxy icon may only be dragged if the window represented by the
  4663. * proxy icon is not modifed (as indicated by the IsWindowModified
  4664. * API). This restriction is imposed because a proxy icon is a
  4665. * representation of a physical file system object, and dragging the
  4666. * proxy icon may result in the Finder making a copy of the file
  4667. * system object. If the window is modified, then it contains user
  4668. * data that has not yet been saved to disk; making a copy of the
  4669. * file system object would result in a stale copy that did not
  4670. * contain the userÕs current data.
  4671. *
  4672. * By default, all newly created windows are considered to be
  4673. * modified. The application must call SetWindowModified( window,
  4674. * false ) before the proxy icon will be draggable.
  4675. *
  4676. * In Mac OS X 10.3 and later, the proxy icon is also draggable in
  4677. * dirty windows if the proxy icon was provided using the
  4678. * SetWindowProxyIcon or SetWindowProxyCreatorAndType APIs. Dragging
  4679. * is allowed in this case because the window does not represent an
  4680. * actual file system object, and therefore there is no risk of user
  4681. * data loss.
  4682. *
  4683. * Mac OS X threading:
  4684. * Not thread safe
  4685. *
  4686. * Parameters:
  4687. *
  4688. * window:
  4689. * The window whose proxy icon to drag.
  4690. *
  4691. * startPt:
  4692. * The point in global coordinates where the drag originated. This
  4693. * is generally the location of the mouse click in the proxy icon.
  4694. *
  4695. * Result:
  4696. * errUserWantsToDragWindow if the userÕs mouse movements indicated
  4697. * that the user actually wants to drag the window instead of the
  4698. * proxy icon (in this case the application should call DragWindow);
  4699. * windowWrongStateErr if the window was modified and therefore the
  4700. * proxy icon could not be dragged; noErr if the drag succeeded;
  4701. * userCanceledErr if the user canceled the drag. Other operating
  4702. * system result codes may also be returned.
  4703. *
  4704. * Availability:
  4705. * Mac OS X: in version 10.0 and later in Carbon.framework
  4706. * CarbonLib: in CarbonLib 1.0 and later
  4707. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4708. }
  4709. function TrackWindowProxyDrag( window: WindowRef; startPt: Point ): OSStatus; external name '_TrackWindowProxyDrag';
  4710. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4711. {
  4712. * IsWindowModified()
  4713. *
  4714. * Summary:
  4715. * Returns whether the window is considered to have unsaved content.
  4716. *
  4717. * Discussion:
  4718. * By default, all newly created windows are considered to be
  4719. * modified. The application must call SetWindowModified( window,
  4720. * false ) to mark the window as unmodified. Until the window is
  4721. * marked as unmodified, the proxy icon will not be draggable.
  4722. *
  4723. * Mac OS X threading:
  4724. * Not thread safe
  4725. *
  4726. * Parameters:
  4727. *
  4728. * window:
  4729. * The window whose modified state to return.
  4730. *
  4731. * Result:
  4732. * true if the window has unsaved changes, or false if not.
  4733. *
  4734. * Availability:
  4735. * Mac OS X: in version 10.0 and later in Carbon.framework
  4736. * CarbonLib: in CarbonLib 1.0 and later
  4737. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4738. }
  4739. function IsWindowModified( window: WindowRef ): Boolean; external name '_IsWindowModified';
  4740. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4741. {
  4742. * SetWindowModified()
  4743. *
  4744. * Summary:
  4745. * Sets whether the window is considered to have unsaved content.
  4746. *
  4747. * Discussion:
  4748. * By default, all newly created windows are considered to be
  4749. * modified. The application must call SetWindowModified( window,
  4750. * false ) to mark the window as unmodified. Until the window is
  4751. * marked as unmodified, the proxy icon will not be draggable.
  4752. *
  4753. * Mac OS X threading:
  4754. * Not thread safe
  4755. *
  4756. * Parameters:
  4757. *
  4758. * window:
  4759. * The window whose modified state to return.
  4760. *
  4761. * modified:
  4762. * Whether the window has unsaved changes.
  4763. *
  4764. * Availability:
  4765. * Mac OS X: in version 10.0 and later in Carbon.framework
  4766. * CarbonLib: in CarbonLib 1.0 and later
  4767. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4768. }
  4769. function SetWindowModified( window: WindowRef; modified: Boolean ): OSStatus; external name '_SetWindowModified';
  4770. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4771. {
  4772. * IsWindowPathSelectClick()
  4773. *
  4774. * Summary:
  4775. * Indicates whether an EventRecord describing a click on a windowÕs
  4776. * title should cause a path selection menu to be displayed.
  4777. *
  4778. * Discussion:
  4779. * Windows that have a proxy icon provided using an FSSpec or alias
  4780. * can support a path selection menu, which displays the file system
  4781. * path to the object, one menu item per directory. Making a
  4782. * selection from this item will automatically open the
  4783. * corresponding object in the Finder.
  4784. *
  4785. * Mac OS X threading:
  4786. * Not thread safe
  4787. *
  4788. * Parameters:
  4789. *
  4790. * window:
  4791. * The window on which the click occurred.
  4792. *
  4793. * event:
  4794. * The event. IsWindowPathSelectClick will only return true for
  4795. * mouseDown events.
  4796. *
  4797. * Result:
  4798. * true if the click should cause a path selection menu to be
  4799. * displayed, or false if not. If this API returns true, the
  4800. * application should call the WindowPathSelect API.
  4801. *
  4802. * Availability:
  4803. * Mac OS X: in version 10.0 and later in Carbon.framework
  4804. * CarbonLib: in CarbonLib 1.0 and later
  4805. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4806. }
  4807. function IsWindowPathSelectClick( window: WindowRef; const (*var*) event: EventRecord ): Boolean; external name '_IsWindowPathSelectClick';
  4808. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4809. {
  4810. * IsWindowPathSelectEvent()
  4811. *
  4812. * Summary:
  4813. * Indicates whether a Carbon event describing a click on a windowÕs
  4814. * title should cause a path selection menu to be displayed.
  4815. *
  4816. * Discussion:
  4817. * Windows that have a proxy icon provided using an FSSpec or alias
  4818. * can support a path selection menu, which displays the file system
  4819. * path to the object, one menu item per directory. Making a
  4820. * selection from this item will automatically open the
  4821. * corresponding object in the Finder.
  4822. *
  4823. * Mac OS X threading:
  4824. * Not thread safe
  4825. *
  4826. * Parameters:
  4827. *
  4828. * window:
  4829. * The window on which the click occurred.
  4830. *
  4831. * inEvent:
  4832. * The event. In CarbonLib and in Mac OS X 10.2 and earlier,
  4833. * IsWindowPathSelectEvent only returned true for
  4834. * kEventClassMouse/ kEventMouseDown events. In Mac OS X 10.3 and
  4835. * later, IsWindowPathSelectEvent returns true for any event that
  4836. * has suitable kEventParamMouseLocation and
  4837. * kEventParamKeyModifiers parameters.
  4838. *
  4839. * Result:
  4840. * true if the click should cause a path selection menu to be
  4841. * displayed, or false if not. If this API returns true, the
  4842. * application should call the WindowPathSelect API.
  4843. *
  4844. * Availability:
  4845. * Mac OS X: in version 10.0 and later in Carbon.framework
  4846. * CarbonLib: in CarbonLib 1.1 and later
  4847. * Non-Carbon CFM: not available
  4848. }
  4849. function IsWindowPathSelectEvent( window: WindowRef; inEvent: EventRef ): Boolean; external name '_IsWindowPathSelectEvent';
  4850. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4851. {
  4852. * WindowPathSelect()
  4853. *
  4854. * Summary:
  4855. * Displays a path selection menu for a window that has a proxy icon.
  4856. *
  4857. * Discussion:
  4858. * If the application passes NULL for the menu parameter, and the
  4859. * user selects an item from the path selection menu, the Window
  4860. * Manager will automatically request the Finder to display that
  4861. * item, and in CarbonLib 1.3.1 and later and Mac OS X, will also
  4862. * make the Finder be the active application.
  4863. *
  4864. * Mac OS X threading:
  4865. * Not thread safe
  4866. *
  4867. * Parameters:
  4868. *
  4869. * window:
  4870. * The window for which to display the path selection menu.
  4871. *
  4872. * menu:
  4873. * The menu to display. If you pass NULL, the Window Manager
  4874. * automatically creates a suitable menu based on the windowÕs
  4875. * proxy icon.
  4876. *
  4877. * outMenuResult:
  4878. * On exit, the menu ID and menu item index of the selected item;
  4879. * the menu ID is in the high 16 bits of the result, and the menu
  4880. * item index is in the low 16 bits.
  4881. *
  4882. * Result:
  4883. * noErr if the user selected an item from the menu; userCanceledErr
  4884. * if the user closed the menu without making a selection. Other
  4885. * operating system result codes may be returned.
  4886. *
  4887. * Availability:
  4888. * Mac OS X: in version 10.0 and later in Carbon.framework
  4889. * CarbonLib: in CarbonLib 1.0 and later
  4890. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4891. }
  4892. function WindowPathSelect( window: WindowRef; menu: MenuRef { can be NULL }; var outMenuResult: SInt32 ): OSStatus; external name '_WindowPathSelect';
  4893. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4894. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4895. { ¥ HiliteWindowFrameForDrag }
  4896. { If you call ShowDragHilite and HideDragHilite, you donÕt need to use this routine. }
  4897. { If you implement custom drag hiliting, you should call HiliteWindowFrameForDrag }
  4898. { when the drag is tracking inside a window with drag-hilited content. }
  4899. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4900. { Routines available from Mac OS 8.5 forward}
  4901. {
  4902. * HiliteWindowFrameForDrag()
  4903. *
  4904. * Mac OS X threading:
  4905. * Not thread safe
  4906. *
  4907. * Availability:
  4908. * Mac OS X: in version 10.0 and later in Carbon.framework
  4909. * CarbonLib: in CarbonLib 1.0 and later
  4910. * Non-Carbon CFM: in WindowsLib 8.5 and later
  4911. }
  4912. function HiliteWindowFrameForDrag( window: WindowRef; hilited: Boolean ): OSStatus; external name '_HiliteWindowFrameForDrag';
  4913. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4914. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4915. { ¥ Window Transitions }
  4916. { TransitionWindow displays a window with accompanying animation and sound. }
  4917. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4918. {
  4919. * WindowTransitionEffect
  4920. *
  4921. * Summary:
  4922. * Visual effects that are provided by TransitionWindow
  4923. }
  4924. type
  4925. WindowTransitionEffect = UInt32;
  4926. const
  4927. {
  4928. * Finder-like zoom rectangles. Use with TransitionWindow and Show or
  4929. * Hide transition actions
  4930. }
  4931. kWindowZoomTransitionEffect = 1;
  4932. {
  4933. * Zoom in/out from parent. Use with TransitionWindowAndParent and
  4934. * Show or Hide transition actions. Available in Mac OS X, and in
  4935. * CarbonLib 1.5 and later.
  4936. }
  4937. kWindowSheetTransitionEffect = 2;
  4938. {
  4939. * Slide the window into its new position. Use with TransitionWindow
  4940. * and Move or Resize transition actions. Available in Mac OS X, and
  4941. * in CarbonLib 1.5 and later.
  4942. }
  4943. kWindowSlideTransitionEffect = 3;
  4944. {
  4945. * Fade the window into or out of visibility. Use with the Show or
  4946. * Hide transition actions. Available in Mac OS X 10.3 and later.
  4947. }
  4948. kWindowFadeTransitionEffect = 4;
  4949. {
  4950. * Use the Genie effect that the Dock uses to minimize or maximize a
  4951. * window to show or hide the window. Use with the Show or Hide
  4952. * transition actions. Available in Mac OS X 10.3 and later.
  4953. }
  4954. kWindowGenieTransitionEffect = 5;
  4955. {
  4956. * WindowTransitionAction
  4957. *
  4958. * Summary:
  4959. * Modifications to window state that are provided by
  4960. * TransitionWindow
  4961. }
  4962. type
  4963. WindowTransitionAction = UInt32;
  4964. const
  4965. {
  4966. * Shows the window. Use with the Zoom, Sheet, Fade, or Genie
  4967. * transition effects. For the Zoom, Sheet, and Genie effects, the
  4968. * inRect parameter is the global coordinates from which to start the
  4969. * animation; inRect may be NULL for the Zoom and Sheet effects, and
  4970. * in that case, the animation begins at the center of the window.
  4971. * The Genie effect requires a non-NULL inRect parameter. The Fade
  4972. * effect does not use the inRect parameter.
  4973. }
  4974. kWindowShowTransitionAction = 1;
  4975. {
  4976. * Hides the window. Use with the Zoom, Sheet, Fade, or Genie
  4977. * transition effects. For the Zoom, Sheet, and Genie effects, the
  4978. * inRect parameter is the global coordinates at which to end the
  4979. * animation; inRect may be NULL for the Zoom and Sheet effects, and
  4980. * in that case, the animation ends at the center of the window. The
  4981. * Genie effect requires a non-NULL inRect parameter. The Fade effect
  4982. * does not use the inRect parameter.
  4983. }
  4984. kWindowHideTransitionAction = 2;
  4985. {
  4986. * Moves the window. Use with the Slide transition effect. The inRect
  4987. * parameter is the global coordinates of the window's new structure
  4988. * bounds; inRect must be non-NULL. Available in Mac OS X, and in
  4989. * CarbonLib 1.5 and later.
  4990. }
  4991. kWindowMoveTransitionAction = 3;
  4992. {
  4993. * Resizes the window. Use with the Slide transition effect. The
  4994. * inRect parameter is the global coordinates of the window's new
  4995. * structure bounds; inRect must be non-NULL. Available in Mac OS X,
  4996. * and in CarbonLib 1.5 and later.
  4997. }
  4998. kWindowResizeTransitionAction = 4;
  4999. {
  5000. * TransitionWindow()
  5001. *
  5002. * Summary:
  5003. * Shows, hides, moves, or resizes a window with appropriate
  5004. * animation and sound.
  5005. *
  5006. * Discussion:
  5007. * In Mac OS X 10.3 and later, this API sends
  5008. * kEventWindowTransitionStarted and kEventWindowTransitionCompleted
  5009. * Carbon events to the transitioning window at the start and end of
  5010. * the transition.
  5011. *
  5012. * Mac OS X threading:
  5013. * Not thread safe
  5014. *
  5015. * Parameters:
  5016. *
  5017. * inWindow:
  5018. * The window on which to act.
  5019. *
  5020. * inEffect:
  5021. * The type of visual effect to use. TransitionWindow supports the
  5022. * Zoom and Slide transition effects. The Slide effect is
  5023. * supported on Mac OS X and in CarbonLib 1.5 and later.
  5024. *
  5025. * inAction:
  5026. * The action to take on the window. TransitionWindow supports the
  5027. * Show, Hide, Move, and Resize actions. The Move and Resize
  5028. * actions are supported on Mac OS X and in CarbonLib 1.5 and
  5029. * later.
  5030. *
  5031. * inRect:
  5032. * A screen rect in global coordinates. The interpretation of the
  5033. * rect is dependent on the transition action; see the
  5034. * documentation for each action for details. May be NULL for some
  5035. * transition actions.
  5036. *
  5037. * Availability:
  5038. * Mac OS X: in version 10.0 and later in Carbon.framework
  5039. * CarbonLib: in CarbonLib 1.0 and later
  5040. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5041. }
  5042. function TransitionWindow( inWindow: WindowRef; inEffect: WindowTransitionEffect; inAction: WindowTransitionAction; {const} inRect: RectPtr { can be NULL } ): OSStatus; external name '_TransitionWindow';
  5043. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5044. {
  5045. * TransitionWindowAndParent()
  5046. *
  5047. * Summary:
  5048. * Shows or hides a window, potentially also moving a second window,
  5049. * with appropriate animation and sound.
  5050. *
  5051. * Discussion:
  5052. * In Mac OS X 10.3 and later, this API sends
  5053. * kEventWindowTransitionStarted and kEventWindowTransitionCompleted
  5054. * Carbon events to the transitioning window at the start and end of
  5055. * the transition.
  5056. *
  5057. * Mac OS X threading:
  5058. * Not thread safe
  5059. *
  5060. * Parameters:
  5061. *
  5062. * inWindow:
  5063. * The window on which to act.
  5064. *
  5065. * inParentWindow:
  5066. * The window to which the primary window is related.
  5067. *
  5068. * inEffect:
  5069. * The type of visual effect to use. TransitionWindowAndParent
  5070. * supports the Sheet transition effect.
  5071. *
  5072. * inAction:
  5073. * The action to take on the window. TransitionWindowAndParent
  5074. * supports the Show and Hide actions.
  5075. *
  5076. * inRect:
  5077. * A screen rect in global coordinates. The interpretation of the
  5078. * rect is dependent on the transition action; see the
  5079. * documentation for each action for details. May be NULL for some
  5080. * transition actions.
  5081. *
  5082. * Availability:
  5083. * Mac OS X: in version 10.0 and later in Carbon.framework
  5084. * CarbonLib: in CarbonLib 1.5 and later
  5085. * Non-Carbon CFM: not available
  5086. }
  5087. function TransitionWindowAndParent( inWindow: WindowRef; inParentWindow: WindowRef; inEffect: WindowTransitionEffect; inAction: WindowTransitionAction; {const} inRect: RectPtr { can be NULL } ): OSStatus; external name '_TransitionWindowAndParent';
  5088. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5089. {
  5090. * TransitionWindowOptions
  5091. *
  5092. * Summary:
  5093. * Extensible parameter block for the TransitionWindowWithOptions
  5094. * API.
  5095. }
  5096. type
  5097. TransitionWindowOptions = record
  5098. {
  5099. * The structure version. You must put 0 in this field.
  5100. }
  5101. version: UInt32;
  5102. {
  5103. * The duration of the fade, in seconds. For use with the Sheet,
  5104. * Slide, Fade, and Genie transition effects; ignored for other
  5105. * effects. You may pass 0 to use the default duration. The effect is
  5106. * not guaranteed to last precisely this long, but should be a close
  5107. * approximation.
  5108. }
  5109. duration: EventTime;
  5110. {
  5111. * For use with kWindowSheetTransitionEffect. This is the parent
  5112. * window of the sheet.
  5113. }
  5114. window: WindowRef;
  5115. {
  5116. * This value will be sent as the kEventParamUserData parameter for
  5117. * the kEventWindowTransitionStarted and
  5118. * kEventWindowTransitionCompleted events.
  5119. }
  5120. userData: UnivPtr;
  5121. end;
  5122. TransitionWindowOptionsPtr = ^TransitionWindowOptions;
  5123. {
  5124. * TransitionWindowWithOptions()
  5125. *
  5126. * Summary:
  5127. * Transitions a window from one state to another with appropriate
  5128. * animation and sound.
  5129. *
  5130. * Mac OS X threading:
  5131. * Not thread safe
  5132. *
  5133. * Parameters:
  5134. *
  5135. * inWindow:
  5136. * The window that should be transitioned.
  5137. *
  5138. * inEffect:
  5139. * The type of visual effect to use.
  5140. *
  5141. * inAction:
  5142. * The action to take on the window.
  5143. *
  5144. * inBounds:
  5145. * A screen rect in global coordinates. The interpretation of the
  5146. * rect is dependent on the transition action; see the
  5147. * documentation for each action for details. May be NULL for some
  5148. * transition actions.
  5149. *
  5150. * inAsync:
  5151. * Whether the transition should run synchronously or
  5152. * asynchronously. If inAsync is true, TransitionWindow will
  5153. * return immediately, and the transition will run using an event
  5154. * loop timer. You must run your event loop for the transition to
  5155. * occur. If inAsync is false, TransitionWindow will block until
  5156. * the transition is completed. In either case, the
  5157. * kEventWindowTransitionStarted and
  5158. * kEventWindowTransitionCompleted Carbon events will be sent to
  5159. * the transitioning window at the start and end of the transition.
  5160. *
  5161. * inOptions:
  5162. * Extra options that are required for some transitions. This
  5163. * parameter may be NULL if the specific transition effect does
  5164. * not require extra information.
  5165. *
  5166. * Availability:
  5167. * Mac OS X: in version 10.3 and later in Carbon.framework
  5168. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  5169. * Non-Carbon CFM: not available
  5170. }
  5171. function TransitionWindowWithOptions( inWindow: WindowRef; inEffect: WindowTransitionEffect; inAction: WindowTransitionAction; {const} inBounds: HIRectPtr { can be NULL }; inAsync: Boolean; inOptions: TransitionWindowOptionsPtr { can be NULL } ): OSStatus; external name '_TransitionWindowWithOptions';
  5172. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  5173. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5174. { ¥ Window Positioning }
  5175. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5176. {
  5177. * [Mac]MoveWindow()
  5178. *
  5179. * Mac OS X threading:
  5180. * Not thread safe
  5181. *
  5182. * Availability:
  5183. * Mac OS X: in version 10.0 and later in Carbon.framework
  5184. * CarbonLib: in CarbonLib 1.0 and later
  5185. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  5186. }
  5187. procedure MoveWindow( window: WindowRef; hGlobal: SInt16; vGlobal: SInt16; front: Boolean ); external name '_MoveWindow';
  5188. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5189. procedure MacMoveWindow( window: WindowRef; hGlobal: SInt16; vGlobal: SInt16; front: Boolean ); external name '_MoveWindow';
  5190. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5191. {
  5192. * SizeWindow()
  5193. *
  5194. * Mac OS X threading:
  5195. * Not thread safe
  5196. *
  5197. * Availability:
  5198. * Mac OS X: in version 10.0 and later in Carbon.framework
  5199. * CarbonLib: in CarbonLib 1.0 and later
  5200. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  5201. }
  5202. procedure SizeWindow( window: WindowRef; w: SInt16; h: SInt16; fUpdate: Boolean ); external name '_SizeWindow';
  5203. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5204. { Note: bBox can only be NULL when linking to CarbonLib 1.0 forward }
  5205. {
  5206. * GrowWindow()
  5207. *
  5208. * Mac OS X threading:
  5209. * Not thread safe
  5210. *
  5211. * Availability:
  5212. * Mac OS X: in version 10.0 and later in Carbon.framework
  5213. * CarbonLib: in CarbonLib 1.0 and later
  5214. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  5215. }
  5216. function GrowWindow( window: WindowRef; startPt: Point; {const} bBox: RectPtr { can be NULL } ): SInt32; external name '_GrowWindow';
  5217. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5218. {
  5219. * DragWindow()
  5220. *
  5221. * Summary:
  5222. * Allows the user to drag a window to a different position.
  5223. *
  5224. * Mac OS X threading:
  5225. * Not thread safe
  5226. *
  5227. * Parameters:
  5228. *
  5229. * window:
  5230. * The window to drag.
  5231. *
  5232. * startPt:
  5233. * The point in global coordinates where the mouse was clicked on
  5234. * the window.
  5235. *
  5236. * boundsRect:
  5237. * A rect in global coordinates outside of which the window cannot
  5238. * move. May be NULL in CarbonLib and Mac OS X, to indicate that
  5239. * there are no restrictions on window movement. This parameter is
  5240. * ignored by CarbonLib and Mac OS X 10.0 through 10.2; it is
  5241. * obeyed in Mac OS X 10.3 and later.
  5242. *
  5243. * Availability:
  5244. * Mac OS X: in version 10.0 and later in Carbon.framework
  5245. * CarbonLib: in CarbonLib 1.0 and later
  5246. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  5247. }
  5248. procedure DragWindow( window: WindowRef; startPt: Point; {const} boundsRect: RectPtr { can be NULL } ); external name '_DragWindow';
  5249. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5250. {
  5251. * ZoomWindow()
  5252. *
  5253. * Mac OS X threading:
  5254. * Not thread safe
  5255. *
  5256. * Availability:
  5257. * Mac OS X: in version 10.0 and later in Carbon.framework
  5258. * CarbonLib: in CarbonLib 1.0 and later
  5259. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  5260. }
  5261. procedure ZoomWindow( window: WindowRef; partCode: WindowPartCode; front: Boolean ); external name '_ZoomWindow';
  5262. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5263. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5264. { ¥ Window Collapsing/Expanding }
  5265. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5266. { Routines available from Mac OS 8.0 (Appearance 1.0) forward}
  5267. {
  5268. * IsWindowCollapsable()
  5269. *
  5270. * Mac OS X threading:
  5271. * Not thread safe
  5272. *
  5273. * Availability:
  5274. * Mac OS X: in version 10.0 and later in Carbon.framework
  5275. * CarbonLib: in CarbonLib 1.0 and later
  5276. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  5277. }
  5278. function IsWindowCollapsable( window: WindowRef ): Boolean; external name '_IsWindowCollapsable';
  5279. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5280. {
  5281. * IsWindowCollapsed()
  5282. *
  5283. * Mac OS X threading:
  5284. * Not thread safe
  5285. *
  5286. * Availability:
  5287. * Mac OS X: in version 10.0 and later in Carbon.framework
  5288. * CarbonLib: in CarbonLib 1.0 and later
  5289. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  5290. }
  5291. function IsWindowCollapsed( window: WindowRef ): Boolean; external name '_IsWindowCollapsed';
  5292. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5293. {
  5294. * CollapseWindow()
  5295. *
  5296. * Mac OS X threading:
  5297. * Not thread safe
  5298. *
  5299. * Availability:
  5300. * Mac OS X: in version 10.0 and later in Carbon.framework
  5301. * CarbonLib: in CarbonLib 1.0 and later
  5302. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  5303. }
  5304. function CollapseWindow( window: WindowRef; collapse: Boolean ): OSStatus; external name '_CollapseWindow';
  5305. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5306. {
  5307. * CollapseAllWindows()
  5308. *
  5309. * Mac OS X threading:
  5310. * Not thread safe
  5311. *
  5312. * Availability:
  5313. * Mac OS X: in version 10.0 and later in Carbon.framework
  5314. * CarbonLib: in CarbonLib 1.0 and later
  5315. * Non-Carbon CFM: in AppearanceLib 1.0 and later
  5316. }
  5317. function CollapseAllWindows( collapse: Boolean ): OSStatus; external name '_CollapseAllWindows';
  5318. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5319. { Routines available on Mac OS X}
  5320. {
  5321. * CreateQDContextForCollapsedWindowDockTile()
  5322. *
  5323. * Discussion:
  5324. * Creates and returns a CGrafPtr for a collapsed window's tile in
  5325. * the dock. You can use this port to draw into your window's dock
  5326. * tile with Quickdraw. You **MUST** call
  5327. * ReleaseQDContextForCollapsedWindowDockTile and NOT DisposePort
  5328. * when using this API, as it maintains more state than just the
  5329. * port. If you call DisposePort, you may leak system resources.
  5330. *
  5331. * Mac OS X threading:
  5332. * Not thread safe
  5333. *
  5334. * Parameters:
  5335. *
  5336. * inWindow:
  5337. * The window to create the dock tile port for. If this window is
  5338. * not collapsed, an error is returned.
  5339. *
  5340. * outContext:
  5341. * The Quickdraw port for you to use to draw into. If you wish to
  5342. * use CoreGraphics (Quartz) drawing, call CreateCGContextForPort
  5343. * with this port to obtain a CGContext.
  5344. *
  5345. * Result:
  5346. * An operating system result code.
  5347. *
  5348. * Availability:
  5349. * Mac OS X: in version 10.0 and later in Carbon.framework
  5350. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  5351. * Non-Carbon CFM: not available
  5352. }
  5353. function CreateQDContextForCollapsedWindowDockTile( inWindow: WindowRef; var outContext: CGrafPtr ): OSStatus; external name '_CreateQDContextForCollapsedWindowDockTile';
  5354. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5355. {
  5356. * ReleaseQDContextForCollapsedWindowDockTile()
  5357. *
  5358. * Discussion:
  5359. * Releases a port and other state created by the
  5360. * CreateQDContextForCollapsedWindowDockTile API. You MUST call this
  5361. * instead of DisposePort directly, or you may leak system resources.
  5362. *
  5363. * Mac OS X threading:
  5364. * Not thread safe
  5365. *
  5366. * Parameters:
  5367. *
  5368. * inWindow:
  5369. * The window you created the port for. If this window is not
  5370. * collapsed, an error is returned.
  5371. *
  5372. * inContext:
  5373. * The Quickdraw context to dispose.
  5374. *
  5375. * Result:
  5376. * An operating system result code.
  5377. *
  5378. * Availability:
  5379. * Mac OS X: in version 10.0 and later in Carbon.framework
  5380. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  5381. * Non-Carbon CFM: not available
  5382. }
  5383. function ReleaseQDContextForCollapsedWindowDockTile( inWindow: WindowRef; inContext: CGrafPtr ): OSStatus; external name '_ReleaseQDContextForCollapsedWindowDockTile';
  5384. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5385. {
  5386. * UpdateCollapsedWindowDockTile()
  5387. *
  5388. * Discussion:
  5389. * Automatically updates the image of a particular window in the
  5390. * dock to the current contents of the window. Use this for periodic
  5391. * updates, etc. Do not use this for animation purposes, if you want
  5392. * animation, use the above create/release drawing context APIs.
  5393. *
  5394. * Mac OS X threading:
  5395. * Not thread safe
  5396. *
  5397. * Parameters:
  5398. *
  5399. * inWindow:
  5400. * The window to update the dock tile for. If this window is not
  5401. * collapsed, an error is returned.
  5402. *
  5403. * Result:
  5404. * An operating system result code.
  5405. *
  5406. * Availability:
  5407. * Mac OS X: in version 10.0 and later in Carbon.framework
  5408. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  5409. * Non-Carbon CFM: not available
  5410. }
  5411. function UpdateCollapsedWindowDockTile( inWindow: WindowRef ): OSStatus; external name '_UpdateCollapsedWindowDockTile';
  5412. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5413. {
  5414. * SetWindowDockTileMenu()
  5415. *
  5416. * Summary:
  5417. * Sets the menu that is displayed by a window's dock tile.
  5418. *
  5419. * Discussion:
  5420. * When a window's dock tile menu is right-clicked or
  5421. * control-clicked, the Dock will always automatically display a
  5422. * menu containing a Close menu item that closes the window. If the
  5423. * application wants to add other additional menu items, it can use
  5424. * the SetWindowDockTileMenu API to provide those items. The items
  5425. * in the specified menu will be combined with the standard items
  5426. * provided by the Dock.
  5427. *
  5428. * Before the menu is actually displayed, it will receive
  5429. * kEventMenuPopulate, kEventMenuOpening, and kEventMenuEnableItems
  5430. * Carbon events, so any event handlers for these events may update
  5431. * the menu appropriately for the current state of the
  5432. * application.
  5433. *
  5434. * The application should set a command ID for each menu item in the
  5435. * dock tile menu, and when that item is chosen, a
  5436. * kEventCommandProcess Carbon event containing the item's command
  5437. * ID will be sent to the window's event target (and from there to
  5438. * the application, if the window does not handle the
  5439. * event).
  5440. *
  5441. * This API increments the refcount of the specified menu.
  5442. *
  5443. * The toolbox provides a default handler for the
  5444. * kEventWindowGetDockTileMenu event that returns the menu specified
  5445. * by the SetWindowDockTileMenu API.
  5446. *
  5447. * Mac OS X threading:
  5448. * Not thread safe
  5449. *
  5450. * Parameters:
  5451. *
  5452. * inWindow:
  5453. * The window for which to set the dock tile menu.
  5454. *
  5455. * inMenu:
  5456. * The menu to display, or NULL to remove the current dock tile
  5457. * menu.
  5458. *
  5459. * Availability:
  5460. * Mac OS X: in version 10.2 and later in Carbon.framework
  5461. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  5462. * Non-Carbon CFM: not available
  5463. }
  5464. function SetWindowDockTileMenu( inWindow: WindowRef; inMenu: MenuRef { can be NULL } ): OSStatus; external name '_SetWindowDockTileMenu';
  5465. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  5466. {
  5467. * GetWindowDockTileMenu()
  5468. *
  5469. * Summary:
  5470. * Returns the menu that is displayed by a window's dock tile.
  5471. *
  5472. * Mac OS X threading:
  5473. * Not thread safe
  5474. *
  5475. * Result:
  5476. * The application's dock tile menu, or NULL if none.
  5477. *
  5478. * Availability:
  5479. * Mac OS X: in version 10.2 and later in Carbon.framework
  5480. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  5481. * Non-Carbon CFM: not available
  5482. }
  5483. function GetWindowDockTileMenu( inWindow: WindowRef ): MenuRef; external name '_GetWindowDockTileMenu';
  5484. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  5485. {
  5486. Routines available from Mac OS 8.5 forward
  5487. or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
  5488. }
  5489. {
  5490. * GetWindowBounds()
  5491. *
  5492. * Mac OS X threading:
  5493. * Not thread safe
  5494. *
  5495. * Availability:
  5496. * Mac OS X: in version 10.0 and later in Carbon.framework
  5497. * CarbonLib: in CarbonLib 1.0 and later
  5498. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5499. }
  5500. function GetWindowBounds( window: WindowRef; regionCode: WindowRegionCode; var globalBounds: Rect ): OSStatus; external name '_GetWindowBounds';
  5501. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5502. {
  5503. * SetWindowResizeLimits()
  5504. *
  5505. * Summary:
  5506. * Sets the minimum and maximum content sizes for a window.
  5507. *
  5508. * Discussion:
  5509. * The minimum and maximum sizes are obeyed by ResizeWindow and
  5510. * GrowWindow. The default Carbon event handler installed for all
  5511. * windows will return these sizes in response to
  5512. * kEventWindowGetMinimumSize and kEventWindowGetMaximumSize events.
  5513. * When a window is first created, its minimum and maximum sizes are
  5514. * set to reasonable values (which may change from one system
  5515. * release to the next).
  5516. *
  5517. * Mac OS X threading:
  5518. * Not thread safe
  5519. *
  5520. * Parameters:
  5521. *
  5522. * inWindow:
  5523. * The window whose minimum and maximum sizes to set.
  5524. *
  5525. * inMinLimits:
  5526. * The new minimum size for the content region of the window. Pass
  5527. * NULL if you don't want to set a minimum size.
  5528. *
  5529. * inMaxLimits:
  5530. * The new maximum size for the content region of the window. Pass
  5531. * NULL if you don't want to set a maximum size.
  5532. *
  5533. * Result:
  5534. * An operating system result code.
  5535. *
  5536. * Availability:
  5537. * Mac OS X: in version 10.2 and later in Carbon.framework
  5538. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  5539. * Non-Carbon CFM: not available
  5540. }
  5541. function SetWindowResizeLimits( inWindow: WindowRef; {const} inMinLimits: HISizePtr { can be NULL }; {const} inMaxLimits: HISizePtr { can be NULL } ): OSStatus; external name '_SetWindowResizeLimits';
  5542. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  5543. {
  5544. * GetWindowResizeLimits()
  5545. *
  5546. * Summary:
  5547. * Returns the minimum and maximum content sizes for a window.
  5548. *
  5549. * Discussion:
  5550. * GetWindowResizeLimits returns the minimum and maximum sizes that
  5551. * were set by SetWindowResizeLimits. Note that it does not send
  5552. * kEventWindowGetMinimumSize or kEventWindowGetMaximumSize Carbon
  5553. * events to get these sizes; it simply retrieves the sizes from the
  5554. * WindowRef. It is entirely possible (and quite likely) that a
  5555. * given window will have event handlers for the
  5556. * kEventWindowGetMinimum/MaximumSize events that will modify or
  5557. * override the sizes in the WindowRef; therefore, to accurately
  5558. * determine the desired minimum and maximum sizes, you should send
  5559. * kEventWindowGetMinimum/MaximumSize Carbon events rather than
  5560. * using this API.
  5561. *
  5562. * Mac OS X threading:
  5563. * Not thread safe
  5564. *
  5565. * Parameters:
  5566. *
  5567. * inWindow:
  5568. * The window whose minimum and maximum sizes to retrieve.
  5569. *
  5570. * outMinLimits:
  5571. * On exit, contains the minimum size of the window's content
  5572. * region. Pass NULL if you don't want this information.
  5573. *
  5574. * outMaxLimits:
  5575. * On exit, contains the maximum size of the window's content
  5576. * region. Pass NULL if you don't want this information.
  5577. *
  5578. * Result:
  5579. * An operating system result code.
  5580. *
  5581. * Availability:
  5582. * Mac OS X: in version 10.2 and later in Carbon.framework
  5583. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  5584. * Non-Carbon CFM: not available
  5585. }
  5586. function GetWindowResizeLimits( inWindow: WindowRef; outMinLimits: HISizePtr { can be NULL }; outMaxLimits: HISizePtr { can be NULL } ): OSStatus; external name '_GetWindowResizeLimits';
  5587. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  5588. {
  5589. * ResizeWindow()
  5590. *
  5591. * Summary:
  5592. * Handles all user interaction while a window is being resized.
  5593. *
  5594. * Discussion:
  5595. * The ResizeWindow function moves either an outline of the window's
  5596. * edges (on Mac OS 9.x and earlier) or the actual window (on Mac OS
  5597. * X) around the screen, following the userÕs cursor movements, and
  5598. * handles all user interaction until the mouse button is released.
  5599. * Unlike the GrowWindow API, there is no need to follow this call
  5600. * with a call to the function SizeWindow, because once the mouse
  5601. * button is released, ResizeWindow resizes the window if the user
  5602. * has changed the window size. Once the resizing is complete,
  5603. * ResizeWindow draws the window in the new size. Your application
  5604. * should call the ResizeWindow function instead of the earlier
  5605. * Window Manager APIs SizeWindow and GrowWindow. Some windows may
  5606. * allow themselves to be resized from any corner or edge, not just
  5607. * the bottom right, and as a result, when the user resizes the
  5608. * window, the window may move on the screen and not merely change
  5609. * size. ResizeWindow informs your application of the new window
  5610. * bounds, so that your application can respond to any changes in
  5611. * the windowÕs position.
  5612. *
  5613. * Mac OS X threading:
  5614. * Not thread safe
  5615. *
  5616. * Parameters:
  5617. *
  5618. * inWindow:
  5619. * The window to be resized.
  5620. *
  5621. * inStartPoint:
  5622. * The point, in global coordinates, at which the original
  5623. * mouse-down occurred.
  5624. *
  5625. * inSizeConstraints:
  5626. * The limits on the vertical and horizontal measurements of the
  5627. * content rectangle, in pixels. Although this parameter is typed
  5628. * as a Rect, the four numbers in the structure represent limits,
  5629. * not screen coordinates. The top, left, bottom, and right fields
  5630. * of the structure specify the minimum vertical measurement
  5631. * (top), the minimum horizontal measurement (left), the maximum
  5632. * vertical measurement (bottom), and the maximum horizontal
  5633. * measurement (right). The minimum dimensions should be large
  5634. * enough to allow a manageable rectangle; 64 pixels on a side is
  5635. * typical. The maximum dimensions can be no greater than 32,767.
  5636. * You can pass NULL to allow the user to resize the window to any
  5637. * size that is contained onscreen.
  5638. *
  5639. * outNewContentRect:
  5640. * On exit, the structure contains the new dimensions of the
  5641. * windowÕs content region, in global coordinates. On Mac OS 9.x
  5642. * and earlier, you must pass a non-NULL value in this parameter;
  5643. * in Carbon, you may pass NULL if you do not need the windowÕs
  5644. * new dimensions.
  5645. *
  5646. * Result:
  5647. * Returns true if the window changed size, or false if not.
  5648. *
  5649. * Availability:
  5650. * Mac OS X: in version 10.0 and later in Carbon.framework
  5651. * CarbonLib: in CarbonLib 1.0 and later
  5652. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5653. }
  5654. function ResizeWindow( inWindow: WindowRef; inStartPoint: Point; {const} inSizeConstraints: RectPtr { can be NULL }; outNewContentRect: RectPtr { can be NULL } ): Boolean; external name '_ResizeWindow';
  5655. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5656. {
  5657. Routines available from Mac OS 8.5 forward,
  5658. or from Mac OS 8.1 forward when linking to CarbonLib 1.0.2 forward
  5659. }
  5660. {
  5661. * SetWindowBounds()
  5662. *
  5663. * Mac OS X threading:
  5664. * Not thread safe
  5665. *
  5666. * Availability:
  5667. * Mac OS X: in version 10.0 and later in Carbon.framework
  5668. * CarbonLib: in CarbonLib 1.0 and later
  5669. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5670. }
  5671. function SetWindowBounds( window: WindowRef; regionCode: WindowRegionCode; const (*var*) globalBounds: Rect ): OSStatus; external name '_SetWindowBounds';
  5672. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5673. {
  5674. * RepositionWindow()
  5675. *
  5676. * Summary:
  5677. * Positions a window according in one of the standard window
  5678. * locations.
  5679. *
  5680. * Mac OS X threading:
  5681. * Not thread safe
  5682. *
  5683. * Parameters:
  5684. *
  5685. * window:
  5686. * The window to position.
  5687. *
  5688. * parentWindow:
  5689. * For some positioning methods, the new location for the
  5690. * positioned window will be calculated based on the parent
  5691. * windowÕs position. On Mac OS X 10.3 and later, some positioning
  5692. * methods allow this parameter to be the same as the window
  5693. * parameter; CarbonLib and earlier versions of Mac OS X require
  5694. * that it be different from the window parameter. See the
  5695. * WindowPositionMethod documentation for details on which methods
  5696. * allow the parent to be the same as the positioned window.
  5697. *
  5698. * method:
  5699. * The window positioning method. This should be one of the
  5700. * WindowPositionMethod constants.
  5701. *
  5702. * Availability:
  5703. * Mac OS X: in version 10.0 and later in Carbon.framework
  5704. * CarbonLib: in CarbonLib 1.0 and later
  5705. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5706. }
  5707. function RepositionWindow( window: WindowRef; parentWindow: WindowRef; method: WindowPositionMethod ): OSStatus; external name '_RepositionWindow';
  5708. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5709. {
  5710. * MoveWindowStructure()
  5711. *
  5712. * Mac OS X threading:
  5713. * Not thread safe
  5714. *
  5715. * Availability:
  5716. * Mac OS X: in version 10.0 and later in Carbon.framework
  5717. * CarbonLib: in CarbonLib 1.0 and later
  5718. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5719. }
  5720. function MoveWindowStructure( window: WindowRef; hGlobal: SInt16; vGlobal: SInt16 ): OSStatus; external name '_MoveWindowStructure';
  5721. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5722. {
  5723. Routines available from Mac OS 8.5 forward,
  5724. or from Mac OS 8.6 forward when linking to CarbonLib 1.1 forward
  5725. }
  5726. { Routines available from Mac OS 8.5 forward}
  5727. {
  5728. * IsWindowInStandardState()
  5729. *
  5730. * Summary:
  5731. * Determines whether a window is currently zoomed in to the user
  5732. * state or zoomed out to the standard state.
  5733. *
  5734. * Discussion:
  5735. * IsWindowInStandardState compares the windowÕs current dimensions
  5736. * to those given by the inIdealSize parameter to determine if the
  5737. * window is currently in its standard (zoomed-out) state. Your
  5738. * application may use IsWindowInStandardState to decide whether a
  5739. * userÕs click of the zoom box is a request to zoom in to the user
  5740. * state or out to the standard state. Your application may also use
  5741. * IsWindowInStandardState to determine the size and position of the
  5742. * standard state that the Window Manager would calculate for a
  5743. * window, given a specified ideal size; this value is returned in
  5744. * the outIdealStandardState parameter.
  5745. *
  5746. * Mac OS X threading:
  5747. * Not thread safe
  5748. *
  5749. * Parameters:
  5750. *
  5751. * inWindow:
  5752. * The window for which to determine the zoom state.
  5753. *
  5754. * inIdealSize:
  5755. * The ideal width and height of the windowÕs content region,
  5756. * regardless of the actual screen device dimensions. If you set
  5757. * idealSize to NULL, IsWindowInStandardState examines the
  5758. * dimensions stored in the stdState field of the WStateData
  5759. * structure attached to the window.
  5760. *
  5761. * outIdealStandardState:
  5762. * On exit, contains the global coordinates for the content region
  5763. * of the window in its standard state, based on the data supplied
  5764. * in the inIdealSize parameter. You may pass NULL if you do not
  5765. * need this information.
  5766. *
  5767. * Result:
  5768. * Returns true if the window is currently in its standard
  5769. * (zoomed-out) state, or false if the window is a non-zoomed-out
  5770. * state.
  5771. *
  5772. * Availability:
  5773. * Mac OS X: in version 10.0 and later in Carbon.framework
  5774. * CarbonLib: in CarbonLib 1.0 and later
  5775. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5776. }
  5777. function IsWindowInStandardState( inWindow: WindowRef; {const} inIdealSize: PointPtr { can be NULL }; outIdealStandardState: RectPtr { can be NULL } ): Boolean; external name '_IsWindowInStandardState';
  5778. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5779. {
  5780. * ZoomWindowIdeal()
  5781. *
  5782. * Summary:
  5783. * Zooms a window in accordance with human interface guidelines.
  5784. *
  5785. * Discussion:
  5786. * Applications should use the ZoomWindowIdeal API instead of the
  5787. * older ZoomWindow API. When your application calls
  5788. * ZoomWindowIdeal, it automatically conforms to the human interface
  5789. * guidelines for determining a windowÕs standard state: the window
  5790. * is moved as little as possible when switching between user and
  5791. * standard states, the window is zoomed to the screen that contains
  5792. * the largest portion of the window, and the window is positioned
  5793. * in its zoomed-out size to avoid the Dock on Mac OS X.
  5794. *
  5795. * The ZoomWindowIdeal API calculates a windowÕs ideal standard
  5796. * state and updates a windowÕs ideal user state independently of
  5797. * the WStateData structure. Previously, the window definition
  5798. * function was responsible for updating the user state, but because
  5799. * it relies upon the WStateData structure, the window definition
  5800. * function is unaware of the ideal standard state and can no longer
  5801. * track the windowÕs zoom state reliably. The Window Manager
  5802. * provides the GetWindowIdealUserState and SetWindowIdealUserState
  5803. * APIs to access a window's current ideal user state, previously
  5804. * recorded by ZoomWindowIdeal.
  5805. *
  5806. * Mac OS X threading:
  5807. * Not thread safe
  5808. *
  5809. * Parameters:
  5810. *
  5811. * inWindow:
  5812. * The window to be zoomed.
  5813. *
  5814. * inPartCode:
  5815. * The direction of the zoom, either inZoomIn or inZoomOut. The
  5816. * value passed in this parameter should generally be determined
  5817. * by calling IsWindowInStandardState; if IsWindowInStandardState
  5818. * returns true, pass inZoomIn, otherwise pass inZoomOut.
  5819. *
  5820. * ioIdealSize:
  5821. * When you specify inZoomIn in the inPartCode parameter, this
  5822. * parameter is unused on entry; you pass a pointer to a Point
  5823. * structure, but do not fill the structure with data. On exit,
  5824. * the Point contains the new height and width of the windowÕs
  5825. * content region, and ZoomWindowIdeal restores the previous ideal
  5826. * user state. When you specify inZoomOut in the inPartCode
  5827. * parameter, you pass the ideal height and width of the windowÕs
  5828. * content region in the Point structure. On return, the Point
  5829. * contains the new height and width of the windowÕs content
  5830. * region; ZoomWindowIdeal saves the current user state of the
  5831. * window and zooms the window to its ideal size for the standard
  5832. * state.
  5833. *
  5834. * Prior to Mac OS X Mac OS X 10.4, the ZoomWindowIdeal API
  5835. * malfunctioned if passed an idealSize that was large enough to
  5836. * cause 16-bit integer overflow when added to the window's
  5837. * current position. Therefore, when specifying the ideal size
  5838. * parameter, you should generally not use values that are close
  5839. * to 32767. It is better to limit your ideal size to, say, 16K.
  5840. *
  5841. * Result:
  5842. * An operating system result code.
  5843. *
  5844. * Availability:
  5845. * Mac OS X: in version 10.0 and later in Carbon.framework
  5846. * CarbonLib: in CarbonLib 1.0 and later
  5847. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5848. }
  5849. function ZoomWindowIdeal( inWindow: WindowRef; inPartCode: WindowPartCode; var ioIdealSize: Point ): OSStatus; external name '_ZoomWindowIdeal';
  5850. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5851. {
  5852. * GetWindowIdealUserState()
  5853. *
  5854. * Summary:
  5855. * Returns the bounds of a windowÕs content region in its user
  5856. * (zoomed-in) state.
  5857. *
  5858. * Discussion:
  5859. * Traditionally, the user (zoomed-in) state of a window has been
  5860. * stored in the WStateData structure attached to a window. This
  5861. * field is updated by the window definition when the user clicks on
  5862. * the zoom box and the window definition determines that the window
  5863. * is currently not zoomed out. When determining whether the window
  5864. * is zoomed out, however, the window definition can only look at
  5865. * the standard state stored in the WStateData field. With the
  5866. * introduction of the ZoomWindowIdeal API, there is a new basis for
  5867. * determining whether a window is zoomed out: the windowÕs ideal
  5868. * size. The window definition does not have access to the windowÕs
  5869. * ideal size, and therefore cannot accurately determine whether a
  5870. * window that is zoomed with ZoomWindowIdeal is in its user state
  5871. * or standard state; therefore, the user state that the window
  5872. * definition stores in the WStateData is also unreliable. The
  5873. * ZoomWindowIdeal API therefore stores the windowÕs user state
  5874. * before zooming out in a new location, which is accessed using the
  5875. * GetWindowIdealUserState API. The GetWindowIdealUserState API
  5876. * returns the windowÕs user state most recently recorded by
  5877. * ZoomWindowIdeal.
  5878. *
  5879. * Mac OS X threading:
  5880. * Not thread safe
  5881. *
  5882. * Parameters:
  5883. *
  5884. * inWindow:
  5885. * The window whose ideal user state you wish to retrieve.
  5886. *
  5887. * outUserState:
  5888. * On exit, contains the global coordinates of the windowÕs
  5889. * content region when zoomed in. On Mac OS X 10.1 and earlier,
  5890. * and CarbonLib 1.5 and earlier, the windowÕs ideal user state is
  5891. * an empty rect with coordinates (0,0,0,0) if the window has
  5892. * never been zoomed out; you should check for an empty rect and
  5893. * use GetWindowBounds with the kWindowContentRgn selector to
  5894. * determine the windowÕs current content region. On later
  5895. * versions of Mac OS X and CarbonLib, GetWindowIdealUserState
  5896. * automatically returns the windowÕs current content bounds if
  5897. * the window has not yet been zoomed.
  5898. *
  5899. * Result:
  5900. * An operating system result code.
  5901. *
  5902. * Availability:
  5903. * Mac OS X: in version 10.0 and later in Carbon.framework
  5904. * CarbonLib: in CarbonLib 1.0 and later
  5905. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5906. }
  5907. function GetWindowIdealUserState( inWindow: WindowRef; var outUserState: Rect ): OSStatus; external name '_GetWindowIdealUserState';
  5908. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5909. {
  5910. * SetWindowIdealUserState()
  5911. *
  5912. * Summary:
  5913. * Sets the bounds of a windowÕs content region in its user
  5914. * (zoomed-in) state.
  5915. *
  5916. * Discussion:
  5917. * The windowÕs ideal user state is used by the ZoomWindowIdeal API
  5918. * when zooming in. The ideal user state is ignored by the
  5919. * ZoomWindow API.
  5920. *
  5921. * Mac OS X threading:
  5922. * Not thread safe
  5923. *
  5924. * Parameters:
  5925. *
  5926. * inWindow:
  5927. * The window whose ideal user state to set.
  5928. *
  5929. * inUserState:
  5930. * The global coordinates of the windowÕs content region in its
  5931. * ideal user state.
  5932. *
  5933. * Result:
  5934. * An operating system result code.
  5935. *
  5936. * Availability:
  5937. * Mac OS X: in version 10.0 and later in Carbon.framework
  5938. * CarbonLib: in CarbonLib 1.0 and later
  5939. * Non-Carbon CFM: in WindowsLib 8.5 and later
  5940. }
  5941. function SetWindowIdealUserState( inWindow: WindowRef; const (*var*) inUserState: Rect ): OSStatus; external name '_SetWindowIdealUserState';
  5942. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5943. { Routines available in CarbonLib 1.1 and later}
  5944. {
  5945. * GetWindowGreatestAreaDevice()
  5946. *
  5947. * Summary:
  5948. * Returns the graphics device with the greatest area of
  5949. * intersection with a specified window region.
  5950. *
  5951. * Mac OS X threading:
  5952. * Not thread safe
  5953. *
  5954. * Parameters:
  5955. *
  5956. * inWindow:
  5957. * The window to compare against.
  5958. *
  5959. * inRegion:
  5960. * The window region to compare against.
  5961. *
  5962. * outGreatestDevice:
  5963. * On exit, the graphics device with the greatest intersection.
  5964. * May be NULL.
  5965. *
  5966. * outGreatestDeviceRect:
  5967. * On exit, the bounds of the graphics device with the greatest
  5968. * intersection. May be NULL. If the device with the greatest
  5969. * intersection also contains the menu bar, the device rect will
  5970. * exclude the menu bar area.
  5971. *
  5972. * Availability:
  5973. * Mac OS X: in version 10.0 and later in Carbon.framework
  5974. * CarbonLib: in CarbonLib 1.1 and later
  5975. * Non-Carbon CFM: not available
  5976. }
  5977. function GetWindowGreatestAreaDevice( inWindow: WindowRef; inRegion: WindowRegionCode; outGreatestDevice: GDHandlePtr { can be NULL }; outGreatestDeviceRect: RectPtr { can be NULL } ): OSStatus; external name '_GetWindowGreatestAreaDevice';
  5978. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  5979. {
  5980. * WindowConstrainOptions
  5981. *
  5982. }
  5983. type
  5984. WindowConstrainOptions = UInt32;
  5985. const
  5986. {
  5987. * The window may be resized if necessary to make it fit onscreen.
  5988. }
  5989. kWindowConstrainMayResize = 1 shl 0;
  5990. {
  5991. * The window will be moved even if it doesn't fit entirely onscreen.
  5992. }
  5993. kWindowConstrainMoveRegardlessOfFit = 1 shl 1;
  5994. {
  5995. * Allow partial intersection of the specified window region with the
  5996. * screen, instead of requiring total intersection.
  5997. }
  5998. kWindowConstrainAllowPartial = 1 shl 2;
  5999. {
  6000. * Only calculate the new window bounds; don't actually move the
  6001. * window.
  6002. }
  6003. kWindowConstrainCalcOnly = 1 shl 3;
  6004. {
  6005. * Use TransitionWindow with kWindowSlideTransitionEffect to move
  6006. * windows onscreen. Available in Mac OS X 10.2.
  6007. }
  6008. kWindowConstrainUseTransitionWindow = 1 shl 4;
  6009. {
  6010. * The most common options: don't resize the window, move the window
  6011. * regardless of fit to the screen, require total intersection of the
  6012. * specified window region with the screen, and do actually move the
  6013. * window.
  6014. }
  6015. kWindowConstrainStandardOptions = kWindowConstrainMoveRegardlessOfFit;
  6016. {
  6017. * ConstrainWindowToScreen()
  6018. *
  6019. * Summary:
  6020. * Moves and resizes a window so that it's contained entirely on a
  6021. * single screen.
  6022. *
  6023. * Mac OS X threading:
  6024. * Not thread safe
  6025. *
  6026. * Parameters:
  6027. *
  6028. * inWindowRef:
  6029. * The window to constrain.
  6030. *
  6031. * inRegionCode:
  6032. * The window region to constrain.
  6033. *
  6034. * inOptions:
  6035. * Flags controlling how the window is constrained.
  6036. *
  6037. * inScreenRect:
  6038. * A rectangle, in global coordinates, in which to constrain the
  6039. * window. May be NULL. If NULL, the window is constrained to the
  6040. * screen with the greatest intersection with the specified window
  6041. * region.
  6042. *
  6043. * outStructure:
  6044. * On exit, contains the new structure bounds of the window, in
  6045. * global coordinates. May be NULL.
  6046. *
  6047. * Availability:
  6048. * Mac OS X: in version 10.0 and later in Carbon.framework
  6049. * CarbonLib: in CarbonLib 1.1 and later
  6050. * Non-Carbon CFM: not available
  6051. }
  6052. function ConstrainWindowToScreen( inWindowRef: WindowRef; inRegionCode: WindowRegionCode; inOptions: WindowConstrainOptions; {const} inScreenRect: RectPtr { can be NULL }; outStructure: RectPtr { can be NULL } ): OSStatus; external name '_ConstrainWindowToScreen';
  6053. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6054. {
  6055. * GetAvailableWindowPositioningBounds()
  6056. *
  6057. * Summary:
  6058. * Returns the available window positioning bounds on the given
  6059. * screen (i.e., the screen rect minus the MenuBar and Dock if
  6060. * located on that screen).
  6061. *
  6062. * Mac OS X threading:
  6063. * Not thread safe
  6064. *
  6065. * Parameters:
  6066. *
  6067. * inDevice:
  6068. * The device for which to find the available bounds.
  6069. *
  6070. * outAvailableRect:
  6071. * On exit, contains the available bounds for the given device.
  6072. *
  6073. * Availability:
  6074. * Mac OS X: in version 10.0 and later in Carbon.framework
  6075. * CarbonLib: in CarbonLib 1.3 and later
  6076. * Non-Carbon CFM: not available
  6077. }
  6078. function GetAvailableWindowPositioningBounds( inDevice: GDHandle; var outAvailableRect: Rect ): OSStatus; external name '_GetAvailableWindowPositioningBounds';
  6079. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6080. {
  6081. * GetAvailableWindowPositioningRegion()
  6082. *
  6083. * Summary:
  6084. * Returns the available window positioning region on the given
  6085. * screen (i.e., the screen rect minus the MenuBar and Dock if
  6086. * located on that screen).
  6087. *
  6088. * Discussion:
  6089. * GetAvailableWindowPositionRegion differs from
  6090. * GetAvailableWindowPositioningBounds in that the Bounds API
  6091. * removes the entire area that may theoretically be covered by the
  6092. * Dock, even if the the Dock does not currently reach from edge to
  6093. * edge of the device on which it is positioned. The Region API
  6094. * includes the area at the sides of the Dock that is not covered by
  6095. * the Dock in the available region.
  6096. *
  6097. * Mac OS X threading:
  6098. * Not thread safe
  6099. *
  6100. * Parameters:
  6101. *
  6102. * inDevice:
  6103. * The device for which to find the available bounds.
  6104. *
  6105. * ioRgn:
  6106. * On entry, contains a preallocated RgnHandle. On exit, the
  6107. * RgnHandle has been modified to contain the available region for
  6108. * the given device.
  6109. *
  6110. * Availability:
  6111. * Mac OS X: in version 10.2 and later in Carbon.framework
  6112. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  6113. * Non-Carbon CFM: not available
  6114. }
  6115. function GetAvailableWindowPositioningRegion( inDevice: GDHandle; ioRgn: RgnHandle ): OSStatus; external name '_GetAvailableWindowPositioningRegion';
  6116. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  6117. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  6118. { ¥ Window Visibility }
  6119. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  6120. {
  6121. * HideWindow()
  6122. *
  6123. * Mac OS X threading:
  6124. * Not thread safe
  6125. *
  6126. * Availability:
  6127. * Mac OS X: in version 10.0 and later in Carbon.framework
  6128. * CarbonLib: in CarbonLib 1.0 and later
  6129. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  6130. }
  6131. procedure HideWindow( window: WindowRef ); external name '_HideWindow';
  6132. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6133. {
  6134. * [Mac]ShowWindow()
  6135. *
  6136. * Mac OS X threading:
  6137. * Not thread safe
  6138. *
  6139. * Availability:
  6140. * Mac OS X: in version 10.0 and later in Carbon.framework
  6141. * CarbonLib: in CarbonLib 1.0 and later
  6142. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  6143. }
  6144. procedure ShowWindow( window: WindowRef ); external name '_ShowWindow';
  6145. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6146. function MacShowWindow__NAME__ShowWindow( possibleWindow: WindowRef ): Boolean; external name '_MacShowWindow__NAME__ShowWindow';
  6147. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6148. {
  6149. * ShowHide()
  6150. *
  6151. * Mac OS X threading:
  6152. * Not thread safe
  6153. *
  6154. * Availability:
  6155. * Mac OS X: in version 10.0 and later in Carbon.framework
  6156. * CarbonLib: in CarbonLib 1.0 and later
  6157. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  6158. }
  6159. procedure ShowHide( window: WindowRef; showFlag: Boolean ); external name '_ShowHide';
  6160. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6161. {
  6162. * [Mac]IsWindowVisible()
  6163. *
  6164. * Mac OS X threading:
  6165. * Not thread safe
  6166. *
  6167. * Availability:
  6168. * Mac OS X: in version 10.0 and later in Carbon.framework
  6169. * CarbonLib: in CarbonLib 1.0 and later
  6170. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  6171. }
  6172. function IsWindowVisible( window: WindowRef ): Boolean; external name '_IsWindowVisible';
  6173. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6174. function MacIsWindowVisible__NAME__IsWindowVisible( window: WindowRef ): Boolean; external name '_MacIsWindowVisible__NAME__IsWindowVisible';
  6175. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6176. {
  6177. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  6178. ¥ÊLatent window visibility
  6179. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  6180. }
  6181. {
  6182. * WindowLatentVisibility
  6183. *
  6184. * Summary:
  6185. * Reasons why a window is currently invisible when ordinarily it
  6186. * would be visible.
  6187. }
  6188. type
  6189. WindowLatentVisibility = UInt32;
  6190. WindowLatentVisibilityPtr = ^WindowLatentVisibility;
  6191. const
  6192. {
  6193. * Window is a floater and floating windows are hidden
  6194. }
  6195. kWindowLatentVisibleFloater = 1 shl 0;
  6196. {
  6197. * Window has HideOnSuspend and we are suspended
  6198. }
  6199. kWindowLatentVisibleSuspend = 1 shl 1;
  6200. {
  6201. * Window has HideOnFullScreen and we are full-screen
  6202. }
  6203. kWindowLatentVisibleFullScreen = 1 shl 2;
  6204. {
  6205. * Window's process is hidden
  6206. }
  6207. kWindowLatentVisibleAppHidden = 1 shl 3;
  6208. {
  6209. * Window is in an owned group and the owner was collapsed
  6210. }
  6211. kWindowLatentVisibleCollapsedOwner = 1 shl 4;
  6212. {
  6213. * Window is in a HideOnCollapse group and another window in the
  6214. * group was collapsed
  6215. }
  6216. kWindowLatentVisibleCollapsedGroup = 1 shl 5;
  6217. {
  6218. * IsWindowLatentVisible()
  6219. *
  6220. * Summary:
  6221. * Indicates whether a window is visible onscreen and also whether
  6222. * it is latently visible but not currently onscreen.
  6223. *
  6224. * Discussion:
  6225. * All windows are either onscreen or offscreen. A window that is
  6226. * offscreen may still be latently visible; this occurs, for
  6227. * example, when a floating window is hidden as an application is
  6228. * suspended. The floating window is not visible onscreen, but it is
  6229. * latently visible and is only hidden due to the suspended state of
  6230. * the application; when the application becomes active again, the
  6231. * floating window will be placed back onscreen.
  6232. * IsWindowLatentVisible may be used to determine both the window's
  6233. * onscreen/offscreen status and its latent visibility (if the
  6234. * window is offscreen).
  6235. *
  6236. * Mac OS X threading:
  6237. * Not thread safe
  6238. *
  6239. * Parameters:
  6240. *
  6241. * inWindow:
  6242. * The window whose visibility to return.
  6243. *
  6244. * outLatentVisible:
  6245. * If the window is onscreen, the latent visibility is zero. If
  6246. * the window is offscreen, this parameter is used to return the
  6247. * latent visibility flags of the window. If any of the flags are
  6248. * set, then the window is latently visible.
  6249. *
  6250. * Result:
  6251. * Indicates whether the window is currently onscreen.
  6252. *
  6253. * Availability:
  6254. * Mac OS X: in version 10.1 and later in Carbon.framework
  6255. * CarbonLib: in CarbonLib 1.5 and later
  6256. * Non-Carbon CFM: not available
  6257. }
  6258. function IsWindowLatentVisible( inWindow: WindowRef; outLatentVisible: WindowLatentVisibilityPtr { can be NULL } ): Boolean; external name '_IsWindowLatentVisible';
  6259. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  6260. {
  6261. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  6262. ¥ÊWindow Availability for ExposŽ
  6263. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  6264. }
  6265. {
  6266. * Summary:
  6267. * Window availability options for ExposŽ.
  6268. *
  6269. * Discussion:
  6270. * These options are used with the HIWindowGet/ChangeAvailability
  6271. * APIs to override the default behavior of the Window Manager in
  6272. * determining whether a window is visible during ExposŽ. Most
  6273. * applications should not override the default behavior; these
  6274. * options should only be used in special cases. By default, newly
  6275. * created windows of class kDocumentWindowClass are given an
  6276. * availability of zero (meaning that they are available during
  6277. * ExposŽ), and windows from all other window classes are given an
  6278. * availability of kHIWindowExposeHidden.
  6279. }
  6280. const
  6281. {
  6282. * This window is hidden during ExposŽÕs ÒAll windowsÓ and
  6283. * ÒApplication windowsÓ modes. If this bit is not set, the window is
  6284. * visible during these modes.
  6285. }
  6286. kHIWindowExposeHidden = 1 shl 0;
  6287. type
  6288. HIWindowAvailability = OptionBits;
  6289. {
  6290. * HIWindowGetAvailability()
  6291. *
  6292. * Summary:
  6293. * Returns the availability of a window during ExposŽ.
  6294. *
  6295. * Mac OS X threading:
  6296. * Not thread safe
  6297. *
  6298. * Parameters:
  6299. *
  6300. * inWindow:
  6301. * The window whose availability to return.
  6302. *
  6303. * outAvailability:
  6304. * On exit, contains the window availability.
  6305. *
  6306. * Availability:
  6307. * Mac OS X: in version 10.4 and later in Carbon.framework
  6308. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  6309. * Non-Carbon CFM: not available
  6310. }
  6311. function HIWindowGetAvailability( inWindow: HIWindowRef; var outAvailability: HIWindowAvailability ): OSStatus; external name '_HIWindowGetAvailability';
  6312. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  6313. {
  6314. * HIWindowChangeAvailability()
  6315. *
  6316. * Summary:
  6317. * Alters the availability of a window during ExposŽ.
  6318. *
  6319. * Mac OS X threading:
  6320. * Not thread safe
  6321. *
  6322. * Parameters:
  6323. *
  6324. * inWindow:
  6325. * The window whose availability to change.
  6326. *
  6327. * inSetAvailability:
  6328. * The availability bits to set.
  6329. *
  6330. * inClearAvailability:
  6331. * The availability bits to clear.
  6332. *
  6333. * Availability:
  6334. * Mac OS X: in version 10.4 and later in Carbon.framework
  6335. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  6336. * Non-Carbon CFM: not available
  6337. }
  6338. function HIWindowChangeAvailability( inWindow: HIWindowRef; inSetAvailability: HIWindowAvailability; inClearAvailability: HIWindowAvailability ): OSStatus; external name '_HIWindowChangeAvailability';
  6339. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  6340. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  6341. {
  6342. ¥ Sheets
  6343. Sheets are a new user interface object in Mac OS X. A sheet is a modal alert or dialog,
  6344. but unlike a traditional alert or dialog window (which is visually separate from the
  6345. frontmost document window), a sheet appears to be attached to its parent window; it
  6346. moves and z-orders simultaneously with its parent. Furthermore, sheets on Mac OS X
  6347. use a new type of modality called window modality. A traditional alert or dialog is
  6348. app-modal; it prevents user interaction with all other windows in the current application.
  6349. A sheet is window-modal; it only prevents user interaction with its parent window, and
  6350. events continue to flow to other windows in the application.
  6351. ¥ Sheet Event Handling
  6352. Implementing a sheet window in your application generally requires some modifications
  6353. to your event-handling code. A traditional app-modal window is implemented using a modal
  6354. event loop; your application starts a new event loop (either by processing events itself,
  6355. or by calling ModalDialog), which does not return back to your application's main event
  6356. loop until the app-modal window has closed.
  6357. Starting a new event loop doesn't work with sheets, because typically the modal event loop
  6358. will only handle events destined for the sheet, and not events for other windows, but
  6359. a sheet only blocks events for its parent window, and your application must still handle
  6360. events for the rest of its windows as normal. Therefore, you will usually not use a modal
  6361. event loop to handle events in a sheet. Rather, you will show the sheet window, and then
  6362. return directly back to your main event loop. The Carbon Event Manager automatically
  6363. prevents events from reaching the sheet's parent window; events in your application's
  6364. other windows are still returned to you via WaitNextEvent or your application's Carbon
  6365. event handlers, where you can process them as normal.
  6366. You have several choices for handling events in the sheet itself. A sheet is, at the most
  6367. basic level, simply another window in your application, and you can use any of the standard
  6368. event-handling APIs to receive events in the sheet. For example, you can:
  6369. - receive events in the sheet via WaitNextEvent, and handle them directly in your
  6370. main event loop
  6371. - create the sheet using Dialog Manager APIs, and use IsDialogEvent and DialogSelect
  6372. to handle events in the sheet
  6373. - install Carbon event handlers on the sheet, and respond to events in your handlers
  6374. Which approach you choose is up to you.
  6375. ¥ Sheets in CarbonLib
  6376. The sheet window class, sheet WDEF procIDs, and ShowSheetWindow, HideSheetWindow, and
  6377. GetSheetWindowParent APIs are implemented in CarbonLib starting with version 1.3. However,
  6378. since Mac OS 8 and 9 do not traditionally support a window-modal user interface, sheet
  6379. windows are displayed as app-modal windows by CarbonLib. From your application's perspective,
  6380. event handling for a sheet in CarbonLib is the same as event handling for a sheet on X;
  6381. ShowSheetWindow still returns immediately, and your application should still return back
  6382. to its main event loop and be prepared to handle events in other windows. On CarbonLib,
  6383. your application will simply never receive any user input in any of your other windows;
  6384. since the sheet has application modality, the Carbon Event Manager will discard events
  6385. in any windows other than the sheet.
  6386. ¥ÊCreating a Sheet
  6387. A sheet is just a normal window with a special window class: kSheetWindowClass or
  6388. kSheetAlertWindowClass. As such, it can be created in any of the ways you might create
  6389. a window: NewWindow, NewCWindow, CreateNewWindow, GetNewWindow, GetNewCWindow,
  6390. CreateWindowFromCollection, CreateWindowFromResource, CreateWindowFromNib, NewDialog,
  6391. NewColorDialog, NewFeaturesDialog, or GetNewDialog.
  6392. The Window Manager defines two window classes and two WDEF procIDs for sheets:
  6393. - kSheetWindowClass and kSheetAlertWindowClass
  6394. - kWindowSheetProc and kWindowSheetAlertProc
  6395. The window classes may be used with CreateNewWindow, CreateWindowFromCollection, and
  6396. CreateWindowFromResource; the WDEF procIDs may be used with NewWindow, NewCWindow, NewDialog,
  6397. NewColorDialog, NewFeaturesDialog, and in 'WDEF' and 'DLOG' resources.
  6398. Mac OS X 10.0 only supports kSheetWindowClass and kWindowSheetProc;
  6399. it does not support kSheetAlertWindowClass or kWindowSheetAlertProc. The latter window
  6400. class and procID were added in CarbonLib 1.3 and Mac OS X 10.1. A new window class and
  6401. procID were necessary for CarbonLib support because
  6402. sheets can be used for both alerts ("Do you want to save changes before closing this
  6403. window?") and dialogs (a Navigation Services PutFile dialog). On Mac OS X, sheet windows
  6404. have the same appearance when used for either an alert or a dialog, but on Mac OS 8 and 9,
  6405. alert windows have a different appearance from dialog windows. Two separate window classes
  6406. are necessary for CarbonLib to know whether to display a sheet using a movable alert or a
  6407. movable dialog window. Therefore, it is recommended that you use kSheetAlertWindowClass when
  6408. creating a sheet window that will be used to display an alert, although this is not required.
  6409. ¥ Displaying a Sheet
  6410. A sheet is made visible by calling the ShowSheetWindow API. This API shows the sheet,
  6411. using whatever visual effects are appropriate for the platform, and then returns immediately.
  6412. On Mac OS X, it creates a window group and places the sheet and its parent window into the
  6413. group; it also marks the sheet as window-modal. On CarbonLib, it marks the sheet as app-modal
  6414. but does not create a window group.
  6415. On Mac OS X, before the sheet window is actually made visible, ShowSheetWindow sends a
  6416. kEventWindowDrawContent event to the sheet window, asking it to draw its content into the
  6417. window's offscreen buffer. The sheet must handle this event, or its content area will be
  6418. blank after the sheet becomes visible.
  6419. In some cases, this handler is automatically provided for you:
  6420. - If you create your sheet window using the Dialog Manager, the Dialog Manager
  6421. automatically installs a handler for this event that calls DrawDialog, so you
  6422. don't need to install the handler yourself.
  6423. - If you install the standard Carbon window event handler on your sheet window
  6424. (using kWindowStandardHandlerAttribute or InstallStandardEventHandler), the
  6425. standard handler automatically handles this event and calls DrawControls.
  6426. Typically, your event handling code (whether it uses WaitNextEvent, the Dialog Manager,
  6427. or Carbon event handlers) will receive and respond to events in the sheet until the
  6428. user does something that should cause the sheet to close. This might be clicking in an
  6429. OK or Cancel button, for example. At that time, your event handling code must call either
  6430. HideSheetWindow or DetachSheetWindow. The sheet window will hide, but will not be destroyed,
  6431. so you can use it again later if you want.
  6432. ¥ÊClosing a sheet
  6433. A sheet is normally hidden by calling the HideSheetWindow API. HideSheetWindow provides the
  6434. visual effects of zooming the sheet back into the parent window's title bar and moving the
  6435. parent window back to its original position. In Mac OS X 10.3 and later, the DetachSheetWindow
  6436. API is also available. DetachSheetWindow ungroups the sheet from its parent, releases the
  6437. retain count acquired by ShowSheetWindow on the parent window, and removes all event handlers
  6438. installed by ShowSheetWindow, but does not hide the sheet window; an application would typically
  6439. call DetachSheetWindow and then HideWindow to hide the sheet window without the sheet closing
  6440. animation. This may be useful if, for example, the sheet were being used to ask if changes to
  6441. a modified document should be saved; if the user chooses "DonÕt Save", then the application
  6442. could use DetachSheetWindow and then hide both the sheet and the document immediately, so that
  6443. the document closes as quickly as possible without taking time for the closing animation.
  6444. The Navigation Services Save Changes dialog does this automatically.
  6445. You _must_ call either HideSheetWindow or DetachSheetWindow before destroying a sheet that has
  6446. been shown with ShowSheetWindow. You may not simply dispose of a sheet window without first using
  6447. Hide or DetachSheetWindow; doing so will leave an extra refcount on the parent window, and will
  6448. leave the parent window still embedded in the sheet window group.
  6449. ¥ Sheet Transparency
  6450. Sheets should be transparent so that the user can see some of the document content behind
  6451. the sheet and remember the context in which the sheet was displayed. In Mac OS X 10.1,
  6452. a sheet is made transparent by using the kThemeBrushSheetBackgroundTransparent constant for
  6453. the sheet windowÕs theme background brush. In Mac OS X 10.2 and later, sheets are only
  6454. transparent if this brush is used and if the sheet window uses compositing mode (enabled by
  6455. setting the kWindowCompositingAttribute window attribute when the sheet window is created).
  6456. }
  6457. {
  6458. * ShowSheetWindow()
  6459. *
  6460. * Summary:
  6461. * Shows a sheet window using appropriate visual effects.
  6462. *
  6463. * Discussion:
  6464. * ShowSheetWindow is implemented in both CarbonLib 1.3 and Mac OS
  6465. * X. Since Mac OS 9 does not use a window-modal user interface for
  6466. * alerts and dialogs, ShowSheetWindow in CarbonLib does not bind
  6467. * the sheet to the parent window in the same way that it does on
  6468. * Mac OS X; instead, it shows the sheet like a standard
  6469. * movable-modal dialog window. Sheet windows must use the window
  6470. * classes kSheetWindowClass or kSheetAlertWindowClass to get the
  6471. * right appearance on both platforms.
  6472. *
  6473. * Note that ShowSheetWindow will increment the retain count of the
  6474. * parent window. The retain count is decremented by HideSheetWindow
  6475. * and DetachSheetWindow. You must call one of those APIs before
  6476. * destroying the sheet window.
  6477. *
  6478. * On Mac OS X, ShowSheetWindow sets the modality of the sheet
  6479. * window to kWindowModalityWindowModal.
  6480. *
  6481. * Mac OS X threading:
  6482. * Not thread safe
  6483. *
  6484. * Parameters:
  6485. *
  6486. * inSheet:
  6487. * The sheet window to show.
  6488. *
  6489. * inParentWindow:
  6490. * The sheet's parent window.
  6491. *
  6492. * Result:
  6493. * An operating system result code. ShowSheetWindow checks for the
  6494. * following error conditions, and returns paramErr if any occur:
  6495. * the sheet window must have a window class of kSheetWindowClass or
  6496. * kSheetAlertWindowClass; the sheet and parent windows must not be
  6497. * the same window; the sheet must not have a parent window already;
  6498. * and the parent window must not already be the target of a sheet.
  6499. *
  6500. * Availability:
  6501. * Mac OS X: in version 10.0 and later in Carbon.framework
  6502. * CarbonLib: in CarbonLib 1.3 and later
  6503. * Non-Carbon CFM: not available
  6504. }
  6505. function ShowSheetWindow( inSheet: WindowRef; inParentWindow: WindowRef ): OSStatus; external name '_ShowSheetWindow';
  6506. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6507. {
  6508. * HideSheetWindow()
  6509. *
  6510. * Summary:
  6511. * Hides a sheet window using appropriate visual effects.
  6512. *
  6513. * Mac OS X threading:
  6514. * Not thread safe
  6515. *
  6516. * Parameters:
  6517. *
  6518. * inSheet:
  6519. * The sheet window to hide.
  6520. *
  6521. * Availability:
  6522. * Mac OS X: in version 10.0 and later in Carbon.framework
  6523. * CarbonLib: in CarbonLib 1.3 and later
  6524. * Non-Carbon CFM: not available
  6525. }
  6526. function HideSheetWindow( inSheet: WindowRef ): OSStatus; external name '_HideSheetWindow';
  6527. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6528. {
  6529. * DetachSheetWindow()
  6530. *
  6531. * Summary:
  6532. * Detaches a sheet window from its parent window without affecting
  6533. * the visibility or position of the sheet or its parent.
  6534. *
  6535. * Discussion:
  6536. * This API may be useful if you want to hide a sheet window without
  6537. * an animation effect. To do that, use DetachSheetWindow to detach
  6538. * the sheet from the parent, and then use HideWindow to hide the
  6539. * sheet, or DisposeWindow to destroy the sheet.
  6540. *
  6541. * Mac OS X threading:
  6542. * Not thread safe
  6543. *
  6544. * Parameters:
  6545. *
  6546. * inSheet:
  6547. * The sheet to detach.
  6548. *
  6549. * Availability:
  6550. * Mac OS X: in version 10.3 and later in Carbon.framework
  6551. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  6552. * Non-Carbon CFM: not available
  6553. }
  6554. function DetachSheetWindow( inSheet: WindowRef ): OSStatus; external name '_DetachSheetWindow';
  6555. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  6556. {
  6557. * GetSheetWindowParent()
  6558. *
  6559. * Summary:
  6560. * Returns the parent window of a sheet.
  6561. *
  6562. * Mac OS X threading:
  6563. * Not thread safe
  6564. *
  6565. * Parameters:
  6566. *
  6567. * inSheet:
  6568. * The sheet window whose parent to retrieve.
  6569. *
  6570. * outParentWindow:
  6571. * On exit, contains the parent window of the sheet.
  6572. *
  6573. * Availability:
  6574. * Mac OS X: in version 10.0 and later in Carbon.framework
  6575. * CarbonLib: in CarbonLib 1.3 and later
  6576. * Non-Carbon CFM: not available
  6577. }
  6578. function GetSheetWindowParent( inSheet: WindowRef; var outParentWindow: WindowRef ): OSStatus; external name '_GetSheetWindowParent';
  6579. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  6580. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  6581. {
  6582. ¥ Drawers
  6583. Drawers are supported in Carbon by Mac OS X 10.2 and later. To create and use a drawer:
  6584. - Create a window using kDrawerWindowClass. You must also use compositing mode with
  6585. drawers; this mode is enabled by passing kWindowCompositingAttribute to CreateNewWindow.
  6586. - Either install the standard window event handler on the drawer window, or use
  6587. your own Carbon event or WaitNextEvent code to handle user interaction with the
  6588. drawer. If you do not use the standard window event handler, you should call
  6589. ResizeWindow in response to clicks on the grow region of the drawer if you want
  6590. the drawer to be resizable.
  6591. - Set the drawer's parent window with the SetDrawerParent function. The parent is
  6592. the window on which the drawer will open.
  6593. - Optionally, install a Carbon event handler on the drawer or the drawer's parent
  6594. window for the kEventWindowDrawerOpening/Opened/Closing/Closed events, to be notified
  6595. when the drawer has started or finished opening or closing.
  6596. - Optionally, set the drawer's preferred edge on the parent window with the
  6597. SetDrawerPreferredEdge function. If you do not set a preferred edge, the drawer
  6598. opens on the parent's left side on a left-to-right system, or on the parent's right
  6599. side on a right-to-left system.
  6600. - Optionally, set the drawer's offsets with the SetDrawerOffsets function. The offsets
  6601. control the amount of inset between the edge of the parent's content area and the edge
  6602. of the drawer's structure. If you do not set any offsets, the drawer's edges are flush
  6603. with the edges of the parent's content.
  6604. - Optionally, set the drawer's minimum and maximum sizes with the SetWindowResizeLimits
  6605. function. Or, install a Carbon event handler on the drawer to handle the kEventWindow-
  6606. GetMinimumSize and kEventWindowGetMaximumSize events. The drawer's minimum and maximum
  6607. sizes control how small or large it will resize together with the parent. If you do not
  6608. set resize limits, the drawer will be capable of resizing to default small and large
  6609. limits.
  6610. - Call ToggleDrawer to open or close the drawer, or use OpenDrawer or CloseDrawer if
  6611. you require more control over how the drawer opens or closes.
  6612. }
  6613. {
  6614. * Summary:
  6615. * Indicates the parent window edge on which a drawer will be shown.
  6616. }
  6617. const
  6618. {
  6619. * This constant is typically used with the OpenDrawer API; it
  6620. * indicates that the drawer should be opened on whatever edge of the
  6621. * parent window has previously been set as the drawer's preferred
  6622. * edge.
  6623. }
  6624. kWindowEdgeDefault = 0;
  6625. {
  6626. * The drawer should open on the top edge of the parent window.
  6627. }
  6628. kWindowEdgeTop = 1 shl 0;
  6629. {
  6630. * The drawer should open on the left edge of the parent window.
  6631. }
  6632. kWindowEdgeLeft = 1 shl 1;
  6633. {
  6634. * The drawer should open on the bottom edge of the parent window.
  6635. }
  6636. kWindowEdgeBottom = 1 shl 2;
  6637. {
  6638. * The drawer should open on the right edge of the parent window.
  6639. }
  6640. kWindowEdgeRight = 1 shl 3;
  6641. {
  6642. * Summary:
  6643. * Indicates the current state of a drawer window.
  6644. }
  6645. const
  6646. {
  6647. * The drawer is opening, but is not yet fully open.
  6648. }
  6649. kWindowDrawerOpening = 1;
  6650. {
  6651. * The drawer is fully open.
  6652. }
  6653. kWindowDrawerOpen = 2;
  6654. {
  6655. * The drawer is closing, but is not yet fully closed.
  6656. }
  6657. kWindowDrawerClosing = 3;
  6658. {
  6659. * The drawer is fully closed.
  6660. }
  6661. kWindowDrawerClosed = 4;
  6662. type
  6663. WindowDrawerState = UInt32;
  6664. {
  6665. * GetDrawerPreferredEdge()
  6666. *
  6667. * Summary:
  6668. * Returns the preferred parent window edge of a drawer.
  6669. *
  6670. * Discussion:
  6671. * Drawers start out with a preferred parent window edge of
  6672. * kWindowEdgeDefault. On left-to-right systems, the default edge is
  6673. * the left edge of the parent window; on right-to-left systems, the
  6674. * default edge is the right edge. You can set the preferred edge
  6675. * with SetDrawerPreferredEdge. If there's not enough room on the
  6676. * preferred edge, the drawer will automatically switch to the
  6677. * opposite edge.
  6678. *
  6679. * Mac OS X threading:
  6680. * Not thread safe
  6681. *
  6682. * Parameters:
  6683. *
  6684. * inDrawerWindow:
  6685. * The drawer window whose preferred edge to retrieve.
  6686. *
  6687. * Result:
  6688. * The preferred edge of the drawer window.
  6689. *
  6690. * Availability:
  6691. * Mac OS X: in version 10.2 and later in Carbon.framework
  6692. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  6693. * Non-Carbon CFM: not available
  6694. }
  6695. function GetDrawerPreferredEdge( inDrawerWindow: WindowRef ): OptionBits; external name '_GetDrawerPreferredEdge';
  6696. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  6697. {
  6698. * SetDrawerPreferredEdge()
  6699. *
  6700. * Summary:
  6701. * Sets the preferred parent window edge of a drawer.
  6702. *
  6703. * Mac OS X threading:
  6704. * Not thread safe
  6705. *
  6706. * Parameters:
  6707. *
  6708. * inDrawerWindow:
  6709. * The drawer window whose preferred edge to set.
  6710. *
  6711. * inEdge:
  6712. * The preferred edge of the drawer window. Note that although the
  6713. * WindowEdge enumeration has values appropriate for a bitfield,
  6714. * the current implementation does not support receiving more than
  6715. * one edge bit in this parameter. You can also pass
  6716. * kWindowEdgeDefault to allow the Window Manager to pick an edge.
  6717. *
  6718. * Availability:
  6719. * Mac OS X: in version 10.2 and later in Carbon.framework
  6720. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  6721. * Non-Carbon CFM: not available
  6722. }
  6723. function SetDrawerPreferredEdge( inDrawerWindow: WindowRef; inEdge: OptionBits ): OSStatus; external name '_SetDrawerPreferredEdge';
  6724. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  6725. {
  6726. * GetDrawerCurrentEdge()
  6727. *
  6728. * Summary:
  6729. * Returns the current parent window edge on which a drawer is
  6730. * displayed.
  6731. *
  6732. * Discussion:
  6733. * If the drawer window is currently visible, this API returns the
  6734. * parent window edge on which the drawer is displayed. If the
  6735. * drawer is not visible, this API determines on which edge of the
  6736. * parent window the drawer should be displayed, given the current
  6737. * size of the drawer, position of the parent, and preferred edge
  6738. * for the drawer.
  6739. *
  6740. * Mac OS X threading:
  6741. * Not thread safe
  6742. *
  6743. * Parameters:
  6744. *
  6745. * inDrawerWindow:
  6746. * The drawer window whose current edge to retrieve.
  6747. *
  6748. * Result:
  6749. * The current edge of the drawer window.
  6750. *
  6751. * Availability:
  6752. * Mac OS X: in version 10.2 and later in Carbon.framework
  6753. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  6754. * Non-Carbon CFM: not available
  6755. }
  6756. function GetDrawerCurrentEdge( inDrawerWindow: WindowRef ): OptionBits; external name '_GetDrawerCurrentEdge';
  6757. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  6758. {
  6759. * GetDrawerState()
  6760. *
  6761. * Summary:
  6762. * Returns the current state of a drawer: opening, open, closing, or
  6763. * closed.
  6764. *
  6765. * Mac OS X threading:
  6766. * Not thread safe
  6767. *
  6768. * Parameters:
  6769. *
  6770. * inDrawerWindow:
  6771. * The drawer window whose state to retrieve.
  6772. *
  6773. * Result:
  6774. * The current state of the drawer window.
  6775. *
  6776. * Availability:
  6777. * Mac OS X: in version 10.2 and later in Carbon.framework
  6778. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  6779. * Non-Carbon CFM: not available
  6780. }
  6781. function GetDrawerState( inDrawerWindow: WindowRef ): WindowDrawerState; external name '_GetDrawerState';
  6782. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  6783. {
  6784. * GetDrawerParent()
  6785. *
  6786. * Summary:
  6787. * Returns the parent window of a drawer.
  6788. *
  6789. * Mac OS X threading:
  6790. * Not thread safe
  6791. *
  6792. * Parameters:
  6793. *
  6794. * inDrawerWindow:
  6795. * The drawer window whose parent window to retrieve.
  6796. *
  6797. * Result:
  6798. * The drawer's parent window, or NULL if the drawer has no assigned
  6799. * parent.
  6800. *
  6801. * Availability:
  6802. * Mac OS X: in version 10.2 and later in Carbon.framework
  6803. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  6804. * Non-Carbon CFM: not available
  6805. }
  6806. function GetDrawerParent( inDrawerWindow: WindowRef ): WindowRef; external name '_GetDrawerParent';
  6807. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  6808. {
  6809. * SetDrawerParent()
  6810. *
  6811. * Summary:
  6812. * Sets the parent window of a drawer.
  6813. *
  6814. * Mac OS X threading:
  6815. * Not thread safe
  6816. *
  6817. * Parameters:
  6818. *
  6819. * inDrawerWindow:
  6820. * The drawer window whose parent window to set.
  6821. *
  6822. * inParent:
  6823. * The drawer's new parent window, or NULL if the drawer should
  6824. * have no parent.
  6825. *
  6826. * Result:
  6827. * An operating system result code.
  6828. *
  6829. * Availability:
  6830. * Mac OS X: in version 10.2 and later in Carbon.framework
  6831. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  6832. * Non-Carbon CFM: not available
  6833. }
  6834. function SetDrawerParent( inDrawerWindow: WindowRef; inParent: WindowRef ): OSStatus; external name '_SetDrawerParent';
  6835. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  6836. {
  6837. * kWindowOffsetUnchanged
  6838. *
  6839. * Discussion:
  6840. * Pass this value to SetDrawerOffsets to indicate that an existing
  6841. * offset should not be changed.
  6842. }
  6843. const
  6844. kWindowOffsetUnchanged = -1.0;
  6845. {
  6846. * SetDrawerOffsets()
  6847. *
  6848. * Summary:
  6849. * Sets the offsets from the beginning and end of the parent window
  6850. * to the beginning and end of the drawer window.
  6851. *
  6852. * Discussion:
  6853. * The drawer offsets control the positioning of the drawer relative
  6854. * to its parent window. When a drawer is first created, its offsets
  6855. * are zero. When a drawer is positioned, it is initially given a
  6856. * height or width equal to the height or width of the content area
  6857. * of the parent to which it is attached. If a drawer is opening on
  6858. * the left side of its parent, for example, the drawer's height
  6859. * will be the height of the parent's content area. In this case,
  6860. * the top side of the drawer window is called the leading edge of
  6861. * the drawer, and the bottom side of the drawer window is called
  6862. * the trailing edge of the drawer. The drawer's size is then
  6863. * adjusted by the leading and trailing offsets. The leading edge of
  6864. * the drawer is moved inward by an amount equal to the leading
  6865. * offset, and the trailing edge is moved inward by an amount equal
  6866. * to the trailing offset. For example, if the leading and trailing
  6867. * offsets are five and fifteen, then the top edge of a left-opening
  6868. * drawer will be five pixels inside the top edge of the parent
  6869. * window's content area, and the bottom edge of the drawer will be
  6870. * fifteen pixels inside the bottom edge of the parent's content
  6871. * area.
  6872. *
  6873. * Mac OS X threading:
  6874. * Not thread safe
  6875. *
  6876. * Parameters:
  6877. *
  6878. * inDrawerWindow:
  6879. * The drawer window whose offsets to change.
  6880. *
  6881. * inLeadingOffset:
  6882. * The new leading offset, in pixels. Pass kWindowOffsetUnchanged
  6883. * if you don't want to change the leading offset.
  6884. *
  6885. * inTrailingOffset:
  6886. * The new trailing offset, in pixels. Pass kWindowOffsetUnchanged
  6887. * if you don't want to change the trailing offset.
  6888. *
  6889. * Result:
  6890. * An operating system result code.
  6891. *
  6892. * Availability:
  6893. * Mac OS X: in version 10.2 and later in Carbon.framework
  6894. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  6895. * Non-Carbon CFM: not available
  6896. }
  6897. function SetDrawerOffsets( inDrawerWindow: WindowRef; inLeadingOffset: Float32; inTrailingOffset: Float32 ): OSStatus; external name '_SetDrawerOffsets';
  6898. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  6899. {
  6900. * GetDrawerOffsets()
  6901. *
  6902. * Summary:
  6903. * Returns the offsets from the beginning and end of the parent
  6904. * window to the beginning and end of the drawer window.
  6905. *
  6906. * Mac OS X threading:
  6907. * Not thread safe
  6908. *
  6909. * Parameters:
  6910. *
  6911. * inDrawerWindow:
  6912. * The drawer window whose offsets to retrieve.
  6913. *
  6914. * outLeadingOffset:
  6915. * On exit, contains the drawer's leading offset. Pass NULL if you
  6916. * don't need this information returned.
  6917. *
  6918. * outTrailingOffset:
  6919. * On exit, contains the drawer's trailing offset. Pass NULL if
  6920. * you don't need this information returned.
  6921. *
  6922. * Result:
  6923. * An operating system result code.
  6924. *
  6925. * Availability:
  6926. * Mac OS X: in version 10.2 and later in Carbon.framework
  6927. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  6928. * Non-Carbon CFM: not available
  6929. }
  6930. function GetDrawerOffsets( inDrawerWindow: WindowRef; outLeadingOffset: Float32Ptr { can be NULL }; outTrailingOffset: Float32Ptr { can be NULL } ): OSStatus; external name '_GetDrawerOffsets';
  6931. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  6932. {
  6933. * ToggleDrawer()
  6934. *
  6935. * Summary:
  6936. * Toggles a drawer from open to closed, or vice versa.
  6937. *
  6938. * Discussion:
  6939. * ToggleDrawer opens the drawer if it is closed, opening, or
  6940. * closing. If the drawer is open, it closes the drawer.
  6941. *
  6942. * ToggleDrawer attempts to open the drawer on its preferred edge,
  6943. * but if there is not enough room on that edge, it will try the
  6944. * opposite edge instead. If there is insufficient room on either
  6945. * edge, the drawer will open on the preferred edge but may extend
  6946. * offscreen, under the Dock, or under the menubar.
  6947. *
  6948. * The opening or closing of the drawer is performed asynchronously;
  6949. * ToggleDrawer installs an event loop timer that opens or closes
  6950. * the drawer after ToggleDrawer returns to the caller. Therefore,
  6951. * the caller must be running its event loop for the drawer to open
  6952. * or close. To open or close the drawer synchronously, use the
  6953. * OpenDrawer or CloseDrawer APIs.
  6954. *
  6955. * ToggleDrawer retains the drawer window while the drawer is
  6956. * opening or closing, and releases it when the drawer is fully
  6957. * opened or closed.
  6958. *
  6959. * ToggleDrawer sends the kEventWindowDrawerOpening,
  6960. * kEventWindowDrawerOpened, kEventWindowDrawerClosing, and
  6961. * kEventWindowDrawerClosed events as the drawer opens or closes.
  6962. *
  6963. * Mac OS X threading:
  6964. * Not thread safe
  6965. *
  6966. * Parameters:
  6967. *
  6968. * inDrawerWindow:
  6969. * The drawer window to open or close.
  6970. *
  6971. * Result:
  6972. * An operating system result code.
  6973. *
  6974. * Availability:
  6975. * Mac OS X: in version 10.2 and later in Carbon.framework
  6976. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  6977. * Non-Carbon CFM: not available
  6978. }
  6979. function ToggleDrawer( inDrawerWindow: WindowRef ): OSStatus; external name '_ToggleDrawer';
  6980. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  6981. {
  6982. * OpenDrawer()
  6983. *
  6984. * Summary:
  6985. * Opens a drawer on a specified parent window edge.
  6986. *
  6987. * Discussion:
  6988. * OpenDrawer may open the drawer either synchronously or
  6989. * asynchronously, depending on the value of the inAsync parameter.
  6990. * If inAsync is true, OpenDrawer installs an event loop timer that
  6991. * opens the drawer after OpenDrawer returns to the caller;
  6992. * therefore, the caller must be running its event loop for the
  6993. * drawer to open. If inAsync is false, OpenDrawer opens the drawer
  6994. * completely before returning to the caller.
  6995. *
  6996. * OpenDrawer retains the drawer window while the drawer is opening,
  6997. * and releases it when the drawer is fully open.
  6998. *
  6999. * OpenDrawer sends the kEventWindowDrawerOpening event to the
  7000. * drawer, the drawer's parent, and the application before opening
  7001. * the drawer. If an event handler for this event returns
  7002. * userCanceledErr, OpenDrawer will return immediately without
  7003. * opening the drawer. OpenDrawer sends the kEventWindowDrawerOpened
  7004. * event to the drawer, the drawer's parent, and the application
  7005. * after the drawer has finished opening.
  7006. *
  7007. * Mac OS X threading:
  7008. * Not thread safe
  7009. *
  7010. * Parameters:
  7011. *
  7012. * inDrawerWindow:
  7013. * The drawer window to open.
  7014. *
  7015. * inEdge:
  7016. * The parent window edge on which to open the drawer. Pass
  7017. * kWindowEdgeDefault to use the drawer's preferred edge. If there
  7018. * is not enough room on the preferred edge, OpenDrawer will try
  7019. * the opposite edge instead. If there is insufficient room on
  7020. * either edge, the drawer will open on the preferred edge but may
  7021. * extend offscreen, under the Dock, or under the menubar.
  7022. *
  7023. * inAsync:
  7024. * Whether to open the drawer synchronously (the drawer is
  7025. * entirely opened before the function call returns) or
  7026. * asynchronously (the drawer opens using an event loop timer
  7027. * after the function call returns).
  7028. *
  7029. * Result:
  7030. * An operating system result code.
  7031. *
  7032. * Availability:
  7033. * Mac OS X: in version 10.2 and later in Carbon.framework
  7034. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  7035. * Non-Carbon CFM: not available
  7036. }
  7037. function OpenDrawer( inDrawerWindow: WindowRef; inEdge: OptionBits; inAsync: Boolean ): OSStatus; external name '_OpenDrawer';
  7038. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  7039. {
  7040. * CloseDrawer()
  7041. *
  7042. * Summary:
  7043. * Closes a drawer.
  7044. *
  7045. * Discussion:
  7046. * CloseDrawer may close the drawer either synchronously or
  7047. * asynchronously, depending on the value of the inAsync parameter.
  7048. * If inAsync is true, CloseDrawer installs an event loop timer that
  7049. * closes the drawer after CloseDrawer returns to the caller;
  7050. * therefore, the caller must be running its event loop for the
  7051. * drawer to close. If inAsync is false, CloseDrawer closes the
  7052. * drawer completely before returning to the caller.
  7053. *
  7054. * CloseDrawer retains the drawer window while the drawer is
  7055. * closing, and releases it when the drawer is fully closed.
  7056. *
  7057. * CloseDrawer sends the kEventWindowDrawerClosing event to the
  7058. * drawer, the drawer's parent, and the application before closing
  7059. * the drawer. If an event handler for this event returns
  7060. * userCanceledErr, CloseDrawer will return immediately without
  7061. * closing the drawer. CloseDrawer sends the
  7062. * kEventWindowDrawerClosed event to the drawer, the drawer's
  7063. * parent, and the application after the drawer has finished closing.
  7064. *
  7065. * Mac OS X threading:
  7066. * Not thread safe
  7067. *
  7068. * Parameters:
  7069. *
  7070. * inDrawerWindow:
  7071. * The drawer window to close.
  7072. *
  7073. * inAsync:
  7074. * Whether to close the drawer synchronously (the drawer is
  7075. * entirely closed before the function call returns) or
  7076. * asynchronously (the drawer closes using an event loop timer
  7077. * after the function call returns).
  7078. *
  7079. * Result:
  7080. * An operating system result code.
  7081. *
  7082. * Availability:
  7083. * Mac OS X: in version 10.2 and later in Carbon.framework
  7084. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  7085. * Non-Carbon CFM: not available
  7086. }
  7087. function CloseDrawer( inDrawerWindow: WindowRef; inAsync: Boolean ): OSStatus; external name '_CloseDrawer';
  7088. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  7089. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7090. { ¥ Disabling Screen Redraw }
  7091. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7092. {
  7093. disable and enable screen updates for changes to the current applicationÕs windows
  7094. (OS X only)
  7095. }
  7096. {
  7097. * DisableScreenUpdates()
  7098. *
  7099. * Mac OS X threading:
  7100. * Not thread safe
  7101. *
  7102. * Availability:
  7103. * Mac OS X: in version 10.0 and later in Carbon.framework
  7104. * CarbonLib: in CarbonLib 1.1 and later
  7105. * Non-Carbon CFM: not available
  7106. }
  7107. function DisableScreenUpdates: OSStatus; external name '_DisableScreenUpdates';
  7108. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7109. {
  7110. * EnableScreenUpdates()
  7111. *
  7112. * Mac OS X threading:
  7113. * Not thread safe
  7114. *
  7115. * Availability:
  7116. * Mac OS X: in version 10.0 and later in Carbon.framework
  7117. * CarbonLib: in CarbonLib 1.1 and later
  7118. * Non-Carbon CFM: not available
  7119. }
  7120. function EnableScreenUpdates: OSStatus; external name '_EnableScreenUpdates';
  7121. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7122. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7123. { ¥ Window Toolbars }
  7124. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7125. // #define _SetWindowToolbar SetWindowToolbar
  7126. {
  7127. * SetWindowToolbar()
  7128. *
  7129. * Discussion:
  7130. * Sets the toolbar for a window. If any other toolbar is currently
  7131. * bound to the window, it is released. This API does NOT add the
  7132. * toolbar button to the window, your application must set the
  7133. * attribute itself.
  7134. *
  7135. * Mac OS X threading:
  7136. * Not thread safe
  7137. *
  7138. * Parameters:
  7139. *
  7140. * inWindow:
  7141. * The window to add the toolbar to.
  7142. *
  7143. * inToolbar:
  7144. * The toolbar to add.
  7145. *
  7146. * Result:
  7147. * An operating system result code.
  7148. *
  7149. * Availability:
  7150. * Mac OS X: in version 10.2 and later in Carbon.framework
  7151. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  7152. * Non-Carbon CFM: not available
  7153. }
  7154. function SetWindowToolbar( inWindow: WindowRef; inToolbar: HIToolbarRef ): OSStatus; external name '_SetWindowToolbar';
  7155. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  7156. // #define _GetWindowToolbar GetWindowToolbar
  7157. {
  7158. * GetWindowToolbar()
  7159. *
  7160. * Discussion:
  7161. * Gets the toolbar of a window, if any.
  7162. *
  7163. * Mac OS X threading:
  7164. * Not thread safe
  7165. *
  7166. * Parameters:
  7167. *
  7168. * inWindow:
  7169. * The window to add the toolbar to.
  7170. *
  7171. * outToolbar:
  7172. * The toolbar. You do not own the toolbar reference returned by
  7173. * this function. Do not release it! It is possible for the
  7174. * toolbar returned to be NULL, indicating there is no toolbar
  7175. * associated with this window. ¥¥¥ NOTE: May need to change the
  7176. * release strategy here.
  7177. *
  7178. * Result:
  7179. * An operating system result code.
  7180. *
  7181. * Availability:
  7182. * Mac OS X: in version 10.2 and later in Carbon.framework
  7183. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  7184. * Non-Carbon CFM: not available
  7185. }
  7186. function GetWindowToolbar( inWindow: WindowRef; var outToolbar: HIToolbarRef ): OSStatus; external name '_GetWindowToolbar';
  7187. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  7188. // #define _ShowHideWindowToolbar ShowHideWindowToolbar
  7189. {
  7190. * ShowHideWindowToolbar()
  7191. *
  7192. * Discussion:
  7193. * Shows or hides a window's toolbar. Optionally, you can ask for
  7194. * the transition to be animated or not. Typically, you would not
  7195. * need to call this other than to set up your window accordingly.
  7196. *
  7197. * Mac OS X threading:
  7198. * Not thread safe
  7199. *
  7200. * Parameters:
  7201. *
  7202. * inWindow:
  7203. * The window to show or hide the toolbar for.
  7204. *
  7205. * inShow:
  7206. * Pass true to show the toolbar, false to hide it.
  7207. *
  7208. * inAnimate:
  7209. * Pass true to animate the transition, false to do it quickly and
  7210. * without fanfare.
  7211. *
  7212. * Result:
  7213. * An operating system result code.
  7214. *
  7215. * Availability:
  7216. * Mac OS X: in version 10.2 and later in Carbon.framework
  7217. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  7218. * Non-Carbon CFM: not available
  7219. }
  7220. function ShowHideWindowToolbar( inWindow: WindowRef; inShow: Boolean; inAnimate: Boolean ): OSStatus; external name '_ShowHideWindowToolbar';
  7221. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  7222. // #define _IsWindowToolbarVisible IsWindowToolbarVisible
  7223. {
  7224. * IsWindowToolbarVisible()
  7225. *
  7226. * Discussion:
  7227. * Returns whether the toolbar (if any) attached to a window is
  7228. * visible. If the window has no toolbar, false is returned.
  7229. *
  7230. * Mac OS X threading:
  7231. * Not thread safe
  7232. *
  7233. * Parameters:
  7234. *
  7235. * inWindow:
  7236. * The window test the toolbar visiblity for.
  7237. *
  7238. * Result:
  7239. * A boolean result indicating whether the toolbar is visible (true)
  7240. * or not (false).
  7241. *
  7242. * Availability:
  7243. * Mac OS X: in version 10.2 and later in Carbon.framework
  7244. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  7245. * Non-Carbon CFM: not available
  7246. }
  7247. function IsWindowToolbarVisible( inWindow: WindowRef ): Boolean; external name '_IsWindowToolbarVisible';
  7248. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  7249. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7250. { ¥ Window Transparency }
  7251. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7252. {
  7253. * SetWindowAlpha()
  7254. *
  7255. * Discussion:
  7256. * Alters the overall alpha of a window, making the entire window
  7257. * (including window frame) either more or less transparent. The
  7258. * alpha is expressed as a floating point value from 0.0 (completely
  7259. * transparent) to 1.0 (completely opaque).
  7260. *
  7261. * Mac OS X threading:
  7262. * Not thread safe
  7263. *
  7264. * Parameters:
  7265. *
  7266. * inWindow:
  7267. * The window whose alpha to modify.
  7268. *
  7269. * inAlpha:
  7270. * The new alpha value.
  7271. *
  7272. * Result:
  7273. * An operating system result code.
  7274. *
  7275. * Availability:
  7276. * Mac OS X: in version 10.0 and later in Carbon.framework
  7277. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  7278. * Non-Carbon CFM: not available
  7279. }
  7280. function SetWindowAlpha( inWindow: WindowRef; inAlpha: Float32 ): OSStatus; external name '_SetWindowAlpha';
  7281. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7282. {
  7283. * GetWindowAlpha()
  7284. *
  7285. * Discussion:
  7286. * Returns the current overall alpha value for a window. The alpha
  7287. * is expressed as a floating point value from 0.0 (completely
  7288. * transparent) to 1.0 (completely opaque).
  7289. *
  7290. * Mac OS X threading:
  7291. * Not thread safe
  7292. *
  7293. * Parameters:
  7294. *
  7295. * inWindow:
  7296. * The window whose alpha to return.
  7297. *
  7298. * outAlpha:
  7299. * On exit, contains the window's current alpha value.
  7300. *
  7301. * Result:
  7302. * An operating system result code.
  7303. *
  7304. * Availability:
  7305. * Mac OS X: in version 10.0 and later in Carbon.framework
  7306. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
  7307. * Non-Carbon CFM: not available
  7308. }
  7309. function GetWindowAlpha( inWindow: WindowRef; var outAlpha: Float32 ): OSStatus; external name '_GetWindowAlpha';
  7310. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7311. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7312. { ¥ Window Shadows }
  7313. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7314. {
  7315. * HIWindowInvalidateShadow()
  7316. *
  7317. * Summary:
  7318. * This API causes a window's shadow to be recalculated.
  7319. *
  7320. * Discussion:
  7321. * HIWindowInvalidateShadow is not typically used by applications.
  7322. * However, it may be useful for applications with customized window
  7323. * frames that change shape dynamically; in this case, after the
  7324. * application has drawn the new window shape, the window shadow
  7325. * must be recalculated to follow the new window shape.
  7326. *
  7327. * Mac OS X threading:
  7328. * Not thread safe
  7329. *
  7330. * Parameters:
  7331. *
  7332. * inWindow:
  7333. * The window.
  7334. *
  7335. * Availability:
  7336. * Mac OS X: in version 10.4 and later in Carbon.framework
  7337. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  7338. * Non-Carbon CFM: not available
  7339. }
  7340. function HIWindowInvalidateShadow( inWindow: HIWindowRef ): OSStatus; external name '_HIWindowInvalidateShadow';
  7341. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  7342. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7343. { ¥ Window Scaling for Resolution Independence }
  7344. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7345. {
  7346. * HIWindowScaleMode
  7347. *
  7348. * Discussion:
  7349. * A window's scale mode indicates in which resolution-independent
  7350. * scale mode it is operating.
  7351. }
  7352. type
  7353. HIWindowScaleMode = UInt32;
  7354. const
  7355. {
  7356. * The window is not scaled at all because the display scale factor
  7357. * is 1.0.
  7358. }
  7359. kHIWindowScaleModeUnscaled = 0;
  7360. {
  7361. * The window's backing store is being magnified by the window server
  7362. * because the display scale factor != 1.0, and because the window
  7363. * was created with neither the kWindowFrameworkScaledAttribute nor
  7364. * the kWindowApplicationScaledAttribute.
  7365. }
  7366. kHIWindowScaleModeMagnified = 1;
  7367. {
  7368. * The window's context has been scaled to match the display scale
  7369. * factor because the display scale factor != 1.0 and because the
  7370. * window was created with the kWindowFrameworkScaledAttribute.
  7371. }
  7372. kHIWindowScaleModeFrameworkScaled = 2;
  7373. {
  7374. * This window's contents are being scaled manually by the
  7375. * application because the display scale factor != 1.0 and because
  7376. * the window was created with the kWindowApplicationScaledAttribute.
  7377. }
  7378. kHIWindowScaleModeApplicationScaled = 3;
  7379. {
  7380. * HIWindowGetScaleMode()
  7381. *
  7382. * Summary:
  7383. * Provides the window's scale mode and the application's display
  7384. * scale factor.
  7385. *
  7386. * Discussion:
  7387. * HIWindowGetScaleMode returns the HIWindowScaleMode for the
  7388. * window, which is determined based on the application's display
  7389. * scale factor and any resolution-independence attributes specified
  7390. * at window creation time. Applications and the views within the
  7391. * window can use the scale mode and display scale factor to help
  7392. * draw or layout properly for a particular scale mode.
  7393. *
  7394. * Mac OS X threading:
  7395. * Not thread safe
  7396. *
  7397. * Parameters:
  7398. *
  7399. * inWindow:
  7400. * The WindowRef whose scale mode to provide.
  7401. *
  7402. * outMode:
  7403. * On exit, an HIWindowScaleMode indicating the window's scale
  7404. * mode.
  7405. *
  7406. * outScaleFactor:
  7407. * On exit, a float indicating the display scale factor for the
  7408. * application. You may pass NULL if you are not interested in
  7409. * acquiring the scale factor; it is provided only as a
  7410. * convenience.
  7411. *
  7412. * Result:
  7413. * An operating system result code.
  7414. *
  7415. * Availability:
  7416. * Mac OS X: in version 10.4 and later in Carbon.framework
  7417. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  7418. * Non-Carbon CFM: not available
  7419. }
  7420. function HIWindowGetScaleMode( inWindow: HIWindowRef; var outMode: HIWindowScaleMode; outScaleFactor: Float32Ptr { can be NULL } ): OSStatus; external name '_HIWindowGetScaleMode';
  7421. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  7422. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7423. { ¥ Window Properties }
  7424. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7425. {
  7426. Routines available from Mac OS 8.5 forward
  7427. or from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward
  7428. }
  7429. {
  7430. * GetWindowProperty()
  7431. *
  7432. * Mac OS X threading:
  7433. * Not thread safe
  7434. *
  7435. * Availability:
  7436. * Mac OS X: in version 10.0 and later in Carbon.framework
  7437. * CarbonLib: in CarbonLib 1.0 and later
  7438. * Non-Carbon CFM: in WindowsLib 8.5 and later
  7439. }
  7440. function GetWindowProperty( window: WindowRef; propertyCreator_: PropertyCreator; propertyTag_: PropertyTag; bufferSize: UInt32; actualSize: UInt32Ptr { can be NULL }; propertyBuffer: UnivPtr ): OSStatus; external name '_GetWindowProperty';
  7441. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7442. {
  7443. * GetWindowPropertySize()
  7444. *
  7445. * Mac OS X threading:
  7446. * Not thread safe
  7447. *
  7448. * Availability:
  7449. * Mac OS X: in version 10.0 and later in Carbon.framework
  7450. * CarbonLib: in CarbonLib 1.0 and later
  7451. * Non-Carbon CFM: in WindowsLib 8.5 and later
  7452. }
  7453. function GetWindowPropertySize( window: WindowRef; creator: PropertyCreator; tag: PropertyTag; var size: UInt32 ): OSStatus; external name '_GetWindowPropertySize';
  7454. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7455. {
  7456. * SetWindowProperty()
  7457. *
  7458. * Mac OS X threading:
  7459. * Not thread safe
  7460. *
  7461. * Availability:
  7462. * Mac OS X: in version 10.0 and later in Carbon.framework
  7463. * CarbonLib: in CarbonLib 1.0 and later
  7464. * Non-Carbon CFM: in WindowsLib 8.5 and later
  7465. }
  7466. function SetWindowProperty( window: WindowRef; propertyCreator_: PropertyCreator; propertyTag_: PropertyTag; propertySize: UInt32; propertyBuffer: {const} UnivPtr ): OSStatus; external name '_SetWindowProperty';
  7467. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7468. {
  7469. * RemoveWindowProperty()
  7470. *
  7471. * Mac OS X threading:
  7472. * Not thread safe
  7473. *
  7474. * Availability:
  7475. * Mac OS X: in version 10.0 and later in Carbon.framework
  7476. * CarbonLib: in CarbonLib 1.0 and later
  7477. * Non-Carbon CFM: in WindowsLib 8.5 and later
  7478. }
  7479. function RemoveWindowProperty( window: WindowRef; propertyCreator_: PropertyCreator; propertyTag_: PropertyTag ): OSStatus; external name '_RemoveWindowProperty';
  7480. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7481. { Routines available from Mac OS 8.1 forward when linking to CarbonLib 1.0 forward}
  7482. const
  7483. kWindowPropertyPersistent = $00000001; { whether this property gets saved when flattening the window }
  7484. {
  7485. * GetWindowPropertyAttributes()
  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
  7492. * CarbonLib: in CarbonLib 1.0 and later
  7493. * Non-Carbon CFM: not available
  7494. }
  7495. function GetWindowPropertyAttributes( window: WindowRef; propertyCreator: OSType; propertyTag: OSType; var attributes: UInt32 ): OSStatus; external name '_GetWindowPropertyAttributes';
  7496. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7497. {
  7498. * ChangeWindowPropertyAttributes()
  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
  7505. * CarbonLib: in CarbonLib 1.0 and later
  7506. * Non-Carbon CFM: not available
  7507. }
  7508. function ChangeWindowPropertyAttributes( window: WindowRef; propertyCreator: OSType; propertyTag: OSType; attributesToSet: UInt32; attributesToClear: UInt32 ): OSStatus; external name '_ChangeWindowPropertyAttributes';
  7509. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7510. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7511. { ¥ Utilities }
  7512. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7513. {
  7514. * PinRect()
  7515. *
  7516. * Mac OS X threading:
  7517. * Not thread safe
  7518. *
  7519. * Availability:
  7520. * Mac OS X: in version 10.0 and later in Carbon.framework
  7521. * CarbonLib: in CarbonLib 1.0 and later
  7522. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  7523. }
  7524. function PinRect( const (*var*) theRect: Rect; thePt: Point ): SInt32; external name '_PinRect';
  7525. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7526. {
  7527. * GetGrayRgn()
  7528. *
  7529. * Mac OS X threading:
  7530. * Not thread safe
  7531. *
  7532. * Availability:
  7533. * Mac OS X: in version 10.0 and later in Carbon.framework
  7534. * CarbonLib: in CarbonLib 1.0 and later
  7535. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  7536. }
  7537. function GetGrayRgn: RgnHandle; external name '_GetGrayRgn';
  7538. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7539. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7540. { ¥ Window Part Tracking }
  7541. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7542. {
  7543. * TrackBox()
  7544. *
  7545. * Mac OS X threading:
  7546. * Not thread safe
  7547. *
  7548. * Availability:
  7549. * Mac OS X: in version 10.0 and later in Carbon.framework
  7550. * CarbonLib: in CarbonLib 1.0 and later
  7551. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  7552. }
  7553. function TrackBox( window: WindowRef; thePt: Point; partCode: WindowPartCode ): Boolean; external name '_TrackBox';
  7554. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7555. {
  7556. * TrackGoAway()
  7557. *
  7558. * Mac OS X threading:
  7559. * Not thread safe
  7560. *
  7561. * Availability:
  7562. * Mac OS X: in version 10.0 and later in Carbon.framework
  7563. * CarbonLib: in CarbonLib 1.0 and later
  7564. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  7565. }
  7566. function TrackGoAway( window: WindowRef; thePt: Point ): Boolean; external name '_TrackGoAway';
  7567. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7568. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7569. { ¥ Region Dragging }
  7570. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7571. {
  7572. * DragGrayRgn()
  7573. *
  7574. * Mac OS X threading:
  7575. * Not thread safe
  7576. *
  7577. * Availability:
  7578. * Mac OS X: in version 10.0 and later in Carbon.framework
  7579. * CarbonLib: in CarbonLib 1.0 and later
  7580. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  7581. }
  7582. function DragGrayRgn( theRgn: RgnHandle; startPt: Point; const (*var*) limitRect: Rect; const (*var*) slopRect: Rect; axis: SInt16; actionProc: DragGrayRgnUPP ): SInt32; external name '_DragGrayRgn';
  7583. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7584. {
  7585. * DragTheRgn()
  7586. *
  7587. * Mac OS X threading:
  7588. * Not thread safe
  7589. *
  7590. * Availability:
  7591. * Mac OS X: in version 10.0 and later in Carbon.framework
  7592. * CarbonLib: in CarbonLib 1.0 and later
  7593. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  7594. }
  7595. function DragTheRgn( theRgn: RgnHandle; startPt: Point; const (*var*) limitRect: Rect; const (*var*) slopRect: Rect; axis: SInt16; actionProc: DragGrayRgnUPP ): SInt32; external name '_DragTheRgn';
  7596. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7597. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7598. { ¥ GetAuxWin }
  7599. { GetAuxWin is not available in Carbon }
  7600. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7601. {
  7602. * GetAuxWin()
  7603. *
  7604. * Availability:
  7605. * Mac OS X: not available
  7606. * CarbonLib: not available
  7607. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  7608. }
  7609. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7610. { ¥ C Glue }
  7611. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7612. {
  7613. * setwtitle()
  7614. *
  7615. * Availability:
  7616. * Mac OS X: not available
  7617. * CarbonLib: not available
  7618. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  7619. }
  7620. {
  7621. * trackgoaway()
  7622. *
  7623. * Availability:
  7624. * Mac OS X: not available
  7625. * CarbonLib: not available
  7626. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  7627. }
  7628. {
  7629. * findwindow()
  7630. *
  7631. * Availability:
  7632. * Mac OS X: not available
  7633. * CarbonLib: not available
  7634. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  7635. }
  7636. {
  7637. * getwtitle()
  7638. *
  7639. * Availability:
  7640. * Mac OS X: not available
  7641. * CarbonLib: not available
  7642. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  7643. }
  7644. {
  7645. * growwindow()
  7646. *
  7647. * Availability:
  7648. * Mac OS X: not available
  7649. * CarbonLib: not available
  7650. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  7651. }
  7652. {
  7653. * newwindow()
  7654. *
  7655. * Availability:
  7656. * Mac OS X: not available
  7657. * CarbonLib: not available
  7658. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  7659. }
  7660. {
  7661. * newcwindow()
  7662. *
  7663. * Availability:
  7664. * Mac OS X: not available
  7665. * CarbonLib: not available
  7666. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  7667. }
  7668. {
  7669. * pinrect()
  7670. *
  7671. * Availability:
  7672. * Mac OS X: not available
  7673. * CarbonLib: not available
  7674. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  7675. }
  7676. {
  7677. * trackbox()
  7678. *
  7679. * Availability:
  7680. * Mac OS X: not available
  7681. * CarbonLib: not available
  7682. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  7683. }
  7684. {
  7685. * draggrayrgn()
  7686. *
  7687. * Availability:
  7688. * Mac OS X: not available
  7689. * CarbonLib: not available
  7690. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  7691. }
  7692. {
  7693. * dragwindow()
  7694. *
  7695. * Availability:
  7696. * Mac OS X: not available
  7697. * CarbonLib: not available
  7698. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  7699. }
  7700. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7701. { ¥ Window Accessors }
  7702. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  7703. {
  7704. * GetWindowGoAwayFlag()
  7705. *
  7706. * Discussion:
  7707. * use GetWindowAttributes in Carbon
  7708. *
  7709. * Availability:
  7710. * Mac OS X: not available
  7711. * CarbonLib: not available
  7712. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  7713. }
  7714. {
  7715. * GetWindowSpareFlag()
  7716. *
  7717. * Discussion:
  7718. * use GetWindowAttributes in Carbon
  7719. *
  7720. * Availability:
  7721. * Mac OS X: not available
  7722. * CarbonLib: not available
  7723. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  7724. }
  7725. {
  7726. * GetWindowList()
  7727. *
  7728. * Mac OS X threading:
  7729. * Not thread safe
  7730. *
  7731. * Availability:
  7732. * Mac OS X: in version 10.0 and later in Carbon.framework
  7733. * CarbonLib: in CarbonLib 1.0 and later
  7734. * Non-Carbon CFM: in CarbonAccessors.o 1.0.2 and later
  7735. }
  7736. function GetWindowList: WindowRef; external name '_GetWindowList';
  7737. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7738. {
  7739. * GetWindowPort()
  7740. *
  7741. * Mac OS X threading:
  7742. * Not thread safe
  7743. *
  7744. * Availability:
  7745. * Mac OS X: in version 10.0 and later in Carbon.framework
  7746. * CarbonLib: in CarbonLib 1.0 and later
  7747. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  7748. }
  7749. function GetWindowPort( window: WindowRef ): CGrafPtr; external name '_GetWindowPort';
  7750. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7751. {
  7752. * GetWindowStructurePort()
  7753. *
  7754. * Mac OS X threading:
  7755. * Not thread safe
  7756. *
  7757. * Availability:
  7758. * Mac OS X: in version 10.1 and later in Carbon.framework
  7759. * CarbonLib: in CarbonLib 1.5 and later
  7760. * Non-Carbon CFM: not available
  7761. }
  7762. function GetWindowStructurePort( inWindow: WindowRef ): CGrafPtr; external name '_GetWindowStructurePort';
  7763. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  7764. {
  7765. * GetWindowKind()
  7766. *
  7767. * Mac OS X threading:
  7768. * Not thread safe
  7769. *
  7770. * Availability:
  7771. * Mac OS X: in version 10.0 and later in Carbon.framework
  7772. * CarbonLib: in CarbonLib 1.0 and later
  7773. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  7774. }
  7775. function GetWindowKind( window: WindowRef ): SInt16; external name '_GetWindowKind';
  7776. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7777. {
  7778. * IsWindowHilited()
  7779. *
  7780. * Summary:
  7781. * Indicates whether a window's frame is hilited.
  7782. *
  7783. * Discussion:
  7784. * See HiliteWindow for a disucssion on the meaning of a window's
  7785. * hilited state.
  7786. *
  7787. * Mac OS X threading:
  7788. * Not thread safe
  7789. *
  7790. * Parameters:
  7791. *
  7792. * window:
  7793. * The window whose hilited state you wish to retrieve.
  7794. *
  7795. * Result:
  7796. * A Boolean indicating whether the window's frame is hilited.
  7797. *
  7798. * Availability:
  7799. * Mac OS X: in version 10.0 and later in Carbon.framework
  7800. * CarbonLib: in CarbonLib 1.0 and later
  7801. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  7802. }
  7803. function IsWindowHilited( window: WindowRef ): Boolean; external name '_IsWindowHilited';
  7804. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7805. {
  7806. * IsWindowUpdatePending()
  7807. *
  7808. * Mac OS X threading:
  7809. * Not thread safe
  7810. *
  7811. * Availability:
  7812. * Mac OS X: in version 10.0 and later in Carbon.framework
  7813. * CarbonLib: in CarbonLib 1.0 and later
  7814. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  7815. }
  7816. function IsWindowUpdatePending( window: WindowRef ): Boolean; external name '_IsWindowUpdatePending';
  7817. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7818. {
  7819. * [Mac]GetNextWindow()
  7820. *
  7821. * Mac OS X threading:
  7822. * Not thread safe
  7823. *
  7824. * Availability:
  7825. * Mac OS X: in version 10.0 and later in Carbon.framework
  7826. * CarbonLib: in CarbonLib 1.0 and later
  7827. * Non-Carbon CFM: in CarbonAccessors.o 1.0.2 and later or as macro/inline
  7828. }
  7829. function GetNextWindow( window: WindowRef ): WindowRef; external name '_GetNextWindow';
  7830. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7831. function MacGetNextWindow__NAME__GetNextWindow( window: WindowRef ): WindowRef; external name '_MacGetNextWindow__NAME__GetNextWindow';
  7832. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7833. {
  7834. * GetPreviousWindow()
  7835. *
  7836. * Summary:
  7837. * Returns the window above a given window in the window list.
  7838. *
  7839. * Mac OS X threading:
  7840. * Not thread safe
  7841. *
  7842. * Parameters:
  7843. *
  7844. * inWindow:
  7845. * The window above this window is returned.
  7846. *
  7847. * Availability:
  7848. * Mac OS X: in version 10.2 and later in Carbon.framework
  7849. * CarbonLib: in CarbonLib 1.6 and later
  7850. * Non-Carbon CFM: not available
  7851. }
  7852. function GetPreviousWindow( inWindow: WindowRef ): WindowRef; external name '_GetPreviousWindow';
  7853. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  7854. {
  7855. * GetWindowStandardState()
  7856. *
  7857. * Mac OS X threading:
  7858. * Not thread safe
  7859. *
  7860. * Availability:
  7861. * Mac OS X: in version 10.0 and later in Carbon.framework
  7862. * CarbonLib: in CarbonLib 1.0 and later
  7863. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  7864. }
  7865. function GetWindowStandardState( window: WindowRef; var rect_: Rect ): RectPtr; external name '_GetWindowStandardState';
  7866. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7867. {
  7868. * GetWindowUserState()
  7869. *
  7870. * Mac OS X threading:
  7871. * Not thread safe
  7872. *
  7873. * Availability:
  7874. * Mac OS X: in version 10.0 and later in Carbon.framework
  7875. * CarbonLib: in CarbonLib 1.0 and later
  7876. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  7877. }
  7878. function GetWindowUserState( window: WindowRef; var rect_: Rect ): RectPtr; external name '_GetWindowUserState';
  7879. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7880. {
  7881. * SetWindowKind()
  7882. *
  7883. * Mac OS X threading:
  7884. * Not thread safe
  7885. *
  7886. * Availability:
  7887. * Mac OS X: in version 10.0 and later in Carbon.framework
  7888. * CarbonLib: in CarbonLib 1.0 and later
  7889. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  7890. }
  7891. procedure SetWindowKind( window: WindowRef; kind: SInt16 ); external name '_SetWindowKind';
  7892. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7893. {
  7894. * SetWindowStandardState()
  7895. *
  7896. * Mac OS X threading:
  7897. * Not thread safe
  7898. *
  7899. * Availability:
  7900. * Mac OS X: in version 10.0 and later in Carbon.framework
  7901. * CarbonLib: in CarbonLib 1.0 and later
  7902. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  7903. }
  7904. procedure SetWindowStandardState( window: WindowRef; const (*var*) rect_: Rect ); external name '_SetWindowStandardState';
  7905. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7906. {
  7907. * SetWindowUserState()
  7908. *
  7909. * Mac OS X threading:
  7910. * Not thread safe
  7911. *
  7912. * Availability:
  7913. * Mac OS X: in version 10.0 and later in Carbon.framework
  7914. * CarbonLib: in CarbonLib 1.0 and later
  7915. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  7916. }
  7917. procedure SetWindowUserState( window: WindowRef; const (*var*) rect_: Rect ); external name '_SetWindowUserState';
  7918. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7919. {
  7920. * SetPortWindowPort()
  7921. *
  7922. * Discussion:
  7923. * set the current QuickDraw port to the port associated with the
  7924. * window
  7925. *
  7926. * Mac OS X threading:
  7927. * Not thread safe
  7928. *
  7929. * Availability:
  7930. * Mac OS X: in version 10.0 and later in Carbon.framework
  7931. * CarbonLib: in CarbonLib 1.0 and later
  7932. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  7933. }
  7934. procedure SetPortWindowPort( window: WindowRef ); external name '_SetPortWindowPort';
  7935. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7936. {
  7937. * GetWindowPortBounds()
  7938. *
  7939. * Mac OS X threading:
  7940. * Not thread safe
  7941. *
  7942. * Availability:
  7943. * Mac OS X: in version 10.0 and later in Carbon.framework
  7944. * CarbonLib: in CarbonLib 1.0 and later
  7945. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  7946. }
  7947. function GetWindowPortBounds( window: WindowRef; var bounds: Rect ): RectPtr; external name '_GetWindowPortBounds';
  7948. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7949. {
  7950. * GetWindowFromPort()
  7951. *
  7952. * Discussion:
  7953. * Needed to Ôcast upÕ to a WindowRef from a GrafPtr
  7954. *
  7955. * Mac OS X threading:
  7956. * Not thread safe
  7957. *
  7958. * Availability:
  7959. * Mac OS X: in version 10.0 and later in Carbon.framework
  7960. * CarbonLib: in CarbonLib 1.0 and later
  7961. * Non-Carbon CFM: in CarbonAccessors.o 1.0 and later or as macro/inline
  7962. }
  7963. function GetWindowFromPort( port: CGrafPtr ): WindowRef; external name '_GetWindowFromPort';
  7964. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  7965. { old accessors}
  7966. {
  7967. * GetWindowDataHandle()
  7968. *
  7969. * Availability:
  7970. * Mac OS X: not available
  7971. * CarbonLib: not available
  7972. * Non-Carbon CFM: available as macro/inline
  7973. }
  7974. {
  7975. * SetWindowDataHandle()
  7976. *
  7977. * Availability:
  7978. * Mac OS X: not available
  7979. * CarbonLib: not available
  7980. * Non-Carbon CFM: available as macro/inline
  7981. }
  7982. {
  7983. * GetWindowZoomFlag()
  7984. *
  7985. * Availability:
  7986. * Mac OS X: not available
  7987. * CarbonLib: not available
  7988. * Non-Carbon CFM: available as macro/inline
  7989. }
  7990. {
  7991. * GetWindowStructureRgn()
  7992. *
  7993. * Availability:
  7994. * Mac OS X: not available
  7995. * CarbonLib: not available
  7996. * Non-Carbon CFM: available as macro/inline
  7997. }
  7998. {
  7999. * GetWindowContentRgn()
  8000. *
  8001. * Availability:
  8002. * Mac OS X: not available
  8003. * CarbonLib: not available
  8004. * Non-Carbon CFM: available as macro/inline
  8005. }
  8006. {
  8007. * GetWindowUpdateRgn()
  8008. *
  8009. * Availability:
  8010. * Mac OS X: not available
  8011. * CarbonLib: not available
  8012. * Non-Carbon CFM: available as macro/inline
  8013. }
  8014. {
  8015. * GetWindowTitleWidth()
  8016. *
  8017. * Availability:
  8018. * Mac OS X: not available
  8019. * CarbonLib: not available
  8020. * Non-Carbon CFM: available as macro/inline
  8021. }
  8022. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  8023. { Obsolete symbolic names }
  8024. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  8025. const
  8026. kWindowGroupAttrSelectable = kWindowGroupAttrSelectAsLayer;
  8027. kWindowGroupAttrPositionFixed = kWindowGroupAttrMoveTogether;
  8028. kWindowGroupAttrZOrderFixed = kWindowGroupAttrLayerTogether;
  8029. end.