MacTextEditor.pas 235 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925
  1. {
  2. File: HIToolbox/MacTextEditor.h
  3. Contains: Interfaces for Multilingual Text Engine (MLTE)
  4. Version: HIToolbox-219.4.81~2
  5. Copyright: © 1996-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 MacTextEditor;
  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,CFURL,CFArray,CFData,CFString,CFDictionary,CGBase,AEDataModel,TextCommon,Quickdraw,QDOffscreen,Menus,ATSUnicodeTypes,ConditionalMacros,Drag,MacWindows,Files,Events,MacErrors,CarbonEvents,HIObjectCore,HIView,HIGeometry;
  92. {$ALIGN POWER}
  93. {$ALIGN MAC68K}
  94. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  95. { ¥ Various Defs }
  96. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  97. type
  98. TXNObject = ^SInt32; { an opaque 32-bit type }
  99. TXNObjectPtr = ^TXNObject; { when a var xx:TXNObject parameter can be nil, it is changed to xx: TXNObjectPtr }
  100. type
  101. TXNFontMenuObject = ^SInt32; { an opaque 32-bit type }
  102. TXNFontMenuObjectPtr = ^TXNFontMenuObject; { when a var xx:TXNFontMenuObject parameter can be nil, it is changed to xx: TXNFontMenuObjectPtr }
  103. type
  104. TXNVersionValue = UInt32;
  105. {
  106. * TXNFrameID
  107. *
  108. * Summary:
  109. * Deprecated. Pass NULL for any API which uses this type as a
  110. * parameter.
  111. }
  112. type
  113. TXNFrameID = UInt32;
  114. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  115. { ¥ Error Status }
  116. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  117. { MLTE status errors assigned is -22000 through -22039. See MacErrors.h for -22000 to -22018. }
  118. const
  119. kTXNDisabledFunctionalityErr = -22019; { This routine's functionality is disabled.}
  120. kTXNOperationNotAllowedErr = -22020; { Returned by MLTE API if function cannot be applied. }
  121. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  122. { ¥ Feature Bits }
  123. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  124. { Useful for the TXNVersionInformation API. }
  125. const
  126. kTXNWillDefaultToATSUIBit = 0;
  127. kTXNWillDefaultToCarbonEventBit = 1; { Ignored - Carbon events are always used in Mac OS X version 10.1 and later.}
  128. type
  129. TXNFeatureBits = OptionBits;
  130. const
  131. kTXNWillDefaultToATSUIMask = 1 shl kTXNWillDefaultToATSUIBit;
  132. kTXNWillDefaultToCarbonEventMask = 1 shl kTXNWillDefaultToCarbonEventBit;
  133. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  134. { ¥ Initialization Bits }
  135. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  136. { Useful for the TXNInitTextension API. }
  137. const
  138. kTXNWantMoviesBit = 0;
  139. kTXNWantSoundBit = 1;
  140. kTXNWantGraphicsBit = 2;
  141. kTXNAlwaysUseQuickDrawTextBit = 3;
  142. kTXNUseTemporaryMemoryBit = 4;
  143. type
  144. TXNInitOptions = OptionBits;
  145. const
  146. kTXNWantMoviesMask = 1 shl kTXNWantMoviesBit;
  147. kTXNWantSoundMask = 1 shl kTXNWantSoundBit;
  148. kTXNWantGraphicsMask = 1 shl kTXNWantGraphicsBit;
  149. kTXNAlwaysUseQuickDrawTextMask = 1 shl kTXNAlwaysUseQuickDrawTextBit;
  150. kTXNUseTemporaryMemoryMask = 1 shl kTXNUseTemporaryMemoryBit;
  151. { Default constants }
  152. const
  153. kTXNDefaultFontName = nil;
  154. const
  155. kTXNDefaultFontSize = $000C0000;
  156. const
  157. kTXNDefaultFontStyle = normal;
  158. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  159. { ¥ FrameOption Bits }
  160. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  161. { Useful for the TXNNewObject and TXNCreateObject APIs. }
  162. const
  163. kTXNDrawGrowIconBit = 0;
  164. kTXNShowWindowBit = 1;
  165. kTXNWantHScrollBarBit = 2;
  166. kTXNWantVScrollBarBit = 3;
  167. kTXNReadOnlyBit = 5;
  168. kTXNNoKeyboardSyncBit = 6;
  169. kTXNNoSelectionBit = 7;
  170. kTXNSaveStylesAsSTYLResourceBit = 8;
  171. kOutputTextInUnicodeEncodingBit = 9;
  172. kTXNDoNotInstallDragProcsBit = 10;
  173. kTXNAlwaysWrapAtViewEdgeBit = 11;
  174. kTXNDontDrawSelectionWhenInactiveBit = 13;
  175. kTXNSingleLineOnlyBit = 14;
  176. kTXNDisableDragAndDropBit = 15;
  177. kTXNMonostyledTextBit = 17;
  178. kTXNDoFontSubstitutionBit = 22;
  179. {
  180. * TXNFrameOptions
  181. *
  182. * Summary:
  183. * Defines the initial behavior of an MLTE object created with
  184. * TXNCreateObject/TXNNewObject.
  185. *
  186. * Discussion:
  187. * These masks can be combined and passed to
  188. * TXNCreateObject/TXNNewObject to define the initial behavior of a
  189. * new object.
  190. }
  191. type
  192. TXNFrameOptions = OptionBits;
  193. const
  194. {
  195. * Indicates that the frame will have a size box.
  196. }
  197. kTXNDrawGrowIconMask = 1 shl kTXNDrawGrowIconBit;
  198. {
  199. * Indicates that the window associated with the text object will be
  200. * displayed when the object is created. The application no longer
  201. * needs to call the ShowWindow function from the Window Manager;
  202. * MLTE will do this for you.
  203. }
  204. kTXNShowWindowMask = 1 shl kTXNShowWindowBit;
  205. {
  206. * Indicates that the frame will have a horizontal scrollbar. The
  207. * scrollbar will be enabled upon creation. If there are multiple
  208. * MLTE objects in the same window, the client will need to
  209. * explicitly disable the scrollbars for those inactive MLTE objects.
  210. * Use TXNSetScrollbarState to deactivate the scrollbar.
  211. }
  212. kTXNWantHScrollBarMask = 1 shl kTXNWantHScrollBarBit;
  213. {
  214. * Indicates that the frame will have a vertical scrollbar. The
  215. * scrollbar will be enabled upon creation. If there are multiple
  216. * MLTE objects in the same window, the client will need to
  217. * explicitly disable the scrollbars for those inactive MLTE objects.
  218. * Use TXNSetScrollbarState to deactivate the scrollbar.
  219. }
  220. kTXNWantVScrollBarMask = 1 shl kTXNWantVScrollBarBit;
  221. {
  222. * Indicates that the text object will be read-only. It is
  223. * equivalent to setting the object into NoUserIO mode, via the tag
  224. * kTXNNoUserIOTag in TXNSetTXNObjectControls. See description in
  225. * individual API to determine if the API will still work in NoUserIO
  226. * mode.
  227. }
  228. kTXNReadOnlyMask = 1 shl kTXNReadOnlyBit;
  229. {
  230. * Indicates that keyboard synchronization will not occur.
  231. }
  232. kTXNNoKeyboardSyncMask = 1 shl kTXNNoKeyboardSyncBit;
  233. {
  234. * Indicates that the user shouldn't be able to set the insertion
  235. * point or make a selection.
  236. }
  237. kTXNNoSelectionMask = 1 shl kTXNNoSelectionBit;
  238. {
  239. * Indicates that the text style will be saved as a
  240. * kTXNMultipleStylesPerTextDocumentResType resource. You can set
  241. * this to assure compatibility with SimpleText. If you use
  242. * kTXNMultipleStylesPerTextDocumentResType resources to save style
  243. * info, your documents can have as many styles as you'd like.
  244. * However tabs are not saved. If you don't use this mask, plain
  245. * text files are saved as kTXNSingleStylePerTextDocumentResType
  246. * resources, and only the first style in the document is saved.
  247. * (Your application is expected to apply all style changes to the
  248. * entire document.) If you save files with a
  249. * kTXNSingleStylePerTextDocumentResType resource, their output is
  250. * similar to those output by CodeWarrior, BBEdit, and MPW.
  251. }
  252. kTXNSaveStylesAsSTYLResourceMask = 1 shl kTXNSaveStylesAsSTYLResourceBit;
  253. {
  254. * Indicates that plain text will be saved as Unicode.
  255. }
  256. kOutputTextInUnicodeEncodingMask = 1 shl kOutputTextInUnicodeEncodingBit;
  257. {
  258. * Indicates that MLTE will not install its own drag handler for the
  259. * text object. This can be used if the client wants to install
  260. * their own handler.
  261. }
  262. kTXNDoNotInstallDragProcsMask = 1 shl kTXNDoNotInstallDragProcsBit;
  263. {
  264. * Indicates that lines will wrap at the edge of the view rectangle.
  265. }
  266. kTXNAlwaysWrapAtViewEdgeMask = 1 shl kTXNAlwaysWrapAtViewEdgeBit;
  267. {
  268. * Indicates that the selection (if one) shouldn't be drawn when the
  269. * text object doesn't have focus.
  270. }
  271. kTXNDontDrawSelectionWhenInactiveMask = 1 shl kTXNDontDrawSelectionWhenInactiveBit;
  272. {
  273. * Indicates that the text object will not scroll vertically,
  274. * horizontal scrolling will stop when the end of the text is visible
  275. * (plus any right margin), and there will be no limit to the width
  276. * of the text.
  277. }
  278. kTXNSingleLineOnlyMask = 1 shl kTXNSingleLineOnlyBit;
  279. {
  280. * Indicates that drag and drop will not be allowed in the text
  281. * object.
  282. }
  283. kTXNDisableDragAndDropMask = 1 shl kTXNDisableDragAndDropBit;
  284. {
  285. * Indicates that the text object will keep in single style no matter
  286. * what kind of changes made to the object. Mac OS X only.
  287. }
  288. kTXNMonostyledTextMask = 1 shl kTXNMonostyledTextBit;
  289. {
  290. * Indicates that ATSUI font substitution will be used. Mac OS X
  291. * only.
  292. }
  293. kTXNDoFontSubstitutionMask = 1 shl kTXNDoFontSubstitutionBit;
  294. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  295. { ¥ TextBox Option Bits }
  296. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  297. { Useful for TXNDrawUnicodeTextBox and TXNDrawCFStringTextBox APIs. }
  298. const
  299. kTXNSetFlushnessBit = 0;
  300. kTXNSetJustificationBit = 1;
  301. kTXNUseFontFallBackBit = 2;
  302. kTXNRotateTextBit = 3;
  303. kTXNUseVerticalTextBit = 4;
  304. kTXNDontUpdateBoxRectBit = 5;
  305. kTXNDontDrawTextBit = 6;
  306. kTXNUseCGContextRefBit = 7;
  307. kTXNDontWrapTextBit = 9;
  308. {
  309. * TXNTextBoxOptions
  310. *
  311. * Summary:
  312. * Defines how text will be drawn by the TXNDrawUnicodeTextBox and
  313. * TXNDrawCFStringTextBox APIs.
  314. *
  315. * Discussion:
  316. * These masks can be combined and added to a TXNTextBoxOptionsData
  317. * structure to be passed to the TXNDrawUnicodeTextBox and
  318. * TXNDrawCFStringTextBox APIs.
  319. }
  320. type
  321. TXNTextBoxOptions = OptionBits;
  322. const
  323. {
  324. * Indicates that the text will be flush according to the line
  325. * direction.
  326. }
  327. kTXNSetFlushnessMask = 1 shl kTXNSetFlushnessBit;
  328. {
  329. * Indicates that the text will be justified in the direction that
  330. * the text is displayed. Horizontal text will be justified
  331. * horizontally, but not vertically. Vertical text will be justified
  332. * vertically, but not horizontally.
  333. }
  334. kTXNSetJustificationMask = 1 shl kTXNSetJustificationBit;
  335. {
  336. * Indicates that ATSUI font substitution (that searches for a font
  337. * that has a matching character) will be used.
  338. }
  339. kTXNUseFontFallBackMask = 1 shl kTXNUseFontFallBackBit;
  340. {
  341. * Indicates that the text will be rotated. The amount of rotation
  342. * is given in the rotation field of the TXNTextBoxOptionsData
  343. * structure and is in units of degrees (negative values indicate
  344. * clockwise rotation).
  345. }
  346. kTXNRotateTextMask = 1 shl kTXNRotateTextBit;
  347. {
  348. * Indicates that the text will be displayed vertically from top to
  349. * bottom.
  350. }
  351. kTXNUseVerticalTextMask = 1 shl kTXNUseVerticalTextBit;
  352. {
  353. * Indicates that the specified rectangle will not be updated. If
  354. * you use this mask when you call a TXNDrawxxxTextBox function, the
  355. * function does not update the right coordinate (bottom coordinate
  356. * if kTXNUseVerticalTextMask is used) of the specified rectangle to
  357. * accommodate the longest line for text.
  358. }
  359. kTXNDontUpdateBoxRectMask = 1 shl kTXNDontUpdateBoxRectBit;
  360. {
  361. * Indicates that the size of the text will be returned but the text
  362. * box will not be drawn.
  363. }
  364. kTXNDontDrawTextMask = 1 shl kTXNDontDrawTextBit;
  365. {
  366. * Indicates that the client has provided a CGContext to be used for
  367. * CG imaging inside the text box. Pass the CGContextRef in the
  368. * options field of the TXNTextBoxOptionsData structure. Mac OS X
  369. * only.
  370. }
  371. kTXNUseCGContextRefMask = 1 shl kTXNUseCGContextRefBit;
  372. {
  373. * Indicates that text should not be wrapped. Mac OS X only.
  374. }
  375. kTXNDontWrapTextMask = 1 shl kTXNDontWrapTextBit;
  376. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  377. { ¥ TextBox Options Data }
  378. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  379. type
  380. TXNTextBoxOptionsDataPtr = ^TXNTextBoxOptionsData;
  381. TXNTextBoxOptionsData = record
  382. optionTags: TXNTextBoxOptions;
  383. flushness: Fract;
  384. justification: Fract;
  385. rotation: Fixed;
  386. options: UnivPtr;
  387. end;
  388. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  389. { ¥ File Types }
  390. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  391. {
  392. * TXNFileType
  393. *
  394. * Discussion:
  395. * Useful for TXNNewObject and TXNSave APIs.
  396. }
  397. type
  398. TXNFileType = OSType;
  399. const
  400. kTXNTextensionFile = $7478746E (* 'txtn' *);
  401. kTXNTextFile = $54455854 (* 'TEXT' *);
  402. kTXNPictureFile = $50494354 (* 'PICT' *);
  403. kTXNMovieFile = $4D6F6F56 (* 'MooV' *);
  404. kTXNSoundFile = $7366696C (* 'sfil' *);
  405. kTXNAIFFFile = $41494646 (* 'AIFF' *);
  406. kTXNUnicodeTextFile = $75747874 (* 'utxt' *);
  407. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  408. { ¥ Text Encoding Types }
  409. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  410. {
  411. * TXNPermanentTextEncodingType
  412. *
  413. * Discussion:
  414. * Useful for TXNNewObject and TXNSave APIs.
  415. }
  416. type
  417. TXNPermanentTextEncodingType = UInt32;
  418. const
  419. kTXNSystemDefaultEncoding = 0;
  420. kTXNMacOSEncoding = 1;
  421. kTXNUnicodeEncoding = 2;
  422. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  423. { ¥ Data Types }
  424. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  425. type
  426. TXNDataTypePtr = ^TXNDataType;
  427. TXNDataType = OSType;
  428. const
  429. kTXNTextData = $54455854 (* 'TEXT' *);
  430. kTXNPictureData = $50494354 (* 'PICT' *);
  431. kTXNMovieData = $6D6F6F76 (* 'moov' *);
  432. kTXNSoundData = $736E6420 (* 'snd ' *);
  433. kTXNUnicodeTextData = $75747874 (* 'utxt' *);
  434. kTXNTextAndMultimediaData = $7478746E (* 'txtn' *);
  435. kTXNRichTextFormatData = $52544620 (* 'RTF ' *);
  436. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  437. { ¥ Action constants used in undo/redo functions }
  438. { In Mac OS X version 10.4 and later TXNActionKey is deprecated. }
  439. { The following action constants should be used instead. }
  440. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  441. {
  442. * kTXNActionTyping
  443. *
  444. * Discussion:
  445. * Denotes a typing action.
  446. *
  447. * Mac OS X threading:
  448. * Not thread safe
  449. *
  450. * Availability:
  451. * Mac OS X: in version 10.4 and later in Carbon.framework
  452. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  453. * Non-Carbon CFM: not available
  454. }
  455. var kTXNActionTyping: CFStringRef; external name '_kTXNActionTyping'; (* attribute const *)
  456. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  457. {
  458. * kTXNActionCut
  459. *
  460. * Discussion:
  461. * Denotes a cut action.
  462. *
  463. * Mac OS X threading:
  464. * Not thread safe
  465. *
  466. * Availability:
  467. * Mac OS X: in version 10.4 and later in Carbon.framework
  468. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  469. * Non-Carbon CFM: not available
  470. }
  471. var kTXNActionCut: CFStringRef; external name '_kTXNActionCut'; (* attribute const *)
  472. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  473. {
  474. * kTXNActionPaste
  475. *
  476. * Discussion:
  477. * Denotes a paste action.
  478. *
  479. * Mac OS X threading:
  480. * Not thread safe
  481. *
  482. * Availability:
  483. * Mac OS X: in version 10.4 and later in Carbon.framework
  484. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  485. * Non-Carbon CFM: not available
  486. }
  487. var kTXNActionPaste: CFStringRef; external name '_kTXNActionPaste'; (* attribute const *)
  488. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  489. {
  490. * kTXNActionClear
  491. *
  492. * Discussion:
  493. * Denotes a clear action.
  494. *
  495. * Mac OS X threading:
  496. * Not thread safe
  497. *
  498. * Availability:
  499. * Mac OS X: in version 10.4 and later in Carbon.framework
  500. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  501. * Non-Carbon CFM: not available
  502. }
  503. var kTXNActionClear: CFStringRef; external name '_kTXNActionClear'; (* attribute const *)
  504. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  505. {
  506. * kTXNActionChangeFont
  507. *
  508. * Discussion:
  509. * Denotes a change font action.
  510. *
  511. * Mac OS X threading:
  512. * Not thread safe
  513. *
  514. * Availability:
  515. * Mac OS X: in version 10.4 and later in Carbon.framework
  516. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  517. * Non-Carbon CFM: not available
  518. }
  519. var kTXNActionChangeFont: CFStringRef; external name '_kTXNActionChangeFont'; (* attribute const *)
  520. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  521. {
  522. * kTXNActionChangeColor
  523. *
  524. * Discussion:
  525. * Denotes a change color action.
  526. *
  527. * Mac OS X threading:
  528. * Not thread safe
  529. *
  530. * Availability:
  531. * Mac OS X: in version 10.4 and later in Carbon.framework
  532. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  533. * Non-Carbon CFM: not available
  534. }
  535. var kTXNActionChangeColor: CFStringRef; external name '_kTXNActionChangeColor'; (* attribute const *)
  536. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  537. {
  538. * kTXNActionChangeSize
  539. *
  540. * Discussion:
  541. * Denotes a change size action.
  542. *
  543. * Mac OS X threading:
  544. * Not thread safe
  545. *
  546. * Availability:
  547. * Mac OS X: in version 10.4 and later in Carbon.framework
  548. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  549. * Non-Carbon CFM: not available
  550. }
  551. var kTXNActionChangeSize: CFStringRef; external name '_kTXNActionChangeSize'; (* attribute const *)
  552. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  553. {
  554. * kTXNActionChangeStyle
  555. *
  556. * Discussion:
  557. * Denotes a change style action.
  558. *
  559. * Mac OS X threading:
  560. * Not thread safe
  561. *
  562. * Availability:
  563. * Mac OS X: in version 10.4 and later in Carbon.framework
  564. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  565. * Non-Carbon CFM: not available
  566. }
  567. var kTXNActionChangeStyle: CFStringRef; external name '_kTXNActionChangeStyle'; (* attribute const *)
  568. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  569. {
  570. * kTXNActionAlignLeft
  571. *
  572. * Discussion:
  573. * Denotes an align left action.
  574. *
  575. * Mac OS X threading:
  576. * Not thread safe
  577. *
  578. * Availability:
  579. * Mac OS X: in version 10.4 and later in Carbon.framework
  580. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  581. * Non-Carbon CFM: not available
  582. }
  583. var kTXNActionAlignLeft: CFStringRef; external name '_kTXNActionAlignLeft'; (* attribute const *)
  584. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  585. {
  586. * kTXNActionAlignCenter
  587. *
  588. * Discussion:
  589. * Denotes an align center action.
  590. *
  591. * Mac OS X threading:
  592. * Not thread safe
  593. *
  594. * Availability:
  595. * Mac OS X: in version 10.4 and later in Carbon.framework
  596. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  597. * Non-Carbon CFM: not available
  598. }
  599. var kTXNActionAlignCenter: CFStringRef; external name '_kTXNActionAlignCenter'; (* attribute const *)
  600. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  601. {
  602. * kTXNActionAlignRight
  603. *
  604. * Discussion:
  605. * Denotes an align right action.
  606. *
  607. * Mac OS X threading:
  608. * Not thread safe
  609. *
  610. * Availability:
  611. * Mac OS X: in version 10.4 and later in Carbon.framework
  612. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  613. * Non-Carbon CFM: not available
  614. }
  615. var kTXNActionAlignRight: CFStringRef; external name '_kTXNActionAlignRight'; (* attribute const *)
  616. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  617. {
  618. * kTXNActionDrop
  619. *
  620. * Discussion:
  621. * Denotes a drop action.
  622. *
  623. * Mac OS X threading:
  624. * Not thread safe
  625. *
  626. * Availability:
  627. * Mac OS X: in version 10.4 and later in Carbon.framework
  628. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  629. * Non-Carbon CFM: not available
  630. }
  631. var kTXNActionDrop: CFStringRef; external name '_kTXNActionDrop'; (* attribute const *)
  632. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  633. {
  634. * kTXNActionMove
  635. *
  636. * Discussion:
  637. * Denotes a move action.
  638. *
  639. * Mac OS X threading:
  640. * Not thread safe
  641. *
  642. * Availability:
  643. * Mac OS X: in version 10.4 and later in Carbon.framework
  644. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  645. * Non-Carbon CFM: not available
  646. }
  647. var kTXNActionMove: CFStringRef; external name '_kTXNActionMove'; (* attribute const *)
  648. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  649. {
  650. * kTXNActionChangeFontFeature
  651. *
  652. * Discussion:
  653. * Denotes a change font feature action.
  654. *
  655. * Mac OS X threading:
  656. * Not thread safe
  657. *
  658. * Availability:
  659. * Mac OS X: in version 10.4 and later in Carbon.framework
  660. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  661. * Non-Carbon CFM: not available
  662. }
  663. var kTXNActionChangeFontFeature: CFStringRef; external name '_kTXNActionChangeFontFeature'; (* attribute const *)
  664. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  665. {
  666. * kTXNActionChangeFontVariation
  667. *
  668. * Discussion:
  669. * Denotes a change font variation action.
  670. *
  671. * Mac OS X threading:
  672. * Not thread safe
  673. *
  674. * Availability:
  675. * Mac OS X: in version 10.4 and later in Carbon.framework
  676. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  677. * Non-Carbon CFM: not available
  678. }
  679. var kTXNActionChangeFontVariation: CFStringRef; external name '_kTXNActionChangeFontVariation'; (* attribute const *)
  680. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  681. {
  682. * kTXNActionChangeGlyphVariation
  683. *
  684. * Discussion:
  685. * Denotes a change glyph variation action.
  686. *
  687. * Mac OS X threading:
  688. * Not thread safe
  689. *
  690. * Availability:
  691. * Mac OS X: in version 10.4 and later in Carbon.framework
  692. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  693. * Non-Carbon CFM: not available
  694. }
  695. var kTXNActionChangeGlyphVariation: CFStringRef; external name '_kTXNActionChangeGlyphVariation'; (* attribute const *)
  696. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  697. {
  698. * kTXNActionChangeTextPosition
  699. *
  700. * Discussion:
  701. * Denotes a change text's position action, which includes changing
  702. * the space before/after characters and shifting the text's
  703. * baseline.
  704. *
  705. * Mac OS X threading:
  706. * Not thread safe
  707. *
  708. * Availability:
  709. * Mac OS X: in version 10.4 and later in Carbon.framework
  710. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  711. * Non-Carbon CFM: not available
  712. }
  713. var kTXNActionChangeTextPosition: CFStringRef; external name '_kTXNActionChangeTextPosition'; (* attribute const *)
  714. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  715. {
  716. * kTXNActionUndoLast
  717. *
  718. * Discussion:
  719. * Used in undo/redo functions if none of the other constants apply.
  720. *
  721. * Mac OS X threading:
  722. * Not thread safe
  723. *
  724. * Availability:
  725. * Mac OS X: in version 10.4 and later in Carbon.framework
  726. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  727. * Non-Carbon CFM: not available
  728. }
  729. var kTXNActionUndoLast: CFStringRef; external name '_kTXNActionUndoLast'; (* attribute const *)
  730. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  731. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  732. { ¥ Format Setting Constants }
  733. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  734. type
  735. TXNTabType = SInt8;
  736. const
  737. kTXNRightTab = -1;
  738. kTXNLeftTab = 0;
  739. kTXNCenterTab = 1;
  740. type
  741. TXNTabPtr = ^TXNTab;
  742. TXNTab = record
  743. value: SInt16;
  744. tabType: TXNTabType;
  745. filler: SInt8;
  746. end;
  747. const
  748. kTXNLeftToRight = 0;
  749. kTXNRightToLeft = 1;
  750. const
  751. kTXNFlushDefault = 0; { Flush according to the line direction }
  752. kTXNFlushLeft = 1;
  753. kTXNFlushRight = 2;
  754. kTXNCenter = 4;
  755. kTXNFullJust = 8;
  756. kTXNForceFullJust = 16; { Flush left and right for all lines }
  757. {
  758. * TXNMargins
  759. *
  760. * Discussion:
  761. * In MLTE version 1.2 and later you can change the top, left and
  762. * right margins.
  763. }
  764. type
  765. TXNMarginsPtr = ^TXNMargins;
  766. TXNMargins = record
  767. topMargin: SInt16;
  768. leftMargin: SInt16;
  769. bottomMargin: SInt16;
  770. {
  771. * The bottom margin is a placeholder for possible future
  772. * enhancements.
  773. }
  774. rightMargin: SInt16;
  775. end;
  776. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  777. { ¥ Control Tags }
  778. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  779. {
  780. * TXNControlTag
  781. *
  782. }
  783. type
  784. TXNControlTag = FourCharCode;
  785. TXNControlTagPtr = ^TXNControlTag; { when a VAR xx: TXNControlTag parameter can be nil, it is changed to xx: TXNControlTagPtr }
  786. const
  787. kTXNLineDirectionTag = $6C6E6472 (* 'lndr' *); { Not functional when userIO is not allowed }
  788. kTXNJustificationTag = $6A757374 (* 'just' *); { Not functional when userIO is not allowed }
  789. kTXNIOPrivilegesTag = $696F7076 (* 'iopv' *);
  790. kTXNSelectionStateTag = $736C7374 (* 'slst' *);
  791. kTXNInlineStateTag = $696E7374 (* 'inst' *);
  792. kTXNWordWrapStateTag = $77777273 (* 'wwrs' *);
  793. kTXNKeyboardSyncStateTag = $6B627379 (* 'kbsy' *);
  794. kTXNAutoIndentStateTag = $6175696E (* 'auin' *);
  795. kTXNTabSettingsTag = $74616273 (* 'tabs' *);
  796. kTXNRefConTag = $7266636E (* 'rfcn' *);
  797. kTXNMarginsTag = $6D617267 (* 'marg' *);
  798. kTXNFlattenMoviesTag = $666C6174 (* 'flat' *);
  799. kTXNDoFontSubstitution = $66537562 (* 'fSub' *); { Note: This can degrade performance greatly in the case of large documents }
  800. kTXNNoUserIOTag = $6E75696F (* 'nuio' *);
  801. {
  802. * In Mac OS X version 10.4 and later this constant is deprecated.
  803. * The functions TXNSetEventTarget and TXNGetEventTarget should be
  804. * used instead.
  805. }
  806. kTXNUseCarbonEvents = $63626362 (* 'cbcb' *);
  807. kTXNDrawSelectionWhenInactiveTag = $64736C6E (* 'dsln' *);
  808. kTXNDisableDragAndDropTag = $64726167 (* 'drag' *);
  809. kTXNSingleLevelUndoTag = $756E646F (* 'undo' *); { Set this state during creation of the object. Switching Undo level back and forth is not recommended.}
  810. kTXNVisibilityTag = $76697362 (* 'visb' *); { Set the visibility state of the object }
  811. {
  812. * In Mac OS X version 10.4 or later use this tag to disable and
  813. * re-enable layout and drawing. It optimizes performance when adding
  814. * data incrementally to a text object.
  815. }
  816. kTXNDisableLayoutAndDrawTag = kTXNVisibilityTag; { Turn on / off layout and drawing. Same as kTXNVisibilityTag but makes clear what the tag does}
  817. {
  818. * In Mac OS X version 10.4 or later use this constant to set
  819. * autoscroll behaviour. See the discussion below for the enum
  820. * TXNAutoScrollBehavior for the types of autoscrolling supported.
  821. }
  822. kTXNAutoScrollBehaviorTag = $73626576 (* 'sbev' *);
  823. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  824. { ¥ Convenience Constants for TXNGet/SetTXNControls }
  825. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  826. const
  827. kTXNClearThisControl = $FFFFFFFF; { To clear an object control setting }
  828. kTXNClearTheseFontFeatures = $80000000; { To clear ATSUI font feature(s) }
  829. { kTXNIOPrivilegesTag}
  830. const
  831. kTXNReadWrite = false;
  832. kTXNReadOnly = true;
  833. { kTXNSelectionStateTag}
  834. const
  835. kTXNSelectionOn = true;
  836. kTXNSelectionOff = false;
  837. { kTXNInlineStateTag}
  838. const
  839. kTXNUseInline = false;
  840. kTXNUseBottomline = true;
  841. { kTXNWordWrapStateTag}
  842. const
  843. kTXNAutoWrap = false;
  844. kTXNNoAutoWrap = true;
  845. { kTXNKeyboardSyncStateTag}
  846. const
  847. kTXNSyncKeyboard = false;
  848. kTXNNoSyncKeyboard = true;
  849. { kTXNAutoIndentStateTag}
  850. const
  851. kTXNAutoIndentOff = false;
  852. kTXNAutoIndentOn = true;
  853. { kTXNDrawSelectionWhenInactiveTag}
  854. const
  855. kTXNDontDrawSelectionWhenInactive = false;
  856. kTXNDrawSelectionWhenInactive = true;
  857. { kTXNDisableDragAndDropTag}
  858. const
  859. kTXNEnableDragAndDrop = false;
  860. kTXNDisableDragAndDrop = true;
  861. {kTXNDisableLayoutAndDraw}
  862. const
  863. kTXNDisableLayoutAndDraw = true;
  864. kTXNEnableLayoutAndDraw = false;
  865. type
  866. TXNControlDataPtr = ^TXNControlData;
  867. TXNControlData = record
  868. case SInt16 of
  869. 0: (
  870. uValue: UInt32;
  871. );
  872. 1: (
  873. sValue: SInt32;
  874. );
  875. 2: (
  876. tabValue: TXNTab;
  877. );
  878. 3: (
  879. marginsPtr: TXNMarginsPtr;
  880. );
  881. end;
  882. {
  883. * TXNAutoScrollBehavior
  884. *
  885. * Summary:
  886. * Set of values that can be passed to the function
  887. * TXNSetTXNObjectControls along with the control tag
  888. * kTXNAutoScrollBehaviorTag to control scrolling behavior.
  889. *
  890. * Discussion:
  891. * Beginning with Mac OS X version 10.4, MLTE supports 3 types of
  892. * autoscroll behavior. These are: always scroll a new insertion
  893. * into view, only scroll if the insertion point was visible and the
  894. * end of the new insertion is out of view, and never auto scroll
  895. * under any circumstance.
  896. }
  897. type
  898. TXNAutoScrollBehavior = UInt32;
  899. const
  900. {
  901. * The default auto scrolling behavior. When text is inserted the
  902. * document is scrolled to show the new insertion. This was the only
  903. * type of autoscrolling prior to Mac OS X version 10.4.
  904. }
  905. kTXNAutoScrollInsertionIntoView = 0;
  906. {
  907. * Never autoscroll. This includes mouse dragging and text
  908. * insertion. The only way to scroll the document is for the user to
  909. * use the scrollbar or to scroll programatically.
  910. }
  911. kTXNAutoScrollNever = 1;
  912. {
  913. * This type of autoscrolling is best for implementing terminal or
  914. * log windows. Autoscrolling only happens when the insertion offset
  915. * is currently in the users view. This means that if the user is
  916. * looking at page 1 of a 10 page document and text is inserted at
  917. * the end of the document than no autoscrolling will occur. However,
  918. * if the user was looking at page 10 and text was inserted there the
  919. * document would scroll.
  920. }
  921. kTXNAutoScrollWhenInsertionVisible = 2;
  922. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  923. { ¥ Offset/Selection Constants }
  924. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  925. type
  926. TXNOffset = UInt32;
  927. TXNOffsetPtr = ^TXNOffset; { when a VAR xx: TXNOffset parameter can be nil, it is changed to xx: TXNOffsetPtr }
  928. const
  929. kTXNUseCurrentSelection = $FFFFFFFF;
  930. kTXNStartOffset = 0;
  931. kTXNEndOffset = $7FFFFFFF;
  932. { Useful for TXNShowSelection API.}
  933. const
  934. kTXNShowStart = false;
  935. kTXNShowEnd = true;
  936. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  937. { ¥ Resource Constants }
  938. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  939. { Useful for saving document. }
  940. const
  941. kTXNSingleStylePerTextDocumentResType = $4D505352 (* 'MPSR' *);
  942. kTXNMultipleStylesPerTextDocumentResType = $7374796C (* 'styl' *);
  943. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  944. { ¥ URL Constants }
  945. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  946. {
  947. * TXNHyperLinkState
  948. *
  949. * Discussion:
  950. * For future use. Currently not available.
  951. }
  952. type
  953. TXNHyperLinkState = UInt32;
  954. const
  955. kTXNLinkNotPressed = 0;
  956. kTXNLinkWasPressed = 1;
  957. kTXNLinkTracking = 3;
  958. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  959. { ¥ Type Attributes / ATSUI Features and Variations }
  960. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  961. { Since MLTE currently uses ATSUI by default, the available face types for kTXNQDFontStyleAttribute }
  962. { are limited by what's available in ATSUI. Currently, MLTE supports types defined in MacTypes.h }
  963. { which are normal, bold, italic, underline, condensed, and extended. An alternative is to use }
  964. { available QD compatibility tags defined in ATSUnicode.h. }
  965. type
  966. TXNTypeRunAttributes = FourCharCode;
  967. const
  968. kTXNQDFontNameAttribute = $666E746E (* 'fntn' *);
  969. kTXNQDFontFamilyIDAttribute = $666F6E74 (* 'font' *);
  970. kTXNQDFontStyleAttribute = $66616365 (* 'face' *);
  971. kTXNQDFontColorAttribute = $6B6C6F72 (* 'klor' *);
  972. kTXNTextEncodingAttribute = $656E6364 (* 'encd' *);
  973. kTXNATSUIFontFeaturesAttribute = $61746665 (* 'atfe' *);
  974. kTXNATSUIFontVariationsAttribute = $61747661 (* 'atva' *);
  975. kTXNURLAttribute = $75726C61 (* 'urla' *);
  976. kTXNATSUIStyle = $6173746C (* 'astl' *);
  977. type
  978. TXNTypeRunAttributeSizes = ByteCount;
  979. const
  980. kTXNQDFontNameAttributeSize = SizeOf(Str255);
  981. kTXNQDFontFamilyIDAttributeSize = SizeOf(SInt16);
  982. kTXNQDFontStyleAttributeSize = SizeOf(Style);
  983. kTXNQDFontColorAttributeSize = SizeOf(RGBColor);
  984. kTXNTextEncodingAttributeSize = SizeOf(TextEncoding);
  985. kTXNFontSizeAttributeSize = SizeOf(Fixed);
  986. kTXNATSUIStyleSize = SizeOf(ATSUStyle);
  987. type
  988. TXNATSUIFeaturesPtr = ^TXNATSUIFeatures;
  989. TXNATSUIFeatures = record
  990. featureCount: ItemCount;
  991. featureTypes: ATSUFontFeatureTypePtr;
  992. featureSelectors: ATSUFontFeatureSelectorPtr;
  993. end;
  994. type
  995. TXNATSUIVariationsPtr = ^TXNATSUIVariations;
  996. TXNATSUIVariations = record
  997. variationCount: ItemCount;
  998. variationAxis: ATSUFontVariationAxisPtr;
  999. variationValues: ATSUFontVariationValuePtr;
  1000. end;
  1001. TXNAttributeDataPtr = ^TXNAttributeData;
  1002. TXNAttributeData = record
  1003. case SInt16 of
  1004. 0: (
  1005. dataPtr: UnivPtr;
  1006. );
  1007. 1: (
  1008. dataValue: UInt32;
  1009. );
  1010. 2: (
  1011. atsuFeatures: TXNATSUIFeaturesPtr;
  1012. );
  1013. 3: (
  1014. atsuVariations: TXNATSUIVariationsPtr;
  1015. );
  1016. end;
  1017. type
  1018. TXNTypeAttributesPtr = ^TXNTypeAttributes;
  1019. TXNTypeAttributes = record
  1020. tag: TXNTypeRunAttributes;
  1021. size: ByteCount;
  1022. data: TXNAttributeData;
  1023. end;
  1024. const
  1025. kTXNDontCareTypeSize = $FFFFFFFF;
  1026. kTXNDontCareTypeStyle = $FF;
  1027. kTXNIncrementTypeSize = $00000001;
  1028. kTXNDecrementTypeSize = $80000000;
  1029. kTXNUseScriptDefaultValue = -1;
  1030. {
  1031. * kTXNNoFontVariations is returned in the dataValue field when the
  1032. * caller as asked to see if the variation is continuous and there
  1033. * was no variation in the continuous range.
  1034. }
  1035. kTXNNoFontVariations = $7FFF;
  1036. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1037. { ¥ Style Continuous Bits }
  1038. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1039. { Useful for TXNGetContinuousTypeAttributes API. }
  1040. const
  1041. kTXNFontContinuousBit = 0;
  1042. kTXNSizeContinuousBit = 1;
  1043. kTXNStyleContinuousBit = 2;
  1044. kTXNColorContinuousBit = 3;
  1045. kTXNATSUIStyleContinuousBit = 4;
  1046. type
  1047. TXNContinuousFlags = OptionBits;
  1048. const
  1049. kTXNFontContinuousMask = 1 shl kTXNFontContinuousBit;
  1050. kTXNSizeContinuousMask = 1 shl kTXNSizeContinuousBit;
  1051. kTXNStyleContinuousMask = 1 shl kTXNStyleContinuousBit;
  1052. kTXNColorContinuousMask = 1 shl kTXNColorContinuousBit;
  1053. kTXNATSUIStyleContinuousMask = 1 shl kTXNATSUIStyleContinuousBit;
  1054. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1055. { ¥ Match Options Bits }
  1056. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1057. { Useful for TXNFind API. }
  1058. const
  1059. kTXNIgnoreCaseBit = 0;
  1060. kTXNEntireWordBit = 1;
  1061. kTXNUseEncodingWordRulesBit = 31;
  1062. type
  1063. TXNMatchOptions = OptionBits;
  1064. const
  1065. kTXNIgnoreCaseMask = 1 shl kTXNIgnoreCaseBit;
  1066. kTXNEntireWordMask = 1 shl kTXNEntireWordBit;
  1067. kTXNUseEncodingWordRulesMask = 1 shl kTXNUseEncodingWordRulesBit;
  1068. type
  1069. TXNMatchTextRecordPtr = ^TXNMatchTextRecord;
  1070. TXNMatchTextRecord = record
  1071. iTextPtr: UnivPtr;
  1072. iTextToMatchLength: SInt32;
  1073. iTextEncoding: TextEncoding;
  1074. end;
  1075. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1076. { ¥ Font Description }
  1077. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1078. type
  1079. TXNMacOSPreferredFontDescriptionPtr = ^TXNMacOSPreferredFontDescription;
  1080. TXNMacOSPreferredFontDescription = record
  1081. fontID: UInt32;
  1082. pointSize: Fixed;
  1083. encoding: TextEncoding;
  1084. fontStyle: Style;
  1085. end;
  1086. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1087. { ¥ Background }
  1088. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1089. {
  1090. * TXNBackgroundType
  1091. *
  1092. * Discussion:
  1093. * Currently only an RGBColor is supported for the background.
  1094. }
  1095. type
  1096. TXNBackgroundType = UInt32;
  1097. const
  1098. kTXNBackgroundTypeRGB = 1;
  1099. {
  1100. * TXNBackgroundData
  1101. *
  1102. * Discussion:
  1103. * The TXNBackgroundData is left as a union so that it can be
  1104. * expanded in the future to support other background types.
  1105. }
  1106. type
  1107. TXNBackgroundDataPtr = ^TXNBackgroundData;
  1108. TXNBackgroundData = record
  1109. case SInt16 of
  1110. 0: (
  1111. color: RGBColor;
  1112. );
  1113. end;
  1114. type
  1115. TXNBackgroundPtr = ^TXNBackground;
  1116. TXNBackground = record
  1117. bgType: TXNBackgroundType;
  1118. bg: TXNBackgroundData;
  1119. end;
  1120. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1121. { ¥ Constants passed in iTXNActionName parameter of TXNGet/ClearCountForActionType }
  1122. { functions. In Mac OS X version 10.4 and later TXNCountOptions is deprecated. }
  1123. { The following action count constants should be used instead. }
  1124. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1125. {
  1126. * kTXNActionCountOfTextChanges
  1127. *
  1128. * Discussion:
  1129. * All text changes other than style changes and custom defined
  1130. * actions are included in this action count. Includes key presses,
  1131. * inline sessions, cut/copy/paste, and drop, etc. Undo or redo
  1132. * events of the kind listed above are also included in this action
  1133. * count.
  1134. *
  1135. * Mac OS X threading:
  1136. * Not thread safe
  1137. *
  1138. * Availability:
  1139. * Mac OS X: in version 10.4 and later in Carbon.framework
  1140. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1141. * Non-Carbon CFM: not available
  1142. }
  1143. var kTXNActionCountOfTextChanges: CFStringRef; external name '_kTXNActionCountOfTextChanges'; (* attribute const *)
  1144. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1145. {
  1146. * kTXNActionCountOfStyleChanges
  1147. *
  1148. * Discussion:
  1149. * Any text style change are included in this action count. Style
  1150. * changes include changing font/font face/font size/font
  1151. * feature/font variation/glyph variation/text position, and font
  1152. * color, etc. Undo or redo events of the kind listed above are also
  1153. * included in this action count.
  1154. *
  1155. * Mac OS X threading:
  1156. * Not thread safe
  1157. *
  1158. * Availability:
  1159. * Mac OS X: in version 10.4 and later in Carbon.framework
  1160. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1161. * Non-Carbon CFM: not available
  1162. }
  1163. var kTXNActionCountOfStyleChanges: CFStringRef; external name '_kTXNActionCountOfStyleChanges'; (* attribute const *)
  1164. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1165. {
  1166. * kTXNActionCountOfAllChanges
  1167. *
  1168. * Discussion:
  1169. * A constant used to request the total count of actions including
  1170. * all text and style changes, as well as custom defined actions.
  1171. *
  1172. * Mac OS X threading:
  1173. * Not thread safe
  1174. *
  1175. * Availability:
  1176. * Mac OS X: in version 10.4 and later in Carbon.framework
  1177. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1178. * Non-Carbon CFM: not available
  1179. }
  1180. var kTXNActionCountOfAllChanges: CFStringRef; external name '_kTXNActionCountOfAllChanges'; (* attribute const *)
  1181. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1182. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1183. { ¥ Scrolling }
  1184. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1185. {
  1186. * TXNScrollUnit
  1187. *
  1188. * Discussion:
  1189. * Use as a parameter in TXNScroll.
  1190. }
  1191. type
  1192. TXNScrollUnit = UInt32;
  1193. const
  1194. kTXNScrollUnitsInPixels = 0;
  1195. kTXNScrollUnitsInLines = 1;
  1196. kTXNScrollUnitsInViewRects = 2;
  1197. {
  1198. * TXNScrollBarOrientation
  1199. *
  1200. * Discussion:
  1201. * Use as a parameter in ScrollInfo callback.
  1202. }
  1203. type
  1204. TXNScrollBarOrientation = UInt32;
  1205. const
  1206. kTXNHorizontal = 0;
  1207. kTXNVertical = 1;
  1208. {
  1209. * TXNScrollBarState
  1210. *
  1211. * Discussion:
  1212. * Use as a parameter in TXNActivate and TXNSetScrollbarState.
  1213. }
  1214. type
  1215. TXNScrollBarState = Boolean;
  1216. const
  1217. kScrollBarsAlwaysActive = true;
  1218. kScrollBarsSyncWithFocus = false;
  1219. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1220. { ¥ Draw Item Bits }
  1221. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1222. { Specifies which element(s) of the text object to render. Useful in TXNDrawObject API. }
  1223. const
  1224. kTXNDrawItemScrollbarsBit = 0;
  1225. kTXNDrawItemTextBit = 1;
  1226. kTXNDrawItemTextAndSelectionBit = 2;
  1227. type
  1228. TXNDrawItems = OptionBits;
  1229. const
  1230. kTXNDrawItemScrollbarsMask = 1 shl kTXNDrawItemScrollbarsBit;
  1231. kTXNDrawItemTextMask = 1 shl kTXNDrawItemTextBit;
  1232. kTXNDrawItemTextAndSelectionMask = 1 shl kTXNDrawItemTextAndSelectionBit;
  1233. kTXNDrawItemAllMask = $FFFFFFFF;
  1234. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1235. { ¥ Rectangle Keys }
  1236. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1237. { Each key corresponds to a specific bound for the object. Useful in TXNGetHIRect API. }
  1238. type
  1239. TXNRectKey = UInt32;
  1240. const
  1241. kTXNViewRectKey = 0;
  1242. kTXNDestinationRectKey = 1;
  1243. kTXNTextRectKey = 2;
  1244. kTXNVerticalScrollBarRectKey = 3;
  1245. kTXNHorizontalScrollBarRectKey = 4;
  1246. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1247. { ¥ Carbon Event Info }
  1248. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1249. { Dictionary keys currently supported in the TXNCarbonEventInfo dictionary }
  1250. {$ifc USE_CFSTR_CONSTANT_MACROS}
  1251. {$definec kTXNTextHandlerKey CFSTRP('TextInput')}
  1252. {$endc}
  1253. {$ifc USE_CFSTR_CONSTANT_MACROS}
  1254. {$definec kTXNWindowEventHandlerKey CFSTRP('WindowEvent')}
  1255. {$endc}
  1256. {$ifc USE_CFSTR_CONSTANT_MACROS}
  1257. {$definec kTXNWindowResizeEventHandlerKey CFSTRP('WindowResize')}
  1258. {$endc}
  1259. {$ifc USE_CFSTR_CONSTANT_MACROS}
  1260. {$definec kTXNCommandTargetKey CFSTRP('CommandTarget')}
  1261. {$endc}
  1262. {$ifc USE_CFSTR_CONSTANT_MACROS}
  1263. {$definec kTXNCommandUpdateKey CFSTRP('CommandUpdate')}
  1264. {$endc}
  1265. {$ifc USE_CFSTR_CONSTANT_MACROS}
  1266. {$definec kTXNFontMenuObjectKey CFSTRP('FontMenuObject')}
  1267. {$endc}
  1268. {$ifc USE_CFSTR_CONSTANT_MACROS}
  1269. {$definec kTXNActionNameMapperKey CFSTRP('ActionNameMapper')}
  1270. {$endc}
  1271. {$ifc USE_CFSTR_CONSTANT_MACROS}
  1272. {$definec kTXNWheelMouseEventHandlerKey CFSTRP('WheelMouseEvent')}
  1273. {$endc}
  1274. {$ifc USE_CFSTR_CONSTANT_MACROS}
  1275. {$definec kTXNTSMDocumentAccessHandlerKey CFSTRP('TSMDocumentAccess')}
  1276. {$endc}
  1277. {$ifc USE_CFSTR_CONSTANT_MACROS}
  1278. {$definec kTXNFontPanelEventHandlerKey CFSTRP('FontPanel')}
  1279. {$endc}
  1280. {
  1281. * TXNCarbonEventInfo
  1282. *
  1283. * Summary:
  1284. * Used to pass an EventTargetRef to MLTE via
  1285. * TXNSetTXNObjectControls API.
  1286. }
  1287. type
  1288. TXNCarbonEventInfoPtr = ^TXNCarbonEventInfo;
  1289. TXNCarbonEventInfo = record
  1290. {
  1291. * Pass TRUE. MLTE no longer uses AppleEvents.
  1292. }
  1293. useCarbonEvents: Boolean;
  1294. {
  1295. * Pass NULL.
  1296. }
  1297. filler: SInt8;
  1298. {
  1299. * Pass NULL. AppleEvent flags have been deprecated.
  1300. }
  1301. flags: UInt16;
  1302. {
  1303. * A reference to a Core Foundation dictionary whose keys are the
  1304. * events you want handled and whose values are event target
  1305. * references associated with the events. See the above list of
  1306. * predefined keys you can use to build the dictionary.
  1307. }
  1308. fDictionary: CFDictionaryRef;
  1309. end;
  1310. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ------------}
  1311. { ¥ Definition of dictionary keys for DocumentAttribute dictionary used in TXNWriteRangeToCFURL(), and }
  1312. { and TXNReadFromCFURL(). }
  1313. { When writing data out, document attributes are embedded into the data stream for document formats that }
  1314. { support them (ie. MLTE native format and RTF); when reading data in document attributes are extracted }
  1315. { from the data stream if the document format supports them. }
  1316. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ------------ÑÑÑ}
  1317. {
  1318. * kTXNDocumentAttributeTitleKey
  1319. *
  1320. * Discussion:
  1321. * CFString containing document title
  1322. *
  1323. * Mac OS X threading:
  1324. * Not thread safe
  1325. *
  1326. * Availability:
  1327. * Mac OS X: in version 10.4 and later in Carbon.framework
  1328. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1329. * Non-Carbon CFM: not available
  1330. }
  1331. var kTXNDocumentAttributeTitleKey: CFStringRef; external name '_kTXNDocumentAttributeTitleKey'; (* attribute const *)
  1332. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1333. {
  1334. * kTXNDocumentAttributeCompanyNameKey
  1335. *
  1336. * Discussion:
  1337. * CFString containing company name
  1338. *
  1339. * Mac OS X threading:
  1340. * Not thread safe
  1341. *
  1342. * Availability:
  1343. * Mac OS X: in version 10.4 and later in Carbon.framework
  1344. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1345. * Non-Carbon CFM: not available
  1346. }
  1347. var kTXNDocumentAttributeCompanyNameKey: CFStringRef; external name '_kTXNDocumentAttributeCompanyNameKey'; (* attribute const *)
  1348. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1349. {
  1350. * kTXNDocumentAttributeSubjectKey
  1351. *
  1352. * Discussion:
  1353. * CFString containing subject
  1354. *
  1355. * Mac OS X threading:
  1356. * Not thread safe
  1357. *
  1358. * Availability:
  1359. * Mac OS X: in version 10.4 and later in Carbon.framework
  1360. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1361. * Non-Carbon CFM: not available
  1362. }
  1363. var kTXNDocumentAttributeSubjectKey: CFStringRef; external name '_kTXNDocumentAttributeSubjectKey'; (* attribute const *)
  1364. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1365. {
  1366. * kTXNDocumentAttributeAuthorKey
  1367. *
  1368. * Discussion:
  1369. * CFString containing author name (not necessarily same as "last
  1370. * editor," see editor key below)
  1371. *
  1372. * Mac OS X threading:
  1373. * Not thread safe
  1374. *
  1375. * Availability:
  1376. * Mac OS X: in version 10.4 and later in Carbon.framework
  1377. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1378. * Non-Carbon CFM: not available
  1379. }
  1380. var kTXNDocumentAttributeAuthorKey: CFStringRef; external name '_kTXNDocumentAttributeAuthorKey'; (* attribute const *)
  1381. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1382. {
  1383. * kTXNDocumentAttributeKeywordsKey
  1384. *
  1385. * Discussion:
  1386. * CFArray of CFString, containing keywords
  1387. *
  1388. * Mac OS X threading:
  1389. * Not thread safe
  1390. *
  1391. * Availability:
  1392. * Mac OS X: in version 10.4 and later in Carbon.framework
  1393. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1394. * Non-Carbon CFM: not available
  1395. }
  1396. var kTXNDocumentAttributeKeywordsKey: CFStringRef; external name '_kTXNDocumentAttributeKeywordsKey'; (* attribute const *)
  1397. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1398. {
  1399. * kTXNDocumentAttributeCommentKey
  1400. *
  1401. * Discussion:
  1402. * CFString containing comments
  1403. *
  1404. * Mac OS X threading:
  1405. * Not thread safe
  1406. *
  1407. * Availability:
  1408. * Mac OS X: in version 10.4 and later in Carbon.framework
  1409. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1410. * Non-Carbon CFM: not available
  1411. }
  1412. var kTXNDocumentAttributeCommentKey: CFStringRef; external name '_kTXNDocumentAttributeCommentKey'; (* attribute const *)
  1413. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1414. {
  1415. * kTXNDocumentAttributeEditorKey
  1416. *
  1417. * Discussion:
  1418. * CFString containing name of person who last edited the document
  1419. *
  1420. * Mac OS X threading:
  1421. * Not thread safe
  1422. *
  1423. * Availability:
  1424. * Mac OS X: in version 10.4 and later in Carbon.framework
  1425. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1426. * Non-Carbon CFM: not available
  1427. }
  1428. var kTXNDocumentAttributeEditorKey: CFStringRef; external name '_kTXNDocumentAttributeEditorKey'; (* attribute const *)
  1429. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1430. {
  1431. * kTXNDocumentAttributeCreationTimeKey
  1432. *
  1433. * Discussion:
  1434. * CFAbsoluteTime containing document comments; note that this is
  1435. * not the file system creation date of the file, but of the
  1436. * document, as it's stored in the document
  1437. *
  1438. * Mac OS X threading:
  1439. * Not thread safe
  1440. *
  1441. * Availability:
  1442. * Mac OS X: in version 10.4 and later in Carbon.framework
  1443. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1444. * Non-Carbon CFM: not available
  1445. }
  1446. var kTXNDocumentAttributeCreationTimeKey: CFStringRef; external name '_kTXNDocumentAttributeCreationTimeKey'; (* attribute const *)
  1447. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1448. {
  1449. * kTXNDocumentAttributeModificationTimeKey
  1450. *
  1451. * Discussion:
  1452. * CFAbsoluteTime containing the last modification date of the
  1453. * document contents
  1454. *
  1455. * Mac OS X threading:
  1456. * Not thread safe
  1457. *
  1458. * Availability:
  1459. * Mac OS X: in version 10.4 and later in Carbon.framework
  1460. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1461. * Non-Carbon CFM: not available
  1462. }
  1463. var kTXNDocumentAttributeModificationTimeKey: CFStringRef; external name '_kTXNDocumentAttributeModificationTimeKey'; (* attribute const *)
  1464. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1465. {
  1466. * kTXNDocumentAttributeCopyrightKey
  1467. *
  1468. * Discussion:
  1469. * CFString containing the copyright of the document
  1470. *
  1471. * Mac OS X threading:
  1472. * Not thread safe
  1473. *
  1474. * Availability:
  1475. * Mac OS X: in version 10.4 and later in Carbon.framework
  1476. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1477. * Non-Carbon CFM: not available
  1478. }
  1479. var kTXNDocumentAttributeCopyrightKey: CFStringRef; external name '_kTXNDocumentAttributeCopyrightKey'; (* attribute const *)
  1480. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1481. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ------------}
  1482. { ¥ Key and value definitions for DataOption dictionary used in TXNWriteRangeToCFURL(), and TXNReadFromCFURL(). }
  1483. { Data options are used to specify options for reading in and writing out data. }
  1484. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ------------ÑÑÑ}
  1485. {
  1486. * kTXNDataOptionDocumentTypeKey
  1487. *
  1488. * Discussion:
  1489. * CFString containing the document format. Supported string values:
  1490. * kTXNPlainTextDocumentType, kTXNMLTEDocumentType,
  1491. * kTXNRTFDocumentType, kTXNQuickTimeDocumentType
  1492. *
  1493. * Mac OS X threading:
  1494. * Not thread safe
  1495. *
  1496. * Availability:
  1497. * Mac OS X: in version 10.4 and later in Carbon.framework
  1498. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1499. * Non-Carbon CFM: not available
  1500. }
  1501. var kTXNDataOptionDocumentTypeKey: CFStringRef; external name '_kTXNDataOptionDocumentTypeKey'; (* attribute const *)
  1502. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1503. {
  1504. * kTXNDataOptionCharacterEncodingKey
  1505. *
  1506. * Discussion:
  1507. * CFNumber of type kCFNumberSInt32Type containing the character
  1508. * encoding as specified in CFString.h and CFStringEncodingExt.h
  1509. *
  1510. * Mac OS X threading:
  1511. * Not thread safe
  1512. *
  1513. * Availability:
  1514. * Mac OS X: in version 10.4 and later in Carbon.framework
  1515. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1516. * Non-Carbon CFM: not available
  1517. }
  1518. var kTXNDataOptionCharacterEncodingKey: CFStringRef; external name '_kTXNDataOptionCharacterEncodingKey'; (* attribute const *)
  1519. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1520. { Document Type constants to be used as values for kTXNDataOptionDocumentTypeKey }
  1521. {
  1522. * kTXNPlainTextDocumentType
  1523. *
  1524. * Discussion:
  1525. * Plain Text document
  1526. *
  1527. * Mac OS X threading:
  1528. * Not thread safe
  1529. *
  1530. * Availability:
  1531. * Mac OS X: in version 10.4 and later in Carbon.framework
  1532. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1533. * Non-Carbon CFM: not available
  1534. }
  1535. var kTXNPlainTextDocumentType: CFStringRef; external name '_kTXNPlainTextDocumentType'; (* attribute const *)
  1536. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1537. {
  1538. * kTXNMLTEDocumentType
  1539. *
  1540. * Discussion:
  1541. * MLTE native document
  1542. *
  1543. * Mac OS X threading:
  1544. * Not thread safe
  1545. *
  1546. * Availability:
  1547. * Mac OS X: in version 10.4 and later in Carbon.framework
  1548. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1549. * Non-Carbon CFM: not available
  1550. }
  1551. var kTXNMLTEDocumentType: CFStringRef; external name '_kTXNMLTEDocumentType'; (* attribute const *)
  1552. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1553. {
  1554. * kTXNRTFDocumentType
  1555. *
  1556. * Discussion:
  1557. * RTF document
  1558. *
  1559. * Mac OS X threading:
  1560. * Not thread safe
  1561. *
  1562. * Availability:
  1563. * Mac OS X: in version 10.4 and later in Carbon.framework
  1564. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1565. * Non-Carbon CFM: not available
  1566. }
  1567. var kTXNRTFDocumentType: CFStringRef; external name '_kTXNRTFDocumentType'; (* attribute const *)
  1568. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1569. {
  1570. * kTXNQuickTimeDocumentType
  1571. *
  1572. * Discussion:
  1573. * Multimedia file that can be opened by QuickTime
  1574. * importers
  1575. * <BR>NOTE:Only supported for reading data, not writing.
  1576. *
  1577. * Mac OS X threading:
  1578. * Not thread safe
  1579. *
  1580. * Availability:
  1581. * Mac OS X: in version 10.4 and later in Carbon.framework
  1582. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1583. * Non-Carbon CFM: not available
  1584. }
  1585. var kTXNQuickTimeDocumentType: CFStringRef; external name '_kTXNQuickTimeDocumentType'; (* attribute const *)
  1586. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1587. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1588. { ¥ Callbacks }
  1589. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1590. type
  1591. TXNFindProcPtr = function( const (*var*) matchData: TXNMatchTextRecord; iDataType: TXNDataType; iMatchOptions: TXNMatchOptions; iSearchTextPtr: {const} UnivPtr; encoding: TextEncoding; absStartOffset: TXNOffset; searchTextLength: ByteCount; var oStartMatch: TXNOffset; var oEndMatch: TXNOffset; var ofound: Boolean; refCon: UInt32 ): OSStatus;
  1592. type
  1593. TXNActionNameMapperProcPtr = function( actionName: CFStringRef; commandID: UInt32; inUserData: UnivPtr ): CFStringRef;
  1594. type
  1595. TXNContextualMenuSetupProcPtr = procedure( iContextualMenu: MenuRef; objct: TXNObject; inUserData: UnivPtr );
  1596. type
  1597. TXNScrollInfoProcPtr = procedure( iValue: SInt32; iMaximumValue: SInt32; iScrollBarOrientation: TXNScrollBarOrientation; iRefCon: SInt32 );
  1598. type
  1599. TXNFindUPP = TXNFindProcPtr;
  1600. type
  1601. TXNActionNameMapperUPP = TXNActionNameMapperProcPtr;
  1602. type
  1603. TXNContextualMenuSetupUPP = TXNContextualMenuSetupProcPtr;
  1604. type
  1605. TXNScrollInfoUPP = TXNScrollInfoProcPtr;
  1606. {
  1607. * NewTXNFindUPP()
  1608. *
  1609. * Availability:
  1610. * Mac OS X: in version 10.0 and later in Carbon.framework
  1611. * CarbonLib: in CarbonLib 1.0 and later
  1612. * Non-Carbon CFM: available as macro/inline
  1613. }
  1614. function NewTXNFindUPP( userRoutine: TXNFindProcPtr ): TXNFindUPP; external name '_NewTXNFindUPP';
  1615. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1616. {
  1617. * NewTXNActionNameMapperUPP()
  1618. *
  1619. * Availability:
  1620. * Mac OS X: in version 10.4 and later in Carbon.framework
  1621. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1622. * Non-Carbon CFM: available as macro/inline
  1623. }
  1624. function NewTXNActionNameMapperUPP( userRoutine: TXNActionNameMapperProcPtr ): TXNActionNameMapperUPP; external name '_NewTXNActionNameMapperUPP';
  1625. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1626. {
  1627. * NewTXNContextualMenuSetupUPP()
  1628. *
  1629. * Availability:
  1630. * Mac OS X: in version 10.4 and later in Carbon.framework
  1631. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1632. * Non-Carbon CFM: available as macro/inline
  1633. }
  1634. function NewTXNContextualMenuSetupUPP( userRoutine: TXNContextualMenuSetupProcPtr ): TXNContextualMenuSetupUPP; external name '_NewTXNContextualMenuSetupUPP';
  1635. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1636. {
  1637. * NewTXNScrollInfoUPP()
  1638. *
  1639. * Availability:
  1640. * Mac OS X: in version 10.1 and later in Carbon.framework
  1641. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
  1642. * Non-Carbon CFM: available as macro/inline
  1643. }
  1644. function NewTXNScrollInfoUPP( userRoutine: TXNScrollInfoProcPtr ): TXNScrollInfoUPP; external name '_NewTXNScrollInfoUPP';
  1645. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  1646. {
  1647. * DisposeTXNFindUPP()
  1648. *
  1649. * Availability:
  1650. * Mac OS X: in version 10.0 and later in Carbon.framework
  1651. * CarbonLib: in CarbonLib 1.0 and later
  1652. * Non-Carbon CFM: available as macro/inline
  1653. }
  1654. procedure DisposeTXNFindUPP( userUPP: TXNFindUPP ); external name '_DisposeTXNFindUPP';
  1655. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1656. {
  1657. * DisposeTXNActionNameMapperUPP()
  1658. *
  1659. * Availability:
  1660. * Mac OS X: in version 10.4 and later in Carbon.framework
  1661. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1662. * Non-Carbon CFM: available as macro/inline
  1663. }
  1664. procedure DisposeTXNActionNameMapperUPP( userUPP: TXNActionNameMapperUPP ); external name '_DisposeTXNActionNameMapperUPP';
  1665. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1666. {
  1667. * DisposeTXNContextualMenuSetupUPP()
  1668. *
  1669. * Availability:
  1670. * Mac OS X: in version 10.4 and later in Carbon.framework
  1671. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1672. * Non-Carbon CFM: available as macro/inline
  1673. }
  1674. procedure DisposeTXNContextualMenuSetupUPP( userUPP: TXNContextualMenuSetupUPP ); external name '_DisposeTXNContextualMenuSetupUPP';
  1675. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1676. {
  1677. * DisposeTXNScrollInfoUPP()
  1678. *
  1679. * Availability:
  1680. * Mac OS X: in version 10.1 and later in Carbon.framework
  1681. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
  1682. * Non-Carbon CFM: available as macro/inline
  1683. }
  1684. procedure DisposeTXNScrollInfoUPP( userUPP: TXNScrollInfoUPP ); external name '_DisposeTXNScrollInfoUPP';
  1685. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  1686. {
  1687. * InvokeTXNFindUPP()
  1688. *
  1689. * Availability:
  1690. * Mac OS X: in version 10.0 and later in Carbon.framework
  1691. * CarbonLib: in CarbonLib 1.0 and later
  1692. * Non-Carbon CFM: available as macro/inline
  1693. }
  1694. function InvokeTXNFindUPP( const (*var*) matchData: TXNMatchTextRecord; iDataType: TXNDataType; iMatchOptions: TXNMatchOptions; iSearchTextPtr: {const} UnivPtr; encoding: TextEncoding; absStartOffset: TXNOffset; searchTextLength: ByteCount; var oStartMatch: TXNOffset; var oEndMatch: TXNOffset; var ofound: Boolean; refCon: UInt32; userUPP: TXNFindUPP ): OSStatus; external name '_InvokeTXNFindUPP';
  1695. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1696. {
  1697. * InvokeTXNActionNameMapperUPP()
  1698. *
  1699. * Availability:
  1700. * Mac OS X: in version 10.4 and later in Carbon.framework
  1701. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1702. * Non-Carbon CFM: available as macro/inline
  1703. }
  1704. function InvokeTXNActionNameMapperUPP( actionName: CFStringRef; commandID: UInt32; inUserData: UnivPtr; userUPP: TXNActionNameMapperUPP ): CFStringRef; external name '_InvokeTXNActionNameMapperUPP';
  1705. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1706. {
  1707. * InvokeTXNContextualMenuSetupUPP()
  1708. *
  1709. * Availability:
  1710. * Mac OS X: in version 10.4 and later in Carbon.framework
  1711. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  1712. * Non-Carbon CFM: available as macro/inline
  1713. }
  1714. procedure InvokeTXNContextualMenuSetupUPP( iContextualMenu: MenuRef; objct: TXNObject; inUserData: UnivPtr; userUPP: TXNContextualMenuSetupUPP ); external name '_InvokeTXNContextualMenuSetupUPP';
  1715. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  1716. {
  1717. * InvokeTXNScrollInfoUPP()
  1718. *
  1719. * Availability:
  1720. * Mac OS X: in version 10.1 and later in Carbon.framework
  1721. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
  1722. * Non-Carbon CFM: available as macro/inline
  1723. }
  1724. procedure InvokeTXNScrollInfoUPP( iValue: SInt32; iMaximumValue: SInt32; iScrollBarOrientation: TXNScrollBarOrientation; iRefCon: SInt32; userUPP: TXNScrollInfoUPP ); external name '_InvokeTXNScrollInfoUPP';
  1725. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  1726. { **************************************************************************************************** }
  1727. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1728. { ¥ MLTE APIs ¥ }
  1729. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1730. { **************************************************************************************************** }
  1731. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1732. { ¥ Creating and Destroying Object }
  1733. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1734. {
  1735. * TXNCreateObject()
  1736. *
  1737. * Summary:
  1738. * Creates a new text object of type TXNObject, which is an opaque
  1739. * structure that handles text formatting.
  1740. *
  1741. * Mac OS X threading:
  1742. * Not thread safe
  1743. *
  1744. * Parameters:
  1745. *
  1746. * iFrameRect:
  1747. * A pointer to a variable of type HIRect. The rectangle is used
  1748. * to specify the destination and view rectangles for the new MLTE
  1749. * object. A value of NULL indicates that the rectangle for the
  1750. * window port will be used as view and destination rectangles
  1751. * when the object is attached later on to the window. See
  1752. * TXNAttachObjectToWindowRef below.
  1753. *
  1754. * iFrameOptions:
  1755. * A value of type TXNFrameOptions that specifies the options you
  1756. * want the object to support. ÒSee Frame OptionsÓ in the MLTE
  1757. * Reference for a description of the options.
  1758. *
  1759. * oTXNObject:
  1760. * A pointer to a structure of type TXNObject. On return, this
  1761. * points to the opaque text object data structure allocated by
  1762. * the function. You need to pass this object to most MLTE
  1763. * functions.
  1764. *
  1765. * Result:
  1766. * A result code indicating success or failure.
  1767. *
  1768. * Availability:
  1769. * Mac OS X: in version 10.3 and later in Carbon.framework
  1770. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1771. * Non-Carbon CFM: not available
  1772. }
  1773. function TXNCreateObject( const (*var*) iFrameRect: HIRect; iFrameOptions: TXNFrameOptions; var oTXNObject: TXNObject ): OSStatus; external name '_TXNCreateObject';
  1774. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1775. {
  1776. * TXNDeleteObject()
  1777. *
  1778. * Summary:
  1779. * Delete a previously allocated TXNObject and all associated data
  1780. * structures. If the frameType is multiple frames all frames are
  1781. * released.
  1782. *
  1783. * Mac OS X threading:
  1784. * Not thread safe
  1785. *
  1786. * Parameters:
  1787. *
  1788. * iTXNObject:
  1789. * Opaque TXNObject obtained from TXNCreateObject. The text
  1790. * object to free.
  1791. *
  1792. * Availability:
  1793. * Mac OS X: in version 10.0 and later in Carbon.framework
  1794. * CarbonLib: in CarbonLib 1.0 and later
  1795. * Non-Carbon CFM: in Textension 1.0 and later
  1796. }
  1797. procedure TXNDeleteObject( iTXNObject: TXNObject ); external name '_TXNDeleteObject';
  1798. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1799. {
  1800. * TXNInitTextension()
  1801. *
  1802. * Summary:
  1803. * Initialize the Textension library. Should be called as soon as
  1804. * possible after the Macintosh toolbox is initialized. On Mac OS X
  1805. * version 10.3 or later, it's not necessary to call this routine.
  1806. * The cases where you may want to call this routine are: 1) A set
  1807. * of default fonts different from the system default is desired. 2)
  1808. * Want to have multimedia support 3) Want to use QuickdrawText
  1809. * instead of ATSUI to render the text.
  1810. *
  1811. * Mac OS X threading:
  1812. * Not thread safe
  1813. *
  1814. * Parameters:
  1815. *
  1816. * iDefaultFonts:
  1817. * A table of font information including fontFamily ID, point
  1818. * size, style, and script code. The table can be NULL or can have
  1819. * an entry for any script for which you would like to to
  1820. * designate a default font. Only a valid script number is
  1821. * required. You can designate that Textension should use the
  1822. * default for a give script by setting the field to
  1823. * kTXNUseScriptDefaultValue (-1).
  1824. *
  1825. * iCountDefaultFonts:
  1826. * Count of entries in the iDefaultFonts parameter.
  1827. *
  1828. * iUsageFlags:
  1829. * Specify whether multimeida should be supported.
  1830. *
  1831. * Result:
  1832. * A result code indicating success or failure. Various MacOS errors
  1833. * are possible if something is wrong.
  1834. *
  1835. * Availability:
  1836. * Mac OS X: in version 10.0 and later in Carbon.framework
  1837. * CarbonLib: in CarbonLib 1.0 and later
  1838. * Non-Carbon CFM: in Textension 1.0 and later
  1839. }
  1840. function TXNInitTextension( {const} iDefaultFonts: {variable-size-array} TXNMacOSPreferredFontDescriptionPtr { can be NULL }; iCountDefaultFonts: ItemCount; iUsageFlags: TXNInitOptions ): OSStatus; external name '_TXNInitTextension';
  1841. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1842. {
  1843. * TXNVersionInformation()
  1844. *
  1845. * Summary:
  1846. * Get the version number and a set of feature bits.
  1847. * TXNVersionValue uses a NumVersion structure. See MacTypes.h for
  1848. * the format of the version. Currently there are two feature bits:
  1849. * one for ATSUI default, another one for CarbonEvent default.
  1850. *
  1851. * Mac OS X threading:
  1852. * Not thread safe
  1853. *
  1854. * Parameters:
  1855. *
  1856. * oFeatureFlags:
  1857. * Pointer to a bit mask. See TXNFeatureMask enum above. If
  1858. * kTXNWillDefaultToATSUIBit is set it means that by default MLTE
  1859. * will use ATSUI to image and measure text and will default to
  1860. * using Unicode to store characters.
  1861. *
  1862. * Result:
  1863. * TXNVersionValue: Current version.
  1864. *
  1865. * Availability:
  1866. * Mac OS X: in version 10.0 and later in Carbon.framework
  1867. * CarbonLib: in CarbonLib 1.0 and later
  1868. * Non-Carbon CFM: in Textension 1.0 and later
  1869. }
  1870. function TXNVersionInformation( var oFeatureFlags: TXNFeatureBits ): TXNVersionValue; external name '_TXNVersionInformation';
  1871. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1872. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1873. { ¥ Set/Get Window Associated with the Object }
  1874. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1875. {
  1876. * TXNAttachObjectToWindowRef()
  1877. *
  1878. * Summary:
  1879. * Attaches a text object to a window.
  1880. *
  1881. * Mac OS X threading:
  1882. * Not thread safe
  1883. *
  1884. * Parameters:
  1885. *
  1886. * iTXNObject:
  1887. * Opaque TXNObject obtained from TXNCreateObject. The text
  1888. * object you want to attach to the input window.
  1889. *
  1890. * iWindowRef:
  1891. * A WindowRef for the window you want to attach the object to.
  1892. *
  1893. * Result:
  1894. * A result code indicating success or failure.
  1895. *
  1896. * Availability:
  1897. * Mac OS X: in version 10.3 and later in Carbon.framework
  1898. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1899. * Non-Carbon CFM: not available
  1900. }
  1901. function TXNAttachObjectToWindowRef( iTXNObject: TXNObject; iWindowRef: WindowRef ): OSStatus; external name '_TXNAttachObjectToWindowRef';
  1902. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1903. {
  1904. * TXNGetWindowRef()
  1905. *
  1906. * Summary:
  1907. * Returns the window that the input object is attached to.
  1908. *
  1909. * Discussion:
  1910. * If no window is attached to the object it returns NULL.
  1911. *
  1912. * Mac OS X threading:
  1913. * Not thread safe
  1914. *
  1915. * Parameters:
  1916. *
  1917. * iTXNObject:
  1918. * Opaque TXNObject obtained from TXNCreateObject. The text
  1919. * object you want to attach to the input window.
  1920. *
  1921. * Result:
  1922. * The windowRef for the current window attached to the the text
  1923. * object.
  1924. *
  1925. * Availability:
  1926. * Mac OS X: in version 10.3 and later in Carbon.framework
  1927. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  1928. * Non-Carbon CFM: not available
  1929. }
  1930. function TXNGetWindowRef( iTXNObject: TXNObject ): WindowRef; external name '_TXNGetWindowRef';
  1931. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  1932. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1933. { ¥ Events }
  1934. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  1935. {
  1936. * TXNKeyDown()
  1937. *
  1938. * Summary:
  1939. * Process a keydown event. Note that if CJK script is installed and
  1940. * current font is CJK inline input will take place. This is always
  1941. * the case unless the application has requested the bottomline
  1942. * window or has turned off TSM (see initialization options above).
  1943. *
  1944. * Mac OS X threading:
  1945. * Not thread safe
  1946. *
  1947. * Parameters:
  1948. *
  1949. * iTXNObject:
  1950. * Opaque struct to apply keydown to.
  1951. *
  1952. * iEvent:
  1953. * The keydown event.
  1954. *
  1955. * Availability:
  1956. * Mac OS X: in version 10.0 and later in Carbon.framework
  1957. * CarbonLib: in CarbonLib 1.0 and later
  1958. * Non-Carbon CFM: in Textension 1.0 and later
  1959. }
  1960. procedure TXNKeyDown( iTXNObject: TXNObject; const (*var*) iEvent: EventRecord ); external name '_TXNKeyDown';
  1961. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1962. {
  1963. * TXNAdjustCursor()
  1964. *
  1965. * Summary:
  1966. * Handle switching the cursor. If over text area set to i-beam.
  1967. * Over graphics, sound, movie, scrollbar or outside of window set
  1968. * to arrow.
  1969. *
  1970. * Mac OS X threading:
  1971. * Not thread safe
  1972. *
  1973. * Parameters:
  1974. *
  1975. * iTXNObject:
  1976. * Opaque struct obtained from TXNCreateObject.
  1977. *
  1978. * ioCursorRgn:
  1979. * Region to be passed to WaitNextEvent. Resized accordingly by
  1980. * TXNAdjustCursor.
  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 Textension 1.0 and later
  1986. }
  1987. procedure TXNAdjustCursor( iTXNObject: TXNObject; ioCursorRgn: RgnHandle ); external name '_TXNAdjustCursor';
  1988. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  1989. {
  1990. * TXNClick()
  1991. *
  1992. * Summary:
  1993. * Process click in content region. Takes care of scrolling,
  1994. * selecting text, playing sound and movies, drag & drop, and
  1995. * double-clicks.
  1996. *
  1997. * Mac OS X threading:
  1998. * Not thread safe
  1999. *
  2000. * Parameters:
  2001. *
  2002. * iTXNObject:
  2003. * Opaque struct obtained from TXNCreateObject.
  2004. *
  2005. * iEvent:
  2006. * The mousedown event.
  2007. *
  2008. * Availability:
  2009. * Mac OS X: in version 10.0 and later in Carbon.framework
  2010. * CarbonLib: in CarbonLib 1.0 and later
  2011. * Non-Carbon CFM: in Textension 1.0 and later
  2012. }
  2013. procedure TXNClick( iTXNObject: TXNObject; const (*var*) iEvent: EventRecord ); external name '_TXNClick';
  2014. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2015. {
  2016. * TXNSelectAll()
  2017. *
  2018. * Summary:
  2019. * Selects everything in a frame.
  2020. *
  2021. * Mac OS X threading:
  2022. * Not thread safe
  2023. *
  2024. * Parameters:
  2025. *
  2026. * iTXNObject:
  2027. * Opaque struct obtained from TXNCreateObject.
  2028. *
  2029. * Availability:
  2030. * Mac OS X: in version 10.0 and later in Carbon.framework
  2031. * CarbonLib: in CarbonLib 1.0 and later
  2032. * Non-Carbon CFM: in Textension 1.0 and later
  2033. }
  2034. procedure TXNSelectAll( iTXNObject: TXNObject ); external name '_TXNSelectAll';
  2035. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2036. {
  2037. * TXNFocus()
  2038. *
  2039. * Summary:
  2040. * Focus the TXNObject. Scrollbars and insertion point are made
  2041. * active if iBecomingFocused is true, and inactive if false.
  2042. *
  2043. * Mac OS X threading:
  2044. * Not thread safe
  2045. *
  2046. * Parameters:
  2047. *
  2048. * iTXNObject:
  2049. * Opaque struct obtained from TXNCreateObject.
  2050. *
  2051. * iBecomingFocused:
  2052. * true if becoming active. false otherwise.
  2053. *
  2054. * Availability:
  2055. * Mac OS X: in version 10.0 and later in Carbon.framework
  2056. * CarbonLib: in CarbonLib 1.0 and later
  2057. * Non-Carbon CFM: in Textension 1.0 and later
  2058. }
  2059. procedure TXNFocus( iTXNObject: TXNObject; iBecomingFocused: Boolean ); external name '_TXNFocus';
  2060. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2061. {
  2062. * TXNUpdate()
  2063. *
  2064. * Summary:
  2065. * Handle update event (i.e. draw everything in a frame.) This
  2066. * function calls the Toolbox BeginUpdate - EndUpdate functions for
  2067. * the window that was passed to TXNCreateObject. This makes it
  2068. * inappropriate for windows that contain something else besides the
  2069. * TXNObject.
  2070. *
  2071. * Mac OS X threading:
  2072. * Not thread safe
  2073. *
  2074. * Parameters:
  2075. *
  2076. * iTXNObject:
  2077. * Opaque struct obtained from TXNCreateObject.
  2078. *
  2079. * Availability:
  2080. * Mac OS X: in version 10.0 and later in Carbon.framework
  2081. * CarbonLib: in CarbonLib 1.0 and later
  2082. * Non-Carbon CFM: in Textension 1.0 and later
  2083. }
  2084. procedure TXNUpdate( iTXNObject: TXNObject ); external name '_TXNUpdate';
  2085. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2086. {
  2087. * TXNDrawObject()
  2088. *
  2089. * Summary:
  2090. * Renders the current content of the TXNObject on the screen.
  2091. *
  2092. * Discussion:
  2093. * Redraws the object element(s) specified in the TXNDrawItems
  2094. * flags. Drawing is limited to the input clip rectangle.
  2095. *
  2096. * Mac OS X threading:
  2097. * Not thread safe
  2098. *
  2099. * Parameters:
  2100. *
  2101. * iTXNObject:
  2102. * Opaque TXNObject obtained from TXNCreateObject. Draw into this
  2103. * text object.
  2104. *
  2105. * iClipRect:
  2106. * A pointer to a HIRect. If the rectangle is NULL, MLTE uses its
  2107. * view rectangle when drawing. If the rectangle is not NULL, MLTE
  2108. * will intersect iClipRect with the view rectangle to determine
  2109. * the rectangle to draw. MLTE will not draw in area not covered
  2110. * by the port's clip region. Therefore, a given clipRect larger
  2111. * than the port's clip region will be trimmed down.
  2112. *
  2113. * iDrawItems:
  2114. * A value of type TXNDrawItems. Indicates what element(s) of the
  2115. * object are to be drawn.
  2116. *
  2117. * Result:
  2118. * A result code indicating success or failure.
  2119. *
  2120. * Availability:
  2121. * Mac OS X: in version 10.3 and later in Carbon.framework
  2122. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  2123. * Non-Carbon CFM: not available
  2124. }
  2125. function TXNDrawObject( iTXNObject: TXNObject; const (*var*) iClipRect: HIRect; iDrawItems: TXNDrawItems ): OSStatus; external name '_TXNDrawObject';
  2126. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  2127. {
  2128. * TXNForceUpdate()
  2129. *
  2130. * Summary:
  2131. * Force a frame to be updated. Very much like toolbox call
  2132. * InvalRect.
  2133. *
  2134. * Mac OS X threading:
  2135. * Not thread safe
  2136. *
  2137. * Parameters:
  2138. *
  2139. * iTXNObject:
  2140. * Opaque TXNObject obtained from TXNCreateObject.
  2141. *
  2142. * Availability:
  2143. * Mac OS X: in version 10.0 and later in Carbon.framework
  2144. * CarbonLib: in CarbonLib 1.0 and later
  2145. * Non-Carbon CFM: in Textension 1.0 and later
  2146. }
  2147. procedure TXNForceUpdate( iTXNObject: TXNObject ); external name '_TXNForceUpdate';
  2148. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2149. {
  2150. * TXNGetSleepTicks()
  2151. *
  2152. * Summary:
  2153. * Depending on state of window get the appropriate sleep time to be
  2154. * passed to WaitNextEvent.
  2155. *
  2156. * Mac OS X threading:
  2157. * Not thread safe
  2158. *
  2159. * Parameters:
  2160. *
  2161. * iTXNObject:
  2162. * Opaque TXNObject obtained from TXNCreateObject.
  2163. *
  2164. * Result:
  2165. * A UInt32 value of the appropriate sleep time.
  2166. *
  2167. * Availability:
  2168. * Mac OS X: in version 10.0 and later in Carbon.framework
  2169. * CarbonLib: in CarbonLib 1.0 and later
  2170. * Non-Carbon CFM: in Textension 1.0 and later
  2171. }
  2172. function TXNGetSleepTicks( iTXNObject: TXNObject ): UInt32; external name '_TXNGetSleepTicks';
  2173. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2174. {
  2175. * TXNIdle()
  2176. *
  2177. * Summary:
  2178. * Do necessary Idle time processing. Typically flash the cursor. If
  2179. * a TextService is active pass a NULL event to the Text Service so
  2180. * it gets time.
  2181. *
  2182. * Mac OS X threading:
  2183. * Not thread safe
  2184. *
  2185. * Parameters:
  2186. *
  2187. * iTXNObject:
  2188. * Opaque TXNObject obtained from TXNCreateObject.
  2189. *
  2190. * Availability:
  2191. * Mac OS X: in version 10.0 and later in Carbon.framework
  2192. * CarbonLib: in CarbonLib 1.0 and later
  2193. * Non-Carbon CFM: in Textension 1.0 and later
  2194. }
  2195. procedure TXNIdle( iTXNObject: TXNObject ); external name '_TXNIdle';
  2196. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2197. {
  2198. * TXNGrowWindow()
  2199. *
  2200. * Summary:
  2201. * Handle mouse-down in grow region.
  2202. *
  2203. * Mac OS X threading:
  2204. * Not thread safe
  2205. *
  2206. * Parameters:
  2207. *
  2208. * iTXNObject:
  2209. * Opaque TXNObject obtained from TXNCreateObject.
  2210. *
  2211. * iEvent:
  2212. * The mousedown event
  2213. *
  2214. * Availability:
  2215. * Mac OS X: in version 10.0 and later in Carbon.framework
  2216. * CarbonLib: in CarbonLib 1.0 and later
  2217. * Non-Carbon CFM: in Textension 1.0 and later
  2218. }
  2219. procedure TXNGrowWindow( iTXNObject: TXNObject; const (*var*) iEvent: EventRecord ); external name '_TXNGrowWindow';
  2220. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2221. {
  2222. * TXNZoomWindow()
  2223. *
  2224. * Summary:
  2225. * Handle mouse-down in zoom.
  2226. *
  2227. * Mac OS X threading:
  2228. * Not thread safe
  2229. *
  2230. * Parameters:
  2231. *
  2232. * iTXNObject:
  2233. * Opaque TXNObject obtained from TXNCreateObject.
  2234. *
  2235. * iPart:
  2236. * Value returned by FindWindow
  2237. *
  2238. * Availability:
  2239. * Mac OS X: in version 10.0 and later in Carbon.framework
  2240. * CarbonLib: in CarbonLib 1.0 and later
  2241. * Non-Carbon CFM: in Textension 1.0 and later
  2242. }
  2243. procedure TXNZoomWindow( iTXNObject: TXNObject; iPart: SInt16 ); external name '_TXNZoomWindow';
  2244. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2245. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2246. { ¥ Redo/Undo }
  2247. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2248. {
  2249. * TXNBeginActionGroup()
  2250. *
  2251. * Summary:
  2252. * Starts an action group. Every supported edit action after
  2253. * TXNBeginActionGroup is called is added to the group until
  2254. * TXNEndActionGroup (see below) is called. When MLTE receives an
  2255. * undo/redo command, it will treat all actions added to the group
  2256. * as a single operation to undo/redo. Nesting of groups is not
  2257. * allowed. Calling TXNBeginActionGroup twice without calling
  2258. * TXNEndActionGroup in between will result in an error.
  2259. * TXNCanUndoAction and TXNCanRedoAction return false if there is an
  2260. * active action group.
  2261. *
  2262. * Mac OS X threading:
  2263. * Not thread safe
  2264. *
  2265. * Parameters:
  2266. *
  2267. * iTXNObject:
  2268. * Opaque TXNObject obtained from TXNCreateObject.
  2269. *
  2270. * iActionGroupName:
  2271. * A client supplied string used to describe the action group.
  2272. *
  2273. * Result:
  2274. * An operating system status code. The error
  2275. * kTXNOperationNotAllowedErr is returned if an undo action group
  2276. * has already been started but not terminated.
  2277. *
  2278. * Availability:
  2279. * Mac OS X: in version 10.4 and later in Carbon.framework
  2280. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  2281. * Non-Carbon CFM: not available
  2282. }
  2283. function TXNBeginActionGroup( iTXNObject: TXNObject; iActionGroupName: CFStringRef ): OSStatus; external name '_TXNBeginActionGroup';
  2284. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  2285. {
  2286. * TXNEndActionGroup()
  2287. *
  2288. * Summary:
  2289. * Ends the current action group. The call is ignored is there is no
  2290. * active action group.
  2291. *
  2292. * Mac OS X threading:
  2293. * Not thread safe
  2294. *
  2295. * Parameters:
  2296. *
  2297. * iTXNObject:
  2298. * Opaque TXNObject obtained from TXNCreateObject.
  2299. *
  2300. * Result:
  2301. * An operating system status code.
  2302. *
  2303. * Availability:
  2304. * Mac OS X: in version 10.4 and later in Carbon.framework
  2305. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  2306. * Non-Carbon CFM: not available
  2307. }
  2308. function TXNEndActionGroup( iTXNObject: TXNObject ): OSStatus; external name '_TXNEndActionGroup';
  2309. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  2310. {
  2311. * TXNCanUndoAction()
  2312. *
  2313. * Summary:
  2314. * Tells the client whether the last action is undoable or not, and
  2315. * if requested it returns a string that identifies the last action.
  2316. * Usually, this function is used by clients to determine whether
  2317. * the Undo item in the Edit menu should be enabled or not, and to
  2318. * obtain the action name that should be used in that item. When the
  2319. * last action is an action group (See
  2320. * TXNBeginActionGroup/TXNEndActionGroup), the the string used to
  2321. * name the group is returned. If you have asked MLTE to handling
  2322. * updating for the Redo and Undo edit commands you should call
  2323. * TXNSetActionNameMapper after calling TXNCanUndoAction so that
  2324. * MLTE can callback to you to get the correct strings for those
  2325. * items.
  2326. *
  2327. * Mac OS X threading:
  2328. * Not thread safe
  2329. *
  2330. * Parameters:
  2331. *
  2332. * iTXNObject:
  2333. * Opaque TXNObject obtained from TXNCreateObject.
  2334. *
  2335. * oActionName:
  2336. * Pointer to the string that denotes the last action. Pass in
  2337. * NULL if the string is not needed. The returned string is either
  2338. * a string defined by MLTE, or a string passed by the client to
  2339. * the TXNBeginActionGroup when a new action group is created. The
  2340. * client is responsible to retain and release the string.
  2341. *
  2342. * Result:
  2343. * Returns a Boolean value. If true, the last action is undoable,
  2344. * and the Undo item in the Edit menu, if there is one, should be
  2345. * enabled. If false, the last action cannot be undone and Undo item
  2346. * in the Edit menu should be grayed out.
  2347. *
  2348. * Availability:
  2349. * Mac OS X: in version 10.4 and later in Carbon.framework
  2350. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  2351. * Non-Carbon CFM: not available
  2352. }
  2353. function TXNCanUndoAction( iTXNObject: TXNObject; var oActionName: CFStringRef ): Boolean; external name '_TXNCanUndoAction';
  2354. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  2355. {
  2356. * TXNCanRedoAction()
  2357. *
  2358. * Summary:
  2359. * Tells the client whether the current item on the undo stack is
  2360. * redoable or not. Usually, this function is used by clients to
  2361. * determine whether the Redo item in the Edit menu should be
  2362. * enabled or not, and to obtain the action name that should be used
  2363. * in that item. When the current undo item is an action group (See
  2364. * TXNBeginActionGroup/TXNEndActionGroup), the string used to name
  2365. * the group is returned.
  2366. *
  2367. * Mac OS X threading:
  2368. * Not thread safe
  2369. *
  2370. * Parameters:
  2371. *
  2372. * iTXNObject:
  2373. * Opaque TXNObject obtained from TXNCreateObject.
  2374. *
  2375. * oActionName:
  2376. * Pointer to the string that denotes the current item in the undo
  2377. * stack. Pass in NULL if the string is not needed. The returned
  2378. * string is either a string defined by MLTE, or the string passed
  2379. * by the client to TXNBeginActionGroup when a new action group is
  2380. * created. The client is responsible to retain and release the
  2381. * string.
  2382. *
  2383. * Result:
  2384. * Returns a Boolean value. If true, the last action is redoable,
  2385. * and the Redo item in the Edit menu, if there is one, should be
  2386. * enabled. If false, the last action cannot be redone, and the Redo
  2387. * item in the Edit menu should be grayed out.
  2388. *
  2389. * Availability:
  2390. * Mac OS X: in version 10.4 and later in Carbon.framework
  2391. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  2392. * Non-Carbon CFM: not available
  2393. }
  2394. function TXNCanRedoAction( iTXNObject: TXNObject; var oActionName: CFStringRef ): Boolean; external name '_TXNCanRedoAction';
  2395. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  2396. {
  2397. * TXNSetActionNameMapper()
  2398. *
  2399. * Summary:
  2400. * Provides MLTE with a callback that is used to obtain the
  2401. * appropriate localized string, which represent either a single
  2402. * action or an action group (See
  2403. * TXNBeginActionGroup/TXNEndActionGroup), for updating the Redo and
  2404. * Undo items in the Edit menu.
  2405. *
  2406. * Discussion:
  2407. * If you have asked MLTE to handling updating for the Redo and Undo
  2408. * edit commands you should call this function so that MLTE can
  2409. * callback to you to get the correct strings for those items. When
  2410. * MLTE's handler for kEventClassCommand/kEventCommandUpdateStatus
  2411. * is called for the Redo or Undo command MLTE will check to see if
  2412. * a TXNActionNameMapperProc has been installed. If it has the is
  2413. * called to get the correct string to update the menu item. The
  2414. * client can used the action name and the command ID to determine
  2415. * the appropriate string.
  2416. *
  2417. * Mac OS X threading:
  2418. * Not thread safe
  2419. *
  2420. * Parameters:
  2421. *
  2422. * iTXNObject:
  2423. * The TXNObject.
  2424. *
  2425. * iStringForKeyProc:
  2426. * The callback.
  2427. *
  2428. * iUserData:
  2429. * A pointer to anything. Of course its a good idea to point at
  2430. * something that will help you map the action key to a string.
  2431. *
  2432. * Result:
  2433. * OSStatus. noErr if the operation is successful.
  2434. *
  2435. * Availability:
  2436. * Mac OS X: in version 10.4 and later in Carbon.framework
  2437. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  2438. * Non-Carbon CFM: not available
  2439. }
  2440. function TXNSetActionNameMapper( iTXNObject: TXNObject; iStringForKeyProc: TXNActionNameMapperUPP; iUserData: {const} UnivPtr ): OSStatus; external name '_TXNSetActionNameMapper';
  2441. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  2442. {
  2443. * TXNUndo()
  2444. *
  2445. * Summary:
  2446. * Undo the last command.
  2447. *
  2448. * Mac OS X threading:
  2449. * Not thread safe
  2450. *
  2451. * Parameters:
  2452. *
  2453. * iTXNObject:
  2454. * Opaque TXNObject obtained from TXNCreateObject.
  2455. *
  2456. * Availability:
  2457. * Mac OS X: in version 10.0 and later in Carbon.framework
  2458. * CarbonLib: in CarbonLib 1.0 and later
  2459. * Non-Carbon CFM: in Textension 1.0 and later
  2460. }
  2461. procedure TXNUndo( iTXNObject: TXNObject ); external name '_TXNUndo';
  2462. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2463. {
  2464. * TXNRedo()
  2465. *
  2466. * Summary:
  2467. * Redo the last command.
  2468. *
  2469. * Mac OS X threading:
  2470. * Not thread safe
  2471. *
  2472. * Parameters:
  2473. *
  2474. * iTXNObject:
  2475. * Opaque TXNObject obtained from TXNCreateObject.
  2476. *
  2477. * Availability:
  2478. * Mac OS X: in version 10.0 and later in Carbon.framework
  2479. * CarbonLib: in CarbonLib 1.0 and later
  2480. * Non-Carbon CFM: in Textension 1.0 and later
  2481. }
  2482. procedure TXNRedo( iTXNObject: TXNObject ); external name '_TXNRedo';
  2483. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2484. {
  2485. * TXNClearUndo()
  2486. *
  2487. * Summary:
  2488. * Purge the undo stack
  2489. *
  2490. * Mac OS X threading:
  2491. * Not thread safe
  2492. *
  2493. * Parameters:
  2494. *
  2495. * iTXNObject:
  2496. * Opaque TXNObject obtained from TXNCreateObject.
  2497. *
  2498. * Availability:
  2499. * Mac OS X: in version 10.2 and later in Carbon.framework
  2500. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  2501. * Non-Carbon CFM: in Textension not yet available
  2502. }
  2503. function TXNClearUndo( iTXNObject: TXNObject ): OSStatus; external name '_TXNClearUndo';
  2504. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  2505. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2506. { ¥ Editing }
  2507. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2508. {
  2509. * TXNCut()
  2510. *
  2511. * Summary:
  2512. * Cut the current selection to the clipboard.
  2513. *
  2514. * Mac OS X threading:
  2515. * Not thread safe
  2516. *
  2517. * Parameters:
  2518. *
  2519. * iTXNObject:
  2520. * Opaque TXNObject obtained from TXNCreateObject.
  2521. *
  2522. * Result:
  2523. * A result code indicating success or failure.
  2524. *
  2525. * Availability:
  2526. * Mac OS X: in version 10.0 and later in Carbon.framework
  2527. * CarbonLib: in CarbonLib 1.0 and later
  2528. * Non-Carbon CFM: in Textension 1.0 and later
  2529. }
  2530. function TXNCut( iTXNObject: TXNObject ): OSStatus; external name '_TXNCut';
  2531. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2532. {
  2533. * TXNCopy()
  2534. *
  2535. * Summary:
  2536. * Copy current selection to the clipboard.
  2537. *
  2538. * Mac OS X threading:
  2539. * Not thread safe
  2540. *
  2541. * Parameters:
  2542. *
  2543. * iTXNObject:
  2544. * Opaque TXNObject obtained from TXNCreateObject.
  2545. *
  2546. * Result:
  2547. * A result code indicating success or failure.
  2548. *
  2549. * Availability:
  2550. * Mac OS X: in version 10.0 and later in Carbon.framework
  2551. * CarbonLib: in CarbonLib 1.0 and later
  2552. * Non-Carbon CFM: in Textension 1.0 and later
  2553. }
  2554. function TXNCopy( iTXNObject: TXNObject ): OSStatus; external name '_TXNCopy';
  2555. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2556. {
  2557. * TXNPaste()
  2558. *
  2559. * Summary:
  2560. * Paste from the clipboard.
  2561. *
  2562. * Mac OS X threading:
  2563. * Not thread safe
  2564. *
  2565. * Parameters:
  2566. *
  2567. * iTXNObject:
  2568. * Opaque TXNObject obtained from TXNCreateObject.
  2569. *
  2570. * Result:
  2571. * A result code indicating success or failure.
  2572. *
  2573. * Availability:
  2574. * Mac OS X: in version 10.0 and later in Carbon.framework
  2575. * CarbonLib: in CarbonLib 1.0 and later
  2576. * Non-Carbon CFM: in Textension 1.0 and later
  2577. }
  2578. function TXNPaste( iTXNObject: TXNObject ): OSStatus; external name '_TXNPaste';
  2579. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2580. {
  2581. * TXNClear()
  2582. *
  2583. * Summary:
  2584. * Clear the current selection.
  2585. *
  2586. * Mac OS X threading:
  2587. * Not thread safe
  2588. *
  2589. * Parameters:
  2590. *
  2591. * iTXNObject:
  2592. * Opaque TXNObject obtained from TXNCreateObject.
  2593. *
  2594. * Result:
  2595. * A result code indicating success or failure.
  2596. *
  2597. * Availability:
  2598. * Mac OS X: in version 10.0 and later in Carbon.framework
  2599. * CarbonLib: in CarbonLib 1.0 and later
  2600. * Non-Carbon CFM: in Textension 1.0 and later
  2601. }
  2602. function TXNClear( iTXNObject: TXNObject ): OSStatus; external name '_TXNClear';
  2603. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2604. {
  2605. * TXNIsScrapPastable()
  2606. *
  2607. * Summary:
  2608. * Test to see if the current scrap contains data that is supported
  2609. * by Textension. Used to determine if Paste item in Edit menu
  2610. * should be active or inactive. The types of data supported depends
  2611. * on what data types were specified in the TXNInitTextension
  2612. * options.
  2613. *
  2614. * Mac OS X threading:
  2615. * Not thread safe
  2616. *
  2617. * Result:
  2618. * Boolean: True if data type in Clipboard is supported. False if
  2619. * not a supported data type. If result is True the Paste item in
  2620. * the menu can be highlighted.
  2621. *
  2622. * Availability:
  2623. * Mac OS X: in version 10.0 and later in Carbon.framework
  2624. * CarbonLib: in CarbonLib 1.0 and later
  2625. * Non-Carbon CFM: in Textension 1.0 and later
  2626. }
  2627. function TXNIsScrapPastable: Boolean; external name '_TXNIsScrapPastable';
  2628. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2629. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2630. { ¥ Selection }
  2631. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2632. {
  2633. * TXNGetSelection()
  2634. *
  2635. * Summary:
  2636. * Get the absolute offsets of the current selection. Embedded
  2637. * graphics, sound, etc. each count as one character.
  2638. *
  2639. * Mac OS X threading:
  2640. * Not thread safe
  2641. *
  2642. * Parameters:
  2643. *
  2644. * iTXNObject:
  2645. * Opaque TXNObject obtained from TXNCreateObject.
  2646. *
  2647. * oStartOffset:
  2648. * Absolute beginning of the current selection.
  2649. *
  2650. * oEndOffset:
  2651. * End of current selection.
  2652. *
  2653. * Availability:
  2654. * Mac OS X: in version 10.0 and later in Carbon.framework
  2655. * CarbonLib: in CarbonLib 1.0 and later
  2656. * Non-Carbon CFM: in Textension 1.0 and later
  2657. }
  2658. procedure TXNGetSelection( iTXNObject: TXNObject; var oStartOffset: TXNOffset; var oEndOffset: TXNOffset ); external name '_TXNGetSelection';
  2659. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2660. {
  2661. * TXNShowSelection()
  2662. *
  2663. * Summary:
  2664. * Scroll the current selection into view.
  2665. *
  2666. * Mac OS X threading:
  2667. * Not thread safe
  2668. *
  2669. * Parameters:
  2670. *
  2671. * iTXNObject:
  2672. * Opaque TXNObject obtained from TXNCreateObject.
  2673. *
  2674. * iShowEnd:
  2675. * If true the end of the selection is scrolled into view. If
  2676. * false the beginning of selection is scrolled into view.
  2677. *
  2678. * Availability:
  2679. * Mac OS X: in version 10.0 and later in Carbon.framework
  2680. * CarbonLib: in CarbonLib 1.0 and later
  2681. * Non-Carbon CFM: in Textension 1.0 and later
  2682. }
  2683. procedure TXNShowSelection( iTXNObject: TXNObject; iShowEnd: Boolean ); external name '_TXNShowSelection';
  2684. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2685. {
  2686. * TXNIsSelectionEmpty()
  2687. *
  2688. * Summary:
  2689. * Call to find out if the current selection is empty. Use this to
  2690. * determine if Paste, Cut, Copy, Clear should be highlighted in
  2691. * Edit menu.
  2692. *
  2693. * Mac OS X threading:
  2694. * Not thread safe
  2695. *
  2696. * Parameters:
  2697. *
  2698. * iTXNObject:
  2699. * Opaque TXNObject obtained from TXNCreateObject.
  2700. *
  2701. * Result:
  2702. * Boolean: True if current selection is empty (i.e. start offset ==
  2703. * end offset). False if selection is not empty.
  2704. *
  2705. * Availability:
  2706. * Mac OS X: in version 10.0 and later in Carbon.framework
  2707. * CarbonLib: in CarbonLib 1.0 and later
  2708. * Non-Carbon CFM: in Textension 1.0 and later
  2709. }
  2710. function TXNIsSelectionEmpty( iTXNObject: TXNObject ): Boolean; external name '_TXNIsSelectionEmpty';
  2711. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2712. {
  2713. * TXNSetSelection()
  2714. *
  2715. * Summary:
  2716. * Set the current selection.
  2717. *
  2718. * Mac OS X threading:
  2719. * Not thread safe
  2720. *
  2721. * Parameters:
  2722. *
  2723. * iTXNObject:
  2724. * Opaque TXNObject obtained from TXNCreateObject.
  2725. *
  2726. * iStartOffset:
  2727. * New beginning.
  2728. *
  2729. * iEndOffset:
  2730. * New end.
  2731. *
  2732. * Result:
  2733. * A result code indicating success or failure.
  2734. *
  2735. * Availability:
  2736. * Mac OS X: in version 10.0 and later in Carbon.framework
  2737. * CarbonLib: in CarbonLib 1.0 and later
  2738. * Non-Carbon CFM: in Textension 1.0 and later
  2739. }
  2740. function TXNSetSelection( iTXNObject: TXNObject; iStartOffset: TXNOffset; iEndOffset: TXNOffset ): OSStatus; external name '_TXNSetSelection';
  2741. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2742. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2743. { ¥ Set/Get Type Attributes }
  2744. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2745. {
  2746. * TXNGetContinuousTypeAttributes()
  2747. *
  2748. * Summary:
  2749. * Test the current selection to see if type size, style, color
  2750. * and/or font are continuous. That is is the current selection made
  2751. * up of one font, one font size, one Style, and/or one color. On
  2752. * return examine the flags to see if the attributes specified were
  2753. * continuous. If an attribute is continuous then the dataValue
  2754. * field in the TXNTypeAttributes can be examined to get the
  2755. * continous value. Remember that for color you pass a ptr to an
  2756. * RGBColor in attr[0].data.dataPtr.
  2757. *
  2758. * Discussion:
  2759. * If examining kTXNATSUIStyleContinuous bit, be sure to call
  2760. * ATSUDisposeStyle to dispose the style that is returned from MLTE.
  2761. *
  2762. * Mac OS X threading:
  2763. * Not thread safe
  2764. *
  2765. * Parameters:
  2766. *
  2767. * iTXNObject:
  2768. * Opaque TXNObject obtained from TXNCreateObject.
  2769. *
  2770. * oContinuousFlags:
  2771. * Bits which can be examined to see if type size, style, color,
  2772. * and/or font are continuous. Example: if (
  2773. * TXNGetContinuousTypeAttributes( txnObject, &flags, 1, &attr )
  2774. * == noErr ) ( if ( flags & kTXNFontContinuousMask ) ....check a
  2775. * font name
  2776. *
  2777. * iCount:
  2778. * Count of TXNTypeAttributes records in the ioTypeAttributes
  2779. * array.
  2780. *
  2781. * ioTypeAttributes:
  2782. * Array of TXNTypeAttributes that indicate the type attributes
  2783. * the caller is interested in. For example: 1. if you wanted to
  2784. * know if the current selection was continuous in terms of being
  2785. * all one same font size you could do something like this.
  2786. * TXNTypeAttributes attr[1] = ( TXNFontSizeAttribute,
  2787. * sizeof(Fixed),( 0 ) ) on return from the function if size is
  2788. * continuous (i.e. if the bit 3 of flags is set) then the third
  2789. * field (attr[0].data.dataValue) will contain the size of the
  2790. * font as a Fixed value. 2. if you wanted to know if the current
  2791. * selection was continuous in ATSUI style you could do something
  2792. * like this. TXNTypeAttributes attr[1] = ( kTXNATSUIStyle,
  2793. * kTXNATSUIStyleSize, ( 0 ) ) on return from the function if
  2794. * ATSUI style is continuous, then the third field
  2795. * (attr[0].data.dataPtr) will contain the ATSUI style.
  2796. *
  2797. * Result:
  2798. * A result code indicating success or failure.
  2799. *
  2800. * Availability:
  2801. * Mac OS X: in version 10.0 and later in Carbon.framework
  2802. * CarbonLib: in CarbonLib 1.0 and later
  2803. * Non-Carbon CFM: in Textension 1.0 and later
  2804. }
  2805. function TXNGetContinuousTypeAttributes( iTXNObject: TXNObject; var oContinuousFlags: TXNContinuousFlags; iCount: ItemCount; ioTypeAttributes: {variable-size-array} TXNTypeAttributesPtr { can be NULL } ): OSStatus; external name '_TXNGetContinuousTypeAttributes';
  2806. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2807. {
  2808. * TXNSetTypeAttributes()
  2809. *
  2810. * Summary:
  2811. * Set the current ranges font information. Values are passed in
  2812. * the attributes array. Values <= sizeof(UInt32) are passed by
  2813. * value. > sizeof(UInt32) are passed as a pointer. That is the
  2814. * TXNTypeAttributes' 3rd field is a union that servers as either a
  2815. * 32-bit integer where values can be written or a 32-bit pointer a
  2816. * value. Functional in NoUserIO mode.
  2817. *
  2818. * Mac OS X threading:
  2819. * Not thread safe
  2820. *
  2821. * Parameters:
  2822. *
  2823. * iTXNObject:
  2824. * Opaque TXNObject obtained from TXNCreateObject.
  2825. *
  2826. * iAttrCount:
  2827. * Count of type attributes in the TXNTypeAttributes array.
  2828. *
  2829. * iAttributes:
  2830. * Attributes that caller would like to set.
  2831. *
  2832. * iStartOffset:
  2833. * Start of the range where text attributes should be changed.
  2834. *
  2835. * iEndOffset:
  2836. * End of the range.
  2837. *
  2838. * Result:
  2839. * A result code indicating success or failure.
  2840. *
  2841. * Availability:
  2842. * Mac OS X: in version 10.0 and later in Carbon.framework
  2843. * CarbonLib: in CarbonLib 1.0 and later
  2844. * Non-Carbon CFM: in Textension 1.0 and later
  2845. }
  2846. function TXNSetTypeAttributes( iTXNObject: TXNObject; iAttrCount: ItemCount; {const} iAttributes: {variable-size-array} TXNTypeAttributesPtr; iStartOffset: TXNOffset; iEndOffset: TXNOffset ): OSStatus; external name '_TXNSetTypeAttributes';
  2847. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2848. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2849. { ¥ Set/Get Object Controls }
  2850. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2851. {
  2852. * TXNSetTXNObjectControls()
  2853. *
  2854. * Summary:
  2855. * Sets formatting and privileges attributes (such as justification,
  2856. * line direction, tab values, and read-only status) that apply to
  2857. * the entire text object.
  2858. *
  2859. * Discussion:
  2860. * On systems that use Apple Type Services for Unicode Imaging
  2861. * (ATSUI), the ATSUI line control attribute tags can be passed to
  2862. * this function in the iControlTag parameter. This is the case for
  2863. * all the ATSUI tags except kATSULineRotationTag. ATSUI tags are
  2864. * applied to the entire text object.
  2865. *
  2866. * Mac OS X threading:
  2867. * Not thread safe
  2868. *
  2869. * Parameters:
  2870. *
  2871. * iTXNObject:
  2872. * The text object that identifies the document for which you want
  2873. * to set formatting and privileges attributes.
  2874. *
  2875. * iClearAll:
  2876. * A Boolean value. If you set this to true, all formatting and
  2877. * privileges attributes are reset to their default value. That
  2878. * is, true clears existing tags and resets each to its default
  2879. * value. This can be done even when the object is in NoUserIO
  2880. * mode.
  2881. *
  2882. * iControlCount:
  2883. * The number of items in the iControlTags array.
  2884. *
  2885. * iControlTags:
  2886. * An array of values that specifies kind of data that is passed
  2887. * in the iControlData parameter. See ÒFormatting and Privileges
  2888. * SettingsÓ for a description of possible values. On systems that
  2889. * use Apple Type Services for Unicode Imaging (ATSUI), you can
  2890. * also pass ATSUI attribute tag constants. See the ATSUI
  2891. * documentation for a description of the ATSUI constants. Can be
  2892. * NULL if iClearAll is true.
  2893. *
  2894. * iControlData:
  2895. * An array of TXNControlData unions that contain the information
  2896. * your application wants to set. The value you supply to the
  2897. * iControlTags parameter specifies how the union of type
  2898. * TXNControlData is treated. You must make sure that the value
  2899. * you assign to the iControlData parameter is the appropriate
  2900. * type implied by the value you passed in the iControlTags
  2901. * parameter. Can be NULL if iClearAll is true.
  2902. *
  2903. * Result:
  2904. * An operating system status code.
  2905. *
  2906. * Availability:
  2907. * Mac OS X: in version 10.0 and later in Carbon.framework
  2908. * CarbonLib: in CarbonLib 1.0 and later
  2909. * Non-Carbon CFM: in Textension 1.0 and later
  2910. }
  2911. function TXNSetTXNObjectControls( iTXNObject: TXNObject; iClearAll: Boolean; iControlCount: ItemCount; {const} iControlTags: {variable-size-array} TXNControlTagPtr { can be NULL }; {const} iControlData: {variable-size-array} TXNControlDataPtr { can be NULL } ): OSStatus; external name '_TXNSetTXNObjectControls';
  2912. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2913. {
  2914. * TXNGetTXNObjectControls()
  2915. *
  2916. * Summary:
  2917. * Gets the current formatting and privileges attributes (such as
  2918. * justification, line direction, tab values, and read-only status)
  2919. * for a text object.
  2920. *
  2921. * Mac OS X threading:
  2922. * Not thread safe
  2923. *
  2924. * Parameters:
  2925. *
  2926. * iTXNObject:
  2927. * The text object that identifies the document to be activated.
  2928. * If NULL then the default value for an MLTE object is returned.
  2929. *
  2930. * iControlCount:
  2931. * The number of items in the iControlTags array.
  2932. *
  2933. * iControlTags:
  2934. * An array of values that specify the kind of formatting
  2935. * information you want returned in the oControlData array. See
  2936. * ÒFormatting and Privileges SettingsÓ for a description of
  2937. * possible values.
  2938. *
  2939. * oControlData:
  2940. * An array of TXNControlData unions. On return, the array
  2941. * contains the information that was requested through the
  2942. * iControlTags array. Your application must allocate the
  2943. * oControlData array.
  2944. *
  2945. * Result:
  2946. * An operating system status code.
  2947. *
  2948. * Availability:
  2949. * Mac OS X: in version 10.0 and later in Carbon.framework
  2950. * CarbonLib: in CarbonLib 1.0 and later
  2951. * Non-Carbon CFM: in Textension 1.0 and later
  2952. }
  2953. function TXNGetTXNObjectControls( iTXNObject: TXNObject { can be NULL }; iControlCount: ItemCount; {const} iControlTags: {variable-size-array} TXNControlTagPtr; oControlData: {variable-size-array} TXNControlDataPtr ): OSStatus; external name '_TXNGetTXNObjectControls';
  2954. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2955. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2956. { ¥ Other Settings }
  2957. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  2958. {
  2959. * TXNSetBackground()
  2960. *
  2961. * Summary:
  2962. * Set the type of background the TXNObject's text, etc. is drawn
  2963. * onto. At this point the background can be a color. Functional
  2964. * in NoUserIO mode.
  2965. *
  2966. * Mac OS X threading:
  2967. * Not thread safe
  2968. *
  2969. * Parameters:
  2970. *
  2971. * iTXNObject:
  2972. * Opaque TXNObject obtained from TXNCreateObject.
  2973. *
  2974. * iBackgroundInfo:
  2975. * Struct containing information that describes the background.
  2976. *
  2977. * Result:
  2978. * A result code indicating success or failure.
  2979. *
  2980. * Availability:
  2981. * Mac OS X: in version 10.0 and later in Carbon.framework
  2982. * CarbonLib: in CarbonLib 1.0 and later
  2983. * Non-Carbon CFM: in Textension 1.0 and later
  2984. }
  2985. function TXNSetBackground( iTXNObject: TXNObject; const (*var*) iBackgroundInfo: TXNBackground ): OSStatus; external name '_TXNSetBackground';
  2986. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  2987. {
  2988. * TXNEchoMode()
  2989. *
  2990. * Summary:
  2991. * Put the TXNObject into echo mode. What that means is that all
  2992. * characters in the TXNObject have the character 'echoCharacter'
  2993. * substituted for the actual glyph when drawing occurs.
  2994. *
  2995. * Discussion:
  2996. * Note that the echoCharacter is typed as a UniChar, but this is
  2997. * done merely to facilitate passing any 2 byte character. The
  2998. * encoding parameter actually determines the encoding used to
  2999. * locate a font and display a character. Thus if you wanted to
  3000. * display the diamond found in the Shift-JIS encoding for MacOS you
  3001. * would pass in 0x86A6 for the character but an encoding that was
  3002. * built to represent the MacOS Japanese encoding.
  3003. *
  3004. * Mac OS X threading:
  3005. * Not thread safe
  3006. *
  3007. * Parameters:
  3008. *
  3009. * iTXNObject:
  3010. * Opaque TXNObject obtained from TXNCreateObject.
  3011. *
  3012. * iEchoCharacter:
  3013. * Character to use in substitution.
  3014. *
  3015. * iEncoding:
  3016. * Encoding from which character is drawn.
  3017. *
  3018. * iOn:
  3019. * True if turning EchoMode on. False if turning it off.
  3020. *
  3021. * Result:
  3022. * A result code indicating success or failure.
  3023. *
  3024. * Availability:
  3025. * Mac OS X: in version 10.0 and later in Carbon.framework
  3026. * CarbonLib: in CarbonLib 1.0 and later
  3027. * Non-Carbon CFM: in Textension 1.0 and later
  3028. }
  3029. function TXNEchoMode( iTXNObject: TXNObject; iEchoCharacter: UniChar; iEncoding: TextEncoding; iOn: Boolean ): OSStatus; external name '_TXNEchoMode';
  3030. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3031. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3032. { ¥ Retrieve Run Info }
  3033. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3034. {
  3035. * TXNCountRunsInRange()
  3036. *
  3037. * Summary:
  3038. * Given a range specified by the starting and ending offset return
  3039. * a count of the runs in that range. Run in this case means
  3040. * changes in TextSyles or a graphic or sound.
  3041. *
  3042. * Mac OS X threading:
  3043. * Not thread safe
  3044. *
  3045. * Parameters:
  3046. *
  3047. * iTXNObject:
  3048. * Opaque TXNObject obtained from TXNCreateObject.
  3049. *
  3050. * iStartOffset:
  3051. * Start of range.
  3052. *
  3053. * iEndOffset:
  3054. * End of range.
  3055. *
  3056. * oRunCount:
  3057. * Count of runs in the range
  3058. *
  3059. * Result:
  3060. * A result code indicating success or failure.
  3061. *
  3062. * Availability:
  3063. * Mac OS X: in version 10.0 and later in Carbon.framework
  3064. * CarbonLib: in CarbonLib 1.0 and later
  3065. * Non-Carbon CFM: in Textension 1.0 and later
  3066. }
  3067. function TXNCountRunsInRange( iTXNObject: TXNObject; iStartOffset: TXNOffset; iEndOffset: TXNOffset; var oRunCount: ItemCount ): OSStatus; external name '_TXNCountRunsInRange';
  3068. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3069. {
  3070. * TXNGetIndexedRunInfoFromRange()
  3071. *
  3072. * Summary:
  3073. * Gets information about a run in a range of data.
  3074. *
  3075. * Discussion:
  3076. * You should first call the TXNCountRunsInRange function to get the
  3077. * count. The TXNTypeAttributes structure must specify the text
  3078. * attribute in which the application is interested. In other words,
  3079. * the tag field must be set. If you asked for the kTXNATSUIStyle
  3080. * info, you are now responsible for disposing the ATSUI style
  3081. * returned from the attribute array by calling ATSUDisposeStyle.
  3082. *
  3083. * Mac OS X threading:
  3084. * Not thread safe
  3085. *
  3086. * Parameters:
  3087. *
  3088. * iTXNObject:
  3089. * The text object for the current text area.
  3090. *
  3091. * iIndex:
  3092. * The value that corresponds to the run for which you want to get
  3093. * information. You call the TXNCountRunsInRange function to get
  3094. * the number of runs in a range. The iIndex parameter is
  3095. * zero-based, so its possible values are from 0 to the number of
  3096. * runs in a range minus 1.
  3097. *
  3098. * iStartOffset:
  3099. * The offset at which you want to start to obtain run information.
  3100. *
  3101. * iEndOffset:
  3102. * The offset at which you want run information to end.
  3103. *
  3104. * oRunStartOffset:
  3105. * On return, a pointer to a value that identifies the start of
  3106. * run relative to the beginning of the text, not the beginning of
  3107. * the range you specified in the iStartOffset parameter.
  3108. *
  3109. * oRunEndOffset:
  3110. * On return, a pointer to a value that identifies the end of the
  3111. * run relative to the beginning of the text, not the beginning of
  3112. * the range you specified in the iStartOffset parameter.
  3113. *
  3114. * oRunDataType:
  3115. * On return, a pointer to a value that identifies the type of
  3116. * data in the run. See ÒSupported Data TypesÓ for a description
  3117. * of possible values.
  3118. *
  3119. * iTypeAttributeCount:
  3120. * The number of font attributes.
  3121. *
  3122. * ioTypeAttributes:
  3123. * A pointer to a structure of type TXNTypeAttributes. On input,
  3124. * you specify the attribute (such as size) in the tag field and
  3125. * the attribute size in the size field. You can pass NULL for the
  3126. * data field. On return, the data field contains the attribute
  3127. * data. The data field is a union that serves either as a 32-bit
  3128. * integer or a 32-bit pointer, depending on the size field.
  3129. *
  3130. * Result:
  3131. * An operating system status code.
  3132. *
  3133. * Availability:
  3134. * Mac OS X: in version 10.0 and later in Carbon.framework
  3135. * CarbonLib: in CarbonLib 1.0 and later
  3136. * Non-Carbon CFM: in Textension 1.0 and later
  3137. }
  3138. function TXNGetIndexedRunInfoFromRange( iTXNObject: TXNObject; iIndex: ItemCount; iStartOffset: TXNOffset; iEndOffset: TXNOffset; oRunStartOffset: TXNOffsetPtr { can be NULL }; oRunEndOffset: TXNOffsetPtr { can be NULL }; oRunDataType: TXNDataTypePtr { can be NULL }; iTypeAttributeCount: ItemCount; ioTypeAttributes: TXNTypeAttributesPtr { can be NULL } ): OSStatus; external name '_TXNGetIndexedRunInfoFromRange';
  3139. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3140. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3141. { ¥ Get Data Size }
  3142. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3143. {
  3144. * TXNDataSize()
  3145. *
  3146. * Summary:
  3147. * Return the size in bytes of the characters in a given TXNObject.
  3148. *
  3149. * Mac OS X threading:
  3150. * Not thread safe
  3151. *
  3152. * Parameters:
  3153. *
  3154. * iTXNObject:
  3155. * Opaque TXNObject obtained from TXNCreateObject.
  3156. *
  3157. * Result:
  3158. * The bytes required to hold the characters.
  3159. *
  3160. * Availability:
  3161. * Mac OS X: in version 10.0 and later in Carbon.framework
  3162. * CarbonLib: in CarbonLib 1.0 and later
  3163. * Non-Carbon CFM: in Textension 1.0 and later
  3164. }
  3165. function TXNDataSize( iTXNObject: TXNObject ): ByteCount; external name '_TXNDataSize';
  3166. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3167. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3168. { ¥ Read and Write APIs }
  3169. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3170. {
  3171. * TXNWriteRangeToCFURL()
  3172. *
  3173. * Summary:
  3174. * Write a range of a TXNObject to a CFURLRef.
  3175. *
  3176. * Discussion:
  3177. * Write a range of a text object to a file or a special file bundle
  3178. * (directory). It supports different document formats and encodings
  3179. * which can be specified in the data options dictionary. Clients
  3180. * can specify additional document attributes when data is written
  3181. * out using a file format that supports such attributes (ie. RTF
  3182. * and native MLTE file format). See DocumentAttribute key
  3183. * definitions for additional information on the attributes
  3184. * supported.
  3185. *
  3186. * Mac OS X threading:
  3187. * Not thread safe
  3188. *
  3189. * Parameters:
  3190. *
  3191. * iTXNObject:
  3192. * Opaque TXNObject obtained from TXNCreateObject.
  3193. *
  3194. * iStartOffset:
  3195. * The initial offset in iTXNObject to write out to iFileURL.
  3196. *
  3197. * iEndOffset:
  3198. * The last offset in iTXNObject to write out to iFileURL.
  3199. *
  3200. * iDataOptions:
  3201. * A CFDictionaryRef that specifies options for writing out the
  3202. * data. See Data Options key documentation for a list of the
  3203. * options supported. If this parameter is NULL, the data is
  3204. * written out using MLTE's native format.
  3205. *
  3206. * iDocumentAttributes:
  3207. * Specifies the document attributes to be embedded in the data
  3208. * stream. This param is only supported when writing out the data
  3209. * using one of the following formats: RTF and MLTE native format.
  3210. * Only the key / values defined in Document Attributes are
  3211. * written out. The content of the dictionary is ignored for any
  3212. * other format. If the dictionary is NULL, no attributes are
  3213. * added to the data stream.
  3214. *
  3215. * iFileURL:
  3216. * Should point to an existing file or directory whichever is
  3217. * correct for file type. On exit, iFileURL will contain a copy of
  3218. * the data in the given range for the iTXNObject with the format
  3219. * and encoding specified by iDataOptions.
  3220. *
  3221. * Result:
  3222. * A result code indicating success or failure.
  3223. *
  3224. * Availability:
  3225. * Mac OS X: in version 10.4 and later in Carbon.framework
  3226. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  3227. * Non-Carbon CFM: not available
  3228. }
  3229. function TXNWriteRangeToCFURL( iTXNObject: TXNObject; iStartOffset: TXNOffset; iEndOffset: TXNOffset; iDataOptions: CFDictionaryRef { can be NULL }; iDocumentAttributes: CFDictionaryRef { can be NULL }; iFileURL: CFURLRef ): OSStatus; external name '_TXNWriteRangeToCFURL';
  3230. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  3231. {
  3232. * TXNReadFromCFURL()
  3233. *
  3234. * Summary:
  3235. * Read data from a CFURLRef into a TXNObject.
  3236. *
  3237. * Discussion:
  3238. * Read in data from a file or or special file bundle (directory)
  3239. * into a text object. Offset parameters are used to specify whether
  3240. * the new data is inserted, appended or replaces an existing data
  3241. * range in the text object. Clients can specify the document format
  3242. * and encoding of the data using the DataOptions dictionary. This
  3243. * functions also returns the document attributes present in the
  3244. * data stream. Document attributes are only supported for the rich
  3245. * text file formats supported by MLTE: RTF and MLTE native file
  3246. * format.
  3247. *
  3248. * Mac OS X threading:
  3249. * Not thread safe
  3250. *
  3251. * Parameters:
  3252. *
  3253. * iTXNObject:
  3254. * Opaque TXNObject obtained from TXNCreateObject. New data will
  3255. * be added to this object.
  3256. *
  3257. * iStartOffset:
  3258. * The initial offset in iTXNObject to place the data read in from
  3259. * iFileURL.
  3260. *
  3261. * iEndOffset:
  3262. * The last offset in iTXNObject to place the data read in from
  3263. * iFileURL.
  3264. *
  3265. * iDataOptions:
  3266. * A CFDictionaryRef that specifies options for reading in the
  3267. * data. See Data Options key documentation for a list of the
  3268. * options supported. If this parameter is NULL, the data is
  3269. * written out using MLTE's native format.
  3270. *
  3271. * iFileURL:
  3272. * A value of type CFURLRef. The data to be added to the
  3273. * iTXNObject.
  3274. *
  3275. * oDocumentAttributes:
  3276. * A value of type CFDictionaryRef. It contains the document
  3277. * attributes for the text object. On exit, this dictionary
  3278. * contains the document attributes present in the data stream, if
  3279. * the file format supports them; otherwise it will be NULL. The
  3280. * native MLTE file format and RTF support embedded document
  3281. * attributes. See the DocumentAttribute key documentation for a
  3282. * list of the attributes supported. If this parameter is NULL, no
  3283. * document attributes are written out. Sample code: If the caller
  3284. * passes a pointer to a dictionary ref, the API will return a ref
  3285. * to the dictionary of attributes if there is one (caller must
  3286. * release dictionary), otherwise the API will set the ref to NULL
  3287. * in all other cases. CFDictionaryRef oDocumentAttributes = NULL;
  3288. * status = TXNReadFromCFURL (...., &oDocumentAttributes); if
  3289. * (oDocumentAttributes != NULL) ::CFRelease(oDocumentAttributes);
  3290. *
  3291. * Result:
  3292. * A result code indicating success or failure.
  3293. *
  3294. * Availability:
  3295. * Mac OS X: in version 10.4 and later in Carbon.framework
  3296. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  3297. * Non-Carbon CFM: not available
  3298. }
  3299. function TXNReadFromCFURL( iTXNObject: TXNObject; iStartOffset: TXNOffset; iEndOffset: TXNOffset; iDataOptions: CFDictionaryRef { can be NULL }; iFileURL: CFURLRef; oDocumentAttributes: CFDictionaryRefPtr { can be NULL } ): OSStatus; external name '_TXNReadFromCFURL';
  3300. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  3301. {
  3302. * TXNCopyTypeIdentifiersForRange()
  3303. *
  3304. * Summary:
  3305. * Returns an array of univeral type identifiers (UTIs) that can be
  3306. * used to write out a range of a text object with no information
  3307. * loss.
  3308. *
  3309. * Discussion:
  3310. * Some file formats support limited embedding of data when writing
  3311. * out to disk, and use attachments instead, such as RTF. This API
  3312. * can be used to determine the document format to use with
  3313. * TXNWriteRangeToCFURL - i.e., whether to use RTF (Rich Text
  3314. * Format). Note that support for new document formats could be
  3315. * added in the future.
  3316. *
  3317. * Mac OS X threading:
  3318. * Not thread safe
  3319. *
  3320. * Parameters:
  3321. *
  3322. * iTXNObject:
  3323. * Opaque TXNObject obtained from TXNCreateObject.
  3324. *
  3325. * iStartOffset:
  3326. * The initial offset in iTXNObject for the range to check.
  3327. *
  3328. * iEndOffset:
  3329. * The last offset in iTXNObject for the range to check.
  3330. *
  3331. * oTypeIdentifiersForRange:
  3332. * A pointer to a CFArrayRef. On exit, the array will contain the
  3333. * list of universal type identifiers (UTI) that MLTE supports,
  3334. * and that can be used to write the object out to disk with no
  3335. * data loss. Each entry in the array is a CFStringRef.
  3336. *
  3337. * Result:
  3338. * A result code indicating success or failure.
  3339. *
  3340. * Availability:
  3341. * Mac OS X: in version 10.4 and later in Carbon.framework
  3342. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  3343. * Non-Carbon CFM: not available
  3344. }
  3345. function TXNCopyTypeIdentifiersForRange( iTXNObject: TXNObject; iStartOffset: TXNOffset; iEndOffset: TXNOffset; var oTypeIdentifiersForRange: CFArrayRef ): OSStatus; external name '_TXNCopyTypeIdentifiersForRange';
  3346. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  3347. {
  3348. * TXNGetData()
  3349. *
  3350. * Summary:
  3351. * Copy the data in the range specified by startOffset and endOffset.
  3352. *
  3353. * Discussion:
  3354. * This function should be used in conjunction with TXNNextDataRun.
  3355. * The client would call TXNCountRunsInRange to the number of data
  3356. * runs in a given range. The client can then walk the runs with
  3357. * the function TXNGetIndexedRunInfoFromRange.
  3358. * TXNGetIndexedRunInfoFromRange lets you examine each runs type and
  3359. * text attributes. For each data run of interest (i.e. one whose
  3360. * data the caller wanted to look at) the client would call
  3361. * TXNGetData. The handle passed to TXNGetData should not be
  3362. * allocated. TXNGetData takes care of allocating the dataHandle as
  3363. * necessary. However, the caller is responsible for disposing the
  3364. * handle.
  3365. *
  3366. * Mac OS X threading:
  3367. * Not thread safe
  3368. *
  3369. * Parameters:
  3370. *
  3371. * iTXNObject:
  3372. * Opaque TXNObject obtained from TXNCreateObject.
  3373. *
  3374. * iStartOffset:
  3375. * Absolute offset from which data copy should begin.
  3376. *
  3377. * iEndOffset:
  3378. * Absolute offset at which data copy should end.
  3379. *
  3380. * oDataHandle:
  3381. * If noErr a new handle containing the requested data. The caller
  3382. * is responsible for disposing the handle. Note that the handle
  3383. * is a copy so it can be safely disposed at any time.
  3384. *
  3385. * Result:
  3386. * Memory errors or TXN_IllegalToCrossDataBoundaries if offsets
  3387. * specify a range that crosses a data type boundary.
  3388. *
  3389. * Availability:
  3390. * Mac OS X: in version 10.0 and later in Carbon.framework
  3391. * CarbonLib: in CarbonLib 1.0 and later
  3392. * Non-Carbon CFM: in Textension 1.0 and later
  3393. }
  3394. function TXNGetData( iTXNObject: TXNObject; iStartOffset: TXNOffset; iEndOffset: TXNOffset; var oDataHandle: Handle ): OSStatus; external name '_TXNGetData';
  3395. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3396. {
  3397. * TXNGetDataEncoded()
  3398. *
  3399. * Summary:
  3400. * Copy the data in the range specified by startOffset and endOffset.
  3401. *
  3402. * Discussion:
  3403. * The handle passed to TXNGetDataEncoded should not be allocated.
  3404. * TXNGetData takes care of allocating the dataHandle as necessary.
  3405. * However, the caller is responsible for disposing the handle.
  3406. *
  3407. * Mac OS X threading:
  3408. * Not thread safe
  3409. *
  3410. * Parameters:
  3411. *
  3412. * iTXNObject:
  3413. * Opaque TXNObject obtained from TXNCreateObject.
  3414. *
  3415. * iStartOffset:
  3416. * Absolute offset from which data copy should begin.
  3417. *
  3418. * iEndOffset:
  3419. * Absolute offset at which data copy should end.
  3420. *
  3421. * oDataHandle:
  3422. * If noErr a new handle containing the requested data.
  3423. *
  3424. * iEncoding:
  3425. * should be kTXNTextData or kTXNUnicodeTextData.
  3426. *
  3427. * Result:
  3428. * Memory errors or TXN_IllegalToCrossDataBoundaries if offsets
  3429. * specify a range that crosses a data type boundary.
  3430. *
  3431. * Availability:
  3432. * Mac OS X: in version 10.0 and later in Carbon.framework
  3433. * CarbonLib: in CarbonLib 1.0 and later
  3434. * Non-Carbon CFM: in Textension 1.0 and later
  3435. }
  3436. function TXNGetDataEncoded( iTXNObject: TXNObject; iStartOffset: TXNOffset; iEndOffset: TXNOffset; var oDataHandle: Handle; iEncoding: TXNDataType ): OSStatus; external name '_TXNGetDataEncoded';
  3437. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3438. {
  3439. * TXNSetData()
  3440. *
  3441. * Summary:
  3442. * Replaces a range of data (text, graphics, and so forth).
  3443. *
  3444. * Discussion:
  3445. * Functional in NoUserIO mode.
  3446. *
  3447. * Mac OS X threading:
  3448. * Not thread safe
  3449. *
  3450. * Parameters:
  3451. *
  3452. * iTXNObject:
  3453. * The text object that identifies the document in which you want
  3454. * to replace data.
  3455. *
  3456. * iDataType:
  3457. * The type of the replacement data. See ÒSupported Data TypesÓ
  3458. * for a description of possible values.
  3459. *
  3460. * iDataPtr:
  3461. * A pointer to the data that will replace the data that is in the
  3462. * range specified by the iStartOffset and iEndOffset parameters.
  3463. * Can be NULL if the start and end offsets are different.
  3464. *
  3465. * iDataSize:
  3466. * The size of the data to which iDataPtr points.
  3467. *
  3468. * iStartOffset:
  3469. * The beginning of the range of data to replace. You can use the
  3470. * TXNGetSelection function to get the absolute offsets of the
  3471. * current selection.
  3472. *
  3473. * iEndOffset:
  3474. * The end of the range to replace. You can use the
  3475. * TXNGetSelection function to get the absolute offsets of the
  3476. * current selection. If you want to insert text, the ending and
  3477. * starting offsets should be the same value.
  3478. *
  3479. * Result:
  3480. * An operating system status code.
  3481. *
  3482. * Availability:
  3483. * Mac OS X: in version 10.0 and later in Carbon.framework
  3484. * CarbonLib: in CarbonLib 1.0 and later
  3485. * Non-Carbon CFM: in Textension 1.0 and later
  3486. }
  3487. function TXNSetData( iTXNObject: TXNObject; iDataType: TXNDataType; iDataPtr: {const} UnivPtr { can be NULL }; iDataSize: ByteCount; iStartOffset: TXNOffset; iEndOffset: TXNOffset ): OSStatus; external name '_TXNSetData';
  3488. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3489. {
  3490. * TXNFlattenObjectToCFDataRef()
  3491. *
  3492. * Summary:
  3493. * Flattens a text object so it can be saved to disk or embedded
  3494. * with other data.
  3495. *
  3496. * Mac OS X threading:
  3497. * Not thread safe
  3498. *
  3499. * Parameters:
  3500. *
  3501. * iTXNObject:
  3502. * Opaque TXNObject obtained from TXNCreateObject. Retrieve
  3503. * flattened data from this text object.
  3504. *
  3505. * iTXNDataType:
  3506. * A value of type TXNDataType that specifies the format in which
  3507. * the data is written out.
  3508. *
  3509. * oDataRef:
  3510. * A pointer to a structure of type CFDataRef. On return the data
  3511. * will contain a flattened version of the iTXNObject in the
  3512. * format specified by iTXNDataType. Clients are responsible to
  3513. * retain the returned CFDataRef.
  3514. *
  3515. * Result:
  3516. * A result code indicating success or failure.
  3517. *
  3518. * Availability:
  3519. * Mac OS X: in version 10.3 and later in Carbon.framework
  3520. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  3521. * Non-Carbon CFM: not available
  3522. }
  3523. function TXNFlattenObjectToCFDataRef( iTXNObject: TXNObject; iTXNDataType: TXNDataType; var oDataRef: CFDataRef ): OSStatus; external name '_TXNFlattenObjectToCFDataRef';
  3524. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  3525. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3526. { ¥ Revert }
  3527. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3528. {
  3529. * TXNRevert()
  3530. *
  3531. * Summary:
  3532. * Revert to the last saved version of this document. If the file
  3533. * was not previously saved the document is reverted to an empty
  3534. * document.
  3535. *
  3536. * Mac OS X threading:
  3537. * Not thread safe
  3538. *
  3539. * Parameters:
  3540. *
  3541. * iTXNObject:
  3542. * Opaque TXNObject obtained from TXNCreateObject.
  3543. *
  3544. * Result:
  3545. * A result code indicating success or failure. (such as File
  3546. * Manager errors)
  3547. *
  3548. * Availability:
  3549. * Mac OS X: in version 10.0 and later in Carbon.framework
  3550. * CarbonLib: in CarbonLib 1.0 and later
  3551. * Non-Carbon CFM: in Textension 1.0 and later
  3552. }
  3553. function TXNRevert( iTXNObject: TXNObject ): OSStatus; external name '_TXNRevert';
  3554. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3555. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3556. { ¥ Printing }
  3557. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3558. {
  3559. * TXNPageSetup()
  3560. *
  3561. * Summary:
  3562. * Display the Page Setup dialog of the current default printer and
  3563. * react to any changes (i.e. Reformat the text if the page layout
  3564. * changes.)
  3565. *
  3566. * Mac OS X threading:
  3567. * Not thread safe
  3568. *
  3569. * Parameters:
  3570. *
  3571. * iTXNObject:
  3572. * Opaque TXNObject obtained from TXNCreateObject.
  3573. *
  3574. * Result:
  3575. * A result code indicating success or failure. ( such as Print
  3576. * Manager errors )
  3577. *
  3578. * Availability:
  3579. * Mac OS X: in version 10.0 and later in Carbon.framework
  3580. * CarbonLib: in CarbonLib 1.0 and later
  3581. * Non-Carbon CFM: in Textension 1.0 and later
  3582. }
  3583. function TXNPageSetup( iTXNObject: TXNObject ): OSStatus; external name '_TXNPageSetup';
  3584. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3585. {
  3586. * TXNPrint()
  3587. *
  3588. * Summary:
  3589. * Print the document.
  3590. *
  3591. * Mac OS X threading:
  3592. * Not thread safe
  3593. *
  3594. * Parameters:
  3595. *
  3596. * iTXNObject:
  3597. * Opaque TXNObject obtained from TXNCreateObject.
  3598. *
  3599. * Result:
  3600. * A result code indicating success or failure. ( such as Print
  3601. * Manager errors )
  3602. *
  3603. * Availability:
  3604. * Mac OS X: in version 10.0 and later in Carbon.framework
  3605. * CarbonLib: in CarbonLib 1.0 and later
  3606. * Non-Carbon CFM: in Textension 1.0 and later
  3607. }
  3608. function TXNPrint( iTXNObject: TXNObject ): OSStatus; external name '_TXNPrint';
  3609. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3610. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3611. { ¥ Search }
  3612. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3613. {
  3614. * TXNFind()
  3615. *
  3616. * Summary:
  3617. * Find a piece of text or a graphics object.
  3618. *
  3619. * Discussion:
  3620. * The default matching behavior is pretty simple for Text a basic
  3621. * binary compare is done. If the matchOptions say to ignore case
  3622. * the characters to be searched are duplicated and case
  3623. * neutralized. This naturally can fail due to lack of memory if
  3624. * there is a large amount of text. It also slows things down. If
  3625. * MatchOptions say find an entire word that once a match is found
  3626. * an effort is made to determine if the match is a word. The
  3627. * default behavior is to test the character before and after the to
  3628. * see if it is White space. If the kTXNUseEncodingWordRulesBit is
  3629. * set than the Script Manager's FindWord function is called to make
  3630. * this determination. If the caller is looking for a non-text type
  3631. * than each non-text type in the document is returned. If more
  3632. * elaborate ( a regular expression processor or whatever ) is what
  3633. * you want then that is what the FindProc is for.
  3634. *
  3635. * Mac OS X threading:
  3636. * Not thread safe
  3637. *
  3638. * Parameters:
  3639. *
  3640. * iTXNObject:
  3641. * Opaque TXNObject obtained from TXNCreateObject.
  3642. *
  3643. * iMatchTextDataPtr:
  3644. * Ptr to a MatchTextRecord which contains the text to match, the
  3645. * length of that text and the TextEncoding the text is encoded
  3646. * in. This must be there if you are looking for Text, but can be
  3647. * NULL if you are looking for a graphics object.
  3648. *
  3649. * iDataType:
  3650. * The type of data to find. This can be any of the types defined
  3651. * in TXNDataType enum (TEXT, PICT, moov, snd ). However, if
  3652. * PICT, moov, or snd is passed then the default behavior is to
  3653. * match on any non-Text object. If you really want to find a
  3654. * specific type you can provide a custom find callback or ignore
  3655. * matches which aren't the precise type you are interested in.
  3656. *
  3657. * iMatchOptions:
  3658. * Options on what to search for.
  3659. *
  3660. * iStartSearchOffset:
  3661. * The offset at which a search should begin. The constant
  3662. * kTXNStartOffset specifies the start of the objects data.
  3663. *
  3664. * iEndSearchOffset:
  3665. * The offset at which the search should end. The constant
  3666. * kTXNEndOffset specifies the end of the objects data.
  3667. *
  3668. * iFindProc:
  3669. * A custom callback. If will be called to match things rather
  3670. * than the default matching behavior.
  3671. *
  3672. * iRefCon:
  3673. * This can be use for whatever the caller likes. It is passed to
  3674. * the FindProc (if a FindProc is provided.
  3675. *
  3676. * oStartMatchOffset:
  3677. * Absolute offset to start of match. set to 0xFFFFFFFF if not
  3678. * match.
  3679. *
  3680. * oEndMatchOffset:
  3681. * Absolute offset to end of match. Set to 0xFFFFFFFF is no match.
  3682. *
  3683. * Result:
  3684. * A result code indicating success or failure.
  3685. *
  3686. * Availability:
  3687. * Mac OS X: in version 10.0 and later in Carbon.framework
  3688. * CarbonLib: in CarbonLib 1.0 and later
  3689. * Non-Carbon CFM: in Textension 1.0 and later
  3690. }
  3691. function TXNFind( iTXNObject: TXNObject; {const} iMatchTextDataPtr: TXNMatchTextRecordPtr { can be NULL }; iDataType: TXNDataType; iMatchOptions: TXNMatchOptions; iStartSearchOffset: TXNOffset; iEndSearchOffset: TXNOffset; iFindProc: TXNFindUPP; iRefCon: SInt32; var oStartMatchOffset: TXNOffset; var oEndMatchOffset: TXNOffset ): OSStatus; external name '_TXNFind';
  3692. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3693. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3694. { ¥ Font Defaults }
  3695. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3696. {
  3697. * TXNSetFontDefaults()
  3698. *
  3699. * Summary:
  3700. * For a given TXNObject specify the font defaults for each script.
  3701. *
  3702. * Mac OS X threading:
  3703. * Not thread safe
  3704. *
  3705. * Parameters:
  3706. *
  3707. * iTXNObject:
  3708. * Opaque TXNObject obtained from TXNCreateObject.
  3709. *
  3710. * iCount:
  3711. * Count of FontDescriptions.
  3712. *
  3713. * iFontDefaults:
  3714. * Array of FontDescriptions.
  3715. *
  3716. * Result:
  3717. * A result code indicating success or failure.
  3718. *
  3719. * Availability:
  3720. * Mac OS X: in version 10.0 and later in Carbon.framework
  3721. * CarbonLib: in CarbonLib 1.0 and later
  3722. * Non-Carbon CFM: in Textension 1.0 and later
  3723. }
  3724. function TXNSetFontDefaults( iTXNObject: TXNObject; iCount: ItemCount; {const} iFontDefaults: {variable-size-array} TXNMacOSPreferredFontDescriptionPtr ): OSStatus; external name '_TXNSetFontDefaults';
  3725. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3726. {
  3727. * TXNGetFontDefaults()
  3728. *
  3729. * Summary:
  3730. * For a given TXNObject make a copy of the font defaults.
  3731. *
  3732. * Discussion:
  3733. * To determine how many font descriptions need to be in the array
  3734. * you should call this function with a NULL for the array. iCount
  3735. * will return with the number of font defaults currently stored.
  3736. *
  3737. * Mac OS X threading:
  3738. * Not thread safe
  3739. *
  3740. * Parameters:
  3741. *
  3742. * iTXNObject:
  3743. * Opaque TXNObject obtained from TXNCreateObject.
  3744. *
  3745. * ioCount:
  3746. * Count of FontDescriptions in the array.
  3747. *
  3748. * oFontDefaults:
  3749. * Array of FontDescriptins to be filled out.
  3750. *
  3751. * Result:
  3752. * A result code indicating success or failure.
  3753. *
  3754. * Availability:
  3755. * Mac OS X: in version 10.0 and later in Carbon.framework
  3756. * CarbonLib: in CarbonLib 1.0 and later
  3757. * Non-Carbon CFM: in Textension 1.0 and later
  3758. }
  3759. function TXNGetFontDefaults( iTXNObject: TXNObject; var ioCount: ItemCount; oFontDefaults: {variable-size-array} TXNMacOSPreferredFontDescriptionPtr { can be NULL } ): OSStatus; external name '_TXNGetFontDefaults';
  3760. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3761. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3762. { ¥ Font Menu }
  3763. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3764. {
  3765. * TXNNewFontMenuObject()
  3766. *
  3767. * Summary:
  3768. * Get a FontMenuObject. Caller can extract a fontmenu from this
  3769. * object and pass this object to the active TXNObject to handle
  3770. * events in the font menu.
  3771. *
  3772. * Mac OS X threading:
  3773. * Not thread safe
  3774. *
  3775. * Parameters:
  3776. *
  3777. * iFontMenuHandle:
  3778. * An empty menu handle (well the title is there) that the caller
  3779. * created via NewMenu or GetNewMenu. This menu handle should not
  3780. * be disposed before the returned TXNFontMenuObject has been
  3781. * disposed via TXNDisposeFontMenuObject.
  3782. *
  3783. * iMenuID:
  3784. * The MenuID for iFontMenuHandle.
  3785. *
  3786. * iStartHierMenuID:
  3787. * The first MenuID to use if any hierarchical menus need to be
  3788. * created. TXNNewFontMenuObject uses SetMenuItemHierarchicalID
  3789. * when creating hierarchial menus. The iStartHierMenuID must
  3790. * therefor follow the rules for this function. On systems less
  3791. * than system 8.5 the submenuID must be less than 255. For
  3792. * systems above system 8.5 the range can be as large can be as
  3793. * large 32767. However, it is important to remember that
  3794. * TXNNewFontMenuObject only uses iStartHierMenuID as a starting
  3795. * id when adding hierarchical menus. Therefore provide plenty of
  3796. * room to increment this value. For example, on a system less
  3797. * than 8.5 it would be good to start at 175. On systems greater
  3798. * than 8.5 it is probably a good idea to not use a value higher
  3799. * than 32000.
  3800. *
  3801. * oTXNFontMenuObject:
  3802. * A font menu object.
  3803. *
  3804. * Result:
  3805. * A result code indicating success or failure.
  3806. *
  3807. * Availability:
  3808. * Mac OS X: in version 10.0 and later in Carbon.framework
  3809. * CarbonLib: in CarbonLib 1.0 and later
  3810. * Non-Carbon CFM: in Textension 1.0 and later
  3811. }
  3812. function TXNNewFontMenuObject( iFontMenuHandle: MenuRef; iMenuID: SInt16; iStartHierMenuID: SInt16; var oTXNFontMenuObject: TXNFontMenuObject ): OSStatus; external name '_TXNNewFontMenuObject';
  3813. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3814. {
  3815. * TXNGetFontMenuHandle()
  3816. *
  3817. * Summary:
  3818. * Get the MenuRef from the TXNFontMenuObject.
  3819. *
  3820. * Mac OS X threading:
  3821. * Not thread safe
  3822. *
  3823. * Parameters:
  3824. *
  3825. * iTXNFontMenuObject:
  3826. * A Font Menu Object obtained from TXNNewFontMenuObject.
  3827. *
  3828. * oFontMenuHandle:
  3829. * The returned font menu. Returned value could be NULL.
  3830. *
  3831. * Result:
  3832. * A result code indicating success or failure.
  3833. *
  3834. * Availability:
  3835. * Mac OS X: in version 10.0 and later in Carbon.framework
  3836. * CarbonLib: in CarbonLib 1.0 and later
  3837. * Non-Carbon CFM: in Textension 1.0 and later
  3838. }
  3839. function TXNGetFontMenuHandle( iTXNFontMenuObject: TXNFontMenuObject; var oFontMenuHandle: MenuRef ): OSStatus; external name '_TXNGetFontMenuHandle';
  3840. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3841. function TXNGetFontMenuRef( iTXNFontMenuObject: TXNFontMenuObject; var oFontMenuHandle: MenuRef ): OSStatus; external name '_TXNGetFontMenuHandle';
  3842. {
  3843. * TXNDisposeFontMenuObject()
  3844. *
  3845. * Summary:
  3846. * Dispose a TXNFontMenuObject and its font menu handle.
  3847. *
  3848. * Mac OS X threading:
  3849. * Not thread safe
  3850. *
  3851. * Parameters:
  3852. *
  3853. * iTXNFontMenuObject:
  3854. * A Font Menu Object obtained from TXNNewFontMenuObject.
  3855. *
  3856. * Result:
  3857. * A result code indicating success or failure.
  3858. *
  3859. * Availability:
  3860. * Mac OS X: in version 10.0 and later in Carbon.framework
  3861. * CarbonLib: in CarbonLib 1.0 and later
  3862. * Non-Carbon CFM: in Textension 1.0 and later
  3863. }
  3864. function TXNDisposeFontMenuObject( iTXNFontMenuObject: TXNFontMenuObject ): OSStatus; external name '_TXNDisposeFontMenuObject';
  3865. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3866. {
  3867. * TXNDoFontMenuSelection()
  3868. *
  3869. * Summary:
  3870. * Given the menuID and menu item returned by MenuSelect determine
  3871. * the selected font and change the current selection to be that
  3872. * Font. If the input TXNObject is not active a parameter error is
  3873. * returned.
  3874. *
  3875. * Mac OS X threading:
  3876. * Not thread safe
  3877. *
  3878. * Parameters:
  3879. *
  3880. * iTXNObject:
  3881. * Opaque TXNObject obtained from TXNCreateObject.
  3882. *
  3883. * iTXNFontMenuObject:
  3884. * A Font Menu Object obtained from TXNNewFontMenuObject.
  3885. *
  3886. * iMenuID:
  3887. * SInt16 the ID of the selected menu.
  3888. *
  3889. * iMenuItem:
  3890. * The item that was selected.
  3891. *
  3892. * Result:
  3893. * A result code indicating success or failure.
  3894. *
  3895. * Availability:
  3896. * Mac OS X: in version 10.0 and later in Carbon.framework
  3897. * CarbonLib: in CarbonLib 1.0 and later
  3898. * Non-Carbon CFM: in Textension 1.0 and later
  3899. }
  3900. function TXNDoFontMenuSelection( iTXNObject: TXNObject; iTXNFontMenuObject: TXNFontMenuObject; iMenuID: SInt16; iMenuItem: SInt16 ): OSStatus; external name '_TXNDoFontMenuSelection';
  3901. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3902. {
  3903. * TXNPrepareFontMenu()
  3904. *
  3905. * Summary:
  3906. * Prepares a Font menu for display.
  3907. *
  3908. * Discussion:
  3909. * You should call the TXNPrepareFontMenu function just before your
  3910. * application opens the Font menu for your user. If the text
  3911. * objectÕs current selection is a single font, MLTE places a
  3912. * checkmark next to the menu item for that font.
  3913. *
  3914. * Mac OS X threading:
  3915. * Not thread safe
  3916. *
  3917. * Parameters:
  3918. *
  3919. * iTXNObject:
  3920. * The text object that identifies the document with the Font menu
  3921. * you want to prepare. Pass NULL to display an inactive menu
  3922. * (dimmed).
  3923. *
  3924. * iTXNFontMenuObject:
  3925. * A Font menu object.
  3926. *
  3927. * Result:
  3928. * An operating system status code.
  3929. *
  3930. * Availability:
  3931. * Mac OS X: in version 10.0 and later in Carbon.framework
  3932. * CarbonLib: in CarbonLib 1.0 and later
  3933. * Non-Carbon CFM: in Textension 1.0 and later
  3934. }
  3935. function TXNPrepareFontMenu( iTXNObject: TXNObject { can be NULL }; iTXNFontMenuObject: TXNFontMenuObject ): OSStatus; external name '_TXNPrepareFontMenu';
  3936. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3937. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3938. { ¥ Static Text Box }
  3939. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  3940. {
  3941. * TXNDrawUnicodeTextBox()
  3942. *
  3943. * Summary:
  3944. * Draws a Unicode string in the specified rectangle.
  3945. *
  3946. * Discussion:
  3947. * Client is supposed to do an EraseRect if needed. The drawing will
  3948. * be clipped to the rect unless the client specifies a rotation.
  3949. * Use kTXNUseVerticalTextMask to display text vertically (no need
  3950. * to use the kTXNRotateTextMask flag in this case).
  3951. *
  3952. * Mac OS X threading:
  3953. * Not thread safe
  3954. *
  3955. * Parameters:
  3956. *
  3957. * iText:
  3958. * Ptr to a Unicode string (UTF16 chars).
  3959. *
  3960. * iLen:
  3961. * Number of UniChars in iText (this is not the size of iText).
  3962. *
  3963. * ioBox:
  3964. * On input the text box where the text will be displayed. On
  3965. * return will be updated to reflect the minimum bounding Rect
  3966. * that will enclose the text (unless kTXNDontUpdateBoxRectMask is
  3967. * used).
  3968. *
  3969. * iStyle:
  3970. * Style to use to display the text.
  3971. *
  3972. * iOptions:
  3973. * Can be used to specify non-default behavior.
  3974. *
  3975. * Result:
  3976. * An operating system status code.
  3977. *
  3978. * Availability:
  3979. * Mac OS X: in version 10.0 and later in Carbon.framework
  3980. * CarbonLib: in CarbonLib 1.1 and later
  3981. * Non-Carbon CFM: in Textension 1.1 and later
  3982. }
  3983. function TXNDrawUnicodeTextBox( {const} iText: {variable-size-array} UniCharPtr; iLen: UniCharCount; var ioBox: Rect; iStyle: ATSUStyle { can be NULL }; {const} iOptions: TXNTextBoxOptionsDataPtr { can be NULL } ): OSStatus; external name '_TXNDrawUnicodeTextBox';
  3984. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  3985. {
  3986. * TXNDrawCFStringTextBox()
  3987. *
  3988. * Summary:
  3989. * Draws a CFString in the specified rectangle.
  3990. *
  3991. * Discussion:
  3992. * Client is supposed to do an EraseRect if needed. The drawing will
  3993. * be clipped to the rect unless the client specifies a rotation.
  3994. * Use kTXNUseVerticalTextMask to display text vertically (no need
  3995. * to use the kTXNRotateTextMask flag in this case).
  3996. *
  3997. * Mac OS X threading:
  3998. * Not thread safe
  3999. *
  4000. * Parameters:
  4001. *
  4002. * iText:
  4003. * A CFStringRef (see CFBase.h and CFString.h).
  4004. *
  4005. * ioBox:
  4006. * On input the text box where the text will be displayed. On
  4007. * return will be updated to reflect the minimum bounding Rect
  4008. * that will enclose the text (unless kTXNDontUpdateBoxRectMask is
  4009. * used).
  4010. *
  4011. * iStyle:
  4012. * Style to use to display the text.
  4013. *
  4014. * iOptions:
  4015. * Can be used to specify non-default behavior.
  4016. *
  4017. * Result:
  4018. * An operating system status code.
  4019. *
  4020. * Availability:
  4021. * Mac OS X: in version 10.0 and later in Carbon.framework
  4022. * CarbonLib: in CarbonLib 1.1 and later
  4023. * Non-Carbon CFM: not available
  4024. }
  4025. function TXNDrawCFStringTextBox( iText: CFStringRef; var ioBox: Rect; iStyle: ATSUStyle { can be NULL }; {const} iOptions: TXNTextBoxOptionsDataPtr { can be NULL } ): OSStatus; external name '_TXNDrawCFStringTextBox';
  4026. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4027. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4028. { ¥ Get Line Info }
  4029. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4030. {
  4031. * TXNGetLineCount()
  4032. *
  4033. * Summary:
  4034. * Get the total number of lines in the TXNObject.
  4035. *
  4036. * Mac OS X threading:
  4037. * Not thread safe
  4038. *
  4039. * Parameters:
  4040. *
  4041. * iTXNObject:
  4042. * Opaque TXNObject obtained from TXNCreateObject.
  4043. *
  4044. * oLineTotal:
  4045. * On return the total number of lines in the object.
  4046. *
  4047. * Result:
  4048. * An operating system status code.
  4049. *
  4050. * Availability:
  4051. * Mac OS X: in version 10.0 and later in Carbon.framework
  4052. * CarbonLib: in CarbonLib 1.1 and later
  4053. * Non-Carbon CFM: in Textension 1.1 and later
  4054. }
  4055. function TXNGetLineCount( iTXNObject: TXNObject; var oLineTotal: ItemCount ): OSStatus; external name '_TXNGetLineCount';
  4056. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4057. {
  4058. * TXNGetLineMetrics()
  4059. *
  4060. * Summary:
  4061. * Get the metrics for the specified line.
  4062. *
  4063. * Mac OS X threading:
  4064. * Not thread safe
  4065. *
  4066. * Parameters:
  4067. *
  4068. * iTXNObject:
  4069. * Opaque TXNObject obtained from TXNCreateObject.
  4070. *
  4071. * iLineNumber:
  4072. * The line we want the metrics for (0 based).
  4073. *
  4074. * oLineWidth:
  4075. * On return the width of the line (in Fixed format).
  4076. *
  4077. * oLineHeight:
  4078. * On return the height (ascent + descent) of the line (in Fixed
  4079. * format).
  4080. *
  4081. * Result:
  4082. * An operating system status code.
  4083. *
  4084. * Availability:
  4085. * Mac OS X: in version 10.0 and later in Carbon.framework
  4086. * CarbonLib: in CarbonLib 1.1 and later
  4087. * Non-Carbon CFM: in Textension 1.1 and later
  4088. }
  4089. function TXNGetLineMetrics( iTXNObject: TXNObject; iLineNumber: UInt32; var oLineWidth: Fixed; var oLineHeight: Fixed ): OSStatus; external name '_TXNGetLineMetrics';
  4090. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4091. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4092. { ¥ Count Changes }
  4093. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4094. {
  4095. * TXNGetChangeCount()
  4096. *
  4097. * Summary:
  4098. * Retrieve number of times document has been changed.
  4099. *
  4100. * Discussion:
  4101. * That is for every committed command (keydown, cut, copy) the
  4102. * value returned is count of those. This is useful for deciding if
  4103. * the Save item in the File menu should be active.
  4104. *
  4105. * Mac OS X threading:
  4106. * Not thread safe
  4107. *
  4108. * Parameters:
  4109. *
  4110. * iTXNObject:
  4111. * Opaque TXNObject obtained from TXNCreateObject.
  4112. *
  4113. * Result:
  4114. * ItemCount: count of changes. This is total changes since
  4115. * document was created or last saved. Not count since this
  4116. * routine was last called or anything like that.
  4117. *
  4118. * Availability:
  4119. * Mac OS X: in version 10.0 and later in Carbon.framework
  4120. * CarbonLib: in CarbonLib 1.0 and later
  4121. * Non-Carbon CFM: in Textension 1.0 and later
  4122. }
  4123. function TXNGetChangeCount( iTXNObject: TXNObject ): ItemCount; external name '_TXNGetChangeCount';
  4124. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4125. {
  4126. * TXNGetCountForActionType()
  4127. *
  4128. * Summary:
  4129. * Retrieves the number of times a given kind of action has
  4130. * occurred. There are three MLTE defined counts:
  4131. * kTXNActionCountOfTextChanges, kTXNActionCountOfStyleChanges and
  4132. * kTXNActionCountOfAllChanges. In addition, this API can retrieve
  4133. * the number of times a custom action has occurred. See
  4134. * TXNBeginActionGroup for how to define a custom action group.
  4135. *
  4136. * Discussion:
  4137. * Call TXNClearCountForActionType to reset the counters.
  4138. *
  4139. * Mac OS X threading:
  4140. * Not thread safe
  4141. *
  4142. * Parameters:
  4143. *
  4144. * iTXNObject:
  4145. * Opaque TXNObject obtained from TXNCreateObject.
  4146. *
  4147. * iActionTypeName:
  4148. * Specifies the kind of action changes to be included when
  4149. * retrieving the count. The value can be
  4150. * kTXNActionCountOfTextChanges, kTXNActionCountOfStyleChanges,
  4151. * kTXNActionCountforAllChanges, or a string passed to
  4152. * TXNBeginActionGroup
  4153. *
  4154. * oCount:
  4155. * The number of times the iActionGroupName action has occurred.
  4156. *
  4157. * Result:
  4158. * An operating system status code.
  4159. *
  4160. * Availability:
  4161. * Mac OS X: in version 10.4 and later in Carbon.framework
  4162. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  4163. * Non-Carbon CFM: not available
  4164. }
  4165. function TXNGetCountForActionType( iTXNObject: TXNObject; iActionTypeName: CFStringRef; var oCount: ItemCount ): OSStatus; external name '_TXNGetCountForActionType';
  4166. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  4167. {
  4168. * TXNClearCountForActionType()
  4169. *
  4170. * Summary:
  4171. * Reset the counter(s) for the specified kind of action(s) to zero.
  4172. *
  4173. * Discussion:
  4174. * Use kTXNActionCountOfAllChanges to reset all counters.
  4175. *
  4176. * Mac OS X threading:
  4177. * Not thread safe
  4178. *
  4179. * Parameters:
  4180. *
  4181. * iTXNObject:
  4182. * Opaque TXNObject obtained from TXNCreateObject.
  4183. *
  4184. * iActionTypeName:
  4185. * Specifies the kind of action changes for which the counter
  4186. * should be set to zero. The value can be
  4187. * kTXNActionCountOfTextChanges, kTXNActionCountOfStyleChanges,
  4188. * kTXNActionCountforAllChanges or any string used to form an
  4189. * action group with TXNBeginActionGroup.
  4190. *
  4191. * Result:
  4192. * An operating system status code.
  4193. *
  4194. * Availability:
  4195. * Mac OS X: in version 10.4 and later in Carbon.framework
  4196. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  4197. * Non-Carbon CFM: not available
  4198. }
  4199. function TXNClearCountForActionType( iTXNObject: TXNObject; iActionTypeName: CFStringRef ): OSStatus; external name '_TXNClearCountForActionType';
  4200. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  4201. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4202. { ¥ Set/Get Object Bounds }
  4203. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4204. {
  4205. * TXNSetHIRectBounds()
  4206. *
  4207. * Summary:
  4208. * Sets the text object's view, the destination rectangles or both.
  4209. *
  4210. * Discussion:
  4211. * Either of the input rectangle can be NULL. HIRect provides an
  4212. * uniform interface to the HIView coordinate system.
  4213. *
  4214. * Mac OS X threading:
  4215. * Not thread safe
  4216. *
  4217. * Parameters:
  4218. *
  4219. * iTXNObject:
  4220. * Opaque TXNObject obtained from TXNCreateObject. The bounds for
  4221. * this text object will be set.
  4222. *
  4223. * iViewRect:
  4224. * A pointer to a HIRect data structure that contains the new
  4225. * coordinates for the view rectangle. Pass NULL if you donÕt want
  4226. * to change the view rectangle.
  4227. *
  4228. * iDestinationRect:
  4229. * A pointer to a HIRect data structure that contains the new
  4230. * coordinates for the destination rectangle. Pass NULL if you
  4231. * donÕt want to change the destination rectangle.
  4232. *
  4233. * iUpdate:
  4234. * Pass true if you want the location of the text and scrollbars
  4235. * to be recalculated and redrawn, otherwise pass false.
  4236. *
  4237. * Availability:
  4238. * Mac OS X: in version 10.3 and later in Carbon.framework
  4239. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  4240. * Non-Carbon CFM: not available
  4241. }
  4242. procedure TXNSetHIRectBounds( iTXNObject: TXNObject; {const} iViewRect: HIRectPtr; {const} iDestinationRect: HIRectPtr; iUpdate: Boolean ); external name '_TXNSetHIRectBounds';
  4243. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  4244. {
  4245. * TXNGetHIRect()
  4246. *
  4247. * Summary:
  4248. * Gets one of the text object's bounds based on the specified
  4249. * TXNRectKey
  4250. *
  4251. * Mac OS X threading:
  4252. * Not thread safe
  4253. *
  4254. * Parameters:
  4255. *
  4256. * iTXNObject:
  4257. * Opaque TXNObject obtained from TXNCreateObject. The specified
  4258. * bounds for this text object will be returned.
  4259. *
  4260. * iTXNRectKey:
  4261. * The value for the type of rectangle you want the function to
  4262. * return.
  4263. *
  4264. * oRectangle:
  4265. * On return, a pointer to the HIRect data structure that contains
  4266. * the coordinates for the requested rectangle. If a rect is not
  4267. * defined, a pointer to an empty rect will be returned. Note that
  4268. * only scrollbar rectangle may be undefined for the text object.
  4269. *
  4270. * Result:
  4271. * A result code indicating success or failure.
  4272. *
  4273. * Availability:
  4274. * Mac OS X: in version 10.3 and later in Carbon.framework
  4275. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  4276. * Non-Carbon CFM: not available
  4277. }
  4278. function TXNGetHIRect( iTXNObject: TXNObject; iTXNRectKey: TXNRectKey; var oRectangle: HIRect ): OSStatus; external name '_TXNGetHIRect';
  4279. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  4280. {
  4281. * TXNResizeFrame()
  4282. *
  4283. * Summary:
  4284. * Changes the frame's size to match the new width and height.
  4285. *
  4286. * Mac OS X threading:
  4287. * Not thread safe
  4288. *
  4289. * Parameters:
  4290. *
  4291. * iTXNObject:
  4292. * Opaque TXNObject obtained from TXNCreateObject.
  4293. *
  4294. * iWidth:
  4295. * New width in pixels.
  4296. *
  4297. * iHeight:
  4298. * New height in pixels.
  4299. *
  4300. * iTXNFrameID:
  4301. * Deprecated. Pass 0.
  4302. *
  4303. * Availability:
  4304. * Mac OS X: in version 10.0 and later in Carbon.framework
  4305. * CarbonLib: in CarbonLib 1.0 and later
  4306. * Non-Carbon CFM: in Textension 1.0 and later
  4307. }
  4308. procedure TXNResizeFrame( iTXNObject: TXNObject; iWidth: UInt32; iHeight: UInt32; iTXNFrameID: TXNFrameID ); external name '_TXNResizeFrame';
  4309. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4310. {
  4311. * TXNSetFrameBounds()
  4312. *
  4313. * Summary:
  4314. * Changes the frame's bounds to match the Rect.
  4315. *
  4316. * Mac OS X threading:
  4317. * Not thread safe
  4318. *
  4319. * Parameters:
  4320. *
  4321. * iTXNObject:
  4322. * Opaque TXNObject obtained from TXNCreateObject.
  4323. *
  4324. * iTop:
  4325. * Top of the bounds.
  4326. *
  4327. * iLeft:
  4328. * Left of the bounds.
  4329. *
  4330. * iBottom:
  4331. * Bottom of the bounds.
  4332. *
  4333. * iRight:
  4334. * Right of the bounds.
  4335. *
  4336. * iTXNFrameID:
  4337. * Deprecated. Pass 0.
  4338. *
  4339. * Availability:
  4340. * Mac OS X: in version 10.0 and later in Carbon.framework
  4341. * CarbonLib: in CarbonLib 1.0 and later
  4342. * Non-Carbon CFM: in Textension 1.0 and later
  4343. }
  4344. procedure TXNSetFrameBounds( iTXNObject: TXNObject; iTop: SInt32; iLeft: SInt32; iBottom: SInt32; iRight: SInt32; iTXNFrameID: TXNFrameID ); external name '_TXNSetFrameBounds';
  4345. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4346. {
  4347. * TXNGetViewRect()
  4348. *
  4349. * Summary:
  4350. * Get the rectangle describing the current view into the document.
  4351. * The coordinates of this rectangle will be local to the the window.
  4352. *
  4353. * Mac OS X threading:
  4354. * Not thread safe
  4355. *
  4356. * Parameters:
  4357. *
  4358. * iTXNObject:
  4359. * Opaque TXNObject obtained from TXNCreateObject.
  4360. *
  4361. * oViewRect:
  4362. * The requested view rectangle.
  4363. *
  4364. * Availability:
  4365. * Mac OS X: in version 10.0 and later in Carbon.framework
  4366. * CarbonLib: in CarbonLib 1.0 and later
  4367. * Non-Carbon CFM: in Textension 1.0 and later
  4368. }
  4369. procedure TXNGetViewRect( iTXNObject: TXNObject; var oViewRect: Rect ); external name '_TXNGetViewRect';
  4370. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4371. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4372. { ¥ Layout Calculation }
  4373. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4374. {
  4375. * TXNRecalcTextLayout()
  4376. *
  4377. * Summary:
  4378. * Recalculates the text layout based on the new View and
  4379. * Destination rectangles.
  4380. *
  4381. * Discussion:
  4382. * Call this if you called TXNSetRectBounds with the iUpdate
  4383. * parameter set to false. It will also recalcuate where the
  4384. * scrollbars, if any, should be placed. Finally an update event
  4385. * will be generated so that the TXNObject is redrawn.
  4386. *
  4387. * Mac OS X threading:
  4388. * Not thread safe
  4389. *
  4390. * Parameters:
  4391. *
  4392. * iTXNObject:
  4393. * Opaque TXNObject obtained from TXNCreateObject.
  4394. *
  4395. * Availability:
  4396. * Mac OS X: in version 10.1 and later in Carbon.framework
  4397. * CarbonLib: in CarbonLib 1.5 and later
  4398. * Non-Carbon CFM: not available
  4399. }
  4400. procedure TXNRecalcTextLayout( iTXNObject: TXNObject ); external name '_TXNRecalcTextLayout';
  4401. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
  4402. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4403. { ¥ Scrolling }
  4404. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4405. {
  4406. * TXNScroll()
  4407. *
  4408. * Discussion:
  4409. * TXNScroll scrolls the text within a view rectangle of the
  4410. * specified object by the designated number of units. For example,
  4411. * you might want to scroll the text in an object in response to
  4412. * user input in a control other than the standard scrollbars that
  4413. * MLTE supplies.
  4414. *
  4415. * Mac OS X threading:
  4416. * Not thread safe
  4417. *
  4418. * Parameters:
  4419. *
  4420. * iTXNObject:
  4421. * Opaque TXNObject obtained from TXNCreateObject.
  4422. *
  4423. * iVerticalScrollUnit:
  4424. * Specifies what units the values in ioVerticalDelta are in. If
  4425. * iVerticalScrollUnit is equal to kTXNScrollUnitsInPixels the
  4426. * value is treated as pixels. If the value is
  4427. * kTXNScrollUnitsInLines the value is treated as a count of
  4428. * lines. Note that using this value is the slowest because each
  4429. * line must be measured before it scrolls. Finally if
  4430. * kTXNScrollUnitsInViewRects the value is treated as the height
  4431. * of the current viewRect.
  4432. *
  4433. * iHorizontalScrollUnit:
  4434. * Specifies what units the values in iDh are in. If
  4435. * iHorizontalScrollUnit is equal to kTXNScrollUnitsInPixels the
  4436. * value is treated as pixels. If the value is
  4437. * kTXNScrollUnitsInLines the value is treated as a count of
  4438. * lines. Note that using this value for horizontal scrolling
  4439. * means that 16 pixels will be used to represent a line. Finally
  4440. * if kTXNScrollUnitsInViewRects the value is treated as the width
  4441. * of the current viewRect.
  4442. *
  4443. * ioVerticalDelta:
  4444. * The vertical amount to scroll. The values in ioVerticalDelta
  4445. * can be treated as pixels, lines or viewrects. See the
  4446. * discussion of the TXNScrollUnit parameters for more information
  4447. * for this. On return this will contain the number of pixels
  4448. * actually scrolled in the vertical direction. A positive value
  4449. * moves the text down.
  4450. *
  4451. * ioHorizontalDelta:
  4452. * The horizontal amount to scroll. The values in
  4453. * ioHorizontalDelta can specify a scroll amount that is pixels,
  4454. * lines or view rects. Set TXNScrollUnit discussion for more
  4455. * information. On return this will contain the number of pixels
  4456. * actually scrolled in the horizontal direction. A positive value
  4457. * moves the text to the right.
  4458. *
  4459. * Availability:
  4460. * Mac OS X: in version 10.2 and later in Carbon.framework
  4461. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  4462. * Non-Carbon CFM: in Textension not yet available
  4463. }
  4464. function TXNScroll( iTXNObject: TXNObject; iVerticalScrollUnit: TXNScrollUnit; iHorizontalScrollUnit: TXNScrollUnit; var ioVerticalDelta: SInt32; var ioHorizontalDelta: SInt32 ): OSStatus; external name '_TXNScroll';
  4465. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  4466. {
  4467. * TXNRegisterScrollInfoProc()
  4468. *
  4469. * Discussion:
  4470. * If your application is drawing and handling its own scrolling
  4471. * widgets use this function to register a TXNScrollInfoUPP. If you
  4472. * register a TXNScrollInfoUPP it will be called every time MLTE
  4473. * would normally update the values and maximum values of an MLTE
  4474. * scrollbar. For example when the user types the return key to add
  4475. * a new line at the end of their text MLTE will calculate a new
  4476. * maximum value. If you have registered a TXNScrollInfoUPP it will
  4477. * be called with this nex maximum value. To turn off the callbacks
  4478. * call TXNRegisterScrollInfoProc with a value of NULL for the
  4479. * iTXNScrollInfoUPP.
  4480. *
  4481. * Mac OS X threading:
  4482. * Not thread safe
  4483. *
  4484. * Parameters:
  4485. *
  4486. * iTXNObject:
  4487. * Opaque TXNObject obtained from TXNCreateObject.
  4488. *
  4489. * iTXNScrollInfoUPP:
  4490. * A universal procedure pointer.
  4491. *
  4492. * iRefCon:
  4493. * A refcon that is passed to the callback.
  4494. *
  4495. * Availability:
  4496. * Mac OS X: in version 10.2 and later in Carbon.framework
  4497. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  4498. * Non-Carbon CFM: in Textension not yet available
  4499. }
  4500. procedure TXNRegisterScrollInfoProc( iTXNObject: TXNObject; iTXNScrollInfoUPP: TXNScrollInfoUPP; iRefCon: SInt32 ); external name '_TXNRegisterScrollInfoProc';
  4501. (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
  4502. {
  4503. * TXNSetScrollbarState()
  4504. *
  4505. * Summary:
  4506. * Sets the state of the scrollbars
  4507. *
  4508. * Discussion:
  4509. * This replaces TXNActivate, which was confusing to many
  4510. * developers, since it only activates/inactivates the scrollbar.
  4511. * This is useful for activating scrollbar(s) even when the object
  4512. * does not have focus.
  4513. *
  4514. * Mac OS X threading:
  4515. * Not thread safe
  4516. *
  4517. * Parameters:
  4518. *
  4519. * iTXNObject:
  4520. * Opaque TXNObject obtained from TXNCreateObject.
  4521. *
  4522. * iActiveState:
  4523. * Boolean: if true, scrollbars will be active even if the object
  4524. * does not have the keyboard focus. If false, scrollbars are
  4525. * synched with active state
  4526. *
  4527. * Result:
  4528. * A result code indicating success or failure.
  4529. *
  4530. * Availability:
  4531. * Mac OS X: in version 10.3 and later in Carbon.framework
  4532. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  4533. * Non-Carbon CFM: not available
  4534. }
  4535. function TXNSetScrollbarState( iTXNObject: TXNObject; iActiveState: TXNScrollBarState ): OSStatus; external name '_TXNSetScrollbarState';
  4536. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  4537. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4538. { ¥ Offset/Point Conversion }
  4539. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4540. {
  4541. * TXNHIPointToOffset()
  4542. *
  4543. * Summary:
  4544. * Gets the coordinates of the point that corresponds to a specified
  4545. * offset in a text object.
  4546. *
  4547. * Discussion:
  4548. * The coordinates of the point are in the coordinate system of the
  4549. * window or view owning the text object. Note that the owner of
  4550. * the a text object is a view only in the case when the object is
  4551. * in a HITextView.
  4552. *
  4553. * Mac OS X threading:
  4554. * Not thread safe
  4555. *
  4556. * Parameters:
  4557. *
  4558. * iTXNObject:
  4559. * Opaque TXNObject obtained from TXNCreateObject. The text object
  4560. * for which you want to obtain an offset value.
  4561. *
  4562. * iHIPoint:
  4563. * A pointer to an HIPoint.
  4564. *
  4565. * oOffset:
  4566. * On return, a pointer to the offset that corresponds to the
  4567. * value of the iHIPoint parameter.
  4568. *
  4569. * Result:
  4570. * A result code indicating success or failure.
  4571. *
  4572. * Availability:
  4573. * Mac OS X: in version 10.3 and later in Carbon.framework
  4574. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  4575. * Non-Carbon CFM: not available
  4576. }
  4577. function TXNHIPointToOffset( iTXNObject: TXNObject; const (*var*) iHIPoint: HIPoint; var oOffset: TXNOffset ): OSStatus; external name '_TXNHIPointToOffset';
  4578. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  4579. {
  4580. * TXNOffsetToHIPoint()
  4581. *
  4582. * Summary:
  4583. * Gets the coordinates of the point that corresponds to a specified
  4584. * offset in a text object.
  4585. *
  4586. * Discussion:
  4587. * The coordinates of the point are in the coordinate system of the
  4588. * window or view owning the text object. Note that the owner of
  4589. * the a text object is a view only in the case when the object is
  4590. * in a HITextView.
  4591. *
  4592. * Mac OS X threading:
  4593. * Not thread safe
  4594. *
  4595. * Parameters:
  4596. *
  4597. * iTXNObject:
  4598. * Opaque TXNObject obtained from TXNCreateObject. The text object
  4599. * for which you want to obtain the coordinates of a point.
  4600. *
  4601. * iOffset:
  4602. * A text offset value.
  4603. *
  4604. * oHIPoint:
  4605. * On return, a pointer to the point that corresponds to the value
  4606. * of the iOffset parameter.
  4607. *
  4608. * Result:
  4609. * A result code indicating success or failure.
  4610. *
  4611. * Availability:
  4612. * Mac OS X: in version 10.3 and later in Carbon.framework
  4613. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  4614. * Non-Carbon CFM: not available
  4615. }
  4616. function TXNOffsetToHIPoint( iTXNObject: TXNObject; iOffset: TXNOffset; var oHIPoint: HIPoint ): OSStatus; external name '_TXNOffsetToHIPoint';
  4617. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  4618. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4619. { ¥ Drag and Drop }
  4620. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4621. {
  4622. * TXNDragTracker()
  4623. *
  4624. * Summary:
  4625. * If you ask that Drag handling procs not be installed. Call this
  4626. * when your drag tracker is called and you want Textension to take
  4627. * over.
  4628. *
  4629. * Mac OS X threading:
  4630. * Not thread safe
  4631. *
  4632. * Parameters:
  4633. *
  4634. * iTXNObject:
  4635. * Opaque TXNObject obtained from TXNNewObject.
  4636. *
  4637. * iTXNFrameID:
  4638. * Deprecated. Pass 0.
  4639. *
  4640. * iMessage:
  4641. * Drag message obtained from Drag Manager.
  4642. *
  4643. * iWindow:
  4644. * WindowRef obtained from Drag Manager.
  4645. *
  4646. * iDragReference:
  4647. * DragReference obtained from Drag Manager.
  4648. *
  4649. * iDifferentObjectSameWindow:
  4650. * Pass true if the drag is still in the same window that it
  4651. * started in. False if the drag has moved into a different window.
  4652. *
  4653. * Result:
  4654. * A result code indicating success or failure.
  4655. *
  4656. * Availability:
  4657. * Mac OS X: in version 10.0 and later in Carbon.framework
  4658. * CarbonLib: in CarbonLib 1.0 and later
  4659. * Non-Carbon CFM: in Textension 1.0 and later
  4660. }
  4661. function TXNDragTracker( iTXNObject: TXNObject; iTXNFrameID: TXNFrameID; iMessage: DragTrackingMessage; iWindow: WindowRef; iDragReference: DragReference; iDifferentObjectSameWindow: Boolean ): OSErr; external name '_TXNDragTracker';
  4662. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4663. {
  4664. * TXNDragReceiver()
  4665. *
  4666. * Summary:
  4667. * If you ask that Drag handling procs not be installed. Call this
  4668. * when your drag receiver is called and you want Textension to take
  4669. * over.
  4670. *
  4671. * Mac OS X threading:
  4672. * Not thread safe
  4673. *
  4674. * Parameters:
  4675. *
  4676. * iTXNObject:
  4677. * Opaque TXNObject obtained from TXNNewObject.
  4678. *
  4679. * iTXNFrameID:
  4680. * Deprecated. Pass 0.
  4681. *
  4682. * iWindow:
  4683. * WindowRef obtained from Drag Manager.
  4684. *
  4685. * iDragReference:
  4686. * DragReference obtained from Drag Manager.
  4687. *
  4688. * iDifferentObjectSameWindow:
  4689. * Pass true if the drag is still in the same window that it
  4690. * started in. False if the drag has moved into a different window.
  4691. *
  4692. * Result:
  4693. * A result code indicating success or failure.
  4694. *
  4695. * Availability:
  4696. * Mac OS X: in version 10.0 and later in Carbon.framework
  4697. * CarbonLib: in CarbonLib 1.0 and later
  4698. * Non-Carbon CFM: in Textension 1.0 and later
  4699. }
  4700. function TXNDragReceiver( iTXNObject: TXNObject; iTXNFrameID: TXNFrameID; iWindow: WindowRef; iDragReference: DragReference; iDifferentObjectSameWindow: Boolean ): OSErr; external name '_TXNDragReceiver';
  4701. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
  4702. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4703. { ¥ Command Events and Spell Checking }
  4704. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  4705. {
  4706. * TXNCommandEventSupportOptions
  4707. *
  4708. * Discussion:
  4709. * Use these constants to turn support for specific HICommands in a
  4710. * given MLTE object.
  4711. }
  4712. type
  4713. TXNCommandEventSupportOptions = UInt32;
  4714. const
  4715. {
  4716. * Setting this bit enables processing for these HICommands:
  4717. * kHICommandUndo, kHICommandRedo, kHICommandCut, kHICommandCopy,
  4718. * kHICommandPaste, kHICommandClear, kHICommandSelectAll.
  4719. }
  4720. kTXNSupportEditCommandProcessing = 1 shl 0;
  4721. {
  4722. * Setting this bit turns support on for updating the the menu item
  4723. * associated with the above edit commands. What that means is:
  4724. *
  4725. *
  4726. * For Undo the undo item will be enabled if there are any undoable
  4727. * actions in MLTE's command stack. Additionally, if you have
  4728. * installed an action key mapper proc that will be called to get the
  4729. * appropriate string for the undo item.
  4730. *
  4731. * For Redo the Redo item is enabled if there are any redoable
  4732. * actions and the action key mapper callback will be called if it is
  4733. * installed.
  4734. *
  4735. * For Cut and Clear the item is enabled if a the current selection
  4736. * is not empty. If the selection is empty this is disabled.
  4737. *
  4738. *
  4739. * For Paste the item is enabled if the clipboard is not empty. It
  4740. * is disabled if the clipboard is empty or contains data that MLTE
  4741. * does not understand.
  4742. * <BR> For Select All the item is always enabled.
  4743. }
  4744. kTXNSupportEditCommandUpdating = 1 shl 1;
  4745. {
  4746. * Turns on support for spell checking. The spell checking commands
  4747. * supported are: Show Spelling Panel ('shsp'), Check Spelling
  4748. * ('cksp'), Change Spelling ('chsp'), enable check spelling as you
  4749. * type ('aspc'), ignore spelling ('igsp'), learn spelling ('lrwd').
  4750. }
  4751. kTXNSupportSpellCheckCommandProcessing = 1 shl 2;
  4752. {
  4753. * Turns on support for updating the menu item associated with a
  4754. * given spell checking command.
  4755. *
  4756. * Show Spelling: This item is always enabled.
  4757. *
  4758. * Check Spelling: This item is always enabled.
  4759. *
  4760. * Change Spelling: Typically this is not included in a spelling
  4761. * menu. If it is included it is enabled if the current selection is
  4762. * a missspelled word. It is disabled if the current selection is
  4763. * empty or is not a misspelled word.
  4764. *
  4765. * Check Spelling as You Type: This item is always enabled. It is
  4766. * checked if this feature has been enabled. By default when you
  4767. * turn on spell checking this is enabled. If this feature has been
  4768. * disabled the item is unchecked.
  4769. *
  4770. * Ignore Spelling. This is a command that usually does not have a
  4771. * corresponding menu item. If a menu does have this item it is
  4772. * disabled if the current selection is empty or is not a misspelled
  4773. * word. It is enabled if the current selection is a misspelled
  4774. * word.
  4775. *
  4776. * Learn Spelling. Another command that typically does not have a
  4777. * corresponding menu item. It behaves exactly like the Ignore
  4778. * spelling command.
  4779. }
  4780. kTXNSupportSpellCheckCommandUpdating = 1 shl 3;
  4781. {
  4782. * Setting this bit to turn on Carbon Font Panel support. Once
  4783. * support is turned on, MLTE handles the following Carbon Events
  4784. * defined in FontPanel.h: ¥ kHICommandShowHideFontPanel and
  4785. * kEventFontPanelClosed to show and hide the Carbon font panel ¥
  4786. * kEventFontSelection event to update the document after you select
  4787. * a new font, size, style, color, or any features setting from the
  4788. * Typography Panel.
  4789. }
  4790. kTXNSupportFontCommandProcessing = 1 shl 4;
  4791. {
  4792. * Setting this bit to turn on support for updating the selection in
  4793. * Carbon Font Panel when the current selection in MLTE document is
  4794. * changed. When you set this bit, kTXNSupportFontCommandProcessing
  4795. * has to be set also, which means that you only can get this support
  4796. * if Carbon Font Panel support is on.
  4797. }
  4798. kTXNSupportFontCommandUpdating = 1 shl 5;
  4799. {
  4800. * TXNSetCommandEventSupport()
  4801. *
  4802. * Summary:
  4803. * Turn support for a variety of HICommands on or off in MLTE. See
  4804. * the documentation for the TXNCommandEventSupportOptions constants
  4805. * for the set of commands that are supported.
  4806. *
  4807. * Discussion:
  4808. * This function enables support for a variety of commands. It is
  4809. * important to know that the handlers are installed immediatedly
  4810. * when an MLTE object is associated with an HIObject that can serve
  4811. * as an event target ( via a call to TXNAttachObjectToWindow or
  4812. * TXNSetEventTarget ). However when the handlers are installed they
  4813. * are not enabled. Calling TXNSetCommandEventSupport enables the
  4814. * commands. Using this approach means that an application can
  4815. * install handlers on top of these and be sure that enabling or
  4816. * disabling the MLTE handlers will not change the order of the
  4817. * handler chain.
  4818. *
  4819. * Mac OS X threading:
  4820. * Not thread safe
  4821. *
  4822. * Parameters:
  4823. *
  4824. * iTXNObject:
  4825. * The TXNObject.
  4826. *
  4827. * iOptions:
  4828. * Set this to enable/disable command support for selected Edit
  4829. * commands (kHICommandUndo, kHICommandRedo, kHICommandCut,
  4830. * kHICommandCopy, kHICommandPaste, kHICommandClear,
  4831. * kHICommandSelectAll) and/or support for spell checking commands.
  4832. *
  4833. * Result:
  4834. * An OSStatus code. noErr if the operation was successful.
  4835. *
  4836. * Availability:
  4837. * Mac OS X: in version 10.4 and later in Carbon.framework
  4838. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  4839. * Non-Carbon CFM: not available
  4840. }
  4841. function TXNSetCommandEventSupport( iTXNObject: TXNObject; iOptions: TXNCommandEventSupportOptions ): OSStatus; external name '_TXNSetCommandEventSupport';
  4842. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  4843. {
  4844. * TXNGetCommandEventSupport()
  4845. *
  4846. * Summary:
  4847. * Returns the command event support that is currently set for an
  4848. * MLTE object.
  4849. *
  4850. * Mac OS X threading:
  4851. * Not thread safe
  4852. *
  4853. * Parameters:
  4854. *
  4855. * iTXNObject:
  4856. * The TXNObject.
  4857. *
  4858. * oOptions:
  4859. * A pointer to a TXNCommandEventSupportOptions. Contains the
  4860. * option settings or return.
  4861. *
  4862. * Result:
  4863. * An OSStatus code. noErr if the operation was successful.
  4864. *
  4865. * Availability:
  4866. * Mac OS X: in version 10.4 and later in Carbon.framework
  4867. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  4868. * Non-Carbon CFM: not available
  4869. }
  4870. function TXNGetCommandEventSupport( iTXNObject: TXNObject; var oOptions: TXNCommandEventSupportOptions ): OSStatus; external name '_TXNGetCommandEventSupport';
  4871. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  4872. {
  4873. * TXNSetSpellCheckAsYouType()
  4874. *
  4875. * Summary:
  4876. * Call to turn on spell check as you type. If spell checking as
  4877. * not been enabled via a call to TXNSetCommandEventSupport than an
  4878. * error is returned.
  4879. *
  4880. * Mac OS X threading:
  4881. * Not thread safe
  4882. *
  4883. * Parameters:
  4884. *
  4885. * iTXNObject:
  4886. * The TXNObject.
  4887. *
  4888. * iActivate:
  4889. * Turns "Spell Check as You Type" on if true. Turns it off if
  4890. * false.
  4891. *
  4892. * Result:
  4893. * An OSStatus code. noErr if the operation was successful.
  4894. *
  4895. * Availability:
  4896. * Mac OS X: in version 10.4 and later in Carbon.framework
  4897. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  4898. * Non-Carbon CFM: not available
  4899. }
  4900. function TXNSetSpellCheckAsYouType( iTXNObject: TXNObject; iActivate: Boolean ): OSStatus; external name '_TXNSetSpellCheckAsYouType';
  4901. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  4902. {
  4903. * TXNGetSpellCheckAsYouType()
  4904. *
  4905. * Summary:
  4906. * Call this function to determine if "Spell Check as You Type" is
  4907. * turned on or off.
  4908. *
  4909. * Mac OS X threading:
  4910. * Not thread safe
  4911. *
  4912. * Parameters:
  4913. *
  4914. * iTXNObject:
  4915. * The TXNObject.
  4916. *
  4917. * Result:
  4918. * A Boolean. The value is true if Spell Check As You Type is on
  4919. * and false if not. Additionally if Spell Checking is not enabled
  4920. * for the TXNObject then the result of this function will be false.
  4921. *
  4922. * Availability:
  4923. * Mac OS X: in version 10.4 and later in Carbon.framework
  4924. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  4925. * Non-Carbon CFM: not available
  4926. }
  4927. function TXNGetSpellCheckAsYouType( iTXNObject: TXNObject ): Boolean; external name '_TXNGetSpellCheckAsYouType';
  4928. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  4929. {
  4930. Functions for controlling the current event target object.
  4931. }
  4932. {
  4933. * TXNSetEventTarget()
  4934. *
  4935. * Summary:
  4936. * Specifies a Carbon Event target for MLTE Carbon Event Handlers.
  4937. *
  4938. * Discussion:
  4939. * Call this function when you want to override or set the
  4940. * TXNObject's Carbon Event Target. The default target for
  4941. * TXNObjects that are not contained in an HITextView is the
  4942. * TXNObject's window. Note that if the TXNObject already has a
  4943. * default target when this function is called the handlers will be
  4944. * removed from the old target before install the new handlers that
  4945. * are listed below.
  4946. *
  4947. * When this function returns handlers for the following Carbon
  4948. * Events are installed and are active:
  4949. *
  4950. * For kEventClassTextInput:
  4951. * kEventTextInputUpdateActiveInputArea
  4952. * kEventTextInputUnicodeForKeyEvent
  4953. * kEventTextInputUnicodeText
  4954. * kEventTextInputOffsetToPos
  4955. * kEventTextInputPosToOffset
  4956. * kEventTextInputGetSelectedText
  4957. *
  4958. * For kEventClassTSMDocumentAccess:
  4959. * kEventTSMDocumentAccessGetLength
  4960. * kEventTSMDocumentAccessGetSelectedRange
  4961. * kEventTSMDocumentAccessGetCharactersPtr
  4962. * kEventTSMDocumentAccessGetCharactersPtrForLargestBuffer
  4963. * kEventTSMDocumentAccessGetCharacters
  4964. * kEventTSMDocumentAccessGetFont
  4965. * kEventTSMDocumentAccessGetGlyphInfo
  4966. *
  4967. * For kEventClassFont:
  4968. * kEventFontPanelClosed
  4969. * kEventFontSelection
  4970. *
  4971. * Additionally these handlers for kEventClassCommand are installed,
  4972. * but are inactive by default.
  4973. * kEventProcessCommand
  4974. * kEventCommandUpdateStatus
  4975. *
  4976. * The kEventClassCommand handlers support the following commands:
  4977. *
  4978. * kHICommandUndo
  4979. * kHICommandRedo
  4980. * kHICommandSelectAll
  4981. * kHICommandCut
  4982. * kHICommandCopy
  4983. * kHICommandPaste
  4984. * kHICommandClear
  4985. * kHICommandShowSpellingPanel
  4986. * kHICommandCheckSpelling
  4987. * kHICommandChangeSpelling
  4988. * kHICommandCheckSpellingAsYouType
  4989. * kHICommandIgnoreSpelling
  4990. * kHICommandLearnWord
  4991. *
  4992. * Activate command support by calling TXNSetCommandEventSupport
  4993. * with the correct options.
  4994. *
  4995. * Mac OS X threading:
  4996. * Not thread safe
  4997. *
  4998. * Parameters:
  4999. *
  5000. * iTXNObject:
  5001. * The TXNObject.
  5002. *
  5003. * iEventTarget:
  5004. * An HIObjectRef. The HIObject will become the event target for
  5005. * all of the TXNObject's Carbon Event handlers.
  5006. *
  5007. * Result:
  5008. * An OSStatus code. noErr if the operation was successful.
  5009. *
  5010. * Availability:
  5011. * Mac OS X: in version 10.4 and later in Carbon.framework
  5012. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  5013. * Non-Carbon CFM: not available
  5014. }
  5015. function TXNSetEventTarget( iTXNObject: TXNObject; iEventTarget: HIObjectRef { can be NULL } ): OSStatus; external name '_TXNSetEventTarget';
  5016. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  5017. {
  5018. * TXNGetEventTarget()
  5019. *
  5020. * Summary:
  5021. * Requests a TXNObject's current event target.
  5022. *
  5023. * Discussion:
  5024. * This function is used to obtain the HIObjectRef which is the
  5025. * TXNObject's carbon event target. Callers can use this function to
  5026. * obtain the target and subsequently install their own handlers.
  5027. *
  5028. * Mac OS X threading:
  5029. * Not thread safe
  5030. *
  5031. * Parameters:
  5032. *
  5033. * iTXNObject:
  5034. * The TXNObject.
  5035. *
  5036. * oEventTarget:
  5037. * An HIObjectRef pointer. The current Carbon Event target.
  5038. *
  5039. * Result:
  5040. * An OSStatus code. noErr if the operation was successful.
  5041. *
  5042. * Availability:
  5043. * Mac OS X: in version 10.4 and later in Carbon.framework
  5044. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  5045. * Non-Carbon CFM: not available
  5046. }
  5047. function TXNGetEventTarget( iTXNObject: TXNObject; var oEventTarget: HIObjectRef ): OSStatus; external name '_TXNGetEventTarget';
  5048. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  5049. {
  5050. * TXNSetContextualMenuSetup()
  5051. *
  5052. * Summary:
  5053. * Provides a callback function that is called before MLTE displays
  5054. * its contextual menu.
  5055. *
  5056. * Discussion:
  5057. * The menuSetupProc is called immediately before MLTE displays its
  5058. * contextual menu. The menu that is passed to the callback will
  5059. * only contain MLTE specific items. The client items and handlers
  5060. * should be installed each time the callback is called. When the
  5061. * callback is called MLTE will have selected the word that the user
  5062. * option-clicked on. For convenience sake the TXNObject associated
  5063. * with the callback is passed to the callback as well as the user
  5064. * data.
  5065. *
  5066. * Mac OS X threading:
  5067. * Not thread safe
  5068. *
  5069. * Parameters:
  5070. *
  5071. * iTXNObject:
  5072. * The TXNObject.
  5073. *
  5074. * iMenuSetupProc:
  5075. * The callback.
  5076. *
  5077. * iUserData:
  5078. * A pointer to some useful data.
  5079. *
  5080. * Result:
  5081. * OStatus. noErr is the operation is successful.
  5082. *
  5083. * Availability:
  5084. * Mac OS X: in version 10.4 and later in Carbon.framework
  5085. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  5086. * Non-Carbon CFM: not available
  5087. }
  5088. function TXNSetContextualMenuSetup( iTXNObject: TXNObject; iMenuSetupProc: TXNContextualMenuSetupUPP; iUserData: {const} UnivPtr ): OSStatus; external name '_TXNSetContextualMenuSetup';
  5089. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  5090. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5091. { ¥ Accessibility }
  5092. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5093. {
  5094. * TXNGetAccessibilityHIObject()
  5095. *
  5096. * Summary:
  5097. * Return an HIObjectRef used to represent the MLTE object for
  5098. * accessibility.
  5099. *
  5100. * Discussion:
  5101. * For each MLTE object a view creates, the view needs to call
  5102. * TXNGetAccessibilityHIObject to get an HIObjectRef that can be
  5103. * used to represent the MLTE object as an accessible
  5104. * object.
  5105. *
  5106. * After the view gets this HIObjectRef, it must add the HIObjectRef
  5107. * as a child of itself. The accessibility engine will then route
  5108. * events to MLTE accessible objects automatically.
  5109. *
  5110. * The view must install Carbon event handlers for
  5111. * kEventAccessibleGetAllAttributeNames and
  5112. * kEventAccessibleGetNamedAttribute, using the HIObjectRef as the
  5113. * target, to provide information for at least the following
  5114. * required attributes:
  5115. *
  5116. * kAXRoleAttribute
  5117. * kAXRoleDescriptionAttribute
  5118. * kAXWindowAttribute
  5119. * kAXTopUIElementAttribute
  5120. * kAXPositionAttribute
  5121. * kAXSizeAttribute
  5122. *
  5123. * MLTE also installs handlers for
  5124. * kEventAccessibleGetAllAttributeNames and
  5125. * kEventAccessibleGetNamedAttribute. These handlers return
  5126. * information for the following attributes. Note that these
  5127. * handlers will not get called unless the client-installed handlers
  5128. * return eventNotHandledErr.
  5129. *
  5130. * kAXEnabledAttribute
  5131. * kAXFocusedAttribute
  5132. * kAXValueAttribute
  5133. * kAXSelectedTextAttribute
  5134. * kAXSelectedTextRangeAttribute
  5135. * kAXNumberOfCharactersAttribute
  5136. *
  5137. * kAXLineForIndexParameterizedAttribute
  5138. * kAXRangeForLineParameterizedAttribute
  5139. * kAXStringForRangeParameterizedAttribute
  5140. * kAXRangeForPositionParameterizedAttribute
  5141. * kAXRangeForIndexParameterizedAttribute
  5142. * kAXBoundsForRangeParameterizedAttribute
  5143. * kAXStyleRangeForIndexParameterizedAttribute
  5144. *
  5145. * Mac OS X threading:
  5146. * Not thread safe
  5147. *
  5148. * Parameters:
  5149. *
  5150. * iTXNObject:
  5151. * Opaque TXNObject obtained from TXNCreateObject.
  5152. *
  5153. * oHIObjectRef:
  5154. * An HIObjectRef which represents iTXNObject as an accessible
  5155. * object.
  5156. *
  5157. * Result:
  5158. * An operating system status code.
  5159. *
  5160. * Availability:
  5161. * Mac OS X: in version 10.4 and later in Carbon.framework
  5162. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  5163. * Non-Carbon CFM: not available
  5164. }
  5165. function TXNGetAccessibilityHIObject( iTXNObject: TXNObject; var oHIObjectRef: HIObjectRef ): OSStatus; external name '_TXNGetAccessibilityHIObject';
  5166. (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
  5167. { **************************************************************************************************** }
  5168. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5169. { ¥ HITEXTVIEW APIs ¥ }
  5170. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5171. { **************************************************************************************************** }
  5172. {==============================================================================}
  5173. { HITextView is a MLTE view that can be embedded in the HIView hierarchy. The }
  5174. { view can be embedded in an HIScrollView if scroll bars are desired and can }
  5175. { be used in a composited window. On creation, a TXNObject is created to back }
  5176. { the view. You can extract the TXNObject at any time and use a subset of the }
  5177. { MLTE API with that object as an argument. }
  5178. {==============================================================================}
  5179. {
  5180. In Mac OS X 10.4 and later, HITextView supports these tags previously defined for the EditText control:
  5181. kControlEditTextCharCount
  5182. kControlEditTextSelectionTag
  5183. kControlEditTextCFStringTag
  5184. kControlEditTextInsertCFStringRefTag
  5185. }
  5186. { The HIObject class ID for the HITextView class. }
  5187. {$ifc USE_CFSTR_CONSTANT_MACROS}
  5188. {$definec kHITextViewClassID CFSTRP('com.apple.HITextView')}
  5189. {$endc}
  5190. { ControlKind}
  5191. const
  5192. kControlKindHITextView = $68697478 (* 'hitx' *);
  5193. {
  5194. * HITextViewCreate()
  5195. *
  5196. * Summary:
  5197. * Creates a text view. The new view is initially invisible.
  5198. *
  5199. * Mac OS X threading:
  5200. * Not thread safe
  5201. *
  5202. * Parameters:
  5203. *
  5204. * inBoundsRect:
  5205. * The bounding box of the view. If NULL, the bounds of the view
  5206. * will be initialized to 0.
  5207. *
  5208. * inOptions:
  5209. * There are currently no options. This must be 0.
  5210. *
  5211. * inTXNFrameOptions:
  5212. * Any frame options desired for the TXN object creation.
  5213. *
  5214. * outTextView:
  5215. * On exit, contains the new view.
  5216. *
  5217. * Availability:
  5218. * Mac OS X: in version 10.3 and later in Carbon.framework
  5219. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  5220. * Non-Carbon CFM: not available
  5221. }
  5222. function HITextViewCreate( {const} inBoundsRect: HIRectPtr { can be NULL }; inOptions: OptionBits; inTXNFrameOptions: TXNFrameOptions; var outTextView: HIViewRef ): OSStatus; external name '_HITextViewCreate';
  5223. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  5224. {
  5225. * HITextViewGetTXNObject()
  5226. *
  5227. * Summary:
  5228. * Obtains the TXNObject that backs the text view.
  5229. *
  5230. * Mac OS X threading:
  5231. * Not thread safe
  5232. *
  5233. * Parameters:
  5234. *
  5235. * inTextView:
  5236. * The text view that contains the TXNObject you wish to retrieve.
  5237. *
  5238. * Result:
  5239. * The TXNObject backing the given view.
  5240. *
  5241. * Availability:
  5242. * Mac OS X: in version 10.3 and later in Carbon.framework
  5243. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  5244. * Non-Carbon CFM: not available
  5245. }
  5246. function HITextViewGetTXNObject( inTextView: HIViewRef ): TXNObject; external name '_HITextViewGetTXNObject';
  5247. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  5248. {
  5249. * HITextViewSetBackgroundColor()
  5250. *
  5251. * Summary:
  5252. * Sets the background color of the view. This allows you to provide
  5253. * alpha as well. If inColor is NULL, the background of the text
  5254. * view will not draw.
  5255. *
  5256. * Mac OS X threading:
  5257. * Not thread safe
  5258. *
  5259. * Parameters:
  5260. *
  5261. * inTextView:
  5262. * The text view that you are modifying the background color of.
  5263. *
  5264. * inColor:
  5265. * A CGColorRef representing the color or pattern that will fill
  5266. * the background of the text view. The CGColorRef will be
  5267. * retained by this API. If the text view already contains a
  5268. * background color, it will be released prior to the new color
  5269. * being retained. If inColor is NULL, the background of the text
  5270. * view will not draw.
  5271. *
  5272. * Result:
  5273. * An operating system status code.
  5274. *
  5275. * Availability:
  5276. * Mac OS X: in version 10.3 and later in Carbon.framework
  5277. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  5278. * Non-Carbon CFM: not available
  5279. }
  5280. function HITextViewSetBackgroundColor( inTextView: HIViewRef; inColor: CGColorRef { can be NULL } ): OSStatus; external name '_HITextViewSetBackgroundColor';
  5281. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  5282. {
  5283. * HITextViewCopyBackgroundColor()
  5284. *
  5285. * Summary:
  5286. * Gets the background color of the view. If the background color
  5287. * returned is NULL, the background does not draw.
  5288. *
  5289. * Mac OS X threading:
  5290. * Not thread safe
  5291. *
  5292. * Parameters:
  5293. *
  5294. * inTextView:
  5295. * The text view from which you want to obtain the background
  5296. * color.
  5297. *
  5298. * outColor:
  5299. * A CGColorRef representing the color or pattern that is used for
  5300. * drawing the background of the text view. If the returned value
  5301. * is NULL, the background does not draw. If the returned
  5302. * CGColorRef is not NULL, it will be retained on return. You are
  5303. * responsible for releasing this CGColorRef when you are no
  5304. * longer referencing it.
  5305. *
  5306. * Result:
  5307. * An operating system status code.
  5308. *
  5309. * Availability:
  5310. * Mac OS X: in version 10.3 and later in Carbon.framework
  5311. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  5312. * Non-Carbon CFM: not available
  5313. }
  5314. function HITextViewCopyBackgroundColor( inTextView: HIViewRef; var outColor: CGColorRef ): OSStatus; external name '_HITextViewCopyBackgroundColor';
  5315. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  5316. { **************************************************************************************************** }
  5317. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5318. { ¥ DEPRECATED ¥ }
  5319. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5320. { **************************************************************************************************** }
  5321. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5322. { ¥ DEPRECATED CONSTANTS }
  5323. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5324. {
  5325. * TXTNTag
  5326. *
  5327. * Summary:
  5328. * Deprecated. Use TXNTypeRunAttributes.
  5329. }
  5330. type
  5331. TXTNTag = FourCharCode;
  5332. {
  5333. * TXNErrors
  5334. *
  5335. * Summary:
  5336. * Deprecated. Use OSStatus.
  5337. }
  5338. type
  5339. TXNErrors = OSStatus;
  5340. {
  5341. * TXNObjectRefcon
  5342. *
  5343. * Summary:
  5344. * Deprecated. Only used by TXNNewObject API, which has been
  5345. * deprecated.
  5346. }
  5347. type
  5348. TXNObjectRefcon = UnivPtr;
  5349. {
  5350. * TXNLongRect
  5351. *
  5352. * Summary:
  5353. * Deprecated. Only used by TXNGetRectBounds/TXNSetRectBounds APIs,
  5354. * which have been deprecated.
  5355. }
  5356. type
  5357. TXNLongRectPtr = ^TXNLongRect;
  5358. TXNLongRect = record
  5359. top: SInt32;
  5360. left: SInt32;
  5361. bottom: SInt32;
  5362. right: SInt32;
  5363. end;
  5364. {
  5365. * TXNFrameType
  5366. *
  5367. * Summary:
  5368. * Deprecated. Only used by TXNNewObject API, which has been
  5369. * deprecated. Only kTXNTextEditStyleFrameType is supported.
  5370. }
  5371. type
  5372. TXNFrameType = UInt32;
  5373. const
  5374. kTXNTextEditStyleFrameType = 1;
  5375. kTXNPageFrameType = 2; { Not supported}
  5376. kTXNMultipleFrameType = 3; { Not supported}
  5377. {
  5378. Deprecated TXNTypeRunAttributes and TXNTypeRunAttributeSizes constants.
  5379. kTXNQDFontSizeAttribute is obsolete. Incorrect font sizes are always returned as a Fixed
  5380. value. Use kTXNFontSizeAttribute instead.
  5381. }
  5382. const
  5383. kTXNQDFontSizeAttribute = $73697A65 (* 'size' *);
  5384. const
  5385. kTXNQDFontSizeAttributeSize = SizeOf(SInt16);
  5386. {
  5387. Deprecated QuickDraw imaging constants.
  5388. On Mac OS X version 10.4 and later, MLTE always uses Quartz imaging.
  5389. }
  5390. const
  5391. kTXNUseQDforImagingBit = 16;
  5392. const
  5393. kTXNUseQDforImagingMask = 1 shl kTXNUseQDforImagingBit;
  5394. const
  5395. kTXNImageWithQDBit = 8;
  5396. const
  5397. kTXNImageWithQDMask = 1 shl kTXNImageWithQDBit;
  5398. {
  5399. Deprecated TXNControlTag constant.
  5400. On Mac OS X version 10.4 and later, MLTE never draws the caret when inactive.
  5401. }
  5402. const
  5403. kTXNDrawCaretWhenInactiveTag = $64637274 (* 'dcrt' *); { Caret will never be drawn when inactive.}
  5404. const
  5405. kTXNDontDrawCaretWhenInactive = false;
  5406. kTXNDrawCaretWhenInactive = true;
  5407. const
  5408. kTXNDontDrawCaretWhenInactiveBit = 12;
  5409. const
  5410. kTXNDontDrawCaretWhenInactiveMask = 1 shl kTXNDontDrawCaretWhenInactiveBit;
  5411. {
  5412. Deprecated TSM constants.
  5413. On Mac OS X, MLTE uses the Text Services Manager.
  5414. }
  5415. const
  5416. kTXNNoTSMEverBit = 4;
  5417. const
  5418. kTXNNoTSMEverMask = 1 shl kTXNNoTSMEverBit;
  5419. {
  5420. Deprecated TXNCarbonEventInfo flag constants.
  5421. MLTE does not support AppleEvents on Mac OS X version 10.1 and later.
  5422. }
  5423. const
  5424. kTXNNoAppleEventHandlersBit = 0;
  5425. kTXNRestartAppleEventHandlersBit = 1;
  5426. const
  5427. kTXNNoAppleEventHandlersMask = 1 shl kTXNNoAppleEventHandlersBit;
  5428. kTXNRestartAppleEventHandlersMask = 1 shl kTXNRestartAppleEventHandlersBit;
  5429. { Use kTXNFontMenuObjectKey}
  5430. {$ifc USE_CFSTR_CONSTANT_MACROS}
  5431. {$definec kTXNFontMenuRefKey CFSTRP('FontMenuRef')}
  5432. {$endc}
  5433. {
  5434. * TXNActionKey
  5435. *
  5436. }
  5437. type
  5438. TXNActionKeyPtr = ^TXNActionKey; { when a VAR xx: TXNActionKey parameter can be nil, it is changed to xx: TXNActionKeyPtr }
  5439. TXNActionKey = UInt32;
  5440. const
  5441. kTXNTypingAction = 0;
  5442. kTXNCutAction = 1;
  5443. kTXNPasteAction = 2;
  5444. kTXNClearAction = 3;
  5445. kTXNChangeFontAction = 4;
  5446. kTXNChangeFontColorAction = 5;
  5447. kTXNChangeFontSizeAction = 6;
  5448. kTXNChangeStyleAction = 7;
  5449. kTXNAlignLeftAction = 8;
  5450. kTXNAlignCenterAction = 9;
  5451. kTXNAlignRightAction = 10;
  5452. kTXNDropAction = 11;
  5453. kTXNMoveAction = 12;
  5454. kTXNFontFeatureAction = 13;
  5455. kTXNFontVariationAction = 14;
  5456. {
  5457. * Use if none of the above apply.
  5458. }
  5459. kTXNUndoLastAction = 1024;
  5460. { Deprecated on Mac OS X version 10.4 and later, use kTXNActionNameMapperKey instead.}
  5461. {$ifc USE_CFSTR_CONSTANT_MACROS}
  5462. {$definec kTXNActionKeyMapperKey CFSTRP('ActionKeyMapper')}
  5463. {$endc}
  5464. { Deprecated on Mac OS X version 10.4 and later, use TXNActionNameMapperProcPtr instead.}
  5465. type
  5466. TXNActionKeyMapperProcPtr = function( actionKey: TXNActionKey; commandID: UInt32 ): CFStringRef;
  5467. type
  5468. TXNActionKeyMapperUPP = TXNActionKeyMapperProcPtr;
  5469. {
  5470. * NewTXNActionKeyMapperUPP()
  5471. *
  5472. * Availability:
  5473. * Mac OS X: in version 10.0 and later in Carbon.framework
  5474. * CarbonLib: in CarbonLib 1.3 and later
  5475. * Non-Carbon CFM: available as macro/inline
  5476. }
  5477. function NewTXNActionKeyMapperUPP( userRoutine: TXNActionKeyMapperProcPtr ): TXNActionKeyMapperUPP; external name '_NewTXNActionKeyMapperUPP';
  5478. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  5479. {
  5480. * DisposeTXNActionKeyMapperUPP()
  5481. *
  5482. * Availability:
  5483. * Mac OS X: in version 10.0 and later in Carbon.framework
  5484. * CarbonLib: in CarbonLib 1.3 and later
  5485. * Non-Carbon CFM: available as macro/inline
  5486. }
  5487. procedure DisposeTXNActionKeyMapperUPP( userUPP: TXNActionKeyMapperUPP ); external name '_DisposeTXNActionKeyMapperUPP';
  5488. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  5489. {
  5490. * InvokeTXNActionKeyMapperUPP()
  5491. *
  5492. * Availability:
  5493. * Mac OS X: in version 10.0 and later in Carbon.framework
  5494. * CarbonLib: in CarbonLib 1.3 and later
  5495. * Non-Carbon CFM: available as macro/inline
  5496. }
  5497. function InvokeTXNActionKeyMapperUPP( actionKey: TXNActionKey; commandID: UInt32; userUPP: TXNActionKeyMapperUPP ): CFStringRef; external name '_InvokeTXNActionKeyMapperUPP';
  5498. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  5499. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5500. { ¥ Count Option Bits }
  5501. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5502. { Options for TXNGet/ClearActionChangeCount to decide what type(s) of action count to use. }
  5503. const
  5504. kTXNTextInputCountBit = 0;
  5505. kTXNRunCountBit = 1;
  5506. {
  5507. * TXNCountOptions
  5508. *
  5509. }
  5510. type
  5511. TXNCountOptions = OptionBits;
  5512. const
  5513. kTXNTextInputCountMask = 1 shl kTXNTextInputCountBit;
  5514. kTXNRunCountMask = 1 shl kTXNRunCountBit;
  5515. kTXNAllCountMask = kTXNTextInputCountMask or kTXNRunCountMask;
  5516. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5517. { ¥ DEPRECATED APIs, Mac OS X version 10.2 and later }
  5518. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5519. {
  5520. * TXNSetViewRect() *** DEPRECATED ***
  5521. *
  5522. * Deprecated:
  5523. * Use TXNSetFrameBounds or TXNSetRectBounds APIs instead.
  5524. *
  5525. * Discussion:
  5526. * Set the rectangle describing the current view into the document.
  5527. * This will change how much text is viewable. Not where a line of
  5528. * text wraps. That is controlled by TXNSetFrameBoundsSize.
  5529. *
  5530. * Mac OS X threading:
  5531. * Not thread safe
  5532. *
  5533. * Parameters:
  5534. *
  5535. * iTXNObject:
  5536. * Opaque TXNObject obtained from TXNCreateObject.
  5537. *
  5538. * iViewRect:
  5539. * Rect of the view.
  5540. *
  5541. * Availability:
  5542. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.2
  5543. * CarbonLib: in CarbonLib 1.3 and later
  5544. * Non-Carbon CFM: in Textension 1.3 and later
  5545. }
  5546. procedure TXNSetViewRect( iTXNObject: TXNObject; const (*var*) iViewRect: Rect ); external name '_TXNSetViewRect';
  5547. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 *)
  5548. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5549. { ¥ DEPRECATED APIs, Mac OS X version 10.3 and later }
  5550. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  5551. {
  5552. * TXNNewObject() *** DEPRECATED ***
  5553. *
  5554. * Deprecated:
  5555. * Use TXNCreateObject API instead.
  5556. *
  5557. * Discussion:
  5558. * Allocates a new frame (i.e. new is called to allocate a
  5559. * TXNObject) and returns a pointer to the object in the newDoc
  5560. * parameter.
  5561. *
  5562. * Mac OS X threading:
  5563. * Not thread safe
  5564. *
  5565. * Parameters:
  5566. *
  5567. * iFileSpec:
  5568. * If NULL you start with an empty document. If not NULL, the
  5569. * file is read to obtain the document contents after the object
  5570. * is successfully allocated.
  5571. *
  5572. * iWindow:
  5573. * Required. The window in which the document is going to be
  5574. * displayed. If a fileSpec is provided during creation, the
  5575. * filename is going to be used as the window title. If iWindow
  5576. * is NULL, TXNAttachObjectToWindow needs to be called after
  5577. * creation.
  5578. *
  5579. * iFrame:
  5580. * If text-area does not fill the entire window. This specifies
  5581. * the area to fill. Can be NULL. In which case, the windowÕs
  5582. * portRect is used as the frame.
  5583. *
  5584. * iFrameOptions:
  5585. * Specify the options to be supported by this frame. The
  5586. * available options are support for cutting and pasting movies
  5587. * and sound, handle scrollbars and handle grow box in the frame.
  5588. *
  5589. * iFrameType:
  5590. * Specify the type of frame to be used. In MLTE version 1.1 and
  5591. * earlier, only kTXNTextEditStyleFrameType is supported.
  5592. *
  5593. * iFileType:
  5594. * Specify the primary file type. If you use
  5595. * kTextensionTextFile files will be saved in a private format
  5596. * (see xxx). If you want saved files to be plain text files you
  5597. * should specify 'TEXT' here. If you specify 'TEXT' here you can
  5598. * use the frameOptions parameter to specify whether the TEXT
  5599. * files should be saved with 'MPSR' resources or 'styl'
  5600. * resources. These are resources which contain style information
  5601. * for a file, and they both have there own limitations. If you
  5602. * use 'styl' resources to save style info your documents can have
  5603. * as many styles as you like however tabs will not be saved. If
  5604. * you use 'MPSR' resources only the first style in the document
  5605. * will be saved (you as client are expected to apply all style
  5606. * changes to the entire document). If you truly want rich
  5607. * documents which can potentially contain graphics and sound you
  5608. * should specify kTextensionTextFileOutput. If you want a plain
  5609. * text editor like SimpleText specify that style information by
  5610. * saved via ÔstylÕ resources. If you want files similar to those
  5611. * output by CW IDE, BBEdit, and MPW specify that style
  5612. * information be saved in a ÔMPSRÕ resource.
  5613. *
  5614. * iPermanentEncoding:
  5615. * The encoding in which the document should be saved (Unicode,
  5616. * Text or System default).
  5617. *
  5618. * oTXNObject:
  5619. * Pointer to the opaque datastructure allocated by the function.
  5620. * Most of the subsequent functions require that such a pointer be
  5621. * passed in.
  5622. *
  5623. * oTXNFrameID:
  5624. * Unique ID for the frame. This value is always set to 0.
  5625. *
  5626. * iRefCon:
  5627. * Caller can set this to any value. It is retained by the
  5628. * TXNNewObject which can later be asked to return it.
  5629. *
  5630. * Result:
  5631. * If anything goes wrong the error is returned. Success must be
  5632. * complete. That is if everything works, but there is a failure
  5633. * reading a specified file the object is freed.
  5634. *
  5635. * Availability:
  5636. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
  5637. * CarbonLib: in CarbonLib 1.0 and later
  5638. * Non-Carbon CFM: in Textension 1.0 and later
  5639. }
  5640. function TXNNewObject( {const} iFileSpec: FSSpecPtr { can be NULL }; iWindow: WindowRef; {const} iFrame: RectPtr { can be NULL }; iFrameOptions: TXNFrameOptions; iFrameType: TXNFrameType; iFileType: TXNFileType; iPermanentEncoding: TXNPermanentTextEncodingType; var oTXNObject: TXNObject; var oTXNFrameID: TXNFrameID; iRefCon: TXNObjectRefcon ): OSStatus; external name '_TXNNewObject';
  5641. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
  5642. {
  5643. * TXNTerminateTextension() *** DEPRECATED ***
  5644. *
  5645. * Deprecated:
  5646. * No longer needed.
  5647. *
  5648. * Discussion:
  5649. * Close the Textension library. It is necessary to call this
  5650. * function so that Textension can correctly close down any TSM
  5651. * connections and do other clean up.
  5652. *
  5653. * Mac OS X threading:
  5654. * Not thread safe
  5655. *
  5656. * Availability:
  5657. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
  5658. * CarbonLib: in CarbonLib 1.0 and later
  5659. * Non-Carbon CFM: in Textension 1.0 and later
  5660. }
  5661. procedure TXNTerminateTextension; external name '_TXNTerminateTextension';
  5662. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
  5663. {
  5664. * TXNSetDataFromFile() *** DEPRECATED ***
  5665. *
  5666. * Deprecated:
  5667. * Use TXNSetDataFromCFURLRef API instead.
  5668. *
  5669. * Discussion:
  5670. * Replace the specified range with the contents of the specified
  5671. * file. The data fork of the file must be opened by the caller.
  5672. * Functional in NoUserIO mode.
  5673. *
  5674. * Mac OS X threading:
  5675. * Not thread safe
  5676. *
  5677. * Parameters:
  5678. *
  5679. * iTXNObject:
  5680. * Opaque TXNObject obtained from TXNCreateObject.
  5681. *
  5682. * iFileRefNum:
  5683. * File RefNum.
  5684. *
  5685. * iFileType:
  5686. * File type.
  5687. *
  5688. * iFileLength:
  5689. * The length of data in the file that should be considered data.
  5690. * This parameter is available to enable callers to embed text
  5691. * inside their own private data structures. Note that if the
  5692. * data is in the Textension(txtn) format this parameter is
  5693. * ignored since length, etc. information is part of the format.
  5694. * Further note that if you you just want Textension to read a
  5695. * file and you are not interested in embedding you can just pass
  5696. * kTXNEndOffset(0x7FFFFFFF), and Textension will use the file
  5697. * manager to determine the files length.
  5698. *
  5699. * iStartOffset:
  5700. * Start position at which to insert the file into the document.
  5701. *
  5702. * iEndOffset:
  5703. * End position of range being replaced by the file.
  5704. *
  5705. * Result:
  5706. * File manager error or noErr.
  5707. *
  5708. * Availability:
  5709. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
  5710. * CarbonLib: in CarbonLib 1.0 and later
  5711. * Non-Carbon CFM: in Textension 1.0 and later
  5712. }
  5713. function TXNSetDataFromFile( iTXNObject: TXNObject; iFileRefNum: SInt16; iFileType: OSType; iFileLength: ByteCount; iStartOffset: TXNOffset; iEndOffset: TXNOffset ): OSStatus; external name '_TXNSetDataFromFile';
  5714. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
  5715. {
  5716. * TXNConvertToPublicScrap() *** DEPRECATED ***
  5717. *
  5718. * Deprecated:
  5719. * This is a no-op in OS X.
  5720. *
  5721. * Discussion:
  5722. * Convert the Textension private scrap to the public clipboard.
  5723. * This should be called on suspend events and before the
  5724. * application displays a dialog that might support cut and paste.
  5725. * Or more generally, whenever someone other than the Textension
  5726. * Shared Library needs access to the scrap data. This is a no-op in
  5727. * OS X.
  5728. *
  5729. * Mac OS X threading:
  5730. * Not thread safe
  5731. *
  5732. * Result:
  5733. * Memory Manager errors, Scrap Manager errors, or noErr.
  5734. *
  5735. * Availability:
  5736. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
  5737. * CarbonLib: in CarbonLib 1.0 and later
  5738. * Non-Carbon CFM: in Textension 1.0 and later
  5739. }
  5740. function TXNConvertToPublicScrap: OSStatus; external name '_TXNConvertToPublicScrap';
  5741. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
  5742. {
  5743. * TXNConvertFromPublicScrap() *** DEPRECATED ***
  5744. *
  5745. * Deprecated:
  5746. * No longer needed.
  5747. *
  5748. * Discussion:
  5749. * Convert the public clipboard to our private scrap . This should
  5750. * be called on resume events and after an application has modified
  5751. * the scrap. Before doing work we check the validity of the public
  5752. * scrap (date modification and type).
  5753. *
  5754. * This is no longer needed in Mac OS X version 10.2 and later.
  5755. * Calling TXNPaste will automatically handle conversion from public
  5756. * scrap.
  5757. *
  5758. * Mac OS X threading:
  5759. * Not thread safe
  5760. *
  5761. * Result:
  5762. * Memory Manager errors, Scrap Manager errors, or noErr.
  5763. *
  5764. * Availability:
  5765. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
  5766. * CarbonLib: in CarbonLib 1.0 and later
  5767. * Non-Carbon CFM: in Textension 1.0 and later
  5768. }
  5769. function TXNConvertFromPublicScrap: OSStatus; external name '_TXNConvertFromPublicScrap';
  5770. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
  5771. {
  5772. * TXNDraw() *** DEPRECATED ***
  5773. *
  5774. * Deprecated:
  5775. * Deprecated.
  5776. *
  5777. * Discussion:
  5778. * Redraw the TXNObject including any scrollbars associated with the
  5779. * text frame. Call this function in response to an update event
  5780. * for a window that contains multiple TXNObjects or some other
  5781. * graphic element. The caller is responsible for calling
  5782. * BeginUpdate/EndUpdate in response to the update event.
  5783. *
  5784. * Mac OS X threading:
  5785. * Not thread safe
  5786. *
  5787. * Parameters:
  5788. *
  5789. * iTXNObject:
  5790. * Opaque TXNObject obtained from TXNCreateObject.
  5791. *
  5792. * iDrawPort:
  5793. * Can be NULL. If NULL the port is drawn to the port currently
  5794. * attached to the iTXNObject. If not NULL drawing goes to the
  5795. * iDrawPort. If drawing is done to the iDrawPort selection is
  5796. * not updated. This works this way so that it is possible to
  5797. * Draw a TXNObject to a static port (i.e. print the thing without
  5798. * reflowing the text to match the paper size which is what
  5799. * TXNPrint does) and not have a line drawn where the selection
  5800. * would be. If you pass an iDrawPort to an active TXNObject
  5801. * (i.e. editable) the selection will not be updated. In this case
  5802. * the selection will behave oddly until text is typed which will
  5803. * serve to realign the selection. Bottom-line don't pass a port
  5804. * in unless you want static text (printed or non-editable)
  5805. *
  5806. * Availability:
  5807. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
  5808. * CarbonLib: in CarbonLib 1.0 and later
  5809. * Non-Carbon CFM: in Textension 1.0 and later
  5810. }
  5811. procedure TXNDraw( iTXNObject: TXNObject; iDrawPort: GWorldPtr { can be NULL } ); external name '_TXNDraw';
  5812. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
  5813. {
  5814. * TXNAttachObjectToWindow() *** DEPRECATED ***
  5815. *
  5816. * Deprecated:
  5817. * Use TXNAttachObjectToWindowRef API instead.
  5818. *
  5819. * Discussion:
  5820. * If a TXNObject was initialized with a NULL window pointer use
  5821. * this function to attach a window to that object. In version 1.0
  5822. * of Textension attaching a TXNObject to more than one window is
  5823. * not supported. Note that if a CGContextRef was passed to the
  5824. * TXNObject previously through TXNSetTXNObjectControls, that
  5825. * CGContextRef will be ignored. The CGContextRef associated with
  5826. * the iWindow will be used instead. You may revert back to the
  5827. * previous CGContextRef by calling the TXNSetTXNObjectControls API
  5828. * with the desired CGContextRef again after calling
  5829. * TXNAttachObjectToWindow.
  5830. *
  5831. * Mac OS X threading:
  5832. * Not thread safe
  5833. *
  5834. * Parameters:
  5835. *
  5836. * iTXNObject:
  5837. * Opaque TXNObject obtained from TXNCreateObject.
  5838. *
  5839. * iWindow:
  5840. * GWorldPtr that the object should be attached to.
  5841. *
  5842. * iIsActualWindow:
  5843. * Let the library know if the GWorldPtr is actually a WindowRef
  5844. * or actually a GWorldPtr. This is important if the client is
  5845. * taking advantage of the editing packages scrollbar support.
  5846. *
  5847. * Result:
  5848. * paramErrs or noErr.
  5849. *
  5850. * Availability:
  5851. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
  5852. * CarbonLib: in CarbonLib 1.0 and later
  5853. * Non-Carbon CFM: in Textension 1.0 and later
  5854. }
  5855. function TXNAttachObjectToWindow( iTXNObject: TXNObject; iWindow: GWorldPtr; iIsActualWindow: Boolean ): OSStatus; external name '_TXNAttachObjectToWindow';
  5856. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
  5857. {
  5858. * TXNIsObjectAttachedToWindow() *** DEPRECATED ***
  5859. *
  5860. * Deprecated:
  5861. * Deprecated.
  5862. *
  5863. * Discussion:
  5864. * A utility function that allows a caller to check a TXNObject to
  5865. * see if it is attached to a window.
  5866. *
  5867. * Mac OS X threading:
  5868. * Not thread safe
  5869. *
  5870. * Parameters:
  5871. *
  5872. * iTXNObject:
  5873. * Opaque TXNObject obtained from TXNCreateObject.
  5874. *
  5875. * Result:
  5876. * True if object is attached, false if TXNObject is not attached.
  5877. *
  5878. * Availability:
  5879. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
  5880. * CarbonLib: in CarbonLib 1.0 and later
  5881. * Non-Carbon CFM: in Textension 1.0 and later
  5882. }
  5883. function TXNIsObjectAttachedToWindow( iTXNObject: TXNObject ): Boolean; external name '_TXNIsObjectAttachedToWindow';
  5884. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
  5885. {
  5886. * TXNIsObjectAttachedToSpecificWindow() *** DEPRECATED ***
  5887. *
  5888. * Deprecated:
  5889. * Deprecated.
  5890. *
  5891. * Discussion:
  5892. * Determines whether the given object is attached to the given
  5893. * window.
  5894. *
  5895. * Mac OS X threading:
  5896. * Not thread safe
  5897. *
  5898. * Parameters:
  5899. *
  5900. * iTXNObject:
  5901. * Opaque TXNObject obtained from TXNNewObject.
  5902. *
  5903. * iWindow:
  5904. * The window to check attachment against.
  5905. *
  5906. * oAttached:
  5907. * true if the object is attached to the given window, false
  5908. * otherwise.
  5909. *
  5910. * Result:
  5911. * An operating system status code.
  5912. *
  5913. * Availability:
  5914. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
  5915. * CarbonLib: in CarbonLib 1.3 and later
  5916. * Non-Carbon CFM: in Textension 1.2 and later
  5917. }
  5918. function TXNIsObjectAttachedToSpecificWindow( iTXNObject: TXNObject; iWindow: WindowRef; var oAttached: Boolean ): OSStatus; external name '_TXNIsObjectAttachedToSpecificWindow';
  5919. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
  5920. {
  5921. * TXNSetRectBounds() *** DEPRECATED ***
  5922. *
  5923. * Deprecated:
  5924. * Use TXNSetHIRectBounds API instead.
  5925. *
  5926. * Discussion:
  5927. * The View rectangle controls the text you see. The Destination
  5928. * rectangle controls how text is laid out. The Scrollbar is drawn
  5929. * inside the View rectangle. You only need to pass in pointers for
  5930. * the rectangles you want to set.
  5931. *
  5932. * Mac OS X threading:
  5933. * Not thread safe
  5934. *
  5935. * Parameters:
  5936. *
  5937. * iTXNObject:
  5938. * Opaque TXNObject obtained from TXNNewObject.
  5939. *
  5940. * iViewRect:
  5941. * The new view rectangle. If you do not want to change the view
  5942. * rectangle pass NULL.
  5943. *
  5944. * iDestinationRect:
  5945. * The new destination rectangle. Pass NULL if you don't want to
  5946. * change the destination retangle.
  5947. *
  5948. * iUpdate:
  5949. * If you would like the the text and where the scrollbars are
  5950. * placed recalculated and redrawn pass true. If you prefer to
  5951. * wait on this pass false.
  5952. *
  5953. * Availability:
  5954. * Mac OS X: in version 10.1 and later in Carbon.framework but deprecated in 10.3
  5955. * CarbonLib: in CarbonLib 1.5 and later
  5956. * Non-Carbon CFM: not available
  5957. }
  5958. procedure TXNSetRectBounds( iTXNObject: TXNObject; {const} iViewRect: RectPtr { can be NULL }; {const} iDestinationRect: TXNLongRectPtr { can be NULL }; iUpdate: Boolean ); external name '_TXNSetRectBounds';
  5959. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
  5960. {
  5961. * TXNGetRectBounds() *** DEPRECATED ***
  5962. *
  5963. * Deprecated:
  5964. * Use TXNGetHIRect API instead.
  5965. *
  5966. * Discussion:
  5967. * Get the values for the current View rectangle, Destination
  5968. * rectangle and Text rectangle. You only need to pass in pointers
  5969. * for the rectangles you're interested in.
  5970. *
  5971. * Mac OS X threading:
  5972. * Not thread safe
  5973. *
  5974. * Parameters:
  5975. *
  5976. * iTXNObject:
  5977. * Opaque TXNObject obtained from TXNNewObject.
  5978. *
  5979. * oViewRect:
  5980. * The current view rectangle
  5981. *
  5982. * oDestinationRect:
  5983. * The current destination rectangle
  5984. *
  5985. * oTextRect:
  5986. * The smallest rectangle needed to contain the current text.
  5987. * This rectangle is calculated by walking the lines of text and
  5988. * measuring each line. So this can be expensive. The width of
  5989. * this rectangle will be the width of the longest line in the
  5990. * text.
  5991. *
  5992. * Result:
  5993. * An operating system status code.
  5994. *
  5995. * Availability:
  5996. * Mac OS X: in version 10.1 and later in Carbon.framework but deprecated in 10.3
  5997. * CarbonLib: in CarbonLib 1.5 and later
  5998. * Non-Carbon CFM: not available
  5999. }
  6000. function TXNGetRectBounds( iTXNObject: TXNObject; oViewRect: RectPtr { can be NULL }; oDestinationRect: TXNLongRectPtr { can be NULL }; oTextRect: TXNLongRectPtr { can be NULL } ): OSStatus; external name '_TXNGetRectBounds';
  6001. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
  6002. {
  6003. * TXNActivate() *** DEPRECATED ***
  6004. *
  6005. * Deprecated:
  6006. * Use TXNSetScrollbarState API instead.
  6007. *
  6008. * Discussion:
  6009. * Make the TXNObject object active in the sense that it can be
  6010. * scrolled if it has scrollbars. If the TXNScrollBarState parameter
  6011. * is true than the scrollbars will be active even when the
  6012. * TXNObject is not focused (i.e. insertion point not active). See
  6013. * the equivalent TXNSetScrollbarState.
  6014. *
  6015. * This function should be used if you have multiple TXNObjects in a
  6016. * window, and you want them all to be scrollable even though only
  6017. * one at a time can have the keyboard focus.
  6018. *
  6019. * Mac OS X threading:
  6020. * Not thread safe
  6021. *
  6022. * Parameters:
  6023. *
  6024. * iTXNObject:
  6025. * Opaque TXNObject obtained from TXNCreateObject.
  6026. *
  6027. * iTXNFrameID:
  6028. * TXNFrameID obtained from TXNNewObject. Deprecated. Pass 0.
  6029. *
  6030. * iActiveState:
  6031. * Boolean if true Scrollbars active even though TXNObject does
  6032. * not have the keyboard focus. if false scrollbars are synced
  6033. * with active state (i.e. a focused object has an active
  6034. * insertion point or selection and active scrollbars. An
  6035. * unfocused object has inactive selection (grayed or framed
  6036. * selection) and inactive scrollbars. The latter state is the
  6037. * default and usually the one you use if you have one TXNObject
  6038. * in a window.
  6039. *
  6040. * Result:
  6041. * A result code indicating success or failure.
  6042. *
  6043. * Availability:
  6044. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
  6045. * CarbonLib: in CarbonLib 1.0 and later
  6046. * Non-Carbon CFM: in Textension 1.0 and later
  6047. }
  6048. function TXNActivate( iTXNObject: TXNObject; iTXNFrameID: TXNFrameID; iActiveState: TXNScrollBarState ): OSStatus; external name '_TXNActivate';
  6049. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
  6050. {
  6051. * TXNPointToOffset() *** DEPRECATED ***
  6052. *
  6053. * Deprecated:
  6054. * Use TXNHIPointToOffset API instead.
  6055. *
  6056. * Mac OS X threading:
  6057. * Not thread safe
  6058. *
  6059. * Parameters:
  6060. *
  6061. * iTXNObject:
  6062. * Opaque TXNObject obtained from TXNCreateObject.
  6063. *
  6064. * iPoint:
  6065. * A point (in local coordinates).
  6066. *
  6067. * oOffset:
  6068. * Offset corresponding to the point.
  6069. *
  6070. * Result:
  6071. * A result code indicating success or failure. Memory, out of
  6072. * bounds errors (if the point is out of the ViewRect).
  6073. *
  6074. * Availability:
  6075. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
  6076. * CarbonLib: in CarbonLib 1.1 and later
  6077. * Non-Carbon CFM: in Textension 1.1 and later
  6078. }
  6079. function TXNPointToOffset( iTXNObject: TXNObject; iPoint: Point; var oOffset: TXNOffset ): OSStatus; external name '_TXNPointToOffset';
  6080. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
  6081. {
  6082. * TXNOffsetToPoint() *** DEPRECATED ***
  6083. *
  6084. * Deprecated:
  6085. * Use TXNOffsetToHIPoint API instead.
  6086. *
  6087. * Mac OS X threading:
  6088. * Not thread safe
  6089. *
  6090. * Parameters:
  6091. *
  6092. * iTXNObject:
  6093. * Opaque TXNObject obtained from TXNCreateObject.
  6094. *
  6095. * iOffset:
  6096. * An offset.
  6097. *
  6098. * oPoint:
  6099. * Point corresponding to the offset.
  6100. *
  6101. * Result:
  6102. * A result code indicating success or failure. Memory, out of
  6103. * bounds errors.
  6104. *
  6105. * Availability:
  6106. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.3
  6107. * CarbonLib: in CarbonLib 1.1 and later
  6108. * Non-Carbon CFM: in Textension 1.1 and later
  6109. }
  6110. function TXNOffsetToPoint( iTXNObject: TXNObject; iOffset: TXNOffset; var oPoint: Point ): OSStatus; external name '_TXNOffsetToPoint';
  6111. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
  6112. {
  6113. * TXNTSMCheck()
  6114. *
  6115. * Summary:
  6116. * Deprecated.
  6117. *
  6118. * Discussion:
  6119. * Call this when WaitNextEvent returns false or there is no active
  6120. * TSMObject . The TXNObject parameter can be NULL which allows a
  6121. * client to call this function at any time. This is necessary to
  6122. * insure input methods enough time to be reasonably responsive.
  6123. *
  6124. * Parameters:
  6125. *
  6126. * iTXNObject:
  6127. * Opaque struct obtained from TXNNewObject.
  6128. *
  6129. * ioEvent:
  6130. * The event record. Usually a NULL event. If the event is not
  6131. * an NULL event on entry, and an input method consumes the event
  6132. * the event should return as a NULL event.
  6133. *
  6134. * Result:
  6135. * Boolean: True if TSM handled this event. False if TSM did not
  6136. * handle this event.
  6137. *
  6138. * Availability:
  6139. * Mac OS X: not available
  6140. * CarbonLib: not available
  6141. * Non-Carbon CFM: in Textension 1.0 and later
  6142. }
  6143. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  6144. { ¥ DEPRECATED APIs, Mac OS X version 10.4 and later }
  6145. {ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ}
  6146. {
  6147. * TXNCanUndo() *** DEPRECATED ***
  6148. *
  6149. * Deprecated:
  6150. * Use TXNCanUndoAction API instead.
  6151. *
  6152. * Summary:
  6153. * Use this to determine if the Undo item in Edit menu should be
  6154. * highlighted or not. Tells you if last command was undoable.
  6155. *
  6156. * Mac OS X threading:
  6157. * Not thread safe
  6158. *
  6159. * Parameters:
  6160. *
  6161. * iTXNObject:
  6162. * Opaque TXNObject obtained from TXNCreateObject.
  6163. *
  6164. * oTXNActionKey:
  6165. * The key code that the caller can use to pick a string to
  6166. * describe the undoable action in the undo item. Pass in NULL if
  6167. * the string isn't needed.
  6168. *
  6169. * Result:
  6170. * Boolean: If True the last command is undoable and the undo item
  6171. * in the menu should be active. If false last command cannot be
  6172. * undone and undo should be grayed in the menu.
  6173. *
  6174. * Availability:
  6175. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
  6176. * CarbonLib: in CarbonLib 1.0 and later
  6177. * Non-Carbon CFM: in Textension 1.0 and later
  6178. }
  6179. function TXNCanUndo( iTXNObject: TXNObject; oTXNActionKey: TXNActionKeyPtr { can be NULL } ): Boolean; external name '_TXNCanUndo';
  6180. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  6181. {
  6182. * TXNCanRedo() *** DEPRECATED ***
  6183. *
  6184. * Deprecated:
  6185. * Use TXNCanRedoAction API instead.
  6186. *
  6187. * Summary:
  6188. * Use this to determine if the current item on the undo stack is
  6189. * redoable.
  6190. *
  6191. * Mac OS X threading:
  6192. * Not thread safe
  6193. *
  6194. * Parameters:
  6195. *
  6196. * iTXNObject:
  6197. * Opaque TXNObject obtained from TXNCreateObject.
  6198. *
  6199. * oTXNActionKey:
  6200. * The key code that the caller can use to pick a string to
  6201. * describe the redoable action in the redo item. Pass in NULL if
  6202. * the string isn't needed.
  6203. *
  6204. * Result:
  6205. * If it returns true, then the redo item in the edit menu should be
  6206. * active.
  6207. *
  6208. * Availability:
  6209. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
  6210. * CarbonLib: in CarbonLib 1.0 and later
  6211. * Non-Carbon CFM: in Textension 1.0 and later
  6212. }
  6213. function TXNCanRedo( iTXNObject: TXNObject; oTXNActionKey: TXNActionKeyPtr { can be NULL } ): Boolean; external name '_TXNCanRedo';
  6214. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  6215. {
  6216. * TXNGetActionChangeCount() *** DEPRECATED ***
  6217. *
  6218. * Deprecated:
  6219. * Use TXNGetCountForActionType API instead.
  6220. *
  6221. * Summary:
  6222. * Retrieves the number of times the specified action(s) have
  6223. * occurred.
  6224. *
  6225. * Discussion:
  6226. * Explicit call to TXNClearActionChangeCount is needed when the
  6227. * counter(s) have to be reset.
  6228. *
  6229. * Mac OS X threading:
  6230. * Not thread safe
  6231. *
  6232. * Parameters:
  6233. *
  6234. * iTXNObject:
  6235. * Opaque TXNObject obtained from TXNCreateObject.
  6236. *
  6237. * iOptions:
  6238. * Specify the the type of action changes to be include when
  6239. * retrieving the count. Choose from the TXNOptions.
  6240. *
  6241. * oCount:
  6242. * The number of counts returned by the function.
  6243. *
  6244. * Result:
  6245. * An operating system status code.
  6246. *
  6247. * Availability:
  6248. * Mac OS X: in version 10.1 and later in Carbon.framework but deprecated in 10.4
  6249. * CarbonLib: in CarbonLib 1.3 and later
  6250. * Non-Carbon CFM: in Textension 1.3 and later
  6251. }
  6252. function TXNGetActionChangeCount( iTXNObject: TXNObject; iOptions: TXNCountOptions; var oCount: ItemCount ): OSStatus; external name '_TXNGetActionChangeCount';
  6253. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  6254. {
  6255. * TXNClearActionChangeCount() *** DEPRECATED ***
  6256. *
  6257. * Deprecated:
  6258. * Use TXNClearCountForActionType API instead.
  6259. *
  6260. * Summary:
  6261. * Reset the specified action counter(s) to zero.
  6262. *
  6263. * Discussion:
  6264. * Use kAllCountMask to reset everything.
  6265. *
  6266. * Mac OS X threading:
  6267. * Not thread safe
  6268. *
  6269. * Parameters:
  6270. *
  6271. * iTXNObject:
  6272. * Opaque TXNObject obtained from TXNCreateObject.
  6273. *
  6274. * iOptions:
  6275. * Specify the the type of action changes to be included when
  6276. * resetting the count. Choose from the TXNOptions.
  6277. *
  6278. * Result:
  6279. * An operating system status code.
  6280. *
  6281. * Availability:
  6282. * Mac OS X: in version 10.1 and later in Carbon.framework but deprecated in 10.4
  6283. * CarbonLib: in CarbonLib 1.3 and later
  6284. * Non-Carbon CFM: in Textension 1.3 and later
  6285. }
  6286. function TXNClearActionChangeCount( iTXNObject: TXNObject; iOptions: TXNCountOptions ): OSStatus; external name '_TXNClearActionChangeCount';
  6287. (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  6288. {
  6289. * TXNSetDataFromCFURLRef() *** DEPRECATED ***
  6290. *
  6291. * Deprecated:
  6292. * Use TXNReadFromCFURL API instead.
  6293. *
  6294. * Summary:
  6295. * Replaces a range of data with the content of a file.
  6296. *
  6297. * Discussion:
  6298. * Uses URL file name extension to determine the type of the input
  6299. * file. If the entire content is replaced, calling TXNRevert will
  6300. * revert to the last saved CFURLRef.
  6301. *
  6302. * Mac OS X threading:
  6303. * Not thread safe
  6304. *
  6305. * Parameters:
  6306. *
  6307. * iTXNObject:
  6308. * Opaque TXNObject obtained from TXNCreateObject. Data will be
  6309. * added to this text object.
  6310. *
  6311. * iURL:
  6312. * The url referring to the file which contains the data you want
  6313. * to add to the object.
  6314. *
  6315. * iStartOffset:
  6316. * The starting offset at which to insert the file into a
  6317. * document.. If you want to replace the entire text content then
  6318. * set the iStartOffset parameter to kTXNStartOffset.
  6319. *
  6320. * iEndOffset:
  6321. * The ending position of the range being replaced by the file. If
  6322. * you want to replace the entire text content then set the
  6323. * iEndOffset parameter to kTXNEndOffset.
  6324. *
  6325. * Result:
  6326. * A result code indicating success or failure.
  6327. *
  6328. * Availability:
  6329. * Mac OS X: in version 10.3 and later in Carbon.framework but deprecated in 10.4
  6330. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
  6331. * Non-Carbon CFM: not available
  6332. }
  6333. function TXNSetDataFromCFURLRef( iTXNObject: TXNObject; iURL: CFURLRef; iStartOffset: TXNOffset; iEndOffset: TXNOffset ): OSStatus; external name '_TXNSetDataFromCFURLRef';
  6334. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  6335. {
  6336. * TXNSave() *** DEPRECATED ***
  6337. *
  6338. * Deprecated:
  6339. * Use TXNWriteRangeToCFURL API instead.
  6340. *
  6341. * Summary:
  6342. * Save the contents of the document as the given type.
  6343. *
  6344. * Mac OS X threading:
  6345. * Not thread safe
  6346. *
  6347. * Parameters:
  6348. *
  6349. * iTXNObject:
  6350. * Opaque TXNObject obtained from TXNCreateObject.
  6351. *
  6352. * iType:
  6353. * The type of file to create.
  6354. *
  6355. * iResType:
  6356. * When saving file as plain TEXT the type of resource to save
  6357. * style information. Use kTXNMultipleStylesPerTextDocumentResType
  6358. * if your document contains multiple styles and you want a
  6359. * SimpleText like document. Use
  6360. * kTXNSingleStylePerTextDocumentResType if the document has a
  6361. * single style and you would like a BBEdit, MPW, CW type of
  6362. * document.
  6363. *
  6364. * iPermanentEncoding:
  6365. * The encoding in which the document should be saved (Unicode,
  6366. * Text or System default).
  6367. *
  6368. * iFileSpecification:
  6369. * The file specification to which the document should be saved.
  6370. * The file must have been opened by the caller. The file
  6371. * specification is remembered by the TXNObject and is used for
  6372. * any subsequent calls to TXNRevert.
  6373. *
  6374. * iDataReference:
  6375. * The data fork ref num. This is used to write data to the data
  6376. * fork of the file. The data is written beginning at the current
  6377. * mark.
  6378. *
  6379. * iResourceReference:
  6380. * The resource fork ref num. If the caller has specified that
  6381. * style information be saved as a resource (MPW or SimpleText)
  6382. * than this should be a valid reference to an open resource fork.
  6383. * If the txtn format is being used than this input value is
  6384. * ignored.
  6385. *
  6386. * Result:
  6387. * The result of writing the file.
  6388. *
  6389. * Availability:
  6390. * Mac OS X: in version 10.0 and later in Carbon.framework but deprecated in 10.4
  6391. * CarbonLib: in CarbonLib 1.0 and later
  6392. * Non-Carbon CFM: in Textension 1.0 and later
  6393. }
  6394. function TXNSave( iTXNObject: TXNObject; iType: TXNFileType; iResType: OSType; iPermanentEncoding: TXNPermanentTextEncodingType; const (*var*) iFileSpecification: FSSpec; iDataReference: SInt16; iResourceReference: SInt16 ): OSStatus; external name '_TXNSave';
  6395. (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
  6396. end.