ccgo_linux_s390x.go 494 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670
  1. // Code generated for linux/s390x by 'generator --prefix-enumerator=_ --prefix-external=x_ --prefix-field=F --prefix-macro=m_ --prefix-static-internal=_ --prefix-static-none=_ --prefix-tagged-enum=_ --prefix-tagged-struct=T --prefix-tagged-union=T --prefix-typename=T --prefix-undefined=_ -extended-errors -ignore-unsupported-alignment -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libfontconfig/include/linux/s390x -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libfreetype/include/linux/s390x -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libX11/include/linux/s390x -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libXrender/include/linux/s390x -lfontconfig -lfreetype -lX11 -lXrender -o libxft.go --package-name libxft src/.libs/libXft.a', DO NOT EDIT.
  2. //go:build linux && s390x
  3. package libxft
  4. import (
  5. "reflect"
  6. "unsafe"
  7. "modernc.org/libX11"
  8. "modernc.org/libXrender"
  9. "modernc.org/libc"
  10. "modernc.org/libfontconfig"
  11. "modernc.org/libfreetype"
  12. )
  13. var _ reflect.Type
  14. var _ unsafe.Pointer
  15. const m_ARG_MAX = 131072
  16. const m_Above = 0
  17. const m_AllTemporary = 0
  18. const m_AllValues = 0x000F
  19. const m_AllocAll = 1
  20. const m_AllocNone = 0
  21. const m_AllowExposures = 1
  22. const m_AlreadyGrabbed = 1
  23. const m_Always = 2
  24. const m_AnyButton = 0
  25. const m_AnyKey = 0
  26. const m_AnyPropertyType = 0
  27. const m_ArcChord = 0
  28. const m_ArcPieSlice = 1
  29. const m_AsyncBoth = 6
  30. const m_AsyncKeyboard = 3
  31. const m_AsyncPointer = 0
  32. const m_AutoRepeatModeDefault = 2
  33. const m_AutoRepeatModeOff = 0
  34. const m_AutoRepeatModeOn = 1
  35. const m_BC_BASE_MAX = 99
  36. const m_BC_DIM_MAX = 2048
  37. const m_BC_SCALE_MAX = 99
  38. const m_BC_STRING_MAX = 1000
  39. const m_BIG_ENDIAN = "__BIG_ENDIAN"
  40. const m_BUFSIZ = 1024
  41. const m_BUFSIZE = 2048
  42. const m_BYTE_ORDER = "__BYTE_ORDER"
  43. const m_BadAccess = 10
  44. const m_BadAlloc = 11
  45. const m_BadAtom = 5
  46. const m_BadColor = 12
  47. const m_BadCursor = 6
  48. const m_BadDrawable = 9
  49. const m_BadFont = 7
  50. const m_BadGC = 13
  51. const m_BadGlyph = 4
  52. const m_BadGlyphSet = 3
  53. const m_BadIDChoice = 14
  54. const m_BadImplementation = 17
  55. const m_BadLength = 16
  56. const m_BadMatch = 8
  57. const m_BadName = 15
  58. const m_BadPictFormat = 0
  59. const m_BadPictOp = 2
  60. const m_BadPicture = 1
  61. const m_BadPixmap = 4
  62. const m_BadRequest = 1
  63. const m_BadValue = 2
  64. const m_BadWindow = 3
  65. const m_Below = 1
  66. const m_BitmapFileInvalid = 2
  67. const m_BitmapNoMemory = 3
  68. const m_BitmapOpenFailed = 1
  69. const m_BitmapSuccess = 0
  70. const m_Bool = "int"
  71. const m_BottomIf = 3
  72. const m_Button1 = 1
  73. const m_Button2 = 2
  74. const m_Button3 = 3
  75. const m_Button4 = 4
  76. const m_Button5 = 5
  77. const m_ButtonPress = 4
  78. const m_ButtonRelease = 5
  79. const m_CFF_CONFIG_OPTION_DARKENING_PARAMETER_X1 = 500
  80. const m_CFF_CONFIG_OPTION_DARKENING_PARAMETER_X2 = 1000
  81. const m_CFF_CONFIG_OPTION_DARKENING_PARAMETER_X3 = 1667
  82. const m_CFF_CONFIG_OPTION_DARKENING_PARAMETER_X4 = 2333
  83. const m_CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y1 = 400
  84. const m_CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y2 = 275
  85. const m_CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y3 = 275
  86. const m_CFF_CONFIG_OPTION_DARKENING_PARAMETER_Y4 = 0
  87. const m_CHARCLASS_NAME_MAX = 14
  88. const m_CHAR_BIT = 8
  89. const m_CHAR_MAX = 255
  90. const m_CHAR_MIN = 0
  91. const m_COLL_WEIGHTS_MAX = 2
  92. const m_CPLastBit = 12
  93. const m_CURSORFONT = "cursor"
  94. const m_CapButt = 1
  95. const m_CapNotLast = 0
  96. const m_CapProjecting = 3
  97. const m_CapRound = 2
  98. const m_CenterGravity = 5
  99. const m_CirculateNotify = 26
  100. const m_CirculateRequest = 27
  101. const m_ClientMessage = 33
  102. const m_ClipByChildren = 0
  103. const m_ColormapInstalled = 1
  104. const m_ColormapNotify = 32
  105. const m_ColormapUninstalled = 0
  106. const m_Complex = 0
  107. const m_ConfigureNotify = 22
  108. const m_ConfigureRequest = 23
  109. const m_ControlMapIndex = 2
  110. const m_Convex = 2
  111. const m_CoordModeOrigin = 0
  112. const m_CoordModePrevious = 1
  113. const m_CopyFromParent = 0
  114. const m_CreateNotify = 16
  115. const m_CurrentTime = 0
  116. const m_CursorShape = 0
  117. const m_DELAYTIMER_MAX = 0x7fffffff
  118. const m_DefaultBlanking = 2
  119. const m_DefaultExposures = 2
  120. const m_DestroyAll = 0
  121. const m_DestroyNotify = 17
  122. const m_DirectColor = 5
  123. const m_DisableAccess = 0
  124. const m_DisableScreenInterval = 0
  125. const m_DisableScreenSaver = 0
  126. const m_DontAllowExposures = 0
  127. const m_DontCareState = 0
  128. const m_DontPreferBlanking = 0
  129. const m_E2BIG = 7
  130. const m_EACCES = 13
  131. const m_EADDRINUSE = 98
  132. const m_EADDRNOTAVAIL = 99
  133. const m_EADV = 68
  134. const m_EAFNOSUPPORT = 97
  135. const m_EAGAIN = 11
  136. const m_EALREADY = 114
  137. const m_EBADE = 52
  138. const m_EBADF = 9
  139. const m_EBADFD = 77
  140. const m_EBADMSG = 74
  141. const m_EBADR = 53
  142. const m_EBADRQC = 56
  143. const m_EBADSLT = 57
  144. const m_EBFONT = 59
  145. const m_EBUSY = 16
  146. const m_ECANCELED = 125
  147. const m_ECHILD = 10
  148. const m_ECHRNG = 44
  149. const m_ECOMM = 70
  150. const m_ECONNABORTED = 103
  151. const m_ECONNREFUSED = 111
  152. const m_ECONNRESET = 104
  153. const m_EDEADLK = 35
  154. const m_EDEADLOCK = "EDEADLK"
  155. const m_EDESTADDRREQ = 89
  156. const m_EDOM = 33
  157. const m_EDOTDOT = 73
  158. const m_EDQUOT = 122
  159. const m_EEXIST = 17
  160. const m_EFAULT = 14
  161. const m_EFBIG = 27
  162. const m_EHOSTDOWN = 112
  163. const m_EHOSTUNREACH = 113
  164. const m_EHWPOISON = 133
  165. const m_EIDRM = 43
  166. const m_EILSEQ = 84
  167. const m_EINPROGRESS = 115
  168. const m_EINTR = 4
  169. const m_EINVAL = 22
  170. const m_EIO = 5
  171. const m_EISCONN = 106
  172. const m_EISDIR = 21
  173. const m_EISNAM = 120
  174. const m_EKEYEXPIRED = 127
  175. const m_EKEYREJECTED = 129
  176. const m_EKEYREVOKED = 128
  177. const m_EL2HLT = 51
  178. const m_EL2NSYNC = 45
  179. const m_EL3HLT = 46
  180. const m_EL3RST = 47
  181. const m_ELIBACC = 79
  182. const m_ELIBBAD = 80
  183. const m_ELIBEXEC = 83
  184. const m_ELIBMAX = 82
  185. const m_ELIBSCN = 81
  186. const m_ELNRNG = 48
  187. const m_ELOOP = 40
  188. const m_EMEDIUMTYPE = 124
  189. const m_EMFILE = 24
  190. const m_EMLINK = 31
  191. const m_EMSGSIZE = 90
  192. const m_EMULTIHOP = 72
  193. const m_ENAMETOOLONG = 36
  194. const m_ENAVAIL = 119
  195. const m_ENETDOWN = 100
  196. const m_ENETRESET = 102
  197. const m_ENETUNREACH = 101
  198. const m_ENFILE = 23
  199. const m_ENOANO = 55
  200. const m_ENOBUFS = 105
  201. const m_ENOCSI = 50
  202. const m_ENODATA = 61
  203. const m_ENODEV = 19
  204. const m_ENOENT = 2
  205. const m_ENOEXEC = 8
  206. const m_ENOKEY = 126
  207. const m_ENOLCK = 37
  208. const m_ENOLINK = 67
  209. const m_ENOMEDIUM = 123
  210. const m_ENOMEM = 12
  211. const m_ENOMSG = 42
  212. const m_ENONET = 64
  213. const m_ENOPKG = 65
  214. const m_ENOPROTOOPT = 92
  215. const m_ENOSPC = 28
  216. const m_ENOSR = 63
  217. const m_ENOSTR = 60
  218. const m_ENOSYS = 38
  219. const m_ENOTBLK = 15
  220. const m_ENOTCONN = 107
  221. const m_ENOTDIR = 20
  222. const m_ENOTEMPTY = 39
  223. const m_ENOTNAM = 118
  224. const m_ENOTRECOVERABLE = 131
  225. const m_ENOTSOCK = 88
  226. const m_ENOTSUP = "EOPNOTSUPP"
  227. const m_ENOTTY = 25
  228. const m_ENOTUNIQ = 76
  229. const m_ENXIO = 6
  230. const m_EOPNOTSUPP = 95
  231. const m_EOVERFLOW = 75
  232. const m_EOWNERDEAD = 130
  233. const m_EPERM = 1
  234. const m_EPFNOSUPPORT = 96
  235. const m_EPIPE = 32
  236. const m_EPROTO = 71
  237. const m_EPROTONOSUPPORT = 93
  238. const m_EPROTOTYPE = 91
  239. const m_ERANGE = 34
  240. const m_EREMCHG = 78
  241. const m_EREMOTE = 66
  242. const m_EREMOTEIO = 121
  243. const m_ERESTART = 85
  244. const m_ERFKILL = 132
  245. const m_EROFS = 30
  246. const m_ESHUTDOWN = 108
  247. const m_ESOCKTNOSUPPORT = 94
  248. const m_ESPIPE = 29
  249. const m_ESRCH = 3
  250. const m_ESRMNT = 69
  251. const m_ESTALE = 116
  252. const m_ESTRPIPE = 86
  253. const m_ETIME = 62
  254. const m_ETIMEDOUT = 110
  255. const m_ETOOMANYREFS = 109
  256. const m_ETXTBSY = 26
  257. const m_EUCLEAN = 117
  258. const m_EUNATCH = 49
  259. const m_EUSERS = 87
  260. const m_EWOULDBLOCK = "EAGAIN"
  261. const m_EXDEV = 18
  262. const m_EXFULL = 54
  263. const m_EXIT_FAILURE = 1
  264. const m_EXIT_SUCCESS = 0
  265. const m_EXPR_NEST_MAX = 32
  266. const m_EastGravity = 6
  267. const m_EnableAccess = 1
  268. const m_EnterNotify = 7
  269. const m_EvenOddRule = 0
  270. const m_Expose = 12
  271. const m_FARCSPERBATCH = 256
  272. const m_FC_ANTIALIAS = "antialias"
  273. const m_FC_ASPECT = "aspect"
  274. const m_FC_AUTOHINT = "autohint"
  275. const m_FC_CACHE_VERSION_NUMBER = 7
  276. const m_FC_CAPABILITY = "capability"
  277. const m_FC_CHARCELL = 110
  278. const m_FC_CHARSET = "charset"
  279. const m_FC_CHARWIDTH = "charwidth"
  280. const m_FC_CHAR_HEIGHT = "charheight"
  281. const m_FC_CHAR_WIDTH = "FC_CHARWIDTH"
  282. const m_FC_COLOR = "color"
  283. const m_FC_DECORATIVE = "decorative"
  284. const m_FC_DPI = "dpi"
  285. const m_FC_DUAL = 90
  286. const m_FC_EMBEDDED_BITMAP = "embeddedbitmap"
  287. const m_FC_EMBOLDEN = "embolden"
  288. const m_FC_FAMILY = "family"
  289. const m_FC_FAMILYLANG = "familylang"
  290. const m_FC_FILE = "file"
  291. const m_FC_FONTFORMAT = "fontformat"
  292. const m_FC_FONTVERSION = "fontversion"
  293. const m_FC_FONT_FEATURES = "fontfeatures"
  294. const m_FC_FONT_VARIATIONS = "fontvariations"
  295. const m_FC_FOUNDRY = "foundry"
  296. const m_FC_FT_FACE = "ftface"
  297. const m_FC_FULLNAME = "fullname"
  298. const m_FC_FULLNAMELANG = "fullnamelang"
  299. const m_FC_GLOBAL_ADVANCE = "globaladvance"
  300. const m_FC_HASH = "hash"
  301. const m_FC_HINTING = "hinting"
  302. const m_FC_HINT_FULL = 3
  303. const m_FC_HINT_MEDIUM = 2
  304. const m_FC_HINT_NONE = 0
  305. const m_FC_HINT_SLIGHT = 1
  306. const m_FC_HINT_STYLE = "hintstyle"
  307. const m_FC_INDEX = "index"
  308. const m_FC_LANG = "lang"
  309. const m_FC_LCD_DEFAULT = 1
  310. const m_FC_LCD_FILTER = "lcdfilter"
  311. const m_FC_LCD_LEGACY = 3
  312. const m_FC_LCD_LIGHT = 2
  313. const m_FC_LCD_NONE = 0
  314. const m_FC_MAJOR = 2
  315. const m_FC_MATRIX = "matrix"
  316. const m_FC_MINOR = 13
  317. const m_FC_MINSPACE = "minspace"
  318. const m_FC_MONO = 100
  319. const m_FC_NAMELANG = "namelang"
  320. const m_FC_OUTLINE = "outline"
  321. const m_FC_PIXEL_SIZE = "pixelsize"
  322. const m_FC_POSTSCRIPT_NAME = "postscriptname"
  323. const m_FC_PRGNAME = "prgname"
  324. const m_FC_PROPORTIONAL = 0
  325. const m_FC_RASTERIZER = "rasterizer"
  326. const m_FC_REVISION = 1
  327. const m_FC_RGBA = "rgba"
  328. const m_FC_RGBA_BGR = 2
  329. const m_FC_RGBA_NONE = 5
  330. const m_FC_RGBA_RGB = 1
  331. const m_FC_RGBA_UNKNOWN = 0
  332. const m_FC_RGBA_VBGR = 4
  333. const m_FC_RGBA_VRGB = 3
  334. const m_FC_SCALABLE = "scalable"
  335. const m_FC_SCALE = "scale"
  336. const m_FC_SIZE = "size"
  337. const m_FC_SLANT = "slant"
  338. const m_FC_SLANT_ITALIC = 100
  339. const m_FC_SLANT_OBLIQUE = 110
  340. const m_FC_SLANT_ROMAN = 0
  341. const m_FC_SOURCE = "source"
  342. const m_FC_SPACING = "spacing"
  343. const m_FC_STYLE = "style"
  344. const m_FC_STYLELANG = "stylelang"
  345. const m_FC_SYMBOL = "symbol"
  346. const m_FC_UTF8_MAX_LEN = 6
  347. const m_FC_VARIABLE = "variable"
  348. const m_FC_VERTICAL_LAYOUT = "verticallayout"
  349. const m_FC_WEIGHT = "weight"
  350. const m_FC_WEIGHT_BLACK = 210
  351. const m_FC_WEIGHT_BOLD = 200
  352. const m_FC_WEIGHT_BOOK = 75
  353. const m_FC_WEIGHT_DEMIBOLD = 180
  354. const m_FC_WEIGHT_DEMILIGHT = 55
  355. const m_FC_WEIGHT_EXTRABLACK = 215
  356. const m_FC_WEIGHT_EXTRABOLD = 205
  357. const m_FC_WEIGHT_EXTRALIGHT = 40
  358. const m_FC_WEIGHT_HEAVY = "FC_WEIGHT_BLACK"
  359. const m_FC_WEIGHT_LIGHT = 50
  360. const m_FC_WEIGHT_MEDIUM = 100
  361. const m_FC_WEIGHT_NORMAL = "FC_WEIGHT_REGULAR"
  362. const m_FC_WEIGHT_REGULAR = 80
  363. const m_FC_WEIGHT_SEMIBOLD = "FC_WEIGHT_DEMIBOLD"
  364. const m_FC_WEIGHT_SEMILIGHT = "FC_WEIGHT_DEMILIGHT"
  365. const m_FC_WEIGHT_THIN = 0
  366. const m_FC_WEIGHT_ULTRABLACK = "FC_WEIGHT_EXTRABLACK"
  367. const m_FC_WEIGHT_ULTRABOLD = "FC_WEIGHT_EXTRABOLD"
  368. const m_FC_WEIGHT_ULTRALIGHT = "FC_WEIGHT_EXTRALIGHT"
  369. const m_FC_WIDTH = "width"
  370. const m_FC_WIDTH_CONDENSED = 75
  371. const m_FC_WIDTH_EXPANDED = 125
  372. const m_FC_WIDTH_EXTRACONDENSED = 63
  373. const m_FC_WIDTH_EXTRAEXPANDED = 150
  374. const m_FC_WIDTH_NORMAL = 100
  375. const m_FC_WIDTH_SEMICONDENSED = 87
  376. const m_FC_WIDTH_SEMIEXPANDED = 113
  377. const m_FC_WIDTH_ULTRACONDENSED = 50
  378. const m_FC_WIDTH_ULTRAEXPANDED = 200
  379. const m_FD_SETSIZE = 1024
  380. const m_FILENAME_MAX = 4096
  381. const m_FILESIZEBITS = 64
  382. const m_FOPEN_MAX = 1000
  383. const m_FRCTSPERBATCH = 256
  384. const m_FREETYPE_MAJOR = 2
  385. const m_FREETYPE_MINOR = 10
  386. const m_FREETYPE_PATCH = 4
  387. const m_FT_AUTOHINTER_H = "FT_DRIVER_H"
  388. const m_FT_CACHE_CHARMAP_H = "FT_CACHE_H"
  389. const m_FT_CACHE_IMAGE_H = "FT_CACHE_H"
  390. const m_FT_CACHE_INTERNAL_CACHE_H = "FT_CACHE_H"
  391. const m_FT_CACHE_INTERNAL_GLYPH_H = "FT_CACHE_H"
  392. const m_FT_CACHE_INTERNAL_IMAGE_H = "FT_CACHE_H"
  393. const m_FT_CACHE_INTERNAL_MANAGER_H = "FT_CACHE_H"
  394. const m_FT_CACHE_INTERNAL_MRU_H = "FT_CACHE_H"
  395. const m_FT_CACHE_INTERNAL_SBITS_H = "FT_CACHE_H"
  396. const m_FT_CACHE_MANAGER_H = "FT_CACHE_H"
  397. const m_FT_CACHE_SMALL_BITMAPS_H = "FT_CACHE_H"
  398. const m_FT_CFF_DRIVER_H = "FT_DRIVER_H"
  399. const m_FT_CHAR_BIT = "CHAR_BIT"
  400. const m_FT_CURVE_TAG_CONIC = 0x00
  401. const m_FT_CURVE_TAG_CUBIC = 0x02
  402. const m_FT_CURVE_TAG_HAS_SCANMODE = 0x04
  403. const m_FT_CURVE_TAG_ON = 0x01
  404. const m_FT_CURVE_TAG_TOUCH_X = 0x08
  405. const m_FT_CURVE_TAG_TOUCH_Y = 0x10
  406. const m_FT_Curve_Tag_Conic = "FT_CURVE_TAG_CONIC"
  407. const m_FT_Curve_Tag_Cubic = "FT_CURVE_TAG_CUBIC"
  408. const m_FT_Curve_Tag_On = "FT_CURVE_TAG_ON"
  409. const m_FT_Curve_Tag_Touch_X = "FT_CURVE_TAG_TOUCH_X"
  410. const m_FT_Curve_Tag_Touch_Y = "FT_CURVE_TAG_TOUCH_Y"
  411. const m_FT_FILE = "FILE"
  412. const m_FT_FSTYPE_BITMAP_EMBEDDING_ONLY = 0x0200
  413. const m_FT_FSTYPE_EDITABLE_EMBEDDING = 0x0008
  414. const m_FT_FSTYPE_INSTALLABLE_EMBEDDING = 0x0000
  415. const m_FT_FSTYPE_NO_SUBSETTING = 0x0100
  416. const m_FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING = 0x0004
  417. const m_FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING = 0x0002
  418. const m_FT_INT64 = "long"
  419. const m_FT_INT_MAX = "INT_MAX"
  420. const m_FT_INT_MIN = "INT_MIN"
  421. const m_FT_LOAD_DEFAULT = 0x0
  422. const m_FT_LONG_MAX = "LONG_MAX"
  423. const m_FT_LONG_MIN = "LONG_MIN"
  424. const m_FT_MAX_MODULES = 32
  425. const m_FT_OPEN_DRIVER = 0x8
  426. const m_FT_OPEN_MEMORY = 0x1
  427. const m_FT_OPEN_PARAMS = 0x10
  428. const m_FT_OPEN_PATHNAME = 0x4
  429. const m_FT_OPEN_STREAM = 0x2
  430. const m_FT_OUTLINE_CONTOURS_MAX = "SHRT_MAX"
  431. const m_FT_OUTLINE_EVEN_ODD_FILL = 0x2
  432. const m_FT_OUTLINE_HIGH_PRECISION = 0x100
  433. const m_FT_OUTLINE_IGNORE_DROPOUTS = 0x8
  434. const m_FT_OUTLINE_INCLUDE_STUBS = 0x20
  435. const m_FT_OUTLINE_NONE = 0x0
  436. const m_FT_OUTLINE_OVERLAP = 0x40
  437. const m_FT_OUTLINE_OWNER = 0x1
  438. const m_FT_OUTLINE_POINTS_MAX = "SHRT_MAX"
  439. const m_FT_OUTLINE_REVERSE_FILL = 0x4
  440. const m_FT_OUTLINE_SINGLE_PASS = 0x200
  441. const m_FT_OUTLINE_SMART_DROPOUTS = 0x10
  442. const m_FT_Outline_ConicTo_Func = "FT_Outline_ConicToFunc"
  443. const m_FT_Outline_CubicTo_Func = "FT_Outline_CubicToFunc"
  444. const m_FT_Outline_LineTo_Func = "FT_Outline_LineToFunc"
  445. const m_FT_Outline_MoveTo_Func = "FT_Outline_MoveToFunc"
  446. const m_FT_PCF_DRIVER_H = "FT_DRIVER_H"
  447. const m_FT_RASTER_FLAG_AA = 0x1
  448. const m_FT_RASTER_FLAG_CLIP = 0x4
  449. const m_FT_RASTER_FLAG_DEFAULT = 0x0
  450. const m_FT_RASTER_FLAG_DIRECT = 0x2
  451. const m_FT_RENDER_POOL_SIZE = 16384
  452. const m_FT_Raster_Done_Func = "FT_Raster_DoneFunc"
  453. const m_FT_Raster_New_Func = "FT_Raster_NewFunc"
  454. const m_FT_Raster_Render_Func = "FT_Raster_RenderFunc"
  455. const m_FT_Raster_Reset_Func = "FT_Raster_ResetFunc"
  456. const m_FT_Raster_Set_Mode_Func = "FT_Raster_SetModeFunc"
  457. const m_FT_Raster_Span_Func = "FT_SpanFunc"
  458. const m_FT_SUBGLYPH_FLAG_2X2 = 0x80
  459. const m_FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS = 1
  460. const m_FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES = 2
  461. const m_FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID = 4
  462. const m_FT_SUBGLYPH_FLAG_SCALE = 8
  463. const m_FT_SUBGLYPH_FLAG_USE_MY_METRICS = 0x200
  464. const m_FT_SUBGLYPH_FLAG_XY_SCALE = 0x40
  465. const m_FT_TRUETYPE_DRIVER_H = "FT_DRIVER_H"
  466. const m_FT_UINT_MAX = "UINT_MAX"
  467. const m_FT_ULONG_MAX = "ULONG_MAX"
  468. const m_FT_USHORT_MAX = "USHRT_MAX"
  469. const m_FT_XFREE86_H = "FT_FONT_FORMATS_H"
  470. const m_FUNCPROTO = 15
  471. const m_False = 0
  472. const m_FamilyChaos = 2
  473. const m_FamilyDECnet = 1
  474. const m_FamilyInternet = 0
  475. const m_FamilyInternet6 = 6
  476. const m_FamilyServerInterpreted = 5
  477. const m_FcConfigGetRescanInverval = "FcConfigGetRescanInverval_REPLACE_BY_FcConfigGetRescanInterval"
  478. const m_FcConfigSetRescanInverval = "FcConfigSetRescanInverval_REPLACE_BY_FcConfigSetRescanInterval"
  479. const m_FcDontCare = 2
  480. const m_FcFalse = 0
  481. const m_FcTrue = 1
  482. const m_FillOpaqueStippled = 3
  483. const m_FillSolid = 0
  484. const m_FillStippled = 2
  485. const m_FillTiled = 1
  486. const m_FilterBest = "best"
  487. const m_FilterBilinear = "bilinear"
  488. const m_FilterConvolution = "convolution"
  489. const m_FilterFast = "fast"
  490. const m_FilterGood = "good"
  491. const m_FilterNearest = "nearest"
  492. const m_FirstExtensionError = 128
  493. const m_FocusIn = 9
  494. const m_FocusOut = 10
  495. const m_FontChange = 255
  496. const m_FontLeftToRight = 0
  497. const m_FontRightToLeft = 1
  498. const m_ForgetGravity = 0
  499. const m_GCLastBit = 22
  500. const m_GXand = 0x1
  501. const m_GXandInverted = 0x4
  502. const m_GXandReverse = 0x2
  503. const m_GXclear = 0x0
  504. const m_GXcopy = 0x3
  505. const m_GXcopyInverted = 0xc
  506. const m_GXequiv = 0x9
  507. const m_GXinvert = 0xa
  508. const m_GXnand = 0xe
  509. const m_GXnoop = 0x5
  510. const m_GXnor = 0x8
  511. const m_GXor = 0x7
  512. const m_GXorInverted = 0xd
  513. const m_GXorReverse = 0xb
  514. const m_GXset = 0xf
  515. const m_GXxor = 0x6
  516. const m_GenericEvent = 35
  517. const m_GrabFrozen = 4
  518. const m_GrabInvalidTime = 2
  519. const m_GrabModeAsync = 1
  520. const m_GrabModeSync = 0
  521. const m_GrabNotViewable = 3
  522. const m_GrabSuccess = 0
  523. const m_GraphicsExpose = 13
  524. const m_GravityNotify = 24
  525. const m_GrayScale = 1
  526. const m_HAVE_CONFIG_H = 1
  527. const m_HAVE_DLFCN_H = 1
  528. const m_HAVE_INTTYPES_H = 1
  529. const m_HAVE_MEMORY_H = 1
  530. const m_HAVE_STDINT_H = 1
  531. const m_HAVE_STDLIB_H = 1
  532. const m_HAVE_STRINGS_H = 1
  533. const m_HAVE_STRING_H = 1
  534. const m_HAVE_SYS_STAT_H = 1
  535. const m_HAVE_SYS_TYPES_H = 1
  536. const m_HAVE_UNISTD_H = 1
  537. const m_HOST_NAME_MAX = 255
  538. const m_HeightValue = 0x0008
  539. const m_HostDelete = 1
  540. const m_HostInsert = 0
  541. const m_INT16_MAX = 0x7fff
  542. const m_INT32_MAX = 0x7fffffff
  543. const m_INT64_MAX = 0x7fffffffffffffff
  544. const m_INT8_MAX = 0x7f
  545. const m_INTMAX_MAX = "INT64_MAX"
  546. const m_INTMAX_MIN = "INT64_MIN"
  547. const m_INTPTR_MAX = "INT64_MAX"
  548. const m_INTPTR_MIN = "INT64_MIN"
  549. const m_INT_FAST16_MAX = "INT32_MAX"
  550. const m_INT_FAST16_MIN = "INT32_MIN"
  551. const m_INT_FAST32_MAX = "INT32_MAX"
  552. const m_INT_FAST32_MIN = "INT32_MIN"
  553. const m_INT_FAST64_MAX = "INT64_MAX"
  554. const m_INT_FAST64_MIN = "INT64_MIN"
  555. const m_INT_FAST8_MAX = "INT8_MAX"
  556. const m_INT_FAST8_MIN = "INT8_MIN"
  557. const m_INT_LEAST16_MAX = "INT16_MAX"
  558. const m_INT_LEAST16_MIN = "INT16_MIN"
  559. const m_INT_LEAST32_MAX = "INT32_MAX"
  560. const m_INT_LEAST32_MIN = "INT32_MIN"
  561. const m_INT_LEAST64_MAX = "INT64_MAX"
  562. const m_INT_LEAST64_MIN = "INT64_MIN"
  563. const m_INT_LEAST8_MAX = "INT8_MAX"
  564. const m_INT_LEAST8_MIN = "INT8_MIN"
  565. const m_INT_MAX = 2147483647
  566. const m_IOV_MAX = 1024
  567. const m_IconicState = 3
  568. const m_InactiveState = 4
  569. const m_IncludeInferiors = 1
  570. const m_InputFocus = 1
  571. const m_InputOnly = 2
  572. const m_InputOutput = 1
  573. const m_IsUnmapped = 0
  574. const m_IsUnviewable = 1
  575. const m_IsViewable = 2
  576. const m_JoinBevel = 2
  577. const m_JoinMiter = 0
  578. const m_JoinRound = 1
  579. const m_KeyPress = 2
  580. const m_KeyRelease = 3
  581. const m_KeymapNotify = 11
  582. const m_LASTEvent = 36
  583. const m_LINE_MAX = 4096
  584. const m_LITTLE_ENDIAN = "__LITTLE_ENDIAN"
  585. const m_LLONG_MAX = 0x7fffffffffffffff
  586. const m_LOCKED = 1
  587. const m_LOGIN_NAME_MAX = 256
  588. const m_LONG_BIT = 64
  589. const m_LONG_MAX = "__LONG_MAX"
  590. const m_LSBFirst = 0
  591. const m_LT_OBJDIR = ".libs/"
  592. const m_L_ctermid = 20
  593. const m_L_cuserid = 20
  594. const m_L_tmpnam = 20
  595. const m_LastExtensionError = 255
  596. const m_LeaveNotify = 8
  597. const m_LedModeOff = 0
  598. const m_LedModeOn = 1
  599. const m_LineDoubleDash = 2
  600. const m_LineOnOffDash = 1
  601. const m_LineSolid = 0
  602. const m_LockMapIndex = 1
  603. const m_LowerHighest = 1
  604. const m_MB_LEN_MAX = 4
  605. const m_MQ_PRIO_MAX = 32768
  606. const m_MSBFirst = 1
  607. const m_MapNotify = 19
  608. const m_MapRequest = 20
  609. const m_MappingBusy = 1
  610. const m_MappingFailed = 2
  611. const m_MappingKeyboard = 1
  612. const m_MappingModifier = 0
  613. const m_MappingNotify = 34
  614. const m_MappingPointer = 2
  615. const m_MappingSuccess = 0
  616. const m_Mod1MapIndex = 3
  617. const m_Mod2MapIndex = 4
  618. const m_Mod3MapIndex = 5
  619. const m_Mod4MapIndex = 6
  620. const m_Mod5MapIndex = 7
  621. const m_MotionNotify = 6
  622. const m_NAME_MAX = 255
  623. const m_NDEBUG = 1
  624. const m_NGROUPS_MAX = 32
  625. const m_NL_ARGMAX = 9
  626. const m_NL_LANGMAX = 32
  627. const m_NL_MSGMAX = 32767
  628. const m_NL_NMAX = 16
  629. const m_NL_SETMAX = 255
  630. const m_NL_TEXTMAX = 2048
  631. const m_NZERO = 20
  632. const m_NeedFunctionPrototypes = 1
  633. const m_NeedNestedPrototypes = 1
  634. const m_NeedVarargsPrototypes = 1
  635. const m_NeedWidePrototypes = 0
  636. const m_NoEventMask = 0
  637. const m_NoExpose = 14
  638. const m_NoSymbol = 0
  639. const m_NoValue = 0x0000
  640. const m_Nonconvex = 1
  641. const m_None = 0
  642. const m_NormalState = 1
  643. const m_NorthEastGravity = 3
  644. const m_NorthGravity = 2
  645. const m_NorthWestGravity = 1
  646. const m_NotUseful = 0
  647. const m_NotifyAncestor = 0
  648. const m_NotifyDetailNone = 7
  649. const m_NotifyGrab = 1
  650. const m_NotifyHint = 1
  651. const m_NotifyInferior = 2
  652. const m_NotifyNonlinear = 3
  653. const m_NotifyNonlinearVirtual = 4
  654. const m_NotifyNormal = 0
  655. const m_NotifyPointer = 5
  656. const m_NotifyPointerRoot = 6
  657. const m_NotifyUngrab = 2
  658. const m_NotifyVirtual = 1
  659. const m_NotifyWhileGrabbed = 3
  660. const m_Opposite = 4
  661. const m_PACKAGE = "libXft"
  662. const m_PACKAGE_BUGREPORT = "https://bugs.freedesktop.org/enter_bug.cgi?product=xorg"
  663. const m_PACKAGE_NAME = "libXft"
  664. const m_PACKAGE_STRING = "libXft 2.3.2"
  665. const m_PACKAGE_TARNAME = "libXft"
  666. const m_PACKAGE_URL = ""
  667. const m_PACKAGE_VERSION = "2.3.2"
  668. const m_PACKAGE_VERSION_MAJOR = 2
  669. const m_PACKAGE_VERSION_MINOR = 3
  670. const m_PACKAGE_VERSION_PATCHLEVEL = 2
  671. const m_PAGESIZE = 4096
  672. const m_PAGE_SIZE = "PAGESIZE"
  673. const m_PATH_MAX = 4096
  674. const m_PDP_ENDIAN = "__PDP_ENDIAN"
  675. const m_PIPE_BUF = 4096
  676. const m_PTHREAD_DESTRUCTOR_ITERATIONS = 4
  677. const m_PTHREAD_KEYS_MAX = 128
  678. const m_PTHREAD_STACK_MIN = 2048
  679. const m_PTRDIFF_MAX = "INT64_MAX"
  680. const m_PTRDIFF_MIN = "INT64_MIN"
  681. const m_PTSPERBATCH = 1024
  682. const m_P_tmpdir = "/tmp"
  683. const m_ParentRelative = 1
  684. const m_PictOpAdd = 12
  685. const m_PictOpAtop = 9
  686. const m_PictOpAtopReverse = 10
  687. const m_PictOpBlendMaximum = 0x3e
  688. const m_PictOpBlendMinimum = 0x30
  689. const m_PictOpClear = 0
  690. const m_PictOpColorBurn = 0x36
  691. const m_PictOpColorDodge = 0x35
  692. const m_PictOpConjointAtop = 0x29
  693. const m_PictOpConjointAtopReverse = 0x2a
  694. const m_PictOpConjointClear = 0x20
  695. const m_PictOpConjointDst = 0x22
  696. const m_PictOpConjointIn = 0x25
  697. const m_PictOpConjointInReverse = 0x26
  698. const m_PictOpConjointMaximum = 0x2b
  699. const m_PictOpConjointMinimum = 0x20
  700. const m_PictOpConjointOut = 0x27
  701. const m_PictOpConjointOutReverse = 0x28
  702. const m_PictOpConjointOver = 0x23
  703. const m_PictOpConjointOverReverse = 0x24
  704. const m_PictOpConjointSrc = 0x21
  705. const m_PictOpConjointXor = 0x2b
  706. const m_PictOpDarken = 0x33
  707. const m_PictOpDifference = 0x39
  708. const m_PictOpDisjointAtop = 0x19
  709. const m_PictOpDisjointAtopReverse = 0x1a
  710. const m_PictOpDisjointClear = 0x10
  711. const m_PictOpDisjointDst = 0x12
  712. const m_PictOpDisjointIn = 0x15
  713. const m_PictOpDisjointInReverse = 0x16
  714. const m_PictOpDisjointMaximum = 0x1b
  715. const m_PictOpDisjointMinimum = 0x10
  716. const m_PictOpDisjointOut = 0x17
  717. const m_PictOpDisjointOutReverse = 0x18
  718. const m_PictOpDisjointOver = 0x13
  719. const m_PictOpDisjointOverReverse = 0x14
  720. const m_PictOpDisjointSrc = 0x11
  721. const m_PictOpDisjointXor = 0x1b
  722. const m_PictOpDst = 2
  723. const m_PictOpExclusion = 0x3a
  724. const m_PictOpHSLColor = 0x3d
  725. const m_PictOpHSLHue = 0x3b
  726. const m_PictOpHSLLuminosity = 0x3e
  727. const m_PictOpHSLSaturation = 0x3c
  728. const m_PictOpHardLight = 0x37
  729. const m_PictOpIn = 5
  730. const m_PictOpInReverse = 6
  731. const m_PictOpLighten = 0x34
  732. const m_PictOpMaximum = 13
  733. const m_PictOpMinimum = 0
  734. const m_PictOpMultiply = 0x30
  735. const m_PictOpOut = 7
  736. const m_PictOpOutReverse = 8
  737. const m_PictOpOver = 3
  738. const m_PictOpOverReverse = 4
  739. const m_PictOpOverlay = 0x32
  740. const m_PictOpSaturate = 13
  741. const m_PictOpScreen = 0x31
  742. const m_PictOpSoftLight = 0x38
  743. const m_PictOpSrc = 1
  744. const m_PictOpXor = 11
  745. const m_PictStandardA1 = 4
  746. const m_PictStandardA4 = 3
  747. const m_PictStandardA8 = 2
  748. const m_PictStandardARGB32 = 0
  749. const m_PictStandardNUM = 5
  750. const m_PictStandardRGB24 = 1
  751. const m_PictTypeDirect = 1
  752. const m_PictTypeIndexed = 0
  753. const m_PlaceOnBottom = 1
  754. const m_PlaceOnTop = 0
  755. const m_PointerRoot = 1
  756. const m_PointerWindow = 0
  757. const m_PolyEdgeSharp = 0
  758. const m_PolyEdgeSmooth = 1
  759. const m_PolyModeImprecise = 1
  760. const m_PolyModePrecise = 0
  761. const m_PreferBlanking = 1
  762. const m_PropModeAppend = 2
  763. const m_PropModePrepend = 1
  764. const m_PropModeReplace = 0
  765. const m_PropertyDelete = 1
  766. const m_PropertyNewValue = 0
  767. const m_PropertyNotify = 28
  768. const m_PseudoColor = 3
  769. const m_QueuedAfterFlush = 2
  770. const m_QueuedAfterReading = 1
  771. const m_QueuedAlready = 0
  772. const m_RAND_MAX = 0x7fffffff
  773. const m_RENDER_MAJOR = 0
  774. const m_RENDER_MINOR = 11
  775. const m_RENDER_NAME = "RENDER"
  776. const m_RE_DUP_MAX = 255
  777. const m_RaiseLowest = 0
  778. const m_RectangleIn = 1
  779. const m_RectangleOut = 0
  780. const m_RectanglePart = 2
  781. const m_ReparentNotify = 21
  782. const m_RepeatNone = 0
  783. const m_RepeatNormal = 1
  784. const m_RepeatPad = 2
  785. const m_RepeatReflect = 3
  786. const m_ReplayKeyboard = 5
  787. const m_ReplayPointer = 2
  788. const m_ResizeRequest = 25
  789. const m_RetainPermanent = 1
  790. const m_RetainTemporary = 2
  791. const m_RevertToParent = 2
  792. const m_SCHAR_MAX = 127
  793. const m_SEM_NSEMS_MAX = 256
  794. const m_SEM_VALUE_MAX = 0x7fffffff
  795. const m_SHRT_MAX = 0x7fff
  796. const m_SIG_ATOMIC_MAX = "INT32_MAX"
  797. const m_SIG_ATOMIC_MIN = "INT32_MIN"
  798. const m_SIZE_MAX = "UINT64_MAX"
  799. const m_SSIZE_MAX = "LONG_MAX"
  800. const m_STATX_ALL = 0xfff
  801. const m_STATX_ATIME = 0x20
  802. const m_STATX_BASIC_STATS = 0x7ff
  803. const m_STATX_BLOCKS = 0x400
  804. const m_STATX_BTIME = 0x800
  805. const m_STATX_CTIME = 0x80
  806. const m_STATX_GID = 0x10
  807. const m_STATX_INO = 0x100
  808. const m_STATX_MODE = 2
  809. const m_STATX_MTIME = 0x40
  810. const m_STATX_NLINK = 4
  811. const m_STATX_SIZE = 0x200
  812. const m_STATX_TYPE = 1
  813. const m_STATX_UID = 8
  814. const m_STDC_HEADERS = 1
  815. const m_SYMLOOP_MAX = 40
  816. const m_S_IEXEC = "S_IXUSR"
  817. const m_S_IFBLK = 0060000
  818. const m_S_IFCHR = 0020000
  819. const m_S_IFDIR = 0040000
  820. const m_S_IFIFO = 0010000
  821. const m_S_IFLNK = 0120000
  822. const m_S_IFMT = 0170000
  823. const m_S_IFREG = 0100000
  824. const m_S_IFSOCK = 0140000
  825. const m_S_IREAD = "S_IRUSR"
  826. const m_S_IRGRP = 0040
  827. const m_S_IROTH = 0004
  828. const m_S_IRUSR = 0400
  829. const m_S_IRWXG = 0070
  830. const m_S_IRWXO = 0007
  831. const m_S_IRWXU = 0700
  832. const m_S_ISGID = 02000
  833. const m_S_ISUID = 04000
  834. const m_S_ISVTX = 01000
  835. const m_S_IWGRP = 0020
  836. const m_S_IWOTH = 0002
  837. const m_S_IWRITE = "S_IWUSR"
  838. const m_S_IWUSR = 0200
  839. const m_S_IXGRP = 0010
  840. const m_S_IXOTH = 0001
  841. const m_S_IXUSR = 0100
  842. const m_ScreenSaverActive = 1
  843. const m_ScreenSaverReset = 0
  844. const m_SelectionClear = 29
  845. const m_SelectionNotify = 31
  846. const m_SelectionRequest = 30
  847. const m_SetModeDelete = 1
  848. const m_SetModeInsert = 0
  849. const m_ShiftMapIndex = 0
  850. const m_SouthEastGravity = 9
  851. const m_SouthGravity = 8
  852. const m_SouthWestGravity = 7
  853. const m_StaticColor = 2
  854. const m_StaticGravity = 10
  855. const m_StaticGray = 0
  856. const m_Status = "int"
  857. const m_StippleShape = 2
  858. const m_SubPixelHorizontalBGR = 2
  859. const m_SubPixelHorizontalRGB = 1
  860. const m_SubPixelNone = 5
  861. const m_SubPixelUnknown = 0
  862. const m_SubPixelVerticalBGR = 4
  863. const m_SubPixelVerticalRGB = 3
  864. const m_Success = 0
  865. const m_SyncBoth = 7
  866. const m_SyncKeyboard = 4
  867. const m_SyncPointer = 1
  868. const m_T1_MAX_CHARSTRINGS_OPERANDS = 256
  869. const m_T1_MAX_DICT_DEPTH = 5
  870. const m_T1_MAX_SUBRS_CALLS = 16
  871. const m_TMP_MAX = 10000
  872. const m_TTY_NAME_MAX = 32
  873. const m_TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES = 1000000
  874. const m_TT_CONFIG_OPTION_SUBPIXEL_HINTING = 2
  875. const m_TZNAME_MAX = 6
  876. const m_TileShape = 1
  877. const m_TopIf = 2
  878. const m_True = 1
  879. const m_TrueColor = 4
  880. const m_UCHAR_MAX = 255
  881. const m_UINT16_MAX = 0xffff
  882. const m_UINT32_MAX = "0xffffffffu"
  883. const m_UINT64_MAX = "0xffffffffffffffffu"
  884. const m_UINT8_MAX = 0xff
  885. const m_UINTMAX_MAX = "UINT64_MAX"
  886. const m_UINTPTR_MAX = "UINT64_MAX"
  887. const m_UINT_FAST16_MAX = "UINT32_MAX"
  888. const m_UINT_FAST32_MAX = "UINT32_MAX"
  889. const m_UINT_FAST64_MAX = "UINT64_MAX"
  890. const m_UINT_FAST8_MAX = "UINT8_MAX"
  891. const m_UINT_LEAST16_MAX = "UINT16_MAX"
  892. const m_UINT_LEAST32_MAX = "UINT32_MAX"
  893. const m_UINT_LEAST64_MAX = "UINT64_MAX"
  894. const m_UINT_LEAST8_MAX = "UINT8_MAX"
  895. const m_UINT_MAX = 0xffffffff
  896. const m_UNLOCKED = 0
  897. const m_USHRT_MAX = 0xffff
  898. const m_UTIME_NOW = 0x3fffffff
  899. const m_UTIME_OMIT = 0x3ffffffe
  900. const m_UnmapGravity = 0
  901. const m_UnmapNotify = 18
  902. const m_Unsorted = 0
  903. const m_VERSION = "2.3.2"
  904. const m_VisibilityFullyObscured = 2
  905. const m_VisibilityNotify = 15
  906. const m_VisibilityPartiallyObscured = 1
  907. const m_VisibilityUnobscured = 0
  908. const m_VisualAllMask = 0x1FF
  909. const m_VisualBitsPerRGBMask = 0x100
  910. const m_VisualBlueMaskMask = 0x40
  911. const m_VisualClassMask = 0x8
  912. const m_VisualColormapSizeMask = 0x80
  913. const m_VisualDepthMask = 0x4
  914. const m_VisualGreenMaskMask = 0x20
  915. const m_VisualIDMask = 0x1
  916. const m_VisualNoMask = 0x0
  917. const m_VisualRedMaskMask = 0x10
  918. const m_VisualScreenMask = 0x2
  919. const m_WINT_MAX = "UINT32_MAX"
  920. const m_WINT_MIN = 0
  921. const m_WLNSPERBATCH = 50
  922. const m_WNOHANG = 1
  923. const m_WORD_BIT = 32
  924. const m_WRCTSPERBATCH = 10
  925. const m_WUNTRACED = 2
  926. const m_WestGravity = 4
  927. const m_WhenMapped = 1
  928. const m_WidthValue = 0x0004
  929. const m_WindingRule = 1
  930. const m_WithdrawnState = 0
  931. const m_XCNOENT = 2
  932. const m_XCNOMEM = 1
  933. const m_XCSUCCESS = 0
  934. const m_XFT_ASSUME_PIXMAP = 20
  935. const m_XFT_CORE = "core"
  936. const m_XFT_DBG_CACHE = 128
  937. const m_XFT_DBG_CACHEV = 256
  938. const m_XFT_DBG_DRAW = 8
  939. const m_XFT_DBG_GLYPH = 32
  940. const m_XFT_DBG_GLYPHV = 64
  941. const m_XFT_DBG_MEMORY = 512
  942. const m_XFT_DBG_OPEN = 1
  943. const m_XFT_DBG_OPENV = 2
  944. const m_XFT_DBG_REF = 16
  945. const m_XFT_DBG_RENDER = 4
  946. const m_XFT_DPY_MAX_UNREF_FONTS = 16
  947. const m_XFT_MAJOR = 2
  948. const m_XFT_MAX_GLYPH_MEMORY = "maxglyphmemory"
  949. const m_XFT_MAX_UNREF_FONTS = "maxunreffonts"
  950. const m_XFT_MEM_DRAW = 0
  951. const m_XFT_MEM_FILE = 2
  952. const m_XFT_MEM_FONT = 1
  953. const m_XFT_MEM_GLYPH = 3
  954. const m_XFT_MEM_NUM = 4
  955. const m_XFT_MINOR = 3
  956. const m_XFT_NMISSING = 256
  957. const m_XFT_NUM_FONT_HASH = 127
  958. const m_XFT_NUM_SOLID_COLOR = 16
  959. const m_XFT_RENDER = "render"
  960. const m_XFT_REVISION = 2
  961. const m_XFT_XLFD = "xlfd"
  962. const m_XIMHotKeyStateOFF = 0x0002
  963. const m_XIMHotKeyStateON = 0x0001
  964. const m_XIMInitialState = 1
  965. const m_XIMPreeditArea = 0x0001
  966. const m_XIMPreeditCallbacks = 0x0002
  967. const m_XIMPreeditEnable = 1
  968. const m_XIMPreeditNone = 0x0010
  969. const m_XIMPreeditNothing = 0x0008
  970. const m_XIMPreeditPosition = 0x0004
  971. const m_XIMPreeditUnKnown = 0
  972. const m_XIMReverse = 1
  973. const m_XIMStatusArea = 0x0100
  974. const m_XIMStatusCallbacks = 0x0200
  975. const m_XIMStatusNone = 0x0800
  976. const m_XIMStatusNothing = 0x0400
  977. const m_XIMStringConversionBottomEdge = 0x00000008
  978. const m_XIMStringConversionBuffer = 0x0001
  979. const m_XIMStringConversionChar = 0x0004
  980. const m_XIMStringConversionConcealed = 0x00000010
  981. const m_XIMStringConversionLeftEdge = 0x00000001
  982. const m_XIMStringConversionLine = 0x0002
  983. const m_XIMStringConversionRetrieval = 0x0002
  984. const m_XIMStringConversionRightEdge = 0x00000002
  985. const m_XIMStringConversionSubstitution = 0x0001
  986. const m_XIMStringConversionTopEdge = 0x00000004
  987. const m_XIMStringConversionWord = 0x0003
  988. const m_XIMStringConversionWrapped = 0x00000020
  989. const m_XK_0 = 0x0030
  990. const m_XK_1 = 0x0031
  991. const m_XK_2 = 0x0032
  992. const m_XK_3 = 0x0033
  993. const m_XK_4 = 0x0034
  994. const m_XK_5 = 0x0035
  995. const m_XK_6 = 0x0036
  996. const m_XK_7 = 0x0037
  997. const m_XK_8 = 0x0038
  998. const m_XK_9 = 0x0039
  999. const m_XK_A = 0x0041
  1000. const m_XK_AE = 0x00c6
  1001. const m_XK_Aacute = 0x00c1
  1002. const m_XK_Abelowdot = 0x1001ea0
  1003. const m_XK_Abreve = 0x01c3
  1004. const m_XK_Abreveacute = 0x1001eae
  1005. const m_XK_Abrevebelowdot = 0x1001eb6
  1006. const m_XK_Abrevegrave = 0x1001eb0
  1007. const m_XK_Abrevehook = 0x1001eb2
  1008. const m_XK_Abrevetilde = 0x1001eb4
  1009. const m_XK_AccessX_Enable = 0xfe70
  1010. const m_XK_AccessX_Feedback_Enable = 0xfe71
  1011. const m_XK_Acircumflex = 0x00c2
  1012. const m_XK_Acircumflexacute = 0x1001ea4
  1013. const m_XK_Acircumflexbelowdot = 0x1001eac
  1014. const m_XK_Acircumflexgrave = 0x1001ea6
  1015. const m_XK_Acircumflexhook = 0x1001ea8
  1016. const m_XK_Acircumflextilde = 0x1001eaa
  1017. const m_XK_Adiaeresis = 0x00c4
  1018. const m_XK_Agrave = 0x00c0
  1019. const m_XK_Ahook = 0x1001ea2
  1020. const m_XK_Alt_L = 0xffe9
  1021. const m_XK_Alt_R = 0xffea
  1022. const m_XK_Amacron = 0x03c0
  1023. const m_XK_Aogonek = 0x01a1
  1024. const m_XK_Arabic_0 = 0x1000660
  1025. const m_XK_Arabic_1 = 0x1000661
  1026. const m_XK_Arabic_2 = 0x1000662
  1027. const m_XK_Arabic_3 = 0x1000663
  1028. const m_XK_Arabic_4 = 0x1000664
  1029. const m_XK_Arabic_5 = 0x1000665
  1030. const m_XK_Arabic_6 = 0x1000666
  1031. const m_XK_Arabic_7 = 0x1000667
  1032. const m_XK_Arabic_8 = 0x1000668
  1033. const m_XK_Arabic_9 = 0x1000669
  1034. const m_XK_Arabic_ain = 0x05d9
  1035. const m_XK_Arabic_alef = 0x05c7
  1036. const m_XK_Arabic_alefmaksura = 0x05e9
  1037. const m_XK_Arabic_beh = 0x05c8
  1038. const m_XK_Arabic_comma = 0x05ac
  1039. const m_XK_Arabic_dad = 0x05d6
  1040. const m_XK_Arabic_dal = 0x05cf
  1041. const m_XK_Arabic_damma = 0x05ef
  1042. const m_XK_Arabic_dammatan = 0x05ec
  1043. const m_XK_Arabic_ddal = 0x1000688
  1044. const m_XK_Arabic_farsi_yeh = 0x10006cc
  1045. const m_XK_Arabic_fatha = 0x05ee
  1046. const m_XK_Arabic_fathatan = 0x05eb
  1047. const m_XK_Arabic_feh = 0x05e1
  1048. const m_XK_Arabic_fullstop = 0x10006d4
  1049. const m_XK_Arabic_gaf = 0x10006af
  1050. const m_XK_Arabic_ghain = 0x05da
  1051. const m_XK_Arabic_ha = 0x05e7
  1052. const m_XK_Arabic_hah = 0x05cd
  1053. const m_XK_Arabic_hamza = 0x05c1
  1054. const m_XK_Arabic_hamza_above = 0x1000654
  1055. const m_XK_Arabic_hamza_below = 0x1000655
  1056. const m_XK_Arabic_hamzaonalef = 0x05c3
  1057. const m_XK_Arabic_hamzaonwaw = 0x05c4
  1058. const m_XK_Arabic_hamzaonyeh = 0x05c6
  1059. const m_XK_Arabic_hamzaunderalef = 0x05c5
  1060. const m_XK_Arabic_heh = 0x05e7
  1061. const m_XK_Arabic_heh_doachashmee = 0x10006be
  1062. const m_XK_Arabic_heh_goal = 0x10006c1
  1063. const m_XK_Arabic_jeem = 0x05cc
  1064. const m_XK_Arabic_jeh = 0x1000698
  1065. const m_XK_Arabic_kaf = 0x05e3
  1066. const m_XK_Arabic_kasra = 0x05f0
  1067. const m_XK_Arabic_kasratan = 0x05ed
  1068. const m_XK_Arabic_keheh = 0x10006a9
  1069. const m_XK_Arabic_khah = 0x05ce
  1070. const m_XK_Arabic_lam = 0x05e4
  1071. const m_XK_Arabic_madda_above = 0x1000653
  1072. const m_XK_Arabic_maddaonalef = 0x05c2
  1073. const m_XK_Arabic_meem = 0x05e5
  1074. const m_XK_Arabic_noon = 0x05e6
  1075. const m_XK_Arabic_noon_ghunna = 0x10006ba
  1076. const m_XK_Arabic_peh = 0x100067e
  1077. const m_XK_Arabic_percent = 0x100066a
  1078. const m_XK_Arabic_qaf = 0x05e2
  1079. const m_XK_Arabic_question_mark = 0x05bf
  1080. const m_XK_Arabic_ra = 0x05d1
  1081. const m_XK_Arabic_rreh = 0x1000691
  1082. const m_XK_Arabic_sad = 0x05d5
  1083. const m_XK_Arabic_seen = 0x05d3
  1084. const m_XK_Arabic_semicolon = 0x05bb
  1085. const m_XK_Arabic_shadda = 0x05f1
  1086. const m_XK_Arabic_sheen = 0x05d4
  1087. const m_XK_Arabic_sukun = 0x05f2
  1088. const m_XK_Arabic_superscript_alef = 0x1000670
  1089. const m_XK_Arabic_switch = 0xff7e
  1090. const m_XK_Arabic_tah = 0x05d7
  1091. const m_XK_Arabic_tatweel = 0x05e0
  1092. const m_XK_Arabic_tcheh = 0x1000686
  1093. const m_XK_Arabic_teh = 0x05ca
  1094. const m_XK_Arabic_tehmarbuta = 0x05c9
  1095. const m_XK_Arabic_thal = 0x05d0
  1096. const m_XK_Arabic_theh = 0x05cb
  1097. const m_XK_Arabic_tteh = 0x1000679
  1098. const m_XK_Arabic_veh = 0x10006a4
  1099. const m_XK_Arabic_waw = 0x05e8
  1100. const m_XK_Arabic_yeh = 0x05ea
  1101. const m_XK_Arabic_yeh_baree = 0x10006d2
  1102. const m_XK_Arabic_zah = 0x05d8
  1103. const m_XK_Arabic_zain = 0x05d2
  1104. const m_XK_Aring = 0x00c5
  1105. const m_XK_Armenian_AT = 0x1000538
  1106. const m_XK_Armenian_AYB = 0x1000531
  1107. const m_XK_Armenian_BEN = 0x1000532
  1108. const m_XK_Armenian_CHA = 0x1000549
  1109. const m_XK_Armenian_DA = 0x1000534
  1110. const m_XK_Armenian_DZA = 0x1000541
  1111. const m_XK_Armenian_E = 0x1000537
  1112. const m_XK_Armenian_FE = 0x1000556
  1113. const m_XK_Armenian_GHAT = 0x1000542
  1114. const m_XK_Armenian_GIM = 0x1000533
  1115. const m_XK_Armenian_HI = 0x1000545
  1116. const m_XK_Armenian_HO = 0x1000540
  1117. const m_XK_Armenian_INI = 0x100053b
  1118. const m_XK_Armenian_JE = 0x100054b
  1119. const m_XK_Armenian_KE = 0x1000554
  1120. const m_XK_Armenian_KEN = 0x100053f
  1121. const m_XK_Armenian_KHE = 0x100053d
  1122. const m_XK_Armenian_LYUN = 0x100053c
  1123. const m_XK_Armenian_MEN = 0x1000544
  1124. const m_XK_Armenian_NU = 0x1000546
  1125. const m_XK_Armenian_O = 0x1000555
  1126. const m_XK_Armenian_PE = 0x100054a
  1127. const m_XK_Armenian_PYUR = 0x1000553
  1128. const m_XK_Armenian_RA = 0x100054c
  1129. const m_XK_Armenian_RE = 0x1000550
  1130. const m_XK_Armenian_SE = 0x100054d
  1131. const m_XK_Armenian_SHA = 0x1000547
  1132. const m_XK_Armenian_TCHE = 0x1000543
  1133. const m_XK_Armenian_TO = 0x1000539
  1134. const m_XK_Armenian_TSA = 0x100053e
  1135. const m_XK_Armenian_TSO = 0x1000551
  1136. const m_XK_Armenian_TYUN = 0x100054f
  1137. const m_XK_Armenian_VEV = 0x100054e
  1138. const m_XK_Armenian_VO = 0x1000548
  1139. const m_XK_Armenian_VYUN = 0x1000552
  1140. const m_XK_Armenian_YECH = 0x1000535
  1141. const m_XK_Armenian_ZA = 0x1000536
  1142. const m_XK_Armenian_ZHE = 0x100053a
  1143. const m_XK_Armenian_accent = 0x100055b
  1144. const m_XK_Armenian_amanak = 0x100055c
  1145. const m_XK_Armenian_apostrophe = 0x100055a
  1146. const m_XK_Armenian_at = 0x1000568
  1147. const m_XK_Armenian_ayb = 0x1000561
  1148. const m_XK_Armenian_ben = 0x1000562
  1149. const m_XK_Armenian_but = 0x100055d
  1150. const m_XK_Armenian_cha = 0x1000579
  1151. const m_XK_Armenian_da = 0x1000564
  1152. const m_XK_Armenian_dza = 0x1000571
  1153. const m_XK_Armenian_e = 0x1000567
  1154. const m_XK_Armenian_exclam = 0x100055c
  1155. const m_XK_Armenian_fe = 0x1000586
  1156. const m_XK_Armenian_full_stop = 0x1000589
  1157. const m_XK_Armenian_ghat = 0x1000572
  1158. const m_XK_Armenian_gim = 0x1000563
  1159. const m_XK_Armenian_hi = 0x1000575
  1160. const m_XK_Armenian_ho = 0x1000570
  1161. const m_XK_Armenian_hyphen = 0x100058a
  1162. const m_XK_Armenian_ini = 0x100056b
  1163. const m_XK_Armenian_je = 0x100057b
  1164. const m_XK_Armenian_ke = 0x1000584
  1165. const m_XK_Armenian_ken = 0x100056f
  1166. const m_XK_Armenian_khe = 0x100056d
  1167. const m_XK_Armenian_ligature_ew = 0x1000587
  1168. const m_XK_Armenian_lyun = 0x100056c
  1169. const m_XK_Armenian_men = 0x1000574
  1170. const m_XK_Armenian_nu = 0x1000576
  1171. const m_XK_Armenian_o = 0x1000585
  1172. const m_XK_Armenian_paruyk = 0x100055e
  1173. const m_XK_Armenian_pe = 0x100057a
  1174. const m_XK_Armenian_pyur = 0x1000583
  1175. const m_XK_Armenian_question = 0x100055e
  1176. const m_XK_Armenian_ra = 0x100057c
  1177. const m_XK_Armenian_re = 0x1000580
  1178. const m_XK_Armenian_se = 0x100057d
  1179. const m_XK_Armenian_separation_mark = 0x100055d
  1180. const m_XK_Armenian_sha = 0x1000577
  1181. const m_XK_Armenian_shesht = 0x100055b
  1182. const m_XK_Armenian_tche = 0x1000573
  1183. const m_XK_Armenian_to = 0x1000569
  1184. const m_XK_Armenian_tsa = 0x100056e
  1185. const m_XK_Armenian_tso = 0x1000581
  1186. const m_XK_Armenian_tyun = 0x100057f
  1187. const m_XK_Armenian_verjaket = 0x1000589
  1188. const m_XK_Armenian_vev = 0x100057e
  1189. const m_XK_Armenian_vo = 0x1000578
  1190. const m_XK_Armenian_vyun = 0x1000582
  1191. const m_XK_Armenian_yech = 0x1000565
  1192. const m_XK_Armenian_yentamna = 0x100058a
  1193. const m_XK_Armenian_za = 0x1000566
  1194. const m_XK_Armenian_zhe = 0x100056a
  1195. const m_XK_Atilde = 0x00c3
  1196. const m_XK_AudibleBell_Enable = 0xfe7a
  1197. const m_XK_B = 0x0042
  1198. const m_XK_Babovedot = 0x1001e02
  1199. const m_XK_BackSpace = 0xff08
  1200. const m_XK_Begin = 0xff58
  1201. const m_XK_BounceKeys_Enable = 0xfe74
  1202. const m_XK_Break = 0xff6b
  1203. const m_XK_Byelorussian_SHORTU = 0x06be
  1204. const m_XK_Byelorussian_shortu = 0x06ae
  1205. const m_XK_C = 0x0043
  1206. const m_XK_CH = 0xfea2
  1207. const m_XK_C_H = 0xfea5
  1208. const m_XK_C_h = 0xfea4
  1209. const m_XK_Cabovedot = 0x02c5
  1210. const m_XK_Cacute = 0x01c6
  1211. const m_XK_Cancel = 0xff69
  1212. const m_XK_Caps_Lock = 0xffe5
  1213. const m_XK_Ccaron = 0x01c8
  1214. const m_XK_Ccedilla = 0x00c7
  1215. const m_XK_Ccircumflex = 0x02c6
  1216. const m_XK_Ch = 0xfea1
  1217. const m_XK_Clear = 0xff0b
  1218. const m_XK_Codeinput = 0xff37
  1219. const m_XK_ColonSign = 0x10020a1
  1220. const m_XK_Control_L = 0xffe3
  1221. const m_XK_Control_R = 0xffe4
  1222. const m_XK_CruzeiroSign = 0x10020a2
  1223. const m_XK_Cyrillic_A = 0x06e1
  1224. const m_XK_Cyrillic_BE = 0x06e2
  1225. const m_XK_Cyrillic_CHE = 0x06fe
  1226. const m_XK_Cyrillic_CHE_descender = 0x10004b6
  1227. const m_XK_Cyrillic_CHE_vertstroke = 0x10004b8
  1228. const m_XK_Cyrillic_DE = 0x06e4
  1229. const m_XK_Cyrillic_DZHE = 0x06bf
  1230. const m_XK_Cyrillic_E = 0x06fc
  1231. const m_XK_Cyrillic_EF = 0x06e6
  1232. const m_XK_Cyrillic_EL = 0x06ec
  1233. const m_XK_Cyrillic_EM = 0x06ed
  1234. const m_XK_Cyrillic_EN = 0x06ee
  1235. const m_XK_Cyrillic_EN_descender = 0x10004a2
  1236. const m_XK_Cyrillic_ER = 0x06f2
  1237. const m_XK_Cyrillic_ES = 0x06f3
  1238. const m_XK_Cyrillic_GHE = 0x06e7
  1239. const m_XK_Cyrillic_GHE_bar = 0x1000492
  1240. const m_XK_Cyrillic_HA = 0x06e8
  1241. const m_XK_Cyrillic_HARDSIGN = 0x06ff
  1242. const m_XK_Cyrillic_HA_descender = 0x10004b2
  1243. const m_XK_Cyrillic_I = 0x06e9
  1244. const m_XK_Cyrillic_IE = 0x06e5
  1245. const m_XK_Cyrillic_IO = 0x06b3
  1246. const m_XK_Cyrillic_I_macron = 0x10004e2
  1247. const m_XK_Cyrillic_JE = 0x06b8
  1248. const m_XK_Cyrillic_KA = 0x06eb
  1249. const m_XK_Cyrillic_KA_descender = 0x100049a
  1250. const m_XK_Cyrillic_KA_vertstroke = 0x100049c
  1251. const m_XK_Cyrillic_LJE = 0x06b9
  1252. const m_XK_Cyrillic_NJE = 0x06ba
  1253. const m_XK_Cyrillic_O = 0x06ef
  1254. const m_XK_Cyrillic_O_bar = 0x10004e8
  1255. const m_XK_Cyrillic_PE = 0x06f0
  1256. const m_XK_Cyrillic_SCHWA = 0x10004d8
  1257. const m_XK_Cyrillic_SHA = 0x06fb
  1258. const m_XK_Cyrillic_SHCHA = 0x06fd
  1259. const m_XK_Cyrillic_SHHA = 0x10004ba
  1260. const m_XK_Cyrillic_SHORTI = 0x06ea
  1261. const m_XK_Cyrillic_SOFTSIGN = 0x06f8
  1262. const m_XK_Cyrillic_TE = 0x06f4
  1263. const m_XK_Cyrillic_TSE = 0x06e3
  1264. const m_XK_Cyrillic_U = 0x06f5
  1265. const m_XK_Cyrillic_U_macron = 0x10004ee
  1266. const m_XK_Cyrillic_U_straight = 0x10004ae
  1267. const m_XK_Cyrillic_U_straight_bar = 0x10004b0
  1268. const m_XK_Cyrillic_VE = 0x06f7
  1269. const m_XK_Cyrillic_YA = 0x06f1
  1270. const m_XK_Cyrillic_YERU = 0x06f9
  1271. const m_XK_Cyrillic_YU = 0x06e0
  1272. const m_XK_Cyrillic_ZE = 0x06fa
  1273. const m_XK_Cyrillic_ZHE = 0x06f6
  1274. const m_XK_Cyrillic_ZHE_descender = 0x1000496
  1275. const m_XK_Cyrillic_a = 0x06c1
  1276. const m_XK_Cyrillic_be = 0x06c2
  1277. const m_XK_Cyrillic_che = 0x06de
  1278. const m_XK_Cyrillic_che_descender = 0x10004b7
  1279. const m_XK_Cyrillic_che_vertstroke = 0x10004b9
  1280. const m_XK_Cyrillic_de = 0x06c4
  1281. const m_XK_Cyrillic_dzhe = 0x06af
  1282. const m_XK_Cyrillic_e = 0x06dc
  1283. const m_XK_Cyrillic_ef = 0x06c6
  1284. const m_XK_Cyrillic_el = 0x06cc
  1285. const m_XK_Cyrillic_em = 0x06cd
  1286. const m_XK_Cyrillic_en = 0x06ce
  1287. const m_XK_Cyrillic_en_descender = 0x10004a3
  1288. const m_XK_Cyrillic_er = 0x06d2
  1289. const m_XK_Cyrillic_es = 0x06d3
  1290. const m_XK_Cyrillic_ghe = 0x06c7
  1291. const m_XK_Cyrillic_ghe_bar = 0x1000493
  1292. const m_XK_Cyrillic_ha = 0x06c8
  1293. const m_XK_Cyrillic_ha_descender = 0x10004b3
  1294. const m_XK_Cyrillic_hardsign = 0x06df
  1295. const m_XK_Cyrillic_i = 0x06c9
  1296. const m_XK_Cyrillic_i_macron = 0x10004e3
  1297. const m_XK_Cyrillic_ie = 0x06c5
  1298. const m_XK_Cyrillic_io = 0x06a3
  1299. const m_XK_Cyrillic_je = 0x06a8
  1300. const m_XK_Cyrillic_ka = 0x06cb
  1301. const m_XK_Cyrillic_ka_descender = 0x100049b
  1302. const m_XK_Cyrillic_ka_vertstroke = 0x100049d
  1303. const m_XK_Cyrillic_lje = 0x06a9
  1304. const m_XK_Cyrillic_nje = 0x06aa
  1305. const m_XK_Cyrillic_o = 0x06cf
  1306. const m_XK_Cyrillic_o_bar = 0x10004e9
  1307. const m_XK_Cyrillic_pe = 0x06d0
  1308. const m_XK_Cyrillic_schwa = 0x10004d9
  1309. const m_XK_Cyrillic_sha = 0x06db
  1310. const m_XK_Cyrillic_shcha = 0x06dd
  1311. const m_XK_Cyrillic_shha = 0x10004bb
  1312. const m_XK_Cyrillic_shorti = 0x06ca
  1313. const m_XK_Cyrillic_softsign = 0x06d8
  1314. const m_XK_Cyrillic_te = 0x06d4
  1315. const m_XK_Cyrillic_tse = 0x06c3
  1316. const m_XK_Cyrillic_u = 0x06d5
  1317. const m_XK_Cyrillic_u_macron = 0x10004ef
  1318. const m_XK_Cyrillic_u_straight = 0x10004af
  1319. const m_XK_Cyrillic_u_straight_bar = 0x10004b1
  1320. const m_XK_Cyrillic_ve = 0x06d7
  1321. const m_XK_Cyrillic_ya = 0x06d1
  1322. const m_XK_Cyrillic_yeru = 0x06d9
  1323. const m_XK_Cyrillic_yu = 0x06c0
  1324. const m_XK_Cyrillic_ze = 0x06da
  1325. const m_XK_Cyrillic_zhe = 0x06d6
  1326. const m_XK_Cyrillic_zhe_descender = 0x1000497
  1327. const m_XK_D = 0x0044
  1328. const m_XK_Dabovedot = 0x1001e0a
  1329. const m_XK_Dcaron = 0x01cf
  1330. const m_XK_Delete = 0xffff
  1331. const m_XK_DongSign = 0x10020ab
  1332. const m_XK_Down = 0xff54
  1333. const m_XK_Dstroke = 0x01d0
  1334. const m_XK_E = 0x0045
  1335. const m_XK_ENG = 0x03bd
  1336. const m_XK_ETH = 0x00d0
  1337. const m_XK_EZH = 0x10001b7
  1338. const m_XK_Eabovedot = 0x03cc
  1339. const m_XK_Eacute = 0x00c9
  1340. const m_XK_Ebelowdot = 0x1001eb8
  1341. const m_XK_Ecaron = 0x01cc
  1342. const m_XK_Ecircumflex = 0x00ca
  1343. const m_XK_Ecircumflexacute = 0x1001ebe
  1344. const m_XK_Ecircumflexbelowdot = 0x1001ec6
  1345. const m_XK_Ecircumflexgrave = 0x1001ec0
  1346. const m_XK_Ecircumflexhook = 0x1001ec2
  1347. const m_XK_Ecircumflextilde = 0x1001ec4
  1348. const m_XK_EcuSign = 0x10020a0
  1349. const m_XK_Ediaeresis = 0x00cb
  1350. const m_XK_Egrave = 0x00c8
  1351. const m_XK_Ehook = 0x1001eba
  1352. const m_XK_Eisu_Shift = 0xff2f
  1353. const m_XK_Eisu_toggle = 0xff30
  1354. const m_XK_Emacron = 0x03aa
  1355. const m_XK_End = 0xff57
  1356. const m_XK_Eogonek = 0x01ca
  1357. const m_XK_Escape = 0xff1b
  1358. const m_XK_Eth = 0x00d0
  1359. const m_XK_Etilde = 0x1001ebc
  1360. const m_XK_EuroSign = 0x20ac
  1361. const m_XK_Execute = 0xff62
  1362. const m_XK_F = 0x0046
  1363. const m_XK_F1 = 0xffbe
  1364. const m_XK_F10 = 0xffc7
  1365. const m_XK_F11 = 0xffc8
  1366. const m_XK_F12 = 0xffc9
  1367. const m_XK_F13 = 0xffca
  1368. const m_XK_F14 = 0xffcb
  1369. const m_XK_F15 = 0xffcc
  1370. const m_XK_F16 = 0xffcd
  1371. const m_XK_F17 = 0xffce
  1372. const m_XK_F18 = 0xffcf
  1373. const m_XK_F19 = 0xffd0
  1374. const m_XK_F2 = 0xffbf
  1375. const m_XK_F20 = 0xffd1
  1376. const m_XK_F21 = 0xffd2
  1377. const m_XK_F22 = 0xffd3
  1378. const m_XK_F23 = 0xffd4
  1379. const m_XK_F24 = 0xffd5
  1380. const m_XK_F25 = 0xffd6
  1381. const m_XK_F26 = 0xffd7
  1382. const m_XK_F27 = 0xffd8
  1383. const m_XK_F28 = 0xffd9
  1384. const m_XK_F29 = 0xffda
  1385. const m_XK_F3 = 0xffc0
  1386. const m_XK_F30 = 0xffdb
  1387. const m_XK_F31 = 0xffdc
  1388. const m_XK_F32 = 0xffdd
  1389. const m_XK_F33 = 0xffde
  1390. const m_XK_F34 = 0xffdf
  1391. const m_XK_F35 = 0xffe0
  1392. const m_XK_F4 = 0xffc1
  1393. const m_XK_F5 = 0xffc2
  1394. const m_XK_F6 = 0xffc3
  1395. const m_XK_F7 = 0xffc4
  1396. const m_XK_F8 = 0xffc5
  1397. const m_XK_F9 = 0xffc6
  1398. const m_XK_FFrancSign = 0x10020a3
  1399. const m_XK_Fabovedot = 0x1001e1e
  1400. const m_XK_Farsi_0 = 0x10006f0
  1401. const m_XK_Farsi_1 = 0x10006f1
  1402. const m_XK_Farsi_2 = 0x10006f2
  1403. const m_XK_Farsi_3 = 0x10006f3
  1404. const m_XK_Farsi_4 = 0x10006f4
  1405. const m_XK_Farsi_5 = 0x10006f5
  1406. const m_XK_Farsi_6 = 0x10006f6
  1407. const m_XK_Farsi_7 = 0x10006f7
  1408. const m_XK_Farsi_8 = 0x10006f8
  1409. const m_XK_Farsi_9 = 0x10006f9
  1410. const m_XK_Farsi_yeh = 0x10006cc
  1411. const m_XK_Find = 0xff68
  1412. const m_XK_First_Virtual_Screen = 0xfed0
  1413. const m_XK_G = 0x0047
  1414. const m_XK_Gabovedot = 0x02d5
  1415. const m_XK_Gbreve = 0x02ab
  1416. const m_XK_Gcaron = 0x10001e6
  1417. const m_XK_Gcedilla = 0x03ab
  1418. const m_XK_Gcircumflex = 0x02d8
  1419. const m_XK_Georgian_an = 0x10010d0
  1420. const m_XK_Georgian_ban = 0x10010d1
  1421. const m_XK_Georgian_can = 0x10010ea
  1422. const m_XK_Georgian_char = 0x10010ed
  1423. const m_XK_Georgian_chin = 0x10010e9
  1424. const m_XK_Georgian_cil = 0x10010ec
  1425. const m_XK_Georgian_don = 0x10010d3
  1426. const m_XK_Georgian_en = 0x10010d4
  1427. const m_XK_Georgian_fi = 0x10010f6
  1428. const m_XK_Georgian_gan = 0x10010d2
  1429. const m_XK_Georgian_ghan = 0x10010e6
  1430. const m_XK_Georgian_hae = 0x10010f0
  1431. const m_XK_Georgian_har = 0x10010f4
  1432. const m_XK_Georgian_he = 0x10010f1
  1433. const m_XK_Georgian_hie = 0x10010f2
  1434. const m_XK_Georgian_hoe = 0x10010f5
  1435. const m_XK_Georgian_in = 0x10010d8
  1436. const m_XK_Georgian_jhan = 0x10010ef
  1437. const m_XK_Georgian_jil = 0x10010eb
  1438. const m_XK_Georgian_kan = 0x10010d9
  1439. const m_XK_Georgian_khar = 0x10010e5
  1440. const m_XK_Georgian_las = 0x10010da
  1441. const m_XK_Georgian_man = 0x10010db
  1442. const m_XK_Georgian_nar = 0x10010dc
  1443. const m_XK_Georgian_on = 0x10010dd
  1444. const m_XK_Georgian_par = 0x10010de
  1445. const m_XK_Georgian_phar = 0x10010e4
  1446. const m_XK_Georgian_qar = 0x10010e7
  1447. const m_XK_Georgian_rae = 0x10010e0
  1448. const m_XK_Georgian_san = 0x10010e1
  1449. const m_XK_Georgian_shin = 0x10010e8
  1450. const m_XK_Georgian_tan = 0x10010d7
  1451. const m_XK_Georgian_tar = 0x10010e2
  1452. const m_XK_Georgian_un = 0x10010e3
  1453. const m_XK_Georgian_vin = 0x10010d5
  1454. const m_XK_Georgian_we = 0x10010f3
  1455. const m_XK_Georgian_xan = 0x10010ee
  1456. const m_XK_Georgian_zen = 0x10010d6
  1457. const m_XK_Georgian_zhar = 0x10010df
  1458. const m_XK_Greek_ALPHA = 0x07c1
  1459. const m_XK_Greek_ALPHAaccent = 0x07a1
  1460. const m_XK_Greek_BETA = 0x07c2
  1461. const m_XK_Greek_CHI = 0x07d7
  1462. const m_XK_Greek_DELTA = 0x07c4
  1463. const m_XK_Greek_EPSILON = 0x07c5
  1464. const m_XK_Greek_EPSILONaccent = 0x07a2
  1465. const m_XK_Greek_ETA = 0x07c7
  1466. const m_XK_Greek_ETAaccent = 0x07a3
  1467. const m_XK_Greek_GAMMA = 0x07c3
  1468. const m_XK_Greek_IOTA = 0x07c9
  1469. const m_XK_Greek_IOTAaccent = 0x07a4
  1470. const m_XK_Greek_IOTAdiaeresis = 0x07a5
  1471. const m_XK_Greek_IOTAdieresis = 0x07a5
  1472. const m_XK_Greek_KAPPA = 0x07ca
  1473. const m_XK_Greek_LAMBDA = 0x07cb
  1474. const m_XK_Greek_LAMDA = 0x07cb
  1475. const m_XK_Greek_MU = 0x07cc
  1476. const m_XK_Greek_NU = 0x07cd
  1477. const m_XK_Greek_OMEGA = 0x07d9
  1478. const m_XK_Greek_OMEGAaccent = 0x07ab
  1479. const m_XK_Greek_OMICRON = 0x07cf
  1480. const m_XK_Greek_OMICRONaccent = 0x07a7
  1481. const m_XK_Greek_PHI = 0x07d6
  1482. const m_XK_Greek_PI = 0x07d0
  1483. const m_XK_Greek_PSI = 0x07d8
  1484. const m_XK_Greek_RHO = 0x07d1
  1485. const m_XK_Greek_SIGMA = 0x07d2
  1486. const m_XK_Greek_TAU = 0x07d4
  1487. const m_XK_Greek_THETA = 0x07c8
  1488. const m_XK_Greek_UPSILON = 0x07d5
  1489. const m_XK_Greek_UPSILONaccent = 0x07a8
  1490. const m_XK_Greek_UPSILONdieresis = 0x07a9
  1491. const m_XK_Greek_XI = 0x07ce
  1492. const m_XK_Greek_ZETA = 0x07c6
  1493. const m_XK_Greek_accentdieresis = 0x07ae
  1494. const m_XK_Greek_alpha = 0x07e1
  1495. const m_XK_Greek_alphaaccent = 0x07b1
  1496. const m_XK_Greek_beta = 0x07e2
  1497. const m_XK_Greek_chi = 0x07f7
  1498. const m_XK_Greek_delta = 0x07e4
  1499. const m_XK_Greek_epsilon = 0x07e5
  1500. const m_XK_Greek_epsilonaccent = 0x07b2
  1501. const m_XK_Greek_eta = 0x07e7
  1502. const m_XK_Greek_etaaccent = 0x07b3
  1503. const m_XK_Greek_finalsmallsigma = 0x07f3
  1504. const m_XK_Greek_gamma = 0x07e3
  1505. const m_XK_Greek_horizbar = 0x07af
  1506. const m_XK_Greek_iota = 0x07e9
  1507. const m_XK_Greek_iotaaccent = 0x07b4
  1508. const m_XK_Greek_iotaaccentdieresis = 0x07b6
  1509. const m_XK_Greek_iotadieresis = 0x07b5
  1510. const m_XK_Greek_kappa = 0x07ea
  1511. const m_XK_Greek_lambda = 0x07eb
  1512. const m_XK_Greek_lamda = 0x07eb
  1513. const m_XK_Greek_mu = 0x07ec
  1514. const m_XK_Greek_nu = 0x07ed
  1515. const m_XK_Greek_omega = 0x07f9
  1516. const m_XK_Greek_omegaaccent = 0x07bb
  1517. const m_XK_Greek_omicron = 0x07ef
  1518. const m_XK_Greek_omicronaccent = 0x07b7
  1519. const m_XK_Greek_phi = 0x07f6
  1520. const m_XK_Greek_pi = 0x07f0
  1521. const m_XK_Greek_psi = 0x07f8
  1522. const m_XK_Greek_rho = 0x07f1
  1523. const m_XK_Greek_sigma = 0x07f2
  1524. const m_XK_Greek_switch = 0xff7e
  1525. const m_XK_Greek_tau = 0x07f4
  1526. const m_XK_Greek_theta = 0x07e8
  1527. const m_XK_Greek_upsilon = 0x07f5
  1528. const m_XK_Greek_upsilonaccent = 0x07b8
  1529. const m_XK_Greek_upsilonaccentdieresis = 0x07ba
  1530. const m_XK_Greek_upsilondieresis = 0x07b9
  1531. const m_XK_Greek_xi = 0x07ee
  1532. const m_XK_Greek_zeta = 0x07e6
  1533. const m_XK_H = 0x0048
  1534. const m_XK_Hangul = 0xff31
  1535. const m_XK_Hangul_A = 0x0ebf
  1536. const m_XK_Hangul_AE = 0x0ec0
  1537. const m_XK_Hangul_AraeA = 0x0ef6
  1538. const m_XK_Hangul_AraeAE = 0x0ef7
  1539. const m_XK_Hangul_Banja = 0xff39
  1540. const m_XK_Hangul_Cieuc = 0x0eba
  1541. const m_XK_Hangul_Codeinput = 0xff37
  1542. const m_XK_Hangul_Dikeud = 0x0ea7
  1543. const m_XK_Hangul_E = 0x0ec4
  1544. const m_XK_Hangul_EO = 0x0ec3
  1545. const m_XK_Hangul_EU = 0x0ed1
  1546. const m_XK_Hangul_End = 0xff33
  1547. const m_XK_Hangul_Hanja = 0xff34
  1548. const m_XK_Hangul_Hieuh = 0x0ebe
  1549. const m_XK_Hangul_I = 0x0ed3
  1550. const m_XK_Hangul_Ieung = 0x0eb7
  1551. const m_XK_Hangul_J_Cieuc = 0x0eea
  1552. const m_XK_Hangul_J_Dikeud = 0x0eda
  1553. const m_XK_Hangul_J_Hieuh = 0x0eee
  1554. const m_XK_Hangul_J_Ieung = 0x0ee8
  1555. const m_XK_Hangul_J_Jieuj = 0x0ee9
  1556. const m_XK_Hangul_J_Khieuq = 0x0eeb
  1557. const m_XK_Hangul_J_Kiyeog = 0x0ed4
  1558. const m_XK_Hangul_J_KiyeogSios = 0x0ed6
  1559. const m_XK_Hangul_J_KkogjiDalrinIeung = 0x0ef9
  1560. const m_XK_Hangul_J_Mieum = 0x0ee3
  1561. const m_XK_Hangul_J_Nieun = 0x0ed7
  1562. const m_XK_Hangul_J_NieunHieuh = 0x0ed9
  1563. const m_XK_Hangul_J_NieunJieuj = 0x0ed8
  1564. const m_XK_Hangul_J_PanSios = 0x0ef8
  1565. const m_XK_Hangul_J_Phieuf = 0x0eed
  1566. const m_XK_Hangul_J_Pieub = 0x0ee4
  1567. const m_XK_Hangul_J_PieubSios = 0x0ee5
  1568. const m_XK_Hangul_J_Rieul = 0x0edb
  1569. const m_XK_Hangul_J_RieulHieuh = 0x0ee2
  1570. const m_XK_Hangul_J_RieulKiyeog = 0x0edc
  1571. const m_XK_Hangul_J_RieulMieum = 0x0edd
  1572. const m_XK_Hangul_J_RieulPhieuf = 0x0ee1
  1573. const m_XK_Hangul_J_RieulPieub = 0x0ede
  1574. const m_XK_Hangul_J_RieulSios = 0x0edf
  1575. const m_XK_Hangul_J_RieulTieut = 0x0ee0
  1576. const m_XK_Hangul_J_Sios = 0x0ee6
  1577. const m_XK_Hangul_J_SsangKiyeog = 0x0ed5
  1578. const m_XK_Hangul_J_SsangSios = 0x0ee7
  1579. const m_XK_Hangul_J_Tieut = 0x0eec
  1580. const m_XK_Hangul_J_YeorinHieuh = 0x0efa
  1581. const m_XK_Hangul_Jamo = 0xff35
  1582. const m_XK_Hangul_Jeonja = 0xff38
  1583. const m_XK_Hangul_Jieuj = 0x0eb8
  1584. const m_XK_Hangul_Khieuq = 0x0ebb
  1585. const m_XK_Hangul_Kiyeog = 0x0ea1
  1586. const m_XK_Hangul_KiyeogSios = 0x0ea3
  1587. const m_XK_Hangul_KkogjiDalrinIeung = 0x0ef3
  1588. const m_XK_Hangul_Mieum = 0x0eb1
  1589. const m_XK_Hangul_MultipleCandidate = 0xff3d
  1590. const m_XK_Hangul_Nieun = 0x0ea4
  1591. const m_XK_Hangul_NieunHieuh = 0x0ea6
  1592. const m_XK_Hangul_NieunJieuj = 0x0ea5
  1593. const m_XK_Hangul_O = 0x0ec7
  1594. const m_XK_Hangul_OE = 0x0eca
  1595. const m_XK_Hangul_PanSios = 0x0ef2
  1596. const m_XK_Hangul_Phieuf = 0x0ebd
  1597. const m_XK_Hangul_Pieub = 0x0eb2
  1598. const m_XK_Hangul_PieubSios = 0x0eb4
  1599. const m_XK_Hangul_PostHanja = 0xff3b
  1600. const m_XK_Hangul_PreHanja = 0xff3a
  1601. const m_XK_Hangul_PreviousCandidate = 0xff3e
  1602. const m_XK_Hangul_Rieul = 0x0ea9
  1603. const m_XK_Hangul_RieulHieuh = 0x0eb0
  1604. const m_XK_Hangul_RieulKiyeog = 0x0eaa
  1605. const m_XK_Hangul_RieulMieum = 0x0eab
  1606. const m_XK_Hangul_RieulPhieuf = 0x0eaf
  1607. const m_XK_Hangul_RieulPieub = 0x0eac
  1608. const m_XK_Hangul_RieulSios = 0x0ead
  1609. const m_XK_Hangul_RieulTieut = 0x0eae
  1610. const m_XK_Hangul_RieulYeorinHieuh = 0x0eef
  1611. const m_XK_Hangul_Romaja = 0xff36
  1612. const m_XK_Hangul_SingleCandidate = 0xff3c
  1613. const m_XK_Hangul_Sios = 0x0eb5
  1614. const m_XK_Hangul_Special = 0xff3f
  1615. const m_XK_Hangul_SsangDikeud = 0x0ea8
  1616. const m_XK_Hangul_SsangJieuj = 0x0eb9
  1617. const m_XK_Hangul_SsangKiyeog = 0x0ea2
  1618. const m_XK_Hangul_SsangPieub = 0x0eb3
  1619. const m_XK_Hangul_SsangSios = 0x0eb6
  1620. const m_XK_Hangul_Start = 0xff32
  1621. const m_XK_Hangul_SunkyeongeumMieum = 0x0ef0
  1622. const m_XK_Hangul_SunkyeongeumPhieuf = 0x0ef4
  1623. const m_XK_Hangul_SunkyeongeumPieub = 0x0ef1
  1624. const m_XK_Hangul_Tieut = 0x0ebc
  1625. const m_XK_Hangul_U = 0x0ecc
  1626. const m_XK_Hangul_WA = 0x0ec8
  1627. const m_XK_Hangul_WAE = 0x0ec9
  1628. const m_XK_Hangul_WE = 0x0ece
  1629. const m_XK_Hangul_WEO = 0x0ecd
  1630. const m_XK_Hangul_WI = 0x0ecf
  1631. const m_XK_Hangul_YA = 0x0ec1
  1632. const m_XK_Hangul_YAE = 0x0ec2
  1633. const m_XK_Hangul_YE = 0x0ec6
  1634. const m_XK_Hangul_YEO = 0x0ec5
  1635. const m_XK_Hangul_YI = 0x0ed2
  1636. const m_XK_Hangul_YO = 0x0ecb
  1637. const m_XK_Hangul_YU = 0x0ed0
  1638. const m_XK_Hangul_YeorinHieuh = 0x0ef5
  1639. const m_XK_Hangul_switch = 0xff7e
  1640. const m_XK_Hankaku = 0xff29
  1641. const m_XK_Hcircumflex = 0x02a6
  1642. const m_XK_Hebrew_switch = 0xff7e
  1643. const m_XK_Help = 0xff6a
  1644. const m_XK_Henkan = 0xff23
  1645. const m_XK_Henkan_Mode = 0xff23
  1646. const m_XK_Hiragana = 0xff25
  1647. const m_XK_Hiragana_Katakana = 0xff27
  1648. const m_XK_Home = 0xff50
  1649. const m_XK_Hstroke = 0x02a1
  1650. const m_XK_Hyper_L = 0xffed
  1651. const m_XK_Hyper_R = 0xffee
  1652. const m_XK_I = 0x0049
  1653. const m_XK_ISO_Center_Object = 0xfe33
  1654. const m_XK_ISO_Continuous_Underline = 0xfe30
  1655. const m_XK_ISO_Discontinuous_Underline = 0xfe31
  1656. const m_XK_ISO_Emphasize = 0xfe32
  1657. const m_XK_ISO_Enter = 0xfe34
  1658. const m_XK_ISO_Fast_Cursor_Down = 0xfe2f
  1659. const m_XK_ISO_Fast_Cursor_Left = 0xfe2c
  1660. const m_XK_ISO_Fast_Cursor_Right = 0xfe2d
  1661. const m_XK_ISO_Fast_Cursor_Up = 0xfe2e
  1662. const m_XK_ISO_First_Group = 0xfe0c
  1663. const m_XK_ISO_First_Group_Lock = 0xfe0d
  1664. const m_XK_ISO_Group_Latch = 0xfe06
  1665. const m_XK_ISO_Group_Lock = 0xfe07
  1666. const m_XK_ISO_Group_Shift = 0xff7e
  1667. const m_XK_ISO_Last_Group = 0xfe0e
  1668. const m_XK_ISO_Last_Group_Lock = 0xfe0f
  1669. const m_XK_ISO_Left_Tab = 0xfe20
  1670. const m_XK_ISO_Level2_Latch = 0xfe02
  1671. const m_XK_ISO_Level3_Latch = 0xfe04
  1672. const m_XK_ISO_Level3_Lock = 0xfe05
  1673. const m_XK_ISO_Level3_Shift = 0xfe03
  1674. const m_XK_ISO_Level5_Latch = 0xfe12
  1675. const m_XK_ISO_Level5_Lock = 0xfe13
  1676. const m_XK_ISO_Level5_Shift = 0xfe11
  1677. const m_XK_ISO_Lock = 0xfe01
  1678. const m_XK_ISO_Move_Line_Down = 0xfe22
  1679. const m_XK_ISO_Move_Line_Up = 0xfe21
  1680. const m_XK_ISO_Next_Group = 0xfe08
  1681. const m_XK_ISO_Next_Group_Lock = 0xfe09
  1682. const m_XK_ISO_Partial_Line_Down = 0xfe24
  1683. const m_XK_ISO_Partial_Line_Up = 0xfe23
  1684. const m_XK_ISO_Partial_Space_Left = 0xfe25
  1685. const m_XK_ISO_Partial_Space_Right = 0xfe26
  1686. const m_XK_ISO_Prev_Group = 0xfe0a
  1687. const m_XK_ISO_Prev_Group_Lock = 0xfe0b
  1688. const m_XK_ISO_Release_Both_Margins = 0xfe2b
  1689. const m_XK_ISO_Release_Margin_Left = 0xfe29
  1690. const m_XK_ISO_Release_Margin_Right = 0xfe2a
  1691. const m_XK_ISO_Set_Margin_Left = 0xfe27
  1692. const m_XK_ISO_Set_Margin_Right = 0xfe28
  1693. const m_XK_Iabovedot = 0x02a9
  1694. const m_XK_Iacute = 0x00cd
  1695. const m_XK_Ibelowdot = 0x1001eca
  1696. const m_XK_Ibreve = 0x100012c
  1697. const m_XK_Icircumflex = 0x00ce
  1698. const m_XK_Idiaeresis = 0x00cf
  1699. const m_XK_Igrave = 0x00cc
  1700. const m_XK_Ihook = 0x1001ec8
  1701. const m_XK_Imacron = 0x03cf
  1702. const m_XK_Insert = 0xff63
  1703. const m_XK_Iogonek = 0x03c7
  1704. const m_XK_Itilde = 0x03a5
  1705. const m_XK_J = 0x004a
  1706. const m_XK_Jcircumflex = 0x02ac
  1707. const m_XK_K = 0x004b
  1708. const m_XK_KP_0 = 0xffb0
  1709. const m_XK_KP_1 = 0xffb1
  1710. const m_XK_KP_2 = 0xffb2
  1711. const m_XK_KP_3 = 0xffb3
  1712. const m_XK_KP_4 = 0xffb4
  1713. const m_XK_KP_5 = 0xffb5
  1714. const m_XK_KP_6 = 0xffb6
  1715. const m_XK_KP_7 = 0xffb7
  1716. const m_XK_KP_8 = 0xffb8
  1717. const m_XK_KP_9 = 0xffb9
  1718. const m_XK_KP_Add = 0xffab
  1719. const m_XK_KP_Begin = 0xff9d
  1720. const m_XK_KP_Decimal = 0xffae
  1721. const m_XK_KP_Delete = 0xff9f
  1722. const m_XK_KP_Divide = 0xffaf
  1723. const m_XK_KP_Down = 0xff99
  1724. const m_XK_KP_End = 0xff9c
  1725. const m_XK_KP_Enter = 0xff8d
  1726. const m_XK_KP_Equal = 0xffbd
  1727. const m_XK_KP_F1 = 0xff91
  1728. const m_XK_KP_F2 = 0xff92
  1729. const m_XK_KP_F3 = 0xff93
  1730. const m_XK_KP_F4 = 0xff94
  1731. const m_XK_KP_Home = 0xff95
  1732. const m_XK_KP_Insert = 0xff9e
  1733. const m_XK_KP_Left = 0xff96
  1734. const m_XK_KP_Multiply = 0xffaa
  1735. const m_XK_KP_Next = 0xff9b
  1736. const m_XK_KP_Page_Down = 0xff9b
  1737. const m_XK_KP_Page_Up = 0xff9a
  1738. const m_XK_KP_Prior = 0xff9a
  1739. const m_XK_KP_Right = 0xff98
  1740. const m_XK_KP_Separator = 0xffac
  1741. const m_XK_KP_Space = 0xff80
  1742. const m_XK_KP_Subtract = 0xffad
  1743. const m_XK_KP_Tab = 0xff89
  1744. const m_XK_KP_Up = 0xff97
  1745. const m_XK_Kana_Lock = 0xff2d
  1746. const m_XK_Kana_Shift = 0xff2e
  1747. const m_XK_Kanji = 0xff21
  1748. const m_XK_Kanji_Bangou = 0xff37
  1749. const m_XK_Katakana = 0xff26
  1750. const m_XK_Kcedilla = 0x03d3
  1751. const m_XK_Korean_Won = 0x0eff
  1752. const m_XK_L = 0x004c
  1753. const m_XK_L1 = 0xffc8
  1754. const m_XK_L10 = 0xffd1
  1755. const m_XK_L2 = 0xffc9
  1756. const m_XK_L3 = 0xffca
  1757. const m_XK_L4 = 0xffcb
  1758. const m_XK_L5 = 0xffcc
  1759. const m_XK_L6 = 0xffcd
  1760. const m_XK_L7 = 0xffce
  1761. const m_XK_L8 = 0xffcf
  1762. const m_XK_L9 = 0xffd0
  1763. const m_XK_Lacute = 0x01c5
  1764. const m_XK_Last_Virtual_Screen = 0xfed4
  1765. const m_XK_Lbelowdot = 0x1001e36
  1766. const m_XK_Lcaron = 0x01a5
  1767. const m_XK_Lcedilla = 0x03a6
  1768. const m_XK_Left = 0xff51
  1769. const m_XK_Linefeed = 0xff0a
  1770. const m_XK_LiraSign = 0x10020a4
  1771. const m_XK_Lstroke = 0x01a3
  1772. const m_XK_M = 0x004d
  1773. const m_XK_Mabovedot = 0x1001e40
  1774. const m_XK_Macedonia_DSE = 0x06b5
  1775. const m_XK_Macedonia_GJE = 0x06b2
  1776. const m_XK_Macedonia_KJE = 0x06bc
  1777. const m_XK_Macedonia_dse = 0x06a5
  1778. const m_XK_Macedonia_gje = 0x06a2
  1779. const m_XK_Macedonia_kje = 0x06ac
  1780. const m_XK_Mae_Koho = 0xff3e
  1781. const m_XK_Massyo = 0xff2c
  1782. const m_XK_Menu = 0xff67
  1783. const m_XK_Meta_L = 0xffe7
  1784. const m_XK_Meta_R = 0xffe8
  1785. const m_XK_MillSign = 0x10020a5
  1786. const m_XK_Mode_switch = 0xff7e
  1787. const m_XK_MouseKeys_Accel_Enable = 0xfe77
  1788. const m_XK_MouseKeys_Enable = 0xfe76
  1789. const m_XK_Muhenkan = 0xff22
  1790. const m_XK_Multi_key = 0xff20
  1791. const m_XK_MultipleCandidate = 0xff3d
  1792. const m_XK_N = 0x004e
  1793. const m_XK_Nacute = 0x01d1
  1794. const m_XK_NairaSign = 0x10020a6
  1795. const m_XK_Ncaron = 0x01d2
  1796. const m_XK_Ncedilla = 0x03d1
  1797. const m_XK_NewSheqelSign = 0x10020aa
  1798. const m_XK_Next = 0xff56
  1799. const m_XK_Next_Virtual_Screen = 0xfed2
  1800. const m_XK_Ntilde = 0x00d1
  1801. const m_XK_Num_Lock = 0xff7f
  1802. const m_XK_O = 0x004f
  1803. const m_XK_OE = 0x13bc
  1804. const m_XK_Oacute = 0x00d3
  1805. const m_XK_Obarred = 0x100019f
  1806. const m_XK_Obelowdot = 0x1001ecc
  1807. const m_XK_Ocaron = 0x10001d1
  1808. const m_XK_Ocircumflex = 0x00d4
  1809. const m_XK_Ocircumflexacute = 0x1001ed0
  1810. const m_XK_Ocircumflexbelowdot = 0x1001ed8
  1811. const m_XK_Ocircumflexgrave = 0x1001ed2
  1812. const m_XK_Ocircumflexhook = 0x1001ed4
  1813. const m_XK_Ocircumflextilde = 0x1001ed6
  1814. const m_XK_Odiaeresis = 0x00d6
  1815. const m_XK_Odoubleacute = 0x01d5
  1816. const m_XK_Ograve = 0x00d2
  1817. const m_XK_Ohook = 0x1001ece
  1818. const m_XK_Ohorn = 0x10001a0
  1819. const m_XK_Ohornacute = 0x1001eda
  1820. const m_XK_Ohornbelowdot = 0x1001ee2
  1821. const m_XK_Ohorngrave = 0x1001edc
  1822. const m_XK_Ohornhook = 0x1001ede
  1823. const m_XK_Ohorntilde = 0x1001ee0
  1824. const m_XK_Omacron = 0x03d2
  1825. const m_XK_Ooblique = 0x00d8
  1826. const m_XK_Oslash = 0x00d8
  1827. const m_XK_Otilde = 0x00d5
  1828. const m_XK_Overlay1_Enable = 0xfe78
  1829. const m_XK_Overlay2_Enable = 0xfe79
  1830. const m_XK_P = 0x0050
  1831. const m_XK_Pabovedot = 0x1001e56
  1832. const m_XK_Page_Down = 0xff56
  1833. const m_XK_Page_Up = 0xff55
  1834. const m_XK_Pause = 0xff13
  1835. const m_XK_PesetaSign = 0x10020a7
  1836. const m_XK_Pointer_Accelerate = 0xfefa
  1837. const m_XK_Pointer_Button1 = 0xfee9
  1838. const m_XK_Pointer_Button2 = 0xfeea
  1839. const m_XK_Pointer_Button3 = 0xfeeb
  1840. const m_XK_Pointer_Button4 = 0xfeec
  1841. const m_XK_Pointer_Button5 = 0xfeed
  1842. const m_XK_Pointer_Button_Dflt = 0xfee8
  1843. const m_XK_Pointer_DblClick1 = 0xfeef
  1844. const m_XK_Pointer_DblClick2 = 0xfef0
  1845. const m_XK_Pointer_DblClick3 = 0xfef1
  1846. const m_XK_Pointer_DblClick4 = 0xfef2
  1847. const m_XK_Pointer_DblClick5 = 0xfef3
  1848. const m_XK_Pointer_DblClick_Dflt = 0xfeee
  1849. const m_XK_Pointer_DfltBtnNext = 0xfefb
  1850. const m_XK_Pointer_DfltBtnPrev = 0xfefc
  1851. const m_XK_Pointer_Down = 0xfee3
  1852. const m_XK_Pointer_DownLeft = 0xfee6
  1853. const m_XK_Pointer_DownRight = 0xfee7
  1854. const m_XK_Pointer_Drag1 = 0xfef5
  1855. const m_XK_Pointer_Drag2 = 0xfef6
  1856. const m_XK_Pointer_Drag3 = 0xfef7
  1857. const m_XK_Pointer_Drag4 = 0xfef8
  1858. const m_XK_Pointer_Drag5 = 0xfefd
  1859. const m_XK_Pointer_Drag_Dflt = 0xfef4
  1860. const m_XK_Pointer_EnableKeys = 0xfef9
  1861. const m_XK_Pointer_Left = 0xfee0
  1862. const m_XK_Pointer_Right = 0xfee1
  1863. const m_XK_Pointer_Up = 0xfee2
  1864. const m_XK_Pointer_UpLeft = 0xfee4
  1865. const m_XK_Pointer_UpRight = 0xfee5
  1866. const m_XK_Prev_Virtual_Screen = 0xfed1
  1867. const m_XK_PreviousCandidate = 0xff3e
  1868. const m_XK_Print = 0xff61
  1869. const m_XK_Prior = 0xff55
  1870. const m_XK_Q = 0x0051
  1871. const m_XK_R = 0x0052
  1872. const m_XK_R1 = 0xffd2
  1873. const m_XK_R10 = 0xffdb
  1874. const m_XK_R11 = 0xffdc
  1875. const m_XK_R12 = 0xffdd
  1876. const m_XK_R13 = 0xffde
  1877. const m_XK_R14 = 0xffdf
  1878. const m_XK_R15 = 0xffe0
  1879. const m_XK_R2 = 0xffd3
  1880. const m_XK_R3 = 0xffd4
  1881. const m_XK_R4 = 0xffd5
  1882. const m_XK_R5 = 0xffd6
  1883. const m_XK_R6 = 0xffd7
  1884. const m_XK_R7 = 0xffd8
  1885. const m_XK_R8 = 0xffd9
  1886. const m_XK_R9 = 0xffda
  1887. const m_XK_Racute = 0x01c0
  1888. const m_XK_Rcaron = 0x01d8
  1889. const m_XK_Rcedilla = 0x03a3
  1890. const m_XK_Redo = 0xff66
  1891. const m_XK_RepeatKeys_Enable = 0xfe72
  1892. const m_XK_Return = 0xff0d
  1893. const m_XK_Right = 0xff53
  1894. const m_XK_Romaji = 0xff24
  1895. const m_XK_RupeeSign = 0x10020a8
  1896. const m_XK_S = 0x0053
  1897. const m_XK_SCHWA = 0x100018f
  1898. const m_XK_Sabovedot = 0x1001e60
  1899. const m_XK_Sacute = 0x01a6
  1900. const m_XK_Scaron = 0x01a9
  1901. const m_XK_Scedilla = 0x01aa
  1902. const m_XK_Scircumflex = 0x02de
  1903. const m_XK_Scroll_Lock = 0xff14
  1904. const m_XK_Select = 0xff60
  1905. const m_XK_Serbian_DJE = 0x06b1
  1906. const m_XK_Serbian_DZE = 0x06bf
  1907. const m_XK_Serbian_JE = 0x06b8
  1908. const m_XK_Serbian_LJE = 0x06b9
  1909. const m_XK_Serbian_NJE = 0x06ba
  1910. const m_XK_Serbian_TSHE = 0x06bb
  1911. const m_XK_Serbian_dje = 0x06a1
  1912. const m_XK_Serbian_dze = 0x06af
  1913. const m_XK_Serbian_je = 0x06a8
  1914. const m_XK_Serbian_lje = 0x06a9
  1915. const m_XK_Serbian_nje = 0x06aa
  1916. const m_XK_Serbian_tshe = 0x06ab
  1917. const m_XK_Shift_L = 0xffe1
  1918. const m_XK_Shift_Lock = 0xffe6
  1919. const m_XK_Shift_R = 0xffe2
  1920. const m_XK_SingleCandidate = 0xff3c
  1921. const m_XK_Sinh_a = 0x1000d85
  1922. const m_XK_Sinh_aa = 0x1000d86
  1923. const m_XK_Sinh_aa2 = 0x1000dcf
  1924. const m_XK_Sinh_ae = 0x1000d87
  1925. const m_XK_Sinh_ae2 = 0x1000dd0
  1926. const m_XK_Sinh_aee = 0x1000d88
  1927. const m_XK_Sinh_aee2 = 0x1000dd1
  1928. const m_XK_Sinh_ai = 0x1000d93
  1929. const m_XK_Sinh_ai2 = 0x1000ddb
  1930. const m_XK_Sinh_al = 0x1000dca
  1931. const m_XK_Sinh_au = 0x1000d96
  1932. const m_XK_Sinh_au2 = 0x1000dde
  1933. const m_XK_Sinh_ba = 0x1000db6
  1934. const m_XK_Sinh_bha = 0x1000db7
  1935. const m_XK_Sinh_ca = 0x1000da0
  1936. const m_XK_Sinh_cha = 0x1000da1
  1937. const m_XK_Sinh_dda = 0x1000da9
  1938. const m_XK_Sinh_ddha = 0x1000daa
  1939. const m_XK_Sinh_dha = 0x1000daf
  1940. const m_XK_Sinh_dhha = 0x1000db0
  1941. const m_XK_Sinh_e = 0x1000d91
  1942. const m_XK_Sinh_e2 = 0x1000dd9
  1943. const m_XK_Sinh_ee = 0x1000d92
  1944. const m_XK_Sinh_ee2 = 0x1000dda
  1945. const m_XK_Sinh_fa = 0x1000dc6
  1946. const m_XK_Sinh_ga = 0x1000d9c
  1947. const m_XK_Sinh_gha = 0x1000d9d
  1948. const m_XK_Sinh_h2 = 0x1000d83
  1949. const m_XK_Sinh_ha = 0x1000dc4
  1950. const m_XK_Sinh_i = 0x1000d89
  1951. const m_XK_Sinh_i2 = 0x1000dd2
  1952. const m_XK_Sinh_ii = 0x1000d8a
  1953. const m_XK_Sinh_ii2 = 0x1000dd3
  1954. const m_XK_Sinh_ja = 0x1000da2
  1955. const m_XK_Sinh_jha = 0x1000da3
  1956. const m_XK_Sinh_jnya = 0x1000da5
  1957. const m_XK_Sinh_ka = 0x1000d9a
  1958. const m_XK_Sinh_kha = 0x1000d9b
  1959. const m_XK_Sinh_kunddaliya = 0x1000df4
  1960. const m_XK_Sinh_la = 0x1000dbd
  1961. const m_XK_Sinh_lla = 0x1000dc5
  1962. const m_XK_Sinh_lu = 0x1000d8f
  1963. const m_XK_Sinh_lu2 = 0x1000ddf
  1964. const m_XK_Sinh_luu = 0x1000d90
  1965. const m_XK_Sinh_luu2 = 0x1000df3
  1966. const m_XK_Sinh_ma = 0x1000db8
  1967. const m_XK_Sinh_mba = 0x1000db9
  1968. const m_XK_Sinh_na = 0x1000db1
  1969. const m_XK_Sinh_ndda = 0x1000dac
  1970. const m_XK_Sinh_ndha = 0x1000db3
  1971. const m_XK_Sinh_ng = 0x1000d82
  1972. const m_XK_Sinh_ng2 = 0x1000d9e
  1973. const m_XK_Sinh_nga = 0x1000d9f
  1974. const m_XK_Sinh_nja = 0x1000da6
  1975. const m_XK_Sinh_nna = 0x1000dab
  1976. const m_XK_Sinh_nya = 0x1000da4
  1977. const m_XK_Sinh_o = 0x1000d94
  1978. const m_XK_Sinh_o2 = 0x1000ddc
  1979. const m_XK_Sinh_oo = 0x1000d95
  1980. const m_XK_Sinh_oo2 = 0x1000ddd
  1981. const m_XK_Sinh_pa = 0x1000db4
  1982. const m_XK_Sinh_pha = 0x1000db5
  1983. const m_XK_Sinh_ra = 0x1000dbb
  1984. const m_XK_Sinh_ri = 0x1000d8d
  1985. const m_XK_Sinh_rii = 0x1000d8e
  1986. const m_XK_Sinh_ru2 = 0x1000dd8
  1987. const m_XK_Sinh_ruu2 = 0x1000df2
  1988. const m_XK_Sinh_sa = 0x1000dc3
  1989. const m_XK_Sinh_sha = 0x1000dc1
  1990. const m_XK_Sinh_ssha = 0x1000dc2
  1991. const m_XK_Sinh_tha = 0x1000dad
  1992. const m_XK_Sinh_thha = 0x1000dae
  1993. const m_XK_Sinh_tta = 0x1000da7
  1994. const m_XK_Sinh_ttha = 0x1000da8
  1995. const m_XK_Sinh_u = 0x1000d8b
  1996. const m_XK_Sinh_u2 = 0x1000dd4
  1997. const m_XK_Sinh_uu = 0x1000d8c
  1998. const m_XK_Sinh_uu2 = 0x1000dd6
  1999. const m_XK_Sinh_va = 0x1000dc0
  2000. const m_XK_Sinh_ya = 0x1000dba
  2001. const m_XK_SlowKeys_Enable = 0xfe73
  2002. const m_XK_StickyKeys_Enable = 0xfe75
  2003. const m_XK_Super_L = 0xffeb
  2004. const m_XK_Super_R = 0xffec
  2005. const m_XK_Sys_Req = 0xff15
  2006. const m_XK_T = 0x0054
  2007. const m_XK_THORN = 0x00de
  2008. const m_XK_Tab = 0xff09
  2009. const m_XK_Tabovedot = 0x1001e6a
  2010. const m_XK_Tcaron = 0x01ab
  2011. const m_XK_Tcedilla = 0x01de
  2012. const m_XK_Terminate_Server = 0xfed5
  2013. const m_XK_Thai_baht = 0x0ddf
  2014. const m_XK_Thai_bobaimai = 0x0dba
  2015. const m_XK_Thai_chochan = 0x0da8
  2016. const m_XK_Thai_chochang = 0x0daa
  2017. const m_XK_Thai_choching = 0x0da9
  2018. const m_XK_Thai_chochoe = 0x0dac
  2019. const m_XK_Thai_dochada = 0x0dae
  2020. const m_XK_Thai_dodek = 0x0db4
  2021. const m_XK_Thai_fofa = 0x0dbd
  2022. const m_XK_Thai_fofan = 0x0dbf
  2023. const m_XK_Thai_hohip = 0x0dcb
  2024. const m_XK_Thai_honokhuk = 0x0dce
  2025. const m_XK_Thai_khokhai = 0x0da2
  2026. const m_XK_Thai_khokhon = 0x0da5
  2027. const m_XK_Thai_khokhuat = 0x0da3
  2028. const m_XK_Thai_khokhwai = 0x0da4
  2029. const m_XK_Thai_khorakhang = 0x0da6
  2030. const m_XK_Thai_kokai = 0x0da1
  2031. const m_XK_Thai_lakkhangyao = 0x0de5
  2032. const m_XK_Thai_lekchet = 0x0df7
  2033. const m_XK_Thai_lekha = 0x0df5
  2034. const m_XK_Thai_lekhok = 0x0df6
  2035. const m_XK_Thai_lekkao = 0x0df9
  2036. const m_XK_Thai_leknung = 0x0df1
  2037. const m_XK_Thai_lekpaet = 0x0df8
  2038. const m_XK_Thai_leksam = 0x0df3
  2039. const m_XK_Thai_leksi = 0x0df4
  2040. const m_XK_Thai_leksong = 0x0df2
  2041. const m_XK_Thai_leksun = 0x0df0
  2042. const m_XK_Thai_lochula = 0x0dcc
  2043. const m_XK_Thai_loling = 0x0dc5
  2044. const m_XK_Thai_lu = 0x0dc6
  2045. const m_XK_Thai_maichattawa = 0x0deb
  2046. const m_XK_Thai_maiek = 0x0de8
  2047. const m_XK_Thai_maihanakat = 0x0dd1
  2048. const m_XK_Thai_maihanakat_maitho = 0x0dde
  2049. const m_XK_Thai_maitaikhu = 0x0de7
  2050. const m_XK_Thai_maitho = 0x0de9
  2051. const m_XK_Thai_maitri = 0x0dea
  2052. const m_XK_Thai_maiyamok = 0x0de6
  2053. const m_XK_Thai_moma = 0x0dc1
  2054. const m_XK_Thai_ngongu = 0x0da7
  2055. const m_XK_Thai_nikhahit = 0x0ded
  2056. const m_XK_Thai_nonen = 0x0db3
  2057. const m_XK_Thai_nonu = 0x0db9
  2058. const m_XK_Thai_oang = 0x0dcd
  2059. const m_XK_Thai_paiyannoi = 0x0dcf
  2060. const m_XK_Thai_phinthu = 0x0dda
  2061. const m_XK_Thai_phophan = 0x0dbe
  2062. const m_XK_Thai_phophung = 0x0dbc
  2063. const m_XK_Thai_phosamphao = 0x0dc0
  2064. const m_XK_Thai_popla = 0x0dbb
  2065. const m_XK_Thai_rorua = 0x0dc3
  2066. const m_XK_Thai_ru = 0x0dc4
  2067. const m_XK_Thai_saraa = 0x0dd0
  2068. const m_XK_Thai_saraaa = 0x0dd2
  2069. const m_XK_Thai_saraae = 0x0de1
  2070. const m_XK_Thai_saraaimaimalai = 0x0de4
  2071. const m_XK_Thai_saraaimaimuan = 0x0de3
  2072. const m_XK_Thai_saraam = 0x0dd3
  2073. const m_XK_Thai_sarae = 0x0de0
  2074. const m_XK_Thai_sarai = 0x0dd4
  2075. const m_XK_Thai_saraii = 0x0dd5
  2076. const m_XK_Thai_sarao = 0x0de2
  2077. const m_XK_Thai_sarau = 0x0dd8
  2078. const m_XK_Thai_saraue = 0x0dd6
  2079. const m_XK_Thai_sarauee = 0x0dd7
  2080. const m_XK_Thai_sarauu = 0x0dd9
  2081. const m_XK_Thai_sorusi = 0x0dc9
  2082. const m_XK_Thai_sosala = 0x0dc8
  2083. const m_XK_Thai_soso = 0x0dab
  2084. const m_XK_Thai_sosua = 0x0dca
  2085. const m_XK_Thai_thanthakhat = 0x0dec
  2086. const m_XK_Thai_thonangmontho = 0x0db1
  2087. const m_XK_Thai_thophuthao = 0x0db2
  2088. const m_XK_Thai_thothahan = 0x0db7
  2089. const m_XK_Thai_thothan = 0x0db0
  2090. const m_XK_Thai_thothong = 0x0db8
  2091. const m_XK_Thai_thothung = 0x0db6
  2092. const m_XK_Thai_topatak = 0x0daf
  2093. const m_XK_Thai_totao = 0x0db5
  2094. const m_XK_Thai_wowaen = 0x0dc7
  2095. const m_XK_Thai_yoyak = 0x0dc2
  2096. const m_XK_Thai_yoying = 0x0dad
  2097. const m_XK_Thorn = 0x00de
  2098. const m_XK_Touroku = 0xff2b
  2099. const m_XK_Tslash = 0x03ac
  2100. const m_XK_U = 0x0055
  2101. const m_XK_Uacute = 0x00da
  2102. const m_XK_Ubelowdot = 0x1001ee4
  2103. const m_XK_Ubreve = 0x02dd
  2104. const m_XK_Ucircumflex = 0x00db
  2105. const m_XK_Udiaeresis = 0x00dc
  2106. const m_XK_Udoubleacute = 0x01db
  2107. const m_XK_Ugrave = 0x00d9
  2108. const m_XK_Uhook = 0x1001ee6
  2109. const m_XK_Uhorn = 0x10001af
  2110. const m_XK_Uhornacute = 0x1001ee8
  2111. const m_XK_Uhornbelowdot = 0x1001ef0
  2112. const m_XK_Uhorngrave = 0x1001eea
  2113. const m_XK_Uhornhook = 0x1001eec
  2114. const m_XK_Uhorntilde = 0x1001eee
  2115. const m_XK_Ukrainian_GHE_WITH_UPTURN = 0x06bd
  2116. const m_XK_Ukrainian_I = 0x06b6
  2117. const m_XK_Ukrainian_IE = 0x06b4
  2118. const m_XK_Ukrainian_YI = 0x06b7
  2119. const m_XK_Ukrainian_ghe_with_upturn = 0x06ad
  2120. const m_XK_Ukrainian_i = 0x06a6
  2121. const m_XK_Ukrainian_ie = 0x06a4
  2122. const m_XK_Ukrainian_yi = 0x06a7
  2123. const m_XK_Ukranian_I = 0x06b6
  2124. const m_XK_Ukranian_JE = 0x06b4
  2125. const m_XK_Ukranian_YI = 0x06b7
  2126. const m_XK_Ukranian_i = 0x06a6
  2127. const m_XK_Ukranian_je = 0x06a4
  2128. const m_XK_Ukranian_yi = 0x06a7
  2129. const m_XK_Umacron = 0x03de
  2130. const m_XK_Undo = 0xff65
  2131. const m_XK_Uogonek = 0x03d9
  2132. const m_XK_Up = 0xff52
  2133. const m_XK_Uring = 0x01d9
  2134. const m_XK_Utilde = 0x03dd
  2135. const m_XK_V = 0x0056
  2136. const m_XK_VoidSymbol = 0xffffff
  2137. const m_XK_W = 0x0057
  2138. const m_XK_Wacute = 0x1001e82
  2139. const m_XK_Wcircumflex = 0x1000174
  2140. const m_XK_Wdiaeresis = 0x1001e84
  2141. const m_XK_Wgrave = 0x1001e80
  2142. const m_XK_WonSign = 0x10020a9
  2143. const m_XK_X = 0x0058
  2144. const m_XK_Xabovedot = 0x1001e8a
  2145. const m_XK_Y = 0x0059
  2146. const m_XK_Yacute = 0x00dd
  2147. const m_XK_Ybelowdot = 0x1001ef4
  2148. const m_XK_Ycircumflex = 0x1000176
  2149. const m_XK_Ydiaeresis = 0x13be
  2150. const m_XK_Ygrave = 0x1001ef2
  2151. const m_XK_Yhook = 0x1001ef6
  2152. const m_XK_Ytilde = 0x1001ef8
  2153. const m_XK_Z = 0x005a
  2154. const m_XK_Zabovedot = 0x01af
  2155. const m_XK_Zacute = 0x01ac
  2156. const m_XK_Zcaron = 0x01ae
  2157. const m_XK_Zen_Koho = 0xff3d
  2158. const m_XK_Zenkaku = 0xff28
  2159. const m_XK_Zenkaku_Hankaku = 0xff2a
  2160. const m_XK_Zstroke = 0x10001b5
  2161. const m_XK_a = 0x0061
  2162. const m_XK_aacute = 0x00e1
  2163. const m_XK_abelowdot = 0x1001ea1
  2164. const m_XK_abovedot = 0x01ff
  2165. const m_XK_abreve = 0x01e3
  2166. const m_XK_abreveacute = 0x1001eaf
  2167. const m_XK_abrevebelowdot = 0x1001eb7
  2168. const m_XK_abrevegrave = 0x1001eb1
  2169. const m_XK_abrevehook = 0x1001eb3
  2170. const m_XK_abrevetilde = 0x1001eb5
  2171. const m_XK_acircumflex = 0x00e2
  2172. const m_XK_acircumflexacute = 0x1001ea5
  2173. const m_XK_acircumflexbelowdot = 0x1001ead
  2174. const m_XK_acircumflexgrave = 0x1001ea7
  2175. const m_XK_acircumflexhook = 0x1001ea9
  2176. const m_XK_acircumflextilde = 0x1001eab
  2177. const m_XK_acute = 0x00b4
  2178. const m_XK_adiaeresis = 0x00e4
  2179. const m_XK_ae = 0x00e6
  2180. const m_XK_agrave = 0x00e0
  2181. const m_XK_ahook = 0x1001ea3
  2182. const m_XK_amacron = 0x03e0
  2183. const m_XK_ampersand = 0x0026
  2184. const m_XK_aogonek = 0x01b1
  2185. const m_XK_apostrophe = 0x0027
  2186. const m_XK_approxeq = 0x1002248
  2187. const m_XK_aring = 0x00e5
  2188. const m_XK_asciicircum = 0x005e
  2189. const m_XK_asciitilde = 0x007e
  2190. const m_XK_asterisk = 0x002a
  2191. const m_XK_at = 0x0040
  2192. const m_XK_atilde = 0x00e3
  2193. const m_XK_b = 0x0062
  2194. const m_XK_babovedot = 0x1001e03
  2195. const m_XK_backslash = 0x005c
  2196. const m_XK_bar = 0x007c
  2197. const m_XK_because = 0x1002235
  2198. const m_XK_braceleft = 0x007b
  2199. const m_XK_braceright = 0x007d
  2200. const m_XK_bracketleft = 0x005b
  2201. const m_XK_bracketright = 0x005d
  2202. const m_XK_braille_blank = 0x1002800
  2203. const m_XK_braille_dot_1 = 0xfff1
  2204. const m_XK_braille_dot_10 = 0xfffa
  2205. const m_XK_braille_dot_2 = 0xfff2
  2206. const m_XK_braille_dot_3 = 0xfff3
  2207. const m_XK_braille_dot_4 = 0xfff4
  2208. const m_XK_braille_dot_5 = 0xfff5
  2209. const m_XK_braille_dot_6 = 0xfff6
  2210. const m_XK_braille_dot_7 = 0xfff7
  2211. const m_XK_braille_dot_8 = 0xfff8
  2212. const m_XK_braille_dot_9 = 0xfff9
  2213. const m_XK_braille_dots_1 = 0x1002801
  2214. const m_XK_braille_dots_12 = 0x1002803
  2215. const m_XK_braille_dots_123 = 0x1002807
  2216. const m_XK_braille_dots_1234 = 0x100280f
  2217. const m_XK_braille_dots_12345 = 0x100281f
  2218. const m_XK_braille_dots_123456 = 0x100283f
  2219. const m_XK_braille_dots_1234567 = 0x100287f
  2220. const m_XK_braille_dots_12345678 = 0x10028ff
  2221. const m_XK_braille_dots_1234568 = 0x10028bf
  2222. const m_XK_braille_dots_123457 = 0x100285f
  2223. const m_XK_braille_dots_1234578 = 0x10028df
  2224. const m_XK_braille_dots_123458 = 0x100289f
  2225. const m_XK_braille_dots_12346 = 0x100282f
  2226. const m_XK_braille_dots_123467 = 0x100286f
  2227. const m_XK_braille_dots_1234678 = 0x10028ef
  2228. const m_XK_braille_dots_123468 = 0x10028af
  2229. const m_XK_braille_dots_12347 = 0x100284f
  2230. const m_XK_braille_dots_123478 = 0x10028cf
  2231. const m_XK_braille_dots_12348 = 0x100288f
  2232. const m_XK_braille_dots_1235 = 0x1002817
  2233. const m_XK_braille_dots_12356 = 0x1002837
  2234. const m_XK_braille_dots_123567 = 0x1002877
  2235. const m_XK_braille_dots_1235678 = 0x10028f7
  2236. const m_XK_braille_dots_123568 = 0x10028b7
  2237. const m_XK_braille_dots_12357 = 0x1002857
  2238. const m_XK_braille_dots_123578 = 0x10028d7
  2239. const m_XK_braille_dots_12358 = 0x1002897
  2240. const m_XK_braille_dots_1236 = 0x1002827
  2241. const m_XK_braille_dots_12367 = 0x1002867
  2242. const m_XK_braille_dots_123678 = 0x10028e7
  2243. const m_XK_braille_dots_12368 = 0x10028a7
  2244. const m_XK_braille_dots_1237 = 0x1002847
  2245. const m_XK_braille_dots_12378 = 0x10028c7
  2246. const m_XK_braille_dots_1238 = 0x1002887
  2247. const m_XK_braille_dots_124 = 0x100280b
  2248. const m_XK_braille_dots_1245 = 0x100281b
  2249. const m_XK_braille_dots_12456 = 0x100283b
  2250. const m_XK_braille_dots_124567 = 0x100287b
  2251. const m_XK_braille_dots_1245678 = 0x10028fb
  2252. const m_XK_braille_dots_124568 = 0x10028bb
  2253. const m_XK_braille_dots_12457 = 0x100285b
  2254. const m_XK_braille_dots_124578 = 0x10028db
  2255. const m_XK_braille_dots_12458 = 0x100289b
  2256. const m_XK_braille_dots_1246 = 0x100282b
  2257. const m_XK_braille_dots_12467 = 0x100286b
  2258. const m_XK_braille_dots_124678 = 0x10028eb
  2259. const m_XK_braille_dots_12468 = 0x10028ab
  2260. const m_XK_braille_dots_1247 = 0x100284b
  2261. const m_XK_braille_dots_12478 = 0x10028cb
  2262. const m_XK_braille_dots_1248 = 0x100288b
  2263. const m_XK_braille_dots_125 = 0x1002813
  2264. const m_XK_braille_dots_1256 = 0x1002833
  2265. const m_XK_braille_dots_12567 = 0x1002873
  2266. const m_XK_braille_dots_125678 = 0x10028f3
  2267. const m_XK_braille_dots_12568 = 0x10028b3
  2268. const m_XK_braille_dots_1257 = 0x1002853
  2269. const m_XK_braille_dots_12578 = 0x10028d3
  2270. const m_XK_braille_dots_1258 = 0x1002893
  2271. const m_XK_braille_dots_126 = 0x1002823
  2272. const m_XK_braille_dots_1267 = 0x1002863
  2273. const m_XK_braille_dots_12678 = 0x10028e3
  2274. const m_XK_braille_dots_1268 = 0x10028a3
  2275. const m_XK_braille_dots_127 = 0x1002843
  2276. const m_XK_braille_dots_1278 = 0x10028c3
  2277. const m_XK_braille_dots_128 = 0x1002883
  2278. const m_XK_braille_dots_13 = 0x1002805
  2279. const m_XK_braille_dots_134 = 0x100280d
  2280. const m_XK_braille_dots_1345 = 0x100281d
  2281. const m_XK_braille_dots_13456 = 0x100283d
  2282. const m_XK_braille_dots_134567 = 0x100287d
  2283. const m_XK_braille_dots_1345678 = 0x10028fd
  2284. const m_XK_braille_dots_134568 = 0x10028bd
  2285. const m_XK_braille_dots_13457 = 0x100285d
  2286. const m_XK_braille_dots_134578 = 0x10028dd
  2287. const m_XK_braille_dots_13458 = 0x100289d
  2288. const m_XK_braille_dots_1346 = 0x100282d
  2289. const m_XK_braille_dots_13467 = 0x100286d
  2290. const m_XK_braille_dots_134678 = 0x10028ed
  2291. const m_XK_braille_dots_13468 = 0x10028ad
  2292. const m_XK_braille_dots_1347 = 0x100284d
  2293. const m_XK_braille_dots_13478 = 0x10028cd
  2294. const m_XK_braille_dots_1348 = 0x100288d
  2295. const m_XK_braille_dots_135 = 0x1002815
  2296. const m_XK_braille_dots_1356 = 0x1002835
  2297. const m_XK_braille_dots_13567 = 0x1002875
  2298. const m_XK_braille_dots_135678 = 0x10028f5
  2299. const m_XK_braille_dots_13568 = 0x10028b5
  2300. const m_XK_braille_dots_1357 = 0x1002855
  2301. const m_XK_braille_dots_13578 = 0x10028d5
  2302. const m_XK_braille_dots_1358 = 0x1002895
  2303. const m_XK_braille_dots_136 = 0x1002825
  2304. const m_XK_braille_dots_1367 = 0x1002865
  2305. const m_XK_braille_dots_13678 = 0x10028e5
  2306. const m_XK_braille_dots_1368 = 0x10028a5
  2307. const m_XK_braille_dots_137 = 0x1002845
  2308. const m_XK_braille_dots_1378 = 0x10028c5
  2309. const m_XK_braille_dots_138 = 0x1002885
  2310. const m_XK_braille_dots_14 = 0x1002809
  2311. const m_XK_braille_dots_145 = 0x1002819
  2312. const m_XK_braille_dots_1456 = 0x1002839
  2313. const m_XK_braille_dots_14567 = 0x1002879
  2314. const m_XK_braille_dots_145678 = 0x10028f9
  2315. const m_XK_braille_dots_14568 = 0x10028b9
  2316. const m_XK_braille_dots_1457 = 0x1002859
  2317. const m_XK_braille_dots_14578 = 0x10028d9
  2318. const m_XK_braille_dots_1458 = 0x1002899
  2319. const m_XK_braille_dots_146 = 0x1002829
  2320. const m_XK_braille_dots_1467 = 0x1002869
  2321. const m_XK_braille_dots_14678 = 0x10028e9
  2322. const m_XK_braille_dots_1468 = 0x10028a9
  2323. const m_XK_braille_dots_147 = 0x1002849
  2324. const m_XK_braille_dots_1478 = 0x10028c9
  2325. const m_XK_braille_dots_148 = 0x1002889
  2326. const m_XK_braille_dots_15 = 0x1002811
  2327. const m_XK_braille_dots_156 = 0x1002831
  2328. const m_XK_braille_dots_1567 = 0x1002871
  2329. const m_XK_braille_dots_15678 = 0x10028f1
  2330. const m_XK_braille_dots_1568 = 0x10028b1
  2331. const m_XK_braille_dots_157 = 0x1002851
  2332. const m_XK_braille_dots_1578 = 0x10028d1
  2333. const m_XK_braille_dots_158 = 0x1002891
  2334. const m_XK_braille_dots_16 = 0x1002821
  2335. const m_XK_braille_dots_167 = 0x1002861
  2336. const m_XK_braille_dots_1678 = 0x10028e1
  2337. const m_XK_braille_dots_168 = 0x10028a1
  2338. const m_XK_braille_dots_17 = 0x1002841
  2339. const m_XK_braille_dots_178 = 0x10028c1
  2340. const m_XK_braille_dots_18 = 0x1002881
  2341. const m_XK_braille_dots_2 = 0x1002802
  2342. const m_XK_braille_dots_23 = 0x1002806
  2343. const m_XK_braille_dots_234 = 0x100280e
  2344. const m_XK_braille_dots_2345 = 0x100281e
  2345. const m_XK_braille_dots_23456 = 0x100283e
  2346. const m_XK_braille_dots_234567 = 0x100287e
  2347. const m_XK_braille_dots_2345678 = 0x10028fe
  2348. const m_XK_braille_dots_234568 = 0x10028be
  2349. const m_XK_braille_dots_23457 = 0x100285e
  2350. const m_XK_braille_dots_234578 = 0x10028de
  2351. const m_XK_braille_dots_23458 = 0x100289e
  2352. const m_XK_braille_dots_2346 = 0x100282e
  2353. const m_XK_braille_dots_23467 = 0x100286e
  2354. const m_XK_braille_dots_234678 = 0x10028ee
  2355. const m_XK_braille_dots_23468 = 0x10028ae
  2356. const m_XK_braille_dots_2347 = 0x100284e
  2357. const m_XK_braille_dots_23478 = 0x10028ce
  2358. const m_XK_braille_dots_2348 = 0x100288e
  2359. const m_XK_braille_dots_235 = 0x1002816
  2360. const m_XK_braille_dots_2356 = 0x1002836
  2361. const m_XK_braille_dots_23567 = 0x1002876
  2362. const m_XK_braille_dots_235678 = 0x10028f6
  2363. const m_XK_braille_dots_23568 = 0x10028b6
  2364. const m_XK_braille_dots_2357 = 0x1002856
  2365. const m_XK_braille_dots_23578 = 0x10028d6
  2366. const m_XK_braille_dots_2358 = 0x1002896
  2367. const m_XK_braille_dots_236 = 0x1002826
  2368. const m_XK_braille_dots_2367 = 0x1002866
  2369. const m_XK_braille_dots_23678 = 0x10028e6
  2370. const m_XK_braille_dots_2368 = 0x10028a6
  2371. const m_XK_braille_dots_237 = 0x1002846
  2372. const m_XK_braille_dots_2378 = 0x10028c6
  2373. const m_XK_braille_dots_238 = 0x1002886
  2374. const m_XK_braille_dots_24 = 0x100280a
  2375. const m_XK_braille_dots_245 = 0x100281a
  2376. const m_XK_braille_dots_2456 = 0x100283a
  2377. const m_XK_braille_dots_24567 = 0x100287a
  2378. const m_XK_braille_dots_245678 = 0x10028fa
  2379. const m_XK_braille_dots_24568 = 0x10028ba
  2380. const m_XK_braille_dots_2457 = 0x100285a
  2381. const m_XK_braille_dots_24578 = 0x10028da
  2382. const m_XK_braille_dots_2458 = 0x100289a
  2383. const m_XK_braille_dots_246 = 0x100282a
  2384. const m_XK_braille_dots_2467 = 0x100286a
  2385. const m_XK_braille_dots_24678 = 0x10028ea
  2386. const m_XK_braille_dots_2468 = 0x10028aa
  2387. const m_XK_braille_dots_247 = 0x100284a
  2388. const m_XK_braille_dots_2478 = 0x10028ca
  2389. const m_XK_braille_dots_248 = 0x100288a
  2390. const m_XK_braille_dots_25 = 0x1002812
  2391. const m_XK_braille_dots_256 = 0x1002832
  2392. const m_XK_braille_dots_2567 = 0x1002872
  2393. const m_XK_braille_dots_25678 = 0x10028f2
  2394. const m_XK_braille_dots_2568 = 0x10028b2
  2395. const m_XK_braille_dots_257 = 0x1002852
  2396. const m_XK_braille_dots_2578 = 0x10028d2
  2397. const m_XK_braille_dots_258 = 0x1002892
  2398. const m_XK_braille_dots_26 = 0x1002822
  2399. const m_XK_braille_dots_267 = 0x1002862
  2400. const m_XK_braille_dots_2678 = 0x10028e2
  2401. const m_XK_braille_dots_268 = 0x10028a2
  2402. const m_XK_braille_dots_27 = 0x1002842
  2403. const m_XK_braille_dots_278 = 0x10028c2
  2404. const m_XK_braille_dots_28 = 0x1002882
  2405. const m_XK_braille_dots_3 = 0x1002804
  2406. const m_XK_braille_dots_34 = 0x100280c
  2407. const m_XK_braille_dots_345 = 0x100281c
  2408. const m_XK_braille_dots_3456 = 0x100283c
  2409. const m_XK_braille_dots_34567 = 0x100287c
  2410. const m_XK_braille_dots_345678 = 0x10028fc
  2411. const m_XK_braille_dots_34568 = 0x10028bc
  2412. const m_XK_braille_dots_3457 = 0x100285c
  2413. const m_XK_braille_dots_34578 = 0x10028dc
  2414. const m_XK_braille_dots_3458 = 0x100289c
  2415. const m_XK_braille_dots_346 = 0x100282c
  2416. const m_XK_braille_dots_3467 = 0x100286c
  2417. const m_XK_braille_dots_34678 = 0x10028ec
  2418. const m_XK_braille_dots_3468 = 0x10028ac
  2419. const m_XK_braille_dots_347 = 0x100284c
  2420. const m_XK_braille_dots_3478 = 0x10028cc
  2421. const m_XK_braille_dots_348 = 0x100288c
  2422. const m_XK_braille_dots_35 = 0x1002814
  2423. const m_XK_braille_dots_356 = 0x1002834
  2424. const m_XK_braille_dots_3567 = 0x1002874
  2425. const m_XK_braille_dots_35678 = 0x10028f4
  2426. const m_XK_braille_dots_3568 = 0x10028b4
  2427. const m_XK_braille_dots_357 = 0x1002854
  2428. const m_XK_braille_dots_3578 = 0x10028d4
  2429. const m_XK_braille_dots_358 = 0x1002894
  2430. const m_XK_braille_dots_36 = 0x1002824
  2431. const m_XK_braille_dots_367 = 0x1002864
  2432. const m_XK_braille_dots_3678 = 0x10028e4
  2433. const m_XK_braille_dots_368 = 0x10028a4
  2434. const m_XK_braille_dots_37 = 0x1002844
  2435. const m_XK_braille_dots_378 = 0x10028c4
  2436. const m_XK_braille_dots_38 = 0x1002884
  2437. const m_XK_braille_dots_4 = 0x1002808
  2438. const m_XK_braille_dots_45 = 0x1002818
  2439. const m_XK_braille_dots_456 = 0x1002838
  2440. const m_XK_braille_dots_4567 = 0x1002878
  2441. const m_XK_braille_dots_45678 = 0x10028f8
  2442. const m_XK_braille_dots_4568 = 0x10028b8
  2443. const m_XK_braille_dots_457 = 0x1002858
  2444. const m_XK_braille_dots_4578 = 0x10028d8
  2445. const m_XK_braille_dots_458 = 0x1002898
  2446. const m_XK_braille_dots_46 = 0x1002828
  2447. const m_XK_braille_dots_467 = 0x1002868
  2448. const m_XK_braille_dots_4678 = 0x10028e8
  2449. const m_XK_braille_dots_468 = 0x10028a8
  2450. const m_XK_braille_dots_47 = 0x1002848
  2451. const m_XK_braille_dots_478 = 0x10028c8
  2452. const m_XK_braille_dots_48 = 0x1002888
  2453. const m_XK_braille_dots_5 = 0x1002810
  2454. const m_XK_braille_dots_56 = 0x1002830
  2455. const m_XK_braille_dots_567 = 0x1002870
  2456. const m_XK_braille_dots_5678 = 0x10028f0
  2457. const m_XK_braille_dots_568 = 0x10028b0
  2458. const m_XK_braille_dots_57 = 0x1002850
  2459. const m_XK_braille_dots_578 = 0x10028d0
  2460. const m_XK_braille_dots_58 = 0x1002890
  2461. const m_XK_braille_dots_6 = 0x1002820
  2462. const m_XK_braille_dots_67 = 0x1002860
  2463. const m_XK_braille_dots_678 = 0x10028e0
  2464. const m_XK_braille_dots_68 = 0x10028a0
  2465. const m_XK_braille_dots_7 = 0x1002840
  2466. const m_XK_braille_dots_78 = 0x10028c0
  2467. const m_XK_braille_dots_8 = 0x1002880
  2468. const m_XK_breve = 0x01a2
  2469. const m_XK_brokenbar = 0x00a6
  2470. const m_XK_c = 0x0063
  2471. const m_XK_c_h = 0xfea3
  2472. const m_XK_cabovedot = 0x02e5
  2473. const m_XK_cacute = 0x01e6
  2474. const m_XK_caron = 0x01b7
  2475. const m_XK_ccaron = 0x01e8
  2476. const m_XK_ccedilla = 0x00e7
  2477. const m_XK_ccircumflex = 0x02e6
  2478. const m_XK_cedilla = 0x00b8
  2479. const m_XK_cent = 0x00a2
  2480. const m_XK_ch = 0xfea0
  2481. const m_XK_colon = 0x003a
  2482. const m_XK_comma = 0x002c
  2483. const m_XK_containsas = 0x100220B
  2484. const m_XK_copyright = 0x00a9
  2485. const m_XK_cuberoot = 0x100221B
  2486. const m_XK_currency = 0x00a4
  2487. const m_XK_d = 0x0064
  2488. const m_XK_dabovedot = 0x1001e0b
  2489. const m_XK_dcaron = 0x01ef
  2490. const m_XK_dead_A = 0xfe81
  2491. const m_XK_dead_E = 0xfe83
  2492. const m_XK_dead_I = 0xfe85
  2493. const m_XK_dead_O = 0xfe87
  2494. const m_XK_dead_U = 0xfe89
  2495. const m_XK_dead_a = 0xfe80
  2496. const m_XK_dead_abovecomma = 0xfe64
  2497. const m_XK_dead_abovedot = 0xfe56
  2498. const m_XK_dead_abovereversedcomma = 0xfe65
  2499. const m_XK_dead_abovering = 0xfe58
  2500. const m_XK_dead_aboveverticalline = 0xfe91
  2501. const m_XK_dead_acute = 0xfe51
  2502. const m_XK_dead_belowbreve = 0xfe6b
  2503. const m_XK_dead_belowcircumflex = 0xfe69
  2504. const m_XK_dead_belowcomma = 0xfe6e
  2505. const m_XK_dead_belowdiaeresis = 0xfe6c
  2506. const m_XK_dead_belowdot = 0xfe60
  2507. const m_XK_dead_belowmacron = 0xfe68
  2508. const m_XK_dead_belowring = 0xfe67
  2509. const m_XK_dead_belowtilde = 0xfe6a
  2510. const m_XK_dead_belowverticalline = 0xfe92
  2511. const m_XK_dead_breve = 0xfe55
  2512. const m_XK_dead_capital_schwa = 0xfe8b
  2513. const m_XK_dead_caron = 0xfe5a
  2514. const m_XK_dead_cedilla = 0xfe5b
  2515. const m_XK_dead_circumflex = 0xfe52
  2516. const m_XK_dead_currency = 0xfe6f
  2517. const m_XK_dead_dasia = 0xfe65
  2518. const m_XK_dead_diaeresis = 0xfe57
  2519. const m_XK_dead_doubleacute = 0xfe59
  2520. const m_XK_dead_doublegrave = 0xfe66
  2521. const m_XK_dead_e = 0xfe82
  2522. const m_XK_dead_grave = 0xfe50
  2523. const m_XK_dead_greek = 0xfe8c
  2524. const m_XK_dead_hook = 0xfe61
  2525. const m_XK_dead_horn = 0xfe62
  2526. const m_XK_dead_i = 0xfe84
  2527. const m_XK_dead_invertedbreve = 0xfe6d
  2528. const m_XK_dead_iota = 0xfe5d
  2529. const m_XK_dead_longsolidusoverlay = 0xfe93
  2530. const m_XK_dead_lowline = 0xfe90
  2531. const m_XK_dead_macron = 0xfe54
  2532. const m_XK_dead_o = 0xfe86
  2533. const m_XK_dead_ogonek = 0xfe5c
  2534. const m_XK_dead_perispomeni = 0xfe53
  2535. const m_XK_dead_psili = 0xfe64
  2536. const m_XK_dead_semivoiced_sound = 0xfe5f
  2537. const m_XK_dead_small_schwa = 0xfe8a
  2538. const m_XK_dead_stroke = 0xfe63
  2539. const m_XK_dead_tilde = 0xfe53
  2540. const m_XK_dead_u = 0xfe88
  2541. const m_XK_dead_voiced_sound = 0xfe5e
  2542. const m_XK_degree = 0x00b0
  2543. const m_XK_diaeresis = 0x00a8
  2544. const m_XK_dintegral = 0x100222C
  2545. const m_XK_division = 0x00f7
  2546. const m_XK_dollar = 0x0024
  2547. const m_XK_doubleacute = 0x01bd
  2548. const m_XK_dstroke = 0x01f0
  2549. const m_XK_e = 0x0065
  2550. const m_XK_eabovedot = 0x03ec
  2551. const m_XK_eacute = 0x00e9
  2552. const m_XK_ebelowdot = 0x1001eb9
  2553. const m_XK_ecaron = 0x01ec
  2554. const m_XK_ecircumflex = 0x00ea
  2555. const m_XK_ecircumflexacute = 0x1001ebf
  2556. const m_XK_ecircumflexbelowdot = 0x1001ec7
  2557. const m_XK_ecircumflexgrave = 0x1001ec1
  2558. const m_XK_ecircumflexhook = 0x1001ec3
  2559. const m_XK_ecircumflextilde = 0x1001ec5
  2560. const m_XK_ediaeresis = 0x00eb
  2561. const m_XK_egrave = 0x00e8
  2562. const m_XK_ehook = 0x1001ebb
  2563. const m_XK_eightsubscript = 0x1002088
  2564. const m_XK_eightsuperior = 0x1002078
  2565. const m_XK_elementof = 0x1002208
  2566. const m_XK_emacron = 0x03ba
  2567. const m_XK_emptyset = 0x1002205
  2568. const m_XK_eng = 0x03bf
  2569. const m_XK_eogonek = 0x01ea
  2570. const m_XK_equal = 0x003d
  2571. const m_XK_eth = 0x00f0
  2572. const m_XK_etilde = 0x1001ebd
  2573. const m_XK_exclam = 0x0021
  2574. const m_XK_exclamdown = 0x00a1
  2575. const m_XK_ezh = 0x1000292
  2576. const m_XK_f = 0x0066
  2577. const m_XK_fabovedot = 0x1001e1f
  2578. const m_XK_fivesubscript = 0x1002085
  2579. const m_XK_fivesuperior = 0x1002075
  2580. const m_XK_foursubscript = 0x1002084
  2581. const m_XK_foursuperior = 0x1002074
  2582. const m_XK_fourthroot = 0x100221C
  2583. const m_XK_g = 0x0067
  2584. const m_XK_gabovedot = 0x02f5
  2585. const m_XK_gbreve = 0x02bb
  2586. const m_XK_gcaron = 0x10001e7
  2587. const m_XK_gcedilla = 0x03bb
  2588. const m_XK_gcircumflex = 0x02f8
  2589. const m_XK_grave = 0x0060
  2590. const m_XK_greater = 0x003e
  2591. const m_XK_guillemotleft = 0x00ab
  2592. const m_XK_guillemotright = 0x00bb
  2593. const m_XK_h = 0x0068
  2594. const m_XK_hcircumflex = 0x02b6
  2595. const m_XK_hebrew_aleph = 0x0ce0
  2596. const m_XK_hebrew_ayin = 0x0cf2
  2597. const m_XK_hebrew_bet = 0x0ce1
  2598. const m_XK_hebrew_beth = 0x0ce1
  2599. const m_XK_hebrew_chet = 0x0ce7
  2600. const m_XK_hebrew_dalet = 0x0ce3
  2601. const m_XK_hebrew_daleth = 0x0ce3
  2602. const m_XK_hebrew_doublelowline = 0x0cdf
  2603. const m_XK_hebrew_finalkaph = 0x0cea
  2604. const m_XK_hebrew_finalmem = 0x0ced
  2605. const m_XK_hebrew_finalnun = 0x0cef
  2606. const m_XK_hebrew_finalpe = 0x0cf3
  2607. const m_XK_hebrew_finalzade = 0x0cf5
  2608. const m_XK_hebrew_finalzadi = 0x0cf5
  2609. const m_XK_hebrew_gimel = 0x0ce2
  2610. const m_XK_hebrew_gimmel = 0x0ce2
  2611. const m_XK_hebrew_he = 0x0ce4
  2612. const m_XK_hebrew_het = 0x0ce7
  2613. const m_XK_hebrew_kaph = 0x0ceb
  2614. const m_XK_hebrew_kuf = 0x0cf7
  2615. const m_XK_hebrew_lamed = 0x0cec
  2616. const m_XK_hebrew_mem = 0x0cee
  2617. const m_XK_hebrew_nun = 0x0cf0
  2618. const m_XK_hebrew_pe = 0x0cf4
  2619. const m_XK_hebrew_qoph = 0x0cf7
  2620. const m_XK_hebrew_resh = 0x0cf8
  2621. const m_XK_hebrew_samech = 0x0cf1
  2622. const m_XK_hebrew_samekh = 0x0cf1
  2623. const m_XK_hebrew_shin = 0x0cf9
  2624. const m_XK_hebrew_taf = 0x0cfa
  2625. const m_XK_hebrew_taw = 0x0cfa
  2626. const m_XK_hebrew_tet = 0x0ce8
  2627. const m_XK_hebrew_teth = 0x0ce8
  2628. const m_XK_hebrew_waw = 0x0ce5
  2629. const m_XK_hebrew_yod = 0x0ce9
  2630. const m_XK_hebrew_zade = 0x0cf6
  2631. const m_XK_hebrew_zadi = 0x0cf6
  2632. const m_XK_hebrew_zain = 0x0ce6
  2633. const m_XK_hebrew_zayin = 0x0ce6
  2634. const m_XK_hstroke = 0x02b1
  2635. const m_XK_hyphen = 0x00ad
  2636. const m_XK_i = 0x0069
  2637. const m_XK_iacute = 0x00ed
  2638. const m_XK_ibelowdot = 0x1001ecb
  2639. const m_XK_ibreve = 0x100012d
  2640. const m_XK_icircumflex = 0x00ee
  2641. const m_XK_idiaeresis = 0x00ef
  2642. const m_XK_idotless = 0x02b9
  2643. const m_XK_igrave = 0x00ec
  2644. const m_XK_ihook = 0x1001ec9
  2645. const m_XK_imacron = 0x03ef
  2646. const m_XK_iogonek = 0x03e7
  2647. const m_XK_itilde = 0x03b5
  2648. const m_XK_j = 0x006a
  2649. const m_XK_jcircumflex = 0x02bc
  2650. const m_XK_k = 0x006b
  2651. const m_XK_kana_A = 0x04b1
  2652. const m_XK_kana_CHI = 0x04c1
  2653. const m_XK_kana_E = 0x04b4
  2654. const m_XK_kana_FU = 0x04cc
  2655. const m_XK_kana_HA = 0x04ca
  2656. const m_XK_kana_HE = 0x04cd
  2657. const m_XK_kana_HI = 0x04cb
  2658. const m_XK_kana_HO = 0x04ce
  2659. const m_XK_kana_HU = 0x04cc
  2660. const m_XK_kana_I = 0x04b2
  2661. const m_XK_kana_KA = 0x04b6
  2662. const m_XK_kana_KE = 0x04b9
  2663. const m_XK_kana_KI = 0x04b7
  2664. const m_XK_kana_KO = 0x04ba
  2665. const m_XK_kana_KU = 0x04b8
  2666. const m_XK_kana_MA = 0x04cf
  2667. const m_XK_kana_ME = 0x04d2
  2668. const m_XK_kana_MI = 0x04d0
  2669. const m_XK_kana_MO = 0x04d3
  2670. const m_XK_kana_MU = 0x04d1
  2671. const m_XK_kana_N = 0x04dd
  2672. const m_XK_kana_NA = 0x04c5
  2673. const m_XK_kana_NE = 0x04c8
  2674. const m_XK_kana_NI = 0x04c6
  2675. const m_XK_kana_NO = 0x04c9
  2676. const m_XK_kana_NU = 0x04c7
  2677. const m_XK_kana_O = 0x04b5
  2678. const m_XK_kana_RA = 0x04d7
  2679. const m_XK_kana_RE = 0x04da
  2680. const m_XK_kana_RI = 0x04d8
  2681. const m_XK_kana_RO = 0x04db
  2682. const m_XK_kana_RU = 0x04d9
  2683. const m_XK_kana_SA = 0x04bb
  2684. const m_XK_kana_SE = 0x04be
  2685. const m_XK_kana_SHI = 0x04bc
  2686. const m_XK_kana_SO = 0x04bf
  2687. const m_XK_kana_SU = 0x04bd
  2688. const m_XK_kana_TA = 0x04c0
  2689. const m_XK_kana_TE = 0x04c3
  2690. const m_XK_kana_TI = 0x04c1
  2691. const m_XK_kana_TO = 0x04c4
  2692. const m_XK_kana_TSU = 0x04c2
  2693. const m_XK_kana_TU = 0x04c2
  2694. const m_XK_kana_U = 0x04b3
  2695. const m_XK_kana_WA = 0x04dc
  2696. const m_XK_kana_WO = 0x04a6
  2697. const m_XK_kana_YA = 0x04d4
  2698. const m_XK_kana_YO = 0x04d6
  2699. const m_XK_kana_YU = 0x04d5
  2700. const m_XK_kana_a = 0x04a7
  2701. const m_XK_kana_closingbracket = 0x04a3
  2702. const m_XK_kana_comma = 0x04a4
  2703. const m_XK_kana_conjunctive = 0x04a5
  2704. const m_XK_kana_e = 0x04aa
  2705. const m_XK_kana_fullstop = 0x04a1
  2706. const m_XK_kana_i = 0x04a8
  2707. const m_XK_kana_middledot = 0x04a5
  2708. const m_XK_kana_o = 0x04ab
  2709. const m_XK_kana_openingbracket = 0x04a2
  2710. const m_XK_kana_switch = 0xff7e
  2711. const m_XK_kana_tsu = 0x04af
  2712. const m_XK_kana_tu = 0x04af
  2713. const m_XK_kana_u = 0x04a9
  2714. const m_XK_kana_ya = 0x04ac
  2715. const m_XK_kana_yo = 0x04ae
  2716. const m_XK_kana_yu = 0x04ad
  2717. const m_XK_kappa = 0x03a2
  2718. const m_XK_kcedilla = 0x03f3
  2719. const m_XK_kra = 0x03a2
  2720. const m_XK_l = 0x006c
  2721. const m_XK_lacute = 0x01e5
  2722. const m_XK_lbelowdot = 0x1001e37
  2723. const m_XK_lcaron = 0x01b5
  2724. const m_XK_lcedilla = 0x03b6
  2725. const m_XK_less = 0x003c
  2726. const m_XK_lstroke = 0x01b3
  2727. const m_XK_m = 0x006d
  2728. const m_XK_mabovedot = 0x1001e41
  2729. const m_XK_macron = 0x00af
  2730. const m_XK_masculine = 0x00ba
  2731. const m_XK_minus = 0x002d
  2732. const m_XK_mu = 0x00b5
  2733. const m_XK_multiply = 0x00d7
  2734. const m_XK_n = 0x006e
  2735. const m_XK_nacute = 0x01f1
  2736. const m_XK_ncaron = 0x01f2
  2737. const m_XK_ncedilla = 0x03f1
  2738. const m_XK_ninesubscript = 0x1002089
  2739. const m_XK_ninesuperior = 0x1002079
  2740. const m_XK_nobreakspace = 0x00a0
  2741. const m_XK_notapproxeq = 0x1002247
  2742. const m_XK_notelementof = 0x1002209
  2743. const m_XK_notidentical = 0x1002262
  2744. const m_XK_notsign = 0x00ac
  2745. const m_XK_ntilde = 0x00f1
  2746. const m_XK_numbersign = 0x0023
  2747. const m_XK_numerosign = 0x06b0
  2748. const m_XK_o = 0x006f
  2749. const m_XK_oacute = 0x00f3
  2750. const m_XK_obarred = 0x1000275
  2751. const m_XK_obelowdot = 0x1001ecd
  2752. const m_XK_ocaron = 0x10001d2
  2753. const m_XK_ocircumflex = 0x00f4
  2754. const m_XK_ocircumflexacute = 0x1001ed1
  2755. const m_XK_ocircumflexbelowdot = 0x1001ed9
  2756. const m_XK_ocircumflexgrave = 0x1001ed3
  2757. const m_XK_ocircumflexhook = 0x1001ed5
  2758. const m_XK_ocircumflextilde = 0x1001ed7
  2759. const m_XK_odiaeresis = 0x00f6
  2760. const m_XK_odoubleacute = 0x01f5
  2761. const m_XK_oe = 0x13bd
  2762. const m_XK_ogonek = 0x01b2
  2763. const m_XK_ograve = 0x00f2
  2764. const m_XK_ohook = 0x1001ecf
  2765. const m_XK_ohorn = 0x10001a1
  2766. const m_XK_ohornacute = 0x1001edb
  2767. const m_XK_ohornbelowdot = 0x1001ee3
  2768. const m_XK_ohorngrave = 0x1001edd
  2769. const m_XK_ohornhook = 0x1001edf
  2770. const m_XK_ohorntilde = 0x1001ee1
  2771. const m_XK_omacron = 0x03f2
  2772. const m_XK_onehalf = 0x00bd
  2773. const m_XK_onequarter = 0x00bc
  2774. const m_XK_onesubscript = 0x1002081
  2775. const m_XK_onesuperior = 0x00b9
  2776. const m_XK_ooblique = 0x00f8
  2777. const m_XK_ordfeminine = 0x00aa
  2778. const m_XK_oslash = 0x00f8
  2779. const m_XK_otilde = 0x00f5
  2780. const m_XK_overline = 0x047e
  2781. const m_XK_p = 0x0070
  2782. const m_XK_pabovedot = 0x1001e57
  2783. const m_XK_paragraph = 0x00b6
  2784. const m_XK_parenleft = 0x0028
  2785. const m_XK_parenright = 0x0029
  2786. const m_XK_partdifferential = 0x1002202
  2787. const m_XK_percent = 0x0025
  2788. const m_XK_period = 0x002e
  2789. const m_XK_periodcentered = 0x00b7
  2790. const m_XK_plus = 0x002b
  2791. const m_XK_plusminus = 0x00b1
  2792. const m_XK_prolongedsound = 0x04b0
  2793. const m_XK_q = 0x0071
  2794. const m_XK_question = 0x003f
  2795. const m_XK_questiondown = 0x00bf
  2796. const m_XK_quotedbl = 0x0022
  2797. const m_XK_quoteleft = 0x0060
  2798. const m_XK_quoteright = 0x0027
  2799. const m_XK_r = 0x0072
  2800. const m_XK_racute = 0x01e0
  2801. const m_XK_rcaron = 0x01f8
  2802. const m_XK_rcedilla = 0x03b3
  2803. const m_XK_registered = 0x00ae
  2804. const m_XK_s = 0x0073
  2805. const m_XK_sabovedot = 0x1001e61
  2806. const m_XK_sacute = 0x01b6
  2807. const m_XK_scaron = 0x01b9
  2808. const m_XK_scedilla = 0x01ba
  2809. const m_XK_schwa = 0x1000259
  2810. const m_XK_scircumflex = 0x02fe
  2811. const m_XK_script_switch = 0xff7e
  2812. const m_XK_section = 0x00a7
  2813. const m_XK_semicolon = 0x003b
  2814. const m_XK_semivoicedsound = 0x04df
  2815. const m_XK_sevensubscript = 0x1002087
  2816. const m_XK_sevensuperior = 0x1002077
  2817. const m_XK_sixsubscript = 0x1002086
  2818. const m_XK_sixsuperior = 0x1002076
  2819. const m_XK_slash = 0x002f
  2820. const m_XK_space = 0x0020
  2821. const m_XK_squareroot = 0x100221A
  2822. const m_XK_ssharp = 0x00df
  2823. const m_XK_sterling = 0x00a3
  2824. const m_XK_stricteq = 0x1002263
  2825. const m_XK_t = 0x0074
  2826. const m_XK_tabovedot = 0x1001e6b
  2827. const m_XK_tcaron = 0x01bb
  2828. const m_XK_tcedilla = 0x01fe
  2829. const m_XK_thorn = 0x00fe
  2830. const m_XK_threequarters = 0x00be
  2831. const m_XK_threesubscript = 0x1002083
  2832. const m_XK_threesuperior = 0x00b3
  2833. const m_XK_tintegral = 0x100222D
  2834. const m_XK_tslash = 0x03bc
  2835. const m_XK_twosubscript = 0x1002082
  2836. const m_XK_twosuperior = 0x00b2
  2837. const m_XK_u = 0x0075
  2838. const m_XK_uacute = 0x00fa
  2839. const m_XK_ubelowdot = 0x1001ee5
  2840. const m_XK_ubreve = 0x02fd
  2841. const m_XK_ucircumflex = 0x00fb
  2842. const m_XK_udiaeresis = 0x00fc
  2843. const m_XK_udoubleacute = 0x01fb
  2844. const m_XK_ugrave = 0x00f9
  2845. const m_XK_uhook = 0x1001ee7
  2846. const m_XK_uhorn = 0x10001b0
  2847. const m_XK_uhornacute = 0x1001ee9
  2848. const m_XK_uhornbelowdot = 0x1001ef1
  2849. const m_XK_uhorngrave = 0x1001eeb
  2850. const m_XK_uhornhook = 0x1001eed
  2851. const m_XK_uhorntilde = 0x1001eef
  2852. const m_XK_umacron = 0x03fe
  2853. const m_XK_underscore = 0x005f
  2854. const m_XK_uogonek = 0x03f9
  2855. const m_XK_uring = 0x01f9
  2856. const m_XK_utilde = 0x03fd
  2857. const m_XK_v = 0x0076
  2858. const m_XK_voicedsound = 0x04de
  2859. const m_XK_w = 0x0077
  2860. const m_XK_wacute = 0x1001e83
  2861. const m_XK_wcircumflex = 0x1000175
  2862. const m_XK_wdiaeresis = 0x1001e85
  2863. const m_XK_wgrave = 0x1001e81
  2864. const m_XK_x = 0x0078
  2865. const m_XK_xabovedot = 0x1001e8b
  2866. const m_XK_y = 0x0079
  2867. const m_XK_yacute = 0x00fd
  2868. const m_XK_ybelowdot = 0x1001ef5
  2869. const m_XK_ycircumflex = 0x1000177
  2870. const m_XK_ydiaeresis = 0x00ff
  2871. const m_XK_yen = 0x00a5
  2872. const m_XK_ygrave = 0x1001ef3
  2873. const m_XK_yhook = 0x1001ef7
  2874. const m_XK_ytilde = 0x1001ef9
  2875. const m_XK_z = 0x007a
  2876. const m_XK_zabovedot = 0x01bf
  2877. const m_XK_zacute = 0x01bc
  2878. const m_XK_zcaron = 0x01be
  2879. const m_XK_zerosubscript = 0x1002080
  2880. const m_XK_zerosuperior = 0x1002070
  2881. const m_XK_zstroke = 0x10001b6
  2882. const m_XLookupBoth = 4
  2883. const m_XLookupChars = 2
  2884. const m_XLookupKeySym = 3
  2885. const m_XLookupNone = 1
  2886. const m_XMD_H = 1
  2887. const m_XNArea = "area"
  2888. const m_XNAreaNeeded = "areaNeeded"
  2889. const m_XNBackground = "background"
  2890. const m_XNBackgroundPixmap = "backgroundPixmap"
  2891. const m_XNBaseFontName = "baseFontName"
  2892. const m_XNClientWindow = "clientWindow"
  2893. const m_XNColormap = "colorMap"
  2894. const m_XNContextualDrawing = "contextualDrawing"
  2895. const m_XNCursor = "cursor"
  2896. const m_XNDefaultString = "defaultString"
  2897. const m_XNDestroyCallback = "destroyCallback"
  2898. const m_XNDirectionalDependentDrawing = "directionalDependentDrawing"
  2899. const m_XNFilterEvents = "filterEvents"
  2900. const m_XNFocusWindow = "focusWindow"
  2901. const m_XNFontInfo = "fontInfo"
  2902. const m_XNFontSet = "fontSet"
  2903. const m_XNForeground = "foreground"
  2904. const m_XNGeometryCallback = "geometryCallback"
  2905. const m_XNHotKey = "hotKey"
  2906. const m_XNHotKeyState = "hotKeyState"
  2907. const m_XNInputStyle = "inputStyle"
  2908. const m_XNLineSpace = "lineSpace"
  2909. const m_XNMissingCharSet = "missingCharSet"
  2910. const m_XNOMAutomatic = "omAutomatic"
  2911. const m_XNOrientation = "orientation"
  2912. const m_XNPreeditAttributes = "preeditAttributes"
  2913. const m_XNPreeditCaretCallback = "preeditCaretCallback"
  2914. const m_XNPreeditDoneCallback = "preeditDoneCallback"
  2915. const m_XNPreeditDrawCallback = "preeditDrawCallback"
  2916. const m_XNPreeditStartCallback = "preeditStartCallback"
  2917. const m_XNPreeditState = "preeditState"
  2918. const m_XNPreeditStateNotifyCallback = "preeditStateNotifyCallback"
  2919. const m_XNQueryICValuesList = "queryICValuesList"
  2920. const m_XNQueryIMValuesList = "queryIMValuesList"
  2921. const m_XNQueryInputStyle = "queryInputStyle"
  2922. const m_XNQueryOrientation = "queryOrientation"
  2923. const m_XNR6PreeditCallback = "r6PreeditCallback"
  2924. const m_XNRequiredCharSet = "requiredCharSet"
  2925. const m_XNResetState = "resetState"
  2926. const m_XNResourceClass = "resourceClass"
  2927. const m_XNResourceName = "resourceName"
  2928. const m_XNSeparatorofNestedList = "separatorofNestedList"
  2929. const m_XNSpotLocation = "spotLocation"
  2930. const m_XNStatusAttributes = "statusAttributes"
  2931. const m_XNStatusDoneCallback = "statusDoneCallback"
  2932. const m_XNStatusDrawCallback = "statusDrawCallback"
  2933. const m_XNStatusStartCallback = "statusStartCallback"
  2934. const m_XNStdColormap = "stdColorMap"
  2935. const m_XNStringConversion = "stringConversion"
  2936. const m_XNStringConversionCallback = "stringConversionCallback"
  2937. const m_XNVaNestedList = "XNVaNestedList"
  2938. const m_XNVisiblePosition = "visiblePosition"
  2939. const m_XNegative = 0x0010
  2940. const m_XTHREADS = 1
  2941. const m_XUSE_MTSAFE_API = 1
  2942. const m_XValue = 0x0001
  2943. const m_XYBitmap = 0
  2944. const m_XYPixmap = 1
  2945. const m_X_AllocColor = 84
  2946. const m_X_AllocColorCells = 86
  2947. const m_X_AllocColorPlanes = 87
  2948. const m_X_AllocNamedColor = 85
  2949. const m_X_AllowEvents = 35
  2950. const m_X_Bell = 104
  2951. const m_X_ChangeActivePointerGrab = 30
  2952. const m_X_ChangeGC = 56
  2953. const m_X_ChangeHosts = 109
  2954. const m_X_ChangeKeyboardControl = 102
  2955. const m_X_ChangeKeyboardMapping = 100
  2956. const m_X_ChangePointerControl = 105
  2957. const m_X_ChangeProperty = 18
  2958. const m_X_ChangeSaveSet = 6
  2959. const m_X_ChangeWindowAttributes = 2
  2960. const m_X_CirculateWindow = 13
  2961. const m_X_ClearArea = 61
  2962. const m_X_CloseFont = 46
  2963. const m_X_ConfigureWindow = 12
  2964. const m_X_ConvertSelection = 24
  2965. const m_X_CopyArea = 62
  2966. const m_X_CopyColormapAndFree = 80
  2967. const m_X_CopyGC = 57
  2968. const m_X_CopyPlane = 63
  2969. const m_X_CreateColormap = 78
  2970. const m_X_CreateCursor = 93
  2971. const m_X_CreateGC = 55
  2972. const m_X_CreateGlyphCursor = 94
  2973. const m_X_CreatePixmap = 53
  2974. const m_X_CreateWindow = 1
  2975. const m_X_DeleteProperty = 19
  2976. const m_X_DestroySubwindows = 5
  2977. const m_X_DestroyWindow = 4
  2978. const m_X_Error = 0
  2979. const m_X_FillPoly = 69
  2980. const m_X_ForceScreenSaver = 115
  2981. const m_X_FreeColormap = 79
  2982. const m_X_FreeColors = 88
  2983. const m_X_FreeCursor = 95
  2984. const m_X_FreeGC = 60
  2985. const m_X_FreePixmap = 54
  2986. const m_X_GetAtomName = 17
  2987. const m_X_GetFontPath = 52
  2988. const m_X_GetGeometry = 14
  2989. const m_X_GetImage = 73
  2990. const m_X_GetInputFocus = 43
  2991. const m_X_GetKeyboardControl = 103
  2992. const m_X_GetKeyboardMapping = 101
  2993. const m_X_GetModifierMapping = 119
  2994. const m_X_GetMotionEvents = 39
  2995. const m_X_GetPointerControl = 106
  2996. const m_X_GetPointerMapping = 117
  2997. const m_X_GetProperty = 20
  2998. const m_X_GetScreenSaver = 108
  2999. const m_X_GetSelectionOwner = 23
  3000. const m_X_GetWindowAttributes = 3
  3001. const m_X_GrabButton = 28
  3002. const m_X_GrabKey = 33
  3003. const m_X_GrabKeyboard = 31
  3004. const m_X_GrabPointer = 26
  3005. const m_X_GrabServer = 36
  3006. const m_X_HAVE_UTF8_STRING = 1
  3007. const m_X_ImageText16 = 77
  3008. const m_X_ImageText8 = 76
  3009. const m_X_InstallColormap = 81
  3010. const m_X_InternAtom = 16
  3011. const m_X_KillClient = 113
  3012. const m_X_ListExtensions = 99
  3013. const m_X_ListFonts = 49
  3014. const m_X_ListFontsWithInfo = 50
  3015. const m_X_ListHosts = 110
  3016. const m_X_ListInstalledColormaps = 83
  3017. const m_X_ListProperties = 21
  3018. const m_X_LookupColor = 92
  3019. const m_X_MapSubwindows = 9
  3020. const m_X_MapWindow = 8
  3021. const m_X_NoOperation = 127
  3022. const m_X_OpenFont = 45
  3023. const m_X_PROTOCOL = 11
  3024. const m_X_PROTOCOL_REVISION = 0
  3025. const m_X_PolyArc = 68
  3026. const m_X_PolyFillArc = 71
  3027. const m_X_PolyFillRectangle = 70
  3028. const m_X_PolyLine = 65
  3029. const m_X_PolyPoint = 64
  3030. const m_X_PolyRectangle = 67
  3031. const m_X_PolySegment = 66
  3032. const m_X_PolyText16 = 75
  3033. const m_X_PolyText8 = 74
  3034. const m_X_PutImage = 72
  3035. const m_X_QueryBestSize = 97
  3036. const m_X_QueryColors = 91
  3037. const m_X_QueryExtension = 98
  3038. const m_X_QueryFont = 47
  3039. const m_X_QueryKeymap = 44
  3040. const m_X_QueryPointer = 38
  3041. const m_X_QueryTextExtents = 48
  3042. const m_X_QueryTree = 15
  3043. const m_X_RecolorCursor = 96
  3044. const m_X_RenderAddGlyphs = 20
  3045. const m_X_RenderAddGlyphsFromPicture = 21
  3046. const m_X_RenderAddTraps = 32
  3047. const m_X_RenderChangePicture = 5
  3048. const m_X_RenderColorTrapezoids = 14
  3049. const m_X_RenderColorTriangles = 15
  3050. const m_X_RenderComposite = 8
  3051. const m_X_RenderCompositeGlyphs16 = 24
  3052. const m_X_RenderCompositeGlyphs32 = 25
  3053. const m_X_RenderCompositeGlyphs8 = 23
  3054. const m_X_RenderCreateAnimCursor = 31
  3055. const m_X_RenderCreateConicalGradient = 36
  3056. const m_X_RenderCreateCursor = 27
  3057. const m_X_RenderCreateGlyphSet = 17
  3058. const m_X_RenderCreateLinearGradient = 34
  3059. const m_X_RenderCreatePicture = 4
  3060. const m_X_RenderCreateRadialGradient = 35
  3061. const m_X_RenderCreateSolidFill = 33
  3062. const m_X_RenderFillRectangles = 26
  3063. const m_X_RenderFreeGlyphSet = 19
  3064. const m_X_RenderFreeGlyphs = 22
  3065. const m_X_RenderFreePicture = 7
  3066. const m_X_RenderQueryDithers = 3
  3067. const m_X_RenderQueryFilters = 29
  3068. const m_X_RenderQueryPictFormats = 1
  3069. const m_X_RenderQueryPictIndexValues = 2
  3070. const m_X_RenderQueryVersion = 0
  3071. const m_X_RenderReferenceGlyphSet = 18
  3072. const m_X_RenderScale = 9
  3073. const m_X_RenderSetPictureClipRectangles = 6
  3074. const m_X_RenderSetPictureFilter = 30
  3075. const m_X_RenderSetPictureTransform = 28
  3076. const m_X_RenderTrapezoids = 10
  3077. const m_X_RenderTriFan = 13
  3078. const m_X_RenderTriStrip = 12
  3079. const m_X_RenderTriangles = 11
  3080. const m_X_ReparentWindow = 7
  3081. const m_X_Reply = 1
  3082. const m_X_RotateProperties = 114
  3083. const m_X_SendEvent = 25
  3084. const m_X_SetAccessControl = 111
  3085. const m_X_SetClipRectangles = 59
  3086. const m_X_SetCloseDownMode = 112
  3087. const m_X_SetDashes = 58
  3088. const m_X_SetFontPath = 51
  3089. const m_X_SetInputFocus = 42
  3090. const m_X_SetModifierMapping = 118
  3091. const m_X_SetPointerMapping = 116
  3092. const m_X_SetScreenSaver = 107
  3093. const m_X_SetSelectionOwner = 22
  3094. const m_X_StoreColors = 89
  3095. const m_X_StoreNamedColor = 90
  3096. const m_X_TCP_PORT = 6000
  3097. const m_X_TranslateCoords = 40
  3098. const m_X_UngrabButton = 29
  3099. const m_X_UngrabKey = 34
  3100. const m_X_UngrabKeyboard = 32
  3101. const m_X_UngrabPointer = 27
  3102. const m_X_UngrabServer = 37
  3103. const m_X_UninstallColormap = 82
  3104. const m_X_UnmapSubwindows = 11
  3105. const m_X_UnmapWindow = 10
  3106. const m_X_WarpPointer = 41
  3107. const m_XftVersion = "XFT_VERSION"
  3108. const m_XlibSpecificationRelease = 6
  3109. const m_YNegative = 0x0020
  3110. const m_YSorted = 1
  3111. const m_YValue = 0x0002
  3112. const m_YXBanded = 3
  3113. const m_YXSorted = 2
  3114. const m_ZLNSPERBATCH = 1024
  3115. const m_ZPixmap = 2
  3116. const m_ZRCTSPERBATCH = 256
  3117. const m_ZoomState = 2
  3118. const m__GNU_SOURCE = 1
  3119. const m__IOFBF = 0
  3120. const m__IOLBF = 1
  3121. const m__IONBF = 2
  3122. const m__LP64 = 1
  3123. const m__POSIX2_BC_BASE_MAX = 99
  3124. const m__POSIX2_BC_DIM_MAX = 2048
  3125. const m__POSIX2_BC_SCALE_MAX = 99
  3126. const m__POSIX2_BC_STRING_MAX = 1000
  3127. const m__POSIX2_CHARCLASS_NAME_MAX = 14
  3128. const m__POSIX2_COLL_WEIGHTS_MAX = 2
  3129. const m__POSIX2_EXPR_NEST_MAX = 32
  3130. const m__POSIX2_LINE_MAX = 2048
  3131. const m__POSIX2_RE_DUP_MAX = 255
  3132. const m__POSIX_AIO_LISTIO_MAX = 2
  3133. const m__POSIX_AIO_MAX = 1
  3134. const m__POSIX_ARG_MAX = 4096
  3135. const m__POSIX_CHILD_MAX = 25
  3136. const m__POSIX_CLOCKRES_MIN = 20000000
  3137. const m__POSIX_DELAYTIMER_MAX = 32
  3138. const m__POSIX_HOST_NAME_MAX = 255
  3139. const m__POSIX_LINK_MAX = 8
  3140. const m__POSIX_LOGIN_NAME_MAX = 9
  3141. const m__POSIX_MAX_CANON = 255
  3142. const m__POSIX_MAX_INPUT = 255
  3143. const m__POSIX_MQ_OPEN_MAX = 8
  3144. const m__POSIX_MQ_PRIO_MAX = 32
  3145. const m__POSIX_NAME_MAX = 14
  3146. const m__POSIX_NGROUPS_MAX = 8
  3147. const m__POSIX_OPEN_MAX = 20
  3148. const m__POSIX_PATH_MAX = 256
  3149. const m__POSIX_PIPE_BUF = 512
  3150. const m__POSIX_RE_DUP_MAX = 255
  3151. const m__POSIX_RTSIG_MAX = 8
  3152. const m__POSIX_SEM_NSEMS_MAX = 256
  3153. const m__POSIX_SEM_VALUE_MAX = 32767
  3154. const m__POSIX_SIGQUEUE_MAX = 32
  3155. const m__POSIX_SSIZE_MAX = 32767
  3156. const m__POSIX_SS_REPL_MAX = 4
  3157. const m__POSIX_STREAM_MAX = 8
  3158. const m__POSIX_SYMLINK_MAX = 255
  3159. const m__POSIX_SYMLOOP_MAX = 8
  3160. const m__POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4
  3161. const m__POSIX_THREAD_KEYS_MAX = 128
  3162. const m__POSIX_THREAD_THREADS_MAX = 64
  3163. const m__POSIX_TIMER_MAX = 32
  3164. const m__POSIX_TRACE_EVENT_NAME_MAX = 30
  3165. const m__POSIX_TRACE_NAME_MAX = 8
  3166. const m__POSIX_TRACE_SYS_MAX = 8
  3167. const m__POSIX_TRACE_USER_EVENT_MAX = 32
  3168. const m__POSIX_TTY_NAME_MAX = 9
  3169. const m__POSIX_TZNAME_MAX = 6
  3170. const m__STDC_PREDEF_H = 1
  3171. const m__X11_XLIBINT_H_ = 1
  3172. const m__XBCOPYFUNC = "_Xbcopy"
  3173. const m__XOPEN_IOV_MAX = 16
  3174. const m__XOPEN_NAME_MAX = 255
  3175. const m__XOPEN_PATH_MAX = 1024
  3176. const m__X_INLINE = "inline"
  3177. const m__X_RESTRICT_KYWD = "restrict"
  3178. const m__Xconst = "const"
  3179. const m___ARCH__ = 9
  3180. const m___ATOMIC_ACQUIRE = 2
  3181. const m___ATOMIC_ACQ_REL = 4
  3182. const m___ATOMIC_CONSUME = 1
  3183. const m___ATOMIC_RELAXED = 0
  3184. const m___ATOMIC_RELEASE = 3
  3185. const m___ATOMIC_SEQ_CST = 5
  3186. const m___BIGGEST_ALIGNMENT__ = 8
  3187. const m___BIG_ENDIAN = 4321
  3188. const m___BYTE_ORDER = 4321
  3189. const m___BYTE_ORDER__ = "__ORDER_BIG_ENDIAN__"
  3190. const m___CCGO__ = 1
  3191. const m___CHAR_BIT__ = 8
  3192. const m___CHAR_UNSIGNED__ = 1
  3193. const m___DBL_DECIMAL_DIG__ = 17
  3194. const m___DBL_DIG__ = 15
  3195. const m___DBL_HAS_DENORM__ = 1
  3196. const m___DBL_HAS_INFINITY__ = 1
  3197. const m___DBL_HAS_QUIET_NAN__ = 1
  3198. const m___DBL_MANT_DIG__ = 53
  3199. const m___DBL_MAX_10_EXP__ = 308
  3200. const m___DBL_MAX_EXP__ = 1024
  3201. const m___DEC128_EPSILON__ = 1e-33
  3202. const m___DEC128_MANT_DIG__ = 34
  3203. const m___DEC128_MAX_EXP__ = 6145
  3204. const m___DEC128_MAX__ = "9.999999999999999999999999999999999E6144"
  3205. const m___DEC128_MIN__ = 1e-6143
  3206. const m___DEC128_SUBNORMAL_MIN__ = 0.000000000000000000000000000000001e-6143
  3207. const m___DEC32_EPSILON__ = 1e-6
  3208. const m___DEC32_MANT_DIG__ = 7
  3209. const m___DEC32_MAX_EXP__ = 97
  3210. const m___DEC32_MAX__ = 9.999999e96
  3211. const m___DEC32_MIN__ = 1e-95
  3212. const m___DEC32_SUBNORMAL_MIN__ = 0.000001e-95
  3213. const m___DEC64_EPSILON__ = 1e-15
  3214. const m___DEC64_MANT_DIG__ = 16
  3215. const m___DEC64_MAX_EXP__ = 385
  3216. const m___DEC64_MAX__ = "9.999999999999999E384"
  3217. const m___DEC64_MIN__ = 1e-383
  3218. const m___DEC64_SUBNORMAL_MIN__ = 0.000000000000001e-383
  3219. const m___DECIMAL_DIG__ = 17
  3220. const m___DEC_EVAL_METHOD__ = 2
  3221. const m___ELF__ = 1
  3222. const m___FINITE_MATH_ONLY__ = 0
  3223. const m___FLOAT_WORD_ORDER__ = "__ORDER_BIG_ENDIAN__"
  3224. const m___FLT32X_DECIMAL_DIG__ = 17
  3225. const m___FLT32X_DENORM_MIN__ = 4.9406564584124654e-324
  3226. const m___FLT32X_DIG__ = 15
  3227. const m___FLT32X_EPSILON__ = 2.2204460492503131e-16
  3228. const m___FLT32X_HAS_DENORM__ = 1
  3229. const m___FLT32X_HAS_INFINITY__ = 1
  3230. const m___FLT32X_HAS_QUIET_NAN__ = 1
  3231. const m___FLT32X_MANT_DIG__ = 53
  3232. const m___FLT32X_MAX_10_EXP__ = 308
  3233. const m___FLT32X_MAX_EXP__ = 1024
  3234. const m___FLT32X_MAX__ = 1.7976931348623157e+308
  3235. const m___FLT32X_MIN__ = 2.2250738585072014e-308
  3236. const m___FLT32X_NORM_MAX__ = 1.7976931348623157e+308
  3237. const m___FLT32_DECIMAL_DIG__ = 9
  3238. const m___FLT32_DENORM_MIN__ = 1.4012984643248171e-45
  3239. const m___FLT32_DIG__ = 6
  3240. const m___FLT32_EPSILON__ = 1.1920928955078125e-7
  3241. const m___FLT32_HAS_DENORM__ = 1
  3242. const m___FLT32_HAS_INFINITY__ = 1
  3243. const m___FLT32_HAS_QUIET_NAN__ = 1
  3244. const m___FLT32_MANT_DIG__ = 24
  3245. const m___FLT32_MAX_10_EXP__ = 38
  3246. const m___FLT32_MAX_EXP__ = 128
  3247. const m___FLT32_MAX__ = 3.4028234663852886e+38
  3248. const m___FLT32_MIN__ = 1.1754943508222875e-38
  3249. const m___FLT32_NORM_MAX__ = 3.4028234663852886e+38
  3250. const m___FLT64_DECIMAL_DIG__ = 17
  3251. const m___FLT64_DENORM_MIN__ = 4.9406564584124654e-324
  3252. const m___FLT64_DIG__ = 15
  3253. const m___FLT64_EPSILON__ = 2.2204460492503131e-16
  3254. const m___FLT64_HAS_DENORM__ = 1
  3255. const m___FLT64_HAS_INFINITY__ = 1
  3256. const m___FLT64_HAS_QUIET_NAN__ = 1
  3257. const m___FLT64_MANT_DIG__ = 53
  3258. const m___FLT64_MAX_10_EXP__ = 308
  3259. const m___FLT64_MAX_EXP__ = 1024
  3260. const m___FLT64_MAX__ = 1.7976931348623157e+308
  3261. const m___FLT64_MIN__ = 2.2250738585072014e-308
  3262. const m___FLT64_NORM_MAX__ = 1.7976931348623157e+308
  3263. const m___FLT_DECIMAL_DIG__ = 9
  3264. const m___FLT_DENORM_MIN__ = 1.4012984643248171e-45
  3265. const m___FLT_DIG__ = 6
  3266. const m___FLT_EPSILON__ = 1.1920928955078125e-7
  3267. const m___FLT_EVAL_METHOD_TS_18661_3__ = 0
  3268. const m___FLT_EVAL_METHOD__ = 0
  3269. const m___FLT_HAS_DENORM__ = 1
  3270. const m___FLT_HAS_INFINITY__ = 1
  3271. const m___FLT_HAS_QUIET_NAN__ = 1
  3272. const m___FLT_MANT_DIG__ = 24
  3273. const m___FLT_MAX_10_EXP__ = 38
  3274. const m___FLT_MAX_EXP__ = 128
  3275. const m___FLT_MAX__ = 3.4028234663852886e+38
  3276. const m___FLT_MIN__ = 1.1754943508222875e-38
  3277. const m___FLT_NORM_MAX__ = 3.4028234663852886e+38
  3278. const m___FLT_RADIX__ = 2
  3279. const m___FP_FAST_FMA = 1
  3280. const m___FP_FAST_FMAF = 1
  3281. const m___FP_FAST_FMAF32 = 1
  3282. const m___FP_FAST_FMAF32x = 1
  3283. const m___FP_FAST_FMAF64 = 1
  3284. const m___FP_FAST_FMAL = 1
  3285. const m___FUNCTION__ = "__func__"
  3286. const m___GCC_ATOMIC_BOOL_LOCK_FREE = 2
  3287. const m___GCC_ATOMIC_CHAR16_T_LOCK_FREE = 2
  3288. const m___GCC_ATOMIC_CHAR32_T_LOCK_FREE = 2
  3289. const m___GCC_ATOMIC_CHAR_LOCK_FREE = 2
  3290. const m___GCC_ATOMIC_INT_LOCK_FREE = 2
  3291. const m___GCC_ATOMIC_LLONG_LOCK_FREE = 2
  3292. const m___GCC_ATOMIC_LONG_LOCK_FREE = 2
  3293. const m___GCC_ATOMIC_POINTER_LOCK_FREE = 2
  3294. const m___GCC_ATOMIC_SHORT_LOCK_FREE = 2
  3295. const m___GCC_ATOMIC_TEST_AND_SET_TRUEVAL = 1
  3296. const m___GCC_ATOMIC_WCHAR_T_LOCK_FREE = 2
  3297. const m___GCC_HAVE_DWARF2_CFI_ASM = 1
  3298. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 = 1
  3299. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 = 1
  3300. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 = 1
  3301. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 = 1
  3302. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 = 1
  3303. const m___GCC_IEC_559 = 2
  3304. const m___GCC_IEC_559_COMPLEX = 2
  3305. const m___GNUC_MINOR__ = 2
  3306. const m___GNUC_PATCHLEVEL__ = 1
  3307. const m___GNUC_STDC_INLINE__ = 1
  3308. const m___GNUC__ = 10
  3309. const m___GXX_ABI_VERSION = 1014
  3310. const m___HAVE_SPECULATION_SAFE_VALUE = 1
  3311. const m___INT16_MAX__ = 0x7fff
  3312. const m___INT32_MAX__ = 0x7fffffff
  3313. const m___INT32_TYPE__ = "int"
  3314. const m___INT64_MAX__ = 0x7fffffffffffffff
  3315. const m___INT8_MAX__ = 0x7f
  3316. const m___INTMAX_MAX__ = 0x7fffffffffffffff
  3317. const m___INTMAX_WIDTH__ = 64
  3318. const m___INTPTR_MAX__ = 0x7fffffffffffffff
  3319. const m___INTPTR_WIDTH__ = 64
  3320. const m___INT_FAST16_MAX__ = 0x7fffffffffffffff
  3321. const m___INT_FAST16_WIDTH__ = 64
  3322. const m___INT_FAST32_MAX__ = 0x7fffffffffffffff
  3323. const m___INT_FAST32_WIDTH__ = 64
  3324. const m___INT_FAST64_MAX__ = 0x7fffffffffffffff
  3325. const m___INT_FAST64_WIDTH__ = 64
  3326. const m___INT_FAST8_MAX__ = 0x7f
  3327. const m___INT_FAST8_WIDTH__ = 8
  3328. const m___INT_LEAST16_MAX__ = 0x7fff
  3329. const m___INT_LEAST16_WIDTH__ = 16
  3330. const m___INT_LEAST32_MAX__ = 0x7fffffff
  3331. const m___INT_LEAST32_TYPE__ = "int"
  3332. const m___INT_LEAST32_WIDTH__ = 32
  3333. const m___INT_LEAST64_MAX__ = 0x7fffffffffffffff
  3334. const m___INT_LEAST64_WIDTH__ = 64
  3335. const m___INT_LEAST8_MAX__ = 0x7f
  3336. const m___INT_LEAST8_WIDTH__ = 8
  3337. const m___INT_MAX__ = 0x7fffffff
  3338. const m___INT_WIDTH__ = 32
  3339. const m___LDBL_DECIMAL_DIG__ = 17
  3340. const m___LDBL_DENORM_MIN__ = 4.9406564584124654e-324
  3341. const m___LDBL_DIG__ = 15
  3342. const m___LDBL_EPSILON__ = 2.2204460492503131e-16
  3343. const m___LDBL_HAS_DENORM__ = 1
  3344. const m___LDBL_HAS_INFINITY__ = 1
  3345. const m___LDBL_HAS_QUIET_NAN__ = 1
  3346. const m___LDBL_MANT_DIG__ = 53
  3347. const m___LDBL_MAX_10_EXP__ = 308
  3348. const m___LDBL_MAX_EXP__ = 1024
  3349. const m___LDBL_MAX__ = 1.7976931348623157e+308
  3350. const m___LDBL_MIN__ = 2.2250738585072014e-308
  3351. const m___LDBL_NORM_MAX__ = 1.7976931348623157e+308
  3352. const m___LITTLE_ENDIAN = 1234
  3353. const m___LONG_LONG_MAX__ = 0x7fffffffffffffff
  3354. const m___LONG_LONG_WIDTH__ = 64
  3355. const m___LONG_MAX = 0x7fffffffffffffff
  3356. const m___LONG_MAX__ = 0x7fffffffffffffff
  3357. const m___LONG_WIDTH__ = 64
  3358. const m___LP64__ = 1
  3359. const m___NO_INLINE__ = 1
  3360. const m___ORDER_BIG_ENDIAN__ = 4321
  3361. const m___ORDER_LITTLE_ENDIAN__ = 1234
  3362. const m___ORDER_PDP_ENDIAN__ = 3412
  3363. const m___PDP_ENDIAN = 3412
  3364. const m___PIC__ = 2
  3365. const m___PIE__ = 2
  3366. const m___PRAGMA_REDEFINE_EXTNAME = 1
  3367. const m___PRETTY_FUNCTION__ = "__func__"
  3368. const m___PTRDIFF_MAX__ = 0x7fffffffffffffff
  3369. const m___PTRDIFF_WIDTH__ = 64
  3370. const m___SCHAR_MAX__ = 0x7f
  3371. const m___SCHAR_WIDTH__ = 8
  3372. const m___SHRT_MAX__ = 0x7fff
  3373. const m___SHRT_WIDTH__ = 16
  3374. const m___SIG_ATOMIC_MAX__ = 0x7fffffff
  3375. const m___SIG_ATOMIC_TYPE__ = "int"
  3376. const m___SIG_ATOMIC_WIDTH__ = 32
  3377. const m___SIZEOF_DOUBLE__ = 8
  3378. const m___SIZEOF_FLOAT__ = 4
  3379. const m___SIZEOF_INT128__ = 16
  3380. const m___SIZEOF_INT__ = 4
  3381. const m___SIZEOF_LONG_DOUBLE__ = 8
  3382. const m___SIZEOF_LONG_LONG__ = 8
  3383. const m___SIZEOF_LONG__ = 8
  3384. const m___SIZEOF_POINTER__ = 8
  3385. const m___SIZEOF_PTRDIFF_T__ = 8
  3386. const m___SIZEOF_SHORT__ = 2
  3387. const m___SIZEOF_SIZE_T__ = 8
  3388. const m___SIZEOF_WCHAR_T__ = 4
  3389. const m___SIZEOF_WINT_T__ = 4
  3390. const m___SIZE_MAX__ = 0xffffffffffffffff
  3391. const m___SIZE_WIDTH__ = 64
  3392. const m___STDC_HOSTED__ = 1
  3393. const m___STDC_IEC_559_COMPLEX__ = 1
  3394. const m___STDC_IEC_559__ = 1
  3395. const m___STDC_ISO_10646__ = 201706
  3396. const m___STDC_UTF_16__ = 1
  3397. const m___STDC_UTF_32__ = 1
  3398. const m___STDC_VERSION__ = 201710
  3399. const m___STDC__ = 1
  3400. const m___UINT16_MAX__ = 0xffff
  3401. const m___UINT32_MAX__ = 0xffffffff
  3402. const m___UINT64_MAX__ = 0xffffffffffffffff
  3403. const m___UINT8_MAX__ = 0xff
  3404. const m___UINTMAX_MAX__ = 0xffffffffffffffff
  3405. const m___UINTPTR_MAX__ = 0xffffffffffffffff
  3406. const m___UINT_FAST16_MAX__ = 0xffffffffffffffff
  3407. const m___UINT_FAST32_MAX__ = 0xffffffffffffffff
  3408. const m___UINT_FAST64_MAX__ = 0xffffffffffffffff
  3409. const m___UINT_FAST8_MAX__ = 0xff
  3410. const m___UINT_LEAST16_MAX__ = 0xffff
  3411. const m___UINT_LEAST32_MAX__ = 0xffffffff
  3412. const m___UINT_LEAST64_MAX__ = 0xffffffffffffffff
  3413. const m___UINT_LEAST8_MAX__ = 0xff
  3414. const m___USE_TIME_BITS64 = 1
  3415. const m___VERSION__ = "10.2.1 20210110"
  3416. const m___WCHAR_MAX__ = 0x7fffffff
  3417. const m___WCHAR_TYPE__ = "int"
  3418. const m___WCHAR_WIDTH__ = 32
  3419. const m___WINT_MAX__ = 0xffffffff
  3420. const m___WINT_MIN__ = 0
  3421. const m___WINT_WIDTH__ = 32
  3422. const m___gnu_linux__ = 1
  3423. const m___inline = "inline"
  3424. const m___linux = 1
  3425. const m___linux__ = 1
  3426. const m___pic__ = 2
  3427. const m___pie__ = 2
  3428. const m___restrict = "restrict"
  3429. const m___restrict_arr = "restrict"
  3430. const m___s390__ = 1
  3431. const m___s390x__ = 1
  3432. const m___unix = 1
  3433. const m___unix__ = 1
  3434. const m___zarch__ = 1
  3435. const m_alloca = "__builtin_alloca"
  3436. const m_ft_encoding_adobe_custom = "FT_ENCODING_ADOBE_CUSTOM"
  3437. const m_ft_encoding_adobe_expert = "FT_ENCODING_ADOBE_EXPERT"
  3438. const m_ft_encoding_adobe_standard = "FT_ENCODING_ADOBE_STANDARD"
  3439. const m_ft_encoding_apple_roman = "FT_ENCODING_APPLE_ROMAN"
  3440. const m_ft_encoding_big5 = "FT_ENCODING_BIG5"
  3441. const m_ft_encoding_gb2312 = "FT_ENCODING_PRC"
  3442. const m_ft_encoding_johab = "FT_ENCODING_JOHAB"
  3443. const m_ft_encoding_latin_1 = "FT_ENCODING_ADOBE_LATIN_1"
  3444. const m_ft_encoding_latin_2 = "FT_ENCODING_OLD_LATIN_2"
  3445. const m_ft_encoding_none = "FT_ENCODING_NONE"
  3446. const m_ft_encoding_sjis = "FT_ENCODING_SJIS"
  3447. const m_ft_encoding_symbol = "FT_ENCODING_MS_SYMBOL"
  3448. const m_ft_encoding_unicode = "FT_ENCODING_UNICODE"
  3449. const m_ft_encoding_wansung = "FT_ENCODING_WANSUNG"
  3450. const m_ft_fclose = "fclose"
  3451. const m_ft_fopen = "fopen"
  3452. const m_ft_fread = "fread"
  3453. const m_ft_fseek = "fseek"
  3454. const m_ft_ftell = "ftell"
  3455. const m_ft_getenv = "getenv"
  3456. const m_ft_glyph_format_bitmap = "FT_GLYPH_FORMAT_BITMAP"
  3457. const m_ft_glyph_format_composite = "FT_GLYPH_FORMAT_COMPOSITE"
  3458. const m_ft_glyph_format_none = "FT_GLYPH_FORMAT_NONE"
  3459. const m_ft_glyph_format_outline = "FT_GLYPH_FORMAT_OUTLINE"
  3460. const m_ft_glyph_format_plotter = "FT_GLYPH_FORMAT_PLOTTER"
  3461. const m_ft_jmp_buf = "jmp_buf"
  3462. const m_ft_kerning_default = "FT_KERNING_DEFAULT"
  3463. const m_ft_kerning_unfitted = "FT_KERNING_UNFITTED"
  3464. const m_ft_kerning_unscaled = "FT_KERNING_UNSCALED"
  3465. const m_ft_longjmp = "longjmp"
  3466. const m_ft_memchr = "memchr"
  3467. const m_ft_memcmp = "memcmp"
  3468. const m_ft_memcpy = "memcpy"
  3469. const m_ft_memmove = "memmove"
  3470. const m_ft_memset = "memset"
  3471. const m_ft_open_driver = "FT_OPEN_DRIVER"
  3472. const m_ft_open_memory = "FT_OPEN_MEMORY"
  3473. const m_ft_open_params = "FT_OPEN_PARAMS"
  3474. const m_ft_open_pathname = "FT_OPEN_PATHNAME"
  3475. const m_ft_open_stream = "FT_OPEN_STREAM"
  3476. const m_ft_outline_even_odd_fill = "FT_OUTLINE_EVEN_ODD_FILL"
  3477. const m_ft_outline_high_precision = "FT_OUTLINE_HIGH_PRECISION"
  3478. const m_ft_outline_ignore_dropouts = "FT_OUTLINE_IGNORE_DROPOUTS"
  3479. const m_ft_outline_none = "FT_OUTLINE_NONE"
  3480. const m_ft_outline_owner = "FT_OUTLINE_OWNER"
  3481. const m_ft_outline_reverse_fill = "FT_OUTLINE_REVERSE_FILL"
  3482. const m_ft_outline_single_pass = "FT_OUTLINE_SINGLE_PASS"
  3483. const m_ft_pixel_mode_grays = "FT_PIXEL_MODE_GRAY"
  3484. const m_ft_pixel_mode_mono = "FT_PIXEL_MODE_MONO"
  3485. const m_ft_pixel_mode_none = "FT_PIXEL_MODE_NONE"
  3486. const m_ft_pixel_mode_pal2 = "FT_PIXEL_MODE_GRAY2"
  3487. const m_ft_pixel_mode_pal4 = "FT_PIXEL_MODE_GRAY4"
  3488. const m_ft_ptrdiff_t = "ptrdiff_t"
  3489. const m_ft_qsort = "qsort"
  3490. const m_ft_raster_flag_aa = "FT_RASTER_FLAG_AA"
  3491. const m_ft_raster_flag_clip = "FT_RASTER_FLAG_CLIP"
  3492. const m_ft_raster_flag_default = "FT_RASTER_FLAG_DEFAULT"
  3493. const m_ft_raster_flag_direct = "FT_RASTER_FLAG_DIRECT"
  3494. const m_ft_render_mode_mono = "FT_RENDER_MODE_MONO"
  3495. const m_ft_render_mode_normal = "FT_RENDER_MODE_NORMAL"
  3496. const m_ft_scalloc = "calloc"
  3497. const m_ft_sfree = "free"
  3498. const m_ft_smalloc = "malloc"
  3499. const m_ft_sprintf = "sprintf"
  3500. const m_ft_srealloc = "realloc"
  3501. const m_ft_strcat = "strcat"
  3502. const m_ft_strcmp = "strcmp"
  3503. const m_ft_strcpy = "strcpy"
  3504. const m_ft_strlen = "strlen"
  3505. const m_ft_strncmp = "strncmp"
  3506. const m_ft_strncpy = "strncpy"
  3507. const m_ft_strrchr = "strrchr"
  3508. const m_ft_strstr = "strstr"
  3509. const m_ft_strtol = "strtol"
  3510. const m_linux = 1
  3511. const m_sz_xAllocColorCellsReply = 32
  3512. const m_sz_xAllocColorCellsReq = 12
  3513. const m_sz_xAllocColorPlanesReply = 32
  3514. const m_sz_xAllocColorPlanesReq = 16
  3515. const m_sz_xAllocColorReply = 32
  3516. const m_sz_xAllocColorReq = 16
  3517. const m_sz_xAllocNamedColorReply = 32
  3518. const m_sz_xAllocNamedColorReq = 12
  3519. const m_sz_xAllowEventsReq = 8
  3520. const m_sz_xArc = 12
  3521. const m_sz_xBellReq = 4
  3522. const m_sz_xChangeActivePointerGrabReq = 16
  3523. const m_sz_xChangeGCReq = 12
  3524. const m_sz_xChangeHostsReq = 8
  3525. const m_sz_xChangeKeyboardControlReq = 8
  3526. const m_sz_xChangeKeyboardMappingReq = 8
  3527. const m_sz_xChangeModeReq = 4
  3528. const m_sz_xChangePointerControlReq = 12
  3529. const m_sz_xChangePropertyReq = 24
  3530. const m_sz_xChangeSaveSetReq = 8
  3531. const m_sz_xChangeWindowAttributesReq = 12
  3532. const m_sz_xCharInfo = 12
  3533. const m_sz_xCirculateWindowReq = 8
  3534. const m_sz_xClearAreaReq = 16
  3535. const m_sz_xColorItem = 12
  3536. const m_sz_xConfigureWindowReq = 12
  3537. const m_sz_xConnClientPrefix = 12
  3538. const m_sz_xConnSetup = 32
  3539. const m_sz_xConnSetupPrefix = 8
  3540. const m_sz_xConvertSelectionReq = 24
  3541. const m_sz_xCopyAreaReq = 28
  3542. const m_sz_xCopyColormapAndFreeReq = 12
  3543. const m_sz_xCopyGCReq = 16
  3544. const m_sz_xCopyPlaneReq = 32
  3545. const m_sz_xCreateColormapReq = 16
  3546. const m_sz_xCreateCursorReq = 32
  3547. const m_sz_xCreateGCReq = 16
  3548. const m_sz_xCreateGlyphCursorReq = 32
  3549. const m_sz_xCreatePixmapReq = 16
  3550. const m_sz_xCreateWindowReq = 32
  3551. const m_sz_xDeletePropertyReq = 12
  3552. const m_sz_xDepth = 8
  3553. const m_sz_xError = 32
  3554. const m_sz_xEvent = 32
  3555. const m_sz_xFillPolyReq = 16
  3556. const m_sz_xFontProp = 8
  3557. const m_sz_xForceScreenSaverReq = 4
  3558. const m_sz_xFreeColorsReq = 12
  3559. const m_sz_xGenericReply = 32
  3560. const m_sz_xGetAtomNameReply = 32
  3561. const m_sz_xGetFontPathReply = 32
  3562. const m_sz_xGetGeometryReply = 32
  3563. const m_sz_xGetImageReply = 32
  3564. const m_sz_xGetImageReq = 20
  3565. const m_sz_xGetInputFocusReply = 32
  3566. const m_sz_xGetKeyboardControlReply = 52
  3567. const m_sz_xGetKeyboardMappingReply = 32
  3568. const m_sz_xGetKeyboardMappingReq = 8
  3569. const m_sz_xGetModifierMappingReply = 32
  3570. const m_sz_xGetMotionEventsReply = 32
  3571. const m_sz_xGetMotionEventsReq = 16
  3572. const m_sz_xGetPointerControlReply = 32
  3573. const m_sz_xGetPointerMappingReply = 32
  3574. const m_sz_xGetPropertyReply = 32
  3575. const m_sz_xGetPropertyReq = 24
  3576. const m_sz_xGetScreenSaverReply = 32
  3577. const m_sz_xGetSelectionOwnerReply = 32
  3578. const m_sz_xGetWindowAttributesReply = 44
  3579. const m_sz_xGrabButtonReq = 24
  3580. const m_sz_xGrabKeyReq = 16
  3581. const m_sz_xGrabKeyboardReply = 32
  3582. const m_sz_xGrabKeyboardReq = 16
  3583. const m_sz_xGrabPointerReply = 32
  3584. const m_sz_xGrabPointerReq = 24
  3585. const m_sz_xHostEntry = 4
  3586. const m_sz_xImageText16Req = 16
  3587. const m_sz_xImageText8Req = 16
  3588. const m_sz_xImageTextReq = 16
  3589. const m_sz_xInternAtomReply = 32
  3590. const m_sz_xInternAtomReq = 8
  3591. const m_sz_xKeymapEvent = 32
  3592. const m_sz_xListExtensionsReply = 32
  3593. const m_sz_xListFontsReply = 32
  3594. const m_sz_xListFontsReq = 8
  3595. const m_sz_xListFontsWithInfoReply = 60
  3596. const m_sz_xListFontsWithInfoReq = 8
  3597. const m_sz_xListHostsReply = 32
  3598. const m_sz_xListHostsReq = 4
  3599. const m_sz_xListInstalledColormapsReply = 32
  3600. const m_sz_xListPropertiesReply = 32
  3601. const m_sz_xLookupColorReply = 32
  3602. const m_sz_xLookupColorReq = 12
  3603. const m_sz_xOpenFontReq = 12
  3604. const m_sz_xPixmapFormat = 8
  3605. const m_sz_xPoint = 4
  3606. const m_sz_xPolyArcReq = 12
  3607. const m_sz_xPolyFillArcReq = 12
  3608. const m_sz_xPolyFillRectangleReq = 12
  3609. const m_sz_xPolyLineReq = 12
  3610. const m_sz_xPolyPointReq = 12
  3611. const m_sz_xPolyRectangleReq = 12
  3612. const m_sz_xPolySegmentReq = 12
  3613. const m_sz_xPolyText16Req = 16
  3614. const m_sz_xPolyText8Req = 16
  3615. const m_sz_xPolyTextReq = 16
  3616. const m_sz_xPropIconSize = 24
  3617. const m_sz_xPutImageReq = 24
  3618. const m_sz_xQueryBestSizeReply = 32
  3619. const m_sz_xQueryBestSizeReq = 12
  3620. const m_sz_xQueryColorsReply = 32
  3621. const m_sz_xQueryColorsReq = 8
  3622. const m_sz_xQueryExtensionReply = 32
  3623. const m_sz_xQueryExtensionReq = 8
  3624. const m_sz_xQueryFontReply = 60
  3625. const m_sz_xQueryKeymapReply = 40
  3626. const m_sz_xQueryPointerReply = 32
  3627. const m_sz_xQueryTextExtentsReply = 32
  3628. const m_sz_xQueryTextExtentsReq = 8
  3629. const m_sz_xQueryTreeReply = 32
  3630. const m_sz_xRecolorCursorReq = 20
  3631. const m_sz_xRectangle = 8
  3632. const m_sz_xReparentWindowReq = 16
  3633. const m_sz_xReply = 32
  3634. const m_sz_xReq = 4
  3635. const m_sz_xResourceReq = 8
  3636. const m_sz_xRotatePropertiesReq = 12
  3637. const m_sz_xSegment = 8
  3638. const m_sz_xSendEventReq = 44
  3639. const m_sz_xSetAccessControlReq = 4
  3640. const m_sz_xSetClipRectanglesReq = 12
  3641. const m_sz_xSetCloseDownModeReq = 4
  3642. const m_sz_xSetDashesReq = 12
  3643. const m_sz_xSetFontPathReq = 8
  3644. const m_sz_xSetInputFocusReq = 12
  3645. const m_sz_xSetMappingReply = 32
  3646. const m_sz_xSetModifierMappingReply = 32
  3647. const m_sz_xSetModifierMappingReq = 4
  3648. const m_sz_xSetPointerMappingReply = 32
  3649. const m_sz_xSetPointerMappingReq = 4
  3650. const m_sz_xSetScreenSaverReq = 12
  3651. const m_sz_xSetSelectionOwnerReq = 16
  3652. const m_sz_xStoreColorsReq = 8
  3653. const m_sz_xStoreNamedColorReq = 16
  3654. const m_sz_xTextElt = 2
  3655. const m_sz_xTimecoord = 8
  3656. const m_sz_xTranslateCoordsReply = 32
  3657. const m_sz_xTranslateCoordsReq = 16
  3658. const m_sz_xUngrabButtonReq = 12
  3659. const m_sz_xUngrabKeyReq = 12
  3660. const m_sz_xVisualType = 24
  3661. const m_sz_xWarpPointerReq = 24
  3662. const m_sz_xWindowRoot = 40
  3663. const m_sz_xrgb = 8
  3664. const m_unix = 1
  3665. const m_xFalse = 0
  3666. const m_xTrue = 1
  3667. type t__builtin_va_list = uintptr
  3668. type t__predefined_size_t = uint64
  3669. type t__predefined_wchar_t = int32
  3670. type t__predefined_ptrdiff_t = int64
  3671. type Tsize_t = uint64
  3672. type Tssize_t = int64
  3673. type Toff_t = int64
  3674. type Tva_list = uintptr
  3675. type t__isoc_va_list = uintptr
  3676. type Tfpos_t = struct {
  3677. F__lldata [0]int64
  3678. F__align [0]float64
  3679. F__opaque [16]uint8
  3680. }
  3681. type T_G_fpos64_t = Tfpos_t
  3682. type Tcookie_io_functions_t = struct {
  3683. Fread uintptr
  3684. Fwrite uintptr
  3685. Fseek uintptr
  3686. Fclose1 uintptr
  3687. }
  3688. type T_IO_cookie_io_functions_t = Tcookie_io_functions_t
  3689. type Twchar_t = int32
  3690. type Tdiv_t = struct {
  3691. Fquot int32
  3692. Frem int32
  3693. }
  3694. type Tldiv_t = struct {
  3695. Fquot int64
  3696. Frem int64
  3697. }
  3698. type Tlldiv_t = struct {
  3699. Fquot int64
  3700. Frem int64
  3701. }
  3702. type Tlocale_t = uintptr
  3703. type Tregister_t = int64
  3704. type Ttime_t = int64
  3705. type Tsuseconds_t = int64
  3706. type Tint8_t = int8
  3707. type Tint16_t = int16
  3708. type Tint32_t = int32
  3709. type Tint64_t = int64
  3710. type Tu_int64_t = uint64
  3711. type Tmode_t = uint32
  3712. type Tnlink_t = uint64
  3713. type Tino_t = uint64
  3714. type Tdev_t = uint64
  3715. type Tblksize_t = int64
  3716. type Tblkcnt_t = int64
  3717. type Tfsblkcnt_t = uint64
  3718. type Tfsfilcnt_t = uint64
  3719. type Ttimer_t = uintptr
  3720. type Tclockid_t = int32
  3721. type Tclock_t = int64
  3722. type Tpid_t = int32
  3723. type Tid_t = uint32
  3724. type Tuid_t = uint32
  3725. type Tgid_t = uint32
  3726. type Tkey_t = int32
  3727. type Tuseconds_t = uint32
  3728. type Tpthread_t = uintptr
  3729. type Tpthread_once_t = int32
  3730. type Tpthread_key_t = uint32
  3731. type Tpthread_spinlock_t = int32
  3732. type Tpthread_mutexattr_t = struct {
  3733. F__attr uint32
  3734. }
  3735. type Tpthread_condattr_t = struct {
  3736. F__attr uint32
  3737. }
  3738. type Tpthread_barrierattr_t = struct {
  3739. F__attr uint32
  3740. }
  3741. type Tpthread_rwlockattr_t = struct {
  3742. F__attr [2]uint32
  3743. }
  3744. type Tpthread_attr_t = struct {
  3745. F__u struct {
  3746. F__vi [0][14]int32
  3747. F__s [0][7]uint64
  3748. F__i [14]int32
  3749. }
  3750. }
  3751. type Tpthread_mutex_t = struct {
  3752. F__u struct {
  3753. F__vi [0][10]int32
  3754. F__p [0][5]uintptr
  3755. F__i [10]int32
  3756. }
  3757. }
  3758. type Tpthread_cond_t = struct {
  3759. F__u struct {
  3760. F__vi [0][12]int32
  3761. F__p [0][6]uintptr
  3762. F__i [12]int32
  3763. }
  3764. }
  3765. type Tpthread_rwlock_t = struct {
  3766. F__u struct {
  3767. F__vi [0][14]int32
  3768. F__p [0][7]uintptr
  3769. F__i [14]int32
  3770. }
  3771. }
  3772. type Tpthread_barrier_t = struct {
  3773. F__u struct {
  3774. F__vi [0][8]int32
  3775. F__p [0][4]uintptr
  3776. F__i [8]int32
  3777. }
  3778. }
  3779. type Tu_int8_t = uint8
  3780. type Tu_int16_t = uint16
  3781. type Tu_int32_t = uint32
  3782. type Tcaddr_t = uintptr
  3783. type Tu_char = uint8
  3784. type Tu_short = uint16
  3785. type Tushort = uint16
  3786. type Tu_int = uint32
  3787. type Tuint = uint32
  3788. type Tu_long = uint64
  3789. type Tulong = uint64
  3790. type Tquad_t = int64
  3791. type Tu_quad_t = uint64
  3792. type Tuint16_t = uint16
  3793. type Tuint32_t = uint32
  3794. type Tuint64_t = uint64
  3795. type Ttimeval = struct {
  3796. Ftv_sec Ttime_t
  3797. Ftv_usec Tsuseconds_t
  3798. }
  3799. type Ttimespec = struct {
  3800. Ftv_sec Ttime_t
  3801. Ftv_nsec int64
  3802. }
  3803. type Tsigset_t = struct {
  3804. F__bits [16]uint64
  3805. }
  3806. type t__sigset_t = Tsigset_t
  3807. type Tfd_mask = uint64
  3808. type Tfd_set = struct {
  3809. Ffds_bits [16]uint64
  3810. }
  3811. type TXID = uint64
  3812. type TMask = uint64
  3813. type TAtom = uint64
  3814. type TVisualID = uint64
  3815. type TTime = uint64
  3816. type TWindow = uint64
  3817. type TDrawable = uint64
  3818. type TFont = uint64
  3819. type TPixmap = uint64
  3820. type TCursor = uint64
  3821. type TColormap = uint64
  3822. type TGContext = uint64
  3823. type TKeySym = uint64
  3824. type TKeyCode = uint8
  3825. type Tmax_align_t = struct {
  3826. F__ll int64
  3827. F__ld float64
  3828. }
  3829. type Tptrdiff_t = int64
  3830. type TXPointer = uintptr
  3831. type TXExtData = struct {
  3832. Fnumber int32
  3833. Fnext uintptr
  3834. Ffree_private uintptr
  3835. Fprivate_data TXPointer
  3836. }
  3837. type T_XExtData = TXExtData
  3838. type TXExtCodes = struct {
  3839. Fextension int32
  3840. Fmajor_opcode int32
  3841. Ffirst_event int32
  3842. Ffirst_error int32
  3843. }
  3844. type TXPixmapFormatValues = struct {
  3845. Fdepth int32
  3846. Fbits_per_pixel int32
  3847. Fscanline_pad int32
  3848. }
  3849. type TXGCValues = struct {
  3850. Ffunction int32
  3851. Fplane_mask uint64
  3852. Fforeground uint64
  3853. Fbackground uint64
  3854. Fline_width int32
  3855. Fline_style int32
  3856. Fcap_style int32
  3857. Fjoin_style int32
  3858. Ffill_style int32
  3859. Ffill_rule int32
  3860. Farc_mode int32
  3861. Ftile TPixmap
  3862. Fstipple TPixmap
  3863. Fts_x_origin int32
  3864. Fts_y_origin int32
  3865. Ffont TFont
  3866. Fsubwindow_mode int32
  3867. Fgraphics_exposures int32
  3868. Fclip_x_origin int32
  3869. Fclip_y_origin int32
  3870. Fclip_mask TPixmap
  3871. Fdash_offset int32
  3872. Fdashes uint8
  3873. }
  3874. type TGC = uintptr
  3875. type T_XGC = struct {
  3876. Fext_data uintptr
  3877. Fgid TGContext
  3878. Frects int32
  3879. Fdashes int32
  3880. Fdirty uint64
  3881. Fvalues TXGCValues
  3882. }
  3883. type TVisual = struct {
  3884. Fext_data uintptr
  3885. Fvisualid TVisualID
  3886. Fclass int32
  3887. Fred_mask uint64
  3888. Fgreen_mask uint64
  3889. Fblue_mask uint64
  3890. Fbits_per_rgb int32
  3891. Fmap_entries int32
  3892. }
  3893. type TDepth = struct {
  3894. Fdepth int32
  3895. Fnvisuals int32
  3896. Fvisuals uintptr
  3897. }
  3898. type T_XDisplay = struct {
  3899. Fext_data uintptr
  3900. Ffree_funcs uintptr
  3901. Ffd int32
  3902. Fconn_checker int32
  3903. Fproto_major_version int32
  3904. Fproto_minor_version int32
  3905. Fvendor uintptr
  3906. Fresource_base TXID
  3907. Fresource_mask TXID
  3908. Fresource_id TXID
  3909. Fresource_shift int32
  3910. Fresource_alloc uintptr
  3911. Fbyte_order int32
  3912. Fbitmap_unit int32
  3913. Fbitmap_pad int32
  3914. Fbitmap_bit_order int32
  3915. Fnformats int32
  3916. Fpixmap_format uintptr
  3917. Fvnumber int32
  3918. Frelease int32
  3919. Fhead uintptr
  3920. Ftail uintptr
  3921. Fqlen int32
  3922. Flast_request_read uint64
  3923. Frequest uint64
  3924. Flast_req uintptr
  3925. Fbuffer uintptr
  3926. Fbufptr uintptr
  3927. Fbufmax uintptr
  3928. Fmax_request_size uint32
  3929. Fdb uintptr
  3930. Fsynchandler uintptr
  3931. Fdisplay_name uintptr
  3932. Fdefault_screen int32
  3933. Fnscreens int32
  3934. Fscreens uintptr
  3935. Fmotion_buffer uint64
  3936. Fflags uint64
  3937. Fmin_keycode int32
  3938. Fmax_keycode int32
  3939. Fkeysyms uintptr
  3940. Fmodifiermap uintptr
  3941. Fkeysyms_per_keycode int32
  3942. Fxdefaults uintptr
  3943. Fscratch_buffer uintptr
  3944. Fscratch_length uint64
  3945. Fext_number int32
  3946. Fext_procs uintptr
  3947. Fevent_vec [128]uintptr
  3948. Fwire_vec [128]uintptr
  3949. Flock_meaning TKeySym
  3950. Flock uintptr
  3951. Fasync_handlers uintptr
  3952. Fbigreq_size uint64
  3953. Flock_fns uintptr
  3954. Fidlist_alloc uintptr
  3955. Fkey_bindings uintptr
  3956. Fcursor_font TFont
  3957. Fatoms uintptr
  3958. Fmode_switch uint32
  3959. Fnum_lock uint32
  3960. Fcontext_db uintptr
  3961. Ferror_vec uintptr
  3962. Fcms struct {
  3963. FdefaultCCCs TXPointer
  3964. FclientCmaps TXPointer
  3965. FperVisualIntensityMaps TXPointer
  3966. }
  3967. Fim_filters uintptr
  3968. Fqfree uintptr
  3969. Fnext_event_serial_num uint64
  3970. Fflushes uintptr
  3971. Fim_fd_info uintptr
  3972. Fim_fd_length int32
  3973. Fconn_watchers uintptr
  3974. Fwatcher_count int32
  3975. Ffiledes TXPointer
  3976. Fsavedsynchandler uintptr
  3977. Fresource_max TXID
  3978. Fxcmisc_opcode int32
  3979. Fxkb_info uintptr
  3980. Ftrans_conn uintptr
  3981. Fxcb uintptr
  3982. Fnext_cookie uint32
  3983. Fgeneric_event_vec [128]uintptr
  3984. Fgeneric_event_copy_vec [128]uintptr
  3985. Fcookiejar uintptr
  3986. Ferror_threads uintptr
  3987. Fexit_handler TXIOErrorExitHandler
  3988. Fexit_handler_data uintptr
  3989. }
  3990. type TScreen = struct {
  3991. Fext_data uintptr
  3992. Fdisplay uintptr
  3993. Froot TWindow
  3994. Fwidth int32
  3995. Fheight int32
  3996. Fmwidth int32
  3997. Fmheight int32
  3998. Fndepths int32
  3999. Fdepths uintptr
  4000. Froot_depth int32
  4001. Froot_visual uintptr
  4002. Fdefault_gc TGC
  4003. Fcmap TColormap
  4004. Fwhite_pixel uint64
  4005. Fblack_pixel uint64
  4006. Fmax_maps int32
  4007. Fmin_maps int32
  4008. Fbacking_store int32
  4009. Fsave_unders int32
  4010. Froot_input_mask int64
  4011. }
  4012. type TScreenFormat = struct {
  4013. Fext_data uintptr
  4014. Fdepth int32
  4015. Fbits_per_pixel int32
  4016. Fscanline_pad int32
  4017. }
  4018. type TXSetWindowAttributes = struct {
  4019. Fbackground_pixmap TPixmap
  4020. Fbackground_pixel uint64
  4021. Fborder_pixmap TPixmap
  4022. Fborder_pixel uint64
  4023. Fbit_gravity int32
  4024. Fwin_gravity int32
  4025. Fbacking_store int32
  4026. Fbacking_planes uint64
  4027. Fbacking_pixel uint64
  4028. Fsave_under int32
  4029. Fevent_mask int64
  4030. Fdo_not_propagate_mask int64
  4031. Foverride_redirect int32
  4032. Fcolormap TColormap
  4033. Fcursor TCursor
  4034. }
  4035. type TXWindowAttributes = struct {
  4036. Fx int32
  4037. Fy int32
  4038. Fwidth int32
  4039. Fheight int32
  4040. Fborder_width int32
  4041. Fdepth int32
  4042. Fvisual uintptr
  4043. Froot TWindow
  4044. Fclass int32
  4045. Fbit_gravity int32
  4046. Fwin_gravity int32
  4047. Fbacking_store int32
  4048. Fbacking_planes uint64
  4049. Fbacking_pixel uint64
  4050. Fsave_under int32
  4051. Fcolormap TColormap
  4052. Fmap_installed int32
  4053. Fmap_state int32
  4054. Fall_event_masks int64
  4055. Fyour_event_mask int64
  4056. Fdo_not_propagate_mask int64
  4057. Foverride_redirect int32
  4058. Fscreen uintptr
  4059. }
  4060. type TXHostAddress = struct {
  4061. Ffamily int32
  4062. Flength int32
  4063. Faddress uintptr
  4064. }
  4065. type TXServerInterpretedAddress = struct {
  4066. Ftypelength int32
  4067. Fvaluelength int32
  4068. Ftype1 uintptr
  4069. Fvalue uintptr
  4070. }
  4071. type TXImage = struct {
  4072. Fwidth int32
  4073. Fheight int32
  4074. Fxoffset int32
  4075. Fformat int32
  4076. Fdata uintptr
  4077. Fbyte_order int32
  4078. Fbitmap_unit int32
  4079. Fbitmap_bit_order int32
  4080. Fbitmap_pad int32
  4081. Fdepth int32
  4082. Fbytes_per_line int32
  4083. Fbits_per_pixel int32
  4084. Fred_mask uint64
  4085. Fgreen_mask uint64
  4086. Fblue_mask uint64
  4087. Fobdata TXPointer
  4088. Ff Tfuncs
  4089. }
  4090. type T_XImage = TXImage
  4091. type TXWindowChanges = struct {
  4092. Fx int32
  4093. Fy int32
  4094. Fwidth int32
  4095. Fheight int32
  4096. Fborder_width int32
  4097. Fsibling TWindow
  4098. Fstack_mode int32
  4099. }
  4100. type TXColor = struct {
  4101. Fpixel uint64
  4102. Fred uint16
  4103. Fgreen uint16
  4104. Fblue uint16
  4105. Fflags uint8
  4106. Fpad uint8
  4107. }
  4108. type TXSegment = struct {
  4109. Fx1 int16
  4110. Fy1 int16
  4111. Fx2 int16
  4112. Fy2 int16
  4113. }
  4114. type TXPoint = struct {
  4115. Fx int16
  4116. Fy int16
  4117. }
  4118. type TXRectangle = struct {
  4119. Fx int16
  4120. Fy int16
  4121. Fwidth uint16
  4122. Fheight uint16
  4123. }
  4124. type TXArc = struct {
  4125. Fx int16
  4126. Fy int16
  4127. Fwidth uint16
  4128. Fheight uint16
  4129. Fangle1 int16
  4130. Fangle2 int16
  4131. }
  4132. type TXKeyboardControl = struct {
  4133. Fkey_click_percent int32
  4134. Fbell_percent int32
  4135. Fbell_pitch int32
  4136. Fbell_duration int32
  4137. Fled int32
  4138. Fled_mode int32
  4139. Fkey int32
  4140. Fauto_repeat_mode int32
  4141. }
  4142. type TXKeyboardState = struct {
  4143. Fkey_click_percent int32
  4144. Fbell_percent int32
  4145. Fbell_pitch uint32
  4146. Fbell_duration uint32
  4147. Fled_mask uint64
  4148. Fglobal_auto_repeat int32
  4149. Fauto_repeats [32]uint8
  4150. }
  4151. type TXTimeCoord = struct {
  4152. Ftime TTime
  4153. Fx int16
  4154. Fy int16
  4155. }
  4156. type TXModifierKeymap = struct {
  4157. Fmax_keypermod int32
  4158. Fmodifiermap uintptr
  4159. }
  4160. type TDisplay = struct {
  4161. Fext_data uintptr
  4162. Ffree_funcs uintptr
  4163. Ffd int32
  4164. Fconn_checker int32
  4165. Fproto_major_version int32
  4166. Fproto_minor_version int32
  4167. Fvendor uintptr
  4168. Fresource_base TXID
  4169. Fresource_mask TXID
  4170. Fresource_id TXID
  4171. Fresource_shift int32
  4172. Fresource_alloc uintptr
  4173. Fbyte_order int32
  4174. Fbitmap_unit int32
  4175. Fbitmap_pad int32
  4176. Fbitmap_bit_order int32
  4177. Fnformats int32
  4178. Fpixmap_format uintptr
  4179. Fvnumber int32
  4180. Frelease int32
  4181. Fhead uintptr
  4182. Ftail uintptr
  4183. Fqlen int32
  4184. Flast_request_read uint64
  4185. Frequest uint64
  4186. Flast_req uintptr
  4187. Fbuffer uintptr
  4188. Fbufptr uintptr
  4189. Fbufmax uintptr
  4190. Fmax_request_size uint32
  4191. Fdb uintptr
  4192. Fsynchandler uintptr
  4193. Fdisplay_name uintptr
  4194. Fdefault_screen int32
  4195. Fnscreens int32
  4196. Fscreens uintptr
  4197. Fmotion_buffer uint64
  4198. Fflags uint64
  4199. Fmin_keycode int32
  4200. Fmax_keycode int32
  4201. Fkeysyms uintptr
  4202. Fmodifiermap uintptr
  4203. Fkeysyms_per_keycode int32
  4204. Fxdefaults uintptr
  4205. Fscratch_buffer uintptr
  4206. Fscratch_length uint64
  4207. Fext_number int32
  4208. Fext_procs uintptr
  4209. Fevent_vec [128]uintptr
  4210. Fwire_vec [128]uintptr
  4211. Flock_meaning TKeySym
  4212. Flock uintptr
  4213. Fasync_handlers uintptr
  4214. Fbigreq_size uint64
  4215. Flock_fns uintptr
  4216. Fidlist_alloc uintptr
  4217. Fkey_bindings uintptr
  4218. Fcursor_font TFont
  4219. Fatoms uintptr
  4220. Fmode_switch uint32
  4221. Fnum_lock uint32
  4222. Fcontext_db uintptr
  4223. Ferror_vec uintptr
  4224. Fcms struct {
  4225. FdefaultCCCs TXPointer
  4226. FclientCmaps TXPointer
  4227. FperVisualIntensityMaps TXPointer
  4228. }
  4229. Fim_filters uintptr
  4230. Fqfree uintptr
  4231. Fnext_event_serial_num uint64
  4232. Fflushes uintptr
  4233. Fim_fd_info uintptr
  4234. Fim_fd_length int32
  4235. Fconn_watchers uintptr
  4236. Fwatcher_count int32
  4237. Ffiledes TXPointer
  4238. Fsavedsynchandler uintptr
  4239. Fresource_max TXID
  4240. Fxcmisc_opcode int32
  4241. Fxkb_info uintptr
  4242. Ftrans_conn uintptr
  4243. Fxcb uintptr
  4244. Fnext_cookie uint32
  4245. Fgeneric_event_vec [128]uintptr
  4246. Fgeneric_event_copy_vec [128]uintptr
  4247. Fcookiejar uintptr
  4248. Ferror_threads uintptr
  4249. Fexit_handler TXIOErrorExitHandler
  4250. Fexit_handler_data uintptr
  4251. }
  4252. type T_XPrivDisplay = uintptr
  4253. type TXKeyEvent = struct {
  4254. Ftype1 int32
  4255. Fserial uint64
  4256. Fsend_event int32
  4257. Fdisplay uintptr
  4258. Fwindow TWindow
  4259. Froot TWindow
  4260. Fsubwindow TWindow
  4261. Ftime TTime
  4262. Fx int32
  4263. Fy int32
  4264. Fx_root int32
  4265. Fy_root int32
  4266. Fstate uint32
  4267. Fkeycode uint32
  4268. Fsame_screen int32
  4269. }
  4270. type TXKeyPressedEvent = struct {
  4271. Ftype1 int32
  4272. Fserial uint64
  4273. Fsend_event int32
  4274. Fdisplay uintptr
  4275. Fwindow TWindow
  4276. Froot TWindow
  4277. Fsubwindow TWindow
  4278. Ftime TTime
  4279. Fx int32
  4280. Fy int32
  4281. Fx_root int32
  4282. Fy_root int32
  4283. Fstate uint32
  4284. Fkeycode uint32
  4285. Fsame_screen int32
  4286. }
  4287. type TXKeyReleasedEvent = struct {
  4288. Ftype1 int32
  4289. Fserial uint64
  4290. Fsend_event int32
  4291. Fdisplay uintptr
  4292. Fwindow TWindow
  4293. Froot TWindow
  4294. Fsubwindow TWindow
  4295. Ftime TTime
  4296. Fx int32
  4297. Fy int32
  4298. Fx_root int32
  4299. Fy_root int32
  4300. Fstate uint32
  4301. Fkeycode uint32
  4302. Fsame_screen int32
  4303. }
  4304. type TXButtonEvent = struct {
  4305. Ftype1 int32
  4306. Fserial uint64
  4307. Fsend_event int32
  4308. Fdisplay uintptr
  4309. Fwindow TWindow
  4310. Froot TWindow
  4311. Fsubwindow TWindow
  4312. Ftime TTime
  4313. Fx int32
  4314. Fy int32
  4315. Fx_root int32
  4316. Fy_root int32
  4317. Fstate uint32
  4318. Fbutton uint32
  4319. Fsame_screen int32
  4320. }
  4321. type TXButtonPressedEvent = struct {
  4322. Ftype1 int32
  4323. Fserial uint64
  4324. Fsend_event int32
  4325. Fdisplay uintptr
  4326. Fwindow TWindow
  4327. Froot TWindow
  4328. Fsubwindow TWindow
  4329. Ftime TTime
  4330. Fx int32
  4331. Fy int32
  4332. Fx_root int32
  4333. Fy_root int32
  4334. Fstate uint32
  4335. Fbutton uint32
  4336. Fsame_screen int32
  4337. }
  4338. type TXButtonReleasedEvent = struct {
  4339. Ftype1 int32
  4340. Fserial uint64
  4341. Fsend_event int32
  4342. Fdisplay uintptr
  4343. Fwindow TWindow
  4344. Froot TWindow
  4345. Fsubwindow TWindow
  4346. Ftime TTime
  4347. Fx int32
  4348. Fy int32
  4349. Fx_root int32
  4350. Fy_root int32
  4351. Fstate uint32
  4352. Fbutton uint32
  4353. Fsame_screen int32
  4354. }
  4355. type TXMotionEvent = struct {
  4356. Ftype1 int32
  4357. Fserial uint64
  4358. Fsend_event int32
  4359. Fdisplay uintptr
  4360. Fwindow TWindow
  4361. Froot TWindow
  4362. Fsubwindow TWindow
  4363. Ftime TTime
  4364. Fx int32
  4365. Fy int32
  4366. Fx_root int32
  4367. Fy_root int32
  4368. Fstate uint32
  4369. Fis_hint uint8
  4370. Fsame_screen int32
  4371. }
  4372. type TXPointerMovedEvent = struct {
  4373. Ftype1 int32
  4374. Fserial uint64
  4375. Fsend_event int32
  4376. Fdisplay uintptr
  4377. Fwindow TWindow
  4378. Froot TWindow
  4379. Fsubwindow TWindow
  4380. Ftime TTime
  4381. Fx int32
  4382. Fy int32
  4383. Fx_root int32
  4384. Fy_root int32
  4385. Fstate uint32
  4386. Fis_hint uint8
  4387. Fsame_screen int32
  4388. }
  4389. type TXCrossingEvent = struct {
  4390. Ftype1 int32
  4391. Fserial uint64
  4392. Fsend_event int32
  4393. Fdisplay uintptr
  4394. Fwindow TWindow
  4395. Froot TWindow
  4396. Fsubwindow TWindow
  4397. Ftime TTime
  4398. Fx int32
  4399. Fy int32
  4400. Fx_root int32
  4401. Fy_root int32
  4402. Fmode int32
  4403. Fdetail int32
  4404. Fsame_screen int32
  4405. Ffocus int32
  4406. Fstate uint32
  4407. }
  4408. type TXEnterWindowEvent = struct {
  4409. Ftype1 int32
  4410. Fserial uint64
  4411. Fsend_event int32
  4412. Fdisplay uintptr
  4413. Fwindow TWindow
  4414. Froot TWindow
  4415. Fsubwindow TWindow
  4416. Ftime TTime
  4417. Fx int32
  4418. Fy int32
  4419. Fx_root int32
  4420. Fy_root int32
  4421. Fmode int32
  4422. Fdetail int32
  4423. Fsame_screen int32
  4424. Ffocus int32
  4425. Fstate uint32
  4426. }
  4427. type TXLeaveWindowEvent = struct {
  4428. Ftype1 int32
  4429. Fserial uint64
  4430. Fsend_event int32
  4431. Fdisplay uintptr
  4432. Fwindow TWindow
  4433. Froot TWindow
  4434. Fsubwindow TWindow
  4435. Ftime TTime
  4436. Fx int32
  4437. Fy int32
  4438. Fx_root int32
  4439. Fy_root int32
  4440. Fmode int32
  4441. Fdetail int32
  4442. Fsame_screen int32
  4443. Ffocus int32
  4444. Fstate uint32
  4445. }
  4446. type TXFocusChangeEvent = struct {
  4447. Ftype1 int32
  4448. Fserial uint64
  4449. Fsend_event int32
  4450. Fdisplay uintptr
  4451. Fwindow TWindow
  4452. Fmode int32
  4453. Fdetail int32
  4454. }
  4455. type TXFocusInEvent = struct {
  4456. Ftype1 int32
  4457. Fserial uint64
  4458. Fsend_event int32
  4459. Fdisplay uintptr
  4460. Fwindow TWindow
  4461. Fmode int32
  4462. Fdetail int32
  4463. }
  4464. type TXFocusOutEvent = struct {
  4465. Ftype1 int32
  4466. Fserial uint64
  4467. Fsend_event int32
  4468. Fdisplay uintptr
  4469. Fwindow TWindow
  4470. Fmode int32
  4471. Fdetail int32
  4472. }
  4473. type TXKeymapEvent = struct {
  4474. Ftype1 int32
  4475. Fserial uint64
  4476. Fsend_event int32
  4477. Fdisplay uintptr
  4478. Fwindow TWindow
  4479. Fkey_vector [32]uint8
  4480. }
  4481. type TXExposeEvent = struct {
  4482. Ftype1 int32
  4483. Fserial uint64
  4484. Fsend_event int32
  4485. Fdisplay uintptr
  4486. Fwindow TWindow
  4487. Fx int32
  4488. Fy int32
  4489. Fwidth int32
  4490. Fheight int32
  4491. Fcount int32
  4492. }
  4493. type TXGraphicsExposeEvent = struct {
  4494. Ftype1 int32
  4495. Fserial uint64
  4496. Fsend_event int32
  4497. Fdisplay uintptr
  4498. Fdrawable TDrawable
  4499. Fx int32
  4500. Fy int32
  4501. Fwidth int32
  4502. Fheight int32
  4503. Fcount int32
  4504. Fmajor_code int32
  4505. Fminor_code int32
  4506. }
  4507. type TXNoExposeEvent = struct {
  4508. Ftype1 int32
  4509. Fserial uint64
  4510. Fsend_event int32
  4511. Fdisplay uintptr
  4512. Fdrawable TDrawable
  4513. Fmajor_code int32
  4514. Fminor_code int32
  4515. }
  4516. type TXVisibilityEvent = struct {
  4517. Ftype1 int32
  4518. Fserial uint64
  4519. Fsend_event int32
  4520. Fdisplay uintptr
  4521. Fwindow TWindow
  4522. Fstate int32
  4523. }
  4524. type TXCreateWindowEvent = struct {
  4525. Ftype1 int32
  4526. Fserial uint64
  4527. Fsend_event int32
  4528. Fdisplay uintptr
  4529. Fparent TWindow
  4530. Fwindow TWindow
  4531. Fx int32
  4532. Fy int32
  4533. Fwidth int32
  4534. Fheight int32
  4535. Fborder_width int32
  4536. Foverride_redirect int32
  4537. }
  4538. type TXDestroyWindowEvent = struct {
  4539. Ftype1 int32
  4540. Fserial uint64
  4541. Fsend_event int32
  4542. Fdisplay uintptr
  4543. Fevent TWindow
  4544. Fwindow TWindow
  4545. }
  4546. type TXUnmapEvent = struct {
  4547. Ftype1 int32
  4548. Fserial uint64
  4549. Fsend_event int32
  4550. Fdisplay uintptr
  4551. Fevent TWindow
  4552. Fwindow TWindow
  4553. Ffrom_configure int32
  4554. }
  4555. type TXMapEvent = struct {
  4556. Ftype1 int32
  4557. Fserial uint64
  4558. Fsend_event int32
  4559. Fdisplay uintptr
  4560. Fevent TWindow
  4561. Fwindow TWindow
  4562. Foverride_redirect int32
  4563. }
  4564. type TXMapRequestEvent = struct {
  4565. Ftype1 int32
  4566. Fserial uint64
  4567. Fsend_event int32
  4568. Fdisplay uintptr
  4569. Fparent TWindow
  4570. Fwindow TWindow
  4571. }
  4572. type TXReparentEvent = struct {
  4573. Ftype1 int32
  4574. Fserial uint64
  4575. Fsend_event int32
  4576. Fdisplay uintptr
  4577. Fevent TWindow
  4578. Fwindow TWindow
  4579. Fparent TWindow
  4580. Fx int32
  4581. Fy int32
  4582. Foverride_redirect int32
  4583. }
  4584. type TXConfigureEvent = struct {
  4585. Ftype1 int32
  4586. Fserial uint64
  4587. Fsend_event int32
  4588. Fdisplay uintptr
  4589. Fevent TWindow
  4590. Fwindow TWindow
  4591. Fx int32
  4592. Fy int32
  4593. Fwidth int32
  4594. Fheight int32
  4595. Fborder_width int32
  4596. Fabove TWindow
  4597. Foverride_redirect int32
  4598. }
  4599. type TXGravityEvent = struct {
  4600. Ftype1 int32
  4601. Fserial uint64
  4602. Fsend_event int32
  4603. Fdisplay uintptr
  4604. Fevent TWindow
  4605. Fwindow TWindow
  4606. Fx int32
  4607. Fy int32
  4608. }
  4609. type TXResizeRequestEvent = struct {
  4610. Ftype1 int32
  4611. Fserial uint64
  4612. Fsend_event int32
  4613. Fdisplay uintptr
  4614. Fwindow TWindow
  4615. Fwidth int32
  4616. Fheight int32
  4617. }
  4618. type TXConfigureRequestEvent = struct {
  4619. Ftype1 int32
  4620. Fserial uint64
  4621. Fsend_event int32
  4622. Fdisplay uintptr
  4623. Fparent TWindow
  4624. Fwindow TWindow
  4625. Fx int32
  4626. Fy int32
  4627. Fwidth int32
  4628. Fheight int32
  4629. Fborder_width int32
  4630. Fabove TWindow
  4631. Fdetail int32
  4632. Fvalue_mask uint64
  4633. }
  4634. type TXCirculateEvent = struct {
  4635. Ftype1 int32
  4636. Fserial uint64
  4637. Fsend_event int32
  4638. Fdisplay uintptr
  4639. Fevent TWindow
  4640. Fwindow TWindow
  4641. Fplace int32
  4642. }
  4643. type TXCirculateRequestEvent = struct {
  4644. Ftype1 int32
  4645. Fserial uint64
  4646. Fsend_event int32
  4647. Fdisplay uintptr
  4648. Fparent TWindow
  4649. Fwindow TWindow
  4650. Fplace int32
  4651. }
  4652. type TXPropertyEvent = struct {
  4653. Ftype1 int32
  4654. Fserial uint64
  4655. Fsend_event int32
  4656. Fdisplay uintptr
  4657. Fwindow TWindow
  4658. Fatom TAtom
  4659. Ftime TTime
  4660. Fstate int32
  4661. }
  4662. type TXSelectionClearEvent = struct {
  4663. Ftype1 int32
  4664. Fserial uint64
  4665. Fsend_event int32
  4666. Fdisplay uintptr
  4667. Fwindow TWindow
  4668. Fselection TAtom
  4669. Ftime TTime
  4670. }
  4671. type TXSelectionRequestEvent = struct {
  4672. Ftype1 int32
  4673. Fserial uint64
  4674. Fsend_event int32
  4675. Fdisplay uintptr
  4676. Fowner TWindow
  4677. Frequestor TWindow
  4678. Fselection TAtom
  4679. Ftarget TAtom
  4680. Fproperty TAtom
  4681. Ftime TTime
  4682. }
  4683. type TXSelectionEvent = struct {
  4684. Ftype1 int32
  4685. Fserial uint64
  4686. Fsend_event int32
  4687. Fdisplay uintptr
  4688. Frequestor TWindow
  4689. Fselection TAtom
  4690. Ftarget TAtom
  4691. Fproperty TAtom
  4692. Ftime TTime
  4693. }
  4694. type TXColormapEvent = struct {
  4695. Ftype1 int32
  4696. Fserial uint64
  4697. Fsend_event int32
  4698. Fdisplay uintptr
  4699. Fwindow TWindow
  4700. Fcolormap TColormap
  4701. Fnew1 int32
  4702. Fstate int32
  4703. }
  4704. type TXClientMessageEvent = struct {
  4705. Ftype1 int32
  4706. Fserial uint64
  4707. Fsend_event int32
  4708. Fdisplay uintptr
  4709. Fwindow TWindow
  4710. Fmessage_type TAtom
  4711. Fformat int32
  4712. Fdata struct {
  4713. Fs [0][10]int16
  4714. Fl [0][5]int64
  4715. Fb [20]uint8
  4716. F__ccgo_pad3 [20]byte
  4717. }
  4718. }
  4719. type TXMappingEvent = struct {
  4720. Ftype1 int32
  4721. Fserial uint64
  4722. Fsend_event int32
  4723. Fdisplay uintptr
  4724. Fwindow TWindow
  4725. Frequest int32
  4726. Ffirst_keycode int32
  4727. Fcount int32
  4728. }
  4729. type TXErrorEvent = struct {
  4730. Ftype1 int32
  4731. Fdisplay uintptr
  4732. Fresourceid TXID
  4733. Fserial uint64
  4734. Ferror_code uint8
  4735. Frequest_code uint8
  4736. Fminor_code uint8
  4737. }
  4738. type TXAnyEvent = struct {
  4739. Ftype1 int32
  4740. Fserial uint64
  4741. Fsend_event int32
  4742. Fdisplay uintptr
  4743. Fwindow TWindow
  4744. }
  4745. type TXGenericEvent = struct {
  4746. Ftype1 int32
  4747. Fserial uint64
  4748. Fsend_event int32
  4749. Fdisplay uintptr
  4750. Fextension int32
  4751. Fevtype int32
  4752. }
  4753. type TXGenericEventCookie = struct {
  4754. Ftype1 int32
  4755. Fserial uint64
  4756. Fsend_event int32
  4757. Fdisplay uintptr
  4758. Fextension int32
  4759. Fevtype int32
  4760. Fcookie uint32
  4761. Fdata uintptr
  4762. }
  4763. type TXEvent = struct {
  4764. Fxany [0]TXAnyEvent
  4765. Fxkey [0]TXKeyEvent
  4766. Fxbutton [0]TXButtonEvent
  4767. Fxmotion [0]TXMotionEvent
  4768. Fxcrossing [0]TXCrossingEvent
  4769. Fxfocus [0]TXFocusChangeEvent
  4770. Fxexpose [0]TXExposeEvent
  4771. Fxgraphicsexpose [0]TXGraphicsExposeEvent
  4772. Fxnoexpose [0]TXNoExposeEvent
  4773. Fxvisibility [0]TXVisibilityEvent
  4774. Fxcreatewindow [0]TXCreateWindowEvent
  4775. Fxdestroywindow [0]TXDestroyWindowEvent
  4776. Fxunmap [0]TXUnmapEvent
  4777. Fxmap [0]TXMapEvent
  4778. Fxmaprequest [0]TXMapRequestEvent
  4779. Fxreparent [0]TXReparentEvent
  4780. Fxconfigure [0]TXConfigureEvent
  4781. Fxgravity [0]TXGravityEvent
  4782. Fxresizerequest [0]TXResizeRequestEvent
  4783. Fxconfigurerequest [0]TXConfigureRequestEvent
  4784. Fxcirculate [0]TXCirculateEvent
  4785. Fxcirculaterequest [0]TXCirculateRequestEvent
  4786. Fxproperty [0]TXPropertyEvent
  4787. Fxselectionclear [0]TXSelectionClearEvent
  4788. Fxselectionrequest [0]TXSelectionRequestEvent
  4789. Fxselection [0]TXSelectionEvent
  4790. Fxcolormap [0]TXColormapEvent
  4791. Fxclient [0]TXClientMessageEvent
  4792. Fxmapping [0]TXMappingEvent
  4793. Fxerror [0]TXErrorEvent
  4794. Fxkeymap [0]TXKeymapEvent
  4795. Fxgeneric [0]TXGenericEvent
  4796. Fxcookie [0]TXGenericEventCookie
  4797. Fpad [0][24]int64
  4798. Ftype1 int32
  4799. F__ccgo_pad35 [188]byte
  4800. }
  4801. type T_XEvent = TXEvent
  4802. type TXCharStruct = struct {
  4803. Flbearing int16
  4804. Frbearing int16
  4805. Fwidth int16
  4806. Fascent int16
  4807. Fdescent int16
  4808. Fattributes uint16
  4809. }
  4810. type TXFontProp = struct {
  4811. Fname TAtom
  4812. Fcard32 uint64
  4813. }
  4814. type TXFontStruct = struct {
  4815. Fext_data uintptr
  4816. Ffid TFont
  4817. Fdirection uint32
  4818. Fmin_char_or_byte2 uint32
  4819. Fmax_char_or_byte2 uint32
  4820. Fmin_byte1 uint32
  4821. Fmax_byte1 uint32
  4822. Fall_chars_exist int32
  4823. Fdefault_char uint32
  4824. Fn_properties int32
  4825. Fproperties uintptr
  4826. Fmin_bounds TXCharStruct
  4827. Fmax_bounds TXCharStruct
  4828. Fper_char uintptr
  4829. Fascent int32
  4830. Fdescent int32
  4831. }
  4832. type TXTextItem = struct {
  4833. Fchars uintptr
  4834. Fnchars int32
  4835. Fdelta int32
  4836. Ffont TFont
  4837. }
  4838. type TXChar2b = struct {
  4839. Fbyte1 uint8
  4840. Fbyte2 uint8
  4841. }
  4842. type TXTextItem16 = struct {
  4843. Fchars uintptr
  4844. Fnchars int32
  4845. Fdelta int32
  4846. Ffont TFont
  4847. }
  4848. type TXEDataObject = struct {
  4849. Fgc [0]TGC
  4850. Fvisual [0]uintptr
  4851. Fscreen [0]uintptr
  4852. Fpixmap_format [0]uintptr
  4853. Ffont [0]uintptr
  4854. Fdisplay uintptr
  4855. }
  4856. type TXFontSetExtents = struct {
  4857. Fmax_ink_extent TXRectangle
  4858. Fmax_logical_extent TXRectangle
  4859. }
  4860. type TXOM = uintptr
  4861. type TXOC = uintptr
  4862. type TXFontSet = uintptr
  4863. type TXmbTextItem = struct {
  4864. Fchars uintptr
  4865. Fnchars int32
  4866. Fdelta int32
  4867. Ffont_set TXFontSet
  4868. }
  4869. type TXwcTextItem = struct {
  4870. Fchars uintptr
  4871. Fnchars int32
  4872. Fdelta int32
  4873. Ffont_set TXFontSet
  4874. }
  4875. type TXOMCharSetList = struct {
  4876. Fcharset_count int32
  4877. Fcharset_list uintptr
  4878. }
  4879. type TXOrientation = int32
  4880. const _XOMOrientation_LTR_TTB = 0
  4881. const _XOMOrientation_RTL_TTB = 1
  4882. const _XOMOrientation_TTB_LTR = 2
  4883. const _XOMOrientation_TTB_RTL = 3
  4884. const _XOMOrientation_Context = 4
  4885. type TXOMOrientation = struct {
  4886. Fnum_orientation int32
  4887. Forientation uintptr
  4888. }
  4889. type TXOMFontInfo = struct {
  4890. Fnum_font int32
  4891. Ffont_struct_list uintptr
  4892. Ffont_name_list uintptr
  4893. }
  4894. type TXIM = uintptr
  4895. type TXIC = uintptr
  4896. type TXIMProc = uintptr
  4897. type TXICProc = uintptr
  4898. type TXIDProc = uintptr
  4899. type TXIMStyle = uint64
  4900. type TXIMStyles = struct {
  4901. Fcount_styles uint16
  4902. Fsupported_styles uintptr
  4903. }
  4904. type TXVaNestedList = uintptr
  4905. type TXIMCallback = struct {
  4906. Fclient_data TXPointer
  4907. Fcallback TXIMProc
  4908. }
  4909. type TXICCallback = struct {
  4910. Fclient_data TXPointer
  4911. Fcallback TXICProc
  4912. }
  4913. type TXIMFeedback = uint64
  4914. type TXIMText = struct {
  4915. Flength uint16
  4916. Ffeedback uintptr
  4917. Fencoding_is_wchar int32
  4918. Fstring1 struct {
  4919. Fwide_char [0]uintptr
  4920. Fmulti_byte uintptr
  4921. }
  4922. }
  4923. type T_XIMText = TXIMText
  4924. type TXIMPreeditState = uint64
  4925. type TXIMPreeditStateNotifyCallbackStruct = struct {
  4926. Fstate TXIMPreeditState
  4927. }
  4928. type T_XIMPreeditStateNotifyCallbackStruct = TXIMPreeditStateNotifyCallbackStruct
  4929. type TXIMResetState = uint64
  4930. type TXIMStringConversionFeedback = uint64
  4931. type TXIMStringConversionText = struct {
  4932. Flength uint16
  4933. Ffeedback uintptr
  4934. Fencoding_is_wchar int32
  4935. Fstring1 struct {
  4936. Fwcs [0]uintptr
  4937. Fmbs uintptr
  4938. }
  4939. }
  4940. type T_XIMStringConversionText = TXIMStringConversionText
  4941. type TXIMStringConversionPosition = uint16
  4942. type TXIMStringConversionType = uint16
  4943. type TXIMStringConversionOperation = uint16
  4944. type TXIMCaretDirection = int32
  4945. const _XIMForwardChar = 0
  4946. const _XIMBackwardChar = 1
  4947. const _XIMForwardWord = 2
  4948. const _XIMBackwardWord = 3
  4949. const _XIMCaretUp = 4
  4950. const _XIMCaretDown = 5
  4951. const _XIMNextLine = 6
  4952. const _XIMPreviousLine = 7
  4953. const _XIMLineStart = 8
  4954. const _XIMLineEnd = 9
  4955. const _XIMAbsolutePosition = 10
  4956. const _XIMDontChange = 11
  4957. type TXIMStringConversionCallbackStruct = struct {
  4958. Fposition TXIMStringConversionPosition
  4959. Fdirection TXIMCaretDirection
  4960. Foperation TXIMStringConversionOperation
  4961. Ffactor uint16
  4962. Ftext uintptr
  4963. }
  4964. type T_XIMStringConversionCallbackStruct = TXIMStringConversionCallbackStruct
  4965. type TXIMPreeditDrawCallbackStruct = struct {
  4966. Fcaret int32
  4967. Fchg_first int32
  4968. Fchg_length int32
  4969. Ftext uintptr
  4970. }
  4971. type T_XIMPreeditDrawCallbackStruct = TXIMPreeditDrawCallbackStruct
  4972. type TXIMCaretStyle = int32
  4973. const _XIMIsInvisible = 0
  4974. const _XIMIsPrimary = 1
  4975. const _XIMIsSecondary = 2
  4976. type TXIMPreeditCaretCallbackStruct = struct {
  4977. Fposition int32
  4978. Fdirection TXIMCaretDirection
  4979. Fstyle TXIMCaretStyle
  4980. }
  4981. type T_XIMPreeditCaretCallbackStruct = TXIMPreeditCaretCallbackStruct
  4982. type TXIMStatusDataType = int32
  4983. const _XIMTextType = 0
  4984. const _XIMBitmapType = 1
  4985. type TXIMStatusDrawCallbackStruct = struct {
  4986. Ftype1 TXIMStatusDataType
  4987. Fdata struct {
  4988. Fbitmap [0]TPixmap
  4989. Ftext uintptr
  4990. }
  4991. }
  4992. type T_XIMStatusDrawCallbackStruct = TXIMStatusDrawCallbackStruct
  4993. type TXIMHotKeyTrigger = struct {
  4994. Fkeysym TKeySym
  4995. Fmodifier int32
  4996. Fmodifier_mask int32
  4997. }
  4998. type T_XIMHotKeyTrigger = TXIMHotKeyTrigger
  4999. type TXIMHotKeyTriggers = struct {
  5000. Fnum_hot_key int32
  5001. Fkey uintptr
  5002. }
  5003. type T_XIMHotKeyTriggers = TXIMHotKeyTriggers
  5004. type TXIMHotKeyState = uint64
  5005. type TXIMValuesList = struct {
  5006. Fcount_values uint16
  5007. Fsupported_values uintptr
  5008. }
  5009. type TXErrorHandler = uintptr
  5010. type TXIOErrorHandler = uintptr
  5011. type TXIOErrorExitHandler = uintptr
  5012. type TXConnectionWatchProc = uintptr
  5013. type TXSizeHints = struct {
  5014. Fflags int64
  5015. Fx int32
  5016. Fy int32
  5017. Fwidth int32
  5018. Fheight int32
  5019. Fmin_width int32
  5020. Fmin_height int32
  5021. Fmax_width int32
  5022. Fmax_height int32
  5023. Fwidth_inc int32
  5024. Fheight_inc int32
  5025. Fmin_aspect struct {
  5026. Fx int32
  5027. Fy int32
  5028. }
  5029. Fmax_aspect struct {
  5030. Fx int32
  5031. Fy int32
  5032. }
  5033. Fbase_width int32
  5034. Fbase_height int32
  5035. Fwin_gravity int32
  5036. }
  5037. type TXWMHints = struct {
  5038. Fflags int64
  5039. Finput int32
  5040. Finitial_state int32
  5041. Ficon_pixmap TPixmap
  5042. Ficon_window TWindow
  5043. Ficon_x int32
  5044. Ficon_y int32
  5045. Ficon_mask TPixmap
  5046. Fwindow_group TXID
  5047. }
  5048. type TXTextProperty = struct {
  5049. Fvalue uintptr
  5050. Fencoding TAtom
  5051. Fformat int32
  5052. Fnitems uint64
  5053. }
  5054. type TXICCEncodingStyle = int32
  5055. const _XStringStyle = 0
  5056. const _XCompoundTextStyle = 1
  5057. const _XTextStyle = 2
  5058. const _XStdICCTextStyle = 3
  5059. const _XUTF8StringStyle = 4
  5060. type TXIconSize = struct {
  5061. Fmin_width int32
  5062. Fmin_height int32
  5063. Fmax_width int32
  5064. Fmax_height int32
  5065. Fwidth_inc int32
  5066. Fheight_inc int32
  5067. }
  5068. type TXClassHint = struct {
  5069. Fres_name uintptr
  5070. Fres_class uintptr
  5071. }
  5072. type TXComposeStatus = struct {
  5073. Fcompose_ptr TXPointer
  5074. Fchars_matched int32
  5075. }
  5076. type T_XComposeStatus = TXComposeStatus
  5077. type TRegion = uintptr
  5078. type TXVisualInfo = struct {
  5079. Fvisual uintptr
  5080. Fvisualid TVisualID
  5081. Fscreen int32
  5082. Fdepth int32
  5083. Fclass int32
  5084. Fred_mask uint64
  5085. Fgreen_mask uint64
  5086. Fblue_mask uint64
  5087. Fcolormap_size int32
  5088. Fbits_per_rgb int32
  5089. }
  5090. type TXStandardColormap = struct {
  5091. Fcolormap TColormap
  5092. Fred_max uint64
  5093. Fred_mult uint64
  5094. Fgreen_max uint64
  5095. Fgreen_mult uint64
  5096. Fblue_max uint64
  5097. Fblue_mult uint64
  5098. Fbase_pixel uint64
  5099. Fvisualid TVisualID
  5100. Fkillid TXID
  5101. }
  5102. type TXContext = int32
  5103. type TINT64 = int64
  5104. type TINT32 = int32
  5105. type TINT16 = int16
  5106. type TINT8 = int8
  5107. type TCARD64 = uint64
  5108. type TCARD32 = uint32
  5109. type TCARD16 = uint16
  5110. type TCARD8 = uint8
  5111. type TBITS32 = uint32
  5112. type TBITS16 = uint16
  5113. type TBYTE = uint8
  5114. type TBOOL = uint8
  5115. type Tuintptr_t = uint64
  5116. type Tintptr_t = int64
  5117. type Tintmax_t = int64
  5118. type Tuint8_t = uint8
  5119. type Tuintmax_t = uint64
  5120. type Tint_fast8_t = int8
  5121. type Tint_fast64_t = int64
  5122. type Tint_least8_t = int8
  5123. type Tint_least16_t = int16
  5124. type Tint_least32_t = int32
  5125. type Tint_least64_t = int64
  5126. type Tuint_fast8_t = uint8
  5127. type Tuint_fast64_t = uint64
  5128. type Tuint_least8_t = uint8
  5129. type Tuint_least16_t = uint16
  5130. type Tuint_least32_t = uint32
  5131. type Tuint_least64_t = uint64
  5132. type Tint_fast16_t = int32
  5133. type Tint_fast32_t = int32
  5134. type Tuint_fast16_t = uint32
  5135. type Tuint_fast32_t = uint32
  5136. type TxSegment = struct {
  5137. Fx1 TINT16
  5138. Fy1 TINT16
  5139. Fx2 TINT16
  5140. Fy2 TINT16
  5141. }
  5142. type T_xSegment = TxSegment
  5143. type TxPoint = struct {
  5144. Fx TINT16
  5145. Fy TINT16
  5146. }
  5147. type T_xPoint = TxPoint
  5148. type TxRectangle = struct {
  5149. Fx TINT16
  5150. Fy TINT16
  5151. Fwidth TCARD16
  5152. Fheight TCARD16
  5153. }
  5154. type T_xRectangle = TxRectangle
  5155. type TxArc = struct {
  5156. Fx TINT16
  5157. Fy TINT16
  5158. Fwidth TCARD16
  5159. Fheight TCARD16
  5160. Fangle1 TINT16
  5161. Fangle2 TINT16
  5162. }
  5163. type T_xArc = TxArc
  5164. type TKeyButMask = uint16
  5165. type TxConnClientPrefix = struct {
  5166. FbyteOrder TCARD8
  5167. Fpad TBYTE
  5168. FmajorVersion TCARD16
  5169. FminorVersion TCARD16
  5170. FnbytesAuthProto TCARD16
  5171. FnbytesAuthString TCARD16
  5172. Fpad2 TCARD16
  5173. }
  5174. type TxConnSetupPrefix = struct {
  5175. Fsuccess TCARD8
  5176. FlengthReason TBYTE
  5177. FmajorVersion TCARD16
  5178. FminorVersion TCARD16
  5179. Flength TCARD16
  5180. }
  5181. type TxConnSetup = struct {
  5182. Frelease TCARD32
  5183. FridBase TCARD32
  5184. FridMask TCARD32
  5185. FmotionBufferSize TCARD32
  5186. FnbytesVendor TCARD16
  5187. FmaxRequestSize TCARD16
  5188. FnumRoots TCARD8
  5189. FnumFormats TCARD8
  5190. FimageByteOrder TCARD8
  5191. FbitmapBitOrder TCARD8
  5192. FbitmapScanlineUnit TCARD8
  5193. FbitmapScanlinePad TCARD8
  5194. FminKeyCode TCARD8
  5195. FmaxKeyCode TCARD8
  5196. Fpad2 TCARD32
  5197. }
  5198. type TxPixmapFormat = struct {
  5199. Fdepth TCARD8
  5200. FbitsPerPixel TCARD8
  5201. FscanLinePad TCARD8
  5202. Fpad1 TCARD8
  5203. Fpad2 TCARD32
  5204. }
  5205. type TxDepth = struct {
  5206. Fdepth TCARD8
  5207. Fpad1 TCARD8
  5208. FnVisuals TCARD16
  5209. Fpad2 TCARD32
  5210. }
  5211. type TxVisualType = struct {
  5212. FvisualID TCARD32
  5213. Fclass TCARD8
  5214. FbitsPerRGB TCARD8
  5215. FcolormapEntries TCARD16
  5216. FredMask TCARD32
  5217. FgreenMask TCARD32
  5218. FblueMask TCARD32
  5219. Fpad TCARD32
  5220. }
  5221. type TxWindowRoot = struct {
  5222. FwindowId TCARD32
  5223. FdefaultColormap TCARD32
  5224. FwhitePixel TCARD32
  5225. FblackPixel TCARD32
  5226. FcurrentInputMask TCARD32
  5227. FpixWidth TCARD16
  5228. FpixHeight TCARD16
  5229. FmmWidth TCARD16
  5230. FmmHeight TCARD16
  5231. FminInstalledMaps TCARD16
  5232. FmaxInstalledMaps TCARD16
  5233. FrootVisualID TCARD32
  5234. FbackingStore TCARD8
  5235. FsaveUnders TBOOL
  5236. FrootDepth TCARD8
  5237. FnDepths TCARD8
  5238. }
  5239. type TxTimecoord = struct {
  5240. Ftime TCARD32
  5241. Fx TINT16
  5242. Fy TINT16
  5243. }
  5244. type TxHostEntry = struct {
  5245. Ffamily TCARD8
  5246. Fpad TBYTE
  5247. Flength TCARD16
  5248. }
  5249. type TxCharInfo = struct {
  5250. FleftSideBearing TINT16
  5251. FrightSideBearing TINT16
  5252. FcharacterWidth TINT16
  5253. Fascent TINT16
  5254. Fdescent TINT16
  5255. Fattributes TCARD16
  5256. }
  5257. type TxFontProp = struct {
  5258. Fname TCARD32
  5259. Fvalue TCARD32
  5260. }
  5261. type TxTextElt = struct {
  5262. Flen1 TCARD8
  5263. Fdelta TINT8
  5264. }
  5265. type TxColorItem = struct {
  5266. Fpixel TCARD32
  5267. Fred TCARD16
  5268. Fgreen TCARD16
  5269. Fblue TCARD16
  5270. Fflags TCARD8
  5271. Fpad TCARD8
  5272. }
  5273. type Txrgb = struct {
  5274. Fred TCARD16
  5275. Fgreen TCARD16
  5276. Fblue TCARD16
  5277. Fpad TCARD16
  5278. }
  5279. type TKEYCODE = uint8
  5280. type TxGenericReply = struct {
  5281. Ftype1 TBYTE
  5282. Fdata1 TBYTE
  5283. FsequenceNumber TCARD16
  5284. Flength TCARD32
  5285. Fdata00 TCARD32
  5286. Fdata01 TCARD32
  5287. Fdata02 TCARD32
  5288. Fdata03 TCARD32
  5289. Fdata04 TCARD32
  5290. Fdata05 TCARD32
  5291. }
  5292. type TxGetWindowAttributesReply = struct {
  5293. Ftype1 TBYTE
  5294. FbackingStore TCARD8
  5295. FsequenceNumber TCARD16
  5296. Flength TCARD32
  5297. FvisualID TCARD32
  5298. Fclass TCARD16
  5299. FbitGravity TCARD8
  5300. FwinGravity TCARD8
  5301. FbackingBitPlanes TCARD32
  5302. FbackingPixel TCARD32
  5303. FsaveUnder TBOOL
  5304. FmapInstalled TBOOL
  5305. FmapState TCARD8
  5306. Foverride TBOOL
  5307. Fcolormap TCARD32
  5308. FallEventMasks TCARD32
  5309. FyourEventMask TCARD32
  5310. FdoNotPropagateMask TCARD16
  5311. Fpad TCARD16
  5312. }
  5313. type TxGetGeometryReply = struct {
  5314. Ftype1 TBYTE
  5315. Fdepth TCARD8
  5316. FsequenceNumber TCARD16
  5317. Flength TCARD32
  5318. Froot TCARD32
  5319. Fx TINT16
  5320. Fy TINT16
  5321. Fwidth TCARD16
  5322. Fheight TCARD16
  5323. FborderWidth TCARD16
  5324. Fpad1 TCARD16
  5325. Fpad2 TCARD32
  5326. Fpad3 TCARD32
  5327. }
  5328. type TxQueryTreeReply = struct {
  5329. Ftype1 TBYTE
  5330. Fpad1 TBYTE
  5331. FsequenceNumber TCARD16
  5332. Flength TCARD32
  5333. Froot TCARD32
  5334. Fparent TCARD32
  5335. FnChildren TCARD16
  5336. Fpad2 TCARD16
  5337. Fpad3 TCARD32
  5338. Fpad4 TCARD32
  5339. Fpad5 TCARD32
  5340. }
  5341. type TxInternAtomReply = struct {
  5342. Ftype1 TBYTE
  5343. Fpad1 TBYTE
  5344. FsequenceNumber TCARD16
  5345. Flength TCARD32
  5346. Fatom TCARD32
  5347. Fpad2 TCARD32
  5348. Fpad3 TCARD32
  5349. Fpad4 TCARD32
  5350. Fpad5 TCARD32
  5351. Fpad6 TCARD32
  5352. }
  5353. type TxGetAtomNameReply = struct {
  5354. Ftype1 TBYTE
  5355. Fpad1 TBYTE
  5356. FsequenceNumber TCARD16
  5357. Flength TCARD32
  5358. FnameLength TCARD16
  5359. Fpad2 TCARD16
  5360. Fpad3 TCARD32
  5361. Fpad4 TCARD32
  5362. Fpad5 TCARD32
  5363. Fpad6 TCARD32
  5364. Fpad7 TCARD32
  5365. }
  5366. type TxGetPropertyReply = struct {
  5367. Ftype1 TBYTE
  5368. Fformat TCARD8
  5369. FsequenceNumber TCARD16
  5370. Flength TCARD32
  5371. FpropertyType TCARD32
  5372. FbytesAfter TCARD32
  5373. FnItems TCARD32
  5374. Fpad1 TCARD32
  5375. Fpad2 TCARD32
  5376. Fpad3 TCARD32
  5377. }
  5378. type TxListPropertiesReply = struct {
  5379. Ftype1 TBYTE
  5380. Fpad1 TBYTE
  5381. FsequenceNumber TCARD16
  5382. Flength TCARD32
  5383. FnProperties TCARD16
  5384. Fpad2 TCARD16
  5385. Fpad3 TCARD32
  5386. Fpad4 TCARD32
  5387. Fpad5 TCARD32
  5388. Fpad6 TCARD32
  5389. Fpad7 TCARD32
  5390. }
  5391. type TxGetSelectionOwnerReply = struct {
  5392. Ftype1 TBYTE
  5393. Fpad1 TBYTE
  5394. FsequenceNumber TCARD16
  5395. Flength TCARD32
  5396. Fowner TCARD32
  5397. Fpad2 TCARD32
  5398. Fpad3 TCARD32
  5399. Fpad4 TCARD32
  5400. Fpad5 TCARD32
  5401. Fpad6 TCARD32
  5402. }
  5403. type TxGrabPointerReply = struct {
  5404. Ftype1 TBYTE
  5405. Fstatus TBYTE
  5406. FsequenceNumber TCARD16
  5407. Flength TCARD32
  5408. Fpad1 TCARD32
  5409. Fpad2 TCARD32
  5410. Fpad3 TCARD32
  5411. Fpad4 TCARD32
  5412. Fpad5 TCARD32
  5413. Fpad6 TCARD32
  5414. }
  5415. type TxGrabKeyboardReply = struct {
  5416. Ftype1 TBYTE
  5417. Fstatus TBYTE
  5418. FsequenceNumber TCARD16
  5419. Flength TCARD32
  5420. Fpad1 TCARD32
  5421. Fpad2 TCARD32
  5422. Fpad3 TCARD32
  5423. Fpad4 TCARD32
  5424. Fpad5 TCARD32
  5425. Fpad6 TCARD32
  5426. }
  5427. type TxQueryPointerReply = struct {
  5428. Ftype1 TBYTE
  5429. FsameScreen TBOOL
  5430. FsequenceNumber TCARD16
  5431. Flength TCARD32
  5432. Froot TCARD32
  5433. Fchild TCARD32
  5434. FrootX TINT16
  5435. FrootY TINT16
  5436. FwinX TINT16
  5437. FwinY TINT16
  5438. Fmask TCARD16
  5439. Fpad1 TCARD16
  5440. Fpad TCARD32
  5441. }
  5442. type TxGetMotionEventsReply = struct {
  5443. Ftype1 TBYTE
  5444. Fpad1 TBYTE
  5445. FsequenceNumber TCARD16
  5446. Flength TCARD32
  5447. FnEvents TCARD32
  5448. Fpad2 TCARD32
  5449. Fpad3 TCARD32
  5450. Fpad4 TCARD32
  5451. Fpad5 TCARD32
  5452. Fpad6 TCARD32
  5453. }
  5454. type TxTranslateCoordsReply = struct {
  5455. Ftype1 TBYTE
  5456. FsameScreen TBOOL
  5457. FsequenceNumber TCARD16
  5458. Flength TCARD32
  5459. Fchild TCARD32
  5460. FdstX TINT16
  5461. FdstY TINT16
  5462. Fpad2 TCARD32
  5463. Fpad3 TCARD32
  5464. Fpad4 TCARD32
  5465. Fpad5 TCARD32
  5466. }
  5467. type TxGetInputFocusReply = struct {
  5468. Ftype1 TBYTE
  5469. FrevertTo TCARD8
  5470. FsequenceNumber TCARD16
  5471. Flength TCARD32
  5472. Ffocus TCARD32
  5473. Fpad1 TCARD32
  5474. Fpad2 TCARD32
  5475. Fpad3 TCARD32
  5476. Fpad4 TCARD32
  5477. Fpad5 TCARD32
  5478. }
  5479. type TxQueryKeymapReply = struct {
  5480. Ftype1 TBYTE
  5481. Fpad1 TBYTE
  5482. FsequenceNumber TCARD16
  5483. Flength TCARD32
  5484. Fmap1 [32]TBYTE
  5485. }
  5486. type TxQueryFontReply = struct {
  5487. Ftype1 TBYTE
  5488. Fpad1 TBYTE
  5489. FsequenceNumber TCARD16
  5490. Flength TCARD32
  5491. FminBounds TxCharInfo
  5492. Fwalign1 TCARD32
  5493. FmaxBounds TxCharInfo
  5494. Fwalign2 TCARD32
  5495. FminCharOrByte2 TCARD16
  5496. FmaxCharOrByte2 TCARD16
  5497. FdefaultChar TCARD16
  5498. FnFontProps TCARD16
  5499. FdrawDirection TCARD8
  5500. FminByte1 TCARD8
  5501. FmaxByte1 TCARD8
  5502. FallCharsExist TBOOL
  5503. FfontAscent TINT16
  5504. FfontDescent TINT16
  5505. FnCharInfos TCARD32
  5506. }
  5507. type T_xQueryFontReply = TxQueryFontReply
  5508. type TxQueryTextExtentsReply = struct {
  5509. Ftype1 TBYTE
  5510. FdrawDirection TCARD8
  5511. FsequenceNumber TCARD16
  5512. Flength TCARD32
  5513. FfontAscent TINT16
  5514. FfontDescent TINT16
  5515. FoverallAscent TINT16
  5516. FoverallDescent TINT16
  5517. FoverallWidth TINT32
  5518. FoverallLeft TINT32
  5519. FoverallRight TINT32
  5520. Fpad TCARD32
  5521. }
  5522. type TxListFontsReply = struct {
  5523. Ftype1 TBYTE
  5524. Fpad1 TBYTE
  5525. FsequenceNumber TCARD16
  5526. Flength TCARD32
  5527. FnFonts TCARD16
  5528. Fpad2 TCARD16
  5529. Fpad3 TCARD32
  5530. Fpad4 TCARD32
  5531. Fpad5 TCARD32
  5532. Fpad6 TCARD32
  5533. Fpad7 TCARD32
  5534. }
  5535. type TxListFontsWithInfoReply = struct {
  5536. Ftype1 TBYTE
  5537. FnameLength TCARD8
  5538. FsequenceNumber TCARD16
  5539. Flength TCARD32
  5540. FminBounds TxCharInfo
  5541. Fwalign1 TCARD32
  5542. FmaxBounds TxCharInfo
  5543. Fwalign2 TCARD32
  5544. FminCharOrByte2 TCARD16
  5545. FmaxCharOrByte2 TCARD16
  5546. FdefaultChar TCARD16
  5547. FnFontProps TCARD16
  5548. FdrawDirection TCARD8
  5549. FminByte1 TCARD8
  5550. FmaxByte1 TCARD8
  5551. FallCharsExist TBOOL
  5552. FfontAscent TINT16
  5553. FfontDescent TINT16
  5554. FnReplies TCARD32
  5555. }
  5556. type TxGetFontPathReply = struct {
  5557. Ftype1 TBYTE
  5558. Fpad1 TBYTE
  5559. FsequenceNumber TCARD16
  5560. Flength TCARD32
  5561. FnPaths TCARD16
  5562. Fpad2 TCARD16
  5563. Fpad3 TCARD32
  5564. Fpad4 TCARD32
  5565. Fpad5 TCARD32
  5566. Fpad6 TCARD32
  5567. Fpad7 TCARD32
  5568. }
  5569. type TxGetImageReply = struct {
  5570. Ftype1 TBYTE
  5571. Fdepth TCARD8
  5572. FsequenceNumber TCARD16
  5573. Flength TCARD32
  5574. Fvisual TCARD32
  5575. Fpad3 TCARD32
  5576. Fpad4 TCARD32
  5577. Fpad5 TCARD32
  5578. Fpad6 TCARD32
  5579. Fpad7 TCARD32
  5580. }
  5581. type TxListInstalledColormapsReply = struct {
  5582. Ftype1 TBYTE
  5583. Fpad1 TBYTE
  5584. FsequenceNumber TCARD16
  5585. Flength TCARD32
  5586. FnColormaps TCARD16
  5587. Fpad2 TCARD16
  5588. Fpad3 TCARD32
  5589. Fpad4 TCARD32
  5590. Fpad5 TCARD32
  5591. Fpad6 TCARD32
  5592. Fpad7 TCARD32
  5593. }
  5594. type TxAllocColorReply = struct {
  5595. Ftype1 TBYTE
  5596. Fpad1 TBYTE
  5597. FsequenceNumber TCARD16
  5598. Flength TCARD32
  5599. Fred TCARD16
  5600. Fgreen TCARD16
  5601. Fblue TCARD16
  5602. Fpad2 TCARD16
  5603. Fpixel TCARD32
  5604. Fpad3 TCARD32
  5605. Fpad4 TCARD32
  5606. Fpad5 TCARD32
  5607. }
  5608. type TxAllocNamedColorReply = struct {
  5609. Ftype1 TBYTE
  5610. Fpad1 TBYTE
  5611. FsequenceNumber TCARD16
  5612. Flength TCARD32
  5613. Fpixel TCARD32
  5614. FexactRed TCARD16
  5615. FexactGreen TCARD16
  5616. FexactBlue TCARD16
  5617. FscreenRed TCARD16
  5618. FscreenGreen TCARD16
  5619. FscreenBlue TCARD16
  5620. Fpad2 TCARD32
  5621. Fpad3 TCARD32
  5622. }
  5623. type TxAllocColorCellsReply = struct {
  5624. Ftype1 TBYTE
  5625. Fpad1 TBYTE
  5626. FsequenceNumber TCARD16
  5627. Flength TCARD32
  5628. FnPixels TCARD16
  5629. FnMasks TCARD16
  5630. Fpad3 TCARD32
  5631. Fpad4 TCARD32
  5632. Fpad5 TCARD32
  5633. Fpad6 TCARD32
  5634. Fpad7 TCARD32
  5635. }
  5636. type TxAllocColorPlanesReply = struct {
  5637. Ftype1 TBYTE
  5638. Fpad1 TBYTE
  5639. FsequenceNumber TCARD16
  5640. Flength TCARD32
  5641. FnPixels TCARD16
  5642. Fpad2 TCARD16
  5643. FredMask TCARD32
  5644. FgreenMask TCARD32
  5645. FblueMask TCARD32
  5646. Fpad3 TCARD32
  5647. Fpad4 TCARD32
  5648. }
  5649. type TxQueryColorsReply = struct {
  5650. Ftype1 TBYTE
  5651. Fpad1 TBYTE
  5652. FsequenceNumber TCARD16
  5653. Flength TCARD32
  5654. FnColors TCARD16
  5655. Fpad2 TCARD16
  5656. Fpad3 TCARD32
  5657. Fpad4 TCARD32
  5658. Fpad5 TCARD32
  5659. Fpad6 TCARD32
  5660. Fpad7 TCARD32
  5661. }
  5662. type TxLookupColorReply = struct {
  5663. Ftype1 TBYTE
  5664. Fpad1 TBYTE
  5665. FsequenceNumber TCARD16
  5666. Flength TCARD32
  5667. FexactRed TCARD16
  5668. FexactGreen TCARD16
  5669. FexactBlue TCARD16
  5670. FscreenRed TCARD16
  5671. FscreenGreen TCARD16
  5672. FscreenBlue TCARD16
  5673. Fpad3 TCARD32
  5674. Fpad4 TCARD32
  5675. Fpad5 TCARD32
  5676. }
  5677. type TxQueryBestSizeReply = struct {
  5678. Ftype1 TBYTE
  5679. Fpad1 TBYTE
  5680. FsequenceNumber TCARD16
  5681. Flength TCARD32
  5682. Fwidth TCARD16
  5683. Fheight TCARD16
  5684. Fpad3 TCARD32
  5685. Fpad4 TCARD32
  5686. Fpad5 TCARD32
  5687. Fpad6 TCARD32
  5688. Fpad7 TCARD32
  5689. }
  5690. type TxQueryExtensionReply = struct {
  5691. Ftype1 TBYTE
  5692. Fpad1 TBYTE
  5693. FsequenceNumber TCARD16
  5694. Flength TCARD32
  5695. Fpresent TBOOL
  5696. Fmajor_opcode TCARD8
  5697. Ffirst_event TCARD8
  5698. Ffirst_error TCARD8
  5699. Fpad3 TCARD32
  5700. Fpad4 TCARD32
  5701. Fpad5 TCARD32
  5702. Fpad6 TCARD32
  5703. Fpad7 TCARD32
  5704. }
  5705. type TxListExtensionsReply = struct {
  5706. Ftype1 TBYTE
  5707. FnExtensions TCARD8
  5708. FsequenceNumber TCARD16
  5709. Flength TCARD32
  5710. Fpad2 TCARD32
  5711. Fpad3 TCARD32
  5712. Fpad4 TCARD32
  5713. Fpad5 TCARD32
  5714. Fpad6 TCARD32
  5715. Fpad7 TCARD32
  5716. }
  5717. type TxSetMappingReply = struct {
  5718. Ftype1 TBYTE
  5719. Fsuccess TCARD8
  5720. FsequenceNumber TCARD16
  5721. Flength TCARD32
  5722. Fpad2 TCARD32
  5723. Fpad3 TCARD32
  5724. Fpad4 TCARD32
  5725. Fpad5 TCARD32
  5726. Fpad6 TCARD32
  5727. Fpad7 TCARD32
  5728. }
  5729. type TxSetPointerMappingReply = struct {
  5730. Ftype1 TBYTE
  5731. Fsuccess TCARD8
  5732. FsequenceNumber TCARD16
  5733. Flength TCARD32
  5734. Fpad2 TCARD32
  5735. Fpad3 TCARD32
  5736. Fpad4 TCARD32
  5737. Fpad5 TCARD32
  5738. Fpad6 TCARD32
  5739. Fpad7 TCARD32
  5740. }
  5741. type TxSetModifierMappingReply = struct {
  5742. Ftype1 TBYTE
  5743. Fsuccess TCARD8
  5744. FsequenceNumber TCARD16
  5745. Flength TCARD32
  5746. Fpad2 TCARD32
  5747. Fpad3 TCARD32
  5748. Fpad4 TCARD32
  5749. Fpad5 TCARD32
  5750. Fpad6 TCARD32
  5751. Fpad7 TCARD32
  5752. }
  5753. type TxGetPointerMappingReply = struct {
  5754. Ftype1 TBYTE
  5755. FnElts TCARD8
  5756. FsequenceNumber TCARD16
  5757. Flength TCARD32
  5758. Fpad2 TCARD32
  5759. Fpad3 TCARD32
  5760. Fpad4 TCARD32
  5761. Fpad5 TCARD32
  5762. Fpad6 TCARD32
  5763. Fpad7 TCARD32
  5764. }
  5765. type TxGetKeyboardMappingReply = struct {
  5766. Ftype1 TBYTE
  5767. FkeySymsPerKeyCode TCARD8
  5768. FsequenceNumber TCARD16
  5769. Flength TCARD32
  5770. Fpad2 TCARD32
  5771. Fpad3 TCARD32
  5772. Fpad4 TCARD32
  5773. Fpad5 TCARD32
  5774. Fpad6 TCARD32
  5775. Fpad7 TCARD32
  5776. }
  5777. type TxGetModifierMappingReply = struct {
  5778. Ftype1 TBYTE
  5779. FnumKeyPerModifier TCARD8
  5780. FsequenceNumber TCARD16
  5781. Flength TCARD32
  5782. Fpad1 TCARD32
  5783. Fpad2 TCARD32
  5784. Fpad3 TCARD32
  5785. Fpad4 TCARD32
  5786. Fpad5 TCARD32
  5787. Fpad6 TCARD32
  5788. }
  5789. type TxGetKeyboardControlReply = struct {
  5790. Ftype1 TBYTE
  5791. FglobalAutoRepeat TBOOL
  5792. FsequenceNumber TCARD16
  5793. Flength TCARD32
  5794. FledMask TCARD32
  5795. FkeyClickPercent TCARD8
  5796. FbellPercent TCARD8
  5797. FbellPitch TCARD16
  5798. FbellDuration TCARD16
  5799. Fpad TCARD16
  5800. Fmap1 [32]TBYTE
  5801. }
  5802. type TxGetPointerControlReply = struct {
  5803. Ftype1 TBYTE
  5804. Fpad1 TBYTE
  5805. FsequenceNumber TCARD16
  5806. Flength TCARD32
  5807. FaccelNumerator TCARD16
  5808. FaccelDenominator TCARD16
  5809. Fthreshold TCARD16
  5810. Fpad2 TCARD16
  5811. Fpad3 TCARD32
  5812. Fpad4 TCARD32
  5813. Fpad5 TCARD32
  5814. Fpad6 TCARD32
  5815. }
  5816. type TxGetScreenSaverReply = struct {
  5817. Ftype1 TBYTE
  5818. Fpad1 TBYTE
  5819. FsequenceNumber TCARD16
  5820. Flength TCARD32
  5821. Ftimeout TCARD16
  5822. Finterval TCARD16
  5823. FpreferBlanking TBOOL
  5824. FallowExposures TBOOL
  5825. Fpad2 TCARD16
  5826. Fpad3 TCARD32
  5827. Fpad4 TCARD32
  5828. Fpad5 TCARD32
  5829. Fpad6 TCARD32
  5830. }
  5831. type TxListHostsReply = struct {
  5832. Ftype1 TBYTE
  5833. Fenabled TBOOL
  5834. FsequenceNumber TCARD16
  5835. Flength TCARD32
  5836. FnHosts TCARD16
  5837. Fpad1 TCARD16
  5838. Fpad3 TCARD32
  5839. Fpad4 TCARD32
  5840. Fpad5 TCARD32
  5841. Fpad6 TCARD32
  5842. Fpad7 TCARD32
  5843. }
  5844. type TxError = struct {
  5845. Ftype1 TBYTE
  5846. FerrorCode TBYTE
  5847. FsequenceNumber TCARD16
  5848. FresourceID TCARD32
  5849. FminorCode TCARD16
  5850. FmajorCode TCARD8
  5851. Fpad1 TBYTE
  5852. Fpad3 TCARD32
  5853. Fpad4 TCARD32
  5854. Fpad5 TCARD32
  5855. Fpad6 TCARD32
  5856. Fpad7 TCARD32
  5857. }
  5858. type TxEvent = struct {
  5859. Fu struct {
  5860. FkeyButtonPointer [0]struct {
  5861. Fpad00 TCARD32
  5862. Ftime TCARD32
  5863. Froot TCARD32
  5864. Fevent TCARD32
  5865. Fchild TCARD32
  5866. FrootX TINT16
  5867. FrootY TINT16
  5868. FeventX TINT16
  5869. FeventY TINT16
  5870. Fstate TKeyButMask
  5871. FsameScreen TBOOL
  5872. Fpad1 TBYTE
  5873. }
  5874. FenterLeave [0]struct {
  5875. Fpad00 TCARD32
  5876. Ftime TCARD32
  5877. Froot TCARD32
  5878. Fevent TCARD32
  5879. Fchild TCARD32
  5880. FrootX TINT16
  5881. FrootY TINT16
  5882. FeventX TINT16
  5883. FeventY TINT16
  5884. Fstate TKeyButMask
  5885. Fmode TBYTE
  5886. Fflags TBYTE
  5887. }
  5888. Ffocus [0]struct {
  5889. Fpad00 TCARD32
  5890. Fwindow TCARD32
  5891. Fmode TBYTE
  5892. Fpad1 TBYTE
  5893. Fpad2 TBYTE
  5894. Fpad3 TBYTE
  5895. }
  5896. Fexpose [0]struct {
  5897. Fpad00 TCARD32
  5898. Fwindow TCARD32
  5899. Fx TCARD16
  5900. Fy TCARD16
  5901. Fwidth TCARD16
  5902. Fheight TCARD16
  5903. Fcount TCARD16
  5904. Fpad2 TCARD16
  5905. }
  5906. FgraphicsExposure [0]struct {
  5907. Fpad00 TCARD32
  5908. Fdrawable TCARD32
  5909. Fx TCARD16
  5910. Fy TCARD16
  5911. Fwidth TCARD16
  5912. Fheight TCARD16
  5913. FminorEvent TCARD16
  5914. Fcount TCARD16
  5915. FmajorEvent TBYTE
  5916. Fpad1 TBYTE
  5917. Fpad2 TBYTE
  5918. Fpad3 TBYTE
  5919. }
  5920. FnoExposure [0]struct {
  5921. Fpad00 TCARD32
  5922. Fdrawable TCARD32
  5923. FminorEvent TCARD16
  5924. FmajorEvent TBYTE
  5925. Fbpad TBYTE
  5926. }
  5927. Fvisibility [0]struct {
  5928. Fpad00 TCARD32
  5929. Fwindow TCARD32
  5930. Fstate TCARD8
  5931. Fpad1 TBYTE
  5932. Fpad2 TBYTE
  5933. Fpad3 TBYTE
  5934. }
  5935. FcreateNotify [0]struct {
  5936. Fpad00 TCARD32
  5937. Fparent TCARD32
  5938. Fwindow TCARD32
  5939. Fx TINT16
  5940. Fy TINT16
  5941. Fwidth TCARD16
  5942. Fheight TCARD16
  5943. FborderWidth TCARD16
  5944. Foverride TBOOL
  5945. Fbpad TBYTE
  5946. }
  5947. FdestroyNotify [0]struct {
  5948. Fpad00 TCARD32
  5949. Fevent TCARD32
  5950. Fwindow TCARD32
  5951. }
  5952. FunmapNotify [0]struct {
  5953. Fpad00 TCARD32
  5954. Fevent TCARD32
  5955. Fwindow TCARD32
  5956. FfromConfigure TBOOL
  5957. Fpad1 TBYTE
  5958. Fpad2 TBYTE
  5959. Fpad3 TBYTE
  5960. }
  5961. FmapNotify [0]struct {
  5962. Fpad00 TCARD32
  5963. Fevent TCARD32
  5964. Fwindow TCARD32
  5965. Foverride TBOOL
  5966. Fpad1 TBYTE
  5967. Fpad2 TBYTE
  5968. Fpad3 TBYTE
  5969. }
  5970. FmapRequest [0]struct {
  5971. Fpad00 TCARD32
  5972. Fparent TCARD32
  5973. Fwindow TCARD32
  5974. }
  5975. Freparent [0]struct {
  5976. Fpad00 TCARD32
  5977. Fevent TCARD32
  5978. Fwindow TCARD32
  5979. Fparent TCARD32
  5980. Fx TINT16
  5981. Fy TINT16
  5982. Foverride TBOOL
  5983. Fpad1 TBYTE
  5984. Fpad2 TBYTE
  5985. Fpad3 TBYTE
  5986. }
  5987. FconfigureNotify [0]struct {
  5988. Fpad00 TCARD32
  5989. Fevent TCARD32
  5990. Fwindow TCARD32
  5991. FaboveSibling TCARD32
  5992. Fx TINT16
  5993. Fy TINT16
  5994. Fwidth TCARD16
  5995. Fheight TCARD16
  5996. FborderWidth TCARD16
  5997. Foverride TBOOL
  5998. Fbpad TBYTE
  5999. }
  6000. FconfigureRequest [0]struct {
  6001. Fpad00 TCARD32
  6002. Fparent TCARD32
  6003. Fwindow TCARD32
  6004. Fsibling TCARD32
  6005. Fx TINT16
  6006. Fy TINT16
  6007. Fwidth TCARD16
  6008. Fheight TCARD16
  6009. FborderWidth TCARD16
  6010. FvalueMask TCARD16
  6011. Fpad1 TCARD32
  6012. }
  6013. Fgravity [0]struct {
  6014. Fpad00 TCARD32
  6015. Fevent TCARD32
  6016. Fwindow TCARD32
  6017. Fx TINT16
  6018. Fy TINT16
  6019. Fpad1 TCARD32
  6020. Fpad2 TCARD32
  6021. Fpad3 TCARD32
  6022. Fpad4 TCARD32
  6023. }
  6024. FresizeRequest [0]struct {
  6025. Fpad00 TCARD32
  6026. Fwindow TCARD32
  6027. Fwidth TCARD16
  6028. Fheight TCARD16
  6029. }
  6030. Fcirculate [0]struct {
  6031. Fpad00 TCARD32
  6032. Fevent TCARD32
  6033. Fwindow TCARD32
  6034. Fparent TCARD32
  6035. Fplace TBYTE
  6036. Fpad1 TBYTE
  6037. Fpad2 TBYTE
  6038. Fpad3 TBYTE
  6039. }
  6040. Fproperty [0]struct {
  6041. Fpad00 TCARD32
  6042. Fwindow TCARD32
  6043. Fatom TCARD32
  6044. Ftime TCARD32
  6045. Fstate TBYTE
  6046. Fpad1 TBYTE
  6047. Fpad2 TCARD16
  6048. }
  6049. FselectionClear [0]struct {
  6050. Fpad00 TCARD32
  6051. Ftime TCARD32
  6052. Fwindow TCARD32
  6053. Fatom TCARD32
  6054. }
  6055. FselectionRequest [0]struct {
  6056. Fpad00 TCARD32
  6057. Ftime TCARD32
  6058. Fowner TCARD32
  6059. Frequestor TCARD32
  6060. Fselection TCARD32
  6061. Ftarget TCARD32
  6062. Fproperty TCARD32
  6063. }
  6064. FselectionNotify [0]struct {
  6065. Fpad00 TCARD32
  6066. Ftime TCARD32
  6067. Frequestor TCARD32
  6068. Fselection TCARD32
  6069. Ftarget TCARD32
  6070. Fproperty TCARD32
  6071. }
  6072. Fcolormap [0]struct {
  6073. Fpad00 TCARD32
  6074. Fwindow TCARD32
  6075. Fcolormap TCARD32
  6076. Fnew1 TBOOL
  6077. Fstate TBYTE
  6078. Fpad1 TBYTE
  6079. Fpad2 TBYTE
  6080. }
  6081. FmappingNotify [0]struct {
  6082. Fpad00 TCARD32
  6083. Frequest TCARD8
  6084. FfirstKeyCode TCARD8
  6085. Fcount TCARD8
  6086. Fpad1 TBYTE
  6087. }
  6088. FclientMessage [0]struct {
  6089. Fpad00 TCARD32
  6090. Fwindow TCARD32
  6091. Fu struct {
  6092. Fs [0]struct {
  6093. Ftype1 TCARD32
  6094. Fshorts0 TINT16
  6095. Fshorts1 TINT16
  6096. Fshorts2 TINT16
  6097. Fshorts3 TINT16
  6098. Fshorts4 TINT16
  6099. Fshorts5 TINT16
  6100. Fshorts6 TINT16
  6101. Fshorts7 TINT16
  6102. Fshorts8 TINT16
  6103. Fshorts9 TINT16
  6104. }
  6105. Fb [0]struct {
  6106. Ftype1 TCARD32
  6107. Fbytes [20]TINT8
  6108. }
  6109. Fl struct {
  6110. Ftype1 TCARD32
  6111. Flongs0 TINT32
  6112. Flongs1 TINT32
  6113. Flongs2 TINT32
  6114. Flongs3 TINT32
  6115. Flongs4 TINT32
  6116. }
  6117. }
  6118. }
  6119. Fu struct {
  6120. Ftype1 TBYTE
  6121. Fdetail TBYTE
  6122. FsequenceNumber TCARD16
  6123. }
  6124. F__ccgo_pad26 [28]byte
  6125. }
  6126. }
  6127. type T_xEvent = TxEvent
  6128. type TxGenericEvent = struct {
  6129. Ftype1 TBYTE
  6130. Fextension TCARD8
  6131. FsequenceNumber TCARD16
  6132. Flength TCARD32
  6133. Fevtype TCARD16
  6134. Fpad2 TCARD16
  6135. Fpad3 TCARD32
  6136. Fpad4 TCARD32
  6137. Fpad5 TCARD32
  6138. Fpad6 TCARD32
  6139. Fpad7 TCARD32
  6140. }
  6141. type TxKeymapEvent = struct {
  6142. Ftype1 TBYTE
  6143. Fmap1 [31]TBYTE
  6144. }
  6145. type TxReply = struct {
  6146. Fgeom [0]TxGetGeometryReply
  6147. Ftree [0]TxQueryTreeReply
  6148. Fatom [0]TxInternAtomReply
  6149. FatomName [0]TxGetAtomNameReply
  6150. Fproperty [0]TxGetPropertyReply
  6151. FlistProperties [0]TxListPropertiesReply
  6152. Fselection [0]TxGetSelectionOwnerReply
  6153. FgrabPointer [0]TxGrabPointerReply
  6154. FgrabKeyboard [0]TxGrabKeyboardReply
  6155. Fpointer [0]TxQueryPointerReply
  6156. FmotionEvents [0]TxGetMotionEventsReply
  6157. Fcoords [0]TxTranslateCoordsReply
  6158. FinputFocus [0]TxGetInputFocusReply
  6159. FtextExtents [0]TxQueryTextExtentsReply
  6160. Ffonts [0]TxListFontsReply
  6161. FfontPath [0]TxGetFontPathReply
  6162. Fimage [0]TxGetImageReply
  6163. Fcolormaps [0]TxListInstalledColormapsReply
  6164. FallocColor [0]TxAllocColorReply
  6165. FallocNamedColor [0]TxAllocNamedColorReply
  6166. FcolorCells [0]TxAllocColorCellsReply
  6167. FcolorPlanes [0]TxAllocColorPlanesReply
  6168. Fcolors [0]TxQueryColorsReply
  6169. FlookupColor [0]TxLookupColorReply
  6170. FbestSize [0]TxQueryBestSizeReply
  6171. Fextension [0]TxQueryExtensionReply
  6172. Fextensions [0]TxListExtensionsReply
  6173. FsetModifierMapping [0]TxSetModifierMappingReply
  6174. FgetModifierMapping [0]TxGetModifierMappingReply
  6175. FsetPointerMapping [0]TxSetPointerMappingReply
  6176. FgetKeyboardMapping [0]TxGetKeyboardMappingReply
  6177. FgetPointerMapping [0]TxGetPointerMappingReply
  6178. FpointerControl [0]TxGetPointerControlReply
  6179. FscreenSaver [0]TxGetScreenSaverReply
  6180. Fhosts [0]TxListHostsReply
  6181. Ferror1 [0]TxError
  6182. Fevent [0]TxEvent
  6183. Fgeneric TxGenericReply
  6184. }
  6185. type TxReq = struct {
  6186. FreqType TCARD8
  6187. Fdata TCARD8
  6188. Flength TCARD16
  6189. }
  6190. type T_xReq = TxReq
  6191. type TxResourceReq = struct {
  6192. FreqType TCARD8
  6193. Fpad TBYTE
  6194. Flength TCARD16
  6195. Fid TCARD32
  6196. }
  6197. type TxCreateWindowReq = struct {
  6198. FreqType TCARD8
  6199. Fdepth TCARD8
  6200. Flength TCARD16
  6201. Fwid TCARD32
  6202. Fparent TCARD32
  6203. Fx TINT16
  6204. Fy TINT16
  6205. Fwidth TCARD16
  6206. Fheight TCARD16
  6207. FborderWidth TCARD16
  6208. Fclass TCARD16
  6209. Fvisual TCARD32
  6210. Fmask TCARD32
  6211. }
  6212. type TxChangeWindowAttributesReq = struct {
  6213. FreqType TCARD8
  6214. Fpad TBYTE
  6215. Flength TCARD16
  6216. Fwindow TCARD32
  6217. FvalueMask TCARD32
  6218. }
  6219. type TxChangeSaveSetReq = struct {
  6220. FreqType TCARD8
  6221. Fmode TBYTE
  6222. Flength TCARD16
  6223. Fwindow TCARD32
  6224. }
  6225. type TxReparentWindowReq = struct {
  6226. FreqType TCARD8
  6227. Fpad TBYTE
  6228. Flength TCARD16
  6229. Fwindow TCARD32
  6230. Fparent TCARD32
  6231. Fx TINT16
  6232. Fy TINT16
  6233. }
  6234. type TxConfigureWindowReq = struct {
  6235. FreqType TCARD8
  6236. Fpad TCARD8
  6237. Flength TCARD16
  6238. Fwindow TCARD32
  6239. Fmask TCARD16
  6240. Fpad2 TCARD16
  6241. }
  6242. type TxCirculateWindowReq = struct {
  6243. FreqType TCARD8
  6244. Fdirection TCARD8
  6245. Flength TCARD16
  6246. Fwindow TCARD32
  6247. }
  6248. type TxInternAtomReq = struct {
  6249. FreqType TCARD8
  6250. FonlyIfExists TBOOL
  6251. Flength TCARD16
  6252. Fnbytes TCARD16
  6253. Fpad TCARD16
  6254. }
  6255. type TxChangePropertyReq = struct {
  6256. FreqType TCARD8
  6257. Fmode TCARD8
  6258. Flength TCARD16
  6259. Fwindow TCARD32
  6260. Fproperty TCARD32
  6261. Ftype1 TCARD32
  6262. Fformat TCARD8
  6263. Fpad [3]TBYTE
  6264. FnUnits TCARD32
  6265. }
  6266. type TxDeletePropertyReq = struct {
  6267. FreqType TCARD8
  6268. Fpad TBYTE
  6269. Flength TCARD16
  6270. Fwindow TCARD32
  6271. Fproperty TCARD32
  6272. }
  6273. type TxGetPropertyReq = struct {
  6274. FreqType TCARD8
  6275. Fdelete1 TBOOL
  6276. Flength TCARD16
  6277. Fwindow TCARD32
  6278. Fproperty TCARD32
  6279. Ftype1 TCARD32
  6280. FlongOffset TCARD32
  6281. FlongLength TCARD32
  6282. }
  6283. type TxSetSelectionOwnerReq = struct {
  6284. FreqType TCARD8
  6285. Fpad TBYTE
  6286. Flength TCARD16
  6287. Fwindow TCARD32
  6288. Fselection TCARD32
  6289. Ftime TCARD32
  6290. }
  6291. type TxConvertSelectionReq = struct {
  6292. FreqType TCARD8
  6293. Fpad TBYTE
  6294. Flength TCARD16
  6295. Frequestor TCARD32
  6296. Fselection TCARD32
  6297. Ftarget TCARD32
  6298. Fproperty TCARD32
  6299. Ftime TCARD32
  6300. }
  6301. type TxSendEventReq = struct {
  6302. FreqType TCARD8
  6303. Fpropagate TBOOL
  6304. Flength TCARD16
  6305. Fdestination TCARD32
  6306. FeventMask TCARD32
  6307. Fevent TxEvent
  6308. }
  6309. type TxGrabPointerReq = struct {
  6310. FreqType TCARD8
  6311. FownerEvents TBOOL
  6312. Flength TCARD16
  6313. FgrabWindow TCARD32
  6314. FeventMask TCARD16
  6315. FpointerMode TBYTE
  6316. FkeyboardMode TBYTE
  6317. FconfineTo TCARD32
  6318. Fcursor TCARD32
  6319. Ftime TCARD32
  6320. }
  6321. type TxGrabButtonReq = struct {
  6322. FreqType TCARD8
  6323. FownerEvents TBOOL
  6324. Flength TCARD16
  6325. FgrabWindow TCARD32
  6326. FeventMask TCARD16
  6327. FpointerMode TBYTE
  6328. FkeyboardMode TBYTE
  6329. FconfineTo TCARD32
  6330. Fcursor TCARD32
  6331. Fbutton TCARD8
  6332. Fpad TBYTE
  6333. Fmodifiers TCARD16
  6334. }
  6335. type TxUngrabButtonReq = struct {
  6336. FreqType TCARD8
  6337. Fbutton TCARD8
  6338. Flength TCARD16
  6339. FgrabWindow TCARD32
  6340. Fmodifiers TCARD16
  6341. Fpad TCARD16
  6342. }
  6343. type TxChangeActivePointerGrabReq = struct {
  6344. FreqType TCARD8
  6345. Fpad TBYTE
  6346. Flength TCARD16
  6347. Fcursor TCARD32
  6348. Ftime TCARD32
  6349. FeventMask TCARD16
  6350. Fpad2 TCARD16
  6351. }
  6352. type TxGrabKeyboardReq = struct {
  6353. FreqType TCARD8
  6354. FownerEvents TBOOL
  6355. Flength TCARD16
  6356. FgrabWindow TCARD32
  6357. Ftime TCARD32
  6358. FpointerMode TBYTE
  6359. FkeyboardMode TBYTE
  6360. Fpad TCARD16
  6361. }
  6362. type TxGrabKeyReq = struct {
  6363. FreqType TCARD8
  6364. FownerEvents TBOOL
  6365. Flength TCARD16
  6366. FgrabWindow TCARD32
  6367. Fmodifiers TCARD16
  6368. Fkey TCARD8
  6369. FpointerMode TBYTE
  6370. FkeyboardMode TBYTE
  6371. Fpad1 TBYTE
  6372. Fpad2 TBYTE
  6373. Fpad3 TBYTE
  6374. }
  6375. type TxUngrabKeyReq = struct {
  6376. FreqType TCARD8
  6377. Fkey TCARD8
  6378. Flength TCARD16
  6379. FgrabWindow TCARD32
  6380. Fmodifiers TCARD16
  6381. Fpad TCARD16
  6382. }
  6383. type TxAllowEventsReq = struct {
  6384. FreqType TCARD8
  6385. Fmode TCARD8
  6386. Flength TCARD16
  6387. Ftime TCARD32
  6388. }
  6389. type TxGetMotionEventsReq = struct {
  6390. FreqType TCARD8
  6391. Fpad TBYTE
  6392. Flength TCARD16
  6393. Fwindow TCARD32
  6394. Fstart TCARD32
  6395. Fstop TCARD32
  6396. }
  6397. type TxTranslateCoordsReq = struct {
  6398. FreqType TCARD8
  6399. Fpad TBYTE
  6400. Flength TCARD16
  6401. FsrcWid TCARD32
  6402. FdstWid TCARD32
  6403. FsrcX TINT16
  6404. FsrcY TINT16
  6405. }
  6406. type TxWarpPointerReq = struct {
  6407. FreqType TCARD8
  6408. Fpad TBYTE
  6409. Flength TCARD16
  6410. FsrcWid TCARD32
  6411. FdstWid TCARD32
  6412. FsrcX TINT16
  6413. FsrcY TINT16
  6414. FsrcWidth TCARD16
  6415. FsrcHeight TCARD16
  6416. FdstX TINT16
  6417. FdstY TINT16
  6418. }
  6419. type TxSetInputFocusReq = struct {
  6420. FreqType TCARD8
  6421. FrevertTo TCARD8
  6422. Flength TCARD16
  6423. Ffocus TCARD32
  6424. Ftime TCARD32
  6425. }
  6426. type TxOpenFontReq = struct {
  6427. FreqType TCARD8
  6428. Fpad TBYTE
  6429. Flength TCARD16
  6430. Ffid TCARD32
  6431. Fnbytes TCARD16
  6432. Fpad1 TBYTE
  6433. Fpad2 TBYTE
  6434. }
  6435. type TxQueryTextExtentsReq = struct {
  6436. FreqType TCARD8
  6437. FoddLength TBOOL
  6438. Flength TCARD16
  6439. Ffid TCARD32
  6440. }
  6441. type TxListFontsReq = struct {
  6442. FreqType TCARD8
  6443. Fpad TBYTE
  6444. Flength TCARD16
  6445. FmaxNames TCARD16
  6446. Fnbytes TCARD16
  6447. }
  6448. type TxListFontsWithInfoReq = struct {
  6449. FreqType TCARD8
  6450. Fpad TBYTE
  6451. Flength TCARD16
  6452. FmaxNames TCARD16
  6453. Fnbytes TCARD16
  6454. }
  6455. type TxSetFontPathReq = struct {
  6456. FreqType TCARD8
  6457. Fpad TBYTE
  6458. Flength TCARD16
  6459. FnFonts TCARD16
  6460. Fpad1 TBYTE
  6461. Fpad2 TBYTE
  6462. }
  6463. type TxCreatePixmapReq = struct {
  6464. FreqType TCARD8
  6465. Fdepth TCARD8
  6466. Flength TCARD16
  6467. Fpid TCARD32
  6468. Fdrawable TCARD32
  6469. Fwidth TCARD16
  6470. Fheight TCARD16
  6471. }
  6472. type TxCreateGCReq = struct {
  6473. FreqType TCARD8
  6474. Fpad TBYTE
  6475. Flength TCARD16
  6476. Fgc TCARD32
  6477. Fdrawable TCARD32
  6478. Fmask TCARD32
  6479. }
  6480. type TxChangeGCReq = struct {
  6481. FreqType TCARD8
  6482. Fpad TBYTE
  6483. Flength TCARD16
  6484. Fgc TCARD32
  6485. Fmask TCARD32
  6486. }
  6487. type TxCopyGCReq = struct {
  6488. FreqType TCARD8
  6489. Fpad TBYTE
  6490. Flength TCARD16
  6491. FsrcGC TCARD32
  6492. FdstGC TCARD32
  6493. Fmask TCARD32
  6494. }
  6495. type TxSetDashesReq = struct {
  6496. FreqType TCARD8
  6497. Fpad TBYTE
  6498. Flength TCARD16
  6499. Fgc TCARD32
  6500. FdashOffset TCARD16
  6501. FnDashes TCARD16
  6502. }
  6503. type TxSetClipRectanglesReq = struct {
  6504. FreqType TCARD8
  6505. Fordering TBYTE
  6506. Flength TCARD16
  6507. Fgc TCARD32
  6508. FxOrigin TINT16
  6509. FyOrigin TINT16
  6510. }
  6511. type TxClearAreaReq = struct {
  6512. FreqType TCARD8
  6513. Fexposures TBOOL
  6514. Flength TCARD16
  6515. Fwindow TCARD32
  6516. Fx TINT16
  6517. Fy TINT16
  6518. Fwidth TCARD16
  6519. Fheight TCARD16
  6520. }
  6521. type TxCopyAreaReq = struct {
  6522. FreqType TCARD8
  6523. Fpad TBYTE
  6524. Flength TCARD16
  6525. FsrcDrawable TCARD32
  6526. FdstDrawable TCARD32
  6527. Fgc TCARD32
  6528. FsrcX TINT16
  6529. FsrcY TINT16
  6530. FdstX TINT16
  6531. FdstY TINT16
  6532. Fwidth TCARD16
  6533. Fheight TCARD16
  6534. }
  6535. type TxCopyPlaneReq = struct {
  6536. FreqType TCARD8
  6537. Fpad TBYTE
  6538. Flength TCARD16
  6539. FsrcDrawable TCARD32
  6540. FdstDrawable TCARD32
  6541. Fgc TCARD32
  6542. FsrcX TINT16
  6543. FsrcY TINT16
  6544. FdstX TINT16
  6545. FdstY TINT16
  6546. Fwidth TCARD16
  6547. Fheight TCARD16
  6548. FbitPlane TCARD32
  6549. }
  6550. type TxPolyPointReq = struct {
  6551. FreqType TCARD8
  6552. FcoordMode TBYTE
  6553. Flength TCARD16
  6554. Fdrawable TCARD32
  6555. Fgc TCARD32
  6556. }
  6557. type TxPolyLineReq = struct {
  6558. FreqType TCARD8
  6559. FcoordMode TBYTE
  6560. Flength TCARD16
  6561. Fdrawable TCARD32
  6562. Fgc TCARD32
  6563. }
  6564. type TxPolySegmentReq = struct {
  6565. FreqType TCARD8
  6566. Fpad TBYTE
  6567. Flength TCARD16
  6568. Fdrawable TCARD32
  6569. Fgc TCARD32
  6570. }
  6571. type TxPolyArcReq = struct {
  6572. FreqType TCARD8
  6573. Fpad TBYTE
  6574. Flength TCARD16
  6575. Fdrawable TCARD32
  6576. Fgc TCARD32
  6577. }
  6578. type TxPolyRectangleReq = struct {
  6579. FreqType TCARD8
  6580. Fpad TBYTE
  6581. Flength TCARD16
  6582. Fdrawable TCARD32
  6583. Fgc TCARD32
  6584. }
  6585. type TxPolyFillRectangleReq = struct {
  6586. FreqType TCARD8
  6587. Fpad TBYTE
  6588. Flength TCARD16
  6589. Fdrawable TCARD32
  6590. Fgc TCARD32
  6591. }
  6592. type TxPolyFillArcReq = struct {
  6593. FreqType TCARD8
  6594. Fpad TBYTE
  6595. Flength TCARD16
  6596. Fdrawable TCARD32
  6597. Fgc TCARD32
  6598. }
  6599. type TxFillPolyReq = struct {
  6600. FreqType TCARD8
  6601. Fpad TBYTE
  6602. Flength TCARD16
  6603. Fdrawable TCARD32
  6604. Fgc TCARD32
  6605. Fshape TBYTE
  6606. FcoordMode TBYTE
  6607. Fpad1 TCARD16
  6608. }
  6609. type T_FillPolyReq = TxFillPolyReq
  6610. type TxPutImageReq = struct {
  6611. FreqType TCARD8
  6612. Fformat TCARD8
  6613. Flength TCARD16
  6614. Fdrawable TCARD32
  6615. Fgc TCARD32
  6616. Fwidth TCARD16
  6617. Fheight TCARD16
  6618. FdstX TINT16
  6619. FdstY TINT16
  6620. FleftPad TCARD8
  6621. Fdepth TCARD8
  6622. Fpad TCARD16
  6623. }
  6624. type T_PutImageReq = TxPutImageReq
  6625. type TxGetImageReq = struct {
  6626. FreqType TCARD8
  6627. Fformat TCARD8
  6628. Flength TCARD16
  6629. Fdrawable TCARD32
  6630. Fx TINT16
  6631. Fy TINT16
  6632. Fwidth TCARD16
  6633. Fheight TCARD16
  6634. FplaneMask TCARD32
  6635. }
  6636. type TxPolyTextReq = struct {
  6637. FreqType TCARD8
  6638. Fpad TCARD8
  6639. Flength TCARD16
  6640. Fdrawable TCARD32
  6641. Fgc TCARD32
  6642. Fx TINT16
  6643. Fy TINT16
  6644. }
  6645. type TxPolyText8Req = struct {
  6646. FreqType TCARD8
  6647. Fpad TCARD8
  6648. Flength TCARD16
  6649. Fdrawable TCARD32
  6650. Fgc TCARD32
  6651. Fx TINT16
  6652. Fy TINT16
  6653. }
  6654. type TxPolyText16Req = struct {
  6655. FreqType TCARD8
  6656. Fpad TCARD8
  6657. Flength TCARD16
  6658. Fdrawable TCARD32
  6659. Fgc TCARD32
  6660. Fx TINT16
  6661. Fy TINT16
  6662. }
  6663. type TxImageTextReq = struct {
  6664. FreqType TCARD8
  6665. FnChars TBYTE
  6666. Flength TCARD16
  6667. Fdrawable TCARD32
  6668. Fgc TCARD32
  6669. Fx TINT16
  6670. Fy TINT16
  6671. }
  6672. type TxImageText8Req = struct {
  6673. FreqType TCARD8
  6674. FnChars TBYTE
  6675. Flength TCARD16
  6676. Fdrawable TCARD32
  6677. Fgc TCARD32
  6678. Fx TINT16
  6679. Fy TINT16
  6680. }
  6681. type TxImageText16Req = struct {
  6682. FreqType TCARD8
  6683. FnChars TBYTE
  6684. Flength TCARD16
  6685. Fdrawable TCARD32
  6686. Fgc TCARD32
  6687. Fx TINT16
  6688. Fy TINT16
  6689. }
  6690. type TxCreateColormapReq = struct {
  6691. FreqType TCARD8
  6692. Falloc TBYTE
  6693. Flength TCARD16
  6694. Fmid TCARD32
  6695. Fwindow TCARD32
  6696. Fvisual TCARD32
  6697. }
  6698. type TxCopyColormapAndFreeReq = struct {
  6699. FreqType TCARD8
  6700. Fpad TBYTE
  6701. Flength TCARD16
  6702. Fmid TCARD32
  6703. FsrcCmap TCARD32
  6704. }
  6705. type TxAllocColorReq = struct {
  6706. FreqType TCARD8
  6707. Fpad TBYTE
  6708. Flength TCARD16
  6709. Fcmap TCARD32
  6710. Fred TCARD16
  6711. Fgreen TCARD16
  6712. Fblue TCARD16
  6713. Fpad2 TCARD16
  6714. }
  6715. type TxAllocNamedColorReq = struct {
  6716. FreqType TCARD8
  6717. Fpad TBYTE
  6718. Flength TCARD16
  6719. Fcmap TCARD32
  6720. Fnbytes TCARD16
  6721. Fpad1 TBYTE
  6722. Fpad2 TBYTE
  6723. }
  6724. type TxAllocColorCellsReq = struct {
  6725. FreqType TCARD8
  6726. Fcontiguous TBOOL
  6727. Flength TCARD16
  6728. Fcmap TCARD32
  6729. Fcolors TCARD16
  6730. Fplanes TCARD16
  6731. }
  6732. type TxAllocColorPlanesReq = struct {
  6733. FreqType TCARD8
  6734. Fcontiguous TBOOL
  6735. Flength TCARD16
  6736. Fcmap TCARD32
  6737. Fcolors TCARD16
  6738. Fred TCARD16
  6739. Fgreen TCARD16
  6740. Fblue TCARD16
  6741. }
  6742. type TxFreeColorsReq = struct {
  6743. FreqType TCARD8
  6744. Fpad TBYTE
  6745. Flength TCARD16
  6746. Fcmap TCARD32
  6747. FplaneMask TCARD32
  6748. }
  6749. type TxStoreColorsReq = struct {
  6750. FreqType TCARD8
  6751. Fpad TBYTE
  6752. Flength TCARD16
  6753. Fcmap TCARD32
  6754. }
  6755. type TxStoreNamedColorReq = struct {
  6756. FreqType TCARD8
  6757. Fflags TCARD8
  6758. Flength TCARD16
  6759. Fcmap TCARD32
  6760. Fpixel TCARD32
  6761. Fnbytes TCARD16
  6762. Fpad1 TBYTE
  6763. Fpad2 TBYTE
  6764. }
  6765. type TxQueryColorsReq = struct {
  6766. FreqType TCARD8
  6767. Fpad TBYTE
  6768. Flength TCARD16
  6769. Fcmap TCARD32
  6770. }
  6771. type TxLookupColorReq = struct {
  6772. FreqType TCARD8
  6773. Fpad TBYTE
  6774. Flength TCARD16
  6775. Fcmap TCARD32
  6776. Fnbytes TCARD16
  6777. Fpad1 TBYTE
  6778. Fpad2 TBYTE
  6779. }
  6780. type TxCreateCursorReq = struct {
  6781. FreqType TCARD8
  6782. Fpad TBYTE
  6783. Flength TCARD16
  6784. Fcid TCARD32
  6785. Fsource TCARD32
  6786. Fmask TCARD32
  6787. FforeRed TCARD16
  6788. FforeGreen TCARD16
  6789. FforeBlue TCARD16
  6790. FbackRed TCARD16
  6791. FbackGreen TCARD16
  6792. FbackBlue TCARD16
  6793. Fx TCARD16
  6794. Fy TCARD16
  6795. }
  6796. type TxCreateGlyphCursorReq = struct {
  6797. FreqType TCARD8
  6798. Fpad TBYTE
  6799. Flength TCARD16
  6800. Fcid TCARD32
  6801. Fsource TCARD32
  6802. Fmask TCARD32
  6803. FsourceChar TCARD16
  6804. FmaskChar TCARD16
  6805. FforeRed TCARD16
  6806. FforeGreen TCARD16
  6807. FforeBlue TCARD16
  6808. FbackRed TCARD16
  6809. FbackGreen TCARD16
  6810. FbackBlue TCARD16
  6811. }
  6812. type TxRecolorCursorReq = struct {
  6813. FreqType TCARD8
  6814. Fpad TBYTE
  6815. Flength TCARD16
  6816. Fcursor TCARD32
  6817. FforeRed TCARD16
  6818. FforeGreen TCARD16
  6819. FforeBlue TCARD16
  6820. FbackRed TCARD16
  6821. FbackGreen TCARD16
  6822. FbackBlue TCARD16
  6823. }
  6824. type TxQueryBestSizeReq = struct {
  6825. FreqType TCARD8
  6826. Fclass TCARD8
  6827. Flength TCARD16
  6828. Fdrawable TCARD32
  6829. Fwidth TCARD16
  6830. Fheight TCARD16
  6831. }
  6832. type TxQueryExtensionReq = struct {
  6833. FreqType TCARD8
  6834. Fpad TBYTE
  6835. Flength TCARD16
  6836. Fnbytes TCARD16
  6837. Fpad1 TBYTE
  6838. Fpad2 TBYTE
  6839. }
  6840. type TxSetModifierMappingReq = struct {
  6841. FreqType TCARD8
  6842. FnumKeyPerModifier TCARD8
  6843. Flength TCARD16
  6844. }
  6845. type TxSetPointerMappingReq = struct {
  6846. FreqType TCARD8
  6847. FnElts TCARD8
  6848. Flength TCARD16
  6849. }
  6850. type TxGetKeyboardMappingReq = struct {
  6851. FreqType TCARD8
  6852. Fpad TBYTE
  6853. Flength TCARD16
  6854. FfirstKeyCode TCARD8
  6855. Fcount TCARD8
  6856. Fpad1 TCARD16
  6857. }
  6858. type TxChangeKeyboardMappingReq = struct {
  6859. FreqType TCARD8
  6860. FkeyCodes TCARD8
  6861. Flength TCARD16
  6862. FfirstKeyCode TCARD8
  6863. FkeySymsPerKeyCode TCARD8
  6864. Fpad1 TCARD16
  6865. }
  6866. type TxChangeKeyboardControlReq = struct {
  6867. FreqType TCARD8
  6868. Fpad TBYTE
  6869. Flength TCARD16
  6870. Fmask TCARD32
  6871. }
  6872. type TxBellReq = struct {
  6873. FreqType TCARD8
  6874. Fpercent TINT8
  6875. Flength TCARD16
  6876. }
  6877. type TxChangePointerControlReq = struct {
  6878. FreqType TCARD8
  6879. Fpad TBYTE
  6880. Flength TCARD16
  6881. FaccelNum TINT16
  6882. FaccelDenum TINT16
  6883. Fthreshold TINT16
  6884. FdoAccel TBOOL
  6885. FdoThresh TBOOL
  6886. }
  6887. type TxSetScreenSaverReq = struct {
  6888. FreqType TCARD8
  6889. Fpad TBYTE
  6890. Flength TCARD16
  6891. Ftimeout TINT16
  6892. Finterval TINT16
  6893. FpreferBlank TBYTE
  6894. FallowExpose TBYTE
  6895. Fpad2 TCARD16
  6896. }
  6897. type TxChangeHostsReq = struct {
  6898. FreqType TCARD8
  6899. Fmode TBYTE
  6900. Flength TCARD16
  6901. FhostFamily TCARD8
  6902. Fpad TBYTE
  6903. FhostLength TCARD16
  6904. }
  6905. type TxListHostsReq = struct {
  6906. FreqType TCARD8
  6907. Fpad TBYTE
  6908. Flength TCARD16
  6909. }
  6910. type TxChangeModeReq = struct {
  6911. FreqType TCARD8
  6912. Fmode TBYTE
  6913. Flength TCARD16
  6914. }
  6915. type TxSetAccessControlReq = struct {
  6916. FreqType TCARD8
  6917. Fmode TBYTE
  6918. Flength TCARD16
  6919. }
  6920. type TxSetCloseDownModeReq = struct {
  6921. FreqType TCARD8
  6922. Fmode TBYTE
  6923. Flength TCARD16
  6924. }
  6925. type TxForceScreenSaverReq = struct {
  6926. FreqType TCARD8
  6927. Fmode TBYTE
  6928. Flength TCARD16
  6929. }
  6930. type TxRotatePropertiesReq = struct {
  6931. FreqType TCARD8
  6932. Fpad TBYTE
  6933. Flength TCARD16
  6934. Fwindow TCARD32
  6935. FnAtoms TCARD16
  6936. FnPositions TINT16
  6937. }
  6938. type T_XQEvent = struct {
  6939. Fnext uintptr
  6940. Fevent TXEvent
  6941. Fqserial_num uint64
  6942. }
  6943. type T_XSQEvent = T_XQEvent
  6944. type TLockInfoPtr = uintptr
  6945. type T_XLockPtrs = struct {
  6946. Flock_display uintptr
  6947. Funlock_display uintptr
  6948. }
  6949. type T_XAsyncHandler = struct {
  6950. Fnext uintptr
  6951. Fhandler uintptr
  6952. Fdata TXPointer
  6953. }
  6954. type T_XInternalAsync = T_XAsyncHandler
  6955. type T_XAsyncErrorState = struct {
  6956. Fmin_sequence_number uint64
  6957. Fmax_sequence_number uint64
  6958. Ferror_code uint8
  6959. Fmajor_opcode uint8
  6960. Fminor_opcode uint16
  6961. Flast_error_received uint8
  6962. Ferror_count int32
  6963. }
  6964. type T_XAsyncEState = T_XAsyncErrorState
  6965. type TFreeFuncType = uintptr
  6966. type TFreeModmapType = uintptr
  6967. type T_XFreeFuncRec = struct {
  6968. Fatoms TFreeFuncType
  6969. Fmodifiermap TFreeModmapType
  6970. Fkey_bindings TFreeFuncType
  6971. Fcontext_db TFreeFuncType
  6972. FdefaultCCCs TFreeFuncType
  6973. FclientCmaps TFreeFuncType
  6974. FintensityMaps TFreeFuncType
  6975. Fim_filters TFreeFuncType
  6976. Fxkb TFreeFuncType
  6977. }
  6978. type T_XFreeFuncs = T_XFreeFuncRec
  6979. type TCreateGCType = uintptr
  6980. type TCopyGCType = uintptr
  6981. type TFlushGCType = uintptr
  6982. type TFreeGCType = uintptr
  6983. type TCreateFontType = uintptr
  6984. type TFreeFontType = uintptr
  6985. type TCloseDisplayType = uintptr
  6986. type TErrorType = uintptr
  6987. type TErrorStringType = uintptr
  6988. type TPrintErrorType = uintptr
  6989. type TBeforeFlushType = uintptr
  6990. type T_XExtension = struct {
  6991. Fnext uintptr
  6992. Fcodes TXExtCodes
  6993. Fcreate_GC TCreateGCType
  6994. Fcopy_GC TCopyGCType
  6995. Fflush_GC TFlushGCType
  6996. Ffree_GC TFreeGCType
  6997. Fcreate_Font TCreateFontType
  6998. Ffree_Font TFreeFontType
  6999. Fclose_display TCloseDisplayType
  7000. Ferror1 TErrorType
  7001. Ferror_string TErrorStringType
  7002. Fname uintptr
  7003. Ferror_values TPrintErrorType
  7004. Fbefore_flush TBeforeFlushType
  7005. Fnext_flush uintptr
  7006. }
  7007. type T_XExten = T_XExtension
  7008. type T_XInternalConnectionProc = uintptr
  7009. type T_XConnectionInfo = struct {
  7010. Ffd int32
  7011. Fread_callback T_XInternalConnectionProc
  7012. Fcall_data TXPointer
  7013. Fwatch_data uintptr
  7014. Fnext uintptr
  7015. }
  7016. type T_XConnWatchInfo = struct {
  7017. Ffn TXConnectionWatchProc
  7018. Fclient_data TXPointer
  7019. Fnext uintptr
  7020. }
  7021. type t__jmp_buf = [18]uint64
  7022. type Tjmp_buf = [1]t__jmp_buf_tag
  7023. type t__jmp_buf_tag = struct {
  7024. F__jb t__jmp_buf
  7025. F__fl uint64
  7026. F__ss [16]uint64
  7027. }
  7028. type Tsigjmp_buf = [1]t__jmp_buf_tag
  7029. type TFT_Int16 = int16
  7030. type TFT_UInt16 = uint16
  7031. type TFT_Int32 = int32
  7032. type TFT_UInt32 = uint32
  7033. type TFT_Fast = int32
  7034. type TFT_UFast = uint32
  7035. type TFT_Int64 = int64
  7036. type TFT_UInt64 = uint64
  7037. type TFT_Memory = uintptr
  7038. type TFT_MemoryRec_ = struct {
  7039. Fuser uintptr
  7040. Falloc TFT_Alloc_Func
  7041. Ffree TFT_Free_Func
  7042. Frealloc TFT_Realloc_Func
  7043. }
  7044. type TFT_Alloc_Func = uintptr
  7045. type TFT_Free_Func = uintptr
  7046. type TFT_Realloc_Func = uintptr
  7047. type TFT_Stream = uintptr
  7048. type TFT_StreamRec_ = struct {
  7049. Fbase uintptr
  7050. Fsize uint64
  7051. Fpos uint64
  7052. Fdescriptor TFT_StreamDesc
  7053. Fpathname TFT_StreamDesc
  7054. Fread TFT_Stream_IoFunc
  7055. Fclose1 TFT_Stream_CloseFunc
  7056. Fmemory TFT_Memory
  7057. Fcursor uintptr
  7058. Flimit uintptr
  7059. }
  7060. type TFT_StreamDesc = struct {
  7061. Fpointer [0]uintptr
  7062. Fvalue int64
  7063. }
  7064. type TFT_StreamDesc_ = TFT_StreamDesc
  7065. type TFT_Stream_IoFunc = uintptr
  7066. type TFT_Stream_CloseFunc = uintptr
  7067. type TFT_StreamRec = struct {
  7068. Fbase uintptr
  7069. Fsize uint64
  7070. Fpos uint64
  7071. Fdescriptor TFT_StreamDesc
  7072. Fpathname TFT_StreamDesc
  7073. Fread TFT_Stream_IoFunc
  7074. Fclose1 TFT_Stream_CloseFunc
  7075. Fmemory TFT_Memory
  7076. Fcursor uintptr
  7077. Flimit uintptr
  7078. }
  7079. type TFT_Pos = int64
  7080. type TFT_Vector = struct {
  7081. Fx TFT_Pos
  7082. Fy TFT_Pos
  7083. }
  7084. type TFT_Vector_ = TFT_Vector
  7085. type TFT_BBox = struct {
  7086. FxMin TFT_Pos
  7087. FyMin TFT_Pos
  7088. FxMax TFT_Pos
  7089. FyMax TFT_Pos
  7090. }
  7091. type TFT_BBox_ = TFT_BBox
  7092. type TFT_Pixel_Mode = int32
  7093. type _FT_Pixel_Mode_ = int32
  7094. const _FT_PIXEL_MODE_NONE = 0
  7095. const _FT_PIXEL_MODE_MONO = 1
  7096. const _FT_PIXEL_MODE_GRAY = 2
  7097. const _FT_PIXEL_MODE_GRAY2 = 3
  7098. const _FT_PIXEL_MODE_GRAY4 = 4
  7099. const _FT_PIXEL_MODE_LCD = 5
  7100. const _FT_PIXEL_MODE_LCD_V = 6
  7101. const _FT_PIXEL_MODE_BGRA = 7
  7102. const _FT_PIXEL_MODE_MAX = 8
  7103. type TFT_Bitmap = struct {
  7104. Frows uint32
  7105. Fwidth uint32
  7106. Fpitch int32
  7107. Fbuffer uintptr
  7108. Fnum_grays uint16
  7109. Fpixel_mode uint8
  7110. Fpalette_mode uint8
  7111. Fpalette uintptr
  7112. }
  7113. type TFT_Bitmap_ = TFT_Bitmap
  7114. type TFT_Outline = struct {
  7115. Fn_contours int16
  7116. Fn_points int16
  7117. Fpoints uintptr
  7118. Ftags uintptr
  7119. Fcontours uintptr
  7120. Fflags int32
  7121. }
  7122. type TFT_Outline_ = TFT_Outline
  7123. type TFT_Outline_MoveToFunc = uintptr
  7124. type TFT_Outline_LineToFunc = uintptr
  7125. type TFT_Outline_ConicToFunc = uintptr
  7126. type TFT_Outline_CubicToFunc = uintptr
  7127. type TFT_Outline_Funcs = struct {
  7128. Fmove_to TFT_Outline_MoveToFunc
  7129. Fline_to TFT_Outline_LineToFunc
  7130. Fconic_to TFT_Outline_ConicToFunc
  7131. Fcubic_to TFT_Outline_CubicToFunc
  7132. Fshift int32
  7133. Fdelta TFT_Pos
  7134. }
  7135. type TFT_Outline_Funcs_ = TFT_Outline_Funcs
  7136. type TFT_Glyph_Format = int32
  7137. type _FT_Glyph_Format_ = int32
  7138. const _FT_GLYPH_FORMAT_NONE = 0
  7139. const _FT_GLYPH_FORMAT_COMPOSITE = 1668246896
  7140. const _FT_GLYPH_FORMAT_BITMAP = 1651078259
  7141. const _FT_GLYPH_FORMAT_OUTLINE = 1869968492
  7142. const _FT_GLYPH_FORMAT_PLOTTER = 1886154612
  7143. type TFT_Raster = uintptr
  7144. type TFT_Span = struct {
  7145. Fx int16
  7146. Flen1 uint16
  7147. Fcoverage uint8
  7148. }
  7149. type TFT_Span_ = TFT_Span
  7150. type TFT_SpanFunc = uintptr
  7151. type TFT_Raster_BitTest_Func = uintptr
  7152. type TFT_Raster_BitSet_Func = uintptr
  7153. type TFT_Raster_Params = struct {
  7154. Ftarget uintptr
  7155. Fsource uintptr
  7156. Fflags int32
  7157. Fgray_spans TFT_SpanFunc
  7158. Fblack_spans TFT_SpanFunc
  7159. Fbit_test TFT_Raster_BitTest_Func
  7160. Fbit_set TFT_Raster_BitSet_Func
  7161. Fuser uintptr
  7162. Fclip_box TFT_BBox
  7163. }
  7164. type TFT_Raster_Params_ = TFT_Raster_Params
  7165. type TFT_Raster_NewFunc = uintptr
  7166. type TFT_Raster_DoneFunc = uintptr
  7167. type TFT_Raster_ResetFunc = uintptr
  7168. type TFT_Raster_SetModeFunc = uintptr
  7169. type TFT_Raster_RenderFunc = uintptr
  7170. type TFT_Raster_Funcs = struct {
  7171. Fglyph_format TFT_Glyph_Format
  7172. Fraster_new TFT_Raster_NewFunc
  7173. Fraster_reset TFT_Raster_ResetFunc
  7174. Fraster_set_mode TFT_Raster_SetModeFunc
  7175. Fraster_render TFT_Raster_RenderFunc
  7176. Fraster_done TFT_Raster_DoneFunc
  7177. }
  7178. type TFT_Raster_Funcs_ = TFT_Raster_Funcs
  7179. type TFT_Bool = uint8
  7180. type TFT_FWord = int16
  7181. type TFT_UFWord = uint16
  7182. type TFT_Char = int8
  7183. type TFT_Byte = uint8
  7184. type TFT_Bytes = uintptr
  7185. type TFT_Tag = uint32
  7186. type TFT_String = uint8
  7187. type TFT_Short = int16
  7188. type TFT_UShort = uint16
  7189. type TFT_Int = int32
  7190. type TFT_UInt = uint32
  7191. type TFT_Long = int64
  7192. type TFT_ULong = uint64
  7193. type TFT_F2Dot14 = int16
  7194. type TFT_F26Dot6 = int64
  7195. type TFT_Fixed = int64
  7196. type TFT_Error = int32
  7197. type TFT_Pointer = uintptr
  7198. type TFT_Offset = uint64
  7199. type TFT_PtrDist = int64
  7200. type TFT_UnitVector = struct {
  7201. Fx TFT_F2Dot14
  7202. Fy TFT_F2Dot14
  7203. }
  7204. type TFT_UnitVector_ = TFT_UnitVector
  7205. type TFT_Matrix = struct {
  7206. Fxx TFT_Fixed
  7207. Fxy TFT_Fixed
  7208. Fyx TFT_Fixed
  7209. Fyy TFT_Fixed
  7210. }
  7211. type TFT_Matrix_ = TFT_Matrix
  7212. type TFT_Data = struct {
  7213. Fpointer uintptr
  7214. Flength TFT_Int
  7215. }
  7216. type TFT_Data_ = TFT_Data
  7217. type TFT_Generic_Finalizer = uintptr
  7218. type TFT_Generic = struct {
  7219. Fdata uintptr
  7220. Ffinalizer TFT_Generic_Finalizer
  7221. }
  7222. type TFT_Generic_ = TFT_Generic
  7223. type TFT_ListNode = uintptr
  7224. type TFT_ListNodeRec_ = struct {
  7225. Fprev TFT_ListNode
  7226. Fnext TFT_ListNode
  7227. Fdata uintptr
  7228. }
  7229. type TFT_List = uintptr
  7230. type TFT_ListRec_ = struct {
  7231. Fhead TFT_ListNode
  7232. Ftail TFT_ListNode
  7233. }
  7234. type TFT_ListNodeRec = struct {
  7235. Fprev TFT_ListNode
  7236. Fnext TFT_ListNode
  7237. Fdata uintptr
  7238. }
  7239. type TFT_ListRec = struct {
  7240. Fhead TFT_ListNode
  7241. Ftail TFT_ListNode
  7242. }
  7243. const _FT_Mod_Err_Base = 0
  7244. const _FT_Mod_Err_Autofit = 0
  7245. const _FT_Mod_Err_BDF = 0
  7246. const _FT_Mod_Err_Bzip2 = 0
  7247. const _FT_Mod_Err_Cache = 0
  7248. const _FT_Mod_Err_CFF = 0
  7249. const _FT_Mod_Err_CID = 0
  7250. const _FT_Mod_Err_Gzip = 0
  7251. const _FT_Mod_Err_LZW = 0
  7252. const _FT_Mod_Err_OTvalid = 0
  7253. const _FT_Mod_Err_PCF = 0
  7254. const _FT_Mod_Err_PFR = 0
  7255. const _FT_Mod_Err_PSaux = 0
  7256. const _FT_Mod_Err_PShinter = 0
  7257. const _FT_Mod_Err_PSnames = 0
  7258. const _FT_Mod_Err_Raster = 0
  7259. const _FT_Mod_Err_SFNT = 0
  7260. const _FT_Mod_Err_Smooth = 0
  7261. const _FT_Mod_Err_TrueType = 0
  7262. const _FT_Mod_Err_Type1 = 0
  7263. const _FT_Mod_Err_Type42 = 0
  7264. const _FT_Mod_Err_Winfonts = 0
  7265. const _FT_Mod_Err_GXvalid = 0
  7266. const _FT_Mod_Err_Max = 1
  7267. const _FT_Err_Ok = 0
  7268. const _FT_Err_Cannot_Open_Resource = 1
  7269. const _FT_Err_Unknown_File_Format = 2
  7270. const _FT_Err_Invalid_File_Format = 3
  7271. const _FT_Err_Invalid_Version = 4
  7272. const _FT_Err_Lower_Module_Version = 5
  7273. const _FT_Err_Invalid_Argument = 6
  7274. const _FT_Err_Unimplemented_Feature = 7
  7275. const _FT_Err_Invalid_Table = 8
  7276. const _FT_Err_Invalid_Offset = 9
  7277. const _FT_Err_Array_Too_Large = 10
  7278. const _FT_Err_Missing_Module = 11
  7279. const _FT_Err_Missing_Property = 12
  7280. const _FT_Err_Invalid_Glyph_Index = 16
  7281. const _FT_Err_Invalid_Character_Code = 17
  7282. const _FT_Err_Invalid_Glyph_Format = 18
  7283. const _FT_Err_Cannot_Render_Glyph = 19
  7284. const _FT_Err_Invalid_Outline = 20
  7285. const _FT_Err_Invalid_Composite = 21
  7286. const _FT_Err_Too_Many_Hints = 22
  7287. const _FT_Err_Invalid_Pixel_Size = 23
  7288. const _FT_Err_Invalid_Handle = 32
  7289. const _FT_Err_Invalid_Library_Handle = 33
  7290. const _FT_Err_Invalid_Driver_Handle = 34
  7291. const _FT_Err_Invalid_Face_Handle = 35
  7292. const _FT_Err_Invalid_Size_Handle = 36
  7293. const _FT_Err_Invalid_Slot_Handle = 37
  7294. const _FT_Err_Invalid_CharMap_Handle = 38
  7295. const _FT_Err_Invalid_Cache_Handle = 39
  7296. const _FT_Err_Invalid_Stream_Handle = 40
  7297. const _FT_Err_Too_Many_Drivers = 48
  7298. const _FT_Err_Too_Many_Extensions = 49
  7299. const _FT_Err_Out_Of_Memory = 64
  7300. const _FT_Err_Unlisted_Object = 65
  7301. const _FT_Err_Cannot_Open_Stream = 81
  7302. const _FT_Err_Invalid_Stream_Seek = 82
  7303. const _FT_Err_Invalid_Stream_Skip = 83
  7304. const _FT_Err_Invalid_Stream_Read = 84
  7305. const _FT_Err_Invalid_Stream_Operation = 85
  7306. const _FT_Err_Invalid_Frame_Operation = 86
  7307. const _FT_Err_Nested_Frame_Access = 87
  7308. const _FT_Err_Invalid_Frame_Read = 88
  7309. const _FT_Err_Raster_Uninitialized = 96
  7310. const _FT_Err_Raster_Corrupted = 97
  7311. const _FT_Err_Raster_Overflow = 98
  7312. const _FT_Err_Raster_Negative_Height = 99
  7313. const _FT_Err_Too_Many_Caches = 112
  7314. const _FT_Err_Invalid_Opcode = 128
  7315. const _FT_Err_Too_Few_Arguments = 129
  7316. const _FT_Err_Stack_Overflow = 130
  7317. const _FT_Err_Code_Overflow = 131
  7318. const _FT_Err_Bad_Argument = 132
  7319. const _FT_Err_Divide_By_Zero = 133
  7320. const _FT_Err_Invalid_Reference = 134
  7321. const _FT_Err_Debug_OpCode = 135
  7322. const _FT_Err_ENDF_In_Exec_Stream = 136
  7323. const _FT_Err_Nested_DEFS = 137
  7324. const _FT_Err_Invalid_CodeRange = 138
  7325. const _FT_Err_Execution_Too_Long = 139
  7326. const _FT_Err_Too_Many_Function_Defs = 140
  7327. const _FT_Err_Too_Many_Instruction_Defs = 141
  7328. const _FT_Err_Table_Missing = 142
  7329. const _FT_Err_Horiz_Header_Missing = 143
  7330. const _FT_Err_Locations_Missing = 144
  7331. const _FT_Err_Name_Table_Missing = 145
  7332. const _FT_Err_CMap_Table_Missing = 146
  7333. const _FT_Err_Hmtx_Table_Missing = 147
  7334. const _FT_Err_Post_Table_Missing = 148
  7335. const _FT_Err_Invalid_Horiz_Metrics = 149
  7336. const _FT_Err_Invalid_CharMap_Format = 150
  7337. const _FT_Err_Invalid_PPem = 151
  7338. const _FT_Err_Invalid_Vert_Metrics = 152
  7339. const _FT_Err_Could_Not_Find_Context = 153
  7340. const _FT_Err_Invalid_Post_Table_Format = 154
  7341. const _FT_Err_Invalid_Post_Table = 155
  7342. const _FT_Err_DEF_In_Glyf_Bytecode = 156
  7343. const _FT_Err_Missing_Bitmap = 157
  7344. const _FT_Err_Syntax_Error = 160
  7345. const _FT_Err_Stack_Underflow = 161
  7346. const _FT_Err_Ignore = 162
  7347. const _FT_Err_No_Unicode_Glyph_Name = 163
  7348. const _FT_Err_Glyph_Too_Big = 164
  7349. const _FT_Err_Missing_Startfont_Field = 176
  7350. const _FT_Err_Missing_Font_Field = 177
  7351. const _FT_Err_Missing_Size_Field = 178
  7352. const _FT_Err_Missing_Fontboundingbox_Field = 179
  7353. const _FT_Err_Missing_Chars_Field = 180
  7354. const _FT_Err_Missing_Startchar_Field = 181
  7355. const _FT_Err_Missing_Encoding_Field = 182
  7356. const _FT_Err_Missing_Bbx_Field = 183
  7357. const _FT_Err_Bbx_Too_Big = 184
  7358. const _FT_Err_Corrupted_Font_Header = 185
  7359. const _FT_Err_Corrupted_Font_Glyphs = 186
  7360. const _FT_Err_Max = 187
  7361. type TFT_Glyph_Metrics = struct {
  7362. Fwidth TFT_Pos
  7363. Fheight TFT_Pos
  7364. FhoriBearingX TFT_Pos
  7365. FhoriBearingY TFT_Pos
  7366. FhoriAdvance TFT_Pos
  7367. FvertBearingX TFT_Pos
  7368. FvertBearingY TFT_Pos
  7369. FvertAdvance TFT_Pos
  7370. }
  7371. type TFT_Glyph_Metrics_ = TFT_Glyph_Metrics
  7372. type TFT_Bitmap_Size = struct {
  7373. Fheight TFT_Short
  7374. Fwidth TFT_Short
  7375. Fsize TFT_Pos
  7376. Fx_ppem TFT_Pos
  7377. Fy_ppem TFT_Pos
  7378. }
  7379. type TFT_Bitmap_Size_ = TFT_Bitmap_Size
  7380. type TFT_Library = uintptr
  7381. type TFT_Module = uintptr
  7382. type TFT_Driver = uintptr
  7383. type TFT_Renderer = uintptr
  7384. type TFT_Face = uintptr
  7385. type TFT_FaceRec_ = struct {
  7386. Fnum_faces TFT_Long
  7387. Fface_index TFT_Long
  7388. Fface_flags TFT_Long
  7389. Fstyle_flags TFT_Long
  7390. Fnum_glyphs TFT_Long
  7391. Ffamily_name uintptr
  7392. Fstyle_name uintptr
  7393. Fnum_fixed_sizes TFT_Int
  7394. Favailable_sizes uintptr
  7395. Fnum_charmaps TFT_Int
  7396. Fcharmaps uintptr
  7397. Fgeneric TFT_Generic
  7398. Fbbox TFT_BBox
  7399. Funits_per_EM TFT_UShort
  7400. Fascender TFT_Short
  7401. Fdescender TFT_Short
  7402. Fheight TFT_Short
  7403. Fmax_advance_width TFT_Short
  7404. Fmax_advance_height TFT_Short
  7405. Funderline_position TFT_Short
  7406. Funderline_thickness TFT_Short
  7407. Fglyph TFT_GlyphSlot
  7408. Fsize TFT_Size
  7409. Fcharmap TFT_CharMap
  7410. Fdriver TFT_Driver
  7411. Fmemory TFT_Memory
  7412. Fstream TFT_Stream
  7413. Fsizes_list TFT_ListRec
  7414. Fautohint TFT_Generic
  7415. Fextensions uintptr
  7416. Finternal TFT_Face_Internal
  7417. }
  7418. type TFT_Size = uintptr
  7419. type TFT_SizeRec_ = struct {
  7420. Fface TFT_Face
  7421. Fgeneric TFT_Generic
  7422. Fmetrics TFT_Size_Metrics
  7423. Finternal TFT_Size_Internal
  7424. }
  7425. type TFT_GlyphSlot = uintptr
  7426. type TFT_GlyphSlotRec_ = struct {
  7427. Flibrary TFT_Library
  7428. Fface TFT_Face
  7429. Fnext TFT_GlyphSlot
  7430. Fglyph_index TFT_UInt
  7431. Fgeneric TFT_Generic
  7432. Fmetrics TFT_Glyph_Metrics
  7433. FlinearHoriAdvance TFT_Fixed
  7434. FlinearVertAdvance TFT_Fixed
  7435. Fadvance TFT_Vector
  7436. Fformat TFT_Glyph_Format
  7437. Fbitmap TFT_Bitmap
  7438. Fbitmap_left TFT_Int
  7439. Fbitmap_top TFT_Int
  7440. Foutline TFT_Outline
  7441. Fnum_subglyphs TFT_UInt
  7442. Fsubglyphs TFT_SubGlyph
  7443. Fcontrol_data uintptr
  7444. Fcontrol_len int64
  7445. Flsb_delta TFT_Pos
  7446. Frsb_delta TFT_Pos
  7447. Fother uintptr
  7448. Finternal TFT_Slot_Internal
  7449. }
  7450. type TFT_CharMap = uintptr
  7451. type TFT_CharMapRec_ = struct {
  7452. Fface TFT_Face
  7453. Fencoding TFT_Encoding
  7454. Fplatform_id TFT_UShort
  7455. Fencoding_id TFT_UShort
  7456. }
  7457. type _FT_Encoding_ = int32
  7458. const _FT_ENCODING_NONE = 0
  7459. const _FT_ENCODING_MS_SYMBOL = 1937337698
  7460. const _FT_ENCODING_UNICODE = 1970170211
  7461. const _FT_ENCODING_SJIS = 1936353651
  7462. const _FT_ENCODING_PRC = 1734484000
  7463. const _FT_ENCODING_BIG5 = 1651074869
  7464. const _FT_ENCODING_WANSUNG = 2002873971
  7465. const _FT_ENCODING_JOHAB = 1785686113
  7466. const _FT_ENCODING_GB2312 = 1734484000
  7467. const _FT_ENCODING_MS_SJIS = 1936353651
  7468. const _FT_ENCODING_MS_GB2312 = 1734484000
  7469. const _FT_ENCODING_MS_BIG5 = 1651074869
  7470. const _FT_ENCODING_MS_WANSUNG = 2002873971
  7471. const _FT_ENCODING_MS_JOHAB = 1785686113
  7472. const _FT_ENCODING_ADOBE_STANDARD = 1094995778
  7473. const _FT_ENCODING_ADOBE_EXPERT = 1094992453
  7474. const _FT_ENCODING_ADOBE_CUSTOM = 1094992451
  7475. const _FT_ENCODING_ADOBE_LATIN_1 = 1818326065
  7476. const _FT_ENCODING_OLD_LATIN_2 = 1818326066
  7477. const _FT_ENCODING_APPLE_ROMAN = 1634889070
  7478. type TFT_Encoding = int32
  7479. type TFT_CharMapRec = struct {
  7480. Fface TFT_Face
  7481. Fencoding TFT_Encoding
  7482. Fplatform_id TFT_UShort
  7483. Fencoding_id TFT_UShort
  7484. }
  7485. type TFT_Face_Internal = uintptr
  7486. type TFT_FaceRec = struct {
  7487. Fnum_faces TFT_Long
  7488. Fface_index TFT_Long
  7489. Fface_flags TFT_Long
  7490. Fstyle_flags TFT_Long
  7491. Fnum_glyphs TFT_Long
  7492. Ffamily_name uintptr
  7493. Fstyle_name uintptr
  7494. Fnum_fixed_sizes TFT_Int
  7495. Favailable_sizes uintptr
  7496. Fnum_charmaps TFT_Int
  7497. Fcharmaps uintptr
  7498. Fgeneric TFT_Generic
  7499. Fbbox TFT_BBox
  7500. Funits_per_EM TFT_UShort
  7501. Fascender TFT_Short
  7502. Fdescender TFT_Short
  7503. Fheight TFT_Short
  7504. Fmax_advance_width TFT_Short
  7505. Fmax_advance_height TFT_Short
  7506. Funderline_position TFT_Short
  7507. Funderline_thickness TFT_Short
  7508. Fglyph TFT_GlyphSlot
  7509. Fsize TFT_Size
  7510. Fcharmap TFT_CharMap
  7511. Fdriver TFT_Driver
  7512. Fmemory TFT_Memory
  7513. Fstream TFT_Stream
  7514. Fsizes_list TFT_ListRec
  7515. Fautohint TFT_Generic
  7516. Fextensions uintptr
  7517. Finternal TFT_Face_Internal
  7518. }
  7519. type TFT_Size_Internal = uintptr
  7520. type TFT_Size_Metrics = struct {
  7521. Fx_ppem TFT_UShort
  7522. Fy_ppem TFT_UShort
  7523. Fx_scale TFT_Fixed
  7524. Fy_scale TFT_Fixed
  7525. Fascender TFT_Pos
  7526. Fdescender TFT_Pos
  7527. Fheight TFT_Pos
  7528. Fmax_advance TFT_Pos
  7529. }
  7530. type TFT_Size_Metrics_ = TFT_Size_Metrics
  7531. type TFT_SizeRec = struct {
  7532. Fface TFT_Face
  7533. Fgeneric TFT_Generic
  7534. Fmetrics TFT_Size_Metrics
  7535. Finternal TFT_Size_Internal
  7536. }
  7537. type TFT_SubGlyph = uintptr
  7538. type TFT_Slot_Internal = uintptr
  7539. type TFT_GlyphSlotRec = struct {
  7540. Flibrary TFT_Library
  7541. Fface TFT_Face
  7542. Fnext TFT_GlyphSlot
  7543. Fglyph_index TFT_UInt
  7544. Fgeneric TFT_Generic
  7545. Fmetrics TFT_Glyph_Metrics
  7546. FlinearHoriAdvance TFT_Fixed
  7547. FlinearVertAdvance TFT_Fixed
  7548. Fadvance TFT_Vector
  7549. Fformat TFT_Glyph_Format
  7550. Fbitmap TFT_Bitmap
  7551. Fbitmap_left TFT_Int
  7552. Fbitmap_top TFT_Int
  7553. Foutline TFT_Outline
  7554. Fnum_subglyphs TFT_UInt
  7555. Fsubglyphs TFT_SubGlyph
  7556. Fcontrol_data uintptr
  7557. Fcontrol_len int64
  7558. Flsb_delta TFT_Pos
  7559. Frsb_delta TFT_Pos
  7560. Fother uintptr
  7561. Finternal TFT_Slot_Internal
  7562. }
  7563. type TFT_Parameter = struct {
  7564. Ftag TFT_ULong
  7565. Fdata TFT_Pointer
  7566. }
  7567. type TFT_Parameter_ = TFT_Parameter
  7568. type TFT_Open_Args = struct {
  7569. Fflags TFT_UInt
  7570. Fmemory_base uintptr
  7571. Fmemory_size TFT_Long
  7572. Fpathname uintptr
  7573. Fstream TFT_Stream
  7574. Fdriver TFT_Module
  7575. Fnum_params TFT_Int
  7576. Fparams uintptr
  7577. }
  7578. type TFT_Open_Args_ = TFT_Open_Args
  7579. type TFT_Size_Request_Type = int32
  7580. type _FT_Size_Request_Type_ = int32
  7581. const _FT_SIZE_REQUEST_TYPE_NOMINAL = 0
  7582. const _FT_SIZE_REQUEST_TYPE_REAL_DIM = 1
  7583. const _FT_SIZE_REQUEST_TYPE_BBOX = 2
  7584. const _FT_SIZE_REQUEST_TYPE_CELL = 3
  7585. const _FT_SIZE_REQUEST_TYPE_SCALES = 4
  7586. const _FT_SIZE_REQUEST_TYPE_MAX = 5
  7587. type TFT_Size_RequestRec = struct {
  7588. Ftype1 TFT_Size_Request_Type
  7589. Fwidth TFT_Long
  7590. Fheight TFT_Long
  7591. FhoriResolution TFT_UInt
  7592. FvertResolution TFT_UInt
  7593. }
  7594. type TFT_Size_RequestRec_ = TFT_Size_RequestRec
  7595. type TFT_Size_Request = uintptr
  7596. type TFT_Render_Mode = int32
  7597. type _FT_Render_Mode_ = int32
  7598. const _FT_RENDER_MODE_NORMAL = 0
  7599. const _FT_RENDER_MODE_LIGHT = 1
  7600. const _FT_RENDER_MODE_MONO = 2
  7601. const _FT_RENDER_MODE_LCD = 3
  7602. const _FT_RENDER_MODE_LCD_V = 4
  7603. const _FT_RENDER_MODE_MAX = 5
  7604. type TFT_Kerning_Mode = int32
  7605. type _FT_Kerning_Mode_ = int32
  7606. const _FT_KERNING_DEFAULT = 0
  7607. const _FT_KERNING_UNFITTED = 1
  7608. const _FT_KERNING_UNSCALED = 2
  7609. type TFT_LayerIterator = struct {
  7610. Fnum_layers TFT_UInt
  7611. Flayer TFT_UInt
  7612. Fp uintptr
  7613. }
  7614. type TFT_LayerIterator_ = TFT_LayerIterator
  7615. type Tstat = struct {
  7616. Fst_dev Tdev_t
  7617. Fst_ino Tino_t
  7618. Fst_nlink Tnlink_t
  7619. Fst_mode Tmode_t
  7620. Fst_uid Tuid_t
  7621. Fst_gid Tgid_t
  7622. Fst_rdev Tdev_t
  7623. Fst_size Toff_t
  7624. Fst_atim Ttimespec
  7625. Fst_mtim Ttimespec
  7626. Fst_ctim Ttimespec
  7627. Fst_blksize Tblksize_t
  7628. Fst_blocks Tblkcnt_t
  7629. F__unused [3]uint64
  7630. }
  7631. type Tstatx_timestamp = struct {
  7632. Ftv_sec Tint64_t
  7633. Ftv_nsec Tuint32_t
  7634. F__pad Tuint32_t
  7635. }
  7636. type Tstatx = struct {
  7637. Fstx_mask Tuint32_t
  7638. Fstx_blksize Tuint32_t
  7639. Fstx_attributes Tuint64_t
  7640. Fstx_nlink Tuint32_t
  7641. Fstx_uid Tuint32_t
  7642. Fstx_gid Tuint32_t
  7643. Fstx_mode Tuint16_t
  7644. F__pad0 [1]Tuint16_t
  7645. Fstx_ino Tuint64_t
  7646. Fstx_size Tuint64_t
  7647. Fstx_blocks Tuint64_t
  7648. Fstx_attributes_mask Tuint64_t
  7649. Fstx_atime Tstatx_timestamp
  7650. Fstx_btime Tstatx_timestamp
  7651. Fstx_ctime Tstatx_timestamp
  7652. Fstx_mtime Tstatx_timestamp
  7653. Fstx_rdev_major Tuint32_t
  7654. Fstx_rdev_minor Tuint32_t
  7655. Fstx_dev_major Tuint32_t
  7656. Fstx_dev_minor Tuint32_t
  7657. F__pad1 [14]Tuint64_t
  7658. }
  7659. type TFcChar8 = uint8
  7660. type TFcChar16 = uint16
  7661. type TFcChar32 = uint32
  7662. type TFcBool = int32
  7663. type TFcType = int32
  7664. type __FcType = int32
  7665. const _FcTypeUnknown = -1
  7666. const _FcTypeVoid = 0
  7667. const _FcTypeInteger = 1
  7668. const _FcTypeDouble = 2
  7669. const _FcTypeString = 3
  7670. const _FcTypeBool = 4
  7671. const _FcTypeMatrix = 5
  7672. const _FcTypeCharSet = 6
  7673. const _FcTypeFTFace = 7
  7674. const _FcTypeLangSet = 8
  7675. const _FcTypeRange = 9
  7676. type TFcMatrix = struct {
  7677. Fxx float64
  7678. Fxy float64
  7679. Fyx float64
  7680. Fyy float64
  7681. }
  7682. type T_FcMatrix = TFcMatrix
  7683. type TFcObjectType = struct {
  7684. Fobject uintptr
  7685. Ftype1 TFcType
  7686. }
  7687. type T_FcObjectType = TFcObjectType
  7688. type TFcConstant = struct {
  7689. Fname uintptr
  7690. Fobject uintptr
  7691. Fvalue int32
  7692. }
  7693. type T_FcConstant = TFcConstant
  7694. type TFcResult = int32
  7695. type __FcResult = int32
  7696. const _FcResultMatch = 0
  7697. const _FcResultNoMatch = 1
  7698. const _FcResultTypeMismatch = 2
  7699. const _FcResultNoId = 3
  7700. const _FcResultOutOfMemory = 4
  7701. type TFcValueBinding = int32
  7702. type __FcValueBinding = int32
  7703. const _FcValueBindingWeak = 0
  7704. const _FcValueBindingStrong = 1
  7705. const _FcValueBindingSame = 2
  7706. const _FcValueBindingEnd = 2147483647
  7707. type TFcPatternIter = struct {
  7708. Fdummy1 uintptr
  7709. Fdummy2 uintptr
  7710. }
  7711. type T_FcPatternIter = TFcPatternIter
  7712. type TFcValue = struct {
  7713. Ftype1 TFcType
  7714. Fu struct {
  7715. Fi [0]int32
  7716. Fb [0]TFcBool
  7717. Fd [0]float64
  7718. Fm [0]uintptr
  7719. Fc [0]uintptr
  7720. Ff [0]uintptr
  7721. Fl [0]uintptr
  7722. Fr [0]uintptr
  7723. Fs uintptr
  7724. }
  7725. }
  7726. type T_FcValue = TFcValue
  7727. type TFcFontSet = struct {
  7728. Fnfont int32
  7729. Fsfont int32
  7730. Ffonts uintptr
  7731. }
  7732. type T_FcFontSet = TFcFontSet
  7733. type TFcObjectSet = struct {
  7734. Fnobject int32
  7735. Fsobject int32
  7736. Fobjects uintptr
  7737. }
  7738. type T_FcObjectSet = TFcObjectSet
  7739. type TFcMatchKind = int32
  7740. type __FcMatchKind = int32
  7741. const _FcMatchPattern = 0
  7742. const _FcMatchFont = 1
  7743. const _FcMatchScan = 2
  7744. const _FcMatchKindEnd = 3
  7745. const _FcMatchKindBegin = 0
  7746. type TFcLangResult = int32
  7747. type __FcLangResult = int32
  7748. const _FcLangEqual = 0
  7749. const _FcLangDifferentCountry = 1
  7750. const _FcLangDifferentTerritory = 1
  7751. const _FcLangDifferentLang = 2
  7752. type TFcSetName = int32
  7753. type __FcSetName = int32
  7754. const _FcSetSystem = 0
  7755. const _FcSetApplication = 1
  7756. type TFcConfigFileInfoIter = struct {
  7757. Fdummy1 uintptr
  7758. Fdummy2 uintptr
  7759. Fdummy3 uintptr
  7760. }
  7761. type T_FcConfigFileInfoIter = TFcConfigFileInfoIter
  7762. type TFcEndian = int32
  7763. const _FcEndianBig = 0
  7764. const _FcEndianLittle = 1
  7765. type Tpointer = uintptr
  7766. type TClientPtr = uintptr
  7767. type TFontPtr = uintptr
  7768. type TFSID = uint64
  7769. type TAccContext = uint64
  7770. type TOSTimePtr = uintptr
  7771. type TBlockHandlerProcPtr = uintptr
  7772. type TGlyph = uint64
  7773. type TGlyphSet = uint64
  7774. type TPicture = uint64
  7775. type TPictFormat = uint64
  7776. type TXRenderDirectFormat = struct {
  7777. Fred int16
  7778. FredMask int16
  7779. Fgreen int16
  7780. FgreenMask int16
  7781. Fblue int16
  7782. FblueMask int16
  7783. Falpha int16
  7784. FalphaMask int16
  7785. }
  7786. type TXRenderPictFormat = struct {
  7787. Fid TPictFormat
  7788. Ftype1 int32
  7789. Fdepth int32
  7790. Fdirect TXRenderDirectFormat
  7791. Fcolormap TColormap
  7792. }
  7793. type TXRenderPictureAttributes = struct {
  7794. Frepeat int32
  7795. Falpha_map TPicture
  7796. Falpha_x_origin int32
  7797. Falpha_y_origin int32
  7798. Fclip_x_origin int32
  7799. Fclip_y_origin int32
  7800. Fclip_mask TPixmap
  7801. Fgraphics_exposures int32
  7802. Fsubwindow_mode int32
  7803. Fpoly_edge int32
  7804. Fpoly_mode int32
  7805. Fdither TAtom
  7806. Fcomponent_alpha int32
  7807. }
  7808. type T_XRenderPictureAttributes = TXRenderPictureAttributes
  7809. type TXRenderColor = struct {
  7810. Fred uint16
  7811. Fgreen uint16
  7812. Fblue uint16
  7813. Falpha uint16
  7814. }
  7815. type TXGlyphInfo = struct {
  7816. Fwidth uint16
  7817. Fheight uint16
  7818. Fx int16
  7819. Fy int16
  7820. FxOff int16
  7821. FyOff int16
  7822. }
  7823. type T_XGlyphInfo = TXGlyphInfo
  7824. type TXGlyphElt8 = struct {
  7825. Fglyphset TGlyphSet
  7826. Fchars uintptr
  7827. Fnchars int32
  7828. FxOff int32
  7829. FyOff int32
  7830. }
  7831. type T_XGlyphElt8 = TXGlyphElt8
  7832. type TXGlyphElt16 = struct {
  7833. Fglyphset TGlyphSet
  7834. Fchars uintptr
  7835. Fnchars int32
  7836. FxOff int32
  7837. FyOff int32
  7838. }
  7839. type T_XGlyphElt16 = TXGlyphElt16
  7840. type TXGlyphElt32 = struct {
  7841. Fglyphset TGlyphSet
  7842. Fchars uintptr
  7843. Fnchars int32
  7844. FxOff int32
  7845. FyOff int32
  7846. }
  7847. type T_XGlyphElt32 = TXGlyphElt32
  7848. type TXDouble = float64
  7849. type TXPointDouble = struct {
  7850. Fx TXDouble
  7851. Fy TXDouble
  7852. }
  7853. type T_XPointDouble = TXPointDouble
  7854. type TXFixed = int32
  7855. type TXPointFixed = struct {
  7856. Fx TXFixed
  7857. Fy TXFixed
  7858. }
  7859. type T_XPointFixed = TXPointFixed
  7860. type TXLineFixed = struct {
  7861. Fp1 TXPointFixed
  7862. Fp2 TXPointFixed
  7863. }
  7864. type T_XLineFixed = TXLineFixed
  7865. type TXTriangle = struct {
  7866. Fp1 TXPointFixed
  7867. Fp2 TXPointFixed
  7868. Fp3 TXPointFixed
  7869. }
  7870. type T_XTriangle = TXTriangle
  7871. type TXCircle = struct {
  7872. Fx TXFixed
  7873. Fy TXFixed
  7874. Fradius TXFixed
  7875. }
  7876. type T_XCircle = TXCircle
  7877. type TXTrapezoid = struct {
  7878. Ftop TXFixed
  7879. Fbottom TXFixed
  7880. Fleft TXLineFixed
  7881. Fright TXLineFixed
  7882. }
  7883. type T_XTrapezoid = TXTrapezoid
  7884. type TXTransform = struct {
  7885. Fmatrix [3][3]TXFixed
  7886. }
  7887. type T_XTransform = TXTransform
  7888. type TXFilters = struct {
  7889. Fnfilter int32
  7890. Ffilter uintptr
  7891. Fnalias int32
  7892. Falias uintptr
  7893. }
  7894. type T_XFilters = TXFilters
  7895. type TXIndexValue = struct {
  7896. Fpixel uint64
  7897. Fred uint16
  7898. Fgreen uint16
  7899. Fblue uint16
  7900. Falpha uint16
  7901. }
  7902. type T_XIndexValue = TXIndexValue
  7903. type TXAnimCursor = struct {
  7904. Fcursor TCursor
  7905. Fdelay uint64
  7906. }
  7907. type T_XAnimCursor = TXAnimCursor
  7908. type TXSpanFix = struct {
  7909. Fleft TXFixed
  7910. Fright TXFixed
  7911. Fy TXFixed
  7912. }
  7913. type T_XSpanFix = TXSpanFix
  7914. type TXTrap = struct {
  7915. Ftop TXSpanFix
  7916. Fbottom TXSpanFix
  7917. }
  7918. type T_XTrap = TXTrap
  7919. type TXLinearGradient = struct {
  7920. Fp1 TXPointFixed
  7921. Fp2 TXPointFixed
  7922. }
  7923. type T_XLinearGradient = TXLinearGradient
  7924. type TXRadialGradient = struct {
  7925. Finner TXCircle
  7926. Fouter TXCircle
  7927. }
  7928. type T_XRadialGradient = TXRadialGradient
  7929. type TXConicalGradient = struct {
  7930. Fcenter TXPointFixed
  7931. Fangle TXFixed
  7932. }
  7933. type T_XConicalGradient = TXConicalGradient
  7934. type TXftFontInfo = struct {
  7935. Fhash TFcChar32
  7936. Ffile uintptr
  7937. Fxsize TFT_F26Dot6
  7938. Fysize TFT_F26Dot6
  7939. Fantialias TFcBool
  7940. Fembolden TFcBool
  7941. Frgba int32
  7942. Flcd_filter int32
  7943. Fmatrix TFT_Matrix
  7944. Ftransform TFcBool
  7945. Fload_flags TFT_Int
  7946. Frender TFcBool
  7947. Fspacing int32
  7948. Fminspace TFcBool
  7949. Fchar_width int32
  7950. }
  7951. type T_XftFontInfo = TXftFontInfo
  7952. type TXftFont = struct {
  7953. Fascent int32
  7954. Fdescent int32
  7955. Fheight int32
  7956. Fmax_advance_width int32
  7957. Fcharset uintptr
  7958. Fpattern uintptr
  7959. }
  7960. type T_XftFont = TXftFont
  7961. type TXftDraw = struct {
  7962. Fdpy uintptr
  7963. Fscreen int32
  7964. Fbits_per_pixel uint32
  7965. Fdepth uint32
  7966. Fdrawable TDrawable
  7967. Fvisual uintptr
  7968. Fcolormap TColormap
  7969. Fclip_type TXftClipType
  7970. Fclip TXftClip
  7971. Fsubwindow_mode int32
  7972. Frender struct {
  7973. Fpict TPicture
  7974. }
  7975. Fcore struct {
  7976. Fgc TGC
  7977. Fuse_pixmap int32
  7978. }
  7979. }
  7980. type T_XftDraw = TXftDraw
  7981. type __XftClipType = int32
  7982. const _XftClipTypeNone = 0
  7983. const _XftClipTypeRegion = 1
  7984. const _XftClipTypeRectangles = 2
  7985. type TXftColor = struct {
  7986. Fpixel uint64
  7987. Fcolor TXRenderColor
  7988. }
  7989. type T_XftColor = TXftColor
  7990. type TXftCharSpec = struct {
  7991. Fucs4 TFcChar32
  7992. Fx int16
  7993. Fy int16
  7994. }
  7995. type T_XftCharSpec = TXftCharSpec
  7996. type TXftCharFontSpec = struct {
  7997. Ffont uintptr
  7998. Fucs4 TFcChar32
  7999. Fx int16
  8000. Fy int16
  8001. }
  8002. type T_XftCharFontSpec = TXftCharFontSpec
  8003. type TXftGlyphSpec = struct {
  8004. Fglyph TFT_UInt
  8005. Fx int16
  8006. Fy int16
  8007. }
  8008. type T_XftGlyphSpec = TXftGlyphSpec
  8009. type TXftGlyphFontSpec = struct {
  8010. Ffont uintptr
  8011. Fglyph TFT_UInt
  8012. Fx int16
  8013. Fy int16
  8014. }
  8015. type T_XftGlyphFontSpec = TXftGlyphFontSpec
  8016. type TXftMatcher = struct {
  8017. Fobject uintptr
  8018. Fcompare uintptr
  8019. }
  8020. type T_XftMatcher = TXftMatcher
  8021. type TXftSymbolic = struct {
  8022. Fname uintptr
  8023. Fvalue int32
  8024. }
  8025. type T_XftSymbolic = TXftSymbolic
  8026. type TXftGlyph = struct {
  8027. Fmetrics TXGlyphInfo
  8028. Fbitmap uintptr
  8029. Fglyph_memory uint64
  8030. }
  8031. type T_XftGlyph = TXftGlyph
  8032. type TXftUcsHash = struct {
  8033. Fucs4 TFcChar32
  8034. Fglyph TFT_UInt
  8035. }
  8036. type T_XftUcsHash = TXftUcsHash
  8037. type TXftFtFile = struct {
  8038. Fnext uintptr
  8039. Fref int32
  8040. Ffile uintptr
  8041. Fid int32
  8042. Fxsize TFT_F26Dot6
  8043. Fysize TFT_F26Dot6
  8044. Fmatrix TFT_Matrix
  8045. Flock int32
  8046. Fface TFT_Face
  8047. }
  8048. type T_XftFtFile = TXftFtFile
  8049. type TXftFontInt = struct {
  8050. Fpublic TXftFont
  8051. Fnext uintptr
  8052. Fhash_next uintptr
  8053. Finfo TXftFontInfo
  8054. Fref int32
  8055. Fglyphs uintptr
  8056. Fnum_glyphs int32
  8057. Fhash_table uintptr
  8058. Fhash_value int32
  8059. Frehash_value int32
  8060. Fglyphset TGlyphSet
  8061. Fformat uintptr
  8062. Fglyph_memory uint64
  8063. Fmax_glyph_memory uint64
  8064. Fuse_free_glyphs TFcBool
  8065. }
  8066. type T_XftFontInt = TXftFontInt
  8067. type TXftClipType = int32
  8068. type TXftClipRect = struct {
  8069. FxOrigin int32
  8070. FyOrigin int32
  8071. Fn int32
  8072. }
  8073. type T_XftClipRect = TXftClipRect
  8074. type TXftClip = struct {
  8075. Fregion [0]TRegion
  8076. Frect uintptr
  8077. }
  8078. type T_XftClip = TXftClip
  8079. type TXftSolidColor = struct {
  8080. Fcolor TXRenderColor
  8081. Fscreen int32
  8082. Fpict TPicture
  8083. }
  8084. type T_XftSolidColor = TXftSolidColor
  8085. type TXftDisplayInfo = struct {
  8086. Fnext uintptr
  8087. Fdisplay uintptr
  8088. Fcodes uintptr
  8089. Fdefaults uintptr
  8090. FhasRender TFcBool
  8091. Ffonts uintptr
  8092. FsolidFormat uintptr
  8093. Fglyph_memory uint64
  8094. Fmax_glyph_memory uint64
  8095. Fuse_free_glyphs TFcBool
  8096. Fnum_unref_fonts int32
  8097. Fmax_unref_fonts int32
  8098. Fcolors [16]TXftSolidColor
  8099. FfontHash [127]uintptr
  8100. }
  8101. type T_XftDisplayInfo = TXftDisplayInfo
  8102. /* xftxlfd.c */
  8103. func XXftColorAllocName(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, name uintptr, result uintptr) (r int32) {
  8104. bp := tls.Alloc(32)
  8105. defer tls.Free(32)
  8106. var _ /* exact at bp+16 */ TXColor
  8107. var _ /* screen at bp+0 */ TXColor
  8108. if !(libx11.XXAllocNamedColor(tls, dpy, cmap, name, bp, bp+16) != 0) {
  8109. /* XXX stick standard colormap stuff here */
  8110. return m_False
  8111. }
  8112. (*TXftColor)(unsafe.Pointer(result)).Fpixel = (*(*TXColor)(unsafe.Pointer(bp))).Fpixel
  8113. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fred = (*(*TXColor)(unsafe.Pointer(bp + 16))).Fred
  8114. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fgreen = (*(*TXColor)(unsafe.Pointer(bp + 16))).Fgreen
  8115. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fblue = (*(*TXColor)(unsafe.Pointer(bp + 16))).Fblue
  8116. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Falpha = uint16(0xffff)
  8117. return int32(m_True)
  8118. }
  8119. func _maskbase(tls *libc.TLS, m uint64) (r int16) {
  8120. var i int16
  8121. _ = i
  8122. if !(m != 0) {
  8123. return 0
  8124. }
  8125. i = 0
  8126. for !(m&libc.Uint64FromInt32(1) != 0) {
  8127. m >>= uint64(1)
  8128. i++
  8129. }
  8130. return i
  8131. }
  8132. func _masklen(tls *libc.TLS, m uint64) (r int16) {
  8133. var y uint64
  8134. _ = y
  8135. y = m >> int32(1) & uint64(033333333333)
  8136. y = m - y - y>>int32(1)&uint64(033333333333)
  8137. return libc.Int16FromUint64((y + y>>libc.Int32FromInt32(3)) & libc.Uint64FromUint32(030707070707) % libc.Uint64FromInt32(077))
  8138. }
  8139. func XXftColorAllocValue(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, color uintptr, result uintptr) (r int32) {
  8140. bp := tls.Alloc(16)
  8141. defer tls.Free(16)
  8142. var blue_len, blue_shift, green_len, green_shift, red_len, red_shift int32
  8143. var _ /* xcolor at bp+0 */ TXColor
  8144. _, _, _, _, _, _ = blue_len, blue_shift, green_len, green_shift, red_len, red_shift
  8145. if (*TVisual)(unsafe.Pointer(visual)).Fclass == int32(m_TrueColor) {
  8146. red_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fred_mask))
  8147. red_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fred_mask))
  8148. green_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fgreen_mask))
  8149. green_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fgreen_mask))
  8150. blue_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fblue_mask))
  8151. blue_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fblue_mask))
  8152. (*TXftColor)(unsafe.Pointer(result)).Fpixel = libc.Uint64FromInt32(libc.Int32FromUint16((*TXRenderColor)(unsafe.Pointer(color)).Fred)>>(libc.Int32FromInt32(16)-red_len)<<red_shift | libc.Int32FromUint16((*TXRenderColor)(unsafe.Pointer(color)).Fgreen)>>(libc.Int32FromInt32(16)-green_len)<<green_shift | libc.Int32FromUint16((*TXRenderColor)(unsafe.Pointer(color)).Fblue)>>(libc.Int32FromInt32(16)-blue_len)<<blue_shift)
  8153. } else {
  8154. (*(*TXColor)(unsafe.Pointer(bp))).Fred = (*TXRenderColor)(unsafe.Pointer(color)).Fred
  8155. (*(*TXColor)(unsafe.Pointer(bp))).Fgreen = (*TXRenderColor)(unsafe.Pointer(color)).Fgreen
  8156. (*(*TXColor)(unsafe.Pointer(bp))).Fblue = (*TXRenderColor)(unsafe.Pointer(color)).Fblue
  8157. if !(libx11.XXAllocColor(tls, dpy, cmap, bp) != 0) {
  8158. return m_False
  8159. }
  8160. (*TXftColor)(unsafe.Pointer(result)).Fpixel = (*(*TXColor)(unsafe.Pointer(bp))).Fpixel
  8161. }
  8162. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fred = (*TXRenderColor)(unsafe.Pointer(color)).Fred
  8163. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fgreen = (*TXRenderColor)(unsafe.Pointer(color)).Fgreen
  8164. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fblue = (*TXRenderColor)(unsafe.Pointer(color)).Fblue
  8165. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Falpha = (*TXRenderColor)(unsafe.Pointer(color)).Falpha
  8166. return int32(m_True)
  8167. }
  8168. func XXftColorFree(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, color uintptr) {
  8169. if (*TVisual)(unsafe.Pointer(visual)).Fclass != int32(m_TrueColor) {
  8170. libx11.XXFreeColors(tls, dpy, cmap, color, int32(1), uint64(0))
  8171. }
  8172. }
  8173. type Tfuncs = struct {
  8174. Fcreate_image uintptr
  8175. Fdestroy_image uintptr
  8176. Fget_pixel uintptr
  8177. Fput_pixel uintptr
  8178. Fsub_image uintptr
  8179. Fadd_pixel uintptr
  8180. }
  8181. const m_NUM_LOCAL = 1024
  8182. /* xftxlfd.c */
  8183. func XXftRectCore(tls *libc.TLS, draw uintptr, color uintptr, x int32, y int32, width uint32, height uint32) {
  8184. if libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >= int32(0x8000) {
  8185. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  8186. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, x, y, width, height)
  8187. }
  8188. }
  8189. /*
  8190. * Use the core protocol to draw the glyphs
  8191. */
  8192. func __XftSharpGlyphMono(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8193. var bits, bitsMask uint8
  8194. var height, lenspan, stride, w, width, xspan, v1 int32
  8195. var src, srcLine, v2, v3, v4 uintptr
  8196. _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, bitsMask, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8197. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8198. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8199. stride = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  8200. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8201. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8202. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8203. for {
  8204. v1 = height
  8205. height--
  8206. if !(v1 != 0) {
  8207. break
  8208. }
  8209. src = srcLine
  8210. srcLine += uintptr(stride)
  8211. w = width
  8212. bitsMask = uint8(0x80) /* FreeType is always MSB first */
  8213. v2 = src
  8214. src++
  8215. bits = *(*uint8)(unsafe.Pointer(v2))
  8216. xspan = x
  8217. for w != 0 {
  8218. if libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0 {
  8219. lenspan = 0
  8220. for cond := true; cond; cond = libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0 {
  8221. lenspan++
  8222. if lenspan == w {
  8223. break
  8224. }
  8225. bitsMask = libc.Uint8FromInt32(libc.Int32FromUint8(bitsMask) >> int32(1))
  8226. if !(bitsMask != 0) {
  8227. v3 = src
  8228. src++
  8229. bits = *(*uint8)(unsafe.Pointer(v3))
  8230. bitsMask = uint8(0x80)
  8231. }
  8232. }
  8233. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, xspan, y, libc.Uint32FromInt32(lenspan), uint32(1))
  8234. xspan += lenspan
  8235. w -= lenspan
  8236. } else {
  8237. for cond := true; cond; cond = !(libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0) {
  8238. w--
  8239. xspan++
  8240. if !(w != 0) {
  8241. break
  8242. }
  8243. bitsMask = libc.Uint8FromInt32(libc.Int32FromUint8(bitsMask) >> int32(1))
  8244. if !(bitsMask != 0) {
  8245. v4 = src
  8246. src++
  8247. bits = *(*uint8)(unsafe.Pointer(v4))
  8248. bitsMask = uint8(0x80)
  8249. }
  8250. }
  8251. }
  8252. }
  8253. y++
  8254. }
  8255. }
  8256. // C documentation
  8257. //
  8258. // /*
  8259. // * Draw solid color text from an anti-aliased bitmap. This is a
  8260. // * fallback for cases where a particular drawable has no AA code
  8261. // */
  8262. func __XftSharpGlyphGray(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8263. var bits uint8
  8264. var height, lenspan, stride, w, width, xspan, v1 int32
  8265. var src, srcLine, v2, v3, v4 uintptr
  8266. _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8267. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8268. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8269. stride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8270. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8271. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8272. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8273. for {
  8274. v1 = height
  8275. height--
  8276. if !(v1 != 0) {
  8277. break
  8278. }
  8279. src = srcLine
  8280. srcLine += uintptr(stride)
  8281. w = width
  8282. v2 = src
  8283. src++
  8284. bits = *(*uint8)(unsafe.Pointer(v2))
  8285. xspan = x
  8286. for w != 0 {
  8287. if libc.Int32FromUint8(bits) >= int32(0x80) {
  8288. lenspan = 0
  8289. for cond := true; cond; cond = libc.Int32FromUint8(bits) >= int32(0x80) {
  8290. lenspan++
  8291. if lenspan == w {
  8292. break
  8293. }
  8294. v3 = src
  8295. src++
  8296. bits = *(*uint8)(unsafe.Pointer(v3))
  8297. }
  8298. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, xspan, y, libc.Uint32FromInt32(lenspan), uint32(1))
  8299. xspan += lenspan
  8300. w -= lenspan
  8301. } else {
  8302. for cond := true; cond; cond = libc.Int32FromUint8(bits) < int32(0x80) {
  8303. w--
  8304. xspan++
  8305. if !(w != 0) {
  8306. break
  8307. }
  8308. v4 = src
  8309. src++
  8310. bits = *(*uint8)(unsafe.Pointer(v4))
  8311. }
  8312. }
  8313. }
  8314. y++
  8315. }
  8316. }
  8317. func __XftSharpGlyphRgba(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8318. var bits TCARD32
  8319. var height, lenspan, stride, w, width, xspan, v1 int32
  8320. var src, srcLine, v2, v3, v4 uintptr
  8321. _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8322. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8323. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8324. stride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8325. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8326. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8327. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8328. for {
  8329. v1 = height
  8330. height--
  8331. if !(v1 != 0) {
  8332. break
  8333. }
  8334. src = srcLine
  8335. srcLine += uintptr(stride) * 4
  8336. w = width
  8337. v2 = src
  8338. src += 4
  8339. bits = *(*TCARD32)(unsafe.Pointer(v2))
  8340. xspan = x
  8341. for w != 0 {
  8342. if bits >= uint32(0x80000000) {
  8343. lenspan = 0
  8344. for cond := true; cond; cond = bits >= uint32(0x80000000) {
  8345. lenspan++
  8346. if lenspan == w {
  8347. break
  8348. }
  8349. v3 = src
  8350. src += 4
  8351. bits = *(*TCARD32)(unsafe.Pointer(v3))
  8352. }
  8353. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, xspan, y, libc.Uint32FromInt32(lenspan), uint32(1))
  8354. xspan += lenspan
  8355. w -= lenspan
  8356. } else {
  8357. for cond := true; cond; cond = bits < uint32(0x80000000) {
  8358. w--
  8359. xspan++
  8360. if !(w != 0) {
  8361. break
  8362. }
  8363. v4 = src
  8364. src += 4
  8365. bits = *(*TCARD32)(unsafe.Pointer(v4))
  8366. }
  8367. }
  8368. }
  8369. y++
  8370. }
  8371. }
  8372. type TXftSharpGlyph = uintptr
  8373. func __XftSharpGlyphFind(tls *libc.TLS, draw uintptr, public uintptr) (r TXftSharpGlyph) {
  8374. var font uintptr
  8375. _ = font
  8376. font = public
  8377. if !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0) {
  8378. return __ccgo_fp(__XftSharpGlyphMono)
  8379. } else {
  8380. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  8381. case int32(m_FC_RGBA_RGB):
  8382. fallthrough
  8383. case int32(m_FC_RGBA_BGR):
  8384. fallthrough
  8385. case int32(m_FC_RGBA_VRGB):
  8386. fallthrough
  8387. case int32(m_FC_RGBA_VBGR):
  8388. return __ccgo_fp(__XftSharpGlyphRgba)
  8389. default:
  8390. return __ccgo_fp(__XftSharpGlyphGray)
  8391. }
  8392. }
  8393. return r
  8394. }
  8395. /*
  8396. * Draw glyphs to a target that supports anti-aliasing
  8397. */
  8398. /*
  8399. * Primitives for converting between RGB values and TrueColor pixels
  8400. */
  8401. func __XftExamineBitfield(tls *libc.TLS, mask uint64, shift uintptr, len1 uintptr) {
  8402. var l, s int32
  8403. _, _ = l, s
  8404. s = 0
  8405. for mask&uint64(1) == uint64(0) {
  8406. mask >>= uint64(1)
  8407. s++
  8408. }
  8409. l = 0
  8410. for mask&uint64(1) == uint64(1) {
  8411. mask >>= uint64(1)
  8412. l++
  8413. }
  8414. *(*int32)(unsafe.Pointer(shift)) = s
  8415. *(*int32)(unsafe.Pointer(len1)) = l
  8416. }
  8417. func __XftGetField(tls *libc.TLS, l_pixel uint64, shift int32, len1 int32) (r TCARD32) {
  8418. var pixel TCARD32
  8419. _ = pixel
  8420. pixel = uint32(l_pixel)
  8421. pixel = pixel & libc.Uint32FromInt32((libc.Int32FromInt32(1)<<len1-libc.Int32FromInt32(1))<<shift)
  8422. pixel = pixel << (int32(32) - (shift + len1)) >> int32(24)
  8423. for len1 < int32(8) {
  8424. pixel |= pixel >> len1
  8425. len1 <<= int32(1)
  8426. }
  8427. return pixel
  8428. }
  8429. func __XftPutField(tls *libc.TLS, pixel TCARD32, shift int32, len1 int32) (r uint64) {
  8430. var l_pixel uint64
  8431. _ = l_pixel
  8432. l_pixel = uint64(pixel)
  8433. shift = shift - (int32(8) - len1)
  8434. if len1 <= int32(8) {
  8435. l_pixel &= libc.Uint64FromInt32((libc.Int32FromInt32(1)<<len1 - libc.Int32FromInt32(1)) << (libc.Int32FromInt32(8) - len1))
  8436. }
  8437. if shift < 0 {
  8438. l_pixel >>= libc.Uint64FromInt32(-shift)
  8439. } else {
  8440. l_pixel <<= libc.Uint64FromInt32(shift)
  8441. }
  8442. return l_pixel
  8443. }
  8444. // C documentation
  8445. //
  8446. // /*
  8447. // * This is used when doing XftCharFontSpec/XftGlyphFontSpec where
  8448. // * some of the fonts are bitmaps and some are anti-aliased to handle
  8449. // * the bitmap portions
  8450. // */
  8451. func __XftSmoothGlyphMono(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8452. bp := tls.Alloc(32)
  8453. defer tls.Free(32)
  8454. var bits, bitsMask uint8
  8455. var height, stride, w, width, xspan, v1, v3 int32
  8456. var pixel uint64
  8457. var src, srcLine, v2, v4 uintptr
  8458. var _ /* b_len at bp+20 */ int32
  8459. var _ /* b_shift at bp+16 */ int32
  8460. var _ /* g_len at bp+12 */ int32
  8461. var _ /* g_shift at bp+8 */ int32
  8462. var _ /* r_len at bp+4 */ int32
  8463. var _ /* r_shift at bp+0 */ int32
  8464. _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, bitsMask, height, pixel, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8465. srcLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8466. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8467. stride = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  8468. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8469. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  8470. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  8471. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  8472. pixel = __XftPutField(tls, libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred)>>int32(8)), *(*int32)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4))) | __XftPutField(tls, libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen)>>int32(8)), *(*int32)(unsafe.Pointer(bp + 8)), *(*int32)(unsafe.Pointer(bp + 12))) | __XftPutField(tls, libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue)>>int32(8)), *(*int32)(unsafe.Pointer(bp + 16)), *(*int32)(unsafe.Pointer(bp + 20)))
  8473. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8474. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8475. for {
  8476. v1 = height
  8477. height--
  8478. if !(v1 != 0) {
  8479. break
  8480. }
  8481. src = srcLine
  8482. srcLine += uintptr(stride)
  8483. w = width
  8484. bitsMask = uint8(0x80) /* FreeType is always MSB first */
  8485. v2 = src
  8486. src++
  8487. bits = *(*uint8)(unsafe.Pointer(v2))
  8488. xspan = x
  8489. for {
  8490. v3 = w
  8491. w--
  8492. if !(v3 != 0) {
  8493. break
  8494. }
  8495. if libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0 {
  8496. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, xspan, y, pixel)
  8497. }
  8498. bitsMask = libc.Uint8FromInt32(libc.Int32FromUint8(bitsMask) >> int32(1))
  8499. if !(bitsMask != 0) {
  8500. v4 = src
  8501. src++
  8502. bits = *(*uint8)(unsafe.Pointer(v4))
  8503. bitsMask = uint8(0x80)
  8504. }
  8505. xspan++
  8506. }
  8507. y++
  8508. }
  8509. }
  8510. /*
  8511. * As simple anti-aliasing is likely to be common, there are three
  8512. * optimized versions for the usual true color pixel formats (888, 565, 555).
  8513. * Other formats are handled by the general case
  8514. */
  8515. /*
  8516. * There are two ways of handling alpha -- either as a single unified value or
  8517. * a separate value for each component, hence each macro must have two
  8518. * versions. The unified alpha version has a 'U' at the end of the name,
  8519. * the component version has a 'C'. Similarly, functions which deal with
  8520. * this difference will have two versions using the same convention.
  8521. */
  8522. func _fbOver24(tls *libc.TLS, x TCARD32, y TCARD32) (r TCARD32) {
  8523. var a, t TCARD16
  8524. var m, n, o TCARD32
  8525. _, _, _, _, _ = a, m, n, o, t
  8526. a = uint16(^x >> int32(24))
  8527. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(y>>libc.Int32FromInt32(0))))*libc.Int32FromUint16(a) + int32(0x80))
  8528. t = libc.Uint16FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8) + libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(0)))))
  8529. m = uint32(libc.Uint8FromInt32(libc.Int32FromUint16(t)|(libc.Int32FromInt32(0)-libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(0)
  8530. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(y>>libc.Int32FromInt32(8))))*libc.Int32FromUint16(a) + int32(0x80))
  8531. t = libc.Uint16FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8) + libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(8)))))
  8532. n = uint32(libc.Uint8FromInt32(libc.Int32FromUint16(t)|(libc.Int32FromInt32(0)-libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(8)
  8533. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(y>>libc.Int32FromInt32(16))))*libc.Int32FromUint16(a) + int32(0x80))
  8534. t = libc.Uint16FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8) + libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(16)))))
  8535. o = uint32(libc.Uint8FromInt32(libc.Int32FromUint16(t)|(libc.Int32FromInt32(0)-libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(16)
  8536. return m | n | o
  8537. }
  8538. func _fbIn(tls *libc.TLS, x TCARD32, y TCARD8) (r TCARD32) {
  8539. var a, t TCARD16
  8540. var m, n, o, p TCARD32
  8541. _, _, _, _, _, _ = a, m, n, o, p, t
  8542. a = uint16(y)
  8543. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(0))))*libc.Int32FromUint16(a) + int32(0x80))
  8544. m = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << 0
  8545. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(8))))*libc.Int32FromUint16(a) + int32(0x80))
  8546. n = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << int32(8)
  8547. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(16))))*libc.Int32FromUint16(a) + int32(0x80))
  8548. o = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << int32(16)
  8549. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(24))))*libc.Int32FromUint16(a) + int32(0x80))
  8550. p = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << int32(24)
  8551. return m | n | o | p
  8552. }
  8553. func __XftSmoothGlyphGray8888(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8554. var b, d, g, r, src, srca TCARD32
  8555. var dst, dstLine, mask, maskLine, v3 uintptr
  8556. var dstStride, height, maskStride, w, width, v1, v2 int32
  8557. var m TCARD8
  8558. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8559. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8560. /* This handles only RGB and BGR */
  8561. g = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8562. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint64(0xff0000) {
  8563. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8564. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8565. } else {
  8566. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  8567. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  8568. }
  8569. src = srca<<libc.Int32FromInt32(24) | r | g | b
  8570. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8571. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8572. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8573. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8574. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(2))
  8575. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(2)
  8576. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8577. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8578. for {
  8579. v1 = height
  8580. height--
  8581. if !(v1 != 0) {
  8582. break
  8583. }
  8584. dst = dstLine
  8585. dstLine += uintptr(dstStride) * 4
  8586. mask = maskLine
  8587. maskLine += uintptr(maskStride)
  8588. w = width
  8589. for {
  8590. v2 = w
  8591. w--
  8592. if !(v2 != 0) {
  8593. break
  8594. }
  8595. v3 = mask
  8596. mask++
  8597. m = *(*TCARD8)(unsafe.Pointer(v3))
  8598. if libc.Int32FromUint8(m) == int32(0xff) {
  8599. if srca == uint32(0xff) {
  8600. *(*TCARD32)(unsafe.Pointer(dst)) = src
  8601. } else {
  8602. *(*TCARD32)(unsafe.Pointer(dst)) = _fbOver24(tls, src, *(*TCARD32)(unsafe.Pointer(dst)))
  8603. }
  8604. } else {
  8605. if m != 0 {
  8606. d = _fbIn(tls, src, m)
  8607. *(*TCARD32)(unsafe.Pointer(dst)) = _fbOver24(tls, d, *(*TCARD32)(unsafe.Pointer(dst)))
  8608. }
  8609. }
  8610. dst += 4
  8611. }
  8612. }
  8613. }
  8614. func __XftSmoothGlyphGray565(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8615. var b, d, g, r, src, srca TCARD32
  8616. var dst, dstLine, mask, maskLine, v3 uintptr
  8617. var dstStride, height, maskStride, w, width, v1, v2 int32
  8618. var m TCARD8
  8619. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8620. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8621. /* This handles only RGB and BGR */
  8622. g = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8623. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint64(0xf800) {
  8624. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8625. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8626. } else {
  8627. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  8628. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  8629. }
  8630. src = srca<<libc.Int32FromInt32(24) | r | g | b
  8631. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8632. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8633. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8634. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8635. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(1))
  8636. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(1)
  8637. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8638. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8639. for {
  8640. v1 = height
  8641. height--
  8642. if !(v1 != 0) {
  8643. break
  8644. }
  8645. dst = dstLine
  8646. dstLine += uintptr(dstStride) * 2
  8647. mask = maskLine
  8648. maskLine += uintptr(maskStride)
  8649. w = width
  8650. for {
  8651. v2 = w
  8652. w--
  8653. if !(v2 != 0) {
  8654. break
  8655. }
  8656. v3 = mask
  8657. mask++
  8658. m = *(*TCARD8)(unsafe.Pointer(v3))
  8659. if libc.Int32FromUint8(m) == int32(0xff) {
  8660. if srca == uint32(0xff) {
  8661. d = src
  8662. } else {
  8663. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8664. d = _fbOver24(tls, src, d<<libc.Int32FromInt32(3)&libc.Uint32FromInt32(0xf8)|d>>libc.Int32FromInt32(2)&libc.Uint32FromInt32(0x7)|(d<<libc.Int32FromInt32(5)&libc.Uint32FromInt32(0xfc00)|d>>libc.Int32FromInt32(1)&libc.Uint32FromInt32(0x300))|(d<<libc.Int32FromInt32(8)&libc.Uint32FromInt32(0xf80000)|d<<libc.Int32FromInt32(3)&libc.Uint32FromInt32(0x70000)))
  8665. }
  8666. *(*TCARD16)(unsafe.Pointer(dst)) = uint16(d>>libc.Int32FromInt32(3)&libc.Uint32FromInt32(0x001f) | d>>libc.Int32FromInt32(5)&libc.Uint32FromInt32(0x07e0) | d>>libc.Int32FromInt32(8)&libc.Uint32FromInt32(0xf800))
  8667. } else {
  8668. if m != 0 {
  8669. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8670. d = _fbOver24(tls, _fbIn(tls, src, m), d<<libc.Int32FromInt32(3)&libc.Uint32FromInt32(0xf8)|d>>libc.Int32FromInt32(2)&libc.Uint32FromInt32(0x7)|(d<<libc.Int32FromInt32(5)&libc.Uint32FromInt32(0xfc00)|d>>libc.Int32FromInt32(1)&libc.Uint32FromInt32(0x300))|(d<<libc.Int32FromInt32(8)&libc.Uint32FromInt32(0xf80000)|d<<libc.Int32FromInt32(3)&libc.Uint32FromInt32(0x70000)))
  8671. *(*TCARD16)(unsafe.Pointer(dst)) = uint16(d>>libc.Int32FromInt32(3)&libc.Uint32FromInt32(0x001f) | d>>libc.Int32FromInt32(5)&libc.Uint32FromInt32(0x07e0) | d>>libc.Int32FromInt32(8)&libc.Uint32FromInt32(0xf800))
  8672. }
  8673. }
  8674. dst += 2
  8675. }
  8676. }
  8677. }
  8678. func __XftSmoothGlyphGray555(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8679. var b, d, g, r, src, srca TCARD32
  8680. var dst, dstLine, mask, maskLine, v3 uintptr
  8681. var dstStride, height, maskStride, w, width, v1, v2 int32
  8682. var m TCARD8
  8683. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8684. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8685. /* This handles only RGB and BGR */
  8686. g = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8687. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint64(0xf800) {
  8688. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8689. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8690. } else {
  8691. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  8692. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  8693. }
  8694. src = srca<<libc.Int32FromInt32(24) | r | g | b
  8695. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8696. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8697. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8698. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8699. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(1))
  8700. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(1)
  8701. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8702. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8703. for {
  8704. v1 = height
  8705. height--
  8706. if !(v1 != 0) {
  8707. break
  8708. }
  8709. dst = dstLine
  8710. dstLine += uintptr(dstStride) * 2
  8711. mask = maskLine
  8712. maskLine += uintptr(maskStride)
  8713. w = width
  8714. for {
  8715. v2 = w
  8716. w--
  8717. if !(v2 != 0) {
  8718. break
  8719. }
  8720. v3 = mask
  8721. mask++
  8722. m = *(*TCARD8)(unsafe.Pointer(v3))
  8723. if libc.Int32FromUint8(m) == int32(0xff) {
  8724. if srca == uint32(0xff) {
  8725. d = src
  8726. } else {
  8727. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8728. d = _fbOver24(tls, src, d<<libc.Int32FromInt32(3)&libc.Uint32FromInt32(0xf8)|d>>libc.Int32FromInt32(2)&libc.Uint32FromInt32(0x7)|(d<<libc.Int32FromInt32(6)&libc.Uint32FromInt32(0xf800)|d>>libc.Int32FromInt32(0)&libc.Uint32FromInt32(0x300))|(d<<libc.Int32FromInt32(9)&libc.Uint32FromInt32(0xf80000)|d<<libc.Int32FromInt32(4)&libc.Uint32FromInt32(0x70000)))
  8729. }
  8730. *(*TCARD16)(unsafe.Pointer(dst)) = uint16(d>>libc.Int32FromInt32(3)&libc.Uint32FromInt32(0x001f) | d>>libc.Int32FromInt32(6)&libc.Uint32FromInt32(0x03e0) | d>>libc.Int32FromInt32(7)&libc.Uint32FromInt32(0x7c00))
  8731. } else {
  8732. if m != 0 {
  8733. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8734. d = _fbOver24(tls, _fbIn(tls, src, m), d<<libc.Int32FromInt32(3)&libc.Uint32FromInt32(0xf8)|d>>libc.Int32FromInt32(2)&libc.Uint32FromInt32(0x7)|(d<<libc.Int32FromInt32(6)&libc.Uint32FromInt32(0xf800)|d>>libc.Int32FromInt32(0)&libc.Uint32FromInt32(0x300))|(d<<libc.Int32FromInt32(9)&libc.Uint32FromInt32(0xf80000)|d<<libc.Int32FromInt32(4)&libc.Uint32FromInt32(0x70000)))
  8735. *(*TCARD16)(unsafe.Pointer(dst)) = uint16(d>>libc.Int32FromInt32(3)&libc.Uint32FromInt32(0x001f) | d>>libc.Int32FromInt32(6)&libc.Uint32FromInt32(0x03e0) | d>>libc.Int32FromInt32(7)&libc.Uint32FromInt32(0x7c00))
  8736. }
  8737. }
  8738. dst += 2
  8739. }
  8740. }
  8741. }
  8742. func __XftSmoothGlyphGray(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8743. bp := tls.Alloc(32)
  8744. defer tls.Free(32)
  8745. var d, src, srca TCARD32
  8746. var height, maskStride, tx, w, width, v1, v2 int32
  8747. var m TCARD8
  8748. var mask, maskLine, v3 uintptr
  8749. var pixel uint64
  8750. var _ /* b_len at bp+20 */ int32
  8751. var _ /* b_shift at bp+16 */ int32
  8752. var _ /* g_len at bp+12 */ int32
  8753. var _ /* g_shift at bp+8 */ int32
  8754. var _ /* r_len at bp+4 */ int32
  8755. var _ /* r_shift at bp+0 */ int32
  8756. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, height, m, mask, maskLine, maskStride, pixel, src, srca, tx, w, width, v1, v2, v3
  8757. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8758. src = srca<<libc.Int32FromInt32(24) | libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred)&libc.Int32FromInt32(0xff00)<<libc.Int32FromInt32(8)) | libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen)&libc.Int32FromInt32(0xff00)) | libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue)>>libc.Int32FromInt32(8))
  8759. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8760. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8761. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8762. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8763. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8764. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8765. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  8766. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  8767. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  8768. for {
  8769. v1 = height
  8770. height--
  8771. if !(v1 != 0) {
  8772. break
  8773. }
  8774. mask = maskLine
  8775. maskLine += uintptr(maskStride)
  8776. w = width
  8777. tx = x
  8778. for {
  8779. v2 = w
  8780. w--
  8781. if !(v2 != 0) {
  8782. break
  8783. }
  8784. v3 = mask
  8785. mask++
  8786. m = *(*TCARD8)(unsafe.Pointer(v3))
  8787. if libc.Int32FromUint8(m) == int32(0xff) {
  8788. if srca == uint32(0xff) {
  8789. d = src
  8790. } else {
  8791. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  8792. d = __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4)))<<libc.Int32FromInt32(16) | __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp + 8)), *(*int32)(unsafe.Pointer(bp + 12)))<<libc.Int32FromInt32(8) | __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp + 16)), *(*int32)(unsafe.Pointer(bp + 20)))
  8793. d = _fbOver24(tls, src, d)
  8794. }
  8795. pixel = __XftPutField(tls, d>>libc.Int32FromInt32(16)&uint32(0xff), *(*int32)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4))) | __XftPutField(tls, d>>libc.Int32FromInt32(8)&uint32(0xff), *(*int32)(unsafe.Pointer(bp + 8)), *(*int32)(unsafe.Pointer(bp + 12))) | __XftPutField(tls, d&uint32(0xff), *(*int32)(unsafe.Pointer(bp + 16)), *(*int32)(unsafe.Pointer(bp + 20)))
  8796. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  8797. } else {
  8798. if m != 0 {
  8799. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  8800. d = __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4)))<<libc.Int32FromInt32(16) | __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp + 8)), *(*int32)(unsafe.Pointer(bp + 12)))<<libc.Int32FromInt32(8) | __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp + 16)), *(*int32)(unsafe.Pointer(bp + 20)))
  8801. d = _fbOver24(tls, _fbIn(tls, src, m), d)
  8802. pixel = __XftPutField(tls, d>>libc.Int32FromInt32(16)&uint32(0xff), *(*int32)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4))) | __XftPutField(tls, d>>libc.Int32FromInt32(8)&uint32(0xff), *(*int32)(unsafe.Pointer(bp + 8)), *(*int32)(unsafe.Pointer(bp + 12))) | __XftPutField(tls, d&uint32(0xff), *(*int32)(unsafe.Pointer(bp + 16)), *(*int32)(unsafe.Pointer(bp + 20)))
  8803. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  8804. }
  8805. }
  8806. tx++
  8807. }
  8808. y++
  8809. }
  8810. }
  8811. func __XftSmoothGlyphRgba(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8812. bp := tls.Alloc(32)
  8813. defer tls.Free(32)
  8814. var __a, __a1, __a2 TCARD16
  8815. var __i, __i1, __i2, __t, __t1, __t2, __ta, __ta1, __ta2, d, m, ma, n, o, src, srca TCARD32
  8816. var height, tx, w, width, v1, v2 int32
  8817. var mask, v3 uintptr
  8818. var pixel uint64
  8819. var _ /* b_len at bp+20 */ int32
  8820. var _ /* b_shift at bp+16 */ int32
  8821. var _ /* g_len at bp+12 */ int32
  8822. var _ /* g_shift at bp+8 */ int32
  8823. var _ /* r_len at bp+4 */ int32
  8824. var _ /* r_shift at bp+0 */ int32
  8825. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = __a, __a1, __a2, __i, __i1, __i2, __t, __t1, __t2, __ta, __ta1, __ta2, d, height, m, ma, mask, n, o, pixel, src, srca, tx, w, width, v1, v2, v3
  8826. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8827. src = srca<<libc.Int32FromInt32(24) | libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred)&libc.Int32FromInt32(0xff00)<<libc.Int32FromInt32(8)) | libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen)&libc.Int32FromInt32(0xff00)) | libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue)>>libc.Int32FromInt32(8))
  8828. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8829. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8830. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8831. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8832. mask = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8833. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  8834. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  8835. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  8836. for {
  8837. v1 = height
  8838. height--
  8839. if !(v1 != 0) {
  8840. break
  8841. }
  8842. w = width
  8843. tx = x
  8844. for {
  8845. v2 = w
  8846. w--
  8847. if !(v2 != 0) {
  8848. break
  8849. }
  8850. v3 = mask
  8851. mask += 4
  8852. ma = *(*TCARD32)(unsafe.Pointer(v3))
  8853. if ma == uint32(0xffffffff) {
  8854. if srca == uint32(0xff) {
  8855. d = src
  8856. } else {
  8857. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  8858. d = __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4)))<<libc.Int32FromInt32(16) | __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp + 8)), *(*int32)(unsafe.Pointer(bp + 12)))<<libc.Int32FromInt32(8) | __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp + 16)), *(*int32)(unsafe.Pointer(bp + 20)))
  8859. d = _fbOver24(tls, src, d)
  8860. }
  8861. pixel = __XftPutField(tls, d>>libc.Int32FromInt32(16)&uint32(0xff), *(*int32)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4))) | __XftPutField(tls, d>>libc.Int32FromInt32(8)&uint32(0xff), *(*int32)(unsafe.Pointer(bp + 8)), *(*int32)(unsafe.Pointer(bp + 12))) | __XftPutField(tls, d&uint32(0xff), *(*int32)(unsafe.Pointer(bp + 16)), *(*int32)(unsafe.Pointer(bp + 20)))
  8862. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  8863. } else {
  8864. if ma != 0 {
  8865. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  8866. d = __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4)))<<libc.Int32FromInt32(16) | __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp + 8)), *(*int32)(unsafe.Pointer(bp + 12)))<<libc.Int32FromInt32(8) | __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp + 16)), *(*int32)(unsafe.Pointer(bp + 20)))
  8867. __a = uint16(uint8(ma >> libc.Int32FromInt32(0)))
  8868. __i = libc.Uint32FromInt32(libc.Int32FromUint16(uint16(uint8(src>>libc.Int32FromInt32(0))))*libc.Int32FromUint16(__a) + int32(0x80))
  8869. __t = (__i>>libc.Int32FromInt32(8) + __i) >> libc.Int32FromInt32(8)
  8870. __i = srca*uint32(__a) + uint32(0x80)
  8871. __ta = uint32(uint8(^((__i>>libc.Int32FromInt32(8) + __i) >> libc.Int32FromInt32(8))))
  8872. __i = uint32(uint16(uint8(d>>libc.Int32FromInt32(0))))*__ta + uint32(0x80)
  8873. __t = __t + (__i>>libc.Int32FromInt32(8)+__i)>>libc.Int32FromInt32(8)
  8874. __t = uint32(uint8(__t | -(__t >> libc.Int32FromInt32(8))))
  8875. m = __t << 0
  8876. __a1 = uint16(uint8(ma >> libc.Int32FromInt32(8)))
  8877. __i1 = libc.Uint32FromInt32(libc.Int32FromUint16(uint16(uint8(src>>libc.Int32FromInt32(8))))*libc.Int32FromUint16(__a1) + int32(0x80))
  8878. __t1 = (__i1>>libc.Int32FromInt32(8) + __i1) >> libc.Int32FromInt32(8)
  8879. __i1 = srca*uint32(__a1) + uint32(0x80)
  8880. __ta1 = uint32(uint8(^((__i1>>libc.Int32FromInt32(8) + __i1) >> libc.Int32FromInt32(8))))
  8881. __i1 = uint32(uint16(uint8(d>>libc.Int32FromInt32(8))))*__ta1 + uint32(0x80)
  8882. __t1 = __t1 + (__i1>>libc.Int32FromInt32(8)+__i1)>>libc.Int32FromInt32(8)
  8883. __t1 = uint32(uint8(__t1 | -(__t1 >> libc.Int32FromInt32(8))))
  8884. n = __t1 << int32(8)
  8885. __a2 = uint16(uint8(ma >> libc.Int32FromInt32(16)))
  8886. __i2 = libc.Uint32FromInt32(libc.Int32FromUint16(uint16(uint8(src>>libc.Int32FromInt32(16))))*libc.Int32FromUint16(__a2) + int32(0x80))
  8887. __t2 = (__i2>>libc.Int32FromInt32(8) + __i2) >> libc.Int32FromInt32(8)
  8888. __i2 = srca*uint32(__a2) + uint32(0x80)
  8889. __ta2 = uint32(uint8(^((__i2>>libc.Int32FromInt32(8) + __i2) >> libc.Int32FromInt32(8))))
  8890. __i2 = uint32(uint16(uint8(d>>libc.Int32FromInt32(16))))*__ta2 + uint32(0x80)
  8891. __t2 = __t2 + (__i2>>libc.Int32FromInt32(8)+__i2)>>libc.Int32FromInt32(8)
  8892. __t2 = uint32(uint8(__t2 | -(__t2 >> libc.Int32FromInt32(8))))
  8893. o = __t2 << int32(16)
  8894. d = m | n | o
  8895. pixel = __XftPutField(tls, d>>libc.Int32FromInt32(16)&uint32(0xff), *(*int32)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4))) | __XftPutField(tls, d>>libc.Int32FromInt32(8)&uint32(0xff), *(*int32)(unsafe.Pointer(bp + 8)), *(*int32)(unsafe.Pointer(bp + 12))) | __XftPutField(tls, d&uint32(0xff), *(*int32)(unsafe.Pointer(bp + 16)), *(*int32)(unsafe.Pointer(bp + 20)))
  8896. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  8897. }
  8898. }
  8899. tx++
  8900. }
  8901. y++
  8902. }
  8903. }
  8904. func __XftSmoothGlyphPossible(tls *libc.TLS, draw uintptr) (r TFcBool) {
  8905. if !((*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0) {
  8906. return m_FcFalse
  8907. }
  8908. if (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fclass != int32(m_TrueColor) {
  8909. return m_FcFalse
  8910. }
  8911. return int32(m_FcTrue)
  8912. }
  8913. type TXftSmoothGlyph = uintptr
  8914. func __XftSmoothGlyphFind(tls *libc.TLS, draw uintptr, public uintptr) (r TXftSmoothGlyph) {
  8915. var font uintptr
  8916. _ = font
  8917. font = public
  8918. if !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0) {
  8919. return __ccgo_fp(__XftSmoothGlyphMono)
  8920. } else {
  8921. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  8922. case int32(m_FC_RGBA_RGB):
  8923. fallthrough
  8924. case int32(m_FC_RGBA_BGR):
  8925. fallthrough
  8926. case int32(m_FC_RGBA_VRGB):
  8927. fallthrough
  8928. case int32(m_FC_RGBA_VBGR):
  8929. return __ccgo_fp(__XftSmoothGlyphRgba)
  8930. default:
  8931. switch XXftDrawBitsPerPixel(tls, draw) {
  8932. case uint32(32):
  8933. if (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask == uint64(0xff0000) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask == uint64(0x00ff00) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask == uint64(0x0000ff) || (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask == uint64(0x0000ff) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask == uint64(0x00ff00) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask == uint64(0xff0000) {
  8934. return __ccgo_fp(__XftSmoothGlyphGray8888)
  8935. }
  8936. case uint32(16):
  8937. if (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask == uint64(0xf800) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask == uint64(0x07e0) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask == uint64(0x001f) || (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask == uint64(0x001f) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask == uint64(0x07e0) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask == uint64(0xf800) {
  8938. return __ccgo_fp(__XftSmoothGlyphGray565)
  8939. }
  8940. if (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask == uint64(0x7c00) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask == uint64(0x03e0) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask == uint64(0x001f) || (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask == uint64(0x001f) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask == uint64(0x03e0) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask == uint64(0x7c00) {
  8941. return __ccgo_fp(__XftSmoothGlyphGray555)
  8942. }
  8943. default:
  8944. break
  8945. }
  8946. return __ccgo_fp(__XftSmoothGlyphGray)
  8947. }
  8948. }
  8949. return r
  8950. }
  8951. func __XftGlyphDefault(tls *libc.TLS, dpy uintptr, public uintptr) (r uintptr) {
  8952. bp := tls.Alloc(1040)
  8953. defer tls.Free(1040)
  8954. var font uintptr
  8955. var glyphs_loaded TFcBool
  8956. var _ /* missing at bp+0 */ [256]TFT_UInt
  8957. var _ /* nmissing at bp+1024 */ int32
  8958. _, _ = font, glyphs_loaded
  8959. font = public
  8960. glyphs_loaded = m_FcFalse
  8961. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), uint32(0), bp, bp+1024) != 0 {
  8962. glyphs_loaded = int32(m_FcTrue)
  8963. }
  8964. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  8965. XXftFontLoadGlyphs(tls, dpy, public, glyphs_loaded, bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  8966. }
  8967. return *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs))
  8968. }
  8969. func _XftGetImageErrorHandler(tls *libc.TLS, dpy uintptr, error_event uintptr) (r int32) {
  8970. return 0
  8971. }
  8972. func XXftGlyphCore(tls *libc.TLS, draw uintptr, color uintptr, public uintptr, x int32, y int32, glyphs uintptr, nglyphs int32) {
  8973. bp := tls.Alloc(1168)
  8974. defer tls.Free(1168)
  8975. var depth, v3 uint32
  8976. var dpy, font, g, image, xftg, v10, v11, v2, v6, v7 uintptr
  8977. var gc TGC
  8978. var glyph TFT_UInt
  8979. var glyphs_loaded TFcBool
  8980. var n, ox, oy, v1, v5, v9 int32
  8981. var pix TPixmap
  8982. var prev_error TXErrorHandler
  8983. var sharp TXftSharpGlyph
  8984. var smooth TXftSmoothGlyph
  8985. var v12, v4, v8 bool
  8986. var _ /* gcv at bp+1040 */ TXGCValues
  8987. var _ /* gi at bp+1028 */ TXGlyphInfo
  8988. var _ /* missing at bp+0 */ [256]TFT_UInt
  8989. var _ /* nmissing at bp+1024 */ int32
  8990. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = depth, dpy, font, g, gc, glyph, glyphs_loaded, image, n, ox, oy, pix, prev_error, sharp, smooth, xftg, v1, v10, v11, v12, v2, v3, v4, v5, v6, v7, v8, v9
  8991. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  8992. font = public
  8993. /*
  8994. * Load missing glyphs
  8995. */
  8996. g = glyphs
  8997. n = nglyphs
  8998. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  8999. glyphs_loaded = m_FcFalse
  9000. for {
  9001. v1 = n
  9002. n--
  9003. if !(v1 != 0) {
  9004. break
  9005. }
  9006. v2 = g
  9007. g += 4
  9008. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), *(*TFT_UInt)(unsafe.Pointer(v2)), bp, bp+1024) != 0 {
  9009. glyphs_loaded = int32(m_FcTrue)
  9010. }
  9011. }
  9012. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9013. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9014. }
  9015. g = glyphs
  9016. n = nglyphs
  9017. if ((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 || libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9018. smooth = __XftSmoothGlyphFind(tls, draw, public)
  9019. XXftGlyphExtents(tls, dpy, public, glyphs, nglyphs, bp+1028)
  9020. if !((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth != 0) || !((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight != 0) {
  9021. goto bail1
  9022. }
  9023. ox = x - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9024. oy = y - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9025. /*
  9026. * Try to get bits directly from the drawable; if that fails,
  9027. * use a temporary pixmap. When it does fail, assume it
  9028. * will probably fail for a while and keep using temporary
  9029. * pixmaps for a while to avoid double round trips.
  9030. */
  9031. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9032. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9033. image = libx11.XXGetImage(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, ox, oy, uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth), uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight), libc.Uint64FromInt64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9034. libx11.XXSetErrorHandler(tls, prev_error)
  9035. if !(image != 0) {
  9036. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9037. }
  9038. } else {
  9039. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9040. image = libc.UintptrFromInt32(0)
  9041. }
  9042. if v4 = !(image != 0); v4 {
  9043. v3 = XXftDrawDepth(tls, draw)
  9044. depth = v3
  9045. }
  9046. if v4 && v3 != 0 {
  9047. pix = libx11.XXCreatePixmap(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth), uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight), depth)
  9048. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9049. gc = libx11.XXCreateGC(tls, dpy, pix, libc.Uint64FromInt64(libc.Int64FromInt64(1)<<libc.Int32FromInt32(16)), bp+1040)
  9050. libx11.XXCopyArea(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, pix, gc, ox, oy, uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth), uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight), 0, 0)
  9051. libx11.XXFreeGC(tls, dpy, gc)
  9052. image = libx11.XXGetImage(tls, dpy, pix, 0, 0, uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth), uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight), libc.Uint64FromInt64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9053. libx11.XXFreePixmap(tls, dpy, pix)
  9054. }
  9055. if !(image != 0) {
  9056. goto bail1
  9057. }
  9058. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9059. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9060. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9061. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9062. XXftSwapImage(tls, image)
  9063. }
  9064. for {
  9065. v5 = n
  9066. n--
  9067. if !(v5 != 0) {
  9068. break
  9069. }
  9070. v6 = g
  9071. g += 4
  9072. glyph = *(*TFT_UInt)(unsafe.Pointer(v6))
  9073. if v8 = glyph >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs); !v8 {
  9074. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9075. xftg = v7
  9076. }
  9077. if v8 || !(v7 != 0) {
  9078. xftg = __XftGlyphDefault(tls, dpy, public)
  9079. }
  9080. if xftg != 0 {
  9081. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr))(unsafe.Pointer(&struct{ uintptr }{smooth})))(tls, image, xftg, x-ox, y-oy, color)
  9082. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  9083. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  9084. }
  9085. }
  9086. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9087. XXftSwapImage(tls, image)
  9088. }
  9089. libx11.XXPutImage(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, image, 0, 0, ox, oy, uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth), uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight))
  9090. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9091. } else {
  9092. sharp = __XftSharpGlyphFind(tls, draw, public)
  9093. for {
  9094. v9 = n
  9095. n--
  9096. if !(v9 != 0) {
  9097. break
  9098. }
  9099. v10 = g
  9100. g += 4
  9101. glyph = *(*TFT_UInt)(unsafe.Pointer(v10))
  9102. if v12 = glyph >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs); !v12 {
  9103. v11 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9104. xftg = v11
  9105. }
  9106. if v12 || !(v11 != 0) {
  9107. xftg = __XftGlyphDefault(tls, dpy, public)
  9108. }
  9109. if xftg != 0 {
  9110. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32))(unsafe.Pointer(&struct{ uintptr }{sharp})))(tls, draw, xftg, x, y)
  9111. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  9112. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  9113. }
  9114. }
  9115. }
  9116. goto bail1
  9117. bail1:
  9118. ;
  9119. if glyphs_loaded != 0 {
  9120. X_XftFontManageMemory(tls, dpy, public)
  9121. }
  9122. }
  9123. func XXftGlyphSpecCore(tls *libc.TLS, draw uintptr, color uintptr, public uintptr, glyphs uintptr, nglyphs int32) {
  9124. bp := tls.Alloc(1168)
  9125. defer tls.Free(1168)
  9126. var depth, v5 uint32
  9127. var dpy, font, image, xftg, v11, v8 uintptr
  9128. var g_x1, g_x2, g_y1, g_y2, height, i, width, x1, x2, y1, y2, v1, v2, v3 int32
  9129. var gc TGC
  9130. var glyph, glyph1 TFT_UInt
  9131. var glyphs_loaded TFcBool
  9132. var pix TPixmap
  9133. var prev_error TXErrorHandler
  9134. var sharp TXftSharpGlyph
  9135. var smooth TXftSmoothGlyph
  9136. var v12, v6, v9 bool
  9137. var _ /* gcv at bp+1040 */ TXGCValues
  9138. var _ /* gi at bp+1028 */ TXGlyphInfo
  9139. var _ /* missing at bp+0 */ [256]TFT_UInt
  9140. var _ /* nmissing at bp+1024 */ int32
  9141. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = depth, dpy, font, g_x1, g_x2, g_y1, g_y2, gc, glyph, glyph1, glyphs_loaded, height, i, image, pix, prev_error, sharp, smooth, width, x1, x2, xftg, y1, y2, v1, v11, v12, v2, v3, v5, v6, v8, v9
  9142. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  9143. font = public
  9144. /*
  9145. * Load missing glyphs
  9146. */
  9147. glyphs_loaded = m_FcFalse
  9148. v3 = libc.Int32FromInt32(0)
  9149. y2 = v3
  9150. v2 = v3
  9151. x2 = v2
  9152. v1 = v2
  9153. y1 = v1
  9154. x1 = v1
  9155. i = 0
  9156. for {
  9157. if !(i < nglyphs) {
  9158. break
  9159. }
  9160. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  9161. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph, bp, bp+1024) != 0 {
  9162. glyphs_loaded = int32(m_FcTrue)
  9163. }
  9164. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9165. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9166. }
  9167. XXftGlyphExtents(tls, dpy, public, glyphs+uintptr(i)*8, int32(1), bp+1028)
  9168. g_x1 = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9169. g_y1 = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9170. g_x2 = g_x1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth)
  9171. g_y2 = g_y1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight)
  9172. if i != 0 {
  9173. if g_x1 < x1 {
  9174. x1 = g_x1
  9175. }
  9176. if g_y1 < y1 {
  9177. y1 = g_y1
  9178. }
  9179. if g_x2 > x2 {
  9180. x2 = g_x2
  9181. }
  9182. if g_y2 > y2 {
  9183. y2 = g_y2
  9184. }
  9185. } else {
  9186. x1 = g_x1
  9187. y1 = g_y1
  9188. x2 = g_x2
  9189. y2 = g_y2
  9190. }
  9191. goto _4
  9192. _4:
  9193. ;
  9194. i++
  9195. }
  9196. if x1 == x2 || y1 == y2 {
  9197. goto bail1
  9198. }
  9199. if ((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 || libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9200. width = x2 - x1
  9201. height = y2 - y1
  9202. smooth = __XftSmoothGlyphFind(tls, draw, public)
  9203. /*
  9204. * Try to get bits directly from the drawable; if that fails,
  9205. * use a temporary pixmap. When it does fail, assume it
  9206. * will probably fail for a while and keep using temporary
  9207. * pixmaps for a while to avoid double round trips.
  9208. */
  9209. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9210. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9211. image = libx11.XXGetImage(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), libc.Uint64FromInt64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9212. libx11.XXSetErrorHandler(tls, prev_error)
  9213. if !(image != 0) {
  9214. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9215. }
  9216. } else {
  9217. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9218. image = libc.UintptrFromInt32(0)
  9219. }
  9220. if v6 = !(image != 0); v6 {
  9221. v5 = XXftDrawDepth(tls, draw)
  9222. depth = v5
  9223. }
  9224. if v6 && v5 != 0 {
  9225. pix = libx11.XXCreatePixmap(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), depth)
  9226. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9227. gc = libx11.XXCreateGC(tls, dpy, pix, libc.Uint64FromInt64(libc.Int64FromInt64(1)<<libc.Int32FromInt32(16)), bp+1040)
  9228. libx11.XXCopyArea(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, pix, gc, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), 0, 0)
  9229. libx11.XXFreeGC(tls, dpy, gc)
  9230. image = libx11.XXGetImage(tls, dpy, pix, 0, 0, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), libc.Uint64FromInt64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9231. libx11.XXFreePixmap(tls, dpy, pix)
  9232. }
  9233. if !(image != 0) {
  9234. goto bail1
  9235. }
  9236. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9237. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9238. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9239. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9240. XXftSwapImage(tls, image)
  9241. }
  9242. i = 0
  9243. for {
  9244. if !(i < nglyphs) {
  9245. break
  9246. }
  9247. glyph = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  9248. if v9 = glyph >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs); !v9 {
  9249. v8 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9250. xftg = v8
  9251. }
  9252. if v9 || !(v8 != 0) {
  9253. xftg = __XftGlyphDefault(tls, dpy, public)
  9254. }
  9255. if xftg != 0 {
  9256. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr))(unsafe.Pointer(&struct{ uintptr }{smooth})))(tls, image, xftg, int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx)-x1, int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy)-y1, color)
  9257. }
  9258. goto _7
  9259. _7:
  9260. ;
  9261. i++
  9262. }
  9263. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9264. XXftSwapImage(tls, image)
  9265. }
  9266. libx11.XXPutImage(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, image, 0, 0, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height))
  9267. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9268. } else {
  9269. sharp = __XftSharpGlyphFind(tls, draw, public)
  9270. i = 0
  9271. for {
  9272. if !(i < nglyphs) {
  9273. break
  9274. }
  9275. glyph1 = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  9276. if v12 = glyph1 >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs); !v12 {
  9277. v11 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph1)*8))
  9278. xftg = v11
  9279. }
  9280. if v12 || !(v11 != 0) {
  9281. xftg = __XftGlyphDefault(tls, dpy, public)
  9282. }
  9283. if xftg != 0 {
  9284. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32))(unsafe.Pointer(&struct{ uintptr }{sharp})))(tls, draw, xftg, int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx), int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy))
  9285. }
  9286. goto _10
  9287. _10:
  9288. ;
  9289. i++
  9290. }
  9291. }
  9292. goto bail1
  9293. bail1:
  9294. ;
  9295. if glyphs_loaded != 0 {
  9296. X_XftFontManageMemory(tls, dpy, public)
  9297. }
  9298. }
  9299. func XXftGlyphFontSpecCore(tls *libc.TLS, draw uintptr, color uintptr, glyphs uintptr, nglyphs int32) {
  9300. bp := tls.Alloc(1168)
  9301. defer tls.Free(1168)
  9302. var depth, v6 uint32
  9303. var dpy, font, font1, image, public, public1, public2, xftg, v12, v9 uintptr
  9304. var g_x1, g_x2, g_y1, g_y2, height, i, width, x1, x2, y1, y2, v1, v2, v3 int32
  9305. var gc TGC
  9306. var glyph, glyph1 TFT_UInt
  9307. var glyphs_loaded TFcBool
  9308. var pix TPixmap
  9309. var prev_error TXErrorHandler
  9310. var sharp TXftSharpGlyph
  9311. var smooth TXftSmoothGlyph
  9312. var t int16
  9313. var v10, v13, v7 bool
  9314. var _ /* gcv at bp+1040 */ TXGCValues
  9315. var _ /* gi at bp+1028 */ TXGlyphInfo
  9316. var _ /* missing at bp+0 */ [256]TFT_UInt
  9317. var _ /* nmissing at bp+1024 */ int32
  9318. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = depth, dpy, font, font1, g_x1, g_x2, g_y1, g_y2, gc, glyph, glyph1, glyphs_loaded, height, i, image, pix, prev_error, public, public1, public2, sharp, smooth, t, width, x1, x2, xftg, y1, y2, v1, v10, v12, v13, v2, v3, v6, v7, v9
  9319. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  9320. /*
  9321. * Load missing glyphs
  9322. */
  9323. glyphs_loaded = m_FcFalse
  9324. v3 = libc.Int32FromInt32(0)
  9325. y2 = v3
  9326. v2 = v3
  9327. x2 = v2
  9328. v1 = v2
  9329. y1 = v1
  9330. x1 = v1
  9331. i = 0
  9332. for {
  9333. if !(i < nglyphs) {
  9334. break
  9335. }
  9336. public = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  9337. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  9338. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph, bp, bp+1024) != 0 {
  9339. glyphs_loaded = int32(m_FcTrue)
  9340. }
  9341. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9342. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9343. }
  9344. XXftGlyphExtents(tls, dpy, public, glyphs+uintptr(i)*16+8, int32(1), bp+1028)
  9345. g_x1 = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9346. g_y1 = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9347. g_x2 = g_x1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth)
  9348. g_y2 = g_y1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight)
  9349. if i != 0 {
  9350. if g_x1 < x1 {
  9351. if g_x1 < 0 {
  9352. /* do nothing if the given glyphs are out of range */
  9353. t = int16((*TXftFont)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i-int32(1))*16))).Ffont)).Fmax_advance_width + int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i-int32(1))*16))).Fx))
  9354. if int32(t) < 0 && int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i-int32(1))*16))).Fx) > 0 {
  9355. goto bail1
  9356. }
  9357. }
  9358. x1 = g_x1
  9359. }
  9360. if g_y1 < y1 {
  9361. y1 = g_y1
  9362. }
  9363. if g_x2 > x2 {
  9364. x2 = g_x2
  9365. }
  9366. if g_y2 > y2 {
  9367. y2 = g_y2
  9368. }
  9369. } else {
  9370. x1 = g_x1
  9371. y1 = g_y1
  9372. x2 = g_x2
  9373. y2 = g_y2
  9374. }
  9375. goto _4
  9376. _4:
  9377. ;
  9378. i++
  9379. }
  9380. if x1 == x2 || y1 == y2 {
  9381. goto bail1
  9382. }
  9383. i = 0
  9384. for {
  9385. if !(i < nglyphs) {
  9386. break
  9387. }
  9388. if (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Finfo.Fantialias != 0 {
  9389. break
  9390. }
  9391. goto _5
  9392. _5:
  9393. ;
  9394. i++
  9395. }
  9396. if (i != nglyphs || libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9397. width = x2 - x1
  9398. height = y2 - y1
  9399. /*
  9400. * Try to get bits directly from the drawable; if that fails,
  9401. * use a temporary pixmap. When it does fail, assume it
  9402. * will probably fail for a while and keep using temporary
  9403. * pixmaps for a while to avoid double round trips.
  9404. */
  9405. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9406. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9407. image = libx11.XXGetImage(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), libc.Uint64FromInt64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9408. libx11.XXSetErrorHandler(tls, prev_error)
  9409. if !(image != 0) {
  9410. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9411. }
  9412. } else {
  9413. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9414. image = libc.UintptrFromInt32(0)
  9415. }
  9416. if v7 = !(image != 0); v7 {
  9417. v6 = XXftDrawDepth(tls, draw)
  9418. depth = v6
  9419. }
  9420. if v7 && v6 != 0 {
  9421. pix = libx11.XXCreatePixmap(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), depth)
  9422. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9423. gc = libx11.XXCreateGC(tls, dpy, pix, libc.Uint64FromInt64(libc.Int64FromInt64(1)<<libc.Int32FromInt32(16)), bp+1040)
  9424. libx11.XXCopyArea(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, pix, gc, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), 0, 0)
  9425. libx11.XXFreeGC(tls, dpy, gc)
  9426. image = libx11.XXGetImage(tls, dpy, pix, 0, 0, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), libc.Uint64FromInt64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9427. libx11.XXFreePixmap(tls, dpy, pix)
  9428. }
  9429. if !(image != 0) {
  9430. goto bail1
  9431. }
  9432. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9433. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9434. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9435. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9436. XXftSwapImage(tls, image)
  9437. }
  9438. i = 0
  9439. for {
  9440. if !(i < nglyphs) {
  9441. break
  9442. }
  9443. public1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  9444. font = public1
  9445. smooth = __XftSmoothGlyphFind(tls, draw, public1)
  9446. glyph = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  9447. if v10 = glyph >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs); !v10 {
  9448. v9 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9449. xftg = v9
  9450. }
  9451. if v10 || !(v9 != 0) {
  9452. xftg = __XftGlyphDefault(tls, dpy, public1)
  9453. }
  9454. if xftg != 0 {
  9455. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr))(unsafe.Pointer(&struct{ uintptr }{smooth})))(tls, image, xftg, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx)-x1, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy)-y1, color)
  9456. }
  9457. goto _8
  9458. _8:
  9459. ;
  9460. i++
  9461. }
  9462. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9463. XXftSwapImage(tls, image)
  9464. }
  9465. libx11.XXPutImage(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, image, 0, 0, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height))
  9466. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9467. } else {
  9468. i = 0
  9469. for {
  9470. if !(i < nglyphs) {
  9471. break
  9472. }
  9473. public2 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  9474. font1 = public2
  9475. sharp = __XftSharpGlyphFind(tls, draw, public2)
  9476. glyph1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  9477. if v13 = glyph1 >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font1)).Fnum_glyphs); !v13 {
  9478. v12 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(glyph1)*8))
  9479. xftg = v12
  9480. }
  9481. if v13 || !(v12 != 0) {
  9482. xftg = __XftGlyphDefault(tls, dpy, public2)
  9483. }
  9484. if xftg != 0 {
  9485. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32))(unsafe.Pointer(&struct{ uintptr }{sharp})))(tls, draw, xftg, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx), int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy))
  9486. }
  9487. goto _11
  9488. _11:
  9489. ;
  9490. i++
  9491. }
  9492. }
  9493. goto bail1
  9494. bail1:
  9495. ;
  9496. if glyphs_loaded != 0 {
  9497. i = 0
  9498. for {
  9499. if !(i < nglyphs) {
  9500. break
  9501. }
  9502. X_XftFontManageMemory(tls, dpy, (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)
  9503. goto _14
  9504. _14:
  9505. ;
  9506. i++
  9507. }
  9508. }
  9509. }
  9510. /* xftxlfd.c */
  9511. func XXftDebug(tls *libc.TLS) (r int32) {
  9512. bp := tls.Alloc(16)
  9513. defer tls.Free(16)
  9514. var e uintptr
  9515. _ = e
  9516. if !(_initialized != 0) {
  9517. _initialized = int32(1)
  9518. e = libc.Xgetenv(tls, __ccgo_ts)
  9519. if e != 0 {
  9520. libc.Xprintf(tls, __ccgo_ts+10, libc.VaList(bp+8, e))
  9521. _debug = libc.Xatoi(tls, e)
  9522. if _debug <= 0 {
  9523. _debug = int32(1)
  9524. }
  9525. }
  9526. }
  9527. return _debug
  9528. }
  9529. var _initialized int32
  9530. var _debug int32
  9531. func __XftCloseDisplay(tls *libc.TLS, dpy uintptr, codes uintptr) (r int32) {
  9532. var info, prev, v2 uintptr
  9533. _, _, _ = info, prev, v2
  9534. info = X_XftDisplayInfoGet(tls, dpy, m_FcFalse)
  9535. if !(info != 0) {
  9536. return 0
  9537. }
  9538. /*
  9539. * Get rid of any dangling unreferenced fonts
  9540. */
  9541. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = 0
  9542. XXftFontManageMemory(tls, dpy)
  9543. /*
  9544. * Clean up the default values
  9545. */
  9546. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0 {
  9547. libfontconfig.XFcPatternDestroy(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults)
  9548. }
  9549. /*
  9550. * Unhook from the global list
  9551. */
  9552. prev = uintptr(unsafe.Pointer(&X_XftDisplayInfo))
  9553. for {
  9554. v2 = *(*uintptr)(unsafe.Pointer(prev))
  9555. info = v2
  9556. if !(v2 != 0) {
  9557. break
  9558. }
  9559. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay == dpy {
  9560. break
  9561. }
  9562. goto _1
  9563. _1:
  9564. ;
  9565. prev = *(*uintptr)(unsafe.Pointer(prev))
  9566. }
  9567. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext
  9568. libc.Xfree(tls, info)
  9569. return 0
  9570. }
  9571. func X_XftDisplayInfoGet(tls *libc.TLS, dpy uintptr, createIfNecessary TFcBool) (r uintptr) {
  9572. bp := tls.Alloc(96)
  9573. defer tls.Free(96)
  9574. var format, info, prev, visual, v2, v3 uintptr
  9575. var i int32
  9576. var _ /* error_base at bp+44 */ int32
  9577. var _ /* event_base at bp+40 */ int32
  9578. var _ /* major at bp+48 */ int32
  9579. var _ /* minor at bp+52 */ int32
  9580. var _ /* pf at bp+0 */ TXRenderPictFormat
  9581. _, _, _, _, _, _, _ = format, i, info, prev, visual, v2, v3
  9582. prev = uintptr(unsafe.Pointer(&X_XftDisplayInfo))
  9583. for {
  9584. v2 = *(*uintptr)(unsafe.Pointer(prev))
  9585. info = v2
  9586. if !(v2 != 0) {
  9587. break
  9588. }
  9589. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay == dpy {
  9590. /*
  9591. * MRU the list
  9592. */
  9593. if prev != uintptr(unsafe.Pointer(&X_XftDisplayInfo)) {
  9594. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext
  9595. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext = X_XftDisplayInfo
  9596. X_XftDisplayInfo = info
  9597. }
  9598. return info
  9599. }
  9600. goto _1
  9601. _1:
  9602. ;
  9603. prev = *(*uintptr)(unsafe.Pointer(prev))
  9604. }
  9605. if !(createIfNecessary != 0) {
  9606. return libc.UintptrFromInt32(0)
  9607. }
  9608. info = libc.Xmalloc(tls, uint64(1488))
  9609. if !(info != 0) {
  9610. goto bail0
  9611. }
  9612. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes = libx11.XXAddExtension(tls, dpy)
  9613. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes != 0) {
  9614. goto bail1
  9615. }
  9616. libx11.XXESetCloseDisplay(tls, dpy, (*TXExtCodes)(unsafe.Pointer((*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes)).Fextension, __ccgo_fp(__XftCloseDisplay))
  9617. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay = dpy
  9618. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = libc.UintptrFromInt32(0)
  9619. (*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat = libc.UintptrFromInt32(0)
  9620. (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender = libc.BoolInt32(libxrender.XXRenderQueryExtension(tls, dpy, bp+40, bp+44) != 0 && libxrender.XXRenderFindVisualFormat(tls, dpy, (*TScreen)(unsafe.Pointer((*struct {
  9621. Fext_data uintptr
  9622. Fprivate1 uintptr
  9623. Ffd int32
  9624. Fprivate2 int32
  9625. Fproto_major_version int32
  9626. Fproto_minor_version int32
  9627. Fvendor uintptr
  9628. Fprivate3 TXID
  9629. Fprivate4 TXID
  9630. Fprivate5 TXID
  9631. Fprivate6 int32
  9632. Fresource_alloc uintptr
  9633. Fbyte_order int32
  9634. Fbitmap_unit int32
  9635. Fbitmap_pad int32
  9636. Fbitmap_bit_order int32
  9637. Fnformats int32
  9638. Fpixmap_format uintptr
  9639. Fprivate8 int32
  9640. Frelease int32
  9641. Fprivate9 uintptr
  9642. Fprivate10 uintptr
  9643. Fqlen int32
  9644. Flast_request_read uint64
  9645. Frequest uint64
  9646. Fprivate11 TXPointer
  9647. Fprivate12 TXPointer
  9648. Fprivate13 TXPointer
  9649. Fprivate14 TXPointer
  9650. Fmax_request_size uint32
  9651. Fdb uintptr
  9652. Fprivate15 uintptr
  9653. Fdisplay_name uintptr
  9654. Fdefault_screen int32
  9655. Fnscreens int32
  9656. Fscreens uintptr
  9657. Fmotion_buffer uint64
  9658. Fprivate16 uint64
  9659. Fmin_keycode int32
  9660. Fmax_keycode int32
  9661. Fprivate17 TXPointer
  9662. Fprivate18 TXPointer
  9663. Fprivate19 int32
  9664. Fxdefaults uintptr
  9665. })(unsafe.Pointer(dpy)).Fscreens+uintptr((*struct {
  9666. Fext_data uintptr
  9667. Fprivate1 uintptr
  9668. Ffd int32
  9669. Fprivate2 int32
  9670. Fproto_major_version int32
  9671. Fproto_minor_version int32
  9672. Fvendor uintptr
  9673. Fprivate3 TXID
  9674. Fprivate4 TXID
  9675. Fprivate5 TXID
  9676. Fprivate6 int32
  9677. Fresource_alloc uintptr
  9678. Fbyte_order int32
  9679. Fbitmap_unit int32
  9680. Fbitmap_pad int32
  9681. Fbitmap_bit_order int32
  9682. Fnformats int32
  9683. Fpixmap_format uintptr
  9684. Fprivate8 int32
  9685. Frelease int32
  9686. Fprivate9 uintptr
  9687. Fprivate10 uintptr
  9688. Fqlen int32
  9689. Flast_request_read uint64
  9690. Frequest uint64
  9691. Fprivate11 TXPointer
  9692. Fprivate12 TXPointer
  9693. Fprivate13 TXPointer
  9694. Fprivate14 TXPointer
  9695. Fmax_request_size uint32
  9696. Fdb uintptr
  9697. Fprivate15 uintptr
  9698. Fdisplay_name uintptr
  9699. Fdefault_screen int32
  9700. Fnscreens int32
  9701. Fscreens uintptr
  9702. Fmotion_buffer uint64
  9703. Fprivate16 uint64
  9704. Fmin_keycode int32
  9705. Fmax_keycode int32
  9706. Fprivate17 TXPointer
  9707. Fprivate18 TXPointer
  9708. Fprivate19 int32
  9709. Fxdefaults uintptr
  9710. })(unsafe.Pointer(dpy)).Fdefault_screen)*128)).Froot_visual) != libc.UintptrFromInt32(0))
  9711. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs = int32(m_FcTrue)
  9712. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  9713. libxrender.XXRenderQueryVersion(tls, dpy, bp+48, bp+52)
  9714. if *(*int32)(unsafe.Pointer(bp + 48)) < 0 || *(*int32)(unsafe.Pointer(bp + 48)) == 0 && *(*int32)(unsafe.Pointer(bp + 52)) <= int32(2) {
  9715. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs = m_FcFalse
  9716. }
  9717. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Ftype1 = int32(m_PictTypeDirect)
  9718. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth = int32(32)
  9719. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FredMask = int16(0xff)
  9720. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FgreenMask = int16(0xff)
  9721. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FblueMask = int16(0xff)
  9722. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FalphaMask = int16(0xff)
  9723. (*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat = libxrender.XXRenderFindFormat(tls, dpy, libc.Uint64FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(1)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(2)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(4)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(6)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(8)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(10)), bp, 0)
  9724. }
  9725. if XXftDebug(tls)&int32(m_XFT_DBG_RENDER) != 0 {
  9726. visual = (*TScreen)(unsafe.Pointer((*struct {
  9727. Fext_data uintptr
  9728. Fprivate1 uintptr
  9729. Ffd int32
  9730. Fprivate2 int32
  9731. Fproto_major_version int32
  9732. Fproto_minor_version int32
  9733. Fvendor uintptr
  9734. Fprivate3 TXID
  9735. Fprivate4 TXID
  9736. Fprivate5 TXID
  9737. Fprivate6 int32
  9738. Fresource_alloc uintptr
  9739. Fbyte_order int32
  9740. Fbitmap_unit int32
  9741. Fbitmap_pad int32
  9742. Fbitmap_bit_order int32
  9743. Fnformats int32
  9744. Fpixmap_format uintptr
  9745. Fprivate8 int32
  9746. Frelease int32
  9747. Fprivate9 uintptr
  9748. Fprivate10 uintptr
  9749. Fqlen int32
  9750. Flast_request_read uint64
  9751. Frequest uint64
  9752. Fprivate11 TXPointer
  9753. Fprivate12 TXPointer
  9754. Fprivate13 TXPointer
  9755. Fprivate14 TXPointer
  9756. Fmax_request_size uint32
  9757. Fdb uintptr
  9758. Fprivate15 uintptr
  9759. Fdisplay_name uintptr
  9760. Fdefault_screen int32
  9761. Fnscreens int32
  9762. Fscreens uintptr
  9763. Fmotion_buffer uint64
  9764. Fprivate16 uint64
  9765. Fmin_keycode int32
  9766. Fmax_keycode int32
  9767. Fprivate17 TXPointer
  9768. Fprivate18 TXPointer
  9769. Fprivate19 int32
  9770. Fxdefaults uintptr
  9771. })(unsafe.Pointer(dpy)).Fscreens + uintptr((*struct {
  9772. Fext_data uintptr
  9773. Fprivate1 uintptr
  9774. Ffd int32
  9775. Fprivate2 int32
  9776. Fproto_major_version int32
  9777. Fproto_minor_version int32
  9778. Fvendor uintptr
  9779. Fprivate3 TXID
  9780. Fprivate4 TXID
  9781. Fprivate5 TXID
  9782. Fprivate6 int32
  9783. Fresource_alloc uintptr
  9784. Fbyte_order int32
  9785. Fbitmap_unit int32
  9786. Fbitmap_pad int32
  9787. Fbitmap_bit_order int32
  9788. Fnformats int32
  9789. Fpixmap_format uintptr
  9790. Fprivate8 int32
  9791. Frelease int32
  9792. Fprivate9 uintptr
  9793. Fprivate10 uintptr
  9794. Fqlen int32
  9795. Flast_request_read uint64
  9796. Frequest uint64
  9797. Fprivate11 TXPointer
  9798. Fprivate12 TXPointer
  9799. Fprivate13 TXPointer
  9800. Fprivate14 TXPointer
  9801. Fmax_request_size uint32
  9802. Fdb uintptr
  9803. Fprivate15 uintptr
  9804. Fdisplay_name uintptr
  9805. Fdefault_screen int32
  9806. Fnscreens int32
  9807. Fscreens uintptr
  9808. Fmotion_buffer uint64
  9809. Fprivate16 uint64
  9810. Fmin_keycode int32
  9811. Fmax_keycode int32
  9812. Fprivate17 TXPointer
  9813. Fprivate18 TXPointer
  9814. Fprivate19 int32
  9815. Fxdefaults uintptr
  9816. })(unsafe.Pointer(dpy)).Fdefault_screen)*128)).Froot_visual
  9817. format = libxrender.XXRenderFindVisualFormat(tls, dpy, visual)
  9818. libc.Xprintf(tls, __ccgo_ts+24, libc.VaList(bp+64, libc.Int32FromUint64((*TVisual)(unsafe.Pointer(visual)).Fvisualid)))
  9819. if format != 0 {
  9820. if (*TXRenderPictFormat)(unsafe.Pointer(format)).Ftype1 == int32(m_PictTypeDirect) {
  9821. libc.Xprintf(tls, __ccgo_ts+63, libc.VaList(bp+64, int32((*TXRenderPictFormat)(unsafe.Pointer(format)).Fdirect.Falpha), int32((*TXRenderPictFormat)(unsafe.Pointer(format)).Fdirect.Fred), int32((*TXRenderPictFormat)(unsafe.Pointer(format)).Fdirect.Fgreen), int32((*TXRenderPictFormat)(unsafe.Pointer(format)).Fdirect.Fblue)))
  9822. } else {
  9823. libc.Xprintf(tls, __ccgo_ts+83, 0)
  9824. }
  9825. } else {
  9826. libc.Xprintf(tls, __ccgo_ts+99, 0)
  9827. }
  9828. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  9829. v3 = __ccgo_ts + 136
  9830. } else {
  9831. v3 = __ccgo_ts + 141
  9832. }
  9833. libc.Xprintf(tls, __ccgo_ts+147, libc.VaList(bp+64, v3))
  9834. }
  9835. i = 0
  9836. for {
  9837. if !(i < int32(m_XFT_NUM_SOLID_COLOR)) {
  9838. break
  9839. }
  9840. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fscreen = -int32(1)
  9841. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict = uint64(0)
  9842. goto _4
  9843. _4:
  9844. ;
  9845. i++
  9846. }
  9847. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts = libc.UintptrFromInt32(0)
  9848. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext = X_XftDisplayInfo
  9849. X_XftDisplayInfo = info
  9850. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory = uint64(0)
  9851. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory = libc.Uint64FromInt32(XXftDefaultGetInteger(tls, dpy, __ccgo_ts+201, 0, libc.Int32FromInt32(4)*libc.Int32FromInt32(1024)*libc.Int32FromInt32(1024)))
  9852. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  9853. libc.Xprintf(tls, __ccgo_ts+216, libc.VaList(bp+64, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory))
  9854. }
  9855. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts = 0
  9856. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = XXftDefaultGetInteger(tls, dpy, __ccgo_ts+245, 0, int32(m_XFT_DPY_MAX_UNREF_FONTS))
  9857. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  9858. libc.Xprintf(tls, __ccgo_ts+259, libc.VaList(bp+64, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts))
  9859. }
  9860. libc.Xmemset(tls, info+472, int32('\000'), libc.Uint64FromInt64(8)*libc.Uint64FromInt32(m_XFT_NUM_FONT_HASH))
  9861. return info
  9862. goto bail1
  9863. bail1:
  9864. ;
  9865. libc.Xfree(tls, info)
  9866. goto bail0
  9867. bail0:
  9868. ;
  9869. if XXftDebug(tls)&int32(m_XFT_DBG_RENDER) != 0 {
  9870. libc.Xprintf(tls, __ccgo_ts+286, 0)
  9871. }
  9872. return libc.UintptrFromInt32(0)
  9873. }
  9874. /*
  9875. * Reduce memory usage in X server
  9876. */
  9877. func __XftDisplayValidateMemory(tls *libc.TLS, info uintptr) {
  9878. bp := tls.Alloc(32)
  9879. defer tls.Free(32)
  9880. var font, public uintptr
  9881. var glyph_memory uint64
  9882. _, _, _ = font, glyph_memory, public
  9883. glyph_memory = uint64(0)
  9884. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  9885. for {
  9886. if !(public != 0) {
  9887. break
  9888. }
  9889. font = public
  9890. glyph_memory += (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  9891. goto _1
  9892. _1:
  9893. ;
  9894. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  9895. }
  9896. if glyph_memory != (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory {
  9897. libc.Xprintf(tls, __ccgo_ts+339, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory, glyph_memory))
  9898. }
  9899. }
  9900. func X_XftDisplayManageMemory(tls *libc.TLS, dpy uintptr) {
  9901. bp := tls.Alloc(32)
  9902. defer tls.Free(32)
  9903. var font, info, public uintptr
  9904. var glyph_memory uint64
  9905. _, _, _, _ = font, glyph_memory, info, public
  9906. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  9907. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory != 0) {
  9908. return
  9909. }
  9910. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  9911. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory {
  9912. libc.Xprintf(tls, __ccgo_ts+401, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory))
  9913. }
  9914. __XftDisplayValidateMemory(tls, info)
  9915. }
  9916. for (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory {
  9917. glyph_memory = libc.Uint64FromInt32(libc.Xrand(tls)) % (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory
  9918. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  9919. for public != 0 {
  9920. font = public
  9921. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > glyph_memory {
  9922. X_XftFontUncacheGlyph(tls, dpy, public)
  9923. break
  9924. }
  9925. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  9926. glyph_memory -= (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  9927. }
  9928. }
  9929. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  9930. __XftDisplayValidateMemory(tls, info)
  9931. }
  9932. }
  9933. func XXftDefaultHasRender(tls *libc.TLS, dpy uintptr) (r int32) {
  9934. var info uintptr
  9935. _ = info
  9936. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  9937. if !(info != 0) {
  9938. return m_False
  9939. }
  9940. return (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender
  9941. }
  9942. func XXftDefaultSet(tls *libc.TLS, dpy uintptr, defaults uintptr) (r int32) {
  9943. var info uintptr
  9944. _ = info
  9945. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  9946. if !(info != 0) {
  9947. return m_False
  9948. }
  9949. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0 {
  9950. libfontconfig.XFcPatternDestroy(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults)
  9951. }
  9952. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = defaults
  9953. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory != 0) {
  9954. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory = libc.Uint64FromInt32(libc.Int32FromInt32(4) * libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024))
  9955. }
  9956. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory = libc.Uint64FromInt32(XXftDefaultGetInteger(tls, dpy, __ccgo_ts+201, 0, libc.Int32FromUint64((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory)))
  9957. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts != 0) {
  9958. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = int32(m_XFT_DPY_MAX_UNREF_FONTS)
  9959. }
  9960. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = XXftDefaultGetInteger(tls, dpy, __ccgo_ts+245, 0, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts)
  9961. return int32(m_True)
  9962. }
  9963. func XXftDefaultParseBool(tls *libc.TLS, v uintptr) (r int32) {
  9964. var c0, c1 uint8
  9965. _, _ = c0, c1
  9966. c0 = *(*uint8)(unsafe.Pointer(v))
  9967. if libc.BoolInt32(libc.Uint32FromInt32(libc.Int32FromUint8(c0))-uint32('A') < uint32(26)) != 0 {
  9968. c0 = libc.Uint8FromInt32(libc.Xtolower(tls, libc.Int32FromUint8(c0)))
  9969. }
  9970. if libc.Int32FromUint8(c0) == int32('t') || libc.Int32FromUint8(c0) == int32('y') || libc.Int32FromUint8(c0) == int32('1') {
  9971. return int32(1)
  9972. }
  9973. if libc.Int32FromUint8(c0) == int32('f') || libc.Int32FromUint8(c0) == int32('n') || libc.Int32FromUint8(c0) == int32('0') {
  9974. return 0
  9975. }
  9976. if libc.Int32FromUint8(c0) == int32('o') {
  9977. c1 = *(*uint8)(unsafe.Pointer(v + 1))
  9978. if libc.BoolInt32(libc.Uint32FromInt32(libc.Int32FromUint8(c1))-uint32('A') < uint32(26)) != 0 {
  9979. c1 = libc.Uint8FromInt32(libc.Xtolower(tls, libc.Int32FromUint8(c1)))
  9980. }
  9981. if libc.Int32FromUint8(c1) == int32('n') {
  9982. return int32(1)
  9983. }
  9984. if libc.Int32FromUint8(c1) == int32('f') {
  9985. return 0
  9986. }
  9987. }
  9988. return -int32(1)
  9989. }
  9990. func __XftDefaultInitBool(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  9991. var i, v1 int32
  9992. var v uintptr
  9993. var v2 bool
  9994. _, _, _, _ = i, v, v1, v2
  9995. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+439, option)
  9996. if v2 = v != 0; v2 {
  9997. v1 = XXftDefaultParseBool(tls, v)
  9998. i = v1
  9999. }
  10000. if v2 && v1 >= 0 {
  10001. return libfontconfig.XFcPatternAddBool(tls, pat, option, libc.BoolInt32(i != 0))
  10002. }
  10003. return int32(m_True)
  10004. }
  10005. func __XftDefaultInitDouble(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  10006. bp := tls.Alloc(16)
  10007. defer tls.Free(16)
  10008. var d float64
  10009. var v uintptr
  10010. var _ /* e at bp+0 */ uintptr
  10011. _, _ = d, v
  10012. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+439, option)
  10013. if v != 0 {
  10014. d = libc.Xstrtod(tls, v, bp)
  10015. if *(*uintptr)(unsafe.Pointer(bp)) != v {
  10016. return libfontconfig.XFcPatternAddDouble(tls, pat, option, d)
  10017. }
  10018. }
  10019. return int32(m_True)
  10020. }
  10021. func __XftDefaultInitInteger(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  10022. bp := tls.Alloc(16)
  10023. defer tls.Free(16)
  10024. var v uintptr
  10025. var _ /* e at bp+0 */ uintptr
  10026. var _ /* i at bp+8 */ int32
  10027. _ = v
  10028. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+439, option)
  10029. if v != 0 {
  10030. if libfontconfig.XFcNameConstant(tls, v, bp+8) != 0 {
  10031. return libfontconfig.XFcPatternAddInteger(tls, pat, option, *(*int32)(unsafe.Pointer(bp + 8)))
  10032. }
  10033. *(*int32)(unsafe.Pointer(bp + 8)) = int32(libc.Xstrtol(tls, v, bp, 0))
  10034. if *(*uintptr)(unsafe.Pointer(bp)) != v {
  10035. return libfontconfig.XFcPatternAddInteger(tls, pat, option, *(*int32)(unsafe.Pointer(bp + 8)))
  10036. }
  10037. }
  10038. return int32(m_True)
  10039. }
  10040. func __XftDefaultInit(tls *libc.TLS, dpy uintptr) (r uintptr) {
  10041. var pat uintptr
  10042. _ = pat
  10043. pat = libfontconfig.XFcPatternCreate(tls)
  10044. if !(pat != 0) {
  10045. goto bail0
  10046. }
  10047. if !(__XftDefaultInitDouble(tls, dpy, pat, __ccgo_ts+443) != 0) {
  10048. goto bail1
  10049. }
  10050. if !(__XftDefaultInitDouble(tls, dpy, pat, __ccgo_ts+449) != 0) {
  10051. goto bail1
  10052. }
  10053. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+453) != 0) {
  10054. goto bail1
  10055. }
  10056. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+460) != 0) {
  10057. goto bail1
  10058. }
  10059. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+465) != 0) {
  10060. goto bail1
  10061. }
  10062. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+475) != 0) {
  10063. goto bail1
  10064. }
  10065. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+485) != 0) {
  10066. goto bail1
  10067. }
  10068. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+494) != 0) {
  10069. goto bail1
  10070. }
  10071. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+503) != 0) {
  10072. goto bail1
  10073. }
  10074. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+513) != 0) {
  10075. goto bail1
  10076. }
  10077. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+521) != 0) {
  10078. goto bail1
  10079. }
  10080. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+201) != 0) {
  10081. goto bail1
  10082. }
  10083. return pat
  10084. goto bail1
  10085. bail1:
  10086. ;
  10087. libfontconfig.XFcPatternDestroy(tls, pat)
  10088. goto bail0
  10089. bail0:
  10090. ;
  10091. return libc.UintptrFromInt32(0)
  10092. return r
  10093. }
  10094. func __XftDefaultGet(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, v uintptr) (r1 TFcResult) {
  10095. var info uintptr
  10096. var r TFcResult
  10097. _, _ = info, r
  10098. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10099. if !(info != 0) {
  10100. return int32(_FcResultNoMatch)
  10101. }
  10102. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0) {
  10103. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = __XftDefaultInit(tls, dpy)
  10104. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0) {
  10105. return int32(_FcResultNoMatch)
  10106. }
  10107. }
  10108. r = libfontconfig.XFcPatternGet(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults, object, screen, v)
  10109. if r == int32(_FcResultNoId) && screen > 0 {
  10110. r = libfontconfig.XFcPatternGet(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults, object, 0, v)
  10111. }
  10112. return r
  10113. }
  10114. func XXftDefaultGetBool(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, def int32) (r1 int32) {
  10115. bp := tls.Alloc(16)
  10116. defer tls.Free(16)
  10117. var r TFcResult
  10118. var _ /* v at bp+0 */ TFcValue
  10119. _ = r
  10120. r = __XftDefaultGet(tls, dpy, object, screen, bp)
  10121. if r != int32(_FcResultMatch) || (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 != int32(_FcTypeBool) {
  10122. return def
  10123. }
  10124. return *(*TFcBool)(unsafe.Pointer(bp + 8))
  10125. }
  10126. func XXftDefaultGetInteger(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, def int32) (r1 int32) {
  10127. bp := tls.Alloc(16)
  10128. defer tls.Free(16)
  10129. var r TFcResult
  10130. var _ /* v at bp+0 */ TFcValue
  10131. _ = r
  10132. r = __XftDefaultGet(tls, dpy, object, screen, bp)
  10133. if r != int32(_FcResultMatch) || (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 != int32(_FcTypeInteger) {
  10134. return def
  10135. }
  10136. return *(*int32)(unsafe.Pointer(bp + 8))
  10137. }
  10138. func XXftDefaultGetDouble(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, def float64) (r1 float64) {
  10139. bp := tls.Alloc(16)
  10140. defer tls.Free(16)
  10141. var r TFcResult
  10142. var _ /* v at bp+0 */ TFcValue
  10143. _ = r
  10144. r = __XftDefaultGet(tls, dpy, object, screen, bp)
  10145. if r != int32(_FcResultMatch) || (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 != int32(_FcTypeDouble) {
  10146. return def
  10147. }
  10148. return *(*float64)(unsafe.Pointer(bp + 8))
  10149. }
  10150. func XXftDefaultSubstitute(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr) {
  10151. bp := tls.Alloc(16)
  10152. defer tls.Free(16)
  10153. var dpi float64
  10154. var render_order, subpixel int32
  10155. var _ /* v at bp+0 */ TFcValue
  10156. _, _, _ = dpi, render_order, subpixel
  10157. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+453, 0, bp) == int32(_FcResultNoMatch) {
  10158. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+453, XXftDefaultGetBool(tls, dpy, __ccgo_ts+453, screen, XXftDefaultHasRender(tls, dpy)))
  10159. }
  10160. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+475, 0, bp) == int32(_FcResultNoMatch) {
  10161. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+475, XXftDefaultGetBool(tls, dpy, __ccgo_ts+475, screen, int32(m_True)))
  10162. }
  10163. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+485, 0, bp) == int32(_FcResultNoMatch) {
  10164. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+485, XXftDefaultGetBool(tls, dpy, __ccgo_ts+485, screen, m_False))
  10165. }
  10166. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+513, 0, bp) == int32(_FcResultNoMatch) {
  10167. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+513, XXftDefaultGetBool(tls, dpy, __ccgo_ts+513, screen, int32(m_True)))
  10168. }
  10169. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+503, 0, bp) == int32(_FcResultNoMatch) {
  10170. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+503, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+503, screen, int32(m_FC_HINT_FULL)))
  10171. }
  10172. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+494, 0, bp) == int32(_FcResultNoMatch) {
  10173. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+494, XXftDefaultGetBool(tls, dpy, __ccgo_ts+494, screen, m_False))
  10174. }
  10175. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+460, 0, bp) == int32(_FcResultNoMatch) {
  10176. subpixel = m_FC_RGBA_UNKNOWN
  10177. if XXftDefaultHasRender(tls, dpy) != 0 {
  10178. render_order = libxrender.XXRenderQuerySubpixelOrder(tls, dpy, screen)
  10179. switch render_order {
  10180. default:
  10181. fallthrough
  10182. case m_SubPixelUnknown:
  10183. subpixel = m_FC_RGBA_UNKNOWN
  10184. case int32(m_SubPixelHorizontalRGB):
  10185. subpixel = int32(m_FC_RGBA_RGB)
  10186. case int32(m_SubPixelHorizontalBGR):
  10187. subpixel = int32(m_FC_RGBA_BGR)
  10188. case int32(m_SubPixelVerticalRGB):
  10189. subpixel = int32(m_FC_RGBA_VRGB)
  10190. case int32(m_SubPixelVerticalBGR):
  10191. subpixel = int32(m_FC_RGBA_VBGR)
  10192. case int32(m_SubPixelNone):
  10193. subpixel = int32(m_FC_RGBA_NONE)
  10194. break
  10195. }
  10196. }
  10197. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+460, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+460, screen, subpixel))
  10198. }
  10199. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+465, 0, bp) == int32(_FcResultNoMatch) {
  10200. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+465, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+465, screen, int32(m_FC_LCD_DEFAULT)))
  10201. }
  10202. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+521, 0, bp) == int32(_FcResultNoMatch) {
  10203. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+521, XXftDefaultGetBool(tls, dpy, __ccgo_ts+521, screen, m_False))
  10204. }
  10205. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+449, 0, bp) == int32(_FcResultNoMatch) {
  10206. dpi = float64(float64((*TScreen)(unsafe.Pointer((*struct {
  10207. Fext_data uintptr
  10208. Fprivate1 uintptr
  10209. Ffd int32
  10210. Fprivate2 int32
  10211. Fproto_major_version int32
  10212. Fproto_minor_version int32
  10213. Fvendor uintptr
  10214. Fprivate3 TXID
  10215. Fprivate4 TXID
  10216. Fprivate5 TXID
  10217. Fprivate6 int32
  10218. Fresource_alloc uintptr
  10219. Fbyte_order int32
  10220. Fbitmap_unit int32
  10221. Fbitmap_pad int32
  10222. Fbitmap_bit_order int32
  10223. Fnformats int32
  10224. Fpixmap_format uintptr
  10225. Fprivate8 int32
  10226. Frelease int32
  10227. Fprivate9 uintptr
  10228. Fprivate10 uintptr
  10229. Fqlen int32
  10230. Flast_request_read uint64
  10231. Frequest uint64
  10232. Fprivate11 TXPointer
  10233. Fprivate12 TXPointer
  10234. Fprivate13 TXPointer
  10235. Fprivate14 TXPointer
  10236. Fmax_request_size uint32
  10237. Fdb uintptr
  10238. Fprivate15 uintptr
  10239. Fdisplay_name uintptr
  10240. Fdefault_screen int32
  10241. Fnscreens int32
  10242. Fscreens uintptr
  10243. Fmotion_buffer uint64
  10244. Fprivate16 uint64
  10245. Fmin_keycode int32
  10246. Fmax_keycode int32
  10247. Fprivate17 TXPointer
  10248. Fprivate18 TXPointer
  10249. Fprivate19 int32
  10250. Fxdefaults uintptr
  10251. })(unsafe.Pointer(dpy)).Fscreens+uintptr(screen)*128)).Fheight)*float64(25.4)) / float64((*TScreen)(unsafe.Pointer((*struct {
  10252. Fext_data uintptr
  10253. Fprivate1 uintptr
  10254. Ffd int32
  10255. Fprivate2 int32
  10256. Fproto_major_version int32
  10257. Fproto_minor_version int32
  10258. Fvendor uintptr
  10259. Fprivate3 TXID
  10260. Fprivate4 TXID
  10261. Fprivate5 TXID
  10262. Fprivate6 int32
  10263. Fresource_alloc uintptr
  10264. Fbyte_order int32
  10265. Fbitmap_unit int32
  10266. Fbitmap_pad int32
  10267. Fbitmap_bit_order int32
  10268. Fnformats int32
  10269. Fpixmap_format uintptr
  10270. Fprivate8 int32
  10271. Frelease int32
  10272. Fprivate9 uintptr
  10273. Fprivate10 uintptr
  10274. Fqlen int32
  10275. Flast_request_read uint64
  10276. Frequest uint64
  10277. Fprivate11 TXPointer
  10278. Fprivate12 TXPointer
  10279. Fprivate13 TXPointer
  10280. Fprivate14 TXPointer
  10281. Fmax_request_size uint32
  10282. Fdb uintptr
  10283. Fprivate15 uintptr
  10284. Fdisplay_name uintptr
  10285. Fdefault_screen int32
  10286. Fnscreens int32
  10287. Fscreens uintptr
  10288. Fmotion_buffer uint64
  10289. Fprivate16 uint64
  10290. Fmin_keycode int32
  10291. Fmax_keycode int32
  10292. Fprivate17 TXPointer
  10293. Fprivate18 TXPointer
  10294. Fprivate19 int32
  10295. Fxdefaults uintptr
  10296. })(unsafe.Pointer(dpy)).Fscreens+uintptr(screen)*128)).Fmheight)
  10297. libfontconfig.XFcPatternAddDouble(tls, pattern, __ccgo_ts+449, XXftDefaultGetDouble(tls, dpy, __ccgo_ts+449, screen, dpi))
  10298. }
  10299. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+443, 0, bp) == int32(_FcResultNoMatch) {
  10300. libfontconfig.XFcPatternAddDouble(tls, pattern, __ccgo_ts+443, XXftDefaultGetDouble(tls, dpy, __ccgo_ts+443, screen, float64(1)))
  10301. }
  10302. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+201, 0, bp) == int32(_FcResultNoMatch) {
  10303. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+201, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+201, screen, libc.Int32FromInt32(1024)*libc.Int32FromInt32(1024)))
  10304. }
  10305. libfontconfig.XFcDefaultSubstitute(tls, pattern)
  10306. }
  10307. const m_VisualIDMask1 = 1
  10308. const m_VisualScreenMask1 = 2
  10309. /* xftxlfd.c */
  10310. /*
  10311. * Ok, this is a pain. To share source pictures across multiple destinations,
  10312. * the screen for each drawable must be discovered.
  10313. */
  10314. func __XftDrawScreen(tls *libc.TLS, dpy uintptr, drawable TDrawable, visual uintptr) (r int32) {
  10315. bp := tls.Alloc(112)
  10316. defer tls.Free(112)
  10317. var ret uintptr
  10318. var s int32
  10319. var _ /* borderWidth at bp+24 */ uint32
  10320. var _ /* depth at bp+28 */ uint32
  10321. var _ /* height at bp+20 */ uint32
  10322. var _ /* nret at bp+96 */ int32
  10323. var _ /* root at bp+0 */ TWindow
  10324. var _ /* template at bp+32 */ TXVisualInfo
  10325. var _ /* width at bp+16 */ uint32
  10326. var _ /* x at bp+8 */ int32
  10327. var _ /* y at bp+12 */ int32
  10328. _, _ = ret, s
  10329. /* Special case the most common environment */
  10330. if (*struct {
  10331. Fext_data uintptr
  10332. Fprivate1 uintptr
  10333. Ffd int32
  10334. Fprivate2 int32
  10335. Fproto_major_version int32
  10336. Fproto_minor_version int32
  10337. Fvendor uintptr
  10338. Fprivate3 TXID
  10339. Fprivate4 TXID
  10340. Fprivate5 TXID
  10341. Fprivate6 int32
  10342. Fresource_alloc uintptr
  10343. Fbyte_order int32
  10344. Fbitmap_unit int32
  10345. Fbitmap_pad int32
  10346. Fbitmap_bit_order int32
  10347. Fnformats int32
  10348. Fpixmap_format uintptr
  10349. Fprivate8 int32
  10350. Frelease int32
  10351. Fprivate9 uintptr
  10352. Fprivate10 uintptr
  10353. Fqlen int32
  10354. Flast_request_read uint64
  10355. Frequest uint64
  10356. Fprivate11 TXPointer
  10357. Fprivate12 TXPointer
  10358. Fprivate13 TXPointer
  10359. Fprivate14 TXPointer
  10360. Fmax_request_size uint32
  10361. Fdb uintptr
  10362. Fprivate15 uintptr
  10363. Fdisplay_name uintptr
  10364. Fdefault_screen int32
  10365. Fnscreens int32
  10366. Fscreens uintptr
  10367. Fmotion_buffer uint64
  10368. Fprivate16 uint64
  10369. Fmin_keycode int32
  10370. Fmax_keycode int32
  10371. Fprivate17 TXPointer
  10372. Fprivate18 TXPointer
  10373. Fprivate19 int32
  10374. Fxdefaults uintptr
  10375. })(unsafe.Pointer(dpy)).Fnscreens == int32(1) {
  10376. return 0
  10377. }
  10378. /*
  10379. * If we've got a visual, look for the screen that points at it.
  10380. * This requires no round trip.
  10381. */
  10382. if visual != 0 {
  10383. s = 0
  10384. for {
  10385. if !(s < (*struct {
  10386. Fext_data uintptr
  10387. Fprivate1 uintptr
  10388. Ffd int32
  10389. Fprivate2 int32
  10390. Fproto_major_version int32
  10391. Fproto_minor_version int32
  10392. Fvendor uintptr
  10393. Fprivate3 TXID
  10394. Fprivate4 TXID
  10395. Fprivate5 TXID
  10396. Fprivate6 int32
  10397. Fresource_alloc uintptr
  10398. Fbyte_order int32
  10399. Fbitmap_unit int32
  10400. Fbitmap_pad int32
  10401. Fbitmap_bit_order int32
  10402. Fnformats int32
  10403. Fpixmap_format uintptr
  10404. Fprivate8 int32
  10405. Frelease int32
  10406. Fprivate9 uintptr
  10407. Fprivate10 uintptr
  10408. Fqlen int32
  10409. Flast_request_read uint64
  10410. Frequest uint64
  10411. Fprivate11 TXPointer
  10412. Fprivate12 TXPointer
  10413. Fprivate13 TXPointer
  10414. Fprivate14 TXPointer
  10415. Fmax_request_size uint32
  10416. Fdb uintptr
  10417. Fprivate15 uintptr
  10418. Fdisplay_name uintptr
  10419. Fdefault_screen int32
  10420. Fnscreens int32
  10421. Fscreens uintptr
  10422. Fmotion_buffer uint64
  10423. Fprivate16 uint64
  10424. Fmin_keycode int32
  10425. Fmax_keycode int32
  10426. Fprivate17 TXPointer
  10427. Fprivate18 TXPointer
  10428. Fprivate19 int32
  10429. Fxdefaults uintptr
  10430. })(unsafe.Pointer(dpy)).Fnscreens) {
  10431. break
  10432. }
  10433. (*(*TXVisualInfo)(unsafe.Pointer(bp + 32))).Fvisualid = (*TVisual)(unsafe.Pointer(visual)).Fvisualid
  10434. (*(*TXVisualInfo)(unsafe.Pointer(bp + 32))).Fscreen = s
  10435. ret = libx11.XXGetVisualInfo(tls, dpy, int64(libc.Int32FromInt32(m_VisualIDMask1)|libc.Int32FromInt32(m_VisualScreenMask1)), bp+32, bp+96)
  10436. if ret != 0 {
  10437. libx11.XXFree(tls, ret)
  10438. return s
  10439. }
  10440. goto _1
  10441. _1:
  10442. ;
  10443. s++
  10444. }
  10445. }
  10446. /*
  10447. * Otherwise, as the server for the drawable geometry and find
  10448. * the screen from the root window.
  10449. * This takes a round trip.
  10450. */
  10451. if libx11.XXGetGeometry(tls, dpy, drawable, bp, bp+8, bp+12, bp+16, bp+20, bp+24, bp+28) != 0 {
  10452. s = 0
  10453. for {
  10454. if !(s < (*struct {
  10455. Fext_data uintptr
  10456. Fprivate1 uintptr
  10457. Ffd int32
  10458. Fprivate2 int32
  10459. Fproto_major_version int32
  10460. Fproto_minor_version int32
  10461. Fvendor uintptr
  10462. Fprivate3 TXID
  10463. Fprivate4 TXID
  10464. Fprivate5 TXID
  10465. Fprivate6 int32
  10466. Fresource_alloc uintptr
  10467. Fbyte_order int32
  10468. Fbitmap_unit int32
  10469. Fbitmap_pad int32
  10470. Fbitmap_bit_order int32
  10471. Fnformats int32
  10472. Fpixmap_format uintptr
  10473. Fprivate8 int32
  10474. Frelease int32
  10475. Fprivate9 uintptr
  10476. Fprivate10 uintptr
  10477. Fqlen int32
  10478. Flast_request_read uint64
  10479. Frequest uint64
  10480. Fprivate11 TXPointer
  10481. Fprivate12 TXPointer
  10482. Fprivate13 TXPointer
  10483. Fprivate14 TXPointer
  10484. Fmax_request_size uint32
  10485. Fdb uintptr
  10486. Fprivate15 uintptr
  10487. Fdisplay_name uintptr
  10488. Fdefault_screen int32
  10489. Fnscreens int32
  10490. Fscreens uintptr
  10491. Fmotion_buffer uint64
  10492. Fprivate16 uint64
  10493. Fmin_keycode int32
  10494. Fmax_keycode int32
  10495. Fprivate17 TXPointer
  10496. Fprivate18 TXPointer
  10497. Fprivate19 int32
  10498. Fxdefaults uintptr
  10499. })(unsafe.Pointer(dpy)).Fnscreens) {
  10500. break
  10501. }
  10502. if (*TScreen)(unsafe.Pointer((*struct {
  10503. Fext_data uintptr
  10504. Fprivate1 uintptr
  10505. Ffd int32
  10506. Fprivate2 int32
  10507. Fproto_major_version int32
  10508. Fproto_minor_version int32
  10509. Fvendor uintptr
  10510. Fprivate3 TXID
  10511. Fprivate4 TXID
  10512. Fprivate5 TXID
  10513. Fprivate6 int32
  10514. Fresource_alloc uintptr
  10515. Fbyte_order int32
  10516. Fbitmap_unit int32
  10517. Fbitmap_pad int32
  10518. Fbitmap_bit_order int32
  10519. Fnformats int32
  10520. Fpixmap_format uintptr
  10521. Fprivate8 int32
  10522. Frelease int32
  10523. Fprivate9 uintptr
  10524. Fprivate10 uintptr
  10525. Fqlen int32
  10526. Flast_request_read uint64
  10527. Frequest uint64
  10528. Fprivate11 TXPointer
  10529. Fprivate12 TXPointer
  10530. Fprivate13 TXPointer
  10531. Fprivate14 TXPointer
  10532. Fmax_request_size uint32
  10533. Fdb uintptr
  10534. Fprivate15 uintptr
  10535. Fdisplay_name uintptr
  10536. Fdefault_screen int32
  10537. Fnscreens int32
  10538. Fscreens uintptr
  10539. Fmotion_buffer uint64
  10540. Fprivate16 uint64
  10541. Fmin_keycode int32
  10542. Fmax_keycode int32
  10543. Fprivate17 TXPointer
  10544. Fprivate18 TXPointer
  10545. Fprivate19 int32
  10546. Fxdefaults uintptr
  10547. })(unsafe.Pointer(dpy)).Fscreens+uintptr(s)*128)).Froot == *(*TWindow)(unsafe.Pointer(bp)) {
  10548. return s
  10549. }
  10550. goto _2
  10551. _2:
  10552. ;
  10553. s++
  10554. }
  10555. }
  10556. /*
  10557. * Make a guess -- it's probably wrong, but then the app probably
  10558. * handed us a bogus drawable in this case
  10559. */
  10560. return 0
  10561. }
  10562. func XXftDrawDepth(tls *libc.TLS, draw uintptr) (r uint32) {
  10563. bp := tls.Alloc(32)
  10564. defer tls.Free(32)
  10565. var _ /* borderWidth at bp+24 */ uint32
  10566. var _ /* depth at bp+28 */ uint32
  10567. var _ /* height at bp+20 */ uint32
  10568. var _ /* root at bp+0 */ TWindow
  10569. var _ /* width at bp+16 */ uint32
  10570. var _ /* x at bp+8 */ int32
  10571. var _ /* y at bp+12 */ int32
  10572. if !((*TXftDraw)(unsafe.Pointer(draw)).Fdepth != 0) {
  10573. if libx11.XXGetGeometry(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, bp, bp+8, bp+12, bp+16, bp+20, bp+24, bp+28) != 0 {
  10574. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = *(*uint32)(unsafe.Pointer(bp + 28))
  10575. }
  10576. }
  10577. return (*TXftDraw)(unsafe.Pointer(draw)).Fdepth
  10578. }
  10579. func XXftDrawBitsPerPixel(tls *libc.TLS, draw uintptr) (r uint32) {
  10580. bp := tls.Alloc(16)
  10581. defer tls.Free(16)
  10582. var depth, v1 uint32
  10583. var formats, v2 uintptr
  10584. var i int32
  10585. var v3 bool
  10586. var _ /* nformats at bp+0 */ int32
  10587. _, _, _, _, _, _ = depth, formats, i, v1, v2, v3
  10588. if !((*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel != 0) {
  10589. v1 = XXftDrawDepth(tls, draw)
  10590. depth = v1
  10591. if v3 = v1 != 0; v3 {
  10592. v2 = libx11.XXListPixmapFormats(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, bp)
  10593. formats = v2
  10594. }
  10595. if v3 && v2 != 0 {
  10596. i = 0
  10597. for {
  10598. if !(i < *(*int32)(unsafe.Pointer(bp))) {
  10599. break
  10600. }
  10601. if libc.Uint32FromInt32((*(*TXPixmapFormatValues)(unsafe.Pointer(formats + uintptr(i)*12))).Fdepth) == depth {
  10602. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = libc.Uint32FromInt32((*(*TXPixmapFormatValues)(unsafe.Pointer(formats + uintptr(i)*12))).Fbits_per_pixel)
  10603. break
  10604. }
  10605. goto _4
  10606. _4:
  10607. ;
  10608. i++
  10609. }
  10610. libx11.XXFree(tls, formats)
  10611. }
  10612. }
  10613. return (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel
  10614. }
  10615. func XXftDrawCreate(tls *libc.TLS, dpy uintptr, drawable TDrawable, visual uintptr, colormap TColormap) (r uintptr) {
  10616. var draw uintptr
  10617. _ = draw
  10618. draw = libc.Xmalloc(tls, uint64(96))
  10619. if !(draw != 0) {
  10620. return libc.UintptrFromInt32(0)
  10621. }
  10622. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  10623. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = drawable
  10624. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, drawable, visual)
  10625. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = uint32(0) /* don't find out unless we need to know */
  10626. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(0) /* don't find out unless we need to know */
  10627. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = visual
  10628. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = colormap
  10629. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10630. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10631. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  10632. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  10633. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  10634. XXftMemAlloc(tls, m_XFT_MEM_DRAW, int32(96))
  10635. return draw
  10636. }
  10637. func XXftDrawCreateBitmap(tls *libc.TLS, dpy uintptr, bitmap TPixmap) (r uintptr) {
  10638. var draw uintptr
  10639. _ = draw
  10640. draw = libc.Xmalloc(tls, uint64(96))
  10641. if !(draw != 0) {
  10642. return libc.UintptrFromInt32(0)
  10643. }
  10644. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  10645. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = bitmap
  10646. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, bitmap, libc.UintptrFromInt32(0))
  10647. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = uint32(1)
  10648. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(1)
  10649. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = libc.UintptrFromInt32(0)
  10650. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = uint64(0)
  10651. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10652. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10653. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  10654. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  10655. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  10656. XXftMemAlloc(tls, m_XFT_MEM_DRAW, int32(96))
  10657. return draw
  10658. }
  10659. func XXftDrawCreateAlpha(tls *libc.TLS, dpy uintptr, pixmap TPixmap, depth int32) (r uintptr) {
  10660. var draw uintptr
  10661. _ = draw
  10662. draw = libc.Xmalloc(tls, uint64(96))
  10663. if !(draw != 0) {
  10664. return libc.UintptrFromInt32(0)
  10665. }
  10666. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  10667. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = pixmap
  10668. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, pixmap, libc.UintptrFromInt32(0))
  10669. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = libc.Uint32FromInt32(depth)
  10670. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(0) /* don't find out until we need it */
  10671. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = libc.UintptrFromInt32(0)
  10672. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = uint64(0)
  10673. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10674. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10675. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  10676. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  10677. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  10678. XXftMemAlloc(tls, m_XFT_MEM_DRAW, int32(96))
  10679. return draw
  10680. }
  10681. func __XftDrawFormat(tls *libc.TLS, draw uintptr) (r uintptr) {
  10682. bp := tls.Alloc(48)
  10683. defer tls.Free(48)
  10684. var info uintptr
  10685. var _ /* pf at bp+0 */ TXRenderPictFormat
  10686. _ = info
  10687. info = X_XftDisplayInfoGet(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, int32(m_True))
  10688. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0) {
  10689. return libc.UintptrFromInt32(0)
  10690. }
  10691. if (*TXftDraw)(unsafe.Pointer(draw)).Fvisual == libc.UintptrFromInt32(0) {
  10692. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Ftype1 = int32(m_PictTypeDirect)
  10693. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth = libc.Int32FromUint32(XXftDrawDepth(tls, draw))
  10694. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.Falpha = 0
  10695. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FalphaMask = int16(int32(1)<<(*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth - int32(1))
  10696. return libxrender.XXRenderFindFormat(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, libc.Uint64FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(1)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(2)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(9)|libc.Int32FromInt32(1)<<libc.Int32FromInt32(10)), bp, 0)
  10697. } else {
  10698. return libxrender.XXRenderFindVisualFormat(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fvisual)
  10699. }
  10700. return r
  10701. }
  10702. func XXftDrawChange(tls *libc.TLS, draw uintptr, drawable TDrawable) {
  10703. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = drawable
  10704. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  10705. libxrender.XXRenderFreePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict)
  10706. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10707. }
  10708. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  10709. libx11.XXFreeGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc)
  10710. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10711. }
  10712. }
  10713. func XXftDrawDisplay(tls *libc.TLS, draw uintptr) (r uintptr) {
  10714. return (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  10715. }
  10716. func XXftDrawDrawable(tls *libc.TLS, draw uintptr) (r TDrawable) {
  10717. return (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable
  10718. }
  10719. func XXftDrawColormap(tls *libc.TLS, draw uintptr) (r TColormap) {
  10720. return (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap
  10721. }
  10722. func XXftDrawVisual(tls *libc.TLS, draw uintptr) (r uintptr) {
  10723. return (*TXftDraw)(unsafe.Pointer(draw)).Fvisual
  10724. }
  10725. func XXftDrawDestroy(tls *libc.TLS, draw uintptr) {
  10726. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  10727. libxrender.XXRenderFreePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict)
  10728. }
  10729. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  10730. libx11.XXFreeGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc)
  10731. }
  10732. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  10733. case int32(_XftClipTypeRegion):
  10734. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 56)))
  10735. case int32(_XftClipTypeRectangles):
  10736. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 56)))
  10737. case int32(_XftClipTypeNone):
  10738. break
  10739. }
  10740. XXftMemFree(tls, m_XFT_MEM_DRAW, int32(96))
  10741. libc.Xfree(tls, draw)
  10742. }
  10743. func XXftDrawSrcPicture(tls *libc.TLS, draw uintptr, color uintptr) (r TPicture) {
  10744. bp := tls.Alloc(96)
  10745. defer tls.Free(96)
  10746. var dpy, info uintptr
  10747. var i int32
  10748. var pix TPixmap
  10749. var _ /* bitmapColor at bp+0 */ TXftColor
  10750. var _ /* pa at bp+16 */ TXRenderPictureAttributes
  10751. _, _, _, _ = dpy, i, info, pix
  10752. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  10753. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10754. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat != 0) {
  10755. return uint64(0)
  10756. }
  10757. /*
  10758. * Monochrome targets require special handling; the PictOp controls
  10759. * the color, and the color must be opaque
  10760. */
  10761. if !((*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0) && (*TXftDraw)(unsafe.Pointer(draw)).Fdepth == uint32(1) {
  10762. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Falpha = uint16(0xffff)
  10763. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fred = uint16(0xffff)
  10764. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fgreen = uint16(0xffff)
  10765. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fblue = uint16(0xffff)
  10766. color = bp
  10767. }
  10768. /*
  10769. * See if there's one already available
  10770. */
  10771. i = 0
  10772. for {
  10773. if !(i < int32(m_XFT_NUM_SOLID_COLOR)) {
  10774. break
  10775. }
  10776. if (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict != 0 && (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fscreen == (*TXftDraw)(unsafe.Pointer(draw)).Fscreen && !(libc.Xmemcmp(tls, color+8, info+88+uintptr(i)*24, uint64(8)) != 0) {
  10777. return (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict
  10778. }
  10779. goto _1
  10780. _1:
  10781. ;
  10782. i++
  10783. }
  10784. /*
  10785. * Pick one to replace at random
  10786. */
  10787. i = libc.Int32FromUint32(libc.Uint32FromInt32(libc.Xrand(tls)) % uint32(m_XFT_NUM_SOLID_COLOR))
  10788. /*
  10789. * Recreate if it was for the wrong screen
  10790. */
  10791. if (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fscreen != (*TXftDraw)(unsafe.Pointer(draw)).Fscreen && (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict != 0 {
  10792. libxrender.XXRenderFreePicture(tls, dpy, (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict)
  10793. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict = uint64(0)
  10794. }
  10795. /*
  10796. * Create picture if necessary
  10797. */
  10798. if !((*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict != 0) {
  10799. pix = libx11.XXCreatePixmap(tls, dpy, (*TScreen)(unsafe.Pointer((*struct {
  10800. Fext_data uintptr
  10801. Fprivate1 uintptr
  10802. Ffd int32
  10803. Fprivate2 int32
  10804. Fproto_major_version int32
  10805. Fproto_minor_version int32
  10806. Fvendor uintptr
  10807. Fprivate3 TXID
  10808. Fprivate4 TXID
  10809. Fprivate5 TXID
  10810. Fprivate6 int32
  10811. Fresource_alloc uintptr
  10812. Fbyte_order int32
  10813. Fbitmap_unit int32
  10814. Fbitmap_pad int32
  10815. Fbitmap_bit_order int32
  10816. Fnformats int32
  10817. Fpixmap_format uintptr
  10818. Fprivate8 int32
  10819. Frelease int32
  10820. Fprivate9 uintptr
  10821. Fprivate10 uintptr
  10822. Fqlen int32
  10823. Flast_request_read uint64
  10824. Frequest uint64
  10825. Fprivate11 TXPointer
  10826. Fprivate12 TXPointer
  10827. Fprivate13 TXPointer
  10828. Fprivate14 TXPointer
  10829. Fmax_request_size uint32
  10830. Fdb uintptr
  10831. Fprivate15 uintptr
  10832. Fdisplay_name uintptr
  10833. Fdefault_screen int32
  10834. Fnscreens int32
  10835. Fscreens uintptr
  10836. Fmotion_buffer uint64
  10837. Fprivate16 uint64
  10838. Fmin_keycode int32
  10839. Fmax_keycode int32
  10840. Fprivate17 TXPointer
  10841. Fprivate18 TXPointer
  10842. Fprivate19 int32
  10843. Fxdefaults uintptr
  10844. })(unsafe.Pointer(dpy)).Fscreens+uintptr((*TXftDraw)(unsafe.Pointer(draw)).Fscreen)*128)).Froot, uint32(1), uint32(1), libc.Uint32FromInt32((*TXRenderPictFormat)(unsafe.Pointer((*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat)).Fdepth))
  10845. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp + 16))).Frepeat = int32(m_True)
  10846. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict = libxrender.XXRenderCreatePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pix, (*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat, libc.Uint64FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(0)), bp+16)
  10847. libx11.XXFreePixmap(tls, dpy, pix)
  10848. }
  10849. /*
  10850. * Set to the new color
  10851. */
  10852. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fcolor = (*TXftColor)(unsafe.Pointer(color)).Fcolor
  10853. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fscreen = (*TXftDraw)(unsafe.Pointer(draw)).Fscreen
  10854. libxrender.XXRenderFillRectangle(tls, dpy, int32(m_PictOpSrc), (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict, color+8, 0, 0, uint32(1), uint32(1))
  10855. return (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict
  10856. }
  10857. func __XftDrawOp(tls *libc.TLS, draw uintptr, color uintptr) (r int32) {
  10858. if (*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0 || (*TXftDraw)(unsafe.Pointer(draw)).Fdepth != uint32(1) {
  10859. return int32(m_PictOpOver)
  10860. }
  10861. if libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >= int32(0x8000) {
  10862. return int32(m_PictOpOver)
  10863. }
  10864. return int32(m_PictOpOutReverse)
  10865. }
  10866. func __XftDrawRenderPrepare(tls *libc.TLS, draw uintptr) (r TFcBool) {
  10867. bp := tls.Alloc(80)
  10868. defer tls.Free(80)
  10869. var format uintptr
  10870. var mask uint64
  10871. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  10872. _, _ = format, mask
  10873. if !((*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0) {
  10874. mask = uint64(0)
  10875. format = __XftDrawFormat(tls, draw)
  10876. if !(format != 0) {
  10877. return m_FcFalse
  10878. }
  10879. if (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode == int32(m_IncludeInferiors) {
  10880. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fsubwindow_mode = int32(m_IncludeInferiors)
  10881. mask |= libc.Uint64FromInt32(libc.Int32FromInt32(1) << libc.Int32FromInt32(8))
  10882. }
  10883. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = libxrender.XXRenderCreatePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, format, mask, bp)
  10884. if !((*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0) {
  10885. return m_FcFalse
  10886. }
  10887. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  10888. case int32(_XftClipTypeRegion):
  10889. libxrender.XXRenderSetPictureClipRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, *(*TRegion)(unsafe.Pointer(draw + 56)))
  10890. case int32(_XftClipTypeRectangles):
  10891. libxrender.XXRenderSetPictureClipRectangles(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 56)))).FxOrigin, (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 56)))).FyOrigin, *(*uintptr)(unsafe.Pointer(draw + 56))+libc.UintptrFromInt32(1)*12, (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 56)))).Fn)
  10892. case int32(_XftClipTypeNone):
  10893. break
  10894. }
  10895. }
  10896. return int32(m_FcTrue)
  10897. }
  10898. func __XftDrawCorePrepare(tls *libc.TLS, draw uintptr, color uintptr) (r TFcBool) {
  10899. bp := tls.Alloc(128)
  10900. defer tls.Free(128)
  10901. var mask uint64
  10902. var _ /* gcv at bp+0 */ TXGCValues
  10903. _ = mask
  10904. if !((*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0) {
  10905. mask = uint64(0)
  10906. if (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode == int32(m_IncludeInferiors) {
  10907. (*(*TXGCValues)(unsafe.Pointer(bp))).Fsubwindow_mode = int32(m_IncludeInferiors)
  10908. mask |= libc.Uint64FromInt64(libc.Int64FromInt64(1) << libc.Int32FromInt32(15))
  10909. }
  10910. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libx11.XXCreateGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, mask, bp)
  10911. if !((*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0) {
  10912. return m_FcFalse
  10913. }
  10914. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  10915. case int32(_XftClipTypeRegion):
  10916. libx11.XXSetRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, *(*TRegion)(unsafe.Pointer(draw + 56)))
  10917. case int32(_XftClipTypeRectangles):
  10918. libx11.XXSetClipRectangles(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 56)))).FxOrigin, (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 56)))).FyOrigin, *(*uintptr)(unsafe.Pointer(draw + 56))+libc.UintptrFromInt32(1)*12, (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 56)))).Fn, m_Unsorted)
  10919. case int32(_XftClipTypeNone):
  10920. break
  10921. }
  10922. }
  10923. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  10924. return int32(m_FcTrue)
  10925. }
  10926. func XXftDrawPicture(tls *libc.TLS, draw uintptr) (r TPicture) {
  10927. if !(__XftDrawRenderPrepare(tls, draw) != 0) {
  10928. return uint64(0)
  10929. }
  10930. return (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict
  10931. }
  10932. func XXftDrawGlyphs(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, glyphs uintptr, nglyphs int32) {
  10933. var font uintptr
  10934. var src, v1 TPicture
  10935. var v2 bool
  10936. _, _, _, _ = font, src, v1, v2
  10937. font = pub
  10938. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  10939. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  10940. v1 = XXftDrawSrcPicture(tls, draw, color)
  10941. src = v1
  10942. }
  10943. if v2 && v1 != 0 {
  10944. XXftGlyphRender(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, __XftDrawOp(tls, draw, color), src, pub, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, 0, 0, x, y, glyphs, nglyphs)
  10945. }
  10946. } else {
  10947. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  10948. XXftGlyphCore(tls, draw, color, pub, x, y, glyphs, nglyphs)
  10949. }
  10950. }
  10951. }
  10952. func XXftDrawString8(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  10953. bp := tls.Alloc(4128)
  10954. defer tls.Free(4128)
  10955. var glyphs uintptr
  10956. var i int32
  10957. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  10958. _, _ = glyphs, i
  10959. if XXftDebug(tls)&int32(m_XFT_DBG_DRAW) != 0 {
  10960. libc.Xprintf(tls, __ccgo_ts+530, libc.VaList(bp+4104, len1, len1, string1))
  10961. }
  10962. if len1 <= int32(m_NUM_LOCAL) {
  10963. glyphs = bp
  10964. } else {
  10965. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  10966. if !(glyphs != 0) {
  10967. return
  10968. }
  10969. }
  10970. i = 0
  10971. for {
  10972. if !(i < len1) {
  10973. break
  10974. }
  10975. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  10976. goto _1
  10977. _1:
  10978. ;
  10979. i++
  10980. }
  10981. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  10982. if glyphs != bp {
  10983. libc.Xfree(tls, glyphs)
  10984. }
  10985. }
  10986. func XXftDrawString16(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  10987. bp := tls.Alloc(4096)
  10988. defer tls.Free(4096)
  10989. var glyphs uintptr
  10990. var i int32
  10991. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  10992. _, _ = glyphs, i
  10993. if len1 <= int32(m_NUM_LOCAL) {
  10994. glyphs = bp
  10995. } else {
  10996. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  10997. if !(glyphs != 0) {
  10998. return
  10999. }
  11000. }
  11001. i = 0
  11002. for {
  11003. if !(i < len1) {
  11004. break
  11005. }
  11006. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  11007. goto _1
  11008. _1:
  11009. ;
  11010. i++
  11011. }
  11012. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  11013. if glyphs != bp {
  11014. libc.Xfree(tls, glyphs)
  11015. }
  11016. }
  11017. func XXftDrawString32(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11018. bp := tls.Alloc(4096)
  11019. defer tls.Free(4096)
  11020. var glyphs uintptr
  11021. var i int32
  11022. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11023. _, _ = glyphs, i
  11024. if len1 <= int32(m_NUM_LOCAL) {
  11025. glyphs = bp
  11026. } else {
  11027. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11028. if !(glyphs != 0) {
  11029. return
  11030. }
  11031. }
  11032. i = 0
  11033. for {
  11034. if !(i < len1) {
  11035. break
  11036. }
  11037. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  11038. goto _1
  11039. _1:
  11040. ;
  11041. i++
  11042. }
  11043. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  11044. if glyphs != bp {
  11045. libc.Xfree(tls, glyphs)
  11046. }
  11047. }
  11048. func XXftDrawStringUtf8(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11049. bp := tls.Alloc(4112)
  11050. defer tls.Free(4112)
  11051. var glyphs, glyphs_new uintptr
  11052. var i, l, size, v1, v3 int32
  11053. var v2 bool
  11054. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11055. var _ /* ucs4 at bp+4096 */ TFcChar32
  11056. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  11057. i = 0
  11058. glyphs = bp
  11059. size = int32(m_NUM_LOCAL)
  11060. for {
  11061. if v2 = len1 != 0; v2 {
  11062. v1 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  11063. l = v1
  11064. }
  11065. if !(v2 && v1 > 0) {
  11066. break
  11067. }
  11068. if i == size {
  11069. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*int32(2))*uint64(4))
  11070. if !(glyphs_new != 0) {
  11071. if glyphs != bp {
  11072. libc.Xfree(tls, glyphs)
  11073. }
  11074. return
  11075. }
  11076. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  11077. size *= int32(2)
  11078. if glyphs != bp {
  11079. libc.Xfree(tls, glyphs)
  11080. }
  11081. glyphs = glyphs_new
  11082. }
  11083. v3 = i
  11084. i++
  11085. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11086. string1 += uintptr(l)
  11087. len1 -= l
  11088. }
  11089. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, i)
  11090. if glyphs != bp {
  11091. libc.Xfree(tls, glyphs)
  11092. }
  11093. }
  11094. func XXftDrawStringUtf16(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, endian TFcEndian, len1 int32) {
  11095. bp := tls.Alloc(4112)
  11096. defer tls.Free(4112)
  11097. var glyphs, glyphs_new uintptr
  11098. var i, l, size, v1, v3 int32
  11099. var v2 bool
  11100. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11101. var _ /* ucs4 at bp+4096 */ TFcChar32
  11102. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  11103. i = 0
  11104. glyphs = bp
  11105. size = int32(m_NUM_LOCAL)
  11106. for {
  11107. if v2 = len1 != 0; v2 {
  11108. v1 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  11109. l = v1
  11110. }
  11111. if !(v2 && v1 > 0) {
  11112. break
  11113. }
  11114. if i == size {
  11115. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*int32(2))*uint64(4))
  11116. if !(glyphs_new != 0) {
  11117. if glyphs != bp {
  11118. libc.Xfree(tls, glyphs)
  11119. }
  11120. return
  11121. }
  11122. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  11123. size *= int32(2)
  11124. if glyphs != bp {
  11125. libc.Xfree(tls, glyphs)
  11126. }
  11127. glyphs = glyphs_new
  11128. }
  11129. v3 = i
  11130. i++
  11131. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11132. string1 += uintptr(l)
  11133. len1 -= l
  11134. }
  11135. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, i)
  11136. if glyphs != bp {
  11137. libc.Xfree(tls, glyphs)
  11138. }
  11139. }
  11140. func XXftDrawGlyphSpec(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, glyphs uintptr, len1 int32) {
  11141. var font uintptr
  11142. var src, v1 TPicture
  11143. var v2 bool
  11144. _, _, _, _ = font, src, v1, v2
  11145. font = pub
  11146. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  11147. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  11148. v1 = XXftDrawSrcPicture(tls, draw, color)
  11149. src = v1
  11150. }
  11151. if v2 && v1 != 0 {
  11152. XXftGlyphSpecRender(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, __XftDrawOp(tls, draw, color), src, pub, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, 0, 0, glyphs, len1)
  11153. }
  11154. } else {
  11155. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11156. XXftGlyphSpecCore(tls, draw, color, pub, glyphs, len1)
  11157. }
  11158. }
  11159. }
  11160. func XXftDrawGlyphFontSpec(tls *libc.TLS, draw uintptr, color uintptr, glyphs uintptr, len1 int32) {
  11161. var i, start int32
  11162. var src, v1 TPicture
  11163. var v2 bool
  11164. _, _, _, _, _ = i, src, start, v1, v2
  11165. i = 0
  11166. for i < len1 {
  11167. start = i
  11168. if (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Fformat != 0 {
  11169. for i < len1 && (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Fformat != 0 {
  11170. i++
  11171. }
  11172. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  11173. v1 = XXftDrawSrcPicture(tls, draw, color)
  11174. src = v1
  11175. }
  11176. if v2 && v1 != 0 {
  11177. XXftGlyphFontSpecRender(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, __XftDrawOp(tls, draw, color), src, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, 0, 0, glyphs+uintptr(start)*16, i-start)
  11178. }
  11179. } else {
  11180. for i < len1 && !((*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Fformat != 0) {
  11181. i++
  11182. }
  11183. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11184. XXftGlyphFontSpecCore(tls, draw, color, glyphs+uintptr(start)*16, i-start)
  11185. }
  11186. }
  11187. }
  11188. }
  11189. func XXftDrawCharSpec(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, chars uintptr, len1 int32) {
  11190. bp := tls.Alloc(8192)
  11191. defer tls.Free(8192)
  11192. var glyphs uintptr
  11193. var i int32
  11194. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphSpec
  11195. _, _ = glyphs, i
  11196. if len1 <= int32(m_NUM_LOCAL) {
  11197. glyphs = bp
  11198. } else {
  11199. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(8))
  11200. if !(glyphs != 0) {
  11201. return
  11202. }
  11203. }
  11204. i = 0
  11205. for {
  11206. if !(i < len1) {
  11207. break
  11208. }
  11209. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fucs4)
  11210. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fx
  11211. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fy
  11212. goto _1
  11213. _1:
  11214. ;
  11215. i++
  11216. }
  11217. XXftDrawGlyphSpec(tls, draw, color, pub, glyphs, len1)
  11218. if glyphs != bp {
  11219. libc.Xfree(tls, glyphs)
  11220. }
  11221. }
  11222. func XXftDrawCharFontSpec(tls *libc.TLS, draw uintptr, color uintptr, chars uintptr, len1 int32) {
  11223. bp := tls.Alloc(16384)
  11224. defer tls.Free(16384)
  11225. var glyphs uintptr
  11226. var i int32
  11227. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphFontSpec
  11228. _, _ = glyphs, i
  11229. if len1 <= int32(m_NUM_LOCAL) {
  11230. glyphs = bp
  11231. } else {
  11232. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(16))
  11233. if !(glyphs != 0) {
  11234. return
  11235. }
  11236. }
  11237. i = 0
  11238. for {
  11239. if !(i < len1) {
  11240. break
  11241. }
  11242. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Ffont
  11243. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont, (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fucs4)
  11244. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fx
  11245. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fy
  11246. goto _1
  11247. _1:
  11248. ;
  11249. i++
  11250. }
  11251. XXftDrawGlyphFontSpec(tls, draw, color, glyphs, len1)
  11252. if glyphs != bp {
  11253. libc.Xfree(tls, glyphs)
  11254. }
  11255. }
  11256. func XXftDrawRect(tls *libc.TLS, draw uintptr, color uintptr, x int32, y int32, width uint32, height uint32) {
  11257. if __XftDrawRenderPrepare(tls, draw) != 0 {
  11258. libxrender.XXRenderFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, int32(m_PictOpSrc), (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, color+8, x, y, width, height)
  11259. } else {
  11260. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11261. /* note: not XftRectCore() */
  11262. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  11263. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, x, y, width, height)
  11264. }
  11265. }
  11266. }
  11267. func XXftDrawSetClip(tls *libc.TLS, draw uintptr, r TRegion) (r1 int32) {
  11268. bp := tls.Alloc(80)
  11269. defer tls.Free(80)
  11270. var n TRegion
  11271. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  11272. _ = n
  11273. n = libc.UintptrFromInt32(0)
  11274. /*
  11275. * Check for quick exits
  11276. */
  11277. if !(r != 0) && (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type == int32(_XftClipTypeNone) {
  11278. return int32(m_True)
  11279. }
  11280. if r != 0 && (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type == int32(_XftClipTypeRegion) && libx11.XXEqualRegion(tls, r, *(*TRegion)(unsafe.Pointer(draw + 56))) != 0 {
  11281. return int32(m_True)
  11282. }
  11283. /*
  11284. * Duplicate the region so future changes can be short circuited
  11285. */
  11286. if r != 0 {
  11287. n = libx11.XXCreateRegion(tls)
  11288. if n != 0 {
  11289. if !(libx11.XXUnionRegion(tls, n, r, n) != 0) {
  11290. libx11.XXDestroyRegion(tls, n)
  11291. return m_False
  11292. }
  11293. }
  11294. }
  11295. /*
  11296. * Destroy existing clip
  11297. */
  11298. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11299. case int32(_XftClipTypeRegion):
  11300. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11301. case int32(_XftClipTypeRectangles):
  11302. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 56)))
  11303. case int32(_XftClipTypeNone):
  11304. break
  11305. }
  11306. /*
  11307. * Set the clip
  11308. */
  11309. if n != 0 {
  11310. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeRegion)
  11311. *(*TRegion)(unsafe.Pointer(draw + 56)) = n
  11312. } else {
  11313. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  11314. }
  11315. /*
  11316. * Apply new clip to existing objects
  11317. */
  11318. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11319. if n != 0 {
  11320. libxrender.XXRenderSetPictureClipRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, n)
  11321. } else {
  11322. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fclip_mask = uint64(0)
  11323. libxrender.XXRenderChangePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, libc.Uint64FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(6)), bp)
  11324. }
  11325. }
  11326. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11327. if n != 0 {
  11328. libx11.XXSetRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11329. } else {
  11330. libx11.XXSetClipMask(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, uint64(0))
  11331. }
  11332. }
  11333. return int32(m_True)
  11334. }
  11335. func XXftDrawSetClipRectangles(tls *libc.TLS, draw uintptr, xOrigin int32, yOrigin int32, rects uintptr, n int32) (r int32) {
  11336. var new1 uintptr
  11337. _ = new1
  11338. new1 = libc.UintptrFromInt32(0)
  11339. /*
  11340. * Check for quick exit
  11341. */
  11342. if (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type == int32(_XftClipTypeRectangles) && (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 56)))).Fn == n && (n == 0 || (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 56)))).FxOrigin == xOrigin && (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 56)))).FyOrigin == yOrigin) && !(libc.Xmemcmp(tls, *(*uintptr)(unsafe.Pointer(draw + 56))+libc.UintptrFromInt32(1)*12, rects, libc.Uint64FromInt32(n)*uint64(8)) != 0) {
  11343. return int32(m_True)
  11344. }
  11345. /*
  11346. * Duplicate the region so future changes can be short circuited
  11347. */
  11348. new1 = libc.Xmalloc(tls, uint64(12)+libc.Uint64FromInt32(n)*uint64(8))
  11349. if !(new1 != 0) {
  11350. return m_False
  11351. }
  11352. (*TXftClipRect)(unsafe.Pointer(new1)).Fn = n
  11353. (*TXftClipRect)(unsafe.Pointer(new1)).FxOrigin = xOrigin
  11354. (*TXftClipRect)(unsafe.Pointer(new1)).FyOrigin = yOrigin
  11355. libc.Xmemcpy(tls, new1+libc.UintptrFromInt32(1)*12, rects, libc.Uint64FromInt32(n)*uint64(8))
  11356. /*
  11357. * Destroy existing clip
  11358. */
  11359. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11360. case int32(_XftClipTypeRegion):
  11361. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11362. case int32(_XftClipTypeRectangles):
  11363. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 56)))
  11364. case int32(_XftClipTypeNone):
  11365. break
  11366. }
  11367. /*
  11368. * Set the clip
  11369. */
  11370. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeRectangles)
  11371. *(*uintptr)(unsafe.Pointer(draw + 56)) = new1
  11372. /*
  11373. * Apply new clip to existing objects
  11374. */
  11375. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11376. libxrender.XXRenderSetPictureClipRectangles(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, (*TXftClipRect)(unsafe.Pointer(new1)).FxOrigin, (*TXftClipRect)(unsafe.Pointer(new1)).FyOrigin, new1+libc.UintptrFromInt32(1)*12, (*TXftClipRect)(unsafe.Pointer(new1)).Fn)
  11377. }
  11378. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11379. libx11.XXSetClipRectangles(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftClipRect)(unsafe.Pointer(new1)).FxOrigin, (*TXftClipRect)(unsafe.Pointer(new1)).FyOrigin, new1+libc.UintptrFromInt32(1)*12, (*TXftClipRect)(unsafe.Pointer(new1)).Fn, m_Unsorted)
  11380. }
  11381. return int32(m_True)
  11382. }
  11383. func XXftDrawSetSubwindowMode(tls *libc.TLS, draw uintptr, mode int32) {
  11384. bp := tls.Alloc(80)
  11385. defer tls.Free(80)
  11386. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  11387. if mode == (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode {
  11388. return
  11389. }
  11390. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = mode
  11391. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11392. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fsubwindow_mode = mode
  11393. libxrender.XXRenderChangePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, libc.Uint64FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(8)), bp)
  11394. }
  11395. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11396. libx11.XXSetSubwindowMode(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, mode)
  11397. }
  11398. }
  11399. const m_VisualIDMask2 = 0x1
  11400. const m_VisualScreenMask2 = 0x2
  11401. /* xftxlfd.c */
  11402. func XXftGlyphExtents(tls *libc.TLS, dpy uintptr, pub uintptr, glyphs uintptr, nglyphs int32, extents uintptr) {
  11403. bp := tls.Alloc(1040)
  11404. defer tls.Free(1040)
  11405. var bottom, left, n, overall_bottom, overall_left, overall_right, overall_top, right, top, x, y, v1, v6 int32
  11406. var font, g, xftg, v2, v3, v4, v7, v8 uintptr
  11407. var glyph TFT_UInt
  11408. var glyphs_loaded TFcBool
  11409. var v5, v9 bool
  11410. var _ /* missing at bp+0 */ [256]TFT_UInt
  11411. var _ /* nmissing at bp+1024 */ int32
  11412. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bottom, font, g, glyph, glyphs_loaded, left, n, overall_bottom, overall_left, overall_right, overall_top, right, top, x, xftg, y, v1, v2, v3, v4, v5, v6, v7, v8, v9
  11413. font = pub
  11414. g = glyphs
  11415. n = nglyphs
  11416. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  11417. glyphs_loaded = m_FcFalse
  11418. for {
  11419. v1 = n
  11420. n--
  11421. if !(v1 != 0) {
  11422. break
  11423. }
  11424. v2 = g
  11425. g += 4
  11426. if XXftFontCheckGlyph(tls, dpy, pub, m_FcFalse, *(*TFT_UInt)(unsafe.Pointer(v2)), bp, bp+1024) != 0 {
  11427. glyphs_loaded = int32(m_FcTrue)
  11428. }
  11429. }
  11430. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  11431. XXftFontLoadGlyphs(tls, dpy, pub, m_FcFalse, bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  11432. }
  11433. g = glyphs
  11434. n = nglyphs
  11435. xftg = libc.UintptrFromInt32(0)
  11436. for n != 0 {
  11437. v3 = g
  11438. g += 4
  11439. glyph = *(*TFT_UInt)(unsafe.Pointer(v3))
  11440. n--
  11441. if v5 = glyph < libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs); v5 {
  11442. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  11443. xftg = v4
  11444. }
  11445. if v5 && v4 != 0 {
  11446. break
  11447. }
  11448. }
  11449. if n == 0 {
  11450. if xftg != 0 {
  11451. *(*TXGlyphInfo)(unsafe.Pointer(extents)) = (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics
  11452. } else {
  11453. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11454. }
  11455. } else {
  11456. x = 0
  11457. y = 0
  11458. overall_left = x - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  11459. overall_top = y - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  11460. overall_right = overall_left + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  11461. overall_bottom = overall_top + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  11462. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  11463. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  11464. for {
  11465. v6 = n
  11466. n--
  11467. if !(v6 != 0) {
  11468. break
  11469. }
  11470. v7 = g
  11471. g += 4
  11472. glyph = *(*TFT_UInt)(unsafe.Pointer(v7))
  11473. if v9 = glyph < libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs); v9 {
  11474. v8 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  11475. xftg = v8
  11476. }
  11477. if v9 && v8 != 0 {
  11478. left = x - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  11479. top = y - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  11480. right = left + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  11481. bottom = top + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  11482. if left < overall_left {
  11483. overall_left = left
  11484. }
  11485. if top < overall_top {
  11486. overall_top = top
  11487. }
  11488. if right > overall_right {
  11489. overall_right = right
  11490. }
  11491. if bottom > overall_bottom {
  11492. overall_bottom = bottom
  11493. }
  11494. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  11495. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  11496. }
  11497. }
  11498. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fx = int16(-overall_left)
  11499. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fy = int16(-overall_top)
  11500. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fwidth = libc.Uint16FromInt32(overall_right - overall_left)
  11501. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fheight = libc.Uint16FromInt32(overall_bottom - overall_top)
  11502. (*TXGlyphInfo)(unsafe.Pointer(extents)).FxOff = int16(x)
  11503. (*TXGlyphInfo)(unsafe.Pointer(extents)).FyOff = int16(y)
  11504. }
  11505. if glyphs_loaded != 0 {
  11506. X_XftFontManageMemory(tls, dpy, pub)
  11507. }
  11508. }
  11509. func XXftTextExtents8(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11510. bp := tls.Alloc(4096)
  11511. defer tls.Free(4096)
  11512. var glyphs uintptr
  11513. var i int32
  11514. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11515. _, _ = glyphs, i
  11516. if len1 <= int32(m_NUM_LOCAL) {
  11517. glyphs = bp
  11518. } else {
  11519. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11520. if !(glyphs != 0) {
  11521. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11522. return
  11523. }
  11524. }
  11525. i = 0
  11526. for {
  11527. if !(i < len1) {
  11528. break
  11529. }
  11530. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  11531. goto _1
  11532. _1:
  11533. ;
  11534. i++
  11535. }
  11536. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11537. if glyphs != bp {
  11538. libc.Xfree(tls, glyphs)
  11539. }
  11540. }
  11541. func XXftTextExtents16(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11542. bp := tls.Alloc(4096)
  11543. defer tls.Free(4096)
  11544. var glyphs uintptr
  11545. var i int32
  11546. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11547. _, _ = glyphs, i
  11548. if len1 <= int32(m_NUM_LOCAL) {
  11549. glyphs = bp
  11550. } else {
  11551. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11552. if !(glyphs != 0) {
  11553. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11554. return
  11555. }
  11556. }
  11557. i = 0
  11558. for {
  11559. if !(i < len1) {
  11560. break
  11561. }
  11562. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  11563. goto _1
  11564. _1:
  11565. ;
  11566. i++
  11567. }
  11568. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11569. if glyphs != bp {
  11570. libc.Xfree(tls, glyphs)
  11571. }
  11572. }
  11573. func XXftTextExtents32(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11574. bp := tls.Alloc(4096)
  11575. defer tls.Free(4096)
  11576. var glyphs uintptr
  11577. var i int32
  11578. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11579. _, _ = glyphs, i
  11580. if len1 <= int32(m_NUM_LOCAL) {
  11581. glyphs = bp
  11582. } else {
  11583. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11584. if !(glyphs != 0) {
  11585. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11586. return
  11587. }
  11588. }
  11589. i = 0
  11590. for {
  11591. if !(i < len1) {
  11592. break
  11593. }
  11594. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  11595. goto _1
  11596. _1:
  11597. ;
  11598. i++
  11599. }
  11600. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11601. if glyphs != bp {
  11602. libc.Xfree(tls, glyphs)
  11603. }
  11604. }
  11605. func XXftTextExtentsUtf8(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11606. bp := tls.Alloc(4112)
  11607. defer tls.Free(4112)
  11608. var glyphs, glyphs_new uintptr
  11609. var i, l, size, v1, v3 int32
  11610. var v2 bool
  11611. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11612. var _ /* ucs4 at bp+4096 */ TFcChar32
  11613. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  11614. i = 0
  11615. glyphs = bp
  11616. size = int32(m_NUM_LOCAL)
  11617. for {
  11618. if v2 = len1 != 0; v2 {
  11619. v1 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  11620. l = v1
  11621. }
  11622. if !(v2 && v1 > 0) {
  11623. break
  11624. }
  11625. if i == size {
  11626. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*int32(2))*uint64(4))
  11627. if !(glyphs_new != 0) {
  11628. if glyphs != bp {
  11629. libc.Xfree(tls, glyphs)
  11630. }
  11631. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11632. return
  11633. }
  11634. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  11635. size *= int32(2)
  11636. if glyphs != bp {
  11637. libc.Xfree(tls, glyphs)
  11638. }
  11639. glyphs = glyphs_new
  11640. }
  11641. v3 = i
  11642. i++
  11643. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11644. string1 += uintptr(l)
  11645. len1 -= l
  11646. }
  11647. XXftGlyphExtents(tls, dpy, pub, glyphs, i, extents)
  11648. if glyphs != bp {
  11649. libc.Xfree(tls, glyphs)
  11650. }
  11651. }
  11652. func XXftTextExtentsUtf16(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, endian TFcEndian, len1 int32, extents uintptr) {
  11653. bp := tls.Alloc(4112)
  11654. defer tls.Free(4112)
  11655. var glyphs, glyphs_new uintptr
  11656. var i, l, size, v1, v3 int32
  11657. var v2 bool
  11658. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11659. var _ /* ucs4 at bp+4096 */ TFcChar32
  11660. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  11661. i = 0
  11662. glyphs = bp
  11663. size = int32(m_NUM_LOCAL)
  11664. for {
  11665. if v2 = len1 != 0; v2 {
  11666. v1 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  11667. l = v1
  11668. }
  11669. if !(v2 && v1 > 0) {
  11670. break
  11671. }
  11672. if i == size {
  11673. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*int32(2))*uint64(4))
  11674. if !(glyphs_new != 0) {
  11675. if glyphs != bp {
  11676. libc.Xfree(tls, glyphs)
  11677. }
  11678. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11679. return
  11680. }
  11681. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  11682. size *= int32(2)
  11683. if glyphs != bp {
  11684. libc.Xfree(tls, glyphs)
  11685. }
  11686. glyphs = glyphs_new
  11687. }
  11688. v3 = i
  11689. i++
  11690. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11691. string1 += uintptr(l)
  11692. len1 -= l
  11693. }
  11694. XXftGlyphExtents(tls, dpy, pub, glyphs, i, extents)
  11695. if glyphs != bp {
  11696. libc.Xfree(tls, glyphs)
  11697. }
  11698. }
  11699. /* xftxlfd.c */
  11700. func XXftFontMatch(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr, result uintptr) (r uintptr) {
  11701. var match, new1 uintptr
  11702. _, _ = match, new1
  11703. if !(XXftInit(tls, libc.UintptrFromInt32(0)) != 0) {
  11704. return libc.UintptrFromInt32(0)
  11705. }
  11706. new1 = libfontconfig.XFcPatternDuplicate(tls, pattern)
  11707. if !(new1 != 0) {
  11708. return libc.UintptrFromInt32(0)
  11709. }
  11710. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  11711. libc.Xprintf(tls, __ccgo_ts+550, 0)
  11712. libfontconfig.XFcPatternPrint(tls, new1)
  11713. }
  11714. libfontconfig.XFcConfigSubstitute(tls, libc.UintptrFromInt32(0), new1, int32(_FcMatchPattern))
  11715. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  11716. libc.Xprintf(tls, __ccgo_ts+572, 0)
  11717. libfontconfig.XFcPatternPrint(tls, new1)
  11718. }
  11719. XXftDefaultSubstitute(tls, dpy, screen, new1)
  11720. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  11721. libc.Xprintf(tls, __ccgo_ts+615, 0)
  11722. libfontconfig.XFcPatternPrint(tls, new1)
  11723. }
  11724. match = libfontconfig.XFcFontMatch(tls, libc.UintptrFromInt32(0), new1, result)
  11725. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  11726. libc.Xprintf(tls, __ccgo_ts+660, 0)
  11727. libfontconfig.XFcPatternPrint(tls, match)
  11728. }
  11729. libfontconfig.XFcPatternDestroy(tls, new1)
  11730. return match
  11731. }
  11732. func XXftFontOpen(tls *libc.TLS, dpy uintptr, screen int32, va1 uintptr) (r uintptr) {
  11733. bp := tls.Alloc(16)
  11734. defer tls.Free(16)
  11735. var font, match, pat uintptr
  11736. var va Tva_list
  11737. var _ /* result at bp+0 */ TFcResult
  11738. _, _, _, _ = font, match, pat, va
  11739. va = va1
  11740. pat = libfontconfig.XFcPatternVaBuild(tls, libc.UintptrFromInt32(0), va)
  11741. _ = va
  11742. if !(pat != 0) {
  11743. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11744. libc.Xprintf(tls, __ccgo_ts+681, 0)
  11745. }
  11746. return libc.UintptrFromInt32(0)
  11747. }
  11748. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  11749. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11750. libc.Xprintf(tls, __ccgo_ts+720, 0)
  11751. libfontconfig.XFcPatternPrint(tls, pat)
  11752. if match != 0 {
  11753. libc.Xprintf(tls, __ccgo_ts+729, 0)
  11754. libfontconfig.XFcPatternPrint(tls, match)
  11755. } else {
  11756. libc.Xprintf(tls, __ccgo_ts+736, 0)
  11757. }
  11758. }
  11759. libfontconfig.XFcPatternDestroy(tls, pat)
  11760. if !(match != 0) {
  11761. return libc.UintptrFromInt32(0)
  11762. }
  11763. font = XXftFontOpenPattern(tls, dpy, match)
  11764. if !(font != 0) {
  11765. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11766. libc.Xprintf(tls, __ccgo_ts+746, 0)
  11767. }
  11768. libfontconfig.XFcPatternDestroy(tls, match)
  11769. }
  11770. return font
  11771. }
  11772. func XXftFontOpenName(tls *libc.TLS, dpy uintptr, screen int32, name uintptr) (r uintptr) {
  11773. bp := tls.Alloc(32)
  11774. defer tls.Free(32)
  11775. var font, match, pat uintptr
  11776. var _ /* result at bp+0 */ TFcResult
  11777. _, _, _ = font, match, pat
  11778. pat = libfontconfig.XFcNameParse(tls, name)
  11779. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11780. libc.Xprintf(tls, __ccgo_ts+755, libc.VaList(bp+16, name))
  11781. if pat != 0 {
  11782. libfontconfig.XFcPatternPrint(tls, pat)
  11783. } else {
  11784. libc.Xprintf(tls, __ccgo_ts+778, 0)
  11785. }
  11786. }
  11787. if !(pat != 0) {
  11788. return libc.UintptrFromInt32(0)
  11789. }
  11790. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  11791. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11792. if match != 0 {
  11793. libc.Xprintf(tls, __ccgo_ts+729, 0)
  11794. libfontconfig.XFcPatternPrint(tls, match)
  11795. } else {
  11796. libc.Xprintf(tls, __ccgo_ts+736, 0)
  11797. }
  11798. }
  11799. libfontconfig.XFcPatternDestroy(tls, pat)
  11800. if !(match != 0) {
  11801. return libc.UintptrFromInt32(0)
  11802. }
  11803. font = XXftFontOpenPattern(tls, dpy, match)
  11804. if !(font != 0) {
  11805. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11806. libc.Xprintf(tls, __ccgo_ts+746, 0)
  11807. }
  11808. libfontconfig.XFcPatternDestroy(tls, match)
  11809. }
  11810. return font
  11811. }
  11812. func XXftFontOpenXlfd(tls *libc.TLS, dpy uintptr, screen int32, xlfd uintptr) (r uintptr) {
  11813. bp := tls.Alloc(32)
  11814. defer tls.Free(32)
  11815. var font, match, pat uintptr
  11816. var _ /* result at bp+0 */ TFcResult
  11817. _, _, _ = font, match, pat
  11818. pat = XXftXlfdParse(tls, xlfd, m_FcFalse, m_FcFalse)
  11819. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11820. libc.Xprintf(tls, __ccgo_ts+792, libc.VaList(bp+16, xlfd))
  11821. if pat != 0 {
  11822. libc.Xprintf(tls, __ccgo_ts+815, 0)
  11823. } else {
  11824. libfontconfig.XFcPatternPrint(tls, pat)
  11825. }
  11826. }
  11827. if !(pat != 0) {
  11828. return libc.UintptrFromInt32(0)
  11829. }
  11830. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  11831. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11832. if match != 0 {
  11833. libc.Xprintf(tls, __ccgo_ts+729, 0)
  11834. libfontconfig.XFcPatternPrint(tls, match)
  11835. } else {
  11836. libc.Xprintf(tls, __ccgo_ts+736, 0)
  11837. }
  11838. }
  11839. libfontconfig.XFcPatternDestroy(tls, pat)
  11840. if !(match != 0) {
  11841. return libc.UintptrFromInt32(0)
  11842. }
  11843. font = XXftFontOpenPattern(tls, dpy, match)
  11844. if !(font != 0) {
  11845. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  11846. libc.Xprintf(tls, __ccgo_ts+746, 0)
  11847. }
  11848. libfontconfig.XFcPatternDestroy(tls, match)
  11849. }
  11850. return font
  11851. }
  11852. const m_FT_LOAD_DEFAULT1 = 0
  11853. const m_XFT_EMBEDDED_BITMAP = "embeddedbitmap"
  11854. /*
  11855. * List of all open files (each face in a file is managed separately)
  11856. */
  11857. var __XftFtFiles uintptr
  11858. var _XftMaxFreeTypeFiles = int32(5)
  11859. func __XftGetFile(tls *libc.TLS, file uintptr, id int32) (r uintptr) {
  11860. bp := tls.Alloc(32)
  11861. defer tls.Free(32)
  11862. var f uintptr
  11863. var v2, v3, v4 TFT_Fixed
  11864. _, _, _, _ = f, v2, v3, v4
  11865. if !(XXftInitFtLibrary(tls) != 0) {
  11866. return libc.UintptrFromInt32(0)
  11867. }
  11868. f = __XftFtFiles
  11869. for {
  11870. if !(f != 0) {
  11871. break
  11872. }
  11873. if !(libc.Xstrcmp(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, file) != 0) && (*TXftFtFile)(unsafe.Pointer(f)).Fid == id {
  11874. (*TXftFtFile)(unsafe.Pointer(f)).Fref++
  11875. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  11876. libc.Xprintf(tls, __ccgo_ts+829, libc.VaList(bp+8, file, id, (*TXftFtFile)(unsafe.Pointer(f)).Fref))
  11877. }
  11878. return f
  11879. }
  11880. goto _1
  11881. _1:
  11882. ;
  11883. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  11884. }
  11885. f = libc.Xmalloc(tls, uint64(96)+libc.Xstrlen(tls, file)+uint64(1))
  11886. if !(f != 0) {
  11887. return libc.UintptrFromInt32(0)
  11888. }
  11889. XXftMemAlloc(tls, int32(m_XFT_MEM_FILE), libc.Int32FromUint64(uint64(96)+libc.Xstrlen(tls, file)+uint64(1)))
  11890. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  11891. libc.Xprintf(tls, __ccgo_ts+867, libc.VaList(bp+8, file, id))
  11892. }
  11893. (*TXftFtFile)(unsafe.Pointer(f)).Fnext = __XftFtFiles
  11894. __XftFtFiles = f
  11895. (*TXftFtFile)(unsafe.Pointer(f)).Fref = int32(1)
  11896. (*TXftFtFile)(unsafe.Pointer(f)).Ffile = f + libc.UintptrFromInt32(1)*96
  11897. libc.Xstrcpy(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, file)
  11898. (*TXftFtFile)(unsafe.Pointer(f)).Fid = id
  11899. (*TXftFtFile)(unsafe.Pointer(f)).Flock = 0
  11900. (*TXftFtFile)(unsafe.Pointer(f)).Fface = libc.UintptrFromInt32(0)
  11901. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  11902. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  11903. v4 = libc.Int64FromInt32(0)
  11904. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v4
  11905. v3 = v4
  11906. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v3
  11907. v2 = v3
  11908. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v2
  11909. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v2
  11910. return f
  11911. }
  11912. func __XftGetFaceFile(tls *libc.TLS, face TFT_Face) (r uintptr) {
  11913. var f uintptr
  11914. var v1, v2, v3 TFT_Fixed
  11915. _, _, _, _ = f, v1, v2, v3
  11916. f = libc.Xmalloc(tls, uint64(96))
  11917. if !(f != 0) {
  11918. return libc.UintptrFromInt32(0)
  11919. }
  11920. XXftMemAlloc(tls, int32(m_XFT_MEM_FILE), int32(96))
  11921. (*TXftFtFile)(unsafe.Pointer(f)).Fnext = libc.UintptrFromInt32(0)
  11922. (*TXftFtFile)(unsafe.Pointer(f)).Fref = int32(1)
  11923. (*TXftFtFile)(unsafe.Pointer(f)).Ffile = libc.UintptrFromInt32(0)
  11924. (*TXftFtFile)(unsafe.Pointer(f)).Fid = 0
  11925. (*TXftFtFile)(unsafe.Pointer(f)).Flock = 0
  11926. (*TXftFtFile)(unsafe.Pointer(f)).Fface = face
  11927. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  11928. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  11929. v3 = libc.Int64FromInt32(0)
  11930. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v3
  11931. v2 = v3
  11932. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v2
  11933. v1 = v2
  11934. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v1
  11935. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v1
  11936. return f
  11937. }
  11938. func __XftNumFiles(tls *libc.TLS) (r int32) {
  11939. var count int32
  11940. var f uintptr
  11941. _, _ = count, f
  11942. count = 0
  11943. f = __XftFtFiles
  11944. for {
  11945. if !(f != 0) {
  11946. break
  11947. }
  11948. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 && !((*TXftFtFile)(unsafe.Pointer(f)).Flock != 0) {
  11949. count++
  11950. }
  11951. goto _1
  11952. _1:
  11953. ;
  11954. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  11955. }
  11956. return count
  11957. }
  11958. func __XftNthFile(tls *libc.TLS, n int32) (r uintptr) {
  11959. var count, v2 int32
  11960. var f uintptr
  11961. _, _, _ = count, f, v2
  11962. count = 0
  11963. f = __XftFtFiles
  11964. for {
  11965. if !(f != 0) {
  11966. break
  11967. }
  11968. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 && !((*TXftFtFile)(unsafe.Pointer(f)).Flock != 0) {
  11969. v2 = count
  11970. count++
  11971. if v2 == n {
  11972. break
  11973. }
  11974. }
  11975. goto _1
  11976. _1:
  11977. ;
  11978. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  11979. }
  11980. return f
  11981. }
  11982. func __XftUncacheFiles(tls *libc.TLS) {
  11983. bp := tls.Alloc(32)
  11984. defer tls.Free(32)
  11985. var f uintptr
  11986. var n, v1 int32
  11987. _, _, _ = f, n, v1
  11988. for {
  11989. v1 = __XftNumFiles(tls)
  11990. n = v1
  11991. if !(v1 > _XftMaxFreeTypeFiles) {
  11992. break
  11993. }
  11994. f = __XftNthFile(tls, libc.Xrand(tls)%n)
  11995. if f != 0 {
  11996. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  11997. libc.Xprintf(tls, __ccgo_ts+895, libc.VaList(bp+8, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, (*TXftFtFile)(unsafe.Pointer(f)).Fid))
  11998. }
  11999. libfreetype.XFT_Done_Face(tls, (*TXftFtFile)(unsafe.Pointer(f)).Fface)
  12000. (*TXftFtFile)(unsafe.Pointer(f)).Fface = libc.UintptrFromInt32(0)
  12001. }
  12002. }
  12003. }
  12004. func __XftLockFile(tls *libc.TLS, f uintptr) (r TFT_Face) {
  12005. bp := tls.Alloc(32)
  12006. defer tls.Free(32)
  12007. var v1, v2, v3 TFT_Fixed
  12008. _, _, _ = v1, v2, v3
  12009. (*TXftFtFile)(unsafe.Pointer(f)).Flock++
  12010. if !((*TXftFtFile)(unsafe.Pointer(f)).Fface != 0) {
  12011. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12012. libc.Xprintf(tls, __ccgo_ts+926, libc.VaList(bp+8, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, (*TXftFtFile)(unsafe.Pointer(f)).Fid))
  12013. }
  12014. if libfreetype.XFT_New_Face(tls, X_XftFTlibrary, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, int64((*TXftFtFile)(unsafe.Pointer(f)).Fid), f+88) != 0 {
  12015. (*TXftFtFile)(unsafe.Pointer(f)).Flock--
  12016. }
  12017. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  12018. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  12019. v3 = libc.Int64FromInt32(0)
  12020. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v3
  12021. v2 = v3
  12022. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v2
  12023. v1 = v2
  12024. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v1
  12025. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v1
  12026. __XftUncacheFiles(tls)
  12027. }
  12028. return (*TXftFtFile)(unsafe.Pointer(f)).Fface
  12029. }
  12030. func __XftLockError(tls *libc.TLS, reason uintptr) {
  12031. bp := tls.Alloc(16)
  12032. defer tls.Free(16)
  12033. libc.Xfprintf(tls, libc.Xstderr, __ccgo_ts+946, libc.VaList(bp+8, reason))
  12034. }
  12035. func __XftUnlockFile(tls *libc.TLS, f uintptr) {
  12036. var v1 int32
  12037. var v2 uintptr
  12038. _, _ = v1, v2
  12039. v2 = f + 80
  12040. *(*int32)(unsafe.Pointer(v2))--
  12041. v1 = *(*int32)(unsafe.Pointer(v2))
  12042. if v1 < 0 {
  12043. __XftLockError(tls, __ccgo_ts+969)
  12044. }
  12045. }
  12046. func X_XftSetFace(tls *libc.TLS, f uintptr, xsize TFT_F26Dot6, ysize TFT_F26Dot6, matrix uintptr) (r TFcBool) {
  12047. bp := tls.Alloc(48)
  12048. defer tls.Free(48)
  12049. var best, i int32
  12050. var face TFT_Face
  12051. var v2, v3, v4, v5, v6, v7 int64
  12052. var v8, v9 bool
  12053. _, _, _, _, _, _, _, _, _, _, _ = best, face, i, v2, v3, v4, v5, v6, v7, v8, v9
  12054. face = (*TXftFtFile)(unsafe.Pointer(f)).Fface
  12055. if (*TXftFtFile)(unsafe.Pointer(f)).Fxsize != xsize || (*TXftFtFile)(unsafe.Pointer(f)).Fysize != ysize {
  12056. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  12057. libc.Xprintf(tls, __ccgo_ts+991, libc.VaList(bp+8, int32(xsize>>libc.Int32FromInt32(6)), int32(ysize>>libc.Int32FromInt32(6)), int32(xsize), int32(ysize)))
  12058. }
  12059. /*
  12060. * Bitmap only faces must match exactly, so find the closest
  12061. * one (height dominant search)
  12062. */
  12063. if !((*TFT_FaceRec_)(unsafe.Pointer(face)).Fface_flags&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(0)) != 0) {
  12064. best = 0
  12065. i = int32(1)
  12066. for {
  12067. if !(i < (*TFT_FaceRec_)(unsafe.Pointer(face)).Fnum_fixed_sizes) {
  12068. break
  12069. }
  12070. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem < 0 {
  12071. v2 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem)
  12072. } else {
  12073. v2 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem
  12074. }
  12075. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem < 0 {
  12076. v3 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem)
  12077. } else {
  12078. v3 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem
  12079. }
  12080. if v9 = v2 < v3; !v9 {
  12081. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem < 0 {
  12082. v4 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem)
  12083. } else {
  12084. v4 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem
  12085. }
  12086. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem < 0 {
  12087. v5 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem)
  12088. } else {
  12089. v5 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem
  12090. }
  12091. if v8 = v4 == v5; v8 {
  12092. if xsize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fx_ppem < 0 {
  12093. v6 = -(xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fx_ppem)
  12094. } else {
  12095. v6 = xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fx_ppem
  12096. }
  12097. if xsize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fx_ppem < 0 {
  12098. v7 = -(xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fx_ppem)
  12099. } else {
  12100. v7 = xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fx_ppem
  12101. }
  12102. }
  12103. }
  12104. if v9 || v8 && v6 < v7 {
  12105. best = i
  12106. }
  12107. goto _1
  12108. _1:
  12109. ;
  12110. i++
  12111. }
  12112. /*
  12113. * Freetype 2.1.7 and earlier used width/height
  12114. * for matching sizes in the BDF and PCF loaders.
  12115. * This has been fixed for 2.1.8. Because BDF and PCF
  12116. * files have but a single strike per file, we can
  12117. * simply try both sizes.
  12118. */
  12119. if libfreetype.XFT_Set_Char_Size(tls, face, (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fx_ppem, (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem, uint32(0), uint32(0)) != 0 && libfreetype.XFT_Set_Char_Size(tls, face, int64(int32((*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fwidth)<<int32(6)), int64(int32((*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fheight)<<int32(6)), uint32(0), uint32(0)) != 0 {
  12120. return m_False
  12121. }
  12122. } else {
  12123. if libfreetype.XFT_Set_Char_Size(tls, face, xsize, ysize, uint32(0), uint32(0)) != 0 {
  12124. return m_False
  12125. }
  12126. }
  12127. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = xsize
  12128. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = ysize
  12129. }
  12130. if !((*TFT_Matrix)(unsafe.Pointer(f+48)).Fxx == (*TFT_Matrix)(unsafe.Pointer(matrix)).Fxx && (*TFT_Matrix)(unsafe.Pointer(f+48)).Fyy == (*TFT_Matrix)(unsafe.Pointer(matrix)).Fyy && (*TFT_Matrix)(unsafe.Pointer(f+48)).Fxy == (*TFT_Matrix)(unsafe.Pointer(matrix)).Fxy && (*TFT_Matrix)(unsafe.Pointer(f+48)).Fyx == (*TFT_Matrix)(unsafe.Pointer(matrix)).Fyx) {
  12131. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  12132. libc.Xprintf(tls, __ccgo_ts+1023, libc.VaList(bp+8, float64((*TFT_Matrix)(unsafe.Pointer(matrix)).Fxx)/libc.Float64FromInt32(0x10000), float64((*TFT_Matrix)(unsafe.Pointer(matrix)).Fxy)/libc.Float64FromInt32(0x10000), float64((*TFT_Matrix)(unsafe.Pointer(matrix)).Fyx)/libc.Float64FromInt32(0x10000), float64((*TFT_Matrix)(unsafe.Pointer(matrix)).Fyy)/libc.Float64FromInt32(0x10000)))
  12133. }
  12134. libfreetype.XFT_Set_Transform(tls, face, matrix, libc.UintptrFromInt32(0))
  12135. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix = *(*TFT_Matrix)(unsafe.Pointer(matrix))
  12136. }
  12137. return int32(m_True)
  12138. }
  12139. func __XftReleaseFile(tls *libc.TLS, f uintptr) {
  12140. var prev, v2 uintptr
  12141. var v1 int32
  12142. var v4 uint64
  12143. _, _, _, _ = prev, v1, v2, v4
  12144. v2 = f + 8
  12145. *(*int32)(unsafe.Pointer(v2))--
  12146. v1 = *(*int32)(unsafe.Pointer(v2))
  12147. if v1 != 0 {
  12148. return
  12149. }
  12150. if (*TXftFtFile)(unsafe.Pointer(f)).Flock != 0 {
  12151. __XftLockError(tls, __ccgo_ts+1057)
  12152. }
  12153. if (*TXftFtFile)(unsafe.Pointer(f)).Ffile != 0 {
  12154. prev = uintptr(unsafe.Pointer(&__XftFtFiles))
  12155. for {
  12156. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  12157. break
  12158. }
  12159. if *(*uintptr)(unsafe.Pointer(prev)) == f {
  12160. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12161. break
  12162. }
  12163. goto _3
  12164. _3:
  12165. ;
  12166. prev = *(*uintptr)(unsafe.Pointer(prev))
  12167. }
  12168. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 {
  12169. libfreetype.XFT_Done_Face(tls, (*TXftFtFile)(unsafe.Pointer(f)).Fface)
  12170. }
  12171. }
  12172. if (*TXftFtFile)(unsafe.Pointer(f)).Ffile != 0 {
  12173. v4 = libc.Xstrlen(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile) + uint64(1)
  12174. } else {
  12175. v4 = uint64(0)
  12176. }
  12177. XXftMemFree(tls, int32(m_XFT_MEM_FILE), libc.Int32FromUint64(uint64(96)+v4))
  12178. libc.Xfree(tls, f)
  12179. }
  12180. /*
  12181. * Find a prime larger than the minimum reasonable hash size
  12182. */
  12183. func __XftSqrt(tls *libc.TLS, a TFcChar32) (r TFcChar32) {
  12184. var h, l, m TFcChar32
  12185. _, _, _ = h, l, m
  12186. l = uint32(2)
  12187. h = a / uint32(2)
  12188. for h-l > uint32(1) {
  12189. m = (h + l) >> int32(1)
  12190. if m*m < a {
  12191. l = m
  12192. } else {
  12193. h = m
  12194. }
  12195. }
  12196. return h
  12197. }
  12198. func __XftIsPrime(tls *libc.TLS, i TFcChar32) (r TFcBool) {
  12199. var l, t TFcChar32
  12200. _, _ = l, t
  12201. if i < uint32(2) {
  12202. return m_FcFalse
  12203. }
  12204. if i&uint32(1) == uint32(0) {
  12205. if i == uint32(2) {
  12206. return int32(m_FcTrue)
  12207. }
  12208. return m_FcFalse
  12209. }
  12210. l = __XftSqrt(tls, i) + uint32(1)
  12211. t = uint32(3)
  12212. for {
  12213. if !(t <= l) {
  12214. break
  12215. }
  12216. if i%t == uint32(0) {
  12217. return m_FcFalse
  12218. }
  12219. goto _1
  12220. _1:
  12221. ;
  12222. t += uint32(2)
  12223. }
  12224. return int32(m_FcTrue)
  12225. }
  12226. func __XftHashSize(tls *libc.TLS, num_unicode TFcChar32) (r TFcChar32) {
  12227. var hash TFcChar32
  12228. _ = hash
  12229. /* at least 31.25 % extra space */
  12230. hash = num_unicode + num_unicode>>libc.Int32FromInt32(2) + num_unicode>>libc.Int32FromInt32(4)
  12231. if hash&uint32(1) == uint32(0) {
  12232. hash++
  12233. }
  12234. for !(__XftIsPrime(tls, hash) != 0) {
  12235. hash += uint32(2)
  12236. }
  12237. return hash
  12238. }
  12239. func XXftLockFace(tls *libc.TLS, public uintptr) (r TFT_Face) {
  12240. var face TFT_Face
  12241. var fi, font uintptr
  12242. _, _, _ = face, fi, font
  12243. font = public
  12244. fi = font + 48
  12245. face = __XftLockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12246. /*
  12247. * Make sure the face is usable at the requested size
  12248. */
  12249. if face != 0 && !(X_XftSetFace(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile, (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize, (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize, fi+48) != 0) {
  12250. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12251. face = libc.UintptrFromInt32(0)
  12252. }
  12253. return face
  12254. }
  12255. func XXftUnlockFace(tls *libc.TLS, public uintptr) {
  12256. var font uintptr
  12257. _ = font
  12258. font = public
  12259. __XftUnlockFile(tls, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ffile)
  12260. }
  12261. func _XftFontInfoFill(tls *libc.TLS, dpy uintptr, pattern uintptr, fi uintptr) (r TFcBool) {
  12262. bp := tls.Alloc(112)
  12263. defer tls.Free(112)
  12264. var hash TFcChar32
  12265. var hashp, info, v1, v10, p4, p5, p6, p7, p8 uintptr
  12266. var nhash, v9 int32
  12267. var v2, v3 TFT_Fixed
  12268. var _ /* aspect at bp+24 */ float64
  12269. var _ /* autohint at bp+48 */ TFcBool
  12270. var _ /* bitmap at bp+72 */ TFcBool
  12271. var _ /* dsize at bp+16 */ float64
  12272. var _ /* face at bp+64 */ TFT_Face
  12273. var _ /* filename at bp+0 */ uintptr
  12274. var _ /* font_matrix at bp+32 */ uintptr
  12275. var _ /* global_advance at bp+52 */ TFcBool
  12276. var _ /* hint_style at bp+56 */ int32
  12277. var _ /* hinting at bp+40 */ TFcBool
  12278. var _ /* id at bp+8 */ int32
  12279. var _ /* vertical_layout at bp+44 */ TFcBool
  12280. _, _, _, _, _, _, _, _, _, _, _, _, _, _ = hash, hashp, info, nhash, v1, v10, v2, v3, v9, p4, p5, p6, p7, p8
  12281. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  12282. if !(info != 0) {
  12283. return m_FcFalse
  12284. }
  12285. /*
  12286. * Initialize the whole XftFontInfo so that padding doesn't interfere with
  12287. * hash or XftFontInfoEqual().
  12288. */
  12289. libc.Xmemset(tls, fi, int32('\000'), uint64(104))
  12290. /*
  12291. * Find the associated file
  12292. */
  12293. switch libfontconfig.XFcPatternGetString(tls, pattern, __ccgo_ts+1086, 0, bp) {
  12294. case int32(_FcResultNoMatch):
  12295. *(*uintptr)(unsafe.Pointer(bp)) = libc.UintptrFromInt32(0)
  12296. case int32(_FcResultMatch):
  12297. default:
  12298. goto bail0
  12299. }
  12300. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1091, 0, bp+8) {
  12301. case int32(_FcResultNoMatch):
  12302. *(*int32)(unsafe.Pointer(bp + 8)) = 0
  12303. case int32(_FcResultMatch):
  12304. default:
  12305. goto bail0
  12306. }
  12307. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  12308. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = __XftGetFile(tls, *(*uintptr)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 8)))
  12309. } else {
  12310. if libfontconfig.XFcPatternGetFTFace(tls, pattern, __ccgo_ts+1097, 0, bp+64) == int32(_FcResultMatch) && *(*TFT_Face)(unsafe.Pointer(bp + 64)) != 0 {
  12311. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = __XftGetFaceFile(tls, *(*TFT_Face)(unsafe.Pointer(bp + 64)))
  12312. }
  12313. }
  12314. if !((*TXftFontInfo)(unsafe.Pointer(fi)).Ffile != 0) {
  12315. goto bail0
  12316. }
  12317. /*
  12318. * Compute pixel size
  12319. */
  12320. if libfontconfig.XFcPatternGetDouble(tls, pattern, __ccgo_ts+1104, 0, bp+16) != int32(_FcResultMatch) {
  12321. goto bail1
  12322. }
  12323. if libfontconfig.XFcPatternGetDouble(tls, pattern, __ccgo_ts+1114, 0, bp+24) != int32(_FcResultMatch) {
  12324. *(*float64)(unsafe.Pointer(bp + 24)) = float64(1)
  12325. }
  12326. (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize = int64(float64(*(*float64)(unsafe.Pointer(bp + 16)) * libc.Float64FromFloat64(64)))
  12327. (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize = int64(float64(float64(*(*float64)(unsafe.Pointer(bp + 16))**(*float64)(unsafe.Pointer(bp + 24))) * libc.Float64FromFloat64(64)))
  12328. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12329. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  12330. v1 = *(*uintptr)(unsafe.Pointer(bp))
  12331. } else {
  12332. v1 = __ccgo_ts + 1121
  12333. }
  12334. libc.Xprintf(tls, __ccgo_ts+1128, libc.VaList(bp+88, v1, *(*int32)(unsafe.Pointer(bp + 8)), *(*float64)(unsafe.Pointer(bp + 16))))
  12335. }
  12336. /*
  12337. * Get antialias value
  12338. */
  12339. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+475, 0, fi+32) {
  12340. case int32(_FcResultNoMatch):
  12341. (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias = int32(m_True)
  12342. case int32(_FcResultMatch):
  12343. default:
  12344. goto bail1
  12345. }
  12346. /*
  12347. * Get rgba value
  12348. */
  12349. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+460, 0, fi+40) {
  12350. case int32(_FcResultNoMatch):
  12351. (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba = m_FC_RGBA_UNKNOWN
  12352. case int32(_FcResultMatch):
  12353. default:
  12354. goto bail1
  12355. }
  12356. /*
  12357. * Get lcd_filter value
  12358. */
  12359. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+465, 0, fi+44) {
  12360. case int32(_FcResultNoMatch):
  12361. (*TXftFontInfo)(unsafe.Pointer(fi)).Flcd_filter = int32(m_FC_LCD_DEFAULT)
  12362. case int32(_FcResultMatch):
  12363. default:
  12364. goto bail1
  12365. }
  12366. /*
  12367. * Get matrix and transform values
  12368. */
  12369. switch libfontconfig.XFcPatternGetMatrix(tls, pattern, __ccgo_ts+1165, 0, bp+32) {
  12370. case int32(_FcResultNoMatch):
  12371. v2 = libc.Int64FromInt32(0x10000)
  12372. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy = v2
  12373. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx = v2
  12374. v3 = libc.Int64FromInt32(0)
  12375. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx = v3
  12376. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy = v3
  12377. case int32(_FcResultMatch):
  12378. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx = int64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fxx)
  12379. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy = int64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fyy)
  12380. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy = int64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fxy)
  12381. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx = int64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fyx)
  12382. default:
  12383. goto bail1
  12384. }
  12385. (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform = libc.BoolInt32((*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx != int64(0x10000) || (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy != 0 || (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx != 0 || (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy != int64(0x10000))
  12386. /*
  12387. * Get render value, set to false if no Render extension present
  12388. */
  12389. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  12390. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+453, 0, fi+88) {
  12391. case int32(_FcResultNoMatch):
  12392. (*TXftFontInfo)(unsafe.Pointer(fi)).Frender = (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender
  12393. case int32(_FcResultMatch):
  12394. default:
  12395. goto bail1
  12396. }
  12397. } else {
  12398. (*TXftFontInfo)(unsafe.Pointer(fi)).Frender = m_FcFalse
  12399. }
  12400. /*
  12401. * Compute glyph load flags
  12402. */
  12403. (*TXftFontInfo)(unsafe.Pointer(fi)).Fload_flags = m_FT_LOAD_DEFAULT1
  12404. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1172, 0, bp+72) {
  12405. case int32(_FcResultNoMatch):
  12406. *(*TFcBool)(unsafe.Pointer(bp + 72)) = m_FcFalse
  12407. case int32(_FcResultMatch):
  12408. default:
  12409. goto bail1
  12410. }
  12411. /* disable bitmaps when anti-aliasing or transforming glyphs */
  12412. if !(*(*TFcBool)(unsafe.Pointer(bp + 72)) != 0) && (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias != 0 || (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  12413. p4 = fi + 84
  12414. *(*TFT_Int)(unsafe.Pointer(p4)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p4))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(3))
  12415. }
  12416. /* disable hinting if requested */
  12417. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+513, 0, bp+40) {
  12418. case int32(_FcResultNoMatch):
  12419. *(*TFcBool)(unsafe.Pointer(bp + 40)) = int32(m_FcTrue)
  12420. case int32(_FcResultMatch):
  12421. default:
  12422. goto bail1
  12423. }
  12424. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+485, 0, fi+36) {
  12425. case int32(_FcResultNoMatch):
  12426. (*TXftFontInfo)(unsafe.Pointer(fi)).Fembolden = m_FcFalse
  12427. case int32(_FcResultMatch):
  12428. default:
  12429. goto bail1
  12430. }
  12431. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+503, 0, bp+56) {
  12432. case int32(_FcResultNoMatch):
  12433. *(*int32)(unsafe.Pointer(bp + 56)) = int32(m_FC_HINT_FULL)
  12434. case int32(_FcResultMatch):
  12435. default:
  12436. goto bail1
  12437. }
  12438. if !(*(*TFcBool)(unsafe.Pointer(bp + 40)) != 0) || *(*int32)(unsafe.Pointer(bp + 56)) == m_FC_HINT_NONE {
  12439. p5 = fi + 84
  12440. *(*TFT_Int)(unsafe.Pointer(p5)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p5))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(1))
  12441. }
  12442. /* Figure out the load target, which modifies the hinting
  12443. * behavior of FreeType based on the intended use of the glyphs.
  12444. */
  12445. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias != 0 {
  12446. if m_FC_HINT_NONE < *(*int32)(unsafe.Pointer(bp + 56)) && *(*int32)(unsafe.Pointer(bp + 56)) < int32(m_FC_HINT_FULL) {
  12447. *(*TFT_Int)(unsafe.Pointer(fi + 84)) |= int32(_FT_RENDER_MODE_LIGHT) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12448. } else {
  12449. /* autohinter will snap stems to integer widths, when
  12450. * the LCD targets are used.
  12451. */
  12452. switch (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba {
  12453. case int32(m_FC_RGBA_RGB):
  12454. fallthrough
  12455. case int32(m_FC_RGBA_BGR):
  12456. *(*TFT_Int)(unsafe.Pointer(fi + 84)) |= int32(_FT_RENDER_MODE_LCD) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12457. case int32(m_FC_RGBA_VRGB):
  12458. fallthrough
  12459. case int32(m_FC_RGBA_VBGR):
  12460. *(*TFT_Int)(unsafe.Pointer(fi + 84)) |= int32(_FT_RENDER_MODE_LCD_V) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12461. break
  12462. }
  12463. }
  12464. } else {
  12465. *(*TFT_Int)(unsafe.Pointer(fi + 84)) |= int32(_FT_RENDER_MODE_MONO) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12466. }
  12467. /* set vertical layout if requested */
  12468. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1187, 0, bp+44) {
  12469. case int32(_FcResultNoMatch):
  12470. *(*TFcBool)(unsafe.Pointer(bp + 44)) = m_FcFalse
  12471. case int32(_FcResultMatch):
  12472. default:
  12473. goto bail1
  12474. }
  12475. if *(*TFcBool)(unsafe.Pointer(bp + 44)) != 0 {
  12476. p6 = fi + 84
  12477. *(*TFT_Int)(unsafe.Pointer(p6)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p6))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(4))
  12478. }
  12479. /* force autohinting if requested */
  12480. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+494, 0, bp+48) {
  12481. case int32(_FcResultNoMatch):
  12482. *(*TFcBool)(unsafe.Pointer(bp + 48)) = m_FcFalse
  12483. case int32(_FcResultMatch):
  12484. default:
  12485. goto bail1
  12486. }
  12487. if *(*TFcBool)(unsafe.Pointer(bp + 48)) != 0 {
  12488. p7 = fi + 84
  12489. *(*TFT_Int)(unsafe.Pointer(p7)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p7))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(5))
  12490. }
  12491. /* disable global advance width (for broken DynaLab TT CJK fonts) */
  12492. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1202, 0, bp+52) {
  12493. case int32(_FcResultNoMatch):
  12494. *(*TFcBool)(unsafe.Pointer(bp + 52)) = int32(m_FcTrue)
  12495. case int32(_FcResultMatch):
  12496. default:
  12497. goto bail1
  12498. }
  12499. if !(*(*TFcBool)(unsafe.Pointer(bp + 52)) != 0) {
  12500. p8 = fi + 84
  12501. *(*TFT_Int)(unsafe.Pointer(p8)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p8))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(9))
  12502. }
  12503. /*
  12504. * Get requested spacing value
  12505. */
  12506. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1216, 0, fi+92) {
  12507. case int32(_FcResultNoMatch):
  12508. (*TXftFontInfo)(unsafe.Pointer(fi)).Fspacing = m_FC_PROPORTIONAL
  12509. case int32(_FcResultMatch):
  12510. default:
  12511. goto bail1
  12512. }
  12513. /*
  12514. * Check for minspace
  12515. */
  12516. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+521, 0, fi+96) {
  12517. case int32(_FcResultNoMatch):
  12518. (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace = m_FcFalse
  12519. case int32(_FcResultMatch):
  12520. default:
  12521. goto bail1
  12522. }
  12523. /*
  12524. * Check for fixed pixel spacing
  12525. */
  12526. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1224, 0, fi+100) {
  12527. case int32(_FcResultNoMatch):
  12528. (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width = 0
  12529. case int32(_FcResultMatch):
  12530. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width != 0 {
  12531. (*TXftFontInfo)(unsafe.Pointer(fi)).Fspacing = int32(m_FC_MONO)
  12532. }
  12533. default:
  12534. goto bail1
  12535. }
  12536. /*
  12537. * Step over hash value in the structure
  12538. */
  12539. hash = uint32(0)
  12540. hashp = fi + uintptr(1)*4
  12541. nhash = libc.Int32FromUint64(libc.Uint64FromInt64(104)/libc.Uint64FromInt64(4) - libc.Uint64FromInt32(1))
  12542. for {
  12543. v9 = nhash
  12544. nhash--
  12545. if !(v9 != 0) {
  12546. break
  12547. }
  12548. v10 = hashp
  12549. hashp += 4
  12550. hash += *(*TFcChar32)(unsafe.Pointer(v10))
  12551. }
  12552. (*TXftFontInfo)(unsafe.Pointer(fi)).Fhash = hash
  12553. /*
  12554. * All done
  12555. */
  12556. return int32(m_FcTrue)
  12557. goto bail1
  12558. bail1:
  12559. ;
  12560. __XftReleaseFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12561. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = libc.UintptrFromInt32(0)
  12562. goto bail0
  12563. bail0:
  12564. ;
  12565. return m_FcFalse
  12566. return r
  12567. }
  12568. func _XftFontInfoEmpty(tls *libc.TLS, dpy uintptr, fi uintptr) {
  12569. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile != 0 {
  12570. __XftReleaseFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12571. }
  12572. }
  12573. func XXftFontInfoCreate(tls *libc.TLS, dpy uintptr, pattern uintptr) (r uintptr) {
  12574. var fi uintptr
  12575. _ = fi
  12576. fi = libc.Xmalloc(tls, uint64(104))
  12577. if !(fi != 0) {
  12578. return libc.UintptrFromInt32(0)
  12579. }
  12580. if !(_XftFontInfoFill(tls, dpy, pattern, fi) != 0) {
  12581. libc.Xfree(tls, fi)
  12582. fi = libc.UintptrFromInt32(0)
  12583. }
  12584. XXftMemAlloc(tls, int32(m_XFT_MEM_FONT), int32(104))
  12585. return fi
  12586. }
  12587. func XXftFontInfoDestroy(tls *libc.TLS, dpy uintptr, fi uintptr) {
  12588. _XftFontInfoEmpty(tls, dpy, fi)
  12589. XXftMemFree(tls, int32(m_XFT_MEM_FONT), int32(104))
  12590. libc.Xfree(tls, fi)
  12591. }
  12592. func XXftFontInfoHash(tls *libc.TLS, fi uintptr) (r TFcChar32) {
  12593. return (*TXftFontInfo)(unsafe.Pointer(fi)).Fhash
  12594. }
  12595. func XXftFontInfoEqual(tls *libc.TLS, a uintptr, b uintptr) (r TFcBool) {
  12596. return libc.BoolInt32(libc.Xmemcmp(tls, a, b, uint64(104)) == 0)
  12597. }
  12598. func XXftFontOpenInfo(tls *libc.TLS, dpy uintptr, pattern uintptr, fi uintptr) (r uintptr) {
  12599. bp := tls.Alloc(96)
  12600. defer tls.Free(96)
  12601. var alloc_size, ascent, descent, height, i, num_glyphs, v2 int32
  12602. var antialias TFcBool
  12603. var bucket, font, format, info, v3 uintptr
  12604. var face TFT_Face
  12605. var hash_value, num_unicode, rehash_value TFcChar32
  12606. var _ /* charset at bp+0 */ uintptr
  12607. var _ /* max_glyph_memory at bp+8 */ int32
  12608. var _ /* vector at bp+16 */ TFT_Vector
  12609. var _ /* vector at bp+32 */ TFT_Vector
  12610. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = alloc_size, antialias, ascent, bucket, descent, face, font, format, hash_value, height, i, info, num_glyphs, num_unicode, rehash_value, v2, v3
  12611. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  12612. if !(info != 0) {
  12613. return libc.UintptrFromInt32(0)
  12614. }
  12615. /*
  12616. * Find a matching previously opened font
  12617. */
  12618. bucket = info + 472 + uintptr((*TXftFontInfo)(unsafe.Pointer(fi)).Fhash%uint32(m_XFT_NUM_FONT_HASH))*8
  12619. font = *(*uintptr)(unsafe.Pointer(bucket))
  12620. for {
  12621. if !(font != 0) {
  12622. break
  12623. }
  12624. if XXftFontInfoEqual(tls, font+48, fi) != 0 {
  12625. v3 = font + 152
  12626. v2 = *(*int32)(unsafe.Pointer(v3))
  12627. *(*int32)(unsafe.Pointer(v3))++
  12628. if !(v2 != 0) {
  12629. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts--
  12630. }
  12631. libfontconfig.XFcPatternDestroy(tls, pattern)
  12632. return font
  12633. }
  12634. goto _1
  12635. _1:
  12636. ;
  12637. font = (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next
  12638. }
  12639. /*
  12640. * No existing font, create another.
  12641. */
  12642. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  12643. libc.Xprintf(tls, __ccgo_ts+1234, libc.VaList(bp+56, (*TXftFtFile)(unsafe.Pointer((*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)).Ffile, (*TXftFtFile)(unsafe.Pointer((*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)).Fid, int32((*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize)>>int32(6), int32((*TXftFontInfo)(unsafe.Pointer(fi)).Fysize)>>int32(6)))
  12644. }
  12645. if libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+201, 0, bp+8) != int32(_FcResultMatch) {
  12646. *(*int32)(unsafe.Pointer(bp + 8)) = libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024)
  12647. }
  12648. face = __XftLockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12649. if !(face != 0) {
  12650. goto bail0
  12651. }
  12652. if !(X_XftSetFace(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile, (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize, (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize, fi+48) != 0) {
  12653. goto bail1
  12654. }
  12655. /*
  12656. * Get the set of Unicode codepoints covered by the font.
  12657. * If the incoming pattern doesn't provide this data, go
  12658. * off and compute it. Yes, this is expensive, but it's
  12659. * required to map Unicode to glyph indices.
  12660. */
  12661. if libfontconfig.XFcPatternGetCharSet(tls, pattern, __ccgo_ts+1261, 0, bp) == int32(_FcResultMatch) {
  12662. *(*uintptr)(unsafe.Pointer(bp)) = libfontconfig.XFcCharSetCopy(tls, *(*uintptr)(unsafe.Pointer(bp)))
  12663. } else {
  12664. *(*uintptr)(unsafe.Pointer(bp)) = libfontconfig.XFcFreeTypeCharSet(tls, face, libfontconfig.XFcConfigGetBlanks(tls, libc.UintptrFromInt32(0)))
  12665. }
  12666. antialias = (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias
  12667. if !((*TFT_FaceRec_)(unsafe.Pointer(face)).Fface_flags&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(0)) != 0) {
  12668. antialias = m_FcFalse
  12669. }
  12670. /*
  12671. * Find the appropriate picture format
  12672. */
  12673. if (*TXftFontInfo)(unsafe.Pointer(fi)).Frender != 0 {
  12674. if antialias != 0 {
  12675. switch (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba {
  12676. case int32(m_FC_RGBA_RGB):
  12677. fallthrough
  12678. case int32(m_FC_RGBA_BGR):
  12679. fallthrough
  12680. case int32(m_FC_RGBA_VRGB):
  12681. fallthrough
  12682. case int32(m_FC_RGBA_VBGR):
  12683. format = libxrender.XXRenderFindStandardFormat(tls, dpy, m_PictStandardARGB32)
  12684. default:
  12685. format = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA8))
  12686. break
  12687. }
  12688. } else {
  12689. format = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA1))
  12690. }
  12691. if !(format != 0) {
  12692. goto bail2
  12693. }
  12694. } else {
  12695. format = libc.UintptrFromInt32(0)
  12696. }
  12697. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  12698. num_unicode = libfontconfig.XFcCharSetCount(tls, *(*uintptr)(unsafe.Pointer(bp)))
  12699. hash_value = __XftHashSize(tls, num_unicode)
  12700. rehash_value = hash_value - uint32(2)
  12701. } else {
  12702. num_unicode = uint32(0)
  12703. hash_value = uint32(0)
  12704. rehash_value = uint32(0)
  12705. }
  12706. /*
  12707. * Sometimes the glyphs are numbered 1..n, other times 0..n-1,
  12708. * accept either numbering scheme by making room in the table
  12709. */
  12710. num_glyphs = int32((*TFT_FaceRec_)(unsafe.Pointer(face)).Fnum_glyphs + int64(1))
  12711. alloc_size = libc.Int32FromUint64(libc.Uint64FromInt64(232) + libc.Uint64FromInt32(num_glyphs)*libc.Uint64FromInt64(8) + uint64(hash_value)*libc.Uint64FromInt64(8))
  12712. font = libc.Xmalloc(tls, libc.Uint64FromInt32(alloc_size))
  12713. if !(font != 0) {
  12714. goto bail2
  12715. }
  12716. XXftMemAlloc(tls, int32(m_XFT_MEM_FONT), alloc_size)
  12717. /*
  12718. * Public fields
  12719. */
  12720. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  12721. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx = 0
  12722. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fdescender
  12723. libfreetype.XFT_Vector_Transform(tls, bp+16, fi+48)
  12724. descent = int32(-((*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy >> int32(6)))
  12725. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx = 0
  12726. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fascender
  12727. libfreetype.XFT_Vector_Transform(tls, bp+16, fi+48)
  12728. ascent = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy >> int32(6))
  12729. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace != 0 {
  12730. height = ascent + descent
  12731. } else {
  12732. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx = 0
  12733. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fheight
  12734. libfreetype.XFT_Vector_Transform(tls, bp+16, fi+48)
  12735. height = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy >> int32(6))
  12736. }
  12737. } else {
  12738. descent = int32(-((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fdescender >> int32(6)))
  12739. ascent = int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fascender >> int32(6))
  12740. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace != 0 {
  12741. height = ascent + descent
  12742. } else {
  12743. height = int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fheight >> int32(6))
  12744. }
  12745. }
  12746. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fascent = ascent
  12747. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fdescent = descent
  12748. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fheight = height
  12749. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width != 0 {
  12750. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width = (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width
  12751. } else {
  12752. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  12753. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  12754. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy = 0
  12755. libfreetype.XFT_Vector_Transform(tls, bp+32, fi+48)
  12756. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx >> int32(6))
  12757. } else {
  12758. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width = int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance >> int32(6))
  12759. }
  12760. }
  12761. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fcharset = *(*uintptr)(unsafe.Pointer(bp))
  12762. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fpattern = pattern
  12763. /*
  12764. * Management fields
  12765. */
  12766. (*TXftFontInt)(unsafe.Pointer(font)).Fref = int32(1)
  12767. (*TXftFontInt)(unsafe.Pointer(font)).Fnext = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  12768. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts = font
  12769. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next = *(*uintptr)(unsafe.Pointer(bucket))
  12770. *(*uintptr)(unsafe.Pointer(bucket)) = font
  12771. /*
  12772. * Copy the info over
  12773. */
  12774. (*TXftFontInt)(unsafe.Pointer(font)).Finfo = *(*TXftFontInfo)(unsafe.Pointer(fi))
  12775. /*
  12776. * reset the antialias field. It can't
  12777. * be set correctly until the font is opened,
  12778. * which doesn't happen in XftFontInfoFill
  12779. */
  12780. (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias = antialias
  12781. /*
  12782. * bump XftFile reference count
  12783. */
  12784. (*TXftFtFile)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ffile)).Fref++
  12785. /*
  12786. * Per glyph information
  12787. */
  12788. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs = font + libc.UintptrFromInt32(1)*232
  12789. libc.Xmemset(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs, int32('\000'), libc.Uint64FromInt32(num_glyphs)*uint64(8))
  12790. (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs = num_glyphs
  12791. /*
  12792. * Unicode hash table information
  12793. */
  12794. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_table = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs)*8
  12795. i = 0
  12796. for {
  12797. if !(libc.Uint32FromInt32(i) < hash_value) {
  12798. break
  12799. }
  12800. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(i)*8))).Fucs4 = libc.Uint32FromInt32(^libc.Int32FromInt32(0))
  12801. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(i)*8))).Fglyph = uint32(0)
  12802. goto _4
  12803. _4:
  12804. ;
  12805. i++
  12806. }
  12807. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_value = libc.Int32FromUint32(hash_value)
  12808. (*TXftFontInt)(unsafe.Pointer(font)).Frehash_value = libc.Int32FromUint32(rehash_value)
  12809. /*
  12810. * X specific fields
  12811. */
  12812. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = uint64(0)
  12813. (*TXftFontInt)(unsafe.Pointer(font)).Fformat = format
  12814. /*
  12815. * Glyph memory management fields
  12816. */
  12817. (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory = uint64(0)
  12818. (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory = libc.Uint64FromInt32(*(*int32)(unsafe.Pointer(bp + 8)))
  12819. (*TXftFontInt)(unsafe.Pointer(font)).Fuse_free_glyphs = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs
  12820. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12821. return font
  12822. goto bail2
  12823. bail2:
  12824. ;
  12825. libfontconfig.XFcCharSetDestroy(tls, *(*uintptr)(unsafe.Pointer(bp)))
  12826. goto bail1
  12827. bail1:
  12828. ;
  12829. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12830. goto bail0
  12831. bail0:
  12832. ;
  12833. return libc.UintptrFromInt32(0)
  12834. return r
  12835. }
  12836. func XXftFontOpenPattern(tls *libc.TLS, dpy uintptr, pattern uintptr) (r uintptr) {
  12837. bp := tls.Alloc(112)
  12838. defer tls.Free(112)
  12839. var font uintptr
  12840. var _ /* info at bp+0 */ TXftFontInfo
  12841. _ = font
  12842. if !(_XftFontInfoFill(tls, dpy, pattern, bp) != 0) {
  12843. return libc.UintptrFromInt32(0)
  12844. }
  12845. font = XXftFontOpenInfo(tls, dpy, pattern, bp)
  12846. _XftFontInfoEmpty(tls, dpy, bp)
  12847. return font
  12848. }
  12849. func XXftFontCopy(tls *libc.TLS, dpy uintptr, public uintptr) (r uintptr) {
  12850. var font uintptr
  12851. _ = font
  12852. font = public
  12853. (*TXftFontInt)(unsafe.Pointer(font)).Fref++
  12854. return public
  12855. }
  12856. func _XftFontDestroy(tls *libc.TLS, dpy uintptr, public uintptr) {
  12857. var font, info, xftg uintptr
  12858. var i int32
  12859. _, _, _, _ = font, i, info, xftg
  12860. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  12861. font = public
  12862. /* note reduction in memory use */
  12863. if info != 0 {
  12864. *(*uint64)(unsafe.Pointer(info + 56)) -= (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  12865. }
  12866. /* Clean up the info */
  12867. _XftFontInfoEmpty(tls, dpy, font+48)
  12868. /* Free the glyphset */
  12869. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  12870. libxrender.XXRenderFreeGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset)
  12871. }
  12872. /* Free the glyphs */
  12873. i = 0
  12874. for {
  12875. if !(i < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  12876. break
  12877. }
  12878. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(i)*8))
  12879. if xftg != 0 {
  12880. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  12881. libc.Xfree(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap)
  12882. }
  12883. libc.Xfree(tls, xftg)
  12884. }
  12885. goto _1
  12886. _1:
  12887. ;
  12888. i++
  12889. }
  12890. /* Free the pattern and the charset */
  12891. libfontconfig.XFcPatternDestroy(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fpattern)
  12892. libfontconfig.XFcCharSetDestroy(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fcharset)
  12893. /* Finally, free the font structure */
  12894. XXftMemFree(tls, int32(m_XFT_MEM_FONT), libc.Int32FromUint64(uint64(232)+libc.Uint64FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs)*uint64(8)+libc.Uint64FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value)*uint64(8)))
  12895. libc.Xfree(tls, font)
  12896. }
  12897. func _XftFontFindNthUnref(tls *libc.TLS, info uintptr, n int32) (r uintptr) {
  12898. var font, public uintptr
  12899. var v2 int32
  12900. var v3 bool
  12901. _, _, _, _ = font, public, v2, v3
  12902. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  12903. for {
  12904. if !(public != 0) {
  12905. break
  12906. }
  12907. font = public
  12908. if v3 = !((*TXftFontInt)(unsafe.Pointer(font)).Fref != 0); v3 {
  12909. v2 = n
  12910. n--
  12911. }
  12912. if v3 && !(v2 != 0) {
  12913. break
  12914. }
  12915. goto _1
  12916. _1:
  12917. ;
  12918. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  12919. }
  12920. return public
  12921. }
  12922. func XXftFontManageMemory(tls *libc.TLS, dpy uintptr) {
  12923. bp := tls.Alloc(48)
  12924. defer tls.Free(48)
  12925. var font, info, prev, public uintptr
  12926. _, _, _, _ = font, info, prev, public
  12927. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  12928. if !(info != 0) {
  12929. return
  12930. }
  12931. for (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts {
  12932. public = _XftFontFindNthUnref(tls, info, libc.Xrand(tls)%(*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts)
  12933. font = public
  12934. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  12935. libc.Xprintf(tls, __ccgo_ts+1269, libc.VaList(bp+8, (*TXftFtFile)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ffile)).Ffile, (*TXftFtFile)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ffile)).Fid, int32((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fxsize)>>int32(6), int32((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fysize)>>int32(6)))
  12936. }
  12937. /* Unhook from display list */
  12938. prev = info + 40
  12939. for {
  12940. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  12941. break
  12942. }
  12943. if *(*uintptr)(unsafe.Pointer(prev)) == public {
  12944. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  12945. break
  12946. }
  12947. goto _1
  12948. _1:
  12949. ;
  12950. prev = *(*uintptr)(unsafe.Pointer(prev)) + 32
  12951. }
  12952. /* Unhook from hash list */
  12953. prev = info + 472 + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fhash%uint32(m_XFT_NUM_FONT_HASH))*8
  12954. for {
  12955. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  12956. break
  12957. }
  12958. if *(*uintptr)(unsafe.Pointer(prev)) == public {
  12959. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next
  12960. break
  12961. }
  12962. goto _2
  12963. _2:
  12964. ;
  12965. prev = *(*uintptr)(unsafe.Pointer(prev)) + 40
  12966. }
  12967. /* Destroy the font */
  12968. _XftFontDestroy(tls, dpy, public)
  12969. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts--
  12970. }
  12971. }
  12972. func XXftFontClose(tls *libc.TLS, dpy uintptr, public uintptr) {
  12973. var font, info, v2 uintptr
  12974. var v1 int32
  12975. _, _, _, _ = font, info, v1, v2
  12976. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  12977. font = public
  12978. v2 = font + 152
  12979. *(*int32)(unsafe.Pointer(v2))--
  12980. v1 = *(*int32)(unsafe.Pointer(v2))
  12981. if v1 != 0 {
  12982. return
  12983. }
  12984. if info != 0 {
  12985. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts++
  12986. XXftFontManageMemory(tls, dpy)
  12987. } else {
  12988. _XftFontDestroy(tls, dpy, public)
  12989. }
  12990. }
  12991. func XXftInitFtLibrary(tls *libc.TLS) (r TFcBool) {
  12992. if X_XftFTlibrary != 0 {
  12993. return int32(m_FcTrue)
  12994. }
  12995. if libfreetype.XFT_Init_FreeType(tls, uintptr(unsafe.Pointer(&X_XftFTlibrary))) != 0 {
  12996. return m_FcFalse
  12997. }
  12998. return int32(m_FcTrue)
  12999. }
  13000. const m_FT_LCD_FILTER_FIVE_TAPS = 5
  13001. const m_FT_LOAD_DEFAULT2 = 0x0
  13002. const m_FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY = "FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY"
  13003. const m_FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY = "FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY"
  13004. type TFT_Orientation = int32
  13005. type _FT_Orientation_ = int32
  13006. const _FT_ORIENTATION_TRUETYPE = 0
  13007. const _FT_ORIENTATION_POSTSCRIPT = 1
  13008. const _FT_ORIENTATION_FILL_RIGHT = 0
  13009. const _FT_ORIENTATION_FILL_LEFT = 1
  13010. const _FT_ORIENTATION_NONE = 2
  13011. type TFT_LcdFilter = int32
  13012. type _FT_LcdFilter_ = int32
  13013. const _FT_LCD_FILTER_NONE = 0
  13014. const _FT_LCD_FILTER_DEFAULT = 1
  13015. const _FT_LCD_FILTER_LIGHT = 2
  13016. const _FT_LCD_FILTER_LEGACY1 = 3
  13017. const _FT_LCD_FILTER_LEGACY = 16
  13018. const _FT_LCD_FILTER_MAX = 17
  13019. type TFT_LcdFiveTapFilter = [5]TFT_Byte
  13020. /* */
  13021. /* END */
  13022. /*
  13023. * Validate the memory info for a font
  13024. */
  13025. func __XftFontValidateMemory(tls *libc.TLS, dpy uintptr, public uintptr) {
  13026. bp := tls.Alloc(32)
  13027. defer tls.Free(32)
  13028. var font, xftg uintptr
  13029. var glyph_memory uint64
  13030. var glyphindex TFT_UInt
  13031. _, _, _, _ = font, glyph_memory, glyphindex, xftg
  13032. font = public
  13033. glyph_memory = uint64(0)
  13034. glyphindex = uint32(0)
  13035. for {
  13036. if !(glyphindex < libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs)) {
  13037. break
  13038. }
  13039. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8))
  13040. if xftg != 0 {
  13041. glyph_memory += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  13042. }
  13043. goto _1
  13044. _1:
  13045. ;
  13046. glyphindex++
  13047. }
  13048. if glyph_memory != (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory {
  13049. libc.Xprintf(tls, __ccgo_ts+1313, libc.VaList(bp+8, (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory, glyph_memory))
  13050. }
  13051. }
  13052. // C documentation
  13053. //
  13054. // /* we sometimes need to convert the glyph bitmap in a FT_GlyphSlot
  13055. // * into a different format. For example, we want to convert a
  13056. // * FT_PIXEL_MODE_LCD or FT_PIXEL_MODE_LCD_V bitmap into a 32-bit
  13057. // * ARGB or ABGR bitmap.
  13058. // *
  13059. // * this function prepares a target descriptor for this operation.
  13060. // *
  13061. // * input :: target bitmap descriptor. The function will set its
  13062. // * 'width', 'rows' and 'pitch' fields, and only these
  13063. // *
  13064. // * slot :: the glyph slot containing the source bitmap. this
  13065. // * function assumes that slot->format == FT_GLYPH_FORMAT_BITMAP
  13066. // *
  13067. // * mode :: the requested final rendering mode. supported values are
  13068. // * MONO, NORMAL (i.e. gray), LCD and LCD_V
  13069. // *
  13070. // * the function returns the size in bytes of the corresponding buffer,
  13071. // * it's up to the caller to allocate the corresponding memory block
  13072. // * before calling _fill_xrender_bitmap
  13073. // *
  13074. // * it also returns -1 in case of error (e.g. incompatible arguments,
  13075. // * like trying to convert a gray bitmap into a monochrome one)
  13076. // */
  13077. func __compute_xrender_bitmap_size(tls *libc.TLS, target uintptr, slot TFT_GlyphSlot, mode TFT_Render_Mode) (r int32) {
  13078. var ftbit uintptr
  13079. var height, pitch, width int32
  13080. _, _, _, _ = ftbit, height, pitch, width
  13081. if (*TFT_GlyphSlotRec_)(unsafe.Pointer(slot)).Fformat != int32(_FT_GLYPH_FORMAT_BITMAP) {
  13082. return -int32(1)
  13083. }
  13084. // compute the size of the final bitmap
  13085. ftbit = slot + 152
  13086. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fwidth)
  13087. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows)
  13088. pitch = (width + int32(3)) & ^libc.Int32FromInt32(3)
  13089. switch libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpixel_mode) {
  13090. case int32(_FT_PIXEL_MODE_MONO):
  13091. if mode == int32(_FT_RENDER_MODE_MONO) {
  13092. pitch = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  13093. break
  13094. }
  13095. /* fall-through */
  13096. fallthrough
  13097. case int32(_FT_PIXEL_MODE_GRAY):
  13098. if mode == int32(_FT_RENDER_MODE_LCD) || mode == int32(_FT_RENDER_MODE_LCD_V) {
  13099. /* each pixel is replicated into a 32-bit ARGB value */
  13100. pitch = width * int32(4)
  13101. }
  13102. case int32(_FT_PIXEL_MODE_LCD):
  13103. if mode != int32(_FT_RENDER_MODE_LCD) {
  13104. return -int32(1)
  13105. }
  13106. /* horz pixel triplets are packed into 32-bit ARGB values */
  13107. width /= int32(3)
  13108. pitch = width * int32(4)
  13109. case int32(_FT_PIXEL_MODE_LCD_V):
  13110. if mode != int32(_FT_RENDER_MODE_LCD_V) {
  13111. return -int32(1)
  13112. }
  13113. /* vert pixel triplets are packed into 32-bit ARGB values */
  13114. height /= int32(3)
  13115. pitch = width * int32(4)
  13116. default: /* unsupported source format */
  13117. return -int32(1)
  13118. }
  13119. (*TFT_Bitmap)(unsafe.Pointer(target)).Fwidth = libc.Uint32FromInt32(width)
  13120. (*TFT_Bitmap)(unsafe.Pointer(target)).Frows = libc.Uint32FromInt32(height)
  13121. (*TFT_Bitmap)(unsafe.Pointer(target)).Fpitch = pitch
  13122. (*TFT_Bitmap)(unsafe.Pointer(target)).Fbuffer = libc.UintptrFromInt32(0)
  13123. return pitch * height
  13124. }
  13125. // C documentation
  13126. //
  13127. // /* this functions converts the glyph bitmap found in a FT_GlyphSlot
  13128. // * into a different format (see _compute_xrender_bitmap_size)
  13129. // *
  13130. // * you should call this function after _compute_xrender_bitmap_size
  13131. // *
  13132. // * target :: target bitmap descriptor. Note that its 'buffer' pointer
  13133. // * must point to memory allocated by the caller
  13134. // *
  13135. // * slot :: the glyph slot containing the source bitmap
  13136. // *
  13137. // * mode :: the requested final rendering mode
  13138. // *
  13139. // * bgr :: boolean, set if BGR or VBGR pixel ordering is needed
  13140. // */
  13141. func __fill_xrender_bitmap(tls *libc.TLS, target uintptr, slot TFT_GlyphSlot, mode TFT_Render_Mode, bgr int32) {
  13142. var bytes, h, height, pitch, src_pitch, subpixel, width, x, x1, x2, x3, x4, x5, x6 int32
  13143. var dst, dst1, dst2, dst3, dst4, dstLine, ftbit, src, src1, src2, src3, srcLine uintptr
  13144. var pix, pix1, pix2, pix3, pix4 uint32
  13145. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bytes, dst, dst1, dst2, dst3, dst4, dstLine, ftbit, h, height, pitch, pix, pix1, pix2, pix3, pix4, src, src1, src2, src3, srcLine, src_pitch, subpixel, width, x, x1, x2, x3, x4, x5, x6
  13146. ftbit = slot + 152
  13147. srcLine = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fbuffer
  13148. dstLine = (*TFT_Bitmap)(unsafe.Pointer(target)).Fbuffer
  13149. src_pitch = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch
  13150. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Fwidth)
  13151. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Frows)
  13152. pitch = (*TFT_Bitmap)(unsafe.Pointer(target)).Fpitch
  13153. subpixel = libc.BoolInt32(mode == int32(_FT_RENDER_MODE_LCD) || mode == int32(_FT_RENDER_MODE_LCD_V))
  13154. if src_pitch < 0 {
  13155. srcLine -= uintptr(libc.Uint32FromInt32(src_pitch) * ((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows - uint32(1)))
  13156. }
  13157. switch libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpixel_mode) {
  13158. case int32(_FT_PIXEL_MODE_MONO):
  13159. if subpixel != 0 { /* convert mono to ARGB32 values */
  13160. h = height
  13161. for {
  13162. if !(h > 0) {
  13163. break
  13164. }
  13165. x = 0
  13166. for {
  13167. if !(x < width) {
  13168. break
  13169. }
  13170. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x>>libc.Int32FromInt32(3)))))&(int32(0x80)>>(x&int32(7))) != 0 {
  13171. *(*uint32)(unsafe.Pointer(dstLine + uintptr(x)*4)) = uint32(0xffffffff)
  13172. }
  13173. goto _2
  13174. _2:
  13175. ;
  13176. x++
  13177. }
  13178. goto _1
  13179. _1:
  13180. ;
  13181. h--
  13182. srcLine += uintptr(src_pitch)
  13183. dstLine += uintptr(pitch)
  13184. }
  13185. } else {
  13186. if mode == int32(_FT_RENDER_MODE_NORMAL) { /* convert mono to 8-bit gray */
  13187. h = height
  13188. for {
  13189. if !(h > 0) {
  13190. break
  13191. }
  13192. x1 = 0
  13193. for {
  13194. if !(x1 < width) {
  13195. break
  13196. }
  13197. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x1>>libc.Int32FromInt32(3)))))&(int32(0x80)>>(x1&int32(7))) != 0 {
  13198. *(*uint8)(unsafe.Pointer(dstLine + uintptr(x1))) = uint8(0xff)
  13199. }
  13200. goto _4
  13201. _4:
  13202. ;
  13203. x1++
  13204. }
  13205. goto _3
  13206. _3:
  13207. ;
  13208. h--
  13209. srcLine += uintptr(src_pitch)
  13210. dstLine += uintptr(pitch)
  13211. }
  13212. } else { /* copy mono to mono */
  13213. bytes = (width + int32(7)) >> int32(3)
  13214. h = height
  13215. for {
  13216. if !(h > 0) {
  13217. break
  13218. }
  13219. libc.Xmemcpy(tls, dstLine, srcLine, libc.Uint64FromInt32(bytes))
  13220. goto _5
  13221. _5:
  13222. ;
  13223. h--
  13224. srcLine += uintptr(src_pitch)
  13225. dstLine += uintptr(pitch)
  13226. }
  13227. }
  13228. }
  13229. case int32(_FT_PIXEL_MODE_GRAY):
  13230. if subpixel != 0 { /* convert gray to ARGB32 values */
  13231. h = height
  13232. for {
  13233. if !(h > 0) {
  13234. break
  13235. }
  13236. dst = dstLine
  13237. x2 = 0
  13238. for {
  13239. if !(x2 < width) {
  13240. break
  13241. }
  13242. pix = uint32(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x2))))
  13243. pix |= pix << int32(8)
  13244. pix |= pix << int32(16)
  13245. *(*uint32)(unsafe.Pointer(dst + uintptr(x2)*4)) = pix
  13246. goto _7
  13247. _7:
  13248. ;
  13249. x2++
  13250. }
  13251. goto _6
  13252. _6:
  13253. ;
  13254. h--
  13255. srcLine += uintptr(src_pitch)
  13256. dstLine += uintptr(pitch)
  13257. }
  13258. } else { /* copy gray into gray */
  13259. h = height
  13260. for {
  13261. if !(h > 0) {
  13262. break
  13263. }
  13264. libc.Xmemcpy(tls, dstLine, srcLine, libc.Uint64FromInt32(width))
  13265. goto _8
  13266. _8:
  13267. ;
  13268. h--
  13269. srcLine += uintptr(src_pitch)
  13270. dstLine += uintptr(pitch)
  13271. }
  13272. }
  13273. case int32(_FT_PIXEL_MODE_LCD):
  13274. if !(bgr != 0) {
  13275. /* convert horizontal RGB into ARGB32 */
  13276. h = height
  13277. for {
  13278. if !(h > 0) {
  13279. break
  13280. }
  13281. src = srcLine
  13282. dst1 = dstLine
  13283. x3 = 0
  13284. for {
  13285. if !(x3 < width) {
  13286. break
  13287. }
  13288. pix1 = uint32(*(*uint8)(unsafe.Pointer(src)))<<int32(16) | uint32(*(*uint8)(unsafe.Pointer(src + 1)))<<int32(8) | uint32(*(*uint8)(unsafe.Pointer(src + 2))) | uint32(*(*uint8)(unsafe.Pointer(src + 1)))<<int32(24)
  13289. *(*uint32)(unsafe.Pointer(dst1 + uintptr(x3)*4)) = pix1
  13290. goto _10
  13291. _10:
  13292. ;
  13293. x3++
  13294. src += uintptr(3)
  13295. }
  13296. goto _9
  13297. _9:
  13298. ;
  13299. h--
  13300. srcLine += uintptr(src_pitch)
  13301. dstLine += uintptr(pitch)
  13302. }
  13303. } else {
  13304. /* convert horizontal BGR into ARGB32 */
  13305. h = height
  13306. for {
  13307. if !(h > 0) {
  13308. break
  13309. }
  13310. src1 = srcLine
  13311. dst2 = dstLine
  13312. x4 = 0
  13313. for {
  13314. if !(x4 < width) {
  13315. break
  13316. }
  13317. pix2 = uint32(*(*uint8)(unsafe.Pointer(src1 + 2)))<<int32(16) | uint32(*(*uint8)(unsafe.Pointer(src1 + 1)))<<int32(8) | uint32(*(*uint8)(unsafe.Pointer(src1))) | uint32(*(*uint8)(unsafe.Pointer(src1 + 1)))<<int32(24)
  13318. *(*uint32)(unsafe.Pointer(dst2 + uintptr(x4)*4)) = pix2
  13319. goto _12
  13320. _12:
  13321. ;
  13322. x4++
  13323. src1 += uintptr(3)
  13324. }
  13325. goto _11
  13326. _11:
  13327. ;
  13328. h--
  13329. srcLine += uintptr(src_pitch)
  13330. dstLine += uintptr(pitch)
  13331. }
  13332. }
  13333. default: /* FT_PIXEL_MODE_LCD_V */
  13334. /* convert vertical RGB into ARGB32 */
  13335. if !(bgr != 0) {
  13336. h = height
  13337. for {
  13338. if !(h > 0) {
  13339. break
  13340. }
  13341. src2 = srcLine
  13342. dst3 = dstLine
  13343. x5 = 0
  13344. for {
  13345. if !(x5 < width) {
  13346. break
  13347. }
  13348. pix3 = uint32(*(*uint8)(unsafe.Pointer(src2)))<<int32(16) | uint32(*(*uint8)(unsafe.Pointer(src2 + uintptr(src_pitch))))<<int32(8) | uint32(*(*uint8)(unsafe.Pointer(src2 + uintptr(src_pitch*int32(2))))) | uint32(*(*uint8)(unsafe.Pointer(src2 + uintptr(src_pitch))))<<int32(24)
  13349. *(*uint32)(unsafe.Pointer(dst3 + uintptr(x5)*4)) = pix3
  13350. goto _14
  13351. _14:
  13352. ;
  13353. x5++
  13354. src2 += uintptr(1)
  13355. }
  13356. goto _13
  13357. _13:
  13358. ;
  13359. h--
  13360. srcLine += uintptr(int32(3) * src_pitch)
  13361. dstLine += uintptr(pitch)
  13362. }
  13363. } else {
  13364. h = height
  13365. for {
  13366. if !(h > 0) {
  13367. break
  13368. }
  13369. src3 = srcLine
  13370. dst4 = dstLine
  13371. x6 = 0
  13372. for {
  13373. if !(x6 < width) {
  13374. break
  13375. }
  13376. pix4 = uint32(*(*uint8)(unsafe.Pointer(src3 + uintptr(src_pitch*int32(2)))))<<int32(16) | uint32(*(*uint8)(unsafe.Pointer(src3 + uintptr(src_pitch))))<<int32(8) | uint32(*(*uint8)(unsafe.Pointer(src3))) | uint32(*(*uint8)(unsafe.Pointer(src3 + uintptr(src_pitch))))<<int32(24)
  13377. *(*uint32)(unsafe.Pointer(dst4 + uintptr(x6)*4)) = pix4
  13378. goto _16
  13379. _16:
  13380. ;
  13381. x6++
  13382. src3 += uintptr(1)
  13383. }
  13384. goto _15
  13385. _15:
  13386. ;
  13387. h--
  13388. srcLine += uintptr(int32(3) * src_pitch)
  13389. dstLine += uintptr(pitch)
  13390. }
  13391. }
  13392. }
  13393. }
  13394. func XXftFontLoadGlyphs(tls *libc.TLS, dpy uintptr, pub uintptr, need_bitmaps TFcBool, glyphs uintptr, nglyph int32) {
  13395. bp := tls.Alloc(4256)
  13396. defer tls.Free(4256)
  13397. var adjust, adjust1, bottom, bufSize, c, height, i, left, right, size, top, width, x, xc, y, yc, v1, v13, v14, v3, v4, v5, v8, v9 int32
  13398. var bufBitmap, font, ftbit, info, line, line1, xftg, v15, v2 uintptr
  13399. var error1 TFT_Error
  13400. var face TFT_Face
  13401. var glyphindex TFT_UInt
  13402. var glyphslot TFT_GlyphSlot
  13403. var mode TFT_Render_Mode
  13404. var _ /* bufLocal at bp+8 */ [4096]uint8
  13405. var _ /* glyph at bp+0 */ TGlyph
  13406. var _ /* local at bp+4104 */ TFT_Bitmap
  13407. var _ /* vector at bp+4144 */ TFT_Vector
  13408. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = adjust, adjust1, bottom, bufBitmap, bufSize, c, error1, face, font, ftbit, glyphindex, glyphslot, height, i, info, left, line, line1, mode, right, size, top, width, x, xc, xftg, y, yc, v1, v13, v14, v15, v2, v3, v4, v5, v8, v9
  13409. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  13410. font = pub
  13411. bufBitmap = bp + 8
  13412. bufSize = int32(4096)
  13413. mode = int32(_FT_RENDER_MODE_MONO)
  13414. if !(info != 0) {
  13415. return
  13416. }
  13417. face = XXftLockFace(tls, font)
  13418. if !(face != 0) {
  13419. return
  13420. }
  13421. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 {
  13422. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  13423. case int32(m_FC_RGBA_RGB):
  13424. fallthrough
  13425. case int32(m_FC_RGBA_BGR):
  13426. mode = int32(_FT_RENDER_MODE_LCD)
  13427. case int32(m_FC_RGBA_VRGB):
  13428. fallthrough
  13429. case int32(m_FC_RGBA_VBGR):
  13430. mode = int32(_FT_RENDER_MODE_LCD_V)
  13431. default:
  13432. mode = int32(_FT_RENDER_MODE_NORMAL)
  13433. }
  13434. }
  13435. for {
  13436. v1 = nglyph
  13437. nglyph--
  13438. if !(v1 != 0) {
  13439. break
  13440. }
  13441. v2 = glyphs
  13442. glyphs += 4
  13443. glyphindex = *(*TFT_UInt)(unsafe.Pointer(v2))
  13444. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8))
  13445. if !(xftg != 0) {
  13446. continue
  13447. }
  13448. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  13449. __XftFontValidateMemory(tls, dpy, pub)
  13450. }
  13451. /*
  13452. * Check to see if this glyph has just been loaded,
  13453. * this happens when drawing the same glyph twice
  13454. * in a single string
  13455. */
  13456. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0 {
  13457. continue
  13458. }
  13459. libfreetype.XFT_Library_SetLcdFilter(tls, X_XftFTlibrary, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Flcd_filter)
  13460. error1 = libfreetype.XFT_Load_Glyph(tls, face, glyphindex, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)
  13461. if error1 != 0 {
  13462. /*
  13463. * If anti-aliasing or transforming glyphs and
  13464. * no outline version exists, fallback to the
  13465. * bitmap and let things look bad instead of
  13466. * missing the glyph
  13467. */
  13468. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(3)) != 0 {
  13469. error1 = libfreetype.XFT_Load_Glyph(tls, face, glyphindex, int32(int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags) & ^(libc.Int64FromInt64(1)<<libc.Int32FromInt32(3))))
  13470. }
  13471. if error1 != 0 {
  13472. continue
  13473. }
  13474. }
  13475. glyphslot = (*TFT_FaceRec_)(unsafe.Pointer(face)).Fglyph
  13476. /*
  13477. * Embolden if required
  13478. */
  13479. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fembolden != 0 {
  13480. libfreetype.XFT_GlyphSlot_Embolden(tls, glyphslot)
  13481. }
  13482. /*
  13483. * Compute glyph metrics from FreeType information
  13484. */
  13485. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ftransform != 0 && (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fformat != int32(_FT_GLYPH_FORMAT_BITMAP) {
  13486. v5 = libc.Int32FromInt32(0)
  13487. bottom = v5
  13488. v4 = v5
  13489. top = v4
  13490. v3 = v4
  13491. right = v3
  13492. left = v3
  13493. xc = 0
  13494. for {
  13495. if !(xc <= int32(1)) {
  13496. break
  13497. }
  13498. yc = 0
  13499. for {
  13500. if !(yc <= int32(1)) {
  13501. break
  13502. }
  13503. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx = (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX + int64(xc)*(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fwidth
  13504. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy = (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY - int64(yc)*(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fheight
  13505. libfreetype.XFT_Vector_Transform(tls, bp+4144, font+48+48)
  13506. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  13507. libc.Xprintf(tls, __ccgo_ts+1372, libc.VaList(bp+4168, xc, yc, int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx), int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)))
  13508. }
  13509. if xc == 0 && yc == 0 {
  13510. v8 = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx)
  13511. right = v8
  13512. left = v8
  13513. v9 = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)
  13514. bottom = v9
  13515. top = v9
  13516. } else {
  13517. if int64(left) > (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx {
  13518. left = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx)
  13519. }
  13520. if int64(right) < (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx {
  13521. right = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx)
  13522. }
  13523. if int64(bottom) > (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy {
  13524. bottom = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)
  13525. }
  13526. if int64(top) < (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy {
  13527. top = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)
  13528. }
  13529. }
  13530. goto _7
  13531. _7:
  13532. ;
  13533. yc++
  13534. }
  13535. goto _6
  13536. _6:
  13537. ;
  13538. xc++
  13539. }
  13540. left = left & -int32(64)
  13541. right = (right + int32(63)) & -int32(64)
  13542. bottom = bottom & -int32(64)
  13543. top = (top + int32(63)) & -int32(64)
  13544. } else {
  13545. left = int32((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX & int64(-libc.Int32FromInt32(64)))
  13546. right = int32(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX + (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fwidth + libc.Int64FromInt32(63)) & int64(-libc.Int32FromInt32(64)))
  13547. top = int32(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY + libc.Int64FromInt32(63)) & int64(-libc.Int32FromInt32(64)))
  13548. bottom = int32(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY - (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fheight) & int64(-libc.Int32FromInt32(64)))
  13549. }
  13550. width = (right - left) >> int32(6)
  13551. height = (top - bottom) >> int32(6)
  13552. /*
  13553. * Clip charcell glyphs to the bounding box
  13554. * XXX transformed?
  13555. */
  13556. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fspacing >= int32(m_FC_CHARCELL) && !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ftransform != 0) {
  13557. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(4)) != 0 {
  13558. if bottom>>int32(6) > (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width {
  13559. adjust = bottom - (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width<<int32(6)
  13560. if adjust > top {
  13561. adjust = top
  13562. }
  13563. top -= adjust
  13564. bottom -= adjust
  13565. height = (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width
  13566. }
  13567. } else {
  13568. if right>>int32(6) > (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width {
  13569. adjust1 = right - (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width<<int32(6)
  13570. if adjust1 > left {
  13571. adjust1 = left
  13572. }
  13573. left -= adjust1
  13574. right -= adjust1
  13575. width = (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width
  13576. }
  13577. }
  13578. }
  13579. if (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fformat != int32(_FT_GLYPH_FORMAT_BITMAP) {
  13580. error1 = libfreetype.XFT_Render_Glyph(tls, (*TFT_FaceRec_)(unsafe.Pointer(face)).Fglyph, mode)
  13581. if error1 != 0 {
  13582. continue
  13583. }
  13584. }
  13585. libfreetype.XFT_Library_SetLcdFilter(tls, X_XftFTlibrary, int32(_FT_LCD_FILTER_NONE))
  13586. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fspacing >= int32(m_FC_MONO) {
  13587. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ftransform != 0 {
  13588. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(4)) != 0 {
  13589. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx = 0
  13590. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy = -(*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  13591. } else {
  13592. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  13593. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy = 0
  13594. }
  13595. libfreetype.XFT_Vector_Transform(tls, bp+4144, font+48+48)
  13596. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx >> int32(6))
  13597. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(-((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy >> int32(6)))
  13598. } else {
  13599. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(4)) != 0 {
  13600. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = 0
  13601. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(-(*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width)
  13602. } else {
  13603. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16((*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width)
  13604. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = 0
  13605. }
  13606. }
  13607. } else {
  13608. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fadvance.Fx + libc.Int64FromInt32(32)) & int64(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6))
  13609. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(-(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fadvance.Fy + int64(32)) & int64(-int32(64)) >> int32(6)))
  13610. }
  13611. // compute the size of the final bitmap
  13612. ftbit = glyphslot + 152
  13613. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fwidth)
  13614. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows)
  13615. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  13616. libc.Xprintf(tls, __ccgo_ts+1392, libc.VaList(bp+4168, libc.Int32FromUint32(glyphindex)))
  13617. libc.Xprintf(tls, __ccgo_ts+1403, libc.VaList(bp+4168, int32((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX), int32((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY), int32((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fwidth), int32((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fheight), left, right, top, bottom, width, height))
  13618. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPHV) != 0 {
  13619. line = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fbuffer
  13620. if (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch < 0 {
  13621. line -= uintptr((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch * (height - int32(1)))
  13622. }
  13623. y = 0
  13624. for {
  13625. if !(y < height) {
  13626. break
  13627. }
  13628. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 {
  13629. x = 0
  13630. for {
  13631. if !(x < width) {
  13632. break
  13633. }
  13634. libc.Xprintf(tls, __ccgo_ts+1456, libc.VaList(bp+4168, libc.Int32FromUint8(_den[libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(line + uintptr(x))))>>int32(5)])))
  13635. goto _11
  13636. _11:
  13637. ;
  13638. x++
  13639. }
  13640. } else {
  13641. x = 0
  13642. for {
  13643. if !(x < width*int32(8)) {
  13644. break
  13645. }
  13646. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(line + uintptr(x>>int32(3)))))&(int32(1)<<(x&int32(7))) != 0 {
  13647. v13 = int32('#')
  13648. } else {
  13649. v13 = int32(' ')
  13650. }
  13651. libc.Xprintf(tls, __ccgo_ts+1456, libc.VaList(bp+4168, v13))
  13652. goto _12
  13653. _12:
  13654. ;
  13655. x++
  13656. }
  13657. }
  13658. libc.Xprintf(tls, __ccgo_ts+1459, 0)
  13659. line += uintptr((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch)
  13660. goto _10
  13661. _10:
  13662. ;
  13663. y++
  13664. }
  13665. libc.Xprintf(tls, __ccgo_ts+1462, 0)
  13666. }
  13667. }
  13668. size = __compute_xrender_bitmap_size(tls, bp+4104, glyphslot, mode)
  13669. if size < 0 {
  13670. continue
  13671. }
  13672. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth = uint16((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fwidth)
  13673. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight = uint16((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Frows)
  13674. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx = int16(-(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_left)
  13675. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy = int16((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_top)
  13676. /*
  13677. * If the glyph is relatively large (> 1% of server memory),
  13678. * don't send it until necessary.
  13679. */
  13680. if !(need_bitmaps != 0) && libc.Uint64FromInt32(size) > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory/uint64(100) {
  13681. continue
  13682. }
  13683. /*
  13684. * Make sure there is enough buffer space for the glyph.
  13685. */
  13686. if size > bufSize {
  13687. if bufBitmap != bp+8 {
  13688. libc.Xfree(tls, bufBitmap)
  13689. }
  13690. bufBitmap = libc.Xmalloc(tls, libc.Uint64FromInt32(size))
  13691. if !(bufBitmap != 0) {
  13692. continue
  13693. }
  13694. bufSize = size
  13695. }
  13696. libc.Xmemset(tls, bufBitmap, 0, libc.Uint64FromInt32(size))
  13697. (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fbuffer = bufBitmap
  13698. __fill_xrender_bitmap(tls, bp+4104, glyphslot, mode, libc.BoolInt32((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba == int32(m_FC_RGBA_BGR) || (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba == int32(m_FC_RGBA_VBGR)))
  13699. /*
  13700. * Copy or convert into local buffer.
  13701. */
  13702. /*
  13703. * Use the glyph index as the wire encoding; it
  13704. * might be more efficient for some locales to map
  13705. * these by first usage to smaller values, but that
  13706. * would require persistently storing the map when
  13707. * glyphs were freed.
  13708. */
  13709. *(*TGlyph)(unsafe.Pointer(bp)) = uint64(glyphindex)
  13710. (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory = libc.Uint64FromInt32(size) + uint64(32)
  13711. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  13712. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  13713. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = libxrender.XXRenderCreateGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fformat)
  13714. }
  13715. if mode == int32(_FT_RENDER_MODE_MONO) {
  13716. /* swap bits in each byte */
  13717. if (*struct {
  13718. Fext_data uintptr
  13719. Fprivate1 uintptr
  13720. Ffd int32
  13721. Fprivate2 int32
  13722. Fproto_major_version int32
  13723. Fproto_minor_version int32
  13724. Fvendor uintptr
  13725. Fprivate3 TXID
  13726. Fprivate4 TXID
  13727. Fprivate5 TXID
  13728. Fprivate6 int32
  13729. Fresource_alloc uintptr
  13730. Fbyte_order int32
  13731. Fbitmap_unit int32
  13732. Fbitmap_pad int32
  13733. Fbitmap_bit_order int32
  13734. Fnformats int32
  13735. Fpixmap_format uintptr
  13736. Fprivate8 int32
  13737. Frelease int32
  13738. Fprivate9 uintptr
  13739. Fprivate10 uintptr
  13740. Fqlen int32
  13741. Flast_request_read uint64
  13742. Frequest uint64
  13743. Fprivate11 TXPointer
  13744. Fprivate12 TXPointer
  13745. Fprivate13 TXPointer
  13746. Fprivate14 TXPointer
  13747. Fmax_request_size uint32
  13748. Fdb uintptr
  13749. Fprivate15 uintptr
  13750. Fdisplay_name uintptr
  13751. Fdefault_screen int32
  13752. Fnscreens int32
  13753. Fscreens uintptr
  13754. Fmotion_buffer uint64
  13755. Fprivate16 uint64
  13756. Fmin_keycode int32
  13757. Fmax_keycode int32
  13758. Fprivate17 TXPointer
  13759. Fprivate18 TXPointer
  13760. Fprivate19 int32
  13761. Fxdefaults uintptr
  13762. })(unsafe.Pointer(dpy)).Fbitmap_bit_order != int32(m_MSBFirst) {
  13763. line1 = bufBitmap
  13764. i = size
  13765. for {
  13766. v14 = i
  13767. i--
  13768. if !(v14 != 0) {
  13769. break
  13770. }
  13771. c = libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(line1)))
  13772. c = c<<int32(1)&int32(0xaa) | c>>int32(1)&int32(0x55)
  13773. c = c<<int32(2)&int32(0xcc) | c>>int32(2)&int32(0x33)
  13774. c = c<<int32(4)&int32(0xf0) | c>>int32(4)&int32(0x0f)
  13775. v15 = line1
  13776. line1++
  13777. *(*uint8)(unsafe.Pointer(v15)) = libc.Uint8FromInt32(c)
  13778. }
  13779. }
  13780. } else {
  13781. if mode != int32(_FT_RENDER_MODE_NORMAL) {
  13782. /* invert ARGB <=> BGRA */
  13783. if (*struct {
  13784. Fext_data uintptr
  13785. Fprivate1 uintptr
  13786. Ffd int32
  13787. Fprivate2 int32
  13788. Fproto_major_version int32
  13789. Fproto_minor_version int32
  13790. Fvendor uintptr
  13791. Fprivate3 TXID
  13792. Fprivate4 TXID
  13793. Fprivate5 TXID
  13794. Fprivate6 int32
  13795. Fresource_alloc uintptr
  13796. Fbyte_order int32
  13797. Fbitmap_unit int32
  13798. Fbitmap_pad int32
  13799. Fbitmap_bit_order int32
  13800. Fnformats int32
  13801. Fpixmap_format uintptr
  13802. Fprivate8 int32
  13803. Frelease int32
  13804. Fprivate9 uintptr
  13805. Fprivate10 uintptr
  13806. Fqlen int32
  13807. Flast_request_read uint64
  13808. Frequest uint64
  13809. Fprivate11 TXPointer
  13810. Fprivate12 TXPointer
  13811. Fprivate13 TXPointer
  13812. Fprivate14 TXPointer
  13813. Fmax_request_size uint32
  13814. Fdb uintptr
  13815. Fprivate15 uintptr
  13816. Fdisplay_name uintptr
  13817. Fdefault_screen int32
  13818. Fnscreens int32
  13819. Fscreens uintptr
  13820. Fmotion_buffer uint64
  13821. Fprivate16 uint64
  13822. Fmin_keycode int32
  13823. Fmax_keycode int32
  13824. Fprivate17 TXPointer
  13825. Fprivate18 TXPointer
  13826. Fprivate19 int32
  13827. Fxdefaults uintptr
  13828. })(unsafe.Pointer(dpy)).Fbyte_order != XXftNativeByteOrder(tls) {
  13829. XXftSwapCARD32(tls, bufBitmap, size>>int32(2))
  13830. }
  13831. }
  13832. }
  13833. libxrender.XXRenderAddGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, xftg, int32(1), bufBitmap, size)
  13834. } else {
  13835. if size != 0 {
  13836. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.Xmalloc(tls, libc.Uint64FromInt32(size))
  13837. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  13838. libc.Xmemcpy(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap, bufBitmap, libc.Uint64FromInt32(size))
  13839. }
  13840. } else {
  13841. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.UintptrFromInt32(0)
  13842. }
  13843. }
  13844. *(*uint64)(unsafe.Pointer(font + 208)) += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  13845. *(*uint64)(unsafe.Pointer(info + 56)) += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  13846. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  13847. __XftFontValidateMemory(tls, dpy, pub)
  13848. }
  13849. if XXftDebug(tls)&int32(m_XFT_DBG_CACHEV) != 0 {
  13850. libc.Xprintf(tls, __ccgo_ts+1464, libc.VaList(bp+4168, glyphindex, (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory))
  13851. }
  13852. }
  13853. if bufBitmap != bp+8 {
  13854. libc.Xfree(tls, bufBitmap)
  13855. }
  13856. XXftUnlockFace(tls, font)
  13857. }
  13858. var _den = [9]uint8{' ', '.', ':', ';', '=', '+', '*', '#'}
  13859. func XXftFontUnloadGlyphs(tls *libc.TLS, dpy uintptr, pub uintptr, glyphs uintptr, nglyph int32) {
  13860. bp := tls.Alloc(8192)
  13861. defer tls.Free(8192)
  13862. var font, info, xftg, v2 uintptr
  13863. var glyphindex TFT_UInt
  13864. var nused, v1, v3 int32
  13865. var _ /* glyphBuf at bp+0 */ [1024]TGlyph
  13866. _, _, _, _, _, _, _, _ = font, glyphindex, info, nused, xftg, v1, v2, v3
  13867. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  13868. font = pub
  13869. nused = 0
  13870. for {
  13871. v1 = nglyph
  13872. nglyph--
  13873. if !(v1 != 0) {
  13874. break
  13875. }
  13876. v2 = glyphs
  13877. glyphs += 4
  13878. glyphindex = *(*TFT_UInt)(unsafe.Pointer(v2))
  13879. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8))
  13880. if !(xftg != 0) {
  13881. continue
  13882. }
  13883. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0 {
  13884. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  13885. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  13886. v3 = nused
  13887. nused++
  13888. (*(*[1024]TGlyph)(unsafe.Pointer(bp)))[v3] = uint64(glyphindex)
  13889. if libc.Uint64FromInt32(nused) == libc.Uint64FromInt64(8192)/libc.Uint64FromInt64(8) {
  13890. libxrender.XXRenderFreeGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, nused)
  13891. nused = 0
  13892. }
  13893. }
  13894. } else {
  13895. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  13896. libc.Xfree(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap)
  13897. }
  13898. }
  13899. *(*uint64)(unsafe.Pointer(font + 208)) -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  13900. if info != 0 {
  13901. *(*uint64)(unsafe.Pointer(info + 56)) -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  13902. }
  13903. }
  13904. libc.Xfree(tls, xftg)
  13905. XXftMemFree(tls, int32(m_XFT_MEM_GLYPH), int32(32))
  13906. *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8)) = libc.UintptrFromInt32(0)
  13907. }
  13908. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 && nused != 0 {
  13909. libxrender.XXRenderFreeGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, nused)
  13910. }
  13911. }
  13912. func XXftFontCheckGlyph(tls *libc.TLS, dpy uintptr, pub uintptr, need_bitmaps TFcBool, glyph TFT_UInt, missing uintptr, nmissing uintptr) (r TFcBool) {
  13913. var font, xftg uintptr
  13914. var n, v1 int32
  13915. _, _, _, _ = font, n, xftg, v1
  13916. font = pub
  13917. if glyph >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  13918. return m_FcFalse
  13919. }
  13920. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  13921. if !(xftg != 0) || need_bitmaps != 0 && !((*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0) {
  13922. if !(xftg != 0) {
  13923. xftg = libc.Xmalloc(tls, uint64(32))
  13924. if !(xftg != 0) {
  13925. return m_FcFalse
  13926. }
  13927. XXftMemAlloc(tls, int32(m_XFT_MEM_GLYPH), int32(32))
  13928. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.UintptrFromInt32(0)
  13929. (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory = uint64(0)
  13930. *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8)) = xftg
  13931. }
  13932. n = *(*int32)(unsafe.Pointer(nmissing))
  13933. v1 = n
  13934. n++
  13935. *(*TFT_UInt)(unsafe.Pointer(missing + uintptr(v1)*4)) = glyph
  13936. if n == int32(m_XFT_NMISSING) {
  13937. XXftFontLoadGlyphs(tls, dpy, pub, need_bitmaps, missing, n)
  13938. n = 0
  13939. }
  13940. *(*int32)(unsafe.Pointer(nmissing)) = n
  13941. return int32(m_FcTrue)
  13942. } else {
  13943. return m_FcFalse
  13944. }
  13945. return r
  13946. }
  13947. func XXftCharExists(tls *libc.TLS, dpy uintptr, pub uintptr, ucs4 TFcChar32) (r TFcBool) {
  13948. if (*TXftFont)(unsafe.Pointer(pub)).Fcharset != 0 {
  13949. return libfontconfig.XFcCharSetHasChar(tls, (*TXftFont)(unsafe.Pointer(pub)).Fcharset, ucs4)
  13950. }
  13951. return m_FcFalse
  13952. }
  13953. func XXftCharIndex(tls *libc.TLS, dpy uintptr, pub uintptr, ucs4 TFcChar32) (r TFT_UInt) {
  13954. var ent, offset TFcChar32
  13955. var face TFT_Face
  13956. var font uintptr
  13957. _, _, _, _ = ent, face, font, offset
  13958. font = pub
  13959. if !((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value != 0) {
  13960. return uint32(0)
  13961. }
  13962. ent = ucs4 % libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value)
  13963. offset = uint32(0)
  13964. for (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 != ucs4 {
  13965. if (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 == libc.Uint32FromInt32(^libc.Int32FromInt32(0)) {
  13966. if !(XXftCharExists(tls, dpy, pub, ucs4) != 0) {
  13967. return uint32(0)
  13968. }
  13969. face = XXftLockFace(tls, pub)
  13970. if !(face != 0) {
  13971. return uint32(0)
  13972. }
  13973. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 = ucs4
  13974. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fglyph = libfontconfig.XFcFreeTypeCharIndex(tls, face, ucs4)
  13975. XXftUnlockFace(tls, pub)
  13976. break
  13977. }
  13978. if !(offset != 0) {
  13979. offset = ucs4 % libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Frehash_value)
  13980. if !(offset != 0) {
  13981. offset = uint32(1)
  13982. }
  13983. }
  13984. ent = ent + offset
  13985. if ent >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value) {
  13986. ent -= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value)
  13987. }
  13988. }
  13989. return (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fglyph
  13990. }
  13991. // C documentation
  13992. //
  13993. // /*
  13994. // * Pick a random glyph from the font and remove it from the cache
  13995. // */
  13996. func X_XftFontUncacheGlyph(tls *libc.TLS, dpy uintptr, pub uintptr) {
  13997. bp := tls.Alloc(32)
  13998. defer tls.Free(32)
  13999. var font, xftg uintptr
  14000. var glyph_memory uint64
  14001. var _ /* glyphindex at bp+0 */ TFT_UInt
  14002. _, _, _ = font, glyph_memory, xftg
  14003. font = pub
  14004. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory != 0) {
  14005. return
  14006. }
  14007. if (*TXftFontInt)(unsafe.Pointer(font)).Fuse_free_glyphs != 0 {
  14008. glyph_memory = libc.Uint64FromInt32(libc.Xrand(tls)) % (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  14009. } else {
  14010. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  14011. libxrender.XXRenderFreeGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset)
  14012. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = uint64(0)
  14013. }
  14014. glyph_memory = uint64(0)
  14015. }
  14016. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  14017. __XftFontValidateMemory(tls, dpy, pub)
  14018. }
  14019. *(*TFT_UInt)(unsafe.Pointer(bp)) = uint32(0)
  14020. for {
  14021. if !(*(*TFT_UInt)(unsafe.Pointer(bp)) < libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs)) {
  14022. break
  14023. }
  14024. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(*(*TFT_UInt)(unsafe.Pointer(bp)))*8))
  14025. if xftg != 0 {
  14026. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory > glyph_memory {
  14027. if XXftDebug(tls)&int32(m_XFT_DBG_CACHEV) != 0 {
  14028. libc.Xprintf(tls, __ccgo_ts+1493, libc.VaList(bp+16, *(*TFT_UInt)(unsafe.Pointer(bp)), (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory))
  14029. }
  14030. XXftFontUnloadGlyphs(tls, dpy, pub, bp, int32(1))
  14031. if !((*TXftFontInt)(unsafe.Pointer(font)).Fuse_free_glyphs != 0) {
  14032. goto _1
  14033. }
  14034. break
  14035. }
  14036. glyph_memory -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14037. }
  14038. goto _1
  14039. _1:
  14040. ;
  14041. *(*TFT_UInt)(unsafe.Pointer(bp))++
  14042. }
  14043. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  14044. __XftFontValidateMemory(tls, dpy, pub)
  14045. }
  14046. }
  14047. func X_XftFontManageMemory(tls *libc.TLS, dpy uintptr, pub uintptr) {
  14048. bp := tls.Alloc(32)
  14049. defer tls.Free(32)
  14050. var font uintptr
  14051. var v1 uint64
  14052. _, _ = font, v1
  14053. font = pub
  14054. if (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory != 0 {
  14055. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  14056. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory {
  14057. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  14058. v1 = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset
  14059. } else {
  14060. v1 = uint64(font)
  14061. }
  14062. libc.Xprintf(tls, __ccgo_ts+1524, libc.VaList(bp+8, v1, (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory, (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory))
  14063. }
  14064. }
  14065. for (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory {
  14066. X_XftFontUncacheGlyph(tls, dpy, pub)
  14067. }
  14068. }
  14069. X_XftDisplayManageMemory(tls, dpy)
  14070. }
  14071. /* xftxlfd.c */
  14072. var __XftConfigInitialized int32
  14073. func XXftInit(tls *libc.TLS, config uintptr) (r int32) {
  14074. if __XftConfigInitialized != 0 {
  14075. return int32(m_True)
  14076. }
  14077. __XftConfigInitialized = int32(m_True)
  14078. if !(libfontconfig.XFcInit(tls) != 0) {
  14079. return m_False
  14080. }
  14081. X_XftNameInit(tls)
  14082. return int32(m_True)
  14083. }
  14084. func XXftGetVersion(tls *libc.TLS) (r int32) {
  14085. return libc.Int32FromInt32(m_XFT_MAJOR)*libc.Int32FromInt32(10000) + libc.Int32FromInt32(m_XFT_MINOR)*libc.Int32FromInt32(100) + libc.Int32FromInt32(m_XFT_REVISION)
  14086. }
  14087. var _XftInUse = [4]struct {
  14088. Fname uintptr
  14089. Falloc_count int32
  14090. Falloc_mem int32
  14091. Ffree_count int32
  14092. Ffree_mem int32
  14093. }{
  14094. 0: {
  14095. Fname: __ccgo_ts + 1570,
  14096. },
  14097. 1: {
  14098. Fname: __ccgo_ts + 1578,
  14099. },
  14100. 2: {
  14101. Fname: __ccgo_ts + 1586,
  14102. },
  14103. 3: {
  14104. Fname: __ccgo_ts + 1596,
  14105. },
  14106. }
  14107. var _XftAllocCount int32
  14108. var _XftAllocMem int32
  14109. var _XftFreeCount int32
  14110. var _XftFreeMem int32
  14111. var _XftMemNotice = libc.Int32FromInt32(1) * libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024)
  14112. var _XftAllocNotify int32
  14113. var _XftFreeNotify int32
  14114. func XXftMemReport(tls *libc.TLS) {
  14115. bp := tls.Alloc(48)
  14116. defer tls.Free(48)
  14117. var i int32
  14118. _ = i
  14119. libc.Xprintf(tls, __ccgo_ts+1605, 0)
  14120. libc.Xprintf(tls, __ccgo_ts+1624, 0)
  14121. libc.Xprintf(tls, __ccgo_ts+1662, 0)
  14122. i = 0
  14123. for {
  14124. if !(i < int32(m_XFT_MEM_NUM)) {
  14125. break
  14126. }
  14127. libc.Xprintf(tls, __ccgo_ts+1705, libc.VaList(bp+8, _XftInUse[i].Fname, _XftInUse[i].Falloc_count, _XftInUse[i].Falloc_mem, _XftInUse[i].Ffree_count, _XftInUse[i].Ffree_mem))
  14128. goto _1
  14129. _1:
  14130. ;
  14131. i++
  14132. }
  14133. libc.Xprintf(tls, __ccgo_ts+1705, libc.VaList(bp+8, __ccgo_ts+1725, _XftAllocCount, _XftAllocMem, _XftFreeCount, _XftFreeMem))
  14134. _XftAllocNotify = 0
  14135. _XftFreeNotify = 0
  14136. }
  14137. func XXftMemAlloc(tls *libc.TLS, kind int32, size int32) {
  14138. if XXftDebug(tls)&int32(m_XFT_DBG_MEMORY) != 0 {
  14139. _XftInUse[kind].Falloc_count++
  14140. _XftInUse[kind].Falloc_mem += size
  14141. _XftAllocCount++
  14142. _XftAllocMem += size
  14143. _XftAllocNotify += size
  14144. if _XftAllocNotify > _XftMemNotice {
  14145. XXftMemReport(tls)
  14146. }
  14147. }
  14148. }
  14149. func XXftMemFree(tls *libc.TLS, kind int32, size int32) {
  14150. if XXftDebug(tls)&int32(m_XFT_DBG_MEMORY) != 0 {
  14151. _XftInUse[kind].Ffree_count++
  14152. _XftInUse[kind].Ffree_mem += size
  14153. _XftFreeCount++
  14154. _XftFreeMem += size
  14155. _XftFreeNotify += size
  14156. if _XftFreeNotify > _XftMemNotice {
  14157. XXftMemReport(tls)
  14158. }
  14159. }
  14160. }
  14161. /* xftxlfd.c */
  14162. func XXftListFontsPatternObjects(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr, os uintptr) (r uintptr) {
  14163. return libfontconfig.XFcFontList(tls, libc.UintptrFromInt32(0), pattern, os)
  14164. }
  14165. func XXftListFonts(tls *libc.TLS, dpy uintptr, screen int32, va1 uintptr) (r uintptr) {
  14166. bp := tls.Alloc(16)
  14167. defer tls.Free(16)
  14168. var __o__, __ob__, __os__, __p__, first, fs, os, pattern uintptr
  14169. var va Tva_list
  14170. var _ /* __v__ at bp+0 */ TFcValue
  14171. _, _, _, _, _, _, _, _, _ = __o__, __ob__, __os__, __p__, first, fs, os, pattern, va
  14172. va = va1
  14173. __p__ = libc.UintptrFromInt32(0)
  14174. if !(__p__ != 0) {
  14175. __p__ = libfontconfig.XFcPatternCreate(tls)
  14176. if !(__p__ != 0) {
  14177. goto _FcPatternVapBuild_bail0
  14178. }
  14179. }
  14180. for {
  14181. __o__ = libc.VaUintptr(&va)
  14182. if !(__o__ != 0) {
  14183. break
  14184. }
  14185. (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 = libc.VaInt32(&va)
  14186. switch (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 {
  14187. case int32(_FcTypeUnknown):
  14188. fallthrough
  14189. case int32(_FcTypeVoid):
  14190. goto _FcPatternVapBuild_bail1
  14191. case int32(_FcTypeInteger):
  14192. *(*int32)(unsafe.Pointer(bp + 8)) = libc.VaInt32(&va)
  14193. case int32(_FcTypeDouble):
  14194. *(*float64)(unsafe.Pointer(bp + 8)) = libc.VaFloat64(&va)
  14195. case int32(_FcTypeString):
  14196. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  14197. case int32(_FcTypeBool):
  14198. *(*TFcBool)(unsafe.Pointer(bp + 8)) = libc.VaInt32(&va)
  14199. case int32(_FcTypeMatrix):
  14200. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  14201. case int32(_FcTypeCharSet):
  14202. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  14203. case int32(_FcTypeFTFace):
  14204. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  14205. case int32(_FcTypeLangSet):
  14206. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  14207. case int32(_FcTypeRange):
  14208. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  14209. break
  14210. }
  14211. if !(libfontconfig.XFcPatternAdd(tls, __p__, __o__, *(*TFcValue)(unsafe.Pointer(bp)), int32(m_FcTrue)) != 0) {
  14212. goto _FcPatternVapBuild_bail1
  14213. }
  14214. goto _1
  14215. _1:
  14216. }
  14217. pattern = __p__
  14218. goto _FcPatternVapBuild_return
  14219. goto _FcPatternVapBuild_bail1
  14220. _FcPatternVapBuild_bail1:
  14221. ;
  14222. if !(libc.UintptrFromInt32(0) != 0) {
  14223. libfontconfig.XFcPatternDestroy(tls, __p__)
  14224. }
  14225. goto _FcPatternVapBuild_bail0
  14226. _FcPatternVapBuild_bail0:
  14227. ;
  14228. pattern = libc.UintptrFromInt32(0)
  14229. goto _FcPatternVapBuild_return
  14230. _FcPatternVapBuild_return:
  14231. ;
  14232. first = libc.VaUintptr(&va)
  14233. os = uintptr(0)
  14234. __os__ = libfontconfig.XFcObjectSetCreate(tls)
  14235. if !(__os__ != 0) {
  14236. goto _FcObjectSetVapBuild_bail0
  14237. }
  14238. __ob__ = first
  14239. for __ob__ != 0 {
  14240. if !(libfontconfig.XFcObjectSetAdd(tls, __os__, __ob__) != 0) {
  14241. goto _FcObjectSetVapBuild_bail1
  14242. }
  14243. __ob__ = libc.VaUintptr(&va)
  14244. }
  14245. os = __os__
  14246. goto _FcObjectSetVapBuild_bail1
  14247. _FcObjectSetVapBuild_bail1:
  14248. ;
  14249. if !(os != 0) && __os__ != 0 {
  14250. libfontconfig.XFcObjectSetDestroy(tls, __os__)
  14251. }
  14252. goto _FcObjectSetVapBuild_bail0
  14253. _FcObjectSetVapBuild_bail0:
  14254. ;
  14255. _ = va
  14256. fs = XXftListFontsPatternObjects(tls, dpy, screen, pattern, os)
  14257. libfontconfig.XFcPatternDestroy(tls, pattern)
  14258. libfontconfig.XFcObjectSetDestroy(tls, os)
  14259. return fs
  14260. }
  14261. /* xftxlfd.c */
  14262. var __XftObjectTypes = [4]TFcObjectType{
  14263. 0: {
  14264. Fobject: __ccgo_ts + 1731,
  14265. Ftype1: int32(_FcTypeBool),
  14266. },
  14267. 1: {
  14268. Fobject: __ccgo_ts + 1736,
  14269. Ftype1: int32(_FcTypeString),
  14270. },
  14271. 2: {
  14272. Fobject: __ccgo_ts + 453,
  14273. Ftype1: int32(_FcTypeBool),
  14274. },
  14275. 3: {
  14276. Fobject: __ccgo_ts + 201,
  14277. Ftype1: int32(_FcTypeInteger),
  14278. },
  14279. }
  14280. var __XftNameInitialized TFcBool
  14281. func X_XftNameInit(tls *libc.TLS) {
  14282. if __XftNameInitialized != 0 {
  14283. return
  14284. }
  14285. __XftNameInitialized = int32(m_FcTrue)
  14286. libfontconfig.XFcNameRegisterObjectTypes(tls, uintptr(unsafe.Pointer(&__XftObjectTypes)), libc.Int32FromUint64(libc.Uint64FromInt64(64)/libc.Uint64FromInt64(16)))
  14287. }
  14288. func XXftNameParse(tls *libc.TLS, name uintptr) (r uintptr) {
  14289. X_XftNameInit(tls)
  14290. return libfontconfig.XFcNameParse(tls, name)
  14291. }
  14292. func XXftNameUnparse(tls *libc.TLS, pat uintptr, dest uintptr, len1 int32) (r TFcBool) {
  14293. var name, new1 uintptr
  14294. _, _ = name, new1
  14295. X_XftNameInit(tls)
  14296. name = libfontconfig.XFcNameUnparse(tls, pat)
  14297. if !(name != 0) {
  14298. return m_FcFalse
  14299. }
  14300. if libc.Xstrlen(tls, name)+uint64(1) > libc.Uint64FromInt32(len1) {
  14301. new1 = libfontconfig.XFcPatternDuplicate(tls, pat)
  14302. libc.Xfree(tls, name)
  14303. libfontconfig.XFcPatternDel(tls, new1, __ccgo_ts+1741)
  14304. libfontconfig.XFcPatternDel(tls, new1, __ccgo_ts+1261)
  14305. name = libfontconfig.XFcNameUnparse(tls, new1)
  14306. libfontconfig.XFcPatternDestroy(tls, new1)
  14307. if !(name != 0) {
  14308. return m_FcFalse
  14309. }
  14310. if libc.Xstrlen(tls, name)+uint64(1) > libc.Uint64FromInt32(len1) {
  14311. libc.Xstrncpy(tls, dest, name, libc.Uint64FromInt32(len1)-uint64(1))
  14312. *(*uint8)(unsafe.Pointer(dest + uintptr(len1-int32(1)))) = uint8('\000')
  14313. libc.Xfree(tls, name)
  14314. return m_FcFalse
  14315. }
  14316. }
  14317. libc.Xstrcpy(tls, dest, name)
  14318. libc.Xfree(tls, name)
  14319. return int32(m_FcTrue)
  14320. }
  14321. const m_NUM_ELT_LOCAL = 128
  14322. /* xftxlfd.c */
  14323. /*
  14324. * Use the Render extension to draw the glyphs
  14325. */
  14326. func XXftGlyphRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, x int32, y int32, glyphs uintptr, nglyphs int32) {
  14327. bp := tls.Alloc(5136)
  14328. defer tls.Free(5136)
  14329. var char16, char32, char8, chars, font uintptr
  14330. var g, max TFT_UInt
  14331. var glyphs_loaded TFcBool
  14332. var i, size, width int32
  14333. var wire TGlyph
  14334. var _ /* char_local at bp+1028 */ [1024]uint32
  14335. var _ /* missing at bp+0 */ [256]TFT_UInt
  14336. var _ /* nmissing at bp+1024 */ int32
  14337. _, _, _, _, _, _, _, _, _, _, _, _ = char16, char32, char8, chars, font, g, glyphs_loaded, i, max, size, width, wire
  14338. font = pub
  14339. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  14340. return
  14341. }
  14342. /*
  14343. * Load missing glyphs
  14344. */
  14345. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  14346. max = uint32(0)
  14347. glyphs_loaded = m_FcFalse
  14348. i = 0
  14349. for {
  14350. if !(i < nglyphs) {
  14351. break
  14352. }
  14353. g = *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4))
  14354. if g > max {
  14355. max = g
  14356. }
  14357. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  14358. glyphs_loaded = int32(m_FcTrue)
  14359. }
  14360. goto _1
  14361. _1:
  14362. ;
  14363. i++
  14364. }
  14365. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  14366. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  14367. }
  14368. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  14369. goto bail1
  14370. }
  14371. if max < uint32(0x100) {
  14372. width = int32(1)
  14373. size = int32(1)
  14374. } else {
  14375. if max < uint32(0x10000) {
  14376. width = int32(2)
  14377. size = int32(2)
  14378. } else {
  14379. width = int32(4)
  14380. size = int32(4)
  14381. }
  14382. }
  14383. chars = bp + 1028
  14384. if libc.Uint64FromInt32(nglyphs*size) > uint64(4096) {
  14385. chars = libc.Xmalloc(tls, libc.Uint64FromInt32(nglyphs*size))
  14386. if !(chars != 0) {
  14387. goto bail1
  14388. }
  14389. }
  14390. char8 = chars
  14391. char16 = chars
  14392. char32 = chars
  14393. i = 0
  14394. for {
  14395. if !(i < nglyphs) {
  14396. break
  14397. }
  14398. wire = uint64(*(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)))
  14399. if wire >= libc.Uint64FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(wire)*8)) != 0) {
  14400. wire = uint64(0)
  14401. }
  14402. switch width {
  14403. case int32(1):
  14404. *(*uint8)(unsafe.Pointer(char8 + uintptr(i))) = uint8(wire)
  14405. case int32(2):
  14406. *(*uint16)(unsafe.Pointer(char16 + uintptr(i)*2)) = uint16(wire)
  14407. case int32(4):
  14408. *(*uint32)(unsafe.Pointer(char32 + uintptr(i)*4)) = uint32(wire)
  14409. break
  14410. }
  14411. goto _2
  14412. _2:
  14413. ;
  14414. i++
  14415. }
  14416. switch width {
  14417. case int32(1):
  14418. fallthrough
  14419. default:
  14420. libxrender.XXRenderCompositeString8(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, srcx, srcy, x, y, char8, nglyphs)
  14421. case int32(2):
  14422. libxrender.XXRenderCompositeString16(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, srcx, srcy, x, y, char16, nglyphs)
  14423. case int32(4):
  14424. libxrender.XXRenderCompositeString32(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, srcx, srcy, x, y, char32, nglyphs)
  14425. break
  14426. }
  14427. if chars != bp+1028 {
  14428. libc.Xfree(tls, chars)
  14429. }
  14430. goto bail1
  14431. bail1:
  14432. ;
  14433. if glyphs_loaded != 0 {
  14434. X_XftFontManageMemory(tls, dpy, pub)
  14435. }
  14436. }
  14437. func XXftGlyphSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, glyphs uintptr, nglyphs int32) {
  14438. bp := tls.Alloc(9232)
  14439. defer tls.Free(9232)
  14440. var char16, char32, char8, chars, elts, font, glyph, v4, v7 uintptr
  14441. var g, max TFT_UInt
  14442. var glyphs_loaded TFcBool
  14443. var i, j, n, nelt, size, width, x, y, v3, v5 int32
  14444. var _ /* char_local at bp+1028 */ [1024]uint32
  14445. var _ /* elts_local at bp+5128 */ [128]TXGlyphElt8
  14446. var _ /* missing at bp+0 */ [256]TFT_UInt
  14447. var _ /* nmissing at bp+1024 */ int32
  14448. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = char16, char32, char8, chars, elts, font, g, glyph, glyphs_loaded, i, j, max, n, nelt, size, width, x, y, v3, v4, v5, v7
  14449. font = pub
  14450. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  14451. return
  14452. }
  14453. if !(nglyphs != 0) {
  14454. return
  14455. }
  14456. /*
  14457. * Load missing glyphs
  14458. */
  14459. max = uint32(0)
  14460. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  14461. glyphs_loaded = m_FcFalse
  14462. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs))).Fglyph
  14463. i = 0
  14464. for {
  14465. if !(i < nglyphs) {
  14466. break
  14467. }
  14468. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  14469. if g > max {
  14470. max = g
  14471. }
  14472. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  14473. glyphs_loaded = int32(m_FcTrue)
  14474. }
  14475. goto _1
  14476. _1:
  14477. ;
  14478. i++
  14479. }
  14480. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  14481. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  14482. }
  14483. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  14484. goto bail1
  14485. }
  14486. /*
  14487. * See what encoding size is needed
  14488. */
  14489. if max < uint32(0x100) {
  14490. size = int32(1)
  14491. width = int32(1)
  14492. } else {
  14493. if max < uint32(0x10000) {
  14494. size = int32(2)
  14495. width = int32(2)
  14496. } else {
  14497. size = int32(4)
  14498. width = int32(4)
  14499. }
  14500. }
  14501. chars = bp + 1028
  14502. if nglyphs*size > int32(m_NUM_LOCAL) {
  14503. chars = libc.Xmalloc(tls, libc.Uint64FromInt32(nglyphs*size))
  14504. if !(chars != 0) {
  14505. goto bail1
  14506. }
  14507. }
  14508. char8 = chars
  14509. char16 = chars
  14510. char32 = chars
  14511. /*
  14512. * Compute the number of glyph elts needed
  14513. */
  14514. nelt = int32(1)
  14515. i = 0
  14516. for {
  14517. if !(i < nglyphs) {
  14518. break
  14519. }
  14520. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  14521. /* Substitute default for non-existant glyphs */
  14522. if g >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0) {
  14523. g = uint32(0)
  14524. }
  14525. if *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0 {
  14526. break
  14527. }
  14528. goto _2
  14529. _2:
  14530. ;
  14531. i++
  14532. }
  14533. if i == nglyphs {
  14534. goto bail2
  14535. }
  14536. glyph = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8))
  14537. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  14538. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  14539. for {
  14540. i++
  14541. v3 = i
  14542. if !(v3 < nglyphs) {
  14543. break
  14544. }
  14545. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  14546. /* Substitute default for non-existant glyphs */
  14547. if g >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0) {
  14548. g = uint32(0)
  14549. }
  14550. /*
  14551. * check to see if the glyph is placed where it would
  14552. * fall using the normal spacing
  14553. */
  14554. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8))
  14555. glyph = v4
  14556. if v4 != 0 {
  14557. if x != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) || y != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) {
  14558. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx)
  14559. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy)
  14560. nelt++
  14561. }
  14562. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  14563. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  14564. }
  14565. }
  14566. elts = bp + 5128
  14567. if nelt > int32(m_NUM_ELT_LOCAL) {
  14568. elts = libc.Xmalloc(tls, libc.Uint64FromInt32(nelt)*uint64(32))
  14569. if !(elts != 0) {
  14570. goto bail2
  14571. }
  14572. }
  14573. /*
  14574. * Generate the list of glyph elts
  14575. */
  14576. nelt = 0
  14577. v5 = libc.Int32FromInt32(0)
  14578. y = v5
  14579. x = v5
  14580. n = 0
  14581. j = 0
  14582. i = 0
  14583. for {
  14584. if !(i < nglyphs) {
  14585. break
  14586. }
  14587. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  14588. /* Substitute default for non-existant glyphs */
  14589. if g >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0) {
  14590. g = uint32(0)
  14591. }
  14592. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8))
  14593. glyph = v7
  14594. if v7 != 0 {
  14595. if !(i != 0) || x != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) || y != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) {
  14596. if n != 0 {
  14597. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  14598. nelt++
  14599. }
  14600. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fglyphset = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset
  14601. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fchars = char8 + uintptr(size*j)
  14602. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FxOff = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) - x
  14603. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FyOff = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) - y
  14604. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx)
  14605. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy)
  14606. n = 0
  14607. }
  14608. switch width {
  14609. case int32(1):
  14610. *(*uint8)(unsafe.Pointer(char8 + uintptr(j))) = uint8(g)
  14611. case int32(2):
  14612. *(*uint16)(unsafe.Pointer(char16 + uintptr(j)*2)) = uint16(g)
  14613. case int32(4):
  14614. *(*uint32)(unsafe.Pointer(char32 + uintptr(j)*4)) = g
  14615. break
  14616. }
  14617. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  14618. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  14619. j++
  14620. n++
  14621. }
  14622. goto _6
  14623. _6:
  14624. ;
  14625. i++
  14626. }
  14627. if n != 0 {
  14628. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  14629. nelt++
  14630. }
  14631. switch width {
  14632. case int32(1):
  14633. libxrender.XXRenderCompositeText8(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, srcx, srcy, int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs))).Fx), int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs))).Fy), elts, nelt)
  14634. case int32(2):
  14635. libxrender.XXRenderCompositeText16(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, srcx, srcy, int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs))).Fx), int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs))).Fy), elts, nelt)
  14636. case int32(4):
  14637. libxrender.XXRenderCompositeText32(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, srcx, srcy, int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs))).Fx), int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs))).Fy), elts, nelt)
  14638. break
  14639. }
  14640. if elts != bp+5128 {
  14641. libc.Xfree(tls, elts)
  14642. }
  14643. goto bail2
  14644. bail2:
  14645. ;
  14646. if chars != bp+1028 {
  14647. libc.Xfree(tls, chars)
  14648. }
  14649. goto bail1
  14650. bail1:
  14651. ;
  14652. if glyphs_loaded != 0 {
  14653. X_XftFontManageMemory(tls, dpy, pub)
  14654. }
  14655. }
  14656. func XXftCharSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, chars uintptr, len1 int32) {
  14657. bp := tls.Alloc(8192)
  14658. defer tls.Free(8192)
  14659. var glyphs uintptr
  14660. var i int32
  14661. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphSpec
  14662. _, _ = glyphs, i
  14663. if len1 <= int32(m_NUM_LOCAL) {
  14664. glyphs = bp
  14665. } else {
  14666. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(8))
  14667. if !(glyphs != 0) {
  14668. return
  14669. }
  14670. }
  14671. i = 0
  14672. for {
  14673. if !(i < len1) {
  14674. break
  14675. }
  14676. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph = XXftCharIndex(tls, dpy, pub, (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fucs4)
  14677. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fx
  14678. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fy
  14679. goto _1
  14680. _1:
  14681. ;
  14682. i++
  14683. }
  14684. XXftGlyphSpecRender(tls, dpy, op, src, pub, dst, srcx, srcy, glyphs, len1)
  14685. if glyphs != bp {
  14686. libc.Xfree(tls, glyphs)
  14687. }
  14688. }
  14689. /*
  14690. * Choose which format to draw text in when drawing with fonts
  14691. * of different formats. The trick is that ARGB formats aren't
  14692. * compatible with A formats as PictOpAdd does the wrong thing, so
  14693. * fall back to an A format when presented with an ARGB and A format
  14694. */
  14695. func _XftPreferFormat(tls *libc.TLS, dpy uintptr, a uintptr, b uintptr) (r uintptr) {
  14696. var prefer uintptr
  14697. _ = prefer
  14698. prefer = libc.UintptrFromInt32(0)
  14699. if a == b {
  14700. prefer = a
  14701. } else {
  14702. if libc.BoolInt32((*TXRenderPictFormat)(unsafe.Pointer(a)).Fdepth == int32(32)) != libc.BoolInt32((*TXRenderPictFormat)(unsafe.Pointer(b)).Fdepth == int32(32)) {
  14703. prefer = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA8))
  14704. } else {
  14705. if (*TXRenderPictFormat)(unsafe.Pointer(a)).Fdepth > (*TXRenderPictFormat)(unsafe.Pointer(b)).Fdepth {
  14706. prefer = a
  14707. } else {
  14708. prefer = b
  14709. }
  14710. }
  14711. }
  14712. return prefer
  14713. }
  14714. func XXftGlyphFontSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, dst TPicture, srcx int32, srcy int32, glyphs uintptr, nglyphs int32) {
  14715. bp := tls.Alloc(9232)
  14716. defer tls.Free(9232)
  14717. var char16, char32, char8, chars, elts, firstFont, font, font1, font2, font3, format, glyph, prevPublic, pub, pub1, pub2, pub3, v4, v7 uintptr
  14718. var g, max TFT_UInt
  14719. var glyphs_loaded TFcBool
  14720. var i, j, n, nelt, size, width, x, y, v3, v5 int32
  14721. var _ /* char_local at bp+1028 */ [1024]uint32
  14722. var _ /* elts_local at bp+5128 */ [128]TXGlyphElt8
  14723. var _ /* missing at bp+0 */ [256]TFT_UInt
  14724. var _ /* nmissing at bp+1024 */ int32
  14725. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = char16, char32, char8, chars, elts, firstFont, font, font1, font2, font3, format, g, glyph, glyphs_loaded, i, j, max, n, nelt, prevPublic, pub, pub1, pub2, pub3, size, width, x, y, v3, v4, v5, v7
  14726. if !(nglyphs != 0) {
  14727. return
  14728. }
  14729. /*
  14730. * Load missing glyphs. Have to load them
  14731. * one at a time in case the font changes
  14732. */
  14733. max = uint32(0)
  14734. glyphs_loaded = m_FcFalse
  14735. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fglyph
  14736. i = 0
  14737. for {
  14738. if !(i < nglyphs) {
  14739. break
  14740. }
  14741. pub = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  14742. font = pub
  14743. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  14744. if g > max {
  14745. max = g
  14746. }
  14747. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  14748. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  14749. glyphs_loaded = int32(m_FcTrue)
  14750. }
  14751. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  14752. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  14753. }
  14754. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  14755. goto bail1
  14756. }
  14757. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  14758. goto bail1
  14759. }
  14760. goto _1
  14761. _1:
  14762. ;
  14763. i++
  14764. }
  14765. /*
  14766. * See what encoding size is needed
  14767. */
  14768. if max < uint32(0x100) {
  14769. size = int32(1)
  14770. width = int32(1)
  14771. } else {
  14772. if max < uint32(0x10000) {
  14773. size = int32(2)
  14774. width = int32(2)
  14775. } else {
  14776. size = int32(4)
  14777. width = int32(4)
  14778. }
  14779. }
  14780. chars = bp + 1028
  14781. if nglyphs*size > int32(m_NUM_LOCAL) {
  14782. chars = libc.Xmalloc(tls, libc.Uint64FromInt32(nglyphs*size))
  14783. if !(chars != 0) {
  14784. goto bail1
  14785. }
  14786. }
  14787. char8 = chars
  14788. char16 = chars
  14789. char32 = chars
  14790. /*
  14791. * Compute the number of glyph elts needed
  14792. */
  14793. nelt = int32(1)
  14794. firstFont = libc.UintptrFromInt32(0)
  14795. i = 0
  14796. for {
  14797. if !(i < nglyphs) {
  14798. break
  14799. }
  14800. pub1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  14801. font1 = pub1
  14802. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  14803. /* Substitute default for non-existant glyphs */
  14804. if g >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font1)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(g)*8)) != 0) {
  14805. g = uint32(0)
  14806. }
  14807. if *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(g)*8)) != 0 {
  14808. firstFont = font1
  14809. break
  14810. }
  14811. goto _2
  14812. _2:
  14813. ;
  14814. i++
  14815. }
  14816. if i == nglyphs || !(firstFont != 0) {
  14817. goto bail2
  14818. }
  14819. glyph = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(firstFont)).Fglyphs + uintptr(g)*8))
  14820. format = (*TXftFontInt)(unsafe.Pointer(firstFont)).Fformat
  14821. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  14822. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  14823. prevPublic = libc.UintptrFromInt32(0)
  14824. for {
  14825. i++
  14826. v3 = i
  14827. if !(v3 < nglyphs) {
  14828. break
  14829. }
  14830. pub2 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  14831. font2 = pub2
  14832. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  14833. /* Substitute default for non-existant glyphs */
  14834. if g >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font2)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font2)).Fglyphs + uintptr(g)*8)) != 0) {
  14835. g = uint32(0)
  14836. }
  14837. /*
  14838. * check to see if the glyph is placed where it would
  14839. * fall using the normal spacing
  14840. */
  14841. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font2)).Fglyphs + uintptr(g)*8))
  14842. glyph = v4
  14843. if v4 != 0 {
  14844. if pub2 != prevPublic || x != int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) || y != int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) {
  14845. prevPublic = pub2
  14846. if (*TXftFontInt)(unsafe.Pointer(font2)).Fformat != format {
  14847. format = _XftPreferFormat(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font2)).Fformat, format)
  14848. }
  14849. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx)
  14850. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy)
  14851. nelt++
  14852. }
  14853. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  14854. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  14855. }
  14856. }
  14857. elts = bp + 5128
  14858. if nelt > int32(m_NUM_ELT_LOCAL) {
  14859. elts = libc.Xmalloc(tls, libc.Uint64FromInt32(nelt)*uint64(32))
  14860. if !(elts != 0) {
  14861. goto bail2
  14862. }
  14863. }
  14864. /*
  14865. * Generate the list of glyph elts
  14866. */
  14867. nelt = 0
  14868. v5 = libc.Int32FromInt32(0)
  14869. y = v5
  14870. x = v5
  14871. n = 0
  14872. j = 0
  14873. prevPublic = libc.UintptrFromInt32(0)
  14874. i = 0
  14875. for {
  14876. if !(i < nglyphs) {
  14877. break
  14878. }
  14879. pub3 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  14880. font3 = pub3
  14881. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  14882. /* Substitute default for non-existant glyphs */
  14883. if g >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font3)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font3)).Fglyphs + uintptr(g)*8)) != 0) {
  14884. g = uint32(0)
  14885. }
  14886. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font3)).Fglyphs + uintptr(g)*8))
  14887. glyph = v7
  14888. if v7 != 0 {
  14889. if !(i != 0) || pub3 != prevPublic || x != int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) || y != int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) {
  14890. if n != 0 {
  14891. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  14892. nelt++
  14893. }
  14894. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fglyphset = (*TXftFontInt)(unsafe.Pointer(font3)).Fglyphset
  14895. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fchars = char8 + uintptr(size*j)
  14896. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FxOff = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) - x
  14897. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FyOff = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) - y
  14898. prevPublic = pub3
  14899. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx)
  14900. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy)
  14901. n = 0
  14902. }
  14903. switch width {
  14904. case int32(1):
  14905. *(*uint8)(unsafe.Pointer(char8 + uintptr(j))) = uint8(g)
  14906. case int32(2):
  14907. *(*uint16)(unsafe.Pointer(char16 + uintptr(j)*2)) = uint16(g)
  14908. case int32(4):
  14909. *(*uint32)(unsafe.Pointer(char32 + uintptr(j)*4)) = g
  14910. break
  14911. }
  14912. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  14913. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  14914. j++
  14915. n++
  14916. }
  14917. goto _6
  14918. _6:
  14919. ;
  14920. i++
  14921. }
  14922. if n != 0 {
  14923. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  14924. nelt++
  14925. }
  14926. switch width {
  14927. case int32(1):
  14928. libxrender.XXRenderCompositeText8(tls, dpy, op, src, dst, format, srcx, srcy, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fx), int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fy), elts, nelt)
  14929. case int32(2):
  14930. libxrender.XXRenderCompositeText16(tls, dpy, op, src, dst, format, srcx, srcy, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fx), int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fy), elts, nelt)
  14931. case int32(4):
  14932. libxrender.XXRenderCompositeText32(tls, dpy, op, src, dst, format, srcx, srcy, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fx), int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fy), elts, nelt)
  14933. break
  14934. }
  14935. if elts != bp+5128 {
  14936. libc.Xfree(tls, elts)
  14937. }
  14938. goto bail2
  14939. bail2:
  14940. ;
  14941. if chars != bp+1028 {
  14942. libc.Xfree(tls, chars)
  14943. }
  14944. goto bail1
  14945. bail1:
  14946. ;
  14947. if glyphs_loaded != 0 {
  14948. i = 0
  14949. for {
  14950. if !(i < nglyphs) {
  14951. break
  14952. }
  14953. X_XftFontManageMemory(tls, dpy, (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)
  14954. goto _8
  14955. _8:
  14956. ;
  14957. i++
  14958. }
  14959. }
  14960. }
  14961. func XXftCharFontSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, dst TPicture, srcx int32, srcy int32, chars uintptr, len1 int32) {
  14962. bp := tls.Alloc(16384)
  14963. defer tls.Free(16384)
  14964. var glyphs uintptr
  14965. var i int32
  14966. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphFontSpec
  14967. _, _ = glyphs, i
  14968. if len1 <= int32(m_NUM_LOCAL) {
  14969. glyphs = bp
  14970. } else {
  14971. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(16))
  14972. if !(glyphs != 0) {
  14973. return
  14974. }
  14975. }
  14976. i = 0
  14977. for {
  14978. if !(i < len1) {
  14979. break
  14980. }
  14981. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Ffont
  14982. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph = XXftCharIndex(tls, dpy, (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont, (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fucs4)
  14983. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fx
  14984. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fy
  14985. goto _1
  14986. _1:
  14987. ;
  14988. i++
  14989. }
  14990. XXftGlyphFontSpecRender(tls, dpy, op, src, dst, srcx, srcy, glyphs, len1)
  14991. if glyphs != bp {
  14992. libc.Xfree(tls, glyphs)
  14993. }
  14994. }
  14995. func XXftTextRender8(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, x int32, y int32, string1 uintptr, len1 int32) {
  14996. bp := tls.Alloc(4096)
  14997. defer tls.Free(4096)
  14998. var glyphs uintptr
  14999. var i int32
  15000. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15001. _, _ = glyphs, i
  15002. if len1 <= int32(m_NUM_LOCAL) {
  15003. glyphs = bp
  15004. } else {
  15005. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  15006. if !(glyphs != 0) {
  15007. return
  15008. }
  15009. }
  15010. i = 0
  15011. for {
  15012. if !(i < len1) {
  15013. break
  15014. }
  15015. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  15016. goto _1
  15017. _1:
  15018. ;
  15019. i++
  15020. }
  15021. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  15022. if glyphs != bp {
  15023. libc.Xfree(tls, glyphs)
  15024. }
  15025. }
  15026. func XXftTextRender16(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, x int32, y int32, string1 uintptr, len1 int32) {
  15027. bp := tls.Alloc(4096)
  15028. defer tls.Free(4096)
  15029. var glyphs uintptr
  15030. var i int32
  15031. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15032. _, _ = glyphs, i
  15033. if len1 <= int32(m_NUM_LOCAL) {
  15034. glyphs = bp
  15035. } else {
  15036. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  15037. if !(glyphs != 0) {
  15038. return
  15039. }
  15040. }
  15041. i = 0
  15042. for {
  15043. if !(i < len1) {
  15044. break
  15045. }
  15046. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  15047. goto _1
  15048. _1:
  15049. ;
  15050. i++
  15051. }
  15052. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  15053. if glyphs != bp {
  15054. libc.Xfree(tls, glyphs)
  15055. }
  15056. }
  15057. func XXftTextRender16BE(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, x int32, y int32, string1 uintptr, len1 int32) {
  15058. bp := tls.Alloc(4096)
  15059. defer tls.Free(4096)
  15060. var glyphs uintptr
  15061. var i int32
  15062. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15063. _, _ = glyphs, i
  15064. if len1 <= int32(m_NUM_LOCAL) {
  15065. glyphs = bp
  15066. } else {
  15067. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  15068. if !(glyphs != 0) {
  15069. return
  15070. }
  15071. }
  15072. i = 0
  15073. for {
  15074. if !(i < len1) {
  15075. break
  15076. }
  15077. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, libc.Uint32FromInt32(libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(2)))))<<int32(8)|libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(2)+int32(1)))))))
  15078. goto _1
  15079. _1:
  15080. ;
  15081. i++
  15082. }
  15083. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  15084. if glyphs != bp {
  15085. libc.Xfree(tls, glyphs)
  15086. }
  15087. }
  15088. func XXftTextRender16LE(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, x int32, y int32, string1 uintptr, len1 int32) {
  15089. bp := tls.Alloc(4096)
  15090. defer tls.Free(4096)
  15091. var glyphs uintptr
  15092. var i int32
  15093. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15094. _, _ = glyphs, i
  15095. if len1 <= int32(m_NUM_LOCAL) {
  15096. glyphs = bp
  15097. } else {
  15098. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  15099. if !(glyphs != 0) {
  15100. return
  15101. }
  15102. }
  15103. i = 0
  15104. for {
  15105. if !(i < len1) {
  15106. break
  15107. }
  15108. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, libc.Uint32FromInt32(libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(2)))))|libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(2)+int32(1)))))<<int32(8)))
  15109. goto _1
  15110. _1:
  15111. ;
  15112. i++
  15113. }
  15114. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  15115. if glyphs != bp {
  15116. libc.Xfree(tls, glyphs)
  15117. }
  15118. }
  15119. func XXftTextRender32(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, x int32, y int32, string1 uintptr, len1 int32) {
  15120. bp := tls.Alloc(4096)
  15121. defer tls.Free(4096)
  15122. var glyphs uintptr
  15123. var i int32
  15124. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15125. _, _ = glyphs, i
  15126. if len1 <= int32(m_NUM_LOCAL) {
  15127. glyphs = bp
  15128. } else {
  15129. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  15130. if !(glyphs != 0) {
  15131. return
  15132. }
  15133. }
  15134. i = 0
  15135. for {
  15136. if !(i < len1) {
  15137. break
  15138. }
  15139. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  15140. goto _1
  15141. _1:
  15142. ;
  15143. i++
  15144. }
  15145. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  15146. if glyphs != bp {
  15147. libc.Xfree(tls, glyphs)
  15148. }
  15149. }
  15150. func XXftTextRender32BE(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, x int32, y int32, string1 uintptr, len1 int32) {
  15151. bp := tls.Alloc(4096)
  15152. defer tls.Free(4096)
  15153. var glyphs uintptr
  15154. var i int32
  15155. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15156. _, _ = glyphs, i
  15157. if len1 <= int32(m_NUM_LOCAL) {
  15158. glyphs = bp
  15159. } else {
  15160. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  15161. if !(glyphs != 0) {
  15162. return
  15163. }
  15164. }
  15165. i = 0
  15166. for {
  15167. if !(i < len1) {
  15168. break
  15169. }
  15170. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, libc.Uint32FromInt32(libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)))))<<int32(24)|libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)+int32(1)))))<<int32(16)|libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)+int32(2)))))<<int32(8)|libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)+int32(3)))))))
  15171. goto _1
  15172. _1:
  15173. ;
  15174. i++
  15175. }
  15176. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  15177. if glyphs != bp {
  15178. libc.Xfree(tls, glyphs)
  15179. }
  15180. }
  15181. func XXftTextRender32LE(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, x int32, y int32, string1 uintptr, len1 int32) {
  15182. bp := tls.Alloc(4096)
  15183. defer tls.Free(4096)
  15184. var glyphs uintptr
  15185. var i int32
  15186. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15187. _, _ = glyphs, i
  15188. if len1 <= int32(m_NUM_LOCAL) {
  15189. glyphs = bp
  15190. } else {
  15191. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  15192. if !(glyphs != 0) {
  15193. return
  15194. }
  15195. }
  15196. i = 0
  15197. for {
  15198. if !(i < len1) {
  15199. break
  15200. }
  15201. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, libc.Uint32FromInt32(libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)))))|libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)+int32(1)))))<<int32(8)|libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)+int32(2)))))<<int32(16)|libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)+int32(3)))))<<int32(24)))
  15202. goto _1
  15203. _1:
  15204. ;
  15205. i++
  15206. }
  15207. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  15208. if glyphs != bp {
  15209. libc.Xfree(tls, glyphs)
  15210. }
  15211. }
  15212. func XXftTextRenderUtf8(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, x int32, y int32, string1 uintptr, len1 int32) {
  15213. bp := tls.Alloc(4112)
  15214. defer tls.Free(4112)
  15215. var glyphs, glyphs_new uintptr
  15216. var i, l, size, v1, v3 int32
  15217. var v2 bool
  15218. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15219. var _ /* ucs4 at bp+4096 */ TFcChar32
  15220. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  15221. i = 0
  15222. glyphs = bp
  15223. size = int32(m_NUM_LOCAL)
  15224. for {
  15225. if v2 = len1 != 0; v2 {
  15226. v1 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  15227. l = v1
  15228. }
  15229. if !(v2 && v1 > 0) {
  15230. break
  15231. }
  15232. if i == size {
  15233. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*int32(2))*uint64(4))
  15234. if !(glyphs_new != 0) {
  15235. if glyphs != bp {
  15236. libc.Xfree(tls, glyphs)
  15237. }
  15238. return
  15239. }
  15240. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  15241. size *= int32(2)
  15242. if glyphs != bp {
  15243. libc.Xfree(tls, glyphs)
  15244. }
  15245. glyphs = glyphs_new
  15246. }
  15247. v3 = i
  15248. i++
  15249. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  15250. string1 += uintptr(l)
  15251. len1 -= l
  15252. }
  15253. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, i)
  15254. if glyphs != bp {
  15255. libc.Xfree(tls, glyphs)
  15256. }
  15257. }
  15258. func XXftTextRenderUtf16(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, x int32, y int32, string1 uintptr, endian TFcEndian, len1 int32) {
  15259. bp := tls.Alloc(4112)
  15260. defer tls.Free(4112)
  15261. var glyphs, glyphs_new uintptr
  15262. var i, l, size, v1, v3 int32
  15263. var v2 bool
  15264. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  15265. var _ /* ucs4 at bp+4096 */ TFcChar32
  15266. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  15267. i = 0
  15268. glyphs = bp
  15269. size = int32(m_NUM_LOCAL)
  15270. for {
  15271. if v2 = len1 != 0; v2 {
  15272. v1 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  15273. l = v1
  15274. }
  15275. if !(v2 && v1 > 0) {
  15276. break
  15277. }
  15278. if i == size {
  15279. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*int32(2))*uint64(4))
  15280. if !(glyphs_new != 0) {
  15281. if glyphs != bp {
  15282. libc.Xfree(tls, glyphs)
  15283. }
  15284. return
  15285. }
  15286. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  15287. size *= int32(2)
  15288. if glyphs != bp {
  15289. libc.Xfree(tls, glyphs)
  15290. }
  15291. glyphs = glyphs_new
  15292. }
  15293. v3 = i
  15294. i++
  15295. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  15296. string1 += uintptr(l)
  15297. len1 -= l
  15298. }
  15299. XXftGlyphRender(tls, dpy, int32(m_PictOpOver), src, pub, dst, srcx, srcy, x, y, glyphs, i)
  15300. if glyphs != bp {
  15301. libc.Xfree(tls, glyphs)
  15302. }
  15303. }
  15304. /* xftxlfd.c */
  15305. func X_XftMatchSymbolic(tls *libc.TLS, s uintptr, n int32, name uintptr, def int32) (r int32) {
  15306. var v1 int32
  15307. _ = v1
  15308. for {
  15309. v1 = n
  15310. n--
  15311. if !(v1 != 0) {
  15312. break
  15313. }
  15314. if !(libfontconfig.XFcStrCmpIgnoreCase(tls, (*TXftSymbolic)(unsafe.Pointer(s)).Fname, name) != 0) {
  15315. return (*TXftSymbolic)(unsafe.Pointer(s)).Fvalue
  15316. }
  15317. s += 16
  15318. }
  15319. return def
  15320. }
  15321. /* xftxlfd.c */
  15322. func XXftNativeByteOrder(tls *libc.TLS) (r int32) {
  15323. bp := tls.Alloc(16)
  15324. defer tls.Free(16)
  15325. var _ /* whichbyte at bp+0 */ int32
  15326. *(*int32)(unsafe.Pointer(bp)) = int32(1)
  15327. if *(*uint8)(unsafe.Pointer(bp)) != 0 {
  15328. return m_LSBFirst
  15329. }
  15330. return int32(m_MSBFirst)
  15331. }
  15332. /* byte swap a 32-bit value */
  15333. /* byte swap a short */
  15334. /* byte swap a three-byte unit */
  15335. func XXftSwapCARD32(tls *libc.TLS, data uintptr, u int32) {
  15336. var n uint8
  15337. var v1 int32
  15338. _, _ = n, v1
  15339. for {
  15340. v1 = u
  15341. u--
  15342. if !(v1 != 0) {
  15343. break
  15344. }
  15345. n = *(*uint8)(unsafe.Pointer(data))
  15346. *(*uint8)(unsafe.Pointer(data)) = *(*uint8)(unsafe.Pointer(data + 3))
  15347. *(*uint8)(unsafe.Pointer(data + 3)) = n
  15348. n = *(*uint8)(unsafe.Pointer(data + 1))
  15349. *(*uint8)(unsafe.Pointer(data + 1)) = *(*uint8)(unsafe.Pointer(data + 2))
  15350. *(*uint8)(unsafe.Pointer(data + 2)) = n
  15351. data += 4
  15352. }
  15353. }
  15354. func XXftSwapCARD24(tls *libc.TLS, data uintptr, width int32, height int32) {
  15355. var d uintptr
  15356. var n uint8
  15357. var u, units, v1, v2 int32
  15358. _, _, _, _, _, _ = d, n, u, units, v1, v2
  15359. units = width / int32(3)
  15360. for {
  15361. v1 = height
  15362. height--
  15363. if !(v1 != 0) {
  15364. break
  15365. }
  15366. d = data
  15367. data += uintptr(width)
  15368. u = units
  15369. for {
  15370. v2 = u
  15371. u--
  15372. if !(v2 != 0) {
  15373. break
  15374. }
  15375. n = *(*uint8)(unsafe.Pointer(d))
  15376. *(*uint8)(unsafe.Pointer(d)) = *(*uint8)(unsafe.Pointer(d + 2))
  15377. *(*uint8)(unsafe.Pointer(d + 2)) = n
  15378. d += uintptr(3)
  15379. }
  15380. }
  15381. }
  15382. func XXftSwapCARD16(tls *libc.TLS, data uintptr, u int32) {
  15383. var n uint8
  15384. var v1 int32
  15385. _, _ = n, v1
  15386. for {
  15387. v1 = u
  15388. u--
  15389. if !(v1 != 0) {
  15390. break
  15391. }
  15392. n = *(*uint8)(unsafe.Pointer(data))
  15393. *(*uint8)(unsafe.Pointer(data)) = *(*uint8)(unsafe.Pointer(data + 1))
  15394. *(*uint8)(unsafe.Pointer(data + 1)) = n
  15395. data += 2
  15396. }
  15397. }
  15398. func XXftSwapImage(tls *libc.TLS, image uintptr) {
  15399. switch (*TXImage)(unsafe.Pointer(image)).Fbits_per_pixel {
  15400. case int32(32):
  15401. XXftSwapCARD32(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fheight*(*TXImage)(unsafe.Pointer(image)).Fbytes_per_line>>int32(2))
  15402. case int32(24):
  15403. XXftSwapCARD24(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line, (*TXImage)(unsafe.Pointer(image)).Fheight)
  15404. case int32(16):
  15405. XXftSwapCARD16(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fheight*(*TXImage)(unsafe.Pointer(image)).Fbytes_per_line>>int32(1))
  15406. default:
  15407. break
  15408. }
  15409. }
  15410. /* xftxlfd.c */
  15411. var _XftXlfdWeights = [6]TXftSymbolic{
  15412. 0: {
  15413. Fname: __ccgo_ts + 1746,
  15414. Fvalue: int32(m_FC_WEIGHT_LIGHT),
  15415. },
  15416. 1: {
  15417. Fname: __ccgo_ts + 1752,
  15418. Fvalue: int32(m_FC_WEIGHT_MEDIUM),
  15419. },
  15420. 2: {
  15421. Fname: __ccgo_ts + 1759,
  15422. Fvalue: int32(m_FC_WEIGHT_MEDIUM),
  15423. },
  15424. 3: {
  15425. Fname: __ccgo_ts + 1767,
  15426. Fvalue: int32(m_FC_WEIGHT_DEMIBOLD),
  15427. },
  15428. 4: {
  15429. Fname: __ccgo_ts + 1776,
  15430. Fvalue: int32(m_FC_WEIGHT_BOLD),
  15431. },
  15432. 5: {
  15433. Fname: __ccgo_ts + 1781,
  15434. Fvalue: int32(m_FC_WEIGHT_BLACK),
  15435. },
  15436. }
  15437. var _XftXlfdSlants = [3]TXftSymbolic{
  15438. 0: {
  15439. Fname: __ccgo_ts + 1787,
  15440. },
  15441. 1: {
  15442. Fname: __ccgo_ts + 1789,
  15443. Fvalue: int32(m_FC_SLANT_ITALIC),
  15444. },
  15445. 2: {
  15446. Fname: __ccgo_ts + 1791,
  15447. Fvalue: int32(m_FC_SLANT_OBLIQUE),
  15448. },
  15449. }
  15450. // C documentation
  15451. //
  15452. // /*
  15453. // * Cut out one XLFD field, placing it in 'save' and return
  15454. // * the start of 'save'
  15455. // */
  15456. func _XftSplitStr(tls *libc.TLS, field uintptr, save uintptr) (r uintptr) {
  15457. var c uint8
  15458. var s, v1, v2 uintptr
  15459. _, _, _, _ = c, s, v1, v2
  15460. s = save
  15461. for *(*uint8)(unsafe.Pointer(field)) != 0 {
  15462. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(field))) == int32('-') {
  15463. break
  15464. }
  15465. v1 = field
  15466. field++
  15467. c = *(*uint8)(unsafe.Pointer(v1))
  15468. v2 = save
  15469. save++
  15470. *(*uint8)(unsafe.Pointer(v2)) = c
  15471. }
  15472. *(*uint8)(unsafe.Pointer(save)) = uint8(0)
  15473. return s
  15474. }
  15475. /*
  15476. * convert one XLFD numeric field. Return -1 if the field is '*'
  15477. */
  15478. func _XftGetInt(tls *libc.TLS, ptr uintptr, val uintptr) (r uintptr) {
  15479. var v2 uintptr
  15480. _ = v2
  15481. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(ptr))) == int32('*') {
  15482. *(*int32)(unsafe.Pointer(val)) = -int32(1)
  15483. ptr++
  15484. } else {
  15485. *(*int32)(unsafe.Pointer(val)) = 0
  15486. for {
  15487. if !(libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(ptr))) >= int32('0') && libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(ptr))) <= int32('9')) {
  15488. break
  15489. }
  15490. v2 = ptr
  15491. ptr++
  15492. *(*int32)(unsafe.Pointer(val)) = *(*int32)(unsafe.Pointer(val))*int32(10) + libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) - int32('0')
  15493. goto _1
  15494. _1:
  15495. }
  15496. }
  15497. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(ptr))) == int32('-') {
  15498. return ptr
  15499. }
  15500. return libc.UintptrFromInt32(0)
  15501. }
  15502. func XXftXlfdParse(tls *libc.TLS, xlfd_orig uintptr, ignore_scalable TFcBool, complete TFcBool) (r uintptr) {
  15503. bp := tls.Alloc(16)
  15504. defer tls.Free(16)
  15505. var dpixel float64
  15506. var encoding, family, foundry, pat, registry, save, slant, weight_name, xlfd, v1, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v2, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v3, v30, v31, v32, v33, v34, v4, v5, v6, v7, v8, v9 uintptr
  15507. var slant_value, weight_value int32
  15508. var _ /* pixel at bp+0 */ int32
  15509. var _ /* point at bp+4 */ int32
  15510. var _ /* resx at bp+8 */ int32
  15511. var _ /* resy at bp+12 */ int32
  15512. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = dpixel, encoding, family, foundry, pat, registry, save, slant, slant_value, weight_name, weight_value, xlfd, v1, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v2, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v3, v30, v31, v32, v33, v34, v4, v5, v6, v7, v8, v9
  15513. xlfd = xlfd_orig
  15514. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(xlfd))) != int32('-') {
  15515. return libc.UintptrFromInt32(0)
  15516. }
  15517. xlfd++
  15518. v3 = xlfd
  15519. v2 = v3
  15520. foundry = v2
  15521. v1 = libc.Xstrchr(tls, v2, int32('-'))
  15522. xlfd = v1
  15523. if !(v1 != 0) {
  15524. return libc.UintptrFromInt32(0)
  15525. }
  15526. xlfd++
  15527. v6 = xlfd
  15528. v5 = v6
  15529. family = v5
  15530. v4 = libc.Xstrchr(tls, v5, int32('-'))
  15531. xlfd = v4
  15532. if !(v4 != 0) {
  15533. return libc.UintptrFromInt32(0)
  15534. }
  15535. xlfd++
  15536. v9 = xlfd
  15537. v8 = v9
  15538. weight_name = v8
  15539. v7 = libc.Xstrchr(tls, v8, int32('-'))
  15540. xlfd = v7
  15541. if !(v7 != 0) {
  15542. return libc.UintptrFromInt32(0)
  15543. }
  15544. xlfd++
  15545. v12 = xlfd
  15546. v11 = v12
  15547. slant = v11
  15548. v10 = libc.Xstrchr(tls, v11, int32('-'))
  15549. xlfd = v10
  15550. if !(v10 != 0) {
  15551. return libc.UintptrFromInt32(0)
  15552. }
  15553. xlfd++
  15554. v14 = xlfd
  15555. v13 = libc.Xstrchr(tls, v14, int32('-'))
  15556. xlfd = v13
  15557. if !(v13 != 0) {
  15558. return libc.UintptrFromInt32(0)
  15559. }
  15560. xlfd++
  15561. v16 = xlfd
  15562. v15 = libc.Xstrchr(tls, v16, int32('-'))
  15563. xlfd = v15
  15564. if !(v15 != 0) {
  15565. return libc.UintptrFromInt32(0)
  15566. }
  15567. xlfd++
  15568. v18 = xlfd
  15569. v17 = _XftGetInt(tls, v18, bp)
  15570. xlfd = v17
  15571. if !(v17 != 0) {
  15572. return libc.UintptrFromInt32(0)
  15573. }
  15574. xlfd++
  15575. v20 = xlfd
  15576. v19 = _XftGetInt(tls, v20, bp+4)
  15577. xlfd = v19
  15578. if !(v19 != 0) {
  15579. return libc.UintptrFromInt32(0)
  15580. }
  15581. xlfd++
  15582. v22 = xlfd
  15583. v21 = _XftGetInt(tls, v22, bp+8)
  15584. xlfd = v21
  15585. if !(v21 != 0) {
  15586. return libc.UintptrFromInt32(0)
  15587. }
  15588. xlfd++
  15589. v24 = xlfd
  15590. v23 = _XftGetInt(tls, v24, bp+12)
  15591. xlfd = v23
  15592. if !(v23 != 0) {
  15593. return libc.UintptrFromInt32(0)
  15594. }
  15595. xlfd++
  15596. v26 = xlfd
  15597. v25 = libc.Xstrchr(tls, v26, int32('-'))
  15598. xlfd = v25
  15599. if !(v25 != 0) {
  15600. return libc.UintptrFromInt32(0)
  15601. }
  15602. xlfd++
  15603. v28 = xlfd
  15604. v27 = libc.Xstrchr(tls, v28, int32('-'))
  15605. xlfd = v27
  15606. if !(v27 != 0) {
  15607. return libc.UintptrFromInt32(0)
  15608. }
  15609. xlfd++
  15610. v31 = xlfd
  15611. v30 = v31
  15612. registry = v30
  15613. v29 = libc.Xstrchr(tls, v30, int32('-'))
  15614. xlfd = v29
  15615. if !(v29 != 0) {
  15616. return libc.UintptrFromInt32(0)
  15617. }
  15618. /* make sure no fields follow this one */
  15619. xlfd++
  15620. v34 = xlfd
  15621. v33 = v34
  15622. encoding = v33
  15623. v32 = libc.Xstrchr(tls, v33, int32('-'))
  15624. xlfd = v32
  15625. if v32 != 0 {
  15626. return libc.UintptrFromInt32(0)
  15627. }
  15628. if !(*(*int32)(unsafe.Pointer(bp)) != 0) {
  15629. return libc.UintptrFromInt32(0)
  15630. }
  15631. pat = libfontconfig.XFcPatternCreate(tls)
  15632. if !(pat != 0) {
  15633. return libc.UintptrFromInt32(0)
  15634. }
  15635. save = libc.Xmalloc(tls, libc.Xstrlen(tls, foundry)+uint64(1))
  15636. if !(save != 0) {
  15637. libfontconfig.XFcPatternDestroy(tls, pat)
  15638. return libc.UintptrFromInt32(0)
  15639. }
  15640. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+1736, xlfd_orig) != 0) {
  15641. goto bail
  15642. }
  15643. _XftSplitStr(tls, foundry, save)
  15644. if *(*uint8)(unsafe.Pointer(save)) != 0 && libc.Xstrcmp(tls, save, __ccgo_ts+1793) != 0 {
  15645. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+1795, save) != 0) {
  15646. goto bail
  15647. }
  15648. }
  15649. _XftSplitStr(tls, family, save)
  15650. if *(*uint8)(unsafe.Pointer(save)) != 0 && libc.Xstrcmp(tls, save, __ccgo_ts+1793) != 0 {
  15651. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+1803, save) != 0) {
  15652. goto bail
  15653. }
  15654. }
  15655. weight_value = X_XftMatchSymbolic(tls, uintptr(unsafe.Pointer(&_XftXlfdWeights)), libc.Int32FromUint64(libc.Uint64FromInt64(96)/libc.Uint64FromInt64(16)), _XftSplitStr(tls, weight_name, save), int32(m_FC_WEIGHT_MEDIUM))
  15656. if !(libfontconfig.XFcPatternAddInteger(tls, pat, __ccgo_ts+1810, weight_value) != 0) {
  15657. goto bail
  15658. }
  15659. slant_value = X_XftMatchSymbolic(tls, uintptr(unsafe.Pointer(&_XftXlfdSlants)), libc.Int32FromUint64(libc.Uint64FromInt64(48)/libc.Uint64FromInt64(16)), _XftSplitStr(tls, slant, save), m_FC_SLANT_ROMAN)
  15660. if !(libfontconfig.XFcPatternAddInteger(tls, pat, __ccgo_ts+1817, slant_value) != 0) {
  15661. goto bail
  15662. }
  15663. dpixel = float64(*(*int32)(unsafe.Pointer(bp)))
  15664. if *(*int32)(unsafe.Pointer(bp + 4)) > 0 {
  15665. if !(libfontconfig.XFcPatternAddDouble(tls, pat, __ccgo_ts+1823, float64(*(*int32)(unsafe.Pointer(bp + 4)))/float64(10)) != 0) {
  15666. goto bail
  15667. }
  15668. if *(*int32)(unsafe.Pointer(bp)) <= 0 && *(*int32)(unsafe.Pointer(bp + 12)) > 0 {
  15669. dpixel = float64(float64(*(*int32)(unsafe.Pointer(bp + 4)))*float64(*(*int32)(unsafe.Pointer(bp + 12)))) / float64(720)
  15670. }
  15671. }
  15672. if dpixel > libc.Float64FromInt32(0) {
  15673. if !(libfontconfig.XFcPatternAddDouble(tls, pat, __ccgo_ts+1104, dpixel) != 0) {
  15674. goto bail
  15675. }
  15676. }
  15677. libc.Xfree(tls, save)
  15678. return pat
  15679. goto bail
  15680. bail:
  15681. ;
  15682. libc.Xfree(tls, save)
  15683. libfontconfig.XFcPatternDestroy(tls, pat)
  15684. return libc.UintptrFromInt32(0)
  15685. }
  15686. func __ccgo_fp(f interface{}) uintptr {
  15687. type iface [2]uintptr
  15688. return (*iface)(unsafe.Pointer(&f))[1]
  15689. }
  15690. /* xftxlfd.c */
  15691. var X_XftDisplayInfo uintptr
  15692. /* xftxlfd.c */
  15693. var X_XftFTlibrary TFT_Library
  15694. var __ccgo_ts = (*reflect.StringHeader)(unsafe.Pointer(&__ccgo_ts1)).Data
  15695. var __ccgo_ts1 = "XFT_DEBUG\x00XFT_DEBUG=%s\n\x00XftDisplayInfoGet Default visual 0x%x \x00format %d,%d,%d,%d\n\x00format indexed\n\x00No Render format for default visual\n\x00True\x00False\x00XftDisplayInfoGet initialized, hasRender set to \"%s\"\n\x00maxglyphmemory\x00global max cache memory %ld\n\x00maxunreffonts\x00global max unref fonts %d\n\x00XftDisplayInfoGet failed to initialize, Xft unhappy\n\x00Display glyph cache incorrect has %ld bytes, should have %ld\n\x00Reduce global memory from %ld to %ld\n\x00Xft\x00scale\x00dpi\x00render\x00rgba\x00lcdfilter\x00antialias\x00embolden\x00autohint\x00hintstyle\x00hinting\x00minspace\x00DrawString \"%*.*s\"\n\x00XftFontMatch pattern \x00XftFontMatch after FcConfig substitutions \x00XftFontMatch after X resource substitutions \x00XftFontMatch result \x00XftFontOpen: Invalid pattern argument\n\x00Pattern \x00Match \x00No Match\n\x00No Font\n\x00XftFontOpenName \"%s\": \x00Invalid name\n\x00XftFontOpenXlfd \"%s\": \x00Invalid xlfd\n\x00FontFile %s/%d matches existing (%d)\n\x00FontFile %s/%d matches new\n\x00Discard file %s/%d from cache\n\x00Loading file %s/%d\n\x00Xft: locking error %s\n\x00too many file unlocks\x00Set face size to %dx%d (%dx%d)\n\x00Set face matrix to (%g,%g,%g,%g)\n\x00Attempt to close locked file\x00file\x00index\x00ftface\x00pixelsize\x00aspect\x00<none>\x00XftFontInfoFill: %s: %d (%g pixels)\n\x00matrix\x00embeddedbitmap\x00verticallayout\x00globaladvance\x00spacing\x00charwidth\x00New font %s/%d size %dx%d\n\x00charset\x00freeing unreferenced font %s/%d size %dx%d\n\x00Font glyph cache incorrect has %ld bytes, should have %ld\n\x00Trans %d %d: %d %d\n\x00glyph %d:\n\x00 xywh (%d %d %d %d), trans (%d %d %d %d) wh (%d %d)\n\x00%c\x00|\n\x00\n\x00Caching glyph 0x%x size %ld\n\x00Uncaching glyph 0x%x size %ld\n\x00Reduce memory for font 0x%lx from %ld to %ld\n\x00XftDraw\x00XftFont\x00XftFtFile\x00XftGlyph\x00Xft Memory Usage:\n\x00\t Which Alloc Free\n\x00\t count bytes count bytes\n\x00\t%8.8s%8d%8d%8d%8d\n\x00Total\x00core\x00xlfd\x00lang\x00light\x00medium\x00regular\x00demibold\x00bold\x00black\x00r\x00i\x00o\x00*\x00foundry\x00family\x00weight\x00slant\x00size\x00"