intuition.pas 201 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020
  1. {
  2. This file is part of the Free Pascal run time library.
  3. A file in Amiga system run time library.
  4. Copyright (c) 1998-2003 by Nils Sjoholm
  5. member of the Amiga RTL development team.
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. {
  13. History:
  14. Changed tNewWindow.MaxHeigth and tNewWindow.MaxWidth
  15. from Word to Integer.
  16. 30 May 2000.
  17. Added overlay functions for Pchar->Strings, functions
  18. and procedures.
  19. 14 Jul 2000.
  20. Added functions and procedures with array of const.
  21. For use with fpc 1.0.7 They are in systemvartags.
  22. 05 Nov 2002.
  23. Removed amigaoverlays, use smartlink instead.
  24. 05 Nov 2002.
  25. Added the define use_amiga_smartlink.
  26. 13 Jan 2003.
  27. Update for AmigaOS 3.9.
  28. New consts and new records.
  29. 04 Feb 2003.
  30. Changed integer > smallint.
  31. 09 Feb 2003.
  32. [email protected] Nils Sjoholm
  33. }
  34. {$I useamigasmartlink.inc}
  35. {$ifdef use_amiga_smartlink}
  36. {$smartlink on}
  37. {$endif use_amiga_smartlink}
  38. unit intuition;
  39. INTERFACE
  40. uses exec, graphics, utility, inputevent, timer, layers;
  41. {
  42. * NOTE: intuition/iobsolete.h is included at the END of this file!
  43. }
  44. { ======================================================================== }
  45. { === IntuiText ========================================================== }
  46. { ================================= ======================================= }
  47. { IntuiText is a series of strings that start with a screen location
  48. * (always relative to the upper-left corner of something) and then the
  49. * text of the string. The text is null-terminated.
  50. }
  51. Type
  52. pIntuiText = ^tIntuiText;
  53. tIntuiText = record
  54. FrontPen,
  55. BackPen : Byte; { the pen numbers for the rendering }
  56. DrawMode : Byte; { the mode for rendering the text }
  57. LeftEdge : smallint; { relative start location for the text }
  58. TopEdge : smallint; { relative start location for the text }
  59. ITextFont : pTextAttr; { if NULL, you accept the default }
  60. IText : STRPTR; { pointer to null-terminated text }
  61. NextText : pIntuiText; { continuation to TxWrite another text }
  62. end;
  63. { ======================================================================== }
  64. { === Border ============================================================= }
  65. { ======================================================================== }
  66. { Data type Border, used for drawing a series of lines which is intended for
  67. * use as a border drawing, but which may, in fact, be used to render any
  68. * arbitrary vector shape.
  69. * The routine DrawBorder sets up the RastPort with the appropriate
  70. * variables, then does a Move to the first coordinate, then does Draws
  71. * to the subsequent coordinates.
  72. * After all the Draws are done, if NextBorder is non-zero we call DrawBorder
  73. * recursively
  74. }
  75. Type
  76. pBorder = ^tBorder;
  77. tBorder = record
  78. LeftEdge,
  79. TopEdge : smallint; { initial offsets from the origin }
  80. FrontPen,
  81. BackPen : Byte; { pens numbers for rendering }
  82. DrawMode : Byte; { mode for rendering }
  83. Count : Shortint; { number of XY pairs }
  84. XY : Pointer; { vector coordinate pairs rel to LeftTop}
  85. NextBorder : pBorder; { pointer to any other Border too }
  86. end;
  87. { ======================================================================== }
  88. { === MenuItem =========================================================== }
  89. { ======================================================================== }
  90. Type
  91. pMenuItem = ^tMenuItem;
  92. tMenuItem = record
  93. NextItem : pMenuItem; { pointer to next in chained list }
  94. LeftEdge,
  95. TopEdge : smallint; { position of the select box }
  96. Width,
  97. Height : smallint; { dimensions of the select box }
  98. Flags : Word; { see the defines below }
  99. MutualExclude : Longint; { set bits mean this item excludes that }
  100. ItemFill : Pointer; { points to Image, IntuiText, or NULL }
  101. { when this item is pointed to by the cursor and the items highlight
  102. * mode HIGHIMAGE is selected, this alternate image will be displayed
  103. }
  104. SelectFill : Pointer; { points to Image, IntuiText, or NULL }
  105. Command : Char; { only if appliprog sets the COMMSEQ flag }
  106. SubItem : pMenuItem; { if non-zero, DrawMenu shows "->" }
  107. { The NextSelect field represents the menu number of next selected
  108. * item (when user has drag-selected several items)
  109. }
  110. NextSelect : Word;
  111. end;
  112. Const
  113. { FLAGS SET BY THE APPLIPROG }
  114. CHECKIT = $0001; { whether to check this item if selected }
  115. ITEMTEXT = $0002; { set if textual, clear if graphical item }
  116. COMMSEQ = $0004; { set if there's an command sequence }
  117. MENUTOGGLE = $0008; { set to toggle the check of a menu item }
  118. ITEMENABLED = $0010; { set if this item is enabled }
  119. { these are the SPECIAL HIGHLIGHT FLAG state meanings }
  120. HIGHFLAGS = $00C0; { see definitions below for these bits }
  121. HIGHIMAGE = $0000; { use the user's "select image" }
  122. HIGHCOMP = $0040; { highlight by complementing the selectbox }
  123. HIGHBOX = $0080; { highlight by "boxing" the selectbox }
  124. HIGHNONE = $00C0; { don't highlight }
  125. { FLAGS SET BY BOTH APPLIPROG AND INTUITION }
  126. CHECKED = $0100; { if CHECKIT, then set this when selected }
  127. { FLAGS SET BY INTUITION }
  128. ISDRAWN = $1000; { this item's subs are currently drawn }
  129. HIGHITEM = $2000; { this item is currently highlighted }
  130. MENUTOGGLED = $4000; { this item was already toggled }
  131. { ======================================================================== }
  132. { === Menu =============================================================== }
  133. { ======================================================================== }
  134. Type
  135. pMenu = ^tMenu;
  136. tMenu = record
  137. NextMenu : pMenu; { same level }
  138. LeftEdge,
  139. TopEdge : smallint; { position of the select box }
  140. Width,
  141. Height : smallint; { dimensions of the select box }
  142. Flags : Word; { see flag definitions below }
  143. MenuName : STRPTR; { text for this Menu Header }
  144. FirstItem : pMenuItem; { pointer to first in chain }
  145. { these mysteriously-named variables are for internal use only }
  146. JazzX,
  147. JazzY,
  148. BeatX,
  149. BeatY : smallint;
  150. end;
  151. CONST
  152. { FLAGS SET BY BOTH THE APPLIPROG AND INTUITION }
  153. MENUENABLED = $0001; { whether or not this menu is enabled }
  154. { FLAGS SET BY INTUITION }
  155. MIDRAWN = $0100; { this menu's items are currently drawn }
  156. { ======================================================================== }
  157. { === Gadget ============================================================= }
  158. { ======================================================================== }
  159. Type
  160. pGadget = ^tGadget;
  161. tGadget = record
  162. NextGadget : pGadget; { next gadget in the list }
  163. LeftEdge,
  164. TopEdge : smallint; { "hit box" of gadget }
  165. Width,
  166. Height : smallint; { "hit box" of gadget }
  167. Flags : Word; { see below for list of defines }
  168. Activation : Word; { see below for list of defines }
  169. GadgetType : Word; { see below for defines }
  170. { appliprog can specify that the Gadget be rendered as either as Border
  171. * or an Image. This variable points to which (or equals NULL if there's
  172. * nothing to be rendered about this Gadget)
  173. }
  174. GadgetRender : Pointer;
  175. { appliprog can specify "highlighted" imagery rather than algorithmic
  176. * this can point to either Border or Image data
  177. }
  178. SelectRender : Pointer;
  179. GadgetText : pIntuiText; { text for this gadget }
  180. { by using the MutualExclude word, the appliprog can describe
  181. * which gadgets mutually-exclude which other ones. The bits
  182. * in MutualExclude correspond to the gadgets in object containing
  183. * the gadget list. If this gadget is selected and a bit is set
  184. * in this gadget's MutualExclude and the gadget corresponding to
  185. * that bit is currently selected (e.g. bit 2 set and gadget 2
  186. * is currently selected) that gadget must be unselected.
  187. * Intuition does the visual unselecting (with checkmarks) and
  188. * leaves it up to the program to unselect internally
  189. }
  190. MutualExclude : Longint; { set bits mean this gadget excludes that gadget }
  191. { pointer to a structure of special data required by Proportional,
  192. * String and Longint Gadgets
  193. }
  194. SpecialInfo : Pointer;
  195. GadgetID : Word; { user-definable ID field }
  196. UserData : Pointer; { ptr to general purpose User data (ignored by In) }
  197. end;
  198. pExtGadget = ^tExtGadget;
  199. tExtGadget = record
  200. { The first fields match struct Gadget exactly }
  201. NextGadget : pExtGadget; { Matches struct Gadget }
  202. LeftEdge, TopEdge, { Matches struct Gadget }
  203. Width, Height : smallint; { Matches struct Gadget }
  204. Flags, { Matches struct Gadget }
  205. Activation, { Matches struct Gadget }
  206. GadgetType : WORD; { Matches struct Gadget }
  207. GadgetRender, { Matches struct Gadget }
  208. SelectRender : Pointer; { Matches struct Gadget }
  209. GadgetText : pIntuiText; { Matches struct Gadget }
  210. MutualExclude : Longint; { Matches struct Gadget }
  211. SpecialInfo : Pointer; { Matches struct Gadget }
  212. GadgetID : WORD; { Matches struct Gadget }
  213. UserData : Pointer; { Matches struct Gadget }
  214. { These fields only exist under V39 and only if GFLG_EXTENDED is set }
  215. MoreFlags : ULONG; { see GMORE_ flags below }
  216. BoundsLeftEdge, { Bounding extent for gadget, valid }
  217. BoundsTopEdge, { only if GMORE_BOUNDS is set. The }
  218. BoundsWidth, { GFLG_RELxxx flags affect these }
  219. BoundsHeight : smallint; { coordinates as well. }
  220. end;
  221. CONST
  222. { --- Gadget.Flags values --- }
  223. { combinations in these bits describe the highlight technique to be used }
  224. GFLG_GADGHIGHBITS = $0003;
  225. GFLG_GADGHCOMP = $0000; { Complement the select box }
  226. GFLG_GADGHBOX = $0001; { Draw a box around the image }
  227. GFLG_GADGHIMAGE = $0002; { Blast in this alternate image }
  228. GFLG_GADGHNONE = $0003; { don't highlight }
  229. GFLG_GADGIMAGE = $0004; { set IF GadgetRender AND SelectRender
  230. * point to an Image structure, clear
  231. * if they point to Border structures
  232. }
  233. { combinations in these next two bits specify to which corner the gadget's
  234. * Left & Top coordinates are relative. If relative to Top/Left,
  235. * these are "normal" coordinates (everything is relative to something in
  236. * this universe).
  237. *
  238. * Gadget positions and dimensions are relative to the window or
  239. * requester which contains the gadget
  240. }
  241. GFLG_RELBOTTOM = $0008; { vert. pos. is relative to bottom edge }
  242. GFLG_RELRIGHT = $0010; { horiz. pos. is relative to right edge }
  243. GFLG_RELWIDTH = $0020; { width is relative to req/window }
  244. GFLG_RELHEIGHT = $0040; { height is relative to req/window }
  245. { New for V39: GFLG_RELSPECIAL allows custom gadget implementors to
  246. * make gadgets whose position and size depend in an arbitrary way
  247. * on their window's dimensions. The GM_LAYOUT method will be invoked
  248. * for such a gadget (or any other GREL_xxx gadget) at suitable times,
  249. * such as when the window opens or the window's size changes.
  250. }
  251. GFLG_RELSPECIAL = $4000; { custom gadget has special relativity.
  252. * Gadget box values are absolutes, but
  253. * can be changed via the GM_LAYOUT method.
  254. }
  255. GFLG_SELECTED = $0080; { you may initialize AND look at this }
  256. { the GFLG_DISABLED flag is initialized by you and later set by Intuition
  257. * according to your calls to On/OffGadget(). It specifies whether or not
  258. * this Gadget is currently disabled from being selected
  259. }
  260. GFLG_DISABLED = $0100;
  261. { These flags specify the type of text field that Gadget.GadgetText
  262. * points to. In all normal (pre-V36) gadgets which you initialize
  263. * this field should always be zero. Some types of gadget objects
  264. * created from classes will use these fields to keep track of
  265. * types of labels/contents that different from IntuiText, but are
  266. * stashed in GadgetText.
  267. }
  268. GFLG_LABELMASK = $3000;
  269. GFLG_LABELITEXT = $0000; { GadgetText points to IntuiText }
  270. GFLG_LABELSTRING = $1000; { GadgetText points to (UBYTE *) }
  271. GFLG_LABELIMAGE = $2000; { GadgetText points to Image (object) }
  272. { New for V37: GFLG_TABCYCLE }
  273. GFLG_TABCYCLE = $0200; { (string OR custom) gadget participates in
  274. * cycling activation with Tab or Shift-Tab
  275. }
  276. { New for V37: GFLG_STRINGEXTEND. We discovered that V34 doesn't properly
  277. * ignore the value we had chosen for the Gadget->Activation flag
  278. * GACT_STRINGEXTEND. NEVER SET THAT FLAG WHEN RUNNING UNDER V34.
  279. * The Gadget->Flags bit GFLG_STRINGEXTEND is provided as a synonym which is
  280. * safe under V34, and equivalent to GACT_STRINGEXTEND under V37.
  281. * (Note that the two flags are not numerically equal)
  282. }
  283. GFLG_STRINGEXTEND = $0400; { this String Gadget has StringExtend }
  284. { New for V39: GFLG_IMAGEDISABLE. This flag is automatically set if
  285. * the custom image of this gadget knows how to do disabled rendering
  286. * (more specifically, if its IA_SupportsDisable attribute is TRUE).
  287. * Intuition uses this to defer the ghosting to the image-class,
  288. * instead of doing it itself (the old compatible way).
  289. * Do not set this flag yourself - Intuition will do it for you.
  290. }
  291. GFLG_IMAGEDISABLE = $0800; { Gadget's image knows how to do disabled
  292. * rendering
  293. }
  294. { New for V39: If set, this bit means that the Gadget is actually
  295. * a struct ExtGadget, with new fields and flags. All V39 boopsi
  296. * gadgets are ExtGadgets. Never ever attempt to read the extended
  297. * fields of a gadget if this flag is not set.
  298. }
  299. GFLG_EXTENDED = $8000; { Gadget is extended }
  300. { --- Gadget.Activation flag values --- }
  301. { Set GACT_RELVERIFY if you want to verify that the pointer was still over
  302. * the gadget when the select button was released. Will cause
  303. * an IDCMP_GADGETUP message to be sent if so.
  304. }
  305. GACT_RELVERIFY = $0001;
  306. { the flag GACT_IMMEDIATE, when set, informs the caller that the gadget
  307. * was activated when it was activated. This flag works in conjunction with
  308. * the GACT_RELVERIFY flag
  309. }
  310. GACT_IMMEDIATE = $0002;
  311. { the flag GACT_ENDGADGET, when set, tells the system that this gadget,
  312. * when selected, causes the Requester to be ended. Requesters
  313. * that are ended are erased and unlinked from the system.
  314. }
  315. GACT_ENDGADGET = $0004;
  316. { the GACT_FOLLOWMOUSE flag, when set, specifies that you want to receive
  317. * reports on mouse movements while this gadget is active.
  318. * You probably want to set the GACT_IMMEDIATE flag when using
  319. * GACT_FOLLOWMOUSE, since that's the only reasonable way you have of
  320. * learning why Intuition is suddenly sending you a stream of mouse
  321. * movement events. If you don't set GACT_RELVERIFY, you'll get at
  322. * least one Mouse Position event.
  323. }
  324. GACT_FOLLOWMOUSE = $0008;
  325. { if any of the BORDER flags are set in a Gadget that's included in the
  326. * Gadget list when a Window is opened, the corresponding Border will
  327. * be adjusted to make room for the Gadget
  328. }
  329. GACT_RIGHTBORDER = $0010;
  330. GACT_LEFTBORDER = $0020;
  331. GACT_TOPBORDER = $0040;
  332. GACT_BOTTOMBORDER= $0080;
  333. GACT_BORDERSNIFF = $8000; { neither set nor rely on this bit }
  334. GACT_TOGGLESELECT= $0100; { this bit for toggle-select mode }
  335. GACT_BOOLEXTEND = $2000; { this Boolean Gadget has a BoolInfo }
  336. { should properly be in StringInfo, but aren't }
  337. GACT_STRINGLEFT = $0000; { NOTE WELL: that this has value zero }
  338. GACT_STRINGCENTER= $0200;
  339. GACT_STRINGRIGHT = $0400;
  340. GACT_LONGINT = $0800; { this String Gadget is for Long Ints }
  341. GACT_ALTKEYMAP = $1000; { this String has an alternate keymap }
  342. GACT_STRINGEXTEND= $2000; { this String Gadget has StringExtend }
  343. { NOTE: NEVER SET GACT_STRINGEXTEND IF YOU
  344. * ARE RUNNING ON LESS THAN V36! SEE
  345. * GFLG_STRINGEXTEND (ABOVE) INSTEAD
  346. }
  347. GACT_ACTIVEGADGET = $4000; { this gadget is "active". This flag
  348. * is maintained by Intuition, and you
  349. * cannot count on its value persisting
  350. * while you do something on your program's
  351. * task. It can only be trusted by
  352. * people implementing custom gadgets
  353. }
  354. { note $8000 is used above (GACT_BORDERSNIFF);
  355. * all Activation flags defined }
  356. { --- GADGET TYPES ------------------------------------------------------- }
  357. { These are the Gadget Type definitions for the variable GadgetType
  358. * gadget number type MUST start from one. NO TYPES OF ZERO ALLOWED.
  359. * first comes the mask for Gadget flags reserved for Gadget typing
  360. }
  361. GTYP_GADGETTYPE = $FC00; { all Gadget Global Type flags (padded) }
  362. GTYP_SYSGADGET = $8000; { 1 = Allocated by the system, 0 = by app. }
  363. GTYP_SCRGADGET = $4000; { 1 = ScreenGadget, 0 = WindowGadget }
  364. GTYP_GZZGADGET = $2000; { 1 = for WFLG_GIMMEZEROZERO borders }
  365. GTYP_REQGADGET = $1000; { 1 = this is a Requester Gadget }
  366. { system gadgets }
  367. GTYP_SIZING = $0010;
  368. GTYP_WDRAGGING = $0020;
  369. GTYP_SDRAGGING = $0030;
  370. GTYP_WUPFRONT = $0040;
  371. GTYP_SUPFRONT = $0050;
  372. GTYP_WDOWNBACK = $0060;
  373. GTYP_SDOWNBACK = $0070;
  374. GTYP_CLOSE = $0080;
  375. { application gadgets }
  376. GTYP_BOOLGADGET = $0001;
  377. GTYP_GADGET0002 = $0002;
  378. GTYP_PROPGADGET = $0003;
  379. GTYP_STRGADGET = $0004;
  380. GTYP_CUSTOMGADGET = $0005;
  381. {* GTYP_GTYPEMASK is a mask you can apply to tell what class
  382. * of gadget this is. The possible classes follow.
  383. *}
  384. GTYP_GTYPEMASK = $0007;
  385. { This bit in GadgetType is reserved for undocumented internal use
  386. * by the Gadget Toolkit, and cannot be used nor relied on by
  387. * applications: $0100;
  388. }
  389. { New for V39. Gadgets which have the GFLG_EXTENDED flag set are
  390. * actually ExtGadgets, which have more flags. The GMORE_xxx
  391. * identifiers describe those flags. For GMORE_SCROLLRASTER, see
  392. * important information in the ScrollWindowRaster() autodoc.
  393. * NB: GMORE_SCROLLRASTER must be set before the gadget is
  394. * added to a window.
  395. }
  396. GMORE_BOUNDS = $00000001; { ExtGadget has valid Bounds }
  397. GMORE_GADGETHELP = $00000002; { This gadget responds to gadget help }
  398. GMORE_SCROLLRASTER = $00000004; { This (custom) gadget uses ScrollRaster }
  399. { ======================================================================== }
  400. { === BoolInfo======================================================= }
  401. { ======================================================================== }
  402. { This is the special data needed by an Extended Boolean Gadget
  403. * Typically this structure will be pointed to by the Gadget field SpecialInfo
  404. }
  405. Type
  406. pBoolInfo = ^tBoolInfo;
  407. tBoolInfo = record
  408. Flags : Word; { defined below }
  409. Mask : Pointer; { bit mask for highlighting and selecting
  410. * mask must follow the same rules as an Image
  411. * plane. It's width and height are determined
  412. * by the width and height of the gadget's
  413. * select box. (i.e. Gadget.Width and .Height).
  414. }
  415. Reserved : ULONG; { set to 0 }
  416. end;
  417. Const
  418. { set BoolInfo.Flags to this flag bit.
  419. * in the future, additional bits might mean more stuff hanging
  420. * off of BoolInfo.Reserved.
  421. }
  422. BOOLMASK = $0001; { extension is for masked gadget }
  423. { ======================================================================== }
  424. { === PropInfo =========================================================== }
  425. { ======================================================================== }
  426. { this is the special data required by the proportional Gadget
  427. * typically, this data will be pointed to by the Gadget variable SpecialInfo
  428. }
  429. Type
  430. pPropInfo = ^tPropInfo;
  431. tPropInfo = record
  432. Flags : Word; { general purpose flag bits (see defines below) }
  433. { You initialize the Pot variables before the Gadget is added to
  434. * the system. Then you can look here for the current settings
  435. * any time, even while User is playing with this Gadget. To
  436. * adjust these after the Gadget is added to the System, use
  437. * ModifyProp(); The Pots are the actual proportional settings,
  438. * where a value of zero means zero and a value of MAXPOT means
  439. * that the Gadget is set to its maximum setting.
  440. }
  441. HorizPot : WORD; { 16-bit FixedPoint horizontal quantity percentage }
  442. VertPot : WORD; { 16-bit FixedPoint vertical quantity percentage }
  443. { the 16-bit FixedPoint Body variables describe what percentage of
  444. * the entire body of stuff referred to by this Gadget is actually
  445. * shown at one time. This is used with the AUTOKNOB routines,
  446. * to adjust the size of the AUTOKNOB according to how much of
  447. * the data can be seen. This is also used to decide how far
  448. * to advance the Pots when User hits the Container of the Gadget.
  449. * For instance, if you were controlling the display of a 5-line
  450. * Window of text with this Gadget, and there was a total of 15
  451. * lines that could be displayed, you would set the VertBody value to
  452. * (MAXBODY / (TotalLines / DisplayLines)) = MAXBODY / 3.
  453. * Therefore, the AUTOKNOB would fill 1/3 of the container, and
  454. * if User hits the Cotainer outside of the knob, the pot would
  455. * advance 1/3 (plus or minus) If there's no body to show, or
  456. * the total amount of displayable info is less than the display area,
  457. * set the Body variables to the MAX. To adjust these after the
  458. * Gadget is added to the System, use ModifyProp();
  459. }
  460. HorizBody : Word; { horizontal Body }
  461. VertBody : Word; { vertical Body }
  462. { these are the variables that Intuition sets and maintains }
  463. CWidth : Word; { Container width (with any relativity absoluted) }
  464. CHeight : Word; { Container height (with any relativity absoluted) }
  465. HPotRes,
  466. VPotRes : Word; { pot increments }
  467. LeftBorder : Word; { Container borders }
  468. TopBorder : Word; { Container borders }
  469. end;
  470. CONST
  471. { --- FLAG BITS ---------------------------------------------------------- }
  472. AUTOKNOB = $0001; { this flag sez: gimme that old auto-knob }
  473. { NOTE: if you do not use an AUTOKNOB for a proportional gadget,
  474. * you are currently limited to using a single Image of your own
  475. * design: Intuition won't handle a linked list of images as
  476. * a proportional gadget knob.
  477. }
  478. FREEHORIZ = $0002; { IF set, the knob can move horizontally }
  479. FREEVERT = $0004; { IF set, the knob can move vertically }
  480. PROPBORDERLESS = $0008; { IF set, no border will be rendered }
  481. KNOBHIT = $0100; { set when this Knob is hit }
  482. PROPNEWLOOK = $0010; { set this IF you want to get the new
  483. * V36 look
  484. }
  485. KNOBHMIN = 6; { minimum horizontal size of the Knob }
  486. KNOBVMIN = 4; { minimum vertical size of the Knob }
  487. MAXBODY = $FFFF; { maximum body value }
  488. MAXPOT = $FFFF; { maximum pot value }
  489. { ======================================================================== }
  490. { === StringInfo ========================================================= }
  491. { ======================================================================== }
  492. { this is the special data required by the string Gadget
  493. * typically, this data will be pointed to by the Gadget variable SpecialInfo
  494. }
  495. Type
  496. pStringInfo = ^tStringInfo;
  497. tStringInfo = record
  498. { you initialize these variables, and then Intuition maintains them }
  499. Buffer : STRPTR; { the buffer containing the start and final string }
  500. UndoBuffer : STRPTR; { optional buffer for undoing current entry }
  501. BufferPos : smallint; { character position in Buffer }
  502. MaxChars : smallint; { max number of chars in Buffer (including NULL) }
  503. DispPos : smallint; { Buffer position of first displayed character }
  504. { Intuition initializes and maintains these variables for you }
  505. UndoPos : smallint; { character position in the undo buffer }
  506. NumChars : smallint; { number of characters currently in Buffer }
  507. DispCount : smallint; { number of whole characters visible in Container }
  508. CLeft,
  509. CTop : smallint; { topleft offset of the container }
  510. { you can initialize this variable before the gadget is submitted to
  511. * Intuition, and then examine it later to discover what Longint
  512. * the user has entered (if the user never plays with the gadget,
  513. * the value will be unchanged from your initial setting)
  514. }
  515. Extension : Pointer;
  516. _LongInt : Longint;
  517. { If you want this Gadget to use your own Console keymapping, you
  518. * set the ALTKEYMAP bit in the Activation flags of the Gadget, and then
  519. * set this variable to point to your keymap. If you don't set the
  520. * ALTKEYMAP, you'll get the standard ASCII keymapping.
  521. }
  522. AltKeyMap : Pointer;
  523. end;
  524. { ======================================================================== }
  525. { === Requester ========================================================== }
  526. { ======================================================================== }
  527. Type
  528. pRequester = ^tRequester;
  529. tRequester = record
  530. { the ClipRect and BitMap and used for rendering the requester }
  531. OlderRequest : pRequester;
  532. LeftEdge,
  533. TopEdge : smallint; { dimensions of the entire box }
  534. Width,
  535. Height : smallint; { dimensions of the entire box }
  536. RelLeft,
  537. RelTop : smallint; { for Pointer relativity offsets }
  538. ReqGadget : pGadget; { pointer to a list of Gadgets }
  539. ReqBorder : pBorder; { the box's border }
  540. ReqText : pIntuiText; { the box's text }
  541. Flags : Word; { see definitions below }
  542. { pen number for back-plane fill before draws }
  543. BackFill : Byte;
  544. { Layer in place of clip rect }
  545. ReqLayer : pLayer;
  546. ReqPad1 : Array [0..31] of Byte;
  547. { If the BitMap plane pointers are non-zero, this tells the system
  548. * that the image comes pre-drawn (if the appliprog wants to define
  549. * it's own box, in any shape or size it wants!); this is OK by
  550. * Intuition as long as there's a good correspondence between
  551. * the image and the specified Gadgets
  552. }
  553. ImageBMap : pBitMap; { points to the BitMap of PREDRAWN imagery }
  554. RWindow : Pointer; { added. points back to Window }
  555. ReqImage : Pointer;
  556. ReqPad2 : Array [0..31] of Shortint;
  557. end;
  558. Const
  559. { FLAGS SET BY THE APPLIPROG }
  560. POINTREL = $0001; { if POINTREL set, TopLeft is relative to pointer}
  561. PREDRAWN = $0002; { if ReqBMap points to predrawn Requester imagery }
  562. NOISYREQ = $0004; { if you don't want requester to filter input }
  563. SIMPLEREQ = $0010;
  564. { to use SIMPLEREFRESH layer (recommended) }
  565. { New for V36 }
  566. USEREQIMAGE = $0020;
  567. { render linked list ReqImage after BackFill
  568. * but before gadgets and text
  569. }
  570. NOREQBACKFILL = $0040;
  571. { don't bother filling requester with Requester.BackFill pen }
  572. { FLAGS SET BY INTUITION }
  573. REQOFFWINDOW = $1000; { part of one of the Gadgets was offwindow }
  574. REQACTIVE = $2000; { this requester is active }
  575. SYSREQUEST = $4000; { this requester caused by system }
  576. DEFERREFRESH = $8000; { this Requester stops a Refresh broadcast }
  577. { ======================================================================== }
  578. { === Image ============================================================== }
  579. { ======================================================================== }
  580. { This is a brief image structure for very simple transfers of
  581. * image data to a RastPort
  582. }
  583. Type
  584. pImage = ^tImage;
  585. tImage = record
  586. LeftEdge : smallint; { starting offset relative to some origin }
  587. TopEdge : smallint; { starting offsets relative to some origin }
  588. Width : smallint; { pixel size (though data is word-aligned) }
  589. Height,
  590. Depth : smallint; { pixel sizes }
  591. ImageData : Pointer; { pointer to the actual word-aligned bits }
  592. { the PlanePick and PlaneOnOff variables work much the same way as the
  593. * equivalent GELS Bob variables. It's a space-saving
  594. * mechanism for image data. Rather than defining the image data
  595. * for every plane of the RastPort, you need define data only
  596. * for the planes that are not entirely zero or one. As you
  597. * define your Imagery, you will often find that most of the planes
  598. * ARE just as color selectors. For instance, if you're designing
  599. * a two-color Gadget to use colors two and three, and the Gadget
  600. * will reside in a five-plane display, bit plane zero of your
  601. * imagery would be all ones, bit plane one would have data that
  602. * describes the imagery, and bit planes two through four would be
  603. * all zeroes. Using these flags allows you to avoid wasting all
  604. * that memory in this way: first, you specify which planes you
  605. * want your data to appear in using the PlanePick variable. For
  606. * each bit set in the variable, the next "plane" of your image
  607. * data is blitted to the display. For each bit clear in this
  608. * variable, the corresponding bit in PlaneOnOff is examined.
  609. * If that bit is clear, a "plane" of zeroes will be used.
  610. * If the bit is set, ones will go out instead. So, for our example:
  611. * Gadget.PlanePick = $02;
  612. * Gadget.PlaneOnOff = $01;
  613. * Note that this also allows for generic Gadgets, like the
  614. * System Gadgets, which will work in any number of bit planes.
  615. * Note also that if you want an Image that is only a filled
  616. * rectangle, you can get this by setting PlanePick to zero
  617. * (pick no planes of data) and set PlaneOnOff to describe the pen
  618. * color of the rectangle.
  619. }
  620. PlanePick,
  621. PlaneOnOff : Byte;
  622. { if the NextImage variable is not NULL, Intuition presumes that
  623. * it points to another Image structure with another Image to be
  624. * rendered
  625. }
  626. NextImage : pImage;
  627. end;
  628. { New for V39, Intuition supports the IESUBCLASS_NEWTABLET subclass
  629. * of the IECLASS_NEWPOINTERPOS event. The ie_EventAddress of such
  630. * an event points to a TabletData structure (see below).
  631. *
  632. * The TabletData structure contains certain elements including a taglist.
  633. * The taglist can be used for special tablet parameters. A tablet driver
  634. * should include only those tag-items the tablet supports. An application
  635. * can listen for any tag-items that interest it. Note: an application
  636. * must set the WA_TabletMessages attribute to TRUE to receive this
  637. * extended information in its IntuiMessages.
  638. *
  639. * The definitions given here MUST be followed. Pay careful attention
  640. * to normalization and the interpretation of signs.
  641. *
  642. * TABLETA_TabletZ: the current value of the tablet in the Z direction.
  643. * This unsigned value should typically be in the natural units of the
  644. * tablet. You should also provide TABLETA_RangeZ.
  645. *
  646. * TABLETA_RangeZ: the maximum value of the tablet in the Z direction.
  647. * Normally specified along with TABLETA_TabletZ, this allows the
  648. * application to scale the actual Z value across its range.
  649. *
  650. * TABLETA_AngleX: the angle of rotation or tilt about the X-axis. This
  651. * number should be normalized to fill a signed long Longint. Positive
  652. * values imply a clockwise rotation about the X-axis when viewing
  653. * from +X towards the origin.
  654. *
  655. * TABLETA_AngleY: the angle of rotation or tilt about the Y-axis. This
  656. * number should be normalized to fill a signed long Longint. Positive
  657. * values imply a clockwise rotation about the Y-axis when viewing
  658. * from +Y towards the origin.
  659. *
  660. * TABLETA_AngleZ: the angle of rotation or tilt about the Z axis. This
  661. * number should be normalized to fill a signed long Longint. Positive
  662. * values imply a clockwise rotation about the Z-axis when viewing
  663. * from +Z towards the origin.
  664. *
  665. * Note: a stylus that supports tilt should use the TABLETA_AngleX
  666. * and TABLETA_AngleY attributes. Tilting the stylus so the tip
  667. * points towards increasing or decreasing X is actually a rotation
  668. * around the Y-axis. Thus, if the stylus tip points towards
  669. * positive X, then that tilt is represented as a negative
  670. * TABLETA_AngleY. Likewise, if the stylus tip points towards
  671. * positive Y, that tilt is represented by positive TABLETA_AngleX.
  672. *
  673. * TABLETA_Pressure: the pressure reading of the stylus. The pressure
  674. * should be normalized to fill a signed long Longint. Typical devices
  675. * won't generate negative pressure, but the possibility is not precluded.
  676. * The pressure threshold which is considered to cause a button-click is
  677. * expected to be set in a Preferences program supplied by the tablet
  678. * vendor. The tablet driver would send IECODE_LBUTTON-type events as
  679. * the pressure crossed that threshold.
  680. *
  681. * TABLETA_ButtonBits: ti_Data is a long Longint whose bits are to
  682. * be interpreted at the state of the first 32 buttons of the tablet.
  683. *
  684. * TABLETA_InProximity: ti_Data is a boolean. For tablets that support
  685. * proximity, they should send the (TABLETA_InProximity,FALSE) tag item
  686. * when the stylus is out of proximity. One possible use we can forsee
  687. * is a mouse-blanking commodity which keys off this to blank the
  688. * mouse. When this tag is absent, the stylus is assumed to be
  689. * in proximity.
  690. *
  691. * TABLETA_ResolutionX: ti_Data is an unsigned long Longint which
  692. * is the x-axis resolution in dots per inch.
  693. *
  694. * TABLETA_ResolutionY: ti_Data is an unsigned long Longint which
  695. * is the y-axis resolution in dots per inch.
  696. }
  697. const
  698. TABLETA_Dummy = (TAG_USER + $3A000) ;
  699. TABLETA_TabletZ = (TABLETA_Dummy + $01);
  700. TABLETA_RangeZ = (TABLETA_Dummy + $02);
  701. TABLETA_AngleX = (TABLETA_Dummy + $03);
  702. TABLETA_AngleY = (TABLETA_Dummy + $04);
  703. TABLETA_AngleZ = (TABLETA_Dummy + $05);
  704. TABLETA_Pressure = (TABLETA_Dummy + $06);
  705. TABLETA_ButtonBits = (TABLETA_Dummy + $07);
  706. TABLETA_InProximity = (TABLETA_Dummy + $08);
  707. TABLETA_ResolutionX = (TABLETA_Dummy + $09);
  708. TABLETA_ResolutionY = (TABLETA_Dummy + $0A);
  709. { If your window sets WA_TabletMessages to TRUE, then it will receive
  710. * extended IntuiMessages (struct ExtIntuiMessage) whose eim_TabletData
  711. * field points at a TabletData structure. This structure contains
  712. * additional information about the input event.
  713. }
  714. Type
  715. pTabletData = ^tTabletData;
  716. tTabletData = record
  717. { Sub-pixel position of tablet, in screen coordinates,
  718. * scaled to fill a UWORD fraction:
  719. }
  720. td_XFraction, td_YFraction : WORD;
  721. { Current tablet coordinates along each axis: }
  722. td_TabletX, td_TabletY : ULONG;
  723. { Tablet range along each axis. For example, if td_TabletX
  724. * can take values 0-999, td_RangeX should be 1000.
  725. }
  726. td_RangeX, td_RangeY : ULONG;
  727. { Pointer to tag-list of additional tablet attributes.
  728. * See <intuition/intuition.h> for the tag values.
  729. }
  730. td_TagList : pTagItem;
  731. end;
  732. { If a tablet driver supplies a hook for ient_CallBack, it will be
  733. * invoked in the standard hook manner. A0 will point to the Hook
  734. * itself, A2 will point to the InputEvent that was sent, and
  735. * A1 will point to a TabletHookData structure. The InputEvent's
  736. * ie_EventAddress field points at the IENewTablet structure that
  737. * the driver supplied.
  738. *
  739. * Based on the thd_Screen, thd_Width, and thd_Height fields, the driver
  740. * should scale the ient_TabletX and ient_TabletY fields and store the
  741. * result in ient_ScaledX, ient_ScaledY, ient_ScaledXFraction, and
  742. * ient_ScaledYFraction.
  743. *
  744. * The tablet hook must currently return NULL. This is the only
  745. * acceptable return-value under V39.
  746. }
  747. pTabletHookData = ^tTabletHookData;
  748. tTabletHookData = record
  749. { Pointer to the active screen:
  750. * Note: if there are no open screens, thd_Screen will be NULL.
  751. * thd_Width and thd_Height will then describe an NTSC 64$400
  752. * screen. Please scale accordingly.
  753. }
  754. thd_Screen : Pointer;
  755. { The width and height (measured in pixels of the active screen)
  756. * that your are to scale to:
  757. }
  758. thd_Width,
  759. thd_Height : ULONG;
  760. { Non-zero if the screen or something about the screen
  761. * changed since the last time you were invoked:
  762. }
  763. thd_ScreenChanged : Longint;
  764. end;
  765. { ======================================================================== }
  766. { === IntuiMessage ======================================================= }
  767. { ======================================================================== }
  768. Type
  769. pIntuiMessage = ^tIntuiMessage;
  770. tIntuiMessage = record
  771. ExecMessage : tMessage;
  772. { the Class bits correspond directly with the IDCMP Flags, except for the
  773. * special bit LONELYMESSAGE (defined below)
  774. }
  775. IClass : ULONG;
  776. { the Code field is for special values like MENU number }
  777. Code : Word;
  778. { the Qualifier field is a copy of the current InputEvent's Qualifier }
  779. Qualifier : Word;
  780. { IAddress contains particular addresses for Intuition functions, like
  781. * the pointer to the Gadget or the Screen
  782. }
  783. IAddress : Pointer;
  784. { when getting mouse movement reports, any event you get will have the
  785. * the mouse coordinates in these variables. the coordinates are relative
  786. * to the upper-left corner of your Window (GIMMEZEROZERO notwithstanding)
  787. }
  788. MouseX,
  789. MouseY : smallint;
  790. { the time values are copies of the current system clock time. Micros
  791. * are in units of microseconds, Seconds in seconds.
  792. }
  793. Seconds,
  794. Micros : ULONG;
  795. { the IDCMPWindow variable will always have the Pointer of the Window of
  796. * this IDCMP
  797. }
  798. IDCMPWindow : Pointer;
  799. { system-use variable }
  800. SpecialLink : pIntuiMessage;
  801. end;
  802. { New for V39:
  803. * All IntuiMessages are now slightly extended. The ExtIntuiMessage
  804. * structure has an additional field for tablet data, which is usually
  805. * NULL. If a tablet driver which is sending IESUBCLASS_NEWTABLET
  806. * events is installed in the system, windows with the WA_TabletMessages
  807. * property set will find that eim_TabletData points to the TabletData
  808. * structure. Applications must first check that this field is non-NULL;
  809. * it will be NULL for certain kinds of message, including mouse activity
  810. * generated from other than the tablet (i.e. the keyboard equivalents
  811. * or the mouse itself).
  812. *
  813. * NEVER EVER examine any extended fields when running under pre-V39!
  814. *
  815. * NOTE: This structure is subject to grow in the future. Making
  816. * assumptions about its size is A BAD IDEA.
  817. }
  818. pExtIntuiMessage = ^tExtIntuiMessage;
  819. tExtIntuiMessage = record
  820. eim_IntuiMessage : tIntuiMessage;
  821. eim_TabletData : pTabletData;
  822. end;
  823. CONST
  824. { --- IDCMP Classes ------------------------------------------------------ }
  825. { Please refer to the Autodoc for OpenWindow() and to the Rom Kernel
  826. * Manual for full details on the IDCMP classes.
  827. }
  828. IDCMP_SIZEVERIFY = $00000001;
  829. IDCMP_NEWSIZE = $00000002;
  830. IDCMP_REFRESHWINDOW = $00000004;
  831. IDCMP_MOUSEBUTTONS = $00000008;
  832. IDCMP_MOUSEMOVE = $00000010;
  833. IDCMP_GADGETDOWN = $00000020;
  834. IDCMP_GADGETUP = $00000040;
  835. IDCMP_REQSET = $00000080;
  836. IDCMP_MENUPICK = $00000100;
  837. IDCMP_CLOSEWINDOW = $00000200;
  838. IDCMP_RAWKEY = $00000400;
  839. IDCMP_REQVERIFY = $00000800;
  840. IDCMP_REQCLEAR = $00001000;
  841. IDCMP_MENUVERIFY = $00002000;
  842. IDCMP_NEWPREFS = $00004000;
  843. IDCMP_DISKINSERTED = $00008000;
  844. IDCMP_DISKREMOVED = $00010000;
  845. IDCMP_WBENCHMESSAGE = $00020000; { System use only }
  846. IDCMP_ACTIVEWINDOW = $00040000;
  847. IDCMP_INACTIVEWINDOW = $00080000;
  848. IDCMP_DELTAMOVE = $00100000;
  849. IDCMP_VANILLAKEY = $00200000;
  850. IDCMP_INTUITICKS = $00400000;
  851. { for notifications from "boopsi" gadgets }
  852. IDCMP_IDCMPUPDATE = $00800000; { new for V36 }
  853. { for getting help key report during menu session }
  854. IDCMP_MENUHELP = $01000000; { new for V36 }
  855. { for notification of any move/size/zoom/change window }
  856. IDCMP_CHANGEWINDOW = $02000000; { new for V36 }
  857. IDCMP_GADGETHELP = $04000000; { new for V39 }
  858. { NOTEZ-BIEN: $80000000 is reserved for internal use }
  859. { the IDCMP Flags do not use this special bit, which is cleared when
  860. * Intuition sends its special message to the Task, and set when Intuition
  861. * gets its Message back from the Task. Therefore, I can check here to
  862. * find out fast whether or not this Message is available for me to send
  863. }
  864. IDCMP_LONELYMESSAGE = $80000000;
  865. { --- IDCMP Codes -------------------------------------------------------- }
  866. { This group of codes is for the IDCMP_CHANGEWINDOW message }
  867. CWCODE_MOVESIZE = $0000; { Window was moved and/or sized }
  868. CWCODE_DEPTH = $0001; { Window was depth-arranged (new for V39) }
  869. { This group of codes is for the IDCMP_MENUVERIFY function }
  870. MENUHOT = $0001; { IntuiWants verification OR MENUCANCEL }
  871. MENUCANCEL = $0002; { HOT Reply of this cancels Menu operation }
  872. MENUWAITING = $0003; { Intuition simply wants a ReplyMsg() ASAP }
  873. { These are internal tokens to represent state of verification attempts
  874. * shown here as a clue.
  875. }
  876. OKOK = MENUHOT; { guy didn't care }
  877. OKABORT = $0004; { window rendered question moot }
  878. OKCANCEL = MENUCANCEL; { window sent cancel reply }
  879. { This group of codes is for the IDCMP_WBENCHMESSAGE messages }
  880. WBENCHOPEN = $0001;
  881. WBENCHCLOSE = $0002;
  882. { A data structure common in V36 Intuition processing }
  883. Type
  884. pIBox = ^tIBox;
  885. tIBox = record
  886. Left,
  887. Top,
  888. Width,
  889. Height : smallint;
  890. END;
  891. { ======================================================================== }
  892. { === Window ============================================================= }
  893. { ======================================================================== }
  894. Type
  895. pWindow = ^tWindow;
  896. tWindow = record
  897. NextWindow : pWindow; { for the linked list in a screen }
  898. LeftEdge,
  899. TopEdge : smallint; { screen dimensions of window }
  900. Width,
  901. Height : smallint; { screen dimensions of window }
  902. MouseY,
  903. MouseX : smallint; { relative to upper-left of window }
  904. MinWidth,
  905. MinHeight : smallint; { minimum sizes }
  906. MaxWidth,
  907. MaxHeight : smallint; { maximum sizes }
  908. Flags : ULONG; { see below for defines }
  909. MenuStrip : pMenu; { the strip of Menu headers }
  910. Title : STRPTR; { the title text for this window }
  911. FirstRequest : pRequester; { all active Requesters }
  912. DMRequest : pRequester; { double-click Requester }
  913. ReqCount : smallint; { count of reqs blocking Window }
  914. WScreen : Pointer; { this Window's Screen }
  915. RPort : pRastPort; { this Window's very own RastPort }
  916. { the border variables describe the window border. If you specify
  917. * GIMMEZEROZERO when you open the window, then the upper-left of the
  918. * ClipRect for this window will be upper-left of the BitMap (with correct
  919. * offsets when in SuperBitMap mode; you MUST select GIMMEZEROZERO when
  920. * using SuperBitMap). If you don't specify ZeroZero, then you save
  921. * memory (no allocation of RastPort, Layer, ClipRect and associated
  922. * Bitmaps), but you also must offset all your writes by BorderTop,
  923. * BorderLeft and do your own mini-clipping to prevent writing over the
  924. * system gadgets
  925. }
  926. BorderLeft,
  927. BorderTop,
  928. BorderRight,
  929. BorderBottom : Shortint;
  930. BorderRPort : pRastPort;
  931. { You supply a linked-list of Gadgets for your Window.
  932. * This list DOES NOT include system gadgets. You get the standard
  933. * window system gadgets by setting flag-bits in the variable Flags (see
  934. * the bit definitions below)
  935. }
  936. FirstGadget : pGadget;
  937. { these are for opening/closing the windows }
  938. Parent,
  939. Descendant : pWindow;
  940. { sprite data information for your own Pointer
  941. * set these AFTER you Open the Window by calling SetPointer()
  942. }
  943. _Pointer : Pointer; { sprite data }
  944. PtrHeight : Shortint; { sprite height (not including sprite padding) }
  945. PtrWidth : Shortint; { sprite width (must be less than or equal to 16) }
  946. XOffset,
  947. YOffset : Shortint; { sprite offsets }
  948. { the IDCMP Flags and User's and Intuition's Message Ports }
  949. IDCMPFlags : ULONG; { User-selected flags }
  950. UserPort,
  951. WindowPort : pMsgPort;
  952. MessageKey : pIntuiMessage;
  953. DetailPen,
  954. BlockPen : Byte; { for bar/border/gadget rendering }
  955. { the CheckMark is a pointer to the imagery that will be used when
  956. * rendering MenuItems of this Window that want to be checkmarked
  957. * if this is equal to NULL, you'll get the default imagery
  958. }
  959. CheckMark : pImage;
  960. ScreenTitle : STRPTR; { if non-null, Screen title when Window is active }
  961. { These variables have the mouse coordinates relative to the
  962. * inner-Window of GIMMEZEROZERO Windows. This is compared with the
  963. * MouseX and MouseY variables, which contain the mouse coordinates
  964. * relative to the upper-left corner of the Window, GIMMEZEROZERO
  965. * notwithstanding
  966. }
  967. GZZMouseX : smallint;
  968. GZZMouseY : smallint;
  969. { these variables contain the width and height of the inner-Window of
  970. * GIMMEZEROZERO Windows
  971. }
  972. GZZWidth : smallint;
  973. GZZHeight : smallint;
  974. ExtData : Pointer;
  975. UserData : Pointer; { general-purpose pointer to User data extension }
  976. {* jimm: NEW: 11/18/85: this pointer keeps a duplicate of what
  977. * Window.RPort->Layer is _supposed_ to be pointing at
  978. }
  979. WLayer : pLayer;
  980. { jimm: NEW 1.2: need to keep track of the font that
  981. * OpenWindow opened, in case user SetFont's into RastPort
  982. }
  983. IFont : pTextFont;
  984. {* (V36) another flag word (the Flags field is used up).
  985. * At present, all flag values are system private.
  986. * Until further notice, you may not change nor use this field.
  987. *}
  988. MoreFlags : ULONG;
  989. {**** Data beyond this point are Intuition Private. DO NOT USE ****}
  990. end;
  991. CONST
  992. { --- Flags requested at OpenWindow() time by the application --------- }
  993. WFLG_SIZEGADGET = $00000001; { include sizing system-gadget? }
  994. WFLG_DRAGBAR = $00000002; { include dragging system-gadget? }
  995. WFLG_DEPTHGADGET = $00000004; { include depth arrangement gadget? }
  996. WFLG_CLOSEGADGET = $00000008; { include close-box system-gadget? }
  997. WFLG_SIZEBRIGHT = $00000010; { size gadget uses right border }
  998. WFLG_SIZEBBOTTOM = $00000020; { size gadget uses bottom border }
  999. { --- refresh modes ------------------------------------------------------ }
  1000. { combinations of the WFLG_REFRESHBITS select the refresh type }
  1001. WFLG_REFRESHBITS = $000000C0;
  1002. WFLG_SMART_REFRESH = $00000000;
  1003. WFLG_SIMPLE_REFRESH= $00000040;
  1004. WFLG_SUPER_BITMAP = $00000080;
  1005. WFLG_OTHER_REFRESH = $000000C0;
  1006. WFLG_BACKDROP = $00000100; { this is a backdrop window }
  1007. WFLG_REPORTMOUSE = $00000200; { to hear about every mouse move }
  1008. WFLG_GIMMEZEROZERO = $00000400; { a GimmeZeroZero window }
  1009. WFLG_BORDERLESS = $00000800; { to get a Window sans border }
  1010. WFLG_ACTIVATE = $00001000; { when Window opens, it's Active }
  1011. { --- Other User Flags --------------------------------------------------- }
  1012. WFLG_RMBTRAP = $00010000; { Catch RMB events for your own }
  1013. WFLG_NOCAREREFRESH = $00020000; { not to be bothered with REFRESH }
  1014. { - V36 new Flags which the programmer may specify in NewWindow.Flags }
  1015. WFLG_NW_EXTENDED = $00040000; { extension data provided }
  1016. { see struct ExtNewWindow }
  1017. { - V39 new Flags which the programmer may specify in NewWindow.Flags }
  1018. WFLG_NEWLOOKMENUS = $00200000; { window has NewLook menus }
  1019. { These flags are set only by Intuition. YOU MAY NOT SET THEM YOURSELF! }
  1020. WFLG_WINDOWACTIVE = $00002000; { this window is the active one }
  1021. WFLG_INREQUEST = $00004000; { this window is in request mode }
  1022. WFLG_MENUSTATE = $00008000; { Window is active with Menus on }
  1023. WFLG_WINDOWREFRESH = $01000000; { Window is currently refreshing }
  1024. WFLG_WBENCHWINDOW = $02000000; { WorkBench tool ONLY Window }
  1025. WFLG_WINDOWTICKED = $04000000; { only one timer tick at a time }
  1026. { --- V36 Flags to be set only by Intuition ------------------------- }
  1027. WFLG_VISITOR = $08000000; { visitor window }
  1028. WFLG_ZOOMED = $10000000; { identifies "zoom state" }
  1029. WFLG_HASZOOM = $20000000; { windowhas a zoom gadget }
  1030. { --- Other Window Values ---------------------------------------------- }
  1031. DEFAULTMOUSEQUEUE = (5); { no more mouse messages }
  1032. { --- see struct IntuiMessage for the IDCMP Flag definitions ------------- }
  1033. { ======================================================================== }
  1034. { === NewWindow ========================================================== }
  1035. { ======================================================================== }
  1036. Type
  1037. pNewWindow = ^tNewWindow;
  1038. tNewWindow = record
  1039. LeftEdge,
  1040. TopEdge : smallint; { screen dimensions of window }
  1041. Width,
  1042. Height : smallint; { screen dimensions of window }
  1043. DetailPen,
  1044. BlockPen : Byte; { for bar/border/gadget rendering }
  1045. IDCMPFlags : ULONG; { User-selected IDCMP flags }
  1046. Flags : ULONG; { see Window struct for defines }
  1047. { You supply a linked-list of Gadgets for your Window.
  1048. * This list DOES NOT include system Gadgets. You get the standard
  1049. * system Window Gadgets by setting flag-bits in the variable Flags (see
  1050. * the bit definitions under the Window structure definition)
  1051. }
  1052. FirstGadget : pGadget;
  1053. { the CheckMark is a pointer to the imagery that will be used when
  1054. * rendering MenuItems of this Window that want to be checkmarked
  1055. * if this is equal to NULL, you'll get the default imagery
  1056. }
  1057. CheckMark : pImage;
  1058. Title : STRPTR; { the title text for this window }
  1059. { the Screen pointer is used only if you've defined a CUSTOMSCREEN and
  1060. * want this Window to open in it. If so, you pass the Pointer of the
  1061. * Custom Screen structure in this variable. Otherwise, this variable
  1062. * is ignored and doesn't have to be initialized.
  1063. }
  1064. Screen : Pointer;
  1065. { SUPER_BITMAP Window? If so, put the Pointer of your BitMap structure
  1066. * in this variable. If not, this variable is ignored and doesn't have
  1067. * to be initialized
  1068. }
  1069. BitMap : pBitMap;
  1070. { the values describe the minimum and maximum sizes of your Windows.
  1071. * these matter only if you've chosen the WINDOWSIZING Gadget option,
  1072. * which means that you want to let the User to change the size of
  1073. * this Window. You describe the minimum and maximum sizes that the
  1074. * Window can grow by setting these variables. You can initialize
  1075. * any one these to zero, which will mean that you want to duplicate
  1076. * the setting for that dimension (if MinWidth == 0, MinWidth will be
  1077. * set to the opening Width of the Window).
  1078. * You can change these settings later using SetWindowLimits().
  1079. * If you haven't asked for a SIZING Gadget, you don't have to
  1080. * initialize any of these variables.
  1081. }
  1082. MinWidth,
  1083. MinHeight : smallint; { minimums }
  1084. MaxWidth,
  1085. MaxHeight : smallint; { maximums }
  1086. { the type variable describes the Screen in which you want this Window to
  1087. * open. The type value can either be CUSTOMSCREEN or one of the
  1088. * system standard Screen Types such as WBENCHSCREEN. See the
  1089. * type definitions under the Screen structure
  1090. }
  1091. WType : Word; { is "Type" in C includes }
  1092. end;
  1093. { The following structure is the future NewWindow. Compatibility
  1094. * issues require that the size of NewWindow not change.
  1095. * Data in the common part (NewWindow) indicates the the extension
  1096. * fields are being used.
  1097. * NOTE WELL: This structure may be subject to future extension.
  1098. * Writing code depending on its size is not allowed.
  1099. }
  1100. pExtNewWindow = ^tExtNewWindow;
  1101. tExtNewWindow = record
  1102. LeftEdge, TopEdge : smallint;
  1103. Width, Height : smallint;
  1104. DetailPen, BlockPen : Byte;
  1105. IDCMPFlags : ULONG;
  1106. Flags : ULONG;
  1107. FirstGadget : pGadget;
  1108. CheckMark : pImage;
  1109. Title : STRPTR;
  1110. WScreen : Pointer;
  1111. WBitMap : pBitMap;
  1112. MinWidth, MinHeight : smallint;
  1113. MaxWidth, MaxHeight : Word;
  1114. { the type variable describes the Screen in which you want this Window to
  1115. * open. The type value can either be CUSTOMSCREEN or one of the
  1116. * system standard Screen Types such as WBENCHSCREEN. See the
  1117. * type definitions under the Screen structure.
  1118. * A new possible value for this field is PUBLICSCREEN, which
  1119. * defines the window as a 'visitor' window. See below for
  1120. * additional information provided.
  1121. }
  1122. WType : Word;
  1123. { ------------------------------------------------------- *
  1124. * extensions for V36
  1125. * if the NewWindow Flag value WFLG_NW_EXTENDED is set, then
  1126. * this field is assumed to point to an array ( or chain of arrays)
  1127. * of TagItem structures. See also ExtNewScreen for another
  1128. * use of TagItems to pass optional data.
  1129. *
  1130. * see below for tag values and the corresponding data.
  1131. }
  1132. Extension : pTagItem;
  1133. END;
  1134. {
  1135. * The TagItem ID's (ti_Tag values) for OpenWindowTagList() follow.
  1136. * They are values in a TagItem array passed as extension/replacement
  1137. * values for the data in NewWindow. OpenWindowTagList() can actually
  1138. * work well with a NULL NewWindow pointer.
  1139. }
  1140. CONST
  1141. WA_Dummy = (TAG_USER + 99); { $80000063 }
  1142. { these tags simply override NewWindow parameters }
  1143. WA_Left = (WA_Dummy + $01);
  1144. WA_Top = (WA_Dummy + $02);
  1145. WA_Width = (WA_Dummy + $03);
  1146. WA_Height = (WA_Dummy + $04);
  1147. WA_DetailPen = (WA_Dummy + $05);
  1148. WA_BlockPen = (WA_Dummy + $06);
  1149. WA_IDCMP = (WA_Dummy + $07);
  1150. { "bulk" initialization of NewWindow.Flags }
  1151. WA_Flags = (WA_Dummy + $08);
  1152. WA_Gadgets = (WA_Dummy + $09);
  1153. WA_Checkmark = (WA_Dummy + $0A);
  1154. WA_Title = (WA_Dummy + $0B);
  1155. { means you don't have to call SetWindowTitles
  1156. * after you open your window
  1157. }
  1158. WA_ScreenTitle = (WA_Dummy + $0C);
  1159. WA_CustomScreen = (WA_Dummy + $0D);
  1160. WA_SuperBitMap = (WA_Dummy + $0E);
  1161. { also implies WFLG_SUPER_BITMAP property }
  1162. WA_MinWidth = (WA_Dummy + $0F);
  1163. WA_MinHeight = (WA_Dummy + $10);
  1164. WA_MaxWidth = (WA_Dummy + $11);
  1165. WA_MaxHeight = (WA_Dummy + $12);
  1166. { The following are specifications for new features }
  1167. WA_InnerWidth = (WA_Dummy + $13);
  1168. WA_InnerHeight = (WA_Dummy + $14);
  1169. { You can specify the dimensions of the interior
  1170. * region of your window, independent of what
  1171. * the border widths will be. You probably want
  1172. * to also specify WA_AutoAdjust to allow
  1173. * Intuition to move your window or even
  1174. * shrink it so that it is completely on screen.
  1175. }
  1176. WA_PubScreenName = (WA_Dummy + $15);
  1177. { declares that you want the window to open as
  1178. * a visitor on the public screen whose name is
  1179. * pointed to by (UBYTE *) ti_Data
  1180. }
  1181. WA_PubScreen = (WA_Dummy + $16);
  1182. { open as a visitor window on the public screen
  1183. * whose Pointer is in (struct Screen *) ti_Data.
  1184. * To ensure that this screen remains open, you
  1185. * should either be the screen's owner, have a
  1186. * window open on the screen, or use LockPubScreen().
  1187. }
  1188. WA_PubScreenFallBack = (WA_Dummy + $17);
  1189. { A Boolean, specifies whether a visitor window
  1190. * should "fall back" to the default public screen
  1191. * (or Workbench) if the named public screen isn't
  1192. * available
  1193. }
  1194. WA_WindowName = (WA_Dummy + $18);
  1195. { not implemented }
  1196. WA_Colors = (WA_Dummy + $19);
  1197. { a ColorSpec array for colors to be set
  1198. * when this window is active. This is not
  1199. * implemented, and may not be, since the default
  1200. * values to restore would be hard to track.
  1201. * We'd like to at least support per-window colors
  1202. * for the mouse pointer sprite.
  1203. }
  1204. WA_Zoom = (WA_Dummy + $1A);
  1205. { ti_Data points to an array of four WORD's,
  1206. * the initial Left/Top/Width/Height values of
  1207. * the "alternate" zoom position/dimensions.
  1208. * It also specifies that you want a Zoom gadget
  1209. * for your window, whether or not you have a
  1210. * sizing gadget.
  1211. }
  1212. WA_MouseQueue = (WA_Dummy + $1B);
  1213. { ti_Data contains initial value for the mouse
  1214. * message backlog limit for this window.
  1215. }
  1216. WA_BackFill = (WA_Dummy + $1C);
  1217. { unimplemented at present: provides a "backfill
  1218. * hook" for your window's layer.
  1219. }
  1220. WA_RptQueue = (WA_Dummy + $1D);
  1221. { initial value of repeat key backlog limit }
  1222. { These Boolean tag items are alternatives to the NewWindow.Flags
  1223. * boolean flags with similar names.
  1224. }
  1225. WA_SizeGadget = (WA_Dummy + $1E);
  1226. WA_DragBar = (WA_Dummy + $1F);
  1227. WA_DepthGadget = (WA_Dummy + $20);
  1228. WA_CloseGadget = (WA_Dummy + $21);
  1229. WA_Backdrop = (WA_Dummy + $22);
  1230. WA_ReportMouse = (WA_Dummy + $23);
  1231. WA_NoCareRefresh = (WA_Dummy + $24);
  1232. WA_Borderless = (WA_Dummy + $25);
  1233. WA_Activate = (WA_Dummy + $26);
  1234. WA_RMBTrap = (WA_Dummy + $27);
  1235. WA_WBenchWindow = (WA_Dummy + $28); { PRIVATE!! }
  1236. WA_SimpleRefresh = (WA_Dummy + $29);
  1237. { only specify if TRUE }
  1238. WA_SmartRefresh = (WA_Dummy + $2A);
  1239. { only specify if TRUE }
  1240. WA_SizeBRight = (WA_Dummy + $2B);
  1241. WA_SizeBBottom = (WA_Dummy + $2C);
  1242. { New Boolean properties }
  1243. WA_AutoAdjust = (WA_Dummy + $2D);
  1244. { shift or squeeze the window's position and
  1245. * dimensions to fit it on screen.
  1246. }
  1247. WA_GimmeZeroZero = (WA_Dummy + $2E);
  1248. { equiv. to NewWindow.Flags WFLG_GIMMEZEROZERO }
  1249. { New for V37: WA_MenuHelp (ignored by V36) }
  1250. WA_MenuHelp = (WA_Dummy + $2F);
  1251. { Enables IDCMP_MENUHELP: Pressing HELP during menus
  1252. * will return IDCMP_MENUHELP message.
  1253. }
  1254. { New for V39: (ignored by V37 and earlier) }
  1255. WA_NewLookMenus = (WA_Dummy + $30);
  1256. { Set to TRUE if you want NewLook menus }
  1257. WA_AmigaKey = (WA_Dummy + $31);
  1258. { Pointer to image for Amiga-key equiv in menus }
  1259. WA_NotifyDepth = (WA_Dummy + $32);
  1260. { Requests IDCMP_CHANGEWINDOW message when
  1261. * window is depth arranged
  1262. * (imsg->Code = CWCODE_DEPTH)
  1263. }
  1264. { WA_Dummy + $33 is obsolete }
  1265. WA_Pointer = (WA_Dummy + $34);
  1266. { Allows you to specify a custom pointer
  1267. * for your window. ti_Data points to a
  1268. * pointer object you obtained via
  1269. * "pointerclass". NULL signifies the
  1270. * default pointer.
  1271. * This tag may be passed to OpenWindowTags()
  1272. * or SetWindowPointer().
  1273. }
  1274. WA_BusyPointer = (WA_Dummy + $35);
  1275. { ti_Data is boolean. Set to TRUE to
  1276. * request the standard busy pointer.
  1277. * This tag may be passed to OpenWindowTags()
  1278. * or SetWindowPointer().
  1279. }
  1280. WA_PointerDelay = (WA_Dummy + $36);
  1281. { ti_Data is boolean. Set to TRUE to
  1282. * request that the changing of the
  1283. * pointer be slightly delayed. The change
  1284. * will be called off if you call NewSetPointer()
  1285. * before the delay expires. This allows
  1286. * you to post a busy-pointer even if you think
  1287. * the busy-time may be very Word, without
  1288. * fear of a flashing pointer.
  1289. * This tag may be passed to OpenWindowTags()
  1290. * or SetWindowPointer().
  1291. }
  1292. WA_TabletMessages = (WA_Dummy + $37);
  1293. { ti_Data is a boolean. Set to TRUE to
  1294. * request that tablet information be included
  1295. * in IntuiMessages sent to your window.
  1296. * Requires that something (i.e. a tablet driver)
  1297. * feed IESUBCLASS_NEWTABLET InputEvents into
  1298. * the system. For a pointer to the TabletData,
  1299. * examine the ExtIntuiMessage->eim_TabletData
  1300. * field. It is UNSAFE to check this field
  1301. * when running on pre-V39 systems. It's always
  1302. * safe to check this field under V39 and up,
  1303. * though it may be NULL.
  1304. }
  1305. WA_HelpGroup = (WA_Dummy + $38);
  1306. { When the active window has gadget help enabled,
  1307. * other windows of the same HelpGroup number
  1308. * will also get GadgetHelp. This allows GadgetHelp
  1309. * to work for multi-windowed applications.
  1310. * Use GetGroupID() to get an ID number. Pass
  1311. * this number as ti_Data to all your windows.
  1312. * See also the HelpControl() function.
  1313. }
  1314. WA_HelpGroupWindow = (WA_Dummy + $39);
  1315. { When the active window has gadget help enabled,
  1316. * other windows of the same HelpGroup will also get
  1317. * GadgetHelp. This allows GadgetHelp to work
  1318. * for multi-windowed applications. As an alternative
  1319. * to WA_HelpGroup, you can pass a pointer to any
  1320. * other window of the same group to join its help
  1321. * group. Defaults to NULL, which has no effect.
  1322. * See also the HelpControl() function.
  1323. }
  1324. { HelpControl() flags:
  1325. *
  1326. * HC_GADGETHELP - Set this flag to enable Gadget-Help for one or more
  1327. * windows.
  1328. }
  1329. HC_GADGETHELP = 1;
  1330. { ======================================================================== }
  1331. { === Remember =========================================================== }
  1332. { ======================================================================== }
  1333. { this structure is used for remembering what memory has been allocated to
  1334. * date by a given routine, so that a premature abort or systematic exit
  1335. * can deallocate memory cleanly, easily, and completely
  1336. }
  1337. Type
  1338. pRemember = ^tRemember;
  1339. tRemember = record
  1340. NextRemember : pRemember;
  1341. RememberSize : ULONG;
  1342. Memory : Pointer;
  1343. end;
  1344. { === Color Spec ====================================================== }
  1345. { How to tell Intuition about RGB values for a color table entry. }
  1346. pColorSpec = ^tColorSpec;
  1347. tColorSpec = record
  1348. ColorIndex : smallint; { -1 terminates an array of ColorSpec }
  1349. Red : Word; { only the _bottom_ 4 bits recognized }
  1350. Green : Word; { only the _bottom_ 4 bits recognized }
  1351. Blue : Word; { only the _bottom_ 4 bits recognized }
  1352. END;
  1353. { === Easy Requester Specification ======================================= }
  1354. { see also autodocs for EasyRequest and BuildEasyRequest }
  1355. { NOTE: This structure may grow in size in the future }
  1356. pEasyStruct = ^tEasyStruct;
  1357. tEasyStruct = record
  1358. es_StructSize : ULONG; { should be sizeof (struct EasyStruct )}
  1359. es_Flags : ULONG; { should be 0 for now }
  1360. es_Title : STRPTR; { title of requester window }
  1361. es_TextFormat : STRPTR; { 'printf' style formatting string }
  1362. es_GadgetFormat : STRPTR; { 'printf' style formatting string }
  1363. END;
  1364. { ======================================================================== }
  1365. { === Miscellaneous ====================================================== }
  1366. { ======================================================================== }
  1367. CONST
  1368. { = MENU STUFF =========================================================== }
  1369. NOMENU = $001F;
  1370. NOITEM = $003F;
  1371. NOSUB = $001F;
  1372. MENUNULL = -1;
  1373. { = =RJ='s peculiarities ================================================= }
  1374. { these defines are for the COMMSEQ and CHECKIT menu stuff. If CHECKIT,
  1375. * I'll use a generic Width (for all resolutions) for the CheckMark.
  1376. * If COMMSEQ, likewise I'll use this generic stuff
  1377. }
  1378. CHECKWIDTH = 19;
  1379. COMMWIDTH = 27;
  1380. LOWCHECKWIDTH = 13;
  1381. LOWCOMMWIDTH = 16;
  1382. { these are the AlertNumber defines. if you are calling DisplayAlert()
  1383. * the AlertNumber you supply must have the ALERT_TYPE bits set to one
  1384. * of these patterns
  1385. }
  1386. ALERT_TYPE = $80000000;
  1387. RECOVERY_ALERT = $00000000; { the system can recover from this }
  1388. DEADEND_ALERT = $80000000; { no recovery possible, this is it }
  1389. { When you're defining IntuiText for the Positive and Negative Gadgets
  1390. * created by a call to AutoRequest(), these defines will get you
  1391. * reasonable-looking text. The only field without a define is the IText
  1392. * field; you decide what text goes with the Gadget
  1393. }
  1394. AUTOFRONTPEN = 0;
  1395. AUTOBACKPEN = 1;
  1396. AUTODRAWMODE = JAM2;
  1397. AUTOLEFTEDGE = 6;
  1398. AUTOTOPEDGE = 3;
  1399. { -
  1400. AUTOITEXTFONT = Nil;
  1401. AUTONEXTTEXT = Nil;
  1402. - }
  1403. { --- RAWMOUSE Codes and Qualifiers (Console OR IDCMP) ------------------- }
  1404. SELECTUP = IECODE_LBUTTON + IECODE_UP_PREFIX;
  1405. SELECTDOWN = IECODE_LBUTTON;
  1406. MENUUP = IECODE_RBUTTON + IECODE_UP_PREFIX;
  1407. MENUDOWN = IECODE_RBUTTON;
  1408. ALTLEFT = IEQUALIFIER_LALT;
  1409. ALTRIGHT = IEQUALIFIER_RALT;
  1410. AMIGALEFT = IEQUALIFIER_LCOMMAND;
  1411. AMIGARIGHT = IEQUALIFIER_RCOMMAND;
  1412. AMIGAKEYS = AMIGALEFT + AMIGARIGHT;
  1413. CURSORUP = $4C;
  1414. CURSORLEFT = $4F;
  1415. CURSORRIGHT = $4E;
  1416. CURSORDOWN = $4D;
  1417. KEYCODE_Q = $10;
  1418. KEYCODE_X = $32;
  1419. KEYCODE_N = $36;
  1420. KEYCODE_M = $37;
  1421. KEYCODE_V = $34;
  1422. KEYCODE_B = $35;
  1423. KEYCODE_LESS = $38;
  1424. KEYCODE_GREATER = $39;
  1425. { these are the display modes for which we have corresponding parameter
  1426. * settings in the config arrays
  1427. }
  1428. CONST
  1429. DMODECOUNT = $0002; { how many modes there are }
  1430. HIRESPICK = $0000;
  1431. LOWRESPICK = $0001;
  1432. EVENTMAX = 10; { size of event array }
  1433. { these are the system Gadget defines }
  1434. RESCOUNT = 2;
  1435. HIRESGADGET = 0;
  1436. LOWRESGADGET = 1;
  1437. GADGETCOUNT = 8;
  1438. UPFRONTGADGET = 0;
  1439. DOWNBACKGADGET = 1;
  1440. SIZEGADGET = 2;
  1441. CLOSEGADGET = 3;
  1442. DRAGGADGET = 4;
  1443. SUPFRONTGADGET = 5;
  1444. SDOWNBACKGADGET= 6;
  1445. SDRAGGADGET = 7;
  1446. { ======================================================================== }
  1447. { === DrawInfo ========================================================= }
  1448. { ======================================================================== }
  1449. { This is a packet of information for graphics rendering. It originates
  1450. * with a Screen, and is gotten using GetScreenDrawInfo( screen );
  1451. }
  1452. { If you find dri_Version >= DRI_VERSION, you know this structure
  1453. * has at least the fields defined in this version of the include file
  1454. }
  1455. CONST
  1456. RI_VERSION = (1); { obsolete, will be removed }
  1457. DRI_VERSION = (1);
  1458. Type
  1459. pDrawInfo = ^tDrawInfo;
  1460. tDrawInfo = record
  1461. dri_Version : Word; { will be DRI_VERSION }
  1462. dri_NumPens : Word; { guaranteed to be >= numDrIPens }
  1463. dri_Pens : Pointer; { pointer to pen array }
  1464. dri_Font : pTextFont; { screen default font }
  1465. dri_Depth : Word; { (initial) depth of screen bitmap }
  1466. dri_Resolution : record { from DisplayInfo database for initial display mode }
  1467. x : word;
  1468. y : word;
  1469. end;
  1470. dri_Flags : ULONG; { defined below }
  1471. { New for V39: dri_CheckMark, dri_AmigaKey. }
  1472. dri_CheckMark : pImage; { ImagePtr } { pointer to scaled checkmark image
  1473. * Will be NULL if DRI_VERSION < 2
  1474. }
  1475. dri_AmigaKey : pImage; { ImagePtr } { pointer to scaled Amiga-key image
  1476. * Will be NULL if DRI_VERSION < 2
  1477. }
  1478. dri_Reserved : Array[0..4] of ULONG; { avoid recompilation ;^) }
  1479. END;
  1480. CONST
  1481. DRIF_NEWLOOK = $00000001; { specified SA_Pens, full treatment }
  1482. { rendering pen number indexes into DrawInfo.dri_Pens[] }
  1483. DETAILPEN = ($0000); { compatible Intuition rendering pens }
  1484. BLOCKPEN = ($0001); { compatible Intuition rendering pens }
  1485. TEXTPEN = ($0002); { text on background }
  1486. SHINEPEN = ($0003); { bright edge on 3D objects }
  1487. SHADOWPEN = ($0004); { dark edge on 3D objects }
  1488. FILLPEN = ($0005); { active-window/selected-gadget fill }
  1489. FILLTEXTPEN = ($0006); { text over FILLPEN }
  1490. BACKGROUNDPEN = ($0007); { always color 0 }
  1491. HIGHLIGHTTEXTPEN = ($0008); { special color text, on background }
  1492. { New for V39, only present if DRI_VERSION >= 2: }
  1493. BARDETAILPEN = ($0009); { text/detail in screen-bar/menus }
  1494. BARBLOCKPEN = ($000A); { screen-bar/menus fill }
  1495. BARTRIMPEN = ($000B); { trim under screen-bar }
  1496. NUMDRIPENS = ($0009);
  1497. { New for V39: It is sometimes useful to specify that a pen value
  1498. * is to be the complement of color zero to three. The "magic" numbers
  1499. * serve that purpose:
  1500. }
  1501. PEN_C3 = $FEFC; { Complement of color 3 }
  1502. PEN_C2 = $FEFD; { Complement of color 2 }
  1503. PEN_C1 = $FEFE; { Complement of color 1 }
  1504. PEN_C0 = $FEFF; { Complement of color 0 }
  1505. { ======================================================================== }
  1506. { === Screen ============================================================= }
  1507. { ======================================================================== }
  1508. Type
  1509. pScreen = ^tScreen;
  1510. tScreen = record
  1511. NextScreen : pScreen; { linked list of screens }
  1512. FirstWindow : pWindow; { linked list Screen's Windows }
  1513. LeftEdge,
  1514. TopEdge : smallint; { parameters of the screen }
  1515. Width,
  1516. Height : smallint; { parameters of the screen }
  1517. MouseY,
  1518. MouseX : smallint; { position relative to upper-left }
  1519. Flags : Word; { see definitions below }
  1520. Title : STRPTR; { null-terminated Title text }
  1521. DefaultTitle : STRPTR; { for Windows without ScreenTitle }
  1522. { Bar sizes for this Screen and all Window's in this Screen }
  1523. BarHeight,
  1524. BarVBorder,
  1525. BarHBorder,
  1526. MenuVBorder,
  1527. MenuHBorder : Shortint;
  1528. WBorTop,
  1529. WBorLeft,
  1530. WBorRight,
  1531. WBorBottom : Shortint;
  1532. Font : pTextAttr; { this screen's default font }
  1533. { the display data structures for this Screen (note the prefix S)}
  1534. ViewPort : tViewPort; { describing the Screen's display }
  1535. RastPort : tRastPort; { describing Screen rendering }
  1536. BitMap : tBitMap; { extra copy of RastPort BitMap }
  1537. LayerInfo : tLayer_Info; { each screen gets a LayerInfo }
  1538. { You supply a linked-list of Gadgets for your Screen.
  1539. * This list DOES NOT include system Gadgets. You get the standard
  1540. * system Screen Gadgets by default
  1541. }
  1542. FirstGadget : pGadget;
  1543. DetailPen,
  1544. BlockPen : Byte; { for bar/border/gadget rendering }
  1545. { the following variable(s) are maintained by Intuition to support the
  1546. * DisplayBeep() color flashing technique
  1547. }
  1548. SaveColor0 : Word;
  1549. { This layer is for the Screen and Menu bars }
  1550. BarLayer : pLayer;
  1551. ExtData : Pointer;
  1552. UserData : Pointer;
  1553. { general-purpose pointer to User data extension }
  1554. {**** Data below this point are SYSTEM PRIVATE ****}
  1555. end;
  1556. Const
  1557. { The screen flags have the suffix "_f" added to avoid conflicts with
  1558. routine names. }
  1559. { --- FLAGS SET BY INTUITION --------------------------------------------- }
  1560. { The SCREENTYPE bits are reserved for describing various Screen types
  1561. * available under Intuition.
  1562. }
  1563. SCREENTYPE_f = $000F; { all the screens types available }
  1564. { --- the definitions for the Screen Type ------------------------------- }
  1565. WBENCHSCREEN_f = $0001; { Ta Da! The Workbench }
  1566. CUSTOMSCREEN_f = $000F; { for that special look }
  1567. SHOWTITLE_f = $0010; { this gets set by a call to ShowTitle() }
  1568. BEEPING_f = $0020; { set when Screen is beeping }
  1569. CUSTOMBITMAP_f = $0040; { if you are supplying your own BitMap }
  1570. SCREENBEHIND_f = $0080; { if you want your screen to open behind
  1571. * already open screens
  1572. }
  1573. SCREENQUIET_f = $0100; { if you do not want Intuition to render
  1574. * into your screen (gadgets, title) }
  1575. SCREENHIRES = $0200; { do no use lowres gadgets (private) }
  1576. NS_EXTENDED = $1000; { ExtNewScreen.Extension is valid }
  1577. { V36 applications can use OpenScreenTagList() instead of NS_EXTENDED }
  1578. { New for V39: }
  1579. PENSHARED = $0400; { Screen opener set (SA_SharePens,TRUE) }
  1580. AUTOSCROLL = $4000; { screen is to autoscoll }
  1581. STDSCREENHEIGHT = -1; { supply in NewScreen.Height }
  1582. STDSCREENWIDTH = -1; { supply in NewScreen.Width }
  1583. {
  1584. * Screen attribute tag ID's. These are used in the ti_Tag field of
  1585. * TagItem arrays passed to OpenScreenTagList() (or in the
  1586. * ExtNewScreen.Extension field).
  1587. }
  1588. { Screen attribute tags. Please use these versions, not those in
  1589. * iobsolete.h.
  1590. }
  1591. CONST
  1592. SA_Dummy = (TAG_USER + 32);
  1593. {
  1594. * these items specify items equivalent to fields in NewScreen
  1595. }
  1596. SA_Left = (SA_Dummy + $0001);
  1597. SA_Top = (SA_Dummy + $0002);
  1598. SA_Width = (SA_Dummy + $0003);
  1599. SA_Height = (SA_Dummy + $0004);
  1600. { traditional screen positions and dimensions }
  1601. SA_Depth = (SA_Dummy + $0005);
  1602. { screen bitmap depth }
  1603. SA_DetailPen= (SA_Dummy + $0006);
  1604. { serves as default for windows, too }
  1605. SA_BlockPen = (SA_Dummy + $0007);
  1606. SA_Title = (SA_Dummy + $0008);
  1607. { default screen title }
  1608. SA_Colors = (SA_Dummy + $0009);
  1609. { ti_Data is an array of struct ColorSpec,
  1610. * terminated by ColorIndex = -1. Specifies
  1611. * initial screen palette colors.
  1612. }
  1613. SA_ErrorCode= (SA_Dummy + $000A);
  1614. { ti_Data points to LONG error code (values below)}
  1615. SA_Font = (SA_Dummy + $000B);
  1616. { equiv. to NewScreen.Font }
  1617. SA_SysFont = (SA_Dummy + $000C);
  1618. { Selects one of the preferences system fonts:
  1619. * 0 - old DefaultFont, fixed-width
  1620. * 1 - WB Screen preferred font
  1621. }
  1622. SA_Type = (SA_Dummy + $000D);
  1623. { equiv. to NewScreen.Type }
  1624. SA_BitMap = (SA_Dummy + $000E);
  1625. { ti_Data is pointer to custom BitMap. This
  1626. * implies type of CUSTOMBITMAP
  1627. }
  1628. SA_PubName = (SA_Dummy + $000F);
  1629. { presence of this tag means that the screen
  1630. * is to be a public screen. Please specify
  1631. * BEFORE the two tags below
  1632. }
  1633. SA_PubSig = (SA_Dummy + $0010);
  1634. SA_PubTask = (SA_Dummy + $0011);
  1635. { Task ID and signal for being notified that
  1636. * the last window has closed on a public screen.
  1637. }
  1638. SA_DisplayID= (SA_Dummy + $0012);
  1639. { ti_Data is new extended display ID from
  1640. * <graphics/displayinfo.h>.
  1641. }
  1642. SA_DClip = (SA_Dummy + $0013);
  1643. { ti_Data points to a rectangle which defines
  1644. * screen display clip region
  1645. }
  1646. SA_Overscan = (SA_Dummy + $0014);
  1647. { was S_STDDCLIP. Set to one of the OSCAN_
  1648. * specifiers below to get a system standard
  1649. * overscan region for your display clip,
  1650. * screen dimensions (unless otherwise specified),
  1651. * and automatically centered position (partial
  1652. * support only so far).
  1653. * If you use this, you shouldn't specify
  1654. * SA_DClip. SA_Overscan is for "standard"
  1655. * overscan dimensions, SA_DClip is for
  1656. * your custom numeric specifications.
  1657. }
  1658. SA_Obsolete1= (SA_Dummy + $0015);
  1659. { obsolete S_MONITORNAME }
  1660. {* booleans *}
  1661. SA_ShowTitle = (SA_Dummy + $0016);
  1662. { boolean equivalent to flag SHOWTITLE }
  1663. SA_Behind = (SA_Dummy + $0017);
  1664. { boolean equivalent to flag SCREENBEHIND }
  1665. SA_Quiet = (SA_Dummy + $0018);
  1666. { boolean equivalent to flag SCREENQUIET }
  1667. SA_AutoScroll = (SA_Dummy + $0019);
  1668. { boolean equivalent to flag AUTOSCROLL }
  1669. SA_Pens = (SA_Dummy + $001A);
  1670. { pointer to ~0 terminated UWORD array, as
  1671. * found in struct DrawInfo
  1672. }
  1673. SA_FullPalette= (SA_Dummy + $001B);
  1674. { boolean: initialize color table to entire
  1675. * preferences palette (32 for V36), rather
  1676. * than compatible pens 0-3, 17-19, with
  1677. * remaining palette as returned by GetColorMap()
  1678. }
  1679. SA_ColorMapEntries = (SA_Dummy + $001C);
  1680. { New for V39:
  1681. * Allows you to override the number of entries
  1682. * in the ColorMap for your screen. Intuition
  1683. * normally allocates (1<<depth) or 32, whichever
  1684. * is more, but you may require even more if you
  1685. * use certain V39 graphics.library features
  1686. * (eg. palette-banking).
  1687. }
  1688. SA_Parent = (SA_Dummy + $001D);
  1689. { New for V39:
  1690. * ti_Data is a pointer to a "parent" screen to
  1691. * attach this one to. Attached screens slide
  1692. * and depth-arrange together.
  1693. }
  1694. SA_Draggable = (SA_Dummy + $001E);
  1695. { New for V39:
  1696. * Boolean tag allowing non-draggable screens.
  1697. * Do not use without good reason!
  1698. * (Defaults to TRUE).
  1699. }
  1700. SA_Exclusive = (SA_Dummy + $001F);
  1701. { New for V39:
  1702. * Boolean tag allowing screens that won't share
  1703. * the display. Use sparingly! Starting with 3.01,
  1704. * attached screens may be SA_Exclusive. Setting
  1705. * SA_Exclusive for each screen will produce an
  1706. * exclusive family. (Defaults to FALSE).
  1707. }
  1708. SA_SharePens = (SA_Dummy + $0020);
  1709. { New for V39:
  1710. * For those pens in the screen's DrawInfo->dri_Pens,
  1711. * Intuition obtains them in shared mode (see
  1712. * graphics.library/ObtainPen()). For compatibility,
  1713. * Intuition obtains the other pens of a public
  1714. * screen as PEN_EXCLUSIVE. Screens that wish to
  1715. * manage the pens themselves should generally set
  1716. * this tag to TRUE. This instructs Intuition to
  1717. * leave the other pens unallocated.
  1718. }
  1719. SA_BackFill = (SA_Dummy + $0021);
  1720. { New for V39:
  1721. * provides a "backfill hook" for your screen's
  1722. * Layer_Info.
  1723. * See layers.library/InstallLayerInfoHook()
  1724. }
  1725. SA_Interleaved = (SA_Dummy + $0022);
  1726. { New for V39:
  1727. * Boolean tag requesting that the bitmap
  1728. * allocated for you be interleaved.
  1729. * (Defaults to FALSE).
  1730. }
  1731. SA_Colors32 = (SA_Dummy + $0023);
  1732. { New for V39:
  1733. * Tag to set the screen's initial palette colors
  1734. * at 32 bits-per-gun. ti_Data is a pointer
  1735. * to a table to be passed to the
  1736. * graphics.library/LoadRGB32() function.
  1737. * This format supports both runs of color
  1738. * registers and sparse registers. See the
  1739. * autodoc for that function for full details.
  1740. * Any color set here has precedence over
  1741. * the same register set by SA_Colors.
  1742. }
  1743. SA_VideoControl = (SA_Dummy + $0024);
  1744. { New for V39:
  1745. * ti_Data is a pointer to a taglist that Intuition
  1746. * will pass to graphics.library/VideoControl(),
  1747. * upon opening the screen.
  1748. }
  1749. SA_FrontChild = (SA_Dummy + $0025);
  1750. { New for V39:
  1751. * ti_Data is a pointer to an already open screen
  1752. * that is to be the child of the screen being
  1753. * opened. The child screen will be moved to the
  1754. * front of its family.
  1755. }
  1756. SA_BackChild = (SA_Dummy + $0026);
  1757. { New for V39:
  1758. * ti_Data is a pointer to an already open screen
  1759. * that is to be the child of the screen being
  1760. * opened. The child screen will be moved to the
  1761. * back of its family.
  1762. }
  1763. SA_LikeWorkbench = (SA_Dummy + $0027);
  1764. { New for V39:
  1765. * Set ti_Data to 1 to request a screen which
  1766. * is just like the Workbench. This gives
  1767. * you the same screen mode, depth, size,
  1768. * colors, etc., as the Workbench screen.
  1769. }
  1770. SA_Reserved = (SA_Dummy + $0028);
  1771. { Reserved for private Intuition use }
  1772. SA_MinimizeISG = (SA_Dummy + $0029);
  1773. { New for V40:
  1774. * For compatibility, Intuition always ensures
  1775. * that the inter-screen gap is at least three
  1776. * non-interlaced lines. If your application
  1777. * would look best with the smallest possible
  1778. * inter-screen gap, set ti_Data to TRUE.
  1779. * If you use the new graphics VideoControl()
  1780. * VC_NoColorPaletteLoad tag for your screen's
  1781. * ViewPort, you should also set this tag.
  1782. }
  1783. { this is an obsolete tag included only for compatibility with V35
  1784. * interim release for the A2024 and Viking monitors
  1785. }
  1786. NSTAG_EXT_VPMODE = (TAG_USER + 1);
  1787. { OpenScreen error codes, which are returned in the (optional) LONG
  1788. * pointed to by ti_Data for the SA_ErrorCode tag item
  1789. }
  1790. OSERR_NOMONITOR = (1); { named monitor spec not available }
  1791. OSERR_NOCHIPS = (2); { you need newer custom chips }
  1792. OSERR_NOMEM = (3); { couldn't get normal memory }
  1793. OSERR_NOCHIPMEM = (4); { couldn't get chipmem }
  1794. OSERR_PUBNOTUNIQUE= (5); { public screen name already used }
  1795. OSERR_UNKNOWNMODE = (6); { don't recognize mode asked for }
  1796. { ======================================================================== }
  1797. { === NewScreen ========================================================== }
  1798. { ======================================================================== }
  1799. Type
  1800. pNewScreen = ^tNewScreen;
  1801. tNewScreen = record
  1802. LeftEdge,
  1803. TopEdge,
  1804. Width,
  1805. Height,
  1806. Depth : smallint; { screen dimensions }
  1807. DetailPen,
  1808. BlockPen : Byte; { for bar/border/gadget rendering }
  1809. ViewModes : Word; { the Modes for the ViewPort (and View) }
  1810. SType : Word; { the Screen type (see defines above) }
  1811. Font : pTextAttr; { this Screen's default text attributes }
  1812. DefaultTitle : STRPTR; { the default title for this Screen }
  1813. Gadgets : pGadget; { your own Gadgets for this Screen }
  1814. { if you are opening a CUSTOMSCREEN and already have a BitMap
  1815. * that you want used for your Screen, you set the flags CUSTOMBITMAP in
  1816. * the Type field and you set this variable to point to your BitMap
  1817. * structure. The structure will be copied into your Screen structure,
  1818. * after which you may discard your own BitMap if you want
  1819. }
  1820. CustomBitMap : pBitMap;
  1821. end;
  1822. type
  1823. pExtNewScreen = ^tExtNewScreen;
  1824. tExtNewScreen = record
  1825. LeftEdge, TopEdge, Width, Height, Depth : smallint;
  1826. DetailPen, BlockPen : Byte;
  1827. ViewModes : Word;
  1828. ens_Type : Word; { Type in C-Includes }
  1829. Font : pTextAttr;
  1830. DefaultTitle : STRPTR;
  1831. Gadgets : pGadget;
  1832. CustomBitMap : pBitMap;
  1833. Extension : pTagItem;
  1834. END;
  1835. CONST
  1836. { === Overscan Types === }
  1837. OSCAN_TEXT = (1); { entirely visible }
  1838. OSCAN_STANDARD = (2); { just past edges }
  1839. OSCAN_MAX = (3); { as much as possible }
  1840. OSCAN_VIDEO = (4); { even more than is possible }
  1841. { === Public Shared Screen Node === }
  1842. { This is the representative of a public shared screen.
  1843. * This is an internal data structure, but some functions may
  1844. * present a copy of it to the calling application. In that case,
  1845. * be aware that the screen pointer of the structure can NOT be
  1846. * used safely, since there is no guarantee that the referenced
  1847. * screen will remain open and a valid data structure.
  1848. *
  1849. * Never change one of these.
  1850. }
  1851. Type
  1852. pPubScreenNode = ^tPubScreenNode;
  1853. tPubScreenNode = record
  1854. psn_Node : tNode; { ln_Name is screen name }
  1855. psn_Screen : pScreen;
  1856. psn_Flags : Word; { below }
  1857. psn_Size : smallint; { includes name buffer }
  1858. psn_VisitorCount : smallint; { how many visitor windows }
  1859. psn_SigTask : pTask; { who to signal when visitors gone }
  1860. psn_SigBit : Byte; { which signal }
  1861. END;
  1862. CONST
  1863. PSNF_PRIVATE = ($0001);
  1864. MAXPUBSCREENNAME = (139); { names no longer, please }
  1865. { pub screen modes }
  1866. SHANGHAI = $0001; { put workbench windows on pub screen }
  1867. POPPUBSCREEN = $0002; { pop pub screen to front when visitor opens }
  1868. { New for V39: Intuition has new screen depth-arrangement and movement
  1869. * functions called ScreenDepth() and ScreenPosition() respectively.
  1870. * These functions permit the old behavior of ScreenToFront(),
  1871. * ScreenToBack(), and MoveScreen(). ScreenDepth() also allows
  1872. * independent depth control of attached screens. ScreenPosition()
  1873. * optionally allows positioning screens even though they were opened
  1874. * (SA_Draggable,FALSE).
  1875. }
  1876. { For ScreenDepth(), specify one of SDEPTH_TOFRONT or SDEPTH_TOBACK,
  1877. * and optionally also SDEPTH_INFAMILY.
  1878. *
  1879. * NOTE: ONLY THE OWNER OF THE SCREEN should ever specify
  1880. * SDEPTH_INFAMILY. Commodities, "input helper" programs,
  1881. * or any other program that did not open a screen should never
  1882. * use that flag. (Note that this is a style-behavior
  1883. * requirement; there is no technical requirement that the
  1884. * task calling this function need be the task which opened
  1885. * the screen).
  1886. }
  1887. SDEPTH_TOFRONT = (0); { Bring screen to front }
  1888. SDEPTH_TOBACK = (1); { Send screen to back }
  1889. SDEPTH_INFAMILY = (2); { Move an attached screen with
  1890. * respect to other screens of
  1891. * its family
  1892. }
  1893. { Here's an obsolete name equivalent to SDEPTH_INFAMILY: }
  1894. SDEPTH_CHILDONLY = SDEPTH_INFAMILY;
  1895. { For ScreenPosition(), specify one of SPOS_RELATIVE, SPOS_ABSOLUTE,
  1896. * or SPOS_MAKEVISIBLE to describe the kind of screen positioning you
  1897. * wish to perform:
  1898. *
  1899. * SPOS_RELATIVE: The x1 and y1 parameters to ScreenPosition() describe
  1900. * the offset in coordinates you wish to move the screen by.
  1901. * SPOS_ABSOLUTE: The x1 and y1 parameters to ScreenPosition() describe
  1902. * the absolute coordinates you wish to move the screen to.
  1903. * SPOS_MAKEVISIBLE: (x1,y1)-(x2,y2) describes a rectangle on the
  1904. * screen which you would like autoscrolled into view.
  1905. *
  1906. * You may additionally set SPOS_FORCEDRAG along with any of the
  1907. * above. Set this if you wish to reposition an (SA_Draggable,FALSE)
  1908. * screen that you opened.
  1909. *
  1910. * NOTE: ONLY THE OWNER OF THE SCREEN should ever specify
  1911. * SPOS_FORCEDRAG. Commodities, "input helper" programs,
  1912. * or any other program that did not open a screen should never
  1913. * use that flag.
  1914. }
  1915. SPOS_RELATIVE = (0); { Coordinates are relative }
  1916. SPOS_ABSOLUTE = (1); { Coordinates are expressed as
  1917. * absolutes, not relatives.
  1918. }
  1919. SPOS_MAKEVISIBLE = (2); { Coordinates describe a box on
  1920. * the screen you wish to be
  1921. * made visible by autoscrolling
  1922. }
  1923. SPOS_FORCEDRAG = (4); { Move non-draggable screen }
  1924. { New for V39: Intuition supports double-buffering in screens,
  1925. * with friendly interaction with menus and certain gadgets.
  1926. * For each buffer, you need to get one of these structures
  1927. * from the AllocScreenBuffer() call. Never allocate your
  1928. * own ScreenBuffer structures!
  1929. *
  1930. * The sb_DBufInfo field is for your use. See the graphics.library
  1931. * AllocDBufInfo() autodoc for details.
  1932. }
  1933. Type
  1934. pScreenBuffer = ^tScreenBuffer;
  1935. tScreenBuffer = record
  1936. sb_BitMap : pBitMap; { BitMap of this buffer }
  1937. sb_DBufInfo : pDBufInfo; { DBufInfo for this buffer }
  1938. end;
  1939. const
  1940. { These are the flags that may be passed to AllocScreenBuffer().
  1941. }
  1942. SB_SCREEN_BITMAP = 1;
  1943. SB_COPY_BITMAP = 2;
  1944. { ======================================================================== }
  1945. { === Preferences ======================================================== }
  1946. { ======================================================================== }
  1947. Const
  1948. { these are the definitions for the printer configurations }
  1949. FILENAME_SIZE = 30; { Filename size }
  1950. POINTERSIZE = (1 + 16 + 1) * 2; { Size of Pointer data buffer }
  1951. { These defines are for the default font size. These actually describe the
  1952. * height of the defaults fonts. The default font type is the topaz
  1953. * font, which is a fixed width font that can be used in either
  1954. * eighty-column or sixty-column mode. The Preferences structure reflects
  1955. * which is currently selected by the value found in the variable FontSize,
  1956. * which may have either of the values defined below. These values actually
  1957. * are used to select the height of the default font. By changing the
  1958. * height, the resolution of the font changes as well.
  1959. }
  1960. TOPAZ_EIGHTY = 8;
  1961. TOPAZ_SIXTY = 9;
  1962. Type
  1963. pPreferences = ^tPreferences;
  1964. tPreferences = record
  1965. { the default font height }
  1966. FontHeight : Shortint; { height for system default font }
  1967. { constant describing what's hooked up to the port }
  1968. PrinterPort : Byte; { printer port connection }
  1969. { the baud rate of the port }
  1970. BaudRate : Word; { baud rate for the serial port }
  1971. { various timing rates }
  1972. KeyRptSpeed : ttimeval; { repeat speed for keyboard }
  1973. KeyRptDelay : ttimeval; { Delay before keys repeat }
  1974. DoubleClick : ttimeval; { Interval allowed between clicks }
  1975. { Intuition Pointer data }
  1976. PointerMatrix : Array [0..POINTERSIZE-1] of Word;
  1977. { Definition of pointer sprite }
  1978. XOffset : Shortint; { X-Offset for active 'bit' }
  1979. YOffset : Shortint; { Y-Offset for active 'bit' }
  1980. color17 : Word; {*********************************}
  1981. color18 : Word; { Colours for sprite pointer }
  1982. color19 : Word; {*********************************}
  1983. PointerTicks : Word; { Sensitivity of the pointer }
  1984. { Workbench Screen colors }
  1985. color0 : Word; {*********************************}
  1986. color1 : Word; { Standard default colours }
  1987. color2 : Word; { Used in the Workbench }
  1988. color3 : Word; {*********************************}
  1989. { positioning data for the Intuition View }
  1990. ViewXOffset : Shortint; { Offset for top lefthand corner }
  1991. ViewYOffset : Shortint; { X and Y dimensions }
  1992. ViewInitX,
  1993. ViewInitY : smallint; { View initial offset values }
  1994. EnableCLI : Boolean; { CLI availability switch }
  1995. { printer configurations }
  1996. PrinterType : Word; { printer type }
  1997. PrinterFilename : Array [0..FILENAME_SIZE-1] of Char;
  1998. { file for printer }
  1999. { print format and quality configurations }
  2000. PrintPitch : Word; { print pitch }
  2001. PrintQuality : Word; { print quality }
  2002. PrintSpacing : Word; { number of lines per inch }
  2003. PrintLeftMargin : Word; { left margin in characters }
  2004. PrintRightMargin : Word; { right margin in characters }
  2005. PrintImage : Word; { positive or negative }
  2006. PrintAspect : Word; { horizontal or vertical }
  2007. PrintShade : Word; { b&w, half-tone, or color }
  2008. PrintThreshold : smallint; { darkness ctrl for b/w dumps }
  2009. { print paper descriptors }
  2010. PaperSize : Word; { paper size }
  2011. PaperLength : Word; { paper length in number of lines }
  2012. PaperType : Word; { continuous or single sheet }
  2013. { Serial device settings: These are six nibble-fields in three bytes }
  2014. { (these look a little strange so the defaults will map out to zero) }
  2015. SerRWBits : Byte;
  2016. { upper nibble = (8-number of read bits) }
  2017. { lower nibble = (8-number of write bits) }
  2018. SerStopBuf : Byte;
  2019. { upper nibble = (number of stop bits - 1) }
  2020. { lower nibble = (table value for BufSize) }
  2021. SerParShk : Byte;
  2022. { upper nibble = (value for Parity setting) }
  2023. { lower nibble = (value for Handshake mode) }
  2024. LaceWB : Byte; { if workbench is to be interlaced }
  2025. WorkName : Array [0..FILENAME_SIZE-1] of Char;
  2026. { temp file for printer }
  2027. RowSizeChange : Shortint;
  2028. ColumnSizeChange : Shortint;
  2029. PrintFlags : Word; { user preference flags }
  2030. PrintMaxWidth : Word; { max width of printed picture in 10ths/inch }
  2031. PrintMaxHeight : Word; { max height of printed picture in 10ths/inch }
  2032. PrintDensity : Byte; { print density }
  2033. PrintXOffset : Byte; { offset of printed picture in 10ths/inch }
  2034. wb_Width : Word; { override default workbench width }
  2035. wb_Height : Word; { override default workbench height }
  2036. wb_Depth : Byte; { override default workbench depth }
  2037. ext_size : Byte; { extension information -- do not touch! }
  2038. { extension size in blocks of 64 bytes }
  2039. end;
  2040. Const
  2041. { Workbench Interlace (use one bit) }
  2042. LACEWB = $01;
  2043. LW_RESERVED = 1; { internal use only }
  2044. { PrinterPort }
  2045. PARALLEL_PRINTER = $00;
  2046. SERIAL_PRINTER = $01;
  2047. { BaudRate }
  2048. BAUD_110 = $00;
  2049. BAUD_300 = $01;
  2050. BAUD_1200 = $02;
  2051. BAUD_2400 = $03;
  2052. BAUD_4800 = $04;
  2053. BAUD_9600 = $05;
  2054. BAUD_19200 = $06;
  2055. BAUD_MIDI = $07;
  2056. { PaperType }
  2057. FANFOLD = $00;
  2058. SINGLE = $80;
  2059. { PrintPitch }
  2060. PICA = $000;
  2061. ELITE = $400;
  2062. FINE = $800;
  2063. { PrintQuality }
  2064. DRAFT = $000;
  2065. LETTER = $100;
  2066. { PrintSpacing }
  2067. SIX_LPI = $000;
  2068. EIGHT_LPI = $200;
  2069. { Print Image }
  2070. IMAGE_POSITIVE = $00;
  2071. IMAGE_NEGATIVE = $01;
  2072. { PrintAspect }
  2073. ASPECT_HORIZ = $00;
  2074. ASPECT_VERT = $01;
  2075. { PrintShade }
  2076. SHADE_BW = $00;
  2077. SHADE_GREYSCALE = $01;
  2078. SHADE_COLOR = $02;
  2079. { PaperSize }
  2080. US_LETTER = $00;
  2081. US_LEGAL = $10;
  2082. N_TRACTOR = $20;
  2083. W_TRACTOR = $30;
  2084. CUSTOM_PAPER = $40;
  2085. { New PaperSizes for V36: }
  2086. EURO_A0 = $50; { European size A0: 841 x 1189 }
  2087. EURO_A1 = $60; { European size A1: 594 x 841 }
  2088. EURO_A2 = $70; { European size A2: 420 x 594 }
  2089. EURO_A3 = $80; { European size A3: 297 x 420 }
  2090. EURO_A4 = $90; { European size A4: 210 x 297 }
  2091. EURO_A5 = $A0; { European size A5: 148 x 210 }
  2092. EURO_A6 = $B0; { European size A6: 105 x 148 }
  2093. EURO_A7 = $C0; { European size A7: 74 x 105 }
  2094. EURO_A8 = $D0; { European size A8: 52 x 74 }
  2095. { PrinterType }
  2096. CUSTOM_NAME = $00;
  2097. ALPHA_P_101 = $01;
  2098. BROTHER_15XL = $02;
  2099. CBM_MPS1000 = $03;
  2100. DIAB_630 = $04;
  2101. DIAB_ADV_D25 = $05;
  2102. DIAB_C_150 = $06;
  2103. EPSON = $07;
  2104. EPSON_JX_80 = $08;
  2105. OKIMATE_20 = $09;
  2106. QUME_LP_20 = $0A;
  2107. { new printer entries, 3 October 1985 }
  2108. HP_LASERJET = $0B;
  2109. HP_LASERJET_PLUS = $0C;
  2110. { Serial Input Buffer Sizes }
  2111. SBUF_512 = $00;
  2112. SBUF_1024 = $01;
  2113. SBUF_2048 = $02;
  2114. SBUF_4096 = $03;
  2115. SBUF_8000 = $04;
  2116. SBUF_16000 = $05;
  2117. { Serial Bit Masks }
  2118. SREAD_BITS = $F0; { for SerRWBits }
  2119. SWRITE_BITS = $0F;
  2120. SSTOP_BITS = $F0; { for SerStopBuf }
  2121. SBUFSIZE_BITS = $0F;
  2122. SPARITY_BITS = $F0; { for SerParShk }
  2123. SHSHAKE_BITS = $0F;
  2124. { Serial Parity (upper nibble, after being shifted by
  2125. * macro SPARNUM() )
  2126. }
  2127. SPARITY_NONE = 0;
  2128. SPARITY_EVEN = 1;
  2129. SPARITY_ODD = 2;
  2130. { Serial Handshake Mode (lower nibble, after masking using
  2131. * macro SHANKNUM() )
  2132. }
  2133. SHSHAKE_XON = 0;
  2134. SHSHAKE_RTS = 1;
  2135. SHSHAKE_NONE = 2;
  2136. { new defines for PrintFlags }
  2137. CORRECT_RED = $0001; { color correct red shades }
  2138. CORRECT_GREEN = $0002; { color correct green shades }
  2139. CORRECT_BLUE = $0004; { color correct blue shades }
  2140. CENTER_IMAGE = $0008; { center image on paper }
  2141. IGNORE_DIMENSIONS = $0000; { ignore max width/height settings }
  2142. BOUNDED_DIMENSIONS = $0010; { use max width/height as boundaries }
  2143. ABSOLUTE_DIMENSIONS = $0020; { use max width/height as absolutes }
  2144. PIXEL_DIMENSIONS = $0040; { use max width/height as prt pixels }
  2145. MULTIPLY_DIMENSIONS = $0080; { use max width/height as multipliers }
  2146. INTEGER_SCALING = $0100; { force integer scaling }
  2147. ORDERED_DITHERING = $0000; { ordered dithering }
  2148. HALFTONE_DITHERING = $0200; { halftone dithering }
  2149. FLOYD_DITHERING = $0400; { Floyd-Steinberg dithering }
  2150. ANTI_ALIAS = $0800; { anti-alias image }
  2151. GREY_SCALE2 = $1000; { for use with hi-res monitor }
  2152. { masks used for checking bits }
  2153. CORRECT_RGB_MASK = CORRECT_RED + CORRECT_GREEN + CORRECT_BLUE;
  2154. DIMENSIONS_MASK = BOUNDED_DIMENSIONS + ABSOLUTE_DIMENSIONS +
  2155. PIXEL_DIMENSIONS + MULTIPLY_DIMENSIONS;
  2156. DITHERING_MASK = HALFTONE_DITHERING + FLOYD_DITHERING;
  2157. { ======================================================================== }
  2158. { === IntuitionBase ====================================================== }
  2159. { ======================================================================== }
  2160. {
  2161. * Be sure to protect yourself against someone modifying these data as
  2162. * you look at them. This is done by calling:
  2163. *
  2164. * lock = LockIBase(0), which returns an Integer. When done call
  2165. * UnlockIBase(lock) where lock is what LockIBase() returned.
  2166. }
  2167. Type
  2168. pIntuitionBase = ^tIntuitionBase;
  2169. tIntuitionBase = record
  2170. { IntuitionBase should never be directly modified by programs }
  2171. { even a little bit, guys/gals; do you hear me? }
  2172. LibNode : tLibrary;
  2173. ViewLord : tView;
  2174. ActiveWindow : pWindow;
  2175. ActiveScreen : pScreen;
  2176. { the FirstScreen variable points to the frontmost Screen. Screens are
  2177. * then maintained in a front to back order using Screen.NextScreen
  2178. }
  2179. FirstScreen : pScreen; { for linked list of all screens }
  2180. Flags : ULONG; { see definitions below }
  2181. MouseY,
  2182. MouseX : smallint; { mouse position relative to View }
  2183. Seconds : ULONG; { timestamp of most current input event }
  2184. Micros : ULONG; { timestamp of most current input event }
  2185. { I told you this was private.
  2186. * The data beyond this point has changed, is changing, and
  2187. * will continue to change.
  2188. }
  2189. end;
  2190. {
  2191. * Package of information passed to custom and 'boopsi'
  2192. * gadget 'hook' functions. This structure is READ ONLY.
  2193. }
  2194. Type
  2195. pGadgetInfo = ^tGadgetInfo;
  2196. tGadgetInfo = record
  2197. gi_Screen : pScreen; { ScreenPtr }
  2198. gi_Window : pWindow; { null for screen gadgets } { WindowPtr }
  2199. gi_Requester : pRequester; { null IF not GTYP_REQGADGET } { RequesterPtr }
  2200. { rendering information:
  2201. * don't use these without cloning/locking.
  2202. * Official way is to call ObtainRPort()
  2203. }
  2204. gi_RastPort : pRastPort; { RastPortPtr }
  2205. gi_Layer : pLayer; { LayerPtr }
  2206. { copy of dimensions of screen/window/g00/req(/group)
  2207. * that gadget resides in. Left/Top of this box is
  2208. * offset from window mouse coordinates to gadget coordinates
  2209. * screen gadgets: 0,0 (from screen coords)
  2210. * window gadgets (no g00): 0,0
  2211. * GTYP_GZZGADGETs (borderlayer): 0,0
  2212. * GZZ innerlayer gadget: borderleft, bordertop
  2213. * Requester gadgets: reqleft, reqtop
  2214. }
  2215. gi_Domain : tIBox;
  2216. gi_Pens : record
  2217. DetailPen : Byte;
  2218. BlockPen : Byte;
  2219. end;
  2220. { the Detail and Block pens in gi_DrInfo->dri_Pens[] are
  2221. * for the screen. Use the above for window-sensitive
  2222. * colors.
  2223. }
  2224. gi_DrInfo : pDrawInfo; { DrawInfoPtr }
  2225. { reserved space: this structure is extensible
  2226. * anyway, but using these saves some recompilation
  2227. }
  2228. gi_Reserved : Array[0..5] of ULONG;
  2229. END;
  2230. {** system private data structure for now **}
  2231. { prop gadget extra info }
  2232. pPGX = ^tPGX;
  2233. tPGX = record
  2234. pgx_Container : tIBox;
  2235. pgx_NewKnob : tIBox;
  2236. END;
  2237. { this casts MutualExclude for easy assignment of a hook
  2238. * pointer to the unused MutualExclude field of a custom gadget
  2239. }
  2240. {** User visible handles on objects, classes, messages **}
  2241. Type
  2242. Object_ = ULONG;
  2243. pObject_ = ^Object_;
  2244. ClassID = ^Byte;
  2245. {
  2246. you can use this type to point to a 'generic' message,
  2247. * in the object-oriented programming parlance. Based on
  2248. * the value of 'MethodID', you dispatch to processing
  2249. * for the various message types. The meaningful parameter
  2250. * packet structure definitions are defined below.
  2251. typedef struct
  2252. ULONG MethodID;
  2253. method-specific data follows, some examples below
  2254. *Msg; }
  2255. pMsg = ^tMsg;
  2256. tMsg = record
  2257. MethodID : ULONG;
  2258. end;
  2259. {
  2260. * Class id strings for Intuition classes.
  2261. * There's no real reason to use the uppercase constants
  2262. * over the lowercase strings, but this makes a good place
  2263. * to list the names of the built-in classes.
  2264. }
  2265. CONST
  2266. ROOTCLASS : PChar = 'rootclass' ; { classusr.h }
  2267. IMAGECLASS : PChar = 'imageclass' ; { imageclass.h }
  2268. FRAMEICLASS : PChar = 'frameiclass' ;
  2269. SYSICLASS : PChar = 'sysiclass' ;
  2270. FILLRECTCLASS : PChar = 'fillrectclass';
  2271. GADGETCLASS : PChar = 'gadgetclass' ; { gadgetclass.h }
  2272. PROPGCLASS : PChar = 'propgclass' ;
  2273. STRGCLASS : PChar = 'strgclass' ;
  2274. BUTTONGCLASS : PChar = 'buttongclass' ;
  2275. FRBUTTONCLASS : PChar = 'frbuttonclass';
  2276. GROUPGCLASS : PChar = 'groupgclass' ;
  2277. ICCLASS : PChar = 'icclass' ; { icclass.h }
  2278. MODELCLASS : PChar = 'modelclass' ;
  2279. ITEXTICLASS : PChar = 'itexticlass' ;
  2280. POINTERCLASS : PChar = 'pointerclass' ; { pointerclass.h }
  2281. { Dispatched method ID's
  2282. * NOTE: Applications should use Intuition entry points, not direct
  2283. * DoMethod() calls, for NewObject, DisposeObject, SetAttrs,
  2284. * SetGadgetAttrs, and GetAttr.
  2285. }
  2286. OM_Dummy = ($100);
  2287. OM_NEW = ($101); { 'object' parameter is 'true class' }
  2288. OM_DISPOSE = ($102); { delete self (no parameters) }
  2289. OM_SET = ($103); { set attributes (in tag list) }
  2290. OM_GET = ($104); { return single attribute value }
  2291. OM_ADDTAIL = ($105); { add self to a List (let root do it) }
  2292. OM_REMOVE = ($106); { remove self from list }
  2293. OM_NOTIFY = ($107); { send to self: notify dependents }
  2294. OM_UPDATE = ($108); { notification message from somebody }
  2295. OM_ADDMEMBER = ($109); { used by various classes with lists }
  2296. OM_REMMEMBER = ($10A); { used by various classes with lists }
  2297. { Parameter 'Messages' passed to methods }
  2298. { OM_NEW and OM_SET }
  2299. Type
  2300. popSet = ^topSet;
  2301. topSet = record
  2302. MethodID : ULONG;
  2303. ops_AttrList : pTagItem; { new attributes }
  2304. ops_GInfo : pGadgetInfo; { always there for gadgets,
  2305. * when SetGadgetAttrs() is used,
  2306. * but will be NULL for OM_NEW
  2307. }
  2308. END;
  2309. { OM_NOTIFY, and OM_UPDATE }
  2310. popUpdate = ^topUpdate;
  2311. topUpdate = record
  2312. MethodID : ULONG;
  2313. opu_AttrList : pTagItem; { new attributes }
  2314. opu_GInfo : pGadgetInfo; { non-NULL when SetGadgetAttrs OR
  2315. * notification resulting from gadget
  2316. * input occurs.
  2317. }
  2318. opu_Flags : ULONG; { defined below }
  2319. END;
  2320. { this flag means that the update message is being issued from
  2321. * something like an active gadget, a la GACT_FOLLOWMOUSE. When
  2322. * the gadget goes inactive, it will issue a final update
  2323. * message with this bit cleared. Examples of use are for
  2324. * GACT_FOLLOWMOUSE equivalents for propgadclass, and repeat strobes
  2325. * for buttons.
  2326. }
  2327. CONST
  2328. OPUF_INTERIM = 1;
  2329. { OM_GET }
  2330. Type
  2331. popGet = ^topGet;
  2332. topGet = record
  2333. MethodID,
  2334. opg_AttrID : ULONG;
  2335. opg_Storage : Pointer; { may be other types, but 'int'
  2336. * types are all ULONG
  2337. }
  2338. END;
  2339. { OM_ADDTAIL }
  2340. popAddTail = ^topAddTail;
  2341. topAddTail = record
  2342. MethodID : ULONG;
  2343. opat_List : pList;
  2344. END;
  2345. { OM_ADDMEMBER, OM_REMMEMBER }
  2346. Type
  2347. popMember = ^topMember;
  2348. topMember = record
  2349. MethodID : ULONG;
  2350. opam_Object : pObject_;
  2351. END;
  2352. {*****************************************}
  2353. {** 'White box' access to struct IClass **}
  2354. {*****************************************}
  2355. { This structure is READ-ONLY, and allocated only by Intuition }
  2356. TYPE
  2357. pIClass = ^tIClass;
  2358. tIClass = record
  2359. cl_Dispatcher : tHook;
  2360. cl_Reserved : ULONG; { must be 0 }
  2361. cl_Super : pIClass;
  2362. cl_ID : ClassID;
  2363. { where within an object is the instance data for this class? }
  2364. cl_InstOffset : Word;
  2365. cl_InstSize : Word;
  2366. cl_UserData : ULONG; { per-class data of your choice }
  2367. cl_SubclassCount : ULONG;
  2368. { how many direct subclasses? }
  2369. cl_ObjectCount : ULONG;
  2370. { how many objects created of this class? }
  2371. cl_Flags : ULONG;
  2372. END;
  2373. CONST
  2374. CLF_INLIST = $00000001; { class is in public class list }
  2375. {************************************************}
  2376. {** 'White box' access to struct _Object **}
  2377. {************************************************}
  2378. {
  2379. * We have this, the instance data of the root class, PRECEDING
  2380. * the 'object'. This is so that Gadget objects are Gadget pointers,
  2381. * and so on. If this structure grows, it will always have o_Class
  2382. * at the end, so the macro OCLASS(o) will always have the same
  2383. * offset back from the pointer returned from NewObject().
  2384. *
  2385. * This data structure is subject to change. Do not use the o_Node
  2386. * embedded structure.
  2387. }
  2388. Type
  2389. p_Object = ^t_Object;
  2390. t_Object = record
  2391. o_Node : tMinNode;
  2392. o_Class : pIClass;
  2393. END;
  2394. { BOOPSI class libraries should use this structure as the base for their
  2395. * library data. This allows developers to obtain the class pointer for
  2396. * performing object-less inquiries. }
  2397. PClassLibrary = ^tClassLibrary;
  2398. tClassLibrary = record
  2399. cl_Lib : tLibrary; { Embedded library }
  2400. cl_Pad : UWORD; { Align the structure }
  2401. cl_Class : PIClass; { Class pointer }
  2402. end;
  2403. {
  2404. * NOTE: <intuition/iobsolete.h> is included at the END of this file!
  2405. }
  2406. { Gadget Class attributes }
  2407. CONST
  2408. GA_Dummy = (TAG_USER +$30000);
  2409. { (LONG) Left edge of the gadget relative to the left edge of
  2410. * the window }
  2411. GA_Left = (GA_Dummy + $0001);
  2412. { (LONG) Left edge of the gadget relative to the right edge of
  2413. * the window }
  2414. GA_RelRight = (GA_Dummy + $0002);
  2415. { (LONG) Top edge of the gadget relative to the top edge of
  2416. * the window }
  2417. GA_Top = (GA_Dummy + $0003);
  2418. { (LONG) Top edge of the gadget relative to the bottom edge
  2419. * of the window }
  2420. GA_RelBottom = (GA_Dummy + $0004);
  2421. { (LONG) Width of the gadget }
  2422. GA_Width = (GA_Dummy + $0005);
  2423. { (LONG) Width of the gadget relative to the width of the
  2424. * window }
  2425. GA_RelWidth = (GA_Dummy + $0006);
  2426. { (LONG) Height of the gadget }
  2427. GA_Height = (GA_Dummy + $0007);
  2428. { (LONG) Height of the gadget relative to the height of
  2429. * the window }
  2430. GA_RelHeight = (GA_Dummy + $0008);
  2431. { (STRPTR) Gadget imagry is NULL terminated string }
  2432. GA_Text = (GA_Dummy + $0009); { ti_Data is (UBYTE *) }
  2433. { (struct Image *) Gadget imagry is an image }
  2434. GA_Image = (GA_Dummy + $000A);
  2435. { (struct Border *) Gadget imagry is a border }
  2436. GA_Border = (GA_Dummy + $000B);
  2437. { (struct Image *) Selected gadget imagry }
  2438. GA_SelectRender = (GA_Dummy + $000C);
  2439. { (UWORD) One of GFLG_GADGHNONE, GFLG_GADGHBOX, GFLG_GADGHCOMP,
  2440. * or GFLG_GADGHIMAGE }
  2441. GA_Highlight = (GA_Dummy + $000D);
  2442. { (BOOL) Indicate whether gadget is disabled or not.
  2443. * Defaults to FALSE. }
  2444. GA_Disabled = (GA_Dummy + $000E);
  2445. { (BOOL) Indicate whether the gadget is for
  2446. * WFLG_GIMMEZEROZERO window borders or not. Defaults
  2447. * to FALSE. }
  2448. GA_GZZGadget = (GA_Dummy + $000F);
  2449. { (UWORD) Gadget ID assigned by the application }
  2450. GA_ID = (GA_Dummy + $0010);
  2451. { (APTR) Application specific data }
  2452. GA_UserData = (GA_Dummy + $0011);
  2453. { (APTR) Gadget specific data }
  2454. GA_SpecialInfo = (GA_Dummy + $0012);
  2455. { (BOOL) Indicate whether the gadget is selected or not.
  2456. * Defaults to FALSE }
  2457. GA_Selected = (GA_Dummy + $0013);
  2458. { (BOOL) When set tells the system that when this gadget
  2459. * is selected causes the requester that it is in to be
  2460. * ended. Defaults to FALSE. }
  2461. GA_EndGadget = (GA_Dummy + $0014);
  2462. { (BOOL) When set indicates that the gadget is to
  2463. * notify the application when it becomes active. Defaults
  2464. * to FALSE. }
  2465. GA_Immediate = (GA_Dummy + $0015);
  2466. { (BOOL) When set indicates that the application wants to
  2467. * verify that the pointer was still over the gadget when
  2468. * the select button is released. Defaults to FALSE. }
  2469. GA_RelVerify = (GA_Dummy + $0016);
  2470. { (BOOL) When set indicates that the application wants to
  2471. * be notified of mouse movements while the gadget is active.
  2472. * It is recommmended that GA_Immediate and GA_RelVerify are
  2473. * also used so that the active gadget can be tracked by the
  2474. * application. Defaults to FALSE. }
  2475. GA_FollowMouse = (GA_Dummy + $0017);
  2476. { (BOOL) Indicate whether the gadget is in the right border
  2477. * or not. Defaults to FALSE. }
  2478. GA_RightBorder = (GA_Dummy + $0018);
  2479. { (BOOL) Indicate whether the gadget is in the left border
  2480. * or not. Defaults to FALSE. }
  2481. GA_LeftBorder = (GA_Dummy + $0019);
  2482. { (BOOL) Indicate whether the gadget is in the top border
  2483. * or not. Defaults to FALSE. }
  2484. GA_TopBorder = (GA_Dummy + $001A);
  2485. { (BOOL) Indicate whether the gadget is in the bottom border
  2486. * or not. Defaults to FALSE. }
  2487. GA_BottomBorder = (GA_Dummy + $001B);
  2488. { (BOOL) Indicate whether the gadget is toggle-selected
  2489. * or not. Defaults to FALSE. }
  2490. GA_ToggleSelect = (GA_Dummy + $001C);
  2491. { (BOOL) Reserved for system use to indicate that the
  2492. * gadget belongs to the system. Defaults to FALSE. }
  2493. GA_SysGadget = (GA_Dummy + $001D);
  2494. { (UWORD) Reserved for system use to indicate the
  2495. * gadget type. }
  2496. GA_SysGType = (GA_Dummy + $001E);
  2497. { (struct Gadget *) Previous gadget in the linked list.
  2498. * NOTE: This attribute CANNOT be used to link new gadgets
  2499. * into the gadget list of an open window or requester.
  2500. * You must use AddGList(). }
  2501. GA_Previous = (GA_Dummy + $001F);
  2502. { (struct Gadget *) Next gadget in the linked list. }
  2503. GA_Next = (GA_Dummy + $0020);
  2504. { (struct DrawInfo *) Some gadgets need a DrawInfo at creation time }
  2505. GA_DrawInfo = (GA_Dummy + $0021);
  2506. { You should use at most ONE of GA_Text, GA_IntuiText, and GA_LabelImage }
  2507. { (struct IntuiText *) Label is an IntuiText. }
  2508. GA_IntuiText = (GA_Dummy + $0022);
  2509. { (Object *) Label is an image object. }
  2510. GA_LabelImage = (GA_Dummy + $0023);
  2511. { New for V37:
  2512. * Boolean indicates that this gadget is to participate in
  2513. * cycling activation with Tab or Shift-Tab.
  2514. }
  2515. GA_TabCycle = (GA_Dummy + $0024);
  2516. { New for V39:
  2517. * Boolean indicates that this gadget sends gadget-help
  2518. }
  2519. GA_GadgetHelp = (GA_Dummy + $0025);
  2520. { New for V39:
  2521. * ti_Data is a pointer to an IBox structure which is
  2522. * to be copied into the extended gadget's bounds.
  2523. }
  2524. GA_Bounds = (GA_Dummy + $0026);
  2525. { New for V39:
  2526. * Boolean indicates that this gadget has the "special relativity"
  2527. * property, which is useful for certain fancy relativity
  2528. * operations through the GM_LAYOUT method.
  2529. }
  2530. GA_RelSpecial = (GA_Dummy + $0027);
  2531. GA_TextAttr = GA_Dummy + 40;
  2532. { (struct TextAttr ) Indicate the font to use for the gadget.
  2533. New for V42. }
  2534. GA_ReadOnly = GA_Dummy + 41;
  2535. { (BOOL) Indicate that the gadget is read-only (non-selectable).
  2536. Defaults to FALSE. New for V42. }
  2537. GA_Underscore = GA_Dummy + 42;
  2538. { (UBYTE) Underscore/escape character for keyboard shortcuts.
  2539. Defaults to '_' . New for V44. }
  2540. GA_ActivateKey = GA_Dummy + 43;
  2541. { (STRPTR) Set/Get the gadgets shortcut/activation key(s)
  2542. Defaults to NULL. New for V44. }
  2543. GA_BackFill = GA_Dummy + 44;
  2544. { (struct Hook ) Backfill pattern hook.
  2545. Defaults to NULL. New for V44. }
  2546. GA_GadgetHelpText = GA_Dummy + 45;
  2547. { (STRPTR) RESERVERD/PRIVATE DO NOT USE
  2548. Defaults to NULL. New for V44. }
  2549. GA_UserInput = GA_Dummy + 46;
  2550. { (BOOL) Notification tag indicates this notification is from the activite
  2551. gadget receiving user input - an attempt to make IDCMPUPDATE more efficient.
  2552. Defaults to FALSE. New for V44. }
  2553. { PROPGCLASS attributes }
  2554. PGA_Dummy = (TAG_USER + $31000);
  2555. PGA_Freedom = (PGA_Dummy + $0001);
  2556. { only one of FREEVERT or FREEHORIZ }
  2557. PGA_Borderless = (PGA_Dummy + $0002);
  2558. PGA_HorizPot = (PGA_Dummy + $0003);
  2559. PGA_HorizBody = (PGA_Dummy + $0004);
  2560. PGA_VertPot = (PGA_Dummy + $0005);
  2561. PGA_VertBody = (PGA_Dummy + $0006);
  2562. PGA_Total = (PGA_Dummy + $0007);
  2563. PGA_Visible = (PGA_Dummy + $0008);
  2564. PGA_Top = (PGA_Dummy + $0009);
  2565. { New for V37: }
  2566. PGA_NewLook = (PGA_Dummy + $000A);
  2567. { STRGCLASS attributes }
  2568. STRINGA_Dummy = (TAG_USER +$32000);
  2569. STRINGA_MaxChars = (STRINGA_Dummy + $0001);
  2570. STRINGA_Buffer = (STRINGA_Dummy + $0002);
  2571. STRINGA_UndoBuffer = (STRINGA_Dummy + $0003);
  2572. STRINGA_WorkBuffer = (STRINGA_Dummy + $0004);
  2573. STRINGA_BufferPos = (STRINGA_Dummy + $0005);
  2574. STRINGA_DispPos = (STRINGA_Dummy + $0006);
  2575. STRINGA_AltKeyMap = (STRINGA_Dummy + $0007);
  2576. STRINGA_Font = (STRINGA_Dummy + $0008);
  2577. STRINGA_Pens = (STRINGA_Dummy + $0009);
  2578. STRINGA_ActivePens = (STRINGA_Dummy + $000A);
  2579. STRINGA_EditHook = (STRINGA_Dummy + $000B);
  2580. STRINGA_EditModes = (STRINGA_Dummy + $000C);
  2581. { booleans }
  2582. STRINGA_ReplaceMode = (STRINGA_Dummy + $000D);
  2583. STRINGA_FixedFieldMode = (STRINGA_Dummy + $000E);
  2584. STRINGA_NoFilterMode = (STRINGA_Dummy + $000F);
  2585. STRINGA_Justification = (STRINGA_Dummy + $0010);
  2586. { GACT_STRINGCENTER, GACT_STRINGLEFT, GACT_STRINGRIGHT }
  2587. STRINGA_LongVal = (STRINGA_Dummy + $0011);
  2588. STRINGA_TextVal = (STRINGA_Dummy + $0012);
  2589. STRINGA_ExitHelp = (STRINGA_Dummy + $0013);
  2590. { STRINGA_ExitHelp is new for V37, and ignored by V36.
  2591. * Set this if you want the gadget to exit when Help is
  2592. * pressed. Look for a code of $5F, the rawkey code for Help
  2593. }
  2594. SG_DEFAULTMAXCHARS = (128);
  2595. { Gadget Layout related attributes }
  2596. LAYOUTA_Dummy = (TAG_USER + $38000);
  2597. LAYOUTA_LayoutObj = (LAYOUTA_Dummy + $0001);
  2598. LAYOUTA_Spacing = (LAYOUTA_Dummy + $0002);
  2599. LAYOUTA_Orientation = (LAYOUTA_Dummy + $0003);
  2600. LAYOUTA_ChildMaxWidth = LAYOUTA_Dummy + $0004;
  2601. { (BOOL) Child objects are of equal width. Should default to TRUE for
  2602. gadgets with a horizontal orientation. New for V42. }
  2603. LAYOUTA_ChildMaxHeight = LAYOUTA_Dummy + $0005;
  2604. { (BOOL) Child objects are of equal height. Should default to TRUE for
  2605. gadgets with a vertical orientation. New for V42. }
  2606. { orientation values }
  2607. LORIENT_NONE = 0;
  2608. LORIENT_HORIZ = 1;
  2609. LORIENT_VERT = 2;
  2610. { Gadget Method ID's }
  2611. GM_Dummy = (-1); { not used for anything }
  2612. GM_HITTEST = (0); { return GMR_GADGETHIT IF you are clicked on
  2613. * (whether or not you are disabled).
  2614. }
  2615. GM_RENDER = (1); { draw yourself, in the appropriate state }
  2616. GM_GOACTIVE = (2); { you are now going to be fed input }
  2617. GM_HANDLEINPUT = (3); { handle that input }
  2618. GM_GOINACTIVE = (4); { whether or not by choice, you are done }
  2619. GM_HELPTEST = (5); { Will you send gadget help if the mouse is
  2620. * at the specified coordinates? See below
  2621. * for possible GMR_ values.
  2622. }
  2623. GM_LAYOUT = (6); { re-evaluate your size based on the GadgetInfo
  2624. * Domain. Do NOT re-render yourself yet, you
  2625. * will be called when it is time...
  2626. }
  2627. { Parameter "Messages" passed to gadget class methods }
  2628. { GM_HITTEST }
  2629. type
  2630. pgpHitTest = ^tgpHitTest;
  2631. tgpHitTest = record
  2632. MethodID : ULONG;
  2633. gpht_GInfo : pGadgetInfo;
  2634. gpht_Mouse : record
  2635. x : smallint;
  2636. y : smallint;
  2637. end;
  2638. END;
  2639. const
  2640. { For GM_HITTEST, return GMR_GADGETHIT if you were indeed hit,
  2641. * otherwise return zero.
  2642. *
  2643. * For GM_HELPTEST, return GMR_NOHELPHIT (zero) if you were not hit.
  2644. * Typically, return GMR_HELPHIT if you were hit.
  2645. * It is possible to pass a UWORD to the application via the Code field
  2646. * of the IDCMP_GADGETHELP message. Return GMR_HELPCODE or'd with
  2647. * the UWORD-sized result you wish to return.
  2648. *
  2649. * GMR_HELPHIT yields a Code value of ((UWORD) ~0), which should
  2650. * mean "nothing particular" to the application.
  2651. }
  2652. GMR_GADGETHIT = ($00000004); { GM_HITTEST hit }
  2653. GMR_NOHELPHIT = ($00000000); { GM_HELPTEST didn't hit }
  2654. GMR_HELPHIT = ($FFFFFFFF); { GM_HELPTEST hit, return code = ~0 }
  2655. GMR_HELPCODE = ($00010000); { GM_HELPTEST hit, return low word as code }
  2656. { GM_RENDER }
  2657. Type
  2658. pgpRender = ^tgpRender;
  2659. tgpRender = record
  2660. MethodID : ULONG;
  2661. gpr_GInfo : pGadgetInfo; { gadget context }
  2662. gpr_RPort : pRastPort; { all ready for use }
  2663. gpr_Redraw : Longint; { might be a "highlight pass" }
  2664. END;
  2665. { values of gpr_Redraw }
  2666. CONST
  2667. GREDRAW_UPDATE = (2); { incremental update, e.g. prop slider }
  2668. GREDRAW_REDRAW = (1); { redraw gadget }
  2669. GREDRAW_TOGGLE = (0); { toggle highlight, IF applicable }
  2670. { GM_GOACTIVE, GM_HANDLEINPUT }
  2671. Type
  2672. pgpInput = ^tgpInput;
  2673. tgpInput = record
  2674. MethodID : ULONG;
  2675. gpi_GInfo : pGadgetInfo;
  2676. gpi_IEvent : pInputEvent;
  2677. gpi_Termination : Pointer;
  2678. gpi_Mouse : record
  2679. x : smallint;
  2680. y : smallint;
  2681. end;
  2682. {* (V39) Pointer to TabletData structure, if this event originated
  2683. * from a tablet which sends IESUBCLASS_NEWTABLET events, or NULL if
  2684. * not.
  2685. *
  2686. * DO NOT ATTEMPT TO READ THIS FIELD UNDER INTUITION PRIOR TO V39!
  2687. * IT WILL BE INVALID!
  2688. *}
  2689. gpi_TabletData : pTabletData;
  2690. END;
  2691. { GM_HANDLEINPUT and GM_GOACTIVE return code flags }
  2692. { return GMR_MEACTIVE (0) alone if you want more input.
  2693. * Otherwise, return ONE of GMR_NOREUSE and GMR_REUSE, and optionally
  2694. * GMR_VERIFY.
  2695. }
  2696. CONST
  2697. GMR_MEACTIVE = (0);
  2698. GMR_NOREUSE = (2);
  2699. GMR_REUSE = (4);
  2700. GMR_VERIFY = (8); { you MUST set cgp_Termination }
  2701. { New for V37:
  2702. * You can end activation with one of GMR_NEXTACTIVE and GMR_PREVACTIVE,
  2703. * which instructs Intuition to activate the next or previous gadget
  2704. * that has GFLG_TABCYCLE set.
  2705. }
  2706. GMR_NEXTACTIVE = (16);
  2707. GMR_PREVACTIVE = (32);
  2708. { GM_GOINACTIVE }
  2709. Type
  2710. pgpGoInactive = ^tgpGoInactive;
  2711. tgpGoInactive = record
  2712. MethodID : ULONG;
  2713. gpgi_GInfo : pGadgetInfo;
  2714. { V37 field only! DO NOT attempt to read under V36! }
  2715. gpgi_Abort : ULONG; { gpgi_Abort=1 IF gadget was aborted
  2716. * by Intuition and 0 if gadget went
  2717. * inactive at its own request
  2718. }
  2719. END;
  2720. {* New for V39: Intuition sends GM_LAYOUT to any GREL_ gadget when
  2721. * the gadget is added to the window (or when the window opens, if
  2722. * the gadget was part of the NewWindow.FirstGadget or the WA_Gadgets
  2723. * list), or when the window is resized. Your gadget can set the
  2724. * GA_RelSpecial property to get GM_LAYOUT events without Intuition
  2725. * changing the interpretation of your gadget select box. This
  2726. * allows for completely arbitrary resizing/repositioning based on
  2727. * window size.
  2728. *}
  2729. {* GM_LAYOUT *}
  2730. Type
  2731. pgpLayout = ^tgpLayout;
  2732. tgpLayout = record
  2733. MethodID : ULONG;
  2734. gpl_GInfo : pGadgetInfo;
  2735. gpl_Initial : ULONG; {* non-zero if this method was invoked
  2736. * during AddGList() or OpenWindow()
  2737. * time. zero if this method was invoked
  2738. * during window resizing.
  2739. *}
  2740. end;
  2741. {***************************************************************************}
  2742. { The GM_DOMAIN method is used to obtain the sizing requirements of an
  2743. * object for a class before ever creating an object. }
  2744. { GM_DOMAIN }
  2745. PgpDomain = ^tgpDomain;
  2746. tgpDomain = record
  2747. MethodID : ULONG;
  2748. gpd_GInfo : PGadgetInfo;
  2749. gpd_RPort : PRastPort; { RastPort to layout for }
  2750. gpd_Which : LONG;
  2751. gpd_Domain : tIBox; { Resulting domain }
  2752. gpd_Attrs : PTagItem; { Additional attributes }
  2753. end;
  2754. const
  2755. GDOMAIN_MINIMUM = 0;
  2756. { Minimum size }
  2757. GDOMAIN_NOMINAL = 1;
  2758. { Nominal size }
  2759. GDOMAIN_MAXIMUM = 2;
  2760. { Maximum size }
  2761. {***************************************************************************}
  2762. { The GM_KEYTEST method is used to determin if a key press matches an
  2763. * object's activation key(s). }
  2764. { GM_KEYTEST send this message.
  2765. }
  2766. type
  2767. PgpKeyTest = ^tgpKeyTest;
  2768. tgpKeyTest = record
  2769. MethodID : ULONG;
  2770. gpkt_GInfo : PGadgetInfo;
  2771. gpkt_IMsg : PIntuiMessage; { The IntuiMessage that triggered this }
  2772. gpkt_VanillaKey : ULONG;
  2773. end;
  2774. {***************************************************************************}
  2775. { The GM_KEYGOACTIVE method is called to "simulate" a gadget going down.
  2776. * A gadget should render itself in a selected state when receiving
  2777. * this message. If the class supports this method, it must return
  2778. * GMR_KEYACTIVE.
  2779. *
  2780. * If a gadget returns zero for this method, it will subsequently be
  2781. * activated via ActivateGadget() with a NULL IEvent.
  2782. }
  2783. PgpKeyInput = ^tgpKeyInput;
  2784. tgpKeyInput = record
  2785. MethodID : ULONG; { GM_KEYGOACTIVE }
  2786. gpk_GInfo : PGadgetInfo;
  2787. gpk_IEvent : PInputEvent;
  2788. gpk_Termination : PLONG;
  2789. end;
  2790. const
  2791. GMR_KEYACTIVE = 1 shl 4;
  2792. { you MUST set gpk_Termination }
  2793. GMR_KEYVERIFY = 1 shl 5;
  2794. { The GM_KEYGOINACTIVE method is called to simulate the gadget release.
  2795. * Upon receiving this message, the gadget should do everything a
  2796. * normal gadget release would do.
  2797. }
  2798. type
  2799. PgpKeyGoInactive = ^tgpKeyGoInactive;
  2800. tgpKeyGoInactive = record
  2801. MethodID : ULONG;
  2802. gpki_GInfo : PGadgetInfo;
  2803. gpki_Abort : ULONG;
  2804. end;
  2805. CONST
  2806. ICM_Dummy = ($0401); { used for nothing }
  2807. ICM_SETLOOP = ($0402); { set/increment loop counter }
  2808. ICM_CLEARLOOP = ($0403); { clear/decrement loop counter }
  2809. ICM_CHECKLOOP = ($0404); { set/increment loop }
  2810. { no parameters for ICM_SETLOOP, ICM_CLEARLOOP, ICM_CHECKLOOP }
  2811. { interconnection attributes used by icclass, modelclass, and gadgetclass }
  2812. ICA_Dummy = (TAG_USER+$40000);
  2813. ICA_TARGET = (ICA_Dummy + 1);
  2814. { interconnection target }
  2815. ICA_MAP = (ICA_Dummy + 2);
  2816. { interconnection map tagitem list }
  2817. ICSPECIAL_CODE = (ICA_Dummy + 3);
  2818. { a "pseudo-attribute", see below. }
  2819. { Normally, the value for ICA_TARGET is some object pointer,
  2820. * but if you specify the special value ICTARGET_IDCMP, notification
  2821. * will be send as an IDCMP_IDCMPUPDATE message to the appropriate window's
  2822. * IDCMP port. See the definition of IDCMP_IDCMPUPDATE.
  2823. *
  2824. * When you specify ICTARGET_IDCMP for ICA_TARGET, the map you
  2825. * specify will be applied to derive the attribute list that is
  2826. * sent with the IDCMP_IDCMPUPDATE message. If you specify a map list
  2827. * which results in the attribute tag id ICSPECIAL_CODE, the
  2828. * lower sixteen bits of the corresponding ti_Data value will
  2829. * be copied into the Code field of the IDCMP_IDCMPUPDATE IntuiMessage.
  2830. }
  2831. ICTARGET_IDCMP = (NOT 0);
  2832. CONST
  2833. CUSTOMIMAGEDEPTH = (-1);
  2834. { if image.Depth is this, it's a new Image class object }
  2835. {****************************************************}
  2836. CONST
  2837. IA_Dummy = (TAG_USER + $20000);
  2838. IA_Left = (IA_Dummy + $01);
  2839. IA_Top = (IA_Dummy + $02);
  2840. IA_Width = (IA_Dummy + $03);
  2841. IA_Height = (IA_Dummy + $04);
  2842. IA_FGPen = (IA_Dummy + $05);
  2843. { IA_FGPen also means "PlanePick" }
  2844. IA_BGPen = (IA_Dummy + $06);
  2845. { IA_BGPen also means "PlaneOnOff" }
  2846. IA_Data = (IA_Dummy + $07);
  2847. { bitplanes, for classic image,
  2848. * other image classes may use it for other things
  2849. }
  2850. IA_LineWidth = (IA_Dummy + $08);
  2851. IA_Pens = (IA_Dummy + $0E);
  2852. { pointer to UWORD pens[],
  2853. * ala DrawInfo.Pens, MUST be
  2854. * terminated by ~0. Some classes can
  2855. * choose to have this, or SYSIA_DrawInfo,
  2856. * or both.
  2857. }
  2858. IA_Resolution = (IA_Dummy + $0F);
  2859. { packed uwords for x/y resolution into a longword
  2860. * ala DrawInfo.Resolution
  2861. }
  2862. {*** see class documentation to learn which ****}
  2863. {*** classes recognize these ****}
  2864. IA_APattern = (IA_Dummy + $10);
  2865. IA_APatSize = (IA_Dummy + $11);
  2866. IA_Mode = (IA_Dummy + $12);
  2867. IA_Font = (IA_Dummy + $13);
  2868. IA_Outline = (IA_Dummy + $14);
  2869. IA_Recessed = (IA_Dummy + $15);
  2870. IA_DoubleEmboss = (IA_Dummy + $16);
  2871. IA_EdgesOnly = (IA_Dummy + $17);
  2872. {*** "sysiclass" attributes ****}
  2873. SYSIA_Size = (IA_Dummy + $0B);
  2874. { 's below }
  2875. SYSIA_Depth = (IA_Dummy + $0C);
  2876. { this is unused by Intuition. SYSIA_DrawInfo
  2877. * is used instead for V36
  2878. }
  2879. SYSIA_Which = (IA_Dummy + $0D);
  2880. { see 's below }
  2881. SYSIA_DrawInfo = (IA_Dummy + $18);
  2882. { pass to sysiclass, please }
  2883. {**** obsolete: don't use these, use IA_Pens ****}
  2884. SYSIA_Pens = IA_Pens;
  2885. IA_ShadowPen = (IA_Dummy + $09);
  2886. IA_HighlightPen = (IA_Dummy + $0A);
  2887. { New for V39: }
  2888. SYSIA_ReferenceFont = (IA_Dummy + $19);
  2889. { Font to use as reference for scaling
  2890. * certain sysiclass images
  2891. }
  2892. IA_SupportsDisable = (IA_Dummy + $1a);
  2893. { By default, Intuition ghosts gadgets itself,
  2894. * instead of relying on IDS_DISABLED or
  2895. * IDS_SELECTEDDISABLED. An imageclass that
  2896. * supports these states should return this attribute
  2897. * as TRUE. You cannot set or clear this attribute,
  2898. * however.
  2899. }
  2900. IA_FrameType = (IA_Dummy + $1b);
  2901. { Starting with V39, FrameIClass recognizes
  2902. * several standard types of frame. Use one
  2903. * of the FRAME_ specifiers below. Defaults
  2904. * to FRAME_DEFAULT.
  2905. }
  2906. IA_Underscore = IA_Dummy + $1c;
  2907. { V44, Indicate underscore keyboard shortcut for image labels.
  2908. (UBYTE) Defaults to '_'
  2909. }
  2910. IA_Scalable = IA_Dummy + $1d;
  2911. { V44, Attribute indicates this image is allowed
  2912. to/can scale its rendering.
  2913. (BOOL) Defaults to FALSE.
  2914. }
  2915. IA_ActivateKey = IA_Dummy + $1e;
  2916. { V44, Used to get an underscored label shortcut.
  2917. Useful for labels attached to string gadgets.
  2918. (UBYTE) Defaults to NULL.
  2919. }
  2920. IA_Screen = IA_Dummy + $1f;
  2921. { V44 Screen pointer, may be useful/required by certain classes.
  2922. (struct Screen )
  2923. }
  2924. IA_Precision = IA_Dummy + $20;
  2925. { V44 Precision value, typically pen precision but may be
  2926. used for similar custom purposes.
  2927. (ULONG)
  2928. }
  2929. {* next attribute: (IA_Dummy + $1c) *}
  2930. {***********************************************}
  2931. { data values for SYSIA_Size }
  2932. SYSISIZE_MEDRES = (0);
  2933. SYSISIZE_LOWRES = (1);
  2934. SYSISIZE_HIRES = (2);
  2935. {
  2936. * SYSIA_Which tag data values:
  2937. * Specifies which system gadget you want an image for.
  2938. * Some numbers correspond to internal Intuition s
  2939. }
  2940. DEPTHIMAGE = ($00);
  2941. ZOOMIMAGE = ($01);
  2942. SIZEIMAGE = ($02);
  2943. CLOSEIMAGE = ($03);
  2944. SDEPTHIMAGE = ($05); { screen depth gadget }
  2945. LEFTIMAGE = ($0A);
  2946. UPIMAGE = ($0B);
  2947. RIGHTIMAGE = ($0C);
  2948. DOWNIMAGE = ($0D);
  2949. CHECKIMAGE = ($0E);
  2950. MXIMAGE = ($0F); { mutual exclude "button" }
  2951. {* New for V39: *}
  2952. MENUCHECK = ($10); { Menu checkmark image }
  2953. AMIGAKEY = ($11); { Menu Amiga-key image }
  2954. { Data values for IA_FrameType (recognized by FrameIClass)
  2955. *
  2956. * FRAME_DEFAULT: The standard V37-type frame, which has
  2957. * thin edges.
  2958. * FRAME_BUTTON: Standard button gadget frames, having thicker
  2959. * sides and nicely edged corners.
  2960. * FRAME_RIDGE: A ridge such as used by standard string gadgets.
  2961. * You can recess the ridge to get a groove image.
  2962. * FRAME_ICONDROPBOX: A broad ridge which is the standard imagery
  2963. * for areas in AppWindows where icons may be dropped.
  2964. }
  2965. FRAME_DEFAULT = 0;
  2966. FRAME_BUTTON = 1;
  2967. FRAME_RIDGE = 2;
  2968. FRAME_ICONDROPBOX = 3;
  2969. { image message id's }
  2970. IM_DRAW = $202; { draw yourself, with "state" }
  2971. IM_HITTEST = $203; { return TRUE IF click hits image }
  2972. IM_ERASE = $204; { erase yourself }
  2973. IM_MOVE = $205; { draw new AND erase old, smoothly }
  2974. IM_DRAWFRAME= $206; { draw with specified dimensions }
  2975. IM_FRAMEBOX = $207; { get recommended frame around some box}
  2976. IM_HITFRAME = $208; { hittest with dimensions }
  2977. IM_ERASEFRAME= $209; { hittest with dimensions }
  2978. IM_DOMAINFRAME = $20A;{ query image for its domain info (V44) }
  2979. { image draw states or styles, for IM_DRAW }
  2980. IDS_NORMAL = (0);
  2981. IDS_SELECTED = (1); { for selected gadgets }
  2982. IDS_DISABLED = (2); { for disabled gadgets }
  2983. IDS_BUSY = (3); { for future functionality }
  2984. IDS_INDETERMINATE = (4); { for future functionality }
  2985. IDS_INACTIVENORMAL = (5); { normal, in inactive window border }
  2986. IDS_INACTIVESELECTED= (6); { selected, in inactive border }
  2987. IDS_INACTIVEDISABLED= (7); { disabled, in inactive border }
  2988. IDS_SELECTEDDISABLED = 8; { disabled and selected }
  2989. { oops, please forgive spelling error by jimm }
  2990. IDS_INDETERMINANT = IDS_INDETERMINATE;
  2991. { IM_FRAMEBOX }
  2992. Type
  2993. pimpFrameBox = ^timpFrameBox;
  2994. timpFrameBox = record
  2995. MethodID : ULONG;
  2996. imp_ContentsBox : pIBox; { input: relative box of contents }
  2997. imp_FrameBox : pIBox; { output: rel. box of encl frame }
  2998. imp_DrInfo : pDrawInfo;
  2999. imp_FrameFlags : ULONG;
  3000. END;
  3001. CONST
  3002. FRAMEF_SPECIFY = (1); { Make do with the dimensions of FrameBox
  3003. * provided.
  3004. }
  3005. { IM_DRAW, IM_DRAWFRAME }
  3006. Type
  3007. pimpDraw = ^timpDraw;
  3008. timpDraw = record
  3009. MethodID : ULONG;
  3010. imp_RPort : pRastPort;
  3011. imp_Offset : record
  3012. x : Word;
  3013. y : Word;
  3014. end;
  3015. imp_State : ULONG;
  3016. imp_DrInfo : pDrawInfo;
  3017. { these parameters only valid for IM_DRAWFRAME }
  3018. imp_Dimensions : record
  3019. Width : Word;
  3020. Height : Word;
  3021. end;
  3022. END;
  3023. { IM_ERASE, IM_ERASEFRAME }
  3024. { NOTE: This is a subset of impDraw }
  3025. pimpErase = ^timpErase;
  3026. timpErase = record
  3027. MethodID : ULONG;
  3028. imp_RPort : pRastPort;
  3029. imp_Offset : record
  3030. x : Word;
  3031. y : Word;
  3032. end;
  3033. { these parameters only valid for IM_ERASEFRAME }
  3034. imp_Dimensions : record
  3035. Width : Word;
  3036. Height : Word;
  3037. end;
  3038. END;
  3039. { IM_HITTEST, IM_HITFRAME }
  3040. pimpHitTest = ^timpHitTest;
  3041. timpHitTest = record
  3042. MethodID : ULONG;
  3043. imp_Point : record
  3044. x : Word;
  3045. y : Word;
  3046. end;
  3047. { these parameters only valid for IM_HITFRAME }
  3048. imp_Dimensions : record
  3049. Width : Word;
  3050. Height : Word;
  3051. end;
  3052. END;
  3053. { The IM_DOMAINFRAME method is used to obtain the sizing
  3054. * requirements of an image object within a layout group.
  3055. }
  3056. { IM_DOMAINFRAME }
  3057. PimpDomainFrame = ^timpDomainFrame;
  3058. timpDomainFrame = record
  3059. MethodID : ULONG;
  3060. imp_DrInfo : PDrawInfo;
  3061. imp_RPort : PRastPort;
  3062. imp_Which : LONG;
  3063. imp_Domain : tIBox;
  3064. imp_Attrs : PTagItem;
  3065. end;
  3066. { Accepted vales for imp_Which.
  3067. }
  3068. const
  3069. IDOMAIN_MINIMUM = 0;
  3070. IDOMAIN_NOMINAL = 1;
  3071. IDOMAIN_MAXIMUM = 2;
  3072. { ** 'boopsi' pointer class interface }
  3073. const
  3074. { The following tags are recognized at NewObject() time by
  3075. * pointerclass:
  3076. *
  3077. * POINTERA_BitMap (struct BitMap *) - Pointer to bitmap to
  3078. * get pointer imagery from. Bitplane data need not be
  3079. * in chip RAM.
  3080. * POINTERA_XOffset (LONG) - X-offset of the pointer hotspot.
  3081. * POINTERA_YOffset (LONG) - Y-offset of the pointer hotspot.
  3082. * POINTERA_WordWidth (ULONG) - designed width of the pointer in words
  3083. * POINTERA_XResolution (ULONG) - one of the POINTERXRESN_ flags below
  3084. * POINTERA_YResolution (ULONG) - one of the POINTERYRESN_ flags below
  3085. *
  3086. }
  3087. POINTERA_Dummy = (TAG_USER + $39000);
  3088. POINTERA_BitMap = (POINTERA_Dummy + $01);
  3089. POINTERA_XOffset = (POINTERA_Dummy + $02);
  3090. POINTERA_YOffset = (POINTERA_Dummy + $03);
  3091. POINTERA_WordWidth = (POINTERA_Dummy + $04);
  3092. POINTERA_XResolution = (POINTERA_Dummy + $05);
  3093. POINTERA_YResolution = (POINTERA_Dummy + $06);
  3094. { These are the choices for the POINTERA_XResolution attribute which
  3095. * will determine what resolution pixels are used for this pointer.
  3096. *
  3097. * POINTERXRESN_DEFAULT (ECS-compatible pointer width)
  3098. * = 70 ns if SUPERHIRES-type mode, 140 ns if not
  3099. *
  3100. * POINTERXRESN_SCREENRES
  3101. * = Same as pixel speed of screen
  3102. *
  3103. * POINTERXRESN_LORES (pointer always in lores-like pixels)
  3104. * = 140 ns in 15kHz modes, 70 ns in 31kHz modes
  3105. *
  3106. * POINTERXRESN_HIRES (pointer always in hires-like pixels)
  3107. * = 70 ns in 15kHz modes, 35 ns in 31kHz modes
  3108. *
  3109. * POINTERXRESN_140NS (pointer always in 140 ns pixels)
  3110. * = 140 ns always
  3111. *
  3112. * POINTERXRESN_70NS (pointer always in 70 ns pixels)
  3113. * = 70 ns always
  3114. *
  3115. * POINTERXRESN_35NS (pointer always in 35 ns pixels)
  3116. * = 35 ns always
  3117. }
  3118. POINTERXRESN_DEFAULT = 0;
  3119. POINTERXRESN_140NS = 1;
  3120. POINTERXRESN_70NS = 2;
  3121. POINTERXRESN_35NS = 3;
  3122. POINTERXRESN_SCREENRES = 4;
  3123. POINTERXRESN_LORES = 5;
  3124. POINTERXRESN_HIRES = 6;
  3125. { These are the choices for the POINTERA_YResolution attribute which
  3126. * will determine what vertical resolution is used for this pointer.
  3127. *
  3128. * POINTERYRESN_DEFAULT
  3129. * = In 15 kHz modes, the pointer resolution will be the same
  3130. * as a non-interlaced screen. In 31 kHz modes, the pointer
  3131. * will be doubled vertically. This means there will be about
  3132. * 200-256 pointer lines per screen.
  3133. *
  3134. * POINTERYRESN_HIGH
  3135. * POINTERYRESN_HIGHASPECT
  3136. * = Where the hardware/software supports it, the pointer resolution
  3137. * will be high. This means there will be about 400-480 pointer
  3138. * lines per screen. POINTERYRESN_HIGHASPECT also means that
  3139. * when the pointer comes out double-height due to hardware/software
  3140. * restrictions, its width would be doubled as well, if possible
  3141. * (to preserve aspect).
  3142. *
  3143. * POINTERYRESN_SCREENRES
  3144. * POINTERYRESN_SCREENRESASPECT
  3145. * = Will attempt to match the vertical resolution of the pointer
  3146. * to the screen's vertical resolution. POINTERYRESN_SCREENASPECT also
  3147. * means that when the pointer comes out double-height due to
  3148. * hardware/software restrictions, its width would be doubled as well,
  3149. * if possible (to preserve aspect).
  3150. *
  3151. }
  3152. POINTERYRESN_DEFAULT = 0;
  3153. POINTERYRESN_HIGH = 2;
  3154. POINTERYRESN_HIGHASPECT = 3;
  3155. POINTERYRESN_SCREENRES = 4;
  3156. POINTERYRESN_SCREENRESASPECT = 5;
  3157. { Compatibility note:
  3158. *
  3159. * The AA chipset supports variable sprite width and resolution, but
  3160. * the setting of width and resolution is global for all sprites.
  3161. * When no other sprites are in use, Intuition controls the sprite
  3162. * width and sprite resolution for correctness based on pointerclass
  3163. * attributes specified by the creator of the pointer. Intuition
  3164. * controls sprite resolution with the VTAG_DEFSPRITERESN_SET tag
  3165. * to VideoControl(). Applications can override this on a per-viewport
  3166. * basis with the VTAG_SPRITERESN_SET tag to VideoControl().
  3167. *
  3168. * If an application uses a sprite other than the pointer sprite,
  3169. * Intuition will automatically regenerate the pointer sprite's image in
  3170. * a compatible width. This might involve BitMap scaling of the imagery
  3171. * you supply.
  3172. *
  3173. * If any sprites other than the pointer sprite were obtained with the
  3174. * old GetSprite() call, Intuition assumes that the owner of those
  3175. * sprites is unaware of sprite resolution, hence Intuition will set the
  3176. * default sprite resolution (VTAG_DEFSPRITERESN_SET) to ECS-compatible,
  3177. * instead of as requested by the various pointerclass attributes.
  3178. *
  3179. * No resolution fallback occurs when applications use ExtSprites.
  3180. * Such applications are expected to use VTAG_SPRITERESN_SET tag if
  3181. * necessary.
  3182. *
  3183. * NB: Under release V39, only sprite width compatibility is implemented.
  3184. * Sprite resolution compatibility was added for V40.
  3185. }
  3186. Type
  3187. pStringExtend = ^tStringExtend;
  3188. tStringExtend = record
  3189. { display specifications }
  3190. Font : pTextFont; { must be an open Font (not TextAttr) }
  3191. Pens : Array[0..1] of Byte; { color of text/backgroun }
  3192. ActivePens : Array[0..1] of Byte; { colors when gadget is active }
  3193. { edit specifications }
  3194. InitialModes : ULONG; { initial mode flags, below }
  3195. EditHook : pHook; { IF non-NULL, must supply WorkBuffer }
  3196. WorkBuffer : STRPTR; { must be as large as StringInfo.Buffer}
  3197. Reserved : Array[0..3] of ULONG; { set to 0 }
  3198. END;
  3199. pSGWork = ^tSGWork;
  3200. tSGWork = record
  3201. { set up when gadget is first activated }
  3202. Gad : pGadget; { the contestant itself } { Gadget in C-Includes }
  3203. StrInfo : pStringInfo; { easy access to sinfo } { StrInfo in C-Includes }
  3204. WorkBuffer : STRPTR; { intuition's planned result }
  3205. PrevBuffer : STRPTR; { what was there before }
  3206. Modes : ULONG; { current mode }
  3207. { modified for each input event }
  3208. IEvent : pInputEvent; { actual event: do not change }
  3209. Code : Word; { character code, IF one byte }
  3210. BufferPos : smallint; { cursor position }
  3211. NumChars : smallint;
  3212. Actions : ULONG; { what Intuition will do }
  3213. LongInt_ : Longint; { temp storage for longint }
  3214. GInfo : pGadgetInfo; { see cghooks.h } { GadgetInfo in C-Includes }
  3215. EditOp : Word; { from constants below }
  3216. END;
  3217. { SGWork.EditOp -
  3218. * These values indicate what basic type of operation the global
  3219. * editing hook has performed on the string before your gadget's custom
  3220. * editing hook gets called. You do not have to be concerned with the
  3221. * value your custom hook leaves in the EditOp field, only if you
  3222. * write a global editing hook.
  3223. *
  3224. * For most of these general edit operations, you'll want to compare
  3225. * the BufferPos and NumChars of the StringInfo (before global editing)
  3226. * and SGWork (after global editing).
  3227. }
  3228. CONST
  3229. EO_NOOP = ($0001);
  3230. { did nothing }
  3231. EO_DELBACKWARD= ($0002);
  3232. { deleted some chars (maybe 0). }
  3233. EO_DELFORWARD = ($0003);
  3234. { deleted some characters under and in front of the cursor }
  3235. EO_MOVECURSOR = ($0004);
  3236. { moved the cursor }
  3237. EO_ENTER = ($0005);
  3238. { "enter" or "return" key, terminate }
  3239. EO_RESET = ($0006);
  3240. { current Intuition-style undo }
  3241. EO_REPLACECHAR= ($0007);
  3242. { replaced one character and (maybe) advanced cursor }
  3243. EO_INSERTCHAR = ($0008);
  3244. { inserted one char into string or added one at end }
  3245. EO_BADFORMAT = ($0009);
  3246. { didn't like the text data, e.g., Bad LONGINT }
  3247. EO_BIGCHANGE = ($000A); { unused by Intuition }
  3248. { complete or major change to the text, e.g. new string }
  3249. EO_UNDO = ($000B); { unused by Intuition }
  3250. { some other style of undo }
  3251. EO_CLEAR = ($000C);
  3252. { clear the string }
  3253. EO_SPECIAL = ($000D); { unused by Intuition }
  3254. { some operation that doesn't fit into the categories here }
  3255. { Mode Flags definitions (ONLY first group allowed as InitialModes) }
  3256. SGM_REPLACE = (1); { replace mode }
  3257. { please initialize StringInfo with in-range value of BufferPos
  3258. * if you are using SGM_REPLACE mode.
  3259. }
  3260. SGM_FIXEDFIELD = (2); { fixed length buffer }
  3261. { always set SGM_REPLACE, too }
  3262. SGM_NOFILTER = (4); { don't filter control chars }
  3263. { SGM_EXITHELP is new for V37, and ignored by V36: }
  3264. SGM_EXITHELP = (128); { exit with code = $5F IF HELP hit }
  3265. { These Mode Flags are for internal use only }
  3266. SGM_NOCHANGE = (8); { no edit changes yet }
  3267. SGM_NOWORKB = (16); { Buffer == PrevBuffer }
  3268. SGM_CONTROL = (32); { control char escape mode }
  3269. SGM_LONGINT = (64); { an intuition longint gadget }
  3270. { String Gadget Action Flags (put in SGWork.Actions by EditHook) }
  3271. SGA_USE = ($1); { use contents of SGWork }
  3272. SGA_END = ($2); { terminate gadget, code in Code field }
  3273. SGA_BEEP = ($4); { flash the screen for the user }
  3274. SGA_REUSE = ($8); { reuse input event }
  3275. SGA_REDISPLAY = ($10); { gadget visuals changed }
  3276. { New for V37: }
  3277. SGA_NEXTACTIVE = ($20); { Make next possible gadget active. }
  3278. SGA_PREVACTIVE = ($40); { Make previous possible gadget active.}
  3279. { function id for only existing custom string gadget edit hook }
  3280. SGH_KEY = (1); { process editing keystroke }
  3281. SGH_CLICK = (2); { process mouse click cursor position }
  3282. { Here's a brief summary of how the custom string gadget edit hook works:
  3283. * You provide a hook in StringInfo.Extension.EditHook.
  3284. * The hook is called in the standard way with the 'object'
  3285. * a pointer to SGWork, and the 'message' a pointer to a command
  3286. * block, starting either with (longword) SGH_KEY, SGH_CLICK,
  3287. * or something new.
  3288. *
  3289. * You return 0 if you don't understand the command (SGH_KEY is
  3290. * required and assumed). Return non-zero if you implement the
  3291. * command.
  3292. *
  3293. * SGH_KEY:
  3294. * There are no parameters following the command longword.
  3295. *
  3296. * Intuition will put its idea of proper values in the SGWork
  3297. * before calling you, and if you leave SGA_USE set in the
  3298. * SGWork.Actions field, Intuition will use the values
  3299. * found in SGWork fields WorkBuffer, NumChars, BufferPos,
  3300. * and LongInt, copying the WorkBuffer back to the StringInfo
  3301. * Buffer.
  3302. *
  3303. * NOTE WELL: You may NOT change other SGWork fields.
  3304. *
  3305. * If you clear SGA_USE, the string gadget will be unchanged.
  3306. *
  3307. * If you set SGA_END, Intuition will terminate the activation
  3308. * of the string gadget. If you also set SGA_REUSE, Intuition
  3309. * will reuse the input event after it deactivates your gadget.
  3310. *
  3311. * In this case, Intuition will put the value found in SGWork.Code
  3312. * into the IntuiMessage.Code field of the IDCMP_GADGETUP message it
  3313. * sends to the application.
  3314. *
  3315. * If you set SGA_BEEP, Intuition will call DisplayBeep(); use
  3316. * this if the user has typed in error, or buffer is full.
  3317. *
  3318. * Set SGA_REDISPLAY if the changes to the gadget warrant a
  3319. * gadget redisplay. Note: cursor movement requires a redisplay.
  3320. *
  3321. * Starting in V37, you may set SGA_PREVACTIVE or SGA_NEXTACTIVE
  3322. * when you set SGA_END. This tells Intuition that you want
  3323. * the next or previous gadget with GFLG_TABCYCLE to be activated.
  3324. *
  3325. * SGH_CLICK:
  3326. * This hook command is called when Intuition wants to position
  3327. * the cursor in response to a mouse click in the string gadget.
  3328. *
  3329. * Again, here are no parameters following the command longword.
  3330. *
  3331. * This time, Intuition has already calculated the mouse position
  3332. * character cell and put it in SGWork.BufferPos. The previous
  3333. * BufferPos value remains in the SGWork.StringInfo.BufferPos.
  3334. *
  3335. * Intuition will again use the SGWork fields listed above for
  3336. * SGH_KEY. One restriction is that you are NOT allowed to set
  3337. * SGA_END or SGA_REUSE for this command. Intuition will not
  3338. * stand for a gadget which goes inactive when you click in it.
  3339. *
  3340. * You should always leave the SGA_REDISPLAY flag set, since Intuition
  3341. * uses this processing when activating a string gadget.
  3342. }
  3343. FUNCTION ActivateGadget(gadgets : pGadget; window : pWindow; requester : pRequester) : BOOLEAN;
  3344. PROCEDURE ActivateWindow(window : pWindow);
  3345. PROCEDURE AddClass(classPtr : pIClass);
  3346. FUNCTION AddGadget(window : pWindow; gadget : pGadget; position : ULONG) : WORD;
  3347. FUNCTION AddGList(window : pWindow; gadget : pGadget; position : ULONG; numGad : LONGINT; requester : pRequester) : WORD;
  3348. FUNCTION AllocRemember(VAR rememberKey : pRemember; size : ULONG; flags : ULONG) : POINTER;
  3349. FUNCTION AllocScreenBuffer(sc : pScreen; bm : pBitMap; flags : ULONG) : pScreenBuffer;
  3350. FUNCTION AutoRequest(window : pWindow;const body : pIntuiText;const posText : pIntuiText;const negText : pIntuiText; pFlag : ULONG; nFlag : ULONG; width : ULONG; height : ULONG) : BOOLEAN;
  3351. PROCEDURE BeginRefresh(window : pWindow);
  3352. FUNCTION BuildEasyRequestArgs(window : pWindow;const easyStruct : pEasyStruct; idcmp : ULONG;const args : POINTER) : pWindow;
  3353. FUNCTION BuildSysRequest(window : pWindow;const body : pIntuiText;const posText : pIntuiText;const negText : pIntuiText; flags : ULONG; width : ULONG; height : ULONG) : pWindow;
  3354. FUNCTION ChangeScreenBuffer(sc : pScreen; sb : pScreenBuffer) : ULONG;
  3355. PROCEDURE ChangeWindowBox(window : pWindow; left : LONGINT; top : LONGINT; width : LONGINT; height : LONGINT);
  3356. FUNCTION ClearDMRequest(window : pWindow) : BOOLEAN;
  3357. PROCEDURE ClearMenuStrip(window : pWindow);
  3358. PROCEDURE ClearPointer(window : pWindow);
  3359. PROCEDURE CloseScreen(screen : pScreen);
  3360. PROCEDURE CloseWindow(window : pWindow);
  3361. FUNCTION CloseWorkBench : BOOLEAN;
  3362. PROCEDURE CurrentTime(VAR seconds : ULONG; VAR micros : ULONG);
  3363. FUNCTION DisplayAlert(alertNumber : ULONG;const string_ : pCHAR; height : ULONG) : BOOLEAN;
  3364. PROCEDURE DisplayBeep(screen : pScreen);
  3365. PROCEDURE DisposeObject(obj : POINTER);
  3366. FUNCTION DoGadgetMethodA(gad : pGadget; win : pWindow; req : pRequester; message : tMsg) : ULONG;
  3367. FUNCTION DoubleClick(sSeconds : ULONG; sMicros : ULONG; cSeconds : ULONG; cMicros : ULONG) : BOOLEAN;
  3368. PROCEDURE DrawBorder(rp : pRastPort;const border : pBorder; leftOffset : LONGINT; topOffset : LONGINT);
  3369. PROCEDURE DrawImage(rp : pRastPort; image : pImage; leftOffset : LONGINT; topOffset : LONGINT);
  3370. PROCEDURE DrawImageState(rp : pRastPort; image : pImage; leftOffset : LONGINT; topOffset : LONGINT; state : ULONG;const drawInfo : pDrawInfo);
  3371. FUNCTION EasyRequestArgs(window : pWindow;const easyStruct : pEasyStruct; idcmpPtr : pULONG;const args : POINTER) : LONGINT;
  3372. PROCEDURE EndRefresh(window : pWindow; complete : LONGINT);
  3373. PROCEDURE EndRequest(requester : pRequester; window : pWindow);
  3374. PROCEDURE EraseImage(rp : pRastPort; image : pImage; leftOffset : LONGINT; topOffset : LONGINT);
  3375. FUNCTION FreeClass(classPtr : pIClass) : BOOLEAN;
  3376. PROCEDURE FreeRemember(VAR rememberKey : pRemember; reallyForget : LONGINT);
  3377. PROCEDURE FreeScreenBuffer(sc : pScreen; sb : pScreenBuffer);
  3378. PROCEDURE FreeScreenDrawInfo(screen : pScreen; drawInfo : pDrawInfo);
  3379. PROCEDURE FreeSysRequest(window : pWindow);
  3380. PROCEDURE GadgetMouse(gadget : pGadget; gInfo : pGadgetInfo; mousePoint : psmallint);
  3381. FUNCTION GetAttr(attrID : ULONG; obj : POINTER; storagePtr : pULONG) : ULONG;
  3382. PROCEDURE GetDefaultPubScreen(nameBuffer : pCHAR);
  3383. FUNCTION GetDefPrefs(preferences : pPreferences; size : LONGINT) : pPreferences;
  3384. FUNCTION GetPrefs(preferences : pPreferences; size : LONGINT) : pPreferences;
  3385. FUNCTION GetScreenData(buffer : POINTER; size : ULONG; type_ : ULONG;const screen : pScreen) : BOOLEAN;
  3386. FUNCTION GetScreenDrawInfo(screen : pScreen) : pDrawInfo;
  3387. PROCEDURE HelpControl(win : pWindow; flags : ULONG);
  3388. PROCEDURE InitRequester(requester : pRequester);
  3389. FUNCTION IntuiTextLength(const iText : pIntuiText) : LONGINT;
  3390. FUNCTION ItemAddress(const menuStrip : pMenu; menuNumber : ULONG) : pMenuItem;
  3391. PROCEDURE LendMenus(fromwindow : pWindow; towindow : pWindow);
  3392. FUNCTION LockIBase(dontknow : ULONG) : ULONG;
  3393. FUNCTION LockPubScreen(const name : pCHAR) : pScreen;
  3394. FUNCTION LockPubScreenList : pList;
  3395. FUNCTION MakeClass(const classID : pCHAR;const superClassID : pCHAR;const superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
  3396. FUNCTION MakeScreen(screen : pScreen) : LONGINT;
  3397. FUNCTION ModifyIDCMP(window : pWindow; flags : ULONG) : BOOLEAN;
  3398. PROCEDURE ModifyProp(gadget : pGadget; window : pWindow; requester : pRequester; flags : ULONG; horizPot : ULONG; vertPot : ULONG; horizBody : ULONG; vertBody : ULONG);
  3399. PROCEDURE MoveScreen(screen : pScreen; dx : LONGINT; dy : LONGINT);
  3400. PROCEDURE MoveWindow(window : pWindow; dx : LONGINT; dy : LONGINT);
  3401. PROCEDURE MoveWindowInFrontOf(window : pWindow; behindWindow : pWindow);
  3402. PROCEDURE NewModifyProp(gadget : pGadget; window : pWindow; requester : pRequester; flags : ULONG; horizPot : ULONG; vertPot : ULONG; horizBody : ULONG; vertBody : ULONG; numGad : LONGINT);
  3403. FUNCTION NewObjectA(classPtr : pIClass;const classID : pCHAR;const tagList : pTagItem) : POINTER;
  3404. FUNCTION NextObject(objectPtrPtr : POINTER) : POINTER;
  3405. FUNCTION NextPubScreen(const screen : pScreen; namebuf : pCHAR) : pCHAR;
  3406. FUNCTION ObtainGIRPort(gInfo : pGadgetInfo) : pRastPort;
  3407. PROCEDURE OffGadget(gadget : pGadget; window : pWindow; requester : pRequester);
  3408. PROCEDURE OffMenu(window : pWindow; menuNumber : ULONG);
  3409. PROCEDURE OnGadget(gadget : pGadget; window : pWindow; requester : pRequester);
  3410. PROCEDURE OnMenu(window : pWindow; menuNumber : ULONG);
  3411. FUNCTION OpenScreen(const newScreen : pNewScreen) : pScreen;
  3412. FUNCTION OpenScreenTagList(const newScreen : pNewScreen;const tagList : pTagItem) : pScreen;
  3413. FUNCTION OpenWindow(const newWindow : pNewWindow) : pWindow;
  3414. FUNCTION OpenWindowTagList(const newWindow : pNewWindow;const tagList : pTagItem) : pWindow;
  3415. FUNCTION OpenWorkBench : ULONG;
  3416. FUNCTION PointInImage(point : ULONG; image : pImage) : BOOLEAN;
  3417. PROCEDURE PrintIText(rp : pRastPort;const iText : pIntuiText; left : LONGINT; top : LONGINT);
  3418. FUNCTION PubScreenStatus(screen : pScreen; statusFlags : ULONG) : WORD;
  3419. FUNCTION QueryOverscan(displayID : ULONG; rect : pRectangle; oScanType : LONGINT) : LONGINT;
  3420. PROCEDURE RefreshGadgets(gadgets : pGadget; window : pWindow; requester : pRequester);
  3421. PROCEDURE RefreshGList(gadgets : pGadget; window : pWindow; requester : pRequester; numGad : LONGINT);
  3422. PROCEDURE RefreshWindowFrame(window : pWindow);
  3423. PROCEDURE ReleaseGIRPort(rp : pRastPort);
  3424. FUNCTION RemakeDisplay : LONGINT;
  3425. PROCEDURE RemoveClass(classPtr : pIClass);
  3426. FUNCTION RemoveGadget(window : pWindow; gadget : pGadget) : WORD;
  3427. FUNCTION RemoveGList(remPtr : pWindow; gadget : pGadget; numGad : LONGINT) : WORD;
  3428. PROCEDURE ReportMouse(flag : LONGINT; window : pWindow);
  3429. FUNCTION Request(requester : pRequester; window : pWindow) : BOOLEAN;
  3430. FUNCTION ResetMenuStrip(window : pWindow; menu : pMenu) : BOOLEAN;
  3431. FUNCTION RethinkDisplay : LONGINT;
  3432. PROCEDURE ScreenDepth(screen : pScreen; flags : ULONG; reserved : POINTER);
  3433. PROCEDURE ScreenPosition(screen : pScreen; flags : ULONG; x1 : LONGINT; y1 : LONGINT; x2 : LONGINT; y2 : LONGINT);
  3434. PROCEDURE ScreenToBack(screen : pScreen);
  3435. PROCEDURE ScreenToFront(screen : pScreen);
  3436. PROCEDURE ScrollWindowRaster(win : pWindow; dx : LONGINT; dy : LONGINT; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
  3437. FUNCTION SetAttrsA(obj : POINTER;const tagList : pTagItem) : ULONG;
  3438. PROCEDURE SetDefaultPubScreen(const name : pCHAR);
  3439. FUNCTION SetDMRequest(window : pWindow; requester : pRequester) : BOOLEAN;
  3440. FUNCTION SetEditHook(hook : pHook) : pHook;
  3441. FUNCTION SetGadgetAttrsA(gadget : pGadget; window : pWindow; requester : pRequester;const tagList : pTagItem) : ULONG;
  3442. FUNCTION SetMenuStrip(window : pWindow; menu : pMenu) : BOOLEAN;
  3443. FUNCTION SetMouseQueue(window : pWindow; queueLength : ULONG) : LONGINT;
  3444. PROCEDURE SetPointer(window : pWindow; pointer_ : pword; height : LONGINT; width : LONGINT; xOffset : LONGINT; yOffset : LONGINT);
  3445. FUNCTION SetPrefs(const preferences : pPreferences; size : LONGINT; inform : LONGINT) : pPreferences;
  3446. FUNCTION SetPubScreenModes(modes : ULONG) : WORD;
  3447. PROCEDURE SetWindowPointerA(win : pWindow;const taglist : pTagItem);
  3448. PROCEDURE SetWindowTitles(window : pWindow;const windowTitle : pCHAR;const screenTitle : pCHAR);
  3449. PROCEDURE ShowTitle(screen : pScreen; showIt : LONGINT);
  3450. PROCEDURE SizeWindow(window : pWindow; dx : LONGINT; dy : LONGINT);
  3451. FUNCTION SysReqHandler(window : pWindow; idcmpPtr : pULONG; waitInput : LONGINT) : LONGINT;
  3452. FUNCTION TimedDisplayAlert(alertNumber : ULONG;const string_ : pCHAR; height : ULONG; time : ULONG) : BOOLEAN;
  3453. PROCEDURE UnlockIBase(ibLock : ULONG);
  3454. PROCEDURE UnlockPubScreen(const name : pCHAR; screen : pScreen);
  3455. PROCEDURE UnlockPubScreenList;
  3456. FUNCTION ViewAddress : pView;
  3457. FUNCTION ViewPortAddress(const window : pWindow) : pViewPort;
  3458. FUNCTION WBenchToBack : BOOLEAN;
  3459. FUNCTION WBenchToFront : BOOLEAN;
  3460. FUNCTION WindowLimits(window : pWindow; widthMin : LONGINT; heightMin : LONGINT; widthMax : ULONG; heightMax : ULONG) : BOOLEAN;
  3461. PROCEDURE WindowToBack(window : pWindow);
  3462. PROCEDURE WindowToFront(window : pWindow);
  3463. PROCEDURE ZipWindow(window : pWindow);
  3464. { Intuition macros }
  3465. function INST_DATA (cl: pIClass; o: p_Object): Pointer;
  3466. function SIZEOF_INSTANCE (cl: pIClass): Longint;
  3467. function BASEOBJECT (o: p_Object): Pointer;
  3468. function _OBJ(o: p_Object): p_Object;
  3469. function __OBJECT (o: Pointer): p_Object;
  3470. function OCLASS (o: Pointer): pIClass;
  3471. function SHIFTITEM (n: smallint): word;
  3472. function SHIFTMENU (n: smallint): word;
  3473. function SHIFTSUB (n: smallint): word;
  3474. function FULLMENUNUM (menu, item, sub: smallint): word;
  3475. function IM_BGPEN (im: pImage): byte;
  3476. function IM_BOX (im: pImage): pIBox;
  3477. function IM_FGPEN (im: pImage): byte;
  3478. function GADGET_BOX (g: pGadget): pIBox;
  3479. function CUSTOM_HOOK (gadget: pGadget): pHook;
  3480. function ITEMNUM( n : Word): Word;
  3481. function MENUNUM( n : Word): Word;
  3482. function SUBNUM( n : Word): Word;
  3483. FUNCTION DisplayAlert(alertNumber : ULONG;const string_ : string; height : ULONG) : BOOLEAN;
  3484. FUNCTION LockPubScreen(const name : string) : pScreen;
  3485. FUNCTION MakeClass(const classID : string;const superClassID : pCHAR;const superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
  3486. FUNCTION MakeClass(const classID : pCHAR;const superClassID : string;const superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
  3487. FUNCTION MakeClass(const classID : string;const superClassID : string;const superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
  3488. FUNCTION NewObjectA(classPtr : pIClass;const classID : string;const tagList : pTagItem) : POINTER;
  3489. PROCEDURE SetDefaultPubScreen(const name : string);
  3490. PROCEDURE SetWindowTitles(window : pWindow;const windowTitle : string;const screenTitle : pCHAR);
  3491. PROCEDURE SetWindowTitles(window : pWindow;const windowTitle : pCHAR;const screenTitle : string);
  3492. PROCEDURE SetWindowTitles(window : pWindow;const windowTitle : string;const screenTitle : string);
  3493. FUNCTION TimedDisplayAlert(alertNumber : ULONG;const string_ : string; height : ULONG; time : ULONG) : BOOLEAN;
  3494. PROCEDURE UnlockPubScreen(const name : string; screen : pScreen);
  3495. IMPLEMENTATION
  3496. uses pastoc;
  3497. function INST_DATA (cl: pIClass; o: p_Object): Pointer;
  3498. begin
  3499. INST_DATA := Pointer(Longint(o) + cl^.cl_InstOffset);
  3500. end;
  3501. function SIZEOF_INSTANCE (cl: pIClass): Longint;
  3502. begin
  3503. SIZEOF_INSTANCE := cl^.cl_InstOffset + cl^.cl_InstSize + sizeof(t_Object);
  3504. end;
  3505. function BASEOBJECT (o: p_Object): Pointer;
  3506. begin
  3507. BASEOBJECT := Pointer(Longint(o) + sizeof(t_Object));
  3508. end;
  3509. function _OBJ(o: p_Object): p_Object;
  3510. begin
  3511. _OBJ := p_Object(o);
  3512. END;
  3513. function __OBJECT (o: Pointer): p_Object;
  3514. begin
  3515. __OBJECT := p_Object(Longint(o) - sizeof(t_Object))
  3516. end;
  3517. function OCLASS (o: Pointer): pIClass;
  3518. var
  3519. obj: p_Object;
  3520. begin
  3521. obj := p_Object(Longint(o) - sizeof(t_Object));
  3522. OCLASS := obj^.o_Class;
  3523. end;
  3524. function SHIFTITEM (n: smallint): word;
  3525. begin
  3526. SHIFTITEM := (n and $3f) shl 5
  3527. end;
  3528. function SHIFTMENU (n: smallint): word;
  3529. begin
  3530. SHIFTMENU := n and $1f
  3531. end;
  3532. function SHIFTSUB (n: smallint): word;
  3533. begin
  3534. SHIFTSUB := (n and $1f) shl 11
  3535. end;
  3536. function FULLMENUNUM (menu, item, sub: smallint): word;
  3537. begin
  3538. FULLMENUNUM := ((sub and $1f) shl 11) or
  3539. ((item and $3f) shl 5) or
  3540. (menu and $1f)
  3541. end;
  3542. { The next functons _BGPEN AND _FGPEN aren't a full replacement of the
  3543. C macros because the C preprocessor makes it possible to set the
  3544. A/BPen values of the image class objects as well. This can't work
  3545. in pascal, of course! }
  3546. function IM_BGPEN (im: pImage): byte;
  3547. begin
  3548. IM_BGPEN := im^.PlaneOnOff;
  3549. end;
  3550. function IM_BOX (im: pImage): pIBox;
  3551. begin
  3552. IM_BOX := pIBox(@im^.LeftEdge);
  3553. END;
  3554. function IM_FGPEN (im: pImage): byte;
  3555. begin
  3556. IM_FGPEN := im^.PlanePick;
  3557. end;
  3558. function GADGET_BOX (g: pGadget): pIBox;
  3559. begin
  3560. GADGET_BOX := pIBox(@g^.LeftEdge);
  3561. end;
  3562. function CUSTOM_HOOK (gadget: pGadget): pHook;
  3563. begin
  3564. CUSTOM_HOOK := pHook(gadget^.MutualExclude);
  3565. end;
  3566. function ITEMNUM( n : Word): Word;
  3567. begin
  3568. ITEMNUM := (n shr 5) and $3F
  3569. end;
  3570. function MENUNUM( n : Word): Word;
  3571. begin
  3572. MENUNUM := n and $1f
  3573. end;
  3574. function SUBNUM( n : Word): Word;
  3575. begin
  3576. SUBNUM := (n shr 11) and $1f
  3577. end;
  3578. FUNCTION ActivateGadget(gadgets : pGadget; window : pWindow; requester : pRequester) : BOOLEAN;
  3579. BEGIN
  3580. ASM
  3581. MOVE.L A6,-(A7)
  3582. MOVEA.L gadgets,A0
  3583. MOVEA.L window,A1
  3584. MOVEA.L requester,A2
  3585. MOVEA.L _IntuitionBase,A6
  3586. JSR -462(A6)
  3587. MOVEA.L (A7)+,A6
  3588. TST.W D0
  3589. BEQ.B @end
  3590. MOVEQ #1,D0
  3591. @end: MOVE.B D0,@RESULT
  3592. END;
  3593. END;
  3594. PROCEDURE ActivateWindow(window : pWindow);
  3595. BEGIN
  3596. ASM
  3597. MOVE.L A6,-(A7)
  3598. MOVEA.L window,A0
  3599. MOVEA.L _IntuitionBase,A6
  3600. JSR -450(A6)
  3601. MOVEA.L (A7)+,A6
  3602. END;
  3603. END;
  3604. PROCEDURE AddClass(classPtr : pIClass);
  3605. BEGIN
  3606. ASM
  3607. MOVE.L A6,-(A7)
  3608. MOVEA.L classPtr,A0
  3609. MOVEA.L _IntuitionBase,A6
  3610. JSR -684(A6)
  3611. MOVEA.L (A7)+,A6
  3612. END;
  3613. END;
  3614. FUNCTION AddGadget(window : pWindow; gadget : pGadget; position : ULONG) : WORD;
  3615. BEGIN
  3616. ASM
  3617. MOVE.L A6,-(A7)
  3618. MOVEA.L window,A0
  3619. MOVEA.L gadget,A1
  3620. MOVE.L position,D0
  3621. MOVEA.L _IntuitionBase,A6
  3622. JSR -042(A6)
  3623. MOVEA.L (A7)+,A6
  3624. MOVE.L D0,@RESULT
  3625. END;
  3626. END;
  3627. FUNCTION AddGList(window : pWindow; gadget : pGadget; position : ULONG; numGad : LONGINT; requester : pRequester) : WORD;
  3628. BEGIN
  3629. ASM
  3630. MOVE.L A6,-(A7)
  3631. MOVEA.L window,A0
  3632. MOVEA.L gadget,A1
  3633. MOVE.L position,D0
  3634. MOVE.L numGad,D1
  3635. MOVEA.L requester,A2
  3636. MOVEA.L _IntuitionBase,A6
  3637. JSR -438(A6)
  3638. MOVEA.L (A7)+,A6
  3639. MOVE.L D0,@RESULT
  3640. END;
  3641. END;
  3642. FUNCTION AllocRemember(VAR rememberKey : pRemember; size : ULONG; flags : ULONG) : POINTER;
  3643. BEGIN
  3644. ASM
  3645. MOVE.L A6,-(A7)
  3646. MOVEA.L rememberKey,A0
  3647. MOVE.L size,D0
  3648. MOVE.L flags,D1
  3649. MOVEA.L _IntuitionBase,A6
  3650. JSR -396(A6)
  3651. MOVEA.L (A7)+,A6
  3652. MOVE.L D0,@RESULT
  3653. END;
  3654. END;
  3655. FUNCTION AllocScreenBuffer(sc : pScreen; bm : pBitMap; flags : ULONG) : pScreenBuffer;
  3656. BEGIN
  3657. ASM
  3658. MOVE.L A6,-(A7)
  3659. MOVEA.L sc,A0
  3660. MOVEA.L bm,A1
  3661. MOVE.L flags,D0
  3662. MOVEA.L _IntuitionBase,A6
  3663. JSR -768(A6)
  3664. MOVEA.L (A7)+,A6
  3665. MOVE.L D0,@RESULT
  3666. END;
  3667. END;
  3668. FUNCTION AutoRequest(window : pWindow;const body : pIntuiText;const posText : pIntuiText;const negText : pIntuiText; pFlag : ULONG; nFlag : ULONG; width : ULONG; height : ULONG) : BOOLEAN;
  3669. BEGIN
  3670. ASM
  3671. MOVE.L A6,-(A7)
  3672. MOVEA.L window,A0
  3673. MOVEA.L body,A1
  3674. MOVEA.L posText,A2
  3675. MOVEA.L negText,A3
  3676. MOVE.L pFlag,D0
  3677. MOVE.L nFlag,D1
  3678. MOVE.L width,D2
  3679. MOVE.L height,D3
  3680. MOVEA.L _IntuitionBase,A6
  3681. JSR -348(A6)
  3682. MOVEA.L (A7)+,A6
  3683. TST.W D0
  3684. BEQ.B @end
  3685. MOVEQ #1,D0
  3686. @end: MOVE.B D0,@RESULT
  3687. END;
  3688. END;
  3689. PROCEDURE BeginRefresh(window : pWindow);
  3690. BEGIN
  3691. ASM
  3692. MOVE.L A6,-(A7)
  3693. MOVEA.L window,A0
  3694. MOVEA.L _IntuitionBase,A6
  3695. JSR -354(A6)
  3696. MOVEA.L (A7)+,A6
  3697. END;
  3698. END;
  3699. FUNCTION BuildEasyRequestArgs(window : pWindow;const easyStruct : pEasyStruct; idcmp : ULONG;const args : POINTER) : pWindow;
  3700. BEGIN
  3701. ASM
  3702. MOVE.L A6,-(A7)
  3703. MOVEA.L window,A0
  3704. MOVEA.L easyStruct,A1
  3705. MOVE.L idcmp,D0
  3706. MOVEA.L args,A3
  3707. MOVEA.L _IntuitionBase,A6
  3708. JSR -594(A6)
  3709. MOVEA.L (A7)+,A6
  3710. MOVE.L D0,@RESULT
  3711. END;
  3712. END;
  3713. FUNCTION BuildSysRequest(window : pWindow;const body : pIntuiText;const posText : pIntuiText;const negText : pIntuiText; flags : ULONG; width : ULONG; height : ULONG) : pWindow;
  3714. BEGIN
  3715. ASM
  3716. MOVE.L A6,-(A7)
  3717. MOVEA.L window,A0
  3718. MOVEA.L body,A1
  3719. MOVEA.L posText,A2
  3720. MOVEA.L negText,A3
  3721. MOVE.L flags,D0
  3722. MOVE.L width,D1
  3723. MOVE.L height,D2
  3724. MOVEA.L _IntuitionBase,A6
  3725. JSR -360(A6)
  3726. MOVEA.L (A7)+,A6
  3727. MOVE.L D0,@RESULT
  3728. END;
  3729. END;
  3730. FUNCTION ChangeScreenBuffer(sc : pScreen; sb : pScreenBuffer) : ULONG;
  3731. BEGIN
  3732. ASM
  3733. MOVE.L A6,-(A7)
  3734. MOVEA.L sc,A0
  3735. MOVEA.L sb,A1
  3736. MOVEA.L _IntuitionBase,A6
  3737. JSR -780(A6)
  3738. MOVEA.L (A7)+,A6
  3739. MOVE.L D0,@RESULT
  3740. END;
  3741. END;
  3742. PROCEDURE ChangeWindowBox(window : pWindow; left : LONGINT; top : LONGINT; width : LONGINT; height : LONGINT);
  3743. BEGIN
  3744. ASM
  3745. MOVE.L A6,-(A7)
  3746. MOVEA.L window,A0
  3747. MOVE.L left,D0
  3748. MOVE.L top,D1
  3749. MOVE.L width,D2
  3750. MOVE.L height,D3
  3751. MOVEA.L _IntuitionBase,A6
  3752. JSR -486(A6)
  3753. MOVEA.L (A7)+,A6
  3754. END;
  3755. END;
  3756. FUNCTION ClearDMRequest(window : pWindow) : BOOLEAN;
  3757. BEGIN
  3758. ASM
  3759. MOVE.L A6,-(A7)
  3760. MOVEA.L window,A0
  3761. MOVEA.L _IntuitionBase,A6
  3762. JSR -048(A6)
  3763. MOVEA.L (A7)+,A6
  3764. TST.W D0
  3765. BEQ.B @end
  3766. MOVEQ #1,D0
  3767. @end: MOVE.B D0,@RESULT
  3768. END;
  3769. END;
  3770. PROCEDURE ClearMenuStrip(window : pWindow);
  3771. BEGIN
  3772. ASM
  3773. MOVE.L A6,-(A7)
  3774. MOVEA.L window,A0
  3775. MOVEA.L _IntuitionBase,A6
  3776. JSR -054(A6)
  3777. MOVEA.L (A7)+,A6
  3778. END;
  3779. END;
  3780. PROCEDURE ClearPointer(window : pWindow);
  3781. BEGIN
  3782. ASM
  3783. MOVE.L A6,-(A7)
  3784. MOVEA.L window,A0
  3785. MOVEA.L _IntuitionBase,A6
  3786. JSR -060(A6)
  3787. MOVEA.L (A7)+,A6
  3788. END;
  3789. END;
  3790. PROCEDURE CloseScreen(screen : pScreen);
  3791. BEGIN
  3792. ASM
  3793. MOVE.L A6,-(A7)
  3794. MOVEA.L screen,A0
  3795. MOVEA.L _IntuitionBase,A6
  3796. JSR -066(A6)
  3797. MOVEA.L (A7)+,A6
  3798. END;
  3799. END;
  3800. PROCEDURE CloseWindow(window : pWindow);
  3801. BEGIN
  3802. ASM
  3803. MOVE.L A6,-(A7)
  3804. MOVEA.L window,A0
  3805. MOVEA.L _IntuitionBase,A6
  3806. JSR -072(A6)
  3807. MOVEA.L (A7)+,A6
  3808. END;
  3809. END;
  3810. FUNCTION CloseWorkBench : BOOLEAN;
  3811. BEGIN
  3812. ASM
  3813. MOVE.L A6,-(A7)
  3814. MOVEA.L _IntuitionBase,A6
  3815. JSR -078(A6)
  3816. MOVEA.L (A7)+,A6
  3817. TST.L D0
  3818. BEQ.B @end
  3819. MOVEQ #1,D0
  3820. @end: MOVE.B D0,@RESULT
  3821. END;
  3822. END;
  3823. PROCEDURE CurrentTime(VAR seconds : ULONG; VAR micros : ULONG);
  3824. BEGIN
  3825. ASM
  3826. MOVE.L A6,-(A7)
  3827. MOVEA.L seconds,A0
  3828. MOVEA.L micros,A1
  3829. MOVEA.L _IntuitionBase,A6
  3830. JSR -084(A6)
  3831. MOVEA.L (A7)+,A6
  3832. END;
  3833. END;
  3834. FUNCTION DisplayAlert(alertNumber : ULONG;const string_ : pCHAR; height : ULONG) : BOOLEAN;
  3835. BEGIN
  3836. ASM
  3837. MOVE.L A6,-(A7)
  3838. MOVE.L alertNumber,D0
  3839. MOVEA.L string_,A0
  3840. MOVE.L height,D1
  3841. MOVEA.L _IntuitionBase,A6
  3842. JSR -090(A6)
  3843. MOVEA.L (A7)+,A6
  3844. TST.W D0
  3845. BEQ.B @end
  3846. MOVEQ #1,D0
  3847. @end: MOVE.B D0,@RESULT
  3848. END;
  3849. END;
  3850. PROCEDURE DisplayBeep(screen : pScreen);
  3851. BEGIN
  3852. ASM
  3853. MOVE.L A6,-(A7)
  3854. MOVEA.L screen,A0
  3855. MOVEA.L _IntuitionBase,A6
  3856. JSR -096(A6)
  3857. MOVEA.L (A7)+,A6
  3858. END;
  3859. END;
  3860. PROCEDURE DisposeObject(obj : POINTER);
  3861. BEGIN
  3862. ASM
  3863. MOVE.L A6,-(A7)
  3864. MOVEA.L obj,A0
  3865. MOVEA.L _IntuitionBase,A6
  3866. JSR -642(A6)
  3867. MOVEA.L (A7)+,A6
  3868. END;
  3869. END;
  3870. FUNCTION DoGadgetMethodA(gad : pGadget; win : pWindow; req : pRequester; message : tMsg) : ULONG;
  3871. BEGIN
  3872. ASM
  3873. MOVE.L A6,-(A7)
  3874. MOVEA.L gad,A0
  3875. MOVEA.L win,A1
  3876. MOVEA.L req,A2
  3877. MOVEA.L message,A3
  3878. MOVEA.L _IntuitionBase,A6
  3879. JSR -810(A6)
  3880. MOVEA.L (A7)+,A6
  3881. MOVE.L D0,@RESULT
  3882. END;
  3883. END;
  3884. FUNCTION DoubleClick(sSeconds : ULONG; sMicros : ULONG; cSeconds : ULONG; cMicros : ULONG) : BOOLEAN;
  3885. BEGIN
  3886. ASM
  3887. MOVE.L A6,-(A7)
  3888. MOVE.L sSeconds,D0
  3889. MOVE.L sMicros,D1
  3890. MOVE.L cSeconds,D2
  3891. MOVE.L cMicros,D3
  3892. MOVEA.L _IntuitionBase,A6
  3893. JSR -102(A6)
  3894. MOVEA.L (A7)+,A6
  3895. TST.W D0
  3896. BEQ.B @end
  3897. MOVEQ #1,D0
  3898. @end: MOVE.B D0,@RESULT
  3899. END;
  3900. END;
  3901. PROCEDURE DrawBorder(rp : pRastPort;const border : pBorder; leftOffset : LONGINT; topOffset : LONGINT);
  3902. BEGIN
  3903. ASM
  3904. MOVE.L A6,-(A7)
  3905. MOVEA.L rp,A0
  3906. MOVEA.L border,A1
  3907. MOVE.L leftOffset,D0
  3908. MOVE.L topOffset,D1
  3909. MOVEA.L _IntuitionBase,A6
  3910. JSR -108(A6)
  3911. MOVEA.L (A7)+,A6
  3912. END;
  3913. END;
  3914. PROCEDURE DrawImage(rp : pRastPort; image : pImage; leftOffset : LONGINT; topOffset : LONGINT);
  3915. BEGIN
  3916. ASM
  3917. MOVE.L A6,-(A7)
  3918. MOVEA.L rp,A0
  3919. MOVEA.L image,A1
  3920. MOVE.L leftOffset,D0
  3921. MOVE.L topOffset,D1
  3922. MOVEA.L _IntuitionBase,A6
  3923. JSR -114(A6)
  3924. MOVEA.L (A7)+,A6
  3925. END;
  3926. END;
  3927. PROCEDURE DrawImageState(rp : pRastPort; image : pImage; leftOffset : LONGINT; topOffset : LONGINT; state : ULONG;const drawInfo : pDrawInfo);
  3928. BEGIN
  3929. ASM
  3930. MOVE.L A6,-(A7)
  3931. MOVEA.L rp,A0
  3932. MOVEA.L image,A1
  3933. MOVE.L leftOffset,D0
  3934. MOVE.L topOffset,D1
  3935. MOVE.L state,D2
  3936. MOVEA.L drawInfo,A2
  3937. MOVEA.L _IntuitionBase,A6
  3938. JSR -618(A6)
  3939. MOVEA.L (A7)+,A6
  3940. END;
  3941. END;
  3942. FUNCTION EasyRequestArgs(window : pWindow;const easyStruct : pEasyStruct; idcmpPtr : pULONG;const args : POINTER) : LONGINT;
  3943. BEGIN
  3944. ASM
  3945. MOVE.L A6,-(A7)
  3946. MOVEA.L window,A0
  3947. MOVEA.L easyStruct,A1
  3948. MOVEA.L idcmpPtr,A2
  3949. MOVEA.L args,A3
  3950. MOVEA.L _IntuitionBase,A6
  3951. JSR -588(A6)
  3952. MOVEA.L (A7)+,A6
  3953. MOVE.L D0,@RESULT
  3954. END;
  3955. END;
  3956. PROCEDURE EndRefresh(window : pWindow; complete : LONGINT);
  3957. BEGIN
  3958. ASM
  3959. MOVE.L A6,-(A7)
  3960. MOVEA.L window,A0
  3961. MOVE.L complete,D0
  3962. MOVEA.L _IntuitionBase,A6
  3963. JSR -366(A6)
  3964. MOVEA.L (A7)+,A6
  3965. END;
  3966. END;
  3967. PROCEDURE EndRequest(requester : pRequester; window : pWindow);
  3968. BEGIN
  3969. ASM
  3970. MOVE.L A6,-(A7)
  3971. MOVEA.L requester,A0
  3972. MOVEA.L window,A1
  3973. MOVEA.L _IntuitionBase,A6
  3974. JSR -120(A6)
  3975. MOVEA.L (A7)+,A6
  3976. END;
  3977. END;
  3978. PROCEDURE EraseImage(rp : pRastPort; image : pImage; leftOffset : LONGINT; topOffset : LONGINT);
  3979. BEGIN
  3980. ASM
  3981. MOVE.L A6,-(A7)
  3982. MOVEA.L rp,A0
  3983. MOVEA.L image,A1
  3984. MOVE.L leftOffset,D0
  3985. MOVE.L topOffset,D1
  3986. MOVEA.L _IntuitionBase,A6
  3987. JSR -630(A6)
  3988. MOVEA.L (A7)+,A6
  3989. END;
  3990. END;
  3991. FUNCTION FreeClass(classPtr : pIClass) : BOOLEAN;
  3992. BEGIN
  3993. ASM
  3994. MOVE.L A6,-(A7)
  3995. MOVEA.L classPtr,A0
  3996. MOVEA.L _IntuitionBase,A6
  3997. JSR -714(A6)
  3998. MOVEA.L (A7)+,A6
  3999. TST.W D0
  4000. BEQ.B @end
  4001. MOVEQ #1,D0
  4002. @end: MOVE.B D0,@RESULT
  4003. END;
  4004. END;
  4005. PROCEDURE FreeRemember(VAR rememberKey : pRemember; reallyForget : LONGINT);
  4006. BEGIN
  4007. ASM
  4008. MOVE.L A6,-(A7)
  4009. MOVEA.L rememberKey,A0
  4010. MOVE.L reallyForget,D0
  4011. MOVEA.L _IntuitionBase,A6
  4012. JSR -408(A6)
  4013. MOVEA.L (A7)+,A6
  4014. END;
  4015. END;
  4016. PROCEDURE FreeScreenBuffer(sc : pScreen; sb : pScreenBuffer);
  4017. BEGIN
  4018. ASM
  4019. MOVE.L A6,-(A7)
  4020. MOVEA.L sc,A0
  4021. MOVEA.L sb,A1
  4022. MOVEA.L _IntuitionBase,A6
  4023. JSR -774(A6)
  4024. MOVEA.L (A7)+,A6
  4025. END;
  4026. END;
  4027. PROCEDURE FreeScreenDrawInfo(screen : pScreen; drawInfo : pDrawInfo);
  4028. BEGIN
  4029. ASM
  4030. MOVE.L A6,-(A7)
  4031. MOVEA.L screen,A0
  4032. MOVEA.L drawInfo,A1
  4033. MOVEA.L _IntuitionBase,A6
  4034. JSR -696(A6)
  4035. MOVEA.L (A7)+,A6
  4036. END;
  4037. END;
  4038. PROCEDURE FreeSysRequest(window : pWindow);
  4039. BEGIN
  4040. ASM
  4041. MOVE.L A6,-(A7)
  4042. MOVEA.L window,A0
  4043. MOVEA.L _IntuitionBase,A6
  4044. JSR -372(A6)
  4045. MOVEA.L (A7)+,A6
  4046. END;
  4047. END;
  4048. PROCEDURE GadgetMouse(gadget : pGadget; gInfo : pGadgetInfo; mousePoint : psmallint);
  4049. BEGIN
  4050. ASM
  4051. MOVE.L A6,-(A7)
  4052. MOVEA.L gadget,A0
  4053. MOVEA.L gInfo,A1
  4054. MOVEA.L mousePoint,A2
  4055. MOVEA.L _IntuitionBase,A6
  4056. JSR -570(A6)
  4057. MOVEA.L (A7)+,A6
  4058. END;
  4059. END;
  4060. FUNCTION GetAttr(attrID : ULONG; obj : POINTER; storagePtr : pULONG) : ULONG;
  4061. BEGIN
  4062. ASM
  4063. MOVE.L A6,-(A7)
  4064. MOVE.L attrID,D0
  4065. MOVEA.L obj,A0
  4066. MOVEA.L storagePtr,A1
  4067. MOVEA.L _IntuitionBase,A6
  4068. JSR -654(A6)
  4069. MOVEA.L (A7)+,A6
  4070. MOVE.L D0,@RESULT
  4071. END;
  4072. END;
  4073. PROCEDURE GetDefaultPubScreen(nameBuffer : pCHAR);
  4074. BEGIN
  4075. ASM
  4076. MOVE.L A6,-(A7)
  4077. MOVEA.L nameBuffer,A0
  4078. MOVEA.L _IntuitionBase,A6
  4079. JSR -582(A6)
  4080. MOVEA.L (A7)+,A6
  4081. END;
  4082. END;
  4083. FUNCTION GetDefPrefs(preferences : pPreferences; size : LONGINT) : pPreferences;
  4084. BEGIN
  4085. ASM
  4086. MOVE.L A6,-(A7)
  4087. MOVEA.L preferences,A0
  4088. MOVE.L size,D0
  4089. MOVEA.L _IntuitionBase,A6
  4090. JSR -126(A6)
  4091. MOVEA.L (A7)+,A6
  4092. MOVE.L D0,@RESULT
  4093. END;
  4094. END;
  4095. FUNCTION GetPrefs(preferences : pPreferences; size : LONGINT) : pPreferences;
  4096. BEGIN
  4097. ASM
  4098. MOVE.L A6,-(A7)
  4099. MOVEA.L preferences,A0
  4100. MOVE.L size,D0
  4101. MOVEA.L _IntuitionBase,A6
  4102. JSR -132(A6)
  4103. MOVEA.L (A7)+,A6
  4104. MOVE.L D0,@RESULT
  4105. END;
  4106. END;
  4107. FUNCTION GetScreenData(buffer : POINTER; size : ULONG; type_ : ULONG;const screen : pScreen) : BOOLEAN;
  4108. BEGIN
  4109. ASM
  4110. MOVE.L A6,-(A7)
  4111. MOVEA.L buffer,A0
  4112. MOVE.L size,D0
  4113. MOVE.L type_,D1
  4114. MOVEA.L screen,A1
  4115. MOVEA.L _IntuitionBase,A6
  4116. JSR -426(A6)
  4117. MOVEA.L (A7)+,A6
  4118. TST.L D0
  4119. BEQ.B @end
  4120. MOVEQ #1,D0
  4121. @end: MOVE.B D0,@RESULT
  4122. END;
  4123. END;
  4124. FUNCTION GetScreenDrawInfo(screen : pScreen) : pDrawInfo;
  4125. BEGIN
  4126. ASM
  4127. MOVE.L A6,-(A7)
  4128. MOVEA.L screen,A0
  4129. MOVEA.L _IntuitionBase,A6
  4130. JSR -690(A6)
  4131. MOVEA.L (A7)+,A6
  4132. MOVE.L D0,@RESULT
  4133. END;
  4134. END;
  4135. PROCEDURE HelpControl(win : pWindow; flags : ULONG);
  4136. BEGIN
  4137. ASM
  4138. MOVE.L A6,-(A7)
  4139. MOVEA.L win,A0
  4140. MOVE.L flags,D0
  4141. MOVEA.L _IntuitionBase,A6
  4142. JSR -828(A6)
  4143. MOVEA.L (A7)+,A6
  4144. END;
  4145. END;
  4146. PROCEDURE InitRequester(requester : pRequester);
  4147. BEGIN
  4148. ASM
  4149. MOVE.L A6,-(A7)
  4150. MOVEA.L requester,A0
  4151. MOVEA.L _IntuitionBase,A6
  4152. JSR -138(A6)
  4153. MOVEA.L (A7)+,A6
  4154. END;
  4155. END;
  4156. FUNCTION IntuiTextLength(const iText : pIntuiText) : LONGINT;
  4157. BEGIN
  4158. ASM
  4159. MOVE.L A6,-(A7)
  4160. MOVEA.L iText,A0
  4161. MOVEA.L _IntuitionBase,A6
  4162. JSR -330(A6)
  4163. MOVEA.L (A7)+,A6
  4164. MOVE.L D0,@RESULT
  4165. END;
  4166. END;
  4167. FUNCTION ItemAddress(const menuStrip : pMenu; menuNumber : ULONG) : pMenuItem;
  4168. BEGIN
  4169. ASM
  4170. MOVE.L A6,-(A7)
  4171. MOVEA.L menuStrip,A0
  4172. MOVE.L menuNumber,D0
  4173. MOVEA.L _IntuitionBase,A6
  4174. JSR -144(A6)
  4175. MOVEA.L (A7)+,A6
  4176. MOVE.L D0,@RESULT
  4177. END;
  4178. END;
  4179. PROCEDURE LendMenus(fromwindow : pWindow; towindow : pWindow);
  4180. BEGIN
  4181. ASM
  4182. MOVE.L A6,-(A7)
  4183. MOVEA.L fromwindow,A0
  4184. MOVEA.L towindow,A1
  4185. MOVEA.L _IntuitionBase,A6
  4186. JSR -804(A6)
  4187. MOVEA.L (A7)+,A6
  4188. END;
  4189. END;
  4190. FUNCTION LockIBase(dontknow : ULONG) : ULONG;
  4191. BEGIN
  4192. ASM
  4193. MOVE.L A6,-(A7)
  4194. MOVE.L dontknow,D0
  4195. MOVEA.L _IntuitionBase,A6
  4196. JSR -414(A6)
  4197. MOVEA.L (A7)+,A6
  4198. MOVE.L D0,@RESULT
  4199. END;
  4200. END;
  4201. FUNCTION LockPubScreen(const name : pCHAR) : pScreen;
  4202. BEGIN
  4203. ASM
  4204. MOVE.L A6,-(A7)
  4205. MOVEA.L name,A0
  4206. MOVEA.L _IntuitionBase,A6
  4207. JSR -510(A6)
  4208. MOVEA.L (A7)+,A6
  4209. MOVE.L D0,@RESULT
  4210. END;
  4211. END;
  4212. FUNCTION LockPubScreenList : pList;
  4213. BEGIN
  4214. ASM
  4215. MOVE.L A6,-(A7)
  4216. MOVEA.L _IntuitionBase,A6
  4217. JSR -522(A6)
  4218. MOVEA.L (A7)+,A6
  4219. MOVE.L D0,@RESULT
  4220. END;
  4221. END;
  4222. FUNCTION MakeClass(const classID : pCHAR;const superClassID : pCHAR;const superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
  4223. BEGIN
  4224. ASM
  4225. MOVE.L A6,-(A7)
  4226. MOVEA.L classID,A0
  4227. MOVEA.L superClassID,A1
  4228. MOVEA.L superClassPtr,A2
  4229. MOVE.L instanceSize,D0
  4230. MOVE.L flags,D1
  4231. MOVEA.L _IntuitionBase,A6
  4232. JSR -678(A6)
  4233. MOVEA.L (A7)+,A6
  4234. MOVE.L D0,@RESULT
  4235. END;
  4236. END;
  4237. FUNCTION MakeScreen(screen : pScreen): LONGINT;
  4238. BEGIN
  4239. ASM
  4240. MOVE.L A6,-(A7)
  4241. MOVEA.L screen,A0
  4242. MOVEA.L _IntuitionBase,A6
  4243. JSR -378(A6)
  4244. MOVEA.L (A7)+,A6
  4245. MOVE.L D0,@RESULT
  4246. END;
  4247. END;
  4248. FUNCTION ModifyIDCMP(window : pWindow; flags : ULONG) : BOOLEAN;
  4249. BEGIN
  4250. ASM
  4251. MOVE.L A6,-(A7)
  4252. MOVEA.L window,A0
  4253. MOVE.L flags,D0
  4254. MOVEA.L _IntuitionBase,A6
  4255. JSR -150(A6)
  4256. MOVEA.L (A7)+,A6
  4257. TST.W D0
  4258. BEQ.B @end
  4259. MOVEQ #1,D0
  4260. @end: MOVE.B D0,@RESULT
  4261. END;
  4262. END;
  4263. PROCEDURE ModifyProp(gadget : pGadget; window : pWindow; requester : pRequester; flags : ULONG; horizPot : ULONG; vertPot : ULONG; horizBody : ULONG; vertBody : ULONG);
  4264. BEGIN
  4265. ASM
  4266. MOVE.L A6,-(A7)
  4267. MOVEA.L gadget,A0
  4268. MOVEA.L window,A1
  4269. MOVEA.L requester,A2
  4270. MOVE.L flags,D0
  4271. MOVE.L horizPot,D1
  4272. MOVE.L vertPot,D2
  4273. MOVE.L horizBody,D3
  4274. MOVE.L vertBody,D4
  4275. MOVEA.L _IntuitionBase,A6
  4276. JSR -156(A6)
  4277. MOVEA.L (A7)+,A6
  4278. END;
  4279. END;
  4280. PROCEDURE MoveScreen(screen : pScreen; dx : LONGINT; dy : LONGINT);
  4281. BEGIN
  4282. ASM
  4283. MOVE.L A6,-(A7)
  4284. MOVEA.L screen,A0
  4285. MOVE.L dx,D0
  4286. MOVE.L dy,D1
  4287. MOVEA.L _IntuitionBase,A6
  4288. JSR -162(A6)
  4289. MOVEA.L (A7)+,A6
  4290. END;
  4291. END;
  4292. PROCEDURE MoveWindow(window : pWindow; dx : LONGINT; dy : LONGINT);
  4293. BEGIN
  4294. ASM
  4295. MOVE.L A6,-(A7)
  4296. MOVEA.L window,A0
  4297. MOVE.L dx,D0
  4298. MOVE.L dy,D1
  4299. MOVEA.L _IntuitionBase,A6
  4300. JSR -168(A6)
  4301. MOVEA.L (A7)+,A6
  4302. END;
  4303. END;
  4304. PROCEDURE MoveWindowInFrontOf(window : pWindow; behindWindow : pWindow);
  4305. BEGIN
  4306. ASM
  4307. MOVE.L A6,-(A7)
  4308. MOVEA.L window,A0
  4309. MOVEA.L behindWindow,A1
  4310. MOVEA.L _IntuitionBase,A6
  4311. JSR -480(A6)
  4312. MOVEA.L (A7)+,A6
  4313. END;
  4314. END;
  4315. PROCEDURE NewModifyProp(gadget : pGadget; window : pWindow; requester : pRequester; flags : ULONG; horizPot : ULONG; vertPot : ULONG; horizBody : ULONG; vertBody : ULONG; numGad : LONGINT);
  4316. BEGIN
  4317. ASM
  4318. MOVE.L A6,-(A7)
  4319. MOVEA.L gadget,A0
  4320. MOVEA.L window,A1
  4321. MOVEA.L requester,A2
  4322. MOVE.L flags,D0
  4323. MOVE.L horizPot,D1
  4324. MOVE.L vertPot,D2
  4325. MOVE.L horizBody,D3
  4326. MOVE.L vertBody,D4
  4327. MOVE.L numGad,D5
  4328. MOVEA.L _IntuitionBase,A6
  4329. JSR -468(A6)
  4330. MOVEA.L (A7)+,A6
  4331. END;
  4332. END;
  4333. FUNCTION NewObjectA(classPtr : pIClass;const classID : pCHAR;const tagList : pTagItem) : POINTER;
  4334. BEGIN
  4335. ASM
  4336. MOVE.L A6,-(A7)
  4337. MOVEA.L classPtr,A0
  4338. MOVEA.L classID,A1
  4339. MOVEA.L tagList,A2
  4340. MOVEA.L _IntuitionBase,A6
  4341. JSR -636(A6)
  4342. MOVEA.L (A7)+,A6
  4343. MOVE.L D0,@RESULT
  4344. END;
  4345. END;
  4346. FUNCTION NextObject(objectPtrPtr : POINTER) : POINTER;
  4347. BEGIN
  4348. ASM
  4349. MOVE.L A6,-(A7)
  4350. MOVEA.L objectPtrPtr,A0
  4351. MOVEA.L _IntuitionBase,A6
  4352. JSR -666(A6)
  4353. MOVEA.L (A7)+,A6
  4354. MOVE.L D0,@RESULT
  4355. END;
  4356. END;
  4357. FUNCTION NextPubScreen(const screen : pScreen; namebuf : pCHAR) : pCHAR;
  4358. BEGIN
  4359. ASM
  4360. MOVE.L A6,-(A7)
  4361. MOVEA.L screen,A0
  4362. MOVEA.L namebuf,A1
  4363. MOVEA.L _IntuitionBase,A6
  4364. JSR -534(A6)
  4365. MOVEA.L (A7)+,A6
  4366. MOVE.L D0,@RESULT
  4367. END;
  4368. END;
  4369. FUNCTION ObtainGIRPort(gInfo : pGadgetInfo) : pRastPort;
  4370. BEGIN
  4371. ASM
  4372. MOVE.L A6,-(A7)
  4373. MOVEA.L gInfo,A0
  4374. MOVEA.L _IntuitionBase,A6
  4375. JSR -558(A6)
  4376. MOVEA.L (A7)+,A6
  4377. MOVE.L D0,@RESULT
  4378. END;
  4379. END;
  4380. PROCEDURE OffGadget(gadget : pGadget; window : pWindow; requester : pRequester);
  4381. BEGIN
  4382. ASM
  4383. MOVE.L A6,-(A7)
  4384. MOVEA.L gadget,A0
  4385. MOVEA.L window,A1
  4386. MOVEA.L requester,A2
  4387. MOVEA.L _IntuitionBase,A6
  4388. JSR -174(A6)
  4389. MOVEA.L (A7)+,A6
  4390. END;
  4391. END;
  4392. PROCEDURE OffMenu(window : pWindow; menuNumber : ULONG);
  4393. BEGIN
  4394. ASM
  4395. MOVE.L A6,-(A7)
  4396. MOVEA.L window,A0
  4397. MOVE.L menuNumber,D0
  4398. MOVEA.L _IntuitionBase,A6
  4399. JSR -180(A6)
  4400. MOVEA.L (A7)+,A6
  4401. END;
  4402. END;
  4403. PROCEDURE OnGadget(gadget : pGadget; window : pWindow; requester : pRequester);
  4404. BEGIN
  4405. ASM
  4406. MOVE.L A6,-(A7)
  4407. MOVEA.L gadget,A0
  4408. MOVEA.L window,A1
  4409. MOVEA.L requester,A2
  4410. MOVEA.L _IntuitionBase,A6
  4411. JSR -186(A6)
  4412. MOVEA.L (A7)+,A6
  4413. END;
  4414. END;
  4415. PROCEDURE OnMenu(window : pWindow; menuNumber : ULONG);
  4416. BEGIN
  4417. ASM
  4418. MOVE.L A6,-(A7)
  4419. MOVEA.L window,A0
  4420. MOVE.L menuNumber,D0
  4421. MOVEA.L _IntuitionBase,A6
  4422. JSR -192(A6)
  4423. MOVEA.L (A7)+,A6
  4424. END;
  4425. END;
  4426. FUNCTION OpenScreen(const newScreen : pNewScreen) : pScreen;
  4427. BEGIN
  4428. ASM
  4429. MOVE.L A6,-(A7)
  4430. MOVEA.L newScreen,A0
  4431. MOVEA.L _IntuitionBase,A6
  4432. JSR -198(A6)
  4433. MOVEA.L (A7)+,A6
  4434. MOVE.L D0,@RESULT
  4435. END;
  4436. END;
  4437. FUNCTION OpenScreenTagList(const newScreen : pNewScreen;const tagList : pTagItem) : pScreen;
  4438. BEGIN
  4439. ASM
  4440. MOVE.L A6,-(A7)
  4441. MOVEA.L newScreen,A0
  4442. MOVEA.L tagList,A1
  4443. MOVEA.L _IntuitionBase,A6
  4444. JSR -612(A6)
  4445. MOVEA.L (A7)+,A6
  4446. MOVE.L D0,@RESULT
  4447. END;
  4448. END;
  4449. FUNCTION OpenWindow(const newWindow : pNewWindow) : pWindow;
  4450. BEGIN
  4451. ASM
  4452. MOVE.L A6,-(A7)
  4453. MOVEA.L newWindow,A0
  4454. MOVEA.L _IntuitionBase,A6
  4455. JSR -204(A6)
  4456. MOVEA.L (A7)+,A6
  4457. MOVE.L D0,@RESULT
  4458. END;
  4459. END;
  4460. FUNCTION OpenWindowTagList(const newWindow : pNewWindow;const tagList : pTagItem) : pWindow;
  4461. BEGIN
  4462. ASM
  4463. MOVE.L A6,-(A7)
  4464. MOVEA.L newWindow,A0
  4465. MOVEA.L tagList,A1
  4466. MOVEA.L _IntuitionBase,A6
  4467. JSR -606(A6)
  4468. MOVEA.L (A7)+,A6
  4469. MOVE.L D0,@RESULT
  4470. END;
  4471. END;
  4472. FUNCTION OpenWorkBench : ULONG;
  4473. BEGIN
  4474. ASM
  4475. MOVE.L A6,-(A7)
  4476. MOVEA.L _IntuitionBase,A6
  4477. JSR -210(A6)
  4478. MOVEA.L (A7)+,A6
  4479. MOVE.L D0,@RESULT
  4480. END;
  4481. END;
  4482. FUNCTION PointInImage(point : ULONG; image : pImage) : BOOLEAN;
  4483. BEGIN
  4484. ASM
  4485. MOVE.L A6,-(A7)
  4486. MOVE.L point,D0
  4487. MOVEA.L image,A0
  4488. MOVEA.L _IntuitionBase,A6
  4489. JSR -624(A6)
  4490. MOVEA.L (A7)+,A6
  4491. TST.W D0
  4492. BEQ.B @end
  4493. MOVEQ #1,D0
  4494. @end: MOVE.B D0,@RESULT
  4495. END;
  4496. END;
  4497. PROCEDURE PrintIText(rp : pRastPort;const iText : pIntuiText; left : LONGINT; top : LONGINT);
  4498. BEGIN
  4499. ASM
  4500. MOVE.L A6,-(A7)
  4501. MOVEA.L rp,A0
  4502. MOVEA.L iText,A1
  4503. MOVE.L left,D0
  4504. MOVE.L top,D1
  4505. MOVEA.L _IntuitionBase,A6
  4506. JSR -216(A6)
  4507. MOVEA.L (A7)+,A6
  4508. END;
  4509. END;
  4510. FUNCTION PubScreenStatus(screen : pScreen; statusFlags : ULONG) : WORD;
  4511. BEGIN
  4512. ASM
  4513. MOVE.L A6,-(A7)
  4514. MOVEA.L screen,A0
  4515. MOVE.L statusFlags,D0
  4516. MOVEA.L _IntuitionBase,A6
  4517. JSR -552(A6)
  4518. MOVEA.L (A7)+,A6
  4519. MOVE.L D0,@RESULT
  4520. END;
  4521. END;
  4522. FUNCTION QueryOverscan(displayID : ULONG; rect : pRectangle; oScanType : LONGINT) : LONGINT;
  4523. BEGIN
  4524. ASM
  4525. MOVE.L A6,-(A7)
  4526. MOVEA.L displayID,A0
  4527. MOVEA.L rect,A1
  4528. MOVE.L oScanType,D0
  4529. MOVEA.L _IntuitionBase,A6
  4530. JSR -474(A6)
  4531. MOVEA.L (A7)+,A6
  4532. MOVE.L D0,@RESULT
  4533. END;
  4534. END;
  4535. PROCEDURE RefreshGadgets(gadgets : pGadget; window : pWindow; requester : pRequester);
  4536. BEGIN
  4537. ASM
  4538. MOVE.L A6,-(A7)
  4539. MOVEA.L gadgets,A0
  4540. MOVEA.L window,A1
  4541. MOVEA.L requester,A2
  4542. MOVEA.L _IntuitionBase,A6
  4543. JSR -222(A6)
  4544. MOVEA.L (A7)+,A6
  4545. END;
  4546. END;
  4547. PROCEDURE RefreshGList(gadgets : pGadget; window : pWindow; requester : pRequester; numGad : LONGINT);
  4548. BEGIN
  4549. ASM
  4550. MOVE.L A6,-(A7)
  4551. MOVEA.L gadgets,A0
  4552. MOVEA.L window,A1
  4553. MOVEA.L requester,A2
  4554. MOVE.L numGad,D0
  4555. MOVEA.L _IntuitionBase,A6
  4556. JSR -432(A6)
  4557. MOVEA.L (A7)+,A6
  4558. END;
  4559. END;
  4560. PROCEDURE RefreshWindowFrame(window : pWindow);
  4561. BEGIN
  4562. ASM
  4563. MOVE.L A6,-(A7)
  4564. MOVEA.L window,A0
  4565. MOVEA.L _IntuitionBase,A6
  4566. JSR -456(A6)
  4567. MOVEA.L (A7)+,A6
  4568. END;
  4569. END;
  4570. PROCEDURE ReleaseGIRPort(rp : pRastPort);
  4571. BEGIN
  4572. ASM
  4573. MOVE.L A6,-(A7)
  4574. MOVEA.L rp,A0
  4575. MOVEA.L _IntuitionBase,A6
  4576. JSR -564(A6)
  4577. MOVEA.L (A7)+,A6
  4578. END;
  4579. END;
  4580. FUNCTION RemakeDisplay : LONGINT;
  4581. BEGIN
  4582. ASM
  4583. MOVE.L A6,-(A7)
  4584. MOVEA.L _IntuitionBase,A6
  4585. JSR -384(A6)
  4586. MOVEA.L (A7)+,A6
  4587. MOVE.L D0,@RESULT
  4588. END;
  4589. END;
  4590. PROCEDURE RemoveClass(classPtr : pIClass);
  4591. BEGIN
  4592. ASM
  4593. MOVE.L A6,-(A7)
  4594. MOVEA.L classPtr,A0
  4595. MOVEA.L _IntuitionBase,A6
  4596. JSR -708(A6)
  4597. MOVEA.L (A7)+,A6
  4598. END;
  4599. END;
  4600. FUNCTION RemoveGadget(window : pWindow; gadget : pGadget) : WORD;
  4601. BEGIN
  4602. ASM
  4603. MOVE.L A6,-(A7)
  4604. MOVEA.L window,A0
  4605. MOVEA.L gadget,A1
  4606. MOVEA.L _IntuitionBase,A6
  4607. JSR -228(A6)
  4608. MOVEA.L (A7)+,A6
  4609. MOVE.L D0,@RESULT
  4610. END;
  4611. END;
  4612. FUNCTION RemoveGList(remPtr : pWindow; gadget : pGadget; numGad : LONGINT) : WORD;
  4613. BEGIN
  4614. ASM
  4615. MOVE.L A6,-(A7)
  4616. MOVEA.L remPtr,A0
  4617. MOVEA.L gadget,A1
  4618. MOVE.L numGad,D0
  4619. MOVEA.L _IntuitionBase,A6
  4620. JSR -444(A6)
  4621. MOVEA.L (A7)+,A6
  4622. MOVE.L D0,@RESULT
  4623. END;
  4624. END;
  4625. PROCEDURE ReportMouse(flag : LONGINT; window : pWindow);
  4626. BEGIN
  4627. ASM
  4628. MOVE.L A6,-(A7)
  4629. MOVE.L flag,D0
  4630. MOVEA.L window,A0
  4631. MOVEA.L _IntuitionBase,A6
  4632. JSR -234(A6)
  4633. MOVEA.L (A7)+,A6
  4634. END;
  4635. END;
  4636. FUNCTION Request(requester : pRequester; window : pWindow) : BOOLEAN;
  4637. BEGIN
  4638. ASM
  4639. MOVE.L A6,-(A7)
  4640. MOVEA.L requester,A0
  4641. MOVEA.L window,A1
  4642. MOVEA.L _IntuitionBase,A6
  4643. JSR -240(A6)
  4644. MOVEA.L (A7)+,A6
  4645. TST.W D0
  4646. BEQ.B @end
  4647. MOVEQ #1,D0
  4648. @end: MOVE.B D0,@RESULT
  4649. END;
  4650. END;
  4651. FUNCTION ResetMenuStrip(window : pWindow; menu : pMenu) : BOOLEAN;
  4652. BEGIN
  4653. ASM
  4654. MOVE.L A6,-(A7)
  4655. MOVEA.L window,A0
  4656. MOVEA.L menu,A1
  4657. MOVEA.L _IntuitionBase,A6
  4658. JSR -702(A6)
  4659. MOVEA.L (A7)+,A6
  4660. TST.W D0
  4661. BEQ.B @end
  4662. MOVEQ #1,D0
  4663. @end: MOVE.B D0,@RESULT
  4664. END;
  4665. END;
  4666. FUNCTION RethinkDisplay : LONGINT;
  4667. BEGIN
  4668. ASM
  4669. MOVE.L A6,-(A7)
  4670. MOVEA.L _IntuitionBase,A6
  4671. JSR -390(A6)
  4672. MOVEA.L (A7)+,A6
  4673. MOVE.L D0,@RESULT
  4674. END;
  4675. END;
  4676. PROCEDURE ScreenDepth(screen : pScreen; flags : ULONG; reserved : POINTER);
  4677. BEGIN
  4678. ASM
  4679. MOVE.L A6,-(A7)
  4680. MOVEA.L screen,A0
  4681. MOVE.L flags,D0
  4682. MOVEA.L reserved,A1
  4683. MOVEA.L _IntuitionBase,A6
  4684. JSR -786(A6)
  4685. MOVEA.L (A7)+,A6
  4686. END;
  4687. END;
  4688. PROCEDURE ScreenPosition(screen : pScreen; flags : ULONG; x1 : LONGINT; y1 : LONGINT; x2 : LONGINT; y2 : LONGINT);
  4689. BEGIN
  4690. ASM
  4691. MOVE.L A6,-(A7)
  4692. MOVEA.L screen,A0
  4693. MOVE.L flags,D0
  4694. MOVE.L x1,D1
  4695. MOVE.L y1,D2
  4696. MOVE.L x2,D3
  4697. MOVE.L y2,D4
  4698. MOVEA.L _IntuitionBase,A6
  4699. JSR -792(A6)
  4700. MOVEA.L (A7)+,A6
  4701. END;
  4702. END;
  4703. PROCEDURE ScreenToBack(screen : pScreen);
  4704. BEGIN
  4705. ASM
  4706. MOVE.L A6,-(A7)
  4707. MOVEA.L screen,A0
  4708. MOVEA.L _IntuitionBase,A6
  4709. JSR -246(A6)
  4710. MOVEA.L (A7)+,A6
  4711. END;
  4712. END;
  4713. PROCEDURE ScreenToFront(screen : pScreen);
  4714. BEGIN
  4715. ASM
  4716. MOVE.L A6,-(A7)
  4717. MOVEA.L screen,A0
  4718. MOVEA.L _IntuitionBase,A6
  4719. JSR -252(A6)
  4720. MOVEA.L (A7)+,A6
  4721. END;
  4722. END;
  4723. PROCEDURE ScrollWindowRaster(win : pWindow; dx : LONGINT; dy : LONGINT; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
  4724. BEGIN
  4725. ASM
  4726. MOVE.L A6,-(A7)
  4727. MOVEA.L win,A1
  4728. MOVE.L dx,D0
  4729. MOVE.L dy,D1
  4730. MOVE.L xMin,D2
  4731. MOVE.L yMin,D3
  4732. MOVE.L xMax,D4
  4733. MOVE.L yMax,D5
  4734. MOVEA.L _IntuitionBase,A6
  4735. JSR -798(A6)
  4736. MOVEA.L (A7)+,A6
  4737. END;
  4738. END;
  4739. FUNCTION SetAttrsA(obj : POINTER;const tagList : pTagItem) : ULONG;
  4740. BEGIN
  4741. ASM
  4742. MOVE.L A6,-(A7)
  4743. MOVEA.L obj,A0
  4744. MOVEA.L tagList,A1
  4745. MOVEA.L _IntuitionBase,A6
  4746. JSR -648(A6)
  4747. MOVEA.L (A7)+,A6
  4748. MOVE.L D0,@RESULT
  4749. END;
  4750. END;
  4751. PROCEDURE SetDefaultPubScreen(const name : pCHAR);
  4752. BEGIN
  4753. ASM
  4754. MOVE.L A6,-(A7)
  4755. MOVEA.L name,A0
  4756. MOVEA.L _IntuitionBase,A6
  4757. JSR -540(A6)
  4758. MOVEA.L (A7)+,A6
  4759. END;
  4760. END;
  4761. FUNCTION SetDMRequest(window : pWindow; requester : pRequester) : BOOLEAN;
  4762. BEGIN
  4763. ASM
  4764. MOVE.L A6,-(A7)
  4765. MOVEA.L window,A0
  4766. MOVEA.L requester,A1
  4767. MOVEA.L _IntuitionBase,A6
  4768. JSR -258(A6)
  4769. MOVEA.L (A7)+,A6
  4770. TST.W D0
  4771. BEQ.B @end
  4772. MOVEQ #1,D0
  4773. @end: MOVE.B D0,@RESULT
  4774. END;
  4775. END;
  4776. FUNCTION SetEditHook(hook : pHook) : pHook;
  4777. BEGIN
  4778. ASM
  4779. MOVE.L A6,-(A7)
  4780. MOVEA.L hook,A0
  4781. MOVEA.L _IntuitionBase,A6
  4782. JSR -492(A6)
  4783. MOVEA.L (A7)+,A6
  4784. MOVE.L D0,@RESULT
  4785. END;
  4786. END;
  4787. FUNCTION SetGadgetAttrsA(gadget : pGadget; window : pWindow; requester : pRequester;const tagList : pTagItem) : ULONG;
  4788. BEGIN
  4789. ASM
  4790. MOVE.L A6,-(A7)
  4791. MOVEA.L gadget,A0
  4792. MOVEA.L window,A1
  4793. MOVEA.L requester,A2
  4794. MOVEA.L tagList,A3
  4795. MOVEA.L _IntuitionBase,A6
  4796. JSR -660(A6)
  4797. MOVEA.L (A7)+,A6
  4798. MOVE.L D0,@RESULT
  4799. END;
  4800. END;
  4801. FUNCTION SetMenuStrip(window : pWindow; menu : pMenu) : BOOLEAN;
  4802. BEGIN
  4803. ASM
  4804. MOVE.L A6,-(A7)
  4805. MOVEA.L window,A0
  4806. MOVEA.L menu,A1
  4807. MOVEA.L _IntuitionBase,A6
  4808. JSR -264(A6)
  4809. MOVEA.L (A7)+,A6
  4810. TST.W D0
  4811. BEQ.B @end
  4812. MOVEQ #1,D0
  4813. @end: MOVE.B D0,@RESULT
  4814. END;
  4815. END;
  4816. FUNCTION SetMouseQueue(window : pWindow; queueLength : ULONG) : LONGINT;
  4817. BEGIN
  4818. ASM
  4819. MOVE.L A6,-(A7)
  4820. MOVEA.L window,A0
  4821. MOVE.L queueLength,D0
  4822. MOVEA.L _IntuitionBase,A6
  4823. JSR -498(A6)
  4824. MOVEA.L (A7)+,A6
  4825. MOVE.L D0,@RESULT
  4826. END;
  4827. END;
  4828. PROCEDURE SetPointer(window : pWindow; pointer_ : pword; height : LONGINT; width : LONGINT; xOffset : LONGINT; yOffset : LONGINT);
  4829. BEGIN
  4830. ASM
  4831. MOVE.L A6,-(A7)
  4832. MOVEA.L window,A0
  4833. MOVEA.L pointer_,A1
  4834. MOVE.L height,D0
  4835. MOVE.L width,D1
  4836. MOVE.L xOffset,D2
  4837. MOVE.L yOffset,D3
  4838. MOVEA.L _IntuitionBase,A6
  4839. JSR -270(A6)
  4840. MOVEA.L (A7)+,A6
  4841. END;
  4842. END;
  4843. FUNCTION SetPrefs(const preferences : pPreferences; size : LONGINT; inform : LONGINT) : pPreferences;
  4844. BEGIN
  4845. ASM
  4846. MOVE.L A6,-(A7)
  4847. MOVEA.L preferences,A0
  4848. MOVE.L size,D0
  4849. MOVE.L inform,D1
  4850. MOVEA.L _IntuitionBase,A6
  4851. JSR -324(A6)
  4852. MOVEA.L (A7)+,A6
  4853. MOVE.L D0,@RESULT
  4854. END;
  4855. END;
  4856. FUNCTION SetPubScreenModes(modes : ULONG) : WORD;
  4857. BEGIN
  4858. ASM
  4859. MOVE.L A6,-(A7)
  4860. MOVE.L modes,D0
  4861. MOVEA.L _IntuitionBase,A6
  4862. JSR -546(A6)
  4863. MOVEA.L (A7)+,A6
  4864. MOVE.L D0,@RESULT
  4865. END;
  4866. END;
  4867. PROCEDURE SetWindowPointerA(win : pWindow;const taglist : pTagItem);
  4868. BEGIN
  4869. ASM
  4870. MOVE.L A6,-(A7)
  4871. MOVEA.L win,A0
  4872. MOVEA.L taglist,A1
  4873. MOVEA.L _IntuitionBase,A6
  4874. JSR -816(A6)
  4875. MOVEA.L (A7)+,A6
  4876. END;
  4877. END;
  4878. PROCEDURE SetWindowTitles(window : pWindow;const windowTitle : pCHAR;const screenTitle : pCHAR);
  4879. BEGIN
  4880. ASM
  4881. MOVE.L A6,-(A7)
  4882. MOVEA.L window,A0
  4883. MOVEA.L windowTitle,A1
  4884. MOVEA.L screenTitle,A2
  4885. MOVEA.L _IntuitionBase,A6
  4886. JSR -276(A6)
  4887. MOVEA.L (A7)+,A6
  4888. END;
  4889. END;
  4890. PROCEDURE ShowTitle(screen : pScreen; showIt : LONGINT);
  4891. BEGIN
  4892. ASM
  4893. MOVE.L A6,-(A7)
  4894. MOVEA.L screen,A0
  4895. MOVE.L showIt,D0
  4896. MOVEA.L _IntuitionBase,A6
  4897. JSR -282(A6)
  4898. MOVEA.L (A7)+,A6
  4899. END;
  4900. END;
  4901. PROCEDURE SizeWindow(window : pWindow; dx : LONGINT; dy : LONGINT);
  4902. BEGIN
  4903. ASM
  4904. MOVE.L A6,-(A7)
  4905. MOVEA.L window,A0
  4906. MOVE.L dx,D0
  4907. MOVE.L dy,D1
  4908. MOVEA.L _IntuitionBase,A6
  4909. JSR -288(A6)
  4910. MOVEA.L (A7)+,A6
  4911. END;
  4912. END;
  4913. FUNCTION SysReqHandler(window : pWindow; idcmpPtr : pULONG; waitInput : LONGINT) : LONGINT;
  4914. BEGIN
  4915. ASM
  4916. MOVE.L A6,-(A7)
  4917. MOVEA.L window,A0
  4918. MOVEA.L idcmpPtr,A1
  4919. MOVE.L waitInput,D0
  4920. MOVEA.L _IntuitionBase,A6
  4921. JSR -600(A6)
  4922. MOVEA.L (A7)+,A6
  4923. MOVE.L D0,@RESULT
  4924. END;
  4925. END;
  4926. FUNCTION TimedDisplayAlert(alertNumber : ULONG;const string_ : pCHAR; height : ULONG; time : ULONG) : BOOLEAN;
  4927. BEGIN
  4928. ASM
  4929. MOVE.L A6,-(A7)
  4930. MOVE.L alertNumber,D0
  4931. MOVEA.L string_,A0
  4932. MOVE.L height,D1
  4933. MOVEA.L time,A1
  4934. MOVEA.L _IntuitionBase,A6
  4935. JSR -822(A6)
  4936. MOVEA.L (A7)+,A6
  4937. TST.W D0
  4938. BEQ.B @end
  4939. MOVEQ #1,D0
  4940. @end: MOVE.B D0,@RESULT
  4941. END;
  4942. END;
  4943. PROCEDURE UnlockIBase(ibLock : ULONG);
  4944. BEGIN
  4945. ASM
  4946. MOVE.L A6,-(A7)
  4947. MOVEA.L ibLock,A0
  4948. MOVEA.L _IntuitionBase,A6
  4949. JSR -420(A6)
  4950. MOVEA.L (A7)+,A6
  4951. END;
  4952. END;
  4953. PROCEDURE UnlockPubScreen(const name : pCHAR; screen : pScreen);
  4954. BEGIN
  4955. ASM
  4956. MOVE.L A6,-(A7)
  4957. MOVEA.L name,A0
  4958. MOVEA.L screen,A1
  4959. MOVEA.L _IntuitionBase,A6
  4960. JSR -516(A6)
  4961. MOVEA.L (A7)+,A6
  4962. END;
  4963. END;
  4964. PROCEDURE UnlockPubScreenList;
  4965. BEGIN
  4966. ASM
  4967. MOVE.L A6,-(A7)
  4968. MOVEA.L _IntuitionBase,A6
  4969. JSR -528(A6)
  4970. MOVEA.L (A7)+,A6
  4971. END;
  4972. END;
  4973. FUNCTION ViewAddress : pView;
  4974. BEGIN
  4975. ASM
  4976. MOVE.L A6,-(A7)
  4977. MOVEA.L _IntuitionBase,A6
  4978. JSR -294(A6)
  4979. MOVEA.L (A7)+,A6
  4980. MOVE.L D0,@RESULT
  4981. END;
  4982. END;
  4983. FUNCTION ViewPortAddress(const window : pWindow) : pViewPort;
  4984. BEGIN
  4985. ASM
  4986. MOVE.L A6,-(A7)
  4987. MOVEA.L window,A0
  4988. MOVEA.L _IntuitionBase,A6
  4989. JSR -300(A6)
  4990. MOVEA.L (A7)+,A6
  4991. MOVE.L D0,@RESULT
  4992. END;
  4993. END;
  4994. FUNCTION WBenchToBack : BOOLEAN;
  4995. BEGIN
  4996. ASM
  4997. MOVE.L A6,-(A7)
  4998. MOVEA.L _IntuitionBase,A6
  4999. JSR -336(A6)
  5000. MOVEA.L (A7)+,A6
  5001. TST.W D0
  5002. BEQ.B @end
  5003. MOVEQ #1,D0
  5004. @end: MOVE.B D0,@RESULT
  5005. END;
  5006. END;
  5007. FUNCTION WBenchToFront : BOOLEAN;
  5008. BEGIN
  5009. ASM
  5010. MOVE.L A6,-(A7)
  5011. MOVEA.L _IntuitionBase,A6
  5012. JSR -342(A6)
  5013. MOVEA.L (A7)+,A6
  5014. TST.W D0
  5015. BEQ.B @end
  5016. MOVEQ #1,D0
  5017. @end: MOVE.B D0,@RESULT
  5018. END;
  5019. END;
  5020. FUNCTION WindowLimits(window : pWindow; widthMin : LONGINT; heightMin : LONGINT; widthMax : ULONG; heightMax : ULONG) : BOOLEAN;
  5021. BEGIN
  5022. ASM
  5023. MOVE.L A6,-(A7)
  5024. MOVEA.L window,A0
  5025. MOVE.L widthMin,D0
  5026. MOVE.L heightMin,D1
  5027. MOVE.L widthMax,D2
  5028. MOVE.L heightMax,D3
  5029. MOVEA.L _IntuitionBase,A6
  5030. JSR -318(A6)
  5031. MOVEA.L (A7)+,A6
  5032. TST.W D0
  5033. BEQ.B @end
  5034. MOVEQ #1,D0
  5035. @end: MOVE.B D0,@RESULT
  5036. END;
  5037. END;
  5038. PROCEDURE WindowToBack(window : pWindow);
  5039. BEGIN
  5040. ASM
  5041. MOVE.L A6,-(A7)
  5042. MOVEA.L window,A0
  5043. MOVEA.L _IntuitionBase,A6
  5044. JSR -306(A6)
  5045. MOVEA.L (A7)+,A6
  5046. END;
  5047. END;
  5048. PROCEDURE WindowToFront(window : pWindow);
  5049. BEGIN
  5050. ASM
  5051. MOVE.L A6,-(A7)
  5052. MOVEA.L window,A0
  5053. MOVEA.L _IntuitionBase,A6
  5054. JSR -312(A6)
  5055. MOVEA.L (A7)+,A6
  5056. END;
  5057. END;
  5058. PROCEDURE ZipWindow(window : pWindow);
  5059. BEGIN
  5060. ASM
  5061. MOVE.L A6,-(A7)
  5062. MOVEA.L window,A0
  5063. MOVEA.L _IntuitionBase,A6
  5064. JSR -504(A6)
  5065. MOVEA.L (A7)+,A6
  5066. END;
  5067. END;
  5068. FUNCTION DisplayAlert(alertNumber : ULONG;const string_ : string; height : ULONG) : BOOLEAN;
  5069. begin
  5070. DisplayAlert := DisplayAlert(alertNumber,pas2c(string_),height);
  5071. end;
  5072. FUNCTION LockPubScreen(const name : string) : pScreen;
  5073. begin
  5074. LockPubScreen := LockPubScreen(pas2c(name));
  5075. end;
  5076. FUNCTION MakeClass(const classID : string;const superClassID : pCHAR;const superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
  5077. begin
  5078. MakeClass := MakeClass(pas2c(classID),superClassID,superClassPtr,instanceSize,flags);
  5079. end;
  5080. FUNCTION MakeClass(const classID : pCHAR;const superClassID : string;const superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
  5081. begin
  5082. MakeClass := MakeClass(classID,pas2c(superClassID),superClassPtr,instanceSize,flags);
  5083. end;
  5084. FUNCTION MakeClass(const classID : string;const superClassID : string;const superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
  5085. begin
  5086. MakeClass := MakeClass(pas2c(classID),pas2c(superClassID),superClassPtr,instanceSize,flags);
  5087. end;
  5088. FUNCTION NewObjectA(classPtr : pIClass;const classID : string;const tagList : pTagItem) : POINTER;
  5089. begin
  5090. NewObjectA := NewObjectA(classPtr,pas2c(classID),taglist);
  5091. end;
  5092. PROCEDURE SetDefaultPubScreen(const name : string);
  5093. begin
  5094. SetDefaultPubScreen(pas2c(name));
  5095. end;
  5096. PROCEDURE SetWindowTitles(window : pWindow;const windowTitle : string;const screenTitle : pCHAR);
  5097. begin
  5098. SetWindowTitles(window,pas2c(windowTitle),screenTitle);
  5099. end;
  5100. PROCEDURE SetWindowTitles(window : pWindow;const windowTitle : pCHAR;const screenTitle : string);
  5101. begin
  5102. SetWindowTitles(window,windowTitle,pas2c(screenTitle));
  5103. end;
  5104. PROCEDURE SetWindowTitles(window : pWindow;const windowTitle : string;const screenTitle : string);
  5105. begin
  5106. SetWindowTitles(window,pas2c(windowTitle),pas2c(screenTitle));
  5107. end;
  5108. FUNCTION TimedDisplayAlert(alertNumber : ULONG;const string_ : string; height : ULONG; time : ULONG) : BOOLEAN;
  5109. begin
  5110. TimedDisplayAlert := TimedDisplayAlert(alertNumber,pas2c(string_),height,time);
  5111. end;
  5112. PROCEDURE UnlockPubScreen(const name : string; screen : pScreen);
  5113. begin
  5114. UnlockPubScreen(pas2c(name),screen);
  5115. end;
  5116. END. (* UNIT INTUITION *)