MacWindows.pas 299 KB

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