ccgo_linux_arm64.go 543 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892
  1. // Code generated for linux/arm64 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/arm64 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libfreetype/include/linux/arm64 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libX11/include/linux/arm64 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libXrender/include/linux/arm64 -lfontconfig -lfreetype -lX11 -lXrender -o libxft.go --package-name libxft src/.libs/libXft.a', DO NOT EDIT.
  2. //go:build linux && arm64
  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_CLOCKS_PER_SEC = 1000000
  92. const m_CLOCK_BOOTTIME = 7
  93. const m_CLOCK_BOOTTIME_ALARM = 9
  94. const m_CLOCK_MONOTONIC = 1
  95. const m_CLOCK_MONOTONIC_COARSE = 6
  96. const m_CLOCK_MONOTONIC_RAW = 4
  97. const m_CLOCK_PROCESS_CPUTIME_ID = 2
  98. const m_CLOCK_REALTIME = 0
  99. const m_CLOCK_REALTIME_ALARM = 8
  100. const m_CLOCK_REALTIME_COARSE = 5
  101. const m_CLOCK_SGI_CYCLE = 10
  102. const m_CLOCK_TAI = 11
  103. const m_CLOCK_THREAD_CPUTIME_ID = 3
  104. const m_CLONE_CHILD_CLEARTID = 0x00200000
  105. const m_CLONE_CHILD_SETTID = 0x01000000
  106. const m_CLONE_DETACHED = 0x00400000
  107. const m_CLONE_FILES = 0x00000400
  108. const m_CLONE_FS = 0x00000200
  109. const m_CLONE_IO = 0x80000000
  110. const m_CLONE_NEWCGROUP = 0x02000000
  111. const m_CLONE_NEWIPC = 0x08000000
  112. const m_CLONE_NEWNET = 0x40000000
  113. const m_CLONE_NEWNS = 0x00020000
  114. const m_CLONE_NEWPID = 0x20000000
  115. const m_CLONE_NEWTIME = 0x00000080
  116. const m_CLONE_NEWUSER = 0x10000000
  117. const m_CLONE_NEWUTS = 0x04000000
  118. const m_CLONE_PARENT = 0x00008000
  119. const m_CLONE_PARENT_SETTID = 0x00100000
  120. const m_CLONE_PIDFD = 0x00001000
  121. const m_CLONE_PTRACE = 0x00002000
  122. const m_CLONE_SETTLS = 0x00080000
  123. const m_CLONE_SIGHAND = 0x00000800
  124. const m_CLONE_SYSVSEM = 0x00040000
  125. const m_CLONE_THREAD = 0x00010000
  126. const m_CLONE_UNTRACED = 0x00800000
  127. const m_CLONE_VFORK = 0x00004000
  128. const m_CLONE_VM = 0x00000100
  129. const m_COLL_WEIGHTS_MAX = 2
  130. const m_CPLastBit = 12
  131. const m_CPU_SETSIZE = 1024
  132. const m_CSIGNAL = 0x000000ff
  133. const m_CURSORFONT = "cursor"
  134. const m_CapButt = 1
  135. const m_CapNotLast = 0
  136. const m_CapProjecting = 3
  137. const m_CapRound = 2
  138. const m_CenterGravity = 5
  139. const m_CirculateNotify = 26
  140. const m_CirculateRequest = 27
  141. const m_ClientMessage = 33
  142. const m_ClipByChildren = 0
  143. const m_ColormapInstalled = 1
  144. const m_ColormapNotify = 32
  145. const m_ColormapUninstalled = 0
  146. const m_Complex = 0
  147. const m_ConfigureNotify = 22
  148. const m_ConfigureRequest = 23
  149. const m_ControlMapIndex = 2
  150. const m_Convex = 2
  151. const m_CoordModeOrigin = 0
  152. const m_CoordModePrevious = 1
  153. const m_CopyFromParent = 0
  154. const m_CreateNotify = 16
  155. const m_CurrentTime = 0
  156. const m_CursorShape = 0
  157. const m_DELAYTIMER_MAX = 0x7fffffff
  158. const m_DefaultBlanking = 2
  159. const m_DefaultExposures = 2
  160. const m_DestroyAll = 0
  161. const m_DestroyNotify = 17
  162. const m_DirectColor = 5
  163. const m_DisableAccess = 0
  164. const m_DisableScreenInterval = 0
  165. const m_DisableScreenSaver = 0
  166. const m_DontAllowExposures = 0
  167. const m_DontCareState = 0
  168. const m_DontPreferBlanking = 0
  169. const m_E2BIG = 7
  170. const m_EACCES = 13
  171. const m_EADDRINUSE = 98
  172. const m_EADDRNOTAVAIL = 99
  173. const m_EADV = 68
  174. const m_EAFNOSUPPORT = 97
  175. const m_EAGAIN = 11
  176. const m_EALREADY = 114
  177. const m_EBADE = 52
  178. const m_EBADF = 9
  179. const m_EBADFD = 77
  180. const m_EBADMSG = 74
  181. const m_EBADR = 53
  182. const m_EBADRQC = 56
  183. const m_EBADSLT = 57
  184. const m_EBFONT = 59
  185. const m_EBUSY = 16
  186. const m_ECANCELED = 125
  187. const m_ECHILD = 10
  188. const m_ECHRNG = 44
  189. const m_ECOMM = 70
  190. const m_ECONNABORTED = 103
  191. const m_ECONNREFUSED = 111
  192. const m_ECONNRESET = 104
  193. const m_EDEADLK = 35
  194. const m_EDEADLOCK = "EDEADLK"
  195. const m_EDESTADDRREQ = 89
  196. const m_EDOM = 33
  197. const m_EDOTDOT = 73
  198. const m_EDQUOT = 122
  199. const m_EEXIST = 17
  200. const m_EFAULT = 14
  201. const m_EFBIG = 27
  202. const m_EHOSTDOWN = 112
  203. const m_EHOSTUNREACH = 113
  204. const m_EHWPOISON = 133
  205. const m_EIDRM = 43
  206. const m_EILSEQ = 84
  207. const m_EINPROGRESS = 115
  208. const m_EINTR = 4
  209. const m_EINVAL = 22
  210. const m_EIO = 5
  211. const m_EISCONN = 106
  212. const m_EISDIR = 21
  213. const m_EISNAM = 120
  214. const m_EKEYEXPIRED = 127
  215. const m_EKEYREJECTED = 129
  216. const m_EKEYREVOKED = 128
  217. const m_EL2HLT = 51
  218. const m_EL2NSYNC = 45
  219. const m_EL3HLT = 46
  220. const m_EL3RST = 47
  221. const m_ELIBACC = 79
  222. const m_ELIBBAD = 80
  223. const m_ELIBEXEC = 83
  224. const m_ELIBMAX = 82
  225. const m_ELIBSCN = 81
  226. const m_ELNRNG = 48
  227. const m_ELOOP = 40
  228. const m_EMEDIUMTYPE = 124
  229. const m_EMFILE = 24
  230. const m_EMLINK = 31
  231. const m_EMSGSIZE = 90
  232. const m_EMULTIHOP = 72
  233. const m_ENAMETOOLONG = 36
  234. const m_ENAVAIL = 119
  235. const m_ENETDOWN = 100
  236. const m_ENETRESET = 102
  237. const m_ENETUNREACH = 101
  238. const m_ENFILE = 23
  239. const m_ENOANO = 55
  240. const m_ENOBUFS = 105
  241. const m_ENOCSI = 50
  242. const m_ENODATA = 61
  243. const m_ENODEV = 19
  244. const m_ENOENT = 2
  245. const m_ENOEXEC = 8
  246. const m_ENOKEY = 126
  247. const m_ENOLCK = 37
  248. const m_ENOLINK = 67
  249. const m_ENOMEDIUM = 123
  250. const m_ENOMEM = 12
  251. const m_ENOMSG = 42
  252. const m_ENONET = 64
  253. const m_ENOPKG = 65
  254. const m_ENOPROTOOPT = 92
  255. const m_ENOSPC = 28
  256. const m_ENOSR = 63
  257. const m_ENOSTR = 60
  258. const m_ENOSYS = 38
  259. const m_ENOTBLK = 15
  260. const m_ENOTCONN = 107
  261. const m_ENOTDIR = 20
  262. const m_ENOTEMPTY = 39
  263. const m_ENOTNAM = 118
  264. const m_ENOTRECOVERABLE = 131
  265. const m_ENOTSOCK = 88
  266. const m_ENOTSUP = "EOPNOTSUPP"
  267. const m_ENOTTY = 25
  268. const m_ENOTUNIQ = 76
  269. const m_ENXIO = 6
  270. const m_EOPNOTSUPP = 95
  271. const m_EOVERFLOW = 75
  272. const m_EOWNERDEAD = 130
  273. const m_EPERM = 1
  274. const m_EPFNOSUPPORT = 96
  275. const m_EPIPE = 32
  276. const m_EPROTO = 71
  277. const m_EPROTONOSUPPORT = 93
  278. const m_EPROTOTYPE = 91
  279. const m_ERANGE = 34
  280. const m_EREMCHG = 78
  281. const m_EREMOTE = 66
  282. const m_EREMOTEIO = 121
  283. const m_ERESTART = 85
  284. const m_ERFKILL = 132
  285. const m_EROFS = 30
  286. const m_ESHUTDOWN = 108
  287. const m_ESOCKTNOSUPPORT = 94
  288. const m_ESPIPE = 29
  289. const m_ESRCH = 3
  290. const m_ESRMNT = 69
  291. const m_ESTALE = 116
  292. const m_ESTRPIPE = 86
  293. const m_ETIME = 62
  294. const m_ETIMEDOUT = 110
  295. const m_ETOOMANYREFS = 109
  296. const m_ETXTBSY = 26
  297. const m_EUCLEAN = 117
  298. const m_EUNATCH = 49
  299. const m_EUSERS = 87
  300. const m_EWOULDBLOCK = "EAGAIN"
  301. const m_EXDEV = 18
  302. const m_EXFULL = 54
  303. const m_EXIT_FAILURE = 1
  304. const m_EXIT_SUCCESS = 0
  305. const m_EXPR_NEST_MAX = 32
  306. const m_EastGravity = 6
  307. const m_EnableAccess = 1
  308. const m_EnterNotify = 7
  309. const m_EvenOddRule = 0
  310. const m_Expose = 12
  311. const m_FARCSPERBATCH = 256
  312. const m_FC_ANTIALIAS = "antialias"
  313. const m_FC_ASPECT = "aspect"
  314. const m_FC_AUTOHINT = "autohint"
  315. const m_FC_CACHE_VERSION_NUMBER = 8
  316. const m_FC_CAPABILITY = "capability"
  317. const m_FC_CHARCELL = 110
  318. const m_FC_CHARSET = "charset"
  319. const m_FC_CHARWIDTH = "charwidth"
  320. const m_FC_CHAR_HEIGHT = "charheight"
  321. const m_FC_CHAR_WIDTH = "FC_CHARWIDTH"
  322. const m_FC_COLOR = "color"
  323. const m_FC_DECORATIVE = "decorative"
  324. const m_FC_DPI = "dpi"
  325. const m_FC_DUAL = 90
  326. const m_FC_EMBEDDED_BITMAP = "embeddedbitmap"
  327. const m_FC_EMBOLDEN = "embolden"
  328. const m_FC_FAMILY = "family"
  329. const m_FC_FAMILYLANG = "familylang"
  330. const m_FC_FILE = "file"
  331. const m_FC_FONTFORMAT = "fontformat"
  332. const m_FC_FONTVERSION = "fontversion"
  333. const m_FC_FONT_FEATURES = "fontfeatures"
  334. const m_FC_FONT_HAS_HINT = "fonthashint"
  335. const m_FC_FONT_VARIATIONS = "fontvariations"
  336. const m_FC_FOUNDRY = "foundry"
  337. const m_FC_FT_FACE = "ftface"
  338. const m_FC_FULLNAME = "fullname"
  339. const m_FC_FULLNAMELANG = "fullnamelang"
  340. const m_FC_GLOBAL_ADVANCE = "globaladvance"
  341. const m_FC_HASH = "hash"
  342. const m_FC_HINTING = "hinting"
  343. const m_FC_HINT_FULL = 3
  344. const m_FC_HINT_MEDIUM = 2
  345. const m_FC_HINT_NONE = 0
  346. const m_FC_HINT_SLIGHT = 1
  347. const m_FC_HINT_STYLE = "hintstyle"
  348. const m_FC_INDEX = "index"
  349. const m_FC_LANG = "lang"
  350. const m_FC_LCD_DEFAULT = 1
  351. const m_FC_LCD_FILTER = "lcdfilter"
  352. const m_FC_LCD_LEGACY = 3
  353. const m_FC_LCD_LIGHT = 2
  354. const m_FC_LCD_NONE = 0
  355. const m_FC_MAJOR = 2
  356. const m_FC_MATRIX = "matrix"
  357. const m_FC_MINOR = 14
  358. const m_FC_MINSPACE = "minspace"
  359. const m_FC_MONO = 100
  360. const m_FC_NAMELANG = "namelang"
  361. const m_FC_ORDER = "order"
  362. const m_FC_OUTLINE = "outline"
  363. const m_FC_PIXEL_SIZE = "pixelsize"
  364. const m_FC_POSTSCRIPT_NAME = "postscriptname"
  365. const m_FC_PRGNAME = "prgname"
  366. const m_FC_PROPORTIONAL = 0
  367. const m_FC_RASTERIZER = "rasterizer"
  368. const m_FC_REVISION = 1
  369. const m_FC_RGBA = "rgba"
  370. const m_FC_RGBA_BGR = 2
  371. const m_FC_RGBA_NONE = 5
  372. const m_FC_RGBA_RGB = 1
  373. const m_FC_RGBA_UNKNOWN = 0
  374. const m_FC_RGBA_VBGR = 4
  375. const m_FC_RGBA_VRGB = 3
  376. const m_FC_SCALABLE = "scalable"
  377. const m_FC_SCALE = "scale"
  378. const m_FC_SIZE = "size"
  379. const m_FC_SLANT = "slant"
  380. const m_FC_SLANT_ITALIC = 100
  381. const m_FC_SLANT_OBLIQUE = 110
  382. const m_FC_SLANT_ROMAN = 0
  383. const m_FC_SOURCE = "source"
  384. const m_FC_SPACING = "spacing"
  385. const m_FC_STYLE = "style"
  386. const m_FC_STYLELANG = "stylelang"
  387. const m_FC_SYMBOL = "symbol"
  388. const m_FC_UTF8_MAX_LEN = 6
  389. const m_FC_VARIABLE = "variable"
  390. const m_FC_VERTICAL_LAYOUT = "verticallayout"
  391. const m_FC_WEIGHT = "weight"
  392. const m_FC_WEIGHT_BLACK = 210
  393. const m_FC_WEIGHT_BOLD = 200
  394. const m_FC_WEIGHT_BOOK = 75
  395. const m_FC_WEIGHT_DEMIBOLD = 180
  396. const m_FC_WEIGHT_DEMILIGHT = 55
  397. const m_FC_WEIGHT_EXTRABLACK = 215
  398. const m_FC_WEIGHT_EXTRABOLD = 205
  399. const m_FC_WEIGHT_EXTRALIGHT = 40
  400. const m_FC_WEIGHT_HEAVY = "FC_WEIGHT_BLACK"
  401. const m_FC_WEIGHT_LIGHT = 50
  402. const m_FC_WEIGHT_MEDIUM = 100
  403. const m_FC_WEIGHT_NORMAL = "FC_WEIGHT_REGULAR"
  404. const m_FC_WEIGHT_REGULAR = 80
  405. const m_FC_WEIGHT_SEMIBOLD = "FC_WEIGHT_DEMIBOLD"
  406. const m_FC_WEIGHT_SEMILIGHT = "FC_WEIGHT_DEMILIGHT"
  407. const m_FC_WEIGHT_THIN = 0
  408. const m_FC_WEIGHT_ULTRABLACK = "FC_WEIGHT_EXTRABLACK"
  409. const m_FC_WEIGHT_ULTRABOLD = "FC_WEIGHT_EXTRABOLD"
  410. const m_FC_WEIGHT_ULTRALIGHT = "FC_WEIGHT_EXTRALIGHT"
  411. const m_FC_WIDTH = "width"
  412. const m_FC_WIDTH_CONDENSED = 75
  413. const m_FC_WIDTH_EXPANDED = 125
  414. const m_FC_WIDTH_EXTRACONDENSED = 63
  415. const m_FC_WIDTH_EXTRAEXPANDED = 150
  416. const m_FC_WIDTH_NORMAL = 100
  417. const m_FC_WIDTH_SEMICONDENSED = 87
  418. const m_FC_WIDTH_SEMIEXPANDED = 113
  419. const m_FC_WIDTH_ULTRACONDENSED = 50
  420. const m_FC_WIDTH_ULTRAEXPANDED = 200
  421. const m_FD_SETSIZE = 1024
  422. const m_FILENAME_MAX = 4096
  423. const m_FILESIZEBITS = 64
  424. const m_FOPEN_MAX = 1000
  425. const m_FRCTSPERBATCH = 256
  426. const m_FREETYPE_MAJOR = 2
  427. const m_FREETYPE_MINOR = 12
  428. const m_FREETYPE_PATCH = 1
  429. const m_FT_AUTOHINTER_H = "FT_DRIVER_H"
  430. const m_FT_CACHE_CHARMAP_H = "FT_CACHE_H"
  431. const m_FT_CACHE_IMAGE_H = "FT_CACHE_H"
  432. const m_FT_CACHE_INTERNAL_CACHE_H = "FT_CACHE_H"
  433. const m_FT_CACHE_INTERNAL_GLYPH_H = "FT_CACHE_H"
  434. const m_FT_CACHE_INTERNAL_IMAGE_H = "FT_CACHE_H"
  435. const m_FT_CACHE_INTERNAL_MANAGER_H = "FT_CACHE_H"
  436. const m_FT_CACHE_INTERNAL_MRU_H = "FT_CACHE_H"
  437. const m_FT_CACHE_INTERNAL_SBITS_H = "FT_CACHE_H"
  438. const m_FT_CACHE_MANAGER_H = "FT_CACHE_H"
  439. const m_FT_CACHE_SMALL_BITMAPS_H = "FT_CACHE_H"
  440. const m_FT_CFF_DRIVER_H = "FT_DRIVER_H"
  441. const m_FT_CHAR_BIT = "CHAR_BIT"
  442. const m_FT_CURVE_TAG_CONIC = 0x00
  443. const m_FT_CURVE_TAG_CUBIC = 0x02
  444. const m_FT_CURVE_TAG_HAS_SCANMODE = 0x04
  445. const m_FT_CURVE_TAG_ON = 0x01
  446. const m_FT_CURVE_TAG_TOUCH_X = 0x08
  447. const m_FT_CURVE_TAG_TOUCH_Y = 0x10
  448. const m_FT_Curve_Tag_Conic = "FT_CURVE_TAG_CONIC"
  449. const m_FT_Curve_Tag_Cubic = "FT_CURVE_TAG_CUBIC"
  450. const m_FT_Curve_Tag_On = "FT_CURVE_TAG_ON"
  451. const m_FT_Curve_Tag_Touch_X = "FT_CURVE_TAG_TOUCH_X"
  452. const m_FT_Curve_Tag_Touch_Y = "FT_CURVE_TAG_TOUCH_Y"
  453. const m_FT_FILE = "FILE"
  454. const m_FT_FSTYPE_BITMAP_EMBEDDING_ONLY = 0x0200
  455. const m_FT_FSTYPE_EDITABLE_EMBEDDING = 0x0008
  456. const m_FT_FSTYPE_INSTALLABLE_EMBEDDING = 0x0000
  457. const m_FT_FSTYPE_NO_SUBSETTING = 0x0100
  458. const m_FT_FSTYPE_PREVIEW_AND_PRINT_EMBEDDING = 0x0004
  459. const m_FT_FSTYPE_RESTRICTED_LICENSE_EMBEDDING = 0x0002
  460. const m_FT_INT64 = "long"
  461. const m_FT_INT_MAX = "INT_MAX"
  462. const m_FT_INT_MIN = "INT_MIN"
  463. const m_FT_LLONG_MAX = "LLONG_MAX"
  464. const m_FT_LLONG_MIN = "LLONG_MIN"
  465. const m_FT_LOAD_DEFAULT = 0x0
  466. const m_FT_LONG_MAX = "LONG_MAX"
  467. const m_FT_LONG_MIN = "LONG_MIN"
  468. const m_FT_MAX_MODULES = 32
  469. const m_FT_OPEN_DRIVER = 0x8
  470. const m_FT_OPEN_MEMORY = 0x1
  471. const m_FT_OPEN_PARAMS = 0x10
  472. const m_FT_OPEN_PATHNAME = 0x4
  473. const m_FT_OPEN_STREAM = 0x2
  474. const m_FT_OUTLINE_CONTOURS_MAX = "SHRT_MAX"
  475. const m_FT_OUTLINE_EVEN_ODD_FILL = 0x2
  476. const m_FT_OUTLINE_HIGH_PRECISION = 0x100
  477. const m_FT_OUTLINE_IGNORE_DROPOUTS = 0x8
  478. const m_FT_OUTLINE_INCLUDE_STUBS = 0x20
  479. const m_FT_OUTLINE_NONE = 0x0
  480. const m_FT_OUTLINE_OVERLAP = 0x40
  481. const m_FT_OUTLINE_OWNER = 0x1
  482. const m_FT_OUTLINE_POINTS_MAX = "SHRT_MAX"
  483. const m_FT_OUTLINE_REVERSE_FILL = 0x4
  484. const m_FT_OUTLINE_SINGLE_PASS = 0x200
  485. const m_FT_OUTLINE_SMART_DROPOUTS = 0x10
  486. const m_FT_Outline_ConicTo_Func = "FT_Outline_ConicToFunc"
  487. const m_FT_Outline_CubicTo_Func = "FT_Outline_CubicToFunc"
  488. const m_FT_Outline_LineTo_Func = "FT_Outline_LineToFunc"
  489. const m_FT_Outline_MoveTo_Func = "FT_Outline_MoveToFunc"
  490. const m_FT_PCF_DRIVER_H = "FT_DRIVER_H"
  491. const m_FT_RASTER_FLAG_AA = 0x1
  492. const m_FT_RASTER_FLAG_CLIP = 0x4
  493. const m_FT_RASTER_FLAG_DEFAULT = 0x0
  494. const m_FT_RASTER_FLAG_DIRECT = 0x2
  495. const m_FT_RASTER_FLAG_SDF = 0x8
  496. const m_FT_RENDER_POOL_SIZE = 16384
  497. const m_FT_Raster_Done_Func = "FT_Raster_DoneFunc"
  498. const m_FT_Raster_New_Func = "FT_Raster_NewFunc"
  499. const m_FT_Raster_Render_Func = "FT_Raster_RenderFunc"
  500. const m_FT_Raster_Reset_Func = "FT_Raster_ResetFunc"
  501. const m_FT_Raster_Set_Mode_Func = "FT_Raster_SetModeFunc"
  502. const m_FT_Raster_Span_Func = "FT_SpanFunc"
  503. const m_FT_SUBGLYPH_FLAG_2X2 = 0x80
  504. const m_FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS = 1
  505. const m_FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES = 2
  506. const m_FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID = 4
  507. const m_FT_SUBGLYPH_FLAG_SCALE = 8
  508. const m_FT_SUBGLYPH_FLAG_USE_MY_METRICS = 0x200
  509. const m_FT_SUBGLYPH_FLAG_XY_SCALE = 0x40
  510. const m_FT_TRUETYPE_DRIVER_H = "FT_DRIVER_H"
  511. const m_FT_UINT_MAX = "UINT_MAX"
  512. const m_FT_ULLONG_MAX = "ULLONG_MAX"
  513. const m_FT_ULONG_MAX = "ULONG_MAX"
  514. const m_FT_USHORT_MAX = "USHRT_MAX"
  515. const m_FT_XFREE86_H = "FT_FONT_FORMATS_H"
  516. const m_FUNCPROTO = 15
  517. const m_False = 0
  518. const m_FamilyChaos = 2
  519. const m_FamilyDECnet = 1
  520. const m_FamilyInternet = 0
  521. const m_FamilyInternet6 = 6
  522. const m_FamilyServerInterpreted = 5
  523. const m_FcConfigGetRescanInverval = "FcConfigGetRescanInverval_REPLACE_BY_FcConfigGetRescanInterval"
  524. const m_FcConfigSetRescanInverval = "FcConfigSetRescanInverval_REPLACE_BY_FcConfigSetRescanInterval"
  525. const m_FcDontCare = 2
  526. const m_FcFalse = 0
  527. const m_FcTrue = 1
  528. const m_FillOpaqueStippled = 3
  529. const m_FillSolid = 0
  530. const m_FillStippled = 2
  531. const m_FillTiled = 1
  532. const m_FilterBest = "best"
  533. const m_FilterBilinear = "bilinear"
  534. const m_FilterConvolution = "convolution"
  535. const m_FilterFast = "fast"
  536. const m_FilterGood = "good"
  537. const m_FilterNearest = "nearest"
  538. const m_FirstExtensionError = 128
  539. const m_FocusIn = 9
  540. const m_FocusOut = 10
  541. const m_FontChange = 255
  542. const m_FontLeftToRight = 0
  543. const m_FontRightToLeft = 1
  544. const m_ForgetGravity = 0
  545. const m_GCLastBit = 22
  546. const m_GXand = 0x1
  547. const m_GXandInverted = 0x4
  548. const m_GXandReverse = 0x2
  549. const m_GXclear = 0x0
  550. const m_GXcopy = 0x3
  551. const m_GXcopyInverted = 0xc
  552. const m_GXequiv = 0x9
  553. const m_GXinvert = 0xa
  554. const m_GXnand = 0xe
  555. const m_GXnoop = 0x5
  556. const m_GXnor = 0x8
  557. const m_GXor = 0x7
  558. const m_GXorInverted = 0xd
  559. const m_GXorReverse = 0xb
  560. const m_GXset = 0xf
  561. const m_GXxor = 0x6
  562. const m_GenericEvent = 35
  563. const m_GrabFrozen = 4
  564. const m_GrabInvalidTime = 2
  565. const m_GrabModeAsync = 1
  566. const m_GrabModeSync = 0
  567. const m_GrabNotViewable = 3
  568. const m_GrabSuccess = 0
  569. const m_GraphicsExpose = 13
  570. const m_GravityNotify = 24
  571. const m_GrayScale = 1
  572. const m_HAVE_CONFIG_H = 1
  573. const m_HAVE_DLFCN_H = 1
  574. const m_HAVE_INTTYPES_H = 1
  575. const m_HAVE_MEMORY_H = 1
  576. const m_HAVE_STDINT_H = 1
  577. const m_HAVE_STDLIB_H = 1
  578. const m_HAVE_STRINGS_H = 1
  579. const m_HAVE_STRING_H = 1
  580. const m_HAVE_SYS_STAT_H = 1
  581. const m_HAVE_SYS_TYPES_H = 1
  582. const m_HAVE_UNISTD_H = 1
  583. const m_HOST_NAME_MAX = 255
  584. const m_HeightValue = 0x0008
  585. const m_HostDelete = 1
  586. const m_HostInsert = 0
  587. const m_INT16_MAX = 0x7fff
  588. const m_INT32_MAX = 0x7fffffff
  589. const m_INT64_MAX = 0x7fffffffffffffff
  590. const m_INT8_MAX = 0x7f
  591. const m_INTMAX_MAX = "INT64_MAX"
  592. const m_INTMAX_MIN = "INT64_MIN"
  593. const m_INTPTR_MAX = "INT64_MAX"
  594. const m_INTPTR_MIN = "INT64_MIN"
  595. const m_INT_FAST16_MAX = "INT32_MAX"
  596. const m_INT_FAST16_MIN = "INT32_MIN"
  597. const m_INT_FAST32_MAX = "INT32_MAX"
  598. const m_INT_FAST32_MIN = "INT32_MIN"
  599. const m_INT_FAST64_MAX = "INT64_MAX"
  600. const m_INT_FAST64_MIN = "INT64_MIN"
  601. const m_INT_FAST8_MAX = "INT8_MAX"
  602. const m_INT_FAST8_MIN = "INT8_MIN"
  603. const m_INT_LEAST16_MAX = "INT16_MAX"
  604. const m_INT_LEAST16_MIN = "INT16_MIN"
  605. const m_INT_LEAST32_MAX = "INT32_MAX"
  606. const m_INT_LEAST32_MIN = "INT32_MIN"
  607. const m_INT_LEAST64_MAX = "INT64_MAX"
  608. const m_INT_LEAST64_MIN = "INT64_MIN"
  609. const m_INT_LEAST8_MAX = "INT8_MAX"
  610. const m_INT_LEAST8_MIN = "INT8_MIN"
  611. const m_INT_MAX = 2147483647
  612. const m_IOV_MAX = 1024
  613. const m_IconicState = 3
  614. const m_InactiveState = 4
  615. const m_IncludeInferiors = 1
  616. const m_InputFocus = 1
  617. const m_InputOnly = 2
  618. const m_InputOutput = 1
  619. const m_IsUnmapped = 0
  620. const m_IsUnviewable = 1
  621. const m_IsViewable = 2
  622. const m_JoinBevel = 2
  623. const m_JoinMiter = 0
  624. const m_JoinRound = 1
  625. const m_KeyPress = 2
  626. const m_KeyRelease = 3
  627. const m_KeymapNotify = 11
  628. const m_LASTEvent = 36
  629. const m_LINE_MAX = 4096
  630. const m_LITTLE_ENDIAN = "__LITTLE_ENDIAN"
  631. const m_LLONG_MAX = 0x7fffffffffffffff
  632. const m_LOCKED = 1
  633. const m_LOGIN_NAME_MAX = 256
  634. const m_LONG_BIT = 64
  635. const m_LONG_MAX = "__LONG_MAX"
  636. const m_LSBFirst = 0
  637. const m_LT_OBJDIR = ".libs/"
  638. const m_L_ctermid = 20
  639. const m_L_cuserid = 20
  640. const m_L_tmpnam = 20
  641. const m_LastExtensionError = 255
  642. const m_LeaveNotify = 8
  643. const m_LedModeOff = 0
  644. const m_LedModeOn = 1
  645. const m_LineDoubleDash = 2
  646. const m_LineOnOffDash = 1
  647. const m_LineSolid = 0
  648. const m_LockMapIndex = 1
  649. const m_LowerHighest = 1
  650. const m_MB_LEN_MAX = 4
  651. const m_MQ_PRIO_MAX = 32768
  652. const m_MSBFirst = 1
  653. const m_MapNotify = 19
  654. const m_MapRequest = 20
  655. const m_MappingBusy = 1
  656. const m_MappingFailed = 2
  657. const m_MappingKeyboard = 1
  658. const m_MappingModifier = 0
  659. const m_MappingNotify = 34
  660. const m_MappingPointer = 2
  661. const m_MappingSuccess = 0
  662. const m_Mod1MapIndex = 3
  663. const m_Mod2MapIndex = 4
  664. const m_Mod3MapIndex = 5
  665. const m_Mod4MapIndex = 6
  666. const m_Mod5MapIndex = 7
  667. const m_MotionNotify = 6
  668. const m_NAME_MAX = 255
  669. const m_NDEBUG = 1
  670. const m_NGROUPS_MAX = 32
  671. const m_NL_ARGMAX = 9
  672. const m_NL_LANGMAX = 32
  673. const m_NL_MSGMAX = 32767
  674. const m_NL_NMAX = 16
  675. const m_NL_SETMAX = 255
  676. const m_NL_TEXTMAX = 2048
  677. const m_NZERO = 20
  678. const m_NeedFunctionPrototypes = 1
  679. const m_NeedNestedPrototypes = 1
  680. const m_NeedVarargsPrototypes = 1
  681. const m_NeedWidePrototypes = 0
  682. const m_NoEventMask = 0
  683. const m_NoExpose = 14
  684. const m_NoSymbol = 0
  685. const m_NoValue = 0x0000
  686. const m_Nonconvex = 1
  687. const m_None = 0
  688. const m_NormalState = 1
  689. const m_NorthEastGravity = 3
  690. const m_NorthGravity = 2
  691. const m_NorthWestGravity = 1
  692. const m_NotUseful = 0
  693. const m_NotifyAncestor = 0
  694. const m_NotifyDetailNone = 7
  695. const m_NotifyGrab = 1
  696. const m_NotifyHint = 1
  697. const m_NotifyInferior = 2
  698. const m_NotifyNonlinear = 3
  699. const m_NotifyNonlinearVirtual = 4
  700. const m_NotifyNormal = 0
  701. const m_NotifyPointer = 5
  702. const m_NotifyPointerRoot = 6
  703. const m_NotifyUngrab = 2
  704. const m_NotifyVirtual = 1
  705. const m_NotifyWhileGrabbed = 3
  706. const m_Opposite = 4
  707. const m_PACKAGE = "libXft"
  708. const m_PACKAGE_BUGREPORT = "https://gitlab.freedesktop.org/xorg/lib/libXft/issues"
  709. const m_PACKAGE_NAME = "libXft"
  710. const m_PACKAGE_STRING = "libXft 2.3.6"
  711. const m_PACKAGE_TARNAME = "libXft"
  712. const m_PACKAGE_URL = ""
  713. const m_PACKAGE_VERSION = "2.3.6"
  714. const m_PACKAGE_VERSION_MAJOR = 2
  715. const m_PACKAGE_VERSION_MINOR = 3
  716. const m_PACKAGE_VERSION_PATCHLEVEL = 6
  717. const m_PATH_MAX = 4096
  718. const m_PDP_ENDIAN = "__PDP_ENDIAN"
  719. const m_PIPE_BUF = 4096
  720. const m_PTHREAD_CANCEL_ASYNCHRONOUS = 1
  721. const m_PTHREAD_CANCEL_DEFERRED = 0
  722. const m_PTHREAD_CANCEL_DISABLE = 1
  723. const m_PTHREAD_CANCEL_ENABLE = 0
  724. const m_PTHREAD_CANCEL_MASKED = 2
  725. const m_PTHREAD_CREATE_DETACHED = 1
  726. const m_PTHREAD_CREATE_JOINABLE = 0
  727. const m_PTHREAD_DESTRUCTOR_ITERATIONS = 4
  728. const m_PTHREAD_EXPLICIT_SCHED = 1
  729. const m_PTHREAD_INHERIT_SCHED = 0
  730. const m_PTHREAD_KEYS_MAX = 128
  731. const m_PTHREAD_MUTEX_DEFAULT = 0
  732. const m_PTHREAD_MUTEX_ERRORCHECK = 2
  733. const m_PTHREAD_MUTEX_NORMAL = 0
  734. const m_PTHREAD_MUTEX_RECURSIVE = 1
  735. const m_PTHREAD_MUTEX_ROBUST = 1
  736. const m_PTHREAD_MUTEX_STALLED = 0
  737. const m_PTHREAD_ONCE_INIT = 0
  738. const m_PTHREAD_PRIO_INHERIT = 1
  739. const m_PTHREAD_PRIO_NONE = 0
  740. const m_PTHREAD_PRIO_PROTECT = 2
  741. const m_PTHREAD_PROCESS_PRIVATE = 0
  742. const m_PTHREAD_PROCESS_SHARED = 1
  743. const m_PTHREAD_SCOPE_PROCESS = 1
  744. const m_PTHREAD_SCOPE_SYSTEM = 0
  745. const m_PTHREAD_STACK_MIN = 2048
  746. const m_PTRDIFF_MAX = "INT64_MAX"
  747. const m_PTRDIFF_MIN = "INT64_MIN"
  748. const m_PTSPERBATCH = 1024
  749. const m_P_tmpdir = "/tmp"
  750. const m_ParentRelative = 1
  751. const m_PictOpAdd = 12
  752. const m_PictOpAtop = 9
  753. const m_PictOpAtopReverse = 10
  754. const m_PictOpBlendMaximum = 0x3e
  755. const m_PictOpBlendMinimum = 0x30
  756. const m_PictOpClear = 0
  757. const m_PictOpColorBurn = 0x36
  758. const m_PictOpColorDodge = 0x35
  759. const m_PictOpConjointAtop = 0x29
  760. const m_PictOpConjointAtopReverse = 0x2a
  761. const m_PictOpConjointClear = 0x20
  762. const m_PictOpConjointDst = 0x22
  763. const m_PictOpConjointIn = 0x25
  764. const m_PictOpConjointInReverse = 0x26
  765. const m_PictOpConjointMaximum = 0x2b
  766. const m_PictOpConjointMinimum = 0x20
  767. const m_PictOpConjointOut = 0x27
  768. const m_PictOpConjointOutReverse = 0x28
  769. const m_PictOpConjointOver = 0x23
  770. const m_PictOpConjointOverReverse = 0x24
  771. const m_PictOpConjointSrc = 0x21
  772. const m_PictOpConjointXor = 0x2b
  773. const m_PictOpDarken = 0x33
  774. const m_PictOpDifference = 0x39
  775. const m_PictOpDisjointAtop = 0x19
  776. const m_PictOpDisjointAtopReverse = 0x1a
  777. const m_PictOpDisjointClear = 0x10
  778. const m_PictOpDisjointDst = 0x12
  779. const m_PictOpDisjointIn = 0x15
  780. const m_PictOpDisjointInReverse = 0x16
  781. const m_PictOpDisjointMaximum = 0x1b
  782. const m_PictOpDisjointMinimum = 0x10
  783. const m_PictOpDisjointOut = 0x17
  784. const m_PictOpDisjointOutReverse = 0x18
  785. const m_PictOpDisjointOver = 0x13
  786. const m_PictOpDisjointOverReverse = 0x14
  787. const m_PictOpDisjointSrc = 0x11
  788. const m_PictOpDisjointXor = 0x1b
  789. const m_PictOpDst = 2
  790. const m_PictOpExclusion = 0x3a
  791. const m_PictOpHSLColor = 0x3d
  792. const m_PictOpHSLHue = 0x3b
  793. const m_PictOpHSLLuminosity = 0x3e
  794. const m_PictOpHSLSaturation = 0x3c
  795. const m_PictOpHardLight = 0x37
  796. const m_PictOpIn = 5
  797. const m_PictOpInReverse = 6
  798. const m_PictOpLighten = 0x34
  799. const m_PictOpMaximum = 13
  800. const m_PictOpMinimum = 0
  801. const m_PictOpMultiply = 0x30
  802. const m_PictOpOut = 7
  803. const m_PictOpOutReverse = 8
  804. const m_PictOpOver = 3
  805. const m_PictOpOverReverse = 4
  806. const m_PictOpOverlay = 0x32
  807. const m_PictOpSaturate = 13
  808. const m_PictOpScreen = 0x31
  809. const m_PictOpSoftLight = 0x38
  810. const m_PictOpSrc = 1
  811. const m_PictOpXor = 11
  812. const m_PictStandardA1 = 4
  813. const m_PictStandardA4 = 3
  814. const m_PictStandardA8 = 2
  815. const m_PictStandardARGB32 = 0
  816. const m_PictStandardNUM = 5
  817. const m_PictStandardRGB24 = 1
  818. const m_PictTypeDirect = 1
  819. const m_PictTypeIndexed = 0
  820. const m_PlaceOnBottom = 1
  821. const m_PlaceOnTop = 0
  822. const m_PointerRoot = 1
  823. const m_PointerWindow = 0
  824. const m_PolyEdgeSharp = 0
  825. const m_PolyEdgeSmooth = 1
  826. const m_PolyModeImprecise = 1
  827. const m_PolyModePrecise = 0
  828. const m_PreferBlanking = 1
  829. const m_PropModeAppend = 2
  830. const m_PropModePrepend = 1
  831. const m_PropModeReplace = 0
  832. const m_PropertyDelete = 1
  833. const m_PropertyNewValue = 0
  834. const m_PropertyNotify = 28
  835. const m_PseudoColor = 3
  836. const m_QueuedAfterFlush = 2
  837. const m_QueuedAfterReading = 1
  838. const m_QueuedAlready = 0
  839. const m_RAND_MAX = 0x7fffffff
  840. const m_RENDER_MAJOR = 0
  841. const m_RENDER_MINOR = 11
  842. const m_RENDER_NAME = "RENDER"
  843. const m_RE_DUP_MAX = 255
  844. const m_RaiseLowest = 0
  845. const m_RectangleIn = 1
  846. const m_RectangleOut = 0
  847. const m_RectanglePart = 2
  848. const m_ReparentNotify = 21
  849. const m_RepeatNone = 0
  850. const m_RepeatNormal = 1
  851. const m_RepeatPad = 2
  852. const m_RepeatReflect = 3
  853. const m_ReplayKeyboard = 5
  854. const m_ReplayPointer = 2
  855. const m_ResizeRequest = 25
  856. const m_RetainPermanent = 1
  857. const m_RetainTemporary = 2
  858. const m_RevertToParent = 2
  859. const m_SCHAR_MAX = 127
  860. const m_SCHED_BATCH = 3
  861. const m_SCHED_DEADLINE = 6
  862. const m_SCHED_FIFO = 1
  863. const m_SCHED_IDLE = 5
  864. const m_SCHED_OTHER = 0
  865. const m_SCHED_RESET_ON_FORK = 0x40000000
  866. const m_SCHED_RR = 2
  867. const m_SEM_NSEMS_MAX = 256
  868. const m_SEM_VALUE_MAX = 0x7fffffff
  869. const m_SHRT_MAX = 0x7fff
  870. const m_SIG_ATOMIC_MAX = "INT32_MAX"
  871. const m_SIG_ATOMIC_MIN = "INT32_MIN"
  872. const m_SIZE_MAX = "UINT64_MAX"
  873. const m_SSIZE_MAX = "LONG_MAX"
  874. const m_STATX_ALL = 0xfff
  875. const m_STATX_ATIME = 0x20
  876. const m_STATX_BASIC_STATS = 0x7ff
  877. const m_STATX_BLOCKS = 0x400
  878. const m_STATX_BTIME = 0x800
  879. const m_STATX_CTIME = 0x80
  880. const m_STATX_GID = 0x10
  881. const m_STATX_INO = 0x100
  882. const m_STATX_MODE = 2
  883. const m_STATX_MTIME = 0x40
  884. const m_STATX_NLINK = 4
  885. const m_STATX_SIZE = 0x200
  886. const m_STATX_TYPE = 1
  887. const m_STATX_UID = 8
  888. const m_STDC_HEADERS = 1
  889. const m_SYMLOOP_MAX = 40
  890. const m_S_IEXEC = "S_IXUSR"
  891. const m_S_IFBLK = 0060000
  892. const m_S_IFCHR = 0020000
  893. const m_S_IFDIR = 0040000
  894. const m_S_IFIFO = 0010000
  895. const m_S_IFLNK = 0120000
  896. const m_S_IFMT = 0170000
  897. const m_S_IFREG = 0100000
  898. const m_S_IFSOCK = 0140000
  899. const m_S_IREAD = "S_IRUSR"
  900. const m_S_IRGRP = 0040
  901. const m_S_IROTH = 0004
  902. const m_S_IRUSR = 0400
  903. const m_S_IRWXG = 0070
  904. const m_S_IRWXO = 0007
  905. const m_S_IRWXU = 0700
  906. const m_S_ISGID = 02000
  907. const m_S_ISUID = 04000
  908. const m_S_ISVTX = 01000
  909. const m_S_IWGRP = 0020
  910. const m_S_IWOTH = 0002
  911. const m_S_IWRITE = "S_IWUSR"
  912. const m_S_IWUSR = 0200
  913. const m_S_IXGRP = 0010
  914. const m_S_IXOTH = 0001
  915. const m_S_IXUSR = 0100
  916. const m_ScreenSaverActive = 1
  917. const m_ScreenSaverReset = 0
  918. const m_SelectionClear = 29
  919. const m_SelectionNotify = 31
  920. const m_SelectionRequest = 30
  921. const m_SetModeDelete = 1
  922. const m_SetModeInsert = 0
  923. const m_ShiftMapIndex = 0
  924. const m_SouthEastGravity = 9
  925. const m_SouthGravity = 8
  926. const m_SouthWestGravity = 7
  927. const m_StaticColor = 2
  928. const m_StaticGravity = 10
  929. const m_StaticGray = 0
  930. const m_Status = "int"
  931. const m_StippleShape = 2
  932. const m_SubPixelHorizontalBGR = 2
  933. const m_SubPixelHorizontalRGB = 1
  934. const m_SubPixelNone = 5
  935. const m_SubPixelUnknown = 0
  936. const m_SubPixelVerticalBGR = 4
  937. const m_SubPixelVerticalRGB = 3
  938. const m_Success = 0
  939. const m_SyncBoth = 7
  940. const m_SyncKeyboard = 4
  941. const m_SyncPointer = 1
  942. const m_T1_MAX_CHARSTRINGS_OPERANDS = 256
  943. const m_T1_MAX_DICT_DEPTH = 5
  944. const m_T1_MAX_SUBRS_CALLS = 16
  945. const m_TIMER_ABSTIME = 1
  946. const m_TIME_UTC = 1
  947. const m_TMP_MAX = 10000
  948. const m_TTY_NAME_MAX = 32
  949. const m_TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES = 1000000
  950. const m_TT_CONFIG_OPTION_SUBPIXEL_HINTING = 2
  951. const m_TZNAME_MAX = 6
  952. const m_TileShape = 1
  953. const m_TopIf = 2
  954. const m_True = 1
  955. const m_TrueColor = 4
  956. const m_UCHAR_MAX = 255
  957. const m_UINT16_MAX = 0xffff
  958. const m_UINT32_MAX = "0xffffffffu"
  959. const m_UINT64_MAX = "0xffffffffffffffffu"
  960. const m_UINT8_MAX = 0xff
  961. const m_UINTMAX_MAX = "UINT64_MAX"
  962. const m_UINTPTR_MAX = "UINT64_MAX"
  963. const m_UINT_FAST16_MAX = "UINT32_MAX"
  964. const m_UINT_FAST32_MAX = "UINT32_MAX"
  965. const m_UINT_FAST64_MAX = "UINT64_MAX"
  966. const m_UINT_FAST8_MAX = "UINT8_MAX"
  967. const m_UINT_LEAST16_MAX = "UINT16_MAX"
  968. const m_UINT_LEAST32_MAX = "UINT32_MAX"
  969. const m_UINT_LEAST64_MAX = "UINT64_MAX"
  970. const m_UINT_LEAST8_MAX = "UINT8_MAX"
  971. const m_UINT_MAX = 0xffffffff
  972. const m_UNLOCKED = 0
  973. const m_USHRT_MAX = 0xffff
  974. const m_UTIME_NOW = 0x3fffffff
  975. const m_UTIME_OMIT = 0x3ffffffe
  976. const m_UnmapGravity = 0
  977. const m_UnmapNotify = 18
  978. const m_Unsorted = 0
  979. const m_VERSION = "2.3.6"
  980. const m_VisibilityFullyObscured = 2
  981. const m_VisibilityNotify = 15
  982. const m_VisibilityPartiallyObscured = 1
  983. const m_VisibilityUnobscured = 0
  984. const m_VisualAllMask = 0x1FF
  985. const m_VisualBitsPerRGBMask = 0x100
  986. const m_VisualBlueMaskMask = 0x40
  987. const m_VisualClassMask = 0x8
  988. const m_VisualColormapSizeMask = 0x80
  989. const m_VisualDepthMask = 0x4
  990. const m_VisualGreenMaskMask = 0x20
  991. const m_VisualIDMask = 0x1
  992. const m_VisualNoMask = 0x0
  993. const m_VisualRedMaskMask = 0x10
  994. const m_VisualScreenMask = 0x2
  995. const m_WINT_MAX = "UINT32_MAX"
  996. const m_WINT_MIN = 0
  997. const m_WLNSPERBATCH = 50
  998. const m_WNOHANG = 1
  999. const m_WORD_BIT = 32
  1000. const m_WRCTSPERBATCH = 10
  1001. const m_WUNTRACED = 2
  1002. const m_WestGravity = 4
  1003. const m_WhenMapped = 1
  1004. const m_WidthValue = 0x0004
  1005. const m_WindingRule = 1
  1006. const m_WithdrawnState = 0
  1007. const m_XCNOENT = 2
  1008. const m_XCNOMEM = 1
  1009. const m_XCSUCCESS = 0
  1010. const m_XFT_ASSUME_PIXMAP = 20
  1011. const m_XFT_CORE = "core"
  1012. const m_XFT_DBG_CACHE = 128
  1013. const m_XFT_DBG_CACHEV = 256
  1014. const m_XFT_DBG_DRAW = 8
  1015. const m_XFT_DBG_GLYPH = 32
  1016. const m_XFT_DBG_GLYPHV = 64
  1017. const m_XFT_DBG_MEMORY = 512
  1018. const m_XFT_DBG_OPEN = 1
  1019. const m_XFT_DBG_OPENV = 2
  1020. const m_XFT_DBG_REF = 16
  1021. const m_XFT_DBG_RENDER = 4
  1022. const m_XFT_DBG_USAGE = 1024
  1023. const m_XFT_DPY_MAX_UNREF_FONTS = 16
  1024. const m_XFT_MAJOR = 2
  1025. const m_XFT_MAX_GLYPH_MEMORY = "maxglyphmemory"
  1026. const m_XFT_MAX_UNREF_FONTS = "maxunreffonts"
  1027. const m_XFT_MINOR = 3
  1028. const m_XFT_NMISSING = 256
  1029. const m_XFT_NUM_FONT_HASH = 127
  1030. const m_XFT_NUM_SOLID_COLOR = 16
  1031. const m_XFT_RENDER = "render"
  1032. const m_XFT_REVISION = 6
  1033. const m_XFT_TRACK_MEM_USAGE = "trackmemusage"
  1034. const m_XFT_XLFD = "xlfd"
  1035. const m_XIMHotKeyStateOFF = 0x0002
  1036. const m_XIMHotKeyStateON = 0x0001
  1037. const m_XIMInitialState = 1
  1038. const m_XIMPreeditArea = 0x0001
  1039. const m_XIMPreeditCallbacks = 0x0002
  1040. const m_XIMPreeditEnable = 1
  1041. const m_XIMPreeditNone = 0x0010
  1042. const m_XIMPreeditNothing = 0x0008
  1043. const m_XIMPreeditPosition = 0x0004
  1044. const m_XIMPreeditUnKnown = 0
  1045. const m_XIMReverse = 1
  1046. const m_XIMStatusArea = 0x0100
  1047. const m_XIMStatusCallbacks = 0x0200
  1048. const m_XIMStatusNone = 0x0800
  1049. const m_XIMStatusNothing = 0x0400
  1050. const m_XIMStringConversionBottomEdge = 0x00000008
  1051. const m_XIMStringConversionBuffer = 0x0001
  1052. const m_XIMStringConversionChar = 0x0004
  1053. const m_XIMStringConversionConcealed = 0x00000010
  1054. const m_XIMStringConversionLeftEdge = 0x00000001
  1055. const m_XIMStringConversionLine = 0x0002
  1056. const m_XIMStringConversionRetrieval = 0x0002
  1057. const m_XIMStringConversionRightEdge = 0x00000002
  1058. const m_XIMStringConversionSubstitution = 0x0001
  1059. const m_XIMStringConversionTopEdge = 0x00000004
  1060. const m_XIMStringConversionWord = 0x0003
  1061. const m_XIMStringConversionWrapped = 0x00000020
  1062. const m_XK_0 = 0x0030
  1063. const m_XK_1 = 0x0031
  1064. const m_XK_2 = 0x0032
  1065. const m_XK_3 = 0x0033
  1066. const m_XK_4 = 0x0034
  1067. const m_XK_5 = 0x0035
  1068. const m_XK_6 = 0x0036
  1069. const m_XK_7 = 0x0037
  1070. const m_XK_8 = 0x0038
  1071. const m_XK_9 = 0x0039
  1072. const m_XK_A = 0x0041
  1073. const m_XK_AE = 0x00c6
  1074. const m_XK_Aacute = 0x00c1
  1075. const m_XK_Abelowdot = 0x1001ea0
  1076. const m_XK_Abreve = 0x01c3
  1077. const m_XK_Abreveacute = 0x1001eae
  1078. const m_XK_Abrevebelowdot = 0x1001eb6
  1079. const m_XK_Abrevegrave = 0x1001eb0
  1080. const m_XK_Abrevehook = 0x1001eb2
  1081. const m_XK_Abrevetilde = 0x1001eb4
  1082. const m_XK_AccessX_Enable = 0xfe70
  1083. const m_XK_AccessX_Feedback_Enable = 0xfe71
  1084. const m_XK_Acircumflex = 0x00c2
  1085. const m_XK_Acircumflexacute = 0x1001ea4
  1086. const m_XK_Acircumflexbelowdot = 0x1001eac
  1087. const m_XK_Acircumflexgrave = 0x1001ea6
  1088. const m_XK_Acircumflexhook = 0x1001ea8
  1089. const m_XK_Acircumflextilde = 0x1001eaa
  1090. const m_XK_Adiaeresis = 0x00c4
  1091. const m_XK_Agrave = 0x00c0
  1092. const m_XK_Ahook = 0x1001ea2
  1093. const m_XK_Alt_L = 0xffe9
  1094. const m_XK_Alt_R = 0xffea
  1095. const m_XK_Amacron = 0x03c0
  1096. const m_XK_Aogonek = 0x01a1
  1097. const m_XK_Arabic_0 = 0x1000660
  1098. const m_XK_Arabic_1 = 0x1000661
  1099. const m_XK_Arabic_2 = 0x1000662
  1100. const m_XK_Arabic_3 = 0x1000663
  1101. const m_XK_Arabic_4 = 0x1000664
  1102. const m_XK_Arabic_5 = 0x1000665
  1103. const m_XK_Arabic_6 = 0x1000666
  1104. const m_XK_Arabic_7 = 0x1000667
  1105. const m_XK_Arabic_8 = 0x1000668
  1106. const m_XK_Arabic_9 = 0x1000669
  1107. const m_XK_Arabic_ain = 0x05d9
  1108. const m_XK_Arabic_alef = 0x05c7
  1109. const m_XK_Arabic_alefmaksura = 0x05e9
  1110. const m_XK_Arabic_beh = 0x05c8
  1111. const m_XK_Arabic_comma = 0x05ac
  1112. const m_XK_Arabic_dad = 0x05d6
  1113. const m_XK_Arabic_dal = 0x05cf
  1114. const m_XK_Arabic_damma = 0x05ef
  1115. const m_XK_Arabic_dammatan = 0x05ec
  1116. const m_XK_Arabic_ddal = 0x1000688
  1117. const m_XK_Arabic_farsi_yeh = 0x10006cc
  1118. const m_XK_Arabic_fatha = 0x05ee
  1119. const m_XK_Arabic_fathatan = 0x05eb
  1120. const m_XK_Arabic_feh = 0x05e1
  1121. const m_XK_Arabic_fullstop = 0x10006d4
  1122. const m_XK_Arabic_gaf = 0x10006af
  1123. const m_XK_Arabic_ghain = 0x05da
  1124. const m_XK_Arabic_ha = 0x05e7
  1125. const m_XK_Arabic_hah = 0x05cd
  1126. const m_XK_Arabic_hamza = 0x05c1
  1127. const m_XK_Arabic_hamza_above = 0x1000654
  1128. const m_XK_Arabic_hamza_below = 0x1000655
  1129. const m_XK_Arabic_hamzaonalef = 0x05c3
  1130. const m_XK_Arabic_hamzaonwaw = 0x05c4
  1131. const m_XK_Arabic_hamzaonyeh = 0x05c6
  1132. const m_XK_Arabic_hamzaunderalef = 0x05c5
  1133. const m_XK_Arabic_heh = 0x05e7
  1134. const m_XK_Arabic_heh_doachashmee = 0x10006be
  1135. const m_XK_Arabic_heh_goal = 0x10006c1
  1136. const m_XK_Arabic_jeem = 0x05cc
  1137. const m_XK_Arabic_jeh = 0x1000698
  1138. const m_XK_Arabic_kaf = 0x05e3
  1139. const m_XK_Arabic_kasra = 0x05f0
  1140. const m_XK_Arabic_kasratan = 0x05ed
  1141. const m_XK_Arabic_keheh = 0x10006a9
  1142. const m_XK_Arabic_khah = 0x05ce
  1143. const m_XK_Arabic_lam = 0x05e4
  1144. const m_XK_Arabic_madda_above = 0x1000653
  1145. const m_XK_Arabic_maddaonalef = 0x05c2
  1146. const m_XK_Arabic_meem = 0x05e5
  1147. const m_XK_Arabic_noon = 0x05e6
  1148. const m_XK_Arabic_noon_ghunna = 0x10006ba
  1149. const m_XK_Arabic_peh = 0x100067e
  1150. const m_XK_Arabic_percent = 0x100066a
  1151. const m_XK_Arabic_qaf = 0x05e2
  1152. const m_XK_Arabic_question_mark = 0x05bf
  1153. const m_XK_Arabic_ra = 0x05d1
  1154. const m_XK_Arabic_rreh = 0x1000691
  1155. const m_XK_Arabic_sad = 0x05d5
  1156. const m_XK_Arabic_seen = 0x05d3
  1157. const m_XK_Arabic_semicolon = 0x05bb
  1158. const m_XK_Arabic_shadda = 0x05f1
  1159. const m_XK_Arabic_sheen = 0x05d4
  1160. const m_XK_Arabic_sukun = 0x05f2
  1161. const m_XK_Arabic_superscript_alef = 0x1000670
  1162. const m_XK_Arabic_switch = 0xff7e
  1163. const m_XK_Arabic_tah = 0x05d7
  1164. const m_XK_Arabic_tatweel = 0x05e0
  1165. const m_XK_Arabic_tcheh = 0x1000686
  1166. const m_XK_Arabic_teh = 0x05ca
  1167. const m_XK_Arabic_tehmarbuta = 0x05c9
  1168. const m_XK_Arabic_thal = 0x05d0
  1169. const m_XK_Arabic_theh = 0x05cb
  1170. const m_XK_Arabic_tteh = 0x1000679
  1171. const m_XK_Arabic_veh = 0x10006a4
  1172. const m_XK_Arabic_waw = 0x05e8
  1173. const m_XK_Arabic_yeh = 0x05ea
  1174. const m_XK_Arabic_yeh_baree = 0x10006d2
  1175. const m_XK_Arabic_zah = 0x05d8
  1176. const m_XK_Arabic_zain = 0x05d2
  1177. const m_XK_Aring = 0x00c5
  1178. const m_XK_Armenian_AT = 0x1000538
  1179. const m_XK_Armenian_AYB = 0x1000531
  1180. const m_XK_Armenian_BEN = 0x1000532
  1181. const m_XK_Armenian_CHA = 0x1000549
  1182. const m_XK_Armenian_DA = 0x1000534
  1183. const m_XK_Armenian_DZA = 0x1000541
  1184. const m_XK_Armenian_E = 0x1000537
  1185. const m_XK_Armenian_FE = 0x1000556
  1186. const m_XK_Armenian_GHAT = 0x1000542
  1187. const m_XK_Armenian_GIM = 0x1000533
  1188. const m_XK_Armenian_HI = 0x1000545
  1189. const m_XK_Armenian_HO = 0x1000540
  1190. const m_XK_Armenian_INI = 0x100053b
  1191. const m_XK_Armenian_JE = 0x100054b
  1192. const m_XK_Armenian_KE = 0x1000554
  1193. const m_XK_Armenian_KEN = 0x100053f
  1194. const m_XK_Armenian_KHE = 0x100053d
  1195. const m_XK_Armenian_LYUN = 0x100053c
  1196. const m_XK_Armenian_MEN = 0x1000544
  1197. const m_XK_Armenian_NU = 0x1000546
  1198. const m_XK_Armenian_O = 0x1000555
  1199. const m_XK_Armenian_PE = 0x100054a
  1200. const m_XK_Armenian_PYUR = 0x1000553
  1201. const m_XK_Armenian_RA = 0x100054c
  1202. const m_XK_Armenian_RE = 0x1000550
  1203. const m_XK_Armenian_SE = 0x100054d
  1204. const m_XK_Armenian_SHA = 0x1000547
  1205. const m_XK_Armenian_TCHE = 0x1000543
  1206. const m_XK_Armenian_TO = 0x1000539
  1207. const m_XK_Armenian_TSA = 0x100053e
  1208. const m_XK_Armenian_TSO = 0x1000551
  1209. const m_XK_Armenian_TYUN = 0x100054f
  1210. const m_XK_Armenian_VEV = 0x100054e
  1211. const m_XK_Armenian_VO = 0x1000548
  1212. const m_XK_Armenian_VYUN = 0x1000552
  1213. const m_XK_Armenian_YECH = 0x1000535
  1214. const m_XK_Armenian_ZA = 0x1000536
  1215. const m_XK_Armenian_ZHE = 0x100053a
  1216. const m_XK_Armenian_accent = 0x100055b
  1217. const m_XK_Armenian_amanak = 0x100055c
  1218. const m_XK_Armenian_apostrophe = 0x100055a
  1219. const m_XK_Armenian_at = 0x1000568
  1220. const m_XK_Armenian_ayb = 0x1000561
  1221. const m_XK_Armenian_ben = 0x1000562
  1222. const m_XK_Armenian_but = 0x100055d
  1223. const m_XK_Armenian_cha = 0x1000579
  1224. const m_XK_Armenian_da = 0x1000564
  1225. const m_XK_Armenian_dza = 0x1000571
  1226. const m_XK_Armenian_e = 0x1000567
  1227. const m_XK_Armenian_exclam = 0x100055c
  1228. const m_XK_Armenian_fe = 0x1000586
  1229. const m_XK_Armenian_full_stop = 0x1000589
  1230. const m_XK_Armenian_ghat = 0x1000572
  1231. const m_XK_Armenian_gim = 0x1000563
  1232. const m_XK_Armenian_hi = 0x1000575
  1233. const m_XK_Armenian_ho = 0x1000570
  1234. const m_XK_Armenian_hyphen = 0x100058a
  1235. const m_XK_Armenian_ini = 0x100056b
  1236. const m_XK_Armenian_je = 0x100057b
  1237. const m_XK_Armenian_ke = 0x1000584
  1238. const m_XK_Armenian_ken = 0x100056f
  1239. const m_XK_Armenian_khe = 0x100056d
  1240. const m_XK_Armenian_ligature_ew = 0x1000587
  1241. const m_XK_Armenian_lyun = 0x100056c
  1242. const m_XK_Armenian_men = 0x1000574
  1243. const m_XK_Armenian_nu = 0x1000576
  1244. const m_XK_Armenian_o = 0x1000585
  1245. const m_XK_Armenian_paruyk = 0x100055e
  1246. const m_XK_Armenian_pe = 0x100057a
  1247. const m_XK_Armenian_pyur = 0x1000583
  1248. const m_XK_Armenian_question = 0x100055e
  1249. const m_XK_Armenian_ra = 0x100057c
  1250. const m_XK_Armenian_re = 0x1000580
  1251. const m_XK_Armenian_se = 0x100057d
  1252. const m_XK_Armenian_separation_mark = 0x100055d
  1253. const m_XK_Armenian_sha = 0x1000577
  1254. const m_XK_Armenian_shesht = 0x100055b
  1255. const m_XK_Armenian_tche = 0x1000573
  1256. const m_XK_Armenian_to = 0x1000569
  1257. const m_XK_Armenian_tsa = 0x100056e
  1258. const m_XK_Armenian_tso = 0x1000581
  1259. const m_XK_Armenian_tyun = 0x100057f
  1260. const m_XK_Armenian_verjaket = 0x1000589
  1261. const m_XK_Armenian_vev = 0x100057e
  1262. const m_XK_Armenian_vo = 0x1000578
  1263. const m_XK_Armenian_vyun = 0x1000582
  1264. const m_XK_Armenian_yech = 0x1000565
  1265. const m_XK_Armenian_yentamna = 0x100058a
  1266. const m_XK_Armenian_za = 0x1000566
  1267. const m_XK_Armenian_zhe = 0x100056a
  1268. const m_XK_Atilde = 0x00c3
  1269. const m_XK_AudibleBell_Enable = 0xfe7a
  1270. const m_XK_B = 0x0042
  1271. const m_XK_Babovedot = 0x1001e02
  1272. const m_XK_BackSpace = 0xff08
  1273. const m_XK_Begin = 0xff58
  1274. const m_XK_BounceKeys_Enable = 0xfe74
  1275. const m_XK_Break = 0xff6b
  1276. const m_XK_Byelorussian_SHORTU = 0x06be
  1277. const m_XK_Byelorussian_shortu = 0x06ae
  1278. const m_XK_C = 0x0043
  1279. const m_XK_CH = 0xfea2
  1280. const m_XK_C_H = 0xfea5
  1281. const m_XK_C_h = 0xfea4
  1282. const m_XK_Cabovedot = 0x02c5
  1283. const m_XK_Cacute = 0x01c6
  1284. const m_XK_Cancel = 0xff69
  1285. const m_XK_Caps_Lock = 0xffe5
  1286. const m_XK_Ccaron = 0x01c8
  1287. const m_XK_Ccedilla = 0x00c7
  1288. const m_XK_Ccircumflex = 0x02c6
  1289. const m_XK_Ch = 0xfea1
  1290. const m_XK_Clear = 0xff0b
  1291. const m_XK_Codeinput = 0xff37
  1292. const m_XK_ColonSign = 0x10020a1
  1293. const m_XK_Control_L = 0xffe3
  1294. const m_XK_Control_R = 0xffe4
  1295. const m_XK_CruzeiroSign = 0x10020a2
  1296. const m_XK_Cyrillic_A = 0x06e1
  1297. const m_XK_Cyrillic_BE = 0x06e2
  1298. const m_XK_Cyrillic_CHE = 0x06fe
  1299. const m_XK_Cyrillic_CHE_descender = 0x10004b6
  1300. const m_XK_Cyrillic_CHE_vertstroke = 0x10004b8
  1301. const m_XK_Cyrillic_DE = 0x06e4
  1302. const m_XK_Cyrillic_DZHE = 0x06bf
  1303. const m_XK_Cyrillic_E = 0x06fc
  1304. const m_XK_Cyrillic_EF = 0x06e6
  1305. const m_XK_Cyrillic_EL = 0x06ec
  1306. const m_XK_Cyrillic_EM = 0x06ed
  1307. const m_XK_Cyrillic_EN = 0x06ee
  1308. const m_XK_Cyrillic_EN_descender = 0x10004a2
  1309. const m_XK_Cyrillic_ER = 0x06f2
  1310. const m_XK_Cyrillic_ES = 0x06f3
  1311. const m_XK_Cyrillic_GHE = 0x06e7
  1312. const m_XK_Cyrillic_GHE_bar = 0x1000492
  1313. const m_XK_Cyrillic_HA = 0x06e8
  1314. const m_XK_Cyrillic_HARDSIGN = 0x06ff
  1315. const m_XK_Cyrillic_HA_descender = 0x10004b2
  1316. const m_XK_Cyrillic_I = 0x06e9
  1317. const m_XK_Cyrillic_IE = 0x06e5
  1318. const m_XK_Cyrillic_IO = 0x06b3
  1319. const m_XK_Cyrillic_I_macron = 0x10004e2
  1320. const m_XK_Cyrillic_JE = 0x06b8
  1321. const m_XK_Cyrillic_KA = 0x06eb
  1322. const m_XK_Cyrillic_KA_descender = 0x100049a
  1323. const m_XK_Cyrillic_KA_vertstroke = 0x100049c
  1324. const m_XK_Cyrillic_LJE = 0x06b9
  1325. const m_XK_Cyrillic_NJE = 0x06ba
  1326. const m_XK_Cyrillic_O = 0x06ef
  1327. const m_XK_Cyrillic_O_bar = 0x10004e8
  1328. const m_XK_Cyrillic_PE = 0x06f0
  1329. const m_XK_Cyrillic_SCHWA = 0x10004d8
  1330. const m_XK_Cyrillic_SHA = 0x06fb
  1331. const m_XK_Cyrillic_SHCHA = 0x06fd
  1332. const m_XK_Cyrillic_SHHA = 0x10004ba
  1333. const m_XK_Cyrillic_SHORTI = 0x06ea
  1334. const m_XK_Cyrillic_SOFTSIGN = 0x06f8
  1335. const m_XK_Cyrillic_TE = 0x06f4
  1336. const m_XK_Cyrillic_TSE = 0x06e3
  1337. const m_XK_Cyrillic_U = 0x06f5
  1338. const m_XK_Cyrillic_U_macron = 0x10004ee
  1339. const m_XK_Cyrillic_U_straight = 0x10004ae
  1340. const m_XK_Cyrillic_U_straight_bar = 0x10004b0
  1341. const m_XK_Cyrillic_VE = 0x06f7
  1342. const m_XK_Cyrillic_YA = 0x06f1
  1343. const m_XK_Cyrillic_YERU = 0x06f9
  1344. const m_XK_Cyrillic_YU = 0x06e0
  1345. const m_XK_Cyrillic_ZE = 0x06fa
  1346. const m_XK_Cyrillic_ZHE = 0x06f6
  1347. const m_XK_Cyrillic_ZHE_descender = 0x1000496
  1348. const m_XK_Cyrillic_a = 0x06c1
  1349. const m_XK_Cyrillic_be = 0x06c2
  1350. const m_XK_Cyrillic_che = 0x06de
  1351. const m_XK_Cyrillic_che_descender = 0x10004b7
  1352. const m_XK_Cyrillic_che_vertstroke = 0x10004b9
  1353. const m_XK_Cyrillic_de = 0x06c4
  1354. const m_XK_Cyrillic_dzhe = 0x06af
  1355. const m_XK_Cyrillic_e = 0x06dc
  1356. const m_XK_Cyrillic_ef = 0x06c6
  1357. const m_XK_Cyrillic_el = 0x06cc
  1358. const m_XK_Cyrillic_em = 0x06cd
  1359. const m_XK_Cyrillic_en = 0x06ce
  1360. const m_XK_Cyrillic_en_descender = 0x10004a3
  1361. const m_XK_Cyrillic_er = 0x06d2
  1362. const m_XK_Cyrillic_es = 0x06d3
  1363. const m_XK_Cyrillic_ghe = 0x06c7
  1364. const m_XK_Cyrillic_ghe_bar = 0x1000493
  1365. const m_XK_Cyrillic_ha = 0x06c8
  1366. const m_XK_Cyrillic_ha_descender = 0x10004b3
  1367. const m_XK_Cyrillic_hardsign = 0x06df
  1368. const m_XK_Cyrillic_i = 0x06c9
  1369. const m_XK_Cyrillic_i_macron = 0x10004e3
  1370. const m_XK_Cyrillic_ie = 0x06c5
  1371. const m_XK_Cyrillic_io = 0x06a3
  1372. const m_XK_Cyrillic_je = 0x06a8
  1373. const m_XK_Cyrillic_ka = 0x06cb
  1374. const m_XK_Cyrillic_ka_descender = 0x100049b
  1375. const m_XK_Cyrillic_ka_vertstroke = 0x100049d
  1376. const m_XK_Cyrillic_lje = 0x06a9
  1377. const m_XK_Cyrillic_nje = 0x06aa
  1378. const m_XK_Cyrillic_o = 0x06cf
  1379. const m_XK_Cyrillic_o_bar = 0x10004e9
  1380. const m_XK_Cyrillic_pe = 0x06d0
  1381. const m_XK_Cyrillic_schwa = 0x10004d9
  1382. const m_XK_Cyrillic_sha = 0x06db
  1383. const m_XK_Cyrillic_shcha = 0x06dd
  1384. const m_XK_Cyrillic_shha = 0x10004bb
  1385. const m_XK_Cyrillic_shorti = 0x06ca
  1386. const m_XK_Cyrillic_softsign = 0x06d8
  1387. const m_XK_Cyrillic_te = 0x06d4
  1388. const m_XK_Cyrillic_tse = 0x06c3
  1389. const m_XK_Cyrillic_u = 0x06d5
  1390. const m_XK_Cyrillic_u_macron = 0x10004ef
  1391. const m_XK_Cyrillic_u_straight = 0x10004af
  1392. const m_XK_Cyrillic_u_straight_bar = 0x10004b1
  1393. const m_XK_Cyrillic_ve = 0x06d7
  1394. const m_XK_Cyrillic_ya = 0x06d1
  1395. const m_XK_Cyrillic_yeru = 0x06d9
  1396. const m_XK_Cyrillic_yu = 0x06c0
  1397. const m_XK_Cyrillic_ze = 0x06da
  1398. const m_XK_Cyrillic_zhe = 0x06d6
  1399. const m_XK_Cyrillic_zhe_descender = 0x1000497
  1400. const m_XK_D = 0x0044
  1401. const m_XK_Dabovedot = 0x1001e0a
  1402. const m_XK_Dcaron = 0x01cf
  1403. const m_XK_Delete = 0xffff
  1404. const m_XK_DongSign = 0x10020ab
  1405. const m_XK_Down = 0xff54
  1406. const m_XK_Dstroke = 0x01d0
  1407. const m_XK_E = 0x0045
  1408. const m_XK_ENG = 0x03bd
  1409. const m_XK_ETH = 0x00d0
  1410. const m_XK_EZH = 0x10001b7
  1411. const m_XK_Eabovedot = 0x03cc
  1412. const m_XK_Eacute = 0x00c9
  1413. const m_XK_Ebelowdot = 0x1001eb8
  1414. const m_XK_Ecaron = 0x01cc
  1415. const m_XK_Ecircumflex = 0x00ca
  1416. const m_XK_Ecircumflexacute = 0x1001ebe
  1417. const m_XK_Ecircumflexbelowdot = 0x1001ec6
  1418. const m_XK_Ecircumflexgrave = 0x1001ec0
  1419. const m_XK_Ecircumflexhook = 0x1001ec2
  1420. const m_XK_Ecircumflextilde = 0x1001ec4
  1421. const m_XK_EcuSign = 0x10020a0
  1422. const m_XK_Ediaeresis = 0x00cb
  1423. const m_XK_Egrave = 0x00c8
  1424. const m_XK_Ehook = 0x1001eba
  1425. const m_XK_Eisu_Shift = 0xff2f
  1426. const m_XK_Eisu_toggle = 0xff30
  1427. const m_XK_Emacron = 0x03aa
  1428. const m_XK_End = 0xff57
  1429. const m_XK_Eogonek = 0x01ca
  1430. const m_XK_Escape = 0xff1b
  1431. const m_XK_Eth = 0x00d0
  1432. const m_XK_Etilde = 0x1001ebc
  1433. const m_XK_EuroSign = 0x20ac
  1434. const m_XK_Execute = 0xff62
  1435. const m_XK_F = 0x0046
  1436. const m_XK_F1 = 0xffbe
  1437. const m_XK_F10 = 0xffc7
  1438. const m_XK_F11 = 0xffc8
  1439. const m_XK_F12 = 0xffc9
  1440. const m_XK_F13 = 0xffca
  1441. const m_XK_F14 = 0xffcb
  1442. const m_XK_F15 = 0xffcc
  1443. const m_XK_F16 = 0xffcd
  1444. const m_XK_F17 = 0xffce
  1445. const m_XK_F18 = 0xffcf
  1446. const m_XK_F19 = 0xffd0
  1447. const m_XK_F2 = 0xffbf
  1448. const m_XK_F20 = 0xffd1
  1449. const m_XK_F21 = 0xffd2
  1450. const m_XK_F22 = 0xffd3
  1451. const m_XK_F23 = 0xffd4
  1452. const m_XK_F24 = 0xffd5
  1453. const m_XK_F25 = 0xffd6
  1454. const m_XK_F26 = 0xffd7
  1455. const m_XK_F27 = 0xffd8
  1456. const m_XK_F28 = 0xffd9
  1457. const m_XK_F29 = 0xffda
  1458. const m_XK_F3 = 0xffc0
  1459. const m_XK_F30 = 0xffdb
  1460. const m_XK_F31 = 0xffdc
  1461. const m_XK_F32 = 0xffdd
  1462. const m_XK_F33 = 0xffde
  1463. const m_XK_F34 = 0xffdf
  1464. const m_XK_F35 = 0xffe0
  1465. const m_XK_F4 = 0xffc1
  1466. const m_XK_F5 = 0xffc2
  1467. const m_XK_F6 = 0xffc3
  1468. const m_XK_F7 = 0xffc4
  1469. const m_XK_F8 = 0xffc5
  1470. const m_XK_F9 = 0xffc6
  1471. const m_XK_FFrancSign = 0x10020a3
  1472. const m_XK_Fabovedot = 0x1001e1e
  1473. const m_XK_Farsi_0 = 0x10006f0
  1474. const m_XK_Farsi_1 = 0x10006f1
  1475. const m_XK_Farsi_2 = 0x10006f2
  1476. const m_XK_Farsi_3 = 0x10006f3
  1477. const m_XK_Farsi_4 = 0x10006f4
  1478. const m_XK_Farsi_5 = 0x10006f5
  1479. const m_XK_Farsi_6 = 0x10006f6
  1480. const m_XK_Farsi_7 = 0x10006f7
  1481. const m_XK_Farsi_8 = 0x10006f8
  1482. const m_XK_Farsi_9 = 0x10006f9
  1483. const m_XK_Farsi_yeh = 0x10006cc
  1484. const m_XK_Find = 0xff68
  1485. const m_XK_First_Virtual_Screen = 0xfed0
  1486. const m_XK_G = 0x0047
  1487. const m_XK_Gabovedot = 0x02d5
  1488. const m_XK_Gbreve = 0x02ab
  1489. const m_XK_Gcaron = 0x10001e6
  1490. const m_XK_Gcedilla = 0x03ab
  1491. const m_XK_Gcircumflex = 0x02d8
  1492. const m_XK_Georgian_an = 0x10010d0
  1493. const m_XK_Georgian_ban = 0x10010d1
  1494. const m_XK_Georgian_can = 0x10010ea
  1495. const m_XK_Georgian_char = 0x10010ed
  1496. const m_XK_Georgian_chin = 0x10010e9
  1497. const m_XK_Georgian_cil = 0x10010ec
  1498. const m_XK_Georgian_don = 0x10010d3
  1499. const m_XK_Georgian_en = 0x10010d4
  1500. const m_XK_Georgian_fi = 0x10010f6
  1501. const m_XK_Georgian_gan = 0x10010d2
  1502. const m_XK_Georgian_ghan = 0x10010e6
  1503. const m_XK_Georgian_hae = 0x10010f0
  1504. const m_XK_Georgian_har = 0x10010f4
  1505. const m_XK_Georgian_he = 0x10010f1
  1506. const m_XK_Georgian_hie = 0x10010f2
  1507. const m_XK_Georgian_hoe = 0x10010f5
  1508. const m_XK_Georgian_in = 0x10010d8
  1509. const m_XK_Georgian_jhan = 0x10010ef
  1510. const m_XK_Georgian_jil = 0x10010eb
  1511. const m_XK_Georgian_kan = 0x10010d9
  1512. const m_XK_Georgian_khar = 0x10010e5
  1513. const m_XK_Georgian_las = 0x10010da
  1514. const m_XK_Georgian_man = 0x10010db
  1515. const m_XK_Georgian_nar = 0x10010dc
  1516. const m_XK_Georgian_on = 0x10010dd
  1517. const m_XK_Georgian_par = 0x10010de
  1518. const m_XK_Georgian_phar = 0x10010e4
  1519. const m_XK_Georgian_qar = 0x10010e7
  1520. const m_XK_Georgian_rae = 0x10010e0
  1521. const m_XK_Georgian_san = 0x10010e1
  1522. const m_XK_Georgian_shin = 0x10010e8
  1523. const m_XK_Georgian_tan = 0x10010d7
  1524. const m_XK_Georgian_tar = 0x10010e2
  1525. const m_XK_Georgian_un = 0x10010e3
  1526. const m_XK_Georgian_vin = 0x10010d5
  1527. const m_XK_Georgian_we = 0x10010f3
  1528. const m_XK_Georgian_xan = 0x10010ee
  1529. const m_XK_Georgian_zen = 0x10010d6
  1530. const m_XK_Georgian_zhar = 0x10010df
  1531. const m_XK_Greek_ALPHA = 0x07c1
  1532. const m_XK_Greek_ALPHAaccent = 0x07a1
  1533. const m_XK_Greek_BETA = 0x07c2
  1534. const m_XK_Greek_CHI = 0x07d7
  1535. const m_XK_Greek_DELTA = 0x07c4
  1536. const m_XK_Greek_EPSILON = 0x07c5
  1537. const m_XK_Greek_EPSILONaccent = 0x07a2
  1538. const m_XK_Greek_ETA = 0x07c7
  1539. const m_XK_Greek_ETAaccent = 0x07a3
  1540. const m_XK_Greek_GAMMA = 0x07c3
  1541. const m_XK_Greek_IOTA = 0x07c9
  1542. const m_XK_Greek_IOTAaccent = 0x07a4
  1543. const m_XK_Greek_IOTAdiaeresis = 0x07a5
  1544. const m_XK_Greek_IOTAdieresis = 0x07a5
  1545. const m_XK_Greek_KAPPA = 0x07ca
  1546. const m_XK_Greek_LAMBDA = 0x07cb
  1547. const m_XK_Greek_LAMDA = 0x07cb
  1548. const m_XK_Greek_MU = 0x07cc
  1549. const m_XK_Greek_NU = 0x07cd
  1550. const m_XK_Greek_OMEGA = 0x07d9
  1551. const m_XK_Greek_OMEGAaccent = 0x07ab
  1552. const m_XK_Greek_OMICRON = 0x07cf
  1553. const m_XK_Greek_OMICRONaccent = 0x07a7
  1554. const m_XK_Greek_PHI = 0x07d6
  1555. const m_XK_Greek_PI = 0x07d0
  1556. const m_XK_Greek_PSI = 0x07d8
  1557. const m_XK_Greek_RHO = 0x07d1
  1558. const m_XK_Greek_SIGMA = 0x07d2
  1559. const m_XK_Greek_TAU = 0x07d4
  1560. const m_XK_Greek_THETA = 0x07c8
  1561. const m_XK_Greek_UPSILON = 0x07d5
  1562. const m_XK_Greek_UPSILONaccent = 0x07a8
  1563. const m_XK_Greek_UPSILONdieresis = 0x07a9
  1564. const m_XK_Greek_XI = 0x07ce
  1565. const m_XK_Greek_ZETA = 0x07c6
  1566. const m_XK_Greek_accentdieresis = 0x07ae
  1567. const m_XK_Greek_alpha = 0x07e1
  1568. const m_XK_Greek_alphaaccent = 0x07b1
  1569. const m_XK_Greek_beta = 0x07e2
  1570. const m_XK_Greek_chi = 0x07f7
  1571. const m_XK_Greek_delta = 0x07e4
  1572. const m_XK_Greek_epsilon = 0x07e5
  1573. const m_XK_Greek_epsilonaccent = 0x07b2
  1574. const m_XK_Greek_eta = 0x07e7
  1575. const m_XK_Greek_etaaccent = 0x07b3
  1576. const m_XK_Greek_finalsmallsigma = 0x07f3
  1577. const m_XK_Greek_gamma = 0x07e3
  1578. const m_XK_Greek_horizbar = 0x07af
  1579. const m_XK_Greek_iota = 0x07e9
  1580. const m_XK_Greek_iotaaccent = 0x07b4
  1581. const m_XK_Greek_iotaaccentdieresis = 0x07b6
  1582. const m_XK_Greek_iotadieresis = 0x07b5
  1583. const m_XK_Greek_kappa = 0x07ea
  1584. const m_XK_Greek_lambda = 0x07eb
  1585. const m_XK_Greek_lamda = 0x07eb
  1586. const m_XK_Greek_mu = 0x07ec
  1587. const m_XK_Greek_nu = 0x07ed
  1588. const m_XK_Greek_omega = 0x07f9
  1589. const m_XK_Greek_omegaaccent = 0x07bb
  1590. const m_XK_Greek_omicron = 0x07ef
  1591. const m_XK_Greek_omicronaccent = 0x07b7
  1592. const m_XK_Greek_phi = 0x07f6
  1593. const m_XK_Greek_pi = 0x07f0
  1594. const m_XK_Greek_psi = 0x07f8
  1595. const m_XK_Greek_rho = 0x07f1
  1596. const m_XK_Greek_sigma = 0x07f2
  1597. const m_XK_Greek_switch = 0xff7e
  1598. const m_XK_Greek_tau = 0x07f4
  1599. const m_XK_Greek_theta = 0x07e8
  1600. const m_XK_Greek_upsilon = 0x07f5
  1601. const m_XK_Greek_upsilonaccent = 0x07b8
  1602. const m_XK_Greek_upsilonaccentdieresis = 0x07ba
  1603. const m_XK_Greek_upsilondieresis = 0x07b9
  1604. const m_XK_Greek_xi = 0x07ee
  1605. const m_XK_Greek_zeta = 0x07e6
  1606. const m_XK_H = 0x0048
  1607. const m_XK_Hangul = 0xff31
  1608. const m_XK_Hangul_A = 0x0ebf
  1609. const m_XK_Hangul_AE = 0x0ec0
  1610. const m_XK_Hangul_AraeA = 0x0ef6
  1611. const m_XK_Hangul_AraeAE = 0x0ef7
  1612. const m_XK_Hangul_Banja = 0xff39
  1613. const m_XK_Hangul_Cieuc = 0x0eba
  1614. const m_XK_Hangul_Codeinput = 0xff37
  1615. const m_XK_Hangul_Dikeud = 0x0ea7
  1616. const m_XK_Hangul_E = 0x0ec4
  1617. const m_XK_Hangul_EO = 0x0ec3
  1618. const m_XK_Hangul_EU = 0x0ed1
  1619. const m_XK_Hangul_End = 0xff33
  1620. const m_XK_Hangul_Hanja = 0xff34
  1621. const m_XK_Hangul_Hieuh = 0x0ebe
  1622. const m_XK_Hangul_I = 0x0ed3
  1623. const m_XK_Hangul_Ieung = 0x0eb7
  1624. const m_XK_Hangul_J_Cieuc = 0x0eea
  1625. const m_XK_Hangul_J_Dikeud = 0x0eda
  1626. const m_XK_Hangul_J_Hieuh = 0x0eee
  1627. const m_XK_Hangul_J_Ieung = 0x0ee8
  1628. const m_XK_Hangul_J_Jieuj = 0x0ee9
  1629. const m_XK_Hangul_J_Khieuq = 0x0eeb
  1630. const m_XK_Hangul_J_Kiyeog = 0x0ed4
  1631. const m_XK_Hangul_J_KiyeogSios = 0x0ed6
  1632. const m_XK_Hangul_J_KkogjiDalrinIeung = 0x0ef9
  1633. const m_XK_Hangul_J_Mieum = 0x0ee3
  1634. const m_XK_Hangul_J_Nieun = 0x0ed7
  1635. const m_XK_Hangul_J_NieunHieuh = 0x0ed9
  1636. const m_XK_Hangul_J_NieunJieuj = 0x0ed8
  1637. const m_XK_Hangul_J_PanSios = 0x0ef8
  1638. const m_XK_Hangul_J_Phieuf = 0x0eed
  1639. const m_XK_Hangul_J_Pieub = 0x0ee4
  1640. const m_XK_Hangul_J_PieubSios = 0x0ee5
  1641. const m_XK_Hangul_J_Rieul = 0x0edb
  1642. const m_XK_Hangul_J_RieulHieuh = 0x0ee2
  1643. const m_XK_Hangul_J_RieulKiyeog = 0x0edc
  1644. const m_XK_Hangul_J_RieulMieum = 0x0edd
  1645. const m_XK_Hangul_J_RieulPhieuf = 0x0ee1
  1646. const m_XK_Hangul_J_RieulPieub = 0x0ede
  1647. const m_XK_Hangul_J_RieulSios = 0x0edf
  1648. const m_XK_Hangul_J_RieulTieut = 0x0ee0
  1649. const m_XK_Hangul_J_Sios = 0x0ee6
  1650. const m_XK_Hangul_J_SsangKiyeog = 0x0ed5
  1651. const m_XK_Hangul_J_SsangSios = 0x0ee7
  1652. const m_XK_Hangul_J_Tieut = 0x0eec
  1653. const m_XK_Hangul_J_YeorinHieuh = 0x0efa
  1654. const m_XK_Hangul_Jamo = 0xff35
  1655. const m_XK_Hangul_Jeonja = 0xff38
  1656. const m_XK_Hangul_Jieuj = 0x0eb8
  1657. const m_XK_Hangul_Khieuq = 0x0ebb
  1658. const m_XK_Hangul_Kiyeog = 0x0ea1
  1659. const m_XK_Hangul_KiyeogSios = 0x0ea3
  1660. const m_XK_Hangul_KkogjiDalrinIeung = 0x0ef3
  1661. const m_XK_Hangul_Mieum = 0x0eb1
  1662. const m_XK_Hangul_MultipleCandidate = 0xff3d
  1663. const m_XK_Hangul_Nieun = 0x0ea4
  1664. const m_XK_Hangul_NieunHieuh = 0x0ea6
  1665. const m_XK_Hangul_NieunJieuj = 0x0ea5
  1666. const m_XK_Hangul_O = 0x0ec7
  1667. const m_XK_Hangul_OE = 0x0eca
  1668. const m_XK_Hangul_PanSios = 0x0ef2
  1669. const m_XK_Hangul_Phieuf = 0x0ebd
  1670. const m_XK_Hangul_Pieub = 0x0eb2
  1671. const m_XK_Hangul_PieubSios = 0x0eb4
  1672. const m_XK_Hangul_PostHanja = 0xff3b
  1673. const m_XK_Hangul_PreHanja = 0xff3a
  1674. const m_XK_Hangul_PreviousCandidate = 0xff3e
  1675. const m_XK_Hangul_Rieul = 0x0ea9
  1676. const m_XK_Hangul_RieulHieuh = 0x0eb0
  1677. const m_XK_Hangul_RieulKiyeog = 0x0eaa
  1678. const m_XK_Hangul_RieulMieum = 0x0eab
  1679. const m_XK_Hangul_RieulPhieuf = 0x0eaf
  1680. const m_XK_Hangul_RieulPieub = 0x0eac
  1681. const m_XK_Hangul_RieulSios = 0x0ead
  1682. const m_XK_Hangul_RieulTieut = 0x0eae
  1683. const m_XK_Hangul_RieulYeorinHieuh = 0x0eef
  1684. const m_XK_Hangul_Romaja = 0xff36
  1685. const m_XK_Hangul_SingleCandidate = 0xff3c
  1686. const m_XK_Hangul_Sios = 0x0eb5
  1687. const m_XK_Hangul_Special = 0xff3f
  1688. const m_XK_Hangul_SsangDikeud = 0x0ea8
  1689. const m_XK_Hangul_SsangJieuj = 0x0eb9
  1690. const m_XK_Hangul_SsangKiyeog = 0x0ea2
  1691. const m_XK_Hangul_SsangPieub = 0x0eb3
  1692. const m_XK_Hangul_SsangSios = 0x0eb6
  1693. const m_XK_Hangul_Start = 0xff32
  1694. const m_XK_Hangul_SunkyeongeumMieum = 0x0ef0
  1695. const m_XK_Hangul_SunkyeongeumPhieuf = 0x0ef4
  1696. const m_XK_Hangul_SunkyeongeumPieub = 0x0ef1
  1697. const m_XK_Hangul_Tieut = 0x0ebc
  1698. const m_XK_Hangul_U = 0x0ecc
  1699. const m_XK_Hangul_WA = 0x0ec8
  1700. const m_XK_Hangul_WAE = 0x0ec9
  1701. const m_XK_Hangul_WE = 0x0ece
  1702. const m_XK_Hangul_WEO = 0x0ecd
  1703. const m_XK_Hangul_WI = 0x0ecf
  1704. const m_XK_Hangul_YA = 0x0ec1
  1705. const m_XK_Hangul_YAE = 0x0ec2
  1706. const m_XK_Hangul_YE = 0x0ec6
  1707. const m_XK_Hangul_YEO = 0x0ec5
  1708. const m_XK_Hangul_YI = 0x0ed2
  1709. const m_XK_Hangul_YO = 0x0ecb
  1710. const m_XK_Hangul_YU = 0x0ed0
  1711. const m_XK_Hangul_YeorinHieuh = 0x0ef5
  1712. const m_XK_Hangul_switch = 0xff7e
  1713. const m_XK_Hankaku = 0xff29
  1714. const m_XK_Hcircumflex = 0x02a6
  1715. const m_XK_Hebrew_switch = 0xff7e
  1716. const m_XK_Help = 0xff6a
  1717. const m_XK_Henkan = 0xff23
  1718. const m_XK_Henkan_Mode = 0xff23
  1719. const m_XK_Hiragana = 0xff25
  1720. const m_XK_Hiragana_Katakana = 0xff27
  1721. const m_XK_Home = 0xff50
  1722. const m_XK_Hstroke = 0x02a1
  1723. const m_XK_Hyper_L = 0xffed
  1724. const m_XK_Hyper_R = 0xffee
  1725. const m_XK_I = 0x0049
  1726. const m_XK_ISO_Center_Object = 0xfe33
  1727. const m_XK_ISO_Continuous_Underline = 0xfe30
  1728. const m_XK_ISO_Discontinuous_Underline = 0xfe31
  1729. const m_XK_ISO_Emphasize = 0xfe32
  1730. const m_XK_ISO_Enter = 0xfe34
  1731. const m_XK_ISO_Fast_Cursor_Down = 0xfe2f
  1732. const m_XK_ISO_Fast_Cursor_Left = 0xfe2c
  1733. const m_XK_ISO_Fast_Cursor_Right = 0xfe2d
  1734. const m_XK_ISO_Fast_Cursor_Up = 0xfe2e
  1735. const m_XK_ISO_First_Group = 0xfe0c
  1736. const m_XK_ISO_First_Group_Lock = 0xfe0d
  1737. const m_XK_ISO_Group_Latch = 0xfe06
  1738. const m_XK_ISO_Group_Lock = 0xfe07
  1739. const m_XK_ISO_Group_Shift = 0xff7e
  1740. const m_XK_ISO_Last_Group = 0xfe0e
  1741. const m_XK_ISO_Last_Group_Lock = 0xfe0f
  1742. const m_XK_ISO_Left_Tab = 0xfe20
  1743. const m_XK_ISO_Level2_Latch = 0xfe02
  1744. const m_XK_ISO_Level3_Latch = 0xfe04
  1745. const m_XK_ISO_Level3_Lock = 0xfe05
  1746. const m_XK_ISO_Level3_Shift = 0xfe03
  1747. const m_XK_ISO_Level5_Latch = 0xfe12
  1748. const m_XK_ISO_Level5_Lock = 0xfe13
  1749. const m_XK_ISO_Level5_Shift = 0xfe11
  1750. const m_XK_ISO_Lock = 0xfe01
  1751. const m_XK_ISO_Move_Line_Down = 0xfe22
  1752. const m_XK_ISO_Move_Line_Up = 0xfe21
  1753. const m_XK_ISO_Next_Group = 0xfe08
  1754. const m_XK_ISO_Next_Group_Lock = 0xfe09
  1755. const m_XK_ISO_Partial_Line_Down = 0xfe24
  1756. const m_XK_ISO_Partial_Line_Up = 0xfe23
  1757. const m_XK_ISO_Partial_Space_Left = 0xfe25
  1758. const m_XK_ISO_Partial_Space_Right = 0xfe26
  1759. const m_XK_ISO_Prev_Group = 0xfe0a
  1760. const m_XK_ISO_Prev_Group_Lock = 0xfe0b
  1761. const m_XK_ISO_Release_Both_Margins = 0xfe2b
  1762. const m_XK_ISO_Release_Margin_Left = 0xfe29
  1763. const m_XK_ISO_Release_Margin_Right = 0xfe2a
  1764. const m_XK_ISO_Set_Margin_Left = 0xfe27
  1765. const m_XK_ISO_Set_Margin_Right = 0xfe28
  1766. const m_XK_Iabovedot = 0x02a9
  1767. const m_XK_Iacute = 0x00cd
  1768. const m_XK_Ibelowdot = 0x1001eca
  1769. const m_XK_Ibreve = 0x100012c
  1770. const m_XK_Icircumflex = 0x00ce
  1771. const m_XK_Idiaeresis = 0x00cf
  1772. const m_XK_Igrave = 0x00cc
  1773. const m_XK_Ihook = 0x1001ec8
  1774. const m_XK_Imacron = 0x03cf
  1775. const m_XK_Insert = 0xff63
  1776. const m_XK_Iogonek = 0x03c7
  1777. const m_XK_Itilde = 0x03a5
  1778. const m_XK_J = 0x004a
  1779. const m_XK_Jcircumflex = 0x02ac
  1780. const m_XK_K = 0x004b
  1781. const m_XK_KP_0 = 0xffb0
  1782. const m_XK_KP_1 = 0xffb1
  1783. const m_XK_KP_2 = 0xffb2
  1784. const m_XK_KP_3 = 0xffb3
  1785. const m_XK_KP_4 = 0xffb4
  1786. const m_XK_KP_5 = 0xffb5
  1787. const m_XK_KP_6 = 0xffb6
  1788. const m_XK_KP_7 = 0xffb7
  1789. const m_XK_KP_8 = 0xffb8
  1790. const m_XK_KP_9 = 0xffb9
  1791. const m_XK_KP_Add = 0xffab
  1792. const m_XK_KP_Begin = 0xff9d
  1793. const m_XK_KP_Decimal = 0xffae
  1794. const m_XK_KP_Delete = 0xff9f
  1795. const m_XK_KP_Divide = 0xffaf
  1796. const m_XK_KP_Down = 0xff99
  1797. const m_XK_KP_End = 0xff9c
  1798. const m_XK_KP_Enter = 0xff8d
  1799. const m_XK_KP_Equal = 0xffbd
  1800. const m_XK_KP_F1 = 0xff91
  1801. const m_XK_KP_F2 = 0xff92
  1802. const m_XK_KP_F3 = 0xff93
  1803. const m_XK_KP_F4 = 0xff94
  1804. const m_XK_KP_Home = 0xff95
  1805. const m_XK_KP_Insert = 0xff9e
  1806. const m_XK_KP_Left = 0xff96
  1807. const m_XK_KP_Multiply = 0xffaa
  1808. const m_XK_KP_Next = 0xff9b
  1809. const m_XK_KP_Page_Down = 0xff9b
  1810. const m_XK_KP_Page_Up = 0xff9a
  1811. const m_XK_KP_Prior = 0xff9a
  1812. const m_XK_KP_Right = 0xff98
  1813. const m_XK_KP_Separator = 0xffac
  1814. const m_XK_KP_Space = 0xff80
  1815. const m_XK_KP_Subtract = 0xffad
  1816. const m_XK_KP_Tab = 0xff89
  1817. const m_XK_KP_Up = 0xff97
  1818. const m_XK_Kana_Lock = 0xff2d
  1819. const m_XK_Kana_Shift = 0xff2e
  1820. const m_XK_Kanji = 0xff21
  1821. const m_XK_Kanji_Bangou = 0xff37
  1822. const m_XK_Katakana = 0xff26
  1823. const m_XK_Kcedilla = 0x03d3
  1824. const m_XK_Korean_Won = 0x0eff
  1825. const m_XK_L = 0x004c
  1826. const m_XK_L1 = 0xffc8
  1827. const m_XK_L10 = 0xffd1
  1828. const m_XK_L2 = 0xffc9
  1829. const m_XK_L3 = 0xffca
  1830. const m_XK_L4 = 0xffcb
  1831. const m_XK_L5 = 0xffcc
  1832. const m_XK_L6 = 0xffcd
  1833. const m_XK_L7 = 0xffce
  1834. const m_XK_L8 = 0xffcf
  1835. const m_XK_L9 = 0xffd0
  1836. const m_XK_Lacute = 0x01c5
  1837. const m_XK_Last_Virtual_Screen = 0xfed4
  1838. const m_XK_Lbelowdot = 0x1001e36
  1839. const m_XK_Lcaron = 0x01a5
  1840. const m_XK_Lcedilla = 0x03a6
  1841. const m_XK_Left = 0xff51
  1842. const m_XK_Linefeed = 0xff0a
  1843. const m_XK_LiraSign = 0x10020a4
  1844. const m_XK_Lstroke = 0x01a3
  1845. const m_XK_M = 0x004d
  1846. const m_XK_Mabovedot = 0x1001e40
  1847. const m_XK_Macedonia_DSE = 0x06b5
  1848. const m_XK_Macedonia_GJE = 0x06b2
  1849. const m_XK_Macedonia_KJE = 0x06bc
  1850. const m_XK_Macedonia_dse = 0x06a5
  1851. const m_XK_Macedonia_gje = 0x06a2
  1852. const m_XK_Macedonia_kje = 0x06ac
  1853. const m_XK_Mae_Koho = 0xff3e
  1854. const m_XK_Massyo = 0xff2c
  1855. const m_XK_Menu = 0xff67
  1856. const m_XK_Meta_L = 0xffe7
  1857. const m_XK_Meta_R = 0xffe8
  1858. const m_XK_MillSign = 0x10020a5
  1859. const m_XK_Mode_switch = 0xff7e
  1860. const m_XK_MouseKeys_Accel_Enable = 0xfe77
  1861. const m_XK_MouseKeys_Enable = 0xfe76
  1862. const m_XK_Muhenkan = 0xff22
  1863. const m_XK_Multi_key = 0xff20
  1864. const m_XK_MultipleCandidate = 0xff3d
  1865. const m_XK_N = 0x004e
  1866. const m_XK_Nacute = 0x01d1
  1867. const m_XK_NairaSign = 0x10020a6
  1868. const m_XK_Ncaron = 0x01d2
  1869. const m_XK_Ncedilla = 0x03d1
  1870. const m_XK_NewSheqelSign = 0x10020aa
  1871. const m_XK_Next = 0xff56
  1872. const m_XK_Next_Virtual_Screen = 0xfed2
  1873. const m_XK_Ntilde = 0x00d1
  1874. const m_XK_Num_Lock = 0xff7f
  1875. const m_XK_O = 0x004f
  1876. const m_XK_OE = 0x13bc
  1877. const m_XK_Oacute = 0x00d3
  1878. const m_XK_Obarred = 0x100019f
  1879. const m_XK_Obelowdot = 0x1001ecc
  1880. const m_XK_Ocaron = 0x10001d1
  1881. const m_XK_Ocircumflex = 0x00d4
  1882. const m_XK_Ocircumflexacute = 0x1001ed0
  1883. const m_XK_Ocircumflexbelowdot = 0x1001ed8
  1884. const m_XK_Ocircumflexgrave = 0x1001ed2
  1885. const m_XK_Ocircumflexhook = 0x1001ed4
  1886. const m_XK_Ocircumflextilde = 0x1001ed6
  1887. const m_XK_Odiaeresis = 0x00d6
  1888. const m_XK_Odoubleacute = 0x01d5
  1889. const m_XK_Ograve = 0x00d2
  1890. const m_XK_Ohook = 0x1001ece
  1891. const m_XK_Ohorn = 0x10001a0
  1892. const m_XK_Ohornacute = 0x1001eda
  1893. const m_XK_Ohornbelowdot = 0x1001ee2
  1894. const m_XK_Ohorngrave = 0x1001edc
  1895. const m_XK_Ohornhook = 0x1001ede
  1896. const m_XK_Ohorntilde = 0x1001ee0
  1897. const m_XK_Omacron = 0x03d2
  1898. const m_XK_Ooblique = 0x00d8
  1899. const m_XK_Oslash = 0x00d8
  1900. const m_XK_Otilde = 0x00d5
  1901. const m_XK_Overlay1_Enable = 0xfe78
  1902. const m_XK_Overlay2_Enable = 0xfe79
  1903. const m_XK_P = 0x0050
  1904. const m_XK_Pabovedot = 0x1001e56
  1905. const m_XK_Page_Down = 0xff56
  1906. const m_XK_Page_Up = 0xff55
  1907. const m_XK_Pause = 0xff13
  1908. const m_XK_PesetaSign = 0x10020a7
  1909. const m_XK_Pointer_Accelerate = 0xfefa
  1910. const m_XK_Pointer_Button1 = 0xfee9
  1911. const m_XK_Pointer_Button2 = 0xfeea
  1912. const m_XK_Pointer_Button3 = 0xfeeb
  1913. const m_XK_Pointer_Button4 = 0xfeec
  1914. const m_XK_Pointer_Button5 = 0xfeed
  1915. const m_XK_Pointer_Button_Dflt = 0xfee8
  1916. const m_XK_Pointer_DblClick1 = 0xfeef
  1917. const m_XK_Pointer_DblClick2 = 0xfef0
  1918. const m_XK_Pointer_DblClick3 = 0xfef1
  1919. const m_XK_Pointer_DblClick4 = 0xfef2
  1920. const m_XK_Pointer_DblClick5 = 0xfef3
  1921. const m_XK_Pointer_DblClick_Dflt = 0xfeee
  1922. const m_XK_Pointer_DfltBtnNext = 0xfefb
  1923. const m_XK_Pointer_DfltBtnPrev = 0xfefc
  1924. const m_XK_Pointer_Down = 0xfee3
  1925. const m_XK_Pointer_DownLeft = 0xfee6
  1926. const m_XK_Pointer_DownRight = 0xfee7
  1927. const m_XK_Pointer_Drag1 = 0xfef5
  1928. const m_XK_Pointer_Drag2 = 0xfef6
  1929. const m_XK_Pointer_Drag3 = 0xfef7
  1930. const m_XK_Pointer_Drag4 = 0xfef8
  1931. const m_XK_Pointer_Drag5 = 0xfefd
  1932. const m_XK_Pointer_Drag_Dflt = 0xfef4
  1933. const m_XK_Pointer_EnableKeys = 0xfef9
  1934. const m_XK_Pointer_Left = 0xfee0
  1935. const m_XK_Pointer_Right = 0xfee1
  1936. const m_XK_Pointer_Up = 0xfee2
  1937. const m_XK_Pointer_UpLeft = 0xfee4
  1938. const m_XK_Pointer_UpRight = 0xfee5
  1939. const m_XK_Prev_Virtual_Screen = 0xfed1
  1940. const m_XK_PreviousCandidate = 0xff3e
  1941. const m_XK_Print = 0xff61
  1942. const m_XK_Prior = 0xff55
  1943. const m_XK_Q = 0x0051
  1944. const m_XK_R = 0x0052
  1945. const m_XK_R1 = 0xffd2
  1946. const m_XK_R10 = 0xffdb
  1947. const m_XK_R11 = 0xffdc
  1948. const m_XK_R12 = 0xffdd
  1949. const m_XK_R13 = 0xffde
  1950. const m_XK_R14 = 0xffdf
  1951. const m_XK_R15 = 0xffe0
  1952. const m_XK_R2 = 0xffd3
  1953. const m_XK_R3 = 0xffd4
  1954. const m_XK_R4 = 0xffd5
  1955. const m_XK_R5 = 0xffd6
  1956. const m_XK_R6 = 0xffd7
  1957. const m_XK_R7 = 0xffd8
  1958. const m_XK_R8 = 0xffd9
  1959. const m_XK_R9 = 0xffda
  1960. const m_XK_Racute = 0x01c0
  1961. const m_XK_Rcaron = 0x01d8
  1962. const m_XK_Rcedilla = 0x03a3
  1963. const m_XK_Redo = 0xff66
  1964. const m_XK_RepeatKeys_Enable = 0xfe72
  1965. const m_XK_Return = 0xff0d
  1966. const m_XK_Right = 0xff53
  1967. const m_XK_Romaji = 0xff24
  1968. const m_XK_RupeeSign = 0x10020a8
  1969. const m_XK_S = 0x0053
  1970. const m_XK_SCHWA = 0x100018f
  1971. const m_XK_Sabovedot = 0x1001e60
  1972. const m_XK_Sacute = 0x01a6
  1973. const m_XK_Scaron = 0x01a9
  1974. const m_XK_Scedilla = 0x01aa
  1975. const m_XK_Scircumflex = 0x02de
  1976. const m_XK_Scroll_Lock = 0xff14
  1977. const m_XK_Select = 0xff60
  1978. const m_XK_Serbian_DJE = 0x06b1
  1979. const m_XK_Serbian_DZE = 0x06bf
  1980. const m_XK_Serbian_JE = 0x06b8
  1981. const m_XK_Serbian_LJE = 0x06b9
  1982. const m_XK_Serbian_NJE = 0x06ba
  1983. const m_XK_Serbian_TSHE = 0x06bb
  1984. const m_XK_Serbian_dje = 0x06a1
  1985. const m_XK_Serbian_dze = 0x06af
  1986. const m_XK_Serbian_je = 0x06a8
  1987. const m_XK_Serbian_lje = 0x06a9
  1988. const m_XK_Serbian_nje = 0x06aa
  1989. const m_XK_Serbian_tshe = 0x06ab
  1990. const m_XK_Shift_L = 0xffe1
  1991. const m_XK_Shift_Lock = 0xffe6
  1992. const m_XK_Shift_R = 0xffe2
  1993. const m_XK_SingleCandidate = 0xff3c
  1994. const m_XK_Sinh_a = 0x1000d85
  1995. const m_XK_Sinh_aa = 0x1000d86
  1996. const m_XK_Sinh_aa2 = 0x1000dcf
  1997. const m_XK_Sinh_ae = 0x1000d87
  1998. const m_XK_Sinh_ae2 = 0x1000dd0
  1999. const m_XK_Sinh_aee = 0x1000d88
  2000. const m_XK_Sinh_aee2 = 0x1000dd1
  2001. const m_XK_Sinh_ai = 0x1000d93
  2002. const m_XK_Sinh_ai2 = 0x1000ddb
  2003. const m_XK_Sinh_al = 0x1000dca
  2004. const m_XK_Sinh_au = 0x1000d96
  2005. const m_XK_Sinh_au2 = 0x1000dde
  2006. const m_XK_Sinh_ba = 0x1000db6
  2007. const m_XK_Sinh_bha = 0x1000db7
  2008. const m_XK_Sinh_ca = 0x1000da0
  2009. const m_XK_Sinh_cha = 0x1000da1
  2010. const m_XK_Sinh_dda = 0x1000da9
  2011. const m_XK_Sinh_ddha = 0x1000daa
  2012. const m_XK_Sinh_dha = 0x1000daf
  2013. const m_XK_Sinh_dhha = 0x1000db0
  2014. const m_XK_Sinh_e = 0x1000d91
  2015. const m_XK_Sinh_e2 = 0x1000dd9
  2016. const m_XK_Sinh_ee = 0x1000d92
  2017. const m_XK_Sinh_ee2 = 0x1000dda
  2018. const m_XK_Sinh_fa = 0x1000dc6
  2019. const m_XK_Sinh_ga = 0x1000d9c
  2020. const m_XK_Sinh_gha = 0x1000d9d
  2021. const m_XK_Sinh_h2 = 0x1000d83
  2022. const m_XK_Sinh_ha = 0x1000dc4
  2023. const m_XK_Sinh_i = 0x1000d89
  2024. const m_XK_Sinh_i2 = 0x1000dd2
  2025. const m_XK_Sinh_ii = 0x1000d8a
  2026. const m_XK_Sinh_ii2 = 0x1000dd3
  2027. const m_XK_Sinh_ja = 0x1000da2
  2028. const m_XK_Sinh_jha = 0x1000da3
  2029. const m_XK_Sinh_jnya = 0x1000da5
  2030. const m_XK_Sinh_ka = 0x1000d9a
  2031. const m_XK_Sinh_kha = 0x1000d9b
  2032. const m_XK_Sinh_kunddaliya = 0x1000df4
  2033. const m_XK_Sinh_la = 0x1000dbd
  2034. const m_XK_Sinh_lla = 0x1000dc5
  2035. const m_XK_Sinh_lu = 0x1000d8f
  2036. const m_XK_Sinh_lu2 = 0x1000ddf
  2037. const m_XK_Sinh_luu = 0x1000d90
  2038. const m_XK_Sinh_luu2 = 0x1000df3
  2039. const m_XK_Sinh_ma = 0x1000db8
  2040. const m_XK_Sinh_mba = 0x1000db9
  2041. const m_XK_Sinh_na = 0x1000db1
  2042. const m_XK_Sinh_ndda = 0x1000dac
  2043. const m_XK_Sinh_ndha = 0x1000db3
  2044. const m_XK_Sinh_ng = 0x1000d82
  2045. const m_XK_Sinh_ng2 = 0x1000d9e
  2046. const m_XK_Sinh_nga = 0x1000d9f
  2047. const m_XK_Sinh_nja = 0x1000da6
  2048. const m_XK_Sinh_nna = 0x1000dab
  2049. const m_XK_Sinh_nya = 0x1000da4
  2050. const m_XK_Sinh_o = 0x1000d94
  2051. const m_XK_Sinh_o2 = 0x1000ddc
  2052. const m_XK_Sinh_oo = 0x1000d95
  2053. const m_XK_Sinh_oo2 = 0x1000ddd
  2054. const m_XK_Sinh_pa = 0x1000db4
  2055. const m_XK_Sinh_pha = 0x1000db5
  2056. const m_XK_Sinh_ra = 0x1000dbb
  2057. const m_XK_Sinh_ri = 0x1000d8d
  2058. const m_XK_Sinh_rii = 0x1000d8e
  2059. const m_XK_Sinh_ru2 = 0x1000dd8
  2060. const m_XK_Sinh_ruu2 = 0x1000df2
  2061. const m_XK_Sinh_sa = 0x1000dc3
  2062. const m_XK_Sinh_sha = 0x1000dc1
  2063. const m_XK_Sinh_ssha = 0x1000dc2
  2064. const m_XK_Sinh_tha = 0x1000dad
  2065. const m_XK_Sinh_thha = 0x1000dae
  2066. const m_XK_Sinh_tta = 0x1000da7
  2067. const m_XK_Sinh_ttha = 0x1000da8
  2068. const m_XK_Sinh_u = 0x1000d8b
  2069. const m_XK_Sinh_u2 = 0x1000dd4
  2070. const m_XK_Sinh_uu = 0x1000d8c
  2071. const m_XK_Sinh_uu2 = 0x1000dd6
  2072. const m_XK_Sinh_va = 0x1000dc0
  2073. const m_XK_Sinh_ya = 0x1000dba
  2074. const m_XK_SlowKeys_Enable = 0xfe73
  2075. const m_XK_StickyKeys_Enable = 0xfe75
  2076. const m_XK_Super_L = 0xffeb
  2077. const m_XK_Super_R = 0xffec
  2078. const m_XK_Sys_Req = 0xff15
  2079. const m_XK_T = 0x0054
  2080. const m_XK_THORN = 0x00de
  2081. const m_XK_Tab = 0xff09
  2082. const m_XK_Tabovedot = 0x1001e6a
  2083. const m_XK_Tcaron = 0x01ab
  2084. const m_XK_Tcedilla = 0x01de
  2085. const m_XK_Terminate_Server = 0xfed5
  2086. const m_XK_Thai_baht = 0x0ddf
  2087. const m_XK_Thai_bobaimai = 0x0dba
  2088. const m_XK_Thai_chochan = 0x0da8
  2089. const m_XK_Thai_chochang = 0x0daa
  2090. const m_XK_Thai_choching = 0x0da9
  2091. const m_XK_Thai_chochoe = 0x0dac
  2092. const m_XK_Thai_dochada = 0x0dae
  2093. const m_XK_Thai_dodek = 0x0db4
  2094. const m_XK_Thai_fofa = 0x0dbd
  2095. const m_XK_Thai_fofan = 0x0dbf
  2096. const m_XK_Thai_hohip = 0x0dcb
  2097. const m_XK_Thai_honokhuk = 0x0dce
  2098. const m_XK_Thai_khokhai = 0x0da2
  2099. const m_XK_Thai_khokhon = 0x0da5
  2100. const m_XK_Thai_khokhuat = 0x0da3
  2101. const m_XK_Thai_khokhwai = 0x0da4
  2102. const m_XK_Thai_khorakhang = 0x0da6
  2103. const m_XK_Thai_kokai = 0x0da1
  2104. const m_XK_Thai_lakkhangyao = 0x0de5
  2105. const m_XK_Thai_lekchet = 0x0df7
  2106. const m_XK_Thai_lekha = 0x0df5
  2107. const m_XK_Thai_lekhok = 0x0df6
  2108. const m_XK_Thai_lekkao = 0x0df9
  2109. const m_XK_Thai_leknung = 0x0df1
  2110. const m_XK_Thai_lekpaet = 0x0df8
  2111. const m_XK_Thai_leksam = 0x0df3
  2112. const m_XK_Thai_leksi = 0x0df4
  2113. const m_XK_Thai_leksong = 0x0df2
  2114. const m_XK_Thai_leksun = 0x0df0
  2115. const m_XK_Thai_lochula = 0x0dcc
  2116. const m_XK_Thai_loling = 0x0dc5
  2117. const m_XK_Thai_lu = 0x0dc6
  2118. const m_XK_Thai_maichattawa = 0x0deb
  2119. const m_XK_Thai_maiek = 0x0de8
  2120. const m_XK_Thai_maihanakat = 0x0dd1
  2121. const m_XK_Thai_maihanakat_maitho = 0x0dde
  2122. const m_XK_Thai_maitaikhu = 0x0de7
  2123. const m_XK_Thai_maitho = 0x0de9
  2124. const m_XK_Thai_maitri = 0x0dea
  2125. const m_XK_Thai_maiyamok = 0x0de6
  2126. const m_XK_Thai_moma = 0x0dc1
  2127. const m_XK_Thai_ngongu = 0x0da7
  2128. const m_XK_Thai_nikhahit = 0x0ded
  2129. const m_XK_Thai_nonen = 0x0db3
  2130. const m_XK_Thai_nonu = 0x0db9
  2131. const m_XK_Thai_oang = 0x0dcd
  2132. const m_XK_Thai_paiyannoi = 0x0dcf
  2133. const m_XK_Thai_phinthu = 0x0dda
  2134. const m_XK_Thai_phophan = 0x0dbe
  2135. const m_XK_Thai_phophung = 0x0dbc
  2136. const m_XK_Thai_phosamphao = 0x0dc0
  2137. const m_XK_Thai_popla = 0x0dbb
  2138. const m_XK_Thai_rorua = 0x0dc3
  2139. const m_XK_Thai_ru = 0x0dc4
  2140. const m_XK_Thai_saraa = 0x0dd0
  2141. const m_XK_Thai_saraaa = 0x0dd2
  2142. const m_XK_Thai_saraae = 0x0de1
  2143. const m_XK_Thai_saraaimaimalai = 0x0de4
  2144. const m_XK_Thai_saraaimaimuan = 0x0de3
  2145. const m_XK_Thai_saraam = 0x0dd3
  2146. const m_XK_Thai_sarae = 0x0de0
  2147. const m_XK_Thai_sarai = 0x0dd4
  2148. const m_XK_Thai_saraii = 0x0dd5
  2149. const m_XK_Thai_sarao = 0x0de2
  2150. const m_XK_Thai_sarau = 0x0dd8
  2151. const m_XK_Thai_saraue = 0x0dd6
  2152. const m_XK_Thai_sarauee = 0x0dd7
  2153. const m_XK_Thai_sarauu = 0x0dd9
  2154. const m_XK_Thai_sorusi = 0x0dc9
  2155. const m_XK_Thai_sosala = 0x0dc8
  2156. const m_XK_Thai_soso = 0x0dab
  2157. const m_XK_Thai_sosua = 0x0dca
  2158. const m_XK_Thai_thanthakhat = 0x0dec
  2159. const m_XK_Thai_thonangmontho = 0x0db1
  2160. const m_XK_Thai_thophuthao = 0x0db2
  2161. const m_XK_Thai_thothahan = 0x0db7
  2162. const m_XK_Thai_thothan = 0x0db0
  2163. const m_XK_Thai_thothong = 0x0db8
  2164. const m_XK_Thai_thothung = 0x0db6
  2165. const m_XK_Thai_topatak = 0x0daf
  2166. const m_XK_Thai_totao = 0x0db5
  2167. const m_XK_Thai_wowaen = 0x0dc7
  2168. const m_XK_Thai_yoyak = 0x0dc2
  2169. const m_XK_Thai_yoying = 0x0dad
  2170. const m_XK_Thorn = 0x00de
  2171. const m_XK_Touroku = 0xff2b
  2172. const m_XK_Tslash = 0x03ac
  2173. const m_XK_U = 0x0055
  2174. const m_XK_Uacute = 0x00da
  2175. const m_XK_Ubelowdot = 0x1001ee4
  2176. const m_XK_Ubreve = 0x02dd
  2177. const m_XK_Ucircumflex = 0x00db
  2178. const m_XK_Udiaeresis = 0x00dc
  2179. const m_XK_Udoubleacute = 0x01db
  2180. const m_XK_Ugrave = 0x00d9
  2181. const m_XK_Uhook = 0x1001ee6
  2182. const m_XK_Uhorn = 0x10001af
  2183. const m_XK_Uhornacute = 0x1001ee8
  2184. const m_XK_Uhornbelowdot = 0x1001ef0
  2185. const m_XK_Uhorngrave = 0x1001eea
  2186. const m_XK_Uhornhook = 0x1001eec
  2187. const m_XK_Uhorntilde = 0x1001eee
  2188. const m_XK_Ukrainian_GHE_WITH_UPTURN = 0x06bd
  2189. const m_XK_Ukrainian_I = 0x06b6
  2190. const m_XK_Ukrainian_IE = 0x06b4
  2191. const m_XK_Ukrainian_YI = 0x06b7
  2192. const m_XK_Ukrainian_ghe_with_upturn = 0x06ad
  2193. const m_XK_Ukrainian_i = 0x06a6
  2194. const m_XK_Ukrainian_ie = 0x06a4
  2195. const m_XK_Ukrainian_yi = 0x06a7
  2196. const m_XK_Ukranian_I = 0x06b6
  2197. const m_XK_Ukranian_JE = 0x06b4
  2198. const m_XK_Ukranian_YI = 0x06b7
  2199. const m_XK_Ukranian_i = 0x06a6
  2200. const m_XK_Ukranian_je = 0x06a4
  2201. const m_XK_Ukranian_yi = 0x06a7
  2202. const m_XK_Umacron = 0x03de
  2203. const m_XK_Undo = 0xff65
  2204. const m_XK_Uogonek = 0x03d9
  2205. const m_XK_Up = 0xff52
  2206. const m_XK_Uring = 0x01d9
  2207. const m_XK_Utilde = 0x03dd
  2208. const m_XK_V = 0x0056
  2209. const m_XK_VoidSymbol = 0xffffff
  2210. const m_XK_W = 0x0057
  2211. const m_XK_Wacute = 0x1001e82
  2212. const m_XK_Wcircumflex = 0x1000174
  2213. const m_XK_Wdiaeresis = 0x1001e84
  2214. const m_XK_Wgrave = 0x1001e80
  2215. const m_XK_WonSign = 0x10020a9
  2216. const m_XK_X = 0x0058
  2217. const m_XK_Xabovedot = 0x1001e8a
  2218. const m_XK_Y = 0x0059
  2219. const m_XK_Yacute = 0x00dd
  2220. const m_XK_Ybelowdot = 0x1001ef4
  2221. const m_XK_Ycircumflex = 0x1000176
  2222. const m_XK_Ydiaeresis = 0x13be
  2223. const m_XK_Ygrave = 0x1001ef2
  2224. const m_XK_Yhook = 0x1001ef6
  2225. const m_XK_Ytilde = 0x1001ef8
  2226. const m_XK_Z = 0x005a
  2227. const m_XK_Zabovedot = 0x01af
  2228. const m_XK_Zacute = 0x01ac
  2229. const m_XK_Zcaron = 0x01ae
  2230. const m_XK_Zen_Koho = 0xff3d
  2231. const m_XK_Zenkaku = 0xff28
  2232. const m_XK_Zenkaku_Hankaku = 0xff2a
  2233. const m_XK_Zstroke = 0x10001b5
  2234. const m_XK_a = 0x0061
  2235. const m_XK_aacute = 0x00e1
  2236. const m_XK_abelowdot = 0x1001ea1
  2237. const m_XK_abovedot = 0x01ff
  2238. const m_XK_abreve = 0x01e3
  2239. const m_XK_abreveacute = 0x1001eaf
  2240. const m_XK_abrevebelowdot = 0x1001eb7
  2241. const m_XK_abrevegrave = 0x1001eb1
  2242. const m_XK_abrevehook = 0x1001eb3
  2243. const m_XK_abrevetilde = 0x1001eb5
  2244. const m_XK_acircumflex = 0x00e2
  2245. const m_XK_acircumflexacute = 0x1001ea5
  2246. const m_XK_acircumflexbelowdot = 0x1001ead
  2247. const m_XK_acircumflexgrave = 0x1001ea7
  2248. const m_XK_acircumflexhook = 0x1001ea9
  2249. const m_XK_acircumflextilde = 0x1001eab
  2250. const m_XK_acute = 0x00b4
  2251. const m_XK_adiaeresis = 0x00e4
  2252. const m_XK_ae = 0x00e6
  2253. const m_XK_agrave = 0x00e0
  2254. const m_XK_ahook = 0x1001ea3
  2255. const m_XK_amacron = 0x03e0
  2256. const m_XK_ampersand = 0x0026
  2257. const m_XK_aogonek = 0x01b1
  2258. const m_XK_apostrophe = 0x0027
  2259. const m_XK_approxeq = 0x1002248
  2260. const m_XK_aring = 0x00e5
  2261. const m_XK_asciicircum = 0x005e
  2262. const m_XK_asciitilde = 0x007e
  2263. const m_XK_asterisk = 0x002a
  2264. const m_XK_at = 0x0040
  2265. const m_XK_atilde = 0x00e3
  2266. const m_XK_b = 0x0062
  2267. const m_XK_babovedot = 0x1001e03
  2268. const m_XK_backslash = 0x005c
  2269. const m_XK_bar = 0x007c
  2270. const m_XK_because = 0x1002235
  2271. const m_XK_braceleft = 0x007b
  2272. const m_XK_braceright = 0x007d
  2273. const m_XK_bracketleft = 0x005b
  2274. const m_XK_bracketright = 0x005d
  2275. const m_XK_braille_blank = 0x1002800
  2276. const m_XK_braille_dot_1 = 0xfff1
  2277. const m_XK_braille_dot_10 = 0xfffa
  2278. const m_XK_braille_dot_2 = 0xfff2
  2279. const m_XK_braille_dot_3 = 0xfff3
  2280. const m_XK_braille_dot_4 = 0xfff4
  2281. const m_XK_braille_dot_5 = 0xfff5
  2282. const m_XK_braille_dot_6 = 0xfff6
  2283. const m_XK_braille_dot_7 = 0xfff7
  2284. const m_XK_braille_dot_8 = 0xfff8
  2285. const m_XK_braille_dot_9 = 0xfff9
  2286. const m_XK_braille_dots_1 = 0x1002801
  2287. const m_XK_braille_dots_12 = 0x1002803
  2288. const m_XK_braille_dots_123 = 0x1002807
  2289. const m_XK_braille_dots_1234 = 0x100280f
  2290. const m_XK_braille_dots_12345 = 0x100281f
  2291. const m_XK_braille_dots_123456 = 0x100283f
  2292. const m_XK_braille_dots_1234567 = 0x100287f
  2293. const m_XK_braille_dots_12345678 = 0x10028ff
  2294. const m_XK_braille_dots_1234568 = 0x10028bf
  2295. const m_XK_braille_dots_123457 = 0x100285f
  2296. const m_XK_braille_dots_1234578 = 0x10028df
  2297. const m_XK_braille_dots_123458 = 0x100289f
  2298. const m_XK_braille_dots_12346 = 0x100282f
  2299. const m_XK_braille_dots_123467 = 0x100286f
  2300. const m_XK_braille_dots_1234678 = 0x10028ef
  2301. const m_XK_braille_dots_123468 = 0x10028af
  2302. const m_XK_braille_dots_12347 = 0x100284f
  2303. const m_XK_braille_dots_123478 = 0x10028cf
  2304. const m_XK_braille_dots_12348 = 0x100288f
  2305. const m_XK_braille_dots_1235 = 0x1002817
  2306. const m_XK_braille_dots_12356 = 0x1002837
  2307. const m_XK_braille_dots_123567 = 0x1002877
  2308. const m_XK_braille_dots_1235678 = 0x10028f7
  2309. const m_XK_braille_dots_123568 = 0x10028b7
  2310. const m_XK_braille_dots_12357 = 0x1002857
  2311. const m_XK_braille_dots_123578 = 0x10028d7
  2312. const m_XK_braille_dots_12358 = 0x1002897
  2313. const m_XK_braille_dots_1236 = 0x1002827
  2314. const m_XK_braille_dots_12367 = 0x1002867
  2315. const m_XK_braille_dots_123678 = 0x10028e7
  2316. const m_XK_braille_dots_12368 = 0x10028a7
  2317. const m_XK_braille_dots_1237 = 0x1002847
  2318. const m_XK_braille_dots_12378 = 0x10028c7
  2319. const m_XK_braille_dots_1238 = 0x1002887
  2320. const m_XK_braille_dots_124 = 0x100280b
  2321. const m_XK_braille_dots_1245 = 0x100281b
  2322. const m_XK_braille_dots_12456 = 0x100283b
  2323. const m_XK_braille_dots_124567 = 0x100287b
  2324. const m_XK_braille_dots_1245678 = 0x10028fb
  2325. const m_XK_braille_dots_124568 = 0x10028bb
  2326. const m_XK_braille_dots_12457 = 0x100285b
  2327. const m_XK_braille_dots_124578 = 0x10028db
  2328. const m_XK_braille_dots_12458 = 0x100289b
  2329. const m_XK_braille_dots_1246 = 0x100282b
  2330. const m_XK_braille_dots_12467 = 0x100286b
  2331. const m_XK_braille_dots_124678 = 0x10028eb
  2332. const m_XK_braille_dots_12468 = 0x10028ab
  2333. const m_XK_braille_dots_1247 = 0x100284b
  2334. const m_XK_braille_dots_12478 = 0x10028cb
  2335. const m_XK_braille_dots_1248 = 0x100288b
  2336. const m_XK_braille_dots_125 = 0x1002813
  2337. const m_XK_braille_dots_1256 = 0x1002833
  2338. const m_XK_braille_dots_12567 = 0x1002873
  2339. const m_XK_braille_dots_125678 = 0x10028f3
  2340. const m_XK_braille_dots_12568 = 0x10028b3
  2341. const m_XK_braille_dots_1257 = 0x1002853
  2342. const m_XK_braille_dots_12578 = 0x10028d3
  2343. const m_XK_braille_dots_1258 = 0x1002893
  2344. const m_XK_braille_dots_126 = 0x1002823
  2345. const m_XK_braille_dots_1267 = 0x1002863
  2346. const m_XK_braille_dots_12678 = 0x10028e3
  2347. const m_XK_braille_dots_1268 = 0x10028a3
  2348. const m_XK_braille_dots_127 = 0x1002843
  2349. const m_XK_braille_dots_1278 = 0x10028c3
  2350. const m_XK_braille_dots_128 = 0x1002883
  2351. const m_XK_braille_dots_13 = 0x1002805
  2352. const m_XK_braille_dots_134 = 0x100280d
  2353. const m_XK_braille_dots_1345 = 0x100281d
  2354. const m_XK_braille_dots_13456 = 0x100283d
  2355. const m_XK_braille_dots_134567 = 0x100287d
  2356. const m_XK_braille_dots_1345678 = 0x10028fd
  2357. const m_XK_braille_dots_134568 = 0x10028bd
  2358. const m_XK_braille_dots_13457 = 0x100285d
  2359. const m_XK_braille_dots_134578 = 0x10028dd
  2360. const m_XK_braille_dots_13458 = 0x100289d
  2361. const m_XK_braille_dots_1346 = 0x100282d
  2362. const m_XK_braille_dots_13467 = 0x100286d
  2363. const m_XK_braille_dots_134678 = 0x10028ed
  2364. const m_XK_braille_dots_13468 = 0x10028ad
  2365. const m_XK_braille_dots_1347 = 0x100284d
  2366. const m_XK_braille_dots_13478 = 0x10028cd
  2367. const m_XK_braille_dots_1348 = 0x100288d
  2368. const m_XK_braille_dots_135 = 0x1002815
  2369. const m_XK_braille_dots_1356 = 0x1002835
  2370. const m_XK_braille_dots_13567 = 0x1002875
  2371. const m_XK_braille_dots_135678 = 0x10028f5
  2372. const m_XK_braille_dots_13568 = 0x10028b5
  2373. const m_XK_braille_dots_1357 = 0x1002855
  2374. const m_XK_braille_dots_13578 = 0x10028d5
  2375. const m_XK_braille_dots_1358 = 0x1002895
  2376. const m_XK_braille_dots_136 = 0x1002825
  2377. const m_XK_braille_dots_1367 = 0x1002865
  2378. const m_XK_braille_dots_13678 = 0x10028e5
  2379. const m_XK_braille_dots_1368 = 0x10028a5
  2380. const m_XK_braille_dots_137 = 0x1002845
  2381. const m_XK_braille_dots_1378 = 0x10028c5
  2382. const m_XK_braille_dots_138 = 0x1002885
  2383. const m_XK_braille_dots_14 = 0x1002809
  2384. const m_XK_braille_dots_145 = 0x1002819
  2385. const m_XK_braille_dots_1456 = 0x1002839
  2386. const m_XK_braille_dots_14567 = 0x1002879
  2387. const m_XK_braille_dots_145678 = 0x10028f9
  2388. const m_XK_braille_dots_14568 = 0x10028b9
  2389. const m_XK_braille_dots_1457 = 0x1002859
  2390. const m_XK_braille_dots_14578 = 0x10028d9
  2391. const m_XK_braille_dots_1458 = 0x1002899
  2392. const m_XK_braille_dots_146 = 0x1002829
  2393. const m_XK_braille_dots_1467 = 0x1002869
  2394. const m_XK_braille_dots_14678 = 0x10028e9
  2395. const m_XK_braille_dots_1468 = 0x10028a9
  2396. const m_XK_braille_dots_147 = 0x1002849
  2397. const m_XK_braille_dots_1478 = 0x10028c9
  2398. const m_XK_braille_dots_148 = 0x1002889
  2399. const m_XK_braille_dots_15 = 0x1002811
  2400. const m_XK_braille_dots_156 = 0x1002831
  2401. const m_XK_braille_dots_1567 = 0x1002871
  2402. const m_XK_braille_dots_15678 = 0x10028f1
  2403. const m_XK_braille_dots_1568 = 0x10028b1
  2404. const m_XK_braille_dots_157 = 0x1002851
  2405. const m_XK_braille_dots_1578 = 0x10028d1
  2406. const m_XK_braille_dots_158 = 0x1002891
  2407. const m_XK_braille_dots_16 = 0x1002821
  2408. const m_XK_braille_dots_167 = 0x1002861
  2409. const m_XK_braille_dots_1678 = 0x10028e1
  2410. const m_XK_braille_dots_168 = 0x10028a1
  2411. const m_XK_braille_dots_17 = 0x1002841
  2412. const m_XK_braille_dots_178 = 0x10028c1
  2413. const m_XK_braille_dots_18 = 0x1002881
  2414. const m_XK_braille_dots_2 = 0x1002802
  2415. const m_XK_braille_dots_23 = 0x1002806
  2416. const m_XK_braille_dots_234 = 0x100280e
  2417. const m_XK_braille_dots_2345 = 0x100281e
  2418. const m_XK_braille_dots_23456 = 0x100283e
  2419. const m_XK_braille_dots_234567 = 0x100287e
  2420. const m_XK_braille_dots_2345678 = 0x10028fe
  2421. const m_XK_braille_dots_234568 = 0x10028be
  2422. const m_XK_braille_dots_23457 = 0x100285e
  2423. const m_XK_braille_dots_234578 = 0x10028de
  2424. const m_XK_braille_dots_23458 = 0x100289e
  2425. const m_XK_braille_dots_2346 = 0x100282e
  2426. const m_XK_braille_dots_23467 = 0x100286e
  2427. const m_XK_braille_dots_234678 = 0x10028ee
  2428. const m_XK_braille_dots_23468 = 0x10028ae
  2429. const m_XK_braille_dots_2347 = 0x100284e
  2430. const m_XK_braille_dots_23478 = 0x10028ce
  2431. const m_XK_braille_dots_2348 = 0x100288e
  2432. const m_XK_braille_dots_235 = 0x1002816
  2433. const m_XK_braille_dots_2356 = 0x1002836
  2434. const m_XK_braille_dots_23567 = 0x1002876
  2435. const m_XK_braille_dots_235678 = 0x10028f6
  2436. const m_XK_braille_dots_23568 = 0x10028b6
  2437. const m_XK_braille_dots_2357 = 0x1002856
  2438. const m_XK_braille_dots_23578 = 0x10028d6
  2439. const m_XK_braille_dots_2358 = 0x1002896
  2440. const m_XK_braille_dots_236 = 0x1002826
  2441. const m_XK_braille_dots_2367 = 0x1002866
  2442. const m_XK_braille_dots_23678 = 0x10028e6
  2443. const m_XK_braille_dots_2368 = 0x10028a6
  2444. const m_XK_braille_dots_237 = 0x1002846
  2445. const m_XK_braille_dots_2378 = 0x10028c6
  2446. const m_XK_braille_dots_238 = 0x1002886
  2447. const m_XK_braille_dots_24 = 0x100280a
  2448. const m_XK_braille_dots_245 = 0x100281a
  2449. const m_XK_braille_dots_2456 = 0x100283a
  2450. const m_XK_braille_dots_24567 = 0x100287a
  2451. const m_XK_braille_dots_245678 = 0x10028fa
  2452. const m_XK_braille_dots_24568 = 0x10028ba
  2453. const m_XK_braille_dots_2457 = 0x100285a
  2454. const m_XK_braille_dots_24578 = 0x10028da
  2455. const m_XK_braille_dots_2458 = 0x100289a
  2456. const m_XK_braille_dots_246 = 0x100282a
  2457. const m_XK_braille_dots_2467 = 0x100286a
  2458. const m_XK_braille_dots_24678 = 0x10028ea
  2459. const m_XK_braille_dots_2468 = 0x10028aa
  2460. const m_XK_braille_dots_247 = 0x100284a
  2461. const m_XK_braille_dots_2478 = 0x10028ca
  2462. const m_XK_braille_dots_248 = 0x100288a
  2463. const m_XK_braille_dots_25 = 0x1002812
  2464. const m_XK_braille_dots_256 = 0x1002832
  2465. const m_XK_braille_dots_2567 = 0x1002872
  2466. const m_XK_braille_dots_25678 = 0x10028f2
  2467. const m_XK_braille_dots_2568 = 0x10028b2
  2468. const m_XK_braille_dots_257 = 0x1002852
  2469. const m_XK_braille_dots_2578 = 0x10028d2
  2470. const m_XK_braille_dots_258 = 0x1002892
  2471. const m_XK_braille_dots_26 = 0x1002822
  2472. const m_XK_braille_dots_267 = 0x1002862
  2473. const m_XK_braille_dots_2678 = 0x10028e2
  2474. const m_XK_braille_dots_268 = 0x10028a2
  2475. const m_XK_braille_dots_27 = 0x1002842
  2476. const m_XK_braille_dots_278 = 0x10028c2
  2477. const m_XK_braille_dots_28 = 0x1002882
  2478. const m_XK_braille_dots_3 = 0x1002804
  2479. const m_XK_braille_dots_34 = 0x100280c
  2480. const m_XK_braille_dots_345 = 0x100281c
  2481. const m_XK_braille_dots_3456 = 0x100283c
  2482. const m_XK_braille_dots_34567 = 0x100287c
  2483. const m_XK_braille_dots_345678 = 0x10028fc
  2484. const m_XK_braille_dots_34568 = 0x10028bc
  2485. const m_XK_braille_dots_3457 = 0x100285c
  2486. const m_XK_braille_dots_34578 = 0x10028dc
  2487. const m_XK_braille_dots_3458 = 0x100289c
  2488. const m_XK_braille_dots_346 = 0x100282c
  2489. const m_XK_braille_dots_3467 = 0x100286c
  2490. const m_XK_braille_dots_34678 = 0x10028ec
  2491. const m_XK_braille_dots_3468 = 0x10028ac
  2492. const m_XK_braille_dots_347 = 0x100284c
  2493. const m_XK_braille_dots_3478 = 0x10028cc
  2494. const m_XK_braille_dots_348 = 0x100288c
  2495. const m_XK_braille_dots_35 = 0x1002814
  2496. const m_XK_braille_dots_356 = 0x1002834
  2497. const m_XK_braille_dots_3567 = 0x1002874
  2498. const m_XK_braille_dots_35678 = 0x10028f4
  2499. const m_XK_braille_dots_3568 = 0x10028b4
  2500. const m_XK_braille_dots_357 = 0x1002854
  2501. const m_XK_braille_dots_3578 = 0x10028d4
  2502. const m_XK_braille_dots_358 = 0x1002894
  2503. const m_XK_braille_dots_36 = 0x1002824
  2504. const m_XK_braille_dots_367 = 0x1002864
  2505. const m_XK_braille_dots_3678 = 0x10028e4
  2506. const m_XK_braille_dots_368 = 0x10028a4
  2507. const m_XK_braille_dots_37 = 0x1002844
  2508. const m_XK_braille_dots_378 = 0x10028c4
  2509. const m_XK_braille_dots_38 = 0x1002884
  2510. const m_XK_braille_dots_4 = 0x1002808
  2511. const m_XK_braille_dots_45 = 0x1002818
  2512. const m_XK_braille_dots_456 = 0x1002838
  2513. const m_XK_braille_dots_4567 = 0x1002878
  2514. const m_XK_braille_dots_45678 = 0x10028f8
  2515. const m_XK_braille_dots_4568 = 0x10028b8
  2516. const m_XK_braille_dots_457 = 0x1002858
  2517. const m_XK_braille_dots_4578 = 0x10028d8
  2518. const m_XK_braille_dots_458 = 0x1002898
  2519. const m_XK_braille_dots_46 = 0x1002828
  2520. const m_XK_braille_dots_467 = 0x1002868
  2521. const m_XK_braille_dots_4678 = 0x10028e8
  2522. const m_XK_braille_dots_468 = 0x10028a8
  2523. const m_XK_braille_dots_47 = 0x1002848
  2524. const m_XK_braille_dots_478 = 0x10028c8
  2525. const m_XK_braille_dots_48 = 0x1002888
  2526. const m_XK_braille_dots_5 = 0x1002810
  2527. const m_XK_braille_dots_56 = 0x1002830
  2528. const m_XK_braille_dots_567 = 0x1002870
  2529. const m_XK_braille_dots_5678 = 0x10028f0
  2530. const m_XK_braille_dots_568 = 0x10028b0
  2531. const m_XK_braille_dots_57 = 0x1002850
  2532. const m_XK_braille_dots_578 = 0x10028d0
  2533. const m_XK_braille_dots_58 = 0x1002890
  2534. const m_XK_braille_dots_6 = 0x1002820
  2535. const m_XK_braille_dots_67 = 0x1002860
  2536. const m_XK_braille_dots_678 = 0x10028e0
  2537. const m_XK_braille_dots_68 = 0x10028a0
  2538. const m_XK_braille_dots_7 = 0x1002840
  2539. const m_XK_braille_dots_78 = 0x10028c0
  2540. const m_XK_braille_dots_8 = 0x1002880
  2541. const m_XK_breve = 0x01a2
  2542. const m_XK_brokenbar = 0x00a6
  2543. const m_XK_c = 0x0063
  2544. const m_XK_c_h = 0xfea3
  2545. const m_XK_cabovedot = 0x02e5
  2546. const m_XK_cacute = 0x01e6
  2547. const m_XK_caron = 0x01b7
  2548. const m_XK_ccaron = 0x01e8
  2549. const m_XK_ccedilla = 0x00e7
  2550. const m_XK_ccircumflex = 0x02e6
  2551. const m_XK_cedilla = 0x00b8
  2552. const m_XK_cent = 0x00a2
  2553. const m_XK_ch = 0xfea0
  2554. const m_XK_colon = 0x003a
  2555. const m_XK_combining_acute = 0x1000301
  2556. const m_XK_combining_belowdot = 0x1000323
  2557. const m_XK_combining_grave = 0x1000300
  2558. const m_XK_combining_hook = 0x1000309
  2559. const m_XK_combining_tilde = 0x1000303
  2560. const m_XK_comma = 0x002c
  2561. const m_XK_containsas = 0x100220B
  2562. const m_XK_copyright = 0x00a9
  2563. const m_XK_cuberoot = 0x100221B
  2564. const m_XK_currency = 0x00a4
  2565. const m_XK_d = 0x0064
  2566. const m_XK_dabovedot = 0x1001e0b
  2567. const m_XK_dcaron = 0x01ef
  2568. const m_XK_dead_A = 0xfe81
  2569. const m_XK_dead_E = 0xfe83
  2570. const m_XK_dead_I = 0xfe85
  2571. const m_XK_dead_O = 0xfe87
  2572. const m_XK_dead_U = 0xfe89
  2573. const m_XK_dead_a = 0xfe80
  2574. const m_XK_dead_abovecomma = 0xfe64
  2575. const m_XK_dead_abovedot = 0xfe56
  2576. const m_XK_dead_abovereversedcomma = 0xfe65
  2577. const m_XK_dead_abovering = 0xfe58
  2578. const m_XK_dead_aboveverticalline = 0xfe91
  2579. const m_XK_dead_acute = 0xfe51
  2580. const m_XK_dead_belowbreve = 0xfe6b
  2581. const m_XK_dead_belowcircumflex = 0xfe69
  2582. const m_XK_dead_belowcomma = 0xfe6e
  2583. const m_XK_dead_belowdiaeresis = 0xfe6c
  2584. const m_XK_dead_belowdot = 0xfe60
  2585. const m_XK_dead_belowmacron = 0xfe68
  2586. const m_XK_dead_belowring = 0xfe67
  2587. const m_XK_dead_belowtilde = 0xfe6a
  2588. const m_XK_dead_belowverticalline = 0xfe92
  2589. const m_XK_dead_breve = 0xfe55
  2590. const m_XK_dead_capital_schwa = 0xfe8b
  2591. const m_XK_dead_caron = 0xfe5a
  2592. const m_XK_dead_cedilla = 0xfe5b
  2593. const m_XK_dead_circumflex = 0xfe52
  2594. const m_XK_dead_currency = 0xfe6f
  2595. const m_XK_dead_dasia = 0xfe65
  2596. const m_XK_dead_diaeresis = 0xfe57
  2597. const m_XK_dead_doubleacute = 0xfe59
  2598. const m_XK_dead_doublegrave = 0xfe66
  2599. const m_XK_dead_e = 0xfe82
  2600. const m_XK_dead_grave = 0xfe50
  2601. const m_XK_dead_greek = 0xfe8c
  2602. const m_XK_dead_hook = 0xfe61
  2603. const m_XK_dead_horn = 0xfe62
  2604. const m_XK_dead_i = 0xfe84
  2605. const m_XK_dead_invertedbreve = 0xfe6d
  2606. const m_XK_dead_iota = 0xfe5d
  2607. const m_XK_dead_longsolidusoverlay = 0xfe93
  2608. const m_XK_dead_lowline = 0xfe90
  2609. const m_XK_dead_macron = 0xfe54
  2610. const m_XK_dead_o = 0xfe86
  2611. const m_XK_dead_ogonek = 0xfe5c
  2612. const m_XK_dead_perispomeni = 0xfe53
  2613. const m_XK_dead_psili = 0xfe64
  2614. const m_XK_dead_semivoiced_sound = 0xfe5f
  2615. const m_XK_dead_small_schwa = 0xfe8a
  2616. const m_XK_dead_stroke = 0xfe63
  2617. const m_XK_dead_tilde = 0xfe53
  2618. const m_XK_dead_u = 0xfe88
  2619. const m_XK_dead_voiced_sound = 0xfe5e
  2620. const m_XK_degree = 0x00b0
  2621. const m_XK_diaeresis = 0x00a8
  2622. const m_XK_dintegral = 0x100222C
  2623. const m_XK_division = 0x00f7
  2624. const m_XK_dollar = 0x0024
  2625. const m_XK_doubleacute = 0x01bd
  2626. const m_XK_dstroke = 0x01f0
  2627. const m_XK_e = 0x0065
  2628. const m_XK_eabovedot = 0x03ec
  2629. const m_XK_eacute = 0x00e9
  2630. const m_XK_ebelowdot = 0x1001eb9
  2631. const m_XK_ecaron = 0x01ec
  2632. const m_XK_ecircumflex = 0x00ea
  2633. const m_XK_ecircumflexacute = 0x1001ebf
  2634. const m_XK_ecircumflexbelowdot = 0x1001ec7
  2635. const m_XK_ecircumflexgrave = 0x1001ec1
  2636. const m_XK_ecircumflexhook = 0x1001ec3
  2637. const m_XK_ecircumflextilde = 0x1001ec5
  2638. const m_XK_ediaeresis = 0x00eb
  2639. const m_XK_egrave = 0x00e8
  2640. const m_XK_ehook = 0x1001ebb
  2641. const m_XK_eightsubscript = 0x1002088
  2642. const m_XK_eightsuperior = 0x1002078
  2643. const m_XK_elementof = 0x1002208
  2644. const m_XK_emacron = 0x03ba
  2645. const m_XK_emptyset = 0x1002205
  2646. const m_XK_eng = 0x03bf
  2647. const m_XK_eogonek = 0x01ea
  2648. const m_XK_equal = 0x003d
  2649. const m_XK_eth = 0x00f0
  2650. const m_XK_etilde = 0x1001ebd
  2651. const m_XK_exclam = 0x0021
  2652. const m_XK_exclamdown = 0x00a1
  2653. const m_XK_ezh = 0x1000292
  2654. const m_XK_f = 0x0066
  2655. const m_XK_fabovedot = 0x1001e1f
  2656. const m_XK_fivesubscript = 0x1002085
  2657. const m_XK_fivesuperior = 0x1002075
  2658. const m_XK_foursubscript = 0x1002084
  2659. const m_XK_foursuperior = 0x1002074
  2660. const m_XK_fourthroot = 0x100221C
  2661. const m_XK_g = 0x0067
  2662. const m_XK_gabovedot = 0x02f5
  2663. const m_XK_gbreve = 0x02bb
  2664. const m_XK_gcaron = 0x10001e7
  2665. const m_XK_gcedilla = 0x03bb
  2666. const m_XK_gcircumflex = 0x02f8
  2667. const m_XK_grave = 0x0060
  2668. const m_XK_greater = 0x003e
  2669. const m_XK_guillemotleft = 0x00ab
  2670. const m_XK_guillemotright = 0x00bb
  2671. const m_XK_h = 0x0068
  2672. const m_XK_hcircumflex = 0x02b6
  2673. const m_XK_hebrew_aleph = 0x0ce0
  2674. const m_XK_hebrew_ayin = 0x0cf2
  2675. const m_XK_hebrew_bet = 0x0ce1
  2676. const m_XK_hebrew_beth = 0x0ce1
  2677. const m_XK_hebrew_chet = 0x0ce7
  2678. const m_XK_hebrew_dalet = 0x0ce3
  2679. const m_XK_hebrew_daleth = 0x0ce3
  2680. const m_XK_hebrew_doublelowline = 0x0cdf
  2681. const m_XK_hebrew_finalkaph = 0x0cea
  2682. const m_XK_hebrew_finalmem = 0x0ced
  2683. const m_XK_hebrew_finalnun = 0x0cef
  2684. const m_XK_hebrew_finalpe = 0x0cf3
  2685. const m_XK_hebrew_finalzade = 0x0cf5
  2686. const m_XK_hebrew_finalzadi = 0x0cf5
  2687. const m_XK_hebrew_gimel = 0x0ce2
  2688. const m_XK_hebrew_gimmel = 0x0ce2
  2689. const m_XK_hebrew_he = 0x0ce4
  2690. const m_XK_hebrew_het = 0x0ce7
  2691. const m_XK_hebrew_kaph = 0x0ceb
  2692. const m_XK_hebrew_kuf = 0x0cf7
  2693. const m_XK_hebrew_lamed = 0x0cec
  2694. const m_XK_hebrew_mem = 0x0cee
  2695. const m_XK_hebrew_nun = 0x0cf0
  2696. const m_XK_hebrew_pe = 0x0cf4
  2697. const m_XK_hebrew_qoph = 0x0cf7
  2698. const m_XK_hebrew_resh = 0x0cf8
  2699. const m_XK_hebrew_samech = 0x0cf1
  2700. const m_XK_hebrew_samekh = 0x0cf1
  2701. const m_XK_hebrew_shin = 0x0cf9
  2702. const m_XK_hebrew_taf = 0x0cfa
  2703. const m_XK_hebrew_taw = 0x0cfa
  2704. const m_XK_hebrew_tet = 0x0ce8
  2705. const m_XK_hebrew_teth = 0x0ce8
  2706. const m_XK_hebrew_waw = 0x0ce5
  2707. const m_XK_hebrew_yod = 0x0ce9
  2708. const m_XK_hebrew_zade = 0x0cf6
  2709. const m_XK_hebrew_zadi = 0x0cf6
  2710. const m_XK_hebrew_zain = 0x0ce6
  2711. const m_XK_hebrew_zayin = 0x0ce6
  2712. const m_XK_hstroke = 0x02b1
  2713. const m_XK_hyphen = 0x00ad
  2714. const m_XK_i = 0x0069
  2715. const m_XK_iacute = 0x00ed
  2716. const m_XK_ibelowdot = 0x1001ecb
  2717. const m_XK_ibreve = 0x100012d
  2718. const m_XK_icircumflex = 0x00ee
  2719. const m_XK_idiaeresis = 0x00ef
  2720. const m_XK_idotless = 0x02b9
  2721. const m_XK_igrave = 0x00ec
  2722. const m_XK_ihook = 0x1001ec9
  2723. const m_XK_imacron = 0x03ef
  2724. const m_XK_iogonek = 0x03e7
  2725. const m_XK_itilde = 0x03b5
  2726. const m_XK_j = 0x006a
  2727. const m_XK_jcircumflex = 0x02bc
  2728. const m_XK_k = 0x006b
  2729. const m_XK_kana_A = 0x04b1
  2730. const m_XK_kana_CHI = 0x04c1
  2731. const m_XK_kana_E = 0x04b4
  2732. const m_XK_kana_FU = 0x04cc
  2733. const m_XK_kana_HA = 0x04ca
  2734. const m_XK_kana_HE = 0x04cd
  2735. const m_XK_kana_HI = 0x04cb
  2736. const m_XK_kana_HO = 0x04ce
  2737. const m_XK_kana_HU = 0x04cc
  2738. const m_XK_kana_I = 0x04b2
  2739. const m_XK_kana_KA = 0x04b6
  2740. const m_XK_kana_KE = 0x04b9
  2741. const m_XK_kana_KI = 0x04b7
  2742. const m_XK_kana_KO = 0x04ba
  2743. const m_XK_kana_KU = 0x04b8
  2744. const m_XK_kana_MA = 0x04cf
  2745. const m_XK_kana_ME = 0x04d2
  2746. const m_XK_kana_MI = 0x04d0
  2747. const m_XK_kana_MO = 0x04d3
  2748. const m_XK_kana_MU = 0x04d1
  2749. const m_XK_kana_N = 0x04dd
  2750. const m_XK_kana_NA = 0x04c5
  2751. const m_XK_kana_NE = 0x04c8
  2752. const m_XK_kana_NI = 0x04c6
  2753. const m_XK_kana_NO = 0x04c9
  2754. const m_XK_kana_NU = 0x04c7
  2755. const m_XK_kana_O = 0x04b5
  2756. const m_XK_kana_RA = 0x04d7
  2757. const m_XK_kana_RE = 0x04da
  2758. const m_XK_kana_RI = 0x04d8
  2759. const m_XK_kana_RO = 0x04db
  2760. const m_XK_kana_RU = 0x04d9
  2761. const m_XK_kana_SA = 0x04bb
  2762. const m_XK_kana_SE = 0x04be
  2763. const m_XK_kana_SHI = 0x04bc
  2764. const m_XK_kana_SO = 0x04bf
  2765. const m_XK_kana_SU = 0x04bd
  2766. const m_XK_kana_TA = 0x04c0
  2767. const m_XK_kana_TE = 0x04c3
  2768. const m_XK_kana_TI = 0x04c1
  2769. const m_XK_kana_TO = 0x04c4
  2770. const m_XK_kana_TSU = 0x04c2
  2771. const m_XK_kana_TU = 0x04c2
  2772. const m_XK_kana_U = 0x04b3
  2773. const m_XK_kana_WA = 0x04dc
  2774. const m_XK_kana_WO = 0x04a6
  2775. const m_XK_kana_YA = 0x04d4
  2776. const m_XK_kana_YO = 0x04d6
  2777. const m_XK_kana_YU = 0x04d5
  2778. const m_XK_kana_a = 0x04a7
  2779. const m_XK_kana_closingbracket = 0x04a3
  2780. const m_XK_kana_comma = 0x04a4
  2781. const m_XK_kana_conjunctive = 0x04a5
  2782. const m_XK_kana_e = 0x04aa
  2783. const m_XK_kana_fullstop = 0x04a1
  2784. const m_XK_kana_i = 0x04a8
  2785. const m_XK_kana_middledot = 0x04a5
  2786. const m_XK_kana_o = 0x04ab
  2787. const m_XK_kana_openingbracket = 0x04a2
  2788. const m_XK_kana_switch = 0xff7e
  2789. const m_XK_kana_tsu = 0x04af
  2790. const m_XK_kana_tu = 0x04af
  2791. const m_XK_kana_u = 0x04a9
  2792. const m_XK_kana_ya = 0x04ac
  2793. const m_XK_kana_yo = 0x04ae
  2794. const m_XK_kana_yu = 0x04ad
  2795. const m_XK_kappa = 0x03a2
  2796. const m_XK_kcedilla = 0x03f3
  2797. const m_XK_kra = 0x03a2
  2798. const m_XK_l = 0x006c
  2799. const m_XK_lacute = 0x01e5
  2800. const m_XK_lbelowdot = 0x1001e37
  2801. const m_XK_lcaron = 0x01b5
  2802. const m_XK_lcedilla = 0x03b6
  2803. const m_XK_less = 0x003c
  2804. const m_XK_lstroke = 0x01b3
  2805. const m_XK_m = 0x006d
  2806. const m_XK_mabovedot = 0x1001e41
  2807. const m_XK_macron = 0x00af
  2808. const m_XK_masculine = 0x00ba
  2809. const m_XK_minus = 0x002d
  2810. const m_XK_mu = 0x00b5
  2811. const m_XK_multiply = 0x00d7
  2812. const m_XK_n = 0x006e
  2813. const m_XK_nacute = 0x01f1
  2814. const m_XK_ncaron = 0x01f2
  2815. const m_XK_ncedilla = 0x03f1
  2816. const m_XK_ninesubscript = 0x1002089
  2817. const m_XK_ninesuperior = 0x1002079
  2818. const m_XK_nobreakspace = 0x00a0
  2819. const m_XK_notapproxeq = 0x1002247
  2820. const m_XK_notelementof = 0x1002209
  2821. const m_XK_notidentical = 0x1002262
  2822. const m_XK_notsign = 0x00ac
  2823. const m_XK_ntilde = 0x00f1
  2824. const m_XK_numbersign = 0x0023
  2825. const m_XK_numerosign = 0x06b0
  2826. const m_XK_o = 0x006f
  2827. const m_XK_oacute = 0x00f3
  2828. const m_XK_obarred = 0x1000275
  2829. const m_XK_obelowdot = 0x1001ecd
  2830. const m_XK_ocaron = 0x10001d2
  2831. const m_XK_ocircumflex = 0x00f4
  2832. const m_XK_ocircumflexacute = 0x1001ed1
  2833. const m_XK_ocircumflexbelowdot = 0x1001ed9
  2834. const m_XK_ocircumflexgrave = 0x1001ed3
  2835. const m_XK_ocircumflexhook = 0x1001ed5
  2836. const m_XK_ocircumflextilde = 0x1001ed7
  2837. const m_XK_odiaeresis = 0x00f6
  2838. const m_XK_odoubleacute = 0x01f5
  2839. const m_XK_oe = 0x13bd
  2840. const m_XK_ogonek = 0x01b2
  2841. const m_XK_ograve = 0x00f2
  2842. const m_XK_ohook = 0x1001ecf
  2843. const m_XK_ohorn = 0x10001a1
  2844. const m_XK_ohornacute = 0x1001edb
  2845. const m_XK_ohornbelowdot = 0x1001ee3
  2846. const m_XK_ohorngrave = 0x1001edd
  2847. const m_XK_ohornhook = 0x1001edf
  2848. const m_XK_ohorntilde = 0x1001ee1
  2849. const m_XK_omacron = 0x03f2
  2850. const m_XK_onehalf = 0x00bd
  2851. const m_XK_onequarter = 0x00bc
  2852. const m_XK_onesubscript = 0x1002081
  2853. const m_XK_onesuperior = 0x00b9
  2854. const m_XK_ooblique = 0x00f8
  2855. const m_XK_ordfeminine = 0x00aa
  2856. const m_XK_oslash = 0x00f8
  2857. const m_XK_otilde = 0x00f5
  2858. const m_XK_overline = 0x047e
  2859. const m_XK_p = 0x0070
  2860. const m_XK_pabovedot = 0x1001e57
  2861. const m_XK_paragraph = 0x00b6
  2862. const m_XK_parenleft = 0x0028
  2863. const m_XK_parenright = 0x0029
  2864. const m_XK_partdifferential = 0x1002202
  2865. const m_XK_percent = 0x0025
  2866. const m_XK_period = 0x002e
  2867. const m_XK_periodcentered = 0x00b7
  2868. const m_XK_plus = 0x002b
  2869. const m_XK_plusminus = 0x00b1
  2870. const m_XK_prolongedsound = 0x04b0
  2871. const m_XK_q = 0x0071
  2872. const m_XK_question = 0x003f
  2873. const m_XK_questiondown = 0x00bf
  2874. const m_XK_quotedbl = 0x0022
  2875. const m_XK_quoteleft = 0x0060
  2876. const m_XK_quoteright = 0x0027
  2877. const m_XK_r = 0x0072
  2878. const m_XK_racute = 0x01e0
  2879. const m_XK_rcaron = 0x01f8
  2880. const m_XK_rcedilla = 0x03b3
  2881. const m_XK_registered = 0x00ae
  2882. const m_XK_s = 0x0073
  2883. const m_XK_sabovedot = 0x1001e61
  2884. const m_XK_sacute = 0x01b6
  2885. const m_XK_scaron = 0x01b9
  2886. const m_XK_scedilla = 0x01ba
  2887. const m_XK_schwa = 0x1000259
  2888. const m_XK_scircumflex = 0x02fe
  2889. const m_XK_script_switch = 0xff7e
  2890. const m_XK_section = 0x00a7
  2891. const m_XK_semicolon = 0x003b
  2892. const m_XK_semivoicedsound = 0x04df
  2893. const m_XK_sevensubscript = 0x1002087
  2894. const m_XK_sevensuperior = 0x1002077
  2895. const m_XK_sixsubscript = 0x1002086
  2896. const m_XK_sixsuperior = 0x1002076
  2897. const m_XK_slash = 0x002f
  2898. const m_XK_space = 0x0020
  2899. const m_XK_squareroot = 0x100221A
  2900. const m_XK_ssharp = 0x00df
  2901. const m_XK_sterling = 0x00a3
  2902. const m_XK_stricteq = 0x1002263
  2903. const m_XK_t = 0x0074
  2904. const m_XK_tabovedot = 0x1001e6b
  2905. const m_XK_tcaron = 0x01bb
  2906. const m_XK_tcedilla = 0x01fe
  2907. const m_XK_thorn = 0x00fe
  2908. const m_XK_threequarters = 0x00be
  2909. const m_XK_threesubscript = 0x1002083
  2910. const m_XK_threesuperior = 0x00b3
  2911. const m_XK_tintegral = 0x100222D
  2912. const m_XK_tslash = 0x03bc
  2913. const m_XK_twosubscript = 0x1002082
  2914. const m_XK_twosuperior = 0x00b2
  2915. const m_XK_u = 0x0075
  2916. const m_XK_uacute = 0x00fa
  2917. const m_XK_ubelowdot = 0x1001ee5
  2918. const m_XK_ubreve = 0x02fd
  2919. const m_XK_ucircumflex = 0x00fb
  2920. const m_XK_udiaeresis = 0x00fc
  2921. const m_XK_udoubleacute = 0x01fb
  2922. const m_XK_ugrave = 0x00f9
  2923. const m_XK_uhook = 0x1001ee7
  2924. const m_XK_uhorn = 0x10001b0
  2925. const m_XK_uhornacute = 0x1001ee9
  2926. const m_XK_uhornbelowdot = 0x1001ef1
  2927. const m_XK_uhorngrave = 0x1001eeb
  2928. const m_XK_uhornhook = 0x1001eed
  2929. const m_XK_uhorntilde = 0x1001eef
  2930. const m_XK_umacron = 0x03fe
  2931. const m_XK_underscore = 0x005f
  2932. const m_XK_uogonek = 0x03f9
  2933. const m_XK_uring = 0x01f9
  2934. const m_XK_utilde = 0x03fd
  2935. const m_XK_v = 0x0076
  2936. const m_XK_voicedsound = 0x04de
  2937. const m_XK_w = 0x0077
  2938. const m_XK_wacute = 0x1001e83
  2939. const m_XK_wcircumflex = 0x1000175
  2940. const m_XK_wdiaeresis = 0x1001e85
  2941. const m_XK_wgrave = 0x1001e81
  2942. const m_XK_x = 0x0078
  2943. const m_XK_xabovedot = 0x1001e8b
  2944. const m_XK_y = 0x0079
  2945. const m_XK_yacute = 0x00fd
  2946. const m_XK_ybelowdot = 0x1001ef5
  2947. const m_XK_ycircumflex = 0x1000177
  2948. const m_XK_ydiaeresis = 0x00ff
  2949. const m_XK_yen = 0x00a5
  2950. const m_XK_ygrave = 0x1001ef3
  2951. const m_XK_yhook = 0x1001ef7
  2952. const m_XK_ytilde = 0x1001ef9
  2953. const m_XK_z = 0x007a
  2954. const m_XK_zabovedot = 0x01bf
  2955. const m_XK_zacute = 0x01bc
  2956. const m_XK_zcaron = 0x01be
  2957. const m_XK_zerosubscript = 0x1002080
  2958. const m_XK_zerosuperior = 0x1002070
  2959. const m_XK_zstroke = 0x10001b6
  2960. const m_XLookupBoth = 4
  2961. const m_XLookupChars = 2
  2962. const m_XLookupKeySym = 3
  2963. const m_XLookupNone = 1
  2964. const m_XMD_H = 1
  2965. const m_XMUTEX_INITIALIZER = "PTHREAD_MUTEX_INITIALIZER"
  2966. const m_XNArea = "area"
  2967. const m_XNAreaNeeded = "areaNeeded"
  2968. const m_XNBackground = "background"
  2969. const m_XNBackgroundPixmap = "backgroundPixmap"
  2970. const m_XNBaseFontName = "baseFontName"
  2971. const m_XNClientWindow = "clientWindow"
  2972. const m_XNColormap = "colorMap"
  2973. const m_XNContextualDrawing = "contextualDrawing"
  2974. const m_XNCursor = "cursor"
  2975. const m_XNDefaultString = "defaultString"
  2976. const m_XNDestroyCallback = "destroyCallback"
  2977. const m_XNDirectionalDependentDrawing = "directionalDependentDrawing"
  2978. const m_XNFilterEvents = "filterEvents"
  2979. const m_XNFocusWindow = "focusWindow"
  2980. const m_XNFontInfo = "fontInfo"
  2981. const m_XNFontSet = "fontSet"
  2982. const m_XNForeground = "foreground"
  2983. const m_XNGeometryCallback = "geometryCallback"
  2984. const m_XNHotKey = "hotKey"
  2985. const m_XNHotKeyState = "hotKeyState"
  2986. const m_XNInputStyle = "inputStyle"
  2987. const m_XNLineSpace = "lineSpace"
  2988. const m_XNMissingCharSet = "missingCharSet"
  2989. const m_XNOMAutomatic = "omAutomatic"
  2990. const m_XNOrientation = "orientation"
  2991. const m_XNPreeditAttributes = "preeditAttributes"
  2992. const m_XNPreeditCaretCallback = "preeditCaretCallback"
  2993. const m_XNPreeditDoneCallback = "preeditDoneCallback"
  2994. const m_XNPreeditDrawCallback = "preeditDrawCallback"
  2995. const m_XNPreeditStartCallback = "preeditStartCallback"
  2996. const m_XNPreeditState = "preeditState"
  2997. const m_XNPreeditStateNotifyCallback = "preeditStateNotifyCallback"
  2998. const m_XNQueryICValuesList = "queryICValuesList"
  2999. const m_XNQueryIMValuesList = "queryIMValuesList"
  3000. const m_XNQueryInputStyle = "queryInputStyle"
  3001. const m_XNQueryOrientation = "queryOrientation"
  3002. const m_XNR6PreeditCallback = "r6PreeditCallback"
  3003. const m_XNRequiredCharSet = "requiredCharSet"
  3004. const m_XNResetState = "resetState"
  3005. const m_XNResourceClass = "resourceClass"
  3006. const m_XNResourceName = "resourceName"
  3007. const m_XNSeparatorofNestedList = "separatorofNestedList"
  3008. const m_XNSpotLocation = "spotLocation"
  3009. const m_XNStatusAttributes = "statusAttributes"
  3010. const m_XNStatusDoneCallback = "statusDoneCallback"
  3011. const m_XNStatusDrawCallback = "statusDrawCallback"
  3012. const m_XNStatusStartCallback = "statusStartCallback"
  3013. const m_XNStdColormap = "stdColorMap"
  3014. const m_XNStringConversion = "stringConversion"
  3015. const m_XNStringConversionCallback = "stringConversionCallback"
  3016. const m_XNVaNestedList = "XNVaNestedList"
  3017. const m_XNVisiblePosition = "visiblePosition"
  3018. const m_XNegative = 0x0010
  3019. const m_XTHREADS = 1
  3020. const m_XUSE_MTSAFE_API = 1
  3021. const m_XValue = 0x0001
  3022. const m_XYBitmap = 0
  3023. const m_XYPixmap = 1
  3024. const m_X_AllocColor = 84
  3025. const m_X_AllocColorCells = 86
  3026. const m_X_AllocColorPlanes = 87
  3027. const m_X_AllocNamedColor = 85
  3028. const m_X_AllowEvents = 35
  3029. const m_X_Bell = 104
  3030. const m_X_ChangeActivePointerGrab = 30
  3031. const m_X_ChangeGC = 56
  3032. const m_X_ChangeHosts = 109
  3033. const m_X_ChangeKeyboardControl = 102
  3034. const m_X_ChangeKeyboardMapping = 100
  3035. const m_X_ChangePointerControl = 105
  3036. const m_X_ChangeProperty = 18
  3037. const m_X_ChangeSaveSet = 6
  3038. const m_X_ChangeWindowAttributes = 2
  3039. const m_X_CirculateWindow = 13
  3040. const m_X_ClearArea = 61
  3041. const m_X_CloseFont = 46
  3042. const m_X_ConfigureWindow = 12
  3043. const m_X_ConvertSelection = 24
  3044. const m_X_CopyArea = 62
  3045. const m_X_CopyColormapAndFree = 80
  3046. const m_X_CopyGC = 57
  3047. const m_X_CopyPlane = 63
  3048. const m_X_CreateColormap = 78
  3049. const m_X_CreateCursor = 93
  3050. const m_X_CreateGC = 55
  3051. const m_X_CreateGlyphCursor = 94
  3052. const m_X_CreatePixmap = 53
  3053. const m_X_CreateWindow = 1
  3054. const m_X_DeleteProperty = 19
  3055. const m_X_DestroySubwindows = 5
  3056. const m_X_DestroyWindow = 4
  3057. const m_X_Error = 0
  3058. const m_X_FillPoly = 69
  3059. const m_X_ForceScreenSaver = 115
  3060. const m_X_FreeColormap = 79
  3061. const m_X_FreeColors = 88
  3062. const m_X_FreeCursor = 95
  3063. const m_X_FreeGC = 60
  3064. const m_X_FreePixmap = 54
  3065. const m_X_GetAtomName = 17
  3066. const m_X_GetFontPath = 52
  3067. const m_X_GetGeometry = 14
  3068. const m_X_GetImage = 73
  3069. const m_X_GetInputFocus = 43
  3070. const m_X_GetKeyboardControl = 103
  3071. const m_X_GetKeyboardMapping = 101
  3072. const m_X_GetModifierMapping = 119
  3073. const m_X_GetMotionEvents = 39
  3074. const m_X_GetPointerControl = 106
  3075. const m_X_GetPointerMapping = 117
  3076. const m_X_GetProperty = 20
  3077. const m_X_GetScreenSaver = 108
  3078. const m_X_GetSelectionOwner = 23
  3079. const m_X_GetWindowAttributes = 3
  3080. const m_X_GrabButton = 28
  3081. const m_X_GrabKey = 33
  3082. const m_X_GrabKeyboard = 31
  3083. const m_X_GrabPointer = 26
  3084. const m_X_GrabServer = 36
  3085. const m_X_HAVE_UTF8_STRING = 1
  3086. const m_X_ImageText16 = 77
  3087. const m_X_ImageText8 = 76
  3088. const m_X_InstallColormap = 81
  3089. const m_X_InternAtom = 16
  3090. const m_X_KillClient = 113
  3091. const m_X_ListExtensions = 99
  3092. const m_X_ListFonts = 49
  3093. const m_X_ListFontsWithInfo = 50
  3094. const m_X_ListHosts = 110
  3095. const m_X_ListInstalledColormaps = 83
  3096. const m_X_ListProperties = 21
  3097. const m_X_LookupColor = 92
  3098. const m_X_MapSubwindows = 9
  3099. const m_X_MapWindow = 8
  3100. const m_X_NoOperation = 127
  3101. const m_X_OpenFont = 45
  3102. const m_X_PROTOCOL = 11
  3103. const m_X_PROTOCOL_REVISION = 0
  3104. const m_X_PolyArc = 68
  3105. const m_X_PolyFillArc = 71
  3106. const m_X_PolyFillRectangle = 70
  3107. const m_X_PolyLine = 65
  3108. const m_X_PolyPoint = 64
  3109. const m_X_PolyRectangle = 67
  3110. const m_X_PolySegment = 66
  3111. const m_X_PolyText16 = 75
  3112. const m_X_PolyText8 = 74
  3113. const m_X_PutImage = 72
  3114. const m_X_QueryBestSize = 97
  3115. const m_X_QueryColors = 91
  3116. const m_X_QueryExtension = 98
  3117. const m_X_QueryFont = 47
  3118. const m_X_QueryKeymap = 44
  3119. const m_X_QueryPointer = 38
  3120. const m_X_QueryTextExtents = 48
  3121. const m_X_QueryTree = 15
  3122. const m_X_RecolorCursor = 96
  3123. const m_X_RenderAddGlyphs = 20
  3124. const m_X_RenderAddGlyphsFromPicture = 21
  3125. const m_X_RenderAddTraps = 32
  3126. const m_X_RenderChangePicture = 5
  3127. const m_X_RenderColorTrapezoids = 14
  3128. const m_X_RenderColorTriangles = 15
  3129. const m_X_RenderComposite = 8
  3130. const m_X_RenderCompositeGlyphs16 = 24
  3131. const m_X_RenderCompositeGlyphs32 = 25
  3132. const m_X_RenderCompositeGlyphs8 = 23
  3133. const m_X_RenderCreateAnimCursor = 31
  3134. const m_X_RenderCreateConicalGradient = 36
  3135. const m_X_RenderCreateCursor = 27
  3136. const m_X_RenderCreateGlyphSet = 17
  3137. const m_X_RenderCreateLinearGradient = 34
  3138. const m_X_RenderCreatePicture = 4
  3139. const m_X_RenderCreateRadialGradient = 35
  3140. const m_X_RenderCreateSolidFill = 33
  3141. const m_X_RenderFillRectangles = 26
  3142. const m_X_RenderFreeGlyphSet = 19
  3143. const m_X_RenderFreeGlyphs = 22
  3144. const m_X_RenderFreePicture = 7
  3145. const m_X_RenderQueryDithers = 3
  3146. const m_X_RenderQueryFilters = 29
  3147. const m_X_RenderQueryPictFormats = 1
  3148. const m_X_RenderQueryPictIndexValues = 2
  3149. const m_X_RenderQueryVersion = 0
  3150. const m_X_RenderReferenceGlyphSet = 18
  3151. const m_X_RenderScale = 9
  3152. const m_X_RenderSetPictureClipRectangles = 6
  3153. const m_X_RenderSetPictureFilter = 30
  3154. const m_X_RenderSetPictureTransform = 28
  3155. const m_X_RenderTrapezoids = 10
  3156. const m_X_RenderTriFan = 13
  3157. const m_X_RenderTriStrip = 12
  3158. const m_X_RenderTriangles = 11
  3159. const m_X_ReparentWindow = 7
  3160. const m_X_Reply = 1
  3161. const m_X_RotateProperties = 114
  3162. const m_X_SendEvent = 25
  3163. const m_X_SetAccessControl = 111
  3164. const m_X_SetClipRectangles = 59
  3165. const m_X_SetCloseDownMode = 112
  3166. const m_X_SetDashes = 58
  3167. const m_X_SetFontPath = 51
  3168. const m_X_SetInputFocus = 42
  3169. const m_X_SetModifierMapping = 118
  3170. const m_X_SetPointerMapping = 116
  3171. const m_X_SetScreenSaver = 107
  3172. const m_X_SetSelectionOwner = 22
  3173. const m_X_StoreColors = 89
  3174. const m_X_StoreNamedColor = 90
  3175. const m_X_TCP_PORT = 6000
  3176. const m_X_TranslateCoords = 40
  3177. const m_X_UngrabButton = 29
  3178. const m_X_UngrabKey = 34
  3179. const m_X_UngrabKeyboard = 32
  3180. const m_X_UngrabPointer = 27
  3181. const m_X_UngrabServer = 37
  3182. const m_X_UninstallColormap = 82
  3183. const m_X_UnmapSubwindows = 11
  3184. const m_X_UnmapWindow = 10
  3185. const m_X_WarpPointer = 41
  3186. const m_XftVersion = "XFT_VERSION"
  3187. const m_XlibSpecificationRelease = 6
  3188. const m_YNegative = 0x0020
  3189. const m_YSorted = 1
  3190. const m_YValue = 0x0002
  3191. const m_YXBanded = 3
  3192. const m_YXSorted = 2
  3193. const m_ZLNSPERBATCH = 1024
  3194. const m_ZPixmap = 2
  3195. const m_ZRCTSPERBATCH = 256
  3196. const m_ZoomState = 2
  3197. const m__GNU_SOURCE = 1
  3198. const m__IOFBF = 0
  3199. const m__IOLBF = 1
  3200. const m__IONBF = 2
  3201. const m__LP64 = 1
  3202. const m__POSIX2_BC_BASE_MAX = 99
  3203. const m__POSIX2_BC_DIM_MAX = 2048
  3204. const m__POSIX2_BC_SCALE_MAX = 99
  3205. const m__POSIX2_BC_STRING_MAX = 1000
  3206. const m__POSIX2_CHARCLASS_NAME_MAX = 14
  3207. const m__POSIX2_COLL_WEIGHTS_MAX = 2
  3208. const m__POSIX2_EXPR_NEST_MAX = 32
  3209. const m__POSIX2_LINE_MAX = 2048
  3210. const m__POSIX2_RE_DUP_MAX = 255
  3211. const m__POSIX_AIO_LISTIO_MAX = 2
  3212. const m__POSIX_AIO_MAX = 1
  3213. const m__POSIX_ARG_MAX = 4096
  3214. const m__POSIX_CHILD_MAX = 25
  3215. const m__POSIX_CLOCKRES_MIN = 20000000
  3216. const m__POSIX_DELAYTIMER_MAX = 32
  3217. const m__POSIX_HOST_NAME_MAX = 255
  3218. const m__POSIX_LINK_MAX = 8
  3219. const m__POSIX_LOGIN_NAME_MAX = 9
  3220. const m__POSIX_MAX_CANON = 255
  3221. const m__POSIX_MAX_INPUT = 255
  3222. const m__POSIX_MQ_OPEN_MAX = 8
  3223. const m__POSIX_MQ_PRIO_MAX = 32
  3224. const m__POSIX_NAME_MAX = 14
  3225. const m__POSIX_NGROUPS_MAX = 8
  3226. const m__POSIX_OPEN_MAX = 20
  3227. const m__POSIX_PATH_MAX = 256
  3228. const m__POSIX_PIPE_BUF = 512
  3229. const m__POSIX_RE_DUP_MAX = 255
  3230. const m__POSIX_RTSIG_MAX = 8
  3231. const m__POSIX_SEM_NSEMS_MAX = 256
  3232. const m__POSIX_SEM_VALUE_MAX = 32767
  3233. const m__POSIX_SIGQUEUE_MAX = 32
  3234. const m__POSIX_SSIZE_MAX = 32767
  3235. const m__POSIX_SS_REPL_MAX = 4
  3236. const m__POSIX_STREAM_MAX = 8
  3237. const m__POSIX_SYMLINK_MAX = 255
  3238. const m__POSIX_SYMLOOP_MAX = 8
  3239. const m__POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4
  3240. const m__POSIX_THREAD_KEYS_MAX = 128
  3241. const m__POSIX_THREAD_THREADS_MAX = 64
  3242. const m__POSIX_TIMER_MAX = 32
  3243. const m__POSIX_TRACE_EVENT_NAME_MAX = 30
  3244. const m__POSIX_TRACE_NAME_MAX = 8
  3245. const m__POSIX_TRACE_SYS_MAX = 8
  3246. const m__POSIX_TRACE_USER_EVENT_MAX = 32
  3247. const m__POSIX_TTY_NAME_MAX = 9
  3248. const m__POSIX_TZNAME_MAX = 6
  3249. const m__STDC_PREDEF_H = 1
  3250. const m__X11_XLIBINT_H_ = 1
  3251. const m__XBCOPYFUNC = "_Xbcopy"
  3252. const m__XOPEN_IOV_MAX = 16
  3253. const m__XOPEN_NAME_MAX = 255
  3254. const m__XOPEN_PATH_MAX = 1024
  3255. const m__X_INLINE = "inline"
  3256. const m__X_RESTRICT_KYWD = "restrict"
  3257. const m__Xconst = "const"
  3258. const m___AARCH64EL__ = 1
  3259. const m___AARCH64_CMODEL_SMALL__ = 1
  3260. const m___ARM_64BIT_STATE = 1
  3261. const m___ARM_ALIGN_MAX_PWR = 28
  3262. const m___ARM_ALIGN_MAX_STACK_PWR = 16
  3263. const m___ARM_ARCH = 8
  3264. const m___ARM_ARCH_8A = 1
  3265. const m___ARM_ARCH_ISA_A64 = 1
  3266. const m___ARM_ARCH_PROFILE = 65
  3267. const m___ARM_FEATURE_CLZ = 1
  3268. const m___ARM_FEATURE_FMA = 1
  3269. const m___ARM_FEATURE_IDIV = 1
  3270. const m___ARM_FEATURE_NUMERIC_MAXMIN = 1
  3271. const m___ARM_FEATURE_UNALIGNED = 1
  3272. const m___ARM_FP = 14
  3273. const m___ARM_FP16_ARGS = 1
  3274. const m___ARM_FP16_FORMAT_IEEE = 1
  3275. const m___ARM_NEON = 1
  3276. const m___ARM_PCS_AAPCS64 = 1
  3277. const m___ARM_SIZEOF_MINIMAL_ENUM = 4
  3278. const m___ARM_SIZEOF_WCHAR_T = 4
  3279. const m___ATOMIC_ACQUIRE = 2
  3280. const m___ATOMIC_ACQ_REL = 4
  3281. const m___ATOMIC_CONSUME = 1
  3282. const m___ATOMIC_RELAXED = 0
  3283. const m___ATOMIC_RELEASE = 3
  3284. const m___ATOMIC_SEQ_CST = 5
  3285. const m___BIGGEST_ALIGNMENT__ = 16
  3286. const m___BIG_ENDIAN = 4321
  3287. const m___BYTE_ORDER = 1234
  3288. const m___BYTE_ORDER__ = "__ORDER_LITTLE_ENDIAN__"
  3289. const m___CCGO__ = 1
  3290. const m___CHAR_BIT__ = 8
  3291. const m___CHAR_UNSIGNED__ = 1
  3292. const m___DBL_DECIMAL_DIG__ = 17
  3293. const m___DBL_DIG__ = 15
  3294. const m___DBL_HAS_DENORM__ = 1
  3295. const m___DBL_HAS_INFINITY__ = 1
  3296. const m___DBL_HAS_QUIET_NAN__ = 1
  3297. const m___DBL_IS_IEC_60559__ = 2
  3298. const m___DBL_MANT_DIG__ = 53
  3299. const m___DBL_MAX_10_EXP__ = 308
  3300. const m___DBL_MAX_EXP__ = 1024
  3301. const m___DECIMAL_DIG__ = 36
  3302. const m___DEC_EVAL_METHOD__ = 2
  3303. const m___ELF__ = 1
  3304. const m___FINITE_MATH_ONLY__ = 0
  3305. const m___FLOAT_WORD_ORDER__ = "__ORDER_LITTLE_ENDIAN__"
  3306. const m___FLT128_DECIMAL_DIG__ = 36
  3307. const m___FLT128_DENORM_MIN__ = 6.47517511943802511092443895822764655e-4966
  3308. const m___FLT128_DIG__ = 33
  3309. const m___FLT128_EPSILON__ = 1.92592994438723585305597794258492732e-34
  3310. const m___FLT128_HAS_DENORM__ = 1
  3311. const m___FLT128_HAS_INFINITY__ = 1
  3312. const m___FLT128_HAS_QUIET_NAN__ = 1
  3313. const m___FLT128_IS_IEC_60559__ = 2
  3314. const m___FLT128_MANT_DIG__ = 113
  3315. const m___FLT128_MAX_10_EXP__ = 4932
  3316. const m___FLT128_MAX_EXP__ = 16384
  3317. const m___FLT128_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3318. const m___FLT128_MIN__ = 3.36210314311209350626267781732175260e-4932
  3319. const m___FLT128_NORM_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3320. const m___FLT16_DECIMAL_DIG__ = 5
  3321. const m___FLT16_DENORM_MIN__ = 5.96046447753906250000000000000000000e-8
  3322. const m___FLT16_DIG__ = 3
  3323. const m___FLT16_EPSILON__ = 9.76562500000000000000000000000000000e-4
  3324. const m___FLT16_HAS_DENORM__ = 1
  3325. const m___FLT16_HAS_INFINITY__ = 1
  3326. const m___FLT16_HAS_QUIET_NAN__ = 1
  3327. const m___FLT16_IS_IEC_60559__ = 2
  3328. const m___FLT16_MANT_DIG__ = 11
  3329. const m___FLT16_MAX_10_EXP__ = 4
  3330. const m___FLT16_MAX_EXP__ = 16
  3331. const m___FLT16_MAX__ = 6.55040000000000000000000000000000000e+4
  3332. const m___FLT16_MIN__ = 6.10351562500000000000000000000000000e-5
  3333. const m___FLT16_NORM_MAX__ = 6.55040000000000000000000000000000000e+4
  3334. const m___FLT32X_DECIMAL_DIG__ = 17
  3335. const m___FLT32X_DENORM_MIN__ = 4.94065645841246544176568792868221372e-324
  3336. const m___FLT32X_DIG__ = 15
  3337. const m___FLT32X_EPSILON__ = 2.22044604925031308084726333618164062e-16
  3338. const m___FLT32X_HAS_DENORM__ = 1
  3339. const m___FLT32X_HAS_INFINITY__ = 1
  3340. const m___FLT32X_HAS_QUIET_NAN__ = 1
  3341. const m___FLT32X_IS_IEC_60559__ = 2
  3342. const m___FLT32X_MANT_DIG__ = 53
  3343. const m___FLT32X_MAX_10_EXP__ = 308
  3344. const m___FLT32X_MAX_EXP__ = 1024
  3345. const m___FLT32X_MAX__ = 1.79769313486231570814527423731704357e+308
  3346. const m___FLT32X_MIN__ = 2.22507385850720138309023271733240406e-308
  3347. const m___FLT32X_NORM_MAX__ = 1.79769313486231570814527423731704357e+308
  3348. const m___FLT32_DECIMAL_DIG__ = 9
  3349. const m___FLT32_DENORM_MIN__ = 1.40129846432481707092372958328991613e-45
  3350. const m___FLT32_DIG__ = 6
  3351. const m___FLT32_EPSILON__ = 1.19209289550781250000000000000000000e-7
  3352. const m___FLT32_HAS_DENORM__ = 1
  3353. const m___FLT32_HAS_INFINITY__ = 1
  3354. const m___FLT32_HAS_QUIET_NAN__ = 1
  3355. const m___FLT32_IS_IEC_60559__ = 2
  3356. const m___FLT32_MANT_DIG__ = 24
  3357. const m___FLT32_MAX_10_EXP__ = 38
  3358. const m___FLT32_MAX_EXP__ = 128
  3359. const m___FLT32_MAX__ = 3.40282346638528859811704183484516925e+38
  3360. const m___FLT32_MIN__ = 1.17549435082228750796873653722224568e-38
  3361. const m___FLT32_NORM_MAX__ = 3.40282346638528859811704183484516925e+38
  3362. const m___FLT64X_DECIMAL_DIG__ = 36
  3363. const m___FLT64X_DENORM_MIN__ = 6.47517511943802511092443895822764655e-4966
  3364. const m___FLT64X_DIG__ = 33
  3365. const m___FLT64X_EPSILON__ = 1.92592994438723585305597794258492732e-34
  3366. const m___FLT64X_HAS_DENORM__ = 1
  3367. const m___FLT64X_HAS_INFINITY__ = 1
  3368. const m___FLT64X_HAS_QUIET_NAN__ = 1
  3369. const m___FLT64X_IS_IEC_60559__ = 2
  3370. const m___FLT64X_MANT_DIG__ = 113
  3371. const m___FLT64X_MAX_10_EXP__ = 4932
  3372. const m___FLT64X_MAX_EXP__ = 16384
  3373. const m___FLT64X_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3374. const m___FLT64X_MIN__ = 3.36210314311209350626267781732175260e-4932
  3375. const m___FLT64X_NORM_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3376. const m___FLT64_DECIMAL_DIG__ = 17
  3377. const m___FLT64_DENORM_MIN__ = 4.94065645841246544176568792868221372e-324
  3378. const m___FLT64_DIG__ = 15
  3379. const m___FLT64_EPSILON__ = 2.22044604925031308084726333618164062e-16
  3380. const m___FLT64_HAS_DENORM__ = 1
  3381. const m___FLT64_HAS_INFINITY__ = 1
  3382. const m___FLT64_HAS_QUIET_NAN__ = 1
  3383. const m___FLT64_IS_IEC_60559__ = 2
  3384. const m___FLT64_MANT_DIG__ = 53
  3385. const m___FLT64_MAX_10_EXP__ = 308
  3386. const m___FLT64_MAX_EXP__ = 1024
  3387. const m___FLT64_MAX__ = 1.79769313486231570814527423731704357e+308
  3388. const m___FLT64_MIN__ = 2.22507385850720138309023271733240406e-308
  3389. const m___FLT64_NORM_MAX__ = 1.79769313486231570814527423731704357e+308
  3390. const m___FLT_DECIMAL_DIG__ = 9
  3391. const m___FLT_DENORM_MIN__ = 1.40129846432481707092372958328991613e-45
  3392. const m___FLT_DIG__ = 6
  3393. const m___FLT_EPSILON__ = 1.19209289550781250000000000000000000e-7
  3394. const m___FLT_EVAL_METHOD_C99__ = 0
  3395. const m___FLT_EVAL_METHOD_TS_18661_3__ = 0
  3396. const m___FLT_EVAL_METHOD__ = 0
  3397. const m___FLT_HAS_DENORM__ = 1
  3398. const m___FLT_HAS_INFINITY__ = 1
  3399. const m___FLT_HAS_QUIET_NAN__ = 1
  3400. const m___FLT_IS_IEC_60559__ = 2
  3401. const m___FLT_MANT_DIG__ = 24
  3402. const m___FLT_MAX_10_EXP__ = 38
  3403. const m___FLT_MAX_EXP__ = 128
  3404. const m___FLT_MAX__ = 3.40282346638528859811704183484516925e+38
  3405. const m___FLT_MIN__ = 1.17549435082228750796873653722224568e-38
  3406. const m___FLT_NORM_MAX__ = 3.40282346638528859811704183484516925e+38
  3407. const m___FLT_RADIX__ = 2
  3408. const m___FP_FAST_FMA = 1
  3409. const m___FP_FAST_FMAF = 1
  3410. const m___FP_FAST_FMAF32 = 1
  3411. const m___FP_FAST_FMAF32x = 1
  3412. const m___FP_FAST_FMAF64 = 1
  3413. const m___FUNCTION__ = "__func__"
  3414. const m___GCC_ASM_FLAG_OUTPUTS__ = 1
  3415. const m___GCC_ATOMIC_BOOL_LOCK_FREE = 2
  3416. const m___GCC_ATOMIC_CHAR16_T_LOCK_FREE = 2
  3417. const m___GCC_ATOMIC_CHAR32_T_LOCK_FREE = 2
  3418. const m___GCC_ATOMIC_CHAR_LOCK_FREE = 2
  3419. const m___GCC_ATOMIC_INT_LOCK_FREE = 2
  3420. const m___GCC_ATOMIC_LLONG_LOCK_FREE = 2
  3421. const m___GCC_ATOMIC_LONG_LOCK_FREE = 2
  3422. const m___GCC_ATOMIC_POINTER_LOCK_FREE = 2
  3423. const m___GCC_ATOMIC_SHORT_LOCK_FREE = 2
  3424. const m___GCC_ATOMIC_TEST_AND_SET_TRUEVAL = 1
  3425. const m___GCC_ATOMIC_WCHAR_T_LOCK_FREE = 2
  3426. const m___GCC_CONSTRUCTIVE_SIZE = 64
  3427. const m___GCC_DESTRUCTIVE_SIZE = 256
  3428. const m___GCC_HAVE_DWARF2_CFI_ASM = 1
  3429. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 = 1
  3430. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 = 1
  3431. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 = 1
  3432. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 = 1
  3433. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 = 1
  3434. const m___GCC_IEC_559 = 2
  3435. const m___GCC_IEC_559_COMPLEX = 2
  3436. const m___GNUC_EXECUTION_CHARSET_NAME = "UTF-8"
  3437. const m___GNUC_MINOR__ = 2
  3438. const m___GNUC_PATCHLEVEL__ = 0
  3439. const m___GNUC_STDC_INLINE__ = 1
  3440. const m___GNUC_WIDE_EXECUTION_CHARSET_NAME = "UTF-32LE"
  3441. const m___GNUC__ = 12
  3442. const m___GXX_ABI_VERSION = 1017
  3443. const m___HAVE_SPECULATION_SAFE_VALUE = 1
  3444. const m___INT16_MAX__ = 0x7fff
  3445. const m___INT32_MAX__ = 0x7fffffff
  3446. const m___INT32_TYPE__ = "int"
  3447. const m___INT64_MAX__ = 0x7fffffffffffffff
  3448. const m___INT8_MAX__ = 0x7f
  3449. const m___INTMAX_MAX__ = 0x7fffffffffffffff
  3450. const m___INTMAX_WIDTH__ = 64
  3451. const m___INTPTR_MAX__ = 0x7fffffffffffffff
  3452. const m___INTPTR_WIDTH__ = 64
  3453. const m___INT_FAST16_MAX__ = 0x7fffffffffffffff
  3454. const m___INT_FAST16_WIDTH__ = 64
  3455. const m___INT_FAST32_MAX__ = 0x7fffffffffffffff
  3456. const m___INT_FAST32_WIDTH__ = 64
  3457. const m___INT_FAST64_MAX__ = 0x7fffffffffffffff
  3458. const m___INT_FAST64_WIDTH__ = 64
  3459. const m___INT_FAST8_MAX__ = 0x7f
  3460. const m___INT_FAST8_WIDTH__ = 8
  3461. const m___INT_LEAST16_MAX__ = 0x7fff
  3462. const m___INT_LEAST16_WIDTH__ = 16
  3463. const m___INT_LEAST32_MAX__ = 0x7fffffff
  3464. const m___INT_LEAST32_TYPE__ = "int"
  3465. const m___INT_LEAST32_WIDTH__ = 32
  3466. const m___INT_LEAST64_MAX__ = 0x7fffffffffffffff
  3467. const m___INT_LEAST64_WIDTH__ = 64
  3468. const m___INT_LEAST8_MAX__ = 0x7f
  3469. const m___INT_LEAST8_WIDTH__ = 8
  3470. const m___INT_MAX__ = 0x7fffffff
  3471. const m___INT_WIDTH__ = 32
  3472. const m___LDBL_DECIMAL_DIG__ = 36
  3473. const m___LDBL_DENORM_MIN__ = 6.47517511943802511092443895822764655e-4966
  3474. const m___LDBL_DIG__ = 33
  3475. const m___LDBL_EPSILON__ = 1.92592994438723585305597794258492732e-34
  3476. const m___LDBL_HAS_DENORM__ = 1
  3477. const m___LDBL_HAS_INFINITY__ = 1
  3478. const m___LDBL_HAS_QUIET_NAN__ = 1
  3479. const m___LDBL_IS_IEC_60559__ = 2
  3480. const m___LDBL_MANT_DIG__ = 113
  3481. const m___LDBL_MAX_10_EXP__ = 4932
  3482. const m___LDBL_MAX_EXP__ = 16384
  3483. const m___LDBL_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3484. const m___LDBL_MIN__ = 3.36210314311209350626267781732175260e-4932
  3485. const m___LDBL_NORM_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3486. const m___LITTLE_ENDIAN = 1234
  3487. const m___LONG_LONG_MAX__ = 0x7fffffffffffffff
  3488. const m___LONG_LONG_WIDTH__ = 64
  3489. const m___LONG_MAX = 0x7fffffffffffffff
  3490. const m___LONG_MAX__ = 0x7fffffffffffffff
  3491. const m___LONG_WIDTH__ = 64
  3492. const m___LP64__ = 1
  3493. const m___NO_INLINE__ = 1
  3494. const m___ORDER_BIG_ENDIAN__ = 4321
  3495. const m___ORDER_LITTLE_ENDIAN__ = 1234
  3496. const m___ORDER_PDP_ENDIAN__ = 3412
  3497. const m___PDP_ENDIAN = 3412
  3498. const m___PIC__ = 2
  3499. const m___PIE__ = 2
  3500. const m___PRAGMA_REDEFINE_EXTNAME = 1
  3501. const m___PRETTY_FUNCTION__ = "__func__"
  3502. const m___PTRDIFF_MAX__ = 0x7fffffffffffffff
  3503. const m___PTRDIFF_WIDTH__ = 64
  3504. const m___SCHAR_MAX__ = 0x7f
  3505. const m___SCHAR_WIDTH__ = 8
  3506. const m___SHRT_MAX__ = 0x7fff
  3507. const m___SHRT_WIDTH__ = 16
  3508. const m___SIG_ATOMIC_MAX__ = 0x7fffffff
  3509. const m___SIG_ATOMIC_TYPE__ = "int"
  3510. const m___SIG_ATOMIC_WIDTH__ = 32
  3511. const m___SIZEOF_DOUBLE__ = 8
  3512. const m___SIZEOF_FLOAT__ = 4
  3513. const m___SIZEOF_INT128__ = 16
  3514. const m___SIZEOF_INT__ = 4
  3515. const m___SIZEOF_LONG_DOUBLE__ = 8
  3516. const m___SIZEOF_LONG_LONG__ = 8
  3517. const m___SIZEOF_LONG__ = 8
  3518. const m___SIZEOF_POINTER__ = 8
  3519. const m___SIZEOF_PTRDIFF_T__ = 8
  3520. const m___SIZEOF_SHORT__ = 2
  3521. const m___SIZEOF_SIZE_T__ = 8
  3522. const m___SIZEOF_WCHAR_T__ = 4
  3523. const m___SIZEOF_WINT_T__ = 4
  3524. const m___SIZE_MAX__ = 0xffffffffffffffff
  3525. const m___SIZE_WIDTH__ = 64
  3526. const m___STDC_HOSTED__ = 1
  3527. const m___STDC_IEC_559_COMPLEX__ = 1
  3528. const m___STDC_IEC_559__ = 1
  3529. const m___STDC_IEC_60559_BFP__ = 201404
  3530. const m___STDC_IEC_60559_COMPLEX__ = 201404
  3531. const m___STDC_ISO_10646__ = 201706
  3532. const m___STDC_UTF_16__ = 1
  3533. const m___STDC_UTF_32__ = 1
  3534. const m___STDC_VERSION__ = 201710
  3535. const m___STDC__ = 1
  3536. const m___UINT16_MAX__ = 0xffff
  3537. const m___UINT32_MAX__ = 0xffffffff
  3538. const m___UINT64_MAX__ = 0xffffffffffffffff
  3539. const m___UINT8_MAX__ = 0xff
  3540. const m___UINTMAX_MAX__ = 0xffffffffffffffff
  3541. const m___UINTPTR_MAX__ = 0xffffffffffffffff
  3542. const m___UINT_FAST16_MAX__ = 0xffffffffffffffff
  3543. const m___UINT_FAST32_MAX__ = 0xffffffffffffffff
  3544. const m___UINT_FAST64_MAX__ = 0xffffffffffffffff
  3545. const m___UINT_FAST8_MAX__ = 0xff
  3546. const m___UINT_LEAST16_MAX__ = 0xffff
  3547. const m___UINT_LEAST32_MAX__ = 0xffffffff
  3548. const m___UINT_LEAST64_MAX__ = 0xffffffffffffffff
  3549. const m___UINT_LEAST8_MAX__ = 0xff
  3550. const m___USE_TIME_BITS64 = 1
  3551. const m___VERSION__ = "12.2.0"
  3552. const m___WCHAR_MAX__ = 0xffffffff
  3553. const m___WCHAR_MIN__ = 0
  3554. const m___WCHAR_WIDTH__ = 32
  3555. const m___WINT_MAX__ = 0xffffffff
  3556. const m___WINT_MIN__ = 0
  3557. const m___WINT_WIDTH__ = 32
  3558. const m___aarch64__ = 1
  3559. const m___gnu_linux__ = 1
  3560. const m___inline = "inline"
  3561. const m___linux = 1
  3562. const m___linux__ = 1
  3563. const m___pic__ = 2
  3564. const m___pie__ = 2
  3565. const m___restrict = "restrict"
  3566. const m___restrict_arr = "restrict"
  3567. const m___tm_gmtoff = "tm_gmtoff"
  3568. const m___tm_zone = "tm_zone"
  3569. const m___unix = 1
  3570. const m___unix__ = 1
  3571. const m_alloca = "__builtin_alloca"
  3572. const m_ft_encoding_adobe_custom = "FT_ENCODING_ADOBE_CUSTOM"
  3573. const m_ft_encoding_adobe_expert = "FT_ENCODING_ADOBE_EXPERT"
  3574. const m_ft_encoding_adobe_standard = "FT_ENCODING_ADOBE_STANDARD"
  3575. const m_ft_encoding_apple_roman = "FT_ENCODING_APPLE_ROMAN"
  3576. const m_ft_encoding_big5 = "FT_ENCODING_BIG5"
  3577. const m_ft_encoding_gb2312 = "FT_ENCODING_PRC"
  3578. const m_ft_encoding_johab = "FT_ENCODING_JOHAB"
  3579. const m_ft_encoding_latin_1 = "FT_ENCODING_ADOBE_LATIN_1"
  3580. const m_ft_encoding_latin_2 = "FT_ENCODING_OLD_LATIN_2"
  3581. const m_ft_encoding_none = "FT_ENCODING_NONE"
  3582. const m_ft_encoding_sjis = "FT_ENCODING_SJIS"
  3583. const m_ft_encoding_symbol = "FT_ENCODING_MS_SYMBOL"
  3584. const m_ft_encoding_unicode = "FT_ENCODING_UNICODE"
  3585. const m_ft_encoding_wansung = "FT_ENCODING_WANSUNG"
  3586. const m_ft_fclose = "fclose"
  3587. const m_ft_fopen = "fopen"
  3588. const m_ft_fread = "fread"
  3589. const m_ft_fseek = "fseek"
  3590. const m_ft_ftell = "ftell"
  3591. const m_ft_getenv = "getenv"
  3592. const m_ft_glyph_format_bitmap = "FT_GLYPH_FORMAT_BITMAP"
  3593. const m_ft_glyph_format_composite = "FT_GLYPH_FORMAT_COMPOSITE"
  3594. const m_ft_glyph_format_none = "FT_GLYPH_FORMAT_NONE"
  3595. const m_ft_glyph_format_outline = "FT_GLYPH_FORMAT_OUTLINE"
  3596. const m_ft_glyph_format_plotter = "FT_GLYPH_FORMAT_PLOTTER"
  3597. const m_ft_jmp_buf = "jmp_buf"
  3598. const m_ft_kerning_default = "FT_KERNING_DEFAULT"
  3599. const m_ft_kerning_unfitted = "FT_KERNING_UNFITTED"
  3600. const m_ft_kerning_unscaled = "FT_KERNING_UNSCALED"
  3601. const m_ft_longjmp = "longjmp"
  3602. const m_ft_memchr = "memchr"
  3603. const m_ft_memcmp = "memcmp"
  3604. const m_ft_memcpy = "memcpy"
  3605. const m_ft_memmove = "memmove"
  3606. const m_ft_memset = "memset"
  3607. const m_ft_open_driver = "FT_OPEN_DRIVER"
  3608. const m_ft_open_memory = "FT_OPEN_MEMORY"
  3609. const m_ft_open_params = "FT_OPEN_PARAMS"
  3610. const m_ft_open_pathname = "FT_OPEN_PATHNAME"
  3611. const m_ft_open_stream = "FT_OPEN_STREAM"
  3612. const m_ft_outline_even_odd_fill = "FT_OUTLINE_EVEN_ODD_FILL"
  3613. const m_ft_outline_high_precision = "FT_OUTLINE_HIGH_PRECISION"
  3614. const m_ft_outline_ignore_dropouts = "FT_OUTLINE_IGNORE_DROPOUTS"
  3615. const m_ft_outline_none = "FT_OUTLINE_NONE"
  3616. const m_ft_outline_owner = "FT_OUTLINE_OWNER"
  3617. const m_ft_outline_reverse_fill = "FT_OUTLINE_REVERSE_FILL"
  3618. const m_ft_outline_single_pass = "FT_OUTLINE_SINGLE_PASS"
  3619. const m_ft_pixel_mode_grays = "FT_PIXEL_MODE_GRAY"
  3620. const m_ft_pixel_mode_mono = "FT_PIXEL_MODE_MONO"
  3621. const m_ft_pixel_mode_none = "FT_PIXEL_MODE_NONE"
  3622. const m_ft_pixel_mode_pal2 = "FT_PIXEL_MODE_GRAY2"
  3623. const m_ft_pixel_mode_pal4 = "FT_PIXEL_MODE_GRAY4"
  3624. const m_ft_ptrdiff_t = "ptrdiff_t"
  3625. const m_ft_qsort = "qsort"
  3626. const m_ft_raster_flag_aa = "FT_RASTER_FLAG_AA"
  3627. const m_ft_raster_flag_clip = "FT_RASTER_FLAG_CLIP"
  3628. const m_ft_raster_flag_default = "FT_RASTER_FLAG_DEFAULT"
  3629. const m_ft_raster_flag_direct = "FT_RASTER_FLAG_DIRECT"
  3630. const m_ft_render_mode_mono = "FT_RENDER_MODE_MONO"
  3631. const m_ft_render_mode_normal = "FT_RENDER_MODE_NORMAL"
  3632. const m_ft_scalloc = "calloc"
  3633. const m_ft_sfree = "free"
  3634. const m_ft_smalloc = "malloc"
  3635. const m_ft_sprintf = "sprintf"
  3636. const m_ft_srealloc = "realloc"
  3637. const m_ft_strcat = "strcat"
  3638. const m_ft_strcmp = "strcmp"
  3639. const m_ft_strcpy = "strcpy"
  3640. const m_ft_strlen = "strlen"
  3641. const m_ft_strncmp = "strncmp"
  3642. const m_ft_strncpy = "strncpy"
  3643. const m_ft_strrchr = "strrchr"
  3644. const m_ft_strstr = "strstr"
  3645. const m_ft_strtol = "strtol"
  3646. const m_linux = 1
  3647. const m_static_assert = "_Static_assert"
  3648. const m_sz_xAllocColorCellsReply = 32
  3649. const m_sz_xAllocColorCellsReq = 12
  3650. const m_sz_xAllocColorPlanesReply = 32
  3651. const m_sz_xAllocColorPlanesReq = 16
  3652. const m_sz_xAllocColorReply = 32
  3653. const m_sz_xAllocColorReq = 16
  3654. const m_sz_xAllocNamedColorReply = 32
  3655. const m_sz_xAllocNamedColorReq = 12
  3656. const m_sz_xAllowEventsReq = 8
  3657. const m_sz_xArc = 12
  3658. const m_sz_xBellReq = 4
  3659. const m_sz_xChangeActivePointerGrabReq = 16
  3660. const m_sz_xChangeGCReq = 12
  3661. const m_sz_xChangeHostsReq = 8
  3662. const m_sz_xChangeKeyboardControlReq = 8
  3663. const m_sz_xChangeKeyboardMappingReq = 8
  3664. const m_sz_xChangeModeReq = 4
  3665. const m_sz_xChangePointerControlReq = 12
  3666. const m_sz_xChangePropertyReq = 24
  3667. const m_sz_xChangeSaveSetReq = 8
  3668. const m_sz_xChangeWindowAttributesReq = 12
  3669. const m_sz_xCharInfo = 12
  3670. const m_sz_xCirculateWindowReq = 8
  3671. const m_sz_xClearAreaReq = 16
  3672. const m_sz_xColorItem = 12
  3673. const m_sz_xConfigureWindowReq = 12
  3674. const m_sz_xConnClientPrefix = 12
  3675. const m_sz_xConnSetup = 32
  3676. const m_sz_xConnSetupPrefix = 8
  3677. const m_sz_xConvertSelectionReq = 24
  3678. const m_sz_xCopyAreaReq = 28
  3679. const m_sz_xCopyColormapAndFreeReq = 12
  3680. const m_sz_xCopyGCReq = 16
  3681. const m_sz_xCopyPlaneReq = 32
  3682. const m_sz_xCreateColormapReq = 16
  3683. const m_sz_xCreateCursorReq = 32
  3684. const m_sz_xCreateGCReq = 16
  3685. const m_sz_xCreateGlyphCursorReq = 32
  3686. const m_sz_xCreatePixmapReq = 16
  3687. const m_sz_xCreateWindowReq = 32
  3688. const m_sz_xDeletePropertyReq = 12
  3689. const m_sz_xDepth = 8
  3690. const m_sz_xError = 32
  3691. const m_sz_xEvent = 32
  3692. const m_sz_xFillPolyReq = 16
  3693. const m_sz_xFontProp = 8
  3694. const m_sz_xForceScreenSaverReq = 4
  3695. const m_sz_xFreeColorsReq = 12
  3696. const m_sz_xGenericReply = 32
  3697. const m_sz_xGetAtomNameReply = 32
  3698. const m_sz_xGetFontPathReply = 32
  3699. const m_sz_xGetGeometryReply = 32
  3700. const m_sz_xGetImageReply = 32
  3701. const m_sz_xGetImageReq = 20
  3702. const m_sz_xGetInputFocusReply = 32
  3703. const m_sz_xGetKeyboardControlReply = 52
  3704. const m_sz_xGetKeyboardMappingReply = 32
  3705. const m_sz_xGetKeyboardMappingReq = 8
  3706. const m_sz_xGetModifierMappingReply = 32
  3707. const m_sz_xGetMotionEventsReply = 32
  3708. const m_sz_xGetMotionEventsReq = 16
  3709. const m_sz_xGetPointerControlReply = 32
  3710. const m_sz_xGetPointerMappingReply = 32
  3711. const m_sz_xGetPropertyReply = 32
  3712. const m_sz_xGetPropertyReq = 24
  3713. const m_sz_xGetScreenSaverReply = 32
  3714. const m_sz_xGetSelectionOwnerReply = 32
  3715. const m_sz_xGetWindowAttributesReply = 44
  3716. const m_sz_xGrabButtonReq = 24
  3717. const m_sz_xGrabKeyReq = 16
  3718. const m_sz_xGrabKeyboardReply = 32
  3719. const m_sz_xGrabKeyboardReq = 16
  3720. const m_sz_xGrabPointerReply = 32
  3721. const m_sz_xGrabPointerReq = 24
  3722. const m_sz_xHostEntry = 4
  3723. const m_sz_xImageText16Req = 16
  3724. const m_sz_xImageText8Req = 16
  3725. const m_sz_xImageTextReq = 16
  3726. const m_sz_xInternAtomReply = 32
  3727. const m_sz_xInternAtomReq = 8
  3728. const m_sz_xKeymapEvent = 32
  3729. const m_sz_xListExtensionsReply = 32
  3730. const m_sz_xListFontsReply = 32
  3731. const m_sz_xListFontsReq = 8
  3732. const m_sz_xListFontsWithInfoReply = 60
  3733. const m_sz_xListFontsWithInfoReq = 8
  3734. const m_sz_xListHostsReply = 32
  3735. const m_sz_xListHostsReq = 4
  3736. const m_sz_xListInstalledColormapsReply = 32
  3737. const m_sz_xListPropertiesReply = 32
  3738. const m_sz_xLookupColorReply = 32
  3739. const m_sz_xLookupColorReq = 12
  3740. const m_sz_xOpenFontReq = 12
  3741. const m_sz_xPixmapFormat = 8
  3742. const m_sz_xPoint = 4
  3743. const m_sz_xPolyArcReq = 12
  3744. const m_sz_xPolyFillArcReq = 12
  3745. const m_sz_xPolyFillRectangleReq = 12
  3746. const m_sz_xPolyLineReq = 12
  3747. const m_sz_xPolyPointReq = 12
  3748. const m_sz_xPolyRectangleReq = 12
  3749. const m_sz_xPolySegmentReq = 12
  3750. const m_sz_xPolyText16Req = 16
  3751. const m_sz_xPolyText8Req = 16
  3752. const m_sz_xPolyTextReq = 16
  3753. const m_sz_xPropIconSize = 24
  3754. const m_sz_xPutImageReq = 24
  3755. const m_sz_xQueryBestSizeReply = 32
  3756. const m_sz_xQueryBestSizeReq = 12
  3757. const m_sz_xQueryColorsReply = 32
  3758. const m_sz_xQueryColorsReq = 8
  3759. const m_sz_xQueryExtensionReply = 32
  3760. const m_sz_xQueryExtensionReq = 8
  3761. const m_sz_xQueryFontReply = 60
  3762. const m_sz_xQueryKeymapReply = 40
  3763. const m_sz_xQueryPointerReply = 32
  3764. const m_sz_xQueryTextExtentsReply = 32
  3765. const m_sz_xQueryTextExtentsReq = 8
  3766. const m_sz_xQueryTreeReply = 32
  3767. const m_sz_xRecolorCursorReq = 20
  3768. const m_sz_xRectangle = 8
  3769. const m_sz_xReparentWindowReq = 16
  3770. const m_sz_xReply = 32
  3771. const m_sz_xReq = 4
  3772. const m_sz_xResourceReq = 8
  3773. const m_sz_xRotatePropertiesReq = 12
  3774. const m_sz_xSegment = 8
  3775. const m_sz_xSendEventReq = 44
  3776. const m_sz_xSetAccessControlReq = 4
  3777. const m_sz_xSetClipRectanglesReq = 12
  3778. const m_sz_xSetCloseDownModeReq = 4
  3779. const m_sz_xSetDashesReq = 12
  3780. const m_sz_xSetFontPathReq = 8
  3781. const m_sz_xSetInputFocusReq = 12
  3782. const m_sz_xSetMappingReply = 32
  3783. const m_sz_xSetModifierMappingReply = 32
  3784. const m_sz_xSetModifierMappingReq = 4
  3785. const m_sz_xSetPointerMappingReply = 32
  3786. const m_sz_xSetPointerMappingReq = 4
  3787. const m_sz_xSetScreenSaverReq = 12
  3788. const m_sz_xSetSelectionOwnerReq = 16
  3789. const m_sz_xStoreColorsReq = 8
  3790. const m_sz_xStoreNamedColorReq = 16
  3791. const m_sz_xTextElt = 2
  3792. const m_sz_xTimecoord = 8
  3793. const m_sz_xTranslateCoordsReply = 32
  3794. const m_sz_xTranslateCoordsReq = 16
  3795. const m_sz_xUngrabButtonReq = 12
  3796. const m_sz_xUngrabKeyReq = 12
  3797. const m_sz_xVisualType = 24
  3798. const m_sz_xWarpPointerReq = 24
  3799. const m_sz_xWindowRoot = 40
  3800. const m_sz_xrgb = 8
  3801. const m_unix = 1
  3802. const m_xFalse = 0
  3803. const m_xTrue = 1
  3804. const m_xfree = "free"
  3805. const m_xmalloc = "malloc"
  3806. const m_xthread_self = "pthread_self"
  3807. type t__builtin_va_list = uintptr
  3808. type t__predefined_size_t = uint64
  3809. type t__predefined_wchar_t = uint32
  3810. type t__predefined_ptrdiff_t = int64
  3811. type Tsize_t = uint64
  3812. type Tssize_t = int64
  3813. type Toff_t = int64
  3814. type Tva_list = uintptr
  3815. type t__isoc_va_list = uintptr
  3816. type Tfpos_t = struct {
  3817. F__lldata [0]int64
  3818. F__align [0]float64
  3819. F__opaque [16]uint8
  3820. }
  3821. type T_G_fpos64_t = Tfpos_t
  3822. type Tcookie_io_functions_t = struct {
  3823. Fread uintptr
  3824. Fwrite uintptr
  3825. Fseek uintptr
  3826. Fclose1 uintptr
  3827. }
  3828. type T_IO_cookie_io_functions_t = Tcookie_io_functions_t
  3829. type Twchar_t = uint32
  3830. type Tdiv_t = struct {
  3831. Fquot int32
  3832. Frem int32
  3833. }
  3834. type Tldiv_t = struct {
  3835. Fquot int64
  3836. Frem int64
  3837. }
  3838. type Tlldiv_t = struct {
  3839. Fquot int64
  3840. Frem int64
  3841. }
  3842. type Tlocale_t = uintptr
  3843. type Tblksize_t = int32
  3844. type Tnlink_t = uint32
  3845. type Tregister_t = int64
  3846. type Ttime_t = int64
  3847. type Tsuseconds_t = int64
  3848. type Tint8_t = int8
  3849. type Tint16_t = int16
  3850. type Tint32_t = int32
  3851. type Tint64_t = int64
  3852. type Tu_int64_t = uint64
  3853. type Tmode_t = uint32
  3854. type Tino_t = uint64
  3855. type Tdev_t = uint64
  3856. type Tblkcnt_t = int64
  3857. type Tfsblkcnt_t = uint64
  3858. type Tfsfilcnt_t = uint64
  3859. type Ttimer_t = uintptr
  3860. type Tclockid_t = int32
  3861. type Tclock_t = int64
  3862. type Tpid_t = int32
  3863. type Tid_t = uint32
  3864. type Tuid_t = uint32
  3865. type Tgid_t = uint32
  3866. type Tkey_t = int32
  3867. type Tuseconds_t = uint32
  3868. type Tpthread_t = uintptr
  3869. type Tpthread_once_t = int32
  3870. type Tpthread_key_t = uint32
  3871. type Tpthread_spinlock_t = int32
  3872. type Tpthread_mutexattr_t = struct {
  3873. F__attr uint32
  3874. }
  3875. type Tpthread_condattr_t = struct {
  3876. F__attr uint32
  3877. }
  3878. type Tpthread_barrierattr_t = struct {
  3879. F__attr uint32
  3880. }
  3881. type Tpthread_rwlockattr_t = struct {
  3882. F__attr [2]uint32
  3883. }
  3884. type Tpthread_attr_t = struct {
  3885. F__u struct {
  3886. F__vi [0][14]int32
  3887. F__s [0][7]uint64
  3888. F__i [14]int32
  3889. }
  3890. }
  3891. type Tpthread_mutex_t = struct {
  3892. F__u struct {
  3893. F__vi [0][10]int32
  3894. F__p [0][5]uintptr
  3895. F__i [10]int32
  3896. }
  3897. }
  3898. type Tpthread_cond_t = struct {
  3899. F__u struct {
  3900. F__vi [0][12]int32
  3901. F__p [0][6]uintptr
  3902. F__i [12]int32
  3903. }
  3904. }
  3905. type Tpthread_rwlock_t = struct {
  3906. F__u struct {
  3907. F__vi [0][14]int32
  3908. F__p [0][7]uintptr
  3909. F__i [14]int32
  3910. }
  3911. }
  3912. type Tpthread_barrier_t = struct {
  3913. F__u struct {
  3914. F__vi [0][8]int32
  3915. F__p [0][4]uintptr
  3916. F__i [8]int32
  3917. }
  3918. }
  3919. type Tu_int8_t = uint8
  3920. type Tu_int16_t = uint16
  3921. type Tu_int32_t = uint32
  3922. type Tcaddr_t = uintptr
  3923. type Tu_char = uint8
  3924. type Tu_short = uint16
  3925. type Tushort = uint16
  3926. type Tu_int = uint32
  3927. type Tuint = uint32
  3928. type Tu_long = uint64
  3929. type Tulong = uint64
  3930. type Tquad_t = int64
  3931. type Tu_quad_t = uint64
  3932. type Tuint16_t = uint16
  3933. type Tuint32_t = uint32
  3934. type Tuint64_t = uint64
  3935. type Ttimeval = struct {
  3936. Ftv_sec Ttime_t
  3937. Ftv_usec Tsuseconds_t
  3938. }
  3939. type Ttimespec = struct {
  3940. Ftv_sec Ttime_t
  3941. Ftv_nsec int64
  3942. }
  3943. type Tsigset_t = struct {
  3944. F__bits [16]uint64
  3945. }
  3946. type t__sigset_t = Tsigset_t
  3947. type Tfd_mask = uint64
  3948. type Tfd_set = struct {
  3949. Ffds_bits [16]uint64
  3950. }
  3951. type TXID = uint64
  3952. type TMask = uint64
  3953. type TAtom = uint64
  3954. type TVisualID = uint64
  3955. type TTime = uint64
  3956. type TWindow = uint64
  3957. type TDrawable = uint64
  3958. type TFont = uint64
  3959. type TPixmap = uint64
  3960. type TCursor = uint64
  3961. type TColormap = uint64
  3962. type TGContext = uint64
  3963. type TKeySym = uint64
  3964. type TKeyCode = uint8
  3965. type Tmax_align_t = struct {
  3966. F__ll int64
  3967. F__ld float64
  3968. }
  3969. type Tptrdiff_t = int64
  3970. type TXPointer = uintptr
  3971. type TXExtData = struct {
  3972. Fnumber int32
  3973. Fnext uintptr
  3974. Ffree_private uintptr
  3975. Fprivate_data TXPointer
  3976. }
  3977. type T_XExtData = TXExtData
  3978. type TXExtCodes = struct {
  3979. Fextension int32
  3980. Fmajor_opcode int32
  3981. Ffirst_event int32
  3982. Ffirst_error int32
  3983. }
  3984. type TXPixmapFormatValues = struct {
  3985. Fdepth int32
  3986. Fbits_per_pixel int32
  3987. Fscanline_pad int32
  3988. }
  3989. type TXGCValues = struct {
  3990. Ffunction int32
  3991. Fplane_mask uint64
  3992. Fforeground uint64
  3993. Fbackground uint64
  3994. Fline_width int32
  3995. Fline_style int32
  3996. Fcap_style int32
  3997. Fjoin_style int32
  3998. Ffill_style int32
  3999. Ffill_rule int32
  4000. Farc_mode int32
  4001. Ftile TPixmap
  4002. Fstipple TPixmap
  4003. Fts_x_origin int32
  4004. Fts_y_origin int32
  4005. Ffont TFont
  4006. Fsubwindow_mode int32
  4007. Fgraphics_exposures int32
  4008. Fclip_x_origin int32
  4009. Fclip_y_origin int32
  4010. Fclip_mask TPixmap
  4011. Fdash_offset int32
  4012. Fdashes uint8
  4013. }
  4014. type TGC = uintptr
  4015. type T_XGC = struct {
  4016. Fext_data uintptr
  4017. Fgid TGContext
  4018. Frects int32
  4019. Fdashes int32
  4020. Fdirty uint64
  4021. Fvalues TXGCValues
  4022. }
  4023. type TVisual = struct {
  4024. Fext_data uintptr
  4025. Fvisualid TVisualID
  4026. Fclass int32
  4027. Fred_mask uint64
  4028. Fgreen_mask uint64
  4029. Fblue_mask uint64
  4030. Fbits_per_rgb int32
  4031. Fmap_entries int32
  4032. }
  4033. type TDepth = struct {
  4034. Fdepth int32
  4035. Fnvisuals int32
  4036. Fvisuals uintptr
  4037. }
  4038. type T_XDisplay = struct {
  4039. Fext_data uintptr
  4040. Ffree_funcs uintptr
  4041. Ffd int32
  4042. Fconn_checker int32
  4043. Fproto_major_version int32
  4044. Fproto_minor_version int32
  4045. Fvendor uintptr
  4046. Fresource_base TXID
  4047. Fresource_mask TXID
  4048. Fresource_id TXID
  4049. Fresource_shift int32
  4050. Fresource_alloc uintptr
  4051. Fbyte_order int32
  4052. Fbitmap_unit int32
  4053. Fbitmap_pad int32
  4054. Fbitmap_bit_order int32
  4055. Fnformats int32
  4056. Fpixmap_format uintptr
  4057. Fvnumber int32
  4058. Frelease int32
  4059. Fhead uintptr
  4060. Ftail uintptr
  4061. Fqlen int32
  4062. Flast_request_read uint64
  4063. Frequest uint64
  4064. Flast_req uintptr
  4065. Fbuffer uintptr
  4066. Fbufptr uintptr
  4067. Fbufmax uintptr
  4068. Fmax_request_size uint32
  4069. Fdb uintptr
  4070. Fsynchandler uintptr
  4071. Fdisplay_name uintptr
  4072. Fdefault_screen int32
  4073. Fnscreens int32
  4074. Fscreens uintptr
  4075. Fmotion_buffer uint64
  4076. Fflags uint64
  4077. Fmin_keycode int32
  4078. Fmax_keycode int32
  4079. Fkeysyms uintptr
  4080. Fmodifiermap uintptr
  4081. Fkeysyms_per_keycode int32
  4082. Fxdefaults uintptr
  4083. Fscratch_buffer uintptr
  4084. Fscratch_length uint64
  4085. Fext_number int32
  4086. Fext_procs uintptr
  4087. Fevent_vec [128]uintptr
  4088. Fwire_vec [128]uintptr
  4089. Flock_meaning TKeySym
  4090. Flock uintptr
  4091. Fasync_handlers uintptr
  4092. Fbigreq_size uint64
  4093. Flock_fns uintptr
  4094. Fidlist_alloc uintptr
  4095. Fkey_bindings uintptr
  4096. Fcursor_font TFont
  4097. Fatoms uintptr
  4098. Fmode_switch uint32
  4099. Fnum_lock uint32
  4100. Fcontext_db uintptr
  4101. Ferror_vec uintptr
  4102. Fcms struct {
  4103. FdefaultCCCs TXPointer
  4104. FclientCmaps TXPointer
  4105. FperVisualIntensityMaps TXPointer
  4106. }
  4107. Fim_filters uintptr
  4108. Fqfree uintptr
  4109. Fnext_event_serial_num uint64
  4110. Fflushes uintptr
  4111. Fim_fd_info uintptr
  4112. Fim_fd_length int32
  4113. Fconn_watchers uintptr
  4114. Fwatcher_count int32
  4115. Ffiledes TXPointer
  4116. Fsavedsynchandler uintptr
  4117. Fresource_max TXID
  4118. Fxcmisc_opcode int32
  4119. Fxkb_info uintptr
  4120. Ftrans_conn uintptr
  4121. Fxcb uintptr
  4122. Fnext_cookie uint32
  4123. Fgeneric_event_vec [128]uintptr
  4124. Fgeneric_event_copy_vec [128]uintptr
  4125. Fcookiejar uintptr
  4126. Ferror_threads uintptr
  4127. Fexit_handler TXIOErrorExitHandler
  4128. Fexit_handler_data uintptr
  4129. Fin_ifevent TCARD32
  4130. Fifevent_thread Txthread_t
  4131. }
  4132. type TScreen = struct {
  4133. Fext_data uintptr
  4134. Fdisplay uintptr
  4135. Froot TWindow
  4136. Fwidth int32
  4137. Fheight int32
  4138. Fmwidth int32
  4139. Fmheight int32
  4140. Fndepths int32
  4141. Fdepths uintptr
  4142. Froot_depth int32
  4143. Froot_visual uintptr
  4144. Fdefault_gc TGC
  4145. Fcmap TColormap
  4146. Fwhite_pixel uint64
  4147. Fblack_pixel uint64
  4148. Fmax_maps int32
  4149. Fmin_maps int32
  4150. Fbacking_store int32
  4151. Fsave_unders int32
  4152. Froot_input_mask int64
  4153. }
  4154. type TScreenFormat = struct {
  4155. Fext_data uintptr
  4156. Fdepth int32
  4157. Fbits_per_pixel int32
  4158. Fscanline_pad int32
  4159. }
  4160. type TXSetWindowAttributes = struct {
  4161. Fbackground_pixmap TPixmap
  4162. Fbackground_pixel uint64
  4163. Fborder_pixmap TPixmap
  4164. Fborder_pixel uint64
  4165. Fbit_gravity int32
  4166. Fwin_gravity int32
  4167. Fbacking_store int32
  4168. Fbacking_planes uint64
  4169. Fbacking_pixel uint64
  4170. Fsave_under int32
  4171. Fevent_mask int64
  4172. Fdo_not_propagate_mask int64
  4173. Foverride_redirect int32
  4174. Fcolormap TColormap
  4175. Fcursor TCursor
  4176. }
  4177. type TXWindowAttributes = struct {
  4178. Fx int32
  4179. Fy int32
  4180. Fwidth int32
  4181. Fheight int32
  4182. Fborder_width int32
  4183. Fdepth int32
  4184. Fvisual uintptr
  4185. Froot TWindow
  4186. Fclass int32
  4187. Fbit_gravity int32
  4188. Fwin_gravity int32
  4189. Fbacking_store int32
  4190. Fbacking_planes uint64
  4191. Fbacking_pixel uint64
  4192. Fsave_under int32
  4193. Fcolormap TColormap
  4194. Fmap_installed int32
  4195. Fmap_state int32
  4196. Fall_event_masks int64
  4197. Fyour_event_mask int64
  4198. Fdo_not_propagate_mask int64
  4199. Foverride_redirect int32
  4200. Fscreen uintptr
  4201. }
  4202. type TXHostAddress = struct {
  4203. Ffamily int32
  4204. Flength int32
  4205. Faddress uintptr
  4206. }
  4207. type TXServerInterpretedAddress = struct {
  4208. Ftypelength int32
  4209. Fvaluelength int32
  4210. Ftype1 uintptr
  4211. Fvalue uintptr
  4212. }
  4213. type TXImage = struct {
  4214. Fwidth int32
  4215. Fheight int32
  4216. Fxoffset int32
  4217. Fformat int32
  4218. Fdata uintptr
  4219. Fbyte_order int32
  4220. Fbitmap_unit int32
  4221. Fbitmap_bit_order int32
  4222. Fbitmap_pad int32
  4223. Fdepth int32
  4224. Fbytes_per_line int32
  4225. Fbits_per_pixel int32
  4226. Fred_mask uint64
  4227. Fgreen_mask uint64
  4228. Fblue_mask uint64
  4229. Fobdata TXPointer
  4230. Ff Tfuncs
  4231. }
  4232. type T_XImage = TXImage
  4233. type TXWindowChanges = struct {
  4234. Fx int32
  4235. Fy int32
  4236. Fwidth int32
  4237. Fheight int32
  4238. Fborder_width int32
  4239. Fsibling TWindow
  4240. Fstack_mode int32
  4241. }
  4242. type TXColor = struct {
  4243. Fpixel uint64
  4244. Fred uint16
  4245. Fgreen uint16
  4246. Fblue uint16
  4247. Fflags uint8
  4248. Fpad uint8
  4249. }
  4250. type TXSegment = struct {
  4251. Fx1 int16
  4252. Fy1 int16
  4253. Fx2 int16
  4254. Fy2 int16
  4255. }
  4256. type TXPoint = struct {
  4257. Fx int16
  4258. Fy int16
  4259. }
  4260. type TXRectangle = struct {
  4261. Fx int16
  4262. Fy int16
  4263. Fwidth uint16
  4264. Fheight uint16
  4265. }
  4266. type TXArc = struct {
  4267. Fx int16
  4268. Fy int16
  4269. Fwidth uint16
  4270. Fheight uint16
  4271. Fangle1 int16
  4272. Fangle2 int16
  4273. }
  4274. type TXKeyboardControl = struct {
  4275. Fkey_click_percent int32
  4276. Fbell_percent int32
  4277. Fbell_pitch int32
  4278. Fbell_duration int32
  4279. Fled int32
  4280. Fled_mode int32
  4281. Fkey int32
  4282. Fauto_repeat_mode int32
  4283. }
  4284. type TXKeyboardState = struct {
  4285. Fkey_click_percent int32
  4286. Fbell_percent int32
  4287. Fbell_pitch uint32
  4288. Fbell_duration uint32
  4289. Fled_mask uint64
  4290. Fglobal_auto_repeat int32
  4291. Fauto_repeats [32]uint8
  4292. }
  4293. type TXTimeCoord = struct {
  4294. Ftime TTime
  4295. Fx int16
  4296. Fy int16
  4297. }
  4298. type TXModifierKeymap = struct {
  4299. Fmax_keypermod int32
  4300. Fmodifiermap uintptr
  4301. }
  4302. type TDisplay = struct {
  4303. Fext_data uintptr
  4304. Ffree_funcs uintptr
  4305. Ffd int32
  4306. Fconn_checker int32
  4307. Fproto_major_version int32
  4308. Fproto_minor_version int32
  4309. Fvendor uintptr
  4310. Fresource_base TXID
  4311. Fresource_mask TXID
  4312. Fresource_id TXID
  4313. Fresource_shift int32
  4314. Fresource_alloc uintptr
  4315. Fbyte_order int32
  4316. Fbitmap_unit int32
  4317. Fbitmap_pad int32
  4318. Fbitmap_bit_order int32
  4319. Fnformats int32
  4320. Fpixmap_format uintptr
  4321. Fvnumber int32
  4322. Frelease int32
  4323. Fhead uintptr
  4324. Ftail uintptr
  4325. Fqlen int32
  4326. Flast_request_read uint64
  4327. Frequest uint64
  4328. Flast_req uintptr
  4329. Fbuffer uintptr
  4330. Fbufptr uintptr
  4331. Fbufmax uintptr
  4332. Fmax_request_size uint32
  4333. Fdb uintptr
  4334. Fsynchandler uintptr
  4335. Fdisplay_name uintptr
  4336. Fdefault_screen int32
  4337. Fnscreens int32
  4338. Fscreens uintptr
  4339. Fmotion_buffer uint64
  4340. Fflags uint64
  4341. Fmin_keycode int32
  4342. Fmax_keycode int32
  4343. Fkeysyms uintptr
  4344. Fmodifiermap uintptr
  4345. Fkeysyms_per_keycode int32
  4346. Fxdefaults uintptr
  4347. Fscratch_buffer uintptr
  4348. Fscratch_length uint64
  4349. Fext_number int32
  4350. Fext_procs uintptr
  4351. Fevent_vec [128]uintptr
  4352. Fwire_vec [128]uintptr
  4353. Flock_meaning TKeySym
  4354. Flock uintptr
  4355. Fasync_handlers uintptr
  4356. Fbigreq_size uint64
  4357. Flock_fns uintptr
  4358. Fidlist_alloc uintptr
  4359. Fkey_bindings uintptr
  4360. Fcursor_font TFont
  4361. Fatoms uintptr
  4362. Fmode_switch uint32
  4363. Fnum_lock uint32
  4364. Fcontext_db uintptr
  4365. Ferror_vec uintptr
  4366. Fcms struct {
  4367. FdefaultCCCs TXPointer
  4368. FclientCmaps TXPointer
  4369. FperVisualIntensityMaps TXPointer
  4370. }
  4371. Fim_filters uintptr
  4372. Fqfree uintptr
  4373. Fnext_event_serial_num uint64
  4374. Fflushes uintptr
  4375. Fim_fd_info uintptr
  4376. Fim_fd_length int32
  4377. Fconn_watchers uintptr
  4378. Fwatcher_count int32
  4379. Ffiledes TXPointer
  4380. Fsavedsynchandler uintptr
  4381. Fresource_max TXID
  4382. Fxcmisc_opcode int32
  4383. Fxkb_info uintptr
  4384. Ftrans_conn uintptr
  4385. Fxcb uintptr
  4386. Fnext_cookie uint32
  4387. Fgeneric_event_vec [128]uintptr
  4388. Fgeneric_event_copy_vec [128]uintptr
  4389. Fcookiejar uintptr
  4390. Ferror_threads uintptr
  4391. Fexit_handler TXIOErrorExitHandler
  4392. Fexit_handler_data uintptr
  4393. Fin_ifevent TCARD32
  4394. Fifevent_thread Txthread_t
  4395. }
  4396. type T_XPrivDisplay = uintptr
  4397. type TXKeyEvent = struct {
  4398. Ftype1 int32
  4399. Fserial uint64
  4400. Fsend_event int32
  4401. Fdisplay uintptr
  4402. Fwindow TWindow
  4403. Froot TWindow
  4404. Fsubwindow TWindow
  4405. Ftime TTime
  4406. Fx int32
  4407. Fy int32
  4408. Fx_root int32
  4409. Fy_root int32
  4410. Fstate uint32
  4411. Fkeycode uint32
  4412. Fsame_screen int32
  4413. }
  4414. type TXKeyPressedEvent = struct {
  4415. Ftype1 int32
  4416. Fserial uint64
  4417. Fsend_event int32
  4418. Fdisplay uintptr
  4419. Fwindow TWindow
  4420. Froot TWindow
  4421. Fsubwindow TWindow
  4422. Ftime TTime
  4423. Fx int32
  4424. Fy int32
  4425. Fx_root int32
  4426. Fy_root int32
  4427. Fstate uint32
  4428. Fkeycode uint32
  4429. Fsame_screen int32
  4430. }
  4431. type TXKeyReleasedEvent = struct {
  4432. Ftype1 int32
  4433. Fserial uint64
  4434. Fsend_event int32
  4435. Fdisplay uintptr
  4436. Fwindow TWindow
  4437. Froot TWindow
  4438. Fsubwindow TWindow
  4439. Ftime TTime
  4440. Fx int32
  4441. Fy int32
  4442. Fx_root int32
  4443. Fy_root int32
  4444. Fstate uint32
  4445. Fkeycode uint32
  4446. Fsame_screen int32
  4447. }
  4448. type TXButtonEvent = struct {
  4449. Ftype1 int32
  4450. Fserial uint64
  4451. Fsend_event int32
  4452. Fdisplay uintptr
  4453. Fwindow TWindow
  4454. Froot TWindow
  4455. Fsubwindow TWindow
  4456. Ftime TTime
  4457. Fx int32
  4458. Fy int32
  4459. Fx_root int32
  4460. Fy_root int32
  4461. Fstate uint32
  4462. Fbutton uint32
  4463. Fsame_screen int32
  4464. }
  4465. type TXButtonPressedEvent = struct {
  4466. Ftype1 int32
  4467. Fserial uint64
  4468. Fsend_event int32
  4469. Fdisplay uintptr
  4470. Fwindow TWindow
  4471. Froot TWindow
  4472. Fsubwindow TWindow
  4473. Ftime TTime
  4474. Fx int32
  4475. Fy int32
  4476. Fx_root int32
  4477. Fy_root int32
  4478. Fstate uint32
  4479. Fbutton uint32
  4480. Fsame_screen int32
  4481. }
  4482. type TXButtonReleasedEvent = struct {
  4483. Ftype1 int32
  4484. Fserial uint64
  4485. Fsend_event int32
  4486. Fdisplay uintptr
  4487. Fwindow TWindow
  4488. Froot TWindow
  4489. Fsubwindow TWindow
  4490. Ftime TTime
  4491. Fx int32
  4492. Fy int32
  4493. Fx_root int32
  4494. Fy_root int32
  4495. Fstate uint32
  4496. Fbutton uint32
  4497. Fsame_screen int32
  4498. }
  4499. type TXMotionEvent = struct {
  4500. Ftype1 int32
  4501. Fserial uint64
  4502. Fsend_event int32
  4503. Fdisplay uintptr
  4504. Fwindow TWindow
  4505. Froot TWindow
  4506. Fsubwindow TWindow
  4507. Ftime TTime
  4508. Fx int32
  4509. Fy int32
  4510. Fx_root int32
  4511. Fy_root int32
  4512. Fstate uint32
  4513. Fis_hint uint8
  4514. Fsame_screen int32
  4515. }
  4516. type TXPointerMovedEvent = struct {
  4517. Ftype1 int32
  4518. Fserial uint64
  4519. Fsend_event int32
  4520. Fdisplay uintptr
  4521. Fwindow TWindow
  4522. Froot TWindow
  4523. Fsubwindow TWindow
  4524. Ftime TTime
  4525. Fx int32
  4526. Fy int32
  4527. Fx_root int32
  4528. Fy_root int32
  4529. Fstate uint32
  4530. Fis_hint uint8
  4531. Fsame_screen int32
  4532. }
  4533. type TXCrossingEvent = struct {
  4534. Ftype1 int32
  4535. Fserial uint64
  4536. Fsend_event int32
  4537. Fdisplay uintptr
  4538. Fwindow TWindow
  4539. Froot TWindow
  4540. Fsubwindow TWindow
  4541. Ftime TTime
  4542. Fx int32
  4543. Fy int32
  4544. Fx_root int32
  4545. Fy_root int32
  4546. Fmode int32
  4547. Fdetail int32
  4548. Fsame_screen int32
  4549. Ffocus int32
  4550. Fstate uint32
  4551. }
  4552. type TXEnterWindowEvent = struct {
  4553. Ftype1 int32
  4554. Fserial uint64
  4555. Fsend_event int32
  4556. Fdisplay uintptr
  4557. Fwindow TWindow
  4558. Froot TWindow
  4559. Fsubwindow TWindow
  4560. Ftime TTime
  4561. Fx int32
  4562. Fy int32
  4563. Fx_root int32
  4564. Fy_root int32
  4565. Fmode int32
  4566. Fdetail int32
  4567. Fsame_screen int32
  4568. Ffocus int32
  4569. Fstate uint32
  4570. }
  4571. type TXLeaveWindowEvent = struct {
  4572. Ftype1 int32
  4573. Fserial uint64
  4574. Fsend_event int32
  4575. Fdisplay uintptr
  4576. Fwindow TWindow
  4577. Froot TWindow
  4578. Fsubwindow TWindow
  4579. Ftime TTime
  4580. Fx int32
  4581. Fy int32
  4582. Fx_root int32
  4583. Fy_root int32
  4584. Fmode int32
  4585. Fdetail int32
  4586. Fsame_screen int32
  4587. Ffocus int32
  4588. Fstate uint32
  4589. }
  4590. type TXFocusChangeEvent = struct {
  4591. Ftype1 int32
  4592. Fserial uint64
  4593. Fsend_event int32
  4594. Fdisplay uintptr
  4595. Fwindow TWindow
  4596. Fmode int32
  4597. Fdetail int32
  4598. }
  4599. type TXFocusInEvent = struct {
  4600. Ftype1 int32
  4601. Fserial uint64
  4602. Fsend_event int32
  4603. Fdisplay uintptr
  4604. Fwindow TWindow
  4605. Fmode int32
  4606. Fdetail int32
  4607. }
  4608. type TXFocusOutEvent = struct {
  4609. Ftype1 int32
  4610. Fserial uint64
  4611. Fsend_event int32
  4612. Fdisplay uintptr
  4613. Fwindow TWindow
  4614. Fmode int32
  4615. Fdetail int32
  4616. }
  4617. type TXKeymapEvent = struct {
  4618. Ftype1 int32
  4619. Fserial uint64
  4620. Fsend_event int32
  4621. Fdisplay uintptr
  4622. Fwindow TWindow
  4623. Fkey_vector [32]uint8
  4624. }
  4625. type TXExposeEvent = struct {
  4626. Ftype1 int32
  4627. Fserial uint64
  4628. Fsend_event int32
  4629. Fdisplay uintptr
  4630. Fwindow TWindow
  4631. Fx int32
  4632. Fy int32
  4633. Fwidth int32
  4634. Fheight int32
  4635. Fcount int32
  4636. }
  4637. type TXGraphicsExposeEvent = struct {
  4638. Ftype1 int32
  4639. Fserial uint64
  4640. Fsend_event int32
  4641. Fdisplay uintptr
  4642. Fdrawable TDrawable
  4643. Fx int32
  4644. Fy int32
  4645. Fwidth int32
  4646. Fheight int32
  4647. Fcount int32
  4648. Fmajor_code int32
  4649. Fminor_code int32
  4650. }
  4651. type TXNoExposeEvent = struct {
  4652. Ftype1 int32
  4653. Fserial uint64
  4654. Fsend_event int32
  4655. Fdisplay uintptr
  4656. Fdrawable TDrawable
  4657. Fmajor_code int32
  4658. Fminor_code int32
  4659. }
  4660. type TXVisibilityEvent = struct {
  4661. Ftype1 int32
  4662. Fserial uint64
  4663. Fsend_event int32
  4664. Fdisplay uintptr
  4665. Fwindow TWindow
  4666. Fstate int32
  4667. }
  4668. type TXCreateWindowEvent = struct {
  4669. Ftype1 int32
  4670. Fserial uint64
  4671. Fsend_event int32
  4672. Fdisplay uintptr
  4673. Fparent TWindow
  4674. Fwindow TWindow
  4675. Fx int32
  4676. Fy int32
  4677. Fwidth int32
  4678. Fheight int32
  4679. Fborder_width int32
  4680. Foverride_redirect int32
  4681. }
  4682. type TXDestroyWindowEvent = struct {
  4683. Ftype1 int32
  4684. Fserial uint64
  4685. Fsend_event int32
  4686. Fdisplay uintptr
  4687. Fevent TWindow
  4688. Fwindow TWindow
  4689. }
  4690. type TXUnmapEvent = struct {
  4691. Ftype1 int32
  4692. Fserial uint64
  4693. Fsend_event int32
  4694. Fdisplay uintptr
  4695. Fevent TWindow
  4696. Fwindow TWindow
  4697. Ffrom_configure int32
  4698. }
  4699. type TXMapEvent = struct {
  4700. Ftype1 int32
  4701. Fserial uint64
  4702. Fsend_event int32
  4703. Fdisplay uintptr
  4704. Fevent TWindow
  4705. Fwindow TWindow
  4706. Foverride_redirect int32
  4707. }
  4708. type TXMapRequestEvent = struct {
  4709. Ftype1 int32
  4710. Fserial uint64
  4711. Fsend_event int32
  4712. Fdisplay uintptr
  4713. Fparent TWindow
  4714. Fwindow TWindow
  4715. }
  4716. type TXReparentEvent = struct {
  4717. Ftype1 int32
  4718. Fserial uint64
  4719. Fsend_event int32
  4720. Fdisplay uintptr
  4721. Fevent TWindow
  4722. Fwindow TWindow
  4723. Fparent TWindow
  4724. Fx int32
  4725. Fy int32
  4726. Foverride_redirect int32
  4727. }
  4728. type TXConfigureEvent = struct {
  4729. Ftype1 int32
  4730. Fserial uint64
  4731. Fsend_event int32
  4732. Fdisplay uintptr
  4733. Fevent TWindow
  4734. Fwindow TWindow
  4735. Fx int32
  4736. Fy int32
  4737. Fwidth int32
  4738. Fheight int32
  4739. Fborder_width int32
  4740. Fabove TWindow
  4741. Foverride_redirect int32
  4742. }
  4743. type TXGravityEvent = struct {
  4744. Ftype1 int32
  4745. Fserial uint64
  4746. Fsend_event int32
  4747. Fdisplay uintptr
  4748. Fevent TWindow
  4749. Fwindow TWindow
  4750. Fx int32
  4751. Fy int32
  4752. }
  4753. type TXResizeRequestEvent = struct {
  4754. Ftype1 int32
  4755. Fserial uint64
  4756. Fsend_event int32
  4757. Fdisplay uintptr
  4758. Fwindow TWindow
  4759. Fwidth int32
  4760. Fheight int32
  4761. }
  4762. type TXConfigureRequestEvent = struct {
  4763. Ftype1 int32
  4764. Fserial uint64
  4765. Fsend_event int32
  4766. Fdisplay uintptr
  4767. Fparent TWindow
  4768. Fwindow TWindow
  4769. Fx int32
  4770. Fy int32
  4771. Fwidth int32
  4772. Fheight int32
  4773. Fborder_width int32
  4774. Fabove TWindow
  4775. Fdetail int32
  4776. Fvalue_mask uint64
  4777. }
  4778. type TXCirculateEvent = struct {
  4779. Ftype1 int32
  4780. Fserial uint64
  4781. Fsend_event int32
  4782. Fdisplay uintptr
  4783. Fevent TWindow
  4784. Fwindow TWindow
  4785. Fplace int32
  4786. }
  4787. type TXCirculateRequestEvent = struct {
  4788. Ftype1 int32
  4789. Fserial uint64
  4790. Fsend_event int32
  4791. Fdisplay uintptr
  4792. Fparent TWindow
  4793. Fwindow TWindow
  4794. Fplace int32
  4795. }
  4796. type TXPropertyEvent = struct {
  4797. Ftype1 int32
  4798. Fserial uint64
  4799. Fsend_event int32
  4800. Fdisplay uintptr
  4801. Fwindow TWindow
  4802. Fatom TAtom
  4803. Ftime TTime
  4804. Fstate int32
  4805. }
  4806. type TXSelectionClearEvent = struct {
  4807. Ftype1 int32
  4808. Fserial uint64
  4809. Fsend_event int32
  4810. Fdisplay uintptr
  4811. Fwindow TWindow
  4812. Fselection TAtom
  4813. Ftime TTime
  4814. }
  4815. type TXSelectionRequestEvent = struct {
  4816. Ftype1 int32
  4817. Fserial uint64
  4818. Fsend_event int32
  4819. Fdisplay uintptr
  4820. Fowner TWindow
  4821. Frequestor TWindow
  4822. Fselection TAtom
  4823. Ftarget TAtom
  4824. Fproperty TAtom
  4825. Ftime TTime
  4826. }
  4827. type TXSelectionEvent = struct {
  4828. Ftype1 int32
  4829. Fserial uint64
  4830. Fsend_event int32
  4831. Fdisplay uintptr
  4832. Frequestor TWindow
  4833. Fselection TAtom
  4834. Ftarget TAtom
  4835. Fproperty TAtom
  4836. Ftime TTime
  4837. }
  4838. type TXColormapEvent = struct {
  4839. Ftype1 int32
  4840. Fserial uint64
  4841. Fsend_event int32
  4842. Fdisplay uintptr
  4843. Fwindow TWindow
  4844. Fcolormap TColormap
  4845. Fnew1 int32
  4846. Fstate int32
  4847. }
  4848. type TXClientMessageEvent = struct {
  4849. Ftype1 int32
  4850. Fserial uint64
  4851. Fsend_event int32
  4852. Fdisplay uintptr
  4853. Fwindow TWindow
  4854. Fmessage_type TAtom
  4855. Fformat int32
  4856. Fdata struct {
  4857. Fs [0][10]int16
  4858. Fl [0][5]int64
  4859. Fb [20]uint8
  4860. F__ccgo_pad3 [20]byte
  4861. }
  4862. }
  4863. type TXMappingEvent = struct {
  4864. Ftype1 int32
  4865. Fserial uint64
  4866. Fsend_event int32
  4867. Fdisplay uintptr
  4868. Fwindow TWindow
  4869. Frequest int32
  4870. Ffirst_keycode int32
  4871. Fcount int32
  4872. }
  4873. type TXErrorEvent = struct {
  4874. Ftype1 int32
  4875. Fdisplay uintptr
  4876. Fresourceid TXID
  4877. Fserial uint64
  4878. Ferror_code uint8
  4879. Frequest_code uint8
  4880. Fminor_code uint8
  4881. }
  4882. type TXAnyEvent = struct {
  4883. Ftype1 int32
  4884. Fserial uint64
  4885. Fsend_event int32
  4886. Fdisplay uintptr
  4887. Fwindow TWindow
  4888. }
  4889. type TXGenericEvent = struct {
  4890. Ftype1 int32
  4891. Fserial uint64
  4892. Fsend_event int32
  4893. Fdisplay uintptr
  4894. Fextension int32
  4895. Fevtype int32
  4896. }
  4897. type TXGenericEventCookie = struct {
  4898. Ftype1 int32
  4899. Fserial uint64
  4900. Fsend_event int32
  4901. Fdisplay uintptr
  4902. Fextension int32
  4903. Fevtype int32
  4904. Fcookie uint32
  4905. Fdata uintptr
  4906. }
  4907. type TXEvent = struct {
  4908. Fxany [0]TXAnyEvent
  4909. Fxkey [0]TXKeyEvent
  4910. Fxbutton [0]TXButtonEvent
  4911. Fxmotion [0]TXMotionEvent
  4912. Fxcrossing [0]TXCrossingEvent
  4913. Fxfocus [0]TXFocusChangeEvent
  4914. Fxexpose [0]TXExposeEvent
  4915. Fxgraphicsexpose [0]TXGraphicsExposeEvent
  4916. Fxnoexpose [0]TXNoExposeEvent
  4917. Fxvisibility [0]TXVisibilityEvent
  4918. Fxcreatewindow [0]TXCreateWindowEvent
  4919. Fxdestroywindow [0]TXDestroyWindowEvent
  4920. Fxunmap [0]TXUnmapEvent
  4921. Fxmap [0]TXMapEvent
  4922. Fxmaprequest [0]TXMapRequestEvent
  4923. Fxreparent [0]TXReparentEvent
  4924. Fxconfigure [0]TXConfigureEvent
  4925. Fxgravity [0]TXGravityEvent
  4926. Fxresizerequest [0]TXResizeRequestEvent
  4927. Fxconfigurerequest [0]TXConfigureRequestEvent
  4928. Fxcirculate [0]TXCirculateEvent
  4929. Fxcirculaterequest [0]TXCirculateRequestEvent
  4930. Fxproperty [0]TXPropertyEvent
  4931. Fxselectionclear [0]TXSelectionClearEvent
  4932. Fxselectionrequest [0]TXSelectionRequestEvent
  4933. Fxselection [0]TXSelectionEvent
  4934. Fxcolormap [0]TXColormapEvent
  4935. Fxclient [0]TXClientMessageEvent
  4936. Fxmapping [0]TXMappingEvent
  4937. Fxerror [0]TXErrorEvent
  4938. Fxkeymap [0]TXKeymapEvent
  4939. Fxgeneric [0]TXGenericEvent
  4940. Fxcookie [0]TXGenericEventCookie
  4941. Fpad [0][24]int64
  4942. Ftype1 int32
  4943. F__ccgo_pad35 [188]byte
  4944. }
  4945. type T_XEvent = TXEvent
  4946. type TXCharStruct = struct {
  4947. Flbearing int16
  4948. Frbearing int16
  4949. Fwidth int16
  4950. Fascent int16
  4951. Fdescent int16
  4952. Fattributes uint16
  4953. }
  4954. type TXFontProp = struct {
  4955. Fname TAtom
  4956. Fcard32 uint64
  4957. }
  4958. type TXFontStruct = struct {
  4959. Fext_data uintptr
  4960. Ffid TFont
  4961. Fdirection uint32
  4962. Fmin_char_or_byte2 uint32
  4963. Fmax_char_or_byte2 uint32
  4964. Fmin_byte1 uint32
  4965. Fmax_byte1 uint32
  4966. Fall_chars_exist int32
  4967. Fdefault_char uint32
  4968. Fn_properties int32
  4969. Fproperties uintptr
  4970. Fmin_bounds TXCharStruct
  4971. Fmax_bounds TXCharStruct
  4972. Fper_char uintptr
  4973. Fascent int32
  4974. Fdescent int32
  4975. }
  4976. type TXTextItem = struct {
  4977. Fchars uintptr
  4978. Fnchars int32
  4979. Fdelta int32
  4980. Ffont TFont
  4981. }
  4982. type TXChar2b = struct {
  4983. Fbyte1 uint8
  4984. Fbyte2 uint8
  4985. }
  4986. type TXTextItem16 = struct {
  4987. Fchars uintptr
  4988. Fnchars int32
  4989. Fdelta int32
  4990. Ffont TFont
  4991. }
  4992. type TXEDataObject = struct {
  4993. Fgc [0]TGC
  4994. Fvisual [0]uintptr
  4995. Fscreen [0]uintptr
  4996. Fpixmap_format [0]uintptr
  4997. Ffont [0]uintptr
  4998. Fdisplay uintptr
  4999. }
  5000. type TXFontSetExtents = struct {
  5001. Fmax_ink_extent TXRectangle
  5002. Fmax_logical_extent TXRectangle
  5003. }
  5004. type TXOM = uintptr
  5005. type TXOC = uintptr
  5006. type TXFontSet = uintptr
  5007. type TXmbTextItem = struct {
  5008. Fchars uintptr
  5009. Fnchars int32
  5010. Fdelta int32
  5011. Ffont_set TXFontSet
  5012. }
  5013. type TXwcTextItem = struct {
  5014. Fchars uintptr
  5015. Fnchars int32
  5016. Fdelta int32
  5017. Ffont_set TXFontSet
  5018. }
  5019. type TXOMCharSetList = struct {
  5020. Fcharset_count int32
  5021. Fcharset_list uintptr
  5022. }
  5023. type TXOrientation = int32
  5024. const _XOMOrientation_LTR_TTB = 0
  5025. const _XOMOrientation_RTL_TTB = 1
  5026. const _XOMOrientation_TTB_LTR = 2
  5027. const _XOMOrientation_TTB_RTL = 3
  5028. const _XOMOrientation_Context = 4
  5029. type TXOMOrientation = struct {
  5030. Fnum_orientation int32
  5031. Forientation uintptr
  5032. }
  5033. type TXOMFontInfo = struct {
  5034. Fnum_font int32
  5035. Ffont_struct_list uintptr
  5036. Ffont_name_list uintptr
  5037. }
  5038. type TXIM = uintptr
  5039. type TXIC = uintptr
  5040. type TXIMProc = uintptr
  5041. type TXICProc = uintptr
  5042. type TXIDProc = uintptr
  5043. type TXIMStyle = uint64
  5044. type TXIMStyles = struct {
  5045. Fcount_styles uint16
  5046. Fsupported_styles uintptr
  5047. }
  5048. type TXVaNestedList = uintptr
  5049. type TXIMCallback = struct {
  5050. Fclient_data TXPointer
  5051. Fcallback TXIMProc
  5052. }
  5053. type TXICCallback = struct {
  5054. Fclient_data TXPointer
  5055. Fcallback TXICProc
  5056. }
  5057. type TXIMFeedback = uint64
  5058. type TXIMText = struct {
  5059. Flength uint16
  5060. Ffeedback uintptr
  5061. Fencoding_is_wchar int32
  5062. Fstring1 struct {
  5063. Fwide_char [0]uintptr
  5064. Fmulti_byte uintptr
  5065. }
  5066. }
  5067. type T_XIMText = TXIMText
  5068. type TXIMPreeditState = uint64
  5069. type TXIMPreeditStateNotifyCallbackStruct = struct {
  5070. Fstate TXIMPreeditState
  5071. }
  5072. type T_XIMPreeditStateNotifyCallbackStruct = TXIMPreeditStateNotifyCallbackStruct
  5073. type TXIMResetState = uint64
  5074. type TXIMStringConversionFeedback = uint64
  5075. type TXIMStringConversionText = struct {
  5076. Flength uint16
  5077. Ffeedback uintptr
  5078. Fencoding_is_wchar int32
  5079. Fstring1 struct {
  5080. Fwcs [0]uintptr
  5081. Fmbs uintptr
  5082. }
  5083. }
  5084. type T_XIMStringConversionText = TXIMStringConversionText
  5085. type TXIMStringConversionPosition = uint16
  5086. type TXIMStringConversionType = uint16
  5087. type TXIMStringConversionOperation = uint16
  5088. type TXIMCaretDirection = int32
  5089. const _XIMForwardChar = 0
  5090. const _XIMBackwardChar = 1
  5091. const _XIMForwardWord = 2
  5092. const _XIMBackwardWord = 3
  5093. const _XIMCaretUp = 4
  5094. const _XIMCaretDown = 5
  5095. const _XIMNextLine = 6
  5096. const _XIMPreviousLine = 7
  5097. const _XIMLineStart = 8
  5098. const _XIMLineEnd = 9
  5099. const _XIMAbsolutePosition = 10
  5100. const _XIMDontChange = 11
  5101. type TXIMStringConversionCallbackStruct = struct {
  5102. Fposition TXIMStringConversionPosition
  5103. Fdirection TXIMCaretDirection
  5104. Foperation TXIMStringConversionOperation
  5105. Ffactor uint16
  5106. Ftext uintptr
  5107. }
  5108. type T_XIMStringConversionCallbackStruct = TXIMStringConversionCallbackStruct
  5109. type TXIMPreeditDrawCallbackStruct = struct {
  5110. Fcaret int32
  5111. Fchg_first int32
  5112. Fchg_length int32
  5113. Ftext uintptr
  5114. }
  5115. type T_XIMPreeditDrawCallbackStruct = TXIMPreeditDrawCallbackStruct
  5116. type TXIMCaretStyle = int32
  5117. const _XIMIsInvisible = 0
  5118. const _XIMIsPrimary = 1
  5119. const _XIMIsSecondary = 2
  5120. type TXIMPreeditCaretCallbackStruct = struct {
  5121. Fposition int32
  5122. Fdirection TXIMCaretDirection
  5123. Fstyle TXIMCaretStyle
  5124. }
  5125. type T_XIMPreeditCaretCallbackStruct = TXIMPreeditCaretCallbackStruct
  5126. type TXIMStatusDataType = int32
  5127. const _XIMTextType = 0
  5128. const _XIMBitmapType = 1
  5129. type TXIMStatusDrawCallbackStruct = struct {
  5130. Ftype1 TXIMStatusDataType
  5131. Fdata struct {
  5132. Fbitmap [0]TPixmap
  5133. Ftext uintptr
  5134. }
  5135. }
  5136. type T_XIMStatusDrawCallbackStruct = TXIMStatusDrawCallbackStruct
  5137. type TXIMHotKeyTrigger = struct {
  5138. Fkeysym TKeySym
  5139. Fmodifier int32
  5140. Fmodifier_mask int32
  5141. }
  5142. type T_XIMHotKeyTrigger = TXIMHotKeyTrigger
  5143. type TXIMHotKeyTriggers = struct {
  5144. Fnum_hot_key int32
  5145. Fkey uintptr
  5146. }
  5147. type T_XIMHotKeyTriggers = TXIMHotKeyTriggers
  5148. type TXIMHotKeyState = uint64
  5149. type TXIMValuesList = struct {
  5150. Fcount_values uint16
  5151. Fsupported_values uintptr
  5152. }
  5153. type TXErrorHandler = uintptr
  5154. type TXIOErrorHandler = uintptr
  5155. type TXIOErrorExitHandler = uintptr
  5156. type TXConnectionWatchProc = uintptr
  5157. type TXSizeHints = struct {
  5158. Fflags int64
  5159. Fx int32
  5160. Fy int32
  5161. Fwidth int32
  5162. Fheight int32
  5163. Fmin_width int32
  5164. Fmin_height int32
  5165. Fmax_width int32
  5166. Fmax_height int32
  5167. Fwidth_inc int32
  5168. Fheight_inc int32
  5169. Fmin_aspect struct {
  5170. Fx int32
  5171. Fy int32
  5172. }
  5173. Fmax_aspect struct {
  5174. Fx int32
  5175. Fy int32
  5176. }
  5177. Fbase_width int32
  5178. Fbase_height int32
  5179. Fwin_gravity int32
  5180. }
  5181. type TXWMHints = struct {
  5182. Fflags int64
  5183. Finput int32
  5184. Finitial_state int32
  5185. Ficon_pixmap TPixmap
  5186. Ficon_window TWindow
  5187. Ficon_x int32
  5188. Ficon_y int32
  5189. Ficon_mask TPixmap
  5190. Fwindow_group TXID
  5191. }
  5192. type TXTextProperty = struct {
  5193. Fvalue uintptr
  5194. Fencoding TAtom
  5195. Fformat int32
  5196. Fnitems uint64
  5197. }
  5198. type TXICCEncodingStyle = int32
  5199. const _XStringStyle = 0
  5200. const _XCompoundTextStyle = 1
  5201. const _XTextStyle = 2
  5202. const _XStdICCTextStyle = 3
  5203. const _XUTF8StringStyle = 4
  5204. type TXIconSize = struct {
  5205. Fmin_width int32
  5206. Fmin_height int32
  5207. Fmax_width int32
  5208. Fmax_height int32
  5209. Fwidth_inc int32
  5210. Fheight_inc int32
  5211. }
  5212. type TXClassHint = struct {
  5213. Fres_name uintptr
  5214. Fres_class uintptr
  5215. }
  5216. type TXComposeStatus = struct {
  5217. Fcompose_ptr TXPointer
  5218. Fchars_matched int32
  5219. }
  5220. type T_XComposeStatus = TXComposeStatus
  5221. type TRegion = uintptr
  5222. type TXVisualInfo = struct {
  5223. Fvisual uintptr
  5224. Fvisualid TVisualID
  5225. Fscreen int32
  5226. Fdepth int32
  5227. Fclass int32
  5228. Fred_mask uint64
  5229. Fgreen_mask uint64
  5230. Fblue_mask uint64
  5231. Fcolormap_size int32
  5232. Fbits_per_rgb int32
  5233. }
  5234. type TXStandardColormap = struct {
  5235. Fcolormap TColormap
  5236. Fred_max uint64
  5237. Fred_mult uint64
  5238. Fgreen_max uint64
  5239. Fgreen_mult uint64
  5240. Fblue_max uint64
  5241. Fblue_mult uint64
  5242. Fbase_pixel uint64
  5243. Fvisualid TVisualID
  5244. Fkillid TXID
  5245. }
  5246. type TXContext = int32
  5247. type TINT64 = int64
  5248. type TINT32 = int32
  5249. type TINT16 = int16
  5250. type TINT8 = int8
  5251. type TCARD64 = uint64
  5252. type TCARD32 = uint32
  5253. type TCARD16 = uint16
  5254. type TCARD8 = uint8
  5255. type TBITS32 = uint32
  5256. type TBITS16 = uint16
  5257. type TBYTE = uint8
  5258. type TBOOL = uint8
  5259. type Tuintptr_t = uint64
  5260. type Tintptr_t = int64
  5261. type Tintmax_t = int64
  5262. type Tuint8_t = uint8
  5263. type Tuintmax_t = uint64
  5264. type Tint_fast8_t = int8
  5265. type Tint_fast64_t = int64
  5266. type Tint_least8_t = int8
  5267. type Tint_least16_t = int16
  5268. type Tint_least32_t = int32
  5269. type Tint_least64_t = int64
  5270. type Tuint_fast8_t = uint8
  5271. type Tuint_fast64_t = uint64
  5272. type Tuint_least8_t = uint8
  5273. type Tuint_least16_t = uint16
  5274. type Tuint_least32_t = uint32
  5275. type Tuint_least64_t = uint64
  5276. type Tint_fast16_t = int32
  5277. type Tint_fast32_t = int32
  5278. type Tuint_fast16_t = uint32
  5279. type Tuint_fast32_t = uint32
  5280. type TxSegment = struct {
  5281. Fx1 TINT16
  5282. Fy1 TINT16
  5283. Fx2 TINT16
  5284. Fy2 TINT16
  5285. }
  5286. type T_xSegment = TxSegment
  5287. type TxPoint = struct {
  5288. Fx TINT16
  5289. Fy TINT16
  5290. }
  5291. type T_xPoint = TxPoint
  5292. type TxRectangle = struct {
  5293. Fx TINT16
  5294. Fy TINT16
  5295. Fwidth TCARD16
  5296. Fheight TCARD16
  5297. }
  5298. type T_xRectangle = TxRectangle
  5299. type TxArc = struct {
  5300. Fx TINT16
  5301. Fy TINT16
  5302. Fwidth TCARD16
  5303. Fheight TCARD16
  5304. Fangle1 TINT16
  5305. Fangle2 TINT16
  5306. }
  5307. type T_xArc = TxArc
  5308. type TKeyButMask = uint16
  5309. type TxConnClientPrefix = struct {
  5310. FbyteOrder TCARD8
  5311. Fpad TBYTE
  5312. FmajorVersion TCARD16
  5313. FminorVersion TCARD16
  5314. FnbytesAuthProto TCARD16
  5315. FnbytesAuthString TCARD16
  5316. Fpad2 TCARD16
  5317. }
  5318. type TxConnSetupPrefix = struct {
  5319. Fsuccess TCARD8
  5320. FlengthReason TBYTE
  5321. FmajorVersion TCARD16
  5322. FminorVersion TCARD16
  5323. Flength TCARD16
  5324. }
  5325. type TxConnSetup = struct {
  5326. Frelease TCARD32
  5327. FridBase TCARD32
  5328. FridMask TCARD32
  5329. FmotionBufferSize TCARD32
  5330. FnbytesVendor TCARD16
  5331. FmaxRequestSize TCARD16
  5332. FnumRoots TCARD8
  5333. FnumFormats TCARD8
  5334. FimageByteOrder TCARD8
  5335. FbitmapBitOrder TCARD8
  5336. FbitmapScanlineUnit TCARD8
  5337. FbitmapScanlinePad TCARD8
  5338. FminKeyCode TCARD8
  5339. FmaxKeyCode TCARD8
  5340. Fpad2 TCARD32
  5341. }
  5342. type TxPixmapFormat = struct {
  5343. Fdepth TCARD8
  5344. FbitsPerPixel TCARD8
  5345. FscanLinePad TCARD8
  5346. Fpad1 TCARD8
  5347. Fpad2 TCARD32
  5348. }
  5349. type TxDepth = struct {
  5350. Fdepth TCARD8
  5351. Fpad1 TCARD8
  5352. FnVisuals TCARD16
  5353. Fpad2 TCARD32
  5354. }
  5355. type TxVisualType = struct {
  5356. FvisualID TCARD32
  5357. Fclass TCARD8
  5358. FbitsPerRGB TCARD8
  5359. FcolormapEntries TCARD16
  5360. FredMask TCARD32
  5361. FgreenMask TCARD32
  5362. FblueMask TCARD32
  5363. Fpad TCARD32
  5364. }
  5365. type TxWindowRoot = struct {
  5366. FwindowId TCARD32
  5367. FdefaultColormap TCARD32
  5368. FwhitePixel TCARD32
  5369. FblackPixel TCARD32
  5370. FcurrentInputMask TCARD32
  5371. FpixWidth TCARD16
  5372. FpixHeight TCARD16
  5373. FmmWidth TCARD16
  5374. FmmHeight TCARD16
  5375. FminInstalledMaps TCARD16
  5376. FmaxInstalledMaps TCARD16
  5377. FrootVisualID TCARD32
  5378. FbackingStore TCARD8
  5379. FsaveUnders TBOOL
  5380. FrootDepth TCARD8
  5381. FnDepths TCARD8
  5382. }
  5383. type TxTimecoord = struct {
  5384. Ftime TCARD32
  5385. Fx TINT16
  5386. Fy TINT16
  5387. }
  5388. type TxHostEntry = struct {
  5389. Ffamily TCARD8
  5390. Fpad TBYTE
  5391. Flength TCARD16
  5392. }
  5393. type TxCharInfo = struct {
  5394. FleftSideBearing TINT16
  5395. FrightSideBearing TINT16
  5396. FcharacterWidth TINT16
  5397. Fascent TINT16
  5398. Fdescent TINT16
  5399. Fattributes TCARD16
  5400. }
  5401. type TxFontProp = struct {
  5402. Fname TCARD32
  5403. Fvalue TCARD32
  5404. }
  5405. type TxTextElt = struct {
  5406. Flen1 TCARD8
  5407. Fdelta TINT8
  5408. }
  5409. type TxColorItem = struct {
  5410. Fpixel TCARD32
  5411. Fred TCARD16
  5412. Fgreen TCARD16
  5413. Fblue TCARD16
  5414. Fflags TCARD8
  5415. Fpad TCARD8
  5416. }
  5417. type Txrgb = struct {
  5418. Fred TCARD16
  5419. Fgreen TCARD16
  5420. Fblue TCARD16
  5421. Fpad TCARD16
  5422. }
  5423. type TKEYCODE = uint8
  5424. type TxGenericReply = struct {
  5425. Ftype1 TBYTE
  5426. Fdata1 TBYTE
  5427. FsequenceNumber TCARD16
  5428. Flength TCARD32
  5429. Fdata00 TCARD32
  5430. Fdata01 TCARD32
  5431. Fdata02 TCARD32
  5432. Fdata03 TCARD32
  5433. Fdata04 TCARD32
  5434. Fdata05 TCARD32
  5435. }
  5436. type TxGetWindowAttributesReply = struct {
  5437. Ftype1 TBYTE
  5438. FbackingStore TCARD8
  5439. FsequenceNumber TCARD16
  5440. Flength TCARD32
  5441. FvisualID TCARD32
  5442. Fclass TCARD16
  5443. FbitGravity TCARD8
  5444. FwinGravity TCARD8
  5445. FbackingBitPlanes TCARD32
  5446. FbackingPixel TCARD32
  5447. FsaveUnder TBOOL
  5448. FmapInstalled TBOOL
  5449. FmapState TCARD8
  5450. Foverride TBOOL
  5451. Fcolormap TCARD32
  5452. FallEventMasks TCARD32
  5453. FyourEventMask TCARD32
  5454. FdoNotPropagateMask TCARD16
  5455. Fpad TCARD16
  5456. }
  5457. type TxGetGeometryReply = struct {
  5458. Ftype1 TBYTE
  5459. Fdepth TCARD8
  5460. FsequenceNumber TCARD16
  5461. Flength TCARD32
  5462. Froot TCARD32
  5463. Fx TINT16
  5464. Fy TINT16
  5465. Fwidth TCARD16
  5466. Fheight TCARD16
  5467. FborderWidth TCARD16
  5468. Fpad1 TCARD16
  5469. Fpad2 TCARD32
  5470. Fpad3 TCARD32
  5471. }
  5472. type TxQueryTreeReply = struct {
  5473. Ftype1 TBYTE
  5474. Fpad1 TBYTE
  5475. FsequenceNumber TCARD16
  5476. Flength TCARD32
  5477. Froot TCARD32
  5478. Fparent TCARD32
  5479. FnChildren TCARD16
  5480. Fpad2 TCARD16
  5481. Fpad3 TCARD32
  5482. Fpad4 TCARD32
  5483. Fpad5 TCARD32
  5484. }
  5485. type TxInternAtomReply = struct {
  5486. Ftype1 TBYTE
  5487. Fpad1 TBYTE
  5488. FsequenceNumber TCARD16
  5489. Flength TCARD32
  5490. Fatom TCARD32
  5491. Fpad2 TCARD32
  5492. Fpad3 TCARD32
  5493. Fpad4 TCARD32
  5494. Fpad5 TCARD32
  5495. Fpad6 TCARD32
  5496. }
  5497. type TxGetAtomNameReply = struct {
  5498. Ftype1 TBYTE
  5499. Fpad1 TBYTE
  5500. FsequenceNumber TCARD16
  5501. Flength TCARD32
  5502. FnameLength TCARD16
  5503. Fpad2 TCARD16
  5504. Fpad3 TCARD32
  5505. Fpad4 TCARD32
  5506. Fpad5 TCARD32
  5507. Fpad6 TCARD32
  5508. Fpad7 TCARD32
  5509. }
  5510. type TxGetPropertyReply = struct {
  5511. Ftype1 TBYTE
  5512. Fformat TCARD8
  5513. FsequenceNumber TCARD16
  5514. Flength TCARD32
  5515. FpropertyType TCARD32
  5516. FbytesAfter TCARD32
  5517. FnItems TCARD32
  5518. Fpad1 TCARD32
  5519. Fpad2 TCARD32
  5520. Fpad3 TCARD32
  5521. }
  5522. type TxListPropertiesReply = struct {
  5523. Ftype1 TBYTE
  5524. Fpad1 TBYTE
  5525. FsequenceNumber TCARD16
  5526. Flength TCARD32
  5527. FnProperties TCARD16
  5528. Fpad2 TCARD16
  5529. Fpad3 TCARD32
  5530. Fpad4 TCARD32
  5531. Fpad5 TCARD32
  5532. Fpad6 TCARD32
  5533. Fpad7 TCARD32
  5534. }
  5535. type TxGetSelectionOwnerReply = struct {
  5536. Ftype1 TBYTE
  5537. Fpad1 TBYTE
  5538. FsequenceNumber TCARD16
  5539. Flength TCARD32
  5540. Fowner TCARD32
  5541. Fpad2 TCARD32
  5542. Fpad3 TCARD32
  5543. Fpad4 TCARD32
  5544. Fpad5 TCARD32
  5545. Fpad6 TCARD32
  5546. }
  5547. type TxGrabPointerReply = struct {
  5548. Ftype1 TBYTE
  5549. Fstatus TBYTE
  5550. FsequenceNumber TCARD16
  5551. Flength TCARD32
  5552. Fpad1 TCARD32
  5553. Fpad2 TCARD32
  5554. Fpad3 TCARD32
  5555. Fpad4 TCARD32
  5556. Fpad5 TCARD32
  5557. Fpad6 TCARD32
  5558. }
  5559. type TxGrabKeyboardReply = struct {
  5560. Ftype1 TBYTE
  5561. Fstatus TBYTE
  5562. FsequenceNumber TCARD16
  5563. Flength TCARD32
  5564. Fpad1 TCARD32
  5565. Fpad2 TCARD32
  5566. Fpad3 TCARD32
  5567. Fpad4 TCARD32
  5568. Fpad5 TCARD32
  5569. Fpad6 TCARD32
  5570. }
  5571. type TxQueryPointerReply = struct {
  5572. Ftype1 TBYTE
  5573. FsameScreen TBOOL
  5574. FsequenceNumber TCARD16
  5575. Flength TCARD32
  5576. Froot TCARD32
  5577. Fchild TCARD32
  5578. FrootX TINT16
  5579. FrootY TINT16
  5580. FwinX TINT16
  5581. FwinY TINT16
  5582. Fmask TCARD16
  5583. Fpad1 TCARD16
  5584. Fpad TCARD32
  5585. }
  5586. type TxGetMotionEventsReply = struct {
  5587. Ftype1 TBYTE
  5588. Fpad1 TBYTE
  5589. FsequenceNumber TCARD16
  5590. Flength TCARD32
  5591. FnEvents TCARD32
  5592. Fpad2 TCARD32
  5593. Fpad3 TCARD32
  5594. Fpad4 TCARD32
  5595. Fpad5 TCARD32
  5596. Fpad6 TCARD32
  5597. }
  5598. type TxTranslateCoordsReply = struct {
  5599. Ftype1 TBYTE
  5600. FsameScreen TBOOL
  5601. FsequenceNumber TCARD16
  5602. Flength TCARD32
  5603. Fchild TCARD32
  5604. FdstX TINT16
  5605. FdstY TINT16
  5606. Fpad2 TCARD32
  5607. Fpad3 TCARD32
  5608. Fpad4 TCARD32
  5609. Fpad5 TCARD32
  5610. }
  5611. type TxGetInputFocusReply = struct {
  5612. Ftype1 TBYTE
  5613. FrevertTo TCARD8
  5614. FsequenceNumber TCARD16
  5615. Flength TCARD32
  5616. Ffocus TCARD32
  5617. Fpad1 TCARD32
  5618. Fpad2 TCARD32
  5619. Fpad3 TCARD32
  5620. Fpad4 TCARD32
  5621. Fpad5 TCARD32
  5622. }
  5623. type TxQueryKeymapReply = struct {
  5624. Ftype1 TBYTE
  5625. Fpad1 TBYTE
  5626. FsequenceNumber TCARD16
  5627. Flength TCARD32
  5628. Fmap1 [32]TBYTE
  5629. }
  5630. type TxQueryFontReply = struct {
  5631. Ftype1 TBYTE
  5632. Fpad1 TBYTE
  5633. FsequenceNumber TCARD16
  5634. Flength TCARD32
  5635. FminBounds TxCharInfo
  5636. Fwalign1 TCARD32
  5637. FmaxBounds TxCharInfo
  5638. Fwalign2 TCARD32
  5639. FminCharOrByte2 TCARD16
  5640. FmaxCharOrByte2 TCARD16
  5641. FdefaultChar TCARD16
  5642. FnFontProps TCARD16
  5643. FdrawDirection TCARD8
  5644. FminByte1 TCARD8
  5645. FmaxByte1 TCARD8
  5646. FallCharsExist TBOOL
  5647. FfontAscent TINT16
  5648. FfontDescent TINT16
  5649. FnCharInfos TCARD32
  5650. }
  5651. type T_xQueryFontReply = TxQueryFontReply
  5652. type TxQueryTextExtentsReply = struct {
  5653. Ftype1 TBYTE
  5654. FdrawDirection TCARD8
  5655. FsequenceNumber TCARD16
  5656. Flength TCARD32
  5657. FfontAscent TINT16
  5658. FfontDescent TINT16
  5659. FoverallAscent TINT16
  5660. FoverallDescent TINT16
  5661. FoverallWidth TINT32
  5662. FoverallLeft TINT32
  5663. FoverallRight TINT32
  5664. Fpad TCARD32
  5665. }
  5666. type TxListFontsReply = struct {
  5667. Ftype1 TBYTE
  5668. Fpad1 TBYTE
  5669. FsequenceNumber TCARD16
  5670. Flength TCARD32
  5671. FnFonts TCARD16
  5672. Fpad2 TCARD16
  5673. Fpad3 TCARD32
  5674. Fpad4 TCARD32
  5675. Fpad5 TCARD32
  5676. Fpad6 TCARD32
  5677. Fpad7 TCARD32
  5678. }
  5679. type TxListFontsWithInfoReply = struct {
  5680. Ftype1 TBYTE
  5681. FnameLength TCARD8
  5682. FsequenceNumber TCARD16
  5683. Flength TCARD32
  5684. FminBounds TxCharInfo
  5685. Fwalign1 TCARD32
  5686. FmaxBounds TxCharInfo
  5687. Fwalign2 TCARD32
  5688. FminCharOrByte2 TCARD16
  5689. FmaxCharOrByte2 TCARD16
  5690. FdefaultChar TCARD16
  5691. FnFontProps TCARD16
  5692. FdrawDirection TCARD8
  5693. FminByte1 TCARD8
  5694. FmaxByte1 TCARD8
  5695. FallCharsExist TBOOL
  5696. FfontAscent TINT16
  5697. FfontDescent TINT16
  5698. FnReplies TCARD32
  5699. }
  5700. type TxGetFontPathReply = struct {
  5701. Ftype1 TBYTE
  5702. Fpad1 TBYTE
  5703. FsequenceNumber TCARD16
  5704. Flength TCARD32
  5705. FnPaths TCARD16
  5706. Fpad2 TCARD16
  5707. Fpad3 TCARD32
  5708. Fpad4 TCARD32
  5709. Fpad5 TCARD32
  5710. Fpad6 TCARD32
  5711. Fpad7 TCARD32
  5712. }
  5713. type TxGetImageReply = struct {
  5714. Ftype1 TBYTE
  5715. Fdepth TCARD8
  5716. FsequenceNumber TCARD16
  5717. Flength TCARD32
  5718. Fvisual TCARD32
  5719. Fpad3 TCARD32
  5720. Fpad4 TCARD32
  5721. Fpad5 TCARD32
  5722. Fpad6 TCARD32
  5723. Fpad7 TCARD32
  5724. }
  5725. type TxListInstalledColormapsReply = struct {
  5726. Ftype1 TBYTE
  5727. Fpad1 TBYTE
  5728. FsequenceNumber TCARD16
  5729. Flength TCARD32
  5730. FnColormaps TCARD16
  5731. Fpad2 TCARD16
  5732. Fpad3 TCARD32
  5733. Fpad4 TCARD32
  5734. Fpad5 TCARD32
  5735. Fpad6 TCARD32
  5736. Fpad7 TCARD32
  5737. }
  5738. type TxAllocColorReply = struct {
  5739. Ftype1 TBYTE
  5740. Fpad1 TBYTE
  5741. FsequenceNumber TCARD16
  5742. Flength TCARD32
  5743. Fred TCARD16
  5744. Fgreen TCARD16
  5745. Fblue TCARD16
  5746. Fpad2 TCARD16
  5747. Fpixel TCARD32
  5748. Fpad3 TCARD32
  5749. Fpad4 TCARD32
  5750. Fpad5 TCARD32
  5751. }
  5752. type TxAllocNamedColorReply = struct {
  5753. Ftype1 TBYTE
  5754. Fpad1 TBYTE
  5755. FsequenceNumber TCARD16
  5756. Flength TCARD32
  5757. Fpixel TCARD32
  5758. FexactRed TCARD16
  5759. FexactGreen TCARD16
  5760. FexactBlue TCARD16
  5761. FscreenRed TCARD16
  5762. FscreenGreen TCARD16
  5763. FscreenBlue TCARD16
  5764. Fpad2 TCARD32
  5765. Fpad3 TCARD32
  5766. }
  5767. type TxAllocColorCellsReply = struct {
  5768. Ftype1 TBYTE
  5769. Fpad1 TBYTE
  5770. FsequenceNumber TCARD16
  5771. Flength TCARD32
  5772. FnPixels TCARD16
  5773. FnMasks TCARD16
  5774. Fpad3 TCARD32
  5775. Fpad4 TCARD32
  5776. Fpad5 TCARD32
  5777. Fpad6 TCARD32
  5778. Fpad7 TCARD32
  5779. }
  5780. type TxAllocColorPlanesReply = struct {
  5781. Ftype1 TBYTE
  5782. Fpad1 TBYTE
  5783. FsequenceNumber TCARD16
  5784. Flength TCARD32
  5785. FnPixels TCARD16
  5786. Fpad2 TCARD16
  5787. FredMask TCARD32
  5788. FgreenMask TCARD32
  5789. FblueMask TCARD32
  5790. Fpad3 TCARD32
  5791. Fpad4 TCARD32
  5792. }
  5793. type TxQueryColorsReply = struct {
  5794. Ftype1 TBYTE
  5795. Fpad1 TBYTE
  5796. FsequenceNumber TCARD16
  5797. Flength TCARD32
  5798. FnColors TCARD16
  5799. Fpad2 TCARD16
  5800. Fpad3 TCARD32
  5801. Fpad4 TCARD32
  5802. Fpad5 TCARD32
  5803. Fpad6 TCARD32
  5804. Fpad7 TCARD32
  5805. }
  5806. type TxLookupColorReply = struct {
  5807. Ftype1 TBYTE
  5808. Fpad1 TBYTE
  5809. FsequenceNumber TCARD16
  5810. Flength TCARD32
  5811. FexactRed TCARD16
  5812. FexactGreen TCARD16
  5813. FexactBlue TCARD16
  5814. FscreenRed TCARD16
  5815. FscreenGreen TCARD16
  5816. FscreenBlue TCARD16
  5817. Fpad3 TCARD32
  5818. Fpad4 TCARD32
  5819. Fpad5 TCARD32
  5820. }
  5821. type TxQueryBestSizeReply = struct {
  5822. Ftype1 TBYTE
  5823. Fpad1 TBYTE
  5824. FsequenceNumber TCARD16
  5825. Flength TCARD32
  5826. Fwidth TCARD16
  5827. Fheight TCARD16
  5828. Fpad3 TCARD32
  5829. Fpad4 TCARD32
  5830. Fpad5 TCARD32
  5831. Fpad6 TCARD32
  5832. Fpad7 TCARD32
  5833. }
  5834. type TxQueryExtensionReply = struct {
  5835. Ftype1 TBYTE
  5836. Fpad1 TBYTE
  5837. FsequenceNumber TCARD16
  5838. Flength TCARD32
  5839. Fpresent TBOOL
  5840. Fmajor_opcode TCARD8
  5841. Ffirst_event TCARD8
  5842. Ffirst_error TCARD8
  5843. Fpad3 TCARD32
  5844. Fpad4 TCARD32
  5845. Fpad5 TCARD32
  5846. Fpad6 TCARD32
  5847. Fpad7 TCARD32
  5848. }
  5849. type TxListExtensionsReply = struct {
  5850. Ftype1 TBYTE
  5851. FnExtensions TCARD8
  5852. FsequenceNumber TCARD16
  5853. Flength TCARD32
  5854. Fpad2 TCARD32
  5855. Fpad3 TCARD32
  5856. Fpad4 TCARD32
  5857. Fpad5 TCARD32
  5858. Fpad6 TCARD32
  5859. Fpad7 TCARD32
  5860. }
  5861. type TxSetMappingReply = struct {
  5862. Ftype1 TBYTE
  5863. Fsuccess TCARD8
  5864. FsequenceNumber TCARD16
  5865. Flength TCARD32
  5866. Fpad2 TCARD32
  5867. Fpad3 TCARD32
  5868. Fpad4 TCARD32
  5869. Fpad5 TCARD32
  5870. Fpad6 TCARD32
  5871. Fpad7 TCARD32
  5872. }
  5873. type TxSetPointerMappingReply = struct {
  5874. Ftype1 TBYTE
  5875. Fsuccess TCARD8
  5876. FsequenceNumber TCARD16
  5877. Flength TCARD32
  5878. Fpad2 TCARD32
  5879. Fpad3 TCARD32
  5880. Fpad4 TCARD32
  5881. Fpad5 TCARD32
  5882. Fpad6 TCARD32
  5883. Fpad7 TCARD32
  5884. }
  5885. type TxSetModifierMappingReply = struct {
  5886. Ftype1 TBYTE
  5887. Fsuccess TCARD8
  5888. FsequenceNumber TCARD16
  5889. Flength TCARD32
  5890. Fpad2 TCARD32
  5891. Fpad3 TCARD32
  5892. Fpad4 TCARD32
  5893. Fpad5 TCARD32
  5894. Fpad6 TCARD32
  5895. Fpad7 TCARD32
  5896. }
  5897. type TxGetPointerMappingReply = struct {
  5898. Ftype1 TBYTE
  5899. FnElts TCARD8
  5900. FsequenceNumber TCARD16
  5901. Flength TCARD32
  5902. Fpad2 TCARD32
  5903. Fpad3 TCARD32
  5904. Fpad4 TCARD32
  5905. Fpad5 TCARD32
  5906. Fpad6 TCARD32
  5907. Fpad7 TCARD32
  5908. }
  5909. type TxGetKeyboardMappingReply = struct {
  5910. Ftype1 TBYTE
  5911. FkeySymsPerKeyCode TCARD8
  5912. FsequenceNumber TCARD16
  5913. Flength TCARD32
  5914. Fpad2 TCARD32
  5915. Fpad3 TCARD32
  5916. Fpad4 TCARD32
  5917. Fpad5 TCARD32
  5918. Fpad6 TCARD32
  5919. Fpad7 TCARD32
  5920. }
  5921. type TxGetModifierMappingReply = struct {
  5922. Ftype1 TBYTE
  5923. FnumKeyPerModifier TCARD8
  5924. FsequenceNumber TCARD16
  5925. Flength TCARD32
  5926. Fpad1 TCARD32
  5927. Fpad2 TCARD32
  5928. Fpad3 TCARD32
  5929. Fpad4 TCARD32
  5930. Fpad5 TCARD32
  5931. Fpad6 TCARD32
  5932. }
  5933. type TxGetKeyboardControlReply = struct {
  5934. Ftype1 TBYTE
  5935. FglobalAutoRepeat TBOOL
  5936. FsequenceNumber TCARD16
  5937. Flength TCARD32
  5938. FledMask TCARD32
  5939. FkeyClickPercent TCARD8
  5940. FbellPercent TCARD8
  5941. FbellPitch TCARD16
  5942. FbellDuration TCARD16
  5943. Fpad TCARD16
  5944. Fmap1 [32]TBYTE
  5945. }
  5946. type TxGetPointerControlReply = struct {
  5947. Ftype1 TBYTE
  5948. Fpad1 TBYTE
  5949. FsequenceNumber TCARD16
  5950. Flength TCARD32
  5951. FaccelNumerator TCARD16
  5952. FaccelDenominator TCARD16
  5953. Fthreshold TCARD16
  5954. Fpad2 TCARD16
  5955. Fpad3 TCARD32
  5956. Fpad4 TCARD32
  5957. Fpad5 TCARD32
  5958. Fpad6 TCARD32
  5959. }
  5960. type TxGetScreenSaverReply = struct {
  5961. Ftype1 TBYTE
  5962. Fpad1 TBYTE
  5963. FsequenceNumber TCARD16
  5964. Flength TCARD32
  5965. Ftimeout TCARD16
  5966. Finterval TCARD16
  5967. FpreferBlanking TBOOL
  5968. FallowExposures TBOOL
  5969. Fpad2 TCARD16
  5970. Fpad3 TCARD32
  5971. Fpad4 TCARD32
  5972. Fpad5 TCARD32
  5973. Fpad6 TCARD32
  5974. }
  5975. type TxListHostsReply = struct {
  5976. Ftype1 TBYTE
  5977. Fenabled TBOOL
  5978. FsequenceNumber TCARD16
  5979. Flength TCARD32
  5980. FnHosts TCARD16
  5981. Fpad1 TCARD16
  5982. Fpad3 TCARD32
  5983. Fpad4 TCARD32
  5984. Fpad5 TCARD32
  5985. Fpad6 TCARD32
  5986. Fpad7 TCARD32
  5987. }
  5988. type TxError = struct {
  5989. Ftype1 TBYTE
  5990. FerrorCode TBYTE
  5991. FsequenceNumber TCARD16
  5992. FresourceID TCARD32
  5993. FminorCode TCARD16
  5994. FmajorCode TCARD8
  5995. Fpad1 TBYTE
  5996. Fpad3 TCARD32
  5997. Fpad4 TCARD32
  5998. Fpad5 TCARD32
  5999. Fpad6 TCARD32
  6000. Fpad7 TCARD32
  6001. }
  6002. type TxEvent = struct {
  6003. Fu struct {
  6004. FkeyButtonPointer [0]struct {
  6005. Fpad00 TCARD32
  6006. Ftime TCARD32
  6007. Froot TCARD32
  6008. Fevent TCARD32
  6009. Fchild TCARD32
  6010. FrootX TINT16
  6011. FrootY TINT16
  6012. FeventX TINT16
  6013. FeventY TINT16
  6014. Fstate TKeyButMask
  6015. FsameScreen TBOOL
  6016. Fpad1 TBYTE
  6017. }
  6018. FenterLeave [0]struct {
  6019. Fpad00 TCARD32
  6020. Ftime TCARD32
  6021. Froot TCARD32
  6022. Fevent TCARD32
  6023. Fchild TCARD32
  6024. FrootX TINT16
  6025. FrootY TINT16
  6026. FeventX TINT16
  6027. FeventY TINT16
  6028. Fstate TKeyButMask
  6029. Fmode TBYTE
  6030. Fflags TBYTE
  6031. }
  6032. Ffocus [0]struct {
  6033. Fpad00 TCARD32
  6034. Fwindow TCARD32
  6035. Fmode TBYTE
  6036. Fpad1 TBYTE
  6037. Fpad2 TBYTE
  6038. Fpad3 TBYTE
  6039. }
  6040. Fexpose [0]struct {
  6041. Fpad00 TCARD32
  6042. Fwindow TCARD32
  6043. Fx TCARD16
  6044. Fy TCARD16
  6045. Fwidth TCARD16
  6046. Fheight TCARD16
  6047. Fcount TCARD16
  6048. Fpad2 TCARD16
  6049. }
  6050. FgraphicsExposure [0]struct {
  6051. Fpad00 TCARD32
  6052. Fdrawable TCARD32
  6053. Fx TCARD16
  6054. Fy TCARD16
  6055. Fwidth TCARD16
  6056. Fheight TCARD16
  6057. FminorEvent TCARD16
  6058. Fcount TCARD16
  6059. FmajorEvent TBYTE
  6060. Fpad1 TBYTE
  6061. Fpad2 TBYTE
  6062. Fpad3 TBYTE
  6063. }
  6064. FnoExposure [0]struct {
  6065. Fpad00 TCARD32
  6066. Fdrawable TCARD32
  6067. FminorEvent TCARD16
  6068. FmajorEvent TBYTE
  6069. Fbpad TBYTE
  6070. }
  6071. Fvisibility [0]struct {
  6072. Fpad00 TCARD32
  6073. Fwindow TCARD32
  6074. Fstate TCARD8
  6075. Fpad1 TBYTE
  6076. Fpad2 TBYTE
  6077. Fpad3 TBYTE
  6078. }
  6079. FcreateNotify [0]struct {
  6080. Fpad00 TCARD32
  6081. Fparent TCARD32
  6082. Fwindow TCARD32
  6083. Fx TINT16
  6084. Fy TINT16
  6085. Fwidth TCARD16
  6086. Fheight TCARD16
  6087. FborderWidth TCARD16
  6088. Foverride TBOOL
  6089. Fbpad TBYTE
  6090. }
  6091. FdestroyNotify [0]struct {
  6092. Fpad00 TCARD32
  6093. Fevent TCARD32
  6094. Fwindow TCARD32
  6095. }
  6096. FunmapNotify [0]struct {
  6097. Fpad00 TCARD32
  6098. Fevent TCARD32
  6099. Fwindow TCARD32
  6100. FfromConfigure TBOOL
  6101. Fpad1 TBYTE
  6102. Fpad2 TBYTE
  6103. Fpad3 TBYTE
  6104. }
  6105. FmapNotify [0]struct {
  6106. Fpad00 TCARD32
  6107. Fevent TCARD32
  6108. Fwindow TCARD32
  6109. Foverride TBOOL
  6110. Fpad1 TBYTE
  6111. Fpad2 TBYTE
  6112. Fpad3 TBYTE
  6113. }
  6114. FmapRequest [0]struct {
  6115. Fpad00 TCARD32
  6116. Fparent TCARD32
  6117. Fwindow TCARD32
  6118. }
  6119. Freparent [0]struct {
  6120. Fpad00 TCARD32
  6121. Fevent TCARD32
  6122. Fwindow TCARD32
  6123. Fparent TCARD32
  6124. Fx TINT16
  6125. Fy TINT16
  6126. Foverride TBOOL
  6127. Fpad1 TBYTE
  6128. Fpad2 TBYTE
  6129. Fpad3 TBYTE
  6130. }
  6131. FconfigureNotify [0]struct {
  6132. Fpad00 TCARD32
  6133. Fevent TCARD32
  6134. Fwindow TCARD32
  6135. FaboveSibling TCARD32
  6136. Fx TINT16
  6137. Fy TINT16
  6138. Fwidth TCARD16
  6139. Fheight TCARD16
  6140. FborderWidth TCARD16
  6141. Foverride TBOOL
  6142. Fbpad TBYTE
  6143. }
  6144. FconfigureRequest [0]struct {
  6145. Fpad00 TCARD32
  6146. Fparent TCARD32
  6147. Fwindow TCARD32
  6148. Fsibling TCARD32
  6149. Fx TINT16
  6150. Fy TINT16
  6151. Fwidth TCARD16
  6152. Fheight TCARD16
  6153. FborderWidth TCARD16
  6154. FvalueMask TCARD16
  6155. Fpad1 TCARD32
  6156. }
  6157. Fgravity [0]struct {
  6158. Fpad00 TCARD32
  6159. Fevent TCARD32
  6160. Fwindow TCARD32
  6161. Fx TINT16
  6162. Fy TINT16
  6163. Fpad1 TCARD32
  6164. Fpad2 TCARD32
  6165. Fpad3 TCARD32
  6166. Fpad4 TCARD32
  6167. }
  6168. FresizeRequest [0]struct {
  6169. Fpad00 TCARD32
  6170. Fwindow TCARD32
  6171. Fwidth TCARD16
  6172. Fheight TCARD16
  6173. }
  6174. Fcirculate [0]struct {
  6175. Fpad00 TCARD32
  6176. Fevent TCARD32
  6177. Fwindow TCARD32
  6178. Fparent TCARD32
  6179. Fplace TBYTE
  6180. Fpad1 TBYTE
  6181. Fpad2 TBYTE
  6182. Fpad3 TBYTE
  6183. }
  6184. Fproperty [0]struct {
  6185. Fpad00 TCARD32
  6186. Fwindow TCARD32
  6187. Fatom TCARD32
  6188. Ftime TCARD32
  6189. Fstate TBYTE
  6190. Fpad1 TBYTE
  6191. Fpad2 TCARD16
  6192. }
  6193. FselectionClear [0]struct {
  6194. Fpad00 TCARD32
  6195. Ftime TCARD32
  6196. Fwindow TCARD32
  6197. Fatom TCARD32
  6198. }
  6199. FselectionRequest [0]struct {
  6200. Fpad00 TCARD32
  6201. Ftime TCARD32
  6202. Fowner TCARD32
  6203. Frequestor TCARD32
  6204. Fselection TCARD32
  6205. Ftarget TCARD32
  6206. Fproperty TCARD32
  6207. }
  6208. FselectionNotify [0]struct {
  6209. Fpad00 TCARD32
  6210. Ftime TCARD32
  6211. Frequestor TCARD32
  6212. Fselection TCARD32
  6213. Ftarget TCARD32
  6214. Fproperty TCARD32
  6215. }
  6216. Fcolormap [0]struct {
  6217. Fpad00 TCARD32
  6218. Fwindow TCARD32
  6219. Fcolormap TCARD32
  6220. Fnew1 TBOOL
  6221. Fstate TBYTE
  6222. Fpad1 TBYTE
  6223. Fpad2 TBYTE
  6224. }
  6225. FmappingNotify [0]struct {
  6226. Fpad00 TCARD32
  6227. Frequest TCARD8
  6228. FfirstKeyCode TCARD8
  6229. Fcount TCARD8
  6230. Fpad1 TBYTE
  6231. }
  6232. FclientMessage [0]struct {
  6233. Fpad00 TCARD32
  6234. Fwindow TCARD32
  6235. Fu struct {
  6236. Fs [0]struct {
  6237. Ftype1 TCARD32
  6238. Fshorts0 TINT16
  6239. Fshorts1 TINT16
  6240. Fshorts2 TINT16
  6241. Fshorts3 TINT16
  6242. Fshorts4 TINT16
  6243. Fshorts5 TINT16
  6244. Fshorts6 TINT16
  6245. Fshorts7 TINT16
  6246. Fshorts8 TINT16
  6247. Fshorts9 TINT16
  6248. }
  6249. Fb [0]struct {
  6250. Ftype1 TCARD32
  6251. Fbytes [20]TINT8
  6252. }
  6253. Fl struct {
  6254. Ftype1 TCARD32
  6255. Flongs0 TINT32
  6256. Flongs1 TINT32
  6257. Flongs2 TINT32
  6258. Flongs3 TINT32
  6259. Flongs4 TINT32
  6260. }
  6261. }
  6262. }
  6263. Fu struct {
  6264. Ftype1 TBYTE
  6265. Fdetail TBYTE
  6266. FsequenceNumber TCARD16
  6267. }
  6268. F__ccgo_pad26 [28]byte
  6269. }
  6270. }
  6271. type T_xEvent = TxEvent
  6272. type TxGenericEvent = struct {
  6273. Ftype1 TBYTE
  6274. Fextension TCARD8
  6275. FsequenceNumber TCARD16
  6276. Flength TCARD32
  6277. Fevtype TCARD16
  6278. Fpad2 TCARD16
  6279. Fpad3 TCARD32
  6280. Fpad4 TCARD32
  6281. Fpad5 TCARD32
  6282. Fpad6 TCARD32
  6283. Fpad7 TCARD32
  6284. }
  6285. type TxKeymapEvent = struct {
  6286. Ftype1 TBYTE
  6287. Fmap1 [31]TBYTE
  6288. }
  6289. type TxReply = struct {
  6290. Fgeom [0]TxGetGeometryReply
  6291. Ftree [0]TxQueryTreeReply
  6292. Fatom [0]TxInternAtomReply
  6293. FatomName [0]TxGetAtomNameReply
  6294. Fproperty [0]TxGetPropertyReply
  6295. FlistProperties [0]TxListPropertiesReply
  6296. Fselection [0]TxGetSelectionOwnerReply
  6297. FgrabPointer [0]TxGrabPointerReply
  6298. FgrabKeyboard [0]TxGrabKeyboardReply
  6299. Fpointer [0]TxQueryPointerReply
  6300. FmotionEvents [0]TxGetMotionEventsReply
  6301. Fcoords [0]TxTranslateCoordsReply
  6302. FinputFocus [0]TxGetInputFocusReply
  6303. FtextExtents [0]TxQueryTextExtentsReply
  6304. Ffonts [0]TxListFontsReply
  6305. FfontPath [0]TxGetFontPathReply
  6306. Fimage [0]TxGetImageReply
  6307. Fcolormaps [0]TxListInstalledColormapsReply
  6308. FallocColor [0]TxAllocColorReply
  6309. FallocNamedColor [0]TxAllocNamedColorReply
  6310. FcolorCells [0]TxAllocColorCellsReply
  6311. FcolorPlanes [0]TxAllocColorPlanesReply
  6312. Fcolors [0]TxQueryColorsReply
  6313. FlookupColor [0]TxLookupColorReply
  6314. FbestSize [0]TxQueryBestSizeReply
  6315. Fextension [0]TxQueryExtensionReply
  6316. Fextensions [0]TxListExtensionsReply
  6317. FsetModifierMapping [0]TxSetModifierMappingReply
  6318. FgetModifierMapping [0]TxGetModifierMappingReply
  6319. FsetPointerMapping [0]TxSetPointerMappingReply
  6320. FgetKeyboardMapping [0]TxGetKeyboardMappingReply
  6321. FgetPointerMapping [0]TxGetPointerMappingReply
  6322. FpointerControl [0]TxGetPointerControlReply
  6323. FscreenSaver [0]TxGetScreenSaverReply
  6324. Fhosts [0]TxListHostsReply
  6325. Ferror1 [0]TxError
  6326. Fevent [0]TxEvent
  6327. Fgeneric TxGenericReply
  6328. }
  6329. type TxReq = struct {
  6330. FreqType TCARD8
  6331. Fdata TCARD8
  6332. Flength TCARD16
  6333. }
  6334. type T_xReq = TxReq
  6335. type TxResourceReq = struct {
  6336. FreqType TCARD8
  6337. Fpad TBYTE
  6338. Flength TCARD16
  6339. Fid TCARD32
  6340. }
  6341. type TxCreateWindowReq = struct {
  6342. FreqType TCARD8
  6343. Fdepth TCARD8
  6344. Flength TCARD16
  6345. Fwid TCARD32
  6346. Fparent TCARD32
  6347. Fx TINT16
  6348. Fy TINT16
  6349. Fwidth TCARD16
  6350. Fheight TCARD16
  6351. FborderWidth TCARD16
  6352. Fclass TCARD16
  6353. Fvisual TCARD32
  6354. Fmask TCARD32
  6355. }
  6356. type TxChangeWindowAttributesReq = struct {
  6357. FreqType TCARD8
  6358. Fpad TBYTE
  6359. Flength TCARD16
  6360. Fwindow TCARD32
  6361. FvalueMask TCARD32
  6362. }
  6363. type TxChangeSaveSetReq = struct {
  6364. FreqType TCARD8
  6365. Fmode TBYTE
  6366. Flength TCARD16
  6367. Fwindow TCARD32
  6368. }
  6369. type TxReparentWindowReq = struct {
  6370. FreqType TCARD8
  6371. Fpad TBYTE
  6372. Flength TCARD16
  6373. Fwindow TCARD32
  6374. Fparent TCARD32
  6375. Fx TINT16
  6376. Fy TINT16
  6377. }
  6378. type TxConfigureWindowReq = struct {
  6379. FreqType TCARD8
  6380. Fpad TCARD8
  6381. Flength TCARD16
  6382. Fwindow TCARD32
  6383. Fmask TCARD16
  6384. Fpad2 TCARD16
  6385. }
  6386. type TxCirculateWindowReq = struct {
  6387. FreqType TCARD8
  6388. Fdirection TCARD8
  6389. Flength TCARD16
  6390. Fwindow TCARD32
  6391. }
  6392. type TxInternAtomReq = struct {
  6393. FreqType TCARD8
  6394. FonlyIfExists TBOOL
  6395. Flength TCARD16
  6396. Fnbytes TCARD16
  6397. Fpad TCARD16
  6398. }
  6399. type TxChangePropertyReq = struct {
  6400. FreqType TCARD8
  6401. Fmode TCARD8
  6402. Flength TCARD16
  6403. Fwindow TCARD32
  6404. Fproperty TCARD32
  6405. Ftype1 TCARD32
  6406. Fformat TCARD8
  6407. Fpad [3]TBYTE
  6408. FnUnits TCARD32
  6409. }
  6410. type TxDeletePropertyReq = struct {
  6411. FreqType TCARD8
  6412. Fpad TBYTE
  6413. Flength TCARD16
  6414. Fwindow TCARD32
  6415. Fproperty TCARD32
  6416. }
  6417. type TxGetPropertyReq = struct {
  6418. FreqType TCARD8
  6419. Fdelete1 TBOOL
  6420. Flength TCARD16
  6421. Fwindow TCARD32
  6422. Fproperty TCARD32
  6423. Ftype1 TCARD32
  6424. FlongOffset TCARD32
  6425. FlongLength TCARD32
  6426. }
  6427. type TxSetSelectionOwnerReq = struct {
  6428. FreqType TCARD8
  6429. Fpad TBYTE
  6430. Flength TCARD16
  6431. Fwindow TCARD32
  6432. Fselection TCARD32
  6433. Ftime TCARD32
  6434. }
  6435. type TxConvertSelectionReq = struct {
  6436. FreqType TCARD8
  6437. Fpad TBYTE
  6438. Flength TCARD16
  6439. Frequestor TCARD32
  6440. Fselection TCARD32
  6441. Ftarget TCARD32
  6442. Fproperty TCARD32
  6443. Ftime TCARD32
  6444. }
  6445. type TxSendEventReq = struct {
  6446. FreqType TCARD8
  6447. Fpropagate TBOOL
  6448. Flength TCARD16
  6449. Fdestination TCARD32
  6450. FeventMask TCARD32
  6451. Fevent TxEvent
  6452. }
  6453. type TxGrabPointerReq = struct {
  6454. FreqType TCARD8
  6455. FownerEvents TBOOL
  6456. Flength TCARD16
  6457. FgrabWindow TCARD32
  6458. FeventMask TCARD16
  6459. FpointerMode TBYTE
  6460. FkeyboardMode TBYTE
  6461. FconfineTo TCARD32
  6462. Fcursor TCARD32
  6463. Ftime TCARD32
  6464. }
  6465. type TxGrabButtonReq = struct {
  6466. FreqType TCARD8
  6467. FownerEvents TBOOL
  6468. Flength TCARD16
  6469. FgrabWindow TCARD32
  6470. FeventMask TCARD16
  6471. FpointerMode TBYTE
  6472. FkeyboardMode TBYTE
  6473. FconfineTo TCARD32
  6474. Fcursor TCARD32
  6475. Fbutton TCARD8
  6476. Fpad TBYTE
  6477. Fmodifiers TCARD16
  6478. }
  6479. type TxUngrabButtonReq = struct {
  6480. FreqType TCARD8
  6481. Fbutton TCARD8
  6482. Flength TCARD16
  6483. FgrabWindow TCARD32
  6484. Fmodifiers TCARD16
  6485. Fpad TCARD16
  6486. }
  6487. type TxChangeActivePointerGrabReq = struct {
  6488. FreqType TCARD8
  6489. Fpad TBYTE
  6490. Flength TCARD16
  6491. Fcursor TCARD32
  6492. Ftime TCARD32
  6493. FeventMask TCARD16
  6494. Fpad2 TCARD16
  6495. }
  6496. type TxGrabKeyboardReq = struct {
  6497. FreqType TCARD8
  6498. FownerEvents TBOOL
  6499. Flength TCARD16
  6500. FgrabWindow TCARD32
  6501. Ftime TCARD32
  6502. FpointerMode TBYTE
  6503. FkeyboardMode TBYTE
  6504. Fpad TCARD16
  6505. }
  6506. type TxGrabKeyReq = struct {
  6507. FreqType TCARD8
  6508. FownerEvents TBOOL
  6509. Flength TCARD16
  6510. FgrabWindow TCARD32
  6511. Fmodifiers TCARD16
  6512. Fkey TCARD8
  6513. FpointerMode TBYTE
  6514. FkeyboardMode TBYTE
  6515. Fpad1 TBYTE
  6516. Fpad2 TBYTE
  6517. Fpad3 TBYTE
  6518. }
  6519. type TxUngrabKeyReq = struct {
  6520. FreqType TCARD8
  6521. Fkey TCARD8
  6522. Flength TCARD16
  6523. FgrabWindow TCARD32
  6524. Fmodifiers TCARD16
  6525. Fpad TCARD16
  6526. }
  6527. type TxAllowEventsReq = struct {
  6528. FreqType TCARD8
  6529. Fmode TCARD8
  6530. Flength TCARD16
  6531. Ftime TCARD32
  6532. }
  6533. type TxGetMotionEventsReq = struct {
  6534. FreqType TCARD8
  6535. Fpad TBYTE
  6536. Flength TCARD16
  6537. Fwindow TCARD32
  6538. Fstart TCARD32
  6539. Fstop TCARD32
  6540. }
  6541. type TxTranslateCoordsReq = struct {
  6542. FreqType TCARD8
  6543. Fpad TBYTE
  6544. Flength TCARD16
  6545. FsrcWid TCARD32
  6546. FdstWid TCARD32
  6547. FsrcX TINT16
  6548. FsrcY TINT16
  6549. }
  6550. type TxWarpPointerReq = struct {
  6551. FreqType TCARD8
  6552. Fpad TBYTE
  6553. Flength TCARD16
  6554. FsrcWid TCARD32
  6555. FdstWid TCARD32
  6556. FsrcX TINT16
  6557. FsrcY TINT16
  6558. FsrcWidth TCARD16
  6559. FsrcHeight TCARD16
  6560. FdstX TINT16
  6561. FdstY TINT16
  6562. }
  6563. type TxSetInputFocusReq = struct {
  6564. FreqType TCARD8
  6565. FrevertTo TCARD8
  6566. Flength TCARD16
  6567. Ffocus TCARD32
  6568. Ftime TCARD32
  6569. }
  6570. type TxOpenFontReq = struct {
  6571. FreqType TCARD8
  6572. Fpad TBYTE
  6573. Flength TCARD16
  6574. Ffid TCARD32
  6575. Fnbytes TCARD16
  6576. Fpad1 TBYTE
  6577. Fpad2 TBYTE
  6578. }
  6579. type TxQueryTextExtentsReq = struct {
  6580. FreqType TCARD8
  6581. FoddLength TBOOL
  6582. Flength TCARD16
  6583. Ffid TCARD32
  6584. }
  6585. type TxListFontsReq = struct {
  6586. FreqType TCARD8
  6587. Fpad TBYTE
  6588. Flength TCARD16
  6589. FmaxNames TCARD16
  6590. Fnbytes TCARD16
  6591. }
  6592. type TxListFontsWithInfoReq = struct {
  6593. FreqType TCARD8
  6594. Fpad TBYTE
  6595. Flength TCARD16
  6596. FmaxNames TCARD16
  6597. Fnbytes TCARD16
  6598. }
  6599. type TxSetFontPathReq = struct {
  6600. FreqType TCARD8
  6601. Fpad TBYTE
  6602. Flength TCARD16
  6603. FnFonts TCARD16
  6604. Fpad1 TBYTE
  6605. Fpad2 TBYTE
  6606. }
  6607. type TxCreatePixmapReq = struct {
  6608. FreqType TCARD8
  6609. Fdepth TCARD8
  6610. Flength TCARD16
  6611. Fpid TCARD32
  6612. Fdrawable TCARD32
  6613. Fwidth TCARD16
  6614. Fheight TCARD16
  6615. }
  6616. type TxCreateGCReq = struct {
  6617. FreqType TCARD8
  6618. Fpad TBYTE
  6619. Flength TCARD16
  6620. Fgc TCARD32
  6621. Fdrawable TCARD32
  6622. Fmask TCARD32
  6623. }
  6624. type TxChangeGCReq = struct {
  6625. FreqType TCARD8
  6626. Fpad TBYTE
  6627. Flength TCARD16
  6628. Fgc TCARD32
  6629. Fmask TCARD32
  6630. }
  6631. type TxCopyGCReq = struct {
  6632. FreqType TCARD8
  6633. Fpad TBYTE
  6634. Flength TCARD16
  6635. FsrcGC TCARD32
  6636. FdstGC TCARD32
  6637. Fmask TCARD32
  6638. }
  6639. type TxSetDashesReq = struct {
  6640. FreqType TCARD8
  6641. Fpad TBYTE
  6642. Flength TCARD16
  6643. Fgc TCARD32
  6644. FdashOffset TCARD16
  6645. FnDashes TCARD16
  6646. }
  6647. type TxSetClipRectanglesReq = struct {
  6648. FreqType TCARD8
  6649. Fordering TBYTE
  6650. Flength TCARD16
  6651. Fgc TCARD32
  6652. FxOrigin TINT16
  6653. FyOrigin TINT16
  6654. }
  6655. type TxClearAreaReq = struct {
  6656. FreqType TCARD8
  6657. Fexposures TBOOL
  6658. Flength TCARD16
  6659. Fwindow TCARD32
  6660. Fx TINT16
  6661. Fy TINT16
  6662. Fwidth TCARD16
  6663. Fheight TCARD16
  6664. }
  6665. type TxCopyAreaReq = struct {
  6666. FreqType TCARD8
  6667. Fpad TBYTE
  6668. Flength TCARD16
  6669. FsrcDrawable TCARD32
  6670. FdstDrawable TCARD32
  6671. Fgc TCARD32
  6672. FsrcX TINT16
  6673. FsrcY TINT16
  6674. FdstX TINT16
  6675. FdstY TINT16
  6676. Fwidth TCARD16
  6677. Fheight TCARD16
  6678. }
  6679. type TxCopyPlaneReq = struct {
  6680. FreqType TCARD8
  6681. Fpad TBYTE
  6682. Flength TCARD16
  6683. FsrcDrawable TCARD32
  6684. FdstDrawable TCARD32
  6685. Fgc TCARD32
  6686. FsrcX TINT16
  6687. FsrcY TINT16
  6688. FdstX TINT16
  6689. FdstY TINT16
  6690. Fwidth TCARD16
  6691. Fheight TCARD16
  6692. FbitPlane TCARD32
  6693. }
  6694. type TxPolyPointReq = struct {
  6695. FreqType TCARD8
  6696. FcoordMode TBYTE
  6697. Flength TCARD16
  6698. Fdrawable TCARD32
  6699. Fgc TCARD32
  6700. }
  6701. type TxPolyLineReq = struct {
  6702. FreqType TCARD8
  6703. FcoordMode TBYTE
  6704. Flength TCARD16
  6705. Fdrawable TCARD32
  6706. Fgc TCARD32
  6707. }
  6708. type TxPolySegmentReq = struct {
  6709. FreqType TCARD8
  6710. Fpad TBYTE
  6711. Flength TCARD16
  6712. Fdrawable TCARD32
  6713. Fgc TCARD32
  6714. }
  6715. type TxPolyArcReq = struct {
  6716. FreqType TCARD8
  6717. Fpad TBYTE
  6718. Flength TCARD16
  6719. Fdrawable TCARD32
  6720. Fgc TCARD32
  6721. }
  6722. type TxPolyRectangleReq = struct {
  6723. FreqType TCARD8
  6724. Fpad TBYTE
  6725. Flength TCARD16
  6726. Fdrawable TCARD32
  6727. Fgc TCARD32
  6728. }
  6729. type TxPolyFillRectangleReq = struct {
  6730. FreqType TCARD8
  6731. Fpad TBYTE
  6732. Flength TCARD16
  6733. Fdrawable TCARD32
  6734. Fgc TCARD32
  6735. }
  6736. type TxPolyFillArcReq = struct {
  6737. FreqType TCARD8
  6738. Fpad TBYTE
  6739. Flength TCARD16
  6740. Fdrawable TCARD32
  6741. Fgc TCARD32
  6742. }
  6743. type TxFillPolyReq = struct {
  6744. FreqType TCARD8
  6745. Fpad TBYTE
  6746. Flength TCARD16
  6747. Fdrawable TCARD32
  6748. Fgc TCARD32
  6749. Fshape TBYTE
  6750. FcoordMode TBYTE
  6751. Fpad1 TCARD16
  6752. }
  6753. type T_FillPolyReq = TxFillPolyReq
  6754. type TxPutImageReq = struct {
  6755. FreqType TCARD8
  6756. Fformat TCARD8
  6757. Flength TCARD16
  6758. Fdrawable TCARD32
  6759. Fgc TCARD32
  6760. Fwidth TCARD16
  6761. Fheight TCARD16
  6762. FdstX TINT16
  6763. FdstY TINT16
  6764. FleftPad TCARD8
  6765. Fdepth TCARD8
  6766. Fpad TCARD16
  6767. }
  6768. type T_PutImageReq = TxPutImageReq
  6769. type TxGetImageReq = struct {
  6770. FreqType TCARD8
  6771. Fformat TCARD8
  6772. Flength TCARD16
  6773. Fdrawable TCARD32
  6774. Fx TINT16
  6775. Fy TINT16
  6776. Fwidth TCARD16
  6777. Fheight TCARD16
  6778. FplaneMask TCARD32
  6779. }
  6780. type TxPolyTextReq = struct {
  6781. FreqType TCARD8
  6782. Fpad TCARD8
  6783. Flength TCARD16
  6784. Fdrawable TCARD32
  6785. Fgc TCARD32
  6786. Fx TINT16
  6787. Fy TINT16
  6788. }
  6789. type TxPolyText8Req = struct {
  6790. FreqType TCARD8
  6791. Fpad TCARD8
  6792. Flength TCARD16
  6793. Fdrawable TCARD32
  6794. Fgc TCARD32
  6795. Fx TINT16
  6796. Fy TINT16
  6797. }
  6798. type TxPolyText16Req = struct {
  6799. FreqType TCARD8
  6800. Fpad TCARD8
  6801. Flength TCARD16
  6802. Fdrawable TCARD32
  6803. Fgc TCARD32
  6804. Fx TINT16
  6805. Fy TINT16
  6806. }
  6807. type TxImageTextReq = struct {
  6808. FreqType TCARD8
  6809. FnChars TBYTE
  6810. Flength TCARD16
  6811. Fdrawable TCARD32
  6812. Fgc TCARD32
  6813. Fx TINT16
  6814. Fy TINT16
  6815. }
  6816. type TxImageText8Req = struct {
  6817. FreqType TCARD8
  6818. FnChars TBYTE
  6819. Flength TCARD16
  6820. Fdrawable TCARD32
  6821. Fgc TCARD32
  6822. Fx TINT16
  6823. Fy TINT16
  6824. }
  6825. type TxImageText16Req = struct {
  6826. FreqType TCARD8
  6827. FnChars TBYTE
  6828. Flength TCARD16
  6829. Fdrawable TCARD32
  6830. Fgc TCARD32
  6831. Fx TINT16
  6832. Fy TINT16
  6833. }
  6834. type TxCreateColormapReq = struct {
  6835. FreqType TCARD8
  6836. Falloc TBYTE
  6837. Flength TCARD16
  6838. Fmid TCARD32
  6839. Fwindow TCARD32
  6840. Fvisual TCARD32
  6841. }
  6842. type TxCopyColormapAndFreeReq = struct {
  6843. FreqType TCARD8
  6844. Fpad TBYTE
  6845. Flength TCARD16
  6846. Fmid TCARD32
  6847. FsrcCmap TCARD32
  6848. }
  6849. type TxAllocColorReq = struct {
  6850. FreqType TCARD8
  6851. Fpad TBYTE
  6852. Flength TCARD16
  6853. Fcmap TCARD32
  6854. Fred TCARD16
  6855. Fgreen TCARD16
  6856. Fblue TCARD16
  6857. Fpad2 TCARD16
  6858. }
  6859. type TxAllocNamedColorReq = struct {
  6860. FreqType TCARD8
  6861. Fpad TBYTE
  6862. Flength TCARD16
  6863. Fcmap TCARD32
  6864. Fnbytes TCARD16
  6865. Fpad1 TBYTE
  6866. Fpad2 TBYTE
  6867. }
  6868. type TxAllocColorCellsReq = struct {
  6869. FreqType TCARD8
  6870. Fcontiguous TBOOL
  6871. Flength TCARD16
  6872. Fcmap TCARD32
  6873. Fcolors TCARD16
  6874. Fplanes TCARD16
  6875. }
  6876. type TxAllocColorPlanesReq = struct {
  6877. FreqType TCARD8
  6878. Fcontiguous TBOOL
  6879. Flength TCARD16
  6880. Fcmap TCARD32
  6881. Fcolors TCARD16
  6882. Fred TCARD16
  6883. Fgreen TCARD16
  6884. Fblue TCARD16
  6885. }
  6886. type TxFreeColorsReq = struct {
  6887. FreqType TCARD8
  6888. Fpad TBYTE
  6889. Flength TCARD16
  6890. Fcmap TCARD32
  6891. FplaneMask TCARD32
  6892. }
  6893. type TxStoreColorsReq = struct {
  6894. FreqType TCARD8
  6895. Fpad TBYTE
  6896. Flength TCARD16
  6897. Fcmap TCARD32
  6898. }
  6899. type TxStoreNamedColorReq = struct {
  6900. FreqType TCARD8
  6901. Fflags TCARD8
  6902. Flength TCARD16
  6903. Fcmap TCARD32
  6904. Fpixel TCARD32
  6905. Fnbytes TCARD16
  6906. Fpad1 TBYTE
  6907. Fpad2 TBYTE
  6908. }
  6909. type TxQueryColorsReq = struct {
  6910. FreqType TCARD8
  6911. Fpad TBYTE
  6912. Flength TCARD16
  6913. Fcmap TCARD32
  6914. }
  6915. type TxLookupColorReq = struct {
  6916. FreqType TCARD8
  6917. Fpad TBYTE
  6918. Flength TCARD16
  6919. Fcmap TCARD32
  6920. Fnbytes TCARD16
  6921. Fpad1 TBYTE
  6922. Fpad2 TBYTE
  6923. }
  6924. type TxCreateCursorReq = struct {
  6925. FreqType TCARD8
  6926. Fpad TBYTE
  6927. Flength TCARD16
  6928. Fcid TCARD32
  6929. Fsource TCARD32
  6930. Fmask TCARD32
  6931. FforeRed TCARD16
  6932. FforeGreen TCARD16
  6933. FforeBlue TCARD16
  6934. FbackRed TCARD16
  6935. FbackGreen TCARD16
  6936. FbackBlue TCARD16
  6937. Fx TCARD16
  6938. Fy TCARD16
  6939. }
  6940. type TxCreateGlyphCursorReq = struct {
  6941. FreqType TCARD8
  6942. Fpad TBYTE
  6943. Flength TCARD16
  6944. Fcid TCARD32
  6945. Fsource TCARD32
  6946. Fmask TCARD32
  6947. FsourceChar TCARD16
  6948. FmaskChar TCARD16
  6949. FforeRed TCARD16
  6950. FforeGreen TCARD16
  6951. FforeBlue TCARD16
  6952. FbackRed TCARD16
  6953. FbackGreen TCARD16
  6954. FbackBlue TCARD16
  6955. }
  6956. type TxRecolorCursorReq = struct {
  6957. FreqType TCARD8
  6958. Fpad TBYTE
  6959. Flength TCARD16
  6960. Fcursor TCARD32
  6961. FforeRed TCARD16
  6962. FforeGreen TCARD16
  6963. FforeBlue TCARD16
  6964. FbackRed TCARD16
  6965. FbackGreen TCARD16
  6966. FbackBlue TCARD16
  6967. }
  6968. type TxQueryBestSizeReq = struct {
  6969. FreqType TCARD8
  6970. Fclass TCARD8
  6971. Flength TCARD16
  6972. Fdrawable TCARD32
  6973. Fwidth TCARD16
  6974. Fheight TCARD16
  6975. }
  6976. type TxQueryExtensionReq = struct {
  6977. FreqType TCARD8
  6978. Fpad TBYTE
  6979. Flength TCARD16
  6980. Fnbytes TCARD16
  6981. Fpad1 TBYTE
  6982. Fpad2 TBYTE
  6983. }
  6984. type TxSetModifierMappingReq = struct {
  6985. FreqType TCARD8
  6986. FnumKeyPerModifier TCARD8
  6987. Flength TCARD16
  6988. }
  6989. type TxSetPointerMappingReq = struct {
  6990. FreqType TCARD8
  6991. FnElts TCARD8
  6992. Flength TCARD16
  6993. }
  6994. type TxGetKeyboardMappingReq = struct {
  6995. FreqType TCARD8
  6996. Fpad TBYTE
  6997. Flength TCARD16
  6998. FfirstKeyCode TCARD8
  6999. Fcount TCARD8
  7000. Fpad1 TCARD16
  7001. }
  7002. type TxChangeKeyboardMappingReq = struct {
  7003. FreqType TCARD8
  7004. FkeyCodes TCARD8
  7005. Flength TCARD16
  7006. FfirstKeyCode TCARD8
  7007. FkeySymsPerKeyCode TCARD8
  7008. Fpad1 TCARD16
  7009. }
  7010. type TxChangeKeyboardControlReq = struct {
  7011. FreqType TCARD8
  7012. Fpad TBYTE
  7013. Flength TCARD16
  7014. Fmask TCARD32
  7015. }
  7016. type TxBellReq = struct {
  7017. FreqType TCARD8
  7018. Fpercent TINT8
  7019. Flength TCARD16
  7020. }
  7021. type TxChangePointerControlReq = struct {
  7022. FreqType TCARD8
  7023. Fpad TBYTE
  7024. Flength TCARD16
  7025. FaccelNum TINT16
  7026. FaccelDenum TINT16
  7027. Fthreshold TINT16
  7028. FdoAccel TBOOL
  7029. FdoThresh TBOOL
  7030. }
  7031. type TxSetScreenSaverReq = struct {
  7032. FreqType TCARD8
  7033. Fpad TBYTE
  7034. Flength TCARD16
  7035. Ftimeout TINT16
  7036. Finterval TINT16
  7037. FpreferBlank TBYTE
  7038. FallowExpose TBYTE
  7039. Fpad2 TCARD16
  7040. }
  7041. type TxChangeHostsReq = struct {
  7042. FreqType TCARD8
  7043. Fmode TBYTE
  7044. Flength TCARD16
  7045. FhostFamily TCARD8
  7046. Fpad TBYTE
  7047. FhostLength TCARD16
  7048. }
  7049. type TxListHostsReq = struct {
  7050. FreqType TCARD8
  7051. Fpad TBYTE
  7052. Flength TCARD16
  7053. }
  7054. type TxChangeModeReq = struct {
  7055. FreqType TCARD8
  7056. Fmode TBYTE
  7057. Flength TCARD16
  7058. }
  7059. type TxSetAccessControlReq = struct {
  7060. FreqType TCARD8
  7061. Fmode TBYTE
  7062. Flength TCARD16
  7063. }
  7064. type TxSetCloseDownModeReq = struct {
  7065. FreqType TCARD8
  7066. Fmode TBYTE
  7067. Flength TCARD16
  7068. }
  7069. type TxForceScreenSaverReq = struct {
  7070. FreqType TCARD8
  7071. Fmode TBYTE
  7072. Flength TCARD16
  7073. }
  7074. type TxRotatePropertiesReq = struct {
  7075. FreqType TCARD8
  7076. Fpad TBYTE
  7077. Flength TCARD16
  7078. Fwindow TCARD32
  7079. FnAtoms TCARD16
  7080. FnPositions TINT16
  7081. }
  7082. type Tsched_param = struct {
  7083. Fsched_priority int32
  7084. F__reserved1 int32
  7085. F__reserved2 [2]struct {
  7086. F__reserved1 Ttime_t
  7087. F__reserved2 int64
  7088. }
  7089. F__reserved3 int32
  7090. }
  7091. type Tcpu_set_t = struct {
  7092. F__bits [16]uint64
  7093. }
  7094. type Ttm = struct {
  7095. Ftm_sec int32
  7096. Ftm_min int32
  7097. Ftm_hour int32
  7098. Ftm_mday int32
  7099. Ftm_mon int32
  7100. Ftm_year int32
  7101. Ftm_wday int32
  7102. Ftm_yday int32
  7103. Ftm_isdst int32
  7104. Ftm_gmtoff int64
  7105. Ftm_zone uintptr
  7106. }
  7107. type Titimerspec = struct {
  7108. Fit_interval Ttimespec
  7109. Fit_value Ttimespec
  7110. }
  7111. type t__ptcb = struct {
  7112. F__f uintptr
  7113. F__x uintptr
  7114. F__next uintptr
  7115. }
  7116. type Tcpu_set_t1 = struct {
  7117. F__bits [16]uint64
  7118. }
  7119. type Txthread_t = uintptr
  7120. type Txthread_key_t = uint32
  7121. type Txcondition_rec = struct {
  7122. F__u struct {
  7123. F__vi [0][12]int32
  7124. F__p [0][6]uintptr
  7125. F__i [12]int32
  7126. }
  7127. }
  7128. type Txmutex_rec = struct {
  7129. F__u struct {
  7130. F__vi [0][10]int32
  7131. F__p [0][5]uintptr
  7132. F__i [10]int32
  7133. }
  7134. }
  7135. type Txcondition_t = uintptr
  7136. type Txmutex_t = uintptr
  7137. type T_XQEvent = struct {
  7138. Fnext uintptr
  7139. Fevent TXEvent
  7140. Fqserial_num uint64
  7141. }
  7142. type T_XSQEvent = T_XQEvent
  7143. type TLockInfoPtr = uintptr
  7144. type T_XLockPtrs = struct {
  7145. Flock_display uintptr
  7146. Funlock_display uintptr
  7147. }
  7148. type T_XAsyncHandler = struct {
  7149. Fnext uintptr
  7150. Fhandler uintptr
  7151. Fdata TXPointer
  7152. }
  7153. type T_XInternalAsync = T_XAsyncHandler
  7154. type T_XAsyncErrorState = struct {
  7155. Fmin_sequence_number uint64
  7156. Fmax_sequence_number uint64
  7157. Ferror_code uint8
  7158. Fmajor_opcode uint8
  7159. Fminor_opcode uint16
  7160. Flast_error_received uint8
  7161. Ferror_count int32
  7162. }
  7163. type T_XAsyncEState = T_XAsyncErrorState
  7164. type TFreeFuncType = uintptr
  7165. type TFreeModmapType = uintptr
  7166. type T_XFreeFuncRec = struct {
  7167. Fatoms TFreeFuncType
  7168. Fmodifiermap TFreeModmapType
  7169. Fkey_bindings TFreeFuncType
  7170. Fcontext_db TFreeFuncType
  7171. FdefaultCCCs TFreeFuncType
  7172. FclientCmaps TFreeFuncType
  7173. FintensityMaps TFreeFuncType
  7174. Fim_filters TFreeFuncType
  7175. Fxkb TFreeFuncType
  7176. }
  7177. type T_XFreeFuncs = T_XFreeFuncRec
  7178. type TCreateGCType = uintptr
  7179. type TCopyGCType = uintptr
  7180. type TFlushGCType = uintptr
  7181. type TFreeGCType = uintptr
  7182. type TCreateFontType = uintptr
  7183. type TFreeFontType = uintptr
  7184. type TCloseDisplayType = uintptr
  7185. type TErrorType = uintptr
  7186. type TErrorStringType = uintptr
  7187. type TPrintErrorType = uintptr
  7188. type TBeforeFlushType = uintptr
  7189. type T_XExtension = struct {
  7190. Fnext uintptr
  7191. Fcodes TXExtCodes
  7192. Fcreate_GC TCreateGCType
  7193. Fcopy_GC TCopyGCType
  7194. Fflush_GC TFlushGCType
  7195. Ffree_GC TFreeGCType
  7196. Fcreate_Font TCreateFontType
  7197. Ffree_Font TFreeFontType
  7198. Fclose_display TCloseDisplayType
  7199. Ferror1 TErrorType
  7200. Ferror_string TErrorStringType
  7201. Fname uintptr
  7202. Ferror_values TPrintErrorType
  7203. Fbefore_flush TBeforeFlushType
  7204. Fnext_flush uintptr
  7205. }
  7206. type T_XExten = T_XExtension
  7207. type T_XInternalConnectionProc = uintptr
  7208. type T_XConnectionInfo = struct {
  7209. Ffd int32
  7210. Fread_callback T_XInternalConnectionProc
  7211. Fcall_data TXPointer
  7212. Fwatch_data uintptr
  7213. Fnext uintptr
  7214. }
  7215. type T_XConnWatchInfo = struct {
  7216. Ffn TXConnectionWatchProc
  7217. Fclient_data TXPointer
  7218. Fnext uintptr
  7219. }
  7220. type t__jmp_buf = [22]uint64
  7221. type Tjmp_buf = [1]t__jmp_buf_tag
  7222. type t__jmp_buf_tag = struct {
  7223. F__jb t__jmp_buf
  7224. F__fl uint64
  7225. F__ss [16]uint64
  7226. }
  7227. type Tsigjmp_buf = [1]t__jmp_buf_tag
  7228. type TFT_Int16 = int16
  7229. type TFT_UInt16 = uint16
  7230. type TFT_Int32 = int32
  7231. type TFT_UInt32 = uint32
  7232. type TFT_Fast = int32
  7233. type TFT_UFast = uint32
  7234. type TFT_Int64 = int64
  7235. type TFT_UInt64 = uint64
  7236. type TFT_Memory = uintptr
  7237. type TFT_MemoryRec_ = struct {
  7238. Fuser uintptr
  7239. Falloc TFT_Alloc_Func
  7240. Ffree TFT_Free_Func
  7241. Frealloc TFT_Realloc_Func
  7242. }
  7243. type TFT_Alloc_Func = uintptr
  7244. type TFT_Free_Func = uintptr
  7245. type TFT_Realloc_Func = uintptr
  7246. type TFT_Stream = uintptr
  7247. type TFT_StreamRec_ = struct {
  7248. Fbase uintptr
  7249. Fsize uint64
  7250. Fpos uint64
  7251. Fdescriptor TFT_StreamDesc
  7252. Fpathname TFT_StreamDesc
  7253. Fread TFT_Stream_IoFunc
  7254. Fclose1 TFT_Stream_CloseFunc
  7255. Fmemory TFT_Memory
  7256. Fcursor uintptr
  7257. Flimit uintptr
  7258. }
  7259. type TFT_StreamDesc = struct {
  7260. Fpointer [0]uintptr
  7261. Fvalue int64
  7262. }
  7263. type TFT_StreamDesc_ = TFT_StreamDesc
  7264. type TFT_Stream_IoFunc = uintptr
  7265. type TFT_Stream_CloseFunc = uintptr
  7266. type TFT_StreamRec = struct {
  7267. Fbase uintptr
  7268. Fsize uint64
  7269. Fpos uint64
  7270. Fdescriptor TFT_StreamDesc
  7271. Fpathname TFT_StreamDesc
  7272. Fread TFT_Stream_IoFunc
  7273. Fclose1 TFT_Stream_CloseFunc
  7274. Fmemory TFT_Memory
  7275. Fcursor uintptr
  7276. Flimit uintptr
  7277. }
  7278. type TFT_Pos = int64
  7279. type TFT_Vector = struct {
  7280. Fx TFT_Pos
  7281. Fy TFT_Pos
  7282. }
  7283. type TFT_Vector_ = TFT_Vector
  7284. type TFT_BBox = struct {
  7285. FxMin TFT_Pos
  7286. FyMin TFT_Pos
  7287. FxMax TFT_Pos
  7288. FyMax TFT_Pos
  7289. }
  7290. type TFT_BBox_ = TFT_BBox
  7291. type TFT_Pixel_Mode = int32
  7292. type _FT_Pixel_Mode_ = int32
  7293. const _FT_PIXEL_MODE_NONE = 0
  7294. const _FT_PIXEL_MODE_MONO = 1
  7295. const _FT_PIXEL_MODE_GRAY = 2
  7296. const _FT_PIXEL_MODE_GRAY2 = 3
  7297. const _FT_PIXEL_MODE_GRAY4 = 4
  7298. const _FT_PIXEL_MODE_LCD = 5
  7299. const _FT_PIXEL_MODE_LCD_V = 6
  7300. const _FT_PIXEL_MODE_BGRA = 7
  7301. const _FT_PIXEL_MODE_MAX = 8
  7302. type TFT_Bitmap = struct {
  7303. Frows uint32
  7304. Fwidth uint32
  7305. Fpitch int32
  7306. Fbuffer uintptr
  7307. Fnum_grays uint16
  7308. Fpixel_mode uint8
  7309. Fpalette_mode uint8
  7310. Fpalette uintptr
  7311. }
  7312. type TFT_Bitmap_ = TFT_Bitmap
  7313. type TFT_Outline = struct {
  7314. Fn_contours int16
  7315. Fn_points int16
  7316. Fpoints uintptr
  7317. Ftags uintptr
  7318. Fcontours uintptr
  7319. Fflags int32
  7320. }
  7321. type TFT_Outline_ = TFT_Outline
  7322. type TFT_Outline_MoveToFunc = uintptr
  7323. type TFT_Outline_LineToFunc = uintptr
  7324. type TFT_Outline_ConicToFunc = uintptr
  7325. type TFT_Outline_CubicToFunc = uintptr
  7326. type TFT_Outline_Funcs = struct {
  7327. Fmove_to TFT_Outline_MoveToFunc
  7328. Fline_to TFT_Outline_LineToFunc
  7329. Fconic_to TFT_Outline_ConicToFunc
  7330. Fcubic_to TFT_Outline_CubicToFunc
  7331. Fshift int32
  7332. Fdelta TFT_Pos
  7333. }
  7334. type TFT_Outline_Funcs_ = TFT_Outline_Funcs
  7335. type TFT_Glyph_Format = int32
  7336. type _FT_Glyph_Format_ = int32
  7337. const _FT_GLYPH_FORMAT_NONE = 0
  7338. const _FT_GLYPH_FORMAT_COMPOSITE = 1668246896
  7339. const _FT_GLYPH_FORMAT_BITMAP = 1651078259
  7340. const _FT_GLYPH_FORMAT_OUTLINE = 1869968492
  7341. const _FT_GLYPH_FORMAT_PLOTTER = 1886154612
  7342. const _FT_GLYPH_FORMAT_SVG = 1398163232
  7343. type TFT_Span = struct {
  7344. Fx int16
  7345. Flen1 uint16
  7346. Fcoverage uint8
  7347. }
  7348. type TFT_Span_ = TFT_Span
  7349. type TFT_SpanFunc = uintptr
  7350. type TFT_Raster_BitTest_Func = uintptr
  7351. type TFT_Raster_BitSet_Func = uintptr
  7352. type TFT_Raster_Params = struct {
  7353. Ftarget uintptr
  7354. Fsource uintptr
  7355. Fflags int32
  7356. Fgray_spans TFT_SpanFunc
  7357. Fblack_spans TFT_SpanFunc
  7358. Fbit_test TFT_Raster_BitTest_Func
  7359. Fbit_set TFT_Raster_BitSet_Func
  7360. Fuser uintptr
  7361. Fclip_box TFT_BBox
  7362. }
  7363. type TFT_Raster_Params_ = TFT_Raster_Params
  7364. type TFT_Raster = uintptr
  7365. type TFT_Raster_NewFunc = uintptr
  7366. type TFT_Raster_DoneFunc = uintptr
  7367. type TFT_Raster_ResetFunc = uintptr
  7368. type TFT_Raster_SetModeFunc = uintptr
  7369. type TFT_Raster_RenderFunc = uintptr
  7370. type TFT_Raster_Funcs = struct {
  7371. Fglyph_format TFT_Glyph_Format
  7372. Fraster_new TFT_Raster_NewFunc
  7373. Fraster_reset TFT_Raster_ResetFunc
  7374. Fraster_set_mode TFT_Raster_SetModeFunc
  7375. Fraster_render TFT_Raster_RenderFunc
  7376. Fraster_done TFT_Raster_DoneFunc
  7377. }
  7378. type TFT_Raster_Funcs_ = TFT_Raster_Funcs
  7379. type TFT_Bool = uint8
  7380. type TFT_FWord = int16
  7381. type TFT_UFWord = uint16
  7382. type TFT_Char = int8
  7383. type TFT_Byte = uint8
  7384. type TFT_Bytes = uintptr
  7385. type TFT_Tag = uint32
  7386. type TFT_String = uint8
  7387. type TFT_Short = int16
  7388. type TFT_UShort = uint16
  7389. type TFT_Int = int32
  7390. type TFT_UInt = uint32
  7391. type TFT_Long = int64
  7392. type TFT_ULong = uint64
  7393. type TFT_F2Dot14 = int16
  7394. type TFT_F26Dot6 = int64
  7395. type TFT_Fixed = int64
  7396. type TFT_Error = int32
  7397. type TFT_Pointer = uintptr
  7398. type TFT_Offset = uint64
  7399. type TFT_PtrDist = int64
  7400. type TFT_UnitVector = struct {
  7401. Fx TFT_F2Dot14
  7402. Fy TFT_F2Dot14
  7403. }
  7404. type TFT_UnitVector_ = TFT_UnitVector
  7405. type TFT_Matrix = struct {
  7406. Fxx TFT_Fixed
  7407. Fxy TFT_Fixed
  7408. Fyx TFT_Fixed
  7409. Fyy TFT_Fixed
  7410. }
  7411. type TFT_Matrix_ = TFT_Matrix
  7412. type TFT_Data = struct {
  7413. Fpointer uintptr
  7414. Flength TFT_UInt
  7415. }
  7416. type TFT_Data_ = TFT_Data
  7417. type TFT_Generic_Finalizer = uintptr
  7418. type TFT_Generic = struct {
  7419. Fdata uintptr
  7420. Ffinalizer TFT_Generic_Finalizer
  7421. }
  7422. type TFT_Generic_ = TFT_Generic
  7423. type TFT_ListNode = uintptr
  7424. type TFT_ListNodeRec_ = struct {
  7425. Fprev TFT_ListNode
  7426. Fnext TFT_ListNode
  7427. Fdata uintptr
  7428. }
  7429. type TFT_List = uintptr
  7430. type TFT_ListRec_ = struct {
  7431. Fhead TFT_ListNode
  7432. Ftail TFT_ListNode
  7433. }
  7434. type TFT_ListNodeRec = struct {
  7435. Fprev TFT_ListNode
  7436. Fnext TFT_ListNode
  7437. Fdata uintptr
  7438. }
  7439. type TFT_ListRec = struct {
  7440. Fhead TFT_ListNode
  7441. Ftail TFT_ListNode
  7442. }
  7443. const _FT_Mod_Err_Base = 0
  7444. const _FT_Mod_Err_Autofit = 0
  7445. const _FT_Mod_Err_BDF = 0
  7446. const _FT_Mod_Err_Bzip2 = 0
  7447. const _FT_Mod_Err_Cache = 0
  7448. const _FT_Mod_Err_CFF = 0
  7449. const _FT_Mod_Err_CID = 0
  7450. const _FT_Mod_Err_Gzip = 0
  7451. const _FT_Mod_Err_LZW = 0
  7452. const _FT_Mod_Err_OTvalid = 0
  7453. const _FT_Mod_Err_PCF = 0
  7454. const _FT_Mod_Err_PFR = 0
  7455. const _FT_Mod_Err_PSaux = 0
  7456. const _FT_Mod_Err_PShinter = 0
  7457. const _FT_Mod_Err_PSnames = 0
  7458. const _FT_Mod_Err_Raster = 0
  7459. const _FT_Mod_Err_SFNT = 0
  7460. const _FT_Mod_Err_Smooth = 0
  7461. const _FT_Mod_Err_TrueType = 0
  7462. const _FT_Mod_Err_Type1 = 0
  7463. const _FT_Mod_Err_Type42 = 0
  7464. const _FT_Mod_Err_Winfonts = 0
  7465. const _FT_Mod_Err_GXvalid = 0
  7466. const _FT_Mod_Err_Sdf = 0
  7467. const _FT_Mod_Err_Max = 1
  7468. const _FT_Err_Ok = 0
  7469. const _FT_Err_Cannot_Open_Resource = 1
  7470. const _FT_Err_Unknown_File_Format = 2
  7471. const _FT_Err_Invalid_File_Format = 3
  7472. const _FT_Err_Invalid_Version = 4
  7473. const _FT_Err_Lower_Module_Version = 5
  7474. const _FT_Err_Invalid_Argument = 6
  7475. const _FT_Err_Unimplemented_Feature = 7
  7476. const _FT_Err_Invalid_Table = 8
  7477. const _FT_Err_Invalid_Offset = 9
  7478. const _FT_Err_Array_Too_Large = 10
  7479. const _FT_Err_Missing_Module = 11
  7480. const _FT_Err_Missing_Property = 12
  7481. const _FT_Err_Invalid_Glyph_Index = 16
  7482. const _FT_Err_Invalid_Character_Code = 17
  7483. const _FT_Err_Invalid_Glyph_Format = 18
  7484. const _FT_Err_Cannot_Render_Glyph = 19
  7485. const _FT_Err_Invalid_Outline = 20
  7486. const _FT_Err_Invalid_Composite = 21
  7487. const _FT_Err_Too_Many_Hints = 22
  7488. const _FT_Err_Invalid_Pixel_Size = 23
  7489. const _FT_Err_Invalid_SVG_Document = 24
  7490. const _FT_Err_Invalid_Handle = 32
  7491. const _FT_Err_Invalid_Library_Handle = 33
  7492. const _FT_Err_Invalid_Driver_Handle = 34
  7493. const _FT_Err_Invalid_Face_Handle = 35
  7494. const _FT_Err_Invalid_Size_Handle = 36
  7495. const _FT_Err_Invalid_Slot_Handle = 37
  7496. const _FT_Err_Invalid_CharMap_Handle = 38
  7497. const _FT_Err_Invalid_Cache_Handle = 39
  7498. const _FT_Err_Invalid_Stream_Handle = 40
  7499. const _FT_Err_Too_Many_Drivers = 48
  7500. const _FT_Err_Too_Many_Extensions = 49
  7501. const _FT_Err_Out_Of_Memory = 64
  7502. const _FT_Err_Unlisted_Object = 65
  7503. const _FT_Err_Cannot_Open_Stream = 81
  7504. const _FT_Err_Invalid_Stream_Seek = 82
  7505. const _FT_Err_Invalid_Stream_Skip = 83
  7506. const _FT_Err_Invalid_Stream_Read = 84
  7507. const _FT_Err_Invalid_Stream_Operation = 85
  7508. const _FT_Err_Invalid_Frame_Operation = 86
  7509. const _FT_Err_Nested_Frame_Access = 87
  7510. const _FT_Err_Invalid_Frame_Read = 88
  7511. const _FT_Err_Raster_Uninitialized = 96
  7512. const _FT_Err_Raster_Corrupted = 97
  7513. const _FT_Err_Raster_Overflow = 98
  7514. const _FT_Err_Raster_Negative_Height = 99
  7515. const _FT_Err_Too_Many_Caches = 112
  7516. const _FT_Err_Invalid_Opcode = 128
  7517. const _FT_Err_Too_Few_Arguments = 129
  7518. const _FT_Err_Stack_Overflow = 130
  7519. const _FT_Err_Code_Overflow = 131
  7520. const _FT_Err_Bad_Argument = 132
  7521. const _FT_Err_Divide_By_Zero = 133
  7522. const _FT_Err_Invalid_Reference = 134
  7523. const _FT_Err_Debug_OpCode = 135
  7524. const _FT_Err_ENDF_In_Exec_Stream = 136
  7525. const _FT_Err_Nested_DEFS = 137
  7526. const _FT_Err_Invalid_CodeRange = 138
  7527. const _FT_Err_Execution_Too_Long = 139
  7528. const _FT_Err_Too_Many_Function_Defs = 140
  7529. const _FT_Err_Too_Many_Instruction_Defs = 141
  7530. const _FT_Err_Table_Missing = 142
  7531. const _FT_Err_Horiz_Header_Missing = 143
  7532. const _FT_Err_Locations_Missing = 144
  7533. const _FT_Err_Name_Table_Missing = 145
  7534. const _FT_Err_CMap_Table_Missing = 146
  7535. const _FT_Err_Hmtx_Table_Missing = 147
  7536. const _FT_Err_Post_Table_Missing = 148
  7537. const _FT_Err_Invalid_Horiz_Metrics = 149
  7538. const _FT_Err_Invalid_CharMap_Format = 150
  7539. const _FT_Err_Invalid_PPem = 151
  7540. const _FT_Err_Invalid_Vert_Metrics = 152
  7541. const _FT_Err_Could_Not_Find_Context = 153
  7542. const _FT_Err_Invalid_Post_Table_Format = 154
  7543. const _FT_Err_Invalid_Post_Table = 155
  7544. const _FT_Err_DEF_In_Glyf_Bytecode = 156
  7545. const _FT_Err_Missing_Bitmap = 157
  7546. const _FT_Err_Missing_SVG_Hooks = 158
  7547. const _FT_Err_Syntax_Error = 160
  7548. const _FT_Err_Stack_Underflow = 161
  7549. const _FT_Err_Ignore = 162
  7550. const _FT_Err_No_Unicode_Glyph_Name = 163
  7551. const _FT_Err_Glyph_Too_Big = 164
  7552. const _FT_Err_Missing_Startfont_Field = 176
  7553. const _FT_Err_Missing_Font_Field = 177
  7554. const _FT_Err_Missing_Size_Field = 178
  7555. const _FT_Err_Missing_Fontboundingbox_Field = 179
  7556. const _FT_Err_Missing_Chars_Field = 180
  7557. const _FT_Err_Missing_Startchar_Field = 181
  7558. const _FT_Err_Missing_Encoding_Field = 182
  7559. const _FT_Err_Missing_Bbx_Field = 183
  7560. const _FT_Err_Bbx_Too_Big = 184
  7561. const _FT_Err_Corrupted_Font_Header = 185
  7562. const _FT_Err_Corrupted_Font_Glyphs = 186
  7563. const _FT_Err_Max = 187
  7564. type TFT_Glyph_Metrics = struct {
  7565. Fwidth TFT_Pos
  7566. Fheight TFT_Pos
  7567. FhoriBearingX TFT_Pos
  7568. FhoriBearingY TFT_Pos
  7569. FhoriAdvance TFT_Pos
  7570. FvertBearingX TFT_Pos
  7571. FvertBearingY TFT_Pos
  7572. FvertAdvance TFT_Pos
  7573. }
  7574. type TFT_Glyph_Metrics_ = TFT_Glyph_Metrics
  7575. type TFT_Bitmap_Size = struct {
  7576. Fheight TFT_Short
  7577. Fwidth TFT_Short
  7578. Fsize TFT_Pos
  7579. Fx_ppem TFT_Pos
  7580. Fy_ppem TFT_Pos
  7581. }
  7582. type TFT_Bitmap_Size_ = TFT_Bitmap_Size
  7583. type TFT_Library = uintptr
  7584. type TFT_Module = uintptr
  7585. type TFT_Driver = uintptr
  7586. type TFT_Renderer = uintptr
  7587. type TFT_Face = uintptr
  7588. type TFT_FaceRec_ = struct {
  7589. Fnum_faces TFT_Long
  7590. Fface_index TFT_Long
  7591. Fface_flags TFT_Long
  7592. Fstyle_flags TFT_Long
  7593. Fnum_glyphs TFT_Long
  7594. Ffamily_name uintptr
  7595. Fstyle_name uintptr
  7596. Fnum_fixed_sizes TFT_Int
  7597. Favailable_sizes uintptr
  7598. Fnum_charmaps TFT_Int
  7599. Fcharmaps uintptr
  7600. Fgeneric TFT_Generic
  7601. Fbbox TFT_BBox
  7602. Funits_per_EM TFT_UShort
  7603. Fascender TFT_Short
  7604. Fdescender TFT_Short
  7605. Fheight TFT_Short
  7606. Fmax_advance_width TFT_Short
  7607. Fmax_advance_height TFT_Short
  7608. Funderline_position TFT_Short
  7609. Funderline_thickness TFT_Short
  7610. Fglyph TFT_GlyphSlot
  7611. Fsize TFT_Size
  7612. Fcharmap TFT_CharMap
  7613. Fdriver TFT_Driver
  7614. Fmemory TFT_Memory
  7615. Fstream TFT_Stream
  7616. Fsizes_list TFT_ListRec
  7617. Fautohint TFT_Generic
  7618. Fextensions uintptr
  7619. Finternal TFT_Face_Internal
  7620. }
  7621. type TFT_Size = uintptr
  7622. type TFT_SizeRec_ = struct {
  7623. Fface TFT_Face
  7624. Fgeneric TFT_Generic
  7625. Fmetrics TFT_Size_Metrics
  7626. Finternal TFT_Size_Internal
  7627. }
  7628. type TFT_GlyphSlot = uintptr
  7629. type TFT_GlyphSlotRec_ = struct {
  7630. Flibrary TFT_Library
  7631. Fface TFT_Face
  7632. Fnext TFT_GlyphSlot
  7633. Fglyph_index TFT_UInt
  7634. Fgeneric TFT_Generic
  7635. Fmetrics TFT_Glyph_Metrics
  7636. FlinearHoriAdvance TFT_Fixed
  7637. FlinearVertAdvance TFT_Fixed
  7638. Fadvance TFT_Vector
  7639. Fformat TFT_Glyph_Format
  7640. Fbitmap TFT_Bitmap
  7641. Fbitmap_left TFT_Int
  7642. Fbitmap_top TFT_Int
  7643. Foutline TFT_Outline
  7644. Fnum_subglyphs TFT_UInt
  7645. Fsubglyphs TFT_SubGlyph
  7646. Fcontrol_data uintptr
  7647. Fcontrol_len int64
  7648. Flsb_delta TFT_Pos
  7649. Frsb_delta TFT_Pos
  7650. Fother uintptr
  7651. Finternal TFT_Slot_Internal
  7652. }
  7653. type TFT_CharMap = uintptr
  7654. type TFT_CharMapRec_ = struct {
  7655. Fface TFT_Face
  7656. Fencoding TFT_Encoding
  7657. Fplatform_id TFT_UShort
  7658. Fencoding_id TFT_UShort
  7659. }
  7660. type _FT_Encoding_ = int32
  7661. const _FT_ENCODING_NONE = 0
  7662. const _FT_ENCODING_MS_SYMBOL = 1937337698
  7663. const _FT_ENCODING_UNICODE = 1970170211
  7664. const _FT_ENCODING_SJIS = 1936353651
  7665. const _FT_ENCODING_PRC = 1734484000
  7666. const _FT_ENCODING_BIG5 = 1651074869
  7667. const _FT_ENCODING_WANSUNG = 2002873971
  7668. const _FT_ENCODING_JOHAB = 1785686113
  7669. const _FT_ENCODING_GB2312 = 1734484000
  7670. const _FT_ENCODING_MS_SJIS = 1936353651
  7671. const _FT_ENCODING_MS_GB2312 = 1734484000
  7672. const _FT_ENCODING_MS_BIG5 = 1651074869
  7673. const _FT_ENCODING_MS_WANSUNG = 2002873971
  7674. const _FT_ENCODING_MS_JOHAB = 1785686113
  7675. const _FT_ENCODING_ADOBE_STANDARD = 1094995778
  7676. const _FT_ENCODING_ADOBE_EXPERT = 1094992453
  7677. const _FT_ENCODING_ADOBE_CUSTOM = 1094992451
  7678. const _FT_ENCODING_ADOBE_LATIN_1 = 1818326065
  7679. const _FT_ENCODING_OLD_LATIN_2 = 1818326066
  7680. const _FT_ENCODING_APPLE_ROMAN = 1634889070
  7681. type TFT_Encoding = int32
  7682. type TFT_CharMapRec = struct {
  7683. Fface TFT_Face
  7684. Fencoding TFT_Encoding
  7685. Fplatform_id TFT_UShort
  7686. Fencoding_id TFT_UShort
  7687. }
  7688. type TFT_Face_Internal = uintptr
  7689. type TFT_FaceRec = struct {
  7690. Fnum_faces TFT_Long
  7691. Fface_index TFT_Long
  7692. Fface_flags TFT_Long
  7693. Fstyle_flags TFT_Long
  7694. Fnum_glyphs TFT_Long
  7695. Ffamily_name uintptr
  7696. Fstyle_name uintptr
  7697. Fnum_fixed_sizes TFT_Int
  7698. Favailable_sizes uintptr
  7699. Fnum_charmaps TFT_Int
  7700. Fcharmaps uintptr
  7701. Fgeneric TFT_Generic
  7702. Fbbox TFT_BBox
  7703. Funits_per_EM TFT_UShort
  7704. Fascender TFT_Short
  7705. Fdescender TFT_Short
  7706. Fheight TFT_Short
  7707. Fmax_advance_width TFT_Short
  7708. Fmax_advance_height TFT_Short
  7709. Funderline_position TFT_Short
  7710. Funderline_thickness TFT_Short
  7711. Fglyph TFT_GlyphSlot
  7712. Fsize TFT_Size
  7713. Fcharmap TFT_CharMap
  7714. Fdriver TFT_Driver
  7715. Fmemory TFT_Memory
  7716. Fstream TFT_Stream
  7717. Fsizes_list TFT_ListRec
  7718. Fautohint TFT_Generic
  7719. Fextensions uintptr
  7720. Finternal TFT_Face_Internal
  7721. }
  7722. type TFT_Size_Internal = uintptr
  7723. type TFT_Size_Metrics = struct {
  7724. Fx_ppem TFT_UShort
  7725. Fy_ppem TFT_UShort
  7726. Fx_scale TFT_Fixed
  7727. Fy_scale TFT_Fixed
  7728. Fascender TFT_Pos
  7729. Fdescender TFT_Pos
  7730. Fheight TFT_Pos
  7731. Fmax_advance TFT_Pos
  7732. }
  7733. type TFT_Size_Metrics_ = TFT_Size_Metrics
  7734. type TFT_SizeRec = struct {
  7735. Fface TFT_Face
  7736. Fgeneric TFT_Generic
  7737. Fmetrics TFT_Size_Metrics
  7738. Finternal TFT_Size_Internal
  7739. }
  7740. type TFT_SubGlyph = uintptr
  7741. type TFT_Slot_Internal = uintptr
  7742. type TFT_GlyphSlotRec = struct {
  7743. Flibrary TFT_Library
  7744. Fface TFT_Face
  7745. Fnext TFT_GlyphSlot
  7746. Fglyph_index TFT_UInt
  7747. Fgeneric TFT_Generic
  7748. Fmetrics TFT_Glyph_Metrics
  7749. FlinearHoriAdvance TFT_Fixed
  7750. FlinearVertAdvance TFT_Fixed
  7751. Fadvance TFT_Vector
  7752. Fformat TFT_Glyph_Format
  7753. Fbitmap TFT_Bitmap
  7754. Fbitmap_left TFT_Int
  7755. Fbitmap_top TFT_Int
  7756. Foutline TFT_Outline
  7757. Fnum_subglyphs TFT_UInt
  7758. Fsubglyphs TFT_SubGlyph
  7759. Fcontrol_data uintptr
  7760. Fcontrol_len int64
  7761. Flsb_delta TFT_Pos
  7762. Frsb_delta TFT_Pos
  7763. Fother uintptr
  7764. Finternal TFT_Slot_Internal
  7765. }
  7766. type TFT_Parameter = struct {
  7767. Ftag TFT_ULong
  7768. Fdata TFT_Pointer
  7769. }
  7770. type TFT_Parameter_ = TFT_Parameter
  7771. type TFT_Open_Args = struct {
  7772. Fflags TFT_UInt
  7773. Fmemory_base uintptr
  7774. Fmemory_size TFT_Long
  7775. Fpathname uintptr
  7776. Fstream TFT_Stream
  7777. Fdriver TFT_Module
  7778. Fnum_params TFT_Int
  7779. Fparams uintptr
  7780. }
  7781. type TFT_Open_Args_ = TFT_Open_Args
  7782. type TFT_Size_Request_Type = int32
  7783. type _FT_Size_Request_Type_ = int32
  7784. const _FT_SIZE_REQUEST_TYPE_NOMINAL = 0
  7785. const _FT_SIZE_REQUEST_TYPE_REAL_DIM = 1
  7786. const _FT_SIZE_REQUEST_TYPE_BBOX = 2
  7787. const _FT_SIZE_REQUEST_TYPE_CELL = 3
  7788. const _FT_SIZE_REQUEST_TYPE_SCALES = 4
  7789. const _FT_SIZE_REQUEST_TYPE_MAX = 5
  7790. type TFT_Size_RequestRec = struct {
  7791. Ftype1 TFT_Size_Request_Type
  7792. Fwidth TFT_Long
  7793. Fheight TFT_Long
  7794. FhoriResolution TFT_UInt
  7795. FvertResolution TFT_UInt
  7796. }
  7797. type TFT_Size_RequestRec_ = TFT_Size_RequestRec
  7798. type TFT_Size_Request = uintptr
  7799. type TFT_Render_Mode = int32
  7800. type _FT_Render_Mode_ = int32
  7801. const _FT_RENDER_MODE_NORMAL = 0
  7802. const _FT_RENDER_MODE_LIGHT = 1
  7803. const _FT_RENDER_MODE_MONO = 2
  7804. const _FT_RENDER_MODE_LCD = 3
  7805. const _FT_RENDER_MODE_LCD_V = 4
  7806. const _FT_RENDER_MODE_SDF = 5
  7807. const _FT_RENDER_MODE_MAX = 6
  7808. type TFT_Kerning_Mode = int32
  7809. type _FT_Kerning_Mode_ = int32
  7810. const _FT_KERNING_DEFAULT = 0
  7811. const _FT_KERNING_UNFITTED = 1
  7812. const _FT_KERNING_UNSCALED = 2
  7813. type Tstat = struct {
  7814. Fst_dev Tdev_t
  7815. Fst_ino Tino_t
  7816. Fst_mode Tmode_t
  7817. Fst_nlink Tnlink_t
  7818. Fst_uid Tuid_t
  7819. Fst_gid Tgid_t
  7820. Fst_rdev Tdev_t
  7821. F__pad uint64
  7822. Fst_size Toff_t
  7823. Fst_blksize Tblksize_t
  7824. F__pad2 int32
  7825. Fst_blocks Tblkcnt_t
  7826. Fst_atim Ttimespec
  7827. Fst_mtim Ttimespec
  7828. Fst_ctim Ttimespec
  7829. F__unused [2]uint32
  7830. }
  7831. type Tstatx_timestamp = struct {
  7832. Ftv_sec Tint64_t
  7833. Ftv_nsec Tuint32_t
  7834. F__pad Tuint32_t
  7835. }
  7836. type Tstatx = struct {
  7837. Fstx_mask Tuint32_t
  7838. Fstx_blksize Tuint32_t
  7839. Fstx_attributes Tuint64_t
  7840. Fstx_nlink Tuint32_t
  7841. Fstx_uid Tuint32_t
  7842. Fstx_gid Tuint32_t
  7843. Fstx_mode Tuint16_t
  7844. F__pad0 [1]Tuint16_t
  7845. Fstx_ino Tuint64_t
  7846. Fstx_size Tuint64_t
  7847. Fstx_blocks Tuint64_t
  7848. Fstx_attributes_mask Tuint64_t
  7849. Fstx_atime Tstatx_timestamp
  7850. Fstx_btime Tstatx_timestamp
  7851. Fstx_ctime Tstatx_timestamp
  7852. Fstx_mtime Tstatx_timestamp
  7853. Fstx_rdev_major Tuint32_t
  7854. Fstx_rdev_minor Tuint32_t
  7855. Fstx_dev_major Tuint32_t
  7856. Fstx_dev_minor Tuint32_t
  7857. F__pad1 [14]Tuint64_t
  7858. }
  7859. type TFcChar8 = uint8
  7860. type TFcChar16 = uint16
  7861. type TFcChar32 = uint32
  7862. type TFcBool = int32
  7863. type TFcType = int32
  7864. type __FcType = int32
  7865. const _FcTypeUnknown = -1
  7866. const _FcTypeVoid = 0
  7867. const _FcTypeInteger = 1
  7868. const _FcTypeDouble = 2
  7869. const _FcTypeString = 3
  7870. const _FcTypeBool = 4
  7871. const _FcTypeMatrix = 5
  7872. const _FcTypeCharSet = 6
  7873. const _FcTypeFTFace = 7
  7874. const _FcTypeLangSet = 8
  7875. const _FcTypeRange = 9
  7876. type TFcMatrix = struct {
  7877. Fxx float64
  7878. Fxy float64
  7879. Fyx float64
  7880. Fyy float64
  7881. }
  7882. type T_FcMatrix = TFcMatrix
  7883. type TFcObjectType = struct {
  7884. Fobject uintptr
  7885. Ftype1 TFcType
  7886. }
  7887. type T_FcObjectType = TFcObjectType
  7888. type TFcConstant = struct {
  7889. Fname uintptr
  7890. Fobject uintptr
  7891. Fvalue int32
  7892. }
  7893. type T_FcConstant = TFcConstant
  7894. type TFcResult = int32
  7895. type __FcResult = int32
  7896. const _FcResultMatch = 0
  7897. const _FcResultNoMatch = 1
  7898. const _FcResultTypeMismatch = 2
  7899. const _FcResultNoId = 3
  7900. const _FcResultOutOfMemory = 4
  7901. type TFcValueBinding = int32
  7902. type __FcValueBinding = int32
  7903. const _FcValueBindingWeak = 0
  7904. const _FcValueBindingStrong = 1
  7905. const _FcValueBindingSame = 2
  7906. const _FcValueBindingEnd = 2147483647
  7907. type TFcPatternIter = struct {
  7908. Fdummy1 uintptr
  7909. Fdummy2 uintptr
  7910. }
  7911. type T_FcPatternIter = TFcPatternIter
  7912. type TFcValue = struct {
  7913. Ftype1 TFcType
  7914. Fu struct {
  7915. Fi [0]int32
  7916. Fb [0]TFcBool
  7917. Fd [0]float64
  7918. Fm [0]uintptr
  7919. Fc [0]uintptr
  7920. Ff [0]uintptr
  7921. Fl [0]uintptr
  7922. Fr [0]uintptr
  7923. Fs uintptr
  7924. }
  7925. }
  7926. type T_FcValue = TFcValue
  7927. type TFcFontSet = struct {
  7928. Fnfont int32
  7929. Fsfont int32
  7930. Ffonts uintptr
  7931. }
  7932. type T_FcFontSet = TFcFontSet
  7933. type TFcObjectSet = struct {
  7934. Fnobject int32
  7935. Fsobject int32
  7936. Fobjects uintptr
  7937. }
  7938. type T_FcObjectSet = TFcObjectSet
  7939. type TFcMatchKind = int32
  7940. type __FcMatchKind = int32
  7941. const _FcMatchPattern = 0
  7942. const _FcMatchFont = 1
  7943. const _FcMatchScan = 2
  7944. const _FcMatchKindEnd = 3
  7945. const _FcMatchKindBegin = 0
  7946. type TFcLangResult = int32
  7947. type __FcLangResult = int32
  7948. const _FcLangEqual = 0
  7949. const _FcLangDifferentCountry = 1
  7950. const _FcLangDifferentTerritory = 1
  7951. const _FcLangDifferentLang = 2
  7952. type TFcSetName = int32
  7953. type __FcSetName = int32
  7954. const _FcSetSystem = 0
  7955. const _FcSetApplication = 1
  7956. type TFcConfigFileInfoIter = struct {
  7957. Fdummy1 uintptr
  7958. Fdummy2 uintptr
  7959. Fdummy3 uintptr
  7960. }
  7961. type T_FcConfigFileInfoIter = TFcConfigFileInfoIter
  7962. type TFcEndian = int32
  7963. const _FcEndianBig = 0
  7964. const _FcEndianLittle = 1
  7965. type Tpointer = uintptr
  7966. type TClientPtr = uintptr
  7967. type TFontPtr = uintptr
  7968. type TFSID = uint64
  7969. type TAccContext = uint64
  7970. type TOSTimePtr = uintptr
  7971. type TBlockHandlerProcPtr = uintptr
  7972. type TGlyph = uint64
  7973. type TGlyphSet = uint64
  7974. type TPicture = uint64
  7975. type TPictFormat = uint64
  7976. type TXRenderDirectFormat = struct {
  7977. Fred int16
  7978. FredMask int16
  7979. Fgreen int16
  7980. FgreenMask int16
  7981. Fblue int16
  7982. FblueMask int16
  7983. Falpha int16
  7984. FalphaMask int16
  7985. }
  7986. type TXRenderPictFormat = struct {
  7987. Fid TPictFormat
  7988. Ftype1 int32
  7989. Fdepth int32
  7990. Fdirect TXRenderDirectFormat
  7991. Fcolormap TColormap
  7992. }
  7993. type TXRenderPictureAttributes = struct {
  7994. Frepeat int32
  7995. Falpha_map TPicture
  7996. Falpha_x_origin int32
  7997. Falpha_y_origin int32
  7998. Fclip_x_origin int32
  7999. Fclip_y_origin int32
  8000. Fclip_mask TPixmap
  8001. Fgraphics_exposures int32
  8002. Fsubwindow_mode int32
  8003. Fpoly_edge int32
  8004. Fpoly_mode int32
  8005. Fdither TAtom
  8006. Fcomponent_alpha int32
  8007. }
  8008. type T_XRenderPictureAttributes = TXRenderPictureAttributes
  8009. type TXRenderColor = struct {
  8010. Fred uint16
  8011. Fgreen uint16
  8012. Fblue uint16
  8013. Falpha uint16
  8014. }
  8015. type TXGlyphInfo = struct {
  8016. Fwidth uint16
  8017. Fheight uint16
  8018. Fx int16
  8019. Fy int16
  8020. FxOff int16
  8021. FyOff int16
  8022. }
  8023. type T_XGlyphInfo = TXGlyphInfo
  8024. type TXGlyphElt8 = struct {
  8025. Fglyphset TGlyphSet
  8026. Fchars uintptr
  8027. Fnchars int32
  8028. FxOff int32
  8029. FyOff int32
  8030. }
  8031. type T_XGlyphElt8 = TXGlyphElt8
  8032. type TXGlyphElt16 = struct {
  8033. Fglyphset TGlyphSet
  8034. Fchars uintptr
  8035. Fnchars int32
  8036. FxOff int32
  8037. FyOff int32
  8038. }
  8039. type T_XGlyphElt16 = TXGlyphElt16
  8040. type TXGlyphElt32 = struct {
  8041. Fglyphset TGlyphSet
  8042. Fchars uintptr
  8043. Fnchars int32
  8044. FxOff int32
  8045. FyOff int32
  8046. }
  8047. type T_XGlyphElt32 = TXGlyphElt32
  8048. type TXDouble = float64
  8049. type TXPointDouble = struct {
  8050. Fx TXDouble
  8051. Fy TXDouble
  8052. }
  8053. type T_XPointDouble = TXPointDouble
  8054. type TXFixed = int32
  8055. type TXPointFixed = struct {
  8056. Fx TXFixed
  8057. Fy TXFixed
  8058. }
  8059. type T_XPointFixed = TXPointFixed
  8060. type TXLineFixed = struct {
  8061. Fp1 TXPointFixed
  8062. Fp2 TXPointFixed
  8063. }
  8064. type T_XLineFixed = TXLineFixed
  8065. type TXTriangle = struct {
  8066. Fp1 TXPointFixed
  8067. Fp2 TXPointFixed
  8068. Fp3 TXPointFixed
  8069. }
  8070. type T_XTriangle = TXTriangle
  8071. type TXCircle = struct {
  8072. Fx TXFixed
  8073. Fy TXFixed
  8074. Fradius TXFixed
  8075. }
  8076. type T_XCircle = TXCircle
  8077. type TXTrapezoid = struct {
  8078. Ftop TXFixed
  8079. Fbottom TXFixed
  8080. Fleft TXLineFixed
  8081. Fright TXLineFixed
  8082. }
  8083. type T_XTrapezoid = TXTrapezoid
  8084. type TXTransform = struct {
  8085. Fmatrix [3][3]TXFixed
  8086. }
  8087. type T_XTransform = TXTransform
  8088. type TXFilters = struct {
  8089. Fnfilter int32
  8090. Ffilter uintptr
  8091. Fnalias int32
  8092. Falias uintptr
  8093. }
  8094. type T_XFilters = TXFilters
  8095. type TXIndexValue = struct {
  8096. Fpixel uint64
  8097. Fred uint16
  8098. Fgreen uint16
  8099. Fblue uint16
  8100. Falpha uint16
  8101. }
  8102. type T_XIndexValue = TXIndexValue
  8103. type TXAnimCursor = struct {
  8104. Fcursor TCursor
  8105. Fdelay uint64
  8106. }
  8107. type T_XAnimCursor = TXAnimCursor
  8108. type TXSpanFix = struct {
  8109. Fleft TXFixed
  8110. Fright TXFixed
  8111. Fy TXFixed
  8112. }
  8113. type T_XSpanFix = TXSpanFix
  8114. type TXTrap = struct {
  8115. Ftop TXSpanFix
  8116. Fbottom TXSpanFix
  8117. }
  8118. type T_XTrap = TXTrap
  8119. type TXLinearGradient = struct {
  8120. Fp1 TXPointFixed
  8121. Fp2 TXPointFixed
  8122. }
  8123. type T_XLinearGradient = TXLinearGradient
  8124. type TXRadialGradient = struct {
  8125. Finner TXCircle
  8126. Fouter TXCircle
  8127. }
  8128. type T_XRadialGradient = TXRadialGradient
  8129. type TXConicalGradient = struct {
  8130. Fcenter TXPointFixed
  8131. Fangle TXFixed
  8132. }
  8133. type T_XConicalGradient = TXConicalGradient
  8134. type TXftFontInfo = struct {
  8135. Fhash TFcChar32
  8136. Ffile uintptr
  8137. Fxsize TFT_F26Dot6
  8138. Fysize TFT_F26Dot6
  8139. Fantialias TFcBool
  8140. Fembolden TFcBool
  8141. Fcolor TFcBool
  8142. Frgba int32
  8143. Flcd_filter int32
  8144. Fmatrix TFT_Matrix
  8145. Ftransform TFcBool
  8146. Fload_flags TFT_Int
  8147. Frender TFcBool
  8148. Fspacing int32
  8149. Fminspace TFcBool
  8150. Fchar_width int32
  8151. }
  8152. type T_XftFontInfo = TXftFontInfo
  8153. type TXftFont = struct {
  8154. Fascent int32
  8155. Fdescent int32
  8156. Fheight int32
  8157. Fmax_advance_width int32
  8158. Fcharset uintptr
  8159. Fpattern uintptr
  8160. }
  8161. type T_XftFont = TXftFont
  8162. type TXftDraw = struct {
  8163. Fdpy uintptr
  8164. Fscreen int32
  8165. Fbits_per_pixel uint32
  8166. Fdepth uint32
  8167. Fdrawable TDrawable
  8168. Fvisual uintptr
  8169. Fcolormap TColormap
  8170. Fclip_type TXftClipType
  8171. Fclip TXftClip
  8172. Fsubwindow_mode int32
  8173. Frender struct {
  8174. Fpict TPicture
  8175. }
  8176. Fcore struct {
  8177. Fgc TGC
  8178. Fuse_pixmap int32
  8179. }
  8180. }
  8181. type T_XftDraw = TXftDraw
  8182. type __XftClipType = int32
  8183. const _XftClipTypeNone = 0
  8184. const _XftClipTypeRegion = 1
  8185. const _XftClipTypeRectangles = 2
  8186. type TXftColor = struct {
  8187. Fpixel uint64
  8188. Fcolor TXRenderColor
  8189. }
  8190. type T_XftColor = TXftColor
  8191. type TXftCharSpec = struct {
  8192. Fucs4 TFcChar32
  8193. Fx int16
  8194. Fy int16
  8195. }
  8196. type T_XftCharSpec = TXftCharSpec
  8197. type TXftCharFontSpec = struct {
  8198. Ffont uintptr
  8199. Fucs4 TFcChar32
  8200. Fx int16
  8201. Fy int16
  8202. }
  8203. type T_XftCharFontSpec = TXftCharFontSpec
  8204. type TXftGlyphSpec = struct {
  8205. Fglyph TFT_UInt
  8206. Fx int16
  8207. Fy int16
  8208. }
  8209. type T_XftGlyphSpec = TXftGlyphSpec
  8210. type TXftGlyphFontSpec = struct {
  8211. Ffont uintptr
  8212. Fglyph TFT_UInt
  8213. Fx int16
  8214. Fy int16
  8215. }
  8216. type T_XftGlyphFontSpec = TXftGlyphFontSpec
  8217. type TXftMatcher = struct {
  8218. Fobject uintptr
  8219. Fcompare uintptr
  8220. }
  8221. type T_XftMatcher = TXftMatcher
  8222. type TXftSymbolic = struct {
  8223. Fname uintptr
  8224. Fvalue int32
  8225. }
  8226. type T_XftSymbolic = TXftSymbolic
  8227. type TXftGlyph = struct {
  8228. Fmetrics TXGlyphInfo
  8229. Fbitmap uintptr
  8230. Fglyph_memory uint64
  8231. Fpicture TPicture
  8232. }
  8233. type T_XftGlyph = TXftGlyph
  8234. type TXftGlyphUsage = struct {
  8235. Fcontents TXftGlyph
  8236. Fnewer TFT_UInt
  8237. Folder TFT_UInt
  8238. }
  8239. type T_XftGlyphUsage = TXftGlyphUsage
  8240. type TXftUcsHash = struct {
  8241. Fucs4 TFcChar32
  8242. Fglyph TFT_UInt
  8243. }
  8244. type T_XftUcsHash = TXftUcsHash
  8245. type TXftFtFile = struct {
  8246. Fnext uintptr
  8247. Fref int32
  8248. Ffile uintptr
  8249. Fid int32
  8250. Fxsize TFT_F26Dot6
  8251. Fysize TFT_F26Dot6
  8252. Fmatrix TFT_Matrix
  8253. Flock int32
  8254. Fface TFT_Face
  8255. }
  8256. type T_XftFtFile = TXftFtFile
  8257. type TXftFontInt = struct {
  8258. Fpublic TXftFont
  8259. Fnext uintptr
  8260. Fhash_next uintptr
  8261. Finfo TXftFontInfo
  8262. Fref int32
  8263. Fglyphs uintptr
  8264. Fnum_glyphs TFT_UInt
  8265. Fhash_table uintptr
  8266. Fhash_value int32
  8267. Frehash_value int32
  8268. Fglyphset TGlyphSet
  8269. Fformat uintptr
  8270. Fglyph_memory uint64
  8271. Fmax_glyph_memory uint64
  8272. Fsizeof_glyph uint32
  8273. Fnewest TFT_UInt
  8274. Ftotal_inuse TFT_UInt
  8275. Ftrack_mem_usage TFcBool
  8276. Fuse_free_glyphs TFcBool
  8277. }
  8278. type T_XftFontInt = TXftFontInt
  8279. type TXftClipType = int32
  8280. type TXftClipRect = struct {
  8281. FxOrigin int32
  8282. FyOrigin int32
  8283. Fn int32
  8284. }
  8285. type T_XftClipRect = TXftClipRect
  8286. type TXftClip = struct {
  8287. Fregion [0]TRegion
  8288. Frect uintptr
  8289. }
  8290. type T_XftClip = TXftClip
  8291. type TXftSolidColor = struct {
  8292. Fcolor TXRenderColor
  8293. Fscreen int32
  8294. Fpict TPicture
  8295. }
  8296. type T_XftSolidColor = TXftSolidColor
  8297. type TXftDisplayInfo = struct {
  8298. Fnext uintptr
  8299. Fdisplay uintptr
  8300. Fcodes uintptr
  8301. Fdefaults uintptr
  8302. FhasRender TFcBool
  8303. FhasSolid TFcBool
  8304. Ffonts uintptr
  8305. FsolidFormat uintptr
  8306. Fglyph_memory uint64
  8307. Fmax_glyph_memory uint64
  8308. Ftrack_mem_usage TFcBool
  8309. Fuse_free_glyphs TFcBool
  8310. Fnum_unref_fonts int32
  8311. Fmax_unref_fonts int32
  8312. Fcolors [16]TXftSolidColor
  8313. FfontHash [127]uintptr
  8314. }
  8315. type T_XftDisplayInfo = TXftDisplayInfo
  8316. type TXFT_MEM_KIND = int32
  8317. const _XFT_MEM_DRAW = 0
  8318. const _XFT_MEM_FONT = 1
  8319. const _XFT_MEM_FILE = 2
  8320. const _XFT_MEM_GLYPH = 3
  8321. const _XFT_MEM_NUM = 4
  8322. /* xftxlfd.c */
  8323. func XXftColorAllocName(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, name uintptr, result uintptr) (r int32) {
  8324. bp := tls.Alloc(32)
  8325. defer tls.Free(32)
  8326. var _ /* exact at bp+16 */ TXColor
  8327. var _ /* screen at bp+0 */ TXColor
  8328. if !(libx11.XXAllocNamedColor(tls, dpy, cmap, name, bp, bp+16) != 0) {
  8329. /* XXX stick standard colormap stuff here */
  8330. return m_False
  8331. }
  8332. (*TXftColor)(unsafe.Pointer(result)).Fpixel = (*(*TXColor)(unsafe.Pointer(bp))).Fpixel
  8333. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fred = (*(*TXColor)(unsafe.Pointer(bp + 16))).Fred
  8334. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fgreen = (*(*TXColor)(unsafe.Pointer(bp + 16))).Fgreen
  8335. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fblue = (*(*TXColor)(unsafe.Pointer(bp + 16))).Fblue
  8336. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Falpha = uint16(0xffff)
  8337. return int32(m_True)
  8338. }
  8339. func _maskbase(tls *libc.TLS, m uint64) (r int16) {
  8340. var i int16
  8341. _ = i
  8342. if !(m != 0) {
  8343. return 0
  8344. }
  8345. i = 0
  8346. for !(m&libc.Uint64FromInt32(1) != 0) {
  8347. m >>= uint64(1)
  8348. i++
  8349. }
  8350. return i
  8351. }
  8352. func _masklen(tls *libc.TLS, m uint64) (r int16) {
  8353. var y uint64
  8354. _ = y
  8355. y = m >> int32(1) & uint64(033333333333)
  8356. y = m - y - y>>int32(1)&uint64(033333333333)
  8357. return libc.Int16FromUint64((y + y>>libc.Int32FromInt32(3)) & libc.Uint64FromUint32(030707070707) % libc.Uint64FromInt32(077))
  8358. }
  8359. func XXftColorAllocValue(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, color uintptr, result uintptr) (r int32) {
  8360. bp := tls.Alloc(16)
  8361. defer tls.Free(16)
  8362. var blue_len, blue_shift, green_len, green_shift, red_len, red_shift int32
  8363. var _ /* xcolor at bp+0 */ TXColor
  8364. _, _, _, _, _, _ = blue_len, blue_shift, green_len, green_shift, red_len, red_shift
  8365. if (*TVisual)(unsafe.Pointer(visual)).Fclass == int32(m_TrueColor) {
  8366. red_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fred_mask))
  8367. red_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fred_mask))
  8368. green_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fgreen_mask))
  8369. green_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fgreen_mask))
  8370. blue_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fblue_mask))
  8371. blue_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fblue_mask))
  8372. (*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)
  8373. } else {
  8374. (*(*TXColor)(unsafe.Pointer(bp))).Fred = (*TXRenderColor)(unsafe.Pointer(color)).Fred
  8375. (*(*TXColor)(unsafe.Pointer(bp))).Fgreen = (*TXRenderColor)(unsafe.Pointer(color)).Fgreen
  8376. (*(*TXColor)(unsafe.Pointer(bp))).Fblue = (*TXRenderColor)(unsafe.Pointer(color)).Fblue
  8377. if !(libx11.XXAllocColor(tls, dpy, cmap, bp) != 0) {
  8378. return m_False
  8379. }
  8380. (*TXftColor)(unsafe.Pointer(result)).Fpixel = (*(*TXColor)(unsafe.Pointer(bp))).Fpixel
  8381. }
  8382. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fred = (*TXRenderColor)(unsafe.Pointer(color)).Fred
  8383. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fgreen = (*TXRenderColor)(unsafe.Pointer(color)).Fgreen
  8384. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fblue = (*TXRenderColor)(unsafe.Pointer(color)).Fblue
  8385. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Falpha = (*TXRenderColor)(unsafe.Pointer(color)).Falpha
  8386. return int32(m_True)
  8387. }
  8388. func XXftColorFree(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, color uintptr) {
  8389. if (*TVisual)(unsafe.Pointer(visual)).Fclass != int32(m_TrueColor) {
  8390. libx11.XXFreeColors(tls, dpy, cmap, color, int32(1), uint64(0))
  8391. }
  8392. }
  8393. type Tfuncs = struct {
  8394. Fcreate_image uintptr
  8395. Fdestroy_image uintptr
  8396. Fget_pixel uintptr
  8397. Fput_pixel uintptr
  8398. Fsub_image uintptr
  8399. Fadd_pixel uintptr
  8400. }
  8401. const m_NUM_LOCAL = 1024
  8402. /* xftxlfd.c */
  8403. func XXftRectCore(tls *libc.TLS, draw uintptr, color uintptr, x int32, y int32, width uint32, height uint32) {
  8404. if libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >= int32(0x8000) {
  8405. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  8406. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, x, y, width, height)
  8407. }
  8408. }
  8409. /*
  8410. * Use the core protocol to draw the glyphs
  8411. */
  8412. func __XftSharpGlyphMono(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8413. var bits, bitsMask uint8
  8414. var height, lenspan, stride, w, width, xspan, v1 int32
  8415. var src, srcLine, v2, v3, v4 uintptr
  8416. _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, bitsMask, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8417. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8418. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8419. stride = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  8420. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8421. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8422. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8423. for {
  8424. v1 = height
  8425. height--
  8426. if !(v1 != 0) {
  8427. break
  8428. }
  8429. src = srcLine
  8430. srcLine += uintptr(stride)
  8431. w = width
  8432. bitsMask = uint8(0x80) /* FreeType is always MSB first */
  8433. v2 = src
  8434. src++
  8435. bits = *(*uint8)(unsafe.Pointer(v2))
  8436. xspan = x
  8437. for w != 0 {
  8438. if libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0 {
  8439. lenspan = 0
  8440. for cond := true; cond; cond = libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0 {
  8441. lenspan++
  8442. if lenspan == w {
  8443. break
  8444. }
  8445. bitsMask = libc.Uint8FromInt32(libc.Int32FromUint8(bitsMask) >> int32(1))
  8446. if !(bitsMask != 0) {
  8447. v3 = src
  8448. src++
  8449. bits = *(*uint8)(unsafe.Pointer(v3))
  8450. bitsMask = uint8(0x80)
  8451. }
  8452. }
  8453. 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))
  8454. xspan += lenspan
  8455. w -= lenspan
  8456. } else {
  8457. for cond := true; cond; cond = !(libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0) {
  8458. w--
  8459. xspan++
  8460. if !(w != 0) {
  8461. break
  8462. }
  8463. bitsMask = libc.Uint8FromInt32(libc.Int32FromUint8(bitsMask) >> int32(1))
  8464. if !(bitsMask != 0) {
  8465. v4 = src
  8466. src++
  8467. bits = *(*uint8)(unsafe.Pointer(v4))
  8468. bitsMask = uint8(0x80)
  8469. }
  8470. }
  8471. }
  8472. }
  8473. y++
  8474. }
  8475. }
  8476. // C documentation
  8477. //
  8478. // /*
  8479. // * Draw solid color text from an anti-aliased bitmap. This is a
  8480. // * fallback for cases where a particular drawable has no AA code
  8481. // */
  8482. func __XftSharpGlyphGray(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8483. var bits uint8
  8484. var height, lenspan, stride, w, width, xspan, v1 int32
  8485. var src, srcLine, v2, v3, v4 uintptr
  8486. _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8487. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8488. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8489. stride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8490. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8491. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8492. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8493. for {
  8494. v1 = height
  8495. height--
  8496. if !(v1 != 0) {
  8497. break
  8498. }
  8499. src = srcLine
  8500. srcLine += uintptr(stride)
  8501. w = width
  8502. v2 = src
  8503. src++
  8504. bits = *(*uint8)(unsafe.Pointer(v2))
  8505. xspan = x
  8506. for w != 0 {
  8507. if libc.Int32FromUint8(bits) >= int32(0x80) {
  8508. lenspan = 0
  8509. for cond := true; cond; cond = libc.Int32FromUint8(bits) >= int32(0x80) {
  8510. lenspan++
  8511. if lenspan == w {
  8512. break
  8513. }
  8514. v3 = src
  8515. src++
  8516. bits = *(*uint8)(unsafe.Pointer(v3))
  8517. }
  8518. 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))
  8519. xspan += lenspan
  8520. w -= lenspan
  8521. } else {
  8522. for cond := true; cond; cond = libc.Int32FromUint8(bits) < int32(0x80) {
  8523. w--
  8524. xspan++
  8525. if !(w != 0) {
  8526. break
  8527. }
  8528. v4 = src
  8529. src++
  8530. bits = *(*uint8)(unsafe.Pointer(v4))
  8531. }
  8532. }
  8533. }
  8534. y++
  8535. }
  8536. }
  8537. func __XftSharpGlyphRgba(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8538. var bits TCARD32
  8539. var height, lenspan, stride, w, width, xspan, v1 int32
  8540. var src, srcLine, v2, v3, v4 uintptr
  8541. _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8542. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8543. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8544. stride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8545. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8546. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8547. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8548. for {
  8549. v1 = height
  8550. height--
  8551. if !(v1 != 0) {
  8552. break
  8553. }
  8554. src = srcLine
  8555. srcLine += uintptr(stride) * 4
  8556. w = width
  8557. v2 = src
  8558. src += 4
  8559. bits = *(*TCARD32)(unsafe.Pointer(v2))
  8560. xspan = x
  8561. for w != 0 {
  8562. if bits >= uint32(0x80000000) {
  8563. lenspan = 0
  8564. for cond := true; cond; cond = bits >= uint32(0x80000000) {
  8565. lenspan++
  8566. if lenspan == w {
  8567. break
  8568. }
  8569. v3 = src
  8570. src += 4
  8571. bits = *(*TCARD32)(unsafe.Pointer(v3))
  8572. }
  8573. 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))
  8574. xspan += lenspan
  8575. w -= lenspan
  8576. } else {
  8577. for cond := true; cond; cond = bits < uint32(0x80000000) {
  8578. w--
  8579. xspan++
  8580. if !(w != 0) {
  8581. break
  8582. }
  8583. v4 = src
  8584. src += 4
  8585. bits = *(*TCARD32)(unsafe.Pointer(v4))
  8586. }
  8587. }
  8588. }
  8589. y++
  8590. }
  8591. }
  8592. type TXftSharpGlyph = uintptr
  8593. func __XftSharpGlyphFind(tls *libc.TLS, draw uintptr, public uintptr) (r TXftSharpGlyph) {
  8594. var font uintptr
  8595. _ = font
  8596. font = public
  8597. if !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0) {
  8598. return __ccgo_fp(__XftSharpGlyphMono)
  8599. } else {
  8600. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  8601. case int32(m_FC_RGBA_RGB):
  8602. fallthrough
  8603. case int32(m_FC_RGBA_BGR):
  8604. fallthrough
  8605. case int32(m_FC_RGBA_VRGB):
  8606. fallthrough
  8607. case int32(m_FC_RGBA_VBGR):
  8608. return __ccgo_fp(__XftSharpGlyphRgba)
  8609. default:
  8610. return __ccgo_fp(__XftSharpGlyphGray)
  8611. }
  8612. }
  8613. return r
  8614. }
  8615. /*
  8616. * Draw glyphs to a target that supports anti-aliasing
  8617. */
  8618. /*
  8619. * Primitives for converting between RGB values and TrueColor pixels
  8620. */
  8621. func __XftExamineBitfield(tls *libc.TLS, mask uint64, shift uintptr, len1 uintptr) {
  8622. var l, s int32
  8623. _, _ = l, s
  8624. s = 0
  8625. for mask&uint64(1) == uint64(0) {
  8626. mask >>= uint64(1)
  8627. s++
  8628. }
  8629. l = 0
  8630. for mask&uint64(1) == uint64(1) {
  8631. mask >>= uint64(1)
  8632. l++
  8633. }
  8634. *(*int32)(unsafe.Pointer(shift)) = s
  8635. *(*int32)(unsafe.Pointer(len1)) = l
  8636. }
  8637. func __XftGetField(tls *libc.TLS, l_pixel uint64, shift int32, len1 int32) (r TCARD32) {
  8638. var pixel TCARD32
  8639. _ = pixel
  8640. pixel = uint32(l_pixel)
  8641. pixel = pixel & libc.Uint32FromInt32((libc.Int32FromInt32(1)<<len1-libc.Int32FromInt32(1))<<shift)
  8642. pixel = pixel << (int32(32) - (shift + len1)) >> int32(24)
  8643. for len1 < int32(8) {
  8644. pixel |= pixel >> len1
  8645. len1 <<= int32(1)
  8646. }
  8647. return pixel
  8648. }
  8649. func __XftPutField(tls *libc.TLS, pixel TCARD32, shift int32, len1 int32) (r uint64) {
  8650. var l_pixel uint64
  8651. _ = l_pixel
  8652. l_pixel = uint64(pixel)
  8653. shift = shift - (int32(8) - len1)
  8654. if len1 <= int32(8) {
  8655. l_pixel = l_pixel & libc.Uint64FromInt32((libc.Int32FromInt32(1)<<len1-libc.Int32FromInt32(1))<<(libc.Int32FromInt32(8)-len1))
  8656. }
  8657. if shift < 0 {
  8658. l_pixel >>= libc.Uint64FromInt32(-shift)
  8659. } else {
  8660. l_pixel <<= libc.Uint64FromInt32(shift)
  8661. }
  8662. return l_pixel
  8663. }
  8664. // C documentation
  8665. //
  8666. // /*
  8667. // * This is used when doing XftCharFontSpec/XftGlyphFontSpec where
  8668. // * some of the fonts are bitmaps and some are anti-aliased to handle
  8669. // * the bitmap portions
  8670. // */
  8671. func __XftSmoothGlyphMono(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8672. bp := tls.Alloc(32)
  8673. defer tls.Free(32)
  8674. var bits, bitsMask uint8
  8675. var height, stride, w, width, xspan, v1, v3 int32
  8676. var pixel uint64
  8677. var src, srcLine, v2, v4 uintptr
  8678. var _ /* b_len at bp+20 */ int32
  8679. var _ /* b_shift at bp+16 */ int32
  8680. var _ /* g_len at bp+12 */ int32
  8681. var _ /* g_shift at bp+8 */ int32
  8682. var _ /* r_len at bp+4 */ int32
  8683. var _ /* r_shift at bp+0 */ int32
  8684. _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, bitsMask, height, pixel, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8685. srcLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8686. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8687. stride = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  8688. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8689. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  8690. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  8691. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  8692. 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)))
  8693. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8694. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8695. for {
  8696. v1 = height
  8697. height--
  8698. if !(v1 != 0) {
  8699. break
  8700. }
  8701. src = srcLine
  8702. srcLine += uintptr(stride)
  8703. w = width
  8704. bitsMask = uint8(0x80) /* FreeType is always MSB first */
  8705. v2 = src
  8706. src++
  8707. bits = *(*uint8)(unsafe.Pointer(v2))
  8708. xspan = x
  8709. for {
  8710. v3 = w
  8711. w--
  8712. if !(v3 != 0) {
  8713. break
  8714. }
  8715. if libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0 {
  8716. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, xspan, y, pixel)
  8717. }
  8718. bitsMask = libc.Uint8FromInt32(libc.Int32FromUint8(bitsMask) >> int32(1))
  8719. if !(bitsMask != 0) {
  8720. v4 = src
  8721. src++
  8722. bits = *(*uint8)(unsafe.Pointer(v4))
  8723. bitsMask = uint8(0x80)
  8724. }
  8725. xspan++
  8726. }
  8727. y++
  8728. }
  8729. }
  8730. /*
  8731. * As simple anti-aliasing is likely to be common, there are three
  8732. * optimized versions for the usual true color pixel formats (888, 565, 555).
  8733. * Other formats are handled by the general case
  8734. */
  8735. /*
  8736. * There are two ways of handling alpha -- either as a single unified value or
  8737. * a separate value for each component, hence each macro must have two
  8738. * versions. The unified alpha version has a 'U' at the end of the name,
  8739. * the component version has a 'C'. Similarly, functions which deal with
  8740. * this difference will have two versions using the same convention.
  8741. */
  8742. func _fbOver24(tls *libc.TLS, x TCARD32, y TCARD32) (r TCARD32) {
  8743. var a, t TCARD16
  8744. var m, n, o TCARD32
  8745. _, _, _, _, _ = a, m, n, o, t
  8746. a = uint16(^x >> libc.Int32FromInt32(24))
  8747. t = uint16(0)
  8748. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(y>>libc.Int32FromInt32(0))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8749. t = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8))) + libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(0)))))
  8750. m = uint32(libc.Uint8FromInt32(libc.Int32FromUint16(t)|(libc.Int32FromInt32(0)-libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(0)
  8751. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(y>>libc.Int32FromInt32(8))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8752. t = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8))) + libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(8)))))
  8753. n = uint32(libc.Uint8FromInt32(libc.Int32FromUint16(t)|(libc.Int32FromInt32(0)-libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(8)
  8754. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(y>>libc.Int32FromInt32(16))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8755. t = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8))) + libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(16)))))
  8756. o = uint32(libc.Uint8FromInt32(libc.Int32FromUint16(t)|(libc.Int32FromInt32(0)-libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(16)
  8757. return m | n | o
  8758. }
  8759. func _fbIn(tls *libc.TLS, x TCARD32, y TCARD8) (r TCARD32) {
  8760. var a, t TCARD16
  8761. var m, n, o, p TCARD32
  8762. _, _, _, _, _, _ = a, m, n, o, p, t
  8763. a = uint16(y)
  8764. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(0))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8765. m = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << 0
  8766. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(8))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8767. n = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << int32(8)
  8768. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(16))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8769. o = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << int32(16)
  8770. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(24))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8771. p = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << int32(24)
  8772. return m | n | o | p
  8773. }
  8774. func __XftSmoothGlyphGray8888(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8775. var b, d, g, r, src, srca TCARD32
  8776. var dst, dstLine, mask, maskLine, v3 uintptr
  8777. var dstStride, height, maskStride, w, width, v1, v2 int32
  8778. var m TCARD8
  8779. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8780. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8781. /* This handles only RGB and BGR */
  8782. g = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8783. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint64(0xff0000) {
  8784. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8785. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8786. } else {
  8787. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  8788. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  8789. }
  8790. src = srca<<libc.Int32FromInt32(24) | r | g | b
  8791. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8792. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8793. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8794. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8795. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(2))
  8796. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(2)
  8797. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8798. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8799. for {
  8800. v1 = height
  8801. height--
  8802. if !(v1 != 0) {
  8803. break
  8804. }
  8805. dst = dstLine
  8806. dstLine += uintptr(dstStride) * 4
  8807. mask = maskLine
  8808. maskLine += uintptr(maskStride)
  8809. w = width
  8810. for {
  8811. v2 = w
  8812. w--
  8813. if !(v2 != 0) {
  8814. break
  8815. }
  8816. v3 = mask
  8817. mask++
  8818. m = *(*TCARD8)(unsafe.Pointer(v3))
  8819. if libc.Int32FromUint8(m) == int32(0xff) {
  8820. if srca == uint32(0xff) {
  8821. *(*TCARD32)(unsafe.Pointer(dst)) = src
  8822. } else {
  8823. *(*TCARD32)(unsafe.Pointer(dst)) = _fbOver24(tls, src, *(*TCARD32)(unsafe.Pointer(dst)))
  8824. }
  8825. } else {
  8826. if m != 0 {
  8827. d = _fbIn(tls, src, m)
  8828. *(*TCARD32)(unsafe.Pointer(dst)) = _fbOver24(tls, d, *(*TCARD32)(unsafe.Pointer(dst)))
  8829. }
  8830. }
  8831. dst += 4
  8832. }
  8833. }
  8834. }
  8835. func __XftSmoothGlyphGray565(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8836. var b, d, g, r, src, srca TCARD32
  8837. var dst, dstLine, mask, maskLine, v3 uintptr
  8838. var dstStride, height, maskStride, w, width, v1, v2 int32
  8839. var m TCARD8
  8840. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8841. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8842. /* This handles only RGB and BGR */
  8843. g = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8844. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint64(0xf800) {
  8845. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8846. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8847. } else {
  8848. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  8849. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  8850. }
  8851. src = srca<<libc.Int32FromInt32(24) | r | g | b
  8852. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8853. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8854. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8855. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8856. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(1))
  8857. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(1)
  8858. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8859. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8860. for {
  8861. v1 = height
  8862. height--
  8863. if !(v1 != 0) {
  8864. break
  8865. }
  8866. dst = dstLine
  8867. dstLine += uintptr(dstStride) * 2
  8868. mask = maskLine
  8869. maskLine += uintptr(maskStride)
  8870. w = width
  8871. for {
  8872. v2 = w
  8873. w--
  8874. if !(v2 != 0) {
  8875. break
  8876. }
  8877. v3 = mask
  8878. mask++
  8879. m = *(*TCARD8)(unsafe.Pointer(v3))
  8880. if libc.Int32FromUint8(m) == int32(0xff) {
  8881. if srca == uint32(0xff) {
  8882. d = src
  8883. } else {
  8884. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8885. 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)))
  8886. }
  8887. *(*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))
  8888. } else {
  8889. if m != 0 {
  8890. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8891. 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)))
  8892. *(*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))
  8893. }
  8894. }
  8895. dst += 2
  8896. }
  8897. }
  8898. }
  8899. func __XftSmoothGlyphGray555(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8900. var b, d, g, r, src, srca TCARD32
  8901. var dst, dstLine, mask, maskLine, v3 uintptr
  8902. var dstStride, height, maskStride, w, width, v1, v2 int32
  8903. var m TCARD8
  8904. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8905. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8906. /* This handles only RGB and BGR */
  8907. g = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8908. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint64(0xf800) {
  8909. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8910. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8911. } else {
  8912. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  8913. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  8914. }
  8915. src = srca<<libc.Int32FromInt32(24) | r | g | b
  8916. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8917. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8918. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8919. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8920. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(1))
  8921. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(1)
  8922. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8923. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8924. for {
  8925. v1 = height
  8926. height--
  8927. if !(v1 != 0) {
  8928. break
  8929. }
  8930. dst = dstLine
  8931. dstLine += uintptr(dstStride) * 2
  8932. mask = maskLine
  8933. maskLine += uintptr(maskStride)
  8934. w = width
  8935. for {
  8936. v2 = w
  8937. w--
  8938. if !(v2 != 0) {
  8939. break
  8940. }
  8941. v3 = mask
  8942. mask++
  8943. m = *(*TCARD8)(unsafe.Pointer(v3))
  8944. if libc.Int32FromUint8(m) == int32(0xff) {
  8945. if srca == uint32(0xff) {
  8946. d = src
  8947. } else {
  8948. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8949. 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)))
  8950. }
  8951. *(*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))
  8952. } else {
  8953. if m != 0 {
  8954. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8955. 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)))
  8956. *(*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))
  8957. }
  8958. }
  8959. dst += 2
  8960. }
  8961. }
  8962. }
  8963. func __XftSmoothGlyphGray(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8964. bp := tls.Alloc(32)
  8965. defer tls.Free(32)
  8966. var d, src, srca TCARD32
  8967. var height, maskStride, tx, w, width, v1, v2 int32
  8968. var m TCARD8
  8969. var mask, maskLine, v3 uintptr
  8970. var pixel uint64
  8971. var _ /* b_len at bp+20 */ int32
  8972. var _ /* b_shift at bp+16 */ int32
  8973. var _ /* g_len at bp+12 */ int32
  8974. var _ /* g_shift at bp+8 */ int32
  8975. var _ /* r_len at bp+4 */ int32
  8976. var _ /* r_shift at bp+0 */ int32
  8977. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, height, m, mask, maskLine, maskStride, pixel, src, srca, tx, w, width, v1, v2, v3
  8978. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8979. 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))
  8980. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8981. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8982. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8983. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8984. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8985. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8986. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  8987. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  8988. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  8989. for {
  8990. v1 = height
  8991. height--
  8992. if !(v1 != 0) {
  8993. break
  8994. }
  8995. mask = maskLine
  8996. maskLine += uintptr(maskStride)
  8997. w = width
  8998. tx = x
  8999. for {
  9000. v2 = w
  9001. w--
  9002. if !(v2 != 0) {
  9003. break
  9004. }
  9005. v3 = mask
  9006. mask++
  9007. m = *(*TCARD8)(unsafe.Pointer(v3))
  9008. if libc.Int32FromUint8(m) == int32(0xff) {
  9009. if srca == uint32(0xff) {
  9010. d = src
  9011. } else {
  9012. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  9013. 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)))
  9014. d = _fbOver24(tls, src, d)
  9015. }
  9016. 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)))
  9017. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  9018. } else {
  9019. if m != 0 {
  9020. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  9021. 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)))
  9022. d = _fbOver24(tls, _fbIn(tls, src, m), d)
  9023. 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)))
  9024. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  9025. }
  9026. }
  9027. tx++
  9028. }
  9029. y++
  9030. }
  9031. }
  9032. func __XftSmoothGlyphRgba(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  9033. bp := tls.Alloc(32)
  9034. defer tls.Free(32)
  9035. var __a, __a1, __a2 TCARD16
  9036. var __i, __i1, __i2, __t, __t1, __t2, __ta, __ta1, __ta2, d, m, ma, n, o, src, srca TCARD32
  9037. var height, tx, w, width, v1, v2 int32
  9038. var mask, v3 uintptr
  9039. var pixel uint64
  9040. var _ /* b_len at bp+20 */ int32
  9041. var _ /* b_shift at bp+16 */ int32
  9042. var _ /* g_len at bp+12 */ int32
  9043. var _ /* g_shift at bp+8 */ int32
  9044. var _ /* r_len at bp+4 */ int32
  9045. var _ /* r_shift at bp+0 */ int32
  9046. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = __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
  9047. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  9048. 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))
  9049. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  9050. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  9051. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  9052. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  9053. mask = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  9054. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  9055. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  9056. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  9057. for {
  9058. v1 = height
  9059. height--
  9060. if !(v1 != 0) {
  9061. break
  9062. }
  9063. w = width
  9064. tx = x
  9065. for {
  9066. v2 = w
  9067. w--
  9068. if !(v2 != 0) {
  9069. break
  9070. }
  9071. v3 = mask
  9072. mask += 4
  9073. ma = *(*TCARD32)(unsafe.Pointer(v3))
  9074. if ma == uint32(0xffffffff) {
  9075. if srca == uint32(0xff) {
  9076. d = src
  9077. } else {
  9078. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  9079. 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)))
  9080. d = _fbOver24(tls, src, d)
  9081. }
  9082. 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)))
  9083. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  9084. } else {
  9085. if ma != 0 {
  9086. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  9087. 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)))
  9088. __a = uint16(uint8(ma >> libc.Int32FromInt32(0)))
  9089. __i = libc.Uint32FromInt32(libc.Int32FromUint16(uint16(uint8(src>>libc.Int32FromInt32(0))))*libc.Int32FromUint16(__a) + libc.Int32FromInt32(0x80))
  9090. __t = (__i>>libc.Int32FromInt32(8) + __i) >> libc.Int32FromInt32(8)
  9091. __i = srca*uint32(__a) + libc.Uint32FromInt32(0x80)
  9092. __ta = uint32(uint8(^((__i>>libc.Int32FromInt32(8) + __i) >> libc.Int32FromInt32(8))))
  9093. __i = uint32(uint16(uint8(d>>libc.Int32FromInt32(0))))*__ta + libc.Uint32FromInt32(0x80)
  9094. __t = __t + (__i>>libc.Int32FromInt32(8)+__i)>>libc.Int32FromInt32(8)
  9095. __t = uint32(uint8(__t | -(__t >> libc.Int32FromInt32(8))))
  9096. m = __t << 0
  9097. __a1 = uint16(uint8(ma >> libc.Int32FromInt32(8)))
  9098. __i1 = libc.Uint32FromInt32(libc.Int32FromUint16(uint16(uint8(src>>libc.Int32FromInt32(8))))*libc.Int32FromUint16(__a1) + libc.Int32FromInt32(0x80))
  9099. __t1 = (__i1>>libc.Int32FromInt32(8) + __i1) >> libc.Int32FromInt32(8)
  9100. __i1 = srca*uint32(__a1) + libc.Uint32FromInt32(0x80)
  9101. __ta1 = uint32(uint8(^((__i1>>libc.Int32FromInt32(8) + __i1) >> libc.Int32FromInt32(8))))
  9102. __i1 = uint32(uint16(uint8(d>>libc.Int32FromInt32(8))))*__ta1 + libc.Uint32FromInt32(0x80)
  9103. __t1 = __t1 + (__i1>>libc.Int32FromInt32(8)+__i1)>>libc.Int32FromInt32(8)
  9104. __t1 = uint32(uint8(__t1 | -(__t1 >> libc.Int32FromInt32(8))))
  9105. n = __t1 << int32(8)
  9106. __a2 = uint16(uint8(ma >> libc.Int32FromInt32(16)))
  9107. __i2 = libc.Uint32FromInt32(libc.Int32FromUint16(uint16(uint8(src>>libc.Int32FromInt32(16))))*libc.Int32FromUint16(__a2) + libc.Int32FromInt32(0x80))
  9108. __t2 = (__i2>>libc.Int32FromInt32(8) + __i2) >> libc.Int32FromInt32(8)
  9109. __i2 = srca*uint32(__a2) + libc.Uint32FromInt32(0x80)
  9110. __ta2 = uint32(uint8(^((__i2>>libc.Int32FromInt32(8) + __i2) >> libc.Int32FromInt32(8))))
  9111. __i2 = uint32(uint16(uint8(d>>libc.Int32FromInt32(16))))*__ta2 + libc.Uint32FromInt32(0x80)
  9112. __t2 = __t2 + (__i2>>libc.Int32FromInt32(8)+__i2)>>libc.Int32FromInt32(8)
  9113. __t2 = uint32(uint8(__t2 | -(__t2 >> libc.Int32FromInt32(8))))
  9114. o = __t2 << int32(16)
  9115. d = m | n | o
  9116. 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)))
  9117. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  9118. }
  9119. }
  9120. tx++
  9121. }
  9122. y++
  9123. }
  9124. }
  9125. func __XftSmoothGlyphPossible(tls *libc.TLS, draw uintptr) (r TFcBool) {
  9126. if !((*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0) {
  9127. return m_FcFalse
  9128. }
  9129. if (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fclass != int32(m_TrueColor) {
  9130. return m_FcFalse
  9131. }
  9132. return int32(m_FcTrue)
  9133. }
  9134. type TXftSmoothGlyph = uintptr
  9135. func __XftSmoothGlyphFind(tls *libc.TLS, draw uintptr, public uintptr) (r TXftSmoothGlyph) {
  9136. var font uintptr
  9137. _ = font
  9138. font = public
  9139. if !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0) {
  9140. return __ccgo_fp(__XftSmoothGlyphMono)
  9141. } else {
  9142. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  9143. case int32(m_FC_RGBA_RGB):
  9144. fallthrough
  9145. case int32(m_FC_RGBA_BGR):
  9146. fallthrough
  9147. case int32(m_FC_RGBA_VRGB):
  9148. fallthrough
  9149. case int32(m_FC_RGBA_VBGR):
  9150. return __ccgo_fp(__XftSmoothGlyphRgba)
  9151. default:
  9152. switch XXftDrawBitsPerPixel(tls, draw) {
  9153. case uint32(32):
  9154. 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) {
  9155. return __ccgo_fp(__XftSmoothGlyphGray8888)
  9156. }
  9157. case uint32(16):
  9158. 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) {
  9159. return __ccgo_fp(__XftSmoothGlyphGray565)
  9160. }
  9161. 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) {
  9162. return __ccgo_fp(__XftSmoothGlyphGray555)
  9163. }
  9164. default:
  9165. break
  9166. }
  9167. return __ccgo_fp(__XftSmoothGlyphGray)
  9168. }
  9169. }
  9170. return r
  9171. }
  9172. func __XftGlyphDefault(tls *libc.TLS, dpy uintptr, public uintptr) (r uintptr) {
  9173. bp := tls.Alloc(1040)
  9174. defer tls.Free(1040)
  9175. var font uintptr
  9176. var glyphs_loaded TFcBool
  9177. var _ /* missing at bp+0 */ [256]TFT_UInt
  9178. var _ /* nmissing at bp+1024 */ int32
  9179. _, _ = font, glyphs_loaded
  9180. font = public
  9181. glyphs_loaded = m_FcFalse
  9182. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), uint32(0), bp, bp+1024) != 0 {
  9183. glyphs_loaded = int32(m_FcTrue)
  9184. }
  9185. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9186. XXftFontLoadGlyphs(tls, dpy, public, glyphs_loaded, bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9187. }
  9188. return *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs))
  9189. }
  9190. func _XftGetImageErrorHandler(tls *libc.TLS, dpy uintptr, error_event uintptr) (r int32) {
  9191. return 0
  9192. }
  9193. func XXftGlyphCore(tls *libc.TLS, draw uintptr, color uintptr, public uintptr, x int32, y int32, glyphs uintptr, nglyphs int32) {
  9194. bp := tls.Alloc(1168)
  9195. defer tls.Free(1168)
  9196. var depth, v3 uint32
  9197. var dpy, font, g, image, xftg, v10, v11, v2, v6, v7 uintptr
  9198. var gc TGC
  9199. var glyph TFT_UInt
  9200. var glyphs_loaded TFcBool
  9201. var n, ox, oy, v1, v5, v9 int32
  9202. var pix TPixmap
  9203. var prev_error TXErrorHandler
  9204. var sharp TXftSharpGlyph
  9205. var smooth TXftSmoothGlyph
  9206. var v12, v4, v8 bool
  9207. var _ /* gcv at bp+1040 */ TXGCValues
  9208. var _ /* gi at bp+1028 */ TXGlyphInfo
  9209. var _ /* missing at bp+0 */ [256]TFT_UInt
  9210. var _ /* nmissing at bp+1024 */ int32
  9211. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  9212. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  9213. font = public
  9214. /*
  9215. * Load missing glyphs
  9216. */
  9217. g = glyphs
  9218. n = nglyphs
  9219. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  9220. glyphs_loaded = m_FcFalse
  9221. for {
  9222. v1 = n
  9223. n--
  9224. if !(v1 != 0) {
  9225. break
  9226. }
  9227. v2 = g
  9228. g += 4
  9229. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), *(*TFT_UInt)(unsafe.Pointer(v2)), bp, bp+1024) != 0 {
  9230. glyphs_loaded = int32(m_FcTrue)
  9231. }
  9232. }
  9233. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9234. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9235. }
  9236. g = glyphs
  9237. n = nglyphs
  9238. if ((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 || libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9239. smooth = __XftSmoothGlyphFind(tls, draw, public)
  9240. XXftGlyphExtents(tls, dpy, public, glyphs, nglyphs, bp+1028)
  9241. if !((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth != 0) || !((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight != 0) {
  9242. goto bail1
  9243. }
  9244. ox = x - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9245. oy = y - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9246. /*
  9247. * Try to get bits directly from the drawable; if that fails,
  9248. * use a temporary pixmap. When it does fail, assume it
  9249. * will probably fail for a while and keep using temporary
  9250. * pixmaps for a while to avoid double round trips.
  9251. */
  9252. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9253. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9254. 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))
  9255. libx11.XXSetErrorHandler(tls, prev_error)
  9256. if !(image != 0) {
  9257. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9258. }
  9259. } else {
  9260. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9261. image = libc.UintptrFromInt32(0)
  9262. }
  9263. if v4 = !(image != 0); v4 {
  9264. v3 = XXftDrawDepth(tls, draw)
  9265. depth = v3
  9266. }
  9267. if v4 && v3 != 0 {
  9268. 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)
  9269. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9270. gc = libx11.XXCreateGC(tls, dpy, pix, libc.Uint64FromInt64(libc.Int64FromInt64(1)<<libc.Int32FromInt32(16)), bp+1040)
  9271. 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)
  9272. libx11.XXFreeGC(tls, dpy, gc)
  9273. 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))
  9274. libx11.XXFreePixmap(tls, dpy, pix)
  9275. }
  9276. if !(image != 0) {
  9277. goto bail1
  9278. }
  9279. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9280. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9281. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9282. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9283. XXftSwapImage(tls, image)
  9284. }
  9285. for {
  9286. v5 = n
  9287. n--
  9288. if !(v5 != 0) {
  9289. break
  9290. }
  9291. v6 = g
  9292. g += 4
  9293. glyph = *(*TFT_UInt)(unsafe.Pointer(v6))
  9294. if v8 = glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v8 {
  9295. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9296. xftg = v7
  9297. }
  9298. if v8 || !(v7 != 0) {
  9299. xftg = __XftGlyphDefault(tls, dpy, public)
  9300. }
  9301. if xftg != 0 {
  9302. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr))(unsafe.Pointer(&struct{ uintptr }{smooth})))(tls, image, xftg, x-ox, y-oy, color)
  9303. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  9304. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  9305. }
  9306. }
  9307. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9308. XXftSwapImage(tls, image)
  9309. }
  9310. 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))
  9311. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9312. } else {
  9313. sharp = __XftSharpGlyphFind(tls, draw, public)
  9314. for {
  9315. v9 = n
  9316. n--
  9317. if !(v9 != 0) {
  9318. break
  9319. }
  9320. v10 = g
  9321. g += 4
  9322. glyph = *(*TFT_UInt)(unsafe.Pointer(v10))
  9323. if v12 = glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v12 {
  9324. v11 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9325. xftg = v11
  9326. }
  9327. if v12 || !(v11 != 0) {
  9328. xftg = __XftGlyphDefault(tls, dpy, public)
  9329. }
  9330. if xftg != 0 {
  9331. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32))(unsafe.Pointer(&struct{ uintptr }{sharp})))(tls, draw, xftg, x, y)
  9332. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  9333. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  9334. }
  9335. }
  9336. }
  9337. goto bail1
  9338. bail1:
  9339. ;
  9340. if glyphs_loaded != 0 {
  9341. X_XftFontManageMemory(tls, dpy, public)
  9342. }
  9343. }
  9344. func XXftGlyphSpecCore(tls *libc.TLS, draw uintptr, color uintptr, public uintptr, glyphs uintptr, nglyphs int32) {
  9345. bp := tls.Alloc(1168)
  9346. defer tls.Free(1168)
  9347. var depth, v5 uint32
  9348. var dpy, font, image, xftg, v11, v8 uintptr
  9349. var g_x1, g_x2, g_y1, g_y2, height, i, width, x1, x2, y1, y2, v1, v2, v3 int32
  9350. var gc TGC
  9351. var glyph, glyph1 TFT_UInt
  9352. var glyphs_loaded TFcBool
  9353. var pix TPixmap
  9354. var prev_error TXErrorHandler
  9355. var sharp TXftSharpGlyph
  9356. var smooth TXftSmoothGlyph
  9357. var v12, v6, v9 bool
  9358. var _ /* gcv at bp+1040 */ TXGCValues
  9359. var _ /* gi at bp+1028 */ TXGlyphInfo
  9360. var _ /* missing at bp+0 */ [256]TFT_UInt
  9361. var _ /* nmissing at bp+1024 */ int32
  9362. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  9363. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  9364. font = public
  9365. /*
  9366. * Load missing glyphs
  9367. */
  9368. glyphs_loaded = m_FcFalse
  9369. v3 = libc.Int32FromInt32(0)
  9370. y2 = v3
  9371. v2 = v3
  9372. x2 = v2
  9373. v1 = v2
  9374. y1 = v1
  9375. x1 = v1
  9376. i = 0
  9377. for {
  9378. if !(i < nglyphs) {
  9379. break
  9380. }
  9381. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  9382. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph, bp, bp+1024) != 0 {
  9383. glyphs_loaded = int32(m_FcTrue)
  9384. }
  9385. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9386. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9387. }
  9388. XXftGlyphExtents(tls, dpy, public, glyphs+uintptr(i)*8, int32(1), bp+1028)
  9389. g_x1 = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9390. g_y1 = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9391. g_x2 = g_x1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth)
  9392. g_y2 = g_y1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight)
  9393. if i != 0 {
  9394. if g_x1 < x1 {
  9395. x1 = g_x1
  9396. }
  9397. if g_y1 < y1 {
  9398. y1 = g_y1
  9399. }
  9400. if g_x2 > x2 {
  9401. x2 = g_x2
  9402. }
  9403. if g_y2 > y2 {
  9404. y2 = g_y2
  9405. }
  9406. } else {
  9407. x1 = g_x1
  9408. y1 = g_y1
  9409. x2 = g_x2
  9410. y2 = g_y2
  9411. }
  9412. goto _4
  9413. _4:
  9414. ;
  9415. i++
  9416. }
  9417. if x1 == x2 || y1 == y2 {
  9418. goto bail1
  9419. }
  9420. if ((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 || libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9421. width = x2 - x1
  9422. height = y2 - y1
  9423. smooth = __XftSmoothGlyphFind(tls, draw, public)
  9424. /*
  9425. * Try to get bits directly from the drawable; if that fails,
  9426. * use a temporary pixmap. When it does fail, assume it
  9427. * will probably fail for a while and keep using temporary
  9428. * pixmaps for a while to avoid double round trips.
  9429. */
  9430. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9431. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9432. 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))
  9433. libx11.XXSetErrorHandler(tls, prev_error)
  9434. if !(image != 0) {
  9435. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9436. }
  9437. } else {
  9438. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9439. image = libc.UintptrFromInt32(0)
  9440. }
  9441. if v6 = !(image != 0); v6 {
  9442. v5 = XXftDrawDepth(tls, draw)
  9443. depth = v5
  9444. }
  9445. if v6 && v5 != 0 {
  9446. pix = libx11.XXCreatePixmap(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), depth)
  9447. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9448. gc = libx11.XXCreateGC(tls, dpy, pix, libc.Uint64FromInt64(libc.Int64FromInt64(1)<<libc.Int32FromInt32(16)), bp+1040)
  9449. libx11.XXCopyArea(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, pix, gc, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), 0, 0)
  9450. libx11.XXFreeGC(tls, dpy, gc)
  9451. image = libx11.XXGetImage(tls, dpy, pix, 0, 0, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), libc.Uint64FromInt64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9452. libx11.XXFreePixmap(tls, dpy, pix)
  9453. }
  9454. if !(image != 0) {
  9455. goto bail1
  9456. }
  9457. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9458. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9459. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9460. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9461. XXftSwapImage(tls, image)
  9462. }
  9463. i = 0
  9464. for {
  9465. if !(i < nglyphs) {
  9466. break
  9467. }
  9468. glyph = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  9469. if v9 = glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v9 {
  9470. v8 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9471. xftg = v8
  9472. }
  9473. if v9 || !(v8 != 0) {
  9474. xftg = __XftGlyphDefault(tls, dpy, public)
  9475. }
  9476. if xftg != 0 {
  9477. (*(*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)
  9478. }
  9479. goto _7
  9480. _7:
  9481. ;
  9482. i++
  9483. }
  9484. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9485. XXftSwapImage(tls, image)
  9486. }
  9487. 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))
  9488. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9489. } else {
  9490. sharp = __XftSharpGlyphFind(tls, draw, public)
  9491. i = 0
  9492. for {
  9493. if !(i < nglyphs) {
  9494. break
  9495. }
  9496. glyph1 = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  9497. if v12 = glyph1 >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v12 {
  9498. v11 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph1)*8))
  9499. xftg = v11
  9500. }
  9501. if v12 || !(v11 != 0) {
  9502. xftg = __XftGlyphDefault(tls, dpy, public)
  9503. }
  9504. if xftg != 0 {
  9505. (*(*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))
  9506. }
  9507. goto _10
  9508. _10:
  9509. ;
  9510. i++
  9511. }
  9512. }
  9513. goto bail1
  9514. bail1:
  9515. ;
  9516. if glyphs_loaded != 0 {
  9517. X_XftFontManageMemory(tls, dpy, public)
  9518. }
  9519. }
  9520. func XXftGlyphFontSpecCore(tls *libc.TLS, draw uintptr, color uintptr, glyphs uintptr, nglyphs int32) {
  9521. bp := tls.Alloc(1168)
  9522. defer tls.Free(1168)
  9523. var depth, v6 uint32
  9524. var dpy, font, font1, image, public, public1, public2, xftg, v12, v9 uintptr
  9525. var g_x1, g_x2, g_y1, g_y2, height, i, width, x1, x2, y1, y2, v1, v2, v3 int32
  9526. var gc TGC
  9527. var glyph, glyph1 TFT_UInt
  9528. var glyphs_loaded TFcBool
  9529. var pix TPixmap
  9530. var prev_error TXErrorHandler
  9531. var sharp TXftSharpGlyph
  9532. var smooth TXftSmoothGlyph
  9533. var t int16
  9534. var v10, v13, v7 bool
  9535. var _ /* gcv at bp+1040 */ TXGCValues
  9536. var _ /* gi at bp+1028 */ TXGlyphInfo
  9537. var _ /* missing at bp+0 */ [256]TFT_UInt
  9538. var _ /* nmissing at bp+1024 */ int32
  9539. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  9540. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  9541. /*
  9542. * Load missing glyphs
  9543. */
  9544. glyphs_loaded = m_FcFalse
  9545. v3 = libc.Int32FromInt32(0)
  9546. y2 = v3
  9547. v2 = v3
  9548. x2 = v2
  9549. v1 = v2
  9550. y1 = v1
  9551. x1 = v1
  9552. i = 0
  9553. for {
  9554. if !(i < nglyphs) {
  9555. break
  9556. }
  9557. public = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  9558. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  9559. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph, bp, bp+1024) != 0 {
  9560. glyphs_loaded = int32(m_FcTrue)
  9561. }
  9562. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9563. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9564. }
  9565. XXftGlyphExtents(tls, dpy, public, glyphs+uintptr(i)*16+8, int32(1), bp+1028)
  9566. g_x1 = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9567. g_y1 = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9568. g_x2 = g_x1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth)
  9569. g_y2 = g_y1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight)
  9570. if i != 0 {
  9571. if g_x1 < x1 {
  9572. if g_x1 < 0 {
  9573. /* do nothing if the given glyphs are out of range */
  9574. 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))
  9575. if int32(t) < 0 && int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i-int32(1))*16))).Fx) > 0 {
  9576. goto bail1
  9577. }
  9578. }
  9579. x1 = g_x1
  9580. }
  9581. if g_y1 < y1 {
  9582. y1 = g_y1
  9583. }
  9584. if g_x2 > x2 {
  9585. x2 = g_x2
  9586. }
  9587. if g_y2 > y2 {
  9588. y2 = g_y2
  9589. }
  9590. } else {
  9591. x1 = g_x1
  9592. y1 = g_y1
  9593. x2 = g_x2
  9594. y2 = g_y2
  9595. }
  9596. goto _4
  9597. _4:
  9598. ;
  9599. i++
  9600. }
  9601. if x1 == x2 || y1 == y2 {
  9602. goto bail1
  9603. }
  9604. i = 0
  9605. for {
  9606. if !(i < nglyphs) {
  9607. break
  9608. }
  9609. if (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Finfo.Fantialias != 0 {
  9610. break
  9611. }
  9612. goto _5
  9613. _5:
  9614. ;
  9615. i++
  9616. }
  9617. if (i != nglyphs || libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9618. width = x2 - x1
  9619. height = y2 - y1
  9620. /*
  9621. * Try to get bits directly from the drawable; if that fails,
  9622. * use a temporary pixmap. When it does fail, assume it
  9623. * will probably fail for a while and keep using temporary
  9624. * pixmaps for a while to avoid double round trips.
  9625. */
  9626. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9627. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9628. 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))
  9629. libx11.XXSetErrorHandler(tls, prev_error)
  9630. if !(image != 0) {
  9631. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9632. }
  9633. } else {
  9634. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9635. image = libc.UintptrFromInt32(0)
  9636. }
  9637. if v7 = !(image != 0); v7 {
  9638. v6 = XXftDrawDepth(tls, draw)
  9639. depth = v6
  9640. }
  9641. if v7 && v6 != 0 {
  9642. pix = libx11.XXCreatePixmap(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), depth)
  9643. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9644. gc = libx11.XXCreateGC(tls, dpy, pix, libc.Uint64FromInt64(libc.Int64FromInt64(1)<<libc.Int32FromInt32(16)), bp+1040)
  9645. libx11.XXCopyArea(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, pix, gc, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), 0, 0)
  9646. libx11.XXFreeGC(tls, dpy, gc)
  9647. image = libx11.XXGetImage(tls, dpy, pix, 0, 0, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), libc.Uint64FromInt64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9648. libx11.XXFreePixmap(tls, dpy, pix)
  9649. }
  9650. if !(image != 0) {
  9651. goto bail1
  9652. }
  9653. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9654. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9655. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9656. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9657. XXftSwapImage(tls, image)
  9658. }
  9659. i = 0
  9660. for {
  9661. if !(i < nglyphs) {
  9662. break
  9663. }
  9664. public1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  9665. font = public1
  9666. smooth = __XftSmoothGlyphFind(tls, draw, public1)
  9667. glyph = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  9668. if v10 = glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v10 {
  9669. v9 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9670. xftg = v9
  9671. }
  9672. if v10 || !(v9 != 0) {
  9673. xftg = __XftGlyphDefault(tls, dpy, public1)
  9674. }
  9675. if xftg != 0 {
  9676. (*(*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)
  9677. }
  9678. goto _8
  9679. _8:
  9680. ;
  9681. i++
  9682. }
  9683. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9684. XXftSwapImage(tls, image)
  9685. }
  9686. 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))
  9687. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9688. } else {
  9689. i = 0
  9690. for {
  9691. if !(i < nglyphs) {
  9692. break
  9693. }
  9694. public2 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  9695. font1 = public2
  9696. sharp = __XftSharpGlyphFind(tls, draw, public2)
  9697. glyph1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  9698. if v13 = glyph1 >= (*TXftFontInt)(unsafe.Pointer(font1)).Fnum_glyphs; !v13 {
  9699. v12 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(glyph1)*8))
  9700. xftg = v12
  9701. }
  9702. if v13 || !(v12 != 0) {
  9703. xftg = __XftGlyphDefault(tls, dpy, public2)
  9704. }
  9705. if xftg != 0 {
  9706. (*(*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))
  9707. }
  9708. goto _11
  9709. _11:
  9710. ;
  9711. i++
  9712. }
  9713. }
  9714. goto bail1
  9715. bail1:
  9716. ;
  9717. if glyphs_loaded != 0 {
  9718. i = 0
  9719. for {
  9720. if !(i < nglyphs) {
  9721. break
  9722. }
  9723. X_XftFontManageMemory(tls, dpy, (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)
  9724. goto _14
  9725. _14:
  9726. ;
  9727. i++
  9728. }
  9729. }
  9730. }
  9731. /* xftxlfd.c */
  9732. func XXftDebug(tls *libc.TLS) (r int32) {
  9733. bp := tls.Alloc(16)
  9734. defer tls.Free(16)
  9735. var e uintptr
  9736. _ = e
  9737. if !(_initialized != 0) {
  9738. _initialized = int32(1)
  9739. e = libc.Xgetenv(tls, __ccgo_ts)
  9740. if e != 0 {
  9741. libc.Xprintf(tls, __ccgo_ts+10, libc.VaList(bp+8, e))
  9742. _debug = libc.Xatoi(tls, e)
  9743. if _debug <= 0 {
  9744. _debug = int32(1)
  9745. }
  9746. }
  9747. }
  9748. return _debug
  9749. }
  9750. var _initialized int32
  9751. var _debug int32
  9752. func __XftCloseDisplay(tls *libc.TLS, dpy uintptr, codes uintptr) (r int32) {
  9753. var info, prev, v2 uintptr
  9754. _, _, _ = info, prev, v2
  9755. info = X_XftDisplayInfoGet(tls, dpy, m_FcFalse)
  9756. if !(info != 0) {
  9757. return 0
  9758. }
  9759. /*
  9760. * Get rid of any dangling unreferenced fonts
  9761. */
  9762. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = 0
  9763. XXftFontManageMemory(tls, dpy)
  9764. /*
  9765. * Clean up the default values
  9766. */
  9767. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0 {
  9768. libfontconfig.XFcPatternDestroy(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults)
  9769. }
  9770. /*
  9771. * Unhook from the global list
  9772. */
  9773. prev = uintptr(unsafe.Pointer(&X_XftDisplayInfo))
  9774. for {
  9775. v2 = *(*uintptr)(unsafe.Pointer(prev))
  9776. info = v2
  9777. if !(v2 != 0) {
  9778. break
  9779. }
  9780. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay == dpy {
  9781. break
  9782. }
  9783. goto _1
  9784. _1:
  9785. ;
  9786. prev = *(*uintptr)(unsafe.Pointer(prev))
  9787. }
  9788. if info != libc.UintptrFromInt32(0) {
  9789. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext
  9790. }
  9791. libc.Xfree(tls, info)
  9792. return 0
  9793. }
  9794. func X_XftDisplayInfoGet(tls *libc.TLS, dpy uintptr, createIfNecessary TFcBool) (r uintptr) {
  9795. bp := tls.Alloc(96)
  9796. defer tls.Free(96)
  9797. var format, info, prev, visual, v2, v3, v5 uintptr
  9798. var i int32
  9799. var _ /* error_base at bp+44 */ int32
  9800. var _ /* event_base at bp+40 */ int32
  9801. var _ /* major at bp+48 */ int32
  9802. var _ /* minor at bp+52 */ int32
  9803. var _ /* pf at bp+0 */ TXRenderPictFormat
  9804. _, _, _, _, _, _, _, _ = format, i, info, prev, visual, v2, v3, v5
  9805. prev = uintptr(unsafe.Pointer(&X_XftDisplayInfo))
  9806. for {
  9807. v2 = *(*uintptr)(unsafe.Pointer(prev))
  9808. info = v2
  9809. if !(v2 != 0) {
  9810. break
  9811. }
  9812. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay == dpy {
  9813. /*
  9814. * MRU the list
  9815. */
  9816. if prev != uintptr(unsafe.Pointer(&X_XftDisplayInfo)) {
  9817. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext
  9818. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext = X_XftDisplayInfo
  9819. X_XftDisplayInfo = info
  9820. }
  9821. return info
  9822. }
  9823. goto _1
  9824. _1:
  9825. ;
  9826. prev = *(*uintptr)(unsafe.Pointer(prev))
  9827. }
  9828. if !(createIfNecessary != 0) {
  9829. return libc.UintptrFromInt32(0)
  9830. }
  9831. info = libc.Xmalloc(tls, uint64(1488))
  9832. if !(info != 0) {
  9833. goto bail0
  9834. }
  9835. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes = libx11.XXAddExtension(tls, dpy)
  9836. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes != 0) {
  9837. goto bail1
  9838. }
  9839. libx11.XXESetCloseDisplay(tls, dpy, (*TXExtCodes)(unsafe.Pointer((*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes)).Fextension, __ccgo_fp(__XftCloseDisplay))
  9840. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay = dpy
  9841. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = libc.UintptrFromInt32(0)
  9842. (*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat = libc.UintptrFromInt32(0)
  9843. (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender = libc.BoolInt32(libxrender.XXRenderQueryExtension(tls, dpy, bp+40, bp+44) != 0 && libxrender.XXRenderFindVisualFormat(tls, dpy, (*TScreen)(unsafe.Pointer((*struct {
  9844. Fext_data uintptr
  9845. Fprivate1 uintptr
  9846. Ffd int32
  9847. Fprivate2 int32
  9848. Fproto_major_version int32
  9849. Fproto_minor_version int32
  9850. Fvendor uintptr
  9851. Fprivate3 TXID
  9852. Fprivate4 TXID
  9853. Fprivate5 TXID
  9854. Fprivate6 int32
  9855. Fresource_alloc uintptr
  9856. Fbyte_order int32
  9857. Fbitmap_unit int32
  9858. Fbitmap_pad int32
  9859. Fbitmap_bit_order int32
  9860. Fnformats int32
  9861. Fpixmap_format uintptr
  9862. Fprivate8 int32
  9863. Frelease int32
  9864. Fprivate9 uintptr
  9865. Fprivate10 uintptr
  9866. Fqlen int32
  9867. Flast_request_read uint64
  9868. Frequest uint64
  9869. Fprivate11 TXPointer
  9870. Fprivate12 TXPointer
  9871. Fprivate13 TXPointer
  9872. Fprivate14 TXPointer
  9873. Fmax_request_size uint32
  9874. Fdb uintptr
  9875. Fprivate15 uintptr
  9876. Fdisplay_name uintptr
  9877. Fdefault_screen int32
  9878. Fnscreens int32
  9879. Fscreens uintptr
  9880. Fmotion_buffer uint64
  9881. Fprivate16 uint64
  9882. Fmin_keycode int32
  9883. Fmax_keycode int32
  9884. Fprivate17 TXPointer
  9885. Fprivate18 TXPointer
  9886. Fprivate19 int32
  9887. Fxdefaults uintptr
  9888. })(unsafe.Pointer(dpy)).Fscreens+uintptr((*struct {
  9889. Fext_data uintptr
  9890. Fprivate1 uintptr
  9891. Ffd int32
  9892. Fprivate2 int32
  9893. Fproto_major_version int32
  9894. Fproto_minor_version int32
  9895. Fvendor uintptr
  9896. Fprivate3 TXID
  9897. Fprivate4 TXID
  9898. Fprivate5 TXID
  9899. Fprivate6 int32
  9900. Fresource_alloc uintptr
  9901. Fbyte_order int32
  9902. Fbitmap_unit int32
  9903. Fbitmap_pad int32
  9904. Fbitmap_bit_order int32
  9905. Fnformats int32
  9906. Fpixmap_format uintptr
  9907. Fprivate8 int32
  9908. Frelease int32
  9909. Fprivate9 uintptr
  9910. Fprivate10 uintptr
  9911. Fqlen int32
  9912. Flast_request_read uint64
  9913. Frequest uint64
  9914. Fprivate11 TXPointer
  9915. Fprivate12 TXPointer
  9916. Fprivate13 TXPointer
  9917. Fprivate14 TXPointer
  9918. Fmax_request_size uint32
  9919. Fdb uintptr
  9920. Fprivate15 uintptr
  9921. Fdisplay_name uintptr
  9922. Fdefault_screen int32
  9923. Fnscreens int32
  9924. Fscreens uintptr
  9925. Fmotion_buffer uint64
  9926. Fprivate16 uint64
  9927. Fmin_keycode int32
  9928. Fmax_keycode int32
  9929. Fprivate17 TXPointer
  9930. Fprivate18 TXPointer
  9931. Fprivate19 int32
  9932. Fxdefaults uintptr
  9933. })(unsafe.Pointer(dpy)).Fdefault_screen)*128)).Froot_visual) != libc.UintptrFromInt32(0))
  9934. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs = int32(m_FcTrue)
  9935. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  9936. libxrender.XXRenderQueryVersion(tls, dpy, bp+48, bp+52)
  9937. if *(*int32)(unsafe.Pointer(bp + 48)) < 0 || *(*int32)(unsafe.Pointer(bp + 48)) == 0 && *(*int32)(unsafe.Pointer(bp + 52)) <= int32(2) {
  9938. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs = m_FcFalse
  9939. }
  9940. (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasSolid = m_FcFalse
  9941. if *(*int32)(unsafe.Pointer(bp + 48)) > 0 || *(*int32)(unsafe.Pointer(bp + 48)) == 0 && *(*int32)(unsafe.Pointer(bp + 52)) >= int32(10) {
  9942. (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasSolid = int32(m_FcTrue)
  9943. }
  9944. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Ftype1 = int32(m_PictTypeDirect)
  9945. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth = int32(32)
  9946. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FredMask = int16(0xff)
  9947. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FgreenMask = int16(0xff)
  9948. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FblueMask = int16(0xff)
  9949. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FalphaMask = int16(0xff)
  9950. (*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)
  9951. }
  9952. if XXftDebug(tls)&int32(m_XFT_DBG_RENDER) != 0 {
  9953. visual = (*TScreen)(unsafe.Pointer((*struct {
  9954. Fext_data uintptr
  9955. Fprivate1 uintptr
  9956. Ffd int32
  9957. Fprivate2 int32
  9958. Fproto_major_version int32
  9959. Fproto_minor_version int32
  9960. Fvendor uintptr
  9961. Fprivate3 TXID
  9962. Fprivate4 TXID
  9963. Fprivate5 TXID
  9964. Fprivate6 int32
  9965. Fresource_alloc uintptr
  9966. Fbyte_order int32
  9967. Fbitmap_unit int32
  9968. Fbitmap_pad int32
  9969. Fbitmap_bit_order int32
  9970. Fnformats int32
  9971. Fpixmap_format uintptr
  9972. Fprivate8 int32
  9973. Frelease int32
  9974. Fprivate9 uintptr
  9975. Fprivate10 uintptr
  9976. Fqlen int32
  9977. Flast_request_read uint64
  9978. Frequest uint64
  9979. Fprivate11 TXPointer
  9980. Fprivate12 TXPointer
  9981. Fprivate13 TXPointer
  9982. Fprivate14 TXPointer
  9983. Fmax_request_size uint32
  9984. Fdb uintptr
  9985. Fprivate15 uintptr
  9986. Fdisplay_name uintptr
  9987. Fdefault_screen int32
  9988. Fnscreens int32
  9989. Fscreens uintptr
  9990. Fmotion_buffer uint64
  9991. Fprivate16 uint64
  9992. Fmin_keycode int32
  9993. Fmax_keycode int32
  9994. Fprivate17 TXPointer
  9995. Fprivate18 TXPointer
  9996. Fprivate19 int32
  9997. Fxdefaults uintptr
  9998. })(unsafe.Pointer(dpy)).Fscreens + uintptr((*struct {
  9999. Fext_data uintptr
  10000. Fprivate1 uintptr
  10001. Ffd int32
  10002. Fprivate2 int32
  10003. Fproto_major_version int32
  10004. Fproto_minor_version int32
  10005. Fvendor uintptr
  10006. Fprivate3 TXID
  10007. Fprivate4 TXID
  10008. Fprivate5 TXID
  10009. Fprivate6 int32
  10010. Fresource_alloc uintptr
  10011. Fbyte_order int32
  10012. Fbitmap_unit int32
  10013. Fbitmap_pad int32
  10014. Fbitmap_bit_order int32
  10015. Fnformats int32
  10016. Fpixmap_format uintptr
  10017. Fprivate8 int32
  10018. Frelease int32
  10019. Fprivate9 uintptr
  10020. Fprivate10 uintptr
  10021. Fqlen int32
  10022. Flast_request_read uint64
  10023. Frequest uint64
  10024. Fprivate11 TXPointer
  10025. Fprivate12 TXPointer
  10026. Fprivate13 TXPointer
  10027. Fprivate14 TXPointer
  10028. Fmax_request_size uint32
  10029. Fdb uintptr
  10030. Fprivate15 uintptr
  10031. Fdisplay_name uintptr
  10032. Fdefault_screen int32
  10033. Fnscreens int32
  10034. Fscreens uintptr
  10035. Fmotion_buffer uint64
  10036. Fprivate16 uint64
  10037. Fmin_keycode int32
  10038. Fmax_keycode int32
  10039. Fprivate17 TXPointer
  10040. Fprivate18 TXPointer
  10041. Fprivate19 int32
  10042. Fxdefaults uintptr
  10043. })(unsafe.Pointer(dpy)).Fdefault_screen)*128)).Froot_visual
  10044. format = libxrender.XXRenderFindVisualFormat(tls, dpy, visual)
  10045. libc.Xprintf(tls, __ccgo_ts+24, libc.VaList(bp+64, libc.Int32FromUint64((*TVisual)(unsafe.Pointer(visual)).Fvisualid)))
  10046. if format != 0 {
  10047. if (*TXRenderPictFormat)(unsafe.Pointer(format)).Ftype1 == int32(m_PictTypeDirect) {
  10048. 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)))
  10049. } else {
  10050. libc.Xprintf(tls, __ccgo_ts+83, 0)
  10051. }
  10052. } else {
  10053. libc.Xprintf(tls, __ccgo_ts+99, 0)
  10054. }
  10055. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  10056. v3 = __ccgo_ts + 136
  10057. } else {
  10058. v3 = __ccgo_ts + 141
  10059. }
  10060. libc.Xprintf(tls, __ccgo_ts+147, libc.VaList(bp+64, v3))
  10061. }
  10062. i = 0
  10063. for {
  10064. if !(i < int32(m_XFT_NUM_SOLID_COLOR)) {
  10065. break
  10066. }
  10067. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fscreen = -int32(1)
  10068. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict = uint64(0)
  10069. goto _4
  10070. _4:
  10071. ;
  10072. i++
  10073. }
  10074. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts = libc.UintptrFromInt32(0)
  10075. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext = X_XftDisplayInfo
  10076. X_XftDisplayInfo = info
  10077. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory = uint64(0)
  10078. (*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)))
  10079. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10080. libc.Xprintf(tls, __ccgo_ts+216, libc.VaList(bp+64, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory))
  10081. }
  10082. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts = 0
  10083. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = XXftDefaultGetInteger(tls, dpy, __ccgo_ts+245, 0, int32(m_XFT_DPY_MAX_UNREF_FONTS))
  10084. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10085. libc.Xprintf(tls, __ccgo_ts+259, libc.VaList(bp+64, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts))
  10086. }
  10087. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage = m_FcFalse
  10088. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage = XXftDefaultGetBool(tls, dpy, __ccgo_ts+287, 0, m_FcFalse)
  10089. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10090. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage != 0 {
  10091. v5 = __ccgo_ts + 301
  10092. } else {
  10093. v5 = __ccgo_ts + 306
  10094. }
  10095. libc.Xprintf(tls, __ccgo_ts+312, libc.VaList(bp+64, v5))
  10096. }
  10097. libc.Xmemset(tls, info+472, int32('\000'), libc.Uint64FromInt64(8)*libc.Uint64FromInt32(m_XFT_NUM_FONT_HASH))
  10098. return info
  10099. goto bail1
  10100. bail1:
  10101. ;
  10102. libc.Xfree(tls, info)
  10103. goto bail0
  10104. bail0:
  10105. ;
  10106. if XXftDebug(tls)&int32(m_XFT_DBG_RENDER) != 0 {
  10107. libc.Xprintf(tls, __ccgo_ts+340, 0)
  10108. }
  10109. return libc.UintptrFromInt32(0)
  10110. }
  10111. /*
  10112. * Reduce memory usage in X server
  10113. */
  10114. func __XftDisplayValidateMemory(tls *libc.TLS, info uintptr) {
  10115. bp := tls.Alloc(32)
  10116. defer tls.Free(32)
  10117. var font, public uintptr
  10118. var glyph_memory uint64
  10119. _, _, _ = font, glyph_memory, public
  10120. glyph_memory = uint64(0)
  10121. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  10122. for {
  10123. if !(public != 0) {
  10124. break
  10125. }
  10126. font = public
  10127. glyph_memory += (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  10128. goto _1
  10129. _1:
  10130. ;
  10131. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  10132. }
  10133. if glyph_memory != (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory {
  10134. libc.Xprintf(tls, __ccgo_ts+393, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory, glyph_memory))
  10135. }
  10136. }
  10137. func X_XftDisplayManageMemory(tls *libc.TLS, dpy uintptr) {
  10138. bp := tls.Alloc(32)
  10139. defer tls.Free(32)
  10140. var font, info, public uintptr
  10141. var glyph_memory uint64
  10142. _, _, _, _ = font, glyph_memory, info, public
  10143. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  10144. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory != 0) {
  10145. return
  10146. }
  10147. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10148. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory {
  10149. libc.Xprintf(tls, __ccgo_ts+455, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory))
  10150. }
  10151. __XftDisplayValidateMemory(tls, info)
  10152. }
  10153. for (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory {
  10154. glyph_memory = libc.Uint64FromInt32(libc.Xrand(tls)) % (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory
  10155. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  10156. for public != 0 {
  10157. font = public
  10158. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > glyph_memory {
  10159. X_XftFontUncacheGlyph(tls, dpy, public)
  10160. break
  10161. }
  10162. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  10163. glyph_memory -= (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  10164. }
  10165. }
  10166. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10167. __XftDisplayValidateMemory(tls, info)
  10168. }
  10169. }
  10170. func XXftDefaultHasRender(tls *libc.TLS, dpy uintptr) (r int32) {
  10171. var info uintptr
  10172. _ = info
  10173. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10174. if !(info != 0) {
  10175. return m_False
  10176. }
  10177. return (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender
  10178. }
  10179. func XXftDefaultSet(tls *libc.TLS, dpy uintptr, defaults uintptr) (r int32) {
  10180. bp := tls.Alloc(16)
  10181. defer tls.Free(16)
  10182. var info, v1 uintptr
  10183. _, _ = info, v1
  10184. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10185. if !(info != 0) {
  10186. return m_False
  10187. }
  10188. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0 {
  10189. libfontconfig.XFcPatternDestroy(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults)
  10190. }
  10191. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = defaults
  10192. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory != 0) {
  10193. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory = libc.Uint64FromInt32(libc.Int32FromInt32(4) * libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024))
  10194. }
  10195. (*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)))
  10196. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10197. libc.Xprintf(tls, __ccgo_ts+493, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory))
  10198. }
  10199. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts != 0) {
  10200. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = int32(m_XFT_DPY_MAX_UNREF_FONTS)
  10201. }
  10202. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = XXftDefaultGetInteger(tls, dpy, __ccgo_ts+245, 0, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts)
  10203. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10204. libc.Xprintf(tls, __ccgo_ts+522, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts))
  10205. }
  10206. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage = XXftDefaultGetBool(tls, dpy, __ccgo_ts+287, 0, (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage)
  10207. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10208. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage != 0 {
  10209. v1 = __ccgo_ts + 301
  10210. } else {
  10211. v1 = __ccgo_ts + 306
  10212. }
  10213. libc.Xprintf(tls, __ccgo_ts+550, libc.VaList(bp+8, v1))
  10214. }
  10215. return int32(m_True)
  10216. }
  10217. func XXftDefaultParseBool(tls *libc.TLS, v uintptr) (r int32) {
  10218. var c0, c1 uint8
  10219. _, _ = c0, c1
  10220. c0 = *(*uint8)(unsafe.Pointer(v))
  10221. if libc.BoolInt32(libc.Uint32FromInt32(libc.Int32FromUint8(c0))-uint32('A') < uint32(26)) != 0 {
  10222. c0 = libc.Uint8FromInt32(libc.Xtolower(tls, libc.Int32FromUint8(c0)))
  10223. }
  10224. if libc.Int32FromUint8(c0) == int32('t') || libc.Int32FromUint8(c0) == int32('y') || libc.Int32FromUint8(c0) == int32('1') {
  10225. return int32(1)
  10226. }
  10227. if libc.Int32FromUint8(c0) == int32('f') || libc.Int32FromUint8(c0) == int32('n') || libc.Int32FromUint8(c0) == int32('0') {
  10228. return 0
  10229. }
  10230. if libc.Int32FromUint8(c0) == int32('o') {
  10231. c1 = *(*uint8)(unsafe.Pointer(v + 1))
  10232. if libc.BoolInt32(libc.Uint32FromInt32(libc.Int32FromUint8(c1))-uint32('A') < uint32(26)) != 0 {
  10233. c1 = libc.Uint8FromInt32(libc.Xtolower(tls, libc.Int32FromUint8(c1)))
  10234. }
  10235. if libc.Int32FromUint8(c1) == int32('n') {
  10236. return int32(1)
  10237. }
  10238. if libc.Int32FromUint8(c1) == int32('f') {
  10239. return 0
  10240. }
  10241. }
  10242. return -int32(1)
  10243. }
  10244. func __XftDefaultInitBool(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  10245. var i, v1 int32
  10246. var v uintptr
  10247. var v2 bool
  10248. _, _, _, _ = i, v, v1, v2
  10249. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+578, option)
  10250. if v2 = v != 0; v2 {
  10251. v1 = XXftDefaultParseBool(tls, v)
  10252. i = v1
  10253. }
  10254. if v2 && v1 >= 0 {
  10255. return libfontconfig.XFcPatternAddBool(tls, pat, option, libc.BoolInt32(i != 0))
  10256. }
  10257. return int32(m_True)
  10258. }
  10259. func __XftDefaultInitDouble(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  10260. bp := tls.Alloc(16)
  10261. defer tls.Free(16)
  10262. var d float64
  10263. var v uintptr
  10264. var _ /* e at bp+0 */ uintptr
  10265. _, _ = d, v
  10266. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+578, option)
  10267. if v != 0 {
  10268. d = libc.Xstrtod(tls, v, bp)
  10269. if *(*uintptr)(unsafe.Pointer(bp)) != v {
  10270. return libfontconfig.XFcPatternAddDouble(tls, pat, option, d)
  10271. }
  10272. }
  10273. return int32(m_True)
  10274. }
  10275. func __XftDefaultInitInteger(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  10276. bp := tls.Alloc(16)
  10277. defer tls.Free(16)
  10278. var v uintptr
  10279. var _ /* e at bp+0 */ uintptr
  10280. var _ /* i at bp+8 */ int32
  10281. _ = v
  10282. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+578, option)
  10283. if v != 0 {
  10284. if libfontconfig.XFcNameConstant(tls, v, bp+8) != 0 {
  10285. return libfontconfig.XFcPatternAddInteger(tls, pat, option, *(*int32)(unsafe.Pointer(bp + 8)))
  10286. }
  10287. *(*int32)(unsafe.Pointer(bp + 8)) = int32(libc.Xstrtol(tls, v, bp, 0))
  10288. if *(*uintptr)(unsafe.Pointer(bp)) != v {
  10289. return libfontconfig.XFcPatternAddInteger(tls, pat, option, *(*int32)(unsafe.Pointer(bp + 8)))
  10290. }
  10291. }
  10292. return int32(m_True)
  10293. }
  10294. func __XftDefaultInit(tls *libc.TLS, dpy uintptr) (r uintptr) {
  10295. var pat uintptr
  10296. _ = pat
  10297. pat = libfontconfig.XFcPatternCreate(tls)
  10298. if !(pat != 0) {
  10299. goto bail0
  10300. }
  10301. if !(__XftDefaultInitDouble(tls, dpy, pat, __ccgo_ts+582) != 0) {
  10302. goto bail1
  10303. }
  10304. if !(__XftDefaultInitDouble(tls, dpy, pat, __ccgo_ts+588) != 0) {
  10305. goto bail1
  10306. }
  10307. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+592) != 0) {
  10308. goto bail1
  10309. }
  10310. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+599) != 0) {
  10311. goto bail1
  10312. }
  10313. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+604) != 0) {
  10314. goto bail1
  10315. }
  10316. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+614) != 0) {
  10317. goto bail1
  10318. }
  10319. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+624) != 0) {
  10320. goto bail1
  10321. }
  10322. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+633) != 0) {
  10323. goto bail1
  10324. }
  10325. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+642) != 0) {
  10326. goto bail1
  10327. }
  10328. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+652) != 0) {
  10329. goto bail1
  10330. }
  10331. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+660) != 0) {
  10332. goto bail1
  10333. }
  10334. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+201) != 0) {
  10335. goto bail1
  10336. }
  10337. return pat
  10338. goto bail1
  10339. bail1:
  10340. ;
  10341. libfontconfig.XFcPatternDestroy(tls, pat)
  10342. goto bail0
  10343. bail0:
  10344. ;
  10345. return libc.UintptrFromInt32(0)
  10346. return r
  10347. }
  10348. func __XftDefaultGet(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, v uintptr) (r1 TFcResult) {
  10349. var info uintptr
  10350. var r TFcResult
  10351. _, _ = info, r
  10352. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10353. if !(info != 0) {
  10354. return int32(_FcResultNoMatch)
  10355. }
  10356. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0) {
  10357. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = __XftDefaultInit(tls, dpy)
  10358. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0) {
  10359. return int32(_FcResultNoMatch)
  10360. }
  10361. }
  10362. r = libfontconfig.XFcPatternGet(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults, object, screen, v)
  10363. if r == int32(_FcResultNoId) && screen > 0 {
  10364. r = libfontconfig.XFcPatternGet(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults, object, 0, v)
  10365. }
  10366. return r
  10367. }
  10368. func XXftDefaultGetBool(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, def int32) (r1 int32) {
  10369. bp := tls.Alloc(16)
  10370. defer tls.Free(16)
  10371. var r TFcResult
  10372. var _ /* v at bp+0 */ TFcValue
  10373. _ = r
  10374. r = __XftDefaultGet(tls, dpy, object, screen, bp)
  10375. if r != int32(_FcResultMatch) || (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 != int32(_FcTypeBool) {
  10376. return def
  10377. }
  10378. return *(*TFcBool)(unsafe.Pointer(bp + 8))
  10379. }
  10380. func XXftDefaultGetInteger(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, def int32) (r1 int32) {
  10381. bp := tls.Alloc(16)
  10382. defer tls.Free(16)
  10383. var r TFcResult
  10384. var _ /* v at bp+0 */ TFcValue
  10385. _ = r
  10386. r = __XftDefaultGet(tls, dpy, object, screen, bp)
  10387. if r != int32(_FcResultMatch) || (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 != int32(_FcTypeInteger) {
  10388. return def
  10389. }
  10390. return *(*int32)(unsafe.Pointer(bp + 8))
  10391. }
  10392. func XXftDefaultGetDouble(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, def float64) (r1 float64) {
  10393. bp := tls.Alloc(16)
  10394. defer tls.Free(16)
  10395. var r TFcResult
  10396. var _ /* v at bp+0 */ TFcValue
  10397. _ = r
  10398. r = __XftDefaultGet(tls, dpy, object, screen, bp)
  10399. if r != int32(_FcResultMatch) || (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 != int32(_FcTypeDouble) {
  10400. return def
  10401. }
  10402. return *(*float64)(unsafe.Pointer(bp + 8))
  10403. }
  10404. func XXftDefaultSubstitute(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr) {
  10405. bp := tls.Alloc(16)
  10406. defer tls.Free(16)
  10407. var dpi float64
  10408. var render_order, subpixel int32
  10409. var _ /* v at bp+0 */ TFcValue
  10410. _, _, _ = dpi, render_order, subpixel
  10411. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+592, 0, bp) == int32(_FcResultNoMatch) {
  10412. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+592, XXftDefaultGetBool(tls, dpy, __ccgo_ts+592, screen, XXftDefaultHasRender(tls, dpy)))
  10413. }
  10414. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+614, 0, bp) == int32(_FcResultNoMatch) {
  10415. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+614, XXftDefaultGetBool(tls, dpy, __ccgo_ts+614, screen, int32(m_True)))
  10416. }
  10417. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+624, 0, bp) == int32(_FcResultNoMatch) {
  10418. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+624, XXftDefaultGetBool(tls, dpy, __ccgo_ts+624, screen, m_False))
  10419. }
  10420. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+652, 0, bp) == int32(_FcResultNoMatch) {
  10421. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+652, XXftDefaultGetBool(tls, dpy, __ccgo_ts+652, screen, int32(m_True)))
  10422. }
  10423. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+642, 0, bp) == int32(_FcResultNoMatch) {
  10424. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+642, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+642, screen, int32(m_FC_HINT_FULL)))
  10425. }
  10426. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+633, 0, bp) == int32(_FcResultNoMatch) {
  10427. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+633, XXftDefaultGetBool(tls, dpy, __ccgo_ts+633, screen, m_False))
  10428. }
  10429. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+599, 0, bp) == int32(_FcResultNoMatch) {
  10430. subpixel = m_FC_RGBA_UNKNOWN
  10431. if XXftDefaultHasRender(tls, dpy) != 0 {
  10432. render_order = libxrender.XXRenderQuerySubpixelOrder(tls, dpy, screen)
  10433. switch render_order {
  10434. default:
  10435. fallthrough
  10436. case m_SubPixelUnknown:
  10437. subpixel = m_FC_RGBA_UNKNOWN
  10438. case int32(m_SubPixelHorizontalRGB):
  10439. subpixel = int32(m_FC_RGBA_RGB)
  10440. case int32(m_SubPixelHorizontalBGR):
  10441. subpixel = int32(m_FC_RGBA_BGR)
  10442. case int32(m_SubPixelVerticalRGB):
  10443. subpixel = int32(m_FC_RGBA_VRGB)
  10444. case int32(m_SubPixelVerticalBGR):
  10445. subpixel = int32(m_FC_RGBA_VBGR)
  10446. case int32(m_SubPixelNone):
  10447. subpixel = int32(m_FC_RGBA_NONE)
  10448. break
  10449. }
  10450. }
  10451. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+599, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+599, screen, subpixel))
  10452. }
  10453. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+604, 0, bp) == int32(_FcResultNoMatch) {
  10454. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+604, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+604, screen, int32(m_FC_LCD_DEFAULT)))
  10455. }
  10456. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+660, 0, bp) == int32(_FcResultNoMatch) {
  10457. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+660, XXftDefaultGetBool(tls, dpy, __ccgo_ts+660, screen, m_False))
  10458. }
  10459. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+588, 0, bp) == int32(_FcResultNoMatch) {
  10460. dpi = float64(float64((*TScreen)(unsafe.Pointer((*struct {
  10461. Fext_data uintptr
  10462. Fprivate1 uintptr
  10463. Ffd int32
  10464. Fprivate2 int32
  10465. Fproto_major_version int32
  10466. Fproto_minor_version int32
  10467. Fvendor uintptr
  10468. Fprivate3 TXID
  10469. Fprivate4 TXID
  10470. Fprivate5 TXID
  10471. Fprivate6 int32
  10472. Fresource_alloc uintptr
  10473. Fbyte_order int32
  10474. Fbitmap_unit int32
  10475. Fbitmap_pad int32
  10476. Fbitmap_bit_order int32
  10477. Fnformats int32
  10478. Fpixmap_format uintptr
  10479. Fprivate8 int32
  10480. Frelease int32
  10481. Fprivate9 uintptr
  10482. Fprivate10 uintptr
  10483. Fqlen int32
  10484. Flast_request_read uint64
  10485. Frequest uint64
  10486. Fprivate11 TXPointer
  10487. Fprivate12 TXPointer
  10488. Fprivate13 TXPointer
  10489. Fprivate14 TXPointer
  10490. Fmax_request_size uint32
  10491. Fdb uintptr
  10492. Fprivate15 uintptr
  10493. Fdisplay_name uintptr
  10494. Fdefault_screen int32
  10495. Fnscreens int32
  10496. Fscreens uintptr
  10497. Fmotion_buffer uint64
  10498. Fprivate16 uint64
  10499. Fmin_keycode int32
  10500. Fmax_keycode int32
  10501. Fprivate17 TXPointer
  10502. Fprivate18 TXPointer
  10503. Fprivate19 int32
  10504. Fxdefaults uintptr
  10505. })(unsafe.Pointer(dpy)).Fscreens+uintptr(screen)*128)).Fheight)*float64(25.4)) / float64((*TScreen)(unsafe.Pointer((*struct {
  10506. Fext_data uintptr
  10507. Fprivate1 uintptr
  10508. Ffd int32
  10509. Fprivate2 int32
  10510. Fproto_major_version int32
  10511. Fproto_minor_version int32
  10512. Fvendor uintptr
  10513. Fprivate3 TXID
  10514. Fprivate4 TXID
  10515. Fprivate5 TXID
  10516. Fprivate6 int32
  10517. Fresource_alloc uintptr
  10518. Fbyte_order int32
  10519. Fbitmap_unit int32
  10520. Fbitmap_pad int32
  10521. Fbitmap_bit_order int32
  10522. Fnformats int32
  10523. Fpixmap_format uintptr
  10524. Fprivate8 int32
  10525. Frelease int32
  10526. Fprivate9 uintptr
  10527. Fprivate10 uintptr
  10528. Fqlen int32
  10529. Flast_request_read uint64
  10530. Frequest uint64
  10531. Fprivate11 TXPointer
  10532. Fprivate12 TXPointer
  10533. Fprivate13 TXPointer
  10534. Fprivate14 TXPointer
  10535. Fmax_request_size uint32
  10536. Fdb uintptr
  10537. Fprivate15 uintptr
  10538. Fdisplay_name uintptr
  10539. Fdefault_screen int32
  10540. Fnscreens int32
  10541. Fscreens uintptr
  10542. Fmotion_buffer uint64
  10543. Fprivate16 uint64
  10544. Fmin_keycode int32
  10545. Fmax_keycode int32
  10546. Fprivate17 TXPointer
  10547. Fprivate18 TXPointer
  10548. Fprivate19 int32
  10549. Fxdefaults uintptr
  10550. })(unsafe.Pointer(dpy)).Fscreens+uintptr(screen)*128)).Fmheight)
  10551. libfontconfig.XFcPatternAddDouble(tls, pattern, __ccgo_ts+588, XXftDefaultGetDouble(tls, dpy, __ccgo_ts+588, screen, dpi))
  10552. }
  10553. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+582, 0, bp) == int32(_FcResultNoMatch) {
  10554. libfontconfig.XFcPatternAddDouble(tls, pattern, __ccgo_ts+582, XXftDefaultGetDouble(tls, dpy, __ccgo_ts+582, screen, float64(1)))
  10555. }
  10556. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+201, 0, bp) == int32(_FcResultNoMatch) {
  10557. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+201, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+201, screen, libc.Int32FromInt32(1024)*libc.Int32FromInt32(1024)))
  10558. }
  10559. libfontconfig.XFcDefaultSubstitute(tls, pattern)
  10560. }
  10561. const m_VisualIDMask1 = 1
  10562. const m_VisualScreenMask1 = 2
  10563. /* xftxlfd.c */
  10564. /*
  10565. * Ok, this is a pain. To share source pictures across multiple destinations,
  10566. * the screen for each drawable must be discovered.
  10567. */
  10568. func __XftDrawScreen(tls *libc.TLS, dpy uintptr, drawable TDrawable, visual uintptr) (r int32) {
  10569. bp := tls.Alloc(112)
  10570. defer tls.Free(112)
  10571. var ret uintptr
  10572. var s int32
  10573. var _ /* borderWidth at bp+24 */ uint32
  10574. var _ /* depth at bp+28 */ uint32
  10575. var _ /* height at bp+20 */ uint32
  10576. var _ /* nret at bp+96 */ int32
  10577. var _ /* root at bp+0 */ TWindow
  10578. var _ /* template at bp+32 */ TXVisualInfo
  10579. var _ /* width at bp+16 */ uint32
  10580. var _ /* x at bp+8 */ int32
  10581. var _ /* y at bp+12 */ int32
  10582. _, _ = ret, s
  10583. /* Special case the most common environment */
  10584. if (*struct {
  10585. Fext_data uintptr
  10586. Fprivate1 uintptr
  10587. Ffd int32
  10588. Fprivate2 int32
  10589. Fproto_major_version int32
  10590. Fproto_minor_version int32
  10591. Fvendor uintptr
  10592. Fprivate3 TXID
  10593. Fprivate4 TXID
  10594. Fprivate5 TXID
  10595. Fprivate6 int32
  10596. Fresource_alloc uintptr
  10597. Fbyte_order int32
  10598. Fbitmap_unit int32
  10599. Fbitmap_pad int32
  10600. Fbitmap_bit_order int32
  10601. Fnformats int32
  10602. Fpixmap_format uintptr
  10603. Fprivate8 int32
  10604. Frelease int32
  10605. Fprivate9 uintptr
  10606. Fprivate10 uintptr
  10607. Fqlen int32
  10608. Flast_request_read uint64
  10609. Frequest uint64
  10610. Fprivate11 TXPointer
  10611. Fprivate12 TXPointer
  10612. Fprivate13 TXPointer
  10613. Fprivate14 TXPointer
  10614. Fmax_request_size uint32
  10615. Fdb uintptr
  10616. Fprivate15 uintptr
  10617. Fdisplay_name uintptr
  10618. Fdefault_screen int32
  10619. Fnscreens int32
  10620. Fscreens uintptr
  10621. Fmotion_buffer uint64
  10622. Fprivate16 uint64
  10623. Fmin_keycode int32
  10624. Fmax_keycode int32
  10625. Fprivate17 TXPointer
  10626. Fprivate18 TXPointer
  10627. Fprivate19 int32
  10628. Fxdefaults uintptr
  10629. })(unsafe.Pointer(dpy)).Fnscreens == int32(1) {
  10630. return 0
  10631. }
  10632. /*
  10633. * If we've got a visual, look for the screen that points at it.
  10634. * This requires no round trip.
  10635. */
  10636. if visual != 0 {
  10637. s = 0
  10638. for {
  10639. if !(s < (*struct {
  10640. Fext_data uintptr
  10641. Fprivate1 uintptr
  10642. Ffd int32
  10643. Fprivate2 int32
  10644. Fproto_major_version int32
  10645. Fproto_minor_version int32
  10646. Fvendor uintptr
  10647. Fprivate3 TXID
  10648. Fprivate4 TXID
  10649. Fprivate5 TXID
  10650. Fprivate6 int32
  10651. Fresource_alloc uintptr
  10652. Fbyte_order int32
  10653. Fbitmap_unit int32
  10654. Fbitmap_pad int32
  10655. Fbitmap_bit_order int32
  10656. Fnformats int32
  10657. Fpixmap_format uintptr
  10658. Fprivate8 int32
  10659. Frelease int32
  10660. Fprivate9 uintptr
  10661. Fprivate10 uintptr
  10662. Fqlen int32
  10663. Flast_request_read uint64
  10664. Frequest uint64
  10665. Fprivate11 TXPointer
  10666. Fprivate12 TXPointer
  10667. Fprivate13 TXPointer
  10668. Fprivate14 TXPointer
  10669. Fmax_request_size uint32
  10670. Fdb uintptr
  10671. Fprivate15 uintptr
  10672. Fdisplay_name uintptr
  10673. Fdefault_screen int32
  10674. Fnscreens int32
  10675. Fscreens uintptr
  10676. Fmotion_buffer uint64
  10677. Fprivate16 uint64
  10678. Fmin_keycode int32
  10679. Fmax_keycode int32
  10680. Fprivate17 TXPointer
  10681. Fprivate18 TXPointer
  10682. Fprivate19 int32
  10683. Fxdefaults uintptr
  10684. })(unsafe.Pointer(dpy)).Fnscreens) {
  10685. break
  10686. }
  10687. (*(*TXVisualInfo)(unsafe.Pointer(bp + 32))).Fvisualid = (*TVisual)(unsafe.Pointer(visual)).Fvisualid
  10688. (*(*TXVisualInfo)(unsafe.Pointer(bp + 32))).Fscreen = s
  10689. ret = libx11.XXGetVisualInfo(tls, dpy, int64(libc.Int32FromInt32(m_VisualIDMask1)|libc.Int32FromInt32(m_VisualScreenMask1)), bp+32, bp+96)
  10690. if ret != 0 {
  10691. libx11.XXFree(tls, ret)
  10692. return s
  10693. }
  10694. goto _1
  10695. _1:
  10696. ;
  10697. s++
  10698. }
  10699. }
  10700. /*
  10701. * Otherwise, as the server for the drawable geometry and find
  10702. * the screen from the root window.
  10703. * This takes a round trip.
  10704. */
  10705. if libx11.XXGetGeometry(tls, dpy, drawable, bp, bp+8, bp+12, bp+16, bp+20, bp+24, bp+28) != 0 {
  10706. s = 0
  10707. for {
  10708. if !(s < (*struct {
  10709. Fext_data uintptr
  10710. Fprivate1 uintptr
  10711. Ffd int32
  10712. Fprivate2 int32
  10713. Fproto_major_version int32
  10714. Fproto_minor_version int32
  10715. Fvendor uintptr
  10716. Fprivate3 TXID
  10717. Fprivate4 TXID
  10718. Fprivate5 TXID
  10719. Fprivate6 int32
  10720. Fresource_alloc uintptr
  10721. Fbyte_order int32
  10722. Fbitmap_unit int32
  10723. Fbitmap_pad int32
  10724. Fbitmap_bit_order int32
  10725. Fnformats int32
  10726. Fpixmap_format uintptr
  10727. Fprivate8 int32
  10728. Frelease int32
  10729. Fprivate9 uintptr
  10730. Fprivate10 uintptr
  10731. Fqlen int32
  10732. Flast_request_read uint64
  10733. Frequest uint64
  10734. Fprivate11 TXPointer
  10735. Fprivate12 TXPointer
  10736. Fprivate13 TXPointer
  10737. Fprivate14 TXPointer
  10738. Fmax_request_size uint32
  10739. Fdb uintptr
  10740. Fprivate15 uintptr
  10741. Fdisplay_name uintptr
  10742. Fdefault_screen int32
  10743. Fnscreens int32
  10744. Fscreens uintptr
  10745. Fmotion_buffer uint64
  10746. Fprivate16 uint64
  10747. Fmin_keycode int32
  10748. Fmax_keycode int32
  10749. Fprivate17 TXPointer
  10750. Fprivate18 TXPointer
  10751. Fprivate19 int32
  10752. Fxdefaults uintptr
  10753. })(unsafe.Pointer(dpy)).Fnscreens) {
  10754. break
  10755. }
  10756. if (*TScreen)(unsafe.Pointer((*struct {
  10757. Fext_data uintptr
  10758. Fprivate1 uintptr
  10759. Ffd int32
  10760. Fprivate2 int32
  10761. Fproto_major_version int32
  10762. Fproto_minor_version int32
  10763. Fvendor uintptr
  10764. Fprivate3 TXID
  10765. Fprivate4 TXID
  10766. Fprivate5 TXID
  10767. Fprivate6 int32
  10768. Fresource_alloc uintptr
  10769. Fbyte_order int32
  10770. Fbitmap_unit int32
  10771. Fbitmap_pad int32
  10772. Fbitmap_bit_order int32
  10773. Fnformats int32
  10774. Fpixmap_format uintptr
  10775. Fprivate8 int32
  10776. Frelease int32
  10777. Fprivate9 uintptr
  10778. Fprivate10 uintptr
  10779. Fqlen int32
  10780. Flast_request_read uint64
  10781. Frequest uint64
  10782. Fprivate11 TXPointer
  10783. Fprivate12 TXPointer
  10784. Fprivate13 TXPointer
  10785. Fprivate14 TXPointer
  10786. Fmax_request_size uint32
  10787. Fdb uintptr
  10788. Fprivate15 uintptr
  10789. Fdisplay_name uintptr
  10790. Fdefault_screen int32
  10791. Fnscreens int32
  10792. Fscreens uintptr
  10793. Fmotion_buffer uint64
  10794. Fprivate16 uint64
  10795. Fmin_keycode int32
  10796. Fmax_keycode int32
  10797. Fprivate17 TXPointer
  10798. Fprivate18 TXPointer
  10799. Fprivate19 int32
  10800. Fxdefaults uintptr
  10801. })(unsafe.Pointer(dpy)).Fscreens+uintptr(s)*128)).Froot == *(*TWindow)(unsafe.Pointer(bp)) {
  10802. return s
  10803. }
  10804. goto _2
  10805. _2:
  10806. ;
  10807. s++
  10808. }
  10809. }
  10810. /*
  10811. * Make a guess -- it's probably wrong, but then the app probably
  10812. * handed us a bogus drawable in this case
  10813. */
  10814. return 0
  10815. }
  10816. func XXftDrawDepth(tls *libc.TLS, draw uintptr) (r uint32) {
  10817. bp := tls.Alloc(32)
  10818. defer tls.Free(32)
  10819. var _ /* borderWidth at bp+24 */ uint32
  10820. var _ /* depth at bp+28 */ uint32
  10821. var _ /* height at bp+20 */ uint32
  10822. var _ /* root at bp+0 */ TWindow
  10823. var _ /* width at bp+16 */ uint32
  10824. var _ /* x at bp+8 */ int32
  10825. var _ /* y at bp+12 */ int32
  10826. if !((*TXftDraw)(unsafe.Pointer(draw)).Fdepth != 0) {
  10827. 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 {
  10828. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = *(*uint32)(unsafe.Pointer(bp + 28))
  10829. }
  10830. }
  10831. return (*TXftDraw)(unsafe.Pointer(draw)).Fdepth
  10832. }
  10833. func XXftDrawBitsPerPixel(tls *libc.TLS, draw uintptr) (r uint32) {
  10834. bp := tls.Alloc(16)
  10835. defer tls.Free(16)
  10836. var depth, v1 uint32
  10837. var formats, v2 uintptr
  10838. var i int32
  10839. var v3 bool
  10840. var _ /* nformats at bp+0 */ int32
  10841. _, _, _, _, _, _ = depth, formats, i, v1, v2, v3
  10842. if !((*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel != 0) {
  10843. v1 = XXftDrawDepth(tls, draw)
  10844. depth = v1
  10845. if v3 = v1 != 0; v3 {
  10846. v2 = libx11.XXListPixmapFormats(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, bp)
  10847. formats = v2
  10848. }
  10849. if v3 && v2 != 0 {
  10850. i = 0
  10851. for {
  10852. if !(i < *(*int32)(unsafe.Pointer(bp))) {
  10853. break
  10854. }
  10855. if libc.Uint32FromInt32((*(*TXPixmapFormatValues)(unsafe.Pointer(formats + uintptr(i)*12))).Fdepth) == depth {
  10856. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = libc.Uint32FromInt32((*(*TXPixmapFormatValues)(unsafe.Pointer(formats + uintptr(i)*12))).Fbits_per_pixel)
  10857. break
  10858. }
  10859. goto _4
  10860. _4:
  10861. ;
  10862. i++
  10863. }
  10864. libx11.XXFree(tls, formats)
  10865. }
  10866. }
  10867. return (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel
  10868. }
  10869. func XXftDrawCreate(tls *libc.TLS, dpy uintptr, drawable TDrawable, visual uintptr, colormap TColormap) (r uintptr) {
  10870. var draw uintptr
  10871. _ = draw
  10872. draw = libc.Xmalloc(tls, uint64(96))
  10873. if !(draw != 0) {
  10874. return libc.UintptrFromInt32(0)
  10875. }
  10876. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  10877. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = drawable
  10878. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, drawable, visual)
  10879. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = uint32(0) /* don't find out unless we need to know */
  10880. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(0) /* don't find out unless we need to know */
  10881. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = visual
  10882. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = colormap
  10883. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10884. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10885. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  10886. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  10887. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  10888. XXftMemAlloc(tls, int32(_XFT_MEM_DRAW), uint64(96))
  10889. return draw
  10890. }
  10891. func XXftDrawCreateBitmap(tls *libc.TLS, dpy uintptr, bitmap TPixmap) (r uintptr) {
  10892. var draw uintptr
  10893. _ = draw
  10894. draw = libc.Xmalloc(tls, uint64(96))
  10895. if !(draw != 0) {
  10896. return libc.UintptrFromInt32(0)
  10897. }
  10898. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  10899. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = bitmap
  10900. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, bitmap, libc.UintptrFromInt32(0))
  10901. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = uint32(1)
  10902. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(1)
  10903. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = libc.UintptrFromInt32(0)
  10904. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = uint64(0)
  10905. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10906. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10907. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  10908. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  10909. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  10910. XXftMemAlloc(tls, int32(_XFT_MEM_DRAW), uint64(96))
  10911. return draw
  10912. }
  10913. func XXftDrawCreateAlpha(tls *libc.TLS, dpy uintptr, pixmap TPixmap, depth int32) (r uintptr) {
  10914. var draw uintptr
  10915. _ = draw
  10916. draw = libc.Xmalloc(tls, uint64(96))
  10917. if !(draw != 0) {
  10918. return libc.UintptrFromInt32(0)
  10919. }
  10920. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  10921. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = pixmap
  10922. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, pixmap, libc.UintptrFromInt32(0))
  10923. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = libc.Uint32FromInt32(depth)
  10924. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(0) /* don't find out until we need it */
  10925. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = libc.UintptrFromInt32(0)
  10926. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = uint64(0)
  10927. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10928. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10929. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  10930. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  10931. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  10932. XXftMemAlloc(tls, int32(_XFT_MEM_DRAW), uint64(96))
  10933. return draw
  10934. }
  10935. func __XftDrawFormat(tls *libc.TLS, draw uintptr) (r uintptr) {
  10936. bp := tls.Alloc(48)
  10937. defer tls.Free(48)
  10938. var info uintptr
  10939. var _ /* pf at bp+0 */ TXRenderPictFormat
  10940. _ = info
  10941. info = X_XftDisplayInfoGet(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, int32(m_True))
  10942. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0) {
  10943. return libc.UintptrFromInt32(0)
  10944. }
  10945. if (*TXftDraw)(unsafe.Pointer(draw)).Fvisual == libc.UintptrFromInt32(0) {
  10946. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Ftype1 = int32(m_PictTypeDirect)
  10947. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth = libc.Int32FromUint32(XXftDrawDepth(tls, draw))
  10948. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.Falpha = 0
  10949. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FalphaMask = int16(libc.Int32FromInt32(1)<<(*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth - libc.Int32FromInt32(1))
  10950. 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)
  10951. } else {
  10952. return libxrender.XXRenderFindVisualFormat(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fvisual)
  10953. }
  10954. return r
  10955. }
  10956. func XXftDrawChange(tls *libc.TLS, draw uintptr, drawable TDrawable) {
  10957. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = drawable
  10958. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  10959. libxrender.XXRenderFreePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict)
  10960. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10961. }
  10962. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  10963. libx11.XXFreeGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc)
  10964. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10965. }
  10966. }
  10967. func XXftDrawDisplay(tls *libc.TLS, draw uintptr) (r uintptr) {
  10968. return (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  10969. }
  10970. func XXftDrawDrawable(tls *libc.TLS, draw uintptr) (r TDrawable) {
  10971. return (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable
  10972. }
  10973. func XXftDrawColormap(tls *libc.TLS, draw uintptr) (r TColormap) {
  10974. return (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap
  10975. }
  10976. func XXftDrawVisual(tls *libc.TLS, draw uintptr) (r uintptr) {
  10977. return (*TXftDraw)(unsafe.Pointer(draw)).Fvisual
  10978. }
  10979. func XXftDrawDestroy(tls *libc.TLS, draw uintptr) {
  10980. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  10981. libxrender.XXRenderFreePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict)
  10982. }
  10983. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  10984. libx11.XXFreeGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc)
  10985. }
  10986. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  10987. case int32(_XftClipTypeRegion):
  10988. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 56)))
  10989. case int32(_XftClipTypeRectangles):
  10990. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 56)))
  10991. case int32(_XftClipTypeNone):
  10992. break
  10993. }
  10994. XXftMemFree(tls, int32(_XFT_MEM_DRAW), uint64(96))
  10995. libc.Xfree(tls, draw)
  10996. }
  10997. func XXftDrawSrcPicture(tls *libc.TLS, draw uintptr, color uintptr) (r TPicture) {
  10998. bp := tls.Alloc(96)
  10999. defer tls.Free(96)
  11000. var dpy, info uintptr
  11001. var i int32
  11002. var pix TPixmap
  11003. var _ /* bitmapColor at bp+0 */ TXftColor
  11004. var _ /* pa at bp+16 */ TXRenderPictureAttributes
  11005. _, _, _, _ = dpy, i, info, pix
  11006. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  11007. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  11008. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat != 0) {
  11009. return uint64(0)
  11010. }
  11011. /*
  11012. * Monochrome targets require special handling; the PictOp controls
  11013. * the color, and the color must be opaque
  11014. */
  11015. if !((*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0) && (*TXftDraw)(unsafe.Pointer(draw)).Fdepth == uint32(1) {
  11016. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Falpha = uint16(0xffff)
  11017. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fred = uint16(0xffff)
  11018. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fgreen = uint16(0xffff)
  11019. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fblue = uint16(0xffff)
  11020. color = bp
  11021. }
  11022. /*
  11023. * See if there's one already available
  11024. */
  11025. i = 0
  11026. for {
  11027. if !(i < int32(m_XFT_NUM_SOLID_COLOR)) {
  11028. break
  11029. }
  11030. 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) {
  11031. return (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict
  11032. }
  11033. goto _1
  11034. _1:
  11035. ;
  11036. i++
  11037. }
  11038. /*
  11039. * Pick one to replace at random
  11040. */
  11041. i = libc.Int32FromUint32(libc.Uint32FromInt32(libc.Xrand(tls)) % uint32(m_XFT_NUM_SOLID_COLOR))
  11042. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasSolid != 0 {
  11043. /*
  11044. * Free any existing entry
  11045. */
  11046. if (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict != 0 {
  11047. libxrender.XXRenderFreePicture(tls, dpy, (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict)
  11048. }
  11049. /*
  11050. * Create picture
  11051. */
  11052. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict = libxrender.XXRenderCreateSolidFill(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, color+8)
  11053. } else {
  11054. 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 {
  11055. libxrender.XXRenderFreePicture(tls, dpy, (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict)
  11056. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict = uint64(0)
  11057. }
  11058. /*
  11059. * Create picture if necessary
  11060. */
  11061. if !((*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict != 0) {
  11062. pix = libx11.XXCreatePixmap(tls, dpy, (*TScreen)(unsafe.Pointer((*struct {
  11063. Fext_data uintptr
  11064. Fprivate1 uintptr
  11065. Ffd int32
  11066. Fprivate2 int32
  11067. Fproto_major_version int32
  11068. Fproto_minor_version int32
  11069. Fvendor uintptr
  11070. Fprivate3 TXID
  11071. Fprivate4 TXID
  11072. Fprivate5 TXID
  11073. Fprivate6 int32
  11074. Fresource_alloc uintptr
  11075. Fbyte_order int32
  11076. Fbitmap_unit int32
  11077. Fbitmap_pad int32
  11078. Fbitmap_bit_order int32
  11079. Fnformats int32
  11080. Fpixmap_format uintptr
  11081. Fprivate8 int32
  11082. Frelease int32
  11083. Fprivate9 uintptr
  11084. Fprivate10 uintptr
  11085. Fqlen int32
  11086. Flast_request_read uint64
  11087. Frequest uint64
  11088. Fprivate11 TXPointer
  11089. Fprivate12 TXPointer
  11090. Fprivate13 TXPointer
  11091. Fprivate14 TXPointer
  11092. Fmax_request_size uint32
  11093. Fdb uintptr
  11094. Fprivate15 uintptr
  11095. Fdisplay_name uintptr
  11096. Fdefault_screen int32
  11097. Fnscreens int32
  11098. Fscreens uintptr
  11099. Fmotion_buffer uint64
  11100. Fprivate16 uint64
  11101. Fmin_keycode int32
  11102. Fmax_keycode int32
  11103. Fprivate17 TXPointer
  11104. Fprivate18 TXPointer
  11105. Fprivate19 int32
  11106. Fxdefaults uintptr
  11107. })(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))
  11108. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp + 16))).Frepeat = int32(m_True)
  11109. (*(*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)
  11110. libx11.XXFreePixmap(tls, dpy, pix)
  11111. }
  11112. /*
  11113. * Set to the new color
  11114. */
  11115. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fcolor = (*TXftColor)(unsafe.Pointer(color)).Fcolor
  11116. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fscreen = (*TXftDraw)(unsafe.Pointer(draw)).Fscreen
  11117. libxrender.XXRenderFillRectangle(tls, dpy, int32(m_PictOpSrc), (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict, color+8, 0, 0, uint32(1), uint32(1))
  11118. }
  11119. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fcolor = (*TXftColor)(unsafe.Pointer(color)).Fcolor
  11120. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fscreen = (*TXftDraw)(unsafe.Pointer(draw)).Fscreen
  11121. return (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict
  11122. }
  11123. func __XftDrawOp(tls *libc.TLS, draw uintptr, color uintptr) (r int32) {
  11124. if (*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0 || (*TXftDraw)(unsafe.Pointer(draw)).Fdepth != uint32(1) {
  11125. return int32(m_PictOpOver)
  11126. }
  11127. if libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >= int32(0x8000) {
  11128. return int32(m_PictOpOver)
  11129. }
  11130. return int32(m_PictOpOutReverse)
  11131. }
  11132. func __XftDrawRenderPrepare(tls *libc.TLS, draw uintptr) (r TFcBool) {
  11133. bp := tls.Alloc(80)
  11134. defer tls.Free(80)
  11135. var format uintptr
  11136. var mask uint64
  11137. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  11138. _, _ = format, mask
  11139. if !((*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0) {
  11140. mask = uint64(0)
  11141. format = __XftDrawFormat(tls, draw)
  11142. if !(format != 0) {
  11143. return m_FcFalse
  11144. }
  11145. if (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode == int32(m_IncludeInferiors) {
  11146. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fsubwindow_mode = int32(m_IncludeInferiors)
  11147. mask |= libc.Uint64FromInt32(libc.Int32FromInt32(1) << libc.Int32FromInt32(8))
  11148. }
  11149. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = libxrender.XXRenderCreatePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, format, mask, bp)
  11150. if !((*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0) {
  11151. return m_FcFalse
  11152. }
  11153. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11154. case int32(_XftClipTypeRegion):
  11155. libxrender.XXRenderSetPictureClipRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11156. case int32(_XftClipTypeRectangles):
  11157. 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)
  11158. case int32(_XftClipTypeNone):
  11159. break
  11160. }
  11161. }
  11162. return int32(m_FcTrue)
  11163. }
  11164. func __XftDrawCorePrepare(tls *libc.TLS, draw uintptr, color uintptr) (r TFcBool) {
  11165. bp := tls.Alloc(128)
  11166. defer tls.Free(128)
  11167. var mask uint64
  11168. var _ /* gcv at bp+0 */ TXGCValues
  11169. _ = mask
  11170. if !((*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0) {
  11171. mask = uint64(0)
  11172. if (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode == int32(m_IncludeInferiors) {
  11173. (*(*TXGCValues)(unsafe.Pointer(bp))).Fsubwindow_mode = int32(m_IncludeInferiors)
  11174. mask |= libc.Uint64FromInt64(libc.Int64FromInt64(1) << libc.Int32FromInt32(15))
  11175. }
  11176. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libx11.XXCreateGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, mask, bp)
  11177. if !((*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0) {
  11178. return m_FcFalse
  11179. }
  11180. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11181. case int32(_XftClipTypeRegion):
  11182. libx11.XXSetRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11183. case int32(_XftClipTypeRectangles):
  11184. 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)
  11185. case int32(_XftClipTypeNone):
  11186. break
  11187. }
  11188. }
  11189. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  11190. return int32(m_FcTrue)
  11191. }
  11192. func XXftDrawPicture(tls *libc.TLS, draw uintptr) (r TPicture) {
  11193. if !(__XftDrawRenderPrepare(tls, draw) != 0) {
  11194. return uint64(0)
  11195. }
  11196. return (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict
  11197. }
  11198. func XXftDrawGlyphs(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, glyphs uintptr, nglyphs int32) {
  11199. var font uintptr
  11200. var src, v1 TPicture
  11201. var v2 bool
  11202. _, _, _, _ = font, src, v1, v2
  11203. font = pub
  11204. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  11205. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  11206. v1 = XXftDrawSrcPicture(tls, draw, color)
  11207. src = v1
  11208. }
  11209. if v2 && v1 != 0 {
  11210. 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)
  11211. }
  11212. } else {
  11213. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11214. XXftGlyphCore(tls, draw, color, pub, x, y, glyphs, nglyphs)
  11215. }
  11216. }
  11217. }
  11218. func XXftDrawString8(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11219. bp := tls.Alloc(4128)
  11220. defer tls.Free(4128)
  11221. var glyphs uintptr
  11222. var i int32
  11223. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11224. _, _ = glyphs, i
  11225. if XXftDebug(tls)&int32(m_XFT_DBG_DRAW) != 0 {
  11226. libc.Xprintf(tls, __ccgo_ts+669, libc.VaList(bp+4104, len1, len1, string1))
  11227. }
  11228. if len1 <= int32(m_NUM_LOCAL) {
  11229. glyphs = bp
  11230. } else {
  11231. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11232. if !(glyphs != 0) {
  11233. return
  11234. }
  11235. }
  11236. i = 0
  11237. for {
  11238. if !(i < len1) {
  11239. break
  11240. }
  11241. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  11242. goto _1
  11243. _1:
  11244. ;
  11245. i++
  11246. }
  11247. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  11248. if glyphs != bp {
  11249. libc.Xfree(tls, glyphs)
  11250. }
  11251. }
  11252. func XXftDrawString16(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11253. bp := tls.Alloc(4096)
  11254. defer tls.Free(4096)
  11255. var glyphs uintptr
  11256. var i int32
  11257. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11258. _, _ = glyphs, i
  11259. if len1 <= 0 {
  11260. return
  11261. }
  11262. if len1 <= int32(m_NUM_LOCAL) {
  11263. glyphs = bp
  11264. } else {
  11265. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11266. if !(glyphs != 0) {
  11267. return
  11268. }
  11269. }
  11270. i = 0
  11271. for {
  11272. if !(i < len1) {
  11273. break
  11274. }
  11275. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  11276. goto _1
  11277. _1:
  11278. ;
  11279. i++
  11280. }
  11281. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  11282. if glyphs != bp {
  11283. libc.Xfree(tls, glyphs)
  11284. }
  11285. }
  11286. func XXftDrawString32(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11287. bp := tls.Alloc(4096)
  11288. defer tls.Free(4096)
  11289. var glyphs uintptr
  11290. var i int32
  11291. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11292. _, _ = glyphs, i
  11293. if len1 <= 0 {
  11294. return
  11295. }
  11296. if len1 <= int32(m_NUM_LOCAL) {
  11297. glyphs = bp
  11298. } else {
  11299. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11300. if !(glyphs != 0) {
  11301. return
  11302. }
  11303. }
  11304. i = 0
  11305. for {
  11306. if !(i < len1) {
  11307. break
  11308. }
  11309. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  11310. goto _1
  11311. _1:
  11312. ;
  11313. i++
  11314. }
  11315. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  11316. if glyphs != bp {
  11317. libc.Xfree(tls, glyphs)
  11318. }
  11319. }
  11320. func XXftDrawStringUtf8(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11321. bp := tls.Alloc(4112)
  11322. defer tls.Free(4112)
  11323. var glyphs, glyphs_new uintptr
  11324. var i, l, size, v1, v3 int32
  11325. var v2 bool
  11326. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11327. var _ /* ucs4 at bp+4096 */ TFcChar32
  11328. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  11329. if len1 <= 0 {
  11330. return
  11331. }
  11332. i = 0
  11333. glyphs = bp
  11334. size = int32(m_NUM_LOCAL)
  11335. for {
  11336. if v2 = len1 != 0; v2 {
  11337. v1 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  11338. l = v1
  11339. }
  11340. if !(v2 && v1 > 0) {
  11341. break
  11342. }
  11343. if i == size {
  11344. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*libc.Int32FromInt32(2))*uint64(4))
  11345. if !(glyphs_new != 0) {
  11346. if glyphs != bp {
  11347. libc.Xfree(tls, glyphs)
  11348. }
  11349. return
  11350. }
  11351. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  11352. size *= int32(2)
  11353. if glyphs != bp {
  11354. libc.Xfree(tls, glyphs)
  11355. }
  11356. glyphs = glyphs_new
  11357. }
  11358. v3 = i
  11359. i++
  11360. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11361. string1 += uintptr(l)
  11362. len1 -= l
  11363. }
  11364. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, i)
  11365. if glyphs != bp {
  11366. libc.Xfree(tls, glyphs)
  11367. }
  11368. }
  11369. func XXftDrawStringUtf16(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, endian TFcEndian, len1 int32) {
  11370. bp := tls.Alloc(4112)
  11371. defer tls.Free(4112)
  11372. var glyphs, glyphs_new uintptr
  11373. var i, l, size, v1, v3 int32
  11374. var v2 bool
  11375. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11376. var _ /* ucs4 at bp+4096 */ TFcChar32
  11377. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  11378. if len1 <= 0 {
  11379. return
  11380. }
  11381. i = 0
  11382. glyphs = bp
  11383. size = int32(m_NUM_LOCAL)
  11384. for {
  11385. if v2 = len1 != 0; v2 {
  11386. v1 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  11387. l = v1
  11388. }
  11389. if !(v2 && v1 > 0) {
  11390. break
  11391. }
  11392. if i == size {
  11393. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*libc.Int32FromInt32(2))*uint64(4))
  11394. if !(glyphs_new != 0) {
  11395. if glyphs != bp {
  11396. libc.Xfree(tls, glyphs)
  11397. }
  11398. return
  11399. }
  11400. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  11401. size *= int32(2)
  11402. if glyphs != bp {
  11403. libc.Xfree(tls, glyphs)
  11404. }
  11405. glyphs = glyphs_new
  11406. }
  11407. v3 = i
  11408. i++
  11409. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11410. string1 += uintptr(l)
  11411. len1 -= l
  11412. }
  11413. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, i)
  11414. if glyphs != bp {
  11415. libc.Xfree(tls, glyphs)
  11416. }
  11417. }
  11418. func XXftDrawGlyphSpec(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, glyphs uintptr, len1 int32) {
  11419. var font uintptr
  11420. var src, v1 TPicture
  11421. var v2 bool
  11422. _, _, _, _ = font, src, v1, v2
  11423. font = pub
  11424. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  11425. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  11426. v1 = XXftDrawSrcPicture(tls, draw, color)
  11427. src = v1
  11428. }
  11429. if v2 && v1 != 0 {
  11430. XXftGlyphSpecRender(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, __XftDrawOp(tls, draw, color), src, pub, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, 0, 0, glyphs, len1)
  11431. }
  11432. } else {
  11433. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11434. XXftGlyphSpecCore(tls, draw, color, pub, glyphs, len1)
  11435. }
  11436. }
  11437. }
  11438. func XXftDrawGlyphFontSpec(tls *libc.TLS, draw uintptr, color uintptr, glyphs uintptr, len1 int32) {
  11439. var i, start int32
  11440. var src, v1 TPicture
  11441. var v2 bool
  11442. _, _, _, _, _ = i, src, start, v1, v2
  11443. i = 0
  11444. for i < len1 {
  11445. start = i
  11446. if (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Fformat != 0 {
  11447. for i < len1 && (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Fformat != 0 {
  11448. i++
  11449. }
  11450. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  11451. v1 = XXftDrawSrcPicture(tls, draw, color)
  11452. src = v1
  11453. }
  11454. if v2 && v1 != 0 {
  11455. 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)
  11456. }
  11457. } else {
  11458. for i < len1 && !((*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Fformat != 0) {
  11459. i++
  11460. }
  11461. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11462. XXftGlyphFontSpecCore(tls, draw, color, glyphs+uintptr(start)*16, i-start)
  11463. }
  11464. }
  11465. }
  11466. }
  11467. func XXftDrawCharSpec(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, chars uintptr, len1 int32) {
  11468. bp := tls.Alloc(8192)
  11469. defer tls.Free(8192)
  11470. var glyphs uintptr
  11471. var i int32
  11472. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphSpec
  11473. _, _ = glyphs, i
  11474. if len1 <= 0 {
  11475. return
  11476. }
  11477. if len1 <= int32(m_NUM_LOCAL) {
  11478. glyphs = bp
  11479. } else {
  11480. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(8))
  11481. if !(glyphs != 0) {
  11482. return
  11483. }
  11484. }
  11485. i = 0
  11486. for {
  11487. if !(i < len1) {
  11488. break
  11489. }
  11490. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fucs4)
  11491. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fx
  11492. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fy
  11493. goto _1
  11494. _1:
  11495. ;
  11496. i++
  11497. }
  11498. XXftDrawGlyphSpec(tls, draw, color, pub, glyphs, len1)
  11499. if glyphs != bp {
  11500. libc.Xfree(tls, glyphs)
  11501. }
  11502. }
  11503. func XXftDrawCharFontSpec(tls *libc.TLS, draw uintptr, color uintptr, chars uintptr, len1 int32) {
  11504. bp := tls.Alloc(16384)
  11505. defer tls.Free(16384)
  11506. var glyphs uintptr
  11507. var i int32
  11508. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphFontSpec
  11509. _, _ = glyphs, i
  11510. if len1 <= 0 {
  11511. return
  11512. }
  11513. if len1 <= int32(m_NUM_LOCAL) {
  11514. glyphs = bp
  11515. } else {
  11516. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(16))
  11517. if !(glyphs != 0) {
  11518. return
  11519. }
  11520. }
  11521. i = 0
  11522. for {
  11523. if !(i < len1) {
  11524. break
  11525. }
  11526. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Ffont
  11527. (*(*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)
  11528. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fx
  11529. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fy
  11530. goto _1
  11531. _1:
  11532. ;
  11533. i++
  11534. }
  11535. XXftDrawGlyphFontSpec(tls, draw, color, glyphs, len1)
  11536. if glyphs != bp {
  11537. libc.Xfree(tls, glyphs)
  11538. }
  11539. }
  11540. func XXftDrawRect(tls *libc.TLS, draw uintptr, color uintptr, x int32, y int32, width uint32, height uint32) {
  11541. if __XftDrawRenderPrepare(tls, draw) != 0 {
  11542. libxrender.XXRenderFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, int32(m_PictOpSrc), (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, color+8, x, y, width, height)
  11543. } else {
  11544. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11545. /* note: not XftRectCore() */
  11546. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  11547. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, x, y, width, height)
  11548. }
  11549. }
  11550. }
  11551. func XXftDrawSetClip(tls *libc.TLS, draw uintptr, r TRegion) (r1 int32) {
  11552. bp := tls.Alloc(80)
  11553. defer tls.Free(80)
  11554. var n TRegion
  11555. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  11556. _ = n
  11557. n = libc.UintptrFromInt32(0)
  11558. /*
  11559. * Check for quick exits
  11560. */
  11561. if !(r != 0) && (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type == int32(_XftClipTypeNone) {
  11562. return int32(m_True)
  11563. }
  11564. if r != 0 && (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type == int32(_XftClipTypeRegion) && libx11.XXEqualRegion(tls, r, *(*TRegion)(unsafe.Pointer(draw + 56))) != 0 {
  11565. return int32(m_True)
  11566. }
  11567. /*
  11568. * Duplicate the region so future changes can be short circuited
  11569. */
  11570. if r != 0 {
  11571. n = libx11.XXCreateRegion(tls)
  11572. if n != 0 {
  11573. if !(libx11.XXUnionRegion(tls, n, r, n) != 0) {
  11574. libx11.XXDestroyRegion(tls, n)
  11575. return m_False
  11576. }
  11577. }
  11578. }
  11579. /*
  11580. * Destroy existing clip
  11581. */
  11582. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11583. case int32(_XftClipTypeRegion):
  11584. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11585. case int32(_XftClipTypeRectangles):
  11586. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 56)))
  11587. case int32(_XftClipTypeNone):
  11588. break
  11589. }
  11590. /*
  11591. * Set the clip
  11592. */
  11593. if n != 0 {
  11594. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeRegion)
  11595. *(*TRegion)(unsafe.Pointer(draw + 56)) = n
  11596. } else {
  11597. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  11598. }
  11599. /*
  11600. * Apply new clip to existing objects
  11601. */
  11602. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11603. if n != 0 {
  11604. libxrender.XXRenderSetPictureClipRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, n)
  11605. } else {
  11606. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fclip_mask = uint64(0)
  11607. libxrender.XXRenderChangePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, libc.Uint64FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(6)), bp)
  11608. }
  11609. }
  11610. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11611. if n != 0 {
  11612. libx11.XXSetRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11613. } else {
  11614. libx11.XXSetClipMask(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, uint64(0))
  11615. }
  11616. }
  11617. return int32(m_True)
  11618. }
  11619. func XXftDrawSetClipRectangles(tls *libc.TLS, draw uintptr, xOrigin int32, yOrigin int32, rects uintptr, n int32) (r int32) {
  11620. var new1 uintptr
  11621. _ = new1
  11622. new1 = libc.UintptrFromInt32(0)
  11623. /*
  11624. * Check for quick exit
  11625. */
  11626. 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) {
  11627. return int32(m_True)
  11628. }
  11629. /*
  11630. * Duplicate the region so future changes can be short circuited
  11631. */
  11632. new1 = libc.Xmalloc(tls, uint64(12)+libc.Uint64FromInt32(n)*uint64(8))
  11633. if !(new1 != 0) {
  11634. return m_False
  11635. }
  11636. (*TXftClipRect)(unsafe.Pointer(new1)).Fn = n
  11637. (*TXftClipRect)(unsafe.Pointer(new1)).FxOrigin = xOrigin
  11638. (*TXftClipRect)(unsafe.Pointer(new1)).FyOrigin = yOrigin
  11639. libc.Xmemcpy(tls, new1+libc.UintptrFromInt32(1)*12, rects, libc.Uint64FromInt32(n)*uint64(8))
  11640. /*
  11641. * Destroy existing clip
  11642. */
  11643. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11644. case int32(_XftClipTypeRegion):
  11645. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11646. case int32(_XftClipTypeRectangles):
  11647. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 56)))
  11648. case int32(_XftClipTypeNone):
  11649. break
  11650. }
  11651. /*
  11652. * Set the clip
  11653. */
  11654. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeRectangles)
  11655. *(*uintptr)(unsafe.Pointer(draw + 56)) = new1
  11656. /*
  11657. * Apply new clip to existing objects
  11658. */
  11659. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11660. 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)
  11661. }
  11662. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11663. 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)
  11664. }
  11665. return int32(m_True)
  11666. }
  11667. func XXftDrawSetSubwindowMode(tls *libc.TLS, draw uintptr, mode int32) {
  11668. bp := tls.Alloc(80)
  11669. defer tls.Free(80)
  11670. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  11671. if mode == (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode {
  11672. return
  11673. }
  11674. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = mode
  11675. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11676. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fsubwindow_mode = mode
  11677. libxrender.XXRenderChangePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, libc.Uint64FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(8)), bp)
  11678. }
  11679. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11680. libx11.XXSetSubwindowMode(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, mode)
  11681. }
  11682. }
  11683. const m_VisualIDMask2 = 0x1
  11684. const m_VisualScreenMask2 = 0x2
  11685. /* xftxlfd.c */
  11686. func XXftGlyphExtents(tls *libc.TLS, dpy uintptr, pub uintptr, glyphs uintptr, nglyphs int32, extents uintptr) {
  11687. bp := tls.Alloc(1040)
  11688. defer tls.Free(1040)
  11689. var bottom, left, n, overall_bottom, overall_left, overall_right, overall_top, right, top, x, y, v1, v6 int32
  11690. var font, g, xftg, v2, v3, v4, v7, v8 uintptr
  11691. var glyph TFT_UInt
  11692. var glyphs_loaded TFcBool
  11693. var v5, v9 bool
  11694. var _ /* missing at bp+0 */ [256]TFT_UInt
  11695. var _ /* nmissing at bp+1024 */ int32
  11696. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  11697. font = pub
  11698. g = glyphs
  11699. n = nglyphs
  11700. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  11701. glyphs_loaded = m_FcFalse
  11702. for {
  11703. v1 = n
  11704. n--
  11705. if !(v1 != 0) {
  11706. break
  11707. }
  11708. v2 = g
  11709. g += 4
  11710. if XXftFontCheckGlyph(tls, dpy, pub, m_FcFalse, *(*TFT_UInt)(unsafe.Pointer(v2)), bp, bp+1024) != 0 {
  11711. glyphs_loaded = int32(m_FcTrue)
  11712. }
  11713. }
  11714. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  11715. XXftFontLoadGlyphs(tls, dpy, pub, m_FcFalse, bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  11716. }
  11717. g = glyphs
  11718. n = nglyphs
  11719. xftg = libc.UintptrFromInt32(0)
  11720. for n != 0 {
  11721. v3 = g
  11722. g += 4
  11723. glyph = *(*TFT_UInt)(unsafe.Pointer(v3))
  11724. n--
  11725. if v5 = glyph < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; v5 {
  11726. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  11727. xftg = v4
  11728. }
  11729. if v5 && v4 != 0 {
  11730. break
  11731. }
  11732. }
  11733. if n == 0 {
  11734. if xftg != 0 {
  11735. *(*TXGlyphInfo)(unsafe.Pointer(extents)) = (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics
  11736. } else {
  11737. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11738. }
  11739. } else {
  11740. x = 0
  11741. y = 0
  11742. overall_left = x - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  11743. overall_top = y - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  11744. overall_right = overall_left + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  11745. overall_bottom = overall_top + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  11746. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  11747. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  11748. for {
  11749. v6 = n
  11750. n--
  11751. if !(v6 != 0) {
  11752. break
  11753. }
  11754. v7 = g
  11755. g += 4
  11756. glyph = *(*TFT_UInt)(unsafe.Pointer(v7))
  11757. if v9 = glyph < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; v9 {
  11758. v8 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  11759. xftg = v8
  11760. }
  11761. if v9 && v8 != 0 {
  11762. left = x - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  11763. top = y - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  11764. right = left + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  11765. bottom = top + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  11766. if left < overall_left {
  11767. overall_left = left
  11768. }
  11769. if top < overall_top {
  11770. overall_top = top
  11771. }
  11772. if right > overall_right {
  11773. overall_right = right
  11774. }
  11775. if bottom > overall_bottom {
  11776. overall_bottom = bottom
  11777. }
  11778. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  11779. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  11780. }
  11781. }
  11782. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fx = int16(-overall_left)
  11783. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fy = int16(-overall_top)
  11784. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fwidth = libc.Uint16FromInt32(overall_right - overall_left)
  11785. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fheight = libc.Uint16FromInt32(overall_bottom - overall_top)
  11786. (*TXGlyphInfo)(unsafe.Pointer(extents)).FxOff = int16(x)
  11787. (*TXGlyphInfo)(unsafe.Pointer(extents)).FyOff = int16(y)
  11788. }
  11789. if glyphs_loaded != 0 {
  11790. X_XftFontManageMemory(tls, dpy, pub)
  11791. }
  11792. }
  11793. func XXftTextExtents8(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11794. bp := tls.Alloc(4096)
  11795. defer tls.Free(4096)
  11796. var glyphs, v1 uintptr
  11797. var i int32
  11798. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11799. _, _, _ = glyphs, i, v1
  11800. if len1 < 0 {
  11801. return
  11802. }
  11803. if len1 <= int32(m_NUM_LOCAL) {
  11804. v1 = bp
  11805. glyphs = v1
  11806. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  11807. } else {
  11808. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11809. if !(glyphs != 0) {
  11810. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11811. return
  11812. }
  11813. }
  11814. i = 0
  11815. for {
  11816. if !(i < len1) {
  11817. break
  11818. }
  11819. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  11820. goto _2
  11821. _2:
  11822. ;
  11823. i++
  11824. }
  11825. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11826. if glyphs != bp {
  11827. libc.Xfree(tls, glyphs)
  11828. }
  11829. }
  11830. func XXftTextExtents16(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11831. bp := tls.Alloc(4096)
  11832. defer tls.Free(4096)
  11833. var glyphs, v1 uintptr
  11834. var i int32
  11835. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11836. _, _, _ = glyphs, i, v1
  11837. if len1 < 0 {
  11838. return
  11839. }
  11840. if len1 <= int32(m_NUM_LOCAL) {
  11841. v1 = bp
  11842. glyphs = v1
  11843. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  11844. } else {
  11845. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11846. if !(glyphs != 0) {
  11847. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11848. return
  11849. }
  11850. }
  11851. i = 0
  11852. for {
  11853. if !(i < len1) {
  11854. break
  11855. }
  11856. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  11857. goto _2
  11858. _2:
  11859. ;
  11860. i++
  11861. }
  11862. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11863. if glyphs != bp {
  11864. libc.Xfree(tls, glyphs)
  11865. }
  11866. }
  11867. func XXftTextExtents32(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11868. bp := tls.Alloc(4096)
  11869. defer tls.Free(4096)
  11870. var glyphs, v1 uintptr
  11871. var i int32
  11872. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11873. _, _, _ = glyphs, i, v1
  11874. if len1 < 0 {
  11875. return
  11876. }
  11877. if len1 <= int32(m_NUM_LOCAL) {
  11878. v1 = bp
  11879. glyphs = v1
  11880. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  11881. } else {
  11882. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11883. if !(glyphs != 0) {
  11884. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11885. return
  11886. }
  11887. }
  11888. i = 0
  11889. for {
  11890. if !(i < len1) {
  11891. break
  11892. }
  11893. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  11894. goto _2
  11895. _2:
  11896. ;
  11897. i++
  11898. }
  11899. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11900. if glyphs != bp {
  11901. libc.Xfree(tls, glyphs)
  11902. }
  11903. }
  11904. func XXftTextExtentsUtf8(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11905. bp := tls.Alloc(4112)
  11906. defer tls.Free(4112)
  11907. var glyphs, glyphs_new, v1 uintptr
  11908. var i, l, size, v2, v4 int32
  11909. var v3 bool
  11910. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11911. var _ /* ucs4 at bp+4096 */ TFcChar32
  11912. _, _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3, v4
  11913. if len1 < 0 {
  11914. return
  11915. }
  11916. i = 0
  11917. v1 = bp
  11918. glyphs = v1
  11919. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  11920. size = int32(m_NUM_LOCAL)
  11921. for {
  11922. if v3 = len1 != 0; v3 {
  11923. v2 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  11924. l = v2
  11925. }
  11926. if !(v3 && v2 > 0) {
  11927. break
  11928. }
  11929. if i == size {
  11930. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*libc.Int32FromInt32(2))*uint64(4))
  11931. if !(glyphs_new != 0) {
  11932. if glyphs != bp {
  11933. libc.Xfree(tls, glyphs)
  11934. }
  11935. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11936. return
  11937. }
  11938. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  11939. size *= int32(2)
  11940. if glyphs != bp {
  11941. libc.Xfree(tls, glyphs)
  11942. }
  11943. glyphs = glyphs_new
  11944. }
  11945. v4 = i
  11946. i++
  11947. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v4)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11948. string1 += uintptr(l)
  11949. len1 -= l
  11950. }
  11951. XXftGlyphExtents(tls, dpy, pub, glyphs, i, extents)
  11952. if glyphs != bp {
  11953. libc.Xfree(tls, glyphs)
  11954. }
  11955. }
  11956. func XXftTextExtentsUtf16(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, endian TFcEndian, len1 int32, extents uintptr) {
  11957. bp := tls.Alloc(4112)
  11958. defer tls.Free(4112)
  11959. var glyphs, glyphs_new, v1 uintptr
  11960. var i, l, size, v2, v4 int32
  11961. var v3 bool
  11962. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11963. var _ /* ucs4 at bp+4096 */ TFcChar32
  11964. _, _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3, v4
  11965. if len1 < 0 {
  11966. return
  11967. }
  11968. i = 0
  11969. v1 = bp
  11970. glyphs = v1
  11971. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  11972. size = int32(m_NUM_LOCAL)
  11973. for {
  11974. if v3 = len1 != 0; v3 {
  11975. v2 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  11976. l = v2
  11977. }
  11978. if !(v3 && v2 > 0) {
  11979. break
  11980. }
  11981. if i == size {
  11982. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*libc.Int32FromInt32(2))*uint64(4))
  11983. if !(glyphs_new != 0) {
  11984. if glyphs != bp {
  11985. libc.Xfree(tls, glyphs)
  11986. }
  11987. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11988. return
  11989. }
  11990. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  11991. size *= int32(2)
  11992. if glyphs != bp {
  11993. libc.Xfree(tls, glyphs)
  11994. }
  11995. glyphs = glyphs_new
  11996. }
  11997. v4 = i
  11998. i++
  11999. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v4)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  12000. string1 += uintptr(l)
  12001. len1 -= l
  12002. }
  12003. XXftGlyphExtents(tls, dpy, pub, glyphs, i, extents)
  12004. if glyphs != bp {
  12005. libc.Xfree(tls, glyphs)
  12006. }
  12007. }
  12008. /* xftxlfd.c */
  12009. func XXftFontMatch(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr, result uintptr) (r uintptr) {
  12010. var match, new1 uintptr
  12011. _, _ = match, new1
  12012. if !(XXftInit(tls, libc.UintptrFromInt32(0)) != 0) {
  12013. return libc.UintptrFromInt32(0)
  12014. }
  12015. new1 = libfontconfig.XFcPatternDuplicate(tls, pattern)
  12016. if !(new1 != 0) {
  12017. return libc.UintptrFromInt32(0)
  12018. }
  12019. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  12020. libc.Xprintf(tls, __ccgo_ts+689, 0)
  12021. libfontconfig.XFcPatternPrint(tls, new1)
  12022. }
  12023. libfontconfig.XFcConfigSubstitute(tls, libc.UintptrFromInt32(0), new1, int32(_FcMatchPattern))
  12024. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  12025. libc.Xprintf(tls, __ccgo_ts+711, 0)
  12026. libfontconfig.XFcPatternPrint(tls, new1)
  12027. }
  12028. XXftDefaultSubstitute(tls, dpy, screen, new1)
  12029. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  12030. libc.Xprintf(tls, __ccgo_ts+754, 0)
  12031. libfontconfig.XFcPatternPrint(tls, new1)
  12032. }
  12033. match = libfontconfig.XFcFontMatch(tls, libc.UintptrFromInt32(0), new1, result)
  12034. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  12035. libc.Xprintf(tls, __ccgo_ts+799, 0)
  12036. libfontconfig.XFcPatternPrint(tls, match)
  12037. }
  12038. libfontconfig.XFcPatternDestroy(tls, new1)
  12039. return match
  12040. }
  12041. func XXftFontOpen(tls *libc.TLS, dpy uintptr, screen int32, va1 uintptr) (r uintptr) {
  12042. bp := tls.Alloc(16)
  12043. defer tls.Free(16)
  12044. var font, match, pat uintptr
  12045. var va Tva_list
  12046. var _ /* result at bp+0 */ TFcResult
  12047. _, _, _, _ = font, match, pat, va
  12048. va = va1
  12049. pat = libfontconfig.XFcPatternVaBuild(tls, libc.UintptrFromInt32(0), va)
  12050. _ = va
  12051. if !(pat != 0) {
  12052. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12053. libc.Xprintf(tls, __ccgo_ts+820, 0)
  12054. }
  12055. return libc.UintptrFromInt32(0)
  12056. }
  12057. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  12058. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12059. libc.Xprintf(tls, __ccgo_ts+859, 0)
  12060. libfontconfig.XFcPatternPrint(tls, pat)
  12061. if match != 0 {
  12062. libc.Xprintf(tls, __ccgo_ts+868, 0)
  12063. libfontconfig.XFcPatternPrint(tls, match)
  12064. } else {
  12065. libc.Xprintf(tls, __ccgo_ts+875, 0)
  12066. }
  12067. }
  12068. libfontconfig.XFcPatternDestroy(tls, pat)
  12069. if !(match != 0) {
  12070. return libc.UintptrFromInt32(0)
  12071. }
  12072. font = XXftFontOpenPattern(tls, dpy, match)
  12073. if !(font != 0) {
  12074. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12075. libc.Xprintf(tls, __ccgo_ts+885, 0)
  12076. }
  12077. libfontconfig.XFcPatternDestroy(tls, match)
  12078. }
  12079. return font
  12080. }
  12081. func XXftFontOpenName(tls *libc.TLS, dpy uintptr, screen int32, name uintptr) (r uintptr) {
  12082. bp := tls.Alloc(32)
  12083. defer tls.Free(32)
  12084. var font, match, pat uintptr
  12085. var _ /* result at bp+0 */ TFcResult
  12086. _, _, _ = font, match, pat
  12087. pat = libfontconfig.XFcNameParse(tls, name)
  12088. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12089. libc.Xprintf(tls, __ccgo_ts+894, libc.VaList(bp+16, name))
  12090. if pat != 0 {
  12091. libfontconfig.XFcPatternPrint(tls, pat)
  12092. } else {
  12093. libc.Xprintf(tls, __ccgo_ts+917, 0)
  12094. }
  12095. }
  12096. if !(pat != 0) {
  12097. return libc.UintptrFromInt32(0)
  12098. }
  12099. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  12100. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12101. if match != 0 {
  12102. libc.Xprintf(tls, __ccgo_ts+868, 0)
  12103. libfontconfig.XFcPatternPrint(tls, match)
  12104. } else {
  12105. libc.Xprintf(tls, __ccgo_ts+875, 0)
  12106. }
  12107. }
  12108. libfontconfig.XFcPatternDestroy(tls, pat)
  12109. if !(match != 0) {
  12110. return libc.UintptrFromInt32(0)
  12111. }
  12112. font = XXftFontOpenPattern(tls, dpy, match)
  12113. if !(font != 0) {
  12114. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12115. libc.Xprintf(tls, __ccgo_ts+885, 0)
  12116. }
  12117. libfontconfig.XFcPatternDestroy(tls, match)
  12118. }
  12119. return font
  12120. }
  12121. func XXftFontOpenXlfd(tls *libc.TLS, dpy uintptr, screen int32, xlfd uintptr) (r uintptr) {
  12122. bp := tls.Alloc(32)
  12123. defer tls.Free(32)
  12124. var font, match, pat uintptr
  12125. var _ /* result at bp+0 */ TFcResult
  12126. _, _, _ = font, match, pat
  12127. pat = XXftXlfdParse(tls, xlfd, m_FcFalse, m_FcFalse)
  12128. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12129. libc.Xprintf(tls, __ccgo_ts+931, libc.VaList(bp+16, xlfd))
  12130. if pat != 0 {
  12131. libc.Xprintf(tls, __ccgo_ts+954, 0)
  12132. } else {
  12133. libfontconfig.XFcPatternPrint(tls, pat)
  12134. }
  12135. }
  12136. if !(pat != 0) {
  12137. return libc.UintptrFromInt32(0)
  12138. }
  12139. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  12140. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12141. if match != 0 {
  12142. libc.Xprintf(tls, __ccgo_ts+868, 0)
  12143. libfontconfig.XFcPatternPrint(tls, match)
  12144. } else {
  12145. libc.Xprintf(tls, __ccgo_ts+875, 0)
  12146. }
  12147. }
  12148. libfontconfig.XFcPatternDestroy(tls, pat)
  12149. if !(match != 0) {
  12150. return libc.UintptrFromInt32(0)
  12151. }
  12152. font = XXftFontOpenPattern(tls, dpy, match)
  12153. if !(font != 0) {
  12154. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12155. libc.Xprintf(tls, __ccgo_ts+885, 0)
  12156. }
  12157. libfontconfig.XFcPatternDestroy(tls, match)
  12158. }
  12159. return font
  12160. }
  12161. const m_FT_LOAD_DEFAULT1 = 0
  12162. const m_UINT_MAX1 = 4294967295
  12163. const m_XFT_EMBEDDED_BITMAP = "embeddedbitmap"
  12164. /*
  12165. * List of all open files (each face in a file is managed separately)
  12166. */
  12167. var __XftFtFiles uintptr
  12168. var _XftMaxFreeTypeFiles = int32(5)
  12169. func __XftGetFile(tls *libc.TLS, file uintptr, id int32) (r uintptr) {
  12170. bp := tls.Alloc(32)
  12171. defer tls.Free(32)
  12172. var f uintptr
  12173. var v2, v3, v4 TFT_Fixed
  12174. _, _, _, _ = f, v2, v3, v4
  12175. if !(XXftInitFtLibrary(tls) != 0) {
  12176. return libc.UintptrFromInt32(0)
  12177. }
  12178. f = __XftFtFiles
  12179. for {
  12180. if !(f != 0) {
  12181. break
  12182. }
  12183. if !(libc.Xstrcmp(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, file) != 0) && (*TXftFtFile)(unsafe.Pointer(f)).Fid == id {
  12184. (*TXftFtFile)(unsafe.Pointer(f)).Fref++
  12185. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12186. libc.Xprintf(tls, __ccgo_ts+968, libc.VaList(bp+8, file, id, (*TXftFtFile)(unsafe.Pointer(f)).Fref))
  12187. }
  12188. return f
  12189. }
  12190. goto _1
  12191. _1:
  12192. ;
  12193. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12194. }
  12195. f = libc.Xmalloc(tls, uint64(96)+libc.Xstrlen(tls, file)+uint64(1))
  12196. if !(f != 0) {
  12197. return libc.UintptrFromInt32(0)
  12198. }
  12199. XXftMemAlloc(tls, int32(_XFT_MEM_FILE), uint64(96)+libc.Xstrlen(tls, file)+uint64(1))
  12200. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12201. libc.Xprintf(tls, __ccgo_ts+1006, libc.VaList(bp+8, file, id))
  12202. }
  12203. (*TXftFtFile)(unsafe.Pointer(f)).Fnext = __XftFtFiles
  12204. __XftFtFiles = f
  12205. (*TXftFtFile)(unsafe.Pointer(f)).Fref = int32(1)
  12206. (*TXftFtFile)(unsafe.Pointer(f)).Ffile = f + libc.UintptrFromInt32(1)*96
  12207. libc.Xstrcpy(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, file)
  12208. (*TXftFtFile)(unsafe.Pointer(f)).Fid = id
  12209. (*TXftFtFile)(unsafe.Pointer(f)).Flock = 0
  12210. (*TXftFtFile)(unsafe.Pointer(f)).Fface = libc.UintptrFromInt32(0)
  12211. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  12212. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  12213. v4 = libc.Int64FromInt32(0)
  12214. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v4
  12215. v3 = v4
  12216. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v3
  12217. v2 = v3
  12218. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v2
  12219. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v2
  12220. return f
  12221. }
  12222. func __XftGetFaceFile(tls *libc.TLS, face TFT_Face) (r uintptr) {
  12223. var f uintptr
  12224. var v1, v2, v3 TFT_Fixed
  12225. _, _, _, _ = f, v1, v2, v3
  12226. f = libc.Xmalloc(tls, uint64(96))
  12227. if !(f != 0) {
  12228. return libc.UintptrFromInt32(0)
  12229. }
  12230. XXftMemAlloc(tls, int32(_XFT_MEM_FILE), uint64(96))
  12231. (*TXftFtFile)(unsafe.Pointer(f)).Fnext = libc.UintptrFromInt32(0)
  12232. (*TXftFtFile)(unsafe.Pointer(f)).Fref = int32(1)
  12233. (*TXftFtFile)(unsafe.Pointer(f)).Ffile = libc.UintptrFromInt32(0)
  12234. (*TXftFtFile)(unsafe.Pointer(f)).Fid = 0
  12235. (*TXftFtFile)(unsafe.Pointer(f)).Flock = 0
  12236. (*TXftFtFile)(unsafe.Pointer(f)).Fface = face
  12237. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  12238. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  12239. v3 = libc.Int64FromInt32(0)
  12240. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v3
  12241. v2 = v3
  12242. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v2
  12243. v1 = v2
  12244. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v1
  12245. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v1
  12246. return f
  12247. }
  12248. func __XftNumFiles(tls *libc.TLS) (r int32) {
  12249. var count int32
  12250. var f uintptr
  12251. _, _ = count, f
  12252. count = 0
  12253. f = __XftFtFiles
  12254. for {
  12255. if !(f != 0) {
  12256. break
  12257. }
  12258. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 && !((*TXftFtFile)(unsafe.Pointer(f)).Flock != 0) {
  12259. count++
  12260. }
  12261. goto _1
  12262. _1:
  12263. ;
  12264. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12265. }
  12266. return count
  12267. }
  12268. func __XftNthFile(tls *libc.TLS, n int32) (r uintptr) {
  12269. var count, v2 int32
  12270. var f uintptr
  12271. _, _, _ = count, f, v2
  12272. count = 0
  12273. f = __XftFtFiles
  12274. for {
  12275. if !(f != 0) {
  12276. break
  12277. }
  12278. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 && !((*TXftFtFile)(unsafe.Pointer(f)).Flock != 0) {
  12279. v2 = count
  12280. count++
  12281. if v2 == n {
  12282. break
  12283. }
  12284. }
  12285. goto _1
  12286. _1:
  12287. ;
  12288. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12289. }
  12290. return f
  12291. }
  12292. func __XftUncacheFiles(tls *libc.TLS) {
  12293. bp := tls.Alloc(32)
  12294. defer tls.Free(32)
  12295. var f uintptr
  12296. var n, v1, v2 int32
  12297. _, _, _, _ = f, n, v1, v2
  12298. for {
  12299. v1 = __XftNumFiles(tls)
  12300. n = v1
  12301. if !(v1 > _XftMaxFreeTypeFiles) {
  12302. break
  12303. }
  12304. if n != 0 {
  12305. v2 = libc.Xrand(tls) % n
  12306. } else {
  12307. v2 = 0
  12308. }
  12309. f = __XftNthFile(tls, v2)
  12310. if f != 0 {
  12311. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12312. libc.Xprintf(tls, __ccgo_ts+1034, libc.VaList(bp+8, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, (*TXftFtFile)(unsafe.Pointer(f)).Fid))
  12313. }
  12314. libfreetype.XFT_Done_Face(tls, (*TXftFtFile)(unsafe.Pointer(f)).Fface)
  12315. (*TXftFtFile)(unsafe.Pointer(f)).Fface = libc.UintptrFromInt32(0)
  12316. }
  12317. }
  12318. }
  12319. func __XftLockFile(tls *libc.TLS, f uintptr) (r TFT_Face) {
  12320. bp := tls.Alloc(32)
  12321. defer tls.Free(32)
  12322. var v1, v2, v3 TFT_Fixed
  12323. _, _, _ = v1, v2, v3
  12324. (*TXftFtFile)(unsafe.Pointer(f)).Flock++
  12325. if !((*TXftFtFile)(unsafe.Pointer(f)).Fface != 0) {
  12326. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12327. libc.Xprintf(tls, __ccgo_ts+1065, libc.VaList(bp+8, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, (*TXftFtFile)(unsafe.Pointer(f)).Fid))
  12328. }
  12329. if libfreetype.XFT_New_Face(tls, X_XftFTlibrary, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, int64((*TXftFtFile)(unsafe.Pointer(f)).Fid), f+88) != 0 {
  12330. (*TXftFtFile)(unsafe.Pointer(f)).Flock--
  12331. }
  12332. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  12333. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  12334. v3 = libc.Int64FromInt32(0)
  12335. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v3
  12336. v2 = v3
  12337. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v2
  12338. v1 = v2
  12339. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v1
  12340. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v1
  12341. __XftUncacheFiles(tls)
  12342. }
  12343. return (*TXftFtFile)(unsafe.Pointer(f)).Fface
  12344. }
  12345. func __XftLockError(tls *libc.TLS, reason uintptr) {
  12346. bp := tls.Alloc(16)
  12347. defer tls.Free(16)
  12348. libc.Xfprintf(tls, libc.Xstderr, __ccgo_ts+1085, libc.VaList(bp+8, reason))
  12349. }
  12350. func __XftUnlockFile(tls *libc.TLS, f uintptr) {
  12351. var v1 int32
  12352. var v2 uintptr
  12353. _, _ = v1, v2
  12354. v2 = f + 80
  12355. *(*int32)(unsafe.Pointer(v2))--
  12356. v1 = *(*int32)(unsafe.Pointer(v2))
  12357. if v1 < 0 {
  12358. __XftLockError(tls, __ccgo_ts+1108)
  12359. }
  12360. }
  12361. func X_XftSetFace(tls *libc.TLS, f uintptr, xsize TFT_F26Dot6, ysize TFT_F26Dot6, matrix uintptr) (r TFcBool) {
  12362. bp := tls.Alloc(48)
  12363. defer tls.Free(48)
  12364. var best, i int32
  12365. var face TFT_Face
  12366. var v2, v3, v4, v5, v6, v7 int64
  12367. var v8, v9 bool
  12368. _, _, _, _, _, _, _, _, _, _, _ = best, face, i, v2, v3, v4, v5, v6, v7, v8, v9
  12369. face = (*TXftFtFile)(unsafe.Pointer(f)).Fface
  12370. if (*TXftFtFile)(unsafe.Pointer(f)).Fxsize != xsize || (*TXftFtFile)(unsafe.Pointer(f)).Fysize != ysize {
  12371. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  12372. libc.Xprintf(tls, __ccgo_ts+1130, libc.VaList(bp+8, int32(xsize>>libc.Int32FromInt32(6)), int32(ysize>>libc.Int32FromInt32(6)), int32(xsize), int32(ysize)))
  12373. }
  12374. /*
  12375. * Bitmap only faces must match exactly, so find the closest
  12376. * one (height dominant search)
  12377. */
  12378. if !((*TFT_FaceRec_)(unsafe.Pointer(face)).Fface_flags&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(0)) != 0) {
  12379. best = 0
  12380. i = int32(1)
  12381. for {
  12382. if !(i < (*TFT_FaceRec_)(unsafe.Pointer(face)).Fnum_fixed_sizes) {
  12383. break
  12384. }
  12385. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem < 0 {
  12386. v2 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem)
  12387. } else {
  12388. v2 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem
  12389. }
  12390. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem < 0 {
  12391. v3 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem)
  12392. } else {
  12393. v3 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem
  12394. }
  12395. if v9 = v2 < v3; !v9 {
  12396. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem < 0 {
  12397. v4 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem)
  12398. } else {
  12399. v4 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem
  12400. }
  12401. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem < 0 {
  12402. v5 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem)
  12403. } else {
  12404. v5 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem
  12405. }
  12406. if v8 = v4 == v5; v8 {
  12407. if xsize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fx_ppem < 0 {
  12408. v6 = -(xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fx_ppem)
  12409. } else {
  12410. v6 = xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fx_ppem
  12411. }
  12412. if xsize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fx_ppem < 0 {
  12413. v7 = -(xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fx_ppem)
  12414. } else {
  12415. v7 = xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fx_ppem
  12416. }
  12417. }
  12418. }
  12419. if v9 || v8 && v6 < v7 {
  12420. best = i
  12421. }
  12422. goto _1
  12423. _1:
  12424. ;
  12425. i++
  12426. }
  12427. /*
  12428. * Freetype 2.1.7 and earlier used width/height
  12429. * for matching sizes in the BDF and PCF loaders.
  12430. * This has been fixed for 2.1.8. Because BDF and PCF
  12431. * files have but a single strike per file, we can
  12432. * simply try both sizes.
  12433. */
  12434. 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 {
  12435. return m_False
  12436. }
  12437. } else {
  12438. if libfreetype.XFT_Set_Char_Size(tls, face, xsize, ysize, uint32(0), uint32(0)) != 0 {
  12439. return m_False
  12440. }
  12441. }
  12442. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = xsize
  12443. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = ysize
  12444. }
  12445. 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) {
  12446. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  12447. libc.Xprintf(tls, __ccgo_ts+1162, 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)))
  12448. }
  12449. libfreetype.XFT_Set_Transform(tls, face, matrix, libc.UintptrFromInt32(0))
  12450. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix = *(*TFT_Matrix)(unsafe.Pointer(matrix))
  12451. }
  12452. return int32(m_True)
  12453. }
  12454. func __XftReleaseFile(tls *libc.TLS, f uintptr) {
  12455. var prev, v2 uintptr
  12456. var v1 int32
  12457. var v4 uint64
  12458. _, _, _, _ = prev, v1, v2, v4
  12459. v2 = f + 8
  12460. *(*int32)(unsafe.Pointer(v2))--
  12461. v1 = *(*int32)(unsafe.Pointer(v2))
  12462. if v1 != 0 {
  12463. return
  12464. }
  12465. if (*TXftFtFile)(unsafe.Pointer(f)).Flock != 0 {
  12466. __XftLockError(tls, __ccgo_ts+1196)
  12467. }
  12468. if (*TXftFtFile)(unsafe.Pointer(f)).Ffile != 0 {
  12469. prev = uintptr(unsafe.Pointer(&__XftFtFiles))
  12470. for {
  12471. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  12472. break
  12473. }
  12474. if *(*uintptr)(unsafe.Pointer(prev)) == f {
  12475. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12476. break
  12477. }
  12478. goto _3
  12479. _3:
  12480. ;
  12481. prev = *(*uintptr)(unsafe.Pointer(prev))
  12482. }
  12483. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 {
  12484. libfreetype.XFT_Done_Face(tls, (*TXftFtFile)(unsafe.Pointer(f)).Fface)
  12485. }
  12486. }
  12487. if (*TXftFtFile)(unsafe.Pointer(f)).Ffile != 0 {
  12488. v4 = libc.Xstrlen(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile) + uint64(1)
  12489. } else {
  12490. v4 = uint64(0)
  12491. }
  12492. XXftMemFree(tls, int32(_XFT_MEM_FILE), libc.Uint64FromInt64(96)+v4)
  12493. libc.Xfree(tls, f)
  12494. }
  12495. /*
  12496. * Find a prime larger than the minimum reasonable hash size
  12497. */
  12498. func __XftSqrt(tls *libc.TLS, a TFcChar32) (r TFcChar32) {
  12499. var h, l, m TFcChar32
  12500. _, _, _ = h, l, m
  12501. l = uint32(2)
  12502. h = a / uint32(2)
  12503. for h-l > uint32(1) {
  12504. m = (h + l) >> int32(1)
  12505. if m*m < a {
  12506. l = m
  12507. } else {
  12508. h = m
  12509. }
  12510. }
  12511. return h
  12512. }
  12513. func __XftIsPrime(tls *libc.TLS, i TFcChar32) (r TFcBool) {
  12514. var l, t TFcChar32
  12515. _, _ = l, t
  12516. if i < uint32(2) {
  12517. return m_FcFalse
  12518. }
  12519. if i&uint32(1) == uint32(0) {
  12520. if i == uint32(2) {
  12521. return int32(m_FcTrue)
  12522. }
  12523. return m_FcFalse
  12524. }
  12525. l = __XftSqrt(tls, i) + uint32(1)
  12526. t = uint32(3)
  12527. for {
  12528. if !(t <= l) {
  12529. break
  12530. }
  12531. if i%t == uint32(0) {
  12532. return m_FcFalse
  12533. }
  12534. goto _1
  12535. _1:
  12536. ;
  12537. t += uint32(2)
  12538. }
  12539. return int32(m_FcTrue)
  12540. }
  12541. func __XftHashSize(tls *libc.TLS, num_unicode TFcChar32) (r TFcChar32) {
  12542. var hash TFcChar32
  12543. _ = hash
  12544. /* at least 31.25 % extra space */
  12545. hash = num_unicode + num_unicode>>libc.Int32FromInt32(2) + num_unicode>>libc.Int32FromInt32(4)
  12546. if hash&uint32(1) == uint32(0) {
  12547. hash++
  12548. }
  12549. for !(__XftIsPrime(tls, hash) != 0) {
  12550. hash += uint32(2)
  12551. }
  12552. return hash
  12553. }
  12554. func XXftLockFace(tls *libc.TLS, public uintptr) (r TFT_Face) {
  12555. var face TFT_Face
  12556. var fi, font uintptr
  12557. _, _, _ = face, fi, font
  12558. font = public
  12559. fi = font + 48
  12560. face = __XftLockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12561. /*
  12562. * Make sure the face is usable at the requested size
  12563. */
  12564. if face != 0 && !(X_XftSetFace(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile, (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize, (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize, fi+56) != 0) {
  12565. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12566. face = libc.UintptrFromInt32(0)
  12567. }
  12568. return face
  12569. }
  12570. func XXftUnlockFace(tls *libc.TLS, public uintptr) {
  12571. var font uintptr
  12572. _ = font
  12573. font = public
  12574. __XftUnlockFile(tls, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ffile)
  12575. }
  12576. func _XftFontInfoFill(tls *libc.TLS, dpy uintptr, pattern uintptr, fi uintptr) (r TFcBool) {
  12577. bp := tls.Alloc(144)
  12578. defer tls.Free(144)
  12579. var hash TFcChar32
  12580. var hashp, info, v1, v12, p10, p6, p7, p8, p9 uintptr
  12581. var mid, nhash, v11 int32
  12582. var v2, v3 TFT_Fixed
  12583. var v4, v5 float64
  12584. var _ /* aspect at bp+24 */ float64
  12585. var _ /* autohint at bp+80 */ TFcBool
  12586. var _ /* bitmap at bp+104 */ TFcBool
  12587. var _ /* dsize at bp+16 */ float64
  12588. var _ /* face at bp+96 */ TFT_Face
  12589. var _ /* filename at bp+0 */ uintptr
  12590. var _ /* fm1 at bp+40 */ TFcMatrix
  12591. var _ /* font_matrix at bp+32 */ uintptr
  12592. var _ /* global_advance at bp+84 */ TFcBool
  12593. var _ /* hint_style at bp+88 */ int32
  12594. var _ /* hinting at bp+72 */ TFcBool
  12595. var _ /* id at bp+8 */ int32
  12596. var _ /* vertical_layout at bp+76 */ TFcBool
  12597. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = hash, hashp, info, mid, nhash, v1, v11, v12, v2, v3, v4, v5, p10, p6, p7, p8, p9
  12598. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  12599. if !(info != 0) {
  12600. return m_FcFalse
  12601. }
  12602. /*
  12603. * Initialize the whole XftFontInfo so that padding doesn't interfere with
  12604. * hash or XftFontInfoEqual().
  12605. */
  12606. libc.Xmemset(tls, fi, int32('\000'), uint64(112))
  12607. /*
  12608. * Find the associated file
  12609. */
  12610. switch libfontconfig.XFcPatternGetString(tls, pattern, __ccgo_ts+1225, 0, bp) {
  12611. case int32(_FcResultNoMatch):
  12612. *(*uintptr)(unsafe.Pointer(bp)) = libc.UintptrFromInt32(0)
  12613. case int32(_FcResultMatch):
  12614. default:
  12615. goto bail0
  12616. }
  12617. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1230, 0, bp+8) {
  12618. case int32(_FcResultNoMatch):
  12619. *(*int32)(unsafe.Pointer(bp + 8)) = 0
  12620. case int32(_FcResultMatch):
  12621. default:
  12622. goto bail0
  12623. }
  12624. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  12625. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = __XftGetFile(tls, *(*uintptr)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 8)))
  12626. } else {
  12627. if libfontconfig.XFcPatternGetFTFace(tls, pattern, __ccgo_ts+1236, 0, bp+96) == int32(_FcResultMatch) && *(*TFT_Face)(unsafe.Pointer(bp + 96)) != 0 {
  12628. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = __XftGetFaceFile(tls, *(*TFT_Face)(unsafe.Pointer(bp + 96)))
  12629. }
  12630. }
  12631. if !((*TXftFontInfo)(unsafe.Pointer(fi)).Ffile != 0) {
  12632. goto bail0
  12633. }
  12634. /*
  12635. * Compute pixel size
  12636. */
  12637. if libfontconfig.XFcPatternGetDouble(tls, pattern, __ccgo_ts+1243, 0, bp+16) != int32(_FcResultMatch) {
  12638. goto bail1
  12639. }
  12640. if libfontconfig.XFcPatternGetDouble(tls, pattern, __ccgo_ts+1253, 0, bp+24) != int32(_FcResultMatch) {
  12641. *(*float64)(unsafe.Pointer(bp + 24)) = float64(1)
  12642. }
  12643. (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize = int64(float64(*(*float64)(unsafe.Pointer(bp + 16)) * libc.Float64FromFloat64(64)))
  12644. (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize = int64(float64(float64(*(*float64)(unsafe.Pointer(bp + 16))**(*float64)(unsafe.Pointer(bp + 24))) * libc.Float64FromFloat64(64)))
  12645. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12646. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  12647. v1 = *(*uintptr)(unsafe.Pointer(bp))
  12648. } else {
  12649. v1 = __ccgo_ts + 1260
  12650. }
  12651. libc.Xprintf(tls, __ccgo_ts+1267, libc.VaList(bp+120, v1, *(*int32)(unsafe.Pointer(bp + 8)), *(*float64)(unsafe.Pointer(bp + 16))))
  12652. }
  12653. /*
  12654. * Get antialias value
  12655. */
  12656. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+614, 0, fi+32) {
  12657. case int32(_FcResultNoMatch):
  12658. (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias = int32(m_True)
  12659. case int32(_FcResultMatch):
  12660. default:
  12661. goto bail1
  12662. }
  12663. /*
  12664. * Get rgba value
  12665. */
  12666. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+599, 0, fi+44) {
  12667. case int32(_FcResultNoMatch):
  12668. (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba = m_FC_RGBA_UNKNOWN
  12669. case int32(_FcResultMatch):
  12670. default:
  12671. goto bail1
  12672. }
  12673. /*
  12674. * Get lcd_filter value
  12675. */
  12676. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+604, 0, fi+48) {
  12677. case int32(_FcResultNoMatch):
  12678. (*TXftFontInfo)(unsafe.Pointer(fi)).Flcd_filter = int32(m_FC_LCD_DEFAULT)
  12679. case int32(_FcResultMatch):
  12680. default:
  12681. goto bail1
  12682. }
  12683. /*
  12684. * Get matrix and transform values
  12685. */
  12686. switch libfontconfig.XFcPatternGetMatrix(tls, pattern, __ccgo_ts+1304, 0, bp+32) {
  12687. case int32(_FcResultNoMatch):
  12688. v2 = libc.Int64FromInt32(0x10000)
  12689. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy = v2
  12690. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx = v2
  12691. v3 = libc.Int64FromInt32(0)
  12692. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx = v3
  12693. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy = v3
  12694. case int32(_FcResultMatch):
  12695. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx = int64(float64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fxx))
  12696. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy = int64(float64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fyy))
  12697. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy = int64(float64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fxy))
  12698. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx = int64(float64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fyx))
  12699. default:
  12700. goto bail1
  12701. }
  12702. mid = int32(1)
  12703. for libfontconfig.XFcPatternGetMatrix(tls, pattern, __ccgo_ts+1304, mid, bp+32) == int32(_FcResultMatch) {
  12704. v4 = libc.Float64FromInt32(1)
  12705. (*TFcMatrix)(unsafe.Pointer(bp + 40)).Fyy = v4
  12706. (*TFcMatrix)(unsafe.Pointer(bp + 40)).Fxx = v4
  12707. v5 = libc.Float64FromInt32(0)
  12708. (*TFcMatrix)(unsafe.Pointer(bp + 40)).Fyx = v5
  12709. (*TFcMatrix)(unsafe.Pointer(bp + 40)).Fxy = v5
  12710. (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fxx = float64((*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx) / libc.Float64FromInt64(0x10000)
  12711. (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fyy = float64((*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy) / libc.Float64FromInt64(0x10000)
  12712. (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fxy = float64((*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy) / libc.Float64FromInt64(0x10000)
  12713. (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fyx = float64((*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx) / libc.Float64FromInt64(0x10000)
  12714. libfontconfig.XFcMatrixMultiply(tls, bp+40, *(*uintptr)(unsafe.Pointer(bp + 32)), bp+40)
  12715. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx = int64(float64(libc.Float64FromInt64(0x10000) * (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fxx))
  12716. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy = int64(float64(libc.Float64FromInt64(0x10000) * (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fyy))
  12717. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy = int64(float64(libc.Float64FromInt64(0x10000) * (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fxy))
  12718. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx = int64(float64(libc.Float64FromInt64(0x10000) * (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fyx))
  12719. mid++
  12720. }
  12721. (*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))
  12722. /*
  12723. * Get render value, set to false if no Render extension present
  12724. */
  12725. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  12726. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+592, 0, fi+96) {
  12727. case int32(_FcResultTypeMismatch):
  12728. /*
  12729. * Fontconfig no longer supports xft's custom values in
  12730. * text patterns, so any name specifying render:true or
  12731. * render:false will have an invalid type in the resulting
  12732. * pattern. Just ignore that case so that the app doesn't
  12733. * just fail
  12734. */
  12735. /* fall through ... */
  12736. fallthrough
  12737. case int32(_FcResultNoMatch):
  12738. (*TXftFontInfo)(unsafe.Pointer(fi)).Frender = (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender
  12739. case int32(_FcResultMatch):
  12740. default:
  12741. goto bail1
  12742. }
  12743. } else {
  12744. (*TXftFontInfo)(unsafe.Pointer(fi)).Frender = m_FcFalse
  12745. }
  12746. /*
  12747. * Compute glyph load flags
  12748. */
  12749. (*TXftFontInfo)(unsafe.Pointer(fi)).Fload_flags = int32(libc.Int64FromInt32(m_FT_LOAD_DEFAULT1) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(20))
  12750. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1311, 0, bp+104) {
  12751. case int32(_FcResultNoMatch):
  12752. *(*TFcBool)(unsafe.Pointer(bp + 104)) = m_FcFalse
  12753. case int32(_FcResultMatch):
  12754. default:
  12755. goto bail1
  12756. }
  12757. /* disable bitmaps when anti-aliasing or transforming glyphs */
  12758. if !(*(*TFcBool)(unsafe.Pointer(bp + 104)) != 0) && (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias != 0 || (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  12759. p6 = fi + 92
  12760. *(*TFT_Int)(unsafe.Pointer(p6)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p6))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(3))
  12761. }
  12762. /* disable hinting if requested */
  12763. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+652, 0, bp+72) {
  12764. case int32(_FcResultNoMatch):
  12765. *(*TFcBool)(unsafe.Pointer(bp + 72)) = int32(m_FcTrue)
  12766. case int32(_FcResultMatch):
  12767. default:
  12768. goto bail1
  12769. }
  12770. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+624, 0, fi+36) {
  12771. case int32(_FcResultNoMatch):
  12772. (*TXftFontInfo)(unsafe.Pointer(fi)).Fembolden = m_FcFalse
  12773. case int32(_FcResultMatch):
  12774. default:
  12775. goto bail1
  12776. }
  12777. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+642, 0, bp+88) {
  12778. case int32(_FcResultNoMatch):
  12779. *(*int32)(unsafe.Pointer(bp + 88)) = int32(m_FC_HINT_FULL)
  12780. case int32(_FcResultMatch):
  12781. default:
  12782. goto bail1
  12783. }
  12784. if !(*(*TFcBool)(unsafe.Pointer(bp + 72)) != 0) || *(*int32)(unsafe.Pointer(bp + 88)) == m_FC_HINT_NONE {
  12785. p7 = fi + 92
  12786. *(*TFT_Int)(unsafe.Pointer(p7)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p7))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(1))
  12787. }
  12788. /* Figure out the load target, which modifies the hinting
  12789. * behavior of FreeType based on the intended use of the glyphs.
  12790. */
  12791. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias != 0 {
  12792. if m_FC_HINT_NONE < *(*int32)(unsafe.Pointer(bp + 88)) && *(*int32)(unsafe.Pointer(bp + 88)) < int32(m_FC_HINT_FULL) {
  12793. *(*TFT_Int)(unsafe.Pointer(fi + 92)) |= int32(_FT_RENDER_MODE_LIGHT) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12794. } else {
  12795. /* autohinter will snap stems to integer widths, when
  12796. * the LCD targets are used.
  12797. */
  12798. switch (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba {
  12799. case int32(m_FC_RGBA_RGB):
  12800. fallthrough
  12801. case int32(m_FC_RGBA_BGR):
  12802. *(*TFT_Int)(unsafe.Pointer(fi + 92)) |= int32(_FT_RENDER_MODE_LCD) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12803. case int32(m_FC_RGBA_VRGB):
  12804. fallthrough
  12805. case int32(m_FC_RGBA_VBGR):
  12806. *(*TFT_Int)(unsafe.Pointer(fi + 92)) |= int32(_FT_RENDER_MODE_LCD_V) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12807. break
  12808. }
  12809. }
  12810. } else {
  12811. *(*TFT_Int)(unsafe.Pointer(fi + 92)) |= int32(_FT_RENDER_MODE_MONO) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12812. }
  12813. /* set vertical layout if requested */
  12814. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1326, 0, bp+76) {
  12815. case int32(_FcResultNoMatch):
  12816. *(*TFcBool)(unsafe.Pointer(bp + 76)) = m_FcFalse
  12817. case int32(_FcResultMatch):
  12818. default:
  12819. goto bail1
  12820. }
  12821. if *(*TFcBool)(unsafe.Pointer(bp + 76)) != 0 {
  12822. p8 = fi + 92
  12823. *(*TFT_Int)(unsafe.Pointer(p8)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p8))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(4))
  12824. }
  12825. /* force autohinting if requested */
  12826. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+633, 0, bp+80) {
  12827. case int32(_FcResultNoMatch):
  12828. *(*TFcBool)(unsafe.Pointer(bp + 80)) = m_FcFalse
  12829. case int32(_FcResultMatch):
  12830. default:
  12831. goto bail1
  12832. }
  12833. if *(*TFcBool)(unsafe.Pointer(bp + 80)) != 0 {
  12834. p9 = fi + 92
  12835. *(*TFT_Int)(unsafe.Pointer(p9)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p9))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(5))
  12836. }
  12837. /* disable global advance width (for broken DynaLab TT CJK fonts) */
  12838. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1341, 0, bp+84) {
  12839. case int32(_FcResultNoMatch):
  12840. *(*TFcBool)(unsafe.Pointer(bp + 84)) = int32(m_FcTrue)
  12841. case int32(_FcResultMatch):
  12842. default:
  12843. goto bail1
  12844. }
  12845. if !(*(*TFcBool)(unsafe.Pointer(bp + 84)) != 0) {
  12846. p10 = fi + 92
  12847. *(*TFT_Int)(unsafe.Pointer(p10)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p10))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(9))
  12848. }
  12849. /*
  12850. * Get requested spacing value
  12851. */
  12852. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1355, 0, fi+100) {
  12853. case int32(_FcResultNoMatch):
  12854. (*TXftFontInfo)(unsafe.Pointer(fi)).Fspacing = m_FC_PROPORTIONAL
  12855. case int32(_FcResultMatch):
  12856. default:
  12857. goto bail1
  12858. }
  12859. /*
  12860. * Check for minspace
  12861. */
  12862. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+660, 0, fi+104) {
  12863. case int32(_FcResultNoMatch):
  12864. (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace = m_FcFalse
  12865. case int32(_FcResultMatch):
  12866. default:
  12867. goto bail1
  12868. }
  12869. /*
  12870. * Check for fixed pixel spacing
  12871. */
  12872. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1363, 0, fi+108) {
  12873. case int32(_FcResultNoMatch):
  12874. (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width = 0
  12875. case int32(_FcResultMatch):
  12876. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width != 0 {
  12877. (*TXftFontInfo)(unsafe.Pointer(fi)).Fspacing = int32(m_FC_MONO)
  12878. }
  12879. default:
  12880. goto bail1
  12881. }
  12882. /*
  12883. * Step over hash value in the structure
  12884. */
  12885. hash = uint32(0)
  12886. hashp = fi + uintptr(1)*4
  12887. nhash = libc.Int32FromUint64(libc.Uint64FromInt64(112)/libc.Uint64FromInt64(4) - libc.Uint64FromInt32(1))
  12888. for {
  12889. v11 = nhash
  12890. nhash--
  12891. if !(v11 != 0) {
  12892. break
  12893. }
  12894. v12 = hashp
  12895. hashp += 4
  12896. hash += *(*TFcChar32)(unsafe.Pointer(v12))
  12897. }
  12898. (*TXftFontInfo)(unsafe.Pointer(fi)).Fhash = hash
  12899. /*
  12900. * All done
  12901. */
  12902. return int32(m_FcTrue)
  12903. goto bail1
  12904. bail1:
  12905. ;
  12906. __XftReleaseFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12907. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = libc.UintptrFromInt32(0)
  12908. goto bail0
  12909. bail0:
  12910. ;
  12911. return m_FcFalse
  12912. return r
  12913. }
  12914. func _XftFontInfoEmpty(tls *libc.TLS, dpy uintptr, fi uintptr) {
  12915. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile != 0 {
  12916. __XftReleaseFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12917. }
  12918. }
  12919. func XXftFontInfoCreate(tls *libc.TLS, dpy uintptr, pattern uintptr) (r uintptr) {
  12920. var fi uintptr
  12921. _ = fi
  12922. fi = libc.Xmalloc(tls, uint64(112))
  12923. if !(fi != 0) {
  12924. return libc.UintptrFromInt32(0)
  12925. }
  12926. if !(_XftFontInfoFill(tls, dpy, pattern, fi) != 0) {
  12927. libc.Xfree(tls, fi)
  12928. fi = libc.UintptrFromInt32(0)
  12929. }
  12930. XXftMemAlloc(tls, int32(_XFT_MEM_FONT), uint64(112))
  12931. return fi
  12932. }
  12933. func XXftFontInfoDestroy(tls *libc.TLS, dpy uintptr, fi uintptr) {
  12934. _XftFontInfoEmpty(tls, dpy, fi)
  12935. XXftMemFree(tls, int32(_XFT_MEM_FONT), uint64(112))
  12936. libc.Xfree(tls, fi)
  12937. }
  12938. func XXftFontInfoHash(tls *libc.TLS, fi uintptr) (r TFcChar32) {
  12939. return (*TXftFontInfo)(unsafe.Pointer(fi)).Fhash
  12940. }
  12941. func XXftFontInfoEqual(tls *libc.TLS, a uintptr, b uintptr) (r TFcBool) {
  12942. return libc.BoolInt32(libc.Xmemcmp(tls, a, b, uint64(112)) == 0)
  12943. }
  12944. func XXftFontOpenInfo(tls *libc.TLS, dpy uintptr, pattern uintptr, fi uintptr) (r uintptr) {
  12945. bp := tls.Alloc(96)
  12946. defer tls.Free(96)
  12947. var alloc_size Tsize_t
  12948. var antialias, color TFcBool
  12949. var ascent, descent, height, i, v2, v4 int32
  12950. var bucket, font, format, info, v3 uintptr
  12951. var face TFT_Face
  12952. var hash_value, num_unicode, rehash_value TFcChar32
  12953. var num_glyphs TFT_UInt
  12954. var v6 uint64
  12955. var _ /* charset at bp+0 */ uintptr
  12956. var _ /* max_glyph_memory at bp+8 */ int32
  12957. var _ /* vector at bp+16 */ TFT_Vector
  12958. var _ /* vector at bp+32 */ TFT_Vector
  12959. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = alloc_size, antialias, ascent, bucket, color, descent, face, font, format, hash_value, height, i, info, num_glyphs, num_unicode, rehash_value, v2, v3, v4, v6
  12960. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  12961. if !(info != 0) {
  12962. return libc.UintptrFromInt32(0)
  12963. }
  12964. /*
  12965. * Find a matching previously opened font
  12966. */
  12967. bucket = info + 472 + uintptr((*TXftFontInfo)(unsafe.Pointer(fi)).Fhash%uint32(m_XFT_NUM_FONT_HASH))*8
  12968. font = *(*uintptr)(unsafe.Pointer(bucket))
  12969. for {
  12970. if !(font != 0) {
  12971. break
  12972. }
  12973. if XXftFontInfoEqual(tls, font+48, fi) != 0 {
  12974. v3 = font + 160
  12975. v2 = *(*int32)(unsafe.Pointer(v3))
  12976. *(*int32)(unsafe.Pointer(v3))++
  12977. if !(v2 != 0) {
  12978. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts--
  12979. }
  12980. libfontconfig.XFcPatternDestroy(tls, pattern)
  12981. return font
  12982. }
  12983. goto _1
  12984. _1:
  12985. ;
  12986. font = (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next
  12987. }
  12988. /*
  12989. * No existing font, create another.
  12990. */
  12991. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  12992. libc.Xprintf(tls, __ccgo_ts+1373, 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)))
  12993. }
  12994. if libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+201, 0, bp+8) != int32(_FcResultMatch) {
  12995. *(*int32)(unsafe.Pointer(bp + 8)) = libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024)
  12996. }
  12997. face = __XftLockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12998. if !(face != 0) {
  12999. goto bail0
  13000. }
  13001. if !(X_XftSetFace(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile, (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize, (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize, fi+56) != 0) {
  13002. goto bail1
  13003. }
  13004. /*
  13005. * Get the set of Unicode codepoints covered by the font.
  13006. * If the incoming pattern doesn't provide this data, go
  13007. * off and compute it. Yes, this is expensive, but it's
  13008. * required to map Unicode to glyph indices.
  13009. */
  13010. if libfontconfig.XFcPatternGetCharSet(tls, pattern, __ccgo_ts+1400, 0, bp) == int32(_FcResultMatch) {
  13011. *(*uintptr)(unsafe.Pointer(bp)) = libfontconfig.XFcCharSetCopy(tls, *(*uintptr)(unsafe.Pointer(bp)))
  13012. } else {
  13013. *(*uintptr)(unsafe.Pointer(bp)) = libfontconfig.XFcFreeTypeCharSet(tls, face, libfontconfig.XFcConfigGetBlanks(tls, libc.UintptrFromInt32(0)))
  13014. }
  13015. antialias = (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias
  13016. if !((*TFT_FaceRec_)(unsafe.Pointer(face)).Fface_flags&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(0)) != 0) {
  13017. antialias = m_FcFalse
  13018. }
  13019. if !!((*TFT_FaceRec_)(unsafe.Pointer(face)).Fface_flags&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(14)) != 0) {
  13020. v4 = int32(m_FcTrue)
  13021. } else {
  13022. v4 = m_FcFalse
  13023. }
  13024. color = v4
  13025. /*
  13026. * Find the appropriate picture format
  13027. */
  13028. if (*TXftFontInfo)(unsafe.Pointer(fi)).Frender != 0 {
  13029. if color != 0 {
  13030. format = libxrender.XXRenderFindStandardFormat(tls, dpy, m_PictStandardARGB32)
  13031. } else {
  13032. if antialias != 0 {
  13033. switch (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba {
  13034. case int32(m_FC_RGBA_RGB):
  13035. fallthrough
  13036. case int32(m_FC_RGBA_BGR):
  13037. fallthrough
  13038. case int32(m_FC_RGBA_VRGB):
  13039. fallthrough
  13040. case int32(m_FC_RGBA_VBGR):
  13041. format = libxrender.XXRenderFindStandardFormat(tls, dpy, m_PictStandardARGB32)
  13042. default:
  13043. format = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA8))
  13044. break
  13045. }
  13046. } else {
  13047. format = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA1))
  13048. }
  13049. }
  13050. if !(format != 0) {
  13051. goto bail2
  13052. }
  13053. } else {
  13054. format = libc.UintptrFromInt32(0)
  13055. }
  13056. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  13057. num_unicode = libfontconfig.XFcCharSetCount(tls, *(*uintptr)(unsafe.Pointer(bp)))
  13058. hash_value = __XftHashSize(tls, num_unicode)
  13059. rehash_value = hash_value - uint32(2)
  13060. } else {
  13061. hash_value = uint32(0)
  13062. rehash_value = uint32(0)
  13063. }
  13064. /*
  13065. * Sometimes the glyphs are numbered 1..n, other times 0..n-1,
  13066. * accept either numbering scheme by making room in the table
  13067. */
  13068. num_glyphs = libc.Uint32FromInt64((*TFT_FaceRec_)(unsafe.Pointer(face)).Fnum_glyphs) + uint32(1)
  13069. alloc_size = libc.Uint64FromInt64(256) + uint64(num_glyphs)*libc.Uint64FromInt64(8) + uint64(hash_value)*libc.Uint64FromInt64(8)
  13070. font = libc.Xmalloc(tls, alloc_size)
  13071. if !(font != 0) {
  13072. goto bail2
  13073. }
  13074. XXftMemAlloc(tls, int32(_XFT_MEM_FONT), alloc_size)
  13075. /*
  13076. * Public fields
  13077. */
  13078. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  13079. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx = 0
  13080. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fdescender
  13081. libfreetype.XFT_Vector_Transform(tls, bp+16, fi+56)
  13082. descent = int32(-((*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy >> libc.Int32FromInt32(6)))
  13083. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx = 0
  13084. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fascender
  13085. libfreetype.XFT_Vector_Transform(tls, bp+16, fi+56)
  13086. ascent = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy >> libc.Int32FromInt32(6))
  13087. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace != 0 {
  13088. height = ascent + descent
  13089. } else {
  13090. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx = 0
  13091. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fheight
  13092. libfreetype.XFT_Vector_Transform(tls, bp+16, fi+56)
  13093. height = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy >> libc.Int32FromInt32(6))
  13094. }
  13095. } else {
  13096. descent = -int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fdescender >> libc.Int32FromInt32(6))
  13097. ascent = int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fascender >> libc.Int32FromInt32(6))
  13098. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace != 0 {
  13099. height = ascent + descent
  13100. } else {
  13101. height = int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fheight >> libc.Int32FromInt32(6))
  13102. }
  13103. }
  13104. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fascent = ascent
  13105. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fdescent = descent
  13106. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fheight = height
  13107. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width != 0 {
  13108. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width = (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width
  13109. } else {
  13110. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  13111. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  13112. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy = 0
  13113. libfreetype.XFT_Vector_Transform(tls, bp+32, fi+56)
  13114. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx >> libc.Int32FromInt32(6))
  13115. } else {
  13116. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width = int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance >> libc.Int32FromInt32(6))
  13117. }
  13118. }
  13119. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fcharset = *(*uintptr)(unsafe.Pointer(bp))
  13120. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fpattern = pattern
  13121. /*
  13122. * Management fields
  13123. */
  13124. (*TXftFontInt)(unsafe.Pointer(font)).Fref = int32(1)
  13125. (*TXftFontInt)(unsafe.Pointer(font)).Fnext = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  13126. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts = font
  13127. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next = *(*uintptr)(unsafe.Pointer(bucket))
  13128. *(*uintptr)(unsafe.Pointer(bucket)) = font
  13129. /*
  13130. * Copy the info over
  13131. */
  13132. (*TXftFontInt)(unsafe.Pointer(font)).Finfo = *(*TXftFontInfo)(unsafe.Pointer(fi))
  13133. /*
  13134. * reset the antialias field. It can't
  13135. * be set correctly until the font is opened,
  13136. * which doesn't happen in XftFontInfoFill
  13137. */
  13138. (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias = antialias
  13139. /*
  13140. * Set color value, which is only known once the
  13141. * font was loaded
  13142. */
  13143. (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fcolor = color
  13144. /*
  13145. * bump XftFile reference count
  13146. */
  13147. (*TXftFtFile)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ffile)).Fref++
  13148. /*
  13149. * Per glyph information
  13150. */
  13151. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs = font + libc.UintptrFromInt32(1)*256
  13152. libc.Xmemset(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs, int32('\000'), uint64(num_glyphs)*uint64(8))
  13153. (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs = num_glyphs
  13154. /*
  13155. * Memory-usage tracking
  13156. */
  13157. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = uint32(0xffffffff)
  13158. (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse = uint32(0)
  13159. /*
  13160. * Unicode hash table information
  13161. */
  13162. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_table = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs)*8
  13163. i = 0
  13164. for {
  13165. if !(libc.Uint32FromInt32(i) < hash_value) {
  13166. break
  13167. }
  13168. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(i)*8))).Fucs4 = libc.Uint32FromInt32(^libc.Int32FromInt32(0))
  13169. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(i)*8))).Fglyph = uint32(0)
  13170. goto _5
  13171. _5:
  13172. ;
  13173. i++
  13174. }
  13175. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_value = libc.Int32FromUint32(hash_value)
  13176. (*TXftFontInt)(unsafe.Pointer(font)).Frehash_value = libc.Int32FromUint32(rehash_value)
  13177. /*
  13178. * X specific fields
  13179. */
  13180. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = uint64(0)
  13181. (*TXftFontInt)(unsafe.Pointer(font)).Fformat = format
  13182. /*
  13183. * Glyph memory management fields
  13184. */
  13185. (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory = uint64(0)
  13186. (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory = libc.Uint64FromInt32(*(*int32)(unsafe.Pointer(bp + 8)))
  13187. (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage
  13188. (*TXftFontInt)(unsafe.Pointer(font)).Fuse_free_glyphs = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs
  13189. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  13190. v6 = uint64(48)
  13191. } else {
  13192. v6 = uint64(40)
  13193. }
  13194. (*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph = uint32(v6)
  13195. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  13196. return font
  13197. goto bail2
  13198. bail2:
  13199. ;
  13200. libfontconfig.XFcCharSetDestroy(tls, *(*uintptr)(unsafe.Pointer(bp)))
  13201. goto bail1
  13202. bail1:
  13203. ;
  13204. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  13205. goto bail0
  13206. bail0:
  13207. ;
  13208. return libc.UintptrFromInt32(0)
  13209. return r
  13210. }
  13211. func XXftFontOpenPattern(tls *libc.TLS, dpy uintptr, pattern uintptr) (r uintptr) {
  13212. bp := tls.Alloc(112)
  13213. defer tls.Free(112)
  13214. var font uintptr
  13215. var _ /* info at bp+0 */ TXftFontInfo
  13216. _ = font
  13217. if !(_XftFontInfoFill(tls, dpy, pattern, bp) != 0) {
  13218. return libc.UintptrFromInt32(0)
  13219. }
  13220. font = XXftFontOpenInfo(tls, dpy, pattern, bp)
  13221. _XftFontInfoEmpty(tls, dpy, bp)
  13222. return font
  13223. }
  13224. func XXftFontCopy(tls *libc.TLS, dpy uintptr, public uintptr) (r uintptr) {
  13225. var font uintptr
  13226. _ = font
  13227. font = public
  13228. (*TXftFontInt)(unsafe.Pointer(font)).Fref++
  13229. return public
  13230. }
  13231. func _XftFontDestroy(tls *libc.TLS, dpy uintptr, public uintptr) {
  13232. var font, info, xftg uintptr
  13233. var i TFT_UInt
  13234. _, _, _, _ = font, i, info, xftg
  13235. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  13236. font = public
  13237. /* note reduction in memory use */
  13238. if info != 0 {
  13239. *(*uint64)(unsafe.Pointer(info + 56)) -= (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  13240. }
  13241. /* Clean up the info */
  13242. _XftFontInfoEmpty(tls, dpy, font+48)
  13243. /* Free the glyphset */
  13244. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  13245. libxrender.XXRenderFreeGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset)
  13246. }
  13247. /* Free the glyphs */
  13248. i = uint32(0)
  13249. for {
  13250. if !(i < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  13251. break
  13252. }
  13253. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(i)*8))
  13254. if xftg != 0 {
  13255. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  13256. libc.Xfree(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap)
  13257. }
  13258. libc.Xfree(tls, xftg)
  13259. }
  13260. goto _1
  13261. _1:
  13262. ;
  13263. i++
  13264. }
  13265. /* Free the pattern and the charset */
  13266. libfontconfig.XFcPatternDestroy(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fpattern)
  13267. libfontconfig.XFcCharSetDestroy(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fcharset)
  13268. /* Finally, free the font structure */
  13269. XXftMemFree(tls, int32(_XFT_MEM_FONT), libc.Uint64FromInt64(256)+uint64((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs)*libc.Uint64FromInt64(8)+libc.Uint64FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value)*libc.Uint64FromInt64(8))
  13270. libc.Xfree(tls, font)
  13271. }
  13272. func _XftFontFindNthUnref(tls *libc.TLS, info uintptr, n int32) (r uintptr) {
  13273. var font, public uintptr
  13274. var v2 int32
  13275. var v3 bool
  13276. _, _, _, _ = font, public, v2, v3
  13277. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  13278. for {
  13279. if !(public != 0) {
  13280. break
  13281. }
  13282. font = public
  13283. if v3 = !((*TXftFontInt)(unsafe.Pointer(font)).Fref != 0); v3 {
  13284. v2 = n
  13285. n--
  13286. }
  13287. if v3 && !(v2 != 0) {
  13288. break
  13289. }
  13290. goto _1
  13291. _1:
  13292. ;
  13293. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  13294. }
  13295. return public
  13296. }
  13297. func XXftFontManageMemory(tls *libc.TLS, dpy uintptr) {
  13298. bp := tls.Alloc(48)
  13299. defer tls.Free(48)
  13300. var font, info, prev, public uintptr
  13301. _, _, _, _ = font, info, prev, public
  13302. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  13303. if !(info != 0) {
  13304. return
  13305. }
  13306. for (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts {
  13307. public = _XftFontFindNthUnref(tls, info, libc.Xrand(tls)%(*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts)
  13308. font = public
  13309. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  13310. libc.Xprintf(tls, __ccgo_ts+1408, 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)))
  13311. }
  13312. /* Unhook from display list */
  13313. prev = info + 40
  13314. for {
  13315. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  13316. break
  13317. }
  13318. if *(*uintptr)(unsafe.Pointer(prev)) == public {
  13319. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  13320. break
  13321. }
  13322. goto _1
  13323. _1:
  13324. ;
  13325. prev = *(*uintptr)(unsafe.Pointer(prev)) + 32
  13326. }
  13327. /* Unhook from hash list */
  13328. prev = info + 472 + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fhash%uint32(m_XFT_NUM_FONT_HASH))*8
  13329. for {
  13330. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  13331. break
  13332. }
  13333. if *(*uintptr)(unsafe.Pointer(prev)) == public {
  13334. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next
  13335. break
  13336. }
  13337. goto _2
  13338. _2:
  13339. ;
  13340. prev = *(*uintptr)(unsafe.Pointer(prev)) + 40
  13341. }
  13342. /* Destroy the font */
  13343. _XftFontDestroy(tls, dpy, public)
  13344. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts--
  13345. }
  13346. }
  13347. func XXftFontClose(tls *libc.TLS, dpy uintptr, public uintptr) {
  13348. var font, info, v2 uintptr
  13349. var v1 int32
  13350. _, _, _, _ = font, info, v1, v2
  13351. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  13352. font = public
  13353. v2 = font + 160
  13354. *(*int32)(unsafe.Pointer(v2))--
  13355. v1 = *(*int32)(unsafe.Pointer(v2))
  13356. if v1 != 0 {
  13357. return
  13358. }
  13359. if info != 0 {
  13360. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts++
  13361. XXftFontManageMemory(tls, dpy)
  13362. } else {
  13363. _XftFontDestroy(tls, dpy, public)
  13364. }
  13365. }
  13366. func XXftInitFtLibrary(tls *libc.TLS) (r TFcBool) {
  13367. if X_XftFTlibrary != 0 {
  13368. return int32(m_FcTrue)
  13369. }
  13370. if libfreetype.XFT_Init_FreeType(tls, uintptr(unsafe.Pointer(&X_XftFTlibrary))) != 0 {
  13371. return m_FcFalse
  13372. }
  13373. return int32(m_FcTrue)
  13374. }
  13375. const m_FT_LCD_FILTER_FIVE_TAPS = 5
  13376. const m_FT_LOAD_DEFAULT2 = 0x0
  13377. const m_FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY = "FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY"
  13378. const m_FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY = "FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY"
  13379. const m_ft_glyph_bbox_gridfit = "FT_GLYPH_BBOX_GRIDFIT"
  13380. const m_ft_glyph_bbox_pixels = "FT_GLYPH_BBOX_PIXELS"
  13381. const m_ft_glyph_bbox_subpixels = "FT_GLYPH_BBOX_SUBPIXELS"
  13382. const m_ft_glyph_bbox_truncate = "FT_GLYPH_BBOX_TRUNCATE"
  13383. const m_ft_glyph_bbox_unscaled = "FT_GLYPH_BBOX_UNSCALED"
  13384. type TFT_Orientation = int32
  13385. type _FT_Orientation_ = int32
  13386. const _FT_ORIENTATION_TRUETYPE = 0
  13387. const _FT_ORIENTATION_POSTSCRIPT = 1
  13388. const _FT_ORIENTATION_FILL_RIGHT = 0
  13389. const _FT_ORIENTATION_FILL_LEFT = 1
  13390. const _FT_ORIENTATION_NONE = 2
  13391. type TFT_LcdFilter = int32
  13392. type _FT_LcdFilter_ = int32
  13393. const _FT_LCD_FILTER_NONE = 0
  13394. const _FT_LCD_FILTER_DEFAULT = 1
  13395. const _FT_LCD_FILTER_LIGHT = 2
  13396. const _FT_LCD_FILTER_LEGACY1 = 3
  13397. const _FT_LCD_FILTER_LEGACY = 16
  13398. const _FT_LCD_FILTER_MAX = 17
  13399. type TFT_LcdFiveTapFilter = [5]TFT_Byte
  13400. type TFT_Glyph = uintptr
  13401. type TFT_GlyphRec_ = struct {
  13402. Flibrary TFT_Library
  13403. Fclazz uintptr
  13404. Fformat TFT_Glyph_Format
  13405. Fadvance TFT_Vector
  13406. }
  13407. type TFT_GlyphRec = struct {
  13408. Flibrary TFT_Library
  13409. Fclazz uintptr
  13410. Fformat TFT_Glyph_Format
  13411. Fadvance TFT_Vector
  13412. }
  13413. type TFT_BitmapGlyph = uintptr
  13414. type TFT_BitmapGlyphRec_ = struct {
  13415. Froot TFT_GlyphRec
  13416. Fleft TFT_Int
  13417. Ftop TFT_Int
  13418. Fbitmap TFT_Bitmap
  13419. }
  13420. type TFT_BitmapGlyphRec = struct {
  13421. Froot TFT_GlyphRec
  13422. Fleft TFT_Int
  13423. Ftop TFT_Int
  13424. Fbitmap TFT_Bitmap
  13425. }
  13426. type TFT_OutlineGlyph = uintptr
  13427. type TFT_OutlineGlyphRec_ = struct {
  13428. Froot TFT_GlyphRec
  13429. Foutline TFT_Outline
  13430. }
  13431. type TFT_OutlineGlyphRec = struct {
  13432. Froot TFT_GlyphRec
  13433. Foutline TFT_Outline
  13434. }
  13435. type TFT_SvgGlyph = uintptr
  13436. type TFT_SvgGlyphRec_ = struct {
  13437. Froot TFT_GlyphRec
  13438. Fsvg_document uintptr
  13439. Fsvg_document_length TFT_ULong
  13440. Fglyph_index TFT_UInt
  13441. Fmetrics TFT_Size_Metrics
  13442. Funits_per_EM TFT_UShort
  13443. Fstart_glyph_id TFT_UShort
  13444. Fend_glyph_id TFT_UShort
  13445. Ftransform TFT_Matrix
  13446. Fdelta TFT_Vector
  13447. }
  13448. type TFT_SvgGlyphRec = struct {
  13449. Froot TFT_GlyphRec
  13450. Fsvg_document uintptr
  13451. Fsvg_document_length TFT_ULong
  13452. Fglyph_index TFT_UInt
  13453. Fmetrics TFT_Size_Metrics
  13454. Funits_per_EM TFT_UShort
  13455. Fstart_glyph_id TFT_UShort
  13456. Fend_glyph_id TFT_UShort
  13457. Ftransform TFT_Matrix
  13458. Fdelta TFT_Vector
  13459. }
  13460. type TFT_Glyph_BBox_Mode = int32
  13461. type _FT_Glyph_BBox_Mode_ = int32
  13462. const _FT_GLYPH_BBOX_UNSCALED = 0
  13463. const _FT_GLYPH_BBOX_SUBPIXELS = 0
  13464. const _FT_GLYPH_BBOX_GRIDFIT = 1
  13465. const _FT_GLYPH_BBOX_TRUNCATE = 2
  13466. const _FT_GLYPH_BBOX_PIXELS = 3
  13467. /* */
  13468. /* END */
  13469. /* Local Variables: */
  13470. /* coding: utf-8 */
  13471. /* End: */
  13472. type Tm3x3 = [3][3]float64
  13473. func _m3x3_uniform(tls *libc.TLS, m uintptr) {
  13474. var v1, v2, v3, v4, v5, v6, v7 float64
  13475. _, _, _, _, _, _, _ = v1, v2, v3, v4, v5, v6, v7
  13476. v2 = libc.Float64FromFloat64(1)
  13477. *(*float64)(unsafe.Pointer(m + 2*24 + 2*8)) = v2
  13478. v1 = v2
  13479. *(*float64)(unsafe.Pointer(m + 1*24 + 1*8)) = v1
  13480. *(*float64)(unsafe.Pointer(m)) = v1
  13481. v7 = libc.Float64FromInt32(0)
  13482. *(*float64)(unsafe.Pointer(m + 2*24 + 1*8)) = v7
  13483. v6 = v7
  13484. *(*float64)(unsafe.Pointer(m + 2*24)) = v6
  13485. v5 = v6
  13486. *(*float64)(unsafe.Pointer(m + 1*24 + 2*8)) = v5
  13487. v4 = v5
  13488. *(*float64)(unsafe.Pointer(m + 2*8)) = v4
  13489. v3 = v4
  13490. *(*float64)(unsafe.Pointer(m + 1*24)) = v3
  13491. *(*float64)(unsafe.Pointer(m + 1*8)) = v3
  13492. }
  13493. func _m3x3_transform(tls *libc.TLS, v uintptr, m uintptr) {
  13494. var x, y float64
  13495. _, _ = x, y
  13496. x = float64((*TFT_Vector)(unsafe.Pointer(v)).Fx)
  13497. y = float64((*TFT_Vector)(unsafe.Pointer(v)).Fy)
  13498. (*TFT_Vector)(unsafe.Pointer(v)).Fx = int64(float64(x**(*float64)(unsafe.Pointer(m))) + float64(y**(*float64)(unsafe.Pointer(m + 1*8))) + *(*float64)(unsafe.Pointer(m + 2*8)) + libc.Float64FromFloat64(0.5))
  13499. (*TFT_Vector)(unsafe.Pointer(v)).Fy = int64(float64(x**(*float64)(unsafe.Pointer(m + 1*24))) + float64(y**(*float64)(unsafe.Pointer(m + 1*24 + 1*8))) + *(*float64)(unsafe.Pointer(m + 1*24 + 2*8)) + libc.Float64FromFloat64(0.5))
  13500. }
  13501. func _m3x3_invert(tls *libc.TLS, m uintptr, mi uintptr) {
  13502. var det float64
  13503. _ = det
  13504. det = float64(*(*float64)(unsafe.Pointer(m)) * (float64(*(*float64)(unsafe.Pointer(m + 1*24 + 1*8))**(*float64)(unsafe.Pointer(m + 2*24 + 2*8))) - float64(*(*float64)(unsafe.Pointer(m + 1*24 + 2*8))**(*float64)(unsafe.Pointer(m + 2*24 + 1*8)))))
  13505. det -= float64(*(*float64)(unsafe.Pointer(m + 1*8)) * (float64(*(*float64)(unsafe.Pointer(m + 1*24))**(*float64)(unsafe.Pointer(m + 2*24 + 2*8))) - float64(*(*float64)(unsafe.Pointer(m + 1*24 + 2*8))**(*float64)(unsafe.Pointer(m + 2*24)))))
  13506. det += float64(*(*float64)(unsafe.Pointer(m + 2*8)) * (float64(*(*float64)(unsafe.Pointer(m + 1*24))**(*float64)(unsafe.Pointer(m + 2*24 + 1*8))) - float64(*(*float64)(unsafe.Pointer(m + 1*24 + 1*8))**(*float64)(unsafe.Pointer(m + 2*24)))))
  13507. det = float64(1) / det
  13508. *(*float64)(unsafe.Pointer(mi)) = float64(det * (float64(*(*float64)(unsafe.Pointer(m + 1*24 + 1*8))**(*float64)(unsafe.Pointer(m + 2*24 + 2*8))) - float64(*(*float64)(unsafe.Pointer(m + 1*24 + 2*8))**(*float64)(unsafe.Pointer(m + 2*24 + 1*8)))))
  13509. *(*float64)(unsafe.Pointer(mi + 1*24)) = float64(det * (float64(*(*float64)(unsafe.Pointer(m + 1*24 + 2*8))**(*float64)(unsafe.Pointer(m + 2*24))) - float64(*(*float64)(unsafe.Pointer(m + 1*24))**(*float64)(unsafe.Pointer(m + 2*24 + 2*8)))))
  13510. *(*float64)(unsafe.Pointer(mi + 2*24)) = float64(det * (float64(*(*float64)(unsafe.Pointer(m + 1*24))**(*float64)(unsafe.Pointer(m + 2*24 + 1*8))) - float64(*(*float64)(unsafe.Pointer(m + 1*24 + 1*8))**(*float64)(unsafe.Pointer(m + 2*24)))))
  13511. *(*float64)(unsafe.Pointer(mi + 1*8)) = float64(det * (float64(*(*float64)(unsafe.Pointer(m + 2*8))**(*float64)(unsafe.Pointer(m + 2*24 + 1*8))) - float64(*(*float64)(unsafe.Pointer(m + 1*8))**(*float64)(unsafe.Pointer(m + 2*24 + 2*8)))))
  13512. *(*float64)(unsafe.Pointer(mi + 1*24 + 1*8)) = float64(det * (float64(*(*float64)(unsafe.Pointer(m))**(*float64)(unsafe.Pointer(m + 2*24 + 2*8))) - float64(*(*float64)(unsafe.Pointer(m + 2*8))**(*float64)(unsafe.Pointer(m + 2*24)))))
  13513. *(*float64)(unsafe.Pointer(mi + 2*24 + 1*8)) = float64(det * (float64(*(*float64)(unsafe.Pointer(m + 1*8))**(*float64)(unsafe.Pointer(m + 2*24))) - float64(*(*float64)(unsafe.Pointer(m))**(*float64)(unsafe.Pointer(m + 2*24 + 1*8)))))
  13514. *(*float64)(unsafe.Pointer(mi + 2*8)) = float64(det * (float64(*(*float64)(unsafe.Pointer(m + 1*8))**(*float64)(unsafe.Pointer(m + 1*24 + 2*8))) - float64(*(*float64)(unsafe.Pointer(m + 2*8))**(*float64)(unsafe.Pointer(m + 1*24 + 1*8)))))
  13515. *(*float64)(unsafe.Pointer(mi + 1*24 + 2*8)) = float64(det * (float64(*(*float64)(unsafe.Pointer(m + 2*8))**(*float64)(unsafe.Pointer(m + 1*24))) - float64(*(*float64)(unsafe.Pointer(m))**(*float64)(unsafe.Pointer(m + 1*24 + 2*8)))))
  13516. *(*float64)(unsafe.Pointer(mi + 2*24 + 2*8)) = float64(det * (float64(*(*float64)(unsafe.Pointer(m))**(*float64)(unsafe.Pointer(m + 1*24 + 1*8))) - float64(*(*float64)(unsafe.Pointer(m + 1*8))**(*float64)(unsafe.Pointer(m + 1*24)))))
  13517. }
  13518. /*
  13519. * Validate the memory info for a font
  13520. */
  13521. func __XftFontValidateMemory(tls *libc.TLS, dpy uintptr, public uintptr) {
  13522. bp := tls.Alloc(32)
  13523. defer tls.Free(32)
  13524. var font, xftg uintptr
  13525. var glyph_memory uint64
  13526. var glyphindex TFT_UInt
  13527. _, _, _, _ = font, glyph_memory, glyphindex, xftg
  13528. font = public
  13529. glyph_memory = uint64(0)
  13530. glyphindex = uint32(0)
  13531. for {
  13532. if !(glyphindex < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  13533. break
  13534. }
  13535. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8))
  13536. if xftg != 0 {
  13537. glyph_memory += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  13538. }
  13539. goto _1
  13540. _1:
  13541. ;
  13542. glyphindex++
  13543. }
  13544. if glyph_memory != (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory {
  13545. libc.Xprintf(tls, __ccgo_ts+1452, libc.VaList(bp+8, (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory, glyph_memory))
  13546. }
  13547. }
  13548. // C documentation
  13549. //
  13550. // /*
  13551. // * Validate the glyph usage-links for a font.
  13552. // */
  13553. func __XftValidateGlyphUsage(tls *libc.TLS, font uintptr) {
  13554. bp := tls.Alloc(32)
  13555. defer tls.Free(32)
  13556. var forward, next, reverse, v2, v4 TFT_UInt
  13557. var x1st, xuse uintptr
  13558. _, _, _, _, _, _, _ = forward, next, reverse, x1st, xuse, v2, v4
  13559. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest != uint32(0xffffffff) {
  13560. x1st = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnewest)*8))
  13561. xuse = x1st
  13562. forward = uint32(1)
  13563. next = (*TXftGlyphUsage)(unsafe.Pointer(x1st)).Fnewer
  13564. for {
  13565. if !(xuse != libc.UintptrFromInt32(0) && next != (*TXftFontInt)(unsafe.Pointer(font)).Fnewest) {
  13566. break
  13567. }
  13568. if next >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs {
  13569. libc.Xprintf(tls, __ccgo_ts+1511, libc.VaList(bp+8, next))
  13570. break
  13571. }
  13572. forward++
  13573. v2 = forward
  13574. if v2 > (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse {
  13575. libc.Xprintf(tls, __ccgo_ts+1534, libc.VaList(bp+8, forward, (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse))
  13576. if forward > (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse+uint32(10) {
  13577. break
  13578. }
  13579. }
  13580. xuse = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(next)*8))
  13581. goto _1
  13582. _1:
  13583. ;
  13584. next = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer
  13585. }
  13586. if forward < (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse {
  13587. libc.Xprintf(tls, __ccgo_ts+1574, libc.VaList(bp+8, forward, (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse))
  13588. }
  13589. reverse = uint32(1)
  13590. next = (*TXftGlyphUsage)(unsafe.Pointer(x1st)).Folder
  13591. for {
  13592. if !(xuse != libc.UintptrFromInt32(0) && next != (*TXftFontInt)(unsafe.Pointer(font)).Fnewest) {
  13593. break
  13594. }
  13595. if next >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs {
  13596. libc.Xprintf(tls, __ccgo_ts+1613, libc.VaList(bp+8, next))
  13597. break
  13598. }
  13599. reverse++
  13600. v4 = reverse
  13601. if v4 > (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse {
  13602. libc.Xprintf(tls, __ccgo_ts+1534, libc.VaList(bp+8, reverse, (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse))
  13603. if reverse > (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse+uint32(10) {
  13604. break
  13605. }
  13606. }
  13607. xuse = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(next)*8))
  13608. goto _3
  13609. _3:
  13610. ;
  13611. next = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder
  13612. }
  13613. if reverse < (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse {
  13614. libc.Xprintf(tls, __ccgo_ts+1574, libc.VaList(bp+8, reverse, (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse))
  13615. }
  13616. if forward != reverse {
  13617. libc.Xprintf(tls, __ccgo_ts+1635, libc.VaList(bp+8, forward, reverse))
  13618. libc.Xexit(tls, int32(1))
  13619. }
  13620. }
  13621. }
  13622. // C documentation
  13623. //
  13624. // /* we sometimes need to convert the glyph bitmap in a FT_GlyphSlot
  13625. // * into a different format. For example, we want to convert a
  13626. // * FT_PIXEL_MODE_LCD or FT_PIXEL_MODE_LCD_V bitmap into a 32-bit
  13627. // * ARGB or ABGR bitmap.
  13628. // *
  13629. // * this function prepares a target descriptor for this operation.
  13630. // *
  13631. // * input :: target bitmap descriptor. The function will set its
  13632. // * 'width', 'rows' and 'pitch' fields, and only these
  13633. // *
  13634. // * slot :: the glyph slot containing the source bitmap. this
  13635. // * function assumes that slot->format == FT_GLYPH_FORMAT_BITMAP
  13636. // *
  13637. // * mode :: the requested final rendering mode. supported values are
  13638. // * MONO, NORMAL (i.e. gray), LCD and LCD_V
  13639. // *
  13640. // * the function returns the size in bytes of the corresponding buffer,
  13641. // * it's up to the caller to allocate the corresponding memory block
  13642. // * before calling _fill_xrender_bitmap
  13643. // *
  13644. // * it also returns -1 in case of error (e.g. incompatible arguments,
  13645. // * like trying to convert a gray bitmap into a monochrome one)
  13646. // */
  13647. func __compute_xrender_bitmap_size(tls *libc.TLS, target uintptr, slot TFT_GlyphSlot, mode TFT_Render_Mode, matrix uintptr, m uintptr) (r int32) {
  13648. bp := tls.Alloc(80)
  13649. defer tls.Free(80)
  13650. var bottom, height, left, pitch, right, top, width, xc, yc, v1, v2, v3, v6, v7 int32
  13651. var ftbit uintptr
  13652. var v10 float64
  13653. var v8 TFT_Fixed
  13654. var v9 TFT_Pos
  13655. var _ /* inverse at bp+32 */ TFT_Matrix
  13656. var _ /* mirror at bp+0 */ TFT_Matrix
  13657. var _ /* vector at bp+64 */ TFT_Vector
  13658. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bottom, ftbit, height, left, pitch, right, top, width, xc, yc, v1, v10, v2, v3, v6, v7, v8, v9
  13659. if (*TFT_GlyphSlotRec_)(unsafe.Pointer(slot)).Fformat != int32(_FT_GLYPH_FORMAT_BITMAP) {
  13660. return -int32(1)
  13661. }
  13662. /* compute the size of the final bitmap */
  13663. ftbit = slot + 152
  13664. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fwidth)
  13665. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows)
  13666. if matrix != 0 && mode == int32(_FT_RENDER_MODE_NORMAL) {
  13667. v3 = libc.Int32FromInt32(0)
  13668. bottom = v3
  13669. v2 = v3
  13670. top = v2
  13671. v1 = v2
  13672. right = v1
  13673. left = v1
  13674. xc = 0
  13675. for {
  13676. if !(xc <= int32(1)) {
  13677. break
  13678. }
  13679. yc = 0
  13680. for {
  13681. if !(yc <= int32(1)) {
  13682. break
  13683. }
  13684. (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx = int64(xc * width)
  13685. (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy = int64(yc * height)
  13686. libfreetype.XFT_Vector_Transform(tls, bp+64, matrix)
  13687. if xc == 0 && yc == 0 {
  13688. v6 = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx)
  13689. right = v6
  13690. left = v6
  13691. v7 = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy)
  13692. bottom = v7
  13693. top = v7
  13694. } else {
  13695. if int64(left) > (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx {
  13696. left = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx)
  13697. }
  13698. if int64(right) < (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx {
  13699. right = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx)
  13700. }
  13701. if int64(bottom) > (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy {
  13702. bottom = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy)
  13703. }
  13704. if int64(top) < (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy {
  13705. top = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy)
  13706. }
  13707. }
  13708. goto _5
  13709. _5:
  13710. ;
  13711. yc++
  13712. }
  13713. goto _4
  13714. _4:
  13715. ;
  13716. xc++
  13717. }
  13718. width = right - left
  13719. height = top - bottom
  13720. (*(*TFT_Matrix)(unsafe.Pointer(bp))).Fxx = int64(+libc.Int32FromInt32(0x10000))
  13721. (*(*TFT_Matrix)(unsafe.Pointer(bp))).Fyy = int64(-int32(0x10000))
  13722. v8 = libc.Int64FromInt32(0)
  13723. (*(*TFT_Matrix)(unsafe.Pointer(bp))).Fyx = v8
  13724. (*(*TFT_Matrix)(unsafe.Pointer(bp))).Fxy = v8
  13725. *(*TFT_Matrix)(unsafe.Pointer(bp + 32)) = *(*TFT_Matrix)(unsafe.Pointer(matrix))
  13726. libfreetype.XFT_Matrix_Multiply(tls, bp, bp+32)
  13727. libfreetype.XFT_Matrix_Invert(tls, bp+32)
  13728. libfreetype.XFT_Matrix_Multiply(tls, bp, bp+32)
  13729. v9 = libc.Int64FromInt32(0)
  13730. (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy = v9
  13731. (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx = v9
  13732. libfreetype.XFT_Vector_Transform(tls, bp+64, bp+32)
  13733. left = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx)
  13734. bottom = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy)
  13735. (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx = int64(width)
  13736. (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy = int64(height)
  13737. libfreetype.XFT_Vector_Transform(tls, bp+64, bp+32)
  13738. right = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx)
  13739. top = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy)
  13740. left = right - left - libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fwidth)
  13741. bottom = top - bottom - libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows)
  13742. *(*float64)(unsafe.Pointer(m)) = float64((*(*TFT_Matrix)(unsafe.Pointer(bp + 32))).Fxx) / libc.Float64FromInt32(0x10000)
  13743. *(*float64)(unsafe.Pointer(m + 1*8)) = float64((*(*TFT_Matrix)(unsafe.Pointer(bp + 32))).Fxy) / libc.Float64FromInt32(0x10000)
  13744. *(*float64)(unsafe.Pointer(m + 1*24)) = float64((*(*TFT_Matrix)(unsafe.Pointer(bp + 32))).Fyx) / libc.Float64FromInt32(0x10000)
  13745. *(*float64)(unsafe.Pointer(m + 1*24 + 1*8)) = float64((*(*TFT_Matrix)(unsafe.Pointer(bp + 32))).Fyy) / libc.Float64FromInt32(0x10000)
  13746. *(*float64)(unsafe.Pointer(m + 2*8)) = float64(-left) / libc.Float64FromInt32(2)
  13747. *(*float64)(unsafe.Pointer(m + 1*24 + 2*8)) = float64(-bottom) / libc.Float64FromInt32(2)
  13748. v10 = libc.Float64FromFloat64(0)
  13749. *(*float64)(unsafe.Pointer(m + 2*24 + 1*8)) = v10
  13750. *(*float64)(unsafe.Pointer(m + 2*24)) = v10
  13751. *(*float64)(unsafe.Pointer(m + 2*24 + 2*8)) = float64(1)
  13752. }
  13753. pitch = (width + int32(3)) & ^libc.Int32FromInt32(3)
  13754. switch libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpixel_mode) {
  13755. case int32(_FT_PIXEL_MODE_MONO):
  13756. if mode == int32(_FT_RENDER_MODE_MONO) {
  13757. pitch = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  13758. break
  13759. }
  13760. /* fall-through */
  13761. fallthrough
  13762. case int32(_FT_PIXEL_MODE_GRAY):
  13763. if mode == int32(_FT_RENDER_MODE_LCD) || mode == int32(_FT_RENDER_MODE_LCD_V) {
  13764. /* each pixel is replicated into a 32-bit ARGB value */
  13765. pitch = width * int32(4)
  13766. }
  13767. case int32(_FT_PIXEL_MODE_BGRA):
  13768. pitch = width * int32(4)
  13769. case int32(_FT_PIXEL_MODE_LCD):
  13770. if mode != int32(_FT_RENDER_MODE_LCD) {
  13771. return -int32(1)
  13772. }
  13773. /* horz pixel triplets are packed into 32-bit ARGB values */
  13774. width /= int32(3)
  13775. pitch = width * int32(4)
  13776. case int32(_FT_PIXEL_MODE_LCD_V):
  13777. if mode != int32(_FT_RENDER_MODE_LCD_V) {
  13778. return -int32(1)
  13779. }
  13780. /* vert pixel triplets are packed into 32-bit ARGB values */
  13781. height /= int32(3)
  13782. pitch = width * int32(4)
  13783. default: /* unsupported source format */
  13784. return -int32(1)
  13785. }
  13786. (*TFT_Bitmap)(unsafe.Pointer(target)).Fwidth = libc.Uint32FromInt32(width)
  13787. (*TFT_Bitmap)(unsafe.Pointer(target)).Frows = libc.Uint32FromInt32(height)
  13788. (*TFT_Bitmap)(unsafe.Pointer(target)).Fpitch = pitch
  13789. (*TFT_Bitmap)(unsafe.Pointer(target)).Fbuffer = libc.UintptrFromInt32(0)
  13790. return pitch * height
  13791. }
  13792. // C documentation
  13793. //
  13794. // /* this functions converts the glyph bitmap found in a FT_GlyphSlot
  13795. // * into a different format while scaling by applying the given matrix
  13796. // * (see _compute_xrender_bitmap_size)
  13797. // *
  13798. // * you should call this function after _compute_xrender_bitmap_size
  13799. // *
  13800. // * target :: target bitmap descriptor. Note that its 'buffer' pointer
  13801. // * must point to memory allocated by the caller
  13802. // *
  13803. // * source :: the source bitmap descriptor
  13804. // *
  13805. // * matrix :: the scaling matrix to apply
  13806. // */
  13807. func __scaled_fill_xrender_bitmap(tls *libc.TLS, target uintptr, source uintptr, m uintptr) {
  13808. bp := tls.Alloc(48)
  13809. defer tls.Free(48)
  13810. var dst_line, src, src_buf uintptr
  13811. var height, i, pitch, sample_count, sample_x, sample_y, sampling_height, sampling_width, src_pitch, src_x, src_y, width, x, y int32
  13812. var _ /* bgra at bp+32 */ [4]int32
  13813. var _ /* vector at bp+0 */ TFT_Vector
  13814. var _ /* vector0 at bp+16 */ TFT_Vector
  13815. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = dst_line, height, i, pitch, sample_count, sample_x, sample_y, sampling_height, sampling_width, src, src_buf, src_pitch, src_x, src_y, width, x, y
  13816. src_buf = (*TFT_Bitmap)(unsafe.Pointer(source)).Fbuffer
  13817. dst_line = (*TFT_Bitmap)(unsafe.Pointer(target)).Fbuffer
  13818. src_pitch = (*TFT_Bitmap)(unsafe.Pointer(source)).Fpitch
  13819. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Fwidth)
  13820. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Frows)
  13821. pitch = (*TFT_Bitmap)(unsafe.Pointer(target)).Fpitch
  13822. if src_pitch < 0 {
  13823. src_buf -= uintptr(libc.Uint32FromInt32(src_pitch) * ((*TFT_Bitmap)(unsafe.Pointer(source)).Frows - libc.Uint32FromInt32(1)))
  13824. }
  13825. /* compute how many source pixels a target pixel spans */
  13826. (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx = int64(1)
  13827. (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy = int64(1)
  13828. _m3x3_transform(tls, bp, m)
  13829. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx = 0
  13830. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy = 0
  13831. _m3x3_transform(tls, bp+16, m)
  13832. sampling_width = int32(((*(*TFT_Vector)(unsafe.Pointer(bp))).Fx - (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx) / libc.Int64FromInt32(2))
  13833. sampling_height = int32(((*(*TFT_Vector)(unsafe.Pointer(bp))).Fy - (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy) / libc.Int64FromInt32(2))
  13834. if sampling_width < 0 {
  13835. sampling_width = -sampling_width
  13836. }
  13837. if sampling_height < 0 {
  13838. sampling_height = -sampling_height
  13839. }
  13840. sample_count = (int32(2)*sampling_width + int32(1)) * (int32(2)*sampling_height + int32(1))
  13841. y = height
  13842. for {
  13843. if !(y > 0) {
  13844. break
  13845. }
  13846. x = 0
  13847. for {
  13848. if !(x < width) {
  13849. break
  13850. }
  13851. /* compute target pixel location in source space */
  13852. (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx = int64(x)
  13853. (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy = int64(height - y)
  13854. _m3x3_transform(tls, bp, m)
  13855. if libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(source)).Fpixel_mode) == int32(_FT_PIXEL_MODE_BGRA) {
  13856. if (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx < int64(-sampling_width) || (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx > libc.Int64FromUint32((*TFT_Bitmap)(unsafe.Pointer(source)).Fwidth+libc.Uint32FromInt32(sampling_width)) {
  13857. goto _2
  13858. }
  13859. if (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy < int64(-sampling_height) || (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy > libc.Int64FromUint32((*TFT_Bitmap)(unsafe.Pointer(source)).Frows+libc.Uint32FromInt32(sampling_height)) {
  13860. goto _2
  13861. }
  13862. } else {
  13863. if (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx < 0 || (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx >= libc.Int64FromUint32((*TFT_Bitmap)(unsafe.Pointer(source)).Fwidth) {
  13864. goto _2
  13865. }
  13866. if (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy < 0 || (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy >= libc.Int64FromUint32((*TFT_Bitmap)(unsafe.Pointer(source)).Frows) {
  13867. goto _2
  13868. }
  13869. }
  13870. switch libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(source)).Fpixel_mode) {
  13871. case int32(_FT_PIXEL_MODE_MONO): /* convert mono to 8-bit gray, scale using nearest pixel */
  13872. src = src_buf + uintptr((*(*TFT_Vector)(unsafe.Pointer(bp))).Fy*int64(src_pitch))
  13873. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(src + uintptr((*(*TFT_Vector)(unsafe.Pointer(bp))).Fx>>libc.Int32FromInt32(3)))))&(int32(0x80)>>((*(*TFT_Vector)(unsafe.Pointer(bp))).Fx&int64(7))) != 0 {
  13874. *(*uint8)(unsafe.Pointer(dst_line + uintptr(x))) = uint8(0xff)
  13875. }
  13876. case int32(_FT_PIXEL_MODE_GRAY): /* scale using nearest pixel */
  13877. src = src_buf + uintptr((*(*TFT_Vector)(unsafe.Pointer(bp))).Fy*int64(src_pitch))
  13878. *(*uint8)(unsafe.Pointer(dst_line + uintptr(x))) = *(*uint8)(unsafe.Pointer(src + uintptr((*(*TFT_Vector)(unsafe.Pointer(bp))).Fx)))
  13879. case int32(_FT_PIXEL_MODE_BGRA): /* scale by averaging all relevant source pixels, keep BGRA format */
  13880. *(*[4]int32)(unsafe.Pointer(bp + 32)) = [4]int32{}
  13881. sample_y = -sampling_height
  13882. for {
  13883. if !(sample_y < sampling_height+int32(1)) {
  13884. break
  13885. }
  13886. src_y = int32((*(*TFT_Vector)(unsafe.Pointer(bp))).Fy + int64(sample_y))
  13887. if src_y < 0 || int64(src_y) >= libc.Int64FromUint32((*TFT_Bitmap)(unsafe.Pointer(source)).Frows) {
  13888. goto _3
  13889. }
  13890. src = src_buf + uintptr(src_y*src_pitch)
  13891. sample_x = -sampling_width
  13892. for {
  13893. if !(sample_x < sampling_width+int32(1)) {
  13894. break
  13895. }
  13896. src_x = int32((*(*TFT_Vector)(unsafe.Pointer(bp))).Fx + int64(sample_x))
  13897. if src_x < 0 || int64(src_x) >= libc.Int64FromUint32((*TFT_Bitmap)(unsafe.Pointer(source)).Fwidth) {
  13898. goto _4
  13899. }
  13900. i = 0
  13901. for {
  13902. if !(i < int32(4)) {
  13903. break
  13904. }
  13905. *(*int32)(unsafe.Pointer(bp + 32 + uintptr(i)*4)) += libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(src + uintptr(src_x*int32(4)+i))))
  13906. goto _5
  13907. _5:
  13908. ;
  13909. i++
  13910. }
  13911. goto _4
  13912. _4:
  13913. ;
  13914. sample_x++
  13915. }
  13916. goto _3
  13917. _3:
  13918. ;
  13919. sample_y++
  13920. }
  13921. i = 0
  13922. for {
  13923. if !(i < int32(4)) {
  13924. break
  13925. }
  13926. *(*uint8)(unsafe.Pointer(dst_line + uintptr(int32(4)*x+i))) = libc.Uint8FromInt32((*(*[4]int32)(unsafe.Pointer(bp + 32)))[i] / sample_count)
  13927. goto _6
  13928. _6:
  13929. ;
  13930. i++
  13931. }
  13932. break
  13933. }
  13934. goto _2
  13935. _2:
  13936. ;
  13937. x++
  13938. }
  13939. goto _1
  13940. _1:
  13941. ;
  13942. y--
  13943. dst_line += uintptr(pitch)
  13944. }
  13945. }
  13946. // C documentation
  13947. //
  13948. // /* this functions converts the glyph bitmap found in a FT_GlyphSlot
  13949. // * into a different format (see _compute_xrender_bitmap_size)
  13950. // *
  13951. // * you should call this function after _compute_xrender_bitmap_size
  13952. // *
  13953. // * target :: target bitmap descriptor. Note that its 'buffer' pointer
  13954. // * must point to memory allocated by the caller
  13955. // *
  13956. // * slot :: the glyph slot containing the source bitmap
  13957. // *
  13958. // * mode :: the requested final rendering mode
  13959. // *
  13960. // * bgr :: boolean, set if BGR or VBGR pixel ordering is needed
  13961. // */
  13962. func __fill_xrender_bitmap(tls *libc.TLS, target uintptr, slot TFT_GlyphSlot, mode TFT_Render_Mode, bgr int32) {
  13963. var bytes, h, height, pitch, src_pitch, subpixel, width, x, x1, x2, x3, x4, x5, x6 int32
  13964. var dst, dst1, dst2, dst3, dst4, dstLine, ftbit, src, src1, src2, src3, srcLine uintptr
  13965. var pix, pix1, pix2, pix3, pix4 uint32
  13966. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  13967. ftbit = slot + 152
  13968. srcLine = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fbuffer
  13969. dstLine = (*TFT_Bitmap)(unsafe.Pointer(target)).Fbuffer
  13970. src_pitch = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch
  13971. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Fwidth)
  13972. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Frows)
  13973. pitch = (*TFT_Bitmap)(unsafe.Pointer(target)).Fpitch
  13974. subpixel = libc.BoolInt32(mode == int32(_FT_RENDER_MODE_LCD) || mode == int32(_FT_RENDER_MODE_LCD_V))
  13975. if src_pitch < 0 {
  13976. srcLine -= uintptr(libc.Uint32FromInt32(src_pitch) * ((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows - libc.Uint32FromInt32(1)))
  13977. }
  13978. switch libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpixel_mode) {
  13979. case int32(_FT_PIXEL_MODE_MONO):
  13980. goto _1
  13981. case int32(_FT_PIXEL_MODE_GRAY):
  13982. goto _2
  13983. case int32(_FT_PIXEL_MODE_BGRA):
  13984. goto _3
  13985. case int32(_FT_PIXEL_MODE_LCD):
  13986. goto _4
  13987. default:
  13988. goto _5
  13989. }
  13990. goto _6
  13991. _1:
  13992. ;
  13993. if subpixel != 0 { /* convert mono to ARGB32 values */
  13994. h = height
  13995. for {
  13996. if !(h > 0) {
  13997. break
  13998. }
  13999. x = 0
  14000. for {
  14001. if !(x < width) {
  14002. break
  14003. }
  14004. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x>>libc.Int32FromInt32(3)))))&(int32(0x80)>>(x&int32(7))) != 0 {
  14005. *(*uint32)(unsafe.Pointer(dstLine + uintptr(x)*4)) = uint32(0xffffffff)
  14006. }
  14007. goto _8
  14008. _8:
  14009. ;
  14010. x++
  14011. }
  14012. goto _7
  14013. _7:
  14014. ;
  14015. h--
  14016. srcLine += uintptr(src_pitch)
  14017. dstLine += uintptr(pitch)
  14018. }
  14019. } else {
  14020. if mode == int32(_FT_RENDER_MODE_NORMAL) { /* convert mono to 8-bit gray */
  14021. h = height
  14022. for {
  14023. if !(h > 0) {
  14024. break
  14025. }
  14026. x1 = 0
  14027. for {
  14028. if !(x1 < width) {
  14029. break
  14030. }
  14031. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x1>>libc.Int32FromInt32(3)))))&(int32(0x80)>>(x1&int32(7))) != 0 {
  14032. *(*uint8)(unsafe.Pointer(dstLine + uintptr(x1))) = uint8(0xff)
  14033. }
  14034. goto _10
  14035. _10:
  14036. ;
  14037. x1++
  14038. }
  14039. goto _9
  14040. _9:
  14041. ;
  14042. h--
  14043. srcLine += uintptr(src_pitch)
  14044. dstLine += uintptr(pitch)
  14045. }
  14046. } else { /* copy mono to mono */
  14047. bytes = (width + int32(7)) >> int32(3)
  14048. h = height
  14049. for {
  14050. if !(h > 0) {
  14051. break
  14052. }
  14053. libc.Xmemcpy(tls, dstLine, srcLine, libc.Uint64FromInt32(bytes))
  14054. goto _11
  14055. _11:
  14056. ;
  14057. h--
  14058. srcLine += uintptr(src_pitch)
  14059. dstLine += uintptr(pitch)
  14060. }
  14061. }
  14062. }
  14063. goto _6
  14064. _2:
  14065. ;
  14066. if subpixel != 0 { /* convert gray to ARGB32 values */
  14067. h = height
  14068. for {
  14069. if !(h > 0) {
  14070. break
  14071. }
  14072. dst = dstLine
  14073. x2 = 0
  14074. for {
  14075. if !(x2 < width) {
  14076. break
  14077. }
  14078. pix = uint32(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x2))))
  14079. pix |= pix << int32(8)
  14080. pix |= pix << int32(16)
  14081. *(*uint32)(unsafe.Pointer(dst + uintptr(x2)*4)) = pix
  14082. goto _13
  14083. _13:
  14084. ;
  14085. x2++
  14086. }
  14087. goto _12
  14088. _12:
  14089. ;
  14090. h--
  14091. srcLine += uintptr(src_pitch)
  14092. dstLine += uintptr(pitch)
  14093. }
  14094. } else { /* copy gray into gray */
  14095. h = height
  14096. for {
  14097. if !(h > 0) {
  14098. break
  14099. }
  14100. libc.Xmemcpy(tls, dstLine, srcLine, libc.Uint64FromInt32(width))
  14101. goto _14
  14102. _14:
  14103. ;
  14104. h--
  14105. srcLine += uintptr(src_pitch)
  14106. dstLine += uintptr(pitch)
  14107. }
  14108. }
  14109. goto _6
  14110. _3:
  14111. ; /* Preserve BGRA format */
  14112. h = height
  14113. _17:
  14114. ;
  14115. if !(h > 0) {
  14116. goto _15
  14117. }
  14118. libc.Xmemcpy(tls, dstLine, srcLine, libc.Uint64FromInt32(width)*uint64(4))
  14119. goto _16
  14120. _16:
  14121. ;
  14122. h--
  14123. srcLine += uintptr(src_pitch)
  14124. dstLine += uintptr(pitch)
  14125. goto _17
  14126. goto _15
  14127. _15:
  14128. ;
  14129. goto _6
  14130. _4:
  14131. ;
  14132. if !(bgr != 0) {
  14133. /* convert horizontal RGB into ARGB32 */
  14134. h = height
  14135. for {
  14136. if !(h > 0) {
  14137. break
  14138. }
  14139. src = srcLine
  14140. dst1 = dstLine
  14141. x3 = 0
  14142. for {
  14143. if !(x3 < width) {
  14144. break
  14145. }
  14146. 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)
  14147. *(*uint32)(unsafe.Pointer(dst1 + uintptr(x3)*4)) = pix1
  14148. goto _19
  14149. _19:
  14150. ;
  14151. x3++
  14152. src += uintptr(3)
  14153. }
  14154. goto _18
  14155. _18:
  14156. ;
  14157. h--
  14158. srcLine += uintptr(src_pitch)
  14159. dstLine += uintptr(pitch)
  14160. }
  14161. } else {
  14162. /* convert horizontal BGR into ARGB32 */
  14163. h = height
  14164. for {
  14165. if !(h > 0) {
  14166. break
  14167. }
  14168. src1 = srcLine
  14169. dst2 = dstLine
  14170. x4 = 0
  14171. for {
  14172. if !(x4 < width) {
  14173. break
  14174. }
  14175. 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)
  14176. *(*uint32)(unsafe.Pointer(dst2 + uintptr(x4)*4)) = pix2
  14177. goto _21
  14178. _21:
  14179. ;
  14180. x4++
  14181. src1 += uintptr(3)
  14182. }
  14183. goto _20
  14184. _20:
  14185. ;
  14186. h--
  14187. srcLine += uintptr(src_pitch)
  14188. dstLine += uintptr(pitch)
  14189. }
  14190. }
  14191. goto _6
  14192. _5:
  14193. ; /* FT_PIXEL_MODE_LCD_V */
  14194. /* convert vertical RGB into ARGB32 */
  14195. if !(bgr != 0) {
  14196. h = height
  14197. for {
  14198. if !(h > 0) {
  14199. break
  14200. }
  14201. src2 = srcLine
  14202. dst3 = dstLine
  14203. x5 = 0
  14204. for {
  14205. if !(x5 < width) {
  14206. break
  14207. }
  14208. 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)
  14209. *(*uint32)(unsafe.Pointer(dst3 + uintptr(x5)*4)) = pix3
  14210. goto _23
  14211. _23:
  14212. ;
  14213. x5++
  14214. src2 += uintptr(1)
  14215. }
  14216. goto _22
  14217. _22:
  14218. ;
  14219. h--
  14220. srcLine += uintptr(int32(3) * src_pitch)
  14221. dstLine += uintptr(pitch)
  14222. }
  14223. } else {
  14224. h = height
  14225. for {
  14226. if !(h > 0) {
  14227. break
  14228. }
  14229. src3 = srcLine
  14230. dst4 = dstLine
  14231. x6 = 0
  14232. for {
  14233. if !(x6 < width) {
  14234. break
  14235. }
  14236. 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)
  14237. *(*uint32)(unsafe.Pointer(dst4 + uintptr(x6)*4)) = pix4
  14238. goto _25
  14239. _25:
  14240. ;
  14241. x6++
  14242. src3 += uintptr(1)
  14243. }
  14244. goto _24
  14245. _24:
  14246. ;
  14247. h--
  14248. srcLine += uintptr(int32(3) * src_pitch)
  14249. dstLine += uintptr(pitch)
  14250. }
  14251. }
  14252. _6:
  14253. }
  14254. func XXftFontLoadGlyphs(tls *libc.TLS, dpy uintptr, pub uintptr, need_bitmaps TFcBool, glyphs uintptr, nglyph int32) {
  14255. bp := tls.Alloc(4544)
  14256. defer tls.Free(4544)
  14257. var adjust, adjust1, bottom, bufSize, c, height, i, left, right, size, top, width, x, xc, y, yc, v1, v13, v15, v3, v4, v5, v8, v9 int32
  14258. var bufBitmap, font, ftbit, info, line, line1, xftg, xnew, xold, xuse, v14, v16, v2 uintptr
  14259. var error1 TFT_Error
  14260. var face TFT_Face
  14261. var gc TGC
  14262. var glyph_transform, transform TFcBool
  14263. var glyphindex TFT_UInt
  14264. var glyphslot TFT_GlyphSlot
  14265. var mode TFT_Render_Mode
  14266. var pixmap TPixmap
  14267. var _ /* bufLocal at bp+8 */ [4096]uint8
  14268. var _ /* glyph at bp+0 */ TGlyph
  14269. var _ /* image at bp+4304 */ TXImage
  14270. var _ /* local at bp+4104 */ TFT_Bitmap
  14271. var _ /* m at bp+4160 */ Tm3x3
  14272. var _ /* mi at bp+4232 */ Tm3x3
  14273. var _ /* vector at bp+4144 */ TFT_Vector
  14274. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = adjust, adjust1, bottom, bufBitmap, bufSize, c, error1, face, font, ftbit, gc, glyph_transform, glyphindex, glyphslot, height, i, info, left, line, line1, mode, pixmap, right, size, top, transform, width, x, xc, xftg, xnew, xold, xuse, y, yc, v1, v13, v14, v15, v16, v2, v3, v4, v5, v8, v9
  14275. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  14276. font = pub
  14277. bufBitmap = bp + 8
  14278. bufSize = int32(4096)
  14279. mode = int32(_FT_RENDER_MODE_MONO)
  14280. if !(info != 0) {
  14281. return
  14282. }
  14283. face = XXftLockFace(tls, font)
  14284. if !(face != 0) {
  14285. return
  14286. }
  14287. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fcolor != 0 {
  14288. mode = int32(_FT_RENDER_MODE_NORMAL)
  14289. }
  14290. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 {
  14291. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  14292. case int32(m_FC_RGBA_RGB):
  14293. fallthrough
  14294. case int32(m_FC_RGBA_BGR):
  14295. mode = int32(_FT_RENDER_MODE_LCD)
  14296. case int32(m_FC_RGBA_VRGB):
  14297. fallthrough
  14298. case int32(m_FC_RGBA_VBGR):
  14299. mode = int32(_FT_RENDER_MODE_LCD_V)
  14300. default:
  14301. mode = int32(_FT_RENDER_MODE_NORMAL)
  14302. }
  14303. }
  14304. transform = libc.BoolInt32((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ftransform != 0 && mode != int32(_FT_RENDER_MODE_MONO))
  14305. for {
  14306. v1 = nglyph
  14307. nglyph--
  14308. if !(v1 != 0) {
  14309. break
  14310. }
  14311. v2 = glyphs
  14312. glyphs += 4
  14313. glyphindex = *(*TFT_UInt)(unsafe.Pointer(v2))
  14314. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8))
  14315. if !(xftg != 0) {
  14316. continue
  14317. }
  14318. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  14319. __XftFontValidateMemory(tls, dpy, pub)
  14320. }
  14321. /*
  14322. * Check to see if this glyph has just been loaded,
  14323. * this happens when drawing the same glyph twice
  14324. * in a single string
  14325. */
  14326. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0 {
  14327. continue
  14328. }
  14329. libfreetype.XFT_Library_SetLcdFilter(tls, X_XftFTlibrary, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Flcd_filter)
  14330. error1 = libfreetype.XFT_Load_Glyph(tls, face, glyphindex, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)
  14331. if error1 != 0 {
  14332. /*
  14333. * If anti-aliasing or transforming glyphs and
  14334. * no outline version exists, fallback to the
  14335. * bitmap and let things look bad instead of
  14336. * missing the glyph
  14337. */
  14338. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(3)) != 0 {
  14339. error1 = libfreetype.XFT_Load_Glyph(tls, face, glyphindex, int32(int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags) & ^(libc.Int64FromInt64(1)<<libc.Int32FromInt32(3))))
  14340. }
  14341. if error1 != 0 {
  14342. continue
  14343. }
  14344. }
  14345. glyphslot = (*TFT_FaceRec_)(unsafe.Pointer(face)).Fglyph
  14346. /*
  14347. * Embolden if required
  14348. */
  14349. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fembolden != 0 {
  14350. libfreetype.XFT_GlyphSlot_Embolden(tls, glyphslot)
  14351. }
  14352. /*
  14353. * Compute glyph metrics from FreeType information
  14354. */
  14355. if transform != 0 {
  14356. v5 = libc.Int32FromInt32(0)
  14357. bottom = v5
  14358. v4 = v5
  14359. top = v4
  14360. v3 = v4
  14361. right = v3
  14362. left = v3
  14363. xc = 0
  14364. for {
  14365. if !(xc <= int32(1)) {
  14366. break
  14367. }
  14368. yc = 0
  14369. for {
  14370. if !(yc <= int32(1)) {
  14371. break
  14372. }
  14373. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx = (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX + int64(xc)*(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fwidth
  14374. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy = (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY - int64(yc)*(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fheight
  14375. libfreetype.XFT_Vector_Transform(tls, bp+4144, font+48+56)
  14376. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  14377. libc.Xprintf(tls, __ccgo_ts+1666, libc.VaList(bp+4448, xc, yc, int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx), int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)))
  14378. }
  14379. if xc == 0 && yc == 0 {
  14380. v8 = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx)
  14381. right = v8
  14382. left = v8
  14383. v9 = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)
  14384. bottom = v9
  14385. top = v9
  14386. } else {
  14387. if int64(left) > (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx {
  14388. left = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx)
  14389. }
  14390. if int64(right) < (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx {
  14391. right = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx)
  14392. }
  14393. if int64(bottom) > (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy {
  14394. bottom = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)
  14395. }
  14396. if int64(top) < (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy {
  14397. top = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)
  14398. }
  14399. }
  14400. goto _7
  14401. _7:
  14402. ;
  14403. yc++
  14404. }
  14405. goto _6
  14406. _6:
  14407. ;
  14408. xc++
  14409. }
  14410. left = left & -libc.Int32FromInt32(64)
  14411. right = (right + libc.Int32FromInt32(63)) & -libc.Int32FromInt32(64)
  14412. bottom = bottom & -libc.Int32FromInt32(64)
  14413. top = (top + libc.Int32FromInt32(63)) & -libc.Int32FromInt32(64)
  14414. } else {
  14415. left = int32((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX & int64(-libc.Int32FromInt32(64)))
  14416. right = int32(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX + (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fwidth + libc.Int64FromInt32(63)) & int64(-libc.Int32FromInt32(64)))
  14417. top = int32(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY + libc.Int64FromInt32(63)) & int64(-libc.Int32FromInt32(64)))
  14418. bottom = int32(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY - (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fheight) & int64(-libc.Int32FromInt32(64)))
  14419. }
  14420. /*
  14421. * Clip charcell glyphs to the bounding box
  14422. * XXX transformed?
  14423. */
  14424. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fspacing >= int32(m_FC_CHARCELL) && !(transform != 0) {
  14425. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(4)) != 0 {
  14426. if bottom>>int32(6) > (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width {
  14427. adjust = bottom - (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width<<int32(6)
  14428. if adjust > top {
  14429. adjust = top
  14430. }
  14431. top -= adjust
  14432. bottom -= adjust
  14433. }
  14434. } else {
  14435. if right>>int32(6) > (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width {
  14436. adjust1 = right - (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width<<int32(6)
  14437. if adjust1 > left {
  14438. adjust1 = left
  14439. }
  14440. left -= adjust1
  14441. right -= adjust1
  14442. }
  14443. }
  14444. }
  14445. glyph_transform = transform
  14446. if (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fformat != int32(_FT_GLYPH_FORMAT_BITMAP) {
  14447. error1 = libfreetype.XFT_Render_Glyph(tls, (*TFT_FaceRec_)(unsafe.Pointer(face)).Fglyph, mode)
  14448. if error1 != 0 {
  14449. continue
  14450. }
  14451. glyph_transform = m_False
  14452. }
  14453. libfreetype.XFT_Library_SetLcdFilter(tls, X_XftFTlibrary, int32(_FT_LCD_FILTER_NONE))
  14454. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fspacing >= int32(m_FC_MONO) {
  14455. if transform != 0 {
  14456. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(4)) != 0 {
  14457. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx = 0
  14458. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy = -(*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  14459. } else {
  14460. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  14461. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy = 0
  14462. }
  14463. libfreetype.XFT_Vector_Transform(tls, bp+4144, font+48+56)
  14464. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16(((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx + libc.Int64FromInt32(32)) & int64(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6))
  14465. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy + libc.Int64FromInt32(32)) & int64(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6))
  14466. } else {
  14467. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(4)) != 0 {
  14468. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = 0
  14469. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(-(*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width)
  14470. } else {
  14471. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16((*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width)
  14472. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = 0
  14473. }
  14474. }
  14475. } else {
  14476. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fadvance.Fx + libc.Int64FromInt32(32)) & int64(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6))
  14477. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(-(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fadvance.Fy + libc.Int64FromInt32(32)) & int64(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6)))
  14478. }
  14479. /* compute the size of the final bitmap */
  14480. ftbit = glyphslot + 152
  14481. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fwidth)
  14482. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows)
  14483. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  14484. libc.Xprintf(tls, __ccgo_ts+1686, libc.VaList(bp+4448, libc.Int32FromUint32(glyphindex)))
  14485. libc.Xprintf(tls, __ccgo_ts+1697, libc.VaList(bp+4448, 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))
  14486. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPHV) != 0 {
  14487. line = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fbuffer
  14488. if (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch < 0 {
  14489. line -= uintptr((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch * (height - int32(1)))
  14490. }
  14491. y = 0
  14492. for {
  14493. if !(y < height) {
  14494. break
  14495. }
  14496. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 {
  14497. x = 0
  14498. for {
  14499. if !(x < width) {
  14500. break
  14501. }
  14502. libc.Xprintf(tls, __ccgo_ts+1750, libc.VaList(bp+4448, libc.Int32FromUint8(_den[libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(line + uintptr(x))))>>int32(5)])))
  14503. goto _11
  14504. _11:
  14505. ;
  14506. x++
  14507. }
  14508. } else {
  14509. x = 0
  14510. for {
  14511. if !(x < width*int32(8)) {
  14512. break
  14513. }
  14514. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(line + uintptr(x>>int32(3)))))&(int32(1)<<(x&int32(7))) != 0 {
  14515. v13 = int32('#')
  14516. } else {
  14517. v13 = int32(' ')
  14518. }
  14519. libc.Xprintf(tls, __ccgo_ts+1750, libc.VaList(bp+4448, v13))
  14520. goto _12
  14521. _12:
  14522. ;
  14523. x++
  14524. }
  14525. }
  14526. libc.Xprintf(tls, __ccgo_ts+1753, 0)
  14527. line += uintptr((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch)
  14528. goto _10
  14529. _10:
  14530. ;
  14531. y++
  14532. }
  14533. libc.Xprintf(tls, __ccgo_ts+1756, 0)
  14534. }
  14535. }
  14536. _m3x3_uniform(tls, bp+4160)
  14537. if glyph_transform != 0 {
  14538. v14 = font + 48 + 56
  14539. } else {
  14540. v14 = libc.UintptrFromInt32(0)
  14541. }
  14542. size = __compute_xrender_bitmap_size(tls, bp+4104, glyphslot, mode, v14, bp+4160)
  14543. if size < 0 {
  14544. continue
  14545. }
  14546. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth = uint16((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fwidth)
  14547. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight = uint16((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Frows)
  14548. if glyph_transform != 0 {
  14549. _m3x3_invert(tls, bp+4160, bp+4232)
  14550. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx = int64(-(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_left)
  14551. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy = int64((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_top)
  14552. _m3x3_transform(tls, bp+4144, bp+4232)
  14553. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx = int16((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx)
  14554. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy = int16((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)
  14555. } else {
  14556. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx = int16(-(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_left)
  14557. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy = int16((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_top)
  14558. }
  14559. /*
  14560. * If the glyph is relatively large (> 1% of server memory),
  14561. * don't send it until necessary.
  14562. */
  14563. if !(need_bitmaps != 0) && libc.Uint64FromInt32(size) > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory/uint64(100) {
  14564. continue
  14565. }
  14566. /*
  14567. * Make sure there is enough buffer space for the glyph.
  14568. */
  14569. if size > bufSize {
  14570. if bufBitmap != bp+8 {
  14571. libc.Xfree(tls, bufBitmap)
  14572. }
  14573. bufBitmap = libc.Xmalloc(tls, libc.Uint64FromInt32(size))
  14574. if !(bufBitmap != 0) {
  14575. continue
  14576. }
  14577. bufSize = size
  14578. }
  14579. libc.Xmemset(tls, bufBitmap, 0, libc.Uint64FromInt32(size))
  14580. (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fbuffer = bufBitmap
  14581. if mode == int32(_FT_RENDER_MODE_NORMAL) && glyph_transform != 0 {
  14582. __scaled_fill_xrender_bitmap(tls, bp+4104, glyphslot+152, bp+4160)
  14583. } else {
  14584. __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)))
  14585. }
  14586. /*
  14587. * Copy or convert into local buffer.
  14588. */
  14589. /*
  14590. * Use the glyph index as the wire encoding; it
  14591. * might be more efficient for some locales to map
  14592. * these by first usage to smaller values, but that
  14593. * would require persistently storing the map when
  14594. * glyphs were freed.
  14595. */
  14596. *(*TGlyph)(unsafe.Pointer(bp)) = uint64(glyphindex)
  14597. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture != 0 {
  14598. libxrender.XXRenderFreePicture(tls, dpy, (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture)
  14599. (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture = uint64(0)
  14600. }
  14601. (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory = libc.Uint64FromInt32(size) + uint64((*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph)
  14602. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  14603. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  14604. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = libxrender.XXRenderCreateGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fformat)
  14605. }
  14606. if mode == int32(_FT_RENDER_MODE_MONO) {
  14607. /* swap bits in each byte */
  14608. if (*struct {
  14609. Fext_data uintptr
  14610. Fprivate1 uintptr
  14611. Ffd int32
  14612. Fprivate2 int32
  14613. Fproto_major_version int32
  14614. Fproto_minor_version int32
  14615. Fvendor uintptr
  14616. Fprivate3 TXID
  14617. Fprivate4 TXID
  14618. Fprivate5 TXID
  14619. Fprivate6 int32
  14620. Fresource_alloc uintptr
  14621. Fbyte_order int32
  14622. Fbitmap_unit int32
  14623. Fbitmap_pad int32
  14624. Fbitmap_bit_order int32
  14625. Fnformats int32
  14626. Fpixmap_format uintptr
  14627. Fprivate8 int32
  14628. Frelease int32
  14629. Fprivate9 uintptr
  14630. Fprivate10 uintptr
  14631. Fqlen int32
  14632. Flast_request_read uint64
  14633. Frequest uint64
  14634. Fprivate11 TXPointer
  14635. Fprivate12 TXPointer
  14636. Fprivate13 TXPointer
  14637. Fprivate14 TXPointer
  14638. Fmax_request_size uint32
  14639. Fdb uintptr
  14640. Fprivate15 uintptr
  14641. Fdisplay_name uintptr
  14642. Fdefault_screen int32
  14643. Fnscreens int32
  14644. Fscreens uintptr
  14645. Fmotion_buffer uint64
  14646. Fprivate16 uint64
  14647. Fmin_keycode int32
  14648. Fmax_keycode int32
  14649. Fprivate17 TXPointer
  14650. Fprivate18 TXPointer
  14651. Fprivate19 int32
  14652. Fxdefaults uintptr
  14653. })(unsafe.Pointer(dpy)).Fbitmap_bit_order != int32(m_MSBFirst) {
  14654. line1 = bufBitmap
  14655. i = size
  14656. for {
  14657. v15 = i
  14658. i--
  14659. if !(v15 != 0) {
  14660. break
  14661. }
  14662. c = libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(line1)))
  14663. c = c<<int32(1)&int32(0xaa) | c>>int32(1)&int32(0x55)
  14664. c = c<<int32(2)&int32(0xcc) | c>>int32(2)&int32(0x33)
  14665. c = c<<int32(4)&int32(0xf0) | c>>int32(4)&int32(0x0f)
  14666. v16 = line1
  14667. line1++
  14668. *(*uint8)(unsafe.Pointer(v16)) = libc.Uint8FromInt32(c)
  14669. }
  14670. }
  14671. } else {
  14672. if libc.Int32FromUint8((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap.Fpixel_mode) == int32(_FT_PIXEL_MODE_BGRA) || mode != int32(_FT_RENDER_MODE_NORMAL) {
  14673. /* invert ARGB <=> BGRA */
  14674. if (*struct {
  14675. Fext_data uintptr
  14676. Fprivate1 uintptr
  14677. Ffd int32
  14678. Fprivate2 int32
  14679. Fproto_major_version int32
  14680. Fproto_minor_version int32
  14681. Fvendor uintptr
  14682. Fprivate3 TXID
  14683. Fprivate4 TXID
  14684. Fprivate5 TXID
  14685. Fprivate6 int32
  14686. Fresource_alloc uintptr
  14687. Fbyte_order int32
  14688. Fbitmap_unit int32
  14689. Fbitmap_pad int32
  14690. Fbitmap_bit_order int32
  14691. Fnformats int32
  14692. Fpixmap_format uintptr
  14693. Fprivate8 int32
  14694. Frelease int32
  14695. Fprivate9 uintptr
  14696. Fprivate10 uintptr
  14697. Fqlen int32
  14698. Flast_request_read uint64
  14699. Frequest uint64
  14700. Fprivate11 TXPointer
  14701. Fprivate12 TXPointer
  14702. Fprivate13 TXPointer
  14703. Fprivate14 TXPointer
  14704. Fmax_request_size uint32
  14705. Fdb uintptr
  14706. Fprivate15 uintptr
  14707. Fdisplay_name uintptr
  14708. Fdefault_screen int32
  14709. Fnscreens int32
  14710. Fscreens uintptr
  14711. Fmotion_buffer uint64
  14712. Fprivate16 uint64
  14713. Fmin_keycode int32
  14714. Fmax_keycode int32
  14715. Fprivate17 TXPointer
  14716. Fprivate18 TXPointer
  14717. Fprivate19 int32
  14718. Fxdefaults uintptr
  14719. })(unsafe.Pointer(dpy)).Fbyte_order != XXftNativeByteOrder(tls) {
  14720. XXftSwapCARD32(tls, bufBitmap, size>>int32(2))
  14721. }
  14722. }
  14723. }
  14724. if libc.Int32FromUint8((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap.Fpixel_mode) == int32(_FT_PIXEL_MODE_BGRA) {
  14725. pixmap = libx11.XXCreatePixmap(tls, dpy, (*TScreen)(unsafe.Pointer((*struct {
  14726. Fext_data uintptr
  14727. Fprivate1 uintptr
  14728. Ffd int32
  14729. Fprivate2 int32
  14730. Fproto_major_version int32
  14731. Fproto_minor_version int32
  14732. Fvendor uintptr
  14733. Fprivate3 TXID
  14734. Fprivate4 TXID
  14735. Fprivate5 TXID
  14736. Fprivate6 int32
  14737. Fresource_alloc uintptr
  14738. Fbyte_order int32
  14739. Fbitmap_unit int32
  14740. Fbitmap_pad int32
  14741. Fbitmap_bit_order int32
  14742. Fnformats int32
  14743. Fpixmap_format uintptr
  14744. Fprivate8 int32
  14745. Frelease int32
  14746. Fprivate9 uintptr
  14747. Fprivate10 uintptr
  14748. Fqlen int32
  14749. Flast_request_read uint64
  14750. Frequest uint64
  14751. Fprivate11 TXPointer
  14752. Fprivate12 TXPointer
  14753. Fprivate13 TXPointer
  14754. Fprivate14 TXPointer
  14755. Fmax_request_size uint32
  14756. Fdb uintptr
  14757. Fprivate15 uintptr
  14758. Fdisplay_name uintptr
  14759. Fdefault_screen int32
  14760. Fnscreens int32
  14761. Fscreens uintptr
  14762. Fmotion_buffer uint64
  14763. Fprivate16 uint64
  14764. Fmin_keycode int32
  14765. Fmax_keycode int32
  14766. Fprivate17 TXPointer
  14767. Fprivate18 TXPointer
  14768. Fprivate19 int32
  14769. Fxdefaults uintptr
  14770. })(unsafe.Pointer(dpy)).Fscreens+uintptr((*struct {
  14771. Fext_data uintptr
  14772. Fprivate1 uintptr
  14773. Ffd int32
  14774. Fprivate2 int32
  14775. Fproto_major_version int32
  14776. Fproto_minor_version int32
  14777. Fvendor uintptr
  14778. Fprivate3 TXID
  14779. Fprivate4 TXID
  14780. Fprivate5 TXID
  14781. Fprivate6 int32
  14782. Fresource_alloc uintptr
  14783. Fbyte_order int32
  14784. Fbitmap_unit int32
  14785. Fbitmap_pad int32
  14786. Fbitmap_bit_order int32
  14787. Fnformats int32
  14788. Fpixmap_format uintptr
  14789. Fprivate8 int32
  14790. Frelease int32
  14791. Fprivate9 uintptr
  14792. Fprivate10 uintptr
  14793. Fqlen int32
  14794. Flast_request_read uint64
  14795. Frequest uint64
  14796. Fprivate11 TXPointer
  14797. Fprivate12 TXPointer
  14798. Fprivate13 TXPointer
  14799. Fprivate14 TXPointer
  14800. Fmax_request_size uint32
  14801. Fdb uintptr
  14802. Fprivate15 uintptr
  14803. Fdisplay_name uintptr
  14804. Fdefault_screen int32
  14805. Fnscreens int32
  14806. Fscreens uintptr
  14807. Fmotion_buffer uint64
  14808. Fprivate16 uint64
  14809. Fmin_keycode int32
  14810. Fmax_keycode int32
  14811. Fprivate17 TXPointer
  14812. Fprivate18 TXPointer
  14813. Fprivate19 int32
  14814. Fxdefaults uintptr
  14815. })(unsafe.Pointer(dpy)).Fdefault_screen)*128)).Froot, (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fwidth, (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Frows, uint32(32))
  14816. gc = libx11.XXCreateGC(tls, dpy, pixmap, uint64(0), libc.UintptrFromInt32(0))
  14817. *(*TXImage)(unsafe.Pointer(bp + 4304)) = TXImage{
  14818. Fwidth: libc.Int32FromUint32((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fwidth),
  14819. Fheight: libc.Int32FromUint32((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Frows),
  14820. Fformat: int32(m_ZPixmap),
  14821. Fdata: bufBitmap,
  14822. Fbyte_order: (*TDisplay)(unsafe.Pointer(dpy)).Fbyte_order,
  14823. Fbitmap_unit: (*TDisplay)(unsafe.Pointer(dpy)).Fbitmap_unit,
  14824. Fbitmap_bit_order: (*TDisplay)(unsafe.Pointer(dpy)).Fbitmap_bit_order,
  14825. Fbitmap_pad: int32(32),
  14826. Fdepth: int32(32),
  14827. Fbytes_per_line: libc.Int32FromUint32((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fwidth*libc.Uint32FromInt32(4) - libc.Uint32FromInt32((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fpitch)),
  14828. Fbits_per_pixel: int32(32),
  14829. }
  14830. libx11.XXInitImage(tls, bp+4304)
  14831. libx11.XXPutImage(tls, dpy, pixmap, gc, bp+4304, 0, 0, 0, 0, (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fwidth, (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Frows)
  14832. (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture = libxrender.XXRenderCreatePicture(tls, dpy, pixmap, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, uint64(0), libc.UintptrFromInt32(0))
  14833. libx11.XXFreeGC(tls, dpy, gc)
  14834. libx11.XXFreePixmap(tls, dpy, pixmap)
  14835. /*
  14836. * Record 256 times higher memory pressure for unrotated
  14837. * pictures, and maximum for rotated pictures.
  14838. */
  14839. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fmatrix.Fxy != 0 || (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fmatrix.Fyx != 0 {
  14840. *(*uint64)(unsafe.Pointer(xftg + 24)) += (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory - libc.Uint64FromInt32(size)
  14841. } else {
  14842. *(*uint64)(unsafe.Pointer(xftg + 24)) += libc.Uint64FromInt32(size) * uint64(255)
  14843. }
  14844. } else {
  14845. libxrender.XXRenderAddGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, xftg, int32(1), bufBitmap, size)
  14846. }
  14847. } else {
  14848. if size != 0 {
  14849. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.Xmalloc(tls, libc.Uint64FromInt32(size))
  14850. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  14851. libc.Xmemcpy(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap, bufBitmap, libc.Uint64FromInt32(size))
  14852. }
  14853. } else {
  14854. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.UintptrFromInt32(0)
  14855. }
  14856. }
  14857. *(*uint64)(unsafe.Pointer(font + 216)) += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14858. *(*uint64)(unsafe.Pointer(info + 56)) += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14859. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  14860. __XftFontValidateMemory(tls, dpy, pub)
  14861. }
  14862. if XXftDebug(tls)&int32(m_XFT_DBG_CACHEV) != 0 {
  14863. libc.Xprintf(tls, __ccgo_ts+1758, libc.VaList(bp+4448, glyphindex, (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory))
  14864. }
  14865. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  14866. xuse = xftg
  14867. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest == uint32(0xffffffff) {
  14868. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder = glyphindex
  14869. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer = glyphindex
  14870. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  14871. libc.Xprintf(tls, __ccgo_ts+1787, libc.VaList(bp+4448, font, glyphindex, xuse, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer))
  14872. }
  14873. } else {
  14874. xnew = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnewest)*8))
  14875. xold = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xnew)).Fnewer)*8))
  14876. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder = (*TXftFontInt)(unsafe.Pointer(font)).Fnewest
  14877. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer = (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Fnewer
  14878. (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Fnewer = glyphindex
  14879. (*TXftGlyphUsage)(unsafe.Pointer(xold)).Folder = glyphindex
  14880. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  14881. libc.Xprintf(tls, __ccgo_ts+1817, libc.VaList(bp+4448, font, glyphindex, xuse, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer, xnew, (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Folder, (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Fnewer, xold, (*TXftGlyphUsage)(unsafe.Pointer(xold)).Folder, (*TXftGlyphUsage)(unsafe.Pointer(xold)).Fnewer))
  14882. }
  14883. }
  14884. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = glyphindex
  14885. (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse++
  14886. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  14887. __XftValidateGlyphUsage(tls, font)
  14888. }
  14889. }
  14890. }
  14891. if bufBitmap != bp+8 {
  14892. libc.Xfree(tls, bufBitmap)
  14893. }
  14894. XXftUnlockFace(tls, font)
  14895. }
  14896. var _den = [9]uint8{' ', '.', ':', ';', '=', '+', '*', '#'}
  14897. func XXftFontUnloadGlyphs(tls *libc.TLS, dpy uintptr, pub uintptr, glyphs uintptr, nglyph int32) {
  14898. bp := tls.Alloc(8240)
  14899. defer tls.Free(8240)
  14900. var font, info, xftg, xtmp, xuse, v2 uintptr
  14901. var glyphindex TFT_UInt
  14902. var nused, v1, v3 int32
  14903. var _ /* glyphBuf at bp+0 */ [1024]TGlyph
  14904. _, _, _, _, _, _, _, _, _, _ = font, glyphindex, info, nused, xftg, xtmp, xuse, v1, v2, v3
  14905. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  14906. font = pub
  14907. nused = 0
  14908. for {
  14909. v1 = nglyph
  14910. nglyph--
  14911. if !(v1 != 0) {
  14912. break
  14913. }
  14914. v2 = glyphs
  14915. glyphs += 4
  14916. glyphindex = *(*TFT_UInt)(unsafe.Pointer(v2))
  14917. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8))
  14918. if !(xftg != 0) {
  14919. continue
  14920. }
  14921. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0 {
  14922. if XXftDebug(tls)&int32(m_XFT_DBG_CACHEV) != 0 {
  14923. libc.Xprintf(tls, __ccgo_ts+1874, libc.VaList(bp+8200, glyphindex, (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory))
  14924. }
  14925. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  14926. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture != 0 {
  14927. libxrender.XXRenderFreePicture(tls, dpy, (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture)
  14928. } else {
  14929. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  14930. v3 = nused
  14931. nused++
  14932. (*(*[1024]TGlyph)(unsafe.Pointer(bp)))[v3] = uint64(glyphindex)
  14933. if libc.Uint64FromInt32(nused) == libc.Uint64FromInt64(8192)/libc.Uint64FromInt64(8) {
  14934. libxrender.XXRenderFreeGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, nused)
  14935. nused = 0
  14936. }
  14937. }
  14938. }
  14939. } else {
  14940. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  14941. libc.Xfree(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap)
  14942. }
  14943. }
  14944. *(*uint64)(unsafe.Pointer(font + 216)) -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14945. if info != 0 {
  14946. *(*uint64)(unsafe.Pointer(info + 56)) -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14947. }
  14948. }
  14949. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  14950. xuse = xftg
  14951. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  14952. libc.Xprintf(tls, __ccgo_ts+1905, libc.VaList(bp+8200, font, xuse, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer))
  14953. }
  14954. if (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder != uint32(0xffffffff) {
  14955. xtmp = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder)*8))
  14956. if xtmp != libc.UintptrFromInt32(0) {
  14957. /* update link around to oldest glyph */
  14958. (*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Fnewer = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer
  14959. }
  14960. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest == glyphindex {
  14961. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest == (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder {
  14962. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = uint32(0xffffffff)
  14963. } else {
  14964. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder
  14965. }
  14966. }
  14967. }
  14968. if (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer != uint32(0xffffffff) {
  14969. xtmp = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer)*8))
  14970. if xtmp != libc.UintptrFromInt32(0) {
  14971. /* update link around to newest glyph */
  14972. (*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Folder = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder
  14973. }
  14974. }
  14975. if (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse != 0 {
  14976. (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse--
  14977. } else {
  14978. libc.Xfprintf(tls, libc.Xstderr, __ccgo_ts+1930, 0)
  14979. }
  14980. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  14981. __XftValidateGlyphUsage(tls, font)
  14982. }
  14983. }
  14984. libc.Xfree(tls, xftg)
  14985. XXftMemFree(tls, int32(_XFT_MEM_GLYPH), uint64((*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph))
  14986. *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8)) = libc.UintptrFromInt32(0)
  14987. }
  14988. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 && nused != 0 {
  14989. libxrender.XXRenderFreeGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, nused)
  14990. }
  14991. }
  14992. func XXftFontCheckGlyph(tls *libc.TLS, dpy uintptr, pub uintptr, need_bitmaps TFcBool, glyph TFT_UInt, missing uintptr, nmissing uintptr) (r TFcBool) {
  14993. var font, xftg, xnew, xold, xtmp, xuse, xuse1 uintptr
  14994. var n, v1 int32
  14995. _, _, _, _, _, _, _, _, _ = font, n, xftg, xnew, xold, xtmp, xuse, xuse1, v1
  14996. font = pub
  14997. if glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs {
  14998. return m_FcFalse
  14999. }
  15000. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  15001. if !(xftg != 0) || need_bitmaps != 0 && !((*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0) {
  15002. if !(xftg != 0) {
  15003. xftg = libc.Xmalloc(tls, uint64((*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph))
  15004. if !(xftg != 0) {
  15005. return m_FcFalse
  15006. }
  15007. XXftMemAlloc(tls, int32(_XFT_MEM_GLYPH), uint64((*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph))
  15008. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.UintptrFromInt32(0)
  15009. (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory = uint64(0)
  15010. (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture = uint64(0)
  15011. *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8)) = xftg
  15012. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  15013. xuse = xftg
  15014. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder = uint32(0xffffffff)
  15015. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer = uint32(0xffffffff)
  15016. }
  15017. }
  15018. n = *(*int32)(unsafe.Pointer(nmissing))
  15019. v1 = n
  15020. n++
  15021. *(*TFT_UInt)(unsafe.Pointer(missing + uintptr(v1)*4)) = glyph
  15022. if n == int32(m_XFT_NMISSING) {
  15023. XXftFontLoadGlyphs(tls, dpy, pub, need_bitmaps, missing, n)
  15024. n = 0
  15025. }
  15026. *(*int32)(unsafe.Pointer(nmissing)) = n
  15027. return int32(m_FcTrue)
  15028. }
  15029. /*
  15030. * Make unloading faster by moving newly-referenced glyphs to the front
  15031. * of the list, leaving the less-used glyphs on the end.
  15032. */
  15033. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 && (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse > uint32(10) && (*TXftFontInt)(unsafe.Pointer(font)).Fnewest != uint32(0xffffffff) && (*TXftFontInt)(unsafe.Pointer(font)).Fnewest != glyph {
  15034. xuse1 = xftg
  15035. xtmp = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnewest)*8))
  15036. /* delink */
  15037. xold = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Folder)*8))
  15038. xnew = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Fnewer)*8))
  15039. (*TXftGlyphUsage)(unsafe.Pointer(xold)).Fnewer = (*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Fnewer
  15040. (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Folder = (*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Folder
  15041. /* relink */
  15042. xnew = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Fnewer)*8))
  15043. (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Folder = glyph
  15044. (*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Folder = (*TXftFontInt)(unsafe.Pointer(font)).Fnewest
  15045. (*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Fnewer = (*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Fnewer
  15046. (*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Fnewer = glyph
  15047. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = glyph
  15048. }
  15049. return m_FcFalse
  15050. }
  15051. func XXftCharExists(tls *libc.TLS, dpy uintptr, pub uintptr, ucs4 TFcChar32) (r TFcBool) {
  15052. if (*TXftFont)(unsafe.Pointer(pub)).Fcharset != 0 {
  15053. return libfontconfig.XFcCharSetHasChar(tls, (*TXftFont)(unsafe.Pointer(pub)).Fcharset, ucs4)
  15054. }
  15055. return m_FcFalse
  15056. }
  15057. func XXftCharIndex(tls *libc.TLS, dpy uintptr, pub uintptr, ucs4 TFcChar32) (r TFT_UInt) {
  15058. var ent, offset TFcChar32
  15059. var face TFT_Face
  15060. var font uintptr
  15061. _, _, _, _ = ent, face, font, offset
  15062. font = pub
  15063. if !((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value != 0) {
  15064. return uint32(0)
  15065. }
  15066. ent = ucs4 % libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value)
  15067. offset = uint32(0)
  15068. for (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 != ucs4 {
  15069. if (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 == libc.Uint32FromInt32(^libc.Int32FromInt32(0)) {
  15070. if !(XXftCharExists(tls, dpy, pub, ucs4) != 0) {
  15071. return uint32(0)
  15072. }
  15073. face = XXftLockFace(tls, pub)
  15074. if !(face != 0) {
  15075. return uint32(0)
  15076. }
  15077. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 = ucs4
  15078. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fglyph = libfontconfig.XFcFreeTypeCharIndex(tls, face, ucs4)
  15079. XXftUnlockFace(tls, pub)
  15080. break
  15081. }
  15082. if !(offset != 0) {
  15083. offset = ucs4 % libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Frehash_value)
  15084. if !(offset != 0) {
  15085. offset = uint32(1)
  15086. }
  15087. }
  15088. ent = ent + offset
  15089. if ent >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value) {
  15090. ent -= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value)
  15091. }
  15092. }
  15093. return (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fglyph
  15094. }
  15095. // C documentation
  15096. //
  15097. // /*
  15098. // * Remove glyph(s) from the font to reduce memory-usage.
  15099. // */
  15100. func X_XftFontUncacheGlyph(tls *libc.TLS, dpy uintptr, pub uintptr) {
  15101. bp := tls.Alloc(16)
  15102. defer tls.Free(16)
  15103. var font, xftg, xuse uintptr
  15104. var glyph_memory uint64
  15105. var v1 TFT_UInt
  15106. var _ /* glyphindex at bp+0 */ TFT_UInt
  15107. _, _, _, _, _ = font, glyph_memory, xftg, xuse, v1
  15108. font = pub
  15109. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory != 0) {
  15110. return
  15111. }
  15112. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  15113. __XftFontValidateMemory(tls, dpy, pub)
  15114. }
  15115. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  15116. /*
  15117. * Remove the oldest glyph from the font.
  15118. */
  15119. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest != uint32(0xffffffff) {
  15120. xuse = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnewest)*8))
  15121. v1 = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer
  15122. *(*TFT_UInt)(unsafe.Pointer(bp)) = v1
  15123. if v1 != uint32(0xffffffff) {
  15124. XXftFontUnloadGlyphs(tls, dpy, pub, bp, int32(1))
  15125. }
  15126. }
  15127. } else {
  15128. if (*TXftFontInt)(unsafe.Pointer(font)).Fuse_free_glyphs != 0 {
  15129. /*
  15130. * Pick a random glyph from the font and remove it from the cache
  15131. */
  15132. glyph_memory = libc.Uint64FromInt32(libc.Xrand(tls)) % (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  15133. *(*TFT_UInt)(unsafe.Pointer(bp)) = uint32(0)
  15134. for {
  15135. if !(*(*TFT_UInt)(unsafe.Pointer(bp)) < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  15136. break
  15137. }
  15138. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(*(*TFT_UInt)(unsafe.Pointer(bp)))*8))
  15139. if xftg != 0 {
  15140. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory > glyph_memory {
  15141. XXftFontUnloadGlyphs(tls, dpy, pub, bp, int32(1))
  15142. break
  15143. }
  15144. glyph_memory -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  15145. }
  15146. goto _2
  15147. _2:
  15148. ;
  15149. *(*TFT_UInt)(unsafe.Pointer(bp))++
  15150. }
  15151. } else {
  15152. /*
  15153. * Free all glyphs, since they are part of a set.
  15154. */
  15155. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  15156. libxrender.XXRenderFreeGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset)
  15157. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = uint64(0)
  15158. }
  15159. *(*TFT_UInt)(unsafe.Pointer(bp)) = uint32(0)
  15160. for {
  15161. if !(*(*TFT_UInt)(unsafe.Pointer(bp)) < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  15162. break
  15163. }
  15164. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(*(*TFT_UInt)(unsafe.Pointer(bp)))*8))
  15165. if xftg != 0 {
  15166. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory > uint64(0) {
  15167. XXftFontUnloadGlyphs(tls, dpy, pub, bp, int32(1))
  15168. }
  15169. }
  15170. goto _3
  15171. _3:
  15172. ;
  15173. *(*TFT_UInt)(unsafe.Pointer(bp))++
  15174. }
  15175. }
  15176. }
  15177. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  15178. __XftFontValidateMemory(tls, dpy, pub)
  15179. }
  15180. }
  15181. func X_XftFontManageMemory(tls *libc.TLS, dpy uintptr, pub uintptr) {
  15182. bp := tls.Alloc(32)
  15183. defer tls.Free(32)
  15184. var font uintptr
  15185. var v1 uint64
  15186. _, _ = font, v1
  15187. font = pub
  15188. if (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory != 0 {
  15189. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  15190. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory {
  15191. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  15192. v1 = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset
  15193. } else {
  15194. v1 = uint64(font)
  15195. }
  15196. libc.Xprintf(tls, __ccgo_ts+1954, libc.VaList(bp+8, v1, (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory, (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory))
  15197. }
  15198. }
  15199. for (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory {
  15200. X_XftFontUncacheGlyph(tls, dpy, pub)
  15201. }
  15202. }
  15203. X_XftDisplayManageMemory(tls, dpy)
  15204. }
  15205. const m_UINT_MAX2 = 0xffffffff
  15206. /* xftxlfd.c */
  15207. var __XftConfigInitialized int32
  15208. func XXftInit(tls *libc.TLS, config uintptr) (r int32) {
  15209. if __XftConfigInitialized != 0 {
  15210. return int32(m_True)
  15211. }
  15212. __XftConfigInitialized = int32(m_True)
  15213. if !(libfontconfig.XFcInit(tls) != 0) {
  15214. return m_False
  15215. }
  15216. return int32(m_True)
  15217. }
  15218. func XXftGetVersion(tls *libc.TLS) (r int32) {
  15219. return libc.Int32FromInt32(m_XFT_MAJOR)*libc.Int32FromInt32(10000) + libc.Int32FromInt32(m_XFT_MINOR)*libc.Int32FromInt32(100) + libc.Int32FromInt32(m_XFT_REVISION)
  15220. }
  15221. var _XftInUse = [4]struct {
  15222. Fname uintptr
  15223. Falloc_count int32
  15224. Falloc_mem Tsize_t
  15225. Ffree_count int32
  15226. Ffree_mem Tsize_t
  15227. }{
  15228. 0: {
  15229. Fname: __ccgo_ts + 2000,
  15230. },
  15231. 1: {
  15232. Fname: __ccgo_ts + 2008,
  15233. },
  15234. 2: {
  15235. Fname: __ccgo_ts + 2016,
  15236. },
  15237. 3: {
  15238. Fname: __ccgo_ts + 2026,
  15239. },
  15240. }
  15241. var _XftAllocCount int32
  15242. var _XftAllocMem Tsize_t
  15243. var _XftFreeCount int32
  15244. var _XftFreeMem Tsize_t
  15245. var _XftMemNotice = libc.Uint64FromInt32(libc.Int32FromInt32(1) * libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024))
  15246. var _XftAllocNotify Tsize_t
  15247. var _XftFreeNotify Tsize_t
  15248. func XXftMemReport(tls *libc.TLS) {
  15249. bp := tls.Alloc(48)
  15250. defer tls.Free(48)
  15251. var i int32
  15252. _ = i
  15253. libc.Xprintf(tls, __ccgo_ts+2035, 0)
  15254. libc.Xprintf(tls, __ccgo_ts+2054, 0)
  15255. libc.Xprintf(tls, __ccgo_ts+2093, 0)
  15256. i = 0
  15257. for {
  15258. if !(i < int32(_XFT_MEM_NUM)) {
  15259. break
  15260. }
  15261. libc.Xprintf(tls, __ccgo_ts+2137, libc.VaList(bp+8, _XftInUse[i].Fname, _XftInUse[i].Falloc_count, _XftInUse[i].Falloc_mem, _XftInUse[i].Ffree_count, _XftInUse[i].Ffree_mem))
  15262. goto _1
  15263. _1:
  15264. ;
  15265. i++
  15266. }
  15267. libc.Xprintf(tls, __ccgo_ts+2137, libc.VaList(bp+8, __ccgo_ts+2159, _XftAllocCount, _XftAllocMem, _XftFreeCount, _XftFreeMem))
  15268. _XftAllocNotify = uint64(0)
  15269. _XftFreeNotify = uint64(0)
  15270. }
  15271. func XXftMemAlloc(tls *libc.TLS, kind int32, size Tsize_t) {
  15272. if XXftDebug(tls)&int32(m_XFT_DBG_MEMORY) != 0 {
  15273. _XftInUse[kind].Falloc_count++
  15274. _XftInUse[kind].Falloc_mem += size
  15275. _XftAllocCount++
  15276. _XftAllocMem += size
  15277. _XftAllocNotify += size
  15278. if _XftAllocNotify > _XftMemNotice {
  15279. XXftMemReport(tls)
  15280. }
  15281. }
  15282. }
  15283. func XXftMemFree(tls *libc.TLS, kind int32, size Tsize_t) {
  15284. if XXftDebug(tls)&int32(m_XFT_DBG_MEMORY) != 0 {
  15285. _XftInUse[kind].Ffree_count++
  15286. _XftInUse[kind].Ffree_mem += size
  15287. _XftFreeCount++
  15288. _XftFreeMem += size
  15289. _XftFreeNotify += size
  15290. if _XftFreeNotify > _XftMemNotice {
  15291. XXftMemReport(tls)
  15292. }
  15293. }
  15294. }
  15295. /* xftxlfd.c */
  15296. func XXftListFontsPatternObjects(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr, os uintptr) (r uintptr) {
  15297. return libfontconfig.XFcFontList(tls, libc.UintptrFromInt32(0), pattern, os)
  15298. }
  15299. func XXftListFonts(tls *libc.TLS, dpy uintptr, screen int32, va1 uintptr) (r uintptr) {
  15300. bp := tls.Alloc(16)
  15301. defer tls.Free(16)
  15302. var __o__, __ob__, __os__, __p__, first, fs, os, pattern uintptr
  15303. var va Tva_list
  15304. var _ /* __v__ at bp+0 */ TFcValue
  15305. _, _, _, _, _, _, _, _, _ = __o__, __ob__, __os__, __p__, first, fs, os, pattern, va
  15306. va = va1
  15307. __p__ = libc.UintptrFromInt32(0)
  15308. if !(__p__ != 0) {
  15309. __p__ = libfontconfig.XFcPatternCreate(tls)
  15310. if !(__p__ != 0) {
  15311. goto _FcPatternVapBuild_bail0
  15312. }
  15313. }
  15314. for {
  15315. __o__ = libc.VaUintptr(&va)
  15316. if !(__o__ != 0) {
  15317. break
  15318. }
  15319. (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 = libc.VaInt32(&va)
  15320. switch (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 {
  15321. case int32(_FcTypeUnknown):
  15322. fallthrough
  15323. case int32(_FcTypeVoid):
  15324. goto _FcPatternVapBuild_bail1
  15325. case int32(_FcTypeInteger):
  15326. *(*int32)(unsafe.Pointer(bp + 8)) = libc.VaInt32(&va)
  15327. case int32(_FcTypeDouble):
  15328. *(*float64)(unsafe.Pointer(bp + 8)) = libc.VaFloat64(&va)
  15329. case int32(_FcTypeString):
  15330. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15331. case int32(_FcTypeBool):
  15332. *(*TFcBool)(unsafe.Pointer(bp + 8)) = libc.VaInt32(&va)
  15333. case int32(_FcTypeMatrix):
  15334. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15335. case int32(_FcTypeCharSet):
  15336. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15337. case int32(_FcTypeFTFace):
  15338. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15339. case int32(_FcTypeLangSet):
  15340. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15341. case int32(_FcTypeRange):
  15342. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15343. break
  15344. }
  15345. if !(libfontconfig.XFcPatternAdd(tls, __p__, __o__, *(*TFcValue)(unsafe.Pointer(bp)), int32(m_FcTrue)) != 0) {
  15346. goto _FcPatternVapBuild_bail1
  15347. }
  15348. goto _1
  15349. _1:
  15350. }
  15351. pattern = __p__
  15352. goto _FcPatternVapBuild_return
  15353. goto _FcPatternVapBuild_bail1
  15354. _FcPatternVapBuild_bail1:
  15355. ;
  15356. if !(libc.UintptrFromInt32(0) != 0) {
  15357. libfontconfig.XFcPatternDestroy(tls, __p__)
  15358. }
  15359. goto _FcPatternVapBuild_bail0
  15360. _FcPatternVapBuild_bail0:
  15361. ;
  15362. pattern = libc.UintptrFromInt32(0)
  15363. goto _FcPatternVapBuild_return
  15364. _FcPatternVapBuild_return:
  15365. ;
  15366. first = libc.VaUintptr(&va)
  15367. os = uintptr(0)
  15368. __os__ = libfontconfig.XFcObjectSetCreate(tls)
  15369. if !(__os__ != 0) {
  15370. goto _FcObjectSetVapBuild_bail0
  15371. }
  15372. __ob__ = first
  15373. for __ob__ != 0 {
  15374. if !(libfontconfig.XFcObjectSetAdd(tls, __os__, __ob__) != 0) {
  15375. goto _FcObjectSetVapBuild_bail1
  15376. }
  15377. __ob__ = libc.VaUintptr(&va)
  15378. }
  15379. os = __os__
  15380. goto _FcObjectSetVapBuild_bail1
  15381. _FcObjectSetVapBuild_bail1:
  15382. ;
  15383. if !(os != 0) && __os__ != 0 {
  15384. libfontconfig.XFcObjectSetDestroy(tls, __os__)
  15385. }
  15386. goto _FcObjectSetVapBuild_bail0
  15387. _FcObjectSetVapBuild_bail0:
  15388. ;
  15389. _ = va
  15390. fs = XXftListFontsPatternObjects(tls, dpy, screen, pattern, os)
  15391. libfontconfig.XFcPatternDestroy(tls, pattern)
  15392. libfontconfig.XFcObjectSetDestroy(tls, os)
  15393. return fs
  15394. }
  15395. /* xftxlfd.c */
  15396. func XXftNameParse(tls *libc.TLS, name uintptr) (r uintptr) {
  15397. return libfontconfig.XFcNameParse(tls, name)
  15398. }
  15399. func XXftNameUnparse(tls *libc.TLS, pat uintptr, dest uintptr, len1 int32) (r TFcBool) {
  15400. var name, new1 uintptr
  15401. _, _ = name, new1
  15402. name = libfontconfig.XFcNameUnparse(tls, pat)
  15403. if !(name != 0) {
  15404. return m_FcFalse
  15405. }
  15406. if libc.Xstrlen(tls, name)+uint64(1) > libc.Uint64FromInt32(len1) {
  15407. new1 = libfontconfig.XFcPatternDuplicate(tls, pat)
  15408. libc.Xfree(tls, name)
  15409. libfontconfig.XFcPatternDel(tls, new1, __ccgo_ts+2165)
  15410. libfontconfig.XFcPatternDel(tls, new1, __ccgo_ts+1400)
  15411. name = libfontconfig.XFcNameUnparse(tls, new1)
  15412. libfontconfig.XFcPatternDestroy(tls, new1)
  15413. if !(name != 0) {
  15414. return m_FcFalse
  15415. }
  15416. if libc.Xstrlen(tls, name)+uint64(1) > libc.Uint64FromInt32(len1) {
  15417. libc.Xstrncpy(tls, dest, name, libc.Uint64FromInt32(len1)-uint64(1))
  15418. *(*uint8)(unsafe.Pointer(dest + uintptr(len1-int32(1)))) = uint8('\000')
  15419. libc.Xfree(tls, name)
  15420. return m_FcFalse
  15421. }
  15422. }
  15423. libc.Xstrcpy(tls, dest, name)
  15424. libc.Xfree(tls, name)
  15425. return int32(m_FcTrue)
  15426. }
  15427. const m_NUM_ELT_LOCAL = 128
  15428. const m_UINT64_MAX1 = 18446744073709551615
  15429. /* xftxlfd.c */
  15430. // C documentation
  15431. //
  15432. // /*
  15433. // * Dispatch glyph drawing to the correct XRenderCompositeString function
  15434. // */
  15435. func __XftCompositeString(tls *libc.TLS, dpy uintptr, op int32, src TPicture, dst TPicture, format uintptr, glyphset TGlyphSet, srcx int32, srcy int32, dstx int32, dsty int32, charwidth int32, chars uintptr, nchars int32) {
  15436. if nchars == 0 {
  15437. return
  15438. }
  15439. switch charwidth {
  15440. case int32(1):
  15441. fallthrough
  15442. default:
  15443. libxrender.XXRenderCompositeString8(tls, dpy, op, src, dst, format, glyphset, srcx, srcy, dstx, dsty, chars, nchars)
  15444. case int32(2):
  15445. libxrender.XXRenderCompositeString16(tls, dpy, op, src, dst, format, glyphset, srcx, srcy, dstx, dsty, chars, nchars)
  15446. case int32(4):
  15447. libxrender.XXRenderCompositeString32(tls, dpy, op, src, dst, format, glyphset, srcx, srcy, dstx, dsty, chars, nchars)
  15448. break
  15449. }
  15450. }
  15451. /*
  15452. * Use the Render extension to draw the glyphs
  15453. */
  15454. 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) {
  15455. bp := tls.Alloc(5136)
  15456. defer tls.Free(5136)
  15457. var char16, char32, char8, chars, font, glyph uintptr
  15458. var dstx, dsty, i, j, width int32
  15459. var g, max TFT_UInt
  15460. var glyphs_loaded TFcBool
  15461. var needed, size Tsize_t
  15462. var wire TGlyph
  15463. var _ /* char_local at bp+1028 */ [1024]uint32
  15464. var _ /* missing at bp+0 */ [256]TFT_UInt
  15465. var _ /* nmissing at bp+1024 */ int32
  15466. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = char16, char32, char8, chars, dstx, dsty, font, g, glyph, glyphs_loaded, i, j, max, needed, size, width, wire
  15467. font = pub
  15468. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  15469. return
  15470. }
  15471. /*
  15472. * Load missing glyphs
  15473. */
  15474. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  15475. max = uint32(0)
  15476. glyphs_loaded = m_FcFalse
  15477. i = 0
  15478. for {
  15479. if !(i < nglyphs) {
  15480. break
  15481. }
  15482. g = *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4))
  15483. if g > max {
  15484. max = g
  15485. }
  15486. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  15487. glyphs_loaded = int32(m_FcTrue)
  15488. }
  15489. goto _1
  15490. _1:
  15491. ;
  15492. i++
  15493. }
  15494. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  15495. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  15496. }
  15497. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  15498. goto bail1
  15499. }
  15500. if max < uint32(0x100) {
  15501. width = int32(1)
  15502. size = uint64(1)
  15503. } else {
  15504. if max < uint32(0x10000) {
  15505. width = int32(2)
  15506. size = uint64(2)
  15507. } else {
  15508. width = int32(4)
  15509. size = uint64(4)
  15510. }
  15511. }
  15512. chars = bp + 1028
  15513. if libc.Uint64FromInt32(nglyphs) > uint64(0xffffffffffffffff)/size {
  15514. goto bail1
  15515. }
  15516. needed = libc.Uint64FromInt32(nglyphs) * size
  15517. if needed > uint64(4096) {
  15518. chars = libc.Xmalloc(tls, needed)
  15519. if !(chars != 0) {
  15520. goto bail1
  15521. }
  15522. }
  15523. dstx = x
  15524. dsty = y
  15525. char8 = chars
  15526. char16 = chars
  15527. char32 = chars
  15528. i = 0
  15529. j = libc.Int32FromInt32(0)
  15530. for {
  15531. if !(i < nglyphs) {
  15532. break
  15533. }
  15534. wire = uint64(*(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)))
  15535. if wire >= uint64((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(wire)*8)) != 0) {
  15536. wire = uint64(0)
  15537. }
  15538. glyph = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(wire)*8))
  15539. if glyph == libc.UintptrFromInt32(0) {
  15540. goto _2
  15541. }
  15542. if (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0 {
  15543. __XftCompositeString(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, srcx, srcy, x, y, width, chars, j)
  15544. libxrender.XXRenderComposite(tls, dpy, int32(m_PictOpOver), (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture, uint64(0), dst, 0, 0, 0, 0, dstx-int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx), dsty-int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy), uint32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth), uint32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight))
  15545. dstx += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15546. dsty += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15547. x = dstx
  15548. y = dsty
  15549. j = 0
  15550. } else {
  15551. switch width {
  15552. case int32(1):
  15553. *(*uint8)(unsafe.Pointer(char8 + uintptr(j))) = uint8(wire)
  15554. case int32(2):
  15555. *(*uint16)(unsafe.Pointer(char16 + uintptr(j)*2)) = uint16(wire)
  15556. case int32(4):
  15557. *(*uint32)(unsafe.Pointer(char32 + uintptr(j)*4)) = uint32(wire)
  15558. break
  15559. }
  15560. dstx += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15561. dsty += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15562. j++
  15563. }
  15564. goto _2
  15565. _2:
  15566. ;
  15567. i++
  15568. }
  15569. __XftCompositeString(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, srcx, srcy, x, y, width, chars, j)
  15570. if chars != bp+1028 {
  15571. libc.Xfree(tls, chars)
  15572. }
  15573. goto bail1
  15574. bail1:
  15575. ;
  15576. if glyphs_loaded != 0 {
  15577. X_XftFontManageMemory(tls, dpy, pub)
  15578. }
  15579. }
  15580. // C documentation
  15581. //
  15582. // /*
  15583. // * Dispatch glyph drawing to the correct XRenderCompositeText function
  15584. // */
  15585. func __XftCompositeText(tls *libc.TLS, dpy uintptr, op int32, src TPicture, dst TPicture, format uintptr, srcx int32, srcy int32, dstx int32, dsty int32, eltwidth int32, elts uintptr, nelt int32) {
  15586. if nelt == 0 {
  15587. return
  15588. }
  15589. switch eltwidth {
  15590. case int32(1):
  15591. fallthrough
  15592. default:
  15593. libxrender.XXRenderCompositeText8(tls, dpy, op, src, dst, format, srcx, srcy, dstx, dsty, elts, nelt)
  15594. case int32(2):
  15595. libxrender.XXRenderCompositeText16(tls, dpy, op, src, dst, format, srcx, srcy, dstx, dsty, elts, nelt)
  15596. case int32(4):
  15597. libxrender.XXRenderCompositeText32(tls, dpy, op, src, dst, format, srcx, srcy, dstx, dsty, elts, nelt)
  15598. break
  15599. }
  15600. }
  15601. func XXftGlyphSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, glyphs uintptr, nglyphs int32) {
  15602. bp := tls.Alloc(9232)
  15603. defer tls.Free(9232)
  15604. var char16, char32, char8, chars, elts, font, glyph, v4, v7 uintptr
  15605. var g, max TFT_UInt
  15606. var glyphs_loaded TFcBool
  15607. var i, j, n, nelt, size, width, x, y, v3, v5 int32
  15608. var _ /* char_local at bp+1028 */ [1024]uint32
  15609. var _ /* elts_local at bp+5128 */ [128]TXGlyphElt8
  15610. var _ /* missing at bp+0 */ [256]TFT_UInt
  15611. var _ /* nmissing at bp+1024 */ int32
  15612. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = char16, char32, char8, chars, elts, font, g, glyph, glyphs_loaded, i, j, max, n, nelt, size, width, x, y, v3, v4, v5, v7
  15613. font = pub
  15614. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  15615. return
  15616. }
  15617. if !(nglyphs != 0) {
  15618. return
  15619. }
  15620. /*
  15621. * Load missing glyphs
  15622. */
  15623. max = uint32(0)
  15624. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  15625. glyphs_loaded = m_FcFalse
  15626. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs))).Fglyph
  15627. i = 0
  15628. for {
  15629. if !(i < nglyphs) {
  15630. break
  15631. }
  15632. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  15633. if g > max {
  15634. max = g
  15635. }
  15636. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  15637. glyphs_loaded = int32(m_FcTrue)
  15638. }
  15639. goto _1
  15640. _1:
  15641. ;
  15642. i++
  15643. }
  15644. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  15645. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  15646. }
  15647. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  15648. goto bail1
  15649. }
  15650. /*
  15651. * See what encoding size is needed
  15652. */
  15653. if max < uint32(0x100) {
  15654. size = int32(1)
  15655. width = int32(1)
  15656. } else {
  15657. if max < uint32(0x10000) {
  15658. size = int32(2)
  15659. width = int32(2)
  15660. } else {
  15661. size = int32(4)
  15662. width = int32(4)
  15663. }
  15664. }
  15665. chars = bp + 1028
  15666. if nglyphs*size > int32(m_NUM_LOCAL) {
  15667. chars = libc.Xmalloc(tls, libc.Uint64FromInt32(nglyphs*size))
  15668. if !(chars != 0) {
  15669. goto bail1
  15670. }
  15671. }
  15672. char8 = chars
  15673. char16 = chars
  15674. char32 = chars
  15675. /*
  15676. * Compute the number of glyph elts needed
  15677. */
  15678. nelt = int32(1)
  15679. i = 0
  15680. for {
  15681. if !(i < nglyphs) {
  15682. break
  15683. }
  15684. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  15685. /* Substitute default for non-existent glyphs */
  15686. if g >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0) {
  15687. g = uint32(0)
  15688. }
  15689. if *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0 {
  15690. break
  15691. }
  15692. goto _2
  15693. _2:
  15694. ;
  15695. i++
  15696. }
  15697. if i == nglyphs {
  15698. goto bail2
  15699. }
  15700. glyph = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8))
  15701. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15702. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15703. for {
  15704. i++
  15705. v3 = i
  15706. if !(v3 < nglyphs) {
  15707. break
  15708. }
  15709. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  15710. /* Substitute default for non-existent glyphs */
  15711. if g >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0) {
  15712. g = uint32(0)
  15713. }
  15714. /*
  15715. * check to see if the glyph is placed where it would
  15716. * fall using the normal spacing and if it would render
  15717. * as a XRender glyph
  15718. */
  15719. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8))
  15720. glyph = v4
  15721. if v4 != 0 && !((*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0) {
  15722. if x != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) || y != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) {
  15723. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx)
  15724. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy)
  15725. nelt++
  15726. }
  15727. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15728. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15729. }
  15730. }
  15731. elts = bp + 5128
  15732. if !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fcolor != 0) && nelt > int32(m_NUM_ELT_LOCAL) {
  15733. elts = libc.Xmalloc(tls, libc.Uint64FromInt32(nelt)*uint64(32))
  15734. if !(elts != 0) {
  15735. goto bail2
  15736. }
  15737. }
  15738. /*
  15739. * Generate the list of glyph elts or render color glyphs
  15740. */
  15741. nelt = 0
  15742. v5 = libc.Int32FromInt32(0)
  15743. y = v5
  15744. x = v5
  15745. n = 0
  15746. j = 0
  15747. i = 0
  15748. for {
  15749. if !(i < nglyphs) {
  15750. break
  15751. }
  15752. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  15753. /* Substitute default for non-existent glyphs */
  15754. if g >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0) {
  15755. g = uint32(0)
  15756. }
  15757. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8))
  15758. glyph = v7
  15759. if v7 != 0 {
  15760. if (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0 {
  15761. libxrender.XXRenderComposite(tls, dpy, int32(m_PictOpOver), (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture, uint64(0), dst, 0, 0, 0, 0, int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx)-int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx), int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy)-int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy), uint32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth), uint32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight))
  15762. goto _6
  15763. }
  15764. if !(i != 0) || x != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) || y != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) {
  15765. if n != 0 {
  15766. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  15767. nelt++
  15768. }
  15769. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fglyphset = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset
  15770. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fchars = char8 + uintptr(size*j)
  15771. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FxOff = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) - x
  15772. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FyOff = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) - y
  15773. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx)
  15774. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy)
  15775. n = 0
  15776. }
  15777. switch width {
  15778. case int32(1):
  15779. *(*uint8)(unsafe.Pointer(char8 + uintptr(j))) = uint8(g)
  15780. case int32(2):
  15781. *(*uint16)(unsafe.Pointer(char16 + uintptr(j)*2)) = uint16(g)
  15782. case int32(4):
  15783. *(*uint32)(unsafe.Pointer(char32 + uintptr(j)*4)) = g
  15784. break
  15785. }
  15786. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15787. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15788. j++
  15789. n++
  15790. }
  15791. goto _6
  15792. _6:
  15793. ;
  15794. i++
  15795. }
  15796. if n != 0 {
  15797. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  15798. nelt++
  15799. }
  15800. __XftCompositeText(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, srcx, srcy, int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs))).Fx), int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs))).Fy), width, elts, nelt)
  15801. if elts != bp+5128 {
  15802. libc.Xfree(tls, elts)
  15803. }
  15804. goto bail2
  15805. bail2:
  15806. ;
  15807. if chars != bp+1028 {
  15808. libc.Xfree(tls, chars)
  15809. }
  15810. goto bail1
  15811. bail1:
  15812. ;
  15813. if glyphs_loaded != 0 {
  15814. X_XftFontManageMemory(tls, dpy, pub)
  15815. }
  15816. }
  15817. func XXftCharSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, chars uintptr, len1 int32) {
  15818. bp := tls.Alloc(8192)
  15819. defer tls.Free(8192)
  15820. var glyphs uintptr
  15821. var i int32
  15822. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphSpec
  15823. _, _ = glyphs, i
  15824. if len1 <= 0 {
  15825. return
  15826. }
  15827. if len1 <= int32(m_NUM_LOCAL) {
  15828. glyphs = bp
  15829. } else {
  15830. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(8))
  15831. if !(glyphs != 0) {
  15832. return
  15833. }
  15834. }
  15835. i = 0
  15836. for {
  15837. if !(i < len1) {
  15838. break
  15839. }
  15840. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph = XXftCharIndex(tls, dpy, pub, (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fucs4)
  15841. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fx
  15842. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fy
  15843. goto _1
  15844. _1:
  15845. ;
  15846. i++
  15847. }
  15848. XXftGlyphSpecRender(tls, dpy, op, src, pub, dst, srcx, srcy, glyphs, len1)
  15849. if glyphs != bp {
  15850. libc.Xfree(tls, glyphs)
  15851. }
  15852. }
  15853. /*
  15854. * Choose which format to draw text in when drawing with fonts
  15855. * of different formats. The trick is that ARGB formats aren't
  15856. * compatible with A formats as PictOpAdd does the wrong thing, so
  15857. * fall back to an A format when presented with an ARGB and A format
  15858. */
  15859. func _XftPreferFormat(tls *libc.TLS, dpy uintptr, a uintptr, b uintptr) (r uintptr) {
  15860. var prefer uintptr
  15861. _ = prefer
  15862. prefer = libc.UintptrFromInt32(0)
  15863. if a == b {
  15864. prefer = a
  15865. } else {
  15866. if libc.BoolInt32((*TXRenderPictFormat)(unsafe.Pointer(a)).Fdepth == int32(32)) != libc.BoolInt32((*TXRenderPictFormat)(unsafe.Pointer(b)).Fdepth == int32(32)) {
  15867. prefer = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA8))
  15868. } else {
  15869. if (*TXRenderPictFormat)(unsafe.Pointer(a)).Fdepth > (*TXRenderPictFormat)(unsafe.Pointer(b)).Fdepth {
  15870. prefer = a
  15871. } else {
  15872. prefer = b
  15873. }
  15874. }
  15875. }
  15876. return prefer
  15877. }
  15878. func XXftGlyphFontSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, dst TPicture, srcx int32, srcy int32, glyphs uintptr, nglyphs int32) {
  15879. bp := tls.Alloc(9232)
  15880. defer tls.Free(9232)
  15881. var char16, char32, char8, chars, elts, firstFont, font, font1, font2, font3, format, glyph, prevPublic, pub, pub1, pub2, pub3, v4, v7 uintptr
  15882. var g, max TFT_UInt
  15883. var glyphs_loaded TFcBool
  15884. var i, j, n, nelt, size, width, x, y, v3, v5 int32
  15885. var _ /* char_local at bp+1028 */ [1024]uint32
  15886. var _ /* elts_local at bp+5128 */ [128]TXGlyphElt8
  15887. var _ /* missing at bp+0 */ [256]TFT_UInt
  15888. var _ /* nmissing at bp+1024 */ int32
  15889. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  15890. if !(nglyphs != 0) {
  15891. return
  15892. }
  15893. /*
  15894. * Load missing glyphs. Have to load them
  15895. * one at a time in case the font changes
  15896. */
  15897. max = uint32(0)
  15898. glyphs_loaded = m_FcFalse
  15899. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fglyph
  15900. i = 0
  15901. for {
  15902. if !(i < nglyphs) {
  15903. break
  15904. }
  15905. pub = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  15906. font = pub
  15907. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  15908. if g > max {
  15909. max = g
  15910. }
  15911. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  15912. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  15913. glyphs_loaded = int32(m_FcTrue)
  15914. }
  15915. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  15916. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  15917. }
  15918. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  15919. goto bail1
  15920. }
  15921. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  15922. goto bail1
  15923. }
  15924. goto _1
  15925. _1:
  15926. ;
  15927. i++
  15928. }
  15929. /*
  15930. * See what encoding size is needed
  15931. */
  15932. if max < uint32(0x100) {
  15933. size = int32(1)
  15934. width = int32(1)
  15935. } else {
  15936. if max < uint32(0x10000) {
  15937. size = int32(2)
  15938. width = int32(2)
  15939. } else {
  15940. size = int32(4)
  15941. width = int32(4)
  15942. }
  15943. }
  15944. chars = bp + 1028
  15945. if nglyphs*size > int32(m_NUM_LOCAL) {
  15946. chars = libc.Xmalloc(tls, libc.Uint64FromInt32(nglyphs*size))
  15947. if !(chars != 0) {
  15948. goto bail1
  15949. }
  15950. }
  15951. char8 = chars
  15952. char16 = chars
  15953. char32 = chars
  15954. /*
  15955. * Compute the number of glyph elts needed
  15956. */
  15957. nelt = int32(1)
  15958. firstFont = libc.UintptrFromInt32(0)
  15959. i = 0
  15960. for {
  15961. if !(i < nglyphs) {
  15962. break
  15963. }
  15964. pub1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  15965. font1 = pub1
  15966. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  15967. /* Substitute default for non-existent glyphs */
  15968. if g >= (*TXftFontInt)(unsafe.Pointer(font1)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(g)*8)) != 0) {
  15969. g = uint32(0)
  15970. }
  15971. if *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(g)*8)) != 0 {
  15972. firstFont = font1
  15973. break
  15974. }
  15975. goto _2
  15976. _2:
  15977. ;
  15978. i++
  15979. }
  15980. if i == nglyphs || !(firstFont != 0) {
  15981. goto bail2
  15982. }
  15983. glyph = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(firstFont)).Fglyphs + uintptr(g)*8))
  15984. format = (*TXftFontInt)(unsafe.Pointer(firstFont)).Fformat
  15985. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15986. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15987. prevPublic = libc.UintptrFromInt32(0)
  15988. for {
  15989. i++
  15990. v3 = i
  15991. if !(v3 < nglyphs) {
  15992. break
  15993. }
  15994. pub2 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  15995. font2 = pub2
  15996. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  15997. /* Substitute default for non-existent glyphs */
  15998. if g >= (*TXftFontInt)(unsafe.Pointer(font2)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font2)).Fglyphs + uintptr(g)*8)) != 0) {
  15999. g = uint32(0)
  16000. }
  16001. /*
  16002. * check to see if the glyph is placed where it would
  16003. * fall using the normal spacing
  16004. */
  16005. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font2)).Fglyphs + uintptr(g)*8))
  16006. glyph = v4
  16007. if v4 != 0 && !((*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0) {
  16008. if pub2 != prevPublic || x != int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) || y != int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) {
  16009. prevPublic = pub2
  16010. if (*TXftFontInt)(unsafe.Pointer(font2)).Fformat != format {
  16011. format = _XftPreferFormat(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font2)).Fformat, format)
  16012. }
  16013. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx)
  16014. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy)
  16015. nelt++
  16016. }
  16017. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  16018. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  16019. }
  16020. }
  16021. elts = bp + 5128
  16022. if nelt > int32(m_NUM_ELT_LOCAL) {
  16023. elts = libc.Xmalloc(tls, libc.Uint64FromInt32(nelt)*uint64(32))
  16024. if !(elts != 0) {
  16025. goto bail2
  16026. }
  16027. }
  16028. /*
  16029. * Generate the list of glyph elts and render color glyphs
  16030. */
  16031. nelt = 0
  16032. v5 = libc.Int32FromInt32(0)
  16033. y = v5
  16034. x = v5
  16035. n = 0
  16036. j = 0
  16037. prevPublic = libc.UintptrFromInt32(0)
  16038. i = 0
  16039. for {
  16040. if !(i < nglyphs) {
  16041. break
  16042. }
  16043. pub3 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  16044. font3 = pub3
  16045. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  16046. /* Substitute default for non-existent glyphs */
  16047. if g >= (*TXftFontInt)(unsafe.Pointer(font3)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font3)).Fglyphs + uintptr(g)*8)) != 0) {
  16048. g = uint32(0)
  16049. }
  16050. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font3)).Fglyphs + uintptr(g)*8))
  16051. glyph = v7
  16052. if v7 != 0 {
  16053. if (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0 {
  16054. libxrender.XXRenderComposite(tls, dpy, int32(m_PictOpOver), (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture, uint64(0), dst, 0, 0, 0, 0, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx)-int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx), int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy)-int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy), uint32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth), uint32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight))
  16055. goto _6
  16056. }
  16057. 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) {
  16058. if n != 0 {
  16059. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  16060. nelt++
  16061. }
  16062. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fglyphset = (*TXftFontInt)(unsafe.Pointer(font3)).Fglyphset
  16063. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fchars = char8 + uintptr(size*j)
  16064. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FxOff = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) - x
  16065. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FyOff = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) - y
  16066. prevPublic = pub3
  16067. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx)
  16068. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy)
  16069. n = 0
  16070. }
  16071. switch width {
  16072. case int32(1):
  16073. *(*uint8)(unsafe.Pointer(char8 + uintptr(j))) = uint8(g)
  16074. case int32(2):
  16075. *(*uint16)(unsafe.Pointer(char16 + uintptr(j)*2)) = uint16(g)
  16076. case int32(4):
  16077. *(*uint32)(unsafe.Pointer(char32 + uintptr(j)*4)) = g
  16078. break
  16079. }
  16080. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  16081. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  16082. j++
  16083. n++
  16084. }
  16085. goto _6
  16086. _6:
  16087. ;
  16088. i++
  16089. }
  16090. if n != 0 {
  16091. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  16092. nelt++
  16093. }
  16094. __XftCompositeText(tls, dpy, op, src, dst, format, srcx, srcy, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fx), int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fy), width, elts, nelt)
  16095. if elts != bp+5128 {
  16096. libc.Xfree(tls, elts)
  16097. }
  16098. goto bail2
  16099. bail2:
  16100. ;
  16101. if chars != bp+1028 {
  16102. libc.Xfree(tls, chars)
  16103. }
  16104. goto bail1
  16105. bail1:
  16106. ;
  16107. if glyphs_loaded != 0 {
  16108. i = 0
  16109. for {
  16110. if !(i < nglyphs) {
  16111. break
  16112. }
  16113. X_XftFontManageMemory(tls, dpy, (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)
  16114. goto _8
  16115. _8:
  16116. ;
  16117. i++
  16118. }
  16119. }
  16120. }
  16121. func XXftCharFontSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, dst TPicture, srcx int32, srcy int32, chars uintptr, len1 int32) {
  16122. bp := tls.Alloc(16384)
  16123. defer tls.Free(16384)
  16124. var glyphs uintptr
  16125. var i int32
  16126. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphFontSpec
  16127. _, _ = glyphs, i
  16128. if len1 <= 0 {
  16129. return
  16130. }
  16131. if len1 <= int32(m_NUM_LOCAL) {
  16132. glyphs = bp
  16133. } else {
  16134. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(16))
  16135. if !(glyphs != 0) {
  16136. return
  16137. }
  16138. }
  16139. i = 0
  16140. for {
  16141. if !(i < len1) {
  16142. break
  16143. }
  16144. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Ffont
  16145. (*(*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)
  16146. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fx
  16147. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fy
  16148. goto _1
  16149. _1:
  16150. ;
  16151. i++
  16152. }
  16153. XXftGlyphFontSpecRender(tls, dpy, op, src, dst, srcx, srcy, glyphs, len1)
  16154. if glyphs != bp {
  16155. libc.Xfree(tls, glyphs)
  16156. }
  16157. }
  16158. 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) {
  16159. bp := tls.Alloc(4096)
  16160. defer tls.Free(4096)
  16161. var glyphs uintptr
  16162. var i int32
  16163. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16164. _, _ = glyphs, i
  16165. if len1 <= 0 {
  16166. return
  16167. }
  16168. if len1 <= int32(m_NUM_LOCAL) {
  16169. glyphs = bp
  16170. } else {
  16171. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  16172. if !(glyphs != 0) {
  16173. return
  16174. }
  16175. }
  16176. i = 0
  16177. for {
  16178. if !(i < len1) {
  16179. break
  16180. }
  16181. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  16182. goto _1
  16183. _1:
  16184. ;
  16185. i++
  16186. }
  16187. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16188. if glyphs != bp {
  16189. libc.Xfree(tls, glyphs)
  16190. }
  16191. }
  16192. 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) {
  16193. bp := tls.Alloc(4096)
  16194. defer tls.Free(4096)
  16195. var glyphs uintptr
  16196. var i int32
  16197. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16198. _, _ = glyphs, i
  16199. if len1 <= 0 {
  16200. return
  16201. }
  16202. if len1 <= int32(m_NUM_LOCAL) {
  16203. glyphs = bp
  16204. } else {
  16205. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  16206. if !(glyphs != 0) {
  16207. return
  16208. }
  16209. }
  16210. i = 0
  16211. for {
  16212. if !(i < len1) {
  16213. break
  16214. }
  16215. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  16216. goto _1
  16217. _1:
  16218. ;
  16219. i++
  16220. }
  16221. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16222. if glyphs != bp {
  16223. libc.Xfree(tls, glyphs)
  16224. }
  16225. }
  16226. 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) {
  16227. bp := tls.Alloc(4096)
  16228. defer tls.Free(4096)
  16229. var glyphs uintptr
  16230. var i int32
  16231. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16232. _, _ = glyphs, i
  16233. if len1 <= 0 {
  16234. return
  16235. }
  16236. if len1 <= int32(m_NUM_LOCAL) {
  16237. glyphs = bp
  16238. } else {
  16239. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  16240. if !(glyphs != 0) {
  16241. return
  16242. }
  16243. }
  16244. i = 0
  16245. for {
  16246. if !(i < len1) {
  16247. break
  16248. }
  16249. *(*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.Int32FromInt32(8)|libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(2)+int32(1)))))))
  16250. goto _1
  16251. _1:
  16252. ;
  16253. i++
  16254. }
  16255. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16256. if glyphs != bp {
  16257. libc.Xfree(tls, glyphs)
  16258. }
  16259. }
  16260. 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) {
  16261. bp := tls.Alloc(4096)
  16262. defer tls.Free(4096)
  16263. var glyphs uintptr
  16264. var i int32
  16265. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16266. _, _ = glyphs, i
  16267. if len1 <= 0 {
  16268. return
  16269. }
  16270. if len1 <= int32(m_NUM_LOCAL) {
  16271. glyphs = bp
  16272. } else {
  16273. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  16274. if !(glyphs != 0) {
  16275. return
  16276. }
  16277. }
  16278. i = 0
  16279. for {
  16280. if !(i < len1) {
  16281. break
  16282. }
  16283. *(*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)))))<<libc.Int32FromInt32(8)))
  16284. goto _1
  16285. _1:
  16286. ;
  16287. i++
  16288. }
  16289. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16290. if glyphs != bp {
  16291. libc.Xfree(tls, glyphs)
  16292. }
  16293. }
  16294. 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) {
  16295. bp := tls.Alloc(4096)
  16296. defer tls.Free(4096)
  16297. var glyphs uintptr
  16298. var i int32
  16299. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16300. _, _ = glyphs, i
  16301. if len1 <= 0 {
  16302. return
  16303. }
  16304. if len1 <= int32(m_NUM_LOCAL) {
  16305. glyphs = bp
  16306. } else {
  16307. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  16308. if !(glyphs != 0) {
  16309. return
  16310. }
  16311. }
  16312. i = 0
  16313. for {
  16314. if !(i < len1) {
  16315. break
  16316. }
  16317. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  16318. goto _1
  16319. _1:
  16320. ;
  16321. i++
  16322. }
  16323. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16324. if glyphs != bp {
  16325. libc.Xfree(tls, glyphs)
  16326. }
  16327. }
  16328. 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) {
  16329. bp := tls.Alloc(4096)
  16330. defer tls.Free(4096)
  16331. var glyphs uintptr
  16332. var i int32
  16333. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16334. _, _ = glyphs, i
  16335. if len1 <= 0 {
  16336. return
  16337. }
  16338. if len1 <= int32(m_NUM_LOCAL) {
  16339. glyphs = bp
  16340. } else {
  16341. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  16342. if !(glyphs != 0) {
  16343. return
  16344. }
  16345. }
  16346. i = 0
  16347. for {
  16348. if !(i < len1) {
  16349. break
  16350. }
  16351. *(*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.Int32FromInt32(24)|libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)+int32(1)))))<<libc.Int32FromInt32(16)|libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)+int32(2)))))<<libc.Int32FromInt32(8)|libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)+int32(3)))))))
  16352. goto _1
  16353. _1:
  16354. ;
  16355. i++
  16356. }
  16357. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16358. if glyphs != bp {
  16359. libc.Xfree(tls, glyphs)
  16360. }
  16361. }
  16362. 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) {
  16363. bp := tls.Alloc(4096)
  16364. defer tls.Free(4096)
  16365. var glyphs uintptr
  16366. var i int32
  16367. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16368. _, _ = glyphs, i
  16369. if len1 <= 0 {
  16370. return
  16371. }
  16372. if len1 <= int32(m_NUM_LOCAL) {
  16373. glyphs = bp
  16374. } else {
  16375. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  16376. if !(glyphs != 0) {
  16377. return
  16378. }
  16379. }
  16380. i = 0
  16381. for {
  16382. if !(i < len1) {
  16383. break
  16384. }
  16385. *(*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)))))<<libc.Int32FromInt32(8)|libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)+int32(2)))))<<libc.Int32FromInt32(16)|libc.Int32FromUint8(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i*int32(4)+int32(3)))))<<libc.Int32FromInt32(24)))
  16386. goto _1
  16387. _1:
  16388. ;
  16389. i++
  16390. }
  16391. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16392. if glyphs != bp {
  16393. libc.Xfree(tls, glyphs)
  16394. }
  16395. }
  16396. 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) {
  16397. bp := tls.Alloc(4112)
  16398. defer tls.Free(4112)
  16399. var glyphs, glyphs_new uintptr
  16400. var i, l, size, v1, v3 int32
  16401. var v2 bool
  16402. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16403. var _ /* ucs4 at bp+4096 */ TFcChar32
  16404. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  16405. if len1 <= 0 {
  16406. return
  16407. }
  16408. i = 0
  16409. glyphs = bp
  16410. size = int32(m_NUM_LOCAL)
  16411. for {
  16412. if v2 = len1 != 0; v2 {
  16413. v1 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  16414. l = v1
  16415. }
  16416. if !(v2 && v1 > 0) {
  16417. break
  16418. }
  16419. if i == size {
  16420. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*libc.Int32FromInt32(2))*uint64(4))
  16421. if !(glyphs_new != 0) {
  16422. if glyphs != bp {
  16423. libc.Xfree(tls, glyphs)
  16424. }
  16425. return
  16426. }
  16427. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  16428. size *= int32(2)
  16429. if glyphs != bp {
  16430. libc.Xfree(tls, glyphs)
  16431. }
  16432. glyphs = glyphs_new
  16433. }
  16434. v3 = i
  16435. i++
  16436. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  16437. string1 += uintptr(l)
  16438. len1 -= l
  16439. }
  16440. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, i)
  16441. if glyphs != bp {
  16442. libc.Xfree(tls, glyphs)
  16443. }
  16444. }
  16445. 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) {
  16446. bp := tls.Alloc(4112)
  16447. defer tls.Free(4112)
  16448. var glyphs, glyphs_new uintptr
  16449. var i, l, size, v1, v3 int32
  16450. var v2 bool
  16451. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16452. var _ /* ucs4 at bp+4096 */ TFcChar32
  16453. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  16454. if len1 <= 0 {
  16455. return
  16456. }
  16457. i = 0
  16458. glyphs = bp
  16459. size = int32(m_NUM_LOCAL)
  16460. for {
  16461. if v2 = len1 != 0; v2 {
  16462. v1 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  16463. l = v1
  16464. }
  16465. if !(v2 && v1 > 0) {
  16466. break
  16467. }
  16468. if i == size {
  16469. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*libc.Int32FromInt32(2))*uint64(4))
  16470. if !(glyphs_new != 0) {
  16471. if glyphs != bp {
  16472. libc.Xfree(tls, glyphs)
  16473. }
  16474. return
  16475. }
  16476. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  16477. size *= int32(2)
  16478. if glyphs != bp {
  16479. libc.Xfree(tls, glyphs)
  16480. }
  16481. glyphs = glyphs_new
  16482. }
  16483. v3 = i
  16484. i++
  16485. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  16486. string1 += uintptr(l)
  16487. len1 -= l
  16488. }
  16489. XXftGlyphRender(tls, dpy, int32(m_PictOpOver), src, pub, dst, srcx, srcy, x, y, glyphs, i)
  16490. if glyphs != bp {
  16491. libc.Xfree(tls, glyphs)
  16492. }
  16493. }
  16494. const m_UINT64_MAX2 = "0xffffffffffffffffu"
  16495. /* xftxlfd.c */
  16496. func X_XftMatchSymbolic(tls *libc.TLS, s uintptr, n int32, name uintptr, def int32) (r int32) {
  16497. var v1 int32
  16498. _ = v1
  16499. for {
  16500. v1 = n
  16501. n--
  16502. if !(v1 != 0) {
  16503. break
  16504. }
  16505. if !(libfontconfig.XFcStrCmpIgnoreCase(tls, (*TXftSymbolic)(unsafe.Pointer(s)).Fname, name) != 0) {
  16506. return (*TXftSymbolic)(unsafe.Pointer(s)).Fvalue
  16507. }
  16508. s += 16
  16509. }
  16510. return def
  16511. }
  16512. /* xftxlfd.c */
  16513. func XXftNativeByteOrder(tls *libc.TLS) (r int32) {
  16514. bp := tls.Alloc(16)
  16515. defer tls.Free(16)
  16516. var _ /* whichbyte at bp+0 */ int32
  16517. *(*int32)(unsafe.Pointer(bp)) = int32(1)
  16518. if *(*uint8)(unsafe.Pointer(bp)) != 0 {
  16519. return m_LSBFirst
  16520. }
  16521. return int32(m_MSBFirst)
  16522. }
  16523. /* byte swap a 32-bit value */
  16524. /* byte swap a short */
  16525. /* byte swap a three-byte unit */
  16526. func XXftSwapCARD32(tls *libc.TLS, data uintptr, u int32) {
  16527. var n uint8
  16528. var v1 int32
  16529. _, _ = n, v1
  16530. for {
  16531. v1 = u
  16532. u--
  16533. if !(v1 != 0) {
  16534. break
  16535. }
  16536. n = *(*uint8)(unsafe.Pointer(data))
  16537. *(*uint8)(unsafe.Pointer(data)) = *(*uint8)(unsafe.Pointer(data + 3))
  16538. *(*uint8)(unsafe.Pointer(data + 3)) = n
  16539. n = *(*uint8)(unsafe.Pointer(data + 1))
  16540. *(*uint8)(unsafe.Pointer(data + 1)) = *(*uint8)(unsafe.Pointer(data + 2))
  16541. *(*uint8)(unsafe.Pointer(data + 2)) = n
  16542. data += 4
  16543. }
  16544. }
  16545. func XXftSwapCARD24(tls *libc.TLS, data uintptr, width int32, height int32) {
  16546. var d uintptr
  16547. var n uint8
  16548. var u, units, v1, v2 int32
  16549. _, _, _, _, _, _ = d, n, u, units, v1, v2
  16550. units = width / int32(3)
  16551. for {
  16552. v1 = height
  16553. height--
  16554. if !(v1 != 0) {
  16555. break
  16556. }
  16557. d = data
  16558. data += uintptr(width)
  16559. u = units
  16560. for {
  16561. v2 = u
  16562. u--
  16563. if !(v2 != 0) {
  16564. break
  16565. }
  16566. n = *(*uint8)(unsafe.Pointer(d))
  16567. *(*uint8)(unsafe.Pointer(d)) = *(*uint8)(unsafe.Pointer(d + 2))
  16568. *(*uint8)(unsafe.Pointer(d + 2)) = n
  16569. d += uintptr(3)
  16570. }
  16571. }
  16572. }
  16573. func XXftSwapCARD16(tls *libc.TLS, data uintptr, u int32) {
  16574. var n uint8
  16575. var v1 int32
  16576. _, _ = n, v1
  16577. for {
  16578. v1 = u
  16579. u--
  16580. if !(v1 != 0) {
  16581. break
  16582. }
  16583. n = *(*uint8)(unsafe.Pointer(data))
  16584. *(*uint8)(unsafe.Pointer(data)) = *(*uint8)(unsafe.Pointer(data + 1))
  16585. *(*uint8)(unsafe.Pointer(data + 1)) = n
  16586. data += 2
  16587. }
  16588. }
  16589. func XXftSwapImage(tls *libc.TLS, image uintptr) {
  16590. switch (*TXImage)(unsafe.Pointer(image)).Fbits_per_pixel {
  16591. case int32(32):
  16592. XXftSwapCARD32(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fheight*(*TXImage)(unsafe.Pointer(image)).Fbytes_per_line>>int32(2))
  16593. case int32(24):
  16594. XXftSwapCARD24(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line, (*TXImage)(unsafe.Pointer(image)).Fheight)
  16595. case int32(16):
  16596. XXftSwapCARD16(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fheight*(*TXImage)(unsafe.Pointer(image)).Fbytes_per_line>>int32(1))
  16597. default:
  16598. break
  16599. }
  16600. }
  16601. /* xftxlfd.c */
  16602. var _XftXlfdWeights = [6]TXftSymbolic{
  16603. 0: {
  16604. Fname: __ccgo_ts + 2170,
  16605. Fvalue: int32(m_FC_WEIGHT_LIGHT),
  16606. },
  16607. 1: {
  16608. Fname: __ccgo_ts + 2176,
  16609. Fvalue: int32(m_FC_WEIGHT_MEDIUM),
  16610. },
  16611. 2: {
  16612. Fname: __ccgo_ts + 2183,
  16613. Fvalue: int32(m_FC_WEIGHT_MEDIUM),
  16614. },
  16615. 3: {
  16616. Fname: __ccgo_ts + 2191,
  16617. Fvalue: int32(m_FC_WEIGHT_DEMIBOLD),
  16618. },
  16619. 4: {
  16620. Fname: __ccgo_ts + 2200,
  16621. Fvalue: int32(m_FC_WEIGHT_BOLD),
  16622. },
  16623. 5: {
  16624. Fname: __ccgo_ts + 2205,
  16625. Fvalue: int32(m_FC_WEIGHT_BLACK),
  16626. },
  16627. }
  16628. var _XftXlfdSlants = [3]TXftSymbolic{
  16629. 0: {
  16630. Fname: __ccgo_ts + 2211,
  16631. },
  16632. 1: {
  16633. Fname: __ccgo_ts + 2213,
  16634. Fvalue: int32(m_FC_SLANT_ITALIC),
  16635. },
  16636. 2: {
  16637. Fname: __ccgo_ts + 2215,
  16638. Fvalue: int32(m_FC_SLANT_OBLIQUE),
  16639. },
  16640. }
  16641. // C documentation
  16642. //
  16643. // /*
  16644. // * Cut out one XLFD field, placing it in 'save' and return
  16645. // * the start of 'save'
  16646. // */
  16647. func _XftSplitStr(tls *libc.TLS, field uintptr, save uintptr) (r uintptr) {
  16648. var c uint8
  16649. var s, v1, v2 uintptr
  16650. _, _, _, _ = c, s, v1, v2
  16651. s = save
  16652. for *(*uint8)(unsafe.Pointer(field)) != 0 {
  16653. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(field))) == int32('-') {
  16654. break
  16655. }
  16656. v1 = field
  16657. field++
  16658. c = *(*uint8)(unsafe.Pointer(v1))
  16659. v2 = save
  16660. save++
  16661. *(*uint8)(unsafe.Pointer(v2)) = c
  16662. }
  16663. *(*uint8)(unsafe.Pointer(save)) = uint8(0)
  16664. return s
  16665. }
  16666. /*
  16667. * convert one XLFD numeric field. Return -1 if the field is '*'
  16668. */
  16669. func _XftGetInt(tls *libc.TLS, ptr uintptr, val uintptr) (r uintptr) {
  16670. var v2 uintptr
  16671. _ = v2
  16672. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(ptr))) == int32('*') {
  16673. *(*int32)(unsafe.Pointer(val)) = -int32(1)
  16674. ptr++
  16675. } else {
  16676. *(*int32)(unsafe.Pointer(val)) = 0
  16677. for {
  16678. if !(libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(ptr))) >= int32('0') && libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(ptr))) <= int32('9')) {
  16679. break
  16680. }
  16681. v2 = ptr
  16682. ptr++
  16683. *(*int32)(unsafe.Pointer(val)) = *(*int32)(unsafe.Pointer(val))*int32(10) + libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) - int32('0')
  16684. goto _1
  16685. _1:
  16686. }
  16687. }
  16688. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(ptr))) == int32('-') {
  16689. return ptr
  16690. }
  16691. return libc.UintptrFromInt32(0)
  16692. }
  16693. func XXftXlfdParse(tls *libc.TLS, xlfd_orig uintptr, ignore_scalable TFcBool, complete TFcBool) (r uintptr) {
  16694. bp := tls.Alloc(16)
  16695. defer tls.Free(16)
  16696. var dpixel float64
  16697. var family, foundry, pat, 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, v4, v5, v6, v7, v8, v9 uintptr
  16698. var slant_value, weight_value int32
  16699. var _ /* pixel at bp+0 */ int32
  16700. var _ /* point at bp+4 */ int32
  16701. var _ /* resx at bp+8 */ int32
  16702. var _ /* resy at bp+12 */ int32
  16703. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = dpixel, family, foundry, pat, 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, v4, v5, v6, v7, v8, v9
  16704. xlfd = xlfd_orig
  16705. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(xlfd))) != int32('-') {
  16706. return libc.UintptrFromInt32(0)
  16707. }
  16708. xlfd++
  16709. v3 = xlfd
  16710. v2 = v3
  16711. foundry = v2
  16712. v1 = libc.Xstrchr(tls, v2, int32('-'))
  16713. xlfd = v1
  16714. if !(v1 != 0) {
  16715. return libc.UintptrFromInt32(0)
  16716. }
  16717. xlfd++
  16718. v6 = xlfd
  16719. v5 = v6
  16720. family = v5
  16721. v4 = libc.Xstrchr(tls, v5, int32('-'))
  16722. xlfd = v4
  16723. if !(v4 != 0) {
  16724. return libc.UintptrFromInt32(0)
  16725. }
  16726. xlfd++
  16727. v9 = xlfd
  16728. v8 = v9
  16729. weight_name = v8
  16730. v7 = libc.Xstrchr(tls, v8, int32('-'))
  16731. xlfd = v7
  16732. if !(v7 != 0) {
  16733. return libc.UintptrFromInt32(0)
  16734. }
  16735. xlfd++
  16736. v12 = xlfd
  16737. v11 = v12
  16738. slant = v11
  16739. v10 = libc.Xstrchr(tls, v11, int32('-'))
  16740. xlfd = v10
  16741. if !(v10 != 0) {
  16742. return libc.UintptrFromInt32(0)
  16743. }
  16744. xlfd++
  16745. v14 = xlfd
  16746. v13 = libc.Xstrchr(tls, v14, int32('-'))
  16747. xlfd = v13
  16748. if !(v13 != 0) {
  16749. return libc.UintptrFromInt32(0)
  16750. }
  16751. xlfd++
  16752. v16 = xlfd
  16753. v15 = libc.Xstrchr(tls, v16, int32('-'))
  16754. xlfd = v15
  16755. if !(v15 != 0) {
  16756. return libc.UintptrFromInt32(0)
  16757. }
  16758. xlfd++
  16759. v18 = xlfd
  16760. v17 = _XftGetInt(tls, v18, bp)
  16761. xlfd = v17
  16762. if !(v17 != 0) {
  16763. return libc.UintptrFromInt32(0)
  16764. }
  16765. xlfd++
  16766. v20 = xlfd
  16767. v19 = _XftGetInt(tls, v20, bp+4)
  16768. xlfd = v19
  16769. if !(v19 != 0) {
  16770. return libc.UintptrFromInt32(0)
  16771. }
  16772. xlfd++
  16773. v22 = xlfd
  16774. v21 = _XftGetInt(tls, v22, bp+8)
  16775. xlfd = v21
  16776. if !(v21 != 0) {
  16777. return libc.UintptrFromInt32(0)
  16778. }
  16779. xlfd++
  16780. v24 = xlfd
  16781. v23 = _XftGetInt(tls, v24, bp+12)
  16782. xlfd = v23
  16783. if !(v23 != 0) {
  16784. return libc.UintptrFromInt32(0)
  16785. }
  16786. xlfd++
  16787. v26 = xlfd
  16788. v25 = libc.Xstrchr(tls, v26, int32('-'))
  16789. xlfd = v25
  16790. if !(v25 != 0) {
  16791. return libc.UintptrFromInt32(0)
  16792. }
  16793. xlfd++
  16794. v28 = xlfd
  16795. v27 = libc.Xstrchr(tls, v28, int32('-'))
  16796. xlfd = v27
  16797. if !(v27 != 0) {
  16798. return libc.UintptrFromInt32(0)
  16799. }
  16800. xlfd++
  16801. v30 = xlfd
  16802. v29 = libc.Xstrchr(tls, v30, int32('-'))
  16803. xlfd = v29
  16804. if !(v29 != 0) {
  16805. return libc.UintptrFromInt32(0)
  16806. }
  16807. /* make sure no fields follow this one */
  16808. xlfd++
  16809. v31 = xlfd
  16810. if libc.Xstrchr(tls, v31, int32('-')) != 0 {
  16811. return libc.UintptrFromInt32(0)
  16812. }
  16813. if !(*(*int32)(unsafe.Pointer(bp)) != 0) {
  16814. return libc.UintptrFromInt32(0)
  16815. }
  16816. pat = libfontconfig.XFcPatternCreate(tls)
  16817. if !(pat != 0) {
  16818. return libc.UintptrFromInt32(0)
  16819. }
  16820. save = libc.Xmalloc(tls, libc.Xstrlen(tls, foundry)+uint64(1))
  16821. if !(save != 0) {
  16822. libfontconfig.XFcPatternDestroy(tls, pat)
  16823. return libc.UintptrFromInt32(0)
  16824. }
  16825. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+2217, xlfd_orig) != 0) {
  16826. goto bail
  16827. }
  16828. _XftSplitStr(tls, foundry, save)
  16829. if *(*uint8)(unsafe.Pointer(save)) != 0 && libc.Xstrcmp(tls, save, __ccgo_ts+2222) != 0 {
  16830. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+2224, save) != 0) {
  16831. goto bail
  16832. }
  16833. }
  16834. _XftSplitStr(tls, family, save)
  16835. if *(*uint8)(unsafe.Pointer(save)) != 0 && libc.Xstrcmp(tls, save, __ccgo_ts+2222) != 0 {
  16836. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+2232, save) != 0) {
  16837. goto bail
  16838. }
  16839. }
  16840. 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))
  16841. if !(libfontconfig.XFcPatternAddInteger(tls, pat, __ccgo_ts+2239, weight_value) != 0) {
  16842. goto bail
  16843. }
  16844. 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)
  16845. if !(libfontconfig.XFcPatternAddInteger(tls, pat, __ccgo_ts+2246, slant_value) != 0) {
  16846. goto bail
  16847. }
  16848. dpixel = float64(*(*int32)(unsafe.Pointer(bp)))
  16849. if *(*int32)(unsafe.Pointer(bp + 4)) > 0 {
  16850. if !(libfontconfig.XFcPatternAddDouble(tls, pat, __ccgo_ts+2252, float64(*(*int32)(unsafe.Pointer(bp + 4)))/float64(10)) != 0) {
  16851. goto bail
  16852. }
  16853. if *(*int32)(unsafe.Pointer(bp)) <= 0 && *(*int32)(unsafe.Pointer(bp + 12)) > 0 {
  16854. dpixel = float64(float64(*(*int32)(unsafe.Pointer(bp + 4)))*float64(*(*int32)(unsafe.Pointer(bp + 12)))) / float64(720)
  16855. }
  16856. }
  16857. if dpixel > libc.Float64FromInt32(0) {
  16858. if !(libfontconfig.XFcPatternAddDouble(tls, pat, __ccgo_ts+1243, dpixel) != 0) {
  16859. goto bail
  16860. }
  16861. }
  16862. libc.Xfree(tls, save)
  16863. return pat
  16864. goto bail
  16865. bail:
  16866. ;
  16867. libc.Xfree(tls, save)
  16868. libfontconfig.XFcPatternDestroy(tls, pat)
  16869. return libc.UintptrFromInt32(0)
  16870. }
  16871. func __ccgo_fp(f interface{}) uintptr {
  16872. type iface [2]uintptr
  16873. return (*iface)(unsafe.Pointer(&f))[1]
  16874. }
  16875. /* xftxlfd.c */
  16876. var X_XftDisplayInfo uintptr
  16877. /* xftxlfd.c */
  16878. var X_XftFTlibrary TFT_Library
  16879. var __ccgo_ts = (*reflect.StringHeader)(unsafe.Pointer(&__ccgo_ts1)).Data
  16880. 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 %lu\n\x00maxunreffonts\x00global max unref fonts %d\n\x00trackmemusage\x00true\x00false\x00global track mem usage %s\n\x00XftDisplayInfoGet failed to initialize, Xft unhappy\n\x00Display glyph cache incorrect has %lu bytes, should have %lu\n\x00Reduce global memory from %lu to %lu\n\x00update max cache memory %lu\n\x00update max unref fonts %d\n\x00update track mem usage %s\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 %lu bytes, should have %lu\n\x00Xft: out of range; %d\n\x00Xft: too many in-use glyphs (%d vs %d)\n\x00Xft: too few in-use glyphs (%u vs %d)\n\x00Xft out of range; %d\n\x00Xft: forward %d vs reverse %d\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 %lu\n\x00alloc %p -> %d: %p USE %d.%d\n\x00alloc %p -> %d: %p USE %d.%d, %p NEW %d.%d %p OLD %d.%d\n\x00Uncaching glyph 0x%x size %lu\n\x00free %p -> %p USE %d.%d\n\x00Xft: glyph count error\n\x00Reduce memory for font 0x%lx from %lu to %lu\n\x00XftDraw\x00XftFont\x00XftFtFile\x00XftGlyph\x00Xft Memory Usage:\n\x00\t Which Alloc Free\n\x00\t count bytes count bytes\n\x00\t%9.9s%8d%8lu%8d%8lu\n\x00Total\x00lang\x00light\x00medium\x00regular\x00demibold\x00bold\x00black\x00r\x00i\x00o\x00xlfd\x00*\x00foundry\x00family\x00weight\x00slant\x00size\x00"