ccgo_linux_amd64.go 543 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903
  1. // Code generated for linux/amd64 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/amd64 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libfreetype/include/linux/amd64 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libX11/include/linux/amd64 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libXrender/include/linux/amd64 -lfontconfig -lfreetype -lX11 -lXrender -o libxft.go --package-name libxft src/.libs/libXft.a', DO NOT EDIT.
  2. //go:build linux && amd64
  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_PAGESIZE = 4096
  718. const m_PAGE_SIZE = "PAGESIZE"
  719. const m_PATH_MAX = 4096
  720. const m_PDP_ENDIAN = "__PDP_ENDIAN"
  721. const m_PIPE_BUF = 4096
  722. const m_PTHREAD_CANCEL_ASYNCHRONOUS = 1
  723. const m_PTHREAD_CANCEL_DEFERRED = 0
  724. const m_PTHREAD_CANCEL_DISABLE = 1
  725. const m_PTHREAD_CANCEL_ENABLE = 0
  726. const m_PTHREAD_CANCEL_MASKED = 2
  727. const m_PTHREAD_CREATE_DETACHED = 1
  728. const m_PTHREAD_CREATE_JOINABLE = 0
  729. const m_PTHREAD_DESTRUCTOR_ITERATIONS = 4
  730. const m_PTHREAD_EXPLICIT_SCHED = 1
  731. const m_PTHREAD_INHERIT_SCHED = 0
  732. const m_PTHREAD_KEYS_MAX = 128
  733. const m_PTHREAD_MUTEX_DEFAULT = 0
  734. const m_PTHREAD_MUTEX_ERRORCHECK = 2
  735. const m_PTHREAD_MUTEX_NORMAL = 0
  736. const m_PTHREAD_MUTEX_RECURSIVE = 1
  737. const m_PTHREAD_MUTEX_ROBUST = 1
  738. const m_PTHREAD_MUTEX_STALLED = 0
  739. const m_PTHREAD_ONCE_INIT = 0
  740. const m_PTHREAD_PRIO_INHERIT = 1
  741. const m_PTHREAD_PRIO_NONE = 0
  742. const m_PTHREAD_PRIO_PROTECT = 2
  743. const m_PTHREAD_PROCESS_PRIVATE = 0
  744. const m_PTHREAD_PROCESS_SHARED = 1
  745. const m_PTHREAD_SCOPE_PROCESS = 1
  746. const m_PTHREAD_SCOPE_SYSTEM = 0
  747. const m_PTHREAD_STACK_MIN = 2048
  748. const m_PTRDIFF_MAX = "INT64_MAX"
  749. const m_PTRDIFF_MIN = "INT64_MIN"
  750. const m_PTSPERBATCH = 1024
  751. const m_P_tmpdir = "/tmp"
  752. const m_ParentRelative = 1
  753. const m_PictOpAdd = 12
  754. const m_PictOpAtop = 9
  755. const m_PictOpAtopReverse = 10
  756. const m_PictOpBlendMaximum = 0x3e
  757. const m_PictOpBlendMinimum = 0x30
  758. const m_PictOpClear = 0
  759. const m_PictOpColorBurn = 0x36
  760. const m_PictOpColorDodge = 0x35
  761. const m_PictOpConjointAtop = 0x29
  762. const m_PictOpConjointAtopReverse = 0x2a
  763. const m_PictOpConjointClear = 0x20
  764. const m_PictOpConjointDst = 0x22
  765. const m_PictOpConjointIn = 0x25
  766. const m_PictOpConjointInReverse = 0x26
  767. const m_PictOpConjointMaximum = 0x2b
  768. const m_PictOpConjointMinimum = 0x20
  769. const m_PictOpConjointOut = 0x27
  770. const m_PictOpConjointOutReverse = 0x28
  771. const m_PictOpConjointOver = 0x23
  772. const m_PictOpConjointOverReverse = 0x24
  773. const m_PictOpConjointSrc = 0x21
  774. const m_PictOpConjointXor = 0x2b
  775. const m_PictOpDarken = 0x33
  776. const m_PictOpDifference = 0x39
  777. const m_PictOpDisjointAtop = 0x19
  778. const m_PictOpDisjointAtopReverse = 0x1a
  779. const m_PictOpDisjointClear = 0x10
  780. const m_PictOpDisjointDst = 0x12
  781. const m_PictOpDisjointIn = 0x15
  782. const m_PictOpDisjointInReverse = 0x16
  783. const m_PictOpDisjointMaximum = 0x1b
  784. const m_PictOpDisjointMinimum = 0x10
  785. const m_PictOpDisjointOut = 0x17
  786. const m_PictOpDisjointOutReverse = 0x18
  787. const m_PictOpDisjointOver = 0x13
  788. const m_PictOpDisjointOverReverse = 0x14
  789. const m_PictOpDisjointSrc = 0x11
  790. const m_PictOpDisjointXor = 0x1b
  791. const m_PictOpDst = 2
  792. const m_PictOpExclusion = 0x3a
  793. const m_PictOpHSLColor = 0x3d
  794. const m_PictOpHSLHue = 0x3b
  795. const m_PictOpHSLLuminosity = 0x3e
  796. const m_PictOpHSLSaturation = 0x3c
  797. const m_PictOpHardLight = 0x37
  798. const m_PictOpIn = 5
  799. const m_PictOpInReverse = 6
  800. const m_PictOpLighten = 0x34
  801. const m_PictOpMaximum = 13
  802. const m_PictOpMinimum = 0
  803. const m_PictOpMultiply = 0x30
  804. const m_PictOpOut = 7
  805. const m_PictOpOutReverse = 8
  806. const m_PictOpOver = 3
  807. const m_PictOpOverReverse = 4
  808. const m_PictOpOverlay = 0x32
  809. const m_PictOpSaturate = 13
  810. const m_PictOpScreen = 0x31
  811. const m_PictOpSoftLight = 0x38
  812. const m_PictOpSrc = 1
  813. const m_PictOpXor = 11
  814. const m_PictStandardA1 = 4
  815. const m_PictStandardA4 = 3
  816. const m_PictStandardA8 = 2
  817. const m_PictStandardARGB32 = 0
  818. const m_PictStandardNUM = 5
  819. const m_PictStandardRGB24 = 1
  820. const m_PictTypeDirect = 1
  821. const m_PictTypeIndexed = 0
  822. const m_PlaceOnBottom = 1
  823. const m_PlaceOnTop = 0
  824. const m_PointerRoot = 1
  825. const m_PointerWindow = 0
  826. const m_PolyEdgeSharp = 0
  827. const m_PolyEdgeSmooth = 1
  828. const m_PolyModeImprecise = 1
  829. const m_PolyModePrecise = 0
  830. const m_PreferBlanking = 1
  831. const m_PropModeAppend = 2
  832. const m_PropModePrepend = 1
  833. const m_PropModeReplace = 0
  834. const m_PropertyDelete = 1
  835. const m_PropertyNewValue = 0
  836. const m_PropertyNotify = 28
  837. const m_PseudoColor = 3
  838. const m_QueuedAfterFlush = 2
  839. const m_QueuedAfterReading = 1
  840. const m_QueuedAlready = 0
  841. const m_RAND_MAX = 0x7fffffff
  842. const m_RENDER_MAJOR = 0
  843. const m_RENDER_MINOR = 11
  844. const m_RENDER_NAME = "RENDER"
  845. const m_RE_DUP_MAX = 255
  846. const m_RaiseLowest = 0
  847. const m_RectangleIn = 1
  848. const m_RectangleOut = 0
  849. const m_RectanglePart = 2
  850. const m_ReparentNotify = 21
  851. const m_RepeatNone = 0
  852. const m_RepeatNormal = 1
  853. const m_RepeatPad = 2
  854. const m_RepeatReflect = 3
  855. const m_ReplayKeyboard = 5
  856. const m_ReplayPointer = 2
  857. const m_ResizeRequest = 25
  858. const m_RetainPermanent = 1
  859. const m_RetainTemporary = 2
  860. const m_RevertToParent = 2
  861. const m_SCHAR_MAX = 127
  862. const m_SCHED_BATCH = 3
  863. const m_SCHED_DEADLINE = 6
  864. const m_SCHED_FIFO = 1
  865. const m_SCHED_IDLE = 5
  866. const m_SCHED_OTHER = 0
  867. const m_SCHED_RESET_ON_FORK = 0x40000000
  868. const m_SCHED_RR = 2
  869. const m_SEM_NSEMS_MAX = 256
  870. const m_SEM_VALUE_MAX = 0x7fffffff
  871. const m_SHRT_MAX = 0x7fff
  872. const m_SIG_ATOMIC_MAX = "INT32_MAX"
  873. const m_SIG_ATOMIC_MIN = "INT32_MIN"
  874. const m_SIZE_MAX = "UINT64_MAX"
  875. const m_SSIZE_MAX = "LONG_MAX"
  876. const m_STATX_ALL = 0xfff
  877. const m_STATX_ATIME = 0x20
  878. const m_STATX_BASIC_STATS = 0x7ff
  879. const m_STATX_BLOCKS = 0x400
  880. const m_STATX_BTIME = 0x800
  881. const m_STATX_CTIME = 0x80
  882. const m_STATX_GID = 0x10
  883. const m_STATX_INO = 0x100
  884. const m_STATX_MODE = 2
  885. const m_STATX_MTIME = 0x40
  886. const m_STATX_NLINK = 4
  887. const m_STATX_SIZE = 0x200
  888. const m_STATX_TYPE = 1
  889. const m_STATX_UID = 8
  890. const m_STDC_HEADERS = 1
  891. const m_SYMLOOP_MAX = 40
  892. const m_S_IEXEC = "S_IXUSR"
  893. const m_S_IFBLK = 0060000
  894. const m_S_IFCHR = 0020000
  895. const m_S_IFDIR = 0040000
  896. const m_S_IFIFO = 0010000
  897. const m_S_IFLNK = 0120000
  898. const m_S_IFMT = 0170000
  899. const m_S_IFREG = 0100000
  900. const m_S_IFSOCK = 0140000
  901. const m_S_IREAD = "S_IRUSR"
  902. const m_S_IRGRP = 0040
  903. const m_S_IROTH = 0004
  904. const m_S_IRUSR = 0400
  905. const m_S_IRWXG = 0070
  906. const m_S_IRWXO = 0007
  907. const m_S_IRWXU = 0700
  908. const m_S_ISGID = 02000
  909. const m_S_ISUID = 04000
  910. const m_S_ISVTX = 01000
  911. const m_S_IWGRP = 0020
  912. const m_S_IWOTH = 0002
  913. const m_S_IWRITE = "S_IWUSR"
  914. const m_S_IWUSR = 0200
  915. const m_S_IXGRP = 0010
  916. const m_S_IXOTH = 0001
  917. const m_S_IXUSR = 0100
  918. const m_ScreenSaverActive = 1
  919. const m_ScreenSaverReset = 0
  920. const m_SelectionClear = 29
  921. const m_SelectionNotify = 31
  922. const m_SelectionRequest = 30
  923. const m_SetModeDelete = 1
  924. const m_SetModeInsert = 0
  925. const m_ShiftMapIndex = 0
  926. const m_SouthEastGravity = 9
  927. const m_SouthGravity = 8
  928. const m_SouthWestGravity = 7
  929. const m_StaticColor = 2
  930. const m_StaticGravity = 10
  931. const m_StaticGray = 0
  932. const m_Status = "int"
  933. const m_StippleShape = 2
  934. const m_SubPixelHorizontalBGR = 2
  935. const m_SubPixelHorizontalRGB = 1
  936. const m_SubPixelNone = 5
  937. const m_SubPixelUnknown = 0
  938. const m_SubPixelVerticalBGR = 4
  939. const m_SubPixelVerticalRGB = 3
  940. const m_Success = 0
  941. const m_SyncBoth = 7
  942. const m_SyncKeyboard = 4
  943. const m_SyncPointer = 1
  944. const m_T1_MAX_CHARSTRINGS_OPERANDS = 256
  945. const m_T1_MAX_DICT_DEPTH = 5
  946. const m_T1_MAX_SUBRS_CALLS = 16
  947. const m_TIMER_ABSTIME = 1
  948. const m_TIME_UTC = 1
  949. const m_TMP_MAX = 10000
  950. const m_TTY_NAME_MAX = 32
  951. const m_TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES = 1000000
  952. const m_TT_CONFIG_OPTION_SUBPIXEL_HINTING = 2
  953. const m_TZNAME_MAX = 6
  954. const m_TileShape = 1
  955. const m_TopIf = 2
  956. const m_True = 1
  957. const m_TrueColor = 4
  958. const m_UCHAR_MAX = 255
  959. const m_UINT16_MAX = 0xffff
  960. const m_UINT32_MAX = "0xffffffffu"
  961. const m_UINT64_MAX = "0xffffffffffffffffu"
  962. const m_UINT8_MAX = 0xff
  963. const m_UINTMAX_MAX = "UINT64_MAX"
  964. const m_UINTPTR_MAX = "UINT64_MAX"
  965. const m_UINT_FAST16_MAX = "UINT32_MAX"
  966. const m_UINT_FAST32_MAX = "UINT32_MAX"
  967. const m_UINT_FAST64_MAX = "UINT64_MAX"
  968. const m_UINT_FAST8_MAX = "UINT8_MAX"
  969. const m_UINT_LEAST16_MAX = "UINT16_MAX"
  970. const m_UINT_LEAST32_MAX = "UINT32_MAX"
  971. const m_UINT_LEAST64_MAX = "UINT64_MAX"
  972. const m_UINT_LEAST8_MAX = "UINT8_MAX"
  973. const m_UINT_MAX = 0xffffffff
  974. const m_UNLOCKED = 0
  975. const m_USHRT_MAX = 0xffff
  976. const m_UTIME_NOW = 0x3fffffff
  977. const m_UTIME_OMIT = 0x3ffffffe
  978. const m_UnmapGravity = 0
  979. const m_UnmapNotify = 18
  980. const m_Unsorted = 0
  981. const m_VERSION = "2.3.6"
  982. const m_VisibilityFullyObscured = 2
  983. const m_VisibilityNotify = 15
  984. const m_VisibilityPartiallyObscured = 1
  985. const m_VisibilityUnobscured = 0
  986. const m_VisualAllMask = 0x1FF
  987. const m_VisualBitsPerRGBMask = 0x100
  988. const m_VisualBlueMaskMask = 0x40
  989. const m_VisualClassMask = 0x8
  990. const m_VisualColormapSizeMask = 0x80
  991. const m_VisualDepthMask = 0x4
  992. const m_VisualGreenMaskMask = 0x20
  993. const m_VisualIDMask = 0x1
  994. const m_VisualNoMask = 0x0
  995. const m_VisualRedMaskMask = 0x10
  996. const m_VisualScreenMask = 0x2
  997. const m_WINT_MAX = "UINT32_MAX"
  998. const m_WINT_MIN = 0
  999. const m_WLNSPERBATCH = 50
  1000. const m_WNOHANG = 1
  1001. const m_WORD_BIT = 32
  1002. const m_WRCTSPERBATCH = 10
  1003. const m_WUNTRACED = 2
  1004. const m_WestGravity = 4
  1005. const m_WhenMapped = 1
  1006. const m_WidthValue = 0x0004
  1007. const m_WindingRule = 1
  1008. const m_WithdrawnState = 0
  1009. const m_XCNOENT = 2
  1010. const m_XCNOMEM = 1
  1011. const m_XCSUCCESS = 0
  1012. const m_XFT_ASSUME_PIXMAP = 20
  1013. const m_XFT_CORE = "core"
  1014. const m_XFT_DBG_CACHE = 128
  1015. const m_XFT_DBG_CACHEV = 256
  1016. const m_XFT_DBG_DRAW = 8
  1017. const m_XFT_DBG_GLYPH = 32
  1018. const m_XFT_DBG_GLYPHV = 64
  1019. const m_XFT_DBG_MEMORY = 512
  1020. const m_XFT_DBG_OPEN = 1
  1021. const m_XFT_DBG_OPENV = 2
  1022. const m_XFT_DBG_REF = 16
  1023. const m_XFT_DBG_RENDER = 4
  1024. const m_XFT_DBG_USAGE = 1024
  1025. const m_XFT_DPY_MAX_UNREF_FONTS = 16
  1026. const m_XFT_MAJOR = 2
  1027. const m_XFT_MAX_GLYPH_MEMORY = "maxglyphmemory"
  1028. const m_XFT_MAX_UNREF_FONTS = "maxunreffonts"
  1029. const m_XFT_MINOR = 3
  1030. const m_XFT_NMISSING = 256
  1031. const m_XFT_NUM_FONT_HASH = 127
  1032. const m_XFT_NUM_SOLID_COLOR = 16
  1033. const m_XFT_RENDER = "render"
  1034. const m_XFT_REVISION = 6
  1035. const m_XFT_TRACK_MEM_USAGE = "trackmemusage"
  1036. const m_XFT_XLFD = "xlfd"
  1037. const m_XIMHotKeyStateOFF = 0x0002
  1038. const m_XIMHotKeyStateON = 0x0001
  1039. const m_XIMInitialState = 1
  1040. const m_XIMPreeditArea = 0x0001
  1041. const m_XIMPreeditCallbacks = 0x0002
  1042. const m_XIMPreeditEnable = 1
  1043. const m_XIMPreeditNone = 0x0010
  1044. const m_XIMPreeditNothing = 0x0008
  1045. const m_XIMPreeditPosition = 0x0004
  1046. const m_XIMPreeditUnKnown = 0
  1047. const m_XIMReverse = 1
  1048. const m_XIMStatusArea = 0x0100
  1049. const m_XIMStatusCallbacks = 0x0200
  1050. const m_XIMStatusNone = 0x0800
  1051. const m_XIMStatusNothing = 0x0400
  1052. const m_XIMStringConversionBottomEdge = 0x00000008
  1053. const m_XIMStringConversionBuffer = 0x0001
  1054. const m_XIMStringConversionChar = 0x0004
  1055. const m_XIMStringConversionConcealed = 0x00000010
  1056. const m_XIMStringConversionLeftEdge = 0x00000001
  1057. const m_XIMStringConversionLine = 0x0002
  1058. const m_XIMStringConversionRetrieval = 0x0002
  1059. const m_XIMStringConversionRightEdge = 0x00000002
  1060. const m_XIMStringConversionSubstitution = 0x0001
  1061. const m_XIMStringConversionTopEdge = 0x00000004
  1062. const m_XIMStringConversionWord = 0x0003
  1063. const m_XIMStringConversionWrapped = 0x00000020
  1064. const m_XK_0 = 0x0030
  1065. const m_XK_1 = 0x0031
  1066. const m_XK_2 = 0x0032
  1067. const m_XK_3 = 0x0033
  1068. const m_XK_4 = 0x0034
  1069. const m_XK_5 = 0x0035
  1070. const m_XK_6 = 0x0036
  1071. const m_XK_7 = 0x0037
  1072. const m_XK_8 = 0x0038
  1073. const m_XK_9 = 0x0039
  1074. const m_XK_A = 0x0041
  1075. const m_XK_AE = 0x00c6
  1076. const m_XK_Aacute = 0x00c1
  1077. const m_XK_Abelowdot = 0x1001ea0
  1078. const m_XK_Abreve = 0x01c3
  1079. const m_XK_Abreveacute = 0x1001eae
  1080. const m_XK_Abrevebelowdot = 0x1001eb6
  1081. const m_XK_Abrevegrave = 0x1001eb0
  1082. const m_XK_Abrevehook = 0x1001eb2
  1083. const m_XK_Abrevetilde = 0x1001eb4
  1084. const m_XK_AccessX_Enable = 0xfe70
  1085. const m_XK_AccessX_Feedback_Enable = 0xfe71
  1086. const m_XK_Acircumflex = 0x00c2
  1087. const m_XK_Acircumflexacute = 0x1001ea4
  1088. const m_XK_Acircumflexbelowdot = 0x1001eac
  1089. const m_XK_Acircumflexgrave = 0x1001ea6
  1090. const m_XK_Acircumflexhook = 0x1001ea8
  1091. const m_XK_Acircumflextilde = 0x1001eaa
  1092. const m_XK_Adiaeresis = 0x00c4
  1093. const m_XK_Agrave = 0x00c0
  1094. const m_XK_Ahook = 0x1001ea2
  1095. const m_XK_Alt_L = 0xffe9
  1096. const m_XK_Alt_R = 0xffea
  1097. const m_XK_Amacron = 0x03c0
  1098. const m_XK_Aogonek = 0x01a1
  1099. const m_XK_Arabic_0 = 0x1000660
  1100. const m_XK_Arabic_1 = 0x1000661
  1101. const m_XK_Arabic_2 = 0x1000662
  1102. const m_XK_Arabic_3 = 0x1000663
  1103. const m_XK_Arabic_4 = 0x1000664
  1104. const m_XK_Arabic_5 = 0x1000665
  1105. const m_XK_Arabic_6 = 0x1000666
  1106. const m_XK_Arabic_7 = 0x1000667
  1107. const m_XK_Arabic_8 = 0x1000668
  1108. const m_XK_Arabic_9 = 0x1000669
  1109. const m_XK_Arabic_ain = 0x05d9
  1110. const m_XK_Arabic_alef = 0x05c7
  1111. const m_XK_Arabic_alefmaksura = 0x05e9
  1112. const m_XK_Arabic_beh = 0x05c8
  1113. const m_XK_Arabic_comma = 0x05ac
  1114. const m_XK_Arabic_dad = 0x05d6
  1115. const m_XK_Arabic_dal = 0x05cf
  1116. const m_XK_Arabic_damma = 0x05ef
  1117. const m_XK_Arabic_dammatan = 0x05ec
  1118. const m_XK_Arabic_ddal = 0x1000688
  1119. const m_XK_Arabic_farsi_yeh = 0x10006cc
  1120. const m_XK_Arabic_fatha = 0x05ee
  1121. const m_XK_Arabic_fathatan = 0x05eb
  1122. const m_XK_Arabic_feh = 0x05e1
  1123. const m_XK_Arabic_fullstop = 0x10006d4
  1124. const m_XK_Arabic_gaf = 0x10006af
  1125. const m_XK_Arabic_ghain = 0x05da
  1126. const m_XK_Arabic_ha = 0x05e7
  1127. const m_XK_Arabic_hah = 0x05cd
  1128. const m_XK_Arabic_hamza = 0x05c1
  1129. const m_XK_Arabic_hamza_above = 0x1000654
  1130. const m_XK_Arabic_hamza_below = 0x1000655
  1131. const m_XK_Arabic_hamzaonalef = 0x05c3
  1132. const m_XK_Arabic_hamzaonwaw = 0x05c4
  1133. const m_XK_Arabic_hamzaonyeh = 0x05c6
  1134. const m_XK_Arabic_hamzaunderalef = 0x05c5
  1135. const m_XK_Arabic_heh = 0x05e7
  1136. const m_XK_Arabic_heh_doachashmee = 0x10006be
  1137. const m_XK_Arabic_heh_goal = 0x10006c1
  1138. const m_XK_Arabic_jeem = 0x05cc
  1139. const m_XK_Arabic_jeh = 0x1000698
  1140. const m_XK_Arabic_kaf = 0x05e3
  1141. const m_XK_Arabic_kasra = 0x05f0
  1142. const m_XK_Arabic_kasratan = 0x05ed
  1143. const m_XK_Arabic_keheh = 0x10006a9
  1144. const m_XK_Arabic_khah = 0x05ce
  1145. const m_XK_Arabic_lam = 0x05e4
  1146. const m_XK_Arabic_madda_above = 0x1000653
  1147. const m_XK_Arabic_maddaonalef = 0x05c2
  1148. const m_XK_Arabic_meem = 0x05e5
  1149. const m_XK_Arabic_noon = 0x05e6
  1150. const m_XK_Arabic_noon_ghunna = 0x10006ba
  1151. const m_XK_Arabic_peh = 0x100067e
  1152. const m_XK_Arabic_percent = 0x100066a
  1153. const m_XK_Arabic_qaf = 0x05e2
  1154. const m_XK_Arabic_question_mark = 0x05bf
  1155. const m_XK_Arabic_ra = 0x05d1
  1156. const m_XK_Arabic_rreh = 0x1000691
  1157. const m_XK_Arabic_sad = 0x05d5
  1158. const m_XK_Arabic_seen = 0x05d3
  1159. const m_XK_Arabic_semicolon = 0x05bb
  1160. const m_XK_Arabic_shadda = 0x05f1
  1161. const m_XK_Arabic_sheen = 0x05d4
  1162. const m_XK_Arabic_sukun = 0x05f2
  1163. const m_XK_Arabic_superscript_alef = 0x1000670
  1164. const m_XK_Arabic_switch = 0xff7e
  1165. const m_XK_Arabic_tah = 0x05d7
  1166. const m_XK_Arabic_tatweel = 0x05e0
  1167. const m_XK_Arabic_tcheh = 0x1000686
  1168. const m_XK_Arabic_teh = 0x05ca
  1169. const m_XK_Arabic_tehmarbuta = 0x05c9
  1170. const m_XK_Arabic_thal = 0x05d0
  1171. const m_XK_Arabic_theh = 0x05cb
  1172. const m_XK_Arabic_tteh = 0x1000679
  1173. const m_XK_Arabic_veh = 0x10006a4
  1174. const m_XK_Arabic_waw = 0x05e8
  1175. const m_XK_Arabic_yeh = 0x05ea
  1176. const m_XK_Arabic_yeh_baree = 0x10006d2
  1177. const m_XK_Arabic_zah = 0x05d8
  1178. const m_XK_Arabic_zain = 0x05d2
  1179. const m_XK_Aring = 0x00c5
  1180. const m_XK_Armenian_AT = 0x1000538
  1181. const m_XK_Armenian_AYB = 0x1000531
  1182. const m_XK_Armenian_BEN = 0x1000532
  1183. const m_XK_Armenian_CHA = 0x1000549
  1184. const m_XK_Armenian_DA = 0x1000534
  1185. const m_XK_Armenian_DZA = 0x1000541
  1186. const m_XK_Armenian_E = 0x1000537
  1187. const m_XK_Armenian_FE = 0x1000556
  1188. const m_XK_Armenian_GHAT = 0x1000542
  1189. const m_XK_Armenian_GIM = 0x1000533
  1190. const m_XK_Armenian_HI = 0x1000545
  1191. const m_XK_Armenian_HO = 0x1000540
  1192. const m_XK_Armenian_INI = 0x100053b
  1193. const m_XK_Armenian_JE = 0x100054b
  1194. const m_XK_Armenian_KE = 0x1000554
  1195. const m_XK_Armenian_KEN = 0x100053f
  1196. const m_XK_Armenian_KHE = 0x100053d
  1197. const m_XK_Armenian_LYUN = 0x100053c
  1198. const m_XK_Armenian_MEN = 0x1000544
  1199. const m_XK_Armenian_NU = 0x1000546
  1200. const m_XK_Armenian_O = 0x1000555
  1201. const m_XK_Armenian_PE = 0x100054a
  1202. const m_XK_Armenian_PYUR = 0x1000553
  1203. const m_XK_Armenian_RA = 0x100054c
  1204. const m_XK_Armenian_RE = 0x1000550
  1205. const m_XK_Armenian_SE = 0x100054d
  1206. const m_XK_Armenian_SHA = 0x1000547
  1207. const m_XK_Armenian_TCHE = 0x1000543
  1208. const m_XK_Armenian_TO = 0x1000539
  1209. const m_XK_Armenian_TSA = 0x100053e
  1210. const m_XK_Armenian_TSO = 0x1000551
  1211. const m_XK_Armenian_TYUN = 0x100054f
  1212. const m_XK_Armenian_VEV = 0x100054e
  1213. const m_XK_Armenian_VO = 0x1000548
  1214. const m_XK_Armenian_VYUN = 0x1000552
  1215. const m_XK_Armenian_YECH = 0x1000535
  1216. const m_XK_Armenian_ZA = 0x1000536
  1217. const m_XK_Armenian_ZHE = 0x100053a
  1218. const m_XK_Armenian_accent = 0x100055b
  1219. const m_XK_Armenian_amanak = 0x100055c
  1220. const m_XK_Armenian_apostrophe = 0x100055a
  1221. const m_XK_Armenian_at = 0x1000568
  1222. const m_XK_Armenian_ayb = 0x1000561
  1223. const m_XK_Armenian_ben = 0x1000562
  1224. const m_XK_Armenian_but = 0x100055d
  1225. const m_XK_Armenian_cha = 0x1000579
  1226. const m_XK_Armenian_da = 0x1000564
  1227. const m_XK_Armenian_dza = 0x1000571
  1228. const m_XK_Armenian_e = 0x1000567
  1229. const m_XK_Armenian_exclam = 0x100055c
  1230. const m_XK_Armenian_fe = 0x1000586
  1231. const m_XK_Armenian_full_stop = 0x1000589
  1232. const m_XK_Armenian_ghat = 0x1000572
  1233. const m_XK_Armenian_gim = 0x1000563
  1234. const m_XK_Armenian_hi = 0x1000575
  1235. const m_XK_Armenian_ho = 0x1000570
  1236. const m_XK_Armenian_hyphen = 0x100058a
  1237. const m_XK_Armenian_ini = 0x100056b
  1238. const m_XK_Armenian_je = 0x100057b
  1239. const m_XK_Armenian_ke = 0x1000584
  1240. const m_XK_Armenian_ken = 0x100056f
  1241. const m_XK_Armenian_khe = 0x100056d
  1242. const m_XK_Armenian_ligature_ew = 0x1000587
  1243. const m_XK_Armenian_lyun = 0x100056c
  1244. const m_XK_Armenian_men = 0x1000574
  1245. const m_XK_Armenian_nu = 0x1000576
  1246. const m_XK_Armenian_o = 0x1000585
  1247. const m_XK_Armenian_paruyk = 0x100055e
  1248. const m_XK_Armenian_pe = 0x100057a
  1249. const m_XK_Armenian_pyur = 0x1000583
  1250. const m_XK_Armenian_question = 0x100055e
  1251. const m_XK_Armenian_ra = 0x100057c
  1252. const m_XK_Armenian_re = 0x1000580
  1253. const m_XK_Armenian_se = 0x100057d
  1254. const m_XK_Armenian_separation_mark = 0x100055d
  1255. const m_XK_Armenian_sha = 0x1000577
  1256. const m_XK_Armenian_shesht = 0x100055b
  1257. const m_XK_Armenian_tche = 0x1000573
  1258. const m_XK_Armenian_to = 0x1000569
  1259. const m_XK_Armenian_tsa = 0x100056e
  1260. const m_XK_Armenian_tso = 0x1000581
  1261. const m_XK_Armenian_tyun = 0x100057f
  1262. const m_XK_Armenian_verjaket = 0x1000589
  1263. const m_XK_Armenian_vev = 0x100057e
  1264. const m_XK_Armenian_vo = 0x1000578
  1265. const m_XK_Armenian_vyun = 0x1000582
  1266. const m_XK_Armenian_yech = 0x1000565
  1267. const m_XK_Armenian_yentamna = 0x100058a
  1268. const m_XK_Armenian_za = 0x1000566
  1269. const m_XK_Armenian_zhe = 0x100056a
  1270. const m_XK_Atilde = 0x00c3
  1271. const m_XK_AudibleBell_Enable = 0xfe7a
  1272. const m_XK_B = 0x0042
  1273. const m_XK_Babovedot = 0x1001e02
  1274. const m_XK_BackSpace = 0xff08
  1275. const m_XK_Begin = 0xff58
  1276. const m_XK_BounceKeys_Enable = 0xfe74
  1277. const m_XK_Break = 0xff6b
  1278. const m_XK_Byelorussian_SHORTU = 0x06be
  1279. const m_XK_Byelorussian_shortu = 0x06ae
  1280. const m_XK_C = 0x0043
  1281. const m_XK_CH = 0xfea2
  1282. const m_XK_C_H = 0xfea5
  1283. const m_XK_C_h = 0xfea4
  1284. const m_XK_Cabovedot = 0x02c5
  1285. const m_XK_Cacute = 0x01c6
  1286. const m_XK_Cancel = 0xff69
  1287. const m_XK_Caps_Lock = 0xffe5
  1288. const m_XK_Ccaron = 0x01c8
  1289. const m_XK_Ccedilla = 0x00c7
  1290. const m_XK_Ccircumflex = 0x02c6
  1291. const m_XK_Ch = 0xfea1
  1292. const m_XK_Clear = 0xff0b
  1293. const m_XK_Codeinput = 0xff37
  1294. const m_XK_ColonSign = 0x10020a1
  1295. const m_XK_Control_L = 0xffe3
  1296. const m_XK_Control_R = 0xffe4
  1297. const m_XK_CruzeiroSign = 0x10020a2
  1298. const m_XK_Cyrillic_A = 0x06e1
  1299. const m_XK_Cyrillic_BE = 0x06e2
  1300. const m_XK_Cyrillic_CHE = 0x06fe
  1301. const m_XK_Cyrillic_CHE_descender = 0x10004b6
  1302. const m_XK_Cyrillic_CHE_vertstroke = 0x10004b8
  1303. const m_XK_Cyrillic_DE = 0x06e4
  1304. const m_XK_Cyrillic_DZHE = 0x06bf
  1305. const m_XK_Cyrillic_E = 0x06fc
  1306. const m_XK_Cyrillic_EF = 0x06e6
  1307. const m_XK_Cyrillic_EL = 0x06ec
  1308. const m_XK_Cyrillic_EM = 0x06ed
  1309. const m_XK_Cyrillic_EN = 0x06ee
  1310. const m_XK_Cyrillic_EN_descender = 0x10004a2
  1311. const m_XK_Cyrillic_ER = 0x06f2
  1312. const m_XK_Cyrillic_ES = 0x06f3
  1313. const m_XK_Cyrillic_GHE = 0x06e7
  1314. const m_XK_Cyrillic_GHE_bar = 0x1000492
  1315. const m_XK_Cyrillic_HA = 0x06e8
  1316. const m_XK_Cyrillic_HARDSIGN = 0x06ff
  1317. const m_XK_Cyrillic_HA_descender = 0x10004b2
  1318. const m_XK_Cyrillic_I = 0x06e9
  1319. const m_XK_Cyrillic_IE = 0x06e5
  1320. const m_XK_Cyrillic_IO = 0x06b3
  1321. const m_XK_Cyrillic_I_macron = 0x10004e2
  1322. const m_XK_Cyrillic_JE = 0x06b8
  1323. const m_XK_Cyrillic_KA = 0x06eb
  1324. const m_XK_Cyrillic_KA_descender = 0x100049a
  1325. const m_XK_Cyrillic_KA_vertstroke = 0x100049c
  1326. const m_XK_Cyrillic_LJE = 0x06b9
  1327. const m_XK_Cyrillic_NJE = 0x06ba
  1328. const m_XK_Cyrillic_O = 0x06ef
  1329. const m_XK_Cyrillic_O_bar = 0x10004e8
  1330. const m_XK_Cyrillic_PE = 0x06f0
  1331. const m_XK_Cyrillic_SCHWA = 0x10004d8
  1332. const m_XK_Cyrillic_SHA = 0x06fb
  1333. const m_XK_Cyrillic_SHCHA = 0x06fd
  1334. const m_XK_Cyrillic_SHHA = 0x10004ba
  1335. const m_XK_Cyrillic_SHORTI = 0x06ea
  1336. const m_XK_Cyrillic_SOFTSIGN = 0x06f8
  1337. const m_XK_Cyrillic_TE = 0x06f4
  1338. const m_XK_Cyrillic_TSE = 0x06e3
  1339. const m_XK_Cyrillic_U = 0x06f5
  1340. const m_XK_Cyrillic_U_macron = 0x10004ee
  1341. const m_XK_Cyrillic_U_straight = 0x10004ae
  1342. const m_XK_Cyrillic_U_straight_bar = 0x10004b0
  1343. const m_XK_Cyrillic_VE = 0x06f7
  1344. const m_XK_Cyrillic_YA = 0x06f1
  1345. const m_XK_Cyrillic_YERU = 0x06f9
  1346. const m_XK_Cyrillic_YU = 0x06e0
  1347. const m_XK_Cyrillic_ZE = 0x06fa
  1348. const m_XK_Cyrillic_ZHE = 0x06f6
  1349. const m_XK_Cyrillic_ZHE_descender = 0x1000496
  1350. const m_XK_Cyrillic_a = 0x06c1
  1351. const m_XK_Cyrillic_be = 0x06c2
  1352. const m_XK_Cyrillic_che = 0x06de
  1353. const m_XK_Cyrillic_che_descender = 0x10004b7
  1354. const m_XK_Cyrillic_che_vertstroke = 0x10004b9
  1355. const m_XK_Cyrillic_de = 0x06c4
  1356. const m_XK_Cyrillic_dzhe = 0x06af
  1357. const m_XK_Cyrillic_e = 0x06dc
  1358. const m_XK_Cyrillic_ef = 0x06c6
  1359. const m_XK_Cyrillic_el = 0x06cc
  1360. const m_XK_Cyrillic_em = 0x06cd
  1361. const m_XK_Cyrillic_en = 0x06ce
  1362. const m_XK_Cyrillic_en_descender = 0x10004a3
  1363. const m_XK_Cyrillic_er = 0x06d2
  1364. const m_XK_Cyrillic_es = 0x06d3
  1365. const m_XK_Cyrillic_ghe = 0x06c7
  1366. const m_XK_Cyrillic_ghe_bar = 0x1000493
  1367. const m_XK_Cyrillic_ha = 0x06c8
  1368. const m_XK_Cyrillic_ha_descender = 0x10004b3
  1369. const m_XK_Cyrillic_hardsign = 0x06df
  1370. const m_XK_Cyrillic_i = 0x06c9
  1371. const m_XK_Cyrillic_i_macron = 0x10004e3
  1372. const m_XK_Cyrillic_ie = 0x06c5
  1373. const m_XK_Cyrillic_io = 0x06a3
  1374. const m_XK_Cyrillic_je = 0x06a8
  1375. const m_XK_Cyrillic_ka = 0x06cb
  1376. const m_XK_Cyrillic_ka_descender = 0x100049b
  1377. const m_XK_Cyrillic_ka_vertstroke = 0x100049d
  1378. const m_XK_Cyrillic_lje = 0x06a9
  1379. const m_XK_Cyrillic_nje = 0x06aa
  1380. const m_XK_Cyrillic_o = 0x06cf
  1381. const m_XK_Cyrillic_o_bar = 0x10004e9
  1382. const m_XK_Cyrillic_pe = 0x06d0
  1383. const m_XK_Cyrillic_schwa = 0x10004d9
  1384. const m_XK_Cyrillic_sha = 0x06db
  1385. const m_XK_Cyrillic_shcha = 0x06dd
  1386. const m_XK_Cyrillic_shha = 0x10004bb
  1387. const m_XK_Cyrillic_shorti = 0x06ca
  1388. const m_XK_Cyrillic_softsign = 0x06d8
  1389. const m_XK_Cyrillic_te = 0x06d4
  1390. const m_XK_Cyrillic_tse = 0x06c3
  1391. const m_XK_Cyrillic_u = 0x06d5
  1392. const m_XK_Cyrillic_u_macron = 0x10004ef
  1393. const m_XK_Cyrillic_u_straight = 0x10004af
  1394. const m_XK_Cyrillic_u_straight_bar = 0x10004b1
  1395. const m_XK_Cyrillic_ve = 0x06d7
  1396. const m_XK_Cyrillic_ya = 0x06d1
  1397. const m_XK_Cyrillic_yeru = 0x06d9
  1398. const m_XK_Cyrillic_yu = 0x06c0
  1399. const m_XK_Cyrillic_ze = 0x06da
  1400. const m_XK_Cyrillic_zhe = 0x06d6
  1401. const m_XK_Cyrillic_zhe_descender = 0x1000497
  1402. const m_XK_D = 0x0044
  1403. const m_XK_Dabovedot = 0x1001e0a
  1404. const m_XK_Dcaron = 0x01cf
  1405. const m_XK_Delete = 0xffff
  1406. const m_XK_DongSign = 0x10020ab
  1407. const m_XK_Down = 0xff54
  1408. const m_XK_Dstroke = 0x01d0
  1409. const m_XK_E = 0x0045
  1410. const m_XK_ENG = 0x03bd
  1411. const m_XK_ETH = 0x00d0
  1412. const m_XK_EZH = 0x10001b7
  1413. const m_XK_Eabovedot = 0x03cc
  1414. const m_XK_Eacute = 0x00c9
  1415. const m_XK_Ebelowdot = 0x1001eb8
  1416. const m_XK_Ecaron = 0x01cc
  1417. const m_XK_Ecircumflex = 0x00ca
  1418. const m_XK_Ecircumflexacute = 0x1001ebe
  1419. const m_XK_Ecircumflexbelowdot = 0x1001ec6
  1420. const m_XK_Ecircumflexgrave = 0x1001ec0
  1421. const m_XK_Ecircumflexhook = 0x1001ec2
  1422. const m_XK_Ecircumflextilde = 0x1001ec4
  1423. const m_XK_EcuSign = 0x10020a0
  1424. const m_XK_Ediaeresis = 0x00cb
  1425. const m_XK_Egrave = 0x00c8
  1426. const m_XK_Ehook = 0x1001eba
  1427. const m_XK_Eisu_Shift = 0xff2f
  1428. const m_XK_Eisu_toggle = 0xff30
  1429. const m_XK_Emacron = 0x03aa
  1430. const m_XK_End = 0xff57
  1431. const m_XK_Eogonek = 0x01ca
  1432. const m_XK_Escape = 0xff1b
  1433. const m_XK_Eth = 0x00d0
  1434. const m_XK_Etilde = 0x1001ebc
  1435. const m_XK_EuroSign = 0x20ac
  1436. const m_XK_Execute = 0xff62
  1437. const m_XK_F = 0x0046
  1438. const m_XK_F1 = 0xffbe
  1439. const m_XK_F10 = 0xffc7
  1440. const m_XK_F11 = 0xffc8
  1441. const m_XK_F12 = 0xffc9
  1442. const m_XK_F13 = 0xffca
  1443. const m_XK_F14 = 0xffcb
  1444. const m_XK_F15 = 0xffcc
  1445. const m_XK_F16 = 0xffcd
  1446. const m_XK_F17 = 0xffce
  1447. const m_XK_F18 = 0xffcf
  1448. const m_XK_F19 = 0xffd0
  1449. const m_XK_F2 = 0xffbf
  1450. const m_XK_F20 = 0xffd1
  1451. const m_XK_F21 = 0xffd2
  1452. const m_XK_F22 = 0xffd3
  1453. const m_XK_F23 = 0xffd4
  1454. const m_XK_F24 = 0xffd5
  1455. const m_XK_F25 = 0xffd6
  1456. const m_XK_F26 = 0xffd7
  1457. const m_XK_F27 = 0xffd8
  1458. const m_XK_F28 = 0xffd9
  1459. const m_XK_F29 = 0xffda
  1460. const m_XK_F3 = 0xffc0
  1461. const m_XK_F30 = 0xffdb
  1462. const m_XK_F31 = 0xffdc
  1463. const m_XK_F32 = 0xffdd
  1464. const m_XK_F33 = 0xffde
  1465. const m_XK_F34 = 0xffdf
  1466. const m_XK_F35 = 0xffe0
  1467. const m_XK_F4 = 0xffc1
  1468. const m_XK_F5 = 0xffc2
  1469. const m_XK_F6 = 0xffc3
  1470. const m_XK_F7 = 0xffc4
  1471. const m_XK_F8 = 0xffc5
  1472. const m_XK_F9 = 0xffc6
  1473. const m_XK_FFrancSign = 0x10020a3
  1474. const m_XK_Fabovedot = 0x1001e1e
  1475. const m_XK_Farsi_0 = 0x10006f0
  1476. const m_XK_Farsi_1 = 0x10006f1
  1477. const m_XK_Farsi_2 = 0x10006f2
  1478. const m_XK_Farsi_3 = 0x10006f3
  1479. const m_XK_Farsi_4 = 0x10006f4
  1480. const m_XK_Farsi_5 = 0x10006f5
  1481. const m_XK_Farsi_6 = 0x10006f6
  1482. const m_XK_Farsi_7 = 0x10006f7
  1483. const m_XK_Farsi_8 = 0x10006f8
  1484. const m_XK_Farsi_9 = 0x10006f9
  1485. const m_XK_Farsi_yeh = 0x10006cc
  1486. const m_XK_Find = 0xff68
  1487. const m_XK_First_Virtual_Screen = 0xfed0
  1488. const m_XK_G = 0x0047
  1489. const m_XK_Gabovedot = 0x02d5
  1490. const m_XK_Gbreve = 0x02ab
  1491. const m_XK_Gcaron = 0x10001e6
  1492. const m_XK_Gcedilla = 0x03ab
  1493. const m_XK_Gcircumflex = 0x02d8
  1494. const m_XK_Georgian_an = 0x10010d0
  1495. const m_XK_Georgian_ban = 0x10010d1
  1496. const m_XK_Georgian_can = 0x10010ea
  1497. const m_XK_Georgian_char = 0x10010ed
  1498. const m_XK_Georgian_chin = 0x10010e9
  1499. const m_XK_Georgian_cil = 0x10010ec
  1500. const m_XK_Georgian_don = 0x10010d3
  1501. const m_XK_Georgian_en = 0x10010d4
  1502. const m_XK_Georgian_fi = 0x10010f6
  1503. const m_XK_Georgian_gan = 0x10010d2
  1504. const m_XK_Georgian_ghan = 0x10010e6
  1505. const m_XK_Georgian_hae = 0x10010f0
  1506. const m_XK_Georgian_har = 0x10010f4
  1507. const m_XK_Georgian_he = 0x10010f1
  1508. const m_XK_Georgian_hie = 0x10010f2
  1509. const m_XK_Georgian_hoe = 0x10010f5
  1510. const m_XK_Georgian_in = 0x10010d8
  1511. const m_XK_Georgian_jhan = 0x10010ef
  1512. const m_XK_Georgian_jil = 0x10010eb
  1513. const m_XK_Georgian_kan = 0x10010d9
  1514. const m_XK_Georgian_khar = 0x10010e5
  1515. const m_XK_Georgian_las = 0x10010da
  1516. const m_XK_Georgian_man = 0x10010db
  1517. const m_XK_Georgian_nar = 0x10010dc
  1518. const m_XK_Georgian_on = 0x10010dd
  1519. const m_XK_Georgian_par = 0x10010de
  1520. const m_XK_Georgian_phar = 0x10010e4
  1521. const m_XK_Georgian_qar = 0x10010e7
  1522. const m_XK_Georgian_rae = 0x10010e0
  1523. const m_XK_Georgian_san = 0x10010e1
  1524. const m_XK_Georgian_shin = 0x10010e8
  1525. const m_XK_Georgian_tan = 0x10010d7
  1526. const m_XK_Georgian_tar = 0x10010e2
  1527. const m_XK_Georgian_un = 0x10010e3
  1528. const m_XK_Georgian_vin = 0x10010d5
  1529. const m_XK_Georgian_we = 0x10010f3
  1530. const m_XK_Georgian_xan = 0x10010ee
  1531. const m_XK_Georgian_zen = 0x10010d6
  1532. const m_XK_Georgian_zhar = 0x10010df
  1533. const m_XK_Greek_ALPHA = 0x07c1
  1534. const m_XK_Greek_ALPHAaccent = 0x07a1
  1535. const m_XK_Greek_BETA = 0x07c2
  1536. const m_XK_Greek_CHI = 0x07d7
  1537. const m_XK_Greek_DELTA = 0x07c4
  1538. const m_XK_Greek_EPSILON = 0x07c5
  1539. const m_XK_Greek_EPSILONaccent = 0x07a2
  1540. const m_XK_Greek_ETA = 0x07c7
  1541. const m_XK_Greek_ETAaccent = 0x07a3
  1542. const m_XK_Greek_GAMMA = 0x07c3
  1543. const m_XK_Greek_IOTA = 0x07c9
  1544. const m_XK_Greek_IOTAaccent = 0x07a4
  1545. const m_XK_Greek_IOTAdiaeresis = 0x07a5
  1546. const m_XK_Greek_IOTAdieresis = 0x07a5
  1547. const m_XK_Greek_KAPPA = 0x07ca
  1548. const m_XK_Greek_LAMBDA = 0x07cb
  1549. const m_XK_Greek_LAMDA = 0x07cb
  1550. const m_XK_Greek_MU = 0x07cc
  1551. const m_XK_Greek_NU = 0x07cd
  1552. const m_XK_Greek_OMEGA = 0x07d9
  1553. const m_XK_Greek_OMEGAaccent = 0x07ab
  1554. const m_XK_Greek_OMICRON = 0x07cf
  1555. const m_XK_Greek_OMICRONaccent = 0x07a7
  1556. const m_XK_Greek_PHI = 0x07d6
  1557. const m_XK_Greek_PI = 0x07d0
  1558. const m_XK_Greek_PSI = 0x07d8
  1559. const m_XK_Greek_RHO = 0x07d1
  1560. const m_XK_Greek_SIGMA = 0x07d2
  1561. const m_XK_Greek_TAU = 0x07d4
  1562. const m_XK_Greek_THETA = 0x07c8
  1563. const m_XK_Greek_UPSILON = 0x07d5
  1564. const m_XK_Greek_UPSILONaccent = 0x07a8
  1565. const m_XK_Greek_UPSILONdieresis = 0x07a9
  1566. const m_XK_Greek_XI = 0x07ce
  1567. const m_XK_Greek_ZETA = 0x07c6
  1568. const m_XK_Greek_accentdieresis = 0x07ae
  1569. const m_XK_Greek_alpha = 0x07e1
  1570. const m_XK_Greek_alphaaccent = 0x07b1
  1571. const m_XK_Greek_beta = 0x07e2
  1572. const m_XK_Greek_chi = 0x07f7
  1573. const m_XK_Greek_delta = 0x07e4
  1574. const m_XK_Greek_epsilon = 0x07e5
  1575. const m_XK_Greek_epsilonaccent = 0x07b2
  1576. const m_XK_Greek_eta = 0x07e7
  1577. const m_XK_Greek_etaaccent = 0x07b3
  1578. const m_XK_Greek_finalsmallsigma = 0x07f3
  1579. const m_XK_Greek_gamma = 0x07e3
  1580. const m_XK_Greek_horizbar = 0x07af
  1581. const m_XK_Greek_iota = 0x07e9
  1582. const m_XK_Greek_iotaaccent = 0x07b4
  1583. const m_XK_Greek_iotaaccentdieresis = 0x07b6
  1584. const m_XK_Greek_iotadieresis = 0x07b5
  1585. const m_XK_Greek_kappa = 0x07ea
  1586. const m_XK_Greek_lambda = 0x07eb
  1587. const m_XK_Greek_lamda = 0x07eb
  1588. const m_XK_Greek_mu = 0x07ec
  1589. const m_XK_Greek_nu = 0x07ed
  1590. const m_XK_Greek_omega = 0x07f9
  1591. const m_XK_Greek_omegaaccent = 0x07bb
  1592. const m_XK_Greek_omicron = 0x07ef
  1593. const m_XK_Greek_omicronaccent = 0x07b7
  1594. const m_XK_Greek_phi = 0x07f6
  1595. const m_XK_Greek_pi = 0x07f0
  1596. const m_XK_Greek_psi = 0x07f8
  1597. const m_XK_Greek_rho = 0x07f1
  1598. const m_XK_Greek_sigma = 0x07f2
  1599. const m_XK_Greek_switch = 0xff7e
  1600. const m_XK_Greek_tau = 0x07f4
  1601. const m_XK_Greek_theta = 0x07e8
  1602. const m_XK_Greek_upsilon = 0x07f5
  1603. const m_XK_Greek_upsilonaccent = 0x07b8
  1604. const m_XK_Greek_upsilonaccentdieresis = 0x07ba
  1605. const m_XK_Greek_upsilondieresis = 0x07b9
  1606. const m_XK_Greek_xi = 0x07ee
  1607. const m_XK_Greek_zeta = 0x07e6
  1608. const m_XK_H = 0x0048
  1609. const m_XK_Hangul = 0xff31
  1610. const m_XK_Hangul_A = 0x0ebf
  1611. const m_XK_Hangul_AE = 0x0ec0
  1612. const m_XK_Hangul_AraeA = 0x0ef6
  1613. const m_XK_Hangul_AraeAE = 0x0ef7
  1614. const m_XK_Hangul_Banja = 0xff39
  1615. const m_XK_Hangul_Cieuc = 0x0eba
  1616. const m_XK_Hangul_Codeinput = 0xff37
  1617. const m_XK_Hangul_Dikeud = 0x0ea7
  1618. const m_XK_Hangul_E = 0x0ec4
  1619. const m_XK_Hangul_EO = 0x0ec3
  1620. const m_XK_Hangul_EU = 0x0ed1
  1621. const m_XK_Hangul_End = 0xff33
  1622. const m_XK_Hangul_Hanja = 0xff34
  1623. const m_XK_Hangul_Hieuh = 0x0ebe
  1624. const m_XK_Hangul_I = 0x0ed3
  1625. const m_XK_Hangul_Ieung = 0x0eb7
  1626. const m_XK_Hangul_J_Cieuc = 0x0eea
  1627. const m_XK_Hangul_J_Dikeud = 0x0eda
  1628. const m_XK_Hangul_J_Hieuh = 0x0eee
  1629. const m_XK_Hangul_J_Ieung = 0x0ee8
  1630. const m_XK_Hangul_J_Jieuj = 0x0ee9
  1631. const m_XK_Hangul_J_Khieuq = 0x0eeb
  1632. const m_XK_Hangul_J_Kiyeog = 0x0ed4
  1633. const m_XK_Hangul_J_KiyeogSios = 0x0ed6
  1634. const m_XK_Hangul_J_KkogjiDalrinIeung = 0x0ef9
  1635. const m_XK_Hangul_J_Mieum = 0x0ee3
  1636. const m_XK_Hangul_J_Nieun = 0x0ed7
  1637. const m_XK_Hangul_J_NieunHieuh = 0x0ed9
  1638. const m_XK_Hangul_J_NieunJieuj = 0x0ed8
  1639. const m_XK_Hangul_J_PanSios = 0x0ef8
  1640. const m_XK_Hangul_J_Phieuf = 0x0eed
  1641. const m_XK_Hangul_J_Pieub = 0x0ee4
  1642. const m_XK_Hangul_J_PieubSios = 0x0ee5
  1643. const m_XK_Hangul_J_Rieul = 0x0edb
  1644. const m_XK_Hangul_J_RieulHieuh = 0x0ee2
  1645. const m_XK_Hangul_J_RieulKiyeog = 0x0edc
  1646. const m_XK_Hangul_J_RieulMieum = 0x0edd
  1647. const m_XK_Hangul_J_RieulPhieuf = 0x0ee1
  1648. const m_XK_Hangul_J_RieulPieub = 0x0ede
  1649. const m_XK_Hangul_J_RieulSios = 0x0edf
  1650. const m_XK_Hangul_J_RieulTieut = 0x0ee0
  1651. const m_XK_Hangul_J_Sios = 0x0ee6
  1652. const m_XK_Hangul_J_SsangKiyeog = 0x0ed5
  1653. const m_XK_Hangul_J_SsangSios = 0x0ee7
  1654. const m_XK_Hangul_J_Tieut = 0x0eec
  1655. const m_XK_Hangul_J_YeorinHieuh = 0x0efa
  1656. const m_XK_Hangul_Jamo = 0xff35
  1657. const m_XK_Hangul_Jeonja = 0xff38
  1658. const m_XK_Hangul_Jieuj = 0x0eb8
  1659. const m_XK_Hangul_Khieuq = 0x0ebb
  1660. const m_XK_Hangul_Kiyeog = 0x0ea1
  1661. const m_XK_Hangul_KiyeogSios = 0x0ea3
  1662. const m_XK_Hangul_KkogjiDalrinIeung = 0x0ef3
  1663. const m_XK_Hangul_Mieum = 0x0eb1
  1664. const m_XK_Hangul_MultipleCandidate = 0xff3d
  1665. const m_XK_Hangul_Nieun = 0x0ea4
  1666. const m_XK_Hangul_NieunHieuh = 0x0ea6
  1667. const m_XK_Hangul_NieunJieuj = 0x0ea5
  1668. const m_XK_Hangul_O = 0x0ec7
  1669. const m_XK_Hangul_OE = 0x0eca
  1670. const m_XK_Hangul_PanSios = 0x0ef2
  1671. const m_XK_Hangul_Phieuf = 0x0ebd
  1672. const m_XK_Hangul_Pieub = 0x0eb2
  1673. const m_XK_Hangul_PieubSios = 0x0eb4
  1674. const m_XK_Hangul_PostHanja = 0xff3b
  1675. const m_XK_Hangul_PreHanja = 0xff3a
  1676. const m_XK_Hangul_PreviousCandidate = 0xff3e
  1677. const m_XK_Hangul_Rieul = 0x0ea9
  1678. const m_XK_Hangul_RieulHieuh = 0x0eb0
  1679. const m_XK_Hangul_RieulKiyeog = 0x0eaa
  1680. const m_XK_Hangul_RieulMieum = 0x0eab
  1681. const m_XK_Hangul_RieulPhieuf = 0x0eaf
  1682. const m_XK_Hangul_RieulPieub = 0x0eac
  1683. const m_XK_Hangul_RieulSios = 0x0ead
  1684. const m_XK_Hangul_RieulTieut = 0x0eae
  1685. const m_XK_Hangul_RieulYeorinHieuh = 0x0eef
  1686. const m_XK_Hangul_Romaja = 0xff36
  1687. const m_XK_Hangul_SingleCandidate = 0xff3c
  1688. const m_XK_Hangul_Sios = 0x0eb5
  1689. const m_XK_Hangul_Special = 0xff3f
  1690. const m_XK_Hangul_SsangDikeud = 0x0ea8
  1691. const m_XK_Hangul_SsangJieuj = 0x0eb9
  1692. const m_XK_Hangul_SsangKiyeog = 0x0ea2
  1693. const m_XK_Hangul_SsangPieub = 0x0eb3
  1694. const m_XK_Hangul_SsangSios = 0x0eb6
  1695. const m_XK_Hangul_Start = 0xff32
  1696. const m_XK_Hangul_SunkyeongeumMieum = 0x0ef0
  1697. const m_XK_Hangul_SunkyeongeumPhieuf = 0x0ef4
  1698. const m_XK_Hangul_SunkyeongeumPieub = 0x0ef1
  1699. const m_XK_Hangul_Tieut = 0x0ebc
  1700. const m_XK_Hangul_U = 0x0ecc
  1701. const m_XK_Hangul_WA = 0x0ec8
  1702. const m_XK_Hangul_WAE = 0x0ec9
  1703. const m_XK_Hangul_WE = 0x0ece
  1704. const m_XK_Hangul_WEO = 0x0ecd
  1705. const m_XK_Hangul_WI = 0x0ecf
  1706. const m_XK_Hangul_YA = 0x0ec1
  1707. const m_XK_Hangul_YAE = 0x0ec2
  1708. const m_XK_Hangul_YE = 0x0ec6
  1709. const m_XK_Hangul_YEO = 0x0ec5
  1710. const m_XK_Hangul_YI = 0x0ed2
  1711. const m_XK_Hangul_YO = 0x0ecb
  1712. const m_XK_Hangul_YU = 0x0ed0
  1713. const m_XK_Hangul_YeorinHieuh = 0x0ef5
  1714. const m_XK_Hangul_switch = 0xff7e
  1715. const m_XK_Hankaku = 0xff29
  1716. const m_XK_Hcircumflex = 0x02a6
  1717. const m_XK_Hebrew_switch = 0xff7e
  1718. const m_XK_Help = 0xff6a
  1719. const m_XK_Henkan = 0xff23
  1720. const m_XK_Henkan_Mode = 0xff23
  1721. const m_XK_Hiragana = 0xff25
  1722. const m_XK_Hiragana_Katakana = 0xff27
  1723. const m_XK_Home = 0xff50
  1724. const m_XK_Hstroke = 0x02a1
  1725. const m_XK_Hyper_L = 0xffed
  1726. const m_XK_Hyper_R = 0xffee
  1727. const m_XK_I = 0x0049
  1728. const m_XK_ISO_Center_Object = 0xfe33
  1729. const m_XK_ISO_Continuous_Underline = 0xfe30
  1730. const m_XK_ISO_Discontinuous_Underline = 0xfe31
  1731. const m_XK_ISO_Emphasize = 0xfe32
  1732. const m_XK_ISO_Enter = 0xfe34
  1733. const m_XK_ISO_Fast_Cursor_Down = 0xfe2f
  1734. const m_XK_ISO_Fast_Cursor_Left = 0xfe2c
  1735. const m_XK_ISO_Fast_Cursor_Right = 0xfe2d
  1736. const m_XK_ISO_Fast_Cursor_Up = 0xfe2e
  1737. const m_XK_ISO_First_Group = 0xfe0c
  1738. const m_XK_ISO_First_Group_Lock = 0xfe0d
  1739. const m_XK_ISO_Group_Latch = 0xfe06
  1740. const m_XK_ISO_Group_Lock = 0xfe07
  1741. const m_XK_ISO_Group_Shift = 0xff7e
  1742. const m_XK_ISO_Last_Group = 0xfe0e
  1743. const m_XK_ISO_Last_Group_Lock = 0xfe0f
  1744. const m_XK_ISO_Left_Tab = 0xfe20
  1745. const m_XK_ISO_Level2_Latch = 0xfe02
  1746. const m_XK_ISO_Level3_Latch = 0xfe04
  1747. const m_XK_ISO_Level3_Lock = 0xfe05
  1748. const m_XK_ISO_Level3_Shift = 0xfe03
  1749. const m_XK_ISO_Level5_Latch = 0xfe12
  1750. const m_XK_ISO_Level5_Lock = 0xfe13
  1751. const m_XK_ISO_Level5_Shift = 0xfe11
  1752. const m_XK_ISO_Lock = 0xfe01
  1753. const m_XK_ISO_Move_Line_Down = 0xfe22
  1754. const m_XK_ISO_Move_Line_Up = 0xfe21
  1755. const m_XK_ISO_Next_Group = 0xfe08
  1756. const m_XK_ISO_Next_Group_Lock = 0xfe09
  1757. const m_XK_ISO_Partial_Line_Down = 0xfe24
  1758. const m_XK_ISO_Partial_Line_Up = 0xfe23
  1759. const m_XK_ISO_Partial_Space_Left = 0xfe25
  1760. const m_XK_ISO_Partial_Space_Right = 0xfe26
  1761. const m_XK_ISO_Prev_Group = 0xfe0a
  1762. const m_XK_ISO_Prev_Group_Lock = 0xfe0b
  1763. const m_XK_ISO_Release_Both_Margins = 0xfe2b
  1764. const m_XK_ISO_Release_Margin_Left = 0xfe29
  1765. const m_XK_ISO_Release_Margin_Right = 0xfe2a
  1766. const m_XK_ISO_Set_Margin_Left = 0xfe27
  1767. const m_XK_ISO_Set_Margin_Right = 0xfe28
  1768. const m_XK_Iabovedot = 0x02a9
  1769. const m_XK_Iacute = 0x00cd
  1770. const m_XK_Ibelowdot = 0x1001eca
  1771. const m_XK_Ibreve = 0x100012c
  1772. const m_XK_Icircumflex = 0x00ce
  1773. const m_XK_Idiaeresis = 0x00cf
  1774. const m_XK_Igrave = 0x00cc
  1775. const m_XK_Ihook = 0x1001ec8
  1776. const m_XK_Imacron = 0x03cf
  1777. const m_XK_Insert = 0xff63
  1778. const m_XK_Iogonek = 0x03c7
  1779. const m_XK_Itilde = 0x03a5
  1780. const m_XK_J = 0x004a
  1781. const m_XK_Jcircumflex = 0x02ac
  1782. const m_XK_K = 0x004b
  1783. const m_XK_KP_0 = 0xffb0
  1784. const m_XK_KP_1 = 0xffb1
  1785. const m_XK_KP_2 = 0xffb2
  1786. const m_XK_KP_3 = 0xffb3
  1787. const m_XK_KP_4 = 0xffb4
  1788. const m_XK_KP_5 = 0xffb5
  1789. const m_XK_KP_6 = 0xffb6
  1790. const m_XK_KP_7 = 0xffb7
  1791. const m_XK_KP_8 = 0xffb8
  1792. const m_XK_KP_9 = 0xffb9
  1793. const m_XK_KP_Add = 0xffab
  1794. const m_XK_KP_Begin = 0xff9d
  1795. const m_XK_KP_Decimal = 0xffae
  1796. const m_XK_KP_Delete = 0xff9f
  1797. const m_XK_KP_Divide = 0xffaf
  1798. const m_XK_KP_Down = 0xff99
  1799. const m_XK_KP_End = 0xff9c
  1800. const m_XK_KP_Enter = 0xff8d
  1801. const m_XK_KP_Equal = 0xffbd
  1802. const m_XK_KP_F1 = 0xff91
  1803. const m_XK_KP_F2 = 0xff92
  1804. const m_XK_KP_F3 = 0xff93
  1805. const m_XK_KP_F4 = 0xff94
  1806. const m_XK_KP_Home = 0xff95
  1807. const m_XK_KP_Insert = 0xff9e
  1808. const m_XK_KP_Left = 0xff96
  1809. const m_XK_KP_Multiply = 0xffaa
  1810. const m_XK_KP_Next = 0xff9b
  1811. const m_XK_KP_Page_Down = 0xff9b
  1812. const m_XK_KP_Page_Up = 0xff9a
  1813. const m_XK_KP_Prior = 0xff9a
  1814. const m_XK_KP_Right = 0xff98
  1815. const m_XK_KP_Separator = 0xffac
  1816. const m_XK_KP_Space = 0xff80
  1817. const m_XK_KP_Subtract = 0xffad
  1818. const m_XK_KP_Tab = 0xff89
  1819. const m_XK_KP_Up = 0xff97
  1820. const m_XK_Kana_Lock = 0xff2d
  1821. const m_XK_Kana_Shift = 0xff2e
  1822. const m_XK_Kanji = 0xff21
  1823. const m_XK_Kanji_Bangou = 0xff37
  1824. const m_XK_Katakana = 0xff26
  1825. const m_XK_Kcedilla = 0x03d3
  1826. const m_XK_Korean_Won = 0x0eff
  1827. const m_XK_L = 0x004c
  1828. const m_XK_L1 = 0xffc8
  1829. const m_XK_L10 = 0xffd1
  1830. const m_XK_L2 = 0xffc9
  1831. const m_XK_L3 = 0xffca
  1832. const m_XK_L4 = 0xffcb
  1833. const m_XK_L5 = 0xffcc
  1834. const m_XK_L6 = 0xffcd
  1835. const m_XK_L7 = 0xffce
  1836. const m_XK_L8 = 0xffcf
  1837. const m_XK_L9 = 0xffd0
  1838. const m_XK_Lacute = 0x01c5
  1839. const m_XK_Last_Virtual_Screen = 0xfed4
  1840. const m_XK_Lbelowdot = 0x1001e36
  1841. const m_XK_Lcaron = 0x01a5
  1842. const m_XK_Lcedilla = 0x03a6
  1843. const m_XK_Left = 0xff51
  1844. const m_XK_Linefeed = 0xff0a
  1845. const m_XK_LiraSign = 0x10020a4
  1846. const m_XK_Lstroke = 0x01a3
  1847. const m_XK_M = 0x004d
  1848. const m_XK_Mabovedot = 0x1001e40
  1849. const m_XK_Macedonia_DSE = 0x06b5
  1850. const m_XK_Macedonia_GJE = 0x06b2
  1851. const m_XK_Macedonia_KJE = 0x06bc
  1852. const m_XK_Macedonia_dse = 0x06a5
  1853. const m_XK_Macedonia_gje = 0x06a2
  1854. const m_XK_Macedonia_kje = 0x06ac
  1855. const m_XK_Mae_Koho = 0xff3e
  1856. const m_XK_Massyo = 0xff2c
  1857. const m_XK_Menu = 0xff67
  1858. const m_XK_Meta_L = 0xffe7
  1859. const m_XK_Meta_R = 0xffe8
  1860. const m_XK_MillSign = 0x10020a5
  1861. const m_XK_Mode_switch = 0xff7e
  1862. const m_XK_MouseKeys_Accel_Enable = 0xfe77
  1863. const m_XK_MouseKeys_Enable = 0xfe76
  1864. const m_XK_Muhenkan = 0xff22
  1865. const m_XK_Multi_key = 0xff20
  1866. const m_XK_MultipleCandidate = 0xff3d
  1867. const m_XK_N = 0x004e
  1868. const m_XK_Nacute = 0x01d1
  1869. const m_XK_NairaSign = 0x10020a6
  1870. const m_XK_Ncaron = 0x01d2
  1871. const m_XK_Ncedilla = 0x03d1
  1872. const m_XK_NewSheqelSign = 0x10020aa
  1873. const m_XK_Next = 0xff56
  1874. const m_XK_Next_Virtual_Screen = 0xfed2
  1875. const m_XK_Ntilde = 0x00d1
  1876. const m_XK_Num_Lock = 0xff7f
  1877. const m_XK_O = 0x004f
  1878. const m_XK_OE = 0x13bc
  1879. const m_XK_Oacute = 0x00d3
  1880. const m_XK_Obarred = 0x100019f
  1881. const m_XK_Obelowdot = 0x1001ecc
  1882. const m_XK_Ocaron = 0x10001d1
  1883. const m_XK_Ocircumflex = 0x00d4
  1884. const m_XK_Ocircumflexacute = 0x1001ed0
  1885. const m_XK_Ocircumflexbelowdot = 0x1001ed8
  1886. const m_XK_Ocircumflexgrave = 0x1001ed2
  1887. const m_XK_Ocircumflexhook = 0x1001ed4
  1888. const m_XK_Ocircumflextilde = 0x1001ed6
  1889. const m_XK_Odiaeresis = 0x00d6
  1890. const m_XK_Odoubleacute = 0x01d5
  1891. const m_XK_Ograve = 0x00d2
  1892. const m_XK_Ohook = 0x1001ece
  1893. const m_XK_Ohorn = 0x10001a0
  1894. const m_XK_Ohornacute = 0x1001eda
  1895. const m_XK_Ohornbelowdot = 0x1001ee2
  1896. const m_XK_Ohorngrave = 0x1001edc
  1897. const m_XK_Ohornhook = 0x1001ede
  1898. const m_XK_Ohorntilde = 0x1001ee0
  1899. const m_XK_Omacron = 0x03d2
  1900. const m_XK_Ooblique = 0x00d8
  1901. const m_XK_Oslash = 0x00d8
  1902. const m_XK_Otilde = 0x00d5
  1903. const m_XK_Overlay1_Enable = 0xfe78
  1904. const m_XK_Overlay2_Enable = 0xfe79
  1905. const m_XK_P = 0x0050
  1906. const m_XK_Pabovedot = 0x1001e56
  1907. const m_XK_Page_Down = 0xff56
  1908. const m_XK_Page_Up = 0xff55
  1909. const m_XK_Pause = 0xff13
  1910. const m_XK_PesetaSign = 0x10020a7
  1911. const m_XK_Pointer_Accelerate = 0xfefa
  1912. const m_XK_Pointer_Button1 = 0xfee9
  1913. const m_XK_Pointer_Button2 = 0xfeea
  1914. const m_XK_Pointer_Button3 = 0xfeeb
  1915. const m_XK_Pointer_Button4 = 0xfeec
  1916. const m_XK_Pointer_Button5 = 0xfeed
  1917. const m_XK_Pointer_Button_Dflt = 0xfee8
  1918. const m_XK_Pointer_DblClick1 = 0xfeef
  1919. const m_XK_Pointer_DblClick2 = 0xfef0
  1920. const m_XK_Pointer_DblClick3 = 0xfef1
  1921. const m_XK_Pointer_DblClick4 = 0xfef2
  1922. const m_XK_Pointer_DblClick5 = 0xfef3
  1923. const m_XK_Pointer_DblClick_Dflt = 0xfeee
  1924. const m_XK_Pointer_DfltBtnNext = 0xfefb
  1925. const m_XK_Pointer_DfltBtnPrev = 0xfefc
  1926. const m_XK_Pointer_Down = 0xfee3
  1927. const m_XK_Pointer_DownLeft = 0xfee6
  1928. const m_XK_Pointer_DownRight = 0xfee7
  1929. const m_XK_Pointer_Drag1 = 0xfef5
  1930. const m_XK_Pointer_Drag2 = 0xfef6
  1931. const m_XK_Pointer_Drag3 = 0xfef7
  1932. const m_XK_Pointer_Drag4 = 0xfef8
  1933. const m_XK_Pointer_Drag5 = 0xfefd
  1934. const m_XK_Pointer_Drag_Dflt = 0xfef4
  1935. const m_XK_Pointer_EnableKeys = 0xfef9
  1936. const m_XK_Pointer_Left = 0xfee0
  1937. const m_XK_Pointer_Right = 0xfee1
  1938. const m_XK_Pointer_Up = 0xfee2
  1939. const m_XK_Pointer_UpLeft = 0xfee4
  1940. const m_XK_Pointer_UpRight = 0xfee5
  1941. const m_XK_Prev_Virtual_Screen = 0xfed1
  1942. const m_XK_PreviousCandidate = 0xff3e
  1943. const m_XK_Print = 0xff61
  1944. const m_XK_Prior = 0xff55
  1945. const m_XK_Q = 0x0051
  1946. const m_XK_R = 0x0052
  1947. const m_XK_R1 = 0xffd2
  1948. const m_XK_R10 = 0xffdb
  1949. const m_XK_R11 = 0xffdc
  1950. const m_XK_R12 = 0xffdd
  1951. const m_XK_R13 = 0xffde
  1952. const m_XK_R14 = 0xffdf
  1953. const m_XK_R15 = 0xffe0
  1954. const m_XK_R2 = 0xffd3
  1955. const m_XK_R3 = 0xffd4
  1956. const m_XK_R4 = 0xffd5
  1957. const m_XK_R5 = 0xffd6
  1958. const m_XK_R6 = 0xffd7
  1959. const m_XK_R7 = 0xffd8
  1960. const m_XK_R8 = 0xffd9
  1961. const m_XK_R9 = 0xffda
  1962. const m_XK_Racute = 0x01c0
  1963. const m_XK_Rcaron = 0x01d8
  1964. const m_XK_Rcedilla = 0x03a3
  1965. const m_XK_Redo = 0xff66
  1966. const m_XK_RepeatKeys_Enable = 0xfe72
  1967. const m_XK_Return = 0xff0d
  1968. const m_XK_Right = 0xff53
  1969. const m_XK_Romaji = 0xff24
  1970. const m_XK_RupeeSign = 0x10020a8
  1971. const m_XK_S = 0x0053
  1972. const m_XK_SCHWA = 0x100018f
  1973. const m_XK_Sabovedot = 0x1001e60
  1974. const m_XK_Sacute = 0x01a6
  1975. const m_XK_Scaron = 0x01a9
  1976. const m_XK_Scedilla = 0x01aa
  1977. const m_XK_Scircumflex = 0x02de
  1978. const m_XK_Scroll_Lock = 0xff14
  1979. const m_XK_Select = 0xff60
  1980. const m_XK_Serbian_DJE = 0x06b1
  1981. const m_XK_Serbian_DZE = 0x06bf
  1982. const m_XK_Serbian_JE = 0x06b8
  1983. const m_XK_Serbian_LJE = 0x06b9
  1984. const m_XK_Serbian_NJE = 0x06ba
  1985. const m_XK_Serbian_TSHE = 0x06bb
  1986. const m_XK_Serbian_dje = 0x06a1
  1987. const m_XK_Serbian_dze = 0x06af
  1988. const m_XK_Serbian_je = 0x06a8
  1989. const m_XK_Serbian_lje = 0x06a9
  1990. const m_XK_Serbian_nje = 0x06aa
  1991. const m_XK_Serbian_tshe = 0x06ab
  1992. const m_XK_Shift_L = 0xffe1
  1993. const m_XK_Shift_Lock = 0xffe6
  1994. const m_XK_Shift_R = 0xffe2
  1995. const m_XK_SingleCandidate = 0xff3c
  1996. const m_XK_Sinh_a = 0x1000d85
  1997. const m_XK_Sinh_aa = 0x1000d86
  1998. const m_XK_Sinh_aa2 = 0x1000dcf
  1999. const m_XK_Sinh_ae = 0x1000d87
  2000. const m_XK_Sinh_ae2 = 0x1000dd0
  2001. const m_XK_Sinh_aee = 0x1000d88
  2002. const m_XK_Sinh_aee2 = 0x1000dd1
  2003. const m_XK_Sinh_ai = 0x1000d93
  2004. const m_XK_Sinh_ai2 = 0x1000ddb
  2005. const m_XK_Sinh_al = 0x1000dca
  2006. const m_XK_Sinh_au = 0x1000d96
  2007. const m_XK_Sinh_au2 = 0x1000dde
  2008. const m_XK_Sinh_ba = 0x1000db6
  2009. const m_XK_Sinh_bha = 0x1000db7
  2010. const m_XK_Sinh_ca = 0x1000da0
  2011. const m_XK_Sinh_cha = 0x1000da1
  2012. const m_XK_Sinh_dda = 0x1000da9
  2013. const m_XK_Sinh_ddha = 0x1000daa
  2014. const m_XK_Sinh_dha = 0x1000daf
  2015. const m_XK_Sinh_dhha = 0x1000db0
  2016. const m_XK_Sinh_e = 0x1000d91
  2017. const m_XK_Sinh_e2 = 0x1000dd9
  2018. const m_XK_Sinh_ee = 0x1000d92
  2019. const m_XK_Sinh_ee2 = 0x1000dda
  2020. const m_XK_Sinh_fa = 0x1000dc6
  2021. const m_XK_Sinh_ga = 0x1000d9c
  2022. const m_XK_Sinh_gha = 0x1000d9d
  2023. const m_XK_Sinh_h2 = 0x1000d83
  2024. const m_XK_Sinh_ha = 0x1000dc4
  2025. const m_XK_Sinh_i = 0x1000d89
  2026. const m_XK_Sinh_i2 = 0x1000dd2
  2027. const m_XK_Sinh_ii = 0x1000d8a
  2028. const m_XK_Sinh_ii2 = 0x1000dd3
  2029. const m_XK_Sinh_ja = 0x1000da2
  2030. const m_XK_Sinh_jha = 0x1000da3
  2031. const m_XK_Sinh_jnya = 0x1000da5
  2032. const m_XK_Sinh_ka = 0x1000d9a
  2033. const m_XK_Sinh_kha = 0x1000d9b
  2034. const m_XK_Sinh_kunddaliya = 0x1000df4
  2035. const m_XK_Sinh_la = 0x1000dbd
  2036. const m_XK_Sinh_lla = 0x1000dc5
  2037. const m_XK_Sinh_lu = 0x1000d8f
  2038. const m_XK_Sinh_lu2 = 0x1000ddf
  2039. const m_XK_Sinh_luu = 0x1000d90
  2040. const m_XK_Sinh_luu2 = 0x1000df3
  2041. const m_XK_Sinh_ma = 0x1000db8
  2042. const m_XK_Sinh_mba = 0x1000db9
  2043. const m_XK_Sinh_na = 0x1000db1
  2044. const m_XK_Sinh_ndda = 0x1000dac
  2045. const m_XK_Sinh_ndha = 0x1000db3
  2046. const m_XK_Sinh_ng = 0x1000d82
  2047. const m_XK_Sinh_ng2 = 0x1000d9e
  2048. const m_XK_Sinh_nga = 0x1000d9f
  2049. const m_XK_Sinh_nja = 0x1000da6
  2050. const m_XK_Sinh_nna = 0x1000dab
  2051. const m_XK_Sinh_nya = 0x1000da4
  2052. const m_XK_Sinh_o = 0x1000d94
  2053. const m_XK_Sinh_o2 = 0x1000ddc
  2054. const m_XK_Sinh_oo = 0x1000d95
  2055. const m_XK_Sinh_oo2 = 0x1000ddd
  2056. const m_XK_Sinh_pa = 0x1000db4
  2057. const m_XK_Sinh_pha = 0x1000db5
  2058. const m_XK_Sinh_ra = 0x1000dbb
  2059. const m_XK_Sinh_ri = 0x1000d8d
  2060. const m_XK_Sinh_rii = 0x1000d8e
  2061. const m_XK_Sinh_ru2 = 0x1000dd8
  2062. const m_XK_Sinh_ruu2 = 0x1000df2
  2063. const m_XK_Sinh_sa = 0x1000dc3
  2064. const m_XK_Sinh_sha = 0x1000dc1
  2065. const m_XK_Sinh_ssha = 0x1000dc2
  2066. const m_XK_Sinh_tha = 0x1000dad
  2067. const m_XK_Sinh_thha = 0x1000dae
  2068. const m_XK_Sinh_tta = 0x1000da7
  2069. const m_XK_Sinh_ttha = 0x1000da8
  2070. const m_XK_Sinh_u = 0x1000d8b
  2071. const m_XK_Sinh_u2 = 0x1000dd4
  2072. const m_XK_Sinh_uu = 0x1000d8c
  2073. const m_XK_Sinh_uu2 = 0x1000dd6
  2074. const m_XK_Sinh_va = 0x1000dc0
  2075. const m_XK_Sinh_ya = 0x1000dba
  2076. const m_XK_SlowKeys_Enable = 0xfe73
  2077. const m_XK_StickyKeys_Enable = 0xfe75
  2078. const m_XK_Super_L = 0xffeb
  2079. const m_XK_Super_R = 0xffec
  2080. const m_XK_Sys_Req = 0xff15
  2081. const m_XK_T = 0x0054
  2082. const m_XK_THORN = 0x00de
  2083. const m_XK_Tab = 0xff09
  2084. const m_XK_Tabovedot = 0x1001e6a
  2085. const m_XK_Tcaron = 0x01ab
  2086. const m_XK_Tcedilla = 0x01de
  2087. const m_XK_Terminate_Server = 0xfed5
  2088. const m_XK_Thai_baht = 0x0ddf
  2089. const m_XK_Thai_bobaimai = 0x0dba
  2090. const m_XK_Thai_chochan = 0x0da8
  2091. const m_XK_Thai_chochang = 0x0daa
  2092. const m_XK_Thai_choching = 0x0da9
  2093. const m_XK_Thai_chochoe = 0x0dac
  2094. const m_XK_Thai_dochada = 0x0dae
  2095. const m_XK_Thai_dodek = 0x0db4
  2096. const m_XK_Thai_fofa = 0x0dbd
  2097. const m_XK_Thai_fofan = 0x0dbf
  2098. const m_XK_Thai_hohip = 0x0dcb
  2099. const m_XK_Thai_honokhuk = 0x0dce
  2100. const m_XK_Thai_khokhai = 0x0da2
  2101. const m_XK_Thai_khokhon = 0x0da5
  2102. const m_XK_Thai_khokhuat = 0x0da3
  2103. const m_XK_Thai_khokhwai = 0x0da4
  2104. const m_XK_Thai_khorakhang = 0x0da6
  2105. const m_XK_Thai_kokai = 0x0da1
  2106. const m_XK_Thai_lakkhangyao = 0x0de5
  2107. const m_XK_Thai_lekchet = 0x0df7
  2108. const m_XK_Thai_lekha = 0x0df5
  2109. const m_XK_Thai_lekhok = 0x0df6
  2110. const m_XK_Thai_lekkao = 0x0df9
  2111. const m_XK_Thai_leknung = 0x0df1
  2112. const m_XK_Thai_lekpaet = 0x0df8
  2113. const m_XK_Thai_leksam = 0x0df3
  2114. const m_XK_Thai_leksi = 0x0df4
  2115. const m_XK_Thai_leksong = 0x0df2
  2116. const m_XK_Thai_leksun = 0x0df0
  2117. const m_XK_Thai_lochula = 0x0dcc
  2118. const m_XK_Thai_loling = 0x0dc5
  2119. const m_XK_Thai_lu = 0x0dc6
  2120. const m_XK_Thai_maichattawa = 0x0deb
  2121. const m_XK_Thai_maiek = 0x0de8
  2122. const m_XK_Thai_maihanakat = 0x0dd1
  2123. const m_XK_Thai_maihanakat_maitho = 0x0dde
  2124. const m_XK_Thai_maitaikhu = 0x0de7
  2125. const m_XK_Thai_maitho = 0x0de9
  2126. const m_XK_Thai_maitri = 0x0dea
  2127. const m_XK_Thai_maiyamok = 0x0de6
  2128. const m_XK_Thai_moma = 0x0dc1
  2129. const m_XK_Thai_ngongu = 0x0da7
  2130. const m_XK_Thai_nikhahit = 0x0ded
  2131. const m_XK_Thai_nonen = 0x0db3
  2132. const m_XK_Thai_nonu = 0x0db9
  2133. const m_XK_Thai_oang = 0x0dcd
  2134. const m_XK_Thai_paiyannoi = 0x0dcf
  2135. const m_XK_Thai_phinthu = 0x0dda
  2136. const m_XK_Thai_phophan = 0x0dbe
  2137. const m_XK_Thai_phophung = 0x0dbc
  2138. const m_XK_Thai_phosamphao = 0x0dc0
  2139. const m_XK_Thai_popla = 0x0dbb
  2140. const m_XK_Thai_rorua = 0x0dc3
  2141. const m_XK_Thai_ru = 0x0dc4
  2142. const m_XK_Thai_saraa = 0x0dd0
  2143. const m_XK_Thai_saraaa = 0x0dd2
  2144. const m_XK_Thai_saraae = 0x0de1
  2145. const m_XK_Thai_saraaimaimalai = 0x0de4
  2146. const m_XK_Thai_saraaimaimuan = 0x0de3
  2147. const m_XK_Thai_saraam = 0x0dd3
  2148. const m_XK_Thai_sarae = 0x0de0
  2149. const m_XK_Thai_sarai = 0x0dd4
  2150. const m_XK_Thai_saraii = 0x0dd5
  2151. const m_XK_Thai_sarao = 0x0de2
  2152. const m_XK_Thai_sarau = 0x0dd8
  2153. const m_XK_Thai_saraue = 0x0dd6
  2154. const m_XK_Thai_sarauee = 0x0dd7
  2155. const m_XK_Thai_sarauu = 0x0dd9
  2156. const m_XK_Thai_sorusi = 0x0dc9
  2157. const m_XK_Thai_sosala = 0x0dc8
  2158. const m_XK_Thai_soso = 0x0dab
  2159. const m_XK_Thai_sosua = 0x0dca
  2160. const m_XK_Thai_thanthakhat = 0x0dec
  2161. const m_XK_Thai_thonangmontho = 0x0db1
  2162. const m_XK_Thai_thophuthao = 0x0db2
  2163. const m_XK_Thai_thothahan = 0x0db7
  2164. const m_XK_Thai_thothan = 0x0db0
  2165. const m_XK_Thai_thothong = 0x0db8
  2166. const m_XK_Thai_thothung = 0x0db6
  2167. const m_XK_Thai_topatak = 0x0daf
  2168. const m_XK_Thai_totao = 0x0db5
  2169. const m_XK_Thai_wowaen = 0x0dc7
  2170. const m_XK_Thai_yoyak = 0x0dc2
  2171. const m_XK_Thai_yoying = 0x0dad
  2172. const m_XK_Thorn = 0x00de
  2173. const m_XK_Touroku = 0xff2b
  2174. const m_XK_Tslash = 0x03ac
  2175. const m_XK_U = 0x0055
  2176. const m_XK_Uacute = 0x00da
  2177. const m_XK_Ubelowdot = 0x1001ee4
  2178. const m_XK_Ubreve = 0x02dd
  2179. const m_XK_Ucircumflex = 0x00db
  2180. const m_XK_Udiaeresis = 0x00dc
  2181. const m_XK_Udoubleacute = 0x01db
  2182. const m_XK_Ugrave = 0x00d9
  2183. const m_XK_Uhook = 0x1001ee6
  2184. const m_XK_Uhorn = 0x10001af
  2185. const m_XK_Uhornacute = 0x1001ee8
  2186. const m_XK_Uhornbelowdot = 0x1001ef0
  2187. const m_XK_Uhorngrave = 0x1001eea
  2188. const m_XK_Uhornhook = 0x1001eec
  2189. const m_XK_Uhorntilde = 0x1001eee
  2190. const m_XK_Ukrainian_GHE_WITH_UPTURN = 0x06bd
  2191. const m_XK_Ukrainian_I = 0x06b6
  2192. const m_XK_Ukrainian_IE = 0x06b4
  2193. const m_XK_Ukrainian_YI = 0x06b7
  2194. const m_XK_Ukrainian_ghe_with_upturn = 0x06ad
  2195. const m_XK_Ukrainian_i = 0x06a6
  2196. const m_XK_Ukrainian_ie = 0x06a4
  2197. const m_XK_Ukrainian_yi = 0x06a7
  2198. const m_XK_Ukranian_I = 0x06b6
  2199. const m_XK_Ukranian_JE = 0x06b4
  2200. const m_XK_Ukranian_YI = 0x06b7
  2201. const m_XK_Ukranian_i = 0x06a6
  2202. const m_XK_Ukranian_je = 0x06a4
  2203. const m_XK_Ukranian_yi = 0x06a7
  2204. const m_XK_Umacron = 0x03de
  2205. const m_XK_Undo = 0xff65
  2206. const m_XK_Uogonek = 0x03d9
  2207. const m_XK_Up = 0xff52
  2208. const m_XK_Uring = 0x01d9
  2209. const m_XK_Utilde = 0x03dd
  2210. const m_XK_V = 0x0056
  2211. const m_XK_VoidSymbol = 0xffffff
  2212. const m_XK_W = 0x0057
  2213. const m_XK_Wacute = 0x1001e82
  2214. const m_XK_Wcircumflex = 0x1000174
  2215. const m_XK_Wdiaeresis = 0x1001e84
  2216. const m_XK_Wgrave = 0x1001e80
  2217. const m_XK_WonSign = 0x10020a9
  2218. const m_XK_X = 0x0058
  2219. const m_XK_Xabovedot = 0x1001e8a
  2220. const m_XK_Y = 0x0059
  2221. const m_XK_Yacute = 0x00dd
  2222. const m_XK_Ybelowdot = 0x1001ef4
  2223. const m_XK_Ycircumflex = 0x1000176
  2224. const m_XK_Ydiaeresis = 0x13be
  2225. const m_XK_Ygrave = 0x1001ef2
  2226. const m_XK_Yhook = 0x1001ef6
  2227. const m_XK_Ytilde = 0x1001ef8
  2228. const m_XK_Z = 0x005a
  2229. const m_XK_Zabovedot = 0x01af
  2230. const m_XK_Zacute = 0x01ac
  2231. const m_XK_Zcaron = 0x01ae
  2232. const m_XK_Zen_Koho = 0xff3d
  2233. const m_XK_Zenkaku = 0xff28
  2234. const m_XK_Zenkaku_Hankaku = 0xff2a
  2235. const m_XK_Zstroke = 0x10001b5
  2236. const m_XK_a = 0x0061
  2237. const m_XK_aacute = 0x00e1
  2238. const m_XK_abelowdot = 0x1001ea1
  2239. const m_XK_abovedot = 0x01ff
  2240. const m_XK_abreve = 0x01e3
  2241. const m_XK_abreveacute = 0x1001eaf
  2242. const m_XK_abrevebelowdot = 0x1001eb7
  2243. const m_XK_abrevegrave = 0x1001eb1
  2244. const m_XK_abrevehook = 0x1001eb3
  2245. const m_XK_abrevetilde = 0x1001eb5
  2246. const m_XK_acircumflex = 0x00e2
  2247. const m_XK_acircumflexacute = 0x1001ea5
  2248. const m_XK_acircumflexbelowdot = 0x1001ead
  2249. const m_XK_acircumflexgrave = 0x1001ea7
  2250. const m_XK_acircumflexhook = 0x1001ea9
  2251. const m_XK_acircumflextilde = 0x1001eab
  2252. const m_XK_acute = 0x00b4
  2253. const m_XK_adiaeresis = 0x00e4
  2254. const m_XK_ae = 0x00e6
  2255. const m_XK_agrave = 0x00e0
  2256. const m_XK_ahook = 0x1001ea3
  2257. const m_XK_amacron = 0x03e0
  2258. const m_XK_ampersand = 0x0026
  2259. const m_XK_aogonek = 0x01b1
  2260. const m_XK_apostrophe = 0x0027
  2261. const m_XK_approxeq = 0x1002248
  2262. const m_XK_aring = 0x00e5
  2263. const m_XK_asciicircum = 0x005e
  2264. const m_XK_asciitilde = 0x007e
  2265. const m_XK_asterisk = 0x002a
  2266. const m_XK_at = 0x0040
  2267. const m_XK_atilde = 0x00e3
  2268. const m_XK_b = 0x0062
  2269. const m_XK_babovedot = 0x1001e03
  2270. const m_XK_backslash = 0x005c
  2271. const m_XK_bar = 0x007c
  2272. const m_XK_because = 0x1002235
  2273. const m_XK_braceleft = 0x007b
  2274. const m_XK_braceright = 0x007d
  2275. const m_XK_bracketleft = 0x005b
  2276. const m_XK_bracketright = 0x005d
  2277. const m_XK_braille_blank = 0x1002800
  2278. const m_XK_braille_dot_1 = 0xfff1
  2279. const m_XK_braille_dot_10 = 0xfffa
  2280. const m_XK_braille_dot_2 = 0xfff2
  2281. const m_XK_braille_dot_3 = 0xfff3
  2282. const m_XK_braille_dot_4 = 0xfff4
  2283. const m_XK_braille_dot_5 = 0xfff5
  2284. const m_XK_braille_dot_6 = 0xfff6
  2285. const m_XK_braille_dot_7 = 0xfff7
  2286. const m_XK_braille_dot_8 = 0xfff8
  2287. const m_XK_braille_dot_9 = 0xfff9
  2288. const m_XK_braille_dots_1 = 0x1002801
  2289. const m_XK_braille_dots_12 = 0x1002803
  2290. const m_XK_braille_dots_123 = 0x1002807
  2291. const m_XK_braille_dots_1234 = 0x100280f
  2292. const m_XK_braille_dots_12345 = 0x100281f
  2293. const m_XK_braille_dots_123456 = 0x100283f
  2294. const m_XK_braille_dots_1234567 = 0x100287f
  2295. const m_XK_braille_dots_12345678 = 0x10028ff
  2296. const m_XK_braille_dots_1234568 = 0x10028bf
  2297. const m_XK_braille_dots_123457 = 0x100285f
  2298. const m_XK_braille_dots_1234578 = 0x10028df
  2299. const m_XK_braille_dots_123458 = 0x100289f
  2300. const m_XK_braille_dots_12346 = 0x100282f
  2301. const m_XK_braille_dots_123467 = 0x100286f
  2302. const m_XK_braille_dots_1234678 = 0x10028ef
  2303. const m_XK_braille_dots_123468 = 0x10028af
  2304. const m_XK_braille_dots_12347 = 0x100284f
  2305. const m_XK_braille_dots_123478 = 0x10028cf
  2306. const m_XK_braille_dots_12348 = 0x100288f
  2307. const m_XK_braille_dots_1235 = 0x1002817
  2308. const m_XK_braille_dots_12356 = 0x1002837
  2309. const m_XK_braille_dots_123567 = 0x1002877
  2310. const m_XK_braille_dots_1235678 = 0x10028f7
  2311. const m_XK_braille_dots_123568 = 0x10028b7
  2312. const m_XK_braille_dots_12357 = 0x1002857
  2313. const m_XK_braille_dots_123578 = 0x10028d7
  2314. const m_XK_braille_dots_12358 = 0x1002897
  2315. const m_XK_braille_dots_1236 = 0x1002827
  2316. const m_XK_braille_dots_12367 = 0x1002867
  2317. const m_XK_braille_dots_123678 = 0x10028e7
  2318. const m_XK_braille_dots_12368 = 0x10028a7
  2319. const m_XK_braille_dots_1237 = 0x1002847
  2320. const m_XK_braille_dots_12378 = 0x10028c7
  2321. const m_XK_braille_dots_1238 = 0x1002887
  2322. const m_XK_braille_dots_124 = 0x100280b
  2323. const m_XK_braille_dots_1245 = 0x100281b
  2324. const m_XK_braille_dots_12456 = 0x100283b
  2325. const m_XK_braille_dots_124567 = 0x100287b
  2326. const m_XK_braille_dots_1245678 = 0x10028fb
  2327. const m_XK_braille_dots_124568 = 0x10028bb
  2328. const m_XK_braille_dots_12457 = 0x100285b
  2329. const m_XK_braille_dots_124578 = 0x10028db
  2330. const m_XK_braille_dots_12458 = 0x100289b
  2331. const m_XK_braille_dots_1246 = 0x100282b
  2332. const m_XK_braille_dots_12467 = 0x100286b
  2333. const m_XK_braille_dots_124678 = 0x10028eb
  2334. const m_XK_braille_dots_12468 = 0x10028ab
  2335. const m_XK_braille_dots_1247 = 0x100284b
  2336. const m_XK_braille_dots_12478 = 0x10028cb
  2337. const m_XK_braille_dots_1248 = 0x100288b
  2338. const m_XK_braille_dots_125 = 0x1002813
  2339. const m_XK_braille_dots_1256 = 0x1002833
  2340. const m_XK_braille_dots_12567 = 0x1002873
  2341. const m_XK_braille_dots_125678 = 0x10028f3
  2342. const m_XK_braille_dots_12568 = 0x10028b3
  2343. const m_XK_braille_dots_1257 = 0x1002853
  2344. const m_XK_braille_dots_12578 = 0x10028d3
  2345. const m_XK_braille_dots_1258 = 0x1002893
  2346. const m_XK_braille_dots_126 = 0x1002823
  2347. const m_XK_braille_dots_1267 = 0x1002863
  2348. const m_XK_braille_dots_12678 = 0x10028e3
  2349. const m_XK_braille_dots_1268 = 0x10028a3
  2350. const m_XK_braille_dots_127 = 0x1002843
  2351. const m_XK_braille_dots_1278 = 0x10028c3
  2352. const m_XK_braille_dots_128 = 0x1002883
  2353. const m_XK_braille_dots_13 = 0x1002805
  2354. const m_XK_braille_dots_134 = 0x100280d
  2355. const m_XK_braille_dots_1345 = 0x100281d
  2356. const m_XK_braille_dots_13456 = 0x100283d
  2357. const m_XK_braille_dots_134567 = 0x100287d
  2358. const m_XK_braille_dots_1345678 = 0x10028fd
  2359. const m_XK_braille_dots_134568 = 0x10028bd
  2360. const m_XK_braille_dots_13457 = 0x100285d
  2361. const m_XK_braille_dots_134578 = 0x10028dd
  2362. const m_XK_braille_dots_13458 = 0x100289d
  2363. const m_XK_braille_dots_1346 = 0x100282d
  2364. const m_XK_braille_dots_13467 = 0x100286d
  2365. const m_XK_braille_dots_134678 = 0x10028ed
  2366. const m_XK_braille_dots_13468 = 0x10028ad
  2367. const m_XK_braille_dots_1347 = 0x100284d
  2368. const m_XK_braille_dots_13478 = 0x10028cd
  2369. const m_XK_braille_dots_1348 = 0x100288d
  2370. const m_XK_braille_dots_135 = 0x1002815
  2371. const m_XK_braille_dots_1356 = 0x1002835
  2372. const m_XK_braille_dots_13567 = 0x1002875
  2373. const m_XK_braille_dots_135678 = 0x10028f5
  2374. const m_XK_braille_dots_13568 = 0x10028b5
  2375. const m_XK_braille_dots_1357 = 0x1002855
  2376. const m_XK_braille_dots_13578 = 0x10028d5
  2377. const m_XK_braille_dots_1358 = 0x1002895
  2378. const m_XK_braille_dots_136 = 0x1002825
  2379. const m_XK_braille_dots_1367 = 0x1002865
  2380. const m_XK_braille_dots_13678 = 0x10028e5
  2381. const m_XK_braille_dots_1368 = 0x10028a5
  2382. const m_XK_braille_dots_137 = 0x1002845
  2383. const m_XK_braille_dots_1378 = 0x10028c5
  2384. const m_XK_braille_dots_138 = 0x1002885
  2385. const m_XK_braille_dots_14 = 0x1002809
  2386. const m_XK_braille_dots_145 = 0x1002819
  2387. const m_XK_braille_dots_1456 = 0x1002839
  2388. const m_XK_braille_dots_14567 = 0x1002879
  2389. const m_XK_braille_dots_145678 = 0x10028f9
  2390. const m_XK_braille_dots_14568 = 0x10028b9
  2391. const m_XK_braille_dots_1457 = 0x1002859
  2392. const m_XK_braille_dots_14578 = 0x10028d9
  2393. const m_XK_braille_dots_1458 = 0x1002899
  2394. const m_XK_braille_dots_146 = 0x1002829
  2395. const m_XK_braille_dots_1467 = 0x1002869
  2396. const m_XK_braille_dots_14678 = 0x10028e9
  2397. const m_XK_braille_dots_1468 = 0x10028a9
  2398. const m_XK_braille_dots_147 = 0x1002849
  2399. const m_XK_braille_dots_1478 = 0x10028c9
  2400. const m_XK_braille_dots_148 = 0x1002889
  2401. const m_XK_braille_dots_15 = 0x1002811
  2402. const m_XK_braille_dots_156 = 0x1002831
  2403. const m_XK_braille_dots_1567 = 0x1002871
  2404. const m_XK_braille_dots_15678 = 0x10028f1
  2405. const m_XK_braille_dots_1568 = 0x10028b1
  2406. const m_XK_braille_dots_157 = 0x1002851
  2407. const m_XK_braille_dots_1578 = 0x10028d1
  2408. const m_XK_braille_dots_158 = 0x1002891
  2409. const m_XK_braille_dots_16 = 0x1002821
  2410. const m_XK_braille_dots_167 = 0x1002861
  2411. const m_XK_braille_dots_1678 = 0x10028e1
  2412. const m_XK_braille_dots_168 = 0x10028a1
  2413. const m_XK_braille_dots_17 = 0x1002841
  2414. const m_XK_braille_dots_178 = 0x10028c1
  2415. const m_XK_braille_dots_18 = 0x1002881
  2416. const m_XK_braille_dots_2 = 0x1002802
  2417. const m_XK_braille_dots_23 = 0x1002806
  2418. const m_XK_braille_dots_234 = 0x100280e
  2419. const m_XK_braille_dots_2345 = 0x100281e
  2420. const m_XK_braille_dots_23456 = 0x100283e
  2421. const m_XK_braille_dots_234567 = 0x100287e
  2422. const m_XK_braille_dots_2345678 = 0x10028fe
  2423. const m_XK_braille_dots_234568 = 0x10028be
  2424. const m_XK_braille_dots_23457 = 0x100285e
  2425. const m_XK_braille_dots_234578 = 0x10028de
  2426. const m_XK_braille_dots_23458 = 0x100289e
  2427. const m_XK_braille_dots_2346 = 0x100282e
  2428. const m_XK_braille_dots_23467 = 0x100286e
  2429. const m_XK_braille_dots_234678 = 0x10028ee
  2430. const m_XK_braille_dots_23468 = 0x10028ae
  2431. const m_XK_braille_dots_2347 = 0x100284e
  2432. const m_XK_braille_dots_23478 = 0x10028ce
  2433. const m_XK_braille_dots_2348 = 0x100288e
  2434. const m_XK_braille_dots_235 = 0x1002816
  2435. const m_XK_braille_dots_2356 = 0x1002836
  2436. const m_XK_braille_dots_23567 = 0x1002876
  2437. const m_XK_braille_dots_235678 = 0x10028f6
  2438. const m_XK_braille_dots_23568 = 0x10028b6
  2439. const m_XK_braille_dots_2357 = 0x1002856
  2440. const m_XK_braille_dots_23578 = 0x10028d6
  2441. const m_XK_braille_dots_2358 = 0x1002896
  2442. const m_XK_braille_dots_236 = 0x1002826
  2443. const m_XK_braille_dots_2367 = 0x1002866
  2444. const m_XK_braille_dots_23678 = 0x10028e6
  2445. const m_XK_braille_dots_2368 = 0x10028a6
  2446. const m_XK_braille_dots_237 = 0x1002846
  2447. const m_XK_braille_dots_2378 = 0x10028c6
  2448. const m_XK_braille_dots_238 = 0x1002886
  2449. const m_XK_braille_dots_24 = 0x100280a
  2450. const m_XK_braille_dots_245 = 0x100281a
  2451. const m_XK_braille_dots_2456 = 0x100283a
  2452. const m_XK_braille_dots_24567 = 0x100287a
  2453. const m_XK_braille_dots_245678 = 0x10028fa
  2454. const m_XK_braille_dots_24568 = 0x10028ba
  2455. const m_XK_braille_dots_2457 = 0x100285a
  2456. const m_XK_braille_dots_24578 = 0x10028da
  2457. const m_XK_braille_dots_2458 = 0x100289a
  2458. const m_XK_braille_dots_246 = 0x100282a
  2459. const m_XK_braille_dots_2467 = 0x100286a
  2460. const m_XK_braille_dots_24678 = 0x10028ea
  2461. const m_XK_braille_dots_2468 = 0x10028aa
  2462. const m_XK_braille_dots_247 = 0x100284a
  2463. const m_XK_braille_dots_2478 = 0x10028ca
  2464. const m_XK_braille_dots_248 = 0x100288a
  2465. const m_XK_braille_dots_25 = 0x1002812
  2466. const m_XK_braille_dots_256 = 0x1002832
  2467. const m_XK_braille_dots_2567 = 0x1002872
  2468. const m_XK_braille_dots_25678 = 0x10028f2
  2469. const m_XK_braille_dots_2568 = 0x10028b2
  2470. const m_XK_braille_dots_257 = 0x1002852
  2471. const m_XK_braille_dots_2578 = 0x10028d2
  2472. const m_XK_braille_dots_258 = 0x1002892
  2473. const m_XK_braille_dots_26 = 0x1002822
  2474. const m_XK_braille_dots_267 = 0x1002862
  2475. const m_XK_braille_dots_2678 = 0x10028e2
  2476. const m_XK_braille_dots_268 = 0x10028a2
  2477. const m_XK_braille_dots_27 = 0x1002842
  2478. const m_XK_braille_dots_278 = 0x10028c2
  2479. const m_XK_braille_dots_28 = 0x1002882
  2480. const m_XK_braille_dots_3 = 0x1002804
  2481. const m_XK_braille_dots_34 = 0x100280c
  2482. const m_XK_braille_dots_345 = 0x100281c
  2483. const m_XK_braille_dots_3456 = 0x100283c
  2484. const m_XK_braille_dots_34567 = 0x100287c
  2485. const m_XK_braille_dots_345678 = 0x10028fc
  2486. const m_XK_braille_dots_34568 = 0x10028bc
  2487. const m_XK_braille_dots_3457 = 0x100285c
  2488. const m_XK_braille_dots_34578 = 0x10028dc
  2489. const m_XK_braille_dots_3458 = 0x100289c
  2490. const m_XK_braille_dots_346 = 0x100282c
  2491. const m_XK_braille_dots_3467 = 0x100286c
  2492. const m_XK_braille_dots_34678 = 0x10028ec
  2493. const m_XK_braille_dots_3468 = 0x10028ac
  2494. const m_XK_braille_dots_347 = 0x100284c
  2495. const m_XK_braille_dots_3478 = 0x10028cc
  2496. const m_XK_braille_dots_348 = 0x100288c
  2497. const m_XK_braille_dots_35 = 0x1002814
  2498. const m_XK_braille_dots_356 = 0x1002834
  2499. const m_XK_braille_dots_3567 = 0x1002874
  2500. const m_XK_braille_dots_35678 = 0x10028f4
  2501. const m_XK_braille_dots_3568 = 0x10028b4
  2502. const m_XK_braille_dots_357 = 0x1002854
  2503. const m_XK_braille_dots_3578 = 0x10028d4
  2504. const m_XK_braille_dots_358 = 0x1002894
  2505. const m_XK_braille_dots_36 = 0x1002824
  2506. const m_XK_braille_dots_367 = 0x1002864
  2507. const m_XK_braille_dots_3678 = 0x10028e4
  2508. const m_XK_braille_dots_368 = 0x10028a4
  2509. const m_XK_braille_dots_37 = 0x1002844
  2510. const m_XK_braille_dots_378 = 0x10028c4
  2511. const m_XK_braille_dots_38 = 0x1002884
  2512. const m_XK_braille_dots_4 = 0x1002808
  2513. const m_XK_braille_dots_45 = 0x1002818
  2514. const m_XK_braille_dots_456 = 0x1002838
  2515. const m_XK_braille_dots_4567 = 0x1002878
  2516. const m_XK_braille_dots_45678 = 0x10028f8
  2517. const m_XK_braille_dots_4568 = 0x10028b8
  2518. const m_XK_braille_dots_457 = 0x1002858
  2519. const m_XK_braille_dots_4578 = 0x10028d8
  2520. const m_XK_braille_dots_458 = 0x1002898
  2521. const m_XK_braille_dots_46 = 0x1002828
  2522. const m_XK_braille_dots_467 = 0x1002868
  2523. const m_XK_braille_dots_4678 = 0x10028e8
  2524. const m_XK_braille_dots_468 = 0x10028a8
  2525. const m_XK_braille_dots_47 = 0x1002848
  2526. const m_XK_braille_dots_478 = 0x10028c8
  2527. const m_XK_braille_dots_48 = 0x1002888
  2528. const m_XK_braille_dots_5 = 0x1002810
  2529. const m_XK_braille_dots_56 = 0x1002830
  2530. const m_XK_braille_dots_567 = 0x1002870
  2531. const m_XK_braille_dots_5678 = 0x10028f0
  2532. const m_XK_braille_dots_568 = 0x10028b0
  2533. const m_XK_braille_dots_57 = 0x1002850
  2534. const m_XK_braille_dots_578 = 0x10028d0
  2535. const m_XK_braille_dots_58 = 0x1002890
  2536. const m_XK_braille_dots_6 = 0x1002820
  2537. const m_XK_braille_dots_67 = 0x1002860
  2538. const m_XK_braille_dots_678 = 0x10028e0
  2539. const m_XK_braille_dots_68 = 0x10028a0
  2540. const m_XK_braille_dots_7 = 0x1002840
  2541. const m_XK_braille_dots_78 = 0x10028c0
  2542. const m_XK_braille_dots_8 = 0x1002880
  2543. const m_XK_breve = 0x01a2
  2544. const m_XK_brokenbar = 0x00a6
  2545. const m_XK_c = 0x0063
  2546. const m_XK_c_h = 0xfea3
  2547. const m_XK_cabovedot = 0x02e5
  2548. const m_XK_cacute = 0x01e6
  2549. const m_XK_caron = 0x01b7
  2550. const m_XK_ccaron = 0x01e8
  2551. const m_XK_ccedilla = 0x00e7
  2552. const m_XK_ccircumflex = 0x02e6
  2553. const m_XK_cedilla = 0x00b8
  2554. const m_XK_cent = 0x00a2
  2555. const m_XK_ch = 0xfea0
  2556. const m_XK_colon = 0x003a
  2557. const m_XK_combining_acute = 0x1000301
  2558. const m_XK_combining_belowdot = 0x1000323
  2559. const m_XK_combining_grave = 0x1000300
  2560. const m_XK_combining_hook = 0x1000309
  2561. const m_XK_combining_tilde = 0x1000303
  2562. const m_XK_comma = 0x002c
  2563. const m_XK_containsas = 0x100220B
  2564. const m_XK_copyright = 0x00a9
  2565. const m_XK_cuberoot = 0x100221B
  2566. const m_XK_currency = 0x00a4
  2567. const m_XK_d = 0x0064
  2568. const m_XK_dabovedot = 0x1001e0b
  2569. const m_XK_dcaron = 0x01ef
  2570. const m_XK_dead_A = 0xfe81
  2571. const m_XK_dead_E = 0xfe83
  2572. const m_XK_dead_I = 0xfe85
  2573. const m_XK_dead_O = 0xfe87
  2574. const m_XK_dead_U = 0xfe89
  2575. const m_XK_dead_a = 0xfe80
  2576. const m_XK_dead_abovecomma = 0xfe64
  2577. const m_XK_dead_abovedot = 0xfe56
  2578. const m_XK_dead_abovereversedcomma = 0xfe65
  2579. const m_XK_dead_abovering = 0xfe58
  2580. const m_XK_dead_aboveverticalline = 0xfe91
  2581. const m_XK_dead_acute = 0xfe51
  2582. const m_XK_dead_belowbreve = 0xfe6b
  2583. const m_XK_dead_belowcircumflex = 0xfe69
  2584. const m_XK_dead_belowcomma = 0xfe6e
  2585. const m_XK_dead_belowdiaeresis = 0xfe6c
  2586. const m_XK_dead_belowdot = 0xfe60
  2587. const m_XK_dead_belowmacron = 0xfe68
  2588. const m_XK_dead_belowring = 0xfe67
  2589. const m_XK_dead_belowtilde = 0xfe6a
  2590. const m_XK_dead_belowverticalline = 0xfe92
  2591. const m_XK_dead_breve = 0xfe55
  2592. const m_XK_dead_capital_schwa = 0xfe8b
  2593. const m_XK_dead_caron = 0xfe5a
  2594. const m_XK_dead_cedilla = 0xfe5b
  2595. const m_XK_dead_circumflex = 0xfe52
  2596. const m_XK_dead_currency = 0xfe6f
  2597. const m_XK_dead_dasia = 0xfe65
  2598. const m_XK_dead_diaeresis = 0xfe57
  2599. const m_XK_dead_doubleacute = 0xfe59
  2600. const m_XK_dead_doublegrave = 0xfe66
  2601. const m_XK_dead_e = 0xfe82
  2602. const m_XK_dead_grave = 0xfe50
  2603. const m_XK_dead_greek = 0xfe8c
  2604. const m_XK_dead_hook = 0xfe61
  2605. const m_XK_dead_horn = 0xfe62
  2606. const m_XK_dead_i = 0xfe84
  2607. const m_XK_dead_invertedbreve = 0xfe6d
  2608. const m_XK_dead_iota = 0xfe5d
  2609. const m_XK_dead_longsolidusoverlay = 0xfe93
  2610. const m_XK_dead_lowline = 0xfe90
  2611. const m_XK_dead_macron = 0xfe54
  2612. const m_XK_dead_o = 0xfe86
  2613. const m_XK_dead_ogonek = 0xfe5c
  2614. const m_XK_dead_perispomeni = 0xfe53
  2615. const m_XK_dead_psili = 0xfe64
  2616. const m_XK_dead_semivoiced_sound = 0xfe5f
  2617. const m_XK_dead_small_schwa = 0xfe8a
  2618. const m_XK_dead_stroke = 0xfe63
  2619. const m_XK_dead_tilde = 0xfe53
  2620. const m_XK_dead_u = 0xfe88
  2621. const m_XK_dead_voiced_sound = 0xfe5e
  2622. const m_XK_degree = 0x00b0
  2623. const m_XK_diaeresis = 0x00a8
  2624. const m_XK_dintegral = 0x100222C
  2625. const m_XK_division = 0x00f7
  2626. const m_XK_dollar = 0x0024
  2627. const m_XK_doubleacute = 0x01bd
  2628. const m_XK_dstroke = 0x01f0
  2629. const m_XK_e = 0x0065
  2630. const m_XK_eabovedot = 0x03ec
  2631. const m_XK_eacute = 0x00e9
  2632. const m_XK_ebelowdot = 0x1001eb9
  2633. const m_XK_ecaron = 0x01ec
  2634. const m_XK_ecircumflex = 0x00ea
  2635. const m_XK_ecircumflexacute = 0x1001ebf
  2636. const m_XK_ecircumflexbelowdot = 0x1001ec7
  2637. const m_XK_ecircumflexgrave = 0x1001ec1
  2638. const m_XK_ecircumflexhook = 0x1001ec3
  2639. const m_XK_ecircumflextilde = 0x1001ec5
  2640. const m_XK_ediaeresis = 0x00eb
  2641. const m_XK_egrave = 0x00e8
  2642. const m_XK_ehook = 0x1001ebb
  2643. const m_XK_eightsubscript = 0x1002088
  2644. const m_XK_eightsuperior = 0x1002078
  2645. const m_XK_elementof = 0x1002208
  2646. const m_XK_emacron = 0x03ba
  2647. const m_XK_emptyset = 0x1002205
  2648. const m_XK_eng = 0x03bf
  2649. const m_XK_eogonek = 0x01ea
  2650. const m_XK_equal = 0x003d
  2651. const m_XK_eth = 0x00f0
  2652. const m_XK_etilde = 0x1001ebd
  2653. const m_XK_exclam = 0x0021
  2654. const m_XK_exclamdown = 0x00a1
  2655. const m_XK_ezh = 0x1000292
  2656. const m_XK_f = 0x0066
  2657. const m_XK_fabovedot = 0x1001e1f
  2658. const m_XK_fivesubscript = 0x1002085
  2659. const m_XK_fivesuperior = 0x1002075
  2660. const m_XK_foursubscript = 0x1002084
  2661. const m_XK_foursuperior = 0x1002074
  2662. const m_XK_fourthroot = 0x100221C
  2663. const m_XK_g = 0x0067
  2664. const m_XK_gabovedot = 0x02f5
  2665. const m_XK_gbreve = 0x02bb
  2666. const m_XK_gcaron = 0x10001e7
  2667. const m_XK_gcedilla = 0x03bb
  2668. const m_XK_gcircumflex = 0x02f8
  2669. const m_XK_grave = 0x0060
  2670. const m_XK_greater = 0x003e
  2671. const m_XK_guillemotleft = 0x00ab
  2672. const m_XK_guillemotright = 0x00bb
  2673. const m_XK_h = 0x0068
  2674. const m_XK_hcircumflex = 0x02b6
  2675. const m_XK_hebrew_aleph = 0x0ce0
  2676. const m_XK_hebrew_ayin = 0x0cf2
  2677. const m_XK_hebrew_bet = 0x0ce1
  2678. const m_XK_hebrew_beth = 0x0ce1
  2679. const m_XK_hebrew_chet = 0x0ce7
  2680. const m_XK_hebrew_dalet = 0x0ce3
  2681. const m_XK_hebrew_daleth = 0x0ce3
  2682. const m_XK_hebrew_doublelowline = 0x0cdf
  2683. const m_XK_hebrew_finalkaph = 0x0cea
  2684. const m_XK_hebrew_finalmem = 0x0ced
  2685. const m_XK_hebrew_finalnun = 0x0cef
  2686. const m_XK_hebrew_finalpe = 0x0cf3
  2687. const m_XK_hebrew_finalzade = 0x0cf5
  2688. const m_XK_hebrew_finalzadi = 0x0cf5
  2689. const m_XK_hebrew_gimel = 0x0ce2
  2690. const m_XK_hebrew_gimmel = 0x0ce2
  2691. const m_XK_hebrew_he = 0x0ce4
  2692. const m_XK_hebrew_het = 0x0ce7
  2693. const m_XK_hebrew_kaph = 0x0ceb
  2694. const m_XK_hebrew_kuf = 0x0cf7
  2695. const m_XK_hebrew_lamed = 0x0cec
  2696. const m_XK_hebrew_mem = 0x0cee
  2697. const m_XK_hebrew_nun = 0x0cf0
  2698. const m_XK_hebrew_pe = 0x0cf4
  2699. const m_XK_hebrew_qoph = 0x0cf7
  2700. const m_XK_hebrew_resh = 0x0cf8
  2701. const m_XK_hebrew_samech = 0x0cf1
  2702. const m_XK_hebrew_samekh = 0x0cf1
  2703. const m_XK_hebrew_shin = 0x0cf9
  2704. const m_XK_hebrew_taf = 0x0cfa
  2705. const m_XK_hebrew_taw = 0x0cfa
  2706. const m_XK_hebrew_tet = 0x0ce8
  2707. const m_XK_hebrew_teth = 0x0ce8
  2708. const m_XK_hebrew_waw = 0x0ce5
  2709. const m_XK_hebrew_yod = 0x0ce9
  2710. const m_XK_hebrew_zade = 0x0cf6
  2711. const m_XK_hebrew_zadi = 0x0cf6
  2712. const m_XK_hebrew_zain = 0x0ce6
  2713. const m_XK_hebrew_zayin = 0x0ce6
  2714. const m_XK_hstroke = 0x02b1
  2715. const m_XK_hyphen = 0x00ad
  2716. const m_XK_i = 0x0069
  2717. const m_XK_iacute = 0x00ed
  2718. const m_XK_ibelowdot = 0x1001ecb
  2719. const m_XK_ibreve = 0x100012d
  2720. const m_XK_icircumflex = 0x00ee
  2721. const m_XK_idiaeresis = 0x00ef
  2722. const m_XK_idotless = 0x02b9
  2723. const m_XK_igrave = 0x00ec
  2724. const m_XK_ihook = 0x1001ec9
  2725. const m_XK_imacron = 0x03ef
  2726. const m_XK_iogonek = 0x03e7
  2727. const m_XK_itilde = 0x03b5
  2728. const m_XK_j = 0x006a
  2729. const m_XK_jcircumflex = 0x02bc
  2730. const m_XK_k = 0x006b
  2731. const m_XK_kana_A = 0x04b1
  2732. const m_XK_kana_CHI = 0x04c1
  2733. const m_XK_kana_E = 0x04b4
  2734. const m_XK_kana_FU = 0x04cc
  2735. const m_XK_kana_HA = 0x04ca
  2736. const m_XK_kana_HE = 0x04cd
  2737. const m_XK_kana_HI = 0x04cb
  2738. const m_XK_kana_HO = 0x04ce
  2739. const m_XK_kana_HU = 0x04cc
  2740. const m_XK_kana_I = 0x04b2
  2741. const m_XK_kana_KA = 0x04b6
  2742. const m_XK_kana_KE = 0x04b9
  2743. const m_XK_kana_KI = 0x04b7
  2744. const m_XK_kana_KO = 0x04ba
  2745. const m_XK_kana_KU = 0x04b8
  2746. const m_XK_kana_MA = 0x04cf
  2747. const m_XK_kana_ME = 0x04d2
  2748. const m_XK_kana_MI = 0x04d0
  2749. const m_XK_kana_MO = 0x04d3
  2750. const m_XK_kana_MU = 0x04d1
  2751. const m_XK_kana_N = 0x04dd
  2752. const m_XK_kana_NA = 0x04c5
  2753. const m_XK_kana_NE = 0x04c8
  2754. const m_XK_kana_NI = 0x04c6
  2755. const m_XK_kana_NO = 0x04c9
  2756. const m_XK_kana_NU = 0x04c7
  2757. const m_XK_kana_O = 0x04b5
  2758. const m_XK_kana_RA = 0x04d7
  2759. const m_XK_kana_RE = 0x04da
  2760. const m_XK_kana_RI = 0x04d8
  2761. const m_XK_kana_RO = 0x04db
  2762. const m_XK_kana_RU = 0x04d9
  2763. const m_XK_kana_SA = 0x04bb
  2764. const m_XK_kana_SE = 0x04be
  2765. const m_XK_kana_SHI = 0x04bc
  2766. const m_XK_kana_SO = 0x04bf
  2767. const m_XK_kana_SU = 0x04bd
  2768. const m_XK_kana_TA = 0x04c0
  2769. const m_XK_kana_TE = 0x04c3
  2770. const m_XK_kana_TI = 0x04c1
  2771. const m_XK_kana_TO = 0x04c4
  2772. const m_XK_kana_TSU = 0x04c2
  2773. const m_XK_kana_TU = 0x04c2
  2774. const m_XK_kana_U = 0x04b3
  2775. const m_XK_kana_WA = 0x04dc
  2776. const m_XK_kana_WO = 0x04a6
  2777. const m_XK_kana_YA = 0x04d4
  2778. const m_XK_kana_YO = 0x04d6
  2779. const m_XK_kana_YU = 0x04d5
  2780. const m_XK_kana_a = 0x04a7
  2781. const m_XK_kana_closingbracket = 0x04a3
  2782. const m_XK_kana_comma = 0x04a4
  2783. const m_XK_kana_conjunctive = 0x04a5
  2784. const m_XK_kana_e = 0x04aa
  2785. const m_XK_kana_fullstop = 0x04a1
  2786. const m_XK_kana_i = 0x04a8
  2787. const m_XK_kana_middledot = 0x04a5
  2788. const m_XK_kana_o = 0x04ab
  2789. const m_XK_kana_openingbracket = 0x04a2
  2790. const m_XK_kana_switch = 0xff7e
  2791. const m_XK_kana_tsu = 0x04af
  2792. const m_XK_kana_tu = 0x04af
  2793. const m_XK_kana_u = 0x04a9
  2794. const m_XK_kana_ya = 0x04ac
  2795. const m_XK_kana_yo = 0x04ae
  2796. const m_XK_kana_yu = 0x04ad
  2797. const m_XK_kappa = 0x03a2
  2798. const m_XK_kcedilla = 0x03f3
  2799. const m_XK_kra = 0x03a2
  2800. const m_XK_l = 0x006c
  2801. const m_XK_lacute = 0x01e5
  2802. const m_XK_lbelowdot = 0x1001e37
  2803. const m_XK_lcaron = 0x01b5
  2804. const m_XK_lcedilla = 0x03b6
  2805. const m_XK_less = 0x003c
  2806. const m_XK_lstroke = 0x01b3
  2807. const m_XK_m = 0x006d
  2808. const m_XK_mabovedot = 0x1001e41
  2809. const m_XK_macron = 0x00af
  2810. const m_XK_masculine = 0x00ba
  2811. const m_XK_minus = 0x002d
  2812. const m_XK_mu = 0x00b5
  2813. const m_XK_multiply = 0x00d7
  2814. const m_XK_n = 0x006e
  2815. const m_XK_nacute = 0x01f1
  2816. const m_XK_ncaron = 0x01f2
  2817. const m_XK_ncedilla = 0x03f1
  2818. const m_XK_ninesubscript = 0x1002089
  2819. const m_XK_ninesuperior = 0x1002079
  2820. const m_XK_nobreakspace = 0x00a0
  2821. const m_XK_notapproxeq = 0x1002247
  2822. const m_XK_notelementof = 0x1002209
  2823. const m_XK_notidentical = 0x1002262
  2824. const m_XK_notsign = 0x00ac
  2825. const m_XK_ntilde = 0x00f1
  2826. const m_XK_numbersign = 0x0023
  2827. const m_XK_numerosign = 0x06b0
  2828. const m_XK_o = 0x006f
  2829. const m_XK_oacute = 0x00f3
  2830. const m_XK_obarred = 0x1000275
  2831. const m_XK_obelowdot = 0x1001ecd
  2832. const m_XK_ocaron = 0x10001d2
  2833. const m_XK_ocircumflex = 0x00f4
  2834. const m_XK_ocircumflexacute = 0x1001ed1
  2835. const m_XK_ocircumflexbelowdot = 0x1001ed9
  2836. const m_XK_ocircumflexgrave = 0x1001ed3
  2837. const m_XK_ocircumflexhook = 0x1001ed5
  2838. const m_XK_ocircumflextilde = 0x1001ed7
  2839. const m_XK_odiaeresis = 0x00f6
  2840. const m_XK_odoubleacute = 0x01f5
  2841. const m_XK_oe = 0x13bd
  2842. const m_XK_ogonek = 0x01b2
  2843. const m_XK_ograve = 0x00f2
  2844. const m_XK_ohook = 0x1001ecf
  2845. const m_XK_ohorn = 0x10001a1
  2846. const m_XK_ohornacute = 0x1001edb
  2847. const m_XK_ohornbelowdot = 0x1001ee3
  2848. const m_XK_ohorngrave = 0x1001edd
  2849. const m_XK_ohornhook = 0x1001edf
  2850. const m_XK_ohorntilde = 0x1001ee1
  2851. const m_XK_omacron = 0x03f2
  2852. const m_XK_onehalf = 0x00bd
  2853. const m_XK_onequarter = 0x00bc
  2854. const m_XK_onesubscript = 0x1002081
  2855. const m_XK_onesuperior = 0x00b9
  2856. const m_XK_ooblique = 0x00f8
  2857. const m_XK_ordfeminine = 0x00aa
  2858. const m_XK_oslash = 0x00f8
  2859. const m_XK_otilde = 0x00f5
  2860. const m_XK_overline = 0x047e
  2861. const m_XK_p = 0x0070
  2862. const m_XK_pabovedot = 0x1001e57
  2863. const m_XK_paragraph = 0x00b6
  2864. const m_XK_parenleft = 0x0028
  2865. const m_XK_parenright = 0x0029
  2866. const m_XK_partdifferential = 0x1002202
  2867. const m_XK_percent = 0x0025
  2868. const m_XK_period = 0x002e
  2869. const m_XK_periodcentered = 0x00b7
  2870. const m_XK_plus = 0x002b
  2871. const m_XK_plusminus = 0x00b1
  2872. const m_XK_prolongedsound = 0x04b0
  2873. const m_XK_q = 0x0071
  2874. const m_XK_question = 0x003f
  2875. const m_XK_questiondown = 0x00bf
  2876. const m_XK_quotedbl = 0x0022
  2877. const m_XK_quoteleft = 0x0060
  2878. const m_XK_quoteright = 0x0027
  2879. const m_XK_r = 0x0072
  2880. const m_XK_racute = 0x01e0
  2881. const m_XK_rcaron = 0x01f8
  2882. const m_XK_rcedilla = 0x03b3
  2883. const m_XK_registered = 0x00ae
  2884. const m_XK_s = 0x0073
  2885. const m_XK_sabovedot = 0x1001e61
  2886. const m_XK_sacute = 0x01b6
  2887. const m_XK_scaron = 0x01b9
  2888. const m_XK_scedilla = 0x01ba
  2889. const m_XK_schwa = 0x1000259
  2890. const m_XK_scircumflex = 0x02fe
  2891. const m_XK_script_switch = 0xff7e
  2892. const m_XK_section = 0x00a7
  2893. const m_XK_semicolon = 0x003b
  2894. const m_XK_semivoicedsound = 0x04df
  2895. const m_XK_sevensubscript = 0x1002087
  2896. const m_XK_sevensuperior = 0x1002077
  2897. const m_XK_sixsubscript = 0x1002086
  2898. const m_XK_sixsuperior = 0x1002076
  2899. const m_XK_slash = 0x002f
  2900. const m_XK_space = 0x0020
  2901. const m_XK_squareroot = 0x100221A
  2902. const m_XK_ssharp = 0x00df
  2903. const m_XK_sterling = 0x00a3
  2904. const m_XK_stricteq = 0x1002263
  2905. const m_XK_t = 0x0074
  2906. const m_XK_tabovedot = 0x1001e6b
  2907. const m_XK_tcaron = 0x01bb
  2908. const m_XK_tcedilla = 0x01fe
  2909. const m_XK_thorn = 0x00fe
  2910. const m_XK_threequarters = 0x00be
  2911. const m_XK_threesubscript = 0x1002083
  2912. const m_XK_threesuperior = 0x00b3
  2913. const m_XK_tintegral = 0x100222D
  2914. const m_XK_tslash = 0x03bc
  2915. const m_XK_twosubscript = 0x1002082
  2916. const m_XK_twosuperior = 0x00b2
  2917. const m_XK_u = 0x0075
  2918. const m_XK_uacute = 0x00fa
  2919. const m_XK_ubelowdot = 0x1001ee5
  2920. const m_XK_ubreve = 0x02fd
  2921. const m_XK_ucircumflex = 0x00fb
  2922. const m_XK_udiaeresis = 0x00fc
  2923. const m_XK_udoubleacute = 0x01fb
  2924. const m_XK_ugrave = 0x00f9
  2925. const m_XK_uhook = 0x1001ee7
  2926. const m_XK_uhorn = 0x10001b0
  2927. const m_XK_uhornacute = 0x1001ee9
  2928. const m_XK_uhornbelowdot = 0x1001ef1
  2929. const m_XK_uhorngrave = 0x1001eeb
  2930. const m_XK_uhornhook = 0x1001eed
  2931. const m_XK_uhorntilde = 0x1001eef
  2932. const m_XK_umacron = 0x03fe
  2933. const m_XK_underscore = 0x005f
  2934. const m_XK_uogonek = 0x03f9
  2935. const m_XK_uring = 0x01f9
  2936. const m_XK_utilde = 0x03fd
  2937. const m_XK_v = 0x0076
  2938. const m_XK_voicedsound = 0x04de
  2939. const m_XK_w = 0x0077
  2940. const m_XK_wacute = 0x1001e83
  2941. const m_XK_wcircumflex = 0x1000175
  2942. const m_XK_wdiaeresis = 0x1001e85
  2943. const m_XK_wgrave = 0x1001e81
  2944. const m_XK_x = 0x0078
  2945. const m_XK_xabovedot = 0x1001e8b
  2946. const m_XK_y = 0x0079
  2947. const m_XK_yacute = 0x00fd
  2948. const m_XK_ybelowdot = 0x1001ef5
  2949. const m_XK_ycircumflex = 0x1000177
  2950. const m_XK_ydiaeresis = 0x00ff
  2951. const m_XK_yen = 0x00a5
  2952. const m_XK_ygrave = 0x1001ef3
  2953. const m_XK_yhook = 0x1001ef7
  2954. const m_XK_ytilde = 0x1001ef9
  2955. const m_XK_z = 0x007a
  2956. const m_XK_zabovedot = 0x01bf
  2957. const m_XK_zacute = 0x01bc
  2958. const m_XK_zcaron = 0x01be
  2959. const m_XK_zerosubscript = 0x1002080
  2960. const m_XK_zerosuperior = 0x1002070
  2961. const m_XK_zstroke = 0x10001b6
  2962. const m_XLookupBoth = 4
  2963. const m_XLookupChars = 2
  2964. const m_XLookupKeySym = 3
  2965. const m_XLookupNone = 1
  2966. const m_XMD_H = 1
  2967. const m_XMUTEX_INITIALIZER = "PTHREAD_MUTEX_INITIALIZER"
  2968. const m_XNArea = "area"
  2969. const m_XNAreaNeeded = "areaNeeded"
  2970. const m_XNBackground = "background"
  2971. const m_XNBackgroundPixmap = "backgroundPixmap"
  2972. const m_XNBaseFontName = "baseFontName"
  2973. const m_XNClientWindow = "clientWindow"
  2974. const m_XNColormap = "colorMap"
  2975. const m_XNContextualDrawing = "contextualDrawing"
  2976. const m_XNCursor = "cursor"
  2977. const m_XNDefaultString = "defaultString"
  2978. const m_XNDestroyCallback = "destroyCallback"
  2979. const m_XNDirectionalDependentDrawing = "directionalDependentDrawing"
  2980. const m_XNFilterEvents = "filterEvents"
  2981. const m_XNFocusWindow = "focusWindow"
  2982. const m_XNFontInfo = "fontInfo"
  2983. const m_XNFontSet = "fontSet"
  2984. const m_XNForeground = "foreground"
  2985. const m_XNGeometryCallback = "geometryCallback"
  2986. const m_XNHotKey = "hotKey"
  2987. const m_XNHotKeyState = "hotKeyState"
  2988. const m_XNInputStyle = "inputStyle"
  2989. const m_XNLineSpace = "lineSpace"
  2990. const m_XNMissingCharSet = "missingCharSet"
  2991. const m_XNOMAutomatic = "omAutomatic"
  2992. const m_XNOrientation = "orientation"
  2993. const m_XNPreeditAttributes = "preeditAttributes"
  2994. const m_XNPreeditCaretCallback = "preeditCaretCallback"
  2995. const m_XNPreeditDoneCallback = "preeditDoneCallback"
  2996. const m_XNPreeditDrawCallback = "preeditDrawCallback"
  2997. const m_XNPreeditStartCallback = "preeditStartCallback"
  2998. const m_XNPreeditState = "preeditState"
  2999. const m_XNPreeditStateNotifyCallback = "preeditStateNotifyCallback"
  3000. const m_XNQueryICValuesList = "queryICValuesList"
  3001. const m_XNQueryIMValuesList = "queryIMValuesList"
  3002. const m_XNQueryInputStyle = "queryInputStyle"
  3003. const m_XNQueryOrientation = "queryOrientation"
  3004. const m_XNR6PreeditCallback = "r6PreeditCallback"
  3005. const m_XNRequiredCharSet = "requiredCharSet"
  3006. const m_XNResetState = "resetState"
  3007. const m_XNResourceClass = "resourceClass"
  3008. const m_XNResourceName = "resourceName"
  3009. const m_XNSeparatorofNestedList = "separatorofNestedList"
  3010. const m_XNSpotLocation = "spotLocation"
  3011. const m_XNStatusAttributes = "statusAttributes"
  3012. const m_XNStatusDoneCallback = "statusDoneCallback"
  3013. const m_XNStatusDrawCallback = "statusDrawCallback"
  3014. const m_XNStatusStartCallback = "statusStartCallback"
  3015. const m_XNStdColormap = "stdColorMap"
  3016. const m_XNStringConversion = "stringConversion"
  3017. const m_XNStringConversionCallback = "stringConversionCallback"
  3018. const m_XNVaNestedList = "XNVaNestedList"
  3019. const m_XNVisiblePosition = "visiblePosition"
  3020. const m_XNegative = 0x0010
  3021. const m_XTHREADS = 1
  3022. const m_XUSE_MTSAFE_API = 1
  3023. const m_XValue = 0x0001
  3024. const m_XYBitmap = 0
  3025. const m_XYPixmap = 1
  3026. const m_X_AllocColor = 84
  3027. const m_X_AllocColorCells = 86
  3028. const m_X_AllocColorPlanes = 87
  3029. const m_X_AllocNamedColor = 85
  3030. const m_X_AllowEvents = 35
  3031. const m_X_Bell = 104
  3032. const m_X_ChangeActivePointerGrab = 30
  3033. const m_X_ChangeGC = 56
  3034. const m_X_ChangeHosts = 109
  3035. const m_X_ChangeKeyboardControl = 102
  3036. const m_X_ChangeKeyboardMapping = 100
  3037. const m_X_ChangePointerControl = 105
  3038. const m_X_ChangeProperty = 18
  3039. const m_X_ChangeSaveSet = 6
  3040. const m_X_ChangeWindowAttributes = 2
  3041. const m_X_CirculateWindow = 13
  3042. const m_X_ClearArea = 61
  3043. const m_X_CloseFont = 46
  3044. const m_X_ConfigureWindow = 12
  3045. const m_X_ConvertSelection = 24
  3046. const m_X_CopyArea = 62
  3047. const m_X_CopyColormapAndFree = 80
  3048. const m_X_CopyGC = 57
  3049. const m_X_CopyPlane = 63
  3050. const m_X_CreateColormap = 78
  3051. const m_X_CreateCursor = 93
  3052. const m_X_CreateGC = 55
  3053. const m_X_CreateGlyphCursor = 94
  3054. const m_X_CreatePixmap = 53
  3055. const m_X_CreateWindow = 1
  3056. const m_X_DeleteProperty = 19
  3057. const m_X_DestroySubwindows = 5
  3058. const m_X_DestroyWindow = 4
  3059. const m_X_Error = 0
  3060. const m_X_FillPoly = 69
  3061. const m_X_ForceScreenSaver = 115
  3062. const m_X_FreeColormap = 79
  3063. const m_X_FreeColors = 88
  3064. const m_X_FreeCursor = 95
  3065. const m_X_FreeGC = 60
  3066. const m_X_FreePixmap = 54
  3067. const m_X_GetAtomName = 17
  3068. const m_X_GetFontPath = 52
  3069. const m_X_GetGeometry = 14
  3070. const m_X_GetImage = 73
  3071. const m_X_GetInputFocus = 43
  3072. const m_X_GetKeyboardControl = 103
  3073. const m_X_GetKeyboardMapping = 101
  3074. const m_X_GetModifierMapping = 119
  3075. const m_X_GetMotionEvents = 39
  3076. const m_X_GetPointerControl = 106
  3077. const m_X_GetPointerMapping = 117
  3078. const m_X_GetProperty = 20
  3079. const m_X_GetScreenSaver = 108
  3080. const m_X_GetSelectionOwner = 23
  3081. const m_X_GetWindowAttributes = 3
  3082. const m_X_GrabButton = 28
  3083. const m_X_GrabKey = 33
  3084. const m_X_GrabKeyboard = 31
  3085. const m_X_GrabPointer = 26
  3086. const m_X_GrabServer = 36
  3087. const m_X_HAVE_UTF8_STRING = 1
  3088. const m_X_ImageText16 = 77
  3089. const m_X_ImageText8 = 76
  3090. const m_X_InstallColormap = 81
  3091. const m_X_InternAtom = 16
  3092. const m_X_KillClient = 113
  3093. const m_X_ListExtensions = 99
  3094. const m_X_ListFonts = 49
  3095. const m_X_ListFontsWithInfo = 50
  3096. const m_X_ListHosts = 110
  3097. const m_X_ListInstalledColormaps = 83
  3098. const m_X_ListProperties = 21
  3099. const m_X_LookupColor = 92
  3100. const m_X_MapSubwindows = 9
  3101. const m_X_MapWindow = 8
  3102. const m_X_NoOperation = 127
  3103. const m_X_OpenFont = 45
  3104. const m_X_PROTOCOL = 11
  3105. const m_X_PROTOCOL_REVISION = 0
  3106. const m_X_PolyArc = 68
  3107. const m_X_PolyFillArc = 71
  3108. const m_X_PolyFillRectangle = 70
  3109. const m_X_PolyLine = 65
  3110. const m_X_PolyPoint = 64
  3111. const m_X_PolyRectangle = 67
  3112. const m_X_PolySegment = 66
  3113. const m_X_PolyText16 = 75
  3114. const m_X_PolyText8 = 74
  3115. const m_X_PutImage = 72
  3116. const m_X_QueryBestSize = 97
  3117. const m_X_QueryColors = 91
  3118. const m_X_QueryExtension = 98
  3119. const m_X_QueryFont = 47
  3120. const m_X_QueryKeymap = 44
  3121. const m_X_QueryPointer = 38
  3122. const m_X_QueryTextExtents = 48
  3123. const m_X_QueryTree = 15
  3124. const m_X_RecolorCursor = 96
  3125. const m_X_RenderAddGlyphs = 20
  3126. const m_X_RenderAddGlyphsFromPicture = 21
  3127. const m_X_RenderAddTraps = 32
  3128. const m_X_RenderChangePicture = 5
  3129. const m_X_RenderColorTrapezoids = 14
  3130. const m_X_RenderColorTriangles = 15
  3131. const m_X_RenderComposite = 8
  3132. const m_X_RenderCompositeGlyphs16 = 24
  3133. const m_X_RenderCompositeGlyphs32 = 25
  3134. const m_X_RenderCompositeGlyphs8 = 23
  3135. const m_X_RenderCreateAnimCursor = 31
  3136. const m_X_RenderCreateConicalGradient = 36
  3137. const m_X_RenderCreateCursor = 27
  3138. const m_X_RenderCreateGlyphSet = 17
  3139. const m_X_RenderCreateLinearGradient = 34
  3140. const m_X_RenderCreatePicture = 4
  3141. const m_X_RenderCreateRadialGradient = 35
  3142. const m_X_RenderCreateSolidFill = 33
  3143. const m_X_RenderFillRectangles = 26
  3144. const m_X_RenderFreeGlyphSet = 19
  3145. const m_X_RenderFreeGlyphs = 22
  3146. const m_X_RenderFreePicture = 7
  3147. const m_X_RenderQueryDithers = 3
  3148. const m_X_RenderQueryFilters = 29
  3149. const m_X_RenderQueryPictFormats = 1
  3150. const m_X_RenderQueryPictIndexValues = 2
  3151. const m_X_RenderQueryVersion = 0
  3152. const m_X_RenderReferenceGlyphSet = 18
  3153. const m_X_RenderScale = 9
  3154. const m_X_RenderSetPictureClipRectangles = 6
  3155. const m_X_RenderSetPictureFilter = 30
  3156. const m_X_RenderSetPictureTransform = 28
  3157. const m_X_RenderTrapezoids = 10
  3158. const m_X_RenderTriFan = 13
  3159. const m_X_RenderTriStrip = 12
  3160. const m_X_RenderTriangles = 11
  3161. const m_X_ReparentWindow = 7
  3162. const m_X_Reply = 1
  3163. const m_X_RotateProperties = 114
  3164. const m_X_SendEvent = 25
  3165. const m_X_SetAccessControl = 111
  3166. const m_X_SetClipRectangles = 59
  3167. const m_X_SetCloseDownMode = 112
  3168. const m_X_SetDashes = 58
  3169. const m_X_SetFontPath = 51
  3170. const m_X_SetInputFocus = 42
  3171. const m_X_SetModifierMapping = 118
  3172. const m_X_SetPointerMapping = 116
  3173. const m_X_SetScreenSaver = 107
  3174. const m_X_SetSelectionOwner = 22
  3175. const m_X_StoreColors = 89
  3176. const m_X_StoreNamedColor = 90
  3177. const m_X_TCP_PORT = 6000
  3178. const m_X_TranslateCoords = 40
  3179. const m_X_UngrabButton = 29
  3180. const m_X_UngrabKey = 34
  3181. const m_X_UngrabKeyboard = 32
  3182. const m_X_UngrabPointer = 27
  3183. const m_X_UngrabServer = 37
  3184. const m_X_UninstallColormap = 82
  3185. const m_X_UnmapSubwindows = 11
  3186. const m_X_UnmapWindow = 10
  3187. const m_X_WarpPointer = 41
  3188. const m_XftVersion = "XFT_VERSION"
  3189. const m_XlibSpecificationRelease = 6
  3190. const m_YNegative = 0x0020
  3191. const m_YSorted = 1
  3192. const m_YValue = 0x0002
  3193. const m_YXBanded = 3
  3194. const m_YXSorted = 2
  3195. const m_ZLNSPERBATCH = 1024
  3196. const m_ZPixmap = 2
  3197. const m_ZRCTSPERBATCH = 256
  3198. const m_ZoomState = 2
  3199. const m__GNU_SOURCE = 1
  3200. const m__IOFBF = 0
  3201. const m__IOLBF = 1
  3202. const m__IONBF = 2
  3203. const m__LP64 = 1
  3204. const m__POSIX2_BC_BASE_MAX = 99
  3205. const m__POSIX2_BC_DIM_MAX = 2048
  3206. const m__POSIX2_BC_SCALE_MAX = 99
  3207. const m__POSIX2_BC_STRING_MAX = 1000
  3208. const m__POSIX2_CHARCLASS_NAME_MAX = 14
  3209. const m__POSIX2_COLL_WEIGHTS_MAX = 2
  3210. const m__POSIX2_EXPR_NEST_MAX = 32
  3211. const m__POSIX2_LINE_MAX = 2048
  3212. const m__POSIX2_RE_DUP_MAX = 255
  3213. const m__POSIX_AIO_LISTIO_MAX = 2
  3214. const m__POSIX_AIO_MAX = 1
  3215. const m__POSIX_ARG_MAX = 4096
  3216. const m__POSIX_CHILD_MAX = 25
  3217. const m__POSIX_CLOCKRES_MIN = 20000000
  3218. const m__POSIX_DELAYTIMER_MAX = 32
  3219. const m__POSIX_HOST_NAME_MAX = 255
  3220. const m__POSIX_LINK_MAX = 8
  3221. const m__POSIX_LOGIN_NAME_MAX = 9
  3222. const m__POSIX_MAX_CANON = 255
  3223. const m__POSIX_MAX_INPUT = 255
  3224. const m__POSIX_MQ_OPEN_MAX = 8
  3225. const m__POSIX_MQ_PRIO_MAX = 32
  3226. const m__POSIX_NAME_MAX = 14
  3227. const m__POSIX_NGROUPS_MAX = 8
  3228. const m__POSIX_OPEN_MAX = 20
  3229. const m__POSIX_PATH_MAX = 256
  3230. const m__POSIX_PIPE_BUF = 512
  3231. const m__POSIX_RE_DUP_MAX = 255
  3232. const m__POSIX_RTSIG_MAX = 8
  3233. const m__POSIX_SEM_NSEMS_MAX = 256
  3234. const m__POSIX_SEM_VALUE_MAX = 32767
  3235. const m__POSIX_SIGQUEUE_MAX = 32
  3236. const m__POSIX_SSIZE_MAX = 32767
  3237. const m__POSIX_SS_REPL_MAX = 4
  3238. const m__POSIX_STREAM_MAX = 8
  3239. const m__POSIX_SYMLINK_MAX = 255
  3240. const m__POSIX_SYMLOOP_MAX = 8
  3241. const m__POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4
  3242. const m__POSIX_THREAD_KEYS_MAX = 128
  3243. const m__POSIX_THREAD_THREADS_MAX = 64
  3244. const m__POSIX_TIMER_MAX = 32
  3245. const m__POSIX_TRACE_EVENT_NAME_MAX = 30
  3246. const m__POSIX_TRACE_NAME_MAX = 8
  3247. const m__POSIX_TRACE_SYS_MAX = 8
  3248. const m__POSIX_TRACE_USER_EVENT_MAX = 32
  3249. const m__POSIX_TTY_NAME_MAX = 9
  3250. const m__POSIX_TZNAME_MAX = 6
  3251. const m__STDC_PREDEF_H = 1
  3252. const m__X11_XLIBINT_H_ = 1
  3253. const m__XBCOPYFUNC = "_Xbcopy"
  3254. const m__XOPEN_IOV_MAX = 16
  3255. const m__XOPEN_NAME_MAX = 255
  3256. const m__XOPEN_PATH_MAX = 1024
  3257. const m__X_INLINE = "inline"
  3258. const m__X_RESTRICT_KYWD = "restrict"
  3259. const m__Xconst = "const"
  3260. const m___ATOMIC_ACQUIRE = 2
  3261. const m___ATOMIC_ACQ_REL = 4
  3262. const m___ATOMIC_CONSUME = 1
  3263. const m___ATOMIC_HLE_ACQUIRE = 65536
  3264. const m___ATOMIC_HLE_RELEASE = 131072
  3265. const m___ATOMIC_RELAXED = 0
  3266. const m___ATOMIC_RELEASE = 3
  3267. const m___ATOMIC_SEQ_CST = 5
  3268. const m___BIGGEST_ALIGNMENT__ = 16
  3269. const m___BIG_ENDIAN = 4321
  3270. const m___BYTE_ORDER = 1234
  3271. const m___BYTE_ORDER__ = "__ORDER_LITTLE_ENDIAN__"
  3272. const m___CCGO__ = 1
  3273. const m___CHAR_BIT__ = 8
  3274. const m___DBL_DECIMAL_DIG__ = 17
  3275. const m___DBL_DIG__ = 15
  3276. const m___DBL_HAS_DENORM__ = 1
  3277. const m___DBL_HAS_INFINITY__ = 1
  3278. const m___DBL_HAS_QUIET_NAN__ = 1
  3279. const m___DBL_IS_IEC_60559__ = 2
  3280. const m___DBL_MANT_DIG__ = 53
  3281. const m___DBL_MAX_10_EXP__ = 308
  3282. const m___DBL_MAX_EXP__ = 1024
  3283. const m___DEC128_EPSILON__ = 1e-33
  3284. const m___DEC128_MANT_DIG__ = 34
  3285. const m___DEC128_MAX_EXP__ = 6145
  3286. const m___DEC128_MAX__ = "9.999999999999999999999999999999999E6144"
  3287. const m___DEC128_MIN__ = 1e-6143
  3288. const m___DEC128_SUBNORMAL_MIN__ = 0.000000000000000000000000000000001e-6143
  3289. const m___DEC32_EPSILON__ = 1e-6
  3290. const m___DEC32_MANT_DIG__ = 7
  3291. const m___DEC32_MAX_EXP__ = 97
  3292. const m___DEC32_MAX__ = 9.999999e96
  3293. const m___DEC32_MIN__ = 1e-95
  3294. const m___DEC32_SUBNORMAL_MIN__ = 0.000001e-95
  3295. const m___DEC64_EPSILON__ = 1e-15
  3296. const m___DEC64_MANT_DIG__ = 16
  3297. const m___DEC64_MAX_EXP__ = 385
  3298. const m___DEC64_MAX__ = "9.999999999999999E384"
  3299. const m___DEC64_MIN__ = 1e-383
  3300. const m___DEC64_SUBNORMAL_MIN__ = 0.000000000000001e-383
  3301. const m___DECIMAL_BID_FORMAT__ = 1
  3302. const m___DECIMAL_DIG__ = 17
  3303. const m___DEC_EVAL_METHOD__ = 2
  3304. const m___ELF__ = 1
  3305. const m___FINITE_MATH_ONLY__ = 0
  3306. const m___FLOAT_WORD_ORDER__ = "__ORDER_LITTLE_ENDIAN__"
  3307. const m___FLT128_DECIMAL_DIG__ = 36
  3308. const m___FLT128_DENORM_MIN__ = 6.47517511943802511092443895822764655e-4966
  3309. const m___FLT128_DIG__ = 33
  3310. const m___FLT128_EPSILON__ = 1.92592994438723585305597794258492732e-34
  3311. const m___FLT128_HAS_DENORM__ = 1
  3312. const m___FLT128_HAS_INFINITY__ = 1
  3313. const m___FLT128_HAS_QUIET_NAN__ = 1
  3314. const m___FLT128_IS_IEC_60559__ = 2
  3315. const m___FLT128_MANT_DIG__ = 113
  3316. const m___FLT128_MAX_10_EXP__ = 4932
  3317. const m___FLT128_MAX_EXP__ = 16384
  3318. const m___FLT128_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3319. const m___FLT128_MIN__ = 3.36210314311209350626267781732175260e-4932
  3320. const m___FLT128_NORM_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3321. const m___FLT16_DECIMAL_DIG__ = 5
  3322. const m___FLT16_DENORM_MIN__ = 5.96046447753906250000000000000000000e-8
  3323. const m___FLT16_DIG__ = 3
  3324. const m___FLT16_EPSILON__ = 9.76562500000000000000000000000000000e-4
  3325. const m___FLT16_HAS_DENORM__ = 1
  3326. const m___FLT16_HAS_INFINITY__ = 1
  3327. const m___FLT16_HAS_QUIET_NAN__ = 1
  3328. const m___FLT16_IS_IEC_60559__ = 2
  3329. const m___FLT16_MANT_DIG__ = 11
  3330. const m___FLT16_MAX_10_EXP__ = 4
  3331. const m___FLT16_MAX_EXP__ = 16
  3332. const m___FLT16_MAX__ = 6.55040000000000000000000000000000000e+4
  3333. const m___FLT16_MIN__ = 6.10351562500000000000000000000000000e-5
  3334. const m___FLT16_NORM_MAX__ = 6.55040000000000000000000000000000000e+4
  3335. const m___FLT32X_DECIMAL_DIG__ = 17
  3336. const m___FLT32X_DENORM_MIN__ = 4.94065645841246544176568792868221372e-324
  3337. const m___FLT32X_DIG__ = 15
  3338. const m___FLT32X_EPSILON__ = 2.22044604925031308084726333618164062e-16
  3339. const m___FLT32X_HAS_DENORM__ = 1
  3340. const m___FLT32X_HAS_INFINITY__ = 1
  3341. const m___FLT32X_HAS_QUIET_NAN__ = 1
  3342. const m___FLT32X_IS_IEC_60559__ = 2
  3343. const m___FLT32X_MANT_DIG__ = 53
  3344. const m___FLT32X_MAX_10_EXP__ = 308
  3345. const m___FLT32X_MAX_EXP__ = 1024
  3346. const m___FLT32X_MAX__ = 1.79769313486231570814527423731704357e+308
  3347. const m___FLT32X_MIN__ = 2.22507385850720138309023271733240406e-308
  3348. const m___FLT32X_NORM_MAX__ = 1.79769313486231570814527423731704357e+308
  3349. const m___FLT32_DECIMAL_DIG__ = 9
  3350. const m___FLT32_DENORM_MIN__ = 1.40129846432481707092372958328991613e-45
  3351. const m___FLT32_DIG__ = 6
  3352. const m___FLT32_EPSILON__ = 1.19209289550781250000000000000000000e-7
  3353. const m___FLT32_HAS_DENORM__ = 1
  3354. const m___FLT32_HAS_INFINITY__ = 1
  3355. const m___FLT32_HAS_QUIET_NAN__ = 1
  3356. const m___FLT32_IS_IEC_60559__ = 2
  3357. const m___FLT32_MANT_DIG__ = 24
  3358. const m___FLT32_MAX_10_EXP__ = 38
  3359. const m___FLT32_MAX_EXP__ = 128
  3360. const m___FLT32_MAX__ = 3.40282346638528859811704183484516925e+38
  3361. const m___FLT32_MIN__ = 1.17549435082228750796873653722224568e-38
  3362. const m___FLT32_NORM_MAX__ = 3.40282346638528859811704183484516925e+38
  3363. const m___FLT64X_DECIMAL_DIG__ = 36
  3364. const m___FLT64X_DENORM_MIN__ = 6.47517511943802511092443895822764655e-4966
  3365. const m___FLT64X_DIG__ = 33
  3366. const m___FLT64X_EPSILON__ = 1.92592994438723585305597794258492732e-34
  3367. const m___FLT64X_HAS_DENORM__ = 1
  3368. const m___FLT64X_HAS_INFINITY__ = 1
  3369. const m___FLT64X_HAS_QUIET_NAN__ = 1
  3370. const m___FLT64X_IS_IEC_60559__ = 2
  3371. const m___FLT64X_MANT_DIG__ = 113
  3372. const m___FLT64X_MAX_10_EXP__ = 4932
  3373. const m___FLT64X_MAX_EXP__ = 16384
  3374. const m___FLT64X_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3375. const m___FLT64X_MIN__ = 3.36210314311209350626267781732175260e-4932
  3376. const m___FLT64X_NORM_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3377. const m___FLT64_DECIMAL_DIG__ = 17
  3378. const m___FLT64_DENORM_MIN__ = 4.94065645841246544176568792868221372e-324
  3379. const m___FLT64_DIG__ = 15
  3380. const m___FLT64_EPSILON__ = 2.22044604925031308084726333618164062e-16
  3381. const m___FLT64_HAS_DENORM__ = 1
  3382. const m___FLT64_HAS_INFINITY__ = 1
  3383. const m___FLT64_HAS_QUIET_NAN__ = 1
  3384. const m___FLT64_IS_IEC_60559__ = 2
  3385. const m___FLT64_MANT_DIG__ = 53
  3386. const m___FLT64_MAX_10_EXP__ = 308
  3387. const m___FLT64_MAX_EXP__ = 1024
  3388. const m___FLT64_MAX__ = 1.79769313486231570814527423731704357e+308
  3389. const m___FLT64_MIN__ = 2.22507385850720138309023271733240406e-308
  3390. const m___FLT64_NORM_MAX__ = 1.79769313486231570814527423731704357e+308
  3391. const m___FLT_DECIMAL_DIG__ = 9
  3392. const m___FLT_DENORM_MIN__ = 1.40129846432481707092372958328991613e-45
  3393. const m___FLT_DIG__ = 6
  3394. const m___FLT_EPSILON__ = 1.19209289550781250000000000000000000e-7
  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___FUNCTION__ = "__func__"
  3409. const m___FXSR__ = 1
  3410. const m___GCC_ASM_FLAG_OUTPUTS__ = 1
  3411. const m___GCC_ATOMIC_BOOL_LOCK_FREE = 2
  3412. const m___GCC_ATOMIC_CHAR16_T_LOCK_FREE = 2
  3413. const m___GCC_ATOMIC_CHAR32_T_LOCK_FREE = 2
  3414. const m___GCC_ATOMIC_CHAR_LOCK_FREE = 2
  3415. const m___GCC_ATOMIC_INT_LOCK_FREE = 2
  3416. const m___GCC_ATOMIC_LLONG_LOCK_FREE = 2
  3417. const m___GCC_ATOMIC_LONG_LOCK_FREE = 2
  3418. const m___GCC_ATOMIC_POINTER_LOCK_FREE = 2
  3419. const m___GCC_ATOMIC_SHORT_LOCK_FREE = 2
  3420. const m___GCC_ATOMIC_TEST_AND_SET_TRUEVAL = 1
  3421. const m___GCC_ATOMIC_WCHAR_T_LOCK_FREE = 2
  3422. const m___GCC_CONSTRUCTIVE_SIZE = 64
  3423. const m___GCC_DESTRUCTIVE_SIZE = 64
  3424. const m___GCC_HAVE_DWARF2_CFI_ASM = 1
  3425. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 = 1
  3426. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 = 1
  3427. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 = 1
  3428. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 = 1
  3429. const m___GCC_IEC_559 = 2
  3430. const m___GCC_IEC_559_COMPLEX = 2
  3431. const m___GNUC_EXECUTION_CHARSET_NAME = "UTF-8"
  3432. const m___GNUC_MINOR__ = 2
  3433. const m___GNUC_PATCHLEVEL__ = 0
  3434. const m___GNUC_STDC_INLINE__ = 1
  3435. const m___GNUC_WIDE_EXECUTION_CHARSET_NAME = "UTF-32LE"
  3436. const m___GNUC__ = 12
  3437. const m___GXX_ABI_VERSION = 1017
  3438. const m___HAVE_SPECULATION_SAFE_VALUE = 1
  3439. const m___INT16_MAX__ = 0x7fff
  3440. const m___INT32_MAX__ = 0x7fffffff
  3441. const m___INT32_TYPE__ = "int"
  3442. const m___INT64_MAX__ = 0x7fffffffffffffff
  3443. const m___INT8_MAX__ = 0x7f
  3444. const m___INTMAX_MAX__ = 0x7fffffffffffffff
  3445. const m___INTMAX_WIDTH__ = 64
  3446. const m___INTPTR_MAX__ = 0x7fffffffffffffff
  3447. const m___INTPTR_WIDTH__ = 64
  3448. const m___INT_FAST16_MAX__ = 0x7fffffffffffffff
  3449. const m___INT_FAST16_WIDTH__ = 64
  3450. const m___INT_FAST32_MAX__ = 0x7fffffffffffffff
  3451. const m___INT_FAST32_WIDTH__ = 64
  3452. const m___INT_FAST64_MAX__ = 0x7fffffffffffffff
  3453. const m___INT_FAST64_WIDTH__ = 64
  3454. const m___INT_FAST8_MAX__ = 0x7f
  3455. const m___INT_FAST8_WIDTH__ = 8
  3456. const m___INT_LEAST16_MAX__ = 0x7fff
  3457. const m___INT_LEAST16_WIDTH__ = 16
  3458. const m___INT_LEAST32_MAX__ = 0x7fffffff
  3459. const m___INT_LEAST32_TYPE__ = "int"
  3460. const m___INT_LEAST32_WIDTH__ = 32
  3461. const m___INT_LEAST64_MAX__ = 0x7fffffffffffffff
  3462. const m___INT_LEAST64_WIDTH__ = 64
  3463. const m___INT_LEAST8_MAX__ = 0x7f
  3464. const m___INT_LEAST8_WIDTH__ = 8
  3465. const m___INT_MAX__ = 0x7fffffff
  3466. const m___INT_WIDTH__ = 32
  3467. const m___LDBL_DECIMAL_DIG__ = 17
  3468. const m___LDBL_DENORM_MIN__ = 4.94065645841246544176568792868221372e-324
  3469. const m___LDBL_DIG__ = 15
  3470. const m___LDBL_EPSILON__ = 2.22044604925031308084726333618164062e-16
  3471. const m___LDBL_HAS_DENORM__ = 1
  3472. const m___LDBL_HAS_INFINITY__ = 1
  3473. const m___LDBL_HAS_QUIET_NAN__ = 1
  3474. const m___LDBL_IS_IEC_60559__ = 2
  3475. const m___LDBL_MANT_DIG__ = 53
  3476. const m___LDBL_MAX_10_EXP__ = 308
  3477. const m___LDBL_MAX_EXP__ = 1024
  3478. const m___LDBL_MAX__ = 1.79769313486231570814527423731704357e+308
  3479. const m___LDBL_MIN__ = 2.22507385850720138309023271733240406e-308
  3480. const m___LDBL_NORM_MAX__ = 1.79769313486231570814527423731704357e+308
  3481. const m___LITTLE_ENDIAN = 1234
  3482. const m___LONG_DOUBLE_64__ = 1
  3483. const m___LONG_LONG_MAX__ = 0x7fffffffffffffff
  3484. const m___LONG_LONG_WIDTH__ = 64
  3485. const m___LONG_MAX = 0x7fffffffffffffff
  3486. const m___LONG_MAX__ = 0x7fffffffffffffff
  3487. const m___LONG_WIDTH__ = 64
  3488. const m___LP64__ = 1
  3489. const m___MMX_WITH_SSE__ = 1
  3490. const m___MMX__ = 1
  3491. const m___NO_INLINE__ = 1
  3492. const m___ORDER_BIG_ENDIAN__ = 4321
  3493. const m___ORDER_LITTLE_ENDIAN__ = 1234
  3494. const m___ORDER_PDP_ENDIAN__ = 3412
  3495. const m___PDP_ENDIAN = 3412
  3496. const m___PIC__ = 2
  3497. const m___PIE__ = 2
  3498. const m___PRAGMA_REDEFINE_EXTNAME = 1
  3499. const m___PRETTY_FUNCTION__ = "__func__"
  3500. const m___PTRDIFF_MAX__ = 0x7fffffffffffffff
  3501. const m___PTRDIFF_WIDTH__ = 64
  3502. const m___SCHAR_MAX__ = 0x7f
  3503. const m___SCHAR_WIDTH__ = 8
  3504. const m___SEG_FS = 1
  3505. const m___SEG_GS = 1
  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_FLOAT128__ = 16
  3513. const m___SIZEOF_FLOAT80__ = 16
  3514. const m___SIZEOF_FLOAT__ = 4
  3515. const m___SIZEOF_INT128__ = 16
  3516. const m___SIZEOF_INT__ = 4
  3517. const m___SIZEOF_LONG_DOUBLE__ = 8
  3518. const m___SIZEOF_LONG_LONG__ = 8
  3519. const m___SIZEOF_LONG__ = 8
  3520. const m___SIZEOF_POINTER__ = 8
  3521. const m___SIZEOF_PTRDIFF_T__ = 8
  3522. const m___SIZEOF_SHORT__ = 2
  3523. const m___SIZEOF_SIZE_T__ = 8
  3524. const m___SIZEOF_WCHAR_T__ = 4
  3525. const m___SIZEOF_WINT_T__ = 4
  3526. const m___SIZE_MAX__ = 0xffffffffffffffff
  3527. const m___SIZE_WIDTH__ = 64
  3528. const m___SSE2_MATH__ = 1
  3529. const m___SSE2__ = 1
  3530. const m___SSE_MATH__ = 1
  3531. const m___SSE__ = 1
  3532. const m___STDC_HOSTED__ = 1
  3533. const m___STDC_IEC_559_COMPLEX__ = 1
  3534. const m___STDC_IEC_559__ = 1
  3535. const m___STDC_IEC_60559_BFP__ = 201404
  3536. const m___STDC_IEC_60559_COMPLEX__ = 201404
  3537. const m___STDC_ISO_10646__ = 201706
  3538. const m___STDC_UTF_16__ = 1
  3539. const m___STDC_UTF_32__ = 1
  3540. const m___STDC_VERSION__ = 201710
  3541. const m___STDC__ = 1
  3542. const m___UINT16_MAX__ = 0xffff
  3543. const m___UINT32_MAX__ = 0xffffffff
  3544. const m___UINT64_MAX__ = 0xffffffffffffffff
  3545. const m___UINT8_MAX__ = 0xff
  3546. const m___UINTMAX_MAX__ = 0xffffffffffffffff
  3547. const m___UINTPTR_MAX__ = 0xffffffffffffffff
  3548. const m___UINT_FAST16_MAX__ = 0xffffffffffffffff
  3549. const m___UINT_FAST32_MAX__ = 0xffffffffffffffff
  3550. const m___UINT_FAST64_MAX__ = 0xffffffffffffffff
  3551. const m___UINT_FAST8_MAX__ = 0xff
  3552. const m___UINT_LEAST16_MAX__ = 0xffff
  3553. const m___UINT_LEAST32_MAX__ = 0xffffffff
  3554. const m___UINT_LEAST64_MAX__ = 0xffffffffffffffff
  3555. const m___UINT_LEAST8_MAX__ = 0xff
  3556. const m___USE_TIME_BITS64 = 1
  3557. const m___VERSION__ = "12.2.0"
  3558. const m___WCHAR_MAX__ = 0x7fffffff
  3559. const m___WCHAR_TYPE__ = "int"
  3560. const m___WCHAR_WIDTH__ = 32
  3561. const m___WINT_MAX__ = 0xffffffff
  3562. const m___WINT_MIN__ = 0
  3563. const m___WINT_WIDTH__ = 32
  3564. const m___amd64 = 1
  3565. const m___amd64__ = 1
  3566. const m___code_model_small__ = 1
  3567. const m___gnu_linux__ = 1
  3568. const m___inline = "inline"
  3569. const m___k8 = 1
  3570. const m___k8__ = 1
  3571. const m___linux = 1
  3572. const m___linux__ = 1
  3573. const m___pic__ = 2
  3574. const m___pie__ = 2
  3575. const m___restrict = "restrict"
  3576. const m___restrict_arr = "restrict"
  3577. const m___tm_gmtoff = "tm_gmtoff"
  3578. const m___tm_zone = "tm_zone"
  3579. const m___unix = 1
  3580. const m___unix__ = 1
  3581. const m___x86_64 = 1
  3582. const m___x86_64__ = 1
  3583. const m_alloca = "__builtin_alloca"
  3584. const m_ft_encoding_adobe_custom = "FT_ENCODING_ADOBE_CUSTOM"
  3585. const m_ft_encoding_adobe_expert = "FT_ENCODING_ADOBE_EXPERT"
  3586. const m_ft_encoding_adobe_standard = "FT_ENCODING_ADOBE_STANDARD"
  3587. const m_ft_encoding_apple_roman = "FT_ENCODING_APPLE_ROMAN"
  3588. const m_ft_encoding_big5 = "FT_ENCODING_BIG5"
  3589. const m_ft_encoding_gb2312 = "FT_ENCODING_PRC"
  3590. const m_ft_encoding_johab = "FT_ENCODING_JOHAB"
  3591. const m_ft_encoding_latin_1 = "FT_ENCODING_ADOBE_LATIN_1"
  3592. const m_ft_encoding_latin_2 = "FT_ENCODING_OLD_LATIN_2"
  3593. const m_ft_encoding_none = "FT_ENCODING_NONE"
  3594. const m_ft_encoding_sjis = "FT_ENCODING_SJIS"
  3595. const m_ft_encoding_symbol = "FT_ENCODING_MS_SYMBOL"
  3596. const m_ft_encoding_unicode = "FT_ENCODING_UNICODE"
  3597. const m_ft_encoding_wansung = "FT_ENCODING_WANSUNG"
  3598. const m_ft_fclose = "fclose"
  3599. const m_ft_fopen = "fopen"
  3600. const m_ft_fread = "fread"
  3601. const m_ft_fseek = "fseek"
  3602. const m_ft_ftell = "ftell"
  3603. const m_ft_getenv = "getenv"
  3604. const m_ft_glyph_format_bitmap = "FT_GLYPH_FORMAT_BITMAP"
  3605. const m_ft_glyph_format_composite = "FT_GLYPH_FORMAT_COMPOSITE"
  3606. const m_ft_glyph_format_none = "FT_GLYPH_FORMAT_NONE"
  3607. const m_ft_glyph_format_outline = "FT_GLYPH_FORMAT_OUTLINE"
  3608. const m_ft_glyph_format_plotter = "FT_GLYPH_FORMAT_PLOTTER"
  3609. const m_ft_jmp_buf = "jmp_buf"
  3610. const m_ft_kerning_default = "FT_KERNING_DEFAULT"
  3611. const m_ft_kerning_unfitted = "FT_KERNING_UNFITTED"
  3612. const m_ft_kerning_unscaled = "FT_KERNING_UNSCALED"
  3613. const m_ft_longjmp = "longjmp"
  3614. const m_ft_memchr = "memchr"
  3615. const m_ft_memcmp = "memcmp"
  3616. const m_ft_memcpy = "memcpy"
  3617. const m_ft_memmove = "memmove"
  3618. const m_ft_memset = "memset"
  3619. const m_ft_open_driver = "FT_OPEN_DRIVER"
  3620. const m_ft_open_memory = "FT_OPEN_MEMORY"
  3621. const m_ft_open_params = "FT_OPEN_PARAMS"
  3622. const m_ft_open_pathname = "FT_OPEN_PATHNAME"
  3623. const m_ft_open_stream = "FT_OPEN_STREAM"
  3624. const m_ft_outline_even_odd_fill = "FT_OUTLINE_EVEN_ODD_FILL"
  3625. const m_ft_outline_high_precision = "FT_OUTLINE_HIGH_PRECISION"
  3626. const m_ft_outline_ignore_dropouts = "FT_OUTLINE_IGNORE_DROPOUTS"
  3627. const m_ft_outline_none = "FT_OUTLINE_NONE"
  3628. const m_ft_outline_owner = "FT_OUTLINE_OWNER"
  3629. const m_ft_outline_reverse_fill = "FT_OUTLINE_REVERSE_FILL"
  3630. const m_ft_outline_single_pass = "FT_OUTLINE_SINGLE_PASS"
  3631. const m_ft_pixel_mode_grays = "FT_PIXEL_MODE_GRAY"
  3632. const m_ft_pixel_mode_mono = "FT_PIXEL_MODE_MONO"
  3633. const m_ft_pixel_mode_none = "FT_PIXEL_MODE_NONE"
  3634. const m_ft_pixel_mode_pal2 = "FT_PIXEL_MODE_GRAY2"
  3635. const m_ft_pixel_mode_pal4 = "FT_PIXEL_MODE_GRAY4"
  3636. const m_ft_ptrdiff_t = "ptrdiff_t"
  3637. const m_ft_qsort = "qsort"
  3638. const m_ft_raster_flag_aa = "FT_RASTER_FLAG_AA"
  3639. const m_ft_raster_flag_clip = "FT_RASTER_FLAG_CLIP"
  3640. const m_ft_raster_flag_default = "FT_RASTER_FLAG_DEFAULT"
  3641. const m_ft_raster_flag_direct = "FT_RASTER_FLAG_DIRECT"
  3642. const m_ft_render_mode_mono = "FT_RENDER_MODE_MONO"
  3643. const m_ft_render_mode_normal = "FT_RENDER_MODE_NORMAL"
  3644. const m_ft_scalloc = "calloc"
  3645. const m_ft_sfree = "free"
  3646. const m_ft_smalloc = "malloc"
  3647. const m_ft_sprintf = "sprintf"
  3648. const m_ft_srealloc = "realloc"
  3649. const m_ft_strcat = "strcat"
  3650. const m_ft_strcmp = "strcmp"
  3651. const m_ft_strcpy = "strcpy"
  3652. const m_ft_strlen = "strlen"
  3653. const m_ft_strncmp = "strncmp"
  3654. const m_ft_strncpy = "strncpy"
  3655. const m_ft_strrchr = "strrchr"
  3656. const m_ft_strstr = "strstr"
  3657. const m_ft_strtol = "strtol"
  3658. const m_linux = 1
  3659. const m_static_assert = "_Static_assert"
  3660. const m_sz_xAllocColorCellsReply = 32
  3661. const m_sz_xAllocColorCellsReq = 12
  3662. const m_sz_xAllocColorPlanesReply = 32
  3663. const m_sz_xAllocColorPlanesReq = 16
  3664. const m_sz_xAllocColorReply = 32
  3665. const m_sz_xAllocColorReq = 16
  3666. const m_sz_xAllocNamedColorReply = 32
  3667. const m_sz_xAllocNamedColorReq = 12
  3668. const m_sz_xAllowEventsReq = 8
  3669. const m_sz_xArc = 12
  3670. const m_sz_xBellReq = 4
  3671. const m_sz_xChangeActivePointerGrabReq = 16
  3672. const m_sz_xChangeGCReq = 12
  3673. const m_sz_xChangeHostsReq = 8
  3674. const m_sz_xChangeKeyboardControlReq = 8
  3675. const m_sz_xChangeKeyboardMappingReq = 8
  3676. const m_sz_xChangeModeReq = 4
  3677. const m_sz_xChangePointerControlReq = 12
  3678. const m_sz_xChangePropertyReq = 24
  3679. const m_sz_xChangeSaveSetReq = 8
  3680. const m_sz_xChangeWindowAttributesReq = 12
  3681. const m_sz_xCharInfo = 12
  3682. const m_sz_xCirculateWindowReq = 8
  3683. const m_sz_xClearAreaReq = 16
  3684. const m_sz_xColorItem = 12
  3685. const m_sz_xConfigureWindowReq = 12
  3686. const m_sz_xConnClientPrefix = 12
  3687. const m_sz_xConnSetup = 32
  3688. const m_sz_xConnSetupPrefix = 8
  3689. const m_sz_xConvertSelectionReq = 24
  3690. const m_sz_xCopyAreaReq = 28
  3691. const m_sz_xCopyColormapAndFreeReq = 12
  3692. const m_sz_xCopyGCReq = 16
  3693. const m_sz_xCopyPlaneReq = 32
  3694. const m_sz_xCreateColormapReq = 16
  3695. const m_sz_xCreateCursorReq = 32
  3696. const m_sz_xCreateGCReq = 16
  3697. const m_sz_xCreateGlyphCursorReq = 32
  3698. const m_sz_xCreatePixmapReq = 16
  3699. const m_sz_xCreateWindowReq = 32
  3700. const m_sz_xDeletePropertyReq = 12
  3701. const m_sz_xDepth = 8
  3702. const m_sz_xError = 32
  3703. const m_sz_xEvent = 32
  3704. const m_sz_xFillPolyReq = 16
  3705. const m_sz_xFontProp = 8
  3706. const m_sz_xForceScreenSaverReq = 4
  3707. const m_sz_xFreeColorsReq = 12
  3708. const m_sz_xGenericReply = 32
  3709. const m_sz_xGetAtomNameReply = 32
  3710. const m_sz_xGetFontPathReply = 32
  3711. const m_sz_xGetGeometryReply = 32
  3712. const m_sz_xGetImageReply = 32
  3713. const m_sz_xGetImageReq = 20
  3714. const m_sz_xGetInputFocusReply = 32
  3715. const m_sz_xGetKeyboardControlReply = 52
  3716. const m_sz_xGetKeyboardMappingReply = 32
  3717. const m_sz_xGetKeyboardMappingReq = 8
  3718. const m_sz_xGetModifierMappingReply = 32
  3719. const m_sz_xGetMotionEventsReply = 32
  3720. const m_sz_xGetMotionEventsReq = 16
  3721. const m_sz_xGetPointerControlReply = 32
  3722. const m_sz_xGetPointerMappingReply = 32
  3723. const m_sz_xGetPropertyReply = 32
  3724. const m_sz_xGetPropertyReq = 24
  3725. const m_sz_xGetScreenSaverReply = 32
  3726. const m_sz_xGetSelectionOwnerReply = 32
  3727. const m_sz_xGetWindowAttributesReply = 44
  3728. const m_sz_xGrabButtonReq = 24
  3729. const m_sz_xGrabKeyReq = 16
  3730. const m_sz_xGrabKeyboardReply = 32
  3731. const m_sz_xGrabKeyboardReq = 16
  3732. const m_sz_xGrabPointerReply = 32
  3733. const m_sz_xGrabPointerReq = 24
  3734. const m_sz_xHostEntry = 4
  3735. const m_sz_xImageText16Req = 16
  3736. const m_sz_xImageText8Req = 16
  3737. const m_sz_xImageTextReq = 16
  3738. const m_sz_xInternAtomReply = 32
  3739. const m_sz_xInternAtomReq = 8
  3740. const m_sz_xKeymapEvent = 32
  3741. const m_sz_xListExtensionsReply = 32
  3742. const m_sz_xListFontsReply = 32
  3743. const m_sz_xListFontsReq = 8
  3744. const m_sz_xListFontsWithInfoReply = 60
  3745. const m_sz_xListFontsWithInfoReq = 8
  3746. const m_sz_xListHostsReply = 32
  3747. const m_sz_xListHostsReq = 4
  3748. const m_sz_xListInstalledColormapsReply = 32
  3749. const m_sz_xListPropertiesReply = 32
  3750. const m_sz_xLookupColorReply = 32
  3751. const m_sz_xLookupColorReq = 12
  3752. const m_sz_xOpenFontReq = 12
  3753. const m_sz_xPixmapFormat = 8
  3754. const m_sz_xPoint = 4
  3755. const m_sz_xPolyArcReq = 12
  3756. const m_sz_xPolyFillArcReq = 12
  3757. const m_sz_xPolyFillRectangleReq = 12
  3758. const m_sz_xPolyLineReq = 12
  3759. const m_sz_xPolyPointReq = 12
  3760. const m_sz_xPolyRectangleReq = 12
  3761. const m_sz_xPolySegmentReq = 12
  3762. const m_sz_xPolyText16Req = 16
  3763. const m_sz_xPolyText8Req = 16
  3764. const m_sz_xPolyTextReq = 16
  3765. const m_sz_xPropIconSize = 24
  3766. const m_sz_xPutImageReq = 24
  3767. const m_sz_xQueryBestSizeReply = 32
  3768. const m_sz_xQueryBestSizeReq = 12
  3769. const m_sz_xQueryColorsReply = 32
  3770. const m_sz_xQueryColorsReq = 8
  3771. const m_sz_xQueryExtensionReply = 32
  3772. const m_sz_xQueryExtensionReq = 8
  3773. const m_sz_xQueryFontReply = 60
  3774. const m_sz_xQueryKeymapReply = 40
  3775. const m_sz_xQueryPointerReply = 32
  3776. const m_sz_xQueryTextExtentsReply = 32
  3777. const m_sz_xQueryTextExtentsReq = 8
  3778. const m_sz_xQueryTreeReply = 32
  3779. const m_sz_xRecolorCursorReq = 20
  3780. const m_sz_xRectangle = 8
  3781. const m_sz_xReparentWindowReq = 16
  3782. const m_sz_xReply = 32
  3783. const m_sz_xReq = 4
  3784. const m_sz_xResourceReq = 8
  3785. const m_sz_xRotatePropertiesReq = 12
  3786. const m_sz_xSegment = 8
  3787. const m_sz_xSendEventReq = 44
  3788. const m_sz_xSetAccessControlReq = 4
  3789. const m_sz_xSetClipRectanglesReq = 12
  3790. const m_sz_xSetCloseDownModeReq = 4
  3791. const m_sz_xSetDashesReq = 12
  3792. const m_sz_xSetFontPathReq = 8
  3793. const m_sz_xSetInputFocusReq = 12
  3794. const m_sz_xSetMappingReply = 32
  3795. const m_sz_xSetModifierMappingReply = 32
  3796. const m_sz_xSetModifierMappingReq = 4
  3797. const m_sz_xSetPointerMappingReply = 32
  3798. const m_sz_xSetPointerMappingReq = 4
  3799. const m_sz_xSetScreenSaverReq = 12
  3800. const m_sz_xSetSelectionOwnerReq = 16
  3801. const m_sz_xStoreColorsReq = 8
  3802. const m_sz_xStoreNamedColorReq = 16
  3803. const m_sz_xTextElt = 2
  3804. const m_sz_xTimecoord = 8
  3805. const m_sz_xTranslateCoordsReply = 32
  3806. const m_sz_xTranslateCoordsReq = 16
  3807. const m_sz_xUngrabButtonReq = 12
  3808. const m_sz_xUngrabKeyReq = 12
  3809. const m_sz_xVisualType = 24
  3810. const m_sz_xWarpPointerReq = 24
  3811. const m_sz_xWindowRoot = 40
  3812. const m_sz_xrgb = 8
  3813. const m_unix = 1
  3814. const m_xFalse = 0
  3815. const m_xTrue = 1
  3816. const m_xfree = "free"
  3817. const m_xmalloc = "malloc"
  3818. const m_xthread_self = "pthread_self"
  3819. type t__builtin_va_list = uintptr
  3820. type t__predefined_size_t = uint64
  3821. type t__predefined_wchar_t = int32
  3822. type t__predefined_ptrdiff_t = int64
  3823. type Tsize_t = uint64
  3824. type Tssize_t = int64
  3825. type Toff_t = int64
  3826. type Tva_list = uintptr
  3827. type t__isoc_va_list = uintptr
  3828. type Tfpos_t = struct {
  3829. F__lldata [0]int64
  3830. F__align [0]float64
  3831. F__opaque [16]int8
  3832. }
  3833. type T_G_fpos64_t = Tfpos_t
  3834. type Tcookie_io_functions_t = struct {
  3835. Fread uintptr
  3836. Fwrite uintptr
  3837. Fseek uintptr
  3838. Fclose1 uintptr
  3839. }
  3840. type T_IO_cookie_io_functions_t = Tcookie_io_functions_t
  3841. type Twchar_t = int32
  3842. type Tdiv_t = struct {
  3843. Fquot int32
  3844. Frem int32
  3845. }
  3846. type Tldiv_t = struct {
  3847. Fquot int64
  3848. Frem int64
  3849. }
  3850. type Tlldiv_t = struct {
  3851. Fquot int64
  3852. Frem int64
  3853. }
  3854. type Tlocale_t = uintptr
  3855. type Tregister_t = int64
  3856. type Ttime_t = int64
  3857. type Tsuseconds_t = int64
  3858. type Tint8_t = int8
  3859. type Tint16_t = int16
  3860. type Tint32_t = int32
  3861. type Tint64_t = int64
  3862. type Tu_int64_t = uint64
  3863. type Tmode_t = uint32
  3864. type Tnlink_t = uint64
  3865. type Tino_t = uint64
  3866. type Tdev_t = uint64
  3867. type Tblksize_t = int64
  3868. type Tblkcnt_t = int64
  3869. type Tfsblkcnt_t = uint64
  3870. type Tfsfilcnt_t = uint64
  3871. type Ttimer_t = uintptr
  3872. type Tclockid_t = int32
  3873. type Tclock_t = int64
  3874. type Tpid_t = int32
  3875. type Tid_t = uint32
  3876. type Tuid_t = uint32
  3877. type Tgid_t = uint32
  3878. type Tkey_t = int32
  3879. type Tuseconds_t = uint32
  3880. type Tpthread_t = uintptr
  3881. type Tpthread_once_t = int32
  3882. type Tpthread_key_t = uint32
  3883. type Tpthread_spinlock_t = int32
  3884. type Tpthread_mutexattr_t = struct {
  3885. F__attr uint32
  3886. }
  3887. type Tpthread_condattr_t = struct {
  3888. F__attr uint32
  3889. }
  3890. type Tpthread_barrierattr_t = struct {
  3891. F__attr uint32
  3892. }
  3893. type Tpthread_rwlockattr_t = struct {
  3894. F__attr [2]uint32
  3895. }
  3896. type Tpthread_attr_t = struct {
  3897. F__u struct {
  3898. F__vi [0][14]int32
  3899. F__s [0][7]uint64
  3900. F__i [14]int32
  3901. }
  3902. }
  3903. type Tpthread_mutex_t = struct {
  3904. F__u struct {
  3905. F__vi [0][10]int32
  3906. F__p [0][5]uintptr
  3907. F__i [10]int32
  3908. }
  3909. }
  3910. type Tpthread_cond_t = struct {
  3911. F__u struct {
  3912. F__vi [0][12]int32
  3913. F__p [0][6]uintptr
  3914. F__i [12]int32
  3915. }
  3916. }
  3917. type Tpthread_rwlock_t = struct {
  3918. F__u struct {
  3919. F__vi [0][14]int32
  3920. F__p [0][7]uintptr
  3921. F__i [14]int32
  3922. }
  3923. }
  3924. type Tpthread_barrier_t = struct {
  3925. F__u struct {
  3926. F__vi [0][8]int32
  3927. F__p [0][4]uintptr
  3928. F__i [8]int32
  3929. }
  3930. }
  3931. type Tu_int8_t = uint8
  3932. type Tu_int16_t = uint16
  3933. type Tu_int32_t = uint32
  3934. type Tcaddr_t = uintptr
  3935. type Tu_char = uint8
  3936. type Tu_short = uint16
  3937. type Tushort = uint16
  3938. type Tu_int = uint32
  3939. type Tuint = uint32
  3940. type Tu_long = uint64
  3941. type Tulong = uint64
  3942. type Tquad_t = int64
  3943. type Tu_quad_t = uint64
  3944. type Tuint16_t = uint16
  3945. type Tuint32_t = uint32
  3946. type Tuint64_t = uint64
  3947. type Ttimeval = struct {
  3948. Ftv_sec Ttime_t
  3949. Ftv_usec Tsuseconds_t
  3950. }
  3951. type Ttimespec = struct {
  3952. Ftv_sec Ttime_t
  3953. Ftv_nsec int64
  3954. }
  3955. type Tsigset_t = struct {
  3956. F__bits [16]uint64
  3957. }
  3958. type t__sigset_t = Tsigset_t
  3959. type Tfd_mask = uint64
  3960. type Tfd_set = struct {
  3961. Ffds_bits [16]uint64
  3962. }
  3963. type TXID = uint64
  3964. type TMask = uint64
  3965. type TAtom = uint64
  3966. type TVisualID = uint64
  3967. type TTime = uint64
  3968. type TWindow = uint64
  3969. type TDrawable = uint64
  3970. type TFont = uint64
  3971. type TPixmap = uint64
  3972. type TCursor = uint64
  3973. type TColormap = uint64
  3974. type TGContext = uint64
  3975. type TKeySym = uint64
  3976. type TKeyCode = uint8
  3977. type Tmax_align_t = struct {
  3978. F__ll int64
  3979. F__ld float64
  3980. }
  3981. type Tptrdiff_t = int64
  3982. type TXPointer = uintptr
  3983. type TXExtData = struct {
  3984. Fnumber int32
  3985. Fnext uintptr
  3986. Ffree_private uintptr
  3987. Fprivate_data TXPointer
  3988. }
  3989. type T_XExtData = TXExtData
  3990. type TXExtCodes = struct {
  3991. Fextension int32
  3992. Fmajor_opcode int32
  3993. Ffirst_event int32
  3994. Ffirst_error int32
  3995. }
  3996. type TXPixmapFormatValues = struct {
  3997. Fdepth int32
  3998. Fbits_per_pixel int32
  3999. Fscanline_pad int32
  4000. }
  4001. type TXGCValues = struct {
  4002. Ffunction int32
  4003. Fplane_mask uint64
  4004. Fforeground uint64
  4005. Fbackground uint64
  4006. Fline_width int32
  4007. Fline_style int32
  4008. Fcap_style int32
  4009. Fjoin_style int32
  4010. Ffill_style int32
  4011. Ffill_rule int32
  4012. Farc_mode int32
  4013. Ftile TPixmap
  4014. Fstipple TPixmap
  4015. Fts_x_origin int32
  4016. Fts_y_origin int32
  4017. Ffont TFont
  4018. Fsubwindow_mode int32
  4019. Fgraphics_exposures int32
  4020. Fclip_x_origin int32
  4021. Fclip_y_origin int32
  4022. Fclip_mask TPixmap
  4023. Fdash_offset int32
  4024. Fdashes int8
  4025. }
  4026. type TGC = uintptr
  4027. type T_XGC = struct {
  4028. Fext_data uintptr
  4029. Fgid TGContext
  4030. Frects int32
  4031. Fdashes int32
  4032. Fdirty uint64
  4033. Fvalues TXGCValues
  4034. }
  4035. type TVisual = struct {
  4036. Fext_data uintptr
  4037. Fvisualid TVisualID
  4038. Fclass int32
  4039. Fred_mask uint64
  4040. Fgreen_mask uint64
  4041. Fblue_mask uint64
  4042. Fbits_per_rgb int32
  4043. Fmap_entries int32
  4044. }
  4045. type TDepth = struct {
  4046. Fdepth int32
  4047. Fnvisuals int32
  4048. Fvisuals uintptr
  4049. }
  4050. type T_XDisplay = struct {
  4051. Fext_data uintptr
  4052. Ffree_funcs uintptr
  4053. Ffd int32
  4054. Fconn_checker int32
  4055. Fproto_major_version int32
  4056. Fproto_minor_version int32
  4057. Fvendor uintptr
  4058. Fresource_base TXID
  4059. Fresource_mask TXID
  4060. Fresource_id TXID
  4061. Fresource_shift int32
  4062. Fresource_alloc uintptr
  4063. Fbyte_order int32
  4064. Fbitmap_unit int32
  4065. Fbitmap_pad int32
  4066. Fbitmap_bit_order int32
  4067. Fnformats int32
  4068. Fpixmap_format uintptr
  4069. Fvnumber int32
  4070. Frelease int32
  4071. Fhead uintptr
  4072. Ftail uintptr
  4073. Fqlen int32
  4074. Flast_request_read uint64
  4075. Frequest uint64
  4076. Flast_req uintptr
  4077. Fbuffer uintptr
  4078. Fbufptr uintptr
  4079. Fbufmax uintptr
  4080. Fmax_request_size uint32
  4081. Fdb uintptr
  4082. Fsynchandler uintptr
  4083. Fdisplay_name uintptr
  4084. Fdefault_screen int32
  4085. Fnscreens int32
  4086. Fscreens uintptr
  4087. Fmotion_buffer uint64
  4088. Fflags uint64
  4089. Fmin_keycode int32
  4090. Fmax_keycode int32
  4091. Fkeysyms uintptr
  4092. Fmodifiermap uintptr
  4093. Fkeysyms_per_keycode int32
  4094. Fxdefaults uintptr
  4095. Fscratch_buffer uintptr
  4096. Fscratch_length uint64
  4097. Fext_number int32
  4098. Fext_procs uintptr
  4099. Fevent_vec [128]uintptr
  4100. Fwire_vec [128]uintptr
  4101. Flock_meaning TKeySym
  4102. Flock uintptr
  4103. Fasync_handlers uintptr
  4104. Fbigreq_size uint64
  4105. Flock_fns uintptr
  4106. Fidlist_alloc uintptr
  4107. Fkey_bindings uintptr
  4108. Fcursor_font TFont
  4109. Fatoms uintptr
  4110. Fmode_switch uint32
  4111. Fnum_lock uint32
  4112. Fcontext_db uintptr
  4113. Ferror_vec uintptr
  4114. Fcms struct {
  4115. FdefaultCCCs TXPointer
  4116. FclientCmaps TXPointer
  4117. FperVisualIntensityMaps TXPointer
  4118. }
  4119. Fim_filters uintptr
  4120. Fqfree uintptr
  4121. Fnext_event_serial_num uint64
  4122. Fflushes uintptr
  4123. Fim_fd_info uintptr
  4124. Fim_fd_length int32
  4125. Fconn_watchers uintptr
  4126. Fwatcher_count int32
  4127. Ffiledes TXPointer
  4128. Fsavedsynchandler uintptr
  4129. Fresource_max TXID
  4130. Fxcmisc_opcode int32
  4131. Fxkb_info uintptr
  4132. Ftrans_conn uintptr
  4133. Fxcb uintptr
  4134. Fnext_cookie uint32
  4135. Fgeneric_event_vec [128]uintptr
  4136. Fgeneric_event_copy_vec [128]uintptr
  4137. Fcookiejar uintptr
  4138. Ferror_threads uintptr
  4139. Fexit_handler TXIOErrorExitHandler
  4140. Fexit_handler_data uintptr
  4141. Fin_ifevent TCARD32
  4142. Fifevent_thread Txthread_t
  4143. }
  4144. type TScreen = struct {
  4145. Fext_data uintptr
  4146. Fdisplay uintptr
  4147. Froot TWindow
  4148. Fwidth int32
  4149. Fheight int32
  4150. Fmwidth int32
  4151. Fmheight int32
  4152. Fndepths int32
  4153. Fdepths uintptr
  4154. Froot_depth int32
  4155. Froot_visual uintptr
  4156. Fdefault_gc TGC
  4157. Fcmap TColormap
  4158. Fwhite_pixel uint64
  4159. Fblack_pixel uint64
  4160. Fmax_maps int32
  4161. Fmin_maps int32
  4162. Fbacking_store int32
  4163. Fsave_unders int32
  4164. Froot_input_mask int64
  4165. }
  4166. type TScreenFormat = struct {
  4167. Fext_data uintptr
  4168. Fdepth int32
  4169. Fbits_per_pixel int32
  4170. Fscanline_pad int32
  4171. }
  4172. type TXSetWindowAttributes = struct {
  4173. Fbackground_pixmap TPixmap
  4174. Fbackground_pixel uint64
  4175. Fborder_pixmap TPixmap
  4176. Fborder_pixel uint64
  4177. Fbit_gravity int32
  4178. Fwin_gravity int32
  4179. Fbacking_store int32
  4180. Fbacking_planes uint64
  4181. Fbacking_pixel uint64
  4182. Fsave_under int32
  4183. Fevent_mask int64
  4184. Fdo_not_propagate_mask int64
  4185. Foverride_redirect int32
  4186. Fcolormap TColormap
  4187. Fcursor TCursor
  4188. }
  4189. type TXWindowAttributes = struct {
  4190. Fx int32
  4191. Fy int32
  4192. Fwidth int32
  4193. Fheight int32
  4194. Fborder_width int32
  4195. Fdepth int32
  4196. Fvisual uintptr
  4197. Froot TWindow
  4198. Fclass int32
  4199. Fbit_gravity int32
  4200. Fwin_gravity int32
  4201. Fbacking_store int32
  4202. Fbacking_planes uint64
  4203. Fbacking_pixel uint64
  4204. Fsave_under int32
  4205. Fcolormap TColormap
  4206. Fmap_installed int32
  4207. Fmap_state int32
  4208. Fall_event_masks int64
  4209. Fyour_event_mask int64
  4210. Fdo_not_propagate_mask int64
  4211. Foverride_redirect int32
  4212. Fscreen uintptr
  4213. }
  4214. type TXHostAddress = struct {
  4215. Ffamily int32
  4216. Flength int32
  4217. Faddress uintptr
  4218. }
  4219. type TXServerInterpretedAddress = struct {
  4220. Ftypelength int32
  4221. Fvaluelength int32
  4222. Ftype1 uintptr
  4223. Fvalue uintptr
  4224. }
  4225. type TXImage = struct {
  4226. Fwidth int32
  4227. Fheight int32
  4228. Fxoffset int32
  4229. Fformat int32
  4230. Fdata uintptr
  4231. Fbyte_order int32
  4232. Fbitmap_unit int32
  4233. Fbitmap_bit_order int32
  4234. Fbitmap_pad int32
  4235. Fdepth int32
  4236. Fbytes_per_line int32
  4237. Fbits_per_pixel int32
  4238. Fred_mask uint64
  4239. Fgreen_mask uint64
  4240. Fblue_mask uint64
  4241. Fobdata TXPointer
  4242. Ff Tfuncs
  4243. }
  4244. type T_XImage = TXImage
  4245. type TXWindowChanges = struct {
  4246. Fx int32
  4247. Fy int32
  4248. Fwidth int32
  4249. Fheight int32
  4250. Fborder_width int32
  4251. Fsibling TWindow
  4252. Fstack_mode int32
  4253. }
  4254. type TXColor = struct {
  4255. Fpixel uint64
  4256. Fred uint16
  4257. Fgreen uint16
  4258. Fblue uint16
  4259. Fflags int8
  4260. Fpad int8
  4261. }
  4262. type TXSegment = struct {
  4263. Fx1 int16
  4264. Fy1 int16
  4265. Fx2 int16
  4266. Fy2 int16
  4267. }
  4268. type TXPoint = struct {
  4269. Fx int16
  4270. Fy int16
  4271. }
  4272. type TXRectangle = struct {
  4273. Fx int16
  4274. Fy int16
  4275. Fwidth uint16
  4276. Fheight uint16
  4277. }
  4278. type TXArc = struct {
  4279. Fx int16
  4280. Fy int16
  4281. Fwidth uint16
  4282. Fheight uint16
  4283. Fangle1 int16
  4284. Fangle2 int16
  4285. }
  4286. type TXKeyboardControl = struct {
  4287. Fkey_click_percent int32
  4288. Fbell_percent int32
  4289. Fbell_pitch int32
  4290. Fbell_duration int32
  4291. Fled int32
  4292. Fled_mode int32
  4293. Fkey int32
  4294. Fauto_repeat_mode int32
  4295. }
  4296. type TXKeyboardState = struct {
  4297. Fkey_click_percent int32
  4298. Fbell_percent int32
  4299. Fbell_pitch uint32
  4300. Fbell_duration uint32
  4301. Fled_mask uint64
  4302. Fglobal_auto_repeat int32
  4303. Fauto_repeats [32]int8
  4304. }
  4305. type TXTimeCoord = struct {
  4306. Ftime TTime
  4307. Fx int16
  4308. Fy int16
  4309. }
  4310. type TXModifierKeymap = struct {
  4311. Fmax_keypermod int32
  4312. Fmodifiermap uintptr
  4313. }
  4314. type TDisplay = struct {
  4315. Fext_data uintptr
  4316. Ffree_funcs uintptr
  4317. Ffd int32
  4318. Fconn_checker int32
  4319. Fproto_major_version int32
  4320. Fproto_minor_version int32
  4321. Fvendor uintptr
  4322. Fresource_base TXID
  4323. Fresource_mask TXID
  4324. Fresource_id TXID
  4325. Fresource_shift int32
  4326. Fresource_alloc uintptr
  4327. Fbyte_order int32
  4328. Fbitmap_unit int32
  4329. Fbitmap_pad int32
  4330. Fbitmap_bit_order int32
  4331. Fnformats int32
  4332. Fpixmap_format uintptr
  4333. Fvnumber int32
  4334. Frelease int32
  4335. Fhead uintptr
  4336. Ftail uintptr
  4337. Fqlen int32
  4338. Flast_request_read uint64
  4339. Frequest uint64
  4340. Flast_req uintptr
  4341. Fbuffer uintptr
  4342. Fbufptr uintptr
  4343. Fbufmax uintptr
  4344. Fmax_request_size uint32
  4345. Fdb uintptr
  4346. Fsynchandler uintptr
  4347. Fdisplay_name uintptr
  4348. Fdefault_screen int32
  4349. Fnscreens int32
  4350. Fscreens uintptr
  4351. Fmotion_buffer uint64
  4352. Fflags uint64
  4353. Fmin_keycode int32
  4354. Fmax_keycode int32
  4355. Fkeysyms uintptr
  4356. Fmodifiermap uintptr
  4357. Fkeysyms_per_keycode int32
  4358. Fxdefaults uintptr
  4359. Fscratch_buffer uintptr
  4360. Fscratch_length uint64
  4361. Fext_number int32
  4362. Fext_procs uintptr
  4363. Fevent_vec [128]uintptr
  4364. Fwire_vec [128]uintptr
  4365. Flock_meaning TKeySym
  4366. Flock uintptr
  4367. Fasync_handlers uintptr
  4368. Fbigreq_size uint64
  4369. Flock_fns uintptr
  4370. Fidlist_alloc uintptr
  4371. Fkey_bindings uintptr
  4372. Fcursor_font TFont
  4373. Fatoms uintptr
  4374. Fmode_switch uint32
  4375. Fnum_lock uint32
  4376. Fcontext_db uintptr
  4377. Ferror_vec uintptr
  4378. Fcms struct {
  4379. FdefaultCCCs TXPointer
  4380. FclientCmaps TXPointer
  4381. FperVisualIntensityMaps TXPointer
  4382. }
  4383. Fim_filters uintptr
  4384. Fqfree uintptr
  4385. Fnext_event_serial_num uint64
  4386. Fflushes uintptr
  4387. Fim_fd_info uintptr
  4388. Fim_fd_length int32
  4389. Fconn_watchers uintptr
  4390. Fwatcher_count int32
  4391. Ffiledes TXPointer
  4392. Fsavedsynchandler uintptr
  4393. Fresource_max TXID
  4394. Fxcmisc_opcode int32
  4395. Fxkb_info uintptr
  4396. Ftrans_conn uintptr
  4397. Fxcb uintptr
  4398. Fnext_cookie uint32
  4399. Fgeneric_event_vec [128]uintptr
  4400. Fgeneric_event_copy_vec [128]uintptr
  4401. Fcookiejar uintptr
  4402. Ferror_threads uintptr
  4403. Fexit_handler TXIOErrorExitHandler
  4404. Fexit_handler_data uintptr
  4405. Fin_ifevent TCARD32
  4406. Fifevent_thread Txthread_t
  4407. }
  4408. type T_XPrivDisplay = uintptr
  4409. type TXKeyEvent = struct {
  4410. Ftype1 int32
  4411. Fserial uint64
  4412. Fsend_event int32
  4413. Fdisplay uintptr
  4414. Fwindow TWindow
  4415. Froot TWindow
  4416. Fsubwindow TWindow
  4417. Ftime TTime
  4418. Fx int32
  4419. Fy int32
  4420. Fx_root int32
  4421. Fy_root int32
  4422. Fstate uint32
  4423. Fkeycode uint32
  4424. Fsame_screen int32
  4425. }
  4426. type TXKeyPressedEvent = struct {
  4427. Ftype1 int32
  4428. Fserial uint64
  4429. Fsend_event int32
  4430. Fdisplay uintptr
  4431. Fwindow TWindow
  4432. Froot TWindow
  4433. Fsubwindow TWindow
  4434. Ftime TTime
  4435. Fx int32
  4436. Fy int32
  4437. Fx_root int32
  4438. Fy_root int32
  4439. Fstate uint32
  4440. Fkeycode uint32
  4441. Fsame_screen int32
  4442. }
  4443. type TXKeyReleasedEvent = struct {
  4444. Ftype1 int32
  4445. Fserial uint64
  4446. Fsend_event int32
  4447. Fdisplay uintptr
  4448. Fwindow TWindow
  4449. Froot TWindow
  4450. Fsubwindow TWindow
  4451. Ftime TTime
  4452. Fx int32
  4453. Fy int32
  4454. Fx_root int32
  4455. Fy_root int32
  4456. Fstate uint32
  4457. Fkeycode uint32
  4458. Fsame_screen int32
  4459. }
  4460. type TXButtonEvent = struct {
  4461. Ftype1 int32
  4462. Fserial uint64
  4463. Fsend_event int32
  4464. Fdisplay uintptr
  4465. Fwindow TWindow
  4466. Froot TWindow
  4467. Fsubwindow TWindow
  4468. Ftime TTime
  4469. Fx int32
  4470. Fy int32
  4471. Fx_root int32
  4472. Fy_root int32
  4473. Fstate uint32
  4474. Fbutton uint32
  4475. Fsame_screen int32
  4476. }
  4477. type TXButtonPressedEvent = struct {
  4478. Ftype1 int32
  4479. Fserial uint64
  4480. Fsend_event int32
  4481. Fdisplay uintptr
  4482. Fwindow TWindow
  4483. Froot TWindow
  4484. Fsubwindow TWindow
  4485. Ftime TTime
  4486. Fx int32
  4487. Fy int32
  4488. Fx_root int32
  4489. Fy_root int32
  4490. Fstate uint32
  4491. Fbutton uint32
  4492. Fsame_screen int32
  4493. }
  4494. type TXButtonReleasedEvent = struct {
  4495. Ftype1 int32
  4496. Fserial uint64
  4497. Fsend_event int32
  4498. Fdisplay uintptr
  4499. Fwindow TWindow
  4500. Froot TWindow
  4501. Fsubwindow TWindow
  4502. Ftime TTime
  4503. Fx int32
  4504. Fy int32
  4505. Fx_root int32
  4506. Fy_root int32
  4507. Fstate uint32
  4508. Fbutton uint32
  4509. Fsame_screen int32
  4510. }
  4511. type TXMotionEvent = struct {
  4512. Ftype1 int32
  4513. Fserial uint64
  4514. Fsend_event int32
  4515. Fdisplay uintptr
  4516. Fwindow TWindow
  4517. Froot TWindow
  4518. Fsubwindow TWindow
  4519. Ftime TTime
  4520. Fx int32
  4521. Fy int32
  4522. Fx_root int32
  4523. Fy_root int32
  4524. Fstate uint32
  4525. Fis_hint int8
  4526. Fsame_screen int32
  4527. }
  4528. type TXPointerMovedEvent = struct {
  4529. Ftype1 int32
  4530. Fserial uint64
  4531. Fsend_event int32
  4532. Fdisplay uintptr
  4533. Fwindow TWindow
  4534. Froot TWindow
  4535. Fsubwindow TWindow
  4536. Ftime TTime
  4537. Fx int32
  4538. Fy int32
  4539. Fx_root int32
  4540. Fy_root int32
  4541. Fstate uint32
  4542. Fis_hint int8
  4543. Fsame_screen int32
  4544. }
  4545. type TXCrossingEvent = struct {
  4546. Ftype1 int32
  4547. Fserial uint64
  4548. Fsend_event int32
  4549. Fdisplay uintptr
  4550. Fwindow TWindow
  4551. Froot TWindow
  4552. Fsubwindow TWindow
  4553. Ftime TTime
  4554. Fx int32
  4555. Fy int32
  4556. Fx_root int32
  4557. Fy_root int32
  4558. Fmode int32
  4559. Fdetail int32
  4560. Fsame_screen int32
  4561. Ffocus int32
  4562. Fstate uint32
  4563. }
  4564. type TXEnterWindowEvent = struct {
  4565. Ftype1 int32
  4566. Fserial uint64
  4567. Fsend_event int32
  4568. Fdisplay uintptr
  4569. Fwindow TWindow
  4570. Froot TWindow
  4571. Fsubwindow TWindow
  4572. Ftime TTime
  4573. Fx int32
  4574. Fy int32
  4575. Fx_root int32
  4576. Fy_root int32
  4577. Fmode int32
  4578. Fdetail int32
  4579. Fsame_screen int32
  4580. Ffocus int32
  4581. Fstate uint32
  4582. }
  4583. type TXLeaveWindowEvent = struct {
  4584. Ftype1 int32
  4585. Fserial uint64
  4586. Fsend_event int32
  4587. Fdisplay uintptr
  4588. Fwindow TWindow
  4589. Froot TWindow
  4590. Fsubwindow TWindow
  4591. Ftime TTime
  4592. Fx int32
  4593. Fy int32
  4594. Fx_root int32
  4595. Fy_root int32
  4596. Fmode int32
  4597. Fdetail int32
  4598. Fsame_screen int32
  4599. Ffocus int32
  4600. Fstate uint32
  4601. }
  4602. type TXFocusChangeEvent = struct {
  4603. Ftype1 int32
  4604. Fserial uint64
  4605. Fsend_event int32
  4606. Fdisplay uintptr
  4607. Fwindow TWindow
  4608. Fmode int32
  4609. Fdetail int32
  4610. }
  4611. type TXFocusInEvent = struct {
  4612. Ftype1 int32
  4613. Fserial uint64
  4614. Fsend_event int32
  4615. Fdisplay uintptr
  4616. Fwindow TWindow
  4617. Fmode int32
  4618. Fdetail int32
  4619. }
  4620. type TXFocusOutEvent = struct {
  4621. Ftype1 int32
  4622. Fserial uint64
  4623. Fsend_event int32
  4624. Fdisplay uintptr
  4625. Fwindow TWindow
  4626. Fmode int32
  4627. Fdetail int32
  4628. }
  4629. type TXKeymapEvent = struct {
  4630. Ftype1 int32
  4631. Fserial uint64
  4632. Fsend_event int32
  4633. Fdisplay uintptr
  4634. Fwindow TWindow
  4635. Fkey_vector [32]int8
  4636. }
  4637. type TXExposeEvent = struct {
  4638. Ftype1 int32
  4639. Fserial uint64
  4640. Fsend_event int32
  4641. Fdisplay uintptr
  4642. Fwindow TWindow
  4643. Fx int32
  4644. Fy int32
  4645. Fwidth int32
  4646. Fheight int32
  4647. Fcount int32
  4648. }
  4649. type TXGraphicsExposeEvent = struct {
  4650. Ftype1 int32
  4651. Fserial uint64
  4652. Fsend_event int32
  4653. Fdisplay uintptr
  4654. Fdrawable TDrawable
  4655. Fx int32
  4656. Fy int32
  4657. Fwidth int32
  4658. Fheight int32
  4659. Fcount int32
  4660. Fmajor_code int32
  4661. Fminor_code int32
  4662. }
  4663. type TXNoExposeEvent = struct {
  4664. Ftype1 int32
  4665. Fserial uint64
  4666. Fsend_event int32
  4667. Fdisplay uintptr
  4668. Fdrawable TDrawable
  4669. Fmajor_code int32
  4670. Fminor_code int32
  4671. }
  4672. type TXVisibilityEvent = struct {
  4673. Ftype1 int32
  4674. Fserial uint64
  4675. Fsend_event int32
  4676. Fdisplay uintptr
  4677. Fwindow TWindow
  4678. Fstate int32
  4679. }
  4680. type TXCreateWindowEvent = struct {
  4681. Ftype1 int32
  4682. Fserial uint64
  4683. Fsend_event int32
  4684. Fdisplay uintptr
  4685. Fparent TWindow
  4686. Fwindow TWindow
  4687. Fx int32
  4688. Fy int32
  4689. Fwidth int32
  4690. Fheight int32
  4691. Fborder_width int32
  4692. Foverride_redirect int32
  4693. }
  4694. type TXDestroyWindowEvent = struct {
  4695. Ftype1 int32
  4696. Fserial uint64
  4697. Fsend_event int32
  4698. Fdisplay uintptr
  4699. Fevent TWindow
  4700. Fwindow TWindow
  4701. }
  4702. type TXUnmapEvent = struct {
  4703. Ftype1 int32
  4704. Fserial uint64
  4705. Fsend_event int32
  4706. Fdisplay uintptr
  4707. Fevent TWindow
  4708. Fwindow TWindow
  4709. Ffrom_configure int32
  4710. }
  4711. type TXMapEvent = struct {
  4712. Ftype1 int32
  4713. Fserial uint64
  4714. Fsend_event int32
  4715. Fdisplay uintptr
  4716. Fevent TWindow
  4717. Fwindow TWindow
  4718. Foverride_redirect int32
  4719. }
  4720. type TXMapRequestEvent = struct {
  4721. Ftype1 int32
  4722. Fserial uint64
  4723. Fsend_event int32
  4724. Fdisplay uintptr
  4725. Fparent TWindow
  4726. Fwindow TWindow
  4727. }
  4728. type TXReparentEvent = struct {
  4729. Ftype1 int32
  4730. Fserial uint64
  4731. Fsend_event int32
  4732. Fdisplay uintptr
  4733. Fevent TWindow
  4734. Fwindow TWindow
  4735. Fparent TWindow
  4736. Fx int32
  4737. Fy int32
  4738. Foverride_redirect int32
  4739. }
  4740. type TXConfigureEvent = struct {
  4741. Ftype1 int32
  4742. Fserial uint64
  4743. Fsend_event int32
  4744. Fdisplay uintptr
  4745. Fevent TWindow
  4746. Fwindow TWindow
  4747. Fx int32
  4748. Fy int32
  4749. Fwidth int32
  4750. Fheight int32
  4751. Fborder_width int32
  4752. Fabove TWindow
  4753. Foverride_redirect int32
  4754. }
  4755. type TXGravityEvent = struct {
  4756. Ftype1 int32
  4757. Fserial uint64
  4758. Fsend_event int32
  4759. Fdisplay uintptr
  4760. Fevent TWindow
  4761. Fwindow TWindow
  4762. Fx int32
  4763. Fy int32
  4764. }
  4765. type TXResizeRequestEvent = struct {
  4766. Ftype1 int32
  4767. Fserial uint64
  4768. Fsend_event int32
  4769. Fdisplay uintptr
  4770. Fwindow TWindow
  4771. Fwidth int32
  4772. Fheight int32
  4773. }
  4774. type TXConfigureRequestEvent = struct {
  4775. Ftype1 int32
  4776. Fserial uint64
  4777. Fsend_event int32
  4778. Fdisplay uintptr
  4779. Fparent TWindow
  4780. Fwindow TWindow
  4781. Fx int32
  4782. Fy int32
  4783. Fwidth int32
  4784. Fheight int32
  4785. Fborder_width int32
  4786. Fabove TWindow
  4787. Fdetail int32
  4788. Fvalue_mask uint64
  4789. }
  4790. type TXCirculateEvent = struct {
  4791. Ftype1 int32
  4792. Fserial uint64
  4793. Fsend_event int32
  4794. Fdisplay uintptr
  4795. Fevent TWindow
  4796. Fwindow TWindow
  4797. Fplace int32
  4798. }
  4799. type TXCirculateRequestEvent = struct {
  4800. Ftype1 int32
  4801. Fserial uint64
  4802. Fsend_event int32
  4803. Fdisplay uintptr
  4804. Fparent TWindow
  4805. Fwindow TWindow
  4806. Fplace int32
  4807. }
  4808. type TXPropertyEvent = struct {
  4809. Ftype1 int32
  4810. Fserial uint64
  4811. Fsend_event int32
  4812. Fdisplay uintptr
  4813. Fwindow TWindow
  4814. Fatom TAtom
  4815. Ftime TTime
  4816. Fstate int32
  4817. }
  4818. type TXSelectionClearEvent = struct {
  4819. Ftype1 int32
  4820. Fserial uint64
  4821. Fsend_event int32
  4822. Fdisplay uintptr
  4823. Fwindow TWindow
  4824. Fselection TAtom
  4825. Ftime TTime
  4826. }
  4827. type TXSelectionRequestEvent = struct {
  4828. Ftype1 int32
  4829. Fserial uint64
  4830. Fsend_event int32
  4831. Fdisplay uintptr
  4832. Fowner TWindow
  4833. Frequestor TWindow
  4834. Fselection TAtom
  4835. Ftarget TAtom
  4836. Fproperty TAtom
  4837. Ftime TTime
  4838. }
  4839. type TXSelectionEvent = struct {
  4840. Ftype1 int32
  4841. Fserial uint64
  4842. Fsend_event int32
  4843. Fdisplay uintptr
  4844. Frequestor TWindow
  4845. Fselection TAtom
  4846. Ftarget TAtom
  4847. Fproperty TAtom
  4848. Ftime TTime
  4849. }
  4850. type TXColormapEvent = struct {
  4851. Ftype1 int32
  4852. Fserial uint64
  4853. Fsend_event int32
  4854. Fdisplay uintptr
  4855. Fwindow TWindow
  4856. Fcolormap TColormap
  4857. Fnew1 int32
  4858. Fstate int32
  4859. }
  4860. type TXClientMessageEvent = struct {
  4861. Ftype1 int32
  4862. Fserial uint64
  4863. Fsend_event int32
  4864. Fdisplay uintptr
  4865. Fwindow TWindow
  4866. Fmessage_type TAtom
  4867. Fformat int32
  4868. Fdata struct {
  4869. Fs [0][10]int16
  4870. Fl [0][5]int64
  4871. Fb [20]int8
  4872. F__ccgo_pad3 [20]byte
  4873. }
  4874. }
  4875. type TXMappingEvent = struct {
  4876. Ftype1 int32
  4877. Fserial uint64
  4878. Fsend_event int32
  4879. Fdisplay uintptr
  4880. Fwindow TWindow
  4881. Frequest int32
  4882. Ffirst_keycode int32
  4883. Fcount int32
  4884. }
  4885. type TXErrorEvent = struct {
  4886. Ftype1 int32
  4887. Fdisplay uintptr
  4888. Fresourceid TXID
  4889. Fserial uint64
  4890. Ferror_code uint8
  4891. Frequest_code uint8
  4892. Fminor_code uint8
  4893. }
  4894. type TXAnyEvent = struct {
  4895. Ftype1 int32
  4896. Fserial uint64
  4897. Fsend_event int32
  4898. Fdisplay uintptr
  4899. Fwindow TWindow
  4900. }
  4901. type TXGenericEvent = struct {
  4902. Ftype1 int32
  4903. Fserial uint64
  4904. Fsend_event int32
  4905. Fdisplay uintptr
  4906. Fextension int32
  4907. Fevtype int32
  4908. }
  4909. type TXGenericEventCookie = struct {
  4910. Ftype1 int32
  4911. Fserial uint64
  4912. Fsend_event int32
  4913. Fdisplay uintptr
  4914. Fextension int32
  4915. Fevtype int32
  4916. Fcookie uint32
  4917. Fdata uintptr
  4918. }
  4919. type TXEvent = struct {
  4920. Fxany [0]TXAnyEvent
  4921. Fxkey [0]TXKeyEvent
  4922. Fxbutton [0]TXButtonEvent
  4923. Fxmotion [0]TXMotionEvent
  4924. Fxcrossing [0]TXCrossingEvent
  4925. Fxfocus [0]TXFocusChangeEvent
  4926. Fxexpose [0]TXExposeEvent
  4927. Fxgraphicsexpose [0]TXGraphicsExposeEvent
  4928. Fxnoexpose [0]TXNoExposeEvent
  4929. Fxvisibility [0]TXVisibilityEvent
  4930. Fxcreatewindow [0]TXCreateWindowEvent
  4931. Fxdestroywindow [0]TXDestroyWindowEvent
  4932. Fxunmap [0]TXUnmapEvent
  4933. Fxmap [0]TXMapEvent
  4934. Fxmaprequest [0]TXMapRequestEvent
  4935. Fxreparent [0]TXReparentEvent
  4936. Fxconfigure [0]TXConfigureEvent
  4937. Fxgravity [0]TXGravityEvent
  4938. Fxresizerequest [0]TXResizeRequestEvent
  4939. Fxconfigurerequest [0]TXConfigureRequestEvent
  4940. Fxcirculate [0]TXCirculateEvent
  4941. Fxcirculaterequest [0]TXCirculateRequestEvent
  4942. Fxproperty [0]TXPropertyEvent
  4943. Fxselectionclear [0]TXSelectionClearEvent
  4944. Fxselectionrequest [0]TXSelectionRequestEvent
  4945. Fxselection [0]TXSelectionEvent
  4946. Fxcolormap [0]TXColormapEvent
  4947. Fxclient [0]TXClientMessageEvent
  4948. Fxmapping [0]TXMappingEvent
  4949. Fxerror [0]TXErrorEvent
  4950. Fxkeymap [0]TXKeymapEvent
  4951. Fxgeneric [0]TXGenericEvent
  4952. Fxcookie [0]TXGenericEventCookie
  4953. Fpad [0][24]int64
  4954. Ftype1 int32
  4955. F__ccgo_pad35 [188]byte
  4956. }
  4957. type T_XEvent = TXEvent
  4958. type TXCharStruct = struct {
  4959. Flbearing int16
  4960. Frbearing int16
  4961. Fwidth int16
  4962. Fascent int16
  4963. Fdescent int16
  4964. Fattributes uint16
  4965. }
  4966. type TXFontProp = struct {
  4967. Fname TAtom
  4968. Fcard32 uint64
  4969. }
  4970. type TXFontStruct = struct {
  4971. Fext_data uintptr
  4972. Ffid TFont
  4973. Fdirection uint32
  4974. Fmin_char_or_byte2 uint32
  4975. Fmax_char_or_byte2 uint32
  4976. Fmin_byte1 uint32
  4977. Fmax_byte1 uint32
  4978. Fall_chars_exist int32
  4979. Fdefault_char uint32
  4980. Fn_properties int32
  4981. Fproperties uintptr
  4982. Fmin_bounds TXCharStruct
  4983. Fmax_bounds TXCharStruct
  4984. Fper_char uintptr
  4985. Fascent int32
  4986. Fdescent int32
  4987. }
  4988. type TXTextItem = struct {
  4989. Fchars uintptr
  4990. Fnchars int32
  4991. Fdelta int32
  4992. Ffont TFont
  4993. }
  4994. type TXChar2b = struct {
  4995. Fbyte1 uint8
  4996. Fbyte2 uint8
  4997. }
  4998. type TXTextItem16 = struct {
  4999. Fchars uintptr
  5000. Fnchars int32
  5001. Fdelta int32
  5002. Ffont TFont
  5003. }
  5004. type TXEDataObject = struct {
  5005. Fgc [0]TGC
  5006. Fvisual [0]uintptr
  5007. Fscreen [0]uintptr
  5008. Fpixmap_format [0]uintptr
  5009. Ffont [0]uintptr
  5010. Fdisplay uintptr
  5011. }
  5012. type TXFontSetExtents = struct {
  5013. Fmax_ink_extent TXRectangle
  5014. Fmax_logical_extent TXRectangle
  5015. }
  5016. type TXOM = uintptr
  5017. type TXOC = uintptr
  5018. type TXFontSet = uintptr
  5019. type TXmbTextItem = struct {
  5020. Fchars uintptr
  5021. Fnchars int32
  5022. Fdelta int32
  5023. Ffont_set TXFontSet
  5024. }
  5025. type TXwcTextItem = struct {
  5026. Fchars uintptr
  5027. Fnchars int32
  5028. Fdelta int32
  5029. Ffont_set TXFontSet
  5030. }
  5031. type TXOMCharSetList = struct {
  5032. Fcharset_count int32
  5033. Fcharset_list uintptr
  5034. }
  5035. type TXOrientation = int32
  5036. const _XOMOrientation_LTR_TTB = 0
  5037. const _XOMOrientation_RTL_TTB = 1
  5038. const _XOMOrientation_TTB_LTR = 2
  5039. const _XOMOrientation_TTB_RTL = 3
  5040. const _XOMOrientation_Context = 4
  5041. type TXOMOrientation = struct {
  5042. Fnum_orientation int32
  5043. Forientation uintptr
  5044. }
  5045. type TXOMFontInfo = struct {
  5046. Fnum_font int32
  5047. Ffont_struct_list uintptr
  5048. Ffont_name_list uintptr
  5049. }
  5050. type TXIM = uintptr
  5051. type TXIC = uintptr
  5052. type TXIMProc = uintptr
  5053. type TXICProc = uintptr
  5054. type TXIDProc = uintptr
  5055. type TXIMStyle = uint64
  5056. type TXIMStyles = struct {
  5057. Fcount_styles uint16
  5058. Fsupported_styles uintptr
  5059. }
  5060. type TXVaNestedList = uintptr
  5061. type TXIMCallback = struct {
  5062. Fclient_data TXPointer
  5063. Fcallback TXIMProc
  5064. }
  5065. type TXICCallback = struct {
  5066. Fclient_data TXPointer
  5067. Fcallback TXICProc
  5068. }
  5069. type TXIMFeedback = uint64
  5070. type TXIMText = struct {
  5071. Flength uint16
  5072. Ffeedback uintptr
  5073. Fencoding_is_wchar int32
  5074. Fstring1 struct {
  5075. Fwide_char [0]uintptr
  5076. Fmulti_byte uintptr
  5077. }
  5078. }
  5079. type T_XIMText = TXIMText
  5080. type TXIMPreeditState = uint64
  5081. type TXIMPreeditStateNotifyCallbackStruct = struct {
  5082. Fstate TXIMPreeditState
  5083. }
  5084. type T_XIMPreeditStateNotifyCallbackStruct = TXIMPreeditStateNotifyCallbackStruct
  5085. type TXIMResetState = uint64
  5086. type TXIMStringConversionFeedback = uint64
  5087. type TXIMStringConversionText = struct {
  5088. Flength uint16
  5089. Ffeedback uintptr
  5090. Fencoding_is_wchar int32
  5091. Fstring1 struct {
  5092. Fwcs [0]uintptr
  5093. Fmbs uintptr
  5094. }
  5095. }
  5096. type T_XIMStringConversionText = TXIMStringConversionText
  5097. type TXIMStringConversionPosition = uint16
  5098. type TXIMStringConversionType = uint16
  5099. type TXIMStringConversionOperation = uint16
  5100. type TXIMCaretDirection = int32
  5101. const _XIMForwardChar = 0
  5102. const _XIMBackwardChar = 1
  5103. const _XIMForwardWord = 2
  5104. const _XIMBackwardWord = 3
  5105. const _XIMCaretUp = 4
  5106. const _XIMCaretDown = 5
  5107. const _XIMNextLine = 6
  5108. const _XIMPreviousLine = 7
  5109. const _XIMLineStart = 8
  5110. const _XIMLineEnd = 9
  5111. const _XIMAbsolutePosition = 10
  5112. const _XIMDontChange = 11
  5113. type TXIMStringConversionCallbackStruct = struct {
  5114. Fposition TXIMStringConversionPosition
  5115. Fdirection TXIMCaretDirection
  5116. Foperation TXIMStringConversionOperation
  5117. Ffactor uint16
  5118. Ftext uintptr
  5119. }
  5120. type T_XIMStringConversionCallbackStruct = TXIMStringConversionCallbackStruct
  5121. type TXIMPreeditDrawCallbackStruct = struct {
  5122. Fcaret int32
  5123. Fchg_first int32
  5124. Fchg_length int32
  5125. Ftext uintptr
  5126. }
  5127. type T_XIMPreeditDrawCallbackStruct = TXIMPreeditDrawCallbackStruct
  5128. type TXIMCaretStyle = int32
  5129. const _XIMIsInvisible = 0
  5130. const _XIMIsPrimary = 1
  5131. const _XIMIsSecondary = 2
  5132. type TXIMPreeditCaretCallbackStruct = struct {
  5133. Fposition int32
  5134. Fdirection TXIMCaretDirection
  5135. Fstyle TXIMCaretStyle
  5136. }
  5137. type T_XIMPreeditCaretCallbackStruct = TXIMPreeditCaretCallbackStruct
  5138. type TXIMStatusDataType = int32
  5139. const _XIMTextType = 0
  5140. const _XIMBitmapType = 1
  5141. type TXIMStatusDrawCallbackStruct = struct {
  5142. Ftype1 TXIMStatusDataType
  5143. Fdata struct {
  5144. Fbitmap [0]TPixmap
  5145. Ftext uintptr
  5146. }
  5147. }
  5148. type T_XIMStatusDrawCallbackStruct = TXIMStatusDrawCallbackStruct
  5149. type TXIMHotKeyTrigger = struct {
  5150. Fkeysym TKeySym
  5151. Fmodifier int32
  5152. Fmodifier_mask int32
  5153. }
  5154. type T_XIMHotKeyTrigger = TXIMHotKeyTrigger
  5155. type TXIMHotKeyTriggers = struct {
  5156. Fnum_hot_key int32
  5157. Fkey uintptr
  5158. }
  5159. type T_XIMHotKeyTriggers = TXIMHotKeyTriggers
  5160. type TXIMHotKeyState = uint64
  5161. type TXIMValuesList = struct {
  5162. Fcount_values uint16
  5163. Fsupported_values uintptr
  5164. }
  5165. type TXErrorHandler = uintptr
  5166. type TXIOErrorHandler = uintptr
  5167. type TXIOErrorExitHandler = uintptr
  5168. type TXConnectionWatchProc = uintptr
  5169. type TXSizeHints = struct {
  5170. Fflags int64
  5171. Fx int32
  5172. Fy int32
  5173. Fwidth int32
  5174. Fheight int32
  5175. Fmin_width int32
  5176. Fmin_height int32
  5177. Fmax_width int32
  5178. Fmax_height int32
  5179. Fwidth_inc int32
  5180. Fheight_inc int32
  5181. Fmin_aspect struct {
  5182. Fx int32
  5183. Fy int32
  5184. }
  5185. Fmax_aspect struct {
  5186. Fx int32
  5187. Fy int32
  5188. }
  5189. Fbase_width int32
  5190. Fbase_height int32
  5191. Fwin_gravity int32
  5192. }
  5193. type TXWMHints = struct {
  5194. Fflags int64
  5195. Finput int32
  5196. Finitial_state int32
  5197. Ficon_pixmap TPixmap
  5198. Ficon_window TWindow
  5199. Ficon_x int32
  5200. Ficon_y int32
  5201. Ficon_mask TPixmap
  5202. Fwindow_group TXID
  5203. }
  5204. type TXTextProperty = struct {
  5205. Fvalue uintptr
  5206. Fencoding TAtom
  5207. Fformat int32
  5208. Fnitems uint64
  5209. }
  5210. type TXICCEncodingStyle = int32
  5211. const _XStringStyle = 0
  5212. const _XCompoundTextStyle = 1
  5213. const _XTextStyle = 2
  5214. const _XStdICCTextStyle = 3
  5215. const _XUTF8StringStyle = 4
  5216. type TXIconSize = struct {
  5217. Fmin_width int32
  5218. Fmin_height int32
  5219. Fmax_width int32
  5220. Fmax_height int32
  5221. Fwidth_inc int32
  5222. Fheight_inc int32
  5223. }
  5224. type TXClassHint = struct {
  5225. Fres_name uintptr
  5226. Fres_class uintptr
  5227. }
  5228. type TXComposeStatus = struct {
  5229. Fcompose_ptr TXPointer
  5230. Fchars_matched int32
  5231. }
  5232. type T_XComposeStatus = TXComposeStatus
  5233. type TRegion = uintptr
  5234. type TXVisualInfo = struct {
  5235. Fvisual uintptr
  5236. Fvisualid TVisualID
  5237. Fscreen int32
  5238. Fdepth int32
  5239. Fclass int32
  5240. Fred_mask uint64
  5241. Fgreen_mask uint64
  5242. Fblue_mask uint64
  5243. Fcolormap_size int32
  5244. Fbits_per_rgb int32
  5245. }
  5246. type TXStandardColormap = struct {
  5247. Fcolormap TColormap
  5248. Fred_max uint64
  5249. Fred_mult uint64
  5250. Fgreen_max uint64
  5251. Fgreen_mult uint64
  5252. Fblue_max uint64
  5253. Fblue_mult uint64
  5254. Fbase_pixel uint64
  5255. Fvisualid TVisualID
  5256. Fkillid TXID
  5257. }
  5258. type TXContext = int32
  5259. type TINT64 = int64
  5260. type TINT32 = int32
  5261. type TINT16 = int16
  5262. type TINT8 = int8
  5263. type TCARD64 = uint64
  5264. type TCARD32 = uint32
  5265. type TCARD16 = uint16
  5266. type TCARD8 = uint8
  5267. type TBITS32 = uint32
  5268. type TBITS16 = uint16
  5269. type TBYTE = uint8
  5270. type TBOOL = uint8
  5271. type Tuintptr_t = uint64
  5272. type Tintptr_t = int64
  5273. type Tintmax_t = int64
  5274. type Tuint8_t = uint8
  5275. type Tuintmax_t = uint64
  5276. type Tint_fast8_t = int8
  5277. type Tint_fast64_t = int64
  5278. type Tint_least8_t = int8
  5279. type Tint_least16_t = int16
  5280. type Tint_least32_t = int32
  5281. type Tint_least64_t = int64
  5282. type Tuint_fast8_t = uint8
  5283. type Tuint_fast64_t = uint64
  5284. type Tuint_least8_t = uint8
  5285. type Tuint_least16_t = uint16
  5286. type Tuint_least32_t = uint32
  5287. type Tuint_least64_t = uint64
  5288. type Tint_fast16_t = int32
  5289. type Tint_fast32_t = int32
  5290. type Tuint_fast16_t = uint32
  5291. type Tuint_fast32_t = uint32
  5292. type TxSegment = struct {
  5293. Fx1 TINT16
  5294. Fy1 TINT16
  5295. Fx2 TINT16
  5296. Fy2 TINT16
  5297. }
  5298. type T_xSegment = TxSegment
  5299. type TxPoint = struct {
  5300. Fx TINT16
  5301. Fy TINT16
  5302. }
  5303. type T_xPoint = TxPoint
  5304. type TxRectangle = struct {
  5305. Fx TINT16
  5306. Fy TINT16
  5307. Fwidth TCARD16
  5308. Fheight TCARD16
  5309. }
  5310. type T_xRectangle = TxRectangle
  5311. type TxArc = struct {
  5312. Fx TINT16
  5313. Fy TINT16
  5314. Fwidth TCARD16
  5315. Fheight TCARD16
  5316. Fangle1 TINT16
  5317. Fangle2 TINT16
  5318. }
  5319. type T_xArc = TxArc
  5320. type TKeyButMask = uint16
  5321. type TxConnClientPrefix = struct {
  5322. FbyteOrder TCARD8
  5323. Fpad TBYTE
  5324. FmajorVersion TCARD16
  5325. FminorVersion TCARD16
  5326. FnbytesAuthProto TCARD16
  5327. FnbytesAuthString TCARD16
  5328. Fpad2 TCARD16
  5329. }
  5330. type TxConnSetupPrefix = struct {
  5331. Fsuccess TCARD8
  5332. FlengthReason TBYTE
  5333. FmajorVersion TCARD16
  5334. FminorVersion TCARD16
  5335. Flength TCARD16
  5336. }
  5337. type TxConnSetup = struct {
  5338. Frelease TCARD32
  5339. FridBase TCARD32
  5340. FridMask TCARD32
  5341. FmotionBufferSize TCARD32
  5342. FnbytesVendor TCARD16
  5343. FmaxRequestSize TCARD16
  5344. FnumRoots TCARD8
  5345. FnumFormats TCARD8
  5346. FimageByteOrder TCARD8
  5347. FbitmapBitOrder TCARD8
  5348. FbitmapScanlineUnit TCARD8
  5349. FbitmapScanlinePad TCARD8
  5350. FminKeyCode TCARD8
  5351. FmaxKeyCode TCARD8
  5352. Fpad2 TCARD32
  5353. }
  5354. type TxPixmapFormat = struct {
  5355. Fdepth TCARD8
  5356. FbitsPerPixel TCARD8
  5357. FscanLinePad TCARD8
  5358. Fpad1 TCARD8
  5359. Fpad2 TCARD32
  5360. }
  5361. type TxDepth = struct {
  5362. Fdepth TCARD8
  5363. Fpad1 TCARD8
  5364. FnVisuals TCARD16
  5365. Fpad2 TCARD32
  5366. }
  5367. type TxVisualType = struct {
  5368. FvisualID TCARD32
  5369. Fclass TCARD8
  5370. FbitsPerRGB TCARD8
  5371. FcolormapEntries TCARD16
  5372. FredMask TCARD32
  5373. FgreenMask TCARD32
  5374. FblueMask TCARD32
  5375. Fpad TCARD32
  5376. }
  5377. type TxWindowRoot = struct {
  5378. FwindowId TCARD32
  5379. FdefaultColormap TCARD32
  5380. FwhitePixel TCARD32
  5381. FblackPixel TCARD32
  5382. FcurrentInputMask TCARD32
  5383. FpixWidth TCARD16
  5384. FpixHeight TCARD16
  5385. FmmWidth TCARD16
  5386. FmmHeight TCARD16
  5387. FminInstalledMaps TCARD16
  5388. FmaxInstalledMaps TCARD16
  5389. FrootVisualID TCARD32
  5390. FbackingStore TCARD8
  5391. FsaveUnders TBOOL
  5392. FrootDepth TCARD8
  5393. FnDepths TCARD8
  5394. }
  5395. type TxTimecoord = struct {
  5396. Ftime TCARD32
  5397. Fx TINT16
  5398. Fy TINT16
  5399. }
  5400. type TxHostEntry = struct {
  5401. Ffamily TCARD8
  5402. Fpad TBYTE
  5403. Flength TCARD16
  5404. }
  5405. type TxCharInfo = struct {
  5406. FleftSideBearing TINT16
  5407. FrightSideBearing TINT16
  5408. FcharacterWidth TINT16
  5409. Fascent TINT16
  5410. Fdescent TINT16
  5411. Fattributes TCARD16
  5412. }
  5413. type TxFontProp = struct {
  5414. Fname TCARD32
  5415. Fvalue TCARD32
  5416. }
  5417. type TxTextElt = struct {
  5418. Flen1 TCARD8
  5419. Fdelta TINT8
  5420. }
  5421. type TxColorItem = struct {
  5422. Fpixel TCARD32
  5423. Fred TCARD16
  5424. Fgreen TCARD16
  5425. Fblue TCARD16
  5426. Fflags TCARD8
  5427. Fpad TCARD8
  5428. }
  5429. type Txrgb = struct {
  5430. Fred TCARD16
  5431. Fgreen TCARD16
  5432. Fblue TCARD16
  5433. Fpad TCARD16
  5434. }
  5435. type TKEYCODE = uint8
  5436. type TxGenericReply = struct {
  5437. Ftype1 TBYTE
  5438. Fdata1 TBYTE
  5439. FsequenceNumber TCARD16
  5440. Flength TCARD32
  5441. Fdata00 TCARD32
  5442. Fdata01 TCARD32
  5443. Fdata02 TCARD32
  5444. Fdata03 TCARD32
  5445. Fdata04 TCARD32
  5446. Fdata05 TCARD32
  5447. }
  5448. type TxGetWindowAttributesReply = struct {
  5449. Ftype1 TBYTE
  5450. FbackingStore TCARD8
  5451. FsequenceNumber TCARD16
  5452. Flength TCARD32
  5453. FvisualID TCARD32
  5454. Fclass TCARD16
  5455. FbitGravity TCARD8
  5456. FwinGravity TCARD8
  5457. FbackingBitPlanes TCARD32
  5458. FbackingPixel TCARD32
  5459. FsaveUnder TBOOL
  5460. FmapInstalled TBOOL
  5461. FmapState TCARD8
  5462. Foverride TBOOL
  5463. Fcolormap TCARD32
  5464. FallEventMasks TCARD32
  5465. FyourEventMask TCARD32
  5466. FdoNotPropagateMask TCARD16
  5467. Fpad TCARD16
  5468. }
  5469. type TxGetGeometryReply = struct {
  5470. Ftype1 TBYTE
  5471. Fdepth TCARD8
  5472. FsequenceNumber TCARD16
  5473. Flength TCARD32
  5474. Froot TCARD32
  5475. Fx TINT16
  5476. Fy TINT16
  5477. Fwidth TCARD16
  5478. Fheight TCARD16
  5479. FborderWidth TCARD16
  5480. Fpad1 TCARD16
  5481. Fpad2 TCARD32
  5482. Fpad3 TCARD32
  5483. }
  5484. type TxQueryTreeReply = struct {
  5485. Ftype1 TBYTE
  5486. Fpad1 TBYTE
  5487. FsequenceNumber TCARD16
  5488. Flength TCARD32
  5489. Froot TCARD32
  5490. Fparent TCARD32
  5491. FnChildren TCARD16
  5492. Fpad2 TCARD16
  5493. Fpad3 TCARD32
  5494. Fpad4 TCARD32
  5495. Fpad5 TCARD32
  5496. }
  5497. type TxInternAtomReply = struct {
  5498. Ftype1 TBYTE
  5499. Fpad1 TBYTE
  5500. FsequenceNumber TCARD16
  5501. Flength TCARD32
  5502. Fatom TCARD32
  5503. Fpad2 TCARD32
  5504. Fpad3 TCARD32
  5505. Fpad4 TCARD32
  5506. Fpad5 TCARD32
  5507. Fpad6 TCARD32
  5508. }
  5509. type TxGetAtomNameReply = struct {
  5510. Ftype1 TBYTE
  5511. Fpad1 TBYTE
  5512. FsequenceNumber TCARD16
  5513. Flength TCARD32
  5514. FnameLength TCARD16
  5515. Fpad2 TCARD16
  5516. Fpad3 TCARD32
  5517. Fpad4 TCARD32
  5518. Fpad5 TCARD32
  5519. Fpad6 TCARD32
  5520. Fpad7 TCARD32
  5521. }
  5522. type TxGetPropertyReply = struct {
  5523. Ftype1 TBYTE
  5524. Fformat TCARD8
  5525. FsequenceNumber TCARD16
  5526. Flength TCARD32
  5527. FpropertyType TCARD32
  5528. FbytesAfter TCARD32
  5529. FnItems TCARD32
  5530. Fpad1 TCARD32
  5531. Fpad2 TCARD32
  5532. Fpad3 TCARD32
  5533. }
  5534. type TxListPropertiesReply = struct {
  5535. Ftype1 TBYTE
  5536. Fpad1 TBYTE
  5537. FsequenceNumber TCARD16
  5538. Flength TCARD32
  5539. FnProperties TCARD16
  5540. Fpad2 TCARD16
  5541. Fpad3 TCARD32
  5542. Fpad4 TCARD32
  5543. Fpad5 TCARD32
  5544. Fpad6 TCARD32
  5545. Fpad7 TCARD32
  5546. }
  5547. type TxGetSelectionOwnerReply = struct {
  5548. Ftype1 TBYTE
  5549. Fpad1 TBYTE
  5550. FsequenceNumber TCARD16
  5551. Flength TCARD32
  5552. Fowner TCARD32
  5553. Fpad2 TCARD32
  5554. Fpad3 TCARD32
  5555. Fpad4 TCARD32
  5556. Fpad5 TCARD32
  5557. Fpad6 TCARD32
  5558. }
  5559. type TxGrabPointerReply = 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 TxGrabKeyboardReply = struct {
  5572. Ftype1 TBYTE
  5573. Fstatus TBYTE
  5574. FsequenceNumber TCARD16
  5575. Flength TCARD32
  5576. Fpad1 TCARD32
  5577. Fpad2 TCARD32
  5578. Fpad3 TCARD32
  5579. Fpad4 TCARD32
  5580. Fpad5 TCARD32
  5581. Fpad6 TCARD32
  5582. }
  5583. type TxQueryPointerReply = struct {
  5584. Ftype1 TBYTE
  5585. FsameScreen TBOOL
  5586. FsequenceNumber TCARD16
  5587. Flength TCARD32
  5588. Froot TCARD32
  5589. Fchild TCARD32
  5590. FrootX TINT16
  5591. FrootY TINT16
  5592. FwinX TINT16
  5593. FwinY TINT16
  5594. Fmask TCARD16
  5595. Fpad1 TCARD16
  5596. Fpad TCARD32
  5597. }
  5598. type TxGetMotionEventsReply = struct {
  5599. Ftype1 TBYTE
  5600. Fpad1 TBYTE
  5601. FsequenceNumber TCARD16
  5602. Flength TCARD32
  5603. FnEvents TCARD32
  5604. Fpad2 TCARD32
  5605. Fpad3 TCARD32
  5606. Fpad4 TCARD32
  5607. Fpad5 TCARD32
  5608. Fpad6 TCARD32
  5609. }
  5610. type TxTranslateCoordsReply = struct {
  5611. Ftype1 TBYTE
  5612. FsameScreen TBOOL
  5613. FsequenceNumber TCARD16
  5614. Flength TCARD32
  5615. Fchild TCARD32
  5616. FdstX TINT16
  5617. FdstY TINT16
  5618. Fpad2 TCARD32
  5619. Fpad3 TCARD32
  5620. Fpad4 TCARD32
  5621. Fpad5 TCARD32
  5622. }
  5623. type TxGetInputFocusReply = struct {
  5624. Ftype1 TBYTE
  5625. FrevertTo TCARD8
  5626. FsequenceNumber TCARD16
  5627. Flength TCARD32
  5628. Ffocus TCARD32
  5629. Fpad1 TCARD32
  5630. Fpad2 TCARD32
  5631. Fpad3 TCARD32
  5632. Fpad4 TCARD32
  5633. Fpad5 TCARD32
  5634. }
  5635. type TxQueryKeymapReply = struct {
  5636. Ftype1 TBYTE
  5637. Fpad1 TBYTE
  5638. FsequenceNumber TCARD16
  5639. Flength TCARD32
  5640. Fmap1 [32]TBYTE
  5641. }
  5642. type TxQueryFontReply = struct {
  5643. Ftype1 TBYTE
  5644. Fpad1 TBYTE
  5645. FsequenceNumber TCARD16
  5646. Flength TCARD32
  5647. FminBounds TxCharInfo
  5648. Fwalign1 TCARD32
  5649. FmaxBounds TxCharInfo
  5650. Fwalign2 TCARD32
  5651. FminCharOrByte2 TCARD16
  5652. FmaxCharOrByte2 TCARD16
  5653. FdefaultChar TCARD16
  5654. FnFontProps TCARD16
  5655. FdrawDirection TCARD8
  5656. FminByte1 TCARD8
  5657. FmaxByte1 TCARD8
  5658. FallCharsExist TBOOL
  5659. FfontAscent TINT16
  5660. FfontDescent TINT16
  5661. FnCharInfos TCARD32
  5662. }
  5663. type T_xQueryFontReply = TxQueryFontReply
  5664. type TxQueryTextExtentsReply = struct {
  5665. Ftype1 TBYTE
  5666. FdrawDirection TCARD8
  5667. FsequenceNumber TCARD16
  5668. Flength TCARD32
  5669. FfontAscent TINT16
  5670. FfontDescent TINT16
  5671. FoverallAscent TINT16
  5672. FoverallDescent TINT16
  5673. FoverallWidth TINT32
  5674. FoverallLeft TINT32
  5675. FoverallRight TINT32
  5676. Fpad TCARD32
  5677. }
  5678. type TxListFontsReply = struct {
  5679. Ftype1 TBYTE
  5680. Fpad1 TBYTE
  5681. FsequenceNumber TCARD16
  5682. Flength TCARD32
  5683. FnFonts TCARD16
  5684. Fpad2 TCARD16
  5685. Fpad3 TCARD32
  5686. Fpad4 TCARD32
  5687. Fpad5 TCARD32
  5688. Fpad6 TCARD32
  5689. Fpad7 TCARD32
  5690. }
  5691. type TxListFontsWithInfoReply = struct {
  5692. Ftype1 TBYTE
  5693. FnameLength TCARD8
  5694. FsequenceNumber TCARD16
  5695. Flength TCARD32
  5696. FminBounds TxCharInfo
  5697. Fwalign1 TCARD32
  5698. FmaxBounds TxCharInfo
  5699. Fwalign2 TCARD32
  5700. FminCharOrByte2 TCARD16
  5701. FmaxCharOrByte2 TCARD16
  5702. FdefaultChar TCARD16
  5703. FnFontProps TCARD16
  5704. FdrawDirection TCARD8
  5705. FminByte1 TCARD8
  5706. FmaxByte1 TCARD8
  5707. FallCharsExist TBOOL
  5708. FfontAscent TINT16
  5709. FfontDescent TINT16
  5710. FnReplies TCARD32
  5711. }
  5712. type TxGetFontPathReply = struct {
  5713. Ftype1 TBYTE
  5714. Fpad1 TBYTE
  5715. FsequenceNumber TCARD16
  5716. Flength TCARD32
  5717. FnPaths TCARD16
  5718. Fpad2 TCARD16
  5719. Fpad3 TCARD32
  5720. Fpad4 TCARD32
  5721. Fpad5 TCARD32
  5722. Fpad6 TCARD32
  5723. Fpad7 TCARD32
  5724. }
  5725. type TxGetImageReply = struct {
  5726. Ftype1 TBYTE
  5727. Fdepth TCARD8
  5728. FsequenceNumber TCARD16
  5729. Flength TCARD32
  5730. Fvisual TCARD32
  5731. Fpad3 TCARD32
  5732. Fpad4 TCARD32
  5733. Fpad5 TCARD32
  5734. Fpad6 TCARD32
  5735. Fpad7 TCARD32
  5736. }
  5737. type TxListInstalledColormapsReply = struct {
  5738. Ftype1 TBYTE
  5739. Fpad1 TBYTE
  5740. FsequenceNumber TCARD16
  5741. Flength TCARD32
  5742. FnColormaps TCARD16
  5743. Fpad2 TCARD16
  5744. Fpad3 TCARD32
  5745. Fpad4 TCARD32
  5746. Fpad5 TCARD32
  5747. Fpad6 TCARD32
  5748. Fpad7 TCARD32
  5749. }
  5750. type TxAllocColorReply = struct {
  5751. Ftype1 TBYTE
  5752. Fpad1 TBYTE
  5753. FsequenceNumber TCARD16
  5754. Flength TCARD32
  5755. Fred TCARD16
  5756. Fgreen TCARD16
  5757. Fblue TCARD16
  5758. Fpad2 TCARD16
  5759. Fpixel TCARD32
  5760. Fpad3 TCARD32
  5761. Fpad4 TCARD32
  5762. Fpad5 TCARD32
  5763. }
  5764. type TxAllocNamedColorReply = struct {
  5765. Ftype1 TBYTE
  5766. Fpad1 TBYTE
  5767. FsequenceNumber TCARD16
  5768. Flength TCARD32
  5769. Fpixel TCARD32
  5770. FexactRed TCARD16
  5771. FexactGreen TCARD16
  5772. FexactBlue TCARD16
  5773. FscreenRed TCARD16
  5774. FscreenGreen TCARD16
  5775. FscreenBlue TCARD16
  5776. Fpad2 TCARD32
  5777. Fpad3 TCARD32
  5778. }
  5779. type TxAllocColorCellsReply = struct {
  5780. Ftype1 TBYTE
  5781. Fpad1 TBYTE
  5782. FsequenceNumber TCARD16
  5783. Flength TCARD32
  5784. FnPixels TCARD16
  5785. FnMasks TCARD16
  5786. Fpad3 TCARD32
  5787. Fpad4 TCARD32
  5788. Fpad5 TCARD32
  5789. Fpad6 TCARD32
  5790. Fpad7 TCARD32
  5791. }
  5792. type TxAllocColorPlanesReply = struct {
  5793. Ftype1 TBYTE
  5794. Fpad1 TBYTE
  5795. FsequenceNumber TCARD16
  5796. Flength TCARD32
  5797. FnPixels TCARD16
  5798. Fpad2 TCARD16
  5799. FredMask TCARD32
  5800. FgreenMask TCARD32
  5801. FblueMask TCARD32
  5802. Fpad3 TCARD32
  5803. Fpad4 TCARD32
  5804. }
  5805. type TxQueryColorsReply = struct {
  5806. Ftype1 TBYTE
  5807. Fpad1 TBYTE
  5808. FsequenceNumber TCARD16
  5809. Flength TCARD32
  5810. FnColors TCARD16
  5811. Fpad2 TCARD16
  5812. Fpad3 TCARD32
  5813. Fpad4 TCARD32
  5814. Fpad5 TCARD32
  5815. Fpad6 TCARD32
  5816. Fpad7 TCARD32
  5817. }
  5818. type TxLookupColorReply = struct {
  5819. Ftype1 TBYTE
  5820. Fpad1 TBYTE
  5821. FsequenceNumber TCARD16
  5822. Flength TCARD32
  5823. FexactRed TCARD16
  5824. FexactGreen TCARD16
  5825. FexactBlue TCARD16
  5826. FscreenRed TCARD16
  5827. FscreenGreen TCARD16
  5828. FscreenBlue TCARD16
  5829. Fpad3 TCARD32
  5830. Fpad4 TCARD32
  5831. Fpad5 TCARD32
  5832. }
  5833. type TxQueryBestSizeReply = struct {
  5834. Ftype1 TBYTE
  5835. Fpad1 TBYTE
  5836. FsequenceNumber TCARD16
  5837. Flength TCARD32
  5838. Fwidth TCARD16
  5839. Fheight TCARD16
  5840. Fpad3 TCARD32
  5841. Fpad4 TCARD32
  5842. Fpad5 TCARD32
  5843. Fpad6 TCARD32
  5844. Fpad7 TCARD32
  5845. }
  5846. type TxQueryExtensionReply = struct {
  5847. Ftype1 TBYTE
  5848. Fpad1 TBYTE
  5849. FsequenceNumber TCARD16
  5850. Flength TCARD32
  5851. Fpresent TBOOL
  5852. Fmajor_opcode TCARD8
  5853. Ffirst_event TCARD8
  5854. Ffirst_error TCARD8
  5855. Fpad3 TCARD32
  5856. Fpad4 TCARD32
  5857. Fpad5 TCARD32
  5858. Fpad6 TCARD32
  5859. Fpad7 TCARD32
  5860. }
  5861. type TxListExtensionsReply = struct {
  5862. Ftype1 TBYTE
  5863. FnExtensions 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 TxSetMappingReply = 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 TxSetPointerMappingReply = 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 TxSetModifierMappingReply = struct {
  5898. Ftype1 TBYTE
  5899. Fsuccess 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 TxGetPointerMappingReply = struct {
  5910. Ftype1 TBYTE
  5911. FnElts 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 TxGetKeyboardMappingReply = struct {
  5922. Ftype1 TBYTE
  5923. FkeySymsPerKeyCode TCARD8
  5924. FsequenceNumber TCARD16
  5925. Flength TCARD32
  5926. Fpad2 TCARD32
  5927. Fpad3 TCARD32
  5928. Fpad4 TCARD32
  5929. Fpad5 TCARD32
  5930. Fpad6 TCARD32
  5931. Fpad7 TCARD32
  5932. }
  5933. type TxGetModifierMappingReply = struct {
  5934. Ftype1 TBYTE
  5935. FnumKeyPerModifier TCARD8
  5936. FsequenceNumber TCARD16
  5937. Flength TCARD32
  5938. Fpad1 TCARD32
  5939. Fpad2 TCARD32
  5940. Fpad3 TCARD32
  5941. Fpad4 TCARD32
  5942. Fpad5 TCARD32
  5943. Fpad6 TCARD32
  5944. }
  5945. type TxGetKeyboardControlReply = struct {
  5946. Ftype1 TBYTE
  5947. FglobalAutoRepeat TBOOL
  5948. FsequenceNumber TCARD16
  5949. Flength TCARD32
  5950. FledMask TCARD32
  5951. FkeyClickPercent TCARD8
  5952. FbellPercent TCARD8
  5953. FbellPitch TCARD16
  5954. FbellDuration TCARD16
  5955. Fpad TCARD16
  5956. Fmap1 [32]TBYTE
  5957. }
  5958. type TxGetPointerControlReply = struct {
  5959. Ftype1 TBYTE
  5960. Fpad1 TBYTE
  5961. FsequenceNumber TCARD16
  5962. Flength TCARD32
  5963. FaccelNumerator TCARD16
  5964. FaccelDenominator TCARD16
  5965. Fthreshold TCARD16
  5966. Fpad2 TCARD16
  5967. Fpad3 TCARD32
  5968. Fpad4 TCARD32
  5969. Fpad5 TCARD32
  5970. Fpad6 TCARD32
  5971. }
  5972. type TxGetScreenSaverReply = struct {
  5973. Ftype1 TBYTE
  5974. Fpad1 TBYTE
  5975. FsequenceNumber TCARD16
  5976. Flength TCARD32
  5977. Ftimeout TCARD16
  5978. Finterval TCARD16
  5979. FpreferBlanking TBOOL
  5980. FallowExposures TBOOL
  5981. Fpad2 TCARD16
  5982. Fpad3 TCARD32
  5983. Fpad4 TCARD32
  5984. Fpad5 TCARD32
  5985. Fpad6 TCARD32
  5986. }
  5987. type TxListHostsReply = struct {
  5988. Ftype1 TBYTE
  5989. Fenabled TBOOL
  5990. FsequenceNumber TCARD16
  5991. Flength TCARD32
  5992. FnHosts TCARD16
  5993. Fpad1 TCARD16
  5994. Fpad3 TCARD32
  5995. Fpad4 TCARD32
  5996. Fpad5 TCARD32
  5997. Fpad6 TCARD32
  5998. Fpad7 TCARD32
  5999. }
  6000. type TxError = struct {
  6001. Ftype1 TBYTE
  6002. FerrorCode TBYTE
  6003. FsequenceNumber TCARD16
  6004. FresourceID TCARD32
  6005. FminorCode TCARD16
  6006. FmajorCode TCARD8
  6007. Fpad1 TBYTE
  6008. Fpad3 TCARD32
  6009. Fpad4 TCARD32
  6010. Fpad5 TCARD32
  6011. Fpad6 TCARD32
  6012. Fpad7 TCARD32
  6013. }
  6014. type TxEvent = struct {
  6015. Fu struct {
  6016. FkeyButtonPointer [0]struct {
  6017. Fpad00 TCARD32
  6018. Ftime TCARD32
  6019. Froot TCARD32
  6020. Fevent TCARD32
  6021. Fchild TCARD32
  6022. FrootX TINT16
  6023. FrootY TINT16
  6024. FeventX TINT16
  6025. FeventY TINT16
  6026. Fstate TKeyButMask
  6027. FsameScreen TBOOL
  6028. Fpad1 TBYTE
  6029. }
  6030. FenterLeave [0]struct {
  6031. Fpad00 TCARD32
  6032. Ftime TCARD32
  6033. Froot TCARD32
  6034. Fevent TCARD32
  6035. Fchild TCARD32
  6036. FrootX TINT16
  6037. FrootY TINT16
  6038. FeventX TINT16
  6039. FeventY TINT16
  6040. Fstate TKeyButMask
  6041. Fmode TBYTE
  6042. Fflags TBYTE
  6043. }
  6044. Ffocus [0]struct {
  6045. Fpad00 TCARD32
  6046. Fwindow TCARD32
  6047. Fmode TBYTE
  6048. Fpad1 TBYTE
  6049. Fpad2 TBYTE
  6050. Fpad3 TBYTE
  6051. }
  6052. Fexpose [0]struct {
  6053. Fpad00 TCARD32
  6054. Fwindow TCARD32
  6055. Fx TCARD16
  6056. Fy TCARD16
  6057. Fwidth TCARD16
  6058. Fheight TCARD16
  6059. Fcount TCARD16
  6060. Fpad2 TCARD16
  6061. }
  6062. FgraphicsExposure [0]struct {
  6063. Fpad00 TCARD32
  6064. Fdrawable TCARD32
  6065. Fx TCARD16
  6066. Fy TCARD16
  6067. Fwidth TCARD16
  6068. Fheight TCARD16
  6069. FminorEvent TCARD16
  6070. Fcount TCARD16
  6071. FmajorEvent TBYTE
  6072. Fpad1 TBYTE
  6073. Fpad2 TBYTE
  6074. Fpad3 TBYTE
  6075. }
  6076. FnoExposure [0]struct {
  6077. Fpad00 TCARD32
  6078. Fdrawable TCARD32
  6079. FminorEvent TCARD16
  6080. FmajorEvent TBYTE
  6081. Fbpad TBYTE
  6082. }
  6083. Fvisibility [0]struct {
  6084. Fpad00 TCARD32
  6085. Fwindow TCARD32
  6086. Fstate TCARD8
  6087. Fpad1 TBYTE
  6088. Fpad2 TBYTE
  6089. Fpad3 TBYTE
  6090. }
  6091. FcreateNotify [0]struct {
  6092. Fpad00 TCARD32
  6093. Fparent TCARD32
  6094. Fwindow TCARD32
  6095. Fx TINT16
  6096. Fy TINT16
  6097. Fwidth TCARD16
  6098. Fheight TCARD16
  6099. FborderWidth TCARD16
  6100. Foverride TBOOL
  6101. Fbpad TBYTE
  6102. }
  6103. FdestroyNotify [0]struct {
  6104. Fpad00 TCARD32
  6105. Fevent TCARD32
  6106. Fwindow TCARD32
  6107. }
  6108. FunmapNotify [0]struct {
  6109. Fpad00 TCARD32
  6110. Fevent TCARD32
  6111. Fwindow TCARD32
  6112. FfromConfigure TBOOL
  6113. Fpad1 TBYTE
  6114. Fpad2 TBYTE
  6115. Fpad3 TBYTE
  6116. }
  6117. FmapNotify [0]struct {
  6118. Fpad00 TCARD32
  6119. Fevent TCARD32
  6120. Fwindow TCARD32
  6121. Foverride TBOOL
  6122. Fpad1 TBYTE
  6123. Fpad2 TBYTE
  6124. Fpad3 TBYTE
  6125. }
  6126. FmapRequest [0]struct {
  6127. Fpad00 TCARD32
  6128. Fparent TCARD32
  6129. Fwindow TCARD32
  6130. }
  6131. Freparent [0]struct {
  6132. Fpad00 TCARD32
  6133. Fevent TCARD32
  6134. Fwindow TCARD32
  6135. Fparent TCARD32
  6136. Fx TINT16
  6137. Fy TINT16
  6138. Foverride TBOOL
  6139. Fpad1 TBYTE
  6140. Fpad2 TBYTE
  6141. Fpad3 TBYTE
  6142. }
  6143. FconfigureNotify [0]struct {
  6144. Fpad00 TCARD32
  6145. Fevent TCARD32
  6146. Fwindow TCARD32
  6147. FaboveSibling TCARD32
  6148. Fx TINT16
  6149. Fy TINT16
  6150. Fwidth TCARD16
  6151. Fheight TCARD16
  6152. FborderWidth TCARD16
  6153. Foverride TBOOL
  6154. Fbpad TBYTE
  6155. }
  6156. FconfigureRequest [0]struct {
  6157. Fpad00 TCARD32
  6158. Fparent TCARD32
  6159. Fwindow TCARD32
  6160. Fsibling TCARD32
  6161. Fx TINT16
  6162. Fy TINT16
  6163. Fwidth TCARD16
  6164. Fheight TCARD16
  6165. FborderWidth TCARD16
  6166. FvalueMask TCARD16
  6167. Fpad1 TCARD32
  6168. }
  6169. Fgravity [0]struct {
  6170. Fpad00 TCARD32
  6171. Fevent TCARD32
  6172. Fwindow TCARD32
  6173. Fx TINT16
  6174. Fy TINT16
  6175. Fpad1 TCARD32
  6176. Fpad2 TCARD32
  6177. Fpad3 TCARD32
  6178. Fpad4 TCARD32
  6179. }
  6180. FresizeRequest [0]struct {
  6181. Fpad00 TCARD32
  6182. Fwindow TCARD32
  6183. Fwidth TCARD16
  6184. Fheight TCARD16
  6185. }
  6186. Fcirculate [0]struct {
  6187. Fpad00 TCARD32
  6188. Fevent TCARD32
  6189. Fwindow TCARD32
  6190. Fparent TCARD32
  6191. Fplace TBYTE
  6192. Fpad1 TBYTE
  6193. Fpad2 TBYTE
  6194. Fpad3 TBYTE
  6195. }
  6196. Fproperty [0]struct {
  6197. Fpad00 TCARD32
  6198. Fwindow TCARD32
  6199. Fatom TCARD32
  6200. Ftime TCARD32
  6201. Fstate TBYTE
  6202. Fpad1 TBYTE
  6203. Fpad2 TCARD16
  6204. }
  6205. FselectionClear [0]struct {
  6206. Fpad00 TCARD32
  6207. Ftime TCARD32
  6208. Fwindow TCARD32
  6209. Fatom TCARD32
  6210. }
  6211. FselectionRequest [0]struct {
  6212. Fpad00 TCARD32
  6213. Ftime TCARD32
  6214. Fowner TCARD32
  6215. Frequestor TCARD32
  6216. Fselection TCARD32
  6217. Ftarget TCARD32
  6218. Fproperty TCARD32
  6219. }
  6220. FselectionNotify [0]struct {
  6221. Fpad00 TCARD32
  6222. Ftime TCARD32
  6223. Frequestor TCARD32
  6224. Fselection TCARD32
  6225. Ftarget TCARD32
  6226. Fproperty TCARD32
  6227. }
  6228. Fcolormap [0]struct {
  6229. Fpad00 TCARD32
  6230. Fwindow TCARD32
  6231. Fcolormap TCARD32
  6232. Fnew1 TBOOL
  6233. Fstate TBYTE
  6234. Fpad1 TBYTE
  6235. Fpad2 TBYTE
  6236. }
  6237. FmappingNotify [0]struct {
  6238. Fpad00 TCARD32
  6239. Frequest TCARD8
  6240. FfirstKeyCode TCARD8
  6241. Fcount TCARD8
  6242. Fpad1 TBYTE
  6243. }
  6244. FclientMessage [0]struct {
  6245. Fpad00 TCARD32
  6246. Fwindow TCARD32
  6247. Fu struct {
  6248. Fs [0]struct {
  6249. Ftype1 TCARD32
  6250. Fshorts0 TINT16
  6251. Fshorts1 TINT16
  6252. Fshorts2 TINT16
  6253. Fshorts3 TINT16
  6254. Fshorts4 TINT16
  6255. Fshorts5 TINT16
  6256. Fshorts6 TINT16
  6257. Fshorts7 TINT16
  6258. Fshorts8 TINT16
  6259. Fshorts9 TINT16
  6260. }
  6261. Fb [0]struct {
  6262. Ftype1 TCARD32
  6263. Fbytes [20]TINT8
  6264. }
  6265. Fl struct {
  6266. Ftype1 TCARD32
  6267. Flongs0 TINT32
  6268. Flongs1 TINT32
  6269. Flongs2 TINT32
  6270. Flongs3 TINT32
  6271. Flongs4 TINT32
  6272. }
  6273. }
  6274. }
  6275. Fu struct {
  6276. Ftype1 TBYTE
  6277. Fdetail TBYTE
  6278. FsequenceNumber TCARD16
  6279. }
  6280. F__ccgo_pad26 [28]byte
  6281. }
  6282. }
  6283. type T_xEvent = TxEvent
  6284. type TxGenericEvent = struct {
  6285. Ftype1 TBYTE
  6286. Fextension TCARD8
  6287. FsequenceNumber TCARD16
  6288. Flength TCARD32
  6289. Fevtype TCARD16
  6290. Fpad2 TCARD16
  6291. Fpad3 TCARD32
  6292. Fpad4 TCARD32
  6293. Fpad5 TCARD32
  6294. Fpad6 TCARD32
  6295. Fpad7 TCARD32
  6296. }
  6297. type TxKeymapEvent = struct {
  6298. Ftype1 TBYTE
  6299. Fmap1 [31]TBYTE
  6300. }
  6301. type TxReply = struct {
  6302. Fgeom [0]TxGetGeometryReply
  6303. Ftree [0]TxQueryTreeReply
  6304. Fatom [0]TxInternAtomReply
  6305. FatomName [0]TxGetAtomNameReply
  6306. Fproperty [0]TxGetPropertyReply
  6307. FlistProperties [0]TxListPropertiesReply
  6308. Fselection [0]TxGetSelectionOwnerReply
  6309. FgrabPointer [0]TxGrabPointerReply
  6310. FgrabKeyboard [0]TxGrabKeyboardReply
  6311. Fpointer [0]TxQueryPointerReply
  6312. FmotionEvents [0]TxGetMotionEventsReply
  6313. Fcoords [0]TxTranslateCoordsReply
  6314. FinputFocus [0]TxGetInputFocusReply
  6315. FtextExtents [0]TxQueryTextExtentsReply
  6316. Ffonts [0]TxListFontsReply
  6317. FfontPath [0]TxGetFontPathReply
  6318. Fimage [0]TxGetImageReply
  6319. Fcolormaps [0]TxListInstalledColormapsReply
  6320. FallocColor [0]TxAllocColorReply
  6321. FallocNamedColor [0]TxAllocNamedColorReply
  6322. FcolorCells [0]TxAllocColorCellsReply
  6323. FcolorPlanes [0]TxAllocColorPlanesReply
  6324. Fcolors [0]TxQueryColorsReply
  6325. FlookupColor [0]TxLookupColorReply
  6326. FbestSize [0]TxQueryBestSizeReply
  6327. Fextension [0]TxQueryExtensionReply
  6328. Fextensions [0]TxListExtensionsReply
  6329. FsetModifierMapping [0]TxSetModifierMappingReply
  6330. FgetModifierMapping [0]TxGetModifierMappingReply
  6331. FsetPointerMapping [0]TxSetPointerMappingReply
  6332. FgetKeyboardMapping [0]TxGetKeyboardMappingReply
  6333. FgetPointerMapping [0]TxGetPointerMappingReply
  6334. FpointerControl [0]TxGetPointerControlReply
  6335. FscreenSaver [0]TxGetScreenSaverReply
  6336. Fhosts [0]TxListHostsReply
  6337. Ferror1 [0]TxError
  6338. Fevent [0]TxEvent
  6339. Fgeneric TxGenericReply
  6340. }
  6341. type TxReq = struct {
  6342. FreqType TCARD8
  6343. Fdata TCARD8
  6344. Flength TCARD16
  6345. }
  6346. type T_xReq = TxReq
  6347. type TxResourceReq = struct {
  6348. FreqType TCARD8
  6349. Fpad TBYTE
  6350. Flength TCARD16
  6351. Fid TCARD32
  6352. }
  6353. type TxCreateWindowReq = struct {
  6354. FreqType TCARD8
  6355. Fdepth TCARD8
  6356. Flength TCARD16
  6357. Fwid TCARD32
  6358. Fparent TCARD32
  6359. Fx TINT16
  6360. Fy TINT16
  6361. Fwidth TCARD16
  6362. Fheight TCARD16
  6363. FborderWidth TCARD16
  6364. Fclass TCARD16
  6365. Fvisual TCARD32
  6366. Fmask TCARD32
  6367. }
  6368. type TxChangeWindowAttributesReq = struct {
  6369. FreqType TCARD8
  6370. Fpad TBYTE
  6371. Flength TCARD16
  6372. Fwindow TCARD32
  6373. FvalueMask TCARD32
  6374. }
  6375. type TxChangeSaveSetReq = struct {
  6376. FreqType TCARD8
  6377. Fmode TBYTE
  6378. Flength TCARD16
  6379. Fwindow TCARD32
  6380. }
  6381. type TxReparentWindowReq = struct {
  6382. FreqType TCARD8
  6383. Fpad TBYTE
  6384. Flength TCARD16
  6385. Fwindow TCARD32
  6386. Fparent TCARD32
  6387. Fx TINT16
  6388. Fy TINT16
  6389. }
  6390. type TxConfigureWindowReq = struct {
  6391. FreqType TCARD8
  6392. Fpad TCARD8
  6393. Flength TCARD16
  6394. Fwindow TCARD32
  6395. Fmask TCARD16
  6396. Fpad2 TCARD16
  6397. }
  6398. type TxCirculateWindowReq = struct {
  6399. FreqType TCARD8
  6400. Fdirection TCARD8
  6401. Flength TCARD16
  6402. Fwindow TCARD32
  6403. }
  6404. type TxInternAtomReq = struct {
  6405. FreqType TCARD8
  6406. FonlyIfExists TBOOL
  6407. Flength TCARD16
  6408. Fnbytes TCARD16
  6409. Fpad TCARD16
  6410. }
  6411. type TxChangePropertyReq = struct {
  6412. FreqType TCARD8
  6413. Fmode TCARD8
  6414. Flength TCARD16
  6415. Fwindow TCARD32
  6416. Fproperty TCARD32
  6417. Ftype1 TCARD32
  6418. Fformat TCARD8
  6419. Fpad [3]TBYTE
  6420. FnUnits TCARD32
  6421. }
  6422. type TxDeletePropertyReq = struct {
  6423. FreqType TCARD8
  6424. Fpad TBYTE
  6425. Flength TCARD16
  6426. Fwindow TCARD32
  6427. Fproperty TCARD32
  6428. }
  6429. type TxGetPropertyReq = struct {
  6430. FreqType TCARD8
  6431. Fdelete1 TBOOL
  6432. Flength TCARD16
  6433. Fwindow TCARD32
  6434. Fproperty TCARD32
  6435. Ftype1 TCARD32
  6436. FlongOffset TCARD32
  6437. FlongLength TCARD32
  6438. }
  6439. type TxSetSelectionOwnerReq = struct {
  6440. FreqType TCARD8
  6441. Fpad TBYTE
  6442. Flength TCARD16
  6443. Fwindow TCARD32
  6444. Fselection TCARD32
  6445. Ftime TCARD32
  6446. }
  6447. type TxConvertSelectionReq = struct {
  6448. FreqType TCARD8
  6449. Fpad TBYTE
  6450. Flength TCARD16
  6451. Frequestor TCARD32
  6452. Fselection TCARD32
  6453. Ftarget TCARD32
  6454. Fproperty TCARD32
  6455. Ftime TCARD32
  6456. }
  6457. type TxSendEventReq = struct {
  6458. FreqType TCARD8
  6459. Fpropagate TBOOL
  6460. Flength TCARD16
  6461. Fdestination TCARD32
  6462. FeventMask TCARD32
  6463. Fevent TxEvent
  6464. }
  6465. type TxGrabPointerReq = 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. Ftime TCARD32
  6476. }
  6477. type TxGrabButtonReq = struct {
  6478. FreqType TCARD8
  6479. FownerEvents TBOOL
  6480. Flength TCARD16
  6481. FgrabWindow TCARD32
  6482. FeventMask TCARD16
  6483. FpointerMode TBYTE
  6484. FkeyboardMode TBYTE
  6485. FconfineTo TCARD32
  6486. Fcursor TCARD32
  6487. Fbutton TCARD8
  6488. Fpad TBYTE
  6489. Fmodifiers TCARD16
  6490. }
  6491. type TxUngrabButtonReq = struct {
  6492. FreqType TCARD8
  6493. Fbutton TCARD8
  6494. Flength TCARD16
  6495. FgrabWindow TCARD32
  6496. Fmodifiers TCARD16
  6497. Fpad TCARD16
  6498. }
  6499. type TxChangeActivePointerGrabReq = struct {
  6500. FreqType TCARD8
  6501. Fpad TBYTE
  6502. Flength TCARD16
  6503. Fcursor TCARD32
  6504. Ftime TCARD32
  6505. FeventMask TCARD16
  6506. Fpad2 TCARD16
  6507. }
  6508. type TxGrabKeyboardReq = struct {
  6509. FreqType TCARD8
  6510. FownerEvents TBOOL
  6511. Flength TCARD16
  6512. FgrabWindow TCARD32
  6513. Ftime TCARD32
  6514. FpointerMode TBYTE
  6515. FkeyboardMode TBYTE
  6516. Fpad TCARD16
  6517. }
  6518. type TxGrabKeyReq = struct {
  6519. FreqType TCARD8
  6520. FownerEvents TBOOL
  6521. Flength TCARD16
  6522. FgrabWindow TCARD32
  6523. Fmodifiers TCARD16
  6524. Fkey TCARD8
  6525. FpointerMode TBYTE
  6526. FkeyboardMode TBYTE
  6527. Fpad1 TBYTE
  6528. Fpad2 TBYTE
  6529. Fpad3 TBYTE
  6530. }
  6531. type TxUngrabKeyReq = struct {
  6532. FreqType TCARD8
  6533. Fkey TCARD8
  6534. Flength TCARD16
  6535. FgrabWindow TCARD32
  6536. Fmodifiers TCARD16
  6537. Fpad TCARD16
  6538. }
  6539. type TxAllowEventsReq = struct {
  6540. FreqType TCARD8
  6541. Fmode TCARD8
  6542. Flength TCARD16
  6543. Ftime TCARD32
  6544. }
  6545. type TxGetMotionEventsReq = struct {
  6546. FreqType TCARD8
  6547. Fpad TBYTE
  6548. Flength TCARD16
  6549. Fwindow TCARD32
  6550. Fstart TCARD32
  6551. Fstop TCARD32
  6552. }
  6553. type TxTranslateCoordsReq = struct {
  6554. FreqType TCARD8
  6555. Fpad TBYTE
  6556. Flength TCARD16
  6557. FsrcWid TCARD32
  6558. FdstWid TCARD32
  6559. FsrcX TINT16
  6560. FsrcY TINT16
  6561. }
  6562. type TxWarpPointerReq = struct {
  6563. FreqType TCARD8
  6564. Fpad TBYTE
  6565. Flength TCARD16
  6566. FsrcWid TCARD32
  6567. FdstWid TCARD32
  6568. FsrcX TINT16
  6569. FsrcY TINT16
  6570. FsrcWidth TCARD16
  6571. FsrcHeight TCARD16
  6572. FdstX TINT16
  6573. FdstY TINT16
  6574. }
  6575. type TxSetInputFocusReq = struct {
  6576. FreqType TCARD8
  6577. FrevertTo TCARD8
  6578. Flength TCARD16
  6579. Ffocus TCARD32
  6580. Ftime TCARD32
  6581. }
  6582. type TxOpenFontReq = struct {
  6583. FreqType TCARD8
  6584. Fpad TBYTE
  6585. Flength TCARD16
  6586. Ffid TCARD32
  6587. Fnbytes TCARD16
  6588. Fpad1 TBYTE
  6589. Fpad2 TBYTE
  6590. }
  6591. type TxQueryTextExtentsReq = struct {
  6592. FreqType TCARD8
  6593. FoddLength TBOOL
  6594. Flength TCARD16
  6595. Ffid TCARD32
  6596. }
  6597. type TxListFontsReq = struct {
  6598. FreqType TCARD8
  6599. Fpad TBYTE
  6600. Flength TCARD16
  6601. FmaxNames TCARD16
  6602. Fnbytes TCARD16
  6603. }
  6604. type TxListFontsWithInfoReq = struct {
  6605. FreqType TCARD8
  6606. Fpad TBYTE
  6607. Flength TCARD16
  6608. FmaxNames TCARD16
  6609. Fnbytes TCARD16
  6610. }
  6611. type TxSetFontPathReq = struct {
  6612. FreqType TCARD8
  6613. Fpad TBYTE
  6614. Flength TCARD16
  6615. FnFonts TCARD16
  6616. Fpad1 TBYTE
  6617. Fpad2 TBYTE
  6618. }
  6619. type TxCreatePixmapReq = struct {
  6620. FreqType TCARD8
  6621. Fdepth TCARD8
  6622. Flength TCARD16
  6623. Fpid TCARD32
  6624. Fdrawable TCARD32
  6625. Fwidth TCARD16
  6626. Fheight TCARD16
  6627. }
  6628. type TxCreateGCReq = struct {
  6629. FreqType TCARD8
  6630. Fpad TBYTE
  6631. Flength TCARD16
  6632. Fgc TCARD32
  6633. Fdrawable TCARD32
  6634. Fmask TCARD32
  6635. }
  6636. type TxChangeGCReq = struct {
  6637. FreqType TCARD8
  6638. Fpad TBYTE
  6639. Flength TCARD16
  6640. Fgc TCARD32
  6641. Fmask TCARD32
  6642. }
  6643. type TxCopyGCReq = struct {
  6644. FreqType TCARD8
  6645. Fpad TBYTE
  6646. Flength TCARD16
  6647. FsrcGC TCARD32
  6648. FdstGC TCARD32
  6649. Fmask TCARD32
  6650. }
  6651. type TxSetDashesReq = struct {
  6652. FreqType TCARD8
  6653. Fpad TBYTE
  6654. Flength TCARD16
  6655. Fgc TCARD32
  6656. FdashOffset TCARD16
  6657. FnDashes TCARD16
  6658. }
  6659. type TxSetClipRectanglesReq = struct {
  6660. FreqType TCARD8
  6661. Fordering TBYTE
  6662. Flength TCARD16
  6663. Fgc TCARD32
  6664. FxOrigin TINT16
  6665. FyOrigin TINT16
  6666. }
  6667. type TxClearAreaReq = struct {
  6668. FreqType TCARD8
  6669. Fexposures TBOOL
  6670. Flength TCARD16
  6671. Fwindow TCARD32
  6672. Fx TINT16
  6673. Fy TINT16
  6674. Fwidth TCARD16
  6675. Fheight TCARD16
  6676. }
  6677. type TxCopyAreaReq = struct {
  6678. FreqType TCARD8
  6679. Fpad TBYTE
  6680. Flength TCARD16
  6681. FsrcDrawable TCARD32
  6682. FdstDrawable TCARD32
  6683. Fgc TCARD32
  6684. FsrcX TINT16
  6685. FsrcY TINT16
  6686. FdstX TINT16
  6687. FdstY TINT16
  6688. Fwidth TCARD16
  6689. Fheight TCARD16
  6690. }
  6691. type TxCopyPlaneReq = struct {
  6692. FreqType TCARD8
  6693. Fpad TBYTE
  6694. Flength TCARD16
  6695. FsrcDrawable TCARD32
  6696. FdstDrawable TCARD32
  6697. Fgc TCARD32
  6698. FsrcX TINT16
  6699. FsrcY TINT16
  6700. FdstX TINT16
  6701. FdstY TINT16
  6702. Fwidth TCARD16
  6703. Fheight TCARD16
  6704. FbitPlane TCARD32
  6705. }
  6706. type TxPolyPointReq = struct {
  6707. FreqType TCARD8
  6708. FcoordMode TBYTE
  6709. Flength TCARD16
  6710. Fdrawable TCARD32
  6711. Fgc TCARD32
  6712. }
  6713. type TxPolyLineReq = struct {
  6714. FreqType TCARD8
  6715. FcoordMode TBYTE
  6716. Flength TCARD16
  6717. Fdrawable TCARD32
  6718. Fgc TCARD32
  6719. }
  6720. type TxPolySegmentReq = struct {
  6721. FreqType TCARD8
  6722. Fpad TBYTE
  6723. Flength TCARD16
  6724. Fdrawable TCARD32
  6725. Fgc TCARD32
  6726. }
  6727. type TxPolyArcReq = struct {
  6728. FreqType TCARD8
  6729. Fpad TBYTE
  6730. Flength TCARD16
  6731. Fdrawable TCARD32
  6732. Fgc TCARD32
  6733. }
  6734. type TxPolyRectangleReq = struct {
  6735. FreqType TCARD8
  6736. Fpad TBYTE
  6737. Flength TCARD16
  6738. Fdrawable TCARD32
  6739. Fgc TCARD32
  6740. }
  6741. type TxPolyFillRectangleReq = struct {
  6742. FreqType TCARD8
  6743. Fpad TBYTE
  6744. Flength TCARD16
  6745. Fdrawable TCARD32
  6746. Fgc TCARD32
  6747. }
  6748. type TxPolyFillArcReq = struct {
  6749. FreqType TCARD8
  6750. Fpad TBYTE
  6751. Flength TCARD16
  6752. Fdrawable TCARD32
  6753. Fgc TCARD32
  6754. }
  6755. type TxFillPolyReq = struct {
  6756. FreqType TCARD8
  6757. Fpad TBYTE
  6758. Flength TCARD16
  6759. Fdrawable TCARD32
  6760. Fgc TCARD32
  6761. Fshape TBYTE
  6762. FcoordMode TBYTE
  6763. Fpad1 TCARD16
  6764. }
  6765. type T_FillPolyReq = TxFillPolyReq
  6766. type TxPutImageReq = struct {
  6767. FreqType TCARD8
  6768. Fformat TCARD8
  6769. Flength TCARD16
  6770. Fdrawable TCARD32
  6771. Fgc TCARD32
  6772. Fwidth TCARD16
  6773. Fheight TCARD16
  6774. FdstX TINT16
  6775. FdstY TINT16
  6776. FleftPad TCARD8
  6777. Fdepth TCARD8
  6778. Fpad TCARD16
  6779. }
  6780. type T_PutImageReq = TxPutImageReq
  6781. type TxGetImageReq = struct {
  6782. FreqType TCARD8
  6783. Fformat TCARD8
  6784. Flength TCARD16
  6785. Fdrawable TCARD32
  6786. Fx TINT16
  6787. Fy TINT16
  6788. Fwidth TCARD16
  6789. Fheight TCARD16
  6790. FplaneMask TCARD32
  6791. }
  6792. type TxPolyTextReq = struct {
  6793. FreqType TCARD8
  6794. Fpad TCARD8
  6795. Flength TCARD16
  6796. Fdrawable TCARD32
  6797. Fgc TCARD32
  6798. Fx TINT16
  6799. Fy TINT16
  6800. }
  6801. type TxPolyText8Req = struct {
  6802. FreqType TCARD8
  6803. Fpad TCARD8
  6804. Flength TCARD16
  6805. Fdrawable TCARD32
  6806. Fgc TCARD32
  6807. Fx TINT16
  6808. Fy TINT16
  6809. }
  6810. type TxPolyText16Req = struct {
  6811. FreqType TCARD8
  6812. Fpad TCARD8
  6813. Flength TCARD16
  6814. Fdrawable TCARD32
  6815. Fgc TCARD32
  6816. Fx TINT16
  6817. Fy TINT16
  6818. }
  6819. type TxImageTextReq = struct {
  6820. FreqType TCARD8
  6821. FnChars TBYTE
  6822. Flength TCARD16
  6823. Fdrawable TCARD32
  6824. Fgc TCARD32
  6825. Fx TINT16
  6826. Fy TINT16
  6827. }
  6828. type TxImageText8Req = struct {
  6829. FreqType TCARD8
  6830. FnChars TBYTE
  6831. Flength TCARD16
  6832. Fdrawable TCARD32
  6833. Fgc TCARD32
  6834. Fx TINT16
  6835. Fy TINT16
  6836. }
  6837. type TxImageText16Req = struct {
  6838. FreqType TCARD8
  6839. FnChars TBYTE
  6840. Flength TCARD16
  6841. Fdrawable TCARD32
  6842. Fgc TCARD32
  6843. Fx TINT16
  6844. Fy TINT16
  6845. }
  6846. type TxCreateColormapReq = struct {
  6847. FreqType TCARD8
  6848. Falloc TBYTE
  6849. Flength TCARD16
  6850. Fmid TCARD32
  6851. Fwindow TCARD32
  6852. Fvisual TCARD32
  6853. }
  6854. type TxCopyColormapAndFreeReq = struct {
  6855. FreqType TCARD8
  6856. Fpad TBYTE
  6857. Flength TCARD16
  6858. Fmid TCARD32
  6859. FsrcCmap TCARD32
  6860. }
  6861. type TxAllocColorReq = struct {
  6862. FreqType TCARD8
  6863. Fpad TBYTE
  6864. Flength TCARD16
  6865. Fcmap TCARD32
  6866. Fred TCARD16
  6867. Fgreen TCARD16
  6868. Fblue TCARD16
  6869. Fpad2 TCARD16
  6870. }
  6871. type TxAllocNamedColorReq = struct {
  6872. FreqType TCARD8
  6873. Fpad TBYTE
  6874. Flength TCARD16
  6875. Fcmap TCARD32
  6876. Fnbytes TCARD16
  6877. Fpad1 TBYTE
  6878. Fpad2 TBYTE
  6879. }
  6880. type TxAllocColorCellsReq = struct {
  6881. FreqType TCARD8
  6882. Fcontiguous TBOOL
  6883. Flength TCARD16
  6884. Fcmap TCARD32
  6885. Fcolors TCARD16
  6886. Fplanes TCARD16
  6887. }
  6888. type TxAllocColorPlanesReq = struct {
  6889. FreqType TCARD8
  6890. Fcontiguous TBOOL
  6891. Flength TCARD16
  6892. Fcmap TCARD32
  6893. Fcolors TCARD16
  6894. Fred TCARD16
  6895. Fgreen TCARD16
  6896. Fblue TCARD16
  6897. }
  6898. type TxFreeColorsReq = struct {
  6899. FreqType TCARD8
  6900. Fpad TBYTE
  6901. Flength TCARD16
  6902. Fcmap TCARD32
  6903. FplaneMask TCARD32
  6904. }
  6905. type TxStoreColorsReq = struct {
  6906. FreqType TCARD8
  6907. Fpad TBYTE
  6908. Flength TCARD16
  6909. Fcmap TCARD32
  6910. }
  6911. type TxStoreNamedColorReq = struct {
  6912. FreqType TCARD8
  6913. Fflags TCARD8
  6914. Flength TCARD16
  6915. Fcmap TCARD32
  6916. Fpixel TCARD32
  6917. Fnbytes TCARD16
  6918. Fpad1 TBYTE
  6919. Fpad2 TBYTE
  6920. }
  6921. type TxQueryColorsReq = struct {
  6922. FreqType TCARD8
  6923. Fpad TBYTE
  6924. Flength TCARD16
  6925. Fcmap TCARD32
  6926. }
  6927. type TxLookupColorReq = struct {
  6928. FreqType TCARD8
  6929. Fpad TBYTE
  6930. Flength TCARD16
  6931. Fcmap TCARD32
  6932. Fnbytes TCARD16
  6933. Fpad1 TBYTE
  6934. Fpad2 TBYTE
  6935. }
  6936. type TxCreateCursorReq = struct {
  6937. FreqType TCARD8
  6938. Fpad TBYTE
  6939. Flength TCARD16
  6940. Fcid TCARD32
  6941. Fsource TCARD32
  6942. Fmask TCARD32
  6943. FforeRed TCARD16
  6944. FforeGreen TCARD16
  6945. FforeBlue TCARD16
  6946. FbackRed TCARD16
  6947. FbackGreen TCARD16
  6948. FbackBlue TCARD16
  6949. Fx TCARD16
  6950. Fy TCARD16
  6951. }
  6952. type TxCreateGlyphCursorReq = struct {
  6953. FreqType TCARD8
  6954. Fpad TBYTE
  6955. Flength TCARD16
  6956. Fcid TCARD32
  6957. Fsource TCARD32
  6958. Fmask TCARD32
  6959. FsourceChar TCARD16
  6960. FmaskChar TCARD16
  6961. FforeRed TCARD16
  6962. FforeGreen TCARD16
  6963. FforeBlue TCARD16
  6964. FbackRed TCARD16
  6965. FbackGreen TCARD16
  6966. FbackBlue TCARD16
  6967. }
  6968. type TxRecolorCursorReq = struct {
  6969. FreqType TCARD8
  6970. Fpad TBYTE
  6971. Flength TCARD16
  6972. Fcursor TCARD32
  6973. FforeRed TCARD16
  6974. FforeGreen TCARD16
  6975. FforeBlue TCARD16
  6976. FbackRed TCARD16
  6977. FbackGreen TCARD16
  6978. FbackBlue TCARD16
  6979. }
  6980. type TxQueryBestSizeReq = struct {
  6981. FreqType TCARD8
  6982. Fclass TCARD8
  6983. Flength TCARD16
  6984. Fdrawable TCARD32
  6985. Fwidth TCARD16
  6986. Fheight TCARD16
  6987. }
  6988. type TxQueryExtensionReq = struct {
  6989. FreqType TCARD8
  6990. Fpad TBYTE
  6991. Flength TCARD16
  6992. Fnbytes TCARD16
  6993. Fpad1 TBYTE
  6994. Fpad2 TBYTE
  6995. }
  6996. type TxSetModifierMappingReq = struct {
  6997. FreqType TCARD8
  6998. FnumKeyPerModifier TCARD8
  6999. Flength TCARD16
  7000. }
  7001. type TxSetPointerMappingReq = struct {
  7002. FreqType TCARD8
  7003. FnElts TCARD8
  7004. Flength TCARD16
  7005. }
  7006. type TxGetKeyboardMappingReq = struct {
  7007. FreqType TCARD8
  7008. Fpad TBYTE
  7009. Flength TCARD16
  7010. FfirstKeyCode TCARD8
  7011. Fcount TCARD8
  7012. Fpad1 TCARD16
  7013. }
  7014. type TxChangeKeyboardMappingReq = struct {
  7015. FreqType TCARD8
  7016. FkeyCodes TCARD8
  7017. Flength TCARD16
  7018. FfirstKeyCode TCARD8
  7019. FkeySymsPerKeyCode TCARD8
  7020. Fpad1 TCARD16
  7021. }
  7022. type TxChangeKeyboardControlReq = struct {
  7023. FreqType TCARD8
  7024. Fpad TBYTE
  7025. Flength TCARD16
  7026. Fmask TCARD32
  7027. }
  7028. type TxBellReq = struct {
  7029. FreqType TCARD8
  7030. Fpercent TINT8
  7031. Flength TCARD16
  7032. }
  7033. type TxChangePointerControlReq = struct {
  7034. FreqType TCARD8
  7035. Fpad TBYTE
  7036. Flength TCARD16
  7037. FaccelNum TINT16
  7038. FaccelDenum TINT16
  7039. Fthreshold TINT16
  7040. FdoAccel TBOOL
  7041. FdoThresh TBOOL
  7042. }
  7043. type TxSetScreenSaverReq = struct {
  7044. FreqType TCARD8
  7045. Fpad TBYTE
  7046. Flength TCARD16
  7047. Ftimeout TINT16
  7048. Finterval TINT16
  7049. FpreferBlank TBYTE
  7050. FallowExpose TBYTE
  7051. Fpad2 TCARD16
  7052. }
  7053. type TxChangeHostsReq = struct {
  7054. FreqType TCARD8
  7055. Fmode TBYTE
  7056. Flength TCARD16
  7057. FhostFamily TCARD8
  7058. Fpad TBYTE
  7059. FhostLength TCARD16
  7060. }
  7061. type TxListHostsReq = struct {
  7062. FreqType TCARD8
  7063. Fpad TBYTE
  7064. Flength TCARD16
  7065. }
  7066. type TxChangeModeReq = struct {
  7067. FreqType TCARD8
  7068. Fmode TBYTE
  7069. Flength TCARD16
  7070. }
  7071. type TxSetAccessControlReq = struct {
  7072. FreqType TCARD8
  7073. Fmode TBYTE
  7074. Flength TCARD16
  7075. }
  7076. type TxSetCloseDownModeReq = struct {
  7077. FreqType TCARD8
  7078. Fmode TBYTE
  7079. Flength TCARD16
  7080. }
  7081. type TxForceScreenSaverReq = struct {
  7082. FreqType TCARD8
  7083. Fmode TBYTE
  7084. Flength TCARD16
  7085. }
  7086. type TxRotatePropertiesReq = struct {
  7087. FreqType TCARD8
  7088. Fpad TBYTE
  7089. Flength TCARD16
  7090. Fwindow TCARD32
  7091. FnAtoms TCARD16
  7092. FnPositions TINT16
  7093. }
  7094. type Tsched_param = struct {
  7095. Fsched_priority int32
  7096. F__reserved1 int32
  7097. F__reserved2 [2]struct {
  7098. F__reserved1 Ttime_t
  7099. F__reserved2 int64
  7100. }
  7101. F__reserved3 int32
  7102. }
  7103. type Tcpu_set_t = struct {
  7104. F__bits [16]uint64
  7105. }
  7106. type Ttm = struct {
  7107. Ftm_sec int32
  7108. Ftm_min int32
  7109. Ftm_hour int32
  7110. Ftm_mday int32
  7111. Ftm_mon int32
  7112. Ftm_year int32
  7113. Ftm_wday int32
  7114. Ftm_yday int32
  7115. Ftm_isdst int32
  7116. Ftm_gmtoff int64
  7117. Ftm_zone uintptr
  7118. }
  7119. type Titimerspec = struct {
  7120. Fit_interval Ttimespec
  7121. Fit_value Ttimespec
  7122. }
  7123. type t__ptcb = struct {
  7124. F__f uintptr
  7125. F__x uintptr
  7126. F__next uintptr
  7127. }
  7128. type Tcpu_set_t1 = struct {
  7129. F__bits [16]uint64
  7130. }
  7131. type Txthread_t = uintptr
  7132. type Txthread_key_t = uint32
  7133. type Txcondition_rec = struct {
  7134. F__u struct {
  7135. F__vi [0][12]int32
  7136. F__p [0][6]uintptr
  7137. F__i [12]int32
  7138. }
  7139. }
  7140. type Txmutex_rec = struct {
  7141. F__u struct {
  7142. F__vi [0][10]int32
  7143. F__p [0][5]uintptr
  7144. F__i [10]int32
  7145. }
  7146. }
  7147. type Txcondition_t = uintptr
  7148. type Txmutex_t = uintptr
  7149. type T_XQEvent = struct {
  7150. Fnext uintptr
  7151. Fevent TXEvent
  7152. Fqserial_num uint64
  7153. }
  7154. type T_XSQEvent = T_XQEvent
  7155. type TLockInfoPtr = uintptr
  7156. type T_XLockPtrs = struct {
  7157. Flock_display uintptr
  7158. Funlock_display uintptr
  7159. }
  7160. type T_XAsyncHandler = struct {
  7161. Fnext uintptr
  7162. Fhandler uintptr
  7163. Fdata TXPointer
  7164. }
  7165. type T_XInternalAsync = T_XAsyncHandler
  7166. type T_XAsyncErrorState = struct {
  7167. Fmin_sequence_number uint64
  7168. Fmax_sequence_number uint64
  7169. Ferror_code uint8
  7170. Fmajor_opcode uint8
  7171. Fminor_opcode uint16
  7172. Flast_error_received uint8
  7173. Ferror_count int32
  7174. }
  7175. type T_XAsyncEState = T_XAsyncErrorState
  7176. type TFreeFuncType = uintptr
  7177. type TFreeModmapType = uintptr
  7178. type T_XFreeFuncRec = struct {
  7179. Fatoms TFreeFuncType
  7180. Fmodifiermap TFreeModmapType
  7181. Fkey_bindings TFreeFuncType
  7182. Fcontext_db TFreeFuncType
  7183. FdefaultCCCs TFreeFuncType
  7184. FclientCmaps TFreeFuncType
  7185. FintensityMaps TFreeFuncType
  7186. Fim_filters TFreeFuncType
  7187. Fxkb TFreeFuncType
  7188. }
  7189. type T_XFreeFuncs = T_XFreeFuncRec
  7190. type TCreateGCType = uintptr
  7191. type TCopyGCType = uintptr
  7192. type TFlushGCType = uintptr
  7193. type TFreeGCType = uintptr
  7194. type TCreateFontType = uintptr
  7195. type TFreeFontType = uintptr
  7196. type TCloseDisplayType = uintptr
  7197. type TErrorType = uintptr
  7198. type TErrorStringType = uintptr
  7199. type TPrintErrorType = uintptr
  7200. type TBeforeFlushType = uintptr
  7201. type T_XExtension = struct {
  7202. Fnext uintptr
  7203. Fcodes TXExtCodes
  7204. Fcreate_GC TCreateGCType
  7205. Fcopy_GC TCopyGCType
  7206. Fflush_GC TFlushGCType
  7207. Ffree_GC TFreeGCType
  7208. Fcreate_Font TCreateFontType
  7209. Ffree_Font TFreeFontType
  7210. Fclose_display TCloseDisplayType
  7211. Ferror1 TErrorType
  7212. Ferror_string TErrorStringType
  7213. Fname uintptr
  7214. Ferror_values TPrintErrorType
  7215. Fbefore_flush TBeforeFlushType
  7216. Fnext_flush uintptr
  7217. }
  7218. type T_XExten = T_XExtension
  7219. type T_XInternalConnectionProc = uintptr
  7220. type T_XConnectionInfo = struct {
  7221. Ffd int32
  7222. Fread_callback T_XInternalConnectionProc
  7223. Fcall_data TXPointer
  7224. Fwatch_data uintptr
  7225. Fnext uintptr
  7226. }
  7227. type T_XConnWatchInfo = struct {
  7228. Ffn TXConnectionWatchProc
  7229. Fclient_data TXPointer
  7230. Fnext uintptr
  7231. }
  7232. type t__jmp_buf = [8]uint64
  7233. type Tjmp_buf = [1]t__jmp_buf_tag
  7234. type t__jmp_buf_tag = struct {
  7235. F__jb t__jmp_buf
  7236. F__fl uint64
  7237. F__ss [16]uint64
  7238. }
  7239. type Tsigjmp_buf = [1]t__jmp_buf_tag
  7240. type TFT_Int16 = int16
  7241. type TFT_UInt16 = uint16
  7242. type TFT_Int32 = int32
  7243. type TFT_UInt32 = uint32
  7244. type TFT_Fast = int32
  7245. type TFT_UFast = uint32
  7246. type TFT_Int64 = int64
  7247. type TFT_UInt64 = uint64
  7248. type TFT_Memory = uintptr
  7249. type TFT_MemoryRec_ = struct {
  7250. Fuser uintptr
  7251. Falloc TFT_Alloc_Func
  7252. Ffree TFT_Free_Func
  7253. Frealloc TFT_Realloc_Func
  7254. }
  7255. type TFT_Alloc_Func = uintptr
  7256. type TFT_Free_Func = uintptr
  7257. type TFT_Realloc_Func = uintptr
  7258. type TFT_Stream = uintptr
  7259. type TFT_StreamRec_ = struct {
  7260. Fbase uintptr
  7261. Fsize uint64
  7262. Fpos uint64
  7263. Fdescriptor TFT_StreamDesc
  7264. Fpathname TFT_StreamDesc
  7265. Fread TFT_Stream_IoFunc
  7266. Fclose1 TFT_Stream_CloseFunc
  7267. Fmemory TFT_Memory
  7268. Fcursor uintptr
  7269. Flimit uintptr
  7270. }
  7271. type TFT_StreamDesc = struct {
  7272. Fpointer [0]uintptr
  7273. Fvalue int64
  7274. }
  7275. type TFT_StreamDesc_ = TFT_StreamDesc
  7276. type TFT_Stream_IoFunc = uintptr
  7277. type TFT_Stream_CloseFunc = uintptr
  7278. type TFT_StreamRec = struct {
  7279. Fbase uintptr
  7280. Fsize uint64
  7281. Fpos uint64
  7282. Fdescriptor TFT_StreamDesc
  7283. Fpathname TFT_StreamDesc
  7284. Fread TFT_Stream_IoFunc
  7285. Fclose1 TFT_Stream_CloseFunc
  7286. Fmemory TFT_Memory
  7287. Fcursor uintptr
  7288. Flimit uintptr
  7289. }
  7290. type TFT_Pos = int64
  7291. type TFT_Vector = struct {
  7292. Fx TFT_Pos
  7293. Fy TFT_Pos
  7294. }
  7295. type TFT_Vector_ = TFT_Vector
  7296. type TFT_BBox = struct {
  7297. FxMin TFT_Pos
  7298. FyMin TFT_Pos
  7299. FxMax TFT_Pos
  7300. FyMax TFT_Pos
  7301. }
  7302. type TFT_BBox_ = TFT_BBox
  7303. type TFT_Pixel_Mode = int32
  7304. type _FT_Pixel_Mode_ = int32
  7305. const _FT_PIXEL_MODE_NONE = 0
  7306. const _FT_PIXEL_MODE_MONO = 1
  7307. const _FT_PIXEL_MODE_GRAY = 2
  7308. const _FT_PIXEL_MODE_GRAY2 = 3
  7309. const _FT_PIXEL_MODE_GRAY4 = 4
  7310. const _FT_PIXEL_MODE_LCD = 5
  7311. const _FT_PIXEL_MODE_LCD_V = 6
  7312. const _FT_PIXEL_MODE_BGRA = 7
  7313. const _FT_PIXEL_MODE_MAX = 8
  7314. type TFT_Bitmap = struct {
  7315. Frows uint32
  7316. Fwidth uint32
  7317. Fpitch int32
  7318. Fbuffer uintptr
  7319. Fnum_grays uint16
  7320. Fpixel_mode uint8
  7321. Fpalette_mode uint8
  7322. Fpalette uintptr
  7323. }
  7324. type TFT_Bitmap_ = TFT_Bitmap
  7325. type TFT_Outline = struct {
  7326. Fn_contours int16
  7327. Fn_points int16
  7328. Fpoints uintptr
  7329. Ftags uintptr
  7330. Fcontours uintptr
  7331. Fflags int32
  7332. }
  7333. type TFT_Outline_ = TFT_Outline
  7334. type TFT_Outline_MoveToFunc = uintptr
  7335. type TFT_Outline_LineToFunc = uintptr
  7336. type TFT_Outline_ConicToFunc = uintptr
  7337. type TFT_Outline_CubicToFunc = uintptr
  7338. type TFT_Outline_Funcs = struct {
  7339. Fmove_to TFT_Outline_MoveToFunc
  7340. Fline_to TFT_Outline_LineToFunc
  7341. Fconic_to TFT_Outline_ConicToFunc
  7342. Fcubic_to TFT_Outline_CubicToFunc
  7343. Fshift int32
  7344. Fdelta TFT_Pos
  7345. }
  7346. type TFT_Outline_Funcs_ = TFT_Outline_Funcs
  7347. type TFT_Glyph_Format = int32
  7348. type _FT_Glyph_Format_ = int32
  7349. const _FT_GLYPH_FORMAT_NONE = 0
  7350. const _FT_GLYPH_FORMAT_COMPOSITE = 1668246896
  7351. const _FT_GLYPH_FORMAT_BITMAP = 1651078259
  7352. const _FT_GLYPH_FORMAT_OUTLINE = 1869968492
  7353. const _FT_GLYPH_FORMAT_PLOTTER = 1886154612
  7354. const _FT_GLYPH_FORMAT_SVG = 1398163232
  7355. type TFT_Span = struct {
  7356. Fx int16
  7357. Flen1 uint16
  7358. Fcoverage uint8
  7359. }
  7360. type TFT_Span_ = TFT_Span
  7361. type TFT_SpanFunc = uintptr
  7362. type TFT_Raster_BitTest_Func = uintptr
  7363. type TFT_Raster_BitSet_Func = uintptr
  7364. type TFT_Raster_Params = struct {
  7365. Ftarget uintptr
  7366. Fsource uintptr
  7367. Fflags int32
  7368. Fgray_spans TFT_SpanFunc
  7369. Fblack_spans TFT_SpanFunc
  7370. Fbit_test TFT_Raster_BitTest_Func
  7371. Fbit_set TFT_Raster_BitSet_Func
  7372. Fuser uintptr
  7373. Fclip_box TFT_BBox
  7374. }
  7375. type TFT_Raster_Params_ = TFT_Raster_Params
  7376. type TFT_Raster = uintptr
  7377. type TFT_Raster_NewFunc = uintptr
  7378. type TFT_Raster_DoneFunc = uintptr
  7379. type TFT_Raster_ResetFunc = uintptr
  7380. type TFT_Raster_SetModeFunc = uintptr
  7381. type TFT_Raster_RenderFunc = uintptr
  7382. type TFT_Raster_Funcs = struct {
  7383. Fglyph_format TFT_Glyph_Format
  7384. Fraster_new TFT_Raster_NewFunc
  7385. Fraster_reset TFT_Raster_ResetFunc
  7386. Fraster_set_mode TFT_Raster_SetModeFunc
  7387. Fraster_render TFT_Raster_RenderFunc
  7388. Fraster_done TFT_Raster_DoneFunc
  7389. }
  7390. type TFT_Raster_Funcs_ = TFT_Raster_Funcs
  7391. type TFT_Bool = uint8
  7392. type TFT_FWord = int16
  7393. type TFT_UFWord = uint16
  7394. type TFT_Char = int8
  7395. type TFT_Byte = uint8
  7396. type TFT_Bytes = uintptr
  7397. type TFT_Tag = uint32
  7398. type TFT_String = int8
  7399. type TFT_Short = int16
  7400. type TFT_UShort = uint16
  7401. type TFT_Int = int32
  7402. type TFT_UInt = uint32
  7403. type TFT_Long = int64
  7404. type TFT_ULong = uint64
  7405. type TFT_F2Dot14 = int16
  7406. type TFT_F26Dot6 = int64
  7407. type TFT_Fixed = int64
  7408. type TFT_Error = int32
  7409. type TFT_Pointer = uintptr
  7410. type TFT_Offset = uint64
  7411. type TFT_PtrDist = int64
  7412. type TFT_UnitVector = struct {
  7413. Fx TFT_F2Dot14
  7414. Fy TFT_F2Dot14
  7415. }
  7416. type TFT_UnitVector_ = TFT_UnitVector
  7417. type TFT_Matrix = struct {
  7418. Fxx TFT_Fixed
  7419. Fxy TFT_Fixed
  7420. Fyx TFT_Fixed
  7421. Fyy TFT_Fixed
  7422. }
  7423. type TFT_Matrix_ = TFT_Matrix
  7424. type TFT_Data = struct {
  7425. Fpointer uintptr
  7426. Flength TFT_UInt
  7427. }
  7428. type TFT_Data_ = TFT_Data
  7429. type TFT_Generic_Finalizer = uintptr
  7430. type TFT_Generic = struct {
  7431. Fdata uintptr
  7432. Ffinalizer TFT_Generic_Finalizer
  7433. }
  7434. type TFT_Generic_ = TFT_Generic
  7435. type TFT_ListNode = uintptr
  7436. type TFT_ListNodeRec_ = struct {
  7437. Fprev TFT_ListNode
  7438. Fnext TFT_ListNode
  7439. Fdata uintptr
  7440. }
  7441. type TFT_List = uintptr
  7442. type TFT_ListRec_ = struct {
  7443. Fhead TFT_ListNode
  7444. Ftail TFT_ListNode
  7445. }
  7446. type TFT_ListNodeRec = struct {
  7447. Fprev TFT_ListNode
  7448. Fnext TFT_ListNode
  7449. Fdata uintptr
  7450. }
  7451. type TFT_ListRec = struct {
  7452. Fhead TFT_ListNode
  7453. Ftail TFT_ListNode
  7454. }
  7455. const _FT_Mod_Err_Base = 0
  7456. const _FT_Mod_Err_Autofit = 0
  7457. const _FT_Mod_Err_BDF = 0
  7458. const _FT_Mod_Err_Bzip2 = 0
  7459. const _FT_Mod_Err_Cache = 0
  7460. const _FT_Mod_Err_CFF = 0
  7461. const _FT_Mod_Err_CID = 0
  7462. const _FT_Mod_Err_Gzip = 0
  7463. const _FT_Mod_Err_LZW = 0
  7464. const _FT_Mod_Err_OTvalid = 0
  7465. const _FT_Mod_Err_PCF = 0
  7466. const _FT_Mod_Err_PFR = 0
  7467. const _FT_Mod_Err_PSaux = 0
  7468. const _FT_Mod_Err_PShinter = 0
  7469. const _FT_Mod_Err_PSnames = 0
  7470. const _FT_Mod_Err_Raster = 0
  7471. const _FT_Mod_Err_SFNT = 0
  7472. const _FT_Mod_Err_Smooth = 0
  7473. const _FT_Mod_Err_TrueType = 0
  7474. const _FT_Mod_Err_Type1 = 0
  7475. const _FT_Mod_Err_Type42 = 0
  7476. const _FT_Mod_Err_Winfonts = 0
  7477. const _FT_Mod_Err_GXvalid = 0
  7478. const _FT_Mod_Err_Sdf = 0
  7479. const _FT_Mod_Err_Max = 1
  7480. const _FT_Err_Ok = 0
  7481. const _FT_Err_Cannot_Open_Resource = 1
  7482. const _FT_Err_Unknown_File_Format = 2
  7483. const _FT_Err_Invalid_File_Format = 3
  7484. const _FT_Err_Invalid_Version = 4
  7485. const _FT_Err_Lower_Module_Version = 5
  7486. const _FT_Err_Invalid_Argument = 6
  7487. const _FT_Err_Unimplemented_Feature = 7
  7488. const _FT_Err_Invalid_Table = 8
  7489. const _FT_Err_Invalid_Offset = 9
  7490. const _FT_Err_Array_Too_Large = 10
  7491. const _FT_Err_Missing_Module = 11
  7492. const _FT_Err_Missing_Property = 12
  7493. const _FT_Err_Invalid_Glyph_Index = 16
  7494. const _FT_Err_Invalid_Character_Code = 17
  7495. const _FT_Err_Invalid_Glyph_Format = 18
  7496. const _FT_Err_Cannot_Render_Glyph = 19
  7497. const _FT_Err_Invalid_Outline = 20
  7498. const _FT_Err_Invalid_Composite = 21
  7499. const _FT_Err_Too_Many_Hints = 22
  7500. const _FT_Err_Invalid_Pixel_Size = 23
  7501. const _FT_Err_Invalid_SVG_Document = 24
  7502. const _FT_Err_Invalid_Handle = 32
  7503. const _FT_Err_Invalid_Library_Handle = 33
  7504. const _FT_Err_Invalid_Driver_Handle = 34
  7505. const _FT_Err_Invalid_Face_Handle = 35
  7506. const _FT_Err_Invalid_Size_Handle = 36
  7507. const _FT_Err_Invalid_Slot_Handle = 37
  7508. const _FT_Err_Invalid_CharMap_Handle = 38
  7509. const _FT_Err_Invalid_Cache_Handle = 39
  7510. const _FT_Err_Invalid_Stream_Handle = 40
  7511. const _FT_Err_Too_Many_Drivers = 48
  7512. const _FT_Err_Too_Many_Extensions = 49
  7513. const _FT_Err_Out_Of_Memory = 64
  7514. const _FT_Err_Unlisted_Object = 65
  7515. const _FT_Err_Cannot_Open_Stream = 81
  7516. const _FT_Err_Invalid_Stream_Seek = 82
  7517. const _FT_Err_Invalid_Stream_Skip = 83
  7518. const _FT_Err_Invalid_Stream_Read = 84
  7519. const _FT_Err_Invalid_Stream_Operation = 85
  7520. const _FT_Err_Invalid_Frame_Operation = 86
  7521. const _FT_Err_Nested_Frame_Access = 87
  7522. const _FT_Err_Invalid_Frame_Read = 88
  7523. const _FT_Err_Raster_Uninitialized = 96
  7524. const _FT_Err_Raster_Corrupted = 97
  7525. const _FT_Err_Raster_Overflow = 98
  7526. const _FT_Err_Raster_Negative_Height = 99
  7527. const _FT_Err_Too_Many_Caches = 112
  7528. const _FT_Err_Invalid_Opcode = 128
  7529. const _FT_Err_Too_Few_Arguments = 129
  7530. const _FT_Err_Stack_Overflow = 130
  7531. const _FT_Err_Code_Overflow = 131
  7532. const _FT_Err_Bad_Argument = 132
  7533. const _FT_Err_Divide_By_Zero = 133
  7534. const _FT_Err_Invalid_Reference = 134
  7535. const _FT_Err_Debug_OpCode = 135
  7536. const _FT_Err_ENDF_In_Exec_Stream = 136
  7537. const _FT_Err_Nested_DEFS = 137
  7538. const _FT_Err_Invalid_CodeRange = 138
  7539. const _FT_Err_Execution_Too_Long = 139
  7540. const _FT_Err_Too_Many_Function_Defs = 140
  7541. const _FT_Err_Too_Many_Instruction_Defs = 141
  7542. const _FT_Err_Table_Missing = 142
  7543. const _FT_Err_Horiz_Header_Missing = 143
  7544. const _FT_Err_Locations_Missing = 144
  7545. const _FT_Err_Name_Table_Missing = 145
  7546. const _FT_Err_CMap_Table_Missing = 146
  7547. const _FT_Err_Hmtx_Table_Missing = 147
  7548. const _FT_Err_Post_Table_Missing = 148
  7549. const _FT_Err_Invalid_Horiz_Metrics = 149
  7550. const _FT_Err_Invalid_CharMap_Format = 150
  7551. const _FT_Err_Invalid_PPem = 151
  7552. const _FT_Err_Invalid_Vert_Metrics = 152
  7553. const _FT_Err_Could_Not_Find_Context = 153
  7554. const _FT_Err_Invalid_Post_Table_Format = 154
  7555. const _FT_Err_Invalid_Post_Table = 155
  7556. const _FT_Err_DEF_In_Glyf_Bytecode = 156
  7557. const _FT_Err_Missing_Bitmap = 157
  7558. const _FT_Err_Missing_SVG_Hooks = 158
  7559. const _FT_Err_Syntax_Error = 160
  7560. const _FT_Err_Stack_Underflow = 161
  7561. const _FT_Err_Ignore = 162
  7562. const _FT_Err_No_Unicode_Glyph_Name = 163
  7563. const _FT_Err_Glyph_Too_Big = 164
  7564. const _FT_Err_Missing_Startfont_Field = 176
  7565. const _FT_Err_Missing_Font_Field = 177
  7566. const _FT_Err_Missing_Size_Field = 178
  7567. const _FT_Err_Missing_Fontboundingbox_Field = 179
  7568. const _FT_Err_Missing_Chars_Field = 180
  7569. const _FT_Err_Missing_Startchar_Field = 181
  7570. const _FT_Err_Missing_Encoding_Field = 182
  7571. const _FT_Err_Missing_Bbx_Field = 183
  7572. const _FT_Err_Bbx_Too_Big = 184
  7573. const _FT_Err_Corrupted_Font_Header = 185
  7574. const _FT_Err_Corrupted_Font_Glyphs = 186
  7575. const _FT_Err_Max = 187
  7576. type TFT_Glyph_Metrics = struct {
  7577. Fwidth TFT_Pos
  7578. Fheight TFT_Pos
  7579. FhoriBearingX TFT_Pos
  7580. FhoriBearingY TFT_Pos
  7581. FhoriAdvance TFT_Pos
  7582. FvertBearingX TFT_Pos
  7583. FvertBearingY TFT_Pos
  7584. FvertAdvance TFT_Pos
  7585. }
  7586. type TFT_Glyph_Metrics_ = TFT_Glyph_Metrics
  7587. type TFT_Bitmap_Size = struct {
  7588. Fheight TFT_Short
  7589. Fwidth TFT_Short
  7590. Fsize TFT_Pos
  7591. Fx_ppem TFT_Pos
  7592. Fy_ppem TFT_Pos
  7593. }
  7594. type TFT_Bitmap_Size_ = TFT_Bitmap_Size
  7595. type TFT_Library = uintptr
  7596. type TFT_Module = uintptr
  7597. type TFT_Driver = uintptr
  7598. type TFT_Renderer = uintptr
  7599. type TFT_Face = uintptr
  7600. type TFT_FaceRec_ = struct {
  7601. Fnum_faces TFT_Long
  7602. Fface_index TFT_Long
  7603. Fface_flags TFT_Long
  7604. Fstyle_flags TFT_Long
  7605. Fnum_glyphs TFT_Long
  7606. Ffamily_name uintptr
  7607. Fstyle_name uintptr
  7608. Fnum_fixed_sizes TFT_Int
  7609. Favailable_sizes uintptr
  7610. Fnum_charmaps TFT_Int
  7611. Fcharmaps uintptr
  7612. Fgeneric TFT_Generic
  7613. Fbbox TFT_BBox
  7614. Funits_per_EM TFT_UShort
  7615. Fascender TFT_Short
  7616. Fdescender TFT_Short
  7617. Fheight TFT_Short
  7618. Fmax_advance_width TFT_Short
  7619. Fmax_advance_height TFT_Short
  7620. Funderline_position TFT_Short
  7621. Funderline_thickness TFT_Short
  7622. Fglyph TFT_GlyphSlot
  7623. Fsize TFT_Size
  7624. Fcharmap TFT_CharMap
  7625. Fdriver TFT_Driver
  7626. Fmemory TFT_Memory
  7627. Fstream TFT_Stream
  7628. Fsizes_list TFT_ListRec
  7629. Fautohint TFT_Generic
  7630. Fextensions uintptr
  7631. Finternal TFT_Face_Internal
  7632. }
  7633. type TFT_Size = uintptr
  7634. type TFT_SizeRec_ = struct {
  7635. Fface TFT_Face
  7636. Fgeneric TFT_Generic
  7637. Fmetrics TFT_Size_Metrics
  7638. Finternal TFT_Size_Internal
  7639. }
  7640. type TFT_GlyphSlot = uintptr
  7641. type TFT_GlyphSlotRec_ = struct {
  7642. Flibrary TFT_Library
  7643. Fface TFT_Face
  7644. Fnext TFT_GlyphSlot
  7645. Fglyph_index TFT_UInt
  7646. Fgeneric TFT_Generic
  7647. Fmetrics TFT_Glyph_Metrics
  7648. FlinearHoriAdvance TFT_Fixed
  7649. FlinearVertAdvance TFT_Fixed
  7650. Fadvance TFT_Vector
  7651. Fformat TFT_Glyph_Format
  7652. Fbitmap TFT_Bitmap
  7653. Fbitmap_left TFT_Int
  7654. Fbitmap_top TFT_Int
  7655. Foutline TFT_Outline
  7656. Fnum_subglyphs TFT_UInt
  7657. Fsubglyphs TFT_SubGlyph
  7658. Fcontrol_data uintptr
  7659. Fcontrol_len int64
  7660. Flsb_delta TFT_Pos
  7661. Frsb_delta TFT_Pos
  7662. Fother uintptr
  7663. Finternal TFT_Slot_Internal
  7664. }
  7665. type TFT_CharMap = uintptr
  7666. type TFT_CharMapRec_ = struct {
  7667. Fface TFT_Face
  7668. Fencoding TFT_Encoding
  7669. Fplatform_id TFT_UShort
  7670. Fencoding_id TFT_UShort
  7671. }
  7672. type _FT_Encoding_ = int32
  7673. const _FT_ENCODING_NONE = 0
  7674. const _FT_ENCODING_MS_SYMBOL = 1937337698
  7675. const _FT_ENCODING_UNICODE = 1970170211
  7676. const _FT_ENCODING_SJIS = 1936353651
  7677. const _FT_ENCODING_PRC = 1734484000
  7678. const _FT_ENCODING_BIG5 = 1651074869
  7679. const _FT_ENCODING_WANSUNG = 2002873971
  7680. const _FT_ENCODING_JOHAB = 1785686113
  7681. const _FT_ENCODING_GB2312 = 1734484000
  7682. const _FT_ENCODING_MS_SJIS = 1936353651
  7683. const _FT_ENCODING_MS_GB2312 = 1734484000
  7684. const _FT_ENCODING_MS_BIG5 = 1651074869
  7685. const _FT_ENCODING_MS_WANSUNG = 2002873971
  7686. const _FT_ENCODING_MS_JOHAB = 1785686113
  7687. const _FT_ENCODING_ADOBE_STANDARD = 1094995778
  7688. const _FT_ENCODING_ADOBE_EXPERT = 1094992453
  7689. const _FT_ENCODING_ADOBE_CUSTOM = 1094992451
  7690. const _FT_ENCODING_ADOBE_LATIN_1 = 1818326065
  7691. const _FT_ENCODING_OLD_LATIN_2 = 1818326066
  7692. const _FT_ENCODING_APPLE_ROMAN = 1634889070
  7693. type TFT_Encoding = int32
  7694. type TFT_CharMapRec = struct {
  7695. Fface TFT_Face
  7696. Fencoding TFT_Encoding
  7697. Fplatform_id TFT_UShort
  7698. Fencoding_id TFT_UShort
  7699. }
  7700. type TFT_Face_Internal = uintptr
  7701. type TFT_FaceRec = struct {
  7702. Fnum_faces TFT_Long
  7703. Fface_index TFT_Long
  7704. Fface_flags TFT_Long
  7705. Fstyle_flags TFT_Long
  7706. Fnum_glyphs TFT_Long
  7707. Ffamily_name uintptr
  7708. Fstyle_name uintptr
  7709. Fnum_fixed_sizes TFT_Int
  7710. Favailable_sizes uintptr
  7711. Fnum_charmaps TFT_Int
  7712. Fcharmaps uintptr
  7713. Fgeneric TFT_Generic
  7714. Fbbox TFT_BBox
  7715. Funits_per_EM TFT_UShort
  7716. Fascender TFT_Short
  7717. Fdescender TFT_Short
  7718. Fheight TFT_Short
  7719. Fmax_advance_width TFT_Short
  7720. Fmax_advance_height TFT_Short
  7721. Funderline_position TFT_Short
  7722. Funderline_thickness TFT_Short
  7723. Fglyph TFT_GlyphSlot
  7724. Fsize TFT_Size
  7725. Fcharmap TFT_CharMap
  7726. Fdriver TFT_Driver
  7727. Fmemory TFT_Memory
  7728. Fstream TFT_Stream
  7729. Fsizes_list TFT_ListRec
  7730. Fautohint TFT_Generic
  7731. Fextensions uintptr
  7732. Finternal TFT_Face_Internal
  7733. }
  7734. type TFT_Size_Internal = uintptr
  7735. type TFT_Size_Metrics = struct {
  7736. Fx_ppem TFT_UShort
  7737. Fy_ppem TFT_UShort
  7738. Fx_scale TFT_Fixed
  7739. Fy_scale TFT_Fixed
  7740. Fascender TFT_Pos
  7741. Fdescender TFT_Pos
  7742. Fheight TFT_Pos
  7743. Fmax_advance TFT_Pos
  7744. }
  7745. type TFT_Size_Metrics_ = TFT_Size_Metrics
  7746. type TFT_SizeRec = struct {
  7747. Fface TFT_Face
  7748. Fgeneric TFT_Generic
  7749. Fmetrics TFT_Size_Metrics
  7750. Finternal TFT_Size_Internal
  7751. }
  7752. type TFT_SubGlyph = uintptr
  7753. type TFT_Slot_Internal = uintptr
  7754. type TFT_GlyphSlotRec = struct {
  7755. Flibrary TFT_Library
  7756. Fface TFT_Face
  7757. Fnext TFT_GlyphSlot
  7758. Fglyph_index TFT_UInt
  7759. Fgeneric TFT_Generic
  7760. Fmetrics TFT_Glyph_Metrics
  7761. FlinearHoriAdvance TFT_Fixed
  7762. FlinearVertAdvance TFT_Fixed
  7763. Fadvance TFT_Vector
  7764. Fformat TFT_Glyph_Format
  7765. Fbitmap TFT_Bitmap
  7766. Fbitmap_left TFT_Int
  7767. Fbitmap_top TFT_Int
  7768. Foutline TFT_Outline
  7769. Fnum_subglyphs TFT_UInt
  7770. Fsubglyphs TFT_SubGlyph
  7771. Fcontrol_data uintptr
  7772. Fcontrol_len int64
  7773. Flsb_delta TFT_Pos
  7774. Frsb_delta TFT_Pos
  7775. Fother uintptr
  7776. Finternal TFT_Slot_Internal
  7777. }
  7778. type TFT_Parameter = struct {
  7779. Ftag TFT_ULong
  7780. Fdata TFT_Pointer
  7781. }
  7782. type TFT_Parameter_ = TFT_Parameter
  7783. type TFT_Open_Args = struct {
  7784. Fflags TFT_UInt
  7785. Fmemory_base uintptr
  7786. Fmemory_size TFT_Long
  7787. Fpathname uintptr
  7788. Fstream TFT_Stream
  7789. Fdriver TFT_Module
  7790. Fnum_params TFT_Int
  7791. Fparams uintptr
  7792. }
  7793. type TFT_Open_Args_ = TFT_Open_Args
  7794. type TFT_Size_Request_Type = int32
  7795. type _FT_Size_Request_Type_ = int32
  7796. const _FT_SIZE_REQUEST_TYPE_NOMINAL = 0
  7797. const _FT_SIZE_REQUEST_TYPE_REAL_DIM = 1
  7798. const _FT_SIZE_REQUEST_TYPE_BBOX = 2
  7799. const _FT_SIZE_REQUEST_TYPE_CELL = 3
  7800. const _FT_SIZE_REQUEST_TYPE_SCALES = 4
  7801. const _FT_SIZE_REQUEST_TYPE_MAX = 5
  7802. type TFT_Size_RequestRec = struct {
  7803. Ftype1 TFT_Size_Request_Type
  7804. Fwidth TFT_Long
  7805. Fheight TFT_Long
  7806. FhoriResolution TFT_UInt
  7807. FvertResolution TFT_UInt
  7808. }
  7809. type TFT_Size_RequestRec_ = TFT_Size_RequestRec
  7810. type TFT_Size_Request = uintptr
  7811. type TFT_Render_Mode = int32
  7812. type _FT_Render_Mode_ = int32
  7813. const _FT_RENDER_MODE_NORMAL = 0
  7814. const _FT_RENDER_MODE_LIGHT = 1
  7815. const _FT_RENDER_MODE_MONO = 2
  7816. const _FT_RENDER_MODE_LCD = 3
  7817. const _FT_RENDER_MODE_LCD_V = 4
  7818. const _FT_RENDER_MODE_SDF = 5
  7819. const _FT_RENDER_MODE_MAX = 6
  7820. type TFT_Kerning_Mode = int32
  7821. type _FT_Kerning_Mode_ = int32
  7822. const _FT_KERNING_DEFAULT = 0
  7823. const _FT_KERNING_UNFITTED = 1
  7824. const _FT_KERNING_UNSCALED = 2
  7825. type Tstat = struct {
  7826. Fst_dev Tdev_t
  7827. Fst_ino Tino_t
  7828. Fst_nlink Tnlink_t
  7829. Fst_mode Tmode_t
  7830. Fst_uid Tuid_t
  7831. Fst_gid Tgid_t
  7832. F__pad0 uint32
  7833. Fst_rdev Tdev_t
  7834. Fst_size Toff_t
  7835. Fst_blksize Tblksize_t
  7836. Fst_blocks Tblkcnt_t
  7837. Fst_atim Ttimespec
  7838. Fst_mtim Ttimespec
  7839. Fst_ctim Ttimespec
  7840. F__unused [3]int64
  7841. }
  7842. type Tstatx_timestamp = struct {
  7843. Ftv_sec Tint64_t
  7844. Ftv_nsec Tuint32_t
  7845. F__pad Tuint32_t
  7846. }
  7847. type Tstatx = struct {
  7848. Fstx_mask Tuint32_t
  7849. Fstx_blksize Tuint32_t
  7850. Fstx_attributes Tuint64_t
  7851. Fstx_nlink Tuint32_t
  7852. Fstx_uid Tuint32_t
  7853. Fstx_gid Tuint32_t
  7854. Fstx_mode Tuint16_t
  7855. F__pad0 [1]Tuint16_t
  7856. Fstx_ino Tuint64_t
  7857. Fstx_size Tuint64_t
  7858. Fstx_blocks Tuint64_t
  7859. Fstx_attributes_mask Tuint64_t
  7860. Fstx_atime Tstatx_timestamp
  7861. Fstx_btime Tstatx_timestamp
  7862. Fstx_ctime Tstatx_timestamp
  7863. Fstx_mtime Tstatx_timestamp
  7864. Fstx_rdev_major Tuint32_t
  7865. Fstx_rdev_minor Tuint32_t
  7866. Fstx_dev_major Tuint32_t
  7867. Fstx_dev_minor Tuint32_t
  7868. F__pad1 [14]Tuint64_t
  7869. }
  7870. type TFcChar8 = uint8
  7871. type TFcChar16 = uint16
  7872. type TFcChar32 = uint32
  7873. type TFcBool = int32
  7874. type TFcType = int32
  7875. type __FcType = int32
  7876. const _FcTypeUnknown = -1
  7877. const _FcTypeVoid = 0
  7878. const _FcTypeInteger = 1
  7879. const _FcTypeDouble = 2
  7880. const _FcTypeString = 3
  7881. const _FcTypeBool = 4
  7882. const _FcTypeMatrix = 5
  7883. const _FcTypeCharSet = 6
  7884. const _FcTypeFTFace = 7
  7885. const _FcTypeLangSet = 8
  7886. const _FcTypeRange = 9
  7887. type TFcMatrix = struct {
  7888. Fxx float64
  7889. Fxy float64
  7890. Fyx float64
  7891. Fyy float64
  7892. }
  7893. type T_FcMatrix = TFcMatrix
  7894. type TFcObjectType = struct {
  7895. Fobject uintptr
  7896. Ftype1 TFcType
  7897. }
  7898. type T_FcObjectType = TFcObjectType
  7899. type TFcConstant = struct {
  7900. Fname uintptr
  7901. Fobject uintptr
  7902. Fvalue int32
  7903. }
  7904. type T_FcConstant = TFcConstant
  7905. type TFcResult = int32
  7906. type __FcResult = int32
  7907. const _FcResultMatch = 0
  7908. const _FcResultNoMatch = 1
  7909. const _FcResultTypeMismatch = 2
  7910. const _FcResultNoId = 3
  7911. const _FcResultOutOfMemory = 4
  7912. type TFcValueBinding = int32
  7913. type __FcValueBinding = int32
  7914. const _FcValueBindingWeak = 0
  7915. const _FcValueBindingStrong = 1
  7916. const _FcValueBindingSame = 2
  7917. const _FcValueBindingEnd = 2147483647
  7918. type TFcPatternIter = struct {
  7919. Fdummy1 uintptr
  7920. Fdummy2 uintptr
  7921. }
  7922. type T_FcPatternIter = TFcPatternIter
  7923. type TFcValue = struct {
  7924. Ftype1 TFcType
  7925. Fu struct {
  7926. Fi [0]int32
  7927. Fb [0]TFcBool
  7928. Fd [0]float64
  7929. Fm [0]uintptr
  7930. Fc [0]uintptr
  7931. Ff [0]uintptr
  7932. Fl [0]uintptr
  7933. Fr [0]uintptr
  7934. Fs uintptr
  7935. }
  7936. }
  7937. type T_FcValue = TFcValue
  7938. type TFcFontSet = struct {
  7939. Fnfont int32
  7940. Fsfont int32
  7941. Ffonts uintptr
  7942. }
  7943. type T_FcFontSet = TFcFontSet
  7944. type TFcObjectSet = struct {
  7945. Fnobject int32
  7946. Fsobject int32
  7947. Fobjects uintptr
  7948. }
  7949. type T_FcObjectSet = TFcObjectSet
  7950. type TFcMatchKind = int32
  7951. type __FcMatchKind = int32
  7952. const _FcMatchPattern = 0
  7953. const _FcMatchFont = 1
  7954. const _FcMatchScan = 2
  7955. const _FcMatchKindEnd = 3
  7956. const _FcMatchKindBegin = 0
  7957. type TFcLangResult = int32
  7958. type __FcLangResult = int32
  7959. const _FcLangEqual = 0
  7960. const _FcLangDifferentCountry = 1
  7961. const _FcLangDifferentTerritory = 1
  7962. const _FcLangDifferentLang = 2
  7963. type TFcSetName = int32
  7964. type __FcSetName = int32
  7965. const _FcSetSystem = 0
  7966. const _FcSetApplication = 1
  7967. type TFcConfigFileInfoIter = struct {
  7968. Fdummy1 uintptr
  7969. Fdummy2 uintptr
  7970. Fdummy3 uintptr
  7971. }
  7972. type T_FcConfigFileInfoIter = TFcConfigFileInfoIter
  7973. type TFcEndian = int32
  7974. const _FcEndianBig = 0
  7975. const _FcEndianLittle = 1
  7976. type Tpointer = uintptr
  7977. type TClientPtr = uintptr
  7978. type TFontPtr = uintptr
  7979. type TFSID = uint64
  7980. type TAccContext = uint64
  7981. type TOSTimePtr = uintptr
  7982. type TBlockHandlerProcPtr = uintptr
  7983. type TGlyph = uint64
  7984. type TGlyphSet = uint64
  7985. type TPicture = uint64
  7986. type TPictFormat = uint64
  7987. type TXRenderDirectFormat = struct {
  7988. Fred int16
  7989. FredMask int16
  7990. Fgreen int16
  7991. FgreenMask int16
  7992. Fblue int16
  7993. FblueMask int16
  7994. Falpha int16
  7995. FalphaMask int16
  7996. }
  7997. type TXRenderPictFormat = struct {
  7998. Fid TPictFormat
  7999. Ftype1 int32
  8000. Fdepth int32
  8001. Fdirect TXRenderDirectFormat
  8002. Fcolormap TColormap
  8003. }
  8004. type TXRenderPictureAttributes = struct {
  8005. Frepeat int32
  8006. Falpha_map TPicture
  8007. Falpha_x_origin int32
  8008. Falpha_y_origin int32
  8009. Fclip_x_origin int32
  8010. Fclip_y_origin int32
  8011. Fclip_mask TPixmap
  8012. Fgraphics_exposures int32
  8013. Fsubwindow_mode int32
  8014. Fpoly_edge int32
  8015. Fpoly_mode int32
  8016. Fdither TAtom
  8017. Fcomponent_alpha int32
  8018. }
  8019. type T_XRenderPictureAttributes = TXRenderPictureAttributes
  8020. type TXRenderColor = struct {
  8021. Fred uint16
  8022. Fgreen uint16
  8023. Fblue uint16
  8024. Falpha uint16
  8025. }
  8026. type TXGlyphInfo = struct {
  8027. Fwidth uint16
  8028. Fheight uint16
  8029. Fx int16
  8030. Fy int16
  8031. FxOff int16
  8032. FyOff int16
  8033. }
  8034. type T_XGlyphInfo = TXGlyphInfo
  8035. type TXGlyphElt8 = struct {
  8036. Fglyphset TGlyphSet
  8037. Fchars uintptr
  8038. Fnchars int32
  8039. FxOff int32
  8040. FyOff int32
  8041. }
  8042. type T_XGlyphElt8 = TXGlyphElt8
  8043. type TXGlyphElt16 = struct {
  8044. Fglyphset TGlyphSet
  8045. Fchars uintptr
  8046. Fnchars int32
  8047. FxOff int32
  8048. FyOff int32
  8049. }
  8050. type T_XGlyphElt16 = TXGlyphElt16
  8051. type TXGlyphElt32 = struct {
  8052. Fglyphset TGlyphSet
  8053. Fchars uintptr
  8054. Fnchars int32
  8055. FxOff int32
  8056. FyOff int32
  8057. }
  8058. type T_XGlyphElt32 = TXGlyphElt32
  8059. type TXDouble = float64
  8060. type TXPointDouble = struct {
  8061. Fx TXDouble
  8062. Fy TXDouble
  8063. }
  8064. type T_XPointDouble = TXPointDouble
  8065. type TXFixed = int32
  8066. type TXPointFixed = struct {
  8067. Fx TXFixed
  8068. Fy TXFixed
  8069. }
  8070. type T_XPointFixed = TXPointFixed
  8071. type TXLineFixed = struct {
  8072. Fp1 TXPointFixed
  8073. Fp2 TXPointFixed
  8074. }
  8075. type T_XLineFixed = TXLineFixed
  8076. type TXTriangle = struct {
  8077. Fp1 TXPointFixed
  8078. Fp2 TXPointFixed
  8079. Fp3 TXPointFixed
  8080. }
  8081. type T_XTriangle = TXTriangle
  8082. type TXCircle = struct {
  8083. Fx TXFixed
  8084. Fy TXFixed
  8085. Fradius TXFixed
  8086. }
  8087. type T_XCircle = TXCircle
  8088. type TXTrapezoid = struct {
  8089. Ftop TXFixed
  8090. Fbottom TXFixed
  8091. Fleft TXLineFixed
  8092. Fright TXLineFixed
  8093. }
  8094. type T_XTrapezoid = TXTrapezoid
  8095. type TXTransform = struct {
  8096. Fmatrix [3][3]TXFixed
  8097. }
  8098. type T_XTransform = TXTransform
  8099. type TXFilters = struct {
  8100. Fnfilter int32
  8101. Ffilter uintptr
  8102. Fnalias int32
  8103. Falias uintptr
  8104. }
  8105. type T_XFilters = TXFilters
  8106. type TXIndexValue = struct {
  8107. Fpixel uint64
  8108. Fred uint16
  8109. Fgreen uint16
  8110. Fblue uint16
  8111. Falpha uint16
  8112. }
  8113. type T_XIndexValue = TXIndexValue
  8114. type TXAnimCursor = struct {
  8115. Fcursor TCursor
  8116. Fdelay uint64
  8117. }
  8118. type T_XAnimCursor = TXAnimCursor
  8119. type TXSpanFix = struct {
  8120. Fleft TXFixed
  8121. Fright TXFixed
  8122. Fy TXFixed
  8123. }
  8124. type T_XSpanFix = TXSpanFix
  8125. type TXTrap = struct {
  8126. Ftop TXSpanFix
  8127. Fbottom TXSpanFix
  8128. }
  8129. type T_XTrap = TXTrap
  8130. type TXLinearGradient = struct {
  8131. Fp1 TXPointFixed
  8132. Fp2 TXPointFixed
  8133. }
  8134. type T_XLinearGradient = TXLinearGradient
  8135. type TXRadialGradient = struct {
  8136. Finner TXCircle
  8137. Fouter TXCircle
  8138. }
  8139. type T_XRadialGradient = TXRadialGradient
  8140. type TXConicalGradient = struct {
  8141. Fcenter TXPointFixed
  8142. Fangle TXFixed
  8143. }
  8144. type T_XConicalGradient = TXConicalGradient
  8145. type TXftFontInfo = struct {
  8146. Fhash TFcChar32
  8147. Ffile uintptr
  8148. Fxsize TFT_F26Dot6
  8149. Fysize TFT_F26Dot6
  8150. Fantialias TFcBool
  8151. Fembolden TFcBool
  8152. Fcolor TFcBool
  8153. Frgba int32
  8154. Flcd_filter int32
  8155. Fmatrix TFT_Matrix
  8156. Ftransform TFcBool
  8157. Fload_flags TFT_Int
  8158. Frender TFcBool
  8159. Fspacing int32
  8160. Fminspace TFcBool
  8161. Fchar_width int32
  8162. }
  8163. type T_XftFontInfo = TXftFontInfo
  8164. type TXftFont = struct {
  8165. Fascent int32
  8166. Fdescent int32
  8167. Fheight int32
  8168. Fmax_advance_width int32
  8169. Fcharset uintptr
  8170. Fpattern uintptr
  8171. }
  8172. type T_XftFont = TXftFont
  8173. type TXftDraw = struct {
  8174. Fdpy uintptr
  8175. Fscreen int32
  8176. Fbits_per_pixel uint32
  8177. Fdepth uint32
  8178. Fdrawable TDrawable
  8179. Fvisual uintptr
  8180. Fcolormap TColormap
  8181. Fclip_type TXftClipType
  8182. Fclip TXftClip
  8183. Fsubwindow_mode int32
  8184. Frender struct {
  8185. Fpict TPicture
  8186. }
  8187. Fcore struct {
  8188. Fgc TGC
  8189. Fuse_pixmap int32
  8190. }
  8191. }
  8192. type T_XftDraw = TXftDraw
  8193. type __XftClipType = int32
  8194. const _XftClipTypeNone = 0
  8195. const _XftClipTypeRegion = 1
  8196. const _XftClipTypeRectangles = 2
  8197. type TXftColor = struct {
  8198. Fpixel uint64
  8199. Fcolor TXRenderColor
  8200. }
  8201. type T_XftColor = TXftColor
  8202. type TXftCharSpec = struct {
  8203. Fucs4 TFcChar32
  8204. Fx int16
  8205. Fy int16
  8206. }
  8207. type T_XftCharSpec = TXftCharSpec
  8208. type TXftCharFontSpec = struct {
  8209. Ffont uintptr
  8210. Fucs4 TFcChar32
  8211. Fx int16
  8212. Fy int16
  8213. }
  8214. type T_XftCharFontSpec = TXftCharFontSpec
  8215. type TXftGlyphSpec = struct {
  8216. Fglyph TFT_UInt
  8217. Fx int16
  8218. Fy int16
  8219. }
  8220. type T_XftGlyphSpec = TXftGlyphSpec
  8221. type TXftGlyphFontSpec = struct {
  8222. Ffont uintptr
  8223. Fglyph TFT_UInt
  8224. Fx int16
  8225. Fy int16
  8226. }
  8227. type T_XftGlyphFontSpec = TXftGlyphFontSpec
  8228. type TXftMatcher = struct {
  8229. Fobject uintptr
  8230. Fcompare uintptr
  8231. }
  8232. type T_XftMatcher = TXftMatcher
  8233. type TXftSymbolic = struct {
  8234. Fname uintptr
  8235. Fvalue int32
  8236. }
  8237. type T_XftSymbolic = TXftSymbolic
  8238. type TXftGlyph = struct {
  8239. Fmetrics TXGlyphInfo
  8240. Fbitmap uintptr
  8241. Fglyph_memory uint64
  8242. Fpicture TPicture
  8243. }
  8244. type T_XftGlyph = TXftGlyph
  8245. type TXftGlyphUsage = struct {
  8246. Fcontents TXftGlyph
  8247. Fnewer TFT_UInt
  8248. Folder TFT_UInt
  8249. }
  8250. type T_XftGlyphUsage = TXftGlyphUsage
  8251. type TXftUcsHash = struct {
  8252. Fucs4 TFcChar32
  8253. Fglyph TFT_UInt
  8254. }
  8255. type T_XftUcsHash = TXftUcsHash
  8256. type TXftFtFile = struct {
  8257. Fnext uintptr
  8258. Fref int32
  8259. Ffile uintptr
  8260. Fid int32
  8261. Fxsize TFT_F26Dot6
  8262. Fysize TFT_F26Dot6
  8263. Fmatrix TFT_Matrix
  8264. Flock int32
  8265. Fface TFT_Face
  8266. }
  8267. type T_XftFtFile = TXftFtFile
  8268. type TXftFontInt = struct {
  8269. Fpublic TXftFont
  8270. Fnext uintptr
  8271. Fhash_next uintptr
  8272. Finfo TXftFontInfo
  8273. Fref int32
  8274. Fglyphs uintptr
  8275. Fnum_glyphs TFT_UInt
  8276. Fhash_table uintptr
  8277. Fhash_value int32
  8278. Frehash_value int32
  8279. Fglyphset TGlyphSet
  8280. Fformat uintptr
  8281. Fglyph_memory uint64
  8282. Fmax_glyph_memory uint64
  8283. Fsizeof_glyph uint32
  8284. Fnewest TFT_UInt
  8285. Ftotal_inuse TFT_UInt
  8286. Ftrack_mem_usage TFcBool
  8287. Fuse_free_glyphs TFcBool
  8288. }
  8289. type T_XftFontInt = TXftFontInt
  8290. type TXftClipType = int32
  8291. type TXftClipRect = struct {
  8292. FxOrigin int32
  8293. FyOrigin int32
  8294. Fn int32
  8295. }
  8296. type T_XftClipRect = TXftClipRect
  8297. type TXftClip = struct {
  8298. Fregion [0]TRegion
  8299. Frect uintptr
  8300. }
  8301. type T_XftClip = TXftClip
  8302. type TXftSolidColor = struct {
  8303. Fcolor TXRenderColor
  8304. Fscreen int32
  8305. Fpict TPicture
  8306. }
  8307. type T_XftSolidColor = TXftSolidColor
  8308. type TXftDisplayInfo = struct {
  8309. Fnext uintptr
  8310. Fdisplay uintptr
  8311. Fcodes uintptr
  8312. Fdefaults uintptr
  8313. FhasRender TFcBool
  8314. FhasSolid TFcBool
  8315. Ffonts uintptr
  8316. FsolidFormat uintptr
  8317. Fglyph_memory uint64
  8318. Fmax_glyph_memory uint64
  8319. Ftrack_mem_usage TFcBool
  8320. Fuse_free_glyphs TFcBool
  8321. Fnum_unref_fonts int32
  8322. Fmax_unref_fonts int32
  8323. Fcolors [16]TXftSolidColor
  8324. FfontHash [127]uintptr
  8325. }
  8326. type T_XftDisplayInfo = TXftDisplayInfo
  8327. type TXFT_MEM_KIND = int32
  8328. const _XFT_MEM_DRAW = 0
  8329. const _XFT_MEM_FONT = 1
  8330. const _XFT_MEM_FILE = 2
  8331. const _XFT_MEM_GLYPH = 3
  8332. const _XFT_MEM_NUM = 4
  8333. /* xftxlfd.c */
  8334. func XXftColorAllocName(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, name uintptr, result uintptr) (r int32) {
  8335. bp := tls.Alloc(32)
  8336. defer tls.Free(32)
  8337. var _ /* exact at bp+16 */ TXColor
  8338. var _ /* screen at bp+0 */ TXColor
  8339. if !(libx11.XXAllocNamedColor(tls, dpy, cmap, name, bp, bp+16) != 0) {
  8340. /* XXX stick standard colormap stuff here */
  8341. return m_False
  8342. }
  8343. (*TXftColor)(unsafe.Pointer(result)).Fpixel = (*(*TXColor)(unsafe.Pointer(bp))).Fpixel
  8344. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fred = (*(*TXColor)(unsafe.Pointer(bp + 16))).Fred
  8345. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fgreen = (*(*TXColor)(unsafe.Pointer(bp + 16))).Fgreen
  8346. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fblue = (*(*TXColor)(unsafe.Pointer(bp + 16))).Fblue
  8347. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Falpha = uint16(0xffff)
  8348. return int32(m_True)
  8349. }
  8350. func _maskbase(tls *libc.TLS, m uint64) (r int16) {
  8351. var i int16
  8352. _ = i
  8353. if !(m != 0) {
  8354. return 0
  8355. }
  8356. i = 0
  8357. for !(m&libc.Uint64FromInt32(1) != 0) {
  8358. m >>= uint64(1)
  8359. i++
  8360. }
  8361. return i
  8362. }
  8363. func _masklen(tls *libc.TLS, m uint64) (r int16) {
  8364. var y uint64
  8365. _ = y
  8366. y = m >> int32(1) & uint64(033333333333)
  8367. y = m - y - y>>int32(1)&uint64(033333333333)
  8368. return libc.Int16FromUint64((y + y>>libc.Int32FromInt32(3)) & libc.Uint64FromUint32(030707070707) % libc.Uint64FromInt32(077))
  8369. }
  8370. func XXftColorAllocValue(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, color uintptr, result uintptr) (r int32) {
  8371. bp := tls.Alloc(16)
  8372. defer tls.Free(16)
  8373. var blue_len, blue_shift, green_len, green_shift, red_len, red_shift int32
  8374. var _ /* xcolor at bp+0 */ TXColor
  8375. _, _, _, _, _, _ = blue_len, blue_shift, green_len, green_shift, red_len, red_shift
  8376. if (*TVisual)(unsafe.Pointer(visual)).Fclass == int32(m_TrueColor) {
  8377. red_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fred_mask))
  8378. red_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fred_mask))
  8379. green_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fgreen_mask))
  8380. green_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fgreen_mask))
  8381. blue_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fblue_mask))
  8382. blue_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fblue_mask))
  8383. (*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)
  8384. } else {
  8385. (*(*TXColor)(unsafe.Pointer(bp))).Fred = (*TXRenderColor)(unsafe.Pointer(color)).Fred
  8386. (*(*TXColor)(unsafe.Pointer(bp))).Fgreen = (*TXRenderColor)(unsafe.Pointer(color)).Fgreen
  8387. (*(*TXColor)(unsafe.Pointer(bp))).Fblue = (*TXRenderColor)(unsafe.Pointer(color)).Fblue
  8388. if !(libx11.XXAllocColor(tls, dpy, cmap, bp) != 0) {
  8389. return m_False
  8390. }
  8391. (*TXftColor)(unsafe.Pointer(result)).Fpixel = (*(*TXColor)(unsafe.Pointer(bp))).Fpixel
  8392. }
  8393. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fred = (*TXRenderColor)(unsafe.Pointer(color)).Fred
  8394. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fgreen = (*TXRenderColor)(unsafe.Pointer(color)).Fgreen
  8395. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fblue = (*TXRenderColor)(unsafe.Pointer(color)).Fblue
  8396. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Falpha = (*TXRenderColor)(unsafe.Pointer(color)).Falpha
  8397. return int32(m_True)
  8398. }
  8399. func XXftColorFree(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, color uintptr) {
  8400. if (*TVisual)(unsafe.Pointer(visual)).Fclass != int32(m_TrueColor) {
  8401. libx11.XXFreeColors(tls, dpy, cmap, color, int32(1), uint64(0))
  8402. }
  8403. }
  8404. type Tfuncs = struct {
  8405. Fcreate_image uintptr
  8406. Fdestroy_image uintptr
  8407. Fget_pixel uintptr
  8408. Fput_pixel uintptr
  8409. Fsub_image uintptr
  8410. Fadd_pixel uintptr
  8411. }
  8412. const m_NUM_LOCAL = 1024
  8413. /* xftxlfd.c */
  8414. func XXftRectCore(tls *libc.TLS, draw uintptr, color uintptr, x int32, y int32, width uint32, height uint32) {
  8415. if libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >= int32(0x8000) {
  8416. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  8417. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, x, y, width, height)
  8418. }
  8419. }
  8420. /*
  8421. * Use the core protocol to draw the glyphs
  8422. */
  8423. func __XftSharpGlyphMono(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8424. var bits, bitsMask uint8
  8425. var height, lenspan, stride, w, width, xspan, v1 int32
  8426. var src, srcLine, v2, v3, v4 uintptr
  8427. _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, bitsMask, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8428. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8429. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8430. stride = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  8431. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8432. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8433. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8434. for {
  8435. v1 = height
  8436. height--
  8437. if !(v1 != 0) {
  8438. break
  8439. }
  8440. src = srcLine
  8441. srcLine += uintptr(stride)
  8442. w = width
  8443. bitsMask = uint8(0x80) /* FreeType is always MSB first */
  8444. v2 = src
  8445. src++
  8446. bits = *(*uint8)(unsafe.Pointer(v2))
  8447. xspan = x
  8448. for w != 0 {
  8449. if libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0 {
  8450. lenspan = 0
  8451. for cond := true; cond; cond = libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0 {
  8452. lenspan++
  8453. if lenspan == w {
  8454. break
  8455. }
  8456. bitsMask = libc.Uint8FromInt32(libc.Int32FromUint8(bitsMask) >> int32(1))
  8457. if !(bitsMask != 0) {
  8458. v3 = src
  8459. src++
  8460. bits = *(*uint8)(unsafe.Pointer(v3))
  8461. bitsMask = uint8(0x80)
  8462. }
  8463. }
  8464. 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))
  8465. xspan += lenspan
  8466. w -= lenspan
  8467. } else {
  8468. for cond := true; cond; cond = !(libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0) {
  8469. w--
  8470. xspan++
  8471. if !(w != 0) {
  8472. break
  8473. }
  8474. bitsMask = libc.Uint8FromInt32(libc.Int32FromUint8(bitsMask) >> int32(1))
  8475. if !(bitsMask != 0) {
  8476. v4 = src
  8477. src++
  8478. bits = *(*uint8)(unsafe.Pointer(v4))
  8479. bitsMask = uint8(0x80)
  8480. }
  8481. }
  8482. }
  8483. }
  8484. y++
  8485. }
  8486. }
  8487. // C documentation
  8488. //
  8489. // /*
  8490. // * Draw solid color text from an anti-aliased bitmap. This is a
  8491. // * fallback for cases where a particular drawable has no AA code
  8492. // */
  8493. func __XftSharpGlyphGray(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8494. var bits uint8
  8495. var height, lenspan, stride, w, width, xspan, v1 int32
  8496. var src, srcLine, v2, v3, v4 uintptr
  8497. _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8498. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8499. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8500. stride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8501. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8502. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8503. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8504. for {
  8505. v1 = height
  8506. height--
  8507. if !(v1 != 0) {
  8508. break
  8509. }
  8510. src = srcLine
  8511. srcLine += uintptr(stride)
  8512. w = width
  8513. v2 = src
  8514. src++
  8515. bits = *(*uint8)(unsafe.Pointer(v2))
  8516. xspan = x
  8517. for w != 0 {
  8518. if libc.Int32FromUint8(bits) >= int32(0x80) {
  8519. lenspan = 0
  8520. for cond := true; cond; cond = libc.Int32FromUint8(bits) >= int32(0x80) {
  8521. lenspan++
  8522. if lenspan == w {
  8523. break
  8524. }
  8525. v3 = src
  8526. src++
  8527. bits = *(*uint8)(unsafe.Pointer(v3))
  8528. }
  8529. 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))
  8530. xspan += lenspan
  8531. w -= lenspan
  8532. } else {
  8533. for cond := true; cond; cond = libc.Int32FromUint8(bits) < int32(0x80) {
  8534. w--
  8535. xspan++
  8536. if !(w != 0) {
  8537. break
  8538. }
  8539. v4 = src
  8540. src++
  8541. bits = *(*uint8)(unsafe.Pointer(v4))
  8542. }
  8543. }
  8544. }
  8545. y++
  8546. }
  8547. }
  8548. func __XftSharpGlyphRgba(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8549. var bits TCARD32
  8550. var height, lenspan, stride, w, width, xspan, v1 int32
  8551. var src, srcLine, v2, v3, v4 uintptr
  8552. _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8553. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8554. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8555. stride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8556. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8557. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8558. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8559. for {
  8560. v1 = height
  8561. height--
  8562. if !(v1 != 0) {
  8563. break
  8564. }
  8565. src = srcLine
  8566. srcLine += uintptr(stride) * 4
  8567. w = width
  8568. v2 = src
  8569. src += 4
  8570. bits = *(*TCARD32)(unsafe.Pointer(v2))
  8571. xspan = x
  8572. for w != 0 {
  8573. if bits >= uint32(0x80000000) {
  8574. lenspan = 0
  8575. for cond := true; cond; cond = bits >= uint32(0x80000000) {
  8576. lenspan++
  8577. if lenspan == w {
  8578. break
  8579. }
  8580. v3 = src
  8581. src += 4
  8582. bits = *(*TCARD32)(unsafe.Pointer(v3))
  8583. }
  8584. 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))
  8585. xspan += lenspan
  8586. w -= lenspan
  8587. } else {
  8588. for cond := true; cond; cond = bits < uint32(0x80000000) {
  8589. w--
  8590. xspan++
  8591. if !(w != 0) {
  8592. break
  8593. }
  8594. v4 = src
  8595. src += 4
  8596. bits = *(*TCARD32)(unsafe.Pointer(v4))
  8597. }
  8598. }
  8599. }
  8600. y++
  8601. }
  8602. }
  8603. type TXftSharpGlyph = uintptr
  8604. func __XftSharpGlyphFind(tls *libc.TLS, draw uintptr, public uintptr) (r TXftSharpGlyph) {
  8605. var font uintptr
  8606. _ = font
  8607. font = public
  8608. if !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0) {
  8609. return __ccgo_fp(__XftSharpGlyphMono)
  8610. } else {
  8611. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  8612. case int32(m_FC_RGBA_RGB):
  8613. fallthrough
  8614. case int32(m_FC_RGBA_BGR):
  8615. fallthrough
  8616. case int32(m_FC_RGBA_VRGB):
  8617. fallthrough
  8618. case int32(m_FC_RGBA_VBGR):
  8619. return __ccgo_fp(__XftSharpGlyphRgba)
  8620. default:
  8621. return __ccgo_fp(__XftSharpGlyphGray)
  8622. }
  8623. }
  8624. return r
  8625. }
  8626. /*
  8627. * Draw glyphs to a target that supports anti-aliasing
  8628. */
  8629. /*
  8630. * Primitives for converting between RGB values and TrueColor pixels
  8631. */
  8632. func __XftExamineBitfield(tls *libc.TLS, mask uint64, shift uintptr, len1 uintptr) {
  8633. var l, s int32
  8634. _, _ = l, s
  8635. s = 0
  8636. for mask&uint64(1) == uint64(0) {
  8637. mask >>= uint64(1)
  8638. s++
  8639. }
  8640. l = 0
  8641. for mask&uint64(1) == uint64(1) {
  8642. mask >>= uint64(1)
  8643. l++
  8644. }
  8645. *(*int32)(unsafe.Pointer(shift)) = s
  8646. *(*int32)(unsafe.Pointer(len1)) = l
  8647. }
  8648. func __XftGetField(tls *libc.TLS, l_pixel uint64, shift int32, len1 int32) (r TCARD32) {
  8649. var pixel TCARD32
  8650. _ = pixel
  8651. pixel = uint32(l_pixel)
  8652. pixel = pixel & libc.Uint32FromInt32((libc.Int32FromInt32(1)<<len1-libc.Int32FromInt32(1))<<shift)
  8653. pixel = pixel << (int32(32) - (shift + len1)) >> int32(24)
  8654. for len1 < int32(8) {
  8655. pixel |= pixel >> len1
  8656. len1 <<= int32(1)
  8657. }
  8658. return pixel
  8659. }
  8660. func __XftPutField(tls *libc.TLS, pixel TCARD32, shift int32, len1 int32) (r uint64) {
  8661. var l_pixel uint64
  8662. _ = l_pixel
  8663. l_pixel = uint64(pixel)
  8664. shift = shift - (int32(8) - len1)
  8665. if len1 <= int32(8) {
  8666. l_pixel = l_pixel & libc.Uint64FromInt32((libc.Int32FromInt32(1)<<len1-libc.Int32FromInt32(1))<<(libc.Int32FromInt32(8)-len1))
  8667. }
  8668. if shift < 0 {
  8669. l_pixel >>= libc.Uint64FromInt32(-shift)
  8670. } else {
  8671. l_pixel <<= libc.Uint64FromInt32(shift)
  8672. }
  8673. return l_pixel
  8674. }
  8675. // C documentation
  8676. //
  8677. // /*
  8678. // * This is used when doing XftCharFontSpec/XftGlyphFontSpec where
  8679. // * some of the fonts are bitmaps and some are anti-aliased to handle
  8680. // * the bitmap portions
  8681. // */
  8682. func __XftSmoothGlyphMono(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8683. bp := tls.Alloc(32)
  8684. defer tls.Free(32)
  8685. var bits, bitsMask uint8
  8686. var height, stride, w, width, xspan, v1, v3 int32
  8687. var pixel uint64
  8688. var src, srcLine, v2, v4 uintptr
  8689. var _ /* b_len at bp+20 */ int32
  8690. var _ /* b_shift at bp+16 */ int32
  8691. var _ /* g_len at bp+12 */ int32
  8692. var _ /* g_shift at bp+8 */ int32
  8693. var _ /* r_len at bp+4 */ int32
  8694. var _ /* r_shift at bp+0 */ int32
  8695. _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, bitsMask, height, pixel, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8696. srcLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8697. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8698. stride = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  8699. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8700. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  8701. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  8702. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  8703. 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)))
  8704. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8705. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8706. for {
  8707. v1 = height
  8708. height--
  8709. if !(v1 != 0) {
  8710. break
  8711. }
  8712. src = srcLine
  8713. srcLine += uintptr(stride)
  8714. w = width
  8715. bitsMask = uint8(0x80) /* FreeType is always MSB first */
  8716. v2 = src
  8717. src++
  8718. bits = *(*uint8)(unsafe.Pointer(v2))
  8719. xspan = x
  8720. for {
  8721. v3 = w
  8722. w--
  8723. if !(v3 != 0) {
  8724. break
  8725. }
  8726. if libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0 {
  8727. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, xspan, y, pixel)
  8728. }
  8729. bitsMask = libc.Uint8FromInt32(libc.Int32FromUint8(bitsMask) >> int32(1))
  8730. if !(bitsMask != 0) {
  8731. v4 = src
  8732. src++
  8733. bits = *(*uint8)(unsafe.Pointer(v4))
  8734. bitsMask = uint8(0x80)
  8735. }
  8736. xspan++
  8737. }
  8738. y++
  8739. }
  8740. }
  8741. /*
  8742. * As simple anti-aliasing is likely to be common, there are three
  8743. * optimized versions for the usual true color pixel formats (888, 565, 555).
  8744. * Other formats are handled by the general case
  8745. */
  8746. /*
  8747. * There are two ways of handling alpha -- either as a single unified value or
  8748. * a separate value for each component, hence each macro must have two
  8749. * versions. The unified alpha version has a 'U' at the end of the name,
  8750. * the component version has a 'C'. Similarly, functions which deal with
  8751. * this difference will have two versions using the same convention.
  8752. */
  8753. func _fbOver24(tls *libc.TLS, x TCARD32, y TCARD32) (r TCARD32) {
  8754. var a, t TCARD16
  8755. var m, n, o TCARD32
  8756. _, _, _, _, _ = a, m, n, o, t
  8757. a = uint16(^x >> libc.Int32FromInt32(24))
  8758. t = uint16(0)
  8759. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(y>>libc.Int32FromInt32(0))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8760. 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)))))
  8761. m = uint32(libc.Uint8FromInt32(libc.Int32FromUint16(t)|(libc.Int32FromInt32(0)-libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(0)
  8762. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(y>>libc.Int32FromInt32(8))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8763. 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)))))
  8764. n = uint32(libc.Uint8FromInt32(libc.Int32FromUint16(t)|(libc.Int32FromInt32(0)-libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(8)
  8765. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(y>>libc.Int32FromInt32(16))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8766. 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)))))
  8767. o = uint32(libc.Uint8FromInt32(libc.Int32FromUint16(t)|(libc.Int32FromInt32(0)-libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(16)
  8768. return m | n | o
  8769. }
  8770. func _fbIn(tls *libc.TLS, x TCARD32, y TCARD8) (r TCARD32) {
  8771. var a, t TCARD16
  8772. var m, n, o, p TCARD32
  8773. _, _, _, _, _, _ = a, m, n, o, p, t
  8774. a = uint16(y)
  8775. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(0))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8776. m = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << 0
  8777. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(8))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8778. n = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << int32(8)
  8779. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(16))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8780. o = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << int32(16)
  8781. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(24))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8782. p = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << int32(24)
  8783. return m | n | o | p
  8784. }
  8785. func __XftSmoothGlyphGray8888(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8786. var b, d, g, r, src, srca TCARD32
  8787. var dst, dstLine, mask, maskLine, v3 uintptr
  8788. var dstStride, height, maskStride, w, width, v1, v2 int32
  8789. var m TCARD8
  8790. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8791. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8792. /* This handles only RGB and BGR */
  8793. g = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8794. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint64(0xff0000) {
  8795. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8796. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8797. } else {
  8798. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  8799. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  8800. }
  8801. src = srca<<libc.Int32FromInt32(24) | r | g | b
  8802. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8803. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8804. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8805. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8806. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(2))
  8807. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(2)
  8808. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8809. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8810. for {
  8811. v1 = height
  8812. height--
  8813. if !(v1 != 0) {
  8814. break
  8815. }
  8816. dst = dstLine
  8817. dstLine += uintptr(dstStride) * 4
  8818. mask = maskLine
  8819. maskLine += uintptr(maskStride)
  8820. w = width
  8821. for {
  8822. v2 = w
  8823. w--
  8824. if !(v2 != 0) {
  8825. break
  8826. }
  8827. v3 = mask
  8828. mask++
  8829. m = *(*TCARD8)(unsafe.Pointer(v3))
  8830. if libc.Int32FromUint8(m) == int32(0xff) {
  8831. if srca == uint32(0xff) {
  8832. *(*TCARD32)(unsafe.Pointer(dst)) = src
  8833. } else {
  8834. *(*TCARD32)(unsafe.Pointer(dst)) = _fbOver24(tls, src, *(*TCARD32)(unsafe.Pointer(dst)))
  8835. }
  8836. } else {
  8837. if m != 0 {
  8838. d = _fbIn(tls, src, m)
  8839. *(*TCARD32)(unsafe.Pointer(dst)) = _fbOver24(tls, d, *(*TCARD32)(unsafe.Pointer(dst)))
  8840. }
  8841. }
  8842. dst += 4
  8843. }
  8844. }
  8845. }
  8846. func __XftSmoothGlyphGray565(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8847. var b, d, g, r, src, srca TCARD32
  8848. var dst, dstLine, mask, maskLine, v3 uintptr
  8849. var dstStride, height, maskStride, w, width, v1, v2 int32
  8850. var m TCARD8
  8851. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8852. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8853. /* This handles only RGB and BGR */
  8854. g = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8855. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint64(0xf800) {
  8856. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8857. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8858. } else {
  8859. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  8860. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  8861. }
  8862. src = srca<<libc.Int32FromInt32(24) | r | g | b
  8863. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8864. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8865. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8866. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8867. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(1))
  8868. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(1)
  8869. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8870. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8871. for {
  8872. v1 = height
  8873. height--
  8874. if !(v1 != 0) {
  8875. break
  8876. }
  8877. dst = dstLine
  8878. dstLine += uintptr(dstStride) * 2
  8879. mask = maskLine
  8880. maskLine += uintptr(maskStride)
  8881. w = width
  8882. for {
  8883. v2 = w
  8884. w--
  8885. if !(v2 != 0) {
  8886. break
  8887. }
  8888. v3 = mask
  8889. mask++
  8890. m = *(*TCARD8)(unsafe.Pointer(v3))
  8891. if libc.Int32FromUint8(m) == int32(0xff) {
  8892. if srca == uint32(0xff) {
  8893. d = src
  8894. } else {
  8895. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8896. 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)))
  8897. }
  8898. *(*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))
  8899. } else {
  8900. if m != 0 {
  8901. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8902. 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)))
  8903. *(*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))
  8904. }
  8905. }
  8906. dst += 2
  8907. }
  8908. }
  8909. }
  8910. func __XftSmoothGlyphGray555(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8911. var b, d, g, r, src, srca TCARD32
  8912. var dst, dstLine, mask, maskLine, v3 uintptr
  8913. var dstStride, height, maskStride, w, width, v1, v2 int32
  8914. var m TCARD8
  8915. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8916. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8917. /* This handles only RGB and BGR */
  8918. g = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8919. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint64(0xf800) {
  8920. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8921. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8922. } else {
  8923. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  8924. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  8925. }
  8926. src = srca<<libc.Int32FromInt32(24) | r | g | b
  8927. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8928. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8929. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8930. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8931. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(1))
  8932. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(1)
  8933. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8934. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8935. for {
  8936. v1 = height
  8937. height--
  8938. if !(v1 != 0) {
  8939. break
  8940. }
  8941. dst = dstLine
  8942. dstLine += uintptr(dstStride) * 2
  8943. mask = maskLine
  8944. maskLine += uintptr(maskStride)
  8945. w = width
  8946. for {
  8947. v2 = w
  8948. w--
  8949. if !(v2 != 0) {
  8950. break
  8951. }
  8952. v3 = mask
  8953. mask++
  8954. m = *(*TCARD8)(unsafe.Pointer(v3))
  8955. if libc.Int32FromUint8(m) == int32(0xff) {
  8956. if srca == uint32(0xff) {
  8957. d = src
  8958. } else {
  8959. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8960. 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)))
  8961. }
  8962. *(*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))
  8963. } else {
  8964. if m != 0 {
  8965. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8966. 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)))
  8967. *(*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))
  8968. }
  8969. }
  8970. dst += 2
  8971. }
  8972. }
  8973. }
  8974. func __XftSmoothGlyphGray(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8975. bp := tls.Alloc(32)
  8976. defer tls.Free(32)
  8977. var d, src, srca TCARD32
  8978. var height, maskStride, tx, w, width, v1, v2 int32
  8979. var m TCARD8
  8980. var mask, maskLine, v3 uintptr
  8981. var pixel uint64
  8982. var _ /* b_len at bp+20 */ int32
  8983. var _ /* b_shift at bp+16 */ int32
  8984. var _ /* g_len at bp+12 */ int32
  8985. var _ /* g_shift at bp+8 */ int32
  8986. var _ /* r_len at bp+4 */ int32
  8987. var _ /* r_shift at bp+0 */ int32
  8988. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, height, m, mask, maskLine, maskStride, pixel, src, srca, tx, w, width, v1, v2, v3
  8989. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8990. 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))
  8991. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8992. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8993. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8994. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8995. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8996. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8997. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  8998. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  8999. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  9000. for {
  9001. v1 = height
  9002. height--
  9003. if !(v1 != 0) {
  9004. break
  9005. }
  9006. mask = maskLine
  9007. maskLine += uintptr(maskStride)
  9008. w = width
  9009. tx = x
  9010. for {
  9011. v2 = w
  9012. w--
  9013. if !(v2 != 0) {
  9014. break
  9015. }
  9016. v3 = mask
  9017. mask++
  9018. m = *(*TCARD8)(unsafe.Pointer(v3))
  9019. if libc.Int32FromUint8(m) == int32(0xff) {
  9020. if srca == uint32(0xff) {
  9021. d = src
  9022. } else {
  9023. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  9024. 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)))
  9025. d = _fbOver24(tls, src, d)
  9026. }
  9027. 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)))
  9028. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  9029. } else {
  9030. if m != 0 {
  9031. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  9032. 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)))
  9033. d = _fbOver24(tls, _fbIn(tls, src, m), d)
  9034. 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)))
  9035. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  9036. }
  9037. }
  9038. tx++
  9039. }
  9040. y++
  9041. }
  9042. }
  9043. func __XftSmoothGlyphRgba(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  9044. bp := tls.Alloc(32)
  9045. defer tls.Free(32)
  9046. var __a, __a1, __a2 TCARD16
  9047. var __i, __i1, __i2, __t, __t1, __t2, __ta, __ta1, __ta2, d, m, ma, n, o, src, srca TCARD32
  9048. var height, tx, w, width, v1, v2 int32
  9049. var mask, v3 uintptr
  9050. var pixel uint64
  9051. var _ /* b_len at bp+20 */ int32
  9052. var _ /* b_shift at bp+16 */ int32
  9053. var _ /* g_len at bp+12 */ int32
  9054. var _ /* g_shift at bp+8 */ int32
  9055. var _ /* r_len at bp+4 */ int32
  9056. var _ /* r_shift at bp+0 */ int32
  9057. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = __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
  9058. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  9059. 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))
  9060. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  9061. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  9062. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  9063. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  9064. mask = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  9065. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  9066. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  9067. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  9068. for {
  9069. v1 = height
  9070. height--
  9071. if !(v1 != 0) {
  9072. break
  9073. }
  9074. w = width
  9075. tx = x
  9076. for {
  9077. v2 = w
  9078. w--
  9079. if !(v2 != 0) {
  9080. break
  9081. }
  9082. v3 = mask
  9083. mask += 4
  9084. ma = *(*TCARD32)(unsafe.Pointer(v3))
  9085. if ma == uint32(0xffffffff) {
  9086. if srca == uint32(0xff) {
  9087. d = src
  9088. } else {
  9089. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  9090. 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)))
  9091. d = _fbOver24(tls, src, d)
  9092. }
  9093. 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)))
  9094. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  9095. } else {
  9096. if ma != 0 {
  9097. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint64)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  9098. 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)))
  9099. __a = uint16(uint8(ma >> libc.Int32FromInt32(0)))
  9100. __i = libc.Uint32FromInt32(libc.Int32FromUint16(uint16(uint8(src>>libc.Int32FromInt32(0))))*libc.Int32FromUint16(__a) + libc.Int32FromInt32(0x80))
  9101. __t = (__i>>libc.Int32FromInt32(8) + __i) >> libc.Int32FromInt32(8)
  9102. __i = srca*uint32(__a) + libc.Uint32FromInt32(0x80)
  9103. __ta = uint32(uint8(^((__i>>libc.Int32FromInt32(8) + __i) >> libc.Int32FromInt32(8))))
  9104. __i = uint32(uint16(uint8(d>>libc.Int32FromInt32(0))))*__ta + libc.Uint32FromInt32(0x80)
  9105. __t = __t + (__i>>libc.Int32FromInt32(8)+__i)>>libc.Int32FromInt32(8)
  9106. __t = uint32(uint8(__t | -(__t >> libc.Int32FromInt32(8))))
  9107. m = __t << 0
  9108. __a1 = uint16(uint8(ma >> libc.Int32FromInt32(8)))
  9109. __i1 = libc.Uint32FromInt32(libc.Int32FromUint16(uint16(uint8(src>>libc.Int32FromInt32(8))))*libc.Int32FromUint16(__a1) + libc.Int32FromInt32(0x80))
  9110. __t1 = (__i1>>libc.Int32FromInt32(8) + __i1) >> libc.Int32FromInt32(8)
  9111. __i1 = srca*uint32(__a1) + libc.Uint32FromInt32(0x80)
  9112. __ta1 = uint32(uint8(^((__i1>>libc.Int32FromInt32(8) + __i1) >> libc.Int32FromInt32(8))))
  9113. __i1 = uint32(uint16(uint8(d>>libc.Int32FromInt32(8))))*__ta1 + libc.Uint32FromInt32(0x80)
  9114. __t1 = __t1 + (__i1>>libc.Int32FromInt32(8)+__i1)>>libc.Int32FromInt32(8)
  9115. __t1 = uint32(uint8(__t1 | -(__t1 >> libc.Int32FromInt32(8))))
  9116. n = __t1 << int32(8)
  9117. __a2 = uint16(uint8(ma >> libc.Int32FromInt32(16)))
  9118. __i2 = libc.Uint32FromInt32(libc.Int32FromUint16(uint16(uint8(src>>libc.Int32FromInt32(16))))*libc.Int32FromUint16(__a2) + libc.Int32FromInt32(0x80))
  9119. __t2 = (__i2>>libc.Int32FromInt32(8) + __i2) >> libc.Int32FromInt32(8)
  9120. __i2 = srca*uint32(__a2) + libc.Uint32FromInt32(0x80)
  9121. __ta2 = uint32(uint8(^((__i2>>libc.Int32FromInt32(8) + __i2) >> libc.Int32FromInt32(8))))
  9122. __i2 = uint32(uint16(uint8(d>>libc.Int32FromInt32(16))))*__ta2 + libc.Uint32FromInt32(0x80)
  9123. __t2 = __t2 + (__i2>>libc.Int32FromInt32(8)+__i2)>>libc.Int32FromInt32(8)
  9124. __t2 = uint32(uint8(__t2 | -(__t2 >> libc.Int32FromInt32(8))))
  9125. o = __t2 << int32(16)
  9126. d = m | n | o
  9127. 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)))
  9128. (*(*func(*libc.TLS, uintptr, int32, int32, uint64) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  9129. }
  9130. }
  9131. tx++
  9132. }
  9133. y++
  9134. }
  9135. }
  9136. func __XftSmoothGlyphPossible(tls *libc.TLS, draw uintptr) (r TFcBool) {
  9137. if !((*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0) {
  9138. return m_FcFalse
  9139. }
  9140. if (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fclass != int32(m_TrueColor) {
  9141. return m_FcFalse
  9142. }
  9143. return int32(m_FcTrue)
  9144. }
  9145. type TXftSmoothGlyph = uintptr
  9146. func __XftSmoothGlyphFind(tls *libc.TLS, draw uintptr, public uintptr) (r TXftSmoothGlyph) {
  9147. var font uintptr
  9148. _ = font
  9149. font = public
  9150. if !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0) {
  9151. return __ccgo_fp(__XftSmoothGlyphMono)
  9152. } else {
  9153. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  9154. case int32(m_FC_RGBA_RGB):
  9155. fallthrough
  9156. case int32(m_FC_RGBA_BGR):
  9157. fallthrough
  9158. case int32(m_FC_RGBA_VRGB):
  9159. fallthrough
  9160. case int32(m_FC_RGBA_VBGR):
  9161. return __ccgo_fp(__XftSmoothGlyphRgba)
  9162. default:
  9163. switch XXftDrawBitsPerPixel(tls, draw) {
  9164. case uint32(32):
  9165. 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) {
  9166. return __ccgo_fp(__XftSmoothGlyphGray8888)
  9167. }
  9168. case uint32(16):
  9169. 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) {
  9170. return __ccgo_fp(__XftSmoothGlyphGray565)
  9171. }
  9172. 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) {
  9173. return __ccgo_fp(__XftSmoothGlyphGray555)
  9174. }
  9175. default:
  9176. break
  9177. }
  9178. return __ccgo_fp(__XftSmoothGlyphGray)
  9179. }
  9180. }
  9181. return r
  9182. }
  9183. func __XftGlyphDefault(tls *libc.TLS, dpy uintptr, public uintptr) (r uintptr) {
  9184. bp := tls.Alloc(1040)
  9185. defer tls.Free(1040)
  9186. var font uintptr
  9187. var glyphs_loaded TFcBool
  9188. var _ /* missing at bp+0 */ [256]TFT_UInt
  9189. var _ /* nmissing at bp+1024 */ int32
  9190. _, _ = font, glyphs_loaded
  9191. font = public
  9192. glyphs_loaded = m_FcFalse
  9193. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), uint32(0), bp, bp+1024) != 0 {
  9194. glyphs_loaded = int32(m_FcTrue)
  9195. }
  9196. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9197. XXftFontLoadGlyphs(tls, dpy, public, glyphs_loaded, bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9198. }
  9199. return *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs))
  9200. }
  9201. func _XftGetImageErrorHandler(tls *libc.TLS, dpy uintptr, error_event uintptr) (r int32) {
  9202. return 0
  9203. }
  9204. func XXftGlyphCore(tls *libc.TLS, draw uintptr, color uintptr, public uintptr, x int32, y int32, glyphs uintptr, nglyphs int32) {
  9205. bp := tls.Alloc(1168)
  9206. defer tls.Free(1168)
  9207. var depth, v3 uint32
  9208. var dpy, font, g, image, xftg, v10, v11, v2, v6, v7 uintptr
  9209. var gc TGC
  9210. var glyph TFT_UInt
  9211. var glyphs_loaded TFcBool
  9212. var n, ox, oy, v1, v5, v9 int32
  9213. var pix TPixmap
  9214. var prev_error TXErrorHandler
  9215. var sharp TXftSharpGlyph
  9216. var smooth TXftSmoothGlyph
  9217. var v12, v4, v8 bool
  9218. var _ /* gcv at bp+1040 */ TXGCValues
  9219. var _ /* gi at bp+1028 */ TXGlyphInfo
  9220. var _ /* missing at bp+0 */ [256]TFT_UInt
  9221. var _ /* nmissing at bp+1024 */ int32
  9222. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  9223. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  9224. font = public
  9225. /*
  9226. * Load missing glyphs
  9227. */
  9228. g = glyphs
  9229. n = nglyphs
  9230. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  9231. glyphs_loaded = m_FcFalse
  9232. for {
  9233. v1 = n
  9234. n--
  9235. if !(v1 != 0) {
  9236. break
  9237. }
  9238. v2 = g
  9239. g += 4
  9240. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), *(*TFT_UInt)(unsafe.Pointer(v2)), bp, bp+1024) != 0 {
  9241. glyphs_loaded = int32(m_FcTrue)
  9242. }
  9243. }
  9244. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9245. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9246. }
  9247. g = glyphs
  9248. n = nglyphs
  9249. if ((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 || libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9250. smooth = __XftSmoothGlyphFind(tls, draw, public)
  9251. XXftGlyphExtents(tls, dpy, public, glyphs, nglyphs, bp+1028)
  9252. if !((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth != 0) || !((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight != 0) {
  9253. goto bail1
  9254. }
  9255. ox = x - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9256. oy = y - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9257. /*
  9258. * Try to get bits directly from the drawable; if that fails,
  9259. * use a temporary pixmap. When it does fail, assume it
  9260. * will probably fail for a while and keep using temporary
  9261. * pixmaps for a while to avoid double round trips.
  9262. */
  9263. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9264. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9265. 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))
  9266. libx11.XXSetErrorHandler(tls, prev_error)
  9267. if !(image != 0) {
  9268. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9269. }
  9270. } else {
  9271. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9272. image = libc.UintptrFromInt32(0)
  9273. }
  9274. if v4 = !(image != 0); v4 {
  9275. v3 = XXftDrawDepth(tls, draw)
  9276. depth = v3
  9277. }
  9278. if v4 && v3 != 0 {
  9279. 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)
  9280. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9281. gc = libx11.XXCreateGC(tls, dpy, pix, libc.Uint64FromInt64(libc.Int64FromInt64(1)<<libc.Int32FromInt32(16)), bp+1040)
  9282. 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)
  9283. libx11.XXFreeGC(tls, dpy, gc)
  9284. 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))
  9285. libx11.XXFreePixmap(tls, dpy, pix)
  9286. }
  9287. if !(image != 0) {
  9288. goto bail1
  9289. }
  9290. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9291. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9292. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9293. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9294. XXftSwapImage(tls, image)
  9295. }
  9296. for {
  9297. v5 = n
  9298. n--
  9299. if !(v5 != 0) {
  9300. break
  9301. }
  9302. v6 = g
  9303. g += 4
  9304. glyph = *(*TFT_UInt)(unsafe.Pointer(v6))
  9305. if v8 = glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v8 {
  9306. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9307. xftg = v7
  9308. }
  9309. if v8 || !(v7 != 0) {
  9310. xftg = __XftGlyphDefault(tls, dpy, public)
  9311. }
  9312. if xftg != 0 {
  9313. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr))(unsafe.Pointer(&struct{ uintptr }{smooth})))(tls, image, xftg, x-ox, y-oy, color)
  9314. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  9315. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  9316. }
  9317. }
  9318. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9319. XXftSwapImage(tls, image)
  9320. }
  9321. 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))
  9322. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9323. } else {
  9324. sharp = __XftSharpGlyphFind(tls, draw, public)
  9325. for {
  9326. v9 = n
  9327. n--
  9328. if !(v9 != 0) {
  9329. break
  9330. }
  9331. v10 = g
  9332. g += 4
  9333. glyph = *(*TFT_UInt)(unsafe.Pointer(v10))
  9334. if v12 = glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v12 {
  9335. v11 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9336. xftg = v11
  9337. }
  9338. if v12 || !(v11 != 0) {
  9339. xftg = __XftGlyphDefault(tls, dpy, public)
  9340. }
  9341. if xftg != 0 {
  9342. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32))(unsafe.Pointer(&struct{ uintptr }{sharp})))(tls, draw, xftg, x, y)
  9343. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  9344. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  9345. }
  9346. }
  9347. }
  9348. goto bail1
  9349. bail1:
  9350. ;
  9351. if glyphs_loaded != 0 {
  9352. X_XftFontManageMemory(tls, dpy, public)
  9353. }
  9354. }
  9355. func XXftGlyphSpecCore(tls *libc.TLS, draw uintptr, color uintptr, public uintptr, glyphs uintptr, nglyphs int32) {
  9356. bp := tls.Alloc(1168)
  9357. defer tls.Free(1168)
  9358. var depth, v5 uint32
  9359. var dpy, font, image, xftg, v11, v8 uintptr
  9360. var g_x1, g_x2, g_y1, g_y2, height, i, width, x1, x2, y1, y2, v1, v2, v3 int32
  9361. var gc TGC
  9362. var glyph, glyph1 TFT_UInt
  9363. var glyphs_loaded TFcBool
  9364. var pix TPixmap
  9365. var prev_error TXErrorHandler
  9366. var sharp TXftSharpGlyph
  9367. var smooth TXftSmoothGlyph
  9368. var v12, v6, v9 bool
  9369. var _ /* gcv at bp+1040 */ TXGCValues
  9370. var _ /* gi at bp+1028 */ TXGlyphInfo
  9371. var _ /* missing at bp+0 */ [256]TFT_UInt
  9372. var _ /* nmissing at bp+1024 */ int32
  9373. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  9374. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  9375. font = public
  9376. /*
  9377. * Load missing glyphs
  9378. */
  9379. glyphs_loaded = m_FcFalse
  9380. v3 = libc.Int32FromInt32(0)
  9381. y2 = v3
  9382. v2 = v3
  9383. x2 = v2
  9384. v1 = v2
  9385. y1 = v1
  9386. x1 = v1
  9387. i = 0
  9388. for {
  9389. if !(i < nglyphs) {
  9390. break
  9391. }
  9392. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  9393. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph, bp, bp+1024) != 0 {
  9394. glyphs_loaded = int32(m_FcTrue)
  9395. }
  9396. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9397. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9398. }
  9399. XXftGlyphExtents(tls, dpy, public, glyphs+uintptr(i)*8, int32(1), bp+1028)
  9400. g_x1 = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9401. g_y1 = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9402. g_x2 = g_x1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth)
  9403. g_y2 = g_y1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight)
  9404. if i != 0 {
  9405. if g_x1 < x1 {
  9406. x1 = g_x1
  9407. }
  9408. if g_y1 < y1 {
  9409. y1 = g_y1
  9410. }
  9411. if g_x2 > x2 {
  9412. x2 = g_x2
  9413. }
  9414. if g_y2 > y2 {
  9415. y2 = g_y2
  9416. }
  9417. } else {
  9418. x1 = g_x1
  9419. y1 = g_y1
  9420. x2 = g_x2
  9421. y2 = g_y2
  9422. }
  9423. goto _4
  9424. _4:
  9425. ;
  9426. i++
  9427. }
  9428. if x1 == x2 || y1 == y2 {
  9429. goto bail1
  9430. }
  9431. if ((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 || libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9432. width = x2 - x1
  9433. height = y2 - y1
  9434. smooth = __XftSmoothGlyphFind(tls, draw, public)
  9435. /*
  9436. * Try to get bits directly from the drawable; if that fails,
  9437. * use a temporary pixmap. When it does fail, assume it
  9438. * will probably fail for a while and keep using temporary
  9439. * pixmaps for a while to avoid double round trips.
  9440. */
  9441. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9442. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9443. 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))
  9444. libx11.XXSetErrorHandler(tls, prev_error)
  9445. if !(image != 0) {
  9446. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9447. }
  9448. } else {
  9449. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9450. image = libc.UintptrFromInt32(0)
  9451. }
  9452. if v6 = !(image != 0); v6 {
  9453. v5 = XXftDrawDepth(tls, draw)
  9454. depth = v5
  9455. }
  9456. if v6 && v5 != 0 {
  9457. pix = libx11.XXCreatePixmap(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), depth)
  9458. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9459. gc = libx11.XXCreateGC(tls, dpy, pix, libc.Uint64FromInt64(libc.Int64FromInt64(1)<<libc.Int32FromInt32(16)), bp+1040)
  9460. libx11.XXCopyArea(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, pix, gc, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), 0, 0)
  9461. libx11.XXFreeGC(tls, dpy, gc)
  9462. image = libx11.XXGetImage(tls, dpy, pix, 0, 0, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), libc.Uint64FromInt64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9463. libx11.XXFreePixmap(tls, dpy, pix)
  9464. }
  9465. if !(image != 0) {
  9466. goto bail1
  9467. }
  9468. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9469. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9470. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9471. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9472. XXftSwapImage(tls, image)
  9473. }
  9474. i = 0
  9475. for {
  9476. if !(i < nglyphs) {
  9477. break
  9478. }
  9479. glyph = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  9480. if v9 = glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v9 {
  9481. v8 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9482. xftg = v8
  9483. }
  9484. if v9 || !(v8 != 0) {
  9485. xftg = __XftGlyphDefault(tls, dpy, public)
  9486. }
  9487. if xftg != 0 {
  9488. (*(*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)
  9489. }
  9490. goto _7
  9491. _7:
  9492. ;
  9493. i++
  9494. }
  9495. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9496. XXftSwapImage(tls, image)
  9497. }
  9498. 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))
  9499. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9500. } else {
  9501. sharp = __XftSharpGlyphFind(tls, draw, public)
  9502. i = 0
  9503. for {
  9504. if !(i < nglyphs) {
  9505. break
  9506. }
  9507. glyph1 = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  9508. if v12 = glyph1 >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v12 {
  9509. v11 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph1)*8))
  9510. xftg = v11
  9511. }
  9512. if v12 || !(v11 != 0) {
  9513. xftg = __XftGlyphDefault(tls, dpy, public)
  9514. }
  9515. if xftg != 0 {
  9516. (*(*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))
  9517. }
  9518. goto _10
  9519. _10:
  9520. ;
  9521. i++
  9522. }
  9523. }
  9524. goto bail1
  9525. bail1:
  9526. ;
  9527. if glyphs_loaded != 0 {
  9528. X_XftFontManageMemory(tls, dpy, public)
  9529. }
  9530. }
  9531. func XXftGlyphFontSpecCore(tls *libc.TLS, draw uintptr, color uintptr, glyphs uintptr, nglyphs int32) {
  9532. bp := tls.Alloc(1168)
  9533. defer tls.Free(1168)
  9534. var depth, v6 uint32
  9535. var dpy, font, font1, image, public, public1, public2, xftg, v12, v9 uintptr
  9536. var g_x1, g_x2, g_y1, g_y2, height, i, width, x1, x2, y1, y2, v1, v2, v3 int32
  9537. var gc TGC
  9538. var glyph, glyph1 TFT_UInt
  9539. var glyphs_loaded TFcBool
  9540. var pix TPixmap
  9541. var prev_error TXErrorHandler
  9542. var sharp TXftSharpGlyph
  9543. var smooth TXftSmoothGlyph
  9544. var t int16
  9545. var v10, v13, v7 bool
  9546. var _ /* gcv at bp+1040 */ TXGCValues
  9547. var _ /* gi at bp+1028 */ TXGlyphInfo
  9548. var _ /* missing at bp+0 */ [256]TFT_UInt
  9549. var _ /* nmissing at bp+1024 */ int32
  9550. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  9551. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  9552. /*
  9553. * Load missing glyphs
  9554. */
  9555. glyphs_loaded = m_FcFalse
  9556. v3 = libc.Int32FromInt32(0)
  9557. y2 = v3
  9558. v2 = v3
  9559. x2 = v2
  9560. v1 = v2
  9561. y1 = v1
  9562. x1 = v1
  9563. i = 0
  9564. for {
  9565. if !(i < nglyphs) {
  9566. break
  9567. }
  9568. public = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  9569. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  9570. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph, bp, bp+1024) != 0 {
  9571. glyphs_loaded = int32(m_FcTrue)
  9572. }
  9573. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9574. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9575. }
  9576. XXftGlyphExtents(tls, dpy, public, glyphs+uintptr(i)*16+8, int32(1), bp+1028)
  9577. g_x1 = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9578. g_y1 = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9579. g_x2 = g_x1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth)
  9580. g_y2 = g_y1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight)
  9581. if i != 0 {
  9582. if g_x1 < x1 {
  9583. if g_x1 < 0 {
  9584. /* do nothing if the given glyphs are out of range */
  9585. 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))
  9586. if int32(t) < 0 && int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i-int32(1))*16))).Fx) > 0 {
  9587. goto bail1
  9588. }
  9589. }
  9590. x1 = g_x1
  9591. }
  9592. if g_y1 < y1 {
  9593. y1 = g_y1
  9594. }
  9595. if g_x2 > x2 {
  9596. x2 = g_x2
  9597. }
  9598. if g_y2 > y2 {
  9599. y2 = g_y2
  9600. }
  9601. } else {
  9602. x1 = g_x1
  9603. y1 = g_y1
  9604. x2 = g_x2
  9605. y2 = g_y2
  9606. }
  9607. goto _4
  9608. _4:
  9609. ;
  9610. i++
  9611. }
  9612. if x1 == x2 || y1 == y2 {
  9613. goto bail1
  9614. }
  9615. i = 0
  9616. for {
  9617. if !(i < nglyphs) {
  9618. break
  9619. }
  9620. if (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Finfo.Fantialias != 0 {
  9621. break
  9622. }
  9623. goto _5
  9624. _5:
  9625. ;
  9626. i++
  9627. }
  9628. if (i != nglyphs || libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9629. width = x2 - x1
  9630. height = y2 - y1
  9631. /*
  9632. * Try to get bits directly from the drawable; if that fails,
  9633. * use a temporary pixmap. When it does fail, assume it
  9634. * will probably fail for a while and keep using temporary
  9635. * pixmaps for a while to avoid double round trips.
  9636. */
  9637. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9638. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9639. 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))
  9640. libx11.XXSetErrorHandler(tls, prev_error)
  9641. if !(image != 0) {
  9642. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9643. }
  9644. } else {
  9645. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9646. image = libc.UintptrFromInt32(0)
  9647. }
  9648. if v7 = !(image != 0); v7 {
  9649. v6 = XXftDrawDepth(tls, draw)
  9650. depth = v6
  9651. }
  9652. if v7 && v6 != 0 {
  9653. pix = libx11.XXCreatePixmap(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), depth)
  9654. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9655. gc = libx11.XXCreateGC(tls, dpy, pix, libc.Uint64FromInt64(libc.Int64FromInt64(1)<<libc.Int32FromInt32(16)), bp+1040)
  9656. libx11.XXCopyArea(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, pix, gc, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), 0, 0)
  9657. libx11.XXFreeGC(tls, dpy, gc)
  9658. image = libx11.XXGetImage(tls, dpy, pix, 0, 0, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), libc.Uint64FromInt64(^libc.Int64FromInt64(0)), int32(m_ZPixmap))
  9659. libx11.XXFreePixmap(tls, dpy, pix)
  9660. }
  9661. if !(image != 0) {
  9662. goto bail1
  9663. }
  9664. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9665. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9666. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9667. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9668. XXftSwapImage(tls, image)
  9669. }
  9670. i = 0
  9671. for {
  9672. if !(i < nglyphs) {
  9673. break
  9674. }
  9675. public1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  9676. font = public1
  9677. smooth = __XftSmoothGlyphFind(tls, draw, public1)
  9678. glyph = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  9679. if v10 = glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v10 {
  9680. v9 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  9681. xftg = v9
  9682. }
  9683. if v10 || !(v9 != 0) {
  9684. xftg = __XftGlyphDefault(tls, dpy, public1)
  9685. }
  9686. if xftg != 0 {
  9687. (*(*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)
  9688. }
  9689. goto _8
  9690. _8:
  9691. ;
  9692. i++
  9693. }
  9694. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9695. XXftSwapImage(tls, image)
  9696. }
  9697. 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))
  9698. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9699. } else {
  9700. i = 0
  9701. for {
  9702. if !(i < nglyphs) {
  9703. break
  9704. }
  9705. public2 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  9706. font1 = public2
  9707. sharp = __XftSharpGlyphFind(tls, draw, public2)
  9708. glyph1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  9709. if v13 = glyph1 >= (*TXftFontInt)(unsafe.Pointer(font1)).Fnum_glyphs; !v13 {
  9710. v12 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(glyph1)*8))
  9711. xftg = v12
  9712. }
  9713. if v13 || !(v12 != 0) {
  9714. xftg = __XftGlyphDefault(tls, dpy, public2)
  9715. }
  9716. if xftg != 0 {
  9717. (*(*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))
  9718. }
  9719. goto _11
  9720. _11:
  9721. ;
  9722. i++
  9723. }
  9724. }
  9725. goto bail1
  9726. bail1:
  9727. ;
  9728. if glyphs_loaded != 0 {
  9729. i = 0
  9730. for {
  9731. if !(i < nglyphs) {
  9732. break
  9733. }
  9734. X_XftFontManageMemory(tls, dpy, (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)
  9735. goto _14
  9736. _14:
  9737. ;
  9738. i++
  9739. }
  9740. }
  9741. }
  9742. /* xftxlfd.c */
  9743. func XXftDebug(tls *libc.TLS) (r int32) {
  9744. bp := tls.Alloc(16)
  9745. defer tls.Free(16)
  9746. var e uintptr
  9747. _ = e
  9748. if !(_initialized != 0) {
  9749. _initialized = int32(1)
  9750. e = libc.Xgetenv(tls, __ccgo_ts)
  9751. if e != 0 {
  9752. libc.Xprintf(tls, __ccgo_ts+10, libc.VaList(bp+8, e))
  9753. _debug = libc.Xatoi(tls, e)
  9754. if _debug <= 0 {
  9755. _debug = int32(1)
  9756. }
  9757. }
  9758. }
  9759. return _debug
  9760. }
  9761. var _initialized int32
  9762. var _debug int32
  9763. func __XftCloseDisplay(tls *libc.TLS, dpy uintptr, codes uintptr) (r int32) {
  9764. var info, prev, v2 uintptr
  9765. _, _, _ = info, prev, v2
  9766. info = X_XftDisplayInfoGet(tls, dpy, m_FcFalse)
  9767. if !(info != 0) {
  9768. return 0
  9769. }
  9770. /*
  9771. * Get rid of any dangling unreferenced fonts
  9772. */
  9773. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = 0
  9774. XXftFontManageMemory(tls, dpy)
  9775. /*
  9776. * Clean up the default values
  9777. */
  9778. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0 {
  9779. libfontconfig.XFcPatternDestroy(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults)
  9780. }
  9781. /*
  9782. * Unhook from the global list
  9783. */
  9784. prev = uintptr(unsafe.Pointer(&X_XftDisplayInfo))
  9785. for {
  9786. v2 = *(*uintptr)(unsafe.Pointer(prev))
  9787. info = v2
  9788. if !(v2 != 0) {
  9789. break
  9790. }
  9791. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay == dpy {
  9792. break
  9793. }
  9794. goto _1
  9795. _1:
  9796. ;
  9797. prev = *(*uintptr)(unsafe.Pointer(prev))
  9798. }
  9799. if info != libc.UintptrFromInt32(0) {
  9800. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext
  9801. }
  9802. libc.Xfree(tls, info)
  9803. return 0
  9804. }
  9805. func X_XftDisplayInfoGet(tls *libc.TLS, dpy uintptr, createIfNecessary TFcBool) (r uintptr) {
  9806. bp := tls.Alloc(96)
  9807. defer tls.Free(96)
  9808. var format, info, prev, visual, v2, v3, v5 uintptr
  9809. var i int32
  9810. var _ /* error_base at bp+44 */ int32
  9811. var _ /* event_base at bp+40 */ int32
  9812. var _ /* major at bp+48 */ int32
  9813. var _ /* minor at bp+52 */ int32
  9814. var _ /* pf at bp+0 */ TXRenderPictFormat
  9815. _, _, _, _, _, _, _, _ = format, i, info, prev, visual, v2, v3, v5
  9816. prev = uintptr(unsafe.Pointer(&X_XftDisplayInfo))
  9817. for {
  9818. v2 = *(*uintptr)(unsafe.Pointer(prev))
  9819. info = v2
  9820. if !(v2 != 0) {
  9821. break
  9822. }
  9823. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay == dpy {
  9824. /*
  9825. * MRU the list
  9826. */
  9827. if prev != uintptr(unsafe.Pointer(&X_XftDisplayInfo)) {
  9828. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext
  9829. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext = X_XftDisplayInfo
  9830. X_XftDisplayInfo = info
  9831. }
  9832. return info
  9833. }
  9834. goto _1
  9835. _1:
  9836. ;
  9837. prev = *(*uintptr)(unsafe.Pointer(prev))
  9838. }
  9839. if !(createIfNecessary != 0) {
  9840. return libc.UintptrFromInt32(0)
  9841. }
  9842. info = libc.Xmalloc(tls, uint64(1488))
  9843. if !(info != 0) {
  9844. goto bail0
  9845. }
  9846. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes = libx11.XXAddExtension(tls, dpy)
  9847. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes != 0) {
  9848. goto bail1
  9849. }
  9850. libx11.XXESetCloseDisplay(tls, dpy, (*TXExtCodes)(unsafe.Pointer((*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes)).Fextension, __ccgo_fp(__XftCloseDisplay))
  9851. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay = dpy
  9852. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = libc.UintptrFromInt32(0)
  9853. (*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat = libc.UintptrFromInt32(0)
  9854. (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender = libc.BoolInt32(libxrender.XXRenderQueryExtension(tls, dpy, bp+40, bp+44) != 0 && libxrender.XXRenderFindVisualFormat(tls, dpy, (*TScreen)(unsafe.Pointer((*struct {
  9855. Fext_data uintptr
  9856. Fprivate1 uintptr
  9857. Ffd int32
  9858. Fprivate2 int32
  9859. Fproto_major_version int32
  9860. Fproto_minor_version int32
  9861. Fvendor uintptr
  9862. Fprivate3 TXID
  9863. Fprivate4 TXID
  9864. Fprivate5 TXID
  9865. Fprivate6 int32
  9866. Fresource_alloc uintptr
  9867. Fbyte_order int32
  9868. Fbitmap_unit int32
  9869. Fbitmap_pad int32
  9870. Fbitmap_bit_order int32
  9871. Fnformats int32
  9872. Fpixmap_format uintptr
  9873. Fprivate8 int32
  9874. Frelease int32
  9875. Fprivate9 uintptr
  9876. Fprivate10 uintptr
  9877. Fqlen int32
  9878. Flast_request_read uint64
  9879. Frequest uint64
  9880. Fprivate11 TXPointer
  9881. Fprivate12 TXPointer
  9882. Fprivate13 TXPointer
  9883. Fprivate14 TXPointer
  9884. Fmax_request_size uint32
  9885. Fdb uintptr
  9886. Fprivate15 uintptr
  9887. Fdisplay_name uintptr
  9888. Fdefault_screen int32
  9889. Fnscreens int32
  9890. Fscreens uintptr
  9891. Fmotion_buffer uint64
  9892. Fprivate16 uint64
  9893. Fmin_keycode int32
  9894. Fmax_keycode int32
  9895. Fprivate17 TXPointer
  9896. Fprivate18 TXPointer
  9897. Fprivate19 int32
  9898. Fxdefaults uintptr
  9899. })(unsafe.Pointer(dpy)).Fscreens+uintptr((*struct {
  9900. Fext_data uintptr
  9901. Fprivate1 uintptr
  9902. Ffd int32
  9903. Fprivate2 int32
  9904. Fproto_major_version int32
  9905. Fproto_minor_version int32
  9906. Fvendor uintptr
  9907. Fprivate3 TXID
  9908. Fprivate4 TXID
  9909. Fprivate5 TXID
  9910. Fprivate6 int32
  9911. Fresource_alloc uintptr
  9912. Fbyte_order int32
  9913. Fbitmap_unit int32
  9914. Fbitmap_pad int32
  9915. Fbitmap_bit_order int32
  9916. Fnformats int32
  9917. Fpixmap_format uintptr
  9918. Fprivate8 int32
  9919. Frelease int32
  9920. Fprivate9 uintptr
  9921. Fprivate10 uintptr
  9922. Fqlen int32
  9923. Flast_request_read uint64
  9924. Frequest uint64
  9925. Fprivate11 TXPointer
  9926. Fprivate12 TXPointer
  9927. Fprivate13 TXPointer
  9928. Fprivate14 TXPointer
  9929. Fmax_request_size uint32
  9930. Fdb uintptr
  9931. Fprivate15 uintptr
  9932. Fdisplay_name uintptr
  9933. Fdefault_screen int32
  9934. Fnscreens int32
  9935. Fscreens uintptr
  9936. Fmotion_buffer uint64
  9937. Fprivate16 uint64
  9938. Fmin_keycode int32
  9939. Fmax_keycode int32
  9940. Fprivate17 TXPointer
  9941. Fprivate18 TXPointer
  9942. Fprivate19 int32
  9943. Fxdefaults uintptr
  9944. })(unsafe.Pointer(dpy)).Fdefault_screen)*128)).Froot_visual) != libc.UintptrFromInt32(0))
  9945. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs = int32(m_FcTrue)
  9946. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  9947. libxrender.XXRenderQueryVersion(tls, dpy, bp+48, bp+52)
  9948. if *(*int32)(unsafe.Pointer(bp + 48)) < 0 || *(*int32)(unsafe.Pointer(bp + 48)) == 0 && *(*int32)(unsafe.Pointer(bp + 52)) <= int32(2) {
  9949. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs = m_FcFalse
  9950. }
  9951. (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasSolid = m_FcFalse
  9952. if *(*int32)(unsafe.Pointer(bp + 48)) > 0 || *(*int32)(unsafe.Pointer(bp + 48)) == 0 && *(*int32)(unsafe.Pointer(bp + 52)) >= int32(10) {
  9953. (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasSolid = int32(m_FcTrue)
  9954. }
  9955. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Ftype1 = int32(m_PictTypeDirect)
  9956. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth = int32(32)
  9957. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FredMask = int16(0xff)
  9958. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FgreenMask = int16(0xff)
  9959. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FblueMask = int16(0xff)
  9960. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FalphaMask = int16(0xff)
  9961. (*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)
  9962. }
  9963. if XXftDebug(tls)&int32(m_XFT_DBG_RENDER) != 0 {
  9964. visual = (*TScreen)(unsafe.Pointer((*struct {
  9965. Fext_data uintptr
  9966. Fprivate1 uintptr
  9967. Ffd int32
  9968. Fprivate2 int32
  9969. Fproto_major_version int32
  9970. Fproto_minor_version int32
  9971. Fvendor uintptr
  9972. Fprivate3 TXID
  9973. Fprivate4 TXID
  9974. Fprivate5 TXID
  9975. Fprivate6 int32
  9976. Fresource_alloc uintptr
  9977. Fbyte_order int32
  9978. Fbitmap_unit int32
  9979. Fbitmap_pad int32
  9980. Fbitmap_bit_order int32
  9981. Fnformats int32
  9982. Fpixmap_format uintptr
  9983. Fprivate8 int32
  9984. Frelease int32
  9985. Fprivate9 uintptr
  9986. Fprivate10 uintptr
  9987. Fqlen int32
  9988. Flast_request_read uint64
  9989. Frequest uint64
  9990. Fprivate11 TXPointer
  9991. Fprivate12 TXPointer
  9992. Fprivate13 TXPointer
  9993. Fprivate14 TXPointer
  9994. Fmax_request_size uint32
  9995. Fdb uintptr
  9996. Fprivate15 uintptr
  9997. Fdisplay_name uintptr
  9998. Fdefault_screen int32
  9999. Fnscreens int32
  10000. Fscreens uintptr
  10001. Fmotion_buffer uint64
  10002. Fprivate16 uint64
  10003. Fmin_keycode int32
  10004. Fmax_keycode int32
  10005. Fprivate17 TXPointer
  10006. Fprivate18 TXPointer
  10007. Fprivate19 int32
  10008. Fxdefaults uintptr
  10009. })(unsafe.Pointer(dpy)).Fscreens + uintptr((*struct {
  10010. Fext_data uintptr
  10011. Fprivate1 uintptr
  10012. Ffd int32
  10013. Fprivate2 int32
  10014. Fproto_major_version int32
  10015. Fproto_minor_version int32
  10016. Fvendor uintptr
  10017. Fprivate3 TXID
  10018. Fprivate4 TXID
  10019. Fprivate5 TXID
  10020. Fprivate6 int32
  10021. Fresource_alloc uintptr
  10022. Fbyte_order int32
  10023. Fbitmap_unit int32
  10024. Fbitmap_pad int32
  10025. Fbitmap_bit_order int32
  10026. Fnformats int32
  10027. Fpixmap_format uintptr
  10028. Fprivate8 int32
  10029. Frelease int32
  10030. Fprivate9 uintptr
  10031. Fprivate10 uintptr
  10032. Fqlen int32
  10033. Flast_request_read uint64
  10034. Frequest uint64
  10035. Fprivate11 TXPointer
  10036. Fprivate12 TXPointer
  10037. Fprivate13 TXPointer
  10038. Fprivate14 TXPointer
  10039. Fmax_request_size uint32
  10040. Fdb uintptr
  10041. Fprivate15 uintptr
  10042. Fdisplay_name uintptr
  10043. Fdefault_screen int32
  10044. Fnscreens int32
  10045. Fscreens uintptr
  10046. Fmotion_buffer uint64
  10047. Fprivate16 uint64
  10048. Fmin_keycode int32
  10049. Fmax_keycode int32
  10050. Fprivate17 TXPointer
  10051. Fprivate18 TXPointer
  10052. Fprivate19 int32
  10053. Fxdefaults uintptr
  10054. })(unsafe.Pointer(dpy)).Fdefault_screen)*128)).Froot_visual
  10055. format = libxrender.XXRenderFindVisualFormat(tls, dpy, visual)
  10056. libc.Xprintf(tls, __ccgo_ts+24, libc.VaList(bp+64, libc.Int32FromUint64((*TVisual)(unsafe.Pointer(visual)).Fvisualid)))
  10057. if format != 0 {
  10058. if (*TXRenderPictFormat)(unsafe.Pointer(format)).Ftype1 == int32(m_PictTypeDirect) {
  10059. 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)))
  10060. } else {
  10061. libc.Xprintf(tls, __ccgo_ts+83, 0)
  10062. }
  10063. } else {
  10064. libc.Xprintf(tls, __ccgo_ts+99, 0)
  10065. }
  10066. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  10067. v3 = __ccgo_ts + 136
  10068. } else {
  10069. v3 = __ccgo_ts + 141
  10070. }
  10071. libc.Xprintf(tls, __ccgo_ts+147, libc.VaList(bp+64, v3))
  10072. }
  10073. i = 0
  10074. for {
  10075. if !(i < int32(m_XFT_NUM_SOLID_COLOR)) {
  10076. break
  10077. }
  10078. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fscreen = -int32(1)
  10079. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict = uint64(0)
  10080. goto _4
  10081. _4:
  10082. ;
  10083. i++
  10084. }
  10085. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts = libc.UintptrFromInt32(0)
  10086. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext = X_XftDisplayInfo
  10087. X_XftDisplayInfo = info
  10088. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory = uint64(0)
  10089. (*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)))
  10090. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10091. libc.Xprintf(tls, __ccgo_ts+216, libc.VaList(bp+64, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory))
  10092. }
  10093. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts = 0
  10094. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = XXftDefaultGetInteger(tls, dpy, __ccgo_ts+245, 0, int32(m_XFT_DPY_MAX_UNREF_FONTS))
  10095. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10096. libc.Xprintf(tls, __ccgo_ts+259, libc.VaList(bp+64, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts))
  10097. }
  10098. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage = m_FcFalse
  10099. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage = XXftDefaultGetBool(tls, dpy, __ccgo_ts+287, 0, m_FcFalse)
  10100. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10101. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage != 0 {
  10102. v5 = __ccgo_ts + 301
  10103. } else {
  10104. v5 = __ccgo_ts + 306
  10105. }
  10106. libc.Xprintf(tls, __ccgo_ts+312, libc.VaList(bp+64, v5))
  10107. }
  10108. libc.Xmemset(tls, info+472, int32('\000'), libc.Uint64FromInt64(8)*libc.Uint64FromInt32(m_XFT_NUM_FONT_HASH))
  10109. return info
  10110. goto bail1
  10111. bail1:
  10112. ;
  10113. libc.Xfree(tls, info)
  10114. goto bail0
  10115. bail0:
  10116. ;
  10117. if XXftDebug(tls)&int32(m_XFT_DBG_RENDER) != 0 {
  10118. libc.Xprintf(tls, __ccgo_ts+340, 0)
  10119. }
  10120. return libc.UintptrFromInt32(0)
  10121. }
  10122. /*
  10123. * Reduce memory usage in X server
  10124. */
  10125. func __XftDisplayValidateMemory(tls *libc.TLS, info uintptr) {
  10126. bp := tls.Alloc(32)
  10127. defer tls.Free(32)
  10128. var font, public uintptr
  10129. var glyph_memory uint64
  10130. _, _, _ = font, glyph_memory, public
  10131. glyph_memory = uint64(0)
  10132. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  10133. for {
  10134. if !(public != 0) {
  10135. break
  10136. }
  10137. font = public
  10138. glyph_memory += (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  10139. goto _1
  10140. _1:
  10141. ;
  10142. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  10143. }
  10144. if glyph_memory != (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory {
  10145. libc.Xprintf(tls, __ccgo_ts+393, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory, glyph_memory))
  10146. }
  10147. }
  10148. func X_XftDisplayManageMemory(tls *libc.TLS, dpy uintptr) {
  10149. bp := tls.Alloc(32)
  10150. defer tls.Free(32)
  10151. var font, info, public uintptr
  10152. var glyph_memory uint64
  10153. _, _, _, _ = font, glyph_memory, info, public
  10154. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  10155. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory != 0) {
  10156. return
  10157. }
  10158. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10159. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory {
  10160. libc.Xprintf(tls, __ccgo_ts+455, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory))
  10161. }
  10162. __XftDisplayValidateMemory(tls, info)
  10163. }
  10164. for (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory {
  10165. glyph_memory = libc.Uint64FromInt32(libc.Xrand(tls)) % (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory
  10166. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  10167. for public != 0 {
  10168. font = public
  10169. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > glyph_memory {
  10170. X_XftFontUncacheGlyph(tls, dpy, public)
  10171. break
  10172. }
  10173. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  10174. glyph_memory -= (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  10175. }
  10176. }
  10177. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10178. __XftDisplayValidateMemory(tls, info)
  10179. }
  10180. }
  10181. func XXftDefaultHasRender(tls *libc.TLS, dpy uintptr) (r int32) {
  10182. var info uintptr
  10183. _ = info
  10184. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10185. if !(info != 0) {
  10186. return m_False
  10187. }
  10188. return (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender
  10189. }
  10190. func XXftDefaultSet(tls *libc.TLS, dpy uintptr, defaults uintptr) (r int32) {
  10191. bp := tls.Alloc(16)
  10192. defer tls.Free(16)
  10193. var info, v1 uintptr
  10194. _, _ = info, v1
  10195. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10196. if !(info != 0) {
  10197. return m_False
  10198. }
  10199. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0 {
  10200. libfontconfig.XFcPatternDestroy(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults)
  10201. }
  10202. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = defaults
  10203. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory != 0) {
  10204. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory = libc.Uint64FromInt32(libc.Int32FromInt32(4) * libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024))
  10205. }
  10206. (*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)))
  10207. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10208. libc.Xprintf(tls, __ccgo_ts+493, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory))
  10209. }
  10210. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts != 0) {
  10211. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = int32(m_XFT_DPY_MAX_UNREF_FONTS)
  10212. }
  10213. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = XXftDefaultGetInteger(tls, dpy, __ccgo_ts+245, 0, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts)
  10214. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10215. libc.Xprintf(tls, __ccgo_ts+522, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts))
  10216. }
  10217. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage = XXftDefaultGetBool(tls, dpy, __ccgo_ts+287, 0, (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage)
  10218. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10219. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage != 0 {
  10220. v1 = __ccgo_ts + 301
  10221. } else {
  10222. v1 = __ccgo_ts + 306
  10223. }
  10224. libc.Xprintf(tls, __ccgo_ts+550, libc.VaList(bp+8, v1))
  10225. }
  10226. return int32(m_True)
  10227. }
  10228. func XXftDefaultParseBool(tls *libc.TLS, v uintptr) (r int32) {
  10229. var c0, c1 int8
  10230. _, _ = c0, c1
  10231. c0 = *(*int8)(unsafe.Pointer(v))
  10232. if libc.BoolInt32(libc.Uint32FromInt32(int32(c0))-uint32('A') < uint32(26)) != 0 {
  10233. c0 = int8(libc.Xtolower(tls, int32(c0)))
  10234. }
  10235. if int32(c0) == int32('t') || int32(c0) == int32('y') || int32(c0) == int32('1') {
  10236. return int32(1)
  10237. }
  10238. if int32(c0) == int32('f') || int32(c0) == int32('n') || int32(c0) == int32('0') {
  10239. return 0
  10240. }
  10241. if int32(c0) == int32('o') {
  10242. c1 = *(*int8)(unsafe.Pointer(v + 1))
  10243. if libc.BoolInt32(libc.Uint32FromInt32(int32(c1))-uint32('A') < uint32(26)) != 0 {
  10244. c1 = int8(libc.Xtolower(tls, int32(c1)))
  10245. }
  10246. if int32(c1) == int32('n') {
  10247. return int32(1)
  10248. }
  10249. if int32(c1) == int32('f') {
  10250. return 0
  10251. }
  10252. }
  10253. return -int32(1)
  10254. }
  10255. func __XftDefaultInitBool(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  10256. var i, v1 int32
  10257. var v uintptr
  10258. var v2 bool
  10259. _, _, _, _ = i, v, v1, v2
  10260. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+578, option)
  10261. if v2 = v != 0; v2 {
  10262. v1 = XXftDefaultParseBool(tls, v)
  10263. i = v1
  10264. }
  10265. if v2 && v1 >= 0 {
  10266. return libfontconfig.XFcPatternAddBool(tls, pat, option, libc.BoolInt32(i != 0))
  10267. }
  10268. return int32(m_True)
  10269. }
  10270. func __XftDefaultInitDouble(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  10271. bp := tls.Alloc(16)
  10272. defer tls.Free(16)
  10273. var d float64
  10274. var v uintptr
  10275. var _ /* e at bp+0 */ uintptr
  10276. _, _ = d, v
  10277. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+578, option)
  10278. if v != 0 {
  10279. d = libc.Xstrtod(tls, v, bp)
  10280. if *(*uintptr)(unsafe.Pointer(bp)) != v {
  10281. return libfontconfig.XFcPatternAddDouble(tls, pat, option, d)
  10282. }
  10283. }
  10284. return int32(m_True)
  10285. }
  10286. func __XftDefaultInitInteger(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  10287. bp := tls.Alloc(16)
  10288. defer tls.Free(16)
  10289. var v uintptr
  10290. var _ /* e at bp+0 */ uintptr
  10291. var _ /* i at bp+8 */ int32
  10292. _ = v
  10293. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+578, option)
  10294. if v != 0 {
  10295. if libfontconfig.XFcNameConstant(tls, v, bp+8) != 0 {
  10296. return libfontconfig.XFcPatternAddInteger(tls, pat, option, *(*int32)(unsafe.Pointer(bp + 8)))
  10297. }
  10298. *(*int32)(unsafe.Pointer(bp + 8)) = int32(libc.Xstrtol(tls, v, bp, 0))
  10299. if *(*uintptr)(unsafe.Pointer(bp)) != v {
  10300. return libfontconfig.XFcPatternAddInteger(tls, pat, option, *(*int32)(unsafe.Pointer(bp + 8)))
  10301. }
  10302. }
  10303. return int32(m_True)
  10304. }
  10305. func __XftDefaultInit(tls *libc.TLS, dpy uintptr) (r uintptr) {
  10306. var pat uintptr
  10307. _ = pat
  10308. pat = libfontconfig.XFcPatternCreate(tls)
  10309. if !(pat != 0) {
  10310. goto bail0
  10311. }
  10312. if !(__XftDefaultInitDouble(tls, dpy, pat, __ccgo_ts+582) != 0) {
  10313. goto bail1
  10314. }
  10315. if !(__XftDefaultInitDouble(tls, dpy, pat, __ccgo_ts+588) != 0) {
  10316. goto bail1
  10317. }
  10318. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+592) != 0) {
  10319. goto bail1
  10320. }
  10321. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+599) != 0) {
  10322. goto bail1
  10323. }
  10324. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+604) != 0) {
  10325. goto bail1
  10326. }
  10327. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+614) != 0) {
  10328. goto bail1
  10329. }
  10330. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+624) != 0) {
  10331. goto bail1
  10332. }
  10333. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+633) != 0) {
  10334. goto bail1
  10335. }
  10336. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+642) != 0) {
  10337. goto bail1
  10338. }
  10339. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+652) != 0) {
  10340. goto bail1
  10341. }
  10342. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+660) != 0) {
  10343. goto bail1
  10344. }
  10345. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+201) != 0) {
  10346. goto bail1
  10347. }
  10348. return pat
  10349. goto bail1
  10350. bail1:
  10351. ;
  10352. libfontconfig.XFcPatternDestroy(tls, pat)
  10353. goto bail0
  10354. bail0:
  10355. ;
  10356. return libc.UintptrFromInt32(0)
  10357. return r
  10358. }
  10359. func __XftDefaultGet(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, v uintptr) (r1 TFcResult) {
  10360. var info uintptr
  10361. var r TFcResult
  10362. _, _ = info, r
  10363. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10364. if !(info != 0) {
  10365. return int32(_FcResultNoMatch)
  10366. }
  10367. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0) {
  10368. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = __XftDefaultInit(tls, dpy)
  10369. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0) {
  10370. return int32(_FcResultNoMatch)
  10371. }
  10372. }
  10373. r = libfontconfig.XFcPatternGet(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults, object, screen, v)
  10374. if r == int32(_FcResultNoId) && screen > 0 {
  10375. r = libfontconfig.XFcPatternGet(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults, object, 0, v)
  10376. }
  10377. return r
  10378. }
  10379. func XXftDefaultGetBool(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, def int32) (r1 int32) {
  10380. bp := tls.Alloc(16)
  10381. defer tls.Free(16)
  10382. var r TFcResult
  10383. var _ /* v at bp+0 */ TFcValue
  10384. _ = r
  10385. r = __XftDefaultGet(tls, dpy, object, screen, bp)
  10386. if r != int32(_FcResultMatch) || (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 != int32(_FcTypeBool) {
  10387. return def
  10388. }
  10389. return *(*TFcBool)(unsafe.Pointer(bp + 8))
  10390. }
  10391. func XXftDefaultGetInteger(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, def int32) (r1 int32) {
  10392. bp := tls.Alloc(16)
  10393. defer tls.Free(16)
  10394. var r TFcResult
  10395. var _ /* v at bp+0 */ TFcValue
  10396. _ = r
  10397. r = __XftDefaultGet(tls, dpy, object, screen, bp)
  10398. if r != int32(_FcResultMatch) || (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 != int32(_FcTypeInteger) {
  10399. return def
  10400. }
  10401. return *(*int32)(unsafe.Pointer(bp + 8))
  10402. }
  10403. func XXftDefaultGetDouble(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, def float64) (r1 float64) {
  10404. bp := tls.Alloc(16)
  10405. defer tls.Free(16)
  10406. var r TFcResult
  10407. var _ /* v at bp+0 */ TFcValue
  10408. _ = r
  10409. r = __XftDefaultGet(tls, dpy, object, screen, bp)
  10410. if r != int32(_FcResultMatch) || (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 != int32(_FcTypeDouble) {
  10411. return def
  10412. }
  10413. return *(*float64)(unsafe.Pointer(bp + 8))
  10414. }
  10415. func XXftDefaultSubstitute(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr) {
  10416. bp := tls.Alloc(16)
  10417. defer tls.Free(16)
  10418. var dpi float64
  10419. var render_order, subpixel int32
  10420. var _ /* v at bp+0 */ TFcValue
  10421. _, _, _ = dpi, render_order, subpixel
  10422. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+592, 0, bp) == int32(_FcResultNoMatch) {
  10423. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+592, XXftDefaultGetBool(tls, dpy, __ccgo_ts+592, screen, XXftDefaultHasRender(tls, dpy)))
  10424. }
  10425. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+614, 0, bp) == int32(_FcResultNoMatch) {
  10426. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+614, XXftDefaultGetBool(tls, dpy, __ccgo_ts+614, screen, int32(m_True)))
  10427. }
  10428. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+624, 0, bp) == int32(_FcResultNoMatch) {
  10429. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+624, XXftDefaultGetBool(tls, dpy, __ccgo_ts+624, screen, m_False))
  10430. }
  10431. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+652, 0, bp) == int32(_FcResultNoMatch) {
  10432. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+652, XXftDefaultGetBool(tls, dpy, __ccgo_ts+652, screen, int32(m_True)))
  10433. }
  10434. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+642, 0, bp) == int32(_FcResultNoMatch) {
  10435. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+642, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+642, screen, int32(m_FC_HINT_FULL)))
  10436. }
  10437. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+633, 0, bp) == int32(_FcResultNoMatch) {
  10438. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+633, XXftDefaultGetBool(tls, dpy, __ccgo_ts+633, screen, m_False))
  10439. }
  10440. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+599, 0, bp) == int32(_FcResultNoMatch) {
  10441. subpixel = m_FC_RGBA_UNKNOWN
  10442. if XXftDefaultHasRender(tls, dpy) != 0 {
  10443. render_order = libxrender.XXRenderQuerySubpixelOrder(tls, dpy, screen)
  10444. switch render_order {
  10445. default:
  10446. fallthrough
  10447. case m_SubPixelUnknown:
  10448. subpixel = m_FC_RGBA_UNKNOWN
  10449. case int32(m_SubPixelHorizontalRGB):
  10450. subpixel = int32(m_FC_RGBA_RGB)
  10451. case int32(m_SubPixelHorizontalBGR):
  10452. subpixel = int32(m_FC_RGBA_BGR)
  10453. case int32(m_SubPixelVerticalRGB):
  10454. subpixel = int32(m_FC_RGBA_VRGB)
  10455. case int32(m_SubPixelVerticalBGR):
  10456. subpixel = int32(m_FC_RGBA_VBGR)
  10457. case int32(m_SubPixelNone):
  10458. subpixel = int32(m_FC_RGBA_NONE)
  10459. break
  10460. }
  10461. }
  10462. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+599, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+599, screen, subpixel))
  10463. }
  10464. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+604, 0, bp) == int32(_FcResultNoMatch) {
  10465. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+604, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+604, screen, int32(m_FC_LCD_DEFAULT)))
  10466. }
  10467. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+660, 0, bp) == int32(_FcResultNoMatch) {
  10468. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+660, XXftDefaultGetBool(tls, dpy, __ccgo_ts+660, screen, m_False))
  10469. }
  10470. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+588, 0, bp) == int32(_FcResultNoMatch) {
  10471. dpi = float64(float64((*TScreen)(unsafe.Pointer((*struct {
  10472. Fext_data uintptr
  10473. Fprivate1 uintptr
  10474. Ffd int32
  10475. Fprivate2 int32
  10476. Fproto_major_version int32
  10477. Fproto_minor_version int32
  10478. Fvendor uintptr
  10479. Fprivate3 TXID
  10480. Fprivate4 TXID
  10481. Fprivate5 TXID
  10482. Fprivate6 int32
  10483. Fresource_alloc uintptr
  10484. Fbyte_order int32
  10485. Fbitmap_unit int32
  10486. Fbitmap_pad int32
  10487. Fbitmap_bit_order int32
  10488. Fnformats int32
  10489. Fpixmap_format uintptr
  10490. Fprivate8 int32
  10491. Frelease int32
  10492. Fprivate9 uintptr
  10493. Fprivate10 uintptr
  10494. Fqlen int32
  10495. Flast_request_read uint64
  10496. Frequest uint64
  10497. Fprivate11 TXPointer
  10498. Fprivate12 TXPointer
  10499. Fprivate13 TXPointer
  10500. Fprivate14 TXPointer
  10501. Fmax_request_size uint32
  10502. Fdb uintptr
  10503. Fprivate15 uintptr
  10504. Fdisplay_name uintptr
  10505. Fdefault_screen int32
  10506. Fnscreens int32
  10507. Fscreens uintptr
  10508. Fmotion_buffer uint64
  10509. Fprivate16 uint64
  10510. Fmin_keycode int32
  10511. Fmax_keycode int32
  10512. Fprivate17 TXPointer
  10513. Fprivate18 TXPointer
  10514. Fprivate19 int32
  10515. Fxdefaults uintptr
  10516. })(unsafe.Pointer(dpy)).Fscreens+uintptr(screen)*128)).Fheight)*float64(25.4)) / float64((*TScreen)(unsafe.Pointer((*struct {
  10517. Fext_data uintptr
  10518. Fprivate1 uintptr
  10519. Ffd int32
  10520. Fprivate2 int32
  10521. Fproto_major_version int32
  10522. Fproto_minor_version int32
  10523. Fvendor uintptr
  10524. Fprivate3 TXID
  10525. Fprivate4 TXID
  10526. Fprivate5 TXID
  10527. Fprivate6 int32
  10528. Fresource_alloc uintptr
  10529. Fbyte_order int32
  10530. Fbitmap_unit int32
  10531. Fbitmap_pad int32
  10532. Fbitmap_bit_order int32
  10533. Fnformats int32
  10534. Fpixmap_format uintptr
  10535. Fprivate8 int32
  10536. Frelease int32
  10537. Fprivate9 uintptr
  10538. Fprivate10 uintptr
  10539. Fqlen int32
  10540. Flast_request_read uint64
  10541. Frequest uint64
  10542. Fprivate11 TXPointer
  10543. Fprivate12 TXPointer
  10544. Fprivate13 TXPointer
  10545. Fprivate14 TXPointer
  10546. Fmax_request_size uint32
  10547. Fdb uintptr
  10548. Fprivate15 uintptr
  10549. Fdisplay_name uintptr
  10550. Fdefault_screen int32
  10551. Fnscreens int32
  10552. Fscreens uintptr
  10553. Fmotion_buffer uint64
  10554. Fprivate16 uint64
  10555. Fmin_keycode int32
  10556. Fmax_keycode int32
  10557. Fprivate17 TXPointer
  10558. Fprivate18 TXPointer
  10559. Fprivate19 int32
  10560. Fxdefaults uintptr
  10561. })(unsafe.Pointer(dpy)).Fscreens+uintptr(screen)*128)).Fmheight)
  10562. libfontconfig.XFcPatternAddDouble(tls, pattern, __ccgo_ts+588, XXftDefaultGetDouble(tls, dpy, __ccgo_ts+588, screen, dpi))
  10563. }
  10564. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+582, 0, bp) == int32(_FcResultNoMatch) {
  10565. libfontconfig.XFcPatternAddDouble(tls, pattern, __ccgo_ts+582, XXftDefaultGetDouble(tls, dpy, __ccgo_ts+582, screen, float64(1)))
  10566. }
  10567. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+201, 0, bp) == int32(_FcResultNoMatch) {
  10568. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+201, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+201, screen, libc.Int32FromInt32(1024)*libc.Int32FromInt32(1024)))
  10569. }
  10570. libfontconfig.XFcDefaultSubstitute(tls, pattern)
  10571. }
  10572. const m_VisualIDMask1 = 1
  10573. const m_VisualScreenMask1 = 2
  10574. /* xftxlfd.c */
  10575. /*
  10576. * Ok, this is a pain. To share source pictures across multiple destinations,
  10577. * the screen for each drawable must be discovered.
  10578. */
  10579. func __XftDrawScreen(tls *libc.TLS, dpy uintptr, drawable TDrawable, visual uintptr) (r int32) {
  10580. bp := tls.Alloc(112)
  10581. defer tls.Free(112)
  10582. var ret uintptr
  10583. var s int32
  10584. var _ /* borderWidth at bp+24 */ uint32
  10585. var _ /* depth at bp+28 */ uint32
  10586. var _ /* height at bp+20 */ uint32
  10587. var _ /* nret at bp+96 */ int32
  10588. var _ /* root at bp+0 */ TWindow
  10589. var _ /* template at bp+32 */ TXVisualInfo
  10590. var _ /* width at bp+16 */ uint32
  10591. var _ /* x at bp+8 */ int32
  10592. var _ /* y at bp+12 */ int32
  10593. _, _ = ret, s
  10594. /* Special case the most common environment */
  10595. if (*struct {
  10596. Fext_data uintptr
  10597. Fprivate1 uintptr
  10598. Ffd int32
  10599. Fprivate2 int32
  10600. Fproto_major_version int32
  10601. Fproto_minor_version int32
  10602. Fvendor uintptr
  10603. Fprivate3 TXID
  10604. Fprivate4 TXID
  10605. Fprivate5 TXID
  10606. Fprivate6 int32
  10607. Fresource_alloc uintptr
  10608. Fbyte_order int32
  10609. Fbitmap_unit int32
  10610. Fbitmap_pad int32
  10611. Fbitmap_bit_order int32
  10612. Fnformats int32
  10613. Fpixmap_format uintptr
  10614. Fprivate8 int32
  10615. Frelease int32
  10616. Fprivate9 uintptr
  10617. Fprivate10 uintptr
  10618. Fqlen int32
  10619. Flast_request_read uint64
  10620. Frequest uint64
  10621. Fprivate11 TXPointer
  10622. Fprivate12 TXPointer
  10623. Fprivate13 TXPointer
  10624. Fprivate14 TXPointer
  10625. Fmax_request_size uint32
  10626. Fdb uintptr
  10627. Fprivate15 uintptr
  10628. Fdisplay_name uintptr
  10629. Fdefault_screen int32
  10630. Fnscreens int32
  10631. Fscreens uintptr
  10632. Fmotion_buffer uint64
  10633. Fprivate16 uint64
  10634. Fmin_keycode int32
  10635. Fmax_keycode int32
  10636. Fprivate17 TXPointer
  10637. Fprivate18 TXPointer
  10638. Fprivate19 int32
  10639. Fxdefaults uintptr
  10640. })(unsafe.Pointer(dpy)).Fnscreens == int32(1) {
  10641. return 0
  10642. }
  10643. /*
  10644. * If we've got a visual, look for the screen that points at it.
  10645. * This requires no round trip.
  10646. */
  10647. if visual != 0 {
  10648. s = 0
  10649. for {
  10650. if !(s < (*struct {
  10651. Fext_data uintptr
  10652. Fprivate1 uintptr
  10653. Ffd int32
  10654. Fprivate2 int32
  10655. Fproto_major_version int32
  10656. Fproto_minor_version int32
  10657. Fvendor uintptr
  10658. Fprivate3 TXID
  10659. Fprivate4 TXID
  10660. Fprivate5 TXID
  10661. Fprivate6 int32
  10662. Fresource_alloc uintptr
  10663. Fbyte_order int32
  10664. Fbitmap_unit int32
  10665. Fbitmap_pad int32
  10666. Fbitmap_bit_order int32
  10667. Fnformats int32
  10668. Fpixmap_format uintptr
  10669. Fprivate8 int32
  10670. Frelease int32
  10671. Fprivate9 uintptr
  10672. Fprivate10 uintptr
  10673. Fqlen int32
  10674. Flast_request_read uint64
  10675. Frequest uint64
  10676. Fprivate11 TXPointer
  10677. Fprivate12 TXPointer
  10678. Fprivate13 TXPointer
  10679. Fprivate14 TXPointer
  10680. Fmax_request_size uint32
  10681. Fdb uintptr
  10682. Fprivate15 uintptr
  10683. Fdisplay_name uintptr
  10684. Fdefault_screen int32
  10685. Fnscreens int32
  10686. Fscreens uintptr
  10687. Fmotion_buffer uint64
  10688. Fprivate16 uint64
  10689. Fmin_keycode int32
  10690. Fmax_keycode int32
  10691. Fprivate17 TXPointer
  10692. Fprivate18 TXPointer
  10693. Fprivate19 int32
  10694. Fxdefaults uintptr
  10695. })(unsafe.Pointer(dpy)).Fnscreens) {
  10696. break
  10697. }
  10698. (*(*TXVisualInfo)(unsafe.Pointer(bp + 32))).Fvisualid = (*TVisual)(unsafe.Pointer(visual)).Fvisualid
  10699. (*(*TXVisualInfo)(unsafe.Pointer(bp + 32))).Fscreen = s
  10700. ret = libx11.XXGetVisualInfo(tls, dpy, int64(libc.Int32FromInt32(m_VisualIDMask1)|libc.Int32FromInt32(m_VisualScreenMask1)), bp+32, bp+96)
  10701. if ret != 0 {
  10702. libx11.XXFree(tls, ret)
  10703. return s
  10704. }
  10705. goto _1
  10706. _1:
  10707. ;
  10708. s++
  10709. }
  10710. }
  10711. /*
  10712. * Otherwise, as the server for the drawable geometry and find
  10713. * the screen from the root window.
  10714. * This takes a round trip.
  10715. */
  10716. if libx11.XXGetGeometry(tls, dpy, drawable, bp, bp+8, bp+12, bp+16, bp+20, bp+24, bp+28) != 0 {
  10717. s = 0
  10718. for {
  10719. if !(s < (*struct {
  10720. Fext_data uintptr
  10721. Fprivate1 uintptr
  10722. Ffd int32
  10723. Fprivate2 int32
  10724. Fproto_major_version int32
  10725. Fproto_minor_version int32
  10726. Fvendor uintptr
  10727. Fprivate3 TXID
  10728. Fprivate4 TXID
  10729. Fprivate5 TXID
  10730. Fprivate6 int32
  10731. Fresource_alloc uintptr
  10732. Fbyte_order int32
  10733. Fbitmap_unit int32
  10734. Fbitmap_pad int32
  10735. Fbitmap_bit_order int32
  10736. Fnformats int32
  10737. Fpixmap_format uintptr
  10738. Fprivate8 int32
  10739. Frelease int32
  10740. Fprivate9 uintptr
  10741. Fprivate10 uintptr
  10742. Fqlen int32
  10743. Flast_request_read uint64
  10744. Frequest uint64
  10745. Fprivate11 TXPointer
  10746. Fprivate12 TXPointer
  10747. Fprivate13 TXPointer
  10748. Fprivate14 TXPointer
  10749. Fmax_request_size uint32
  10750. Fdb uintptr
  10751. Fprivate15 uintptr
  10752. Fdisplay_name uintptr
  10753. Fdefault_screen int32
  10754. Fnscreens int32
  10755. Fscreens uintptr
  10756. Fmotion_buffer uint64
  10757. Fprivate16 uint64
  10758. Fmin_keycode int32
  10759. Fmax_keycode int32
  10760. Fprivate17 TXPointer
  10761. Fprivate18 TXPointer
  10762. Fprivate19 int32
  10763. Fxdefaults uintptr
  10764. })(unsafe.Pointer(dpy)).Fnscreens) {
  10765. break
  10766. }
  10767. if (*TScreen)(unsafe.Pointer((*struct {
  10768. Fext_data uintptr
  10769. Fprivate1 uintptr
  10770. Ffd int32
  10771. Fprivate2 int32
  10772. Fproto_major_version int32
  10773. Fproto_minor_version int32
  10774. Fvendor uintptr
  10775. Fprivate3 TXID
  10776. Fprivate4 TXID
  10777. Fprivate5 TXID
  10778. Fprivate6 int32
  10779. Fresource_alloc uintptr
  10780. Fbyte_order int32
  10781. Fbitmap_unit int32
  10782. Fbitmap_pad int32
  10783. Fbitmap_bit_order int32
  10784. Fnformats int32
  10785. Fpixmap_format uintptr
  10786. Fprivate8 int32
  10787. Frelease int32
  10788. Fprivate9 uintptr
  10789. Fprivate10 uintptr
  10790. Fqlen int32
  10791. Flast_request_read uint64
  10792. Frequest uint64
  10793. Fprivate11 TXPointer
  10794. Fprivate12 TXPointer
  10795. Fprivate13 TXPointer
  10796. Fprivate14 TXPointer
  10797. Fmax_request_size uint32
  10798. Fdb uintptr
  10799. Fprivate15 uintptr
  10800. Fdisplay_name uintptr
  10801. Fdefault_screen int32
  10802. Fnscreens int32
  10803. Fscreens uintptr
  10804. Fmotion_buffer uint64
  10805. Fprivate16 uint64
  10806. Fmin_keycode int32
  10807. Fmax_keycode int32
  10808. Fprivate17 TXPointer
  10809. Fprivate18 TXPointer
  10810. Fprivate19 int32
  10811. Fxdefaults uintptr
  10812. })(unsafe.Pointer(dpy)).Fscreens+uintptr(s)*128)).Froot == *(*TWindow)(unsafe.Pointer(bp)) {
  10813. return s
  10814. }
  10815. goto _2
  10816. _2:
  10817. ;
  10818. s++
  10819. }
  10820. }
  10821. /*
  10822. * Make a guess -- it's probably wrong, but then the app probably
  10823. * handed us a bogus drawable in this case
  10824. */
  10825. return 0
  10826. }
  10827. func XXftDrawDepth(tls *libc.TLS, draw uintptr) (r uint32) {
  10828. bp := tls.Alloc(32)
  10829. defer tls.Free(32)
  10830. var _ /* borderWidth at bp+24 */ uint32
  10831. var _ /* depth at bp+28 */ uint32
  10832. var _ /* height at bp+20 */ uint32
  10833. var _ /* root at bp+0 */ TWindow
  10834. var _ /* width at bp+16 */ uint32
  10835. var _ /* x at bp+8 */ int32
  10836. var _ /* y at bp+12 */ int32
  10837. if !((*TXftDraw)(unsafe.Pointer(draw)).Fdepth != 0) {
  10838. 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 {
  10839. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = *(*uint32)(unsafe.Pointer(bp + 28))
  10840. }
  10841. }
  10842. return (*TXftDraw)(unsafe.Pointer(draw)).Fdepth
  10843. }
  10844. func XXftDrawBitsPerPixel(tls *libc.TLS, draw uintptr) (r uint32) {
  10845. bp := tls.Alloc(16)
  10846. defer tls.Free(16)
  10847. var depth, v1 uint32
  10848. var formats, v2 uintptr
  10849. var i int32
  10850. var v3 bool
  10851. var _ /* nformats at bp+0 */ int32
  10852. _, _, _, _, _, _ = depth, formats, i, v1, v2, v3
  10853. if !((*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel != 0) {
  10854. v1 = XXftDrawDepth(tls, draw)
  10855. depth = v1
  10856. if v3 = v1 != 0; v3 {
  10857. v2 = libx11.XXListPixmapFormats(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, bp)
  10858. formats = v2
  10859. }
  10860. if v3 && v2 != 0 {
  10861. i = 0
  10862. for {
  10863. if !(i < *(*int32)(unsafe.Pointer(bp))) {
  10864. break
  10865. }
  10866. if libc.Uint32FromInt32((*(*TXPixmapFormatValues)(unsafe.Pointer(formats + uintptr(i)*12))).Fdepth) == depth {
  10867. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = libc.Uint32FromInt32((*(*TXPixmapFormatValues)(unsafe.Pointer(formats + uintptr(i)*12))).Fbits_per_pixel)
  10868. break
  10869. }
  10870. goto _4
  10871. _4:
  10872. ;
  10873. i++
  10874. }
  10875. libx11.XXFree(tls, formats)
  10876. }
  10877. }
  10878. return (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel
  10879. }
  10880. func XXftDrawCreate(tls *libc.TLS, dpy uintptr, drawable TDrawable, visual uintptr, colormap TColormap) (r uintptr) {
  10881. var draw uintptr
  10882. _ = draw
  10883. draw = libc.Xmalloc(tls, uint64(96))
  10884. if !(draw != 0) {
  10885. return libc.UintptrFromInt32(0)
  10886. }
  10887. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  10888. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = drawable
  10889. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, drawable, visual)
  10890. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = uint32(0) /* don't find out unless we need to know */
  10891. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(0) /* don't find out unless we need to know */
  10892. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = visual
  10893. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = colormap
  10894. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10895. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10896. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  10897. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  10898. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  10899. XXftMemAlloc(tls, int32(_XFT_MEM_DRAW), uint64(96))
  10900. return draw
  10901. }
  10902. func XXftDrawCreateBitmap(tls *libc.TLS, dpy uintptr, bitmap TPixmap) (r uintptr) {
  10903. var draw uintptr
  10904. _ = draw
  10905. draw = libc.Xmalloc(tls, uint64(96))
  10906. if !(draw != 0) {
  10907. return libc.UintptrFromInt32(0)
  10908. }
  10909. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  10910. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = bitmap
  10911. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, bitmap, libc.UintptrFromInt32(0))
  10912. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = uint32(1)
  10913. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(1)
  10914. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = libc.UintptrFromInt32(0)
  10915. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = uint64(0)
  10916. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10917. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10918. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  10919. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  10920. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  10921. XXftMemAlloc(tls, int32(_XFT_MEM_DRAW), uint64(96))
  10922. return draw
  10923. }
  10924. func XXftDrawCreateAlpha(tls *libc.TLS, dpy uintptr, pixmap TPixmap, depth int32) (r uintptr) {
  10925. var draw uintptr
  10926. _ = draw
  10927. draw = libc.Xmalloc(tls, uint64(96))
  10928. if !(draw != 0) {
  10929. return libc.UintptrFromInt32(0)
  10930. }
  10931. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  10932. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = pixmap
  10933. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, pixmap, libc.UintptrFromInt32(0))
  10934. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = libc.Uint32FromInt32(depth)
  10935. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(0) /* don't find out until we need it */
  10936. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = libc.UintptrFromInt32(0)
  10937. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = uint64(0)
  10938. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10939. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10940. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  10941. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  10942. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  10943. XXftMemAlloc(tls, int32(_XFT_MEM_DRAW), uint64(96))
  10944. return draw
  10945. }
  10946. func __XftDrawFormat(tls *libc.TLS, draw uintptr) (r uintptr) {
  10947. bp := tls.Alloc(48)
  10948. defer tls.Free(48)
  10949. var info uintptr
  10950. var _ /* pf at bp+0 */ TXRenderPictFormat
  10951. _ = info
  10952. info = X_XftDisplayInfoGet(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, int32(m_True))
  10953. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0) {
  10954. return libc.UintptrFromInt32(0)
  10955. }
  10956. if (*TXftDraw)(unsafe.Pointer(draw)).Fvisual == libc.UintptrFromInt32(0) {
  10957. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Ftype1 = int32(m_PictTypeDirect)
  10958. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth = libc.Int32FromUint32(XXftDrawDepth(tls, draw))
  10959. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.Falpha = 0
  10960. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FalphaMask = int16(libc.Int32FromInt32(1)<<(*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth - libc.Int32FromInt32(1))
  10961. 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)
  10962. } else {
  10963. return libxrender.XXRenderFindVisualFormat(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fvisual)
  10964. }
  10965. return r
  10966. }
  10967. func XXftDrawChange(tls *libc.TLS, draw uintptr, drawable TDrawable) {
  10968. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = drawable
  10969. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  10970. libxrender.XXRenderFreePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict)
  10971. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint64(0)
  10972. }
  10973. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  10974. libx11.XXFreeGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc)
  10975. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10976. }
  10977. }
  10978. func XXftDrawDisplay(tls *libc.TLS, draw uintptr) (r uintptr) {
  10979. return (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  10980. }
  10981. func XXftDrawDrawable(tls *libc.TLS, draw uintptr) (r TDrawable) {
  10982. return (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable
  10983. }
  10984. func XXftDrawColormap(tls *libc.TLS, draw uintptr) (r TColormap) {
  10985. return (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap
  10986. }
  10987. func XXftDrawVisual(tls *libc.TLS, draw uintptr) (r uintptr) {
  10988. return (*TXftDraw)(unsafe.Pointer(draw)).Fvisual
  10989. }
  10990. func XXftDrawDestroy(tls *libc.TLS, draw uintptr) {
  10991. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  10992. libxrender.XXRenderFreePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict)
  10993. }
  10994. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  10995. libx11.XXFreeGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc)
  10996. }
  10997. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  10998. case int32(_XftClipTypeRegion):
  10999. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11000. case int32(_XftClipTypeRectangles):
  11001. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 56)))
  11002. case int32(_XftClipTypeNone):
  11003. break
  11004. }
  11005. XXftMemFree(tls, int32(_XFT_MEM_DRAW), uint64(96))
  11006. libc.Xfree(tls, draw)
  11007. }
  11008. func XXftDrawSrcPicture(tls *libc.TLS, draw uintptr, color uintptr) (r TPicture) {
  11009. bp := tls.Alloc(96)
  11010. defer tls.Free(96)
  11011. var dpy, info uintptr
  11012. var i int32
  11013. var pix TPixmap
  11014. var _ /* bitmapColor at bp+0 */ TXftColor
  11015. var _ /* pa at bp+16 */ TXRenderPictureAttributes
  11016. _, _, _, _ = dpy, i, info, pix
  11017. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  11018. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  11019. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat != 0) {
  11020. return uint64(0)
  11021. }
  11022. /*
  11023. * Monochrome targets require special handling; the PictOp controls
  11024. * the color, and the color must be opaque
  11025. */
  11026. if !((*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0) && (*TXftDraw)(unsafe.Pointer(draw)).Fdepth == uint32(1) {
  11027. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Falpha = uint16(0xffff)
  11028. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fred = uint16(0xffff)
  11029. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fgreen = uint16(0xffff)
  11030. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fblue = uint16(0xffff)
  11031. color = bp
  11032. }
  11033. /*
  11034. * See if there's one already available
  11035. */
  11036. i = 0
  11037. for {
  11038. if !(i < int32(m_XFT_NUM_SOLID_COLOR)) {
  11039. break
  11040. }
  11041. 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) {
  11042. return (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict
  11043. }
  11044. goto _1
  11045. _1:
  11046. ;
  11047. i++
  11048. }
  11049. /*
  11050. * Pick one to replace at random
  11051. */
  11052. i = libc.Int32FromUint32(libc.Uint32FromInt32(libc.Xrand(tls)) % uint32(m_XFT_NUM_SOLID_COLOR))
  11053. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasSolid != 0 {
  11054. /*
  11055. * Free any existing entry
  11056. */
  11057. if (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict != 0 {
  11058. libxrender.XXRenderFreePicture(tls, dpy, (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict)
  11059. }
  11060. /*
  11061. * Create picture
  11062. */
  11063. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict = libxrender.XXRenderCreateSolidFill(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, color+8)
  11064. } else {
  11065. 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 {
  11066. libxrender.XXRenderFreePicture(tls, dpy, (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict)
  11067. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict = uint64(0)
  11068. }
  11069. /*
  11070. * Create picture if necessary
  11071. */
  11072. if !((*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict != 0) {
  11073. pix = libx11.XXCreatePixmap(tls, dpy, (*TScreen)(unsafe.Pointer((*struct {
  11074. Fext_data uintptr
  11075. Fprivate1 uintptr
  11076. Ffd int32
  11077. Fprivate2 int32
  11078. Fproto_major_version int32
  11079. Fproto_minor_version int32
  11080. Fvendor uintptr
  11081. Fprivate3 TXID
  11082. Fprivate4 TXID
  11083. Fprivate5 TXID
  11084. Fprivate6 int32
  11085. Fresource_alloc uintptr
  11086. Fbyte_order int32
  11087. Fbitmap_unit int32
  11088. Fbitmap_pad int32
  11089. Fbitmap_bit_order int32
  11090. Fnformats int32
  11091. Fpixmap_format uintptr
  11092. Fprivate8 int32
  11093. Frelease int32
  11094. Fprivate9 uintptr
  11095. Fprivate10 uintptr
  11096. Fqlen int32
  11097. Flast_request_read uint64
  11098. Frequest uint64
  11099. Fprivate11 TXPointer
  11100. Fprivate12 TXPointer
  11101. Fprivate13 TXPointer
  11102. Fprivate14 TXPointer
  11103. Fmax_request_size uint32
  11104. Fdb uintptr
  11105. Fprivate15 uintptr
  11106. Fdisplay_name uintptr
  11107. Fdefault_screen int32
  11108. Fnscreens int32
  11109. Fscreens uintptr
  11110. Fmotion_buffer uint64
  11111. Fprivate16 uint64
  11112. Fmin_keycode int32
  11113. Fmax_keycode int32
  11114. Fprivate17 TXPointer
  11115. Fprivate18 TXPointer
  11116. Fprivate19 int32
  11117. Fxdefaults uintptr
  11118. })(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))
  11119. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp + 16))).Frepeat = int32(m_True)
  11120. (*(*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)
  11121. libx11.XXFreePixmap(tls, dpy, pix)
  11122. }
  11123. /*
  11124. * Set to the new color
  11125. */
  11126. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fcolor = (*TXftColor)(unsafe.Pointer(color)).Fcolor
  11127. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fscreen = (*TXftDraw)(unsafe.Pointer(draw)).Fscreen
  11128. libxrender.XXRenderFillRectangle(tls, dpy, int32(m_PictOpSrc), (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict, color+8, 0, 0, uint32(1), uint32(1))
  11129. }
  11130. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fcolor = (*TXftColor)(unsafe.Pointer(color)).Fcolor
  11131. (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fscreen = (*TXftDraw)(unsafe.Pointer(draw)).Fscreen
  11132. return (*(*TXftSolidColor)(unsafe.Pointer(info + 88 + uintptr(i)*24))).Fpict
  11133. }
  11134. func __XftDrawOp(tls *libc.TLS, draw uintptr, color uintptr) (r int32) {
  11135. if (*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0 || (*TXftDraw)(unsafe.Pointer(draw)).Fdepth != uint32(1) {
  11136. return int32(m_PictOpOver)
  11137. }
  11138. if libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >= int32(0x8000) {
  11139. return int32(m_PictOpOver)
  11140. }
  11141. return int32(m_PictOpOutReverse)
  11142. }
  11143. func __XftDrawRenderPrepare(tls *libc.TLS, draw uintptr) (r TFcBool) {
  11144. bp := tls.Alloc(80)
  11145. defer tls.Free(80)
  11146. var format uintptr
  11147. var mask uint64
  11148. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  11149. _, _ = format, mask
  11150. if !((*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0) {
  11151. mask = uint64(0)
  11152. format = __XftDrawFormat(tls, draw)
  11153. if !(format != 0) {
  11154. return m_FcFalse
  11155. }
  11156. if (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode == int32(m_IncludeInferiors) {
  11157. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fsubwindow_mode = int32(m_IncludeInferiors)
  11158. mask |= libc.Uint64FromInt32(libc.Int32FromInt32(1) << libc.Int32FromInt32(8))
  11159. }
  11160. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = libxrender.XXRenderCreatePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, format, mask, bp)
  11161. if !((*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0) {
  11162. return m_FcFalse
  11163. }
  11164. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11165. case int32(_XftClipTypeRegion):
  11166. libxrender.XXRenderSetPictureClipRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11167. case int32(_XftClipTypeRectangles):
  11168. 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)
  11169. case int32(_XftClipTypeNone):
  11170. break
  11171. }
  11172. }
  11173. return int32(m_FcTrue)
  11174. }
  11175. func __XftDrawCorePrepare(tls *libc.TLS, draw uintptr, color uintptr) (r TFcBool) {
  11176. bp := tls.Alloc(128)
  11177. defer tls.Free(128)
  11178. var mask uint64
  11179. var _ /* gcv at bp+0 */ TXGCValues
  11180. _ = mask
  11181. if !((*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0) {
  11182. mask = uint64(0)
  11183. if (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode == int32(m_IncludeInferiors) {
  11184. (*(*TXGCValues)(unsafe.Pointer(bp))).Fsubwindow_mode = int32(m_IncludeInferiors)
  11185. mask |= libc.Uint64FromInt64(libc.Int64FromInt64(1) << libc.Int32FromInt32(15))
  11186. }
  11187. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libx11.XXCreateGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, mask, bp)
  11188. if !((*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0) {
  11189. return m_FcFalse
  11190. }
  11191. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11192. case int32(_XftClipTypeRegion):
  11193. libx11.XXSetRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11194. case int32(_XftClipTypeRectangles):
  11195. 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)
  11196. case int32(_XftClipTypeNone):
  11197. break
  11198. }
  11199. }
  11200. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  11201. return int32(m_FcTrue)
  11202. }
  11203. func XXftDrawPicture(tls *libc.TLS, draw uintptr) (r TPicture) {
  11204. if !(__XftDrawRenderPrepare(tls, draw) != 0) {
  11205. return uint64(0)
  11206. }
  11207. return (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict
  11208. }
  11209. func XXftDrawGlyphs(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, glyphs uintptr, nglyphs int32) {
  11210. var font uintptr
  11211. var src, v1 TPicture
  11212. var v2 bool
  11213. _, _, _, _ = font, src, v1, v2
  11214. font = pub
  11215. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  11216. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  11217. v1 = XXftDrawSrcPicture(tls, draw, color)
  11218. src = v1
  11219. }
  11220. if v2 && v1 != 0 {
  11221. 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)
  11222. }
  11223. } else {
  11224. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11225. XXftGlyphCore(tls, draw, color, pub, x, y, glyphs, nglyphs)
  11226. }
  11227. }
  11228. }
  11229. func XXftDrawString8(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11230. bp := tls.Alloc(4128)
  11231. defer tls.Free(4128)
  11232. var glyphs uintptr
  11233. var i int32
  11234. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11235. _, _ = glyphs, i
  11236. if XXftDebug(tls)&int32(m_XFT_DBG_DRAW) != 0 {
  11237. libc.Xprintf(tls, __ccgo_ts+669, libc.VaList(bp+4104, len1, len1, string1))
  11238. }
  11239. if len1 <= int32(m_NUM_LOCAL) {
  11240. glyphs = bp
  11241. } else {
  11242. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11243. if !(glyphs != 0) {
  11244. return
  11245. }
  11246. }
  11247. i = 0
  11248. for {
  11249. if !(i < len1) {
  11250. break
  11251. }
  11252. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  11253. goto _1
  11254. _1:
  11255. ;
  11256. i++
  11257. }
  11258. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  11259. if glyphs != bp {
  11260. libc.Xfree(tls, glyphs)
  11261. }
  11262. }
  11263. func XXftDrawString16(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11264. bp := tls.Alloc(4096)
  11265. defer tls.Free(4096)
  11266. var glyphs uintptr
  11267. var i int32
  11268. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11269. _, _ = glyphs, i
  11270. if len1 <= 0 {
  11271. return
  11272. }
  11273. if len1 <= int32(m_NUM_LOCAL) {
  11274. glyphs = bp
  11275. } else {
  11276. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11277. if !(glyphs != 0) {
  11278. return
  11279. }
  11280. }
  11281. i = 0
  11282. for {
  11283. if !(i < len1) {
  11284. break
  11285. }
  11286. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  11287. goto _1
  11288. _1:
  11289. ;
  11290. i++
  11291. }
  11292. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  11293. if glyphs != bp {
  11294. libc.Xfree(tls, glyphs)
  11295. }
  11296. }
  11297. func XXftDrawString32(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11298. bp := tls.Alloc(4096)
  11299. defer tls.Free(4096)
  11300. var glyphs uintptr
  11301. var i int32
  11302. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11303. _, _ = glyphs, i
  11304. if len1 <= 0 {
  11305. return
  11306. }
  11307. if len1 <= int32(m_NUM_LOCAL) {
  11308. glyphs = bp
  11309. } else {
  11310. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11311. if !(glyphs != 0) {
  11312. return
  11313. }
  11314. }
  11315. i = 0
  11316. for {
  11317. if !(i < len1) {
  11318. break
  11319. }
  11320. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  11321. goto _1
  11322. _1:
  11323. ;
  11324. i++
  11325. }
  11326. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  11327. if glyphs != bp {
  11328. libc.Xfree(tls, glyphs)
  11329. }
  11330. }
  11331. func XXftDrawStringUtf8(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11332. bp := tls.Alloc(4112)
  11333. defer tls.Free(4112)
  11334. var glyphs, glyphs_new uintptr
  11335. var i, l, size, v1, v3 int32
  11336. var v2 bool
  11337. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11338. var _ /* ucs4 at bp+4096 */ TFcChar32
  11339. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  11340. if len1 <= 0 {
  11341. return
  11342. }
  11343. i = 0
  11344. glyphs = bp
  11345. size = int32(m_NUM_LOCAL)
  11346. for {
  11347. if v2 = len1 != 0; v2 {
  11348. v1 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  11349. l = v1
  11350. }
  11351. if !(v2 && v1 > 0) {
  11352. break
  11353. }
  11354. if i == size {
  11355. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*libc.Int32FromInt32(2))*uint64(4))
  11356. if !(glyphs_new != 0) {
  11357. if glyphs != bp {
  11358. libc.Xfree(tls, glyphs)
  11359. }
  11360. return
  11361. }
  11362. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  11363. size *= int32(2)
  11364. if glyphs != bp {
  11365. libc.Xfree(tls, glyphs)
  11366. }
  11367. glyphs = glyphs_new
  11368. }
  11369. v3 = i
  11370. i++
  11371. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11372. string1 += uintptr(l)
  11373. len1 -= l
  11374. }
  11375. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, i)
  11376. if glyphs != bp {
  11377. libc.Xfree(tls, glyphs)
  11378. }
  11379. }
  11380. func XXftDrawStringUtf16(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, endian TFcEndian, len1 int32) {
  11381. bp := tls.Alloc(4112)
  11382. defer tls.Free(4112)
  11383. var glyphs, glyphs_new uintptr
  11384. var i, l, size, v1, v3 int32
  11385. var v2 bool
  11386. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11387. var _ /* ucs4 at bp+4096 */ TFcChar32
  11388. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  11389. if len1 <= 0 {
  11390. return
  11391. }
  11392. i = 0
  11393. glyphs = bp
  11394. size = int32(m_NUM_LOCAL)
  11395. for {
  11396. if v2 = len1 != 0; v2 {
  11397. v1 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  11398. l = v1
  11399. }
  11400. if !(v2 && v1 > 0) {
  11401. break
  11402. }
  11403. if i == size {
  11404. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*libc.Int32FromInt32(2))*uint64(4))
  11405. if !(glyphs_new != 0) {
  11406. if glyphs != bp {
  11407. libc.Xfree(tls, glyphs)
  11408. }
  11409. return
  11410. }
  11411. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  11412. size *= int32(2)
  11413. if glyphs != bp {
  11414. libc.Xfree(tls, glyphs)
  11415. }
  11416. glyphs = glyphs_new
  11417. }
  11418. v3 = i
  11419. i++
  11420. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11421. string1 += uintptr(l)
  11422. len1 -= l
  11423. }
  11424. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, i)
  11425. if glyphs != bp {
  11426. libc.Xfree(tls, glyphs)
  11427. }
  11428. }
  11429. func XXftDrawGlyphSpec(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, glyphs uintptr, len1 int32) {
  11430. var font uintptr
  11431. var src, v1 TPicture
  11432. var v2 bool
  11433. _, _, _, _ = font, src, v1, v2
  11434. font = pub
  11435. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  11436. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  11437. v1 = XXftDrawSrcPicture(tls, draw, color)
  11438. src = v1
  11439. }
  11440. if v2 && v1 != 0 {
  11441. XXftGlyphSpecRender(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, __XftDrawOp(tls, draw, color), src, pub, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, 0, 0, glyphs, len1)
  11442. }
  11443. } else {
  11444. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11445. XXftGlyphSpecCore(tls, draw, color, pub, glyphs, len1)
  11446. }
  11447. }
  11448. }
  11449. func XXftDrawGlyphFontSpec(tls *libc.TLS, draw uintptr, color uintptr, glyphs uintptr, len1 int32) {
  11450. var i, start int32
  11451. var src, v1 TPicture
  11452. var v2 bool
  11453. _, _, _, _, _ = i, src, start, v1, v2
  11454. i = 0
  11455. for i < len1 {
  11456. start = i
  11457. if (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Fformat != 0 {
  11458. for i < len1 && (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Fformat != 0 {
  11459. i++
  11460. }
  11461. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  11462. v1 = XXftDrawSrcPicture(tls, draw, color)
  11463. src = v1
  11464. }
  11465. if v2 && v1 != 0 {
  11466. 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)
  11467. }
  11468. } else {
  11469. for i < len1 && !((*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)).Fformat != 0) {
  11470. i++
  11471. }
  11472. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11473. XXftGlyphFontSpecCore(tls, draw, color, glyphs+uintptr(start)*16, i-start)
  11474. }
  11475. }
  11476. }
  11477. }
  11478. func XXftDrawCharSpec(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, chars uintptr, len1 int32) {
  11479. bp := tls.Alloc(8192)
  11480. defer tls.Free(8192)
  11481. var glyphs uintptr
  11482. var i int32
  11483. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphSpec
  11484. _, _ = glyphs, i
  11485. if len1 <= 0 {
  11486. return
  11487. }
  11488. if len1 <= int32(m_NUM_LOCAL) {
  11489. glyphs = bp
  11490. } else {
  11491. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(8))
  11492. if !(glyphs != 0) {
  11493. return
  11494. }
  11495. }
  11496. i = 0
  11497. for {
  11498. if !(i < len1) {
  11499. break
  11500. }
  11501. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fucs4)
  11502. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fx
  11503. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fy
  11504. goto _1
  11505. _1:
  11506. ;
  11507. i++
  11508. }
  11509. XXftDrawGlyphSpec(tls, draw, color, pub, glyphs, len1)
  11510. if glyphs != bp {
  11511. libc.Xfree(tls, glyphs)
  11512. }
  11513. }
  11514. func XXftDrawCharFontSpec(tls *libc.TLS, draw uintptr, color uintptr, chars uintptr, len1 int32) {
  11515. bp := tls.Alloc(16384)
  11516. defer tls.Free(16384)
  11517. var glyphs uintptr
  11518. var i int32
  11519. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphFontSpec
  11520. _, _ = glyphs, i
  11521. if len1 <= 0 {
  11522. return
  11523. }
  11524. if len1 <= int32(m_NUM_LOCAL) {
  11525. glyphs = bp
  11526. } else {
  11527. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(16))
  11528. if !(glyphs != 0) {
  11529. return
  11530. }
  11531. }
  11532. i = 0
  11533. for {
  11534. if !(i < len1) {
  11535. break
  11536. }
  11537. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Ffont
  11538. (*(*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)
  11539. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fx
  11540. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fy
  11541. goto _1
  11542. _1:
  11543. ;
  11544. i++
  11545. }
  11546. XXftDrawGlyphFontSpec(tls, draw, color, glyphs, len1)
  11547. if glyphs != bp {
  11548. libc.Xfree(tls, glyphs)
  11549. }
  11550. }
  11551. func XXftDrawRect(tls *libc.TLS, draw uintptr, color uintptr, x int32, y int32, width uint32, height uint32) {
  11552. if __XftDrawRenderPrepare(tls, draw) != 0 {
  11553. libxrender.XXRenderFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, int32(m_PictOpSrc), (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, color+8, x, y, width, height)
  11554. } else {
  11555. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11556. /* note: not XftRectCore() */
  11557. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  11558. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, x, y, width, height)
  11559. }
  11560. }
  11561. }
  11562. func XXftDrawSetClip(tls *libc.TLS, draw uintptr, r TRegion) (r1 int32) {
  11563. bp := tls.Alloc(80)
  11564. defer tls.Free(80)
  11565. var n TRegion
  11566. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  11567. _ = n
  11568. n = libc.UintptrFromInt32(0)
  11569. /*
  11570. * Check for quick exits
  11571. */
  11572. if !(r != 0) && (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type == int32(_XftClipTypeNone) {
  11573. return int32(m_True)
  11574. }
  11575. if r != 0 && (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type == int32(_XftClipTypeRegion) && libx11.XXEqualRegion(tls, r, *(*TRegion)(unsafe.Pointer(draw + 56))) != 0 {
  11576. return int32(m_True)
  11577. }
  11578. /*
  11579. * Duplicate the region so future changes can be short circuited
  11580. */
  11581. if r != 0 {
  11582. n = libx11.XXCreateRegion(tls)
  11583. if n != 0 {
  11584. if !(libx11.XXUnionRegion(tls, n, r, n) != 0) {
  11585. libx11.XXDestroyRegion(tls, n)
  11586. return m_False
  11587. }
  11588. }
  11589. }
  11590. /*
  11591. * Destroy existing clip
  11592. */
  11593. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11594. case int32(_XftClipTypeRegion):
  11595. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11596. case int32(_XftClipTypeRectangles):
  11597. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 56)))
  11598. case int32(_XftClipTypeNone):
  11599. break
  11600. }
  11601. /*
  11602. * Set the clip
  11603. */
  11604. if n != 0 {
  11605. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeRegion)
  11606. *(*TRegion)(unsafe.Pointer(draw + 56)) = n
  11607. } else {
  11608. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  11609. }
  11610. /*
  11611. * Apply new clip to existing objects
  11612. */
  11613. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11614. if n != 0 {
  11615. libxrender.XXRenderSetPictureClipRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, n)
  11616. } else {
  11617. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fclip_mask = uint64(0)
  11618. libxrender.XXRenderChangePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, libc.Uint64FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(6)), bp)
  11619. }
  11620. }
  11621. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11622. if n != 0 {
  11623. libx11.XXSetRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11624. } else {
  11625. libx11.XXSetClipMask(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, uint64(0))
  11626. }
  11627. }
  11628. return int32(m_True)
  11629. }
  11630. func XXftDrawSetClipRectangles(tls *libc.TLS, draw uintptr, xOrigin int32, yOrigin int32, rects uintptr, n int32) (r int32) {
  11631. var new1 uintptr
  11632. _ = new1
  11633. new1 = libc.UintptrFromInt32(0)
  11634. /*
  11635. * Check for quick exit
  11636. */
  11637. 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) {
  11638. return int32(m_True)
  11639. }
  11640. /*
  11641. * Duplicate the region so future changes can be short circuited
  11642. */
  11643. new1 = libc.Xmalloc(tls, uint64(12)+libc.Uint64FromInt32(n)*uint64(8))
  11644. if !(new1 != 0) {
  11645. return m_False
  11646. }
  11647. (*TXftClipRect)(unsafe.Pointer(new1)).Fn = n
  11648. (*TXftClipRect)(unsafe.Pointer(new1)).FxOrigin = xOrigin
  11649. (*TXftClipRect)(unsafe.Pointer(new1)).FyOrigin = yOrigin
  11650. libc.Xmemcpy(tls, new1+libc.UintptrFromInt32(1)*12, rects, libc.Uint64FromInt32(n)*uint64(8))
  11651. /*
  11652. * Destroy existing clip
  11653. */
  11654. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11655. case int32(_XftClipTypeRegion):
  11656. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 56)))
  11657. case int32(_XftClipTypeRectangles):
  11658. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 56)))
  11659. case int32(_XftClipTypeNone):
  11660. break
  11661. }
  11662. /*
  11663. * Set the clip
  11664. */
  11665. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeRectangles)
  11666. *(*uintptr)(unsafe.Pointer(draw + 56)) = new1
  11667. /*
  11668. * Apply new clip to existing objects
  11669. */
  11670. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11671. 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)
  11672. }
  11673. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11674. 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)
  11675. }
  11676. return int32(m_True)
  11677. }
  11678. func XXftDrawSetSubwindowMode(tls *libc.TLS, draw uintptr, mode int32) {
  11679. bp := tls.Alloc(80)
  11680. defer tls.Free(80)
  11681. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  11682. if mode == (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode {
  11683. return
  11684. }
  11685. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = mode
  11686. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11687. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fsubwindow_mode = mode
  11688. libxrender.XXRenderChangePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, libc.Uint64FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(8)), bp)
  11689. }
  11690. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11691. libx11.XXSetSubwindowMode(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, mode)
  11692. }
  11693. }
  11694. const m_VisualIDMask2 = 0x1
  11695. const m_VisualScreenMask2 = 0x2
  11696. /* xftxlfd.c */
  11697. func XXftGlyphExtents(tls *libc.TLS, dpy uintptr, pub uintptr, glyphs uintptr, nglyphs int32, extents uintptr) {
  11698. bp := tls.Alloc(1040)
  11699. defer tls.Free(1040)
  11700. var bottom, left, n, overall_bottom, overall_left, overall_right, overall_top, right, top, x, y, v1, v6 int32
  11701. var font, g, xftg, v2, v3, v4, v7, v8 uintptr
  11702. var glyph TFT_UInt
  11703. var glyphs_loaded TFcBool
  11704. var v5, v9 bool
  11705. var _ /* missing at bp+0 */ [256]TFT_UInt
  11706. var _ /* nmissing at bp+1024 */ int32
  11707. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  11708. font = pub
  11709. g = glyphs
  11710. n = nglyphs
  11711. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  11712. glyphs_loaded = m_FcFalse
  11713. for {
  11714. v1 = n
  11715. n--
  11716. if !(v1 != 0) {
  11717. break
  11718. }
  11719. v2 = g
  11720. g += 4
  11721. if XXftFontCheckGlyph(tls, dpy, pub, m_FcFalse, *(*TFT_UInt)(unsafe.Pointer(v2)), bp, bp+1024) != 0 {
  11722. glyphs_loaded = int32(m_FcTrue)
  11723. }
  11724. }
  11725. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  11726. XXftFontLoadGlyphs(tls, dpy, pub, m_FcFalse, bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  11727. }
  11728. g = glyphs
  11729. n = nglyphs
  11730. xftg = libc.UintptrFromInt32(0)
  11731. for n != 0 {
  11732. v3 = g
  11733. g += 4
  11734. glyph = *(*TFT_UInt)(unsafe.Pointer(v3))
  11735. n--
  11736. if v5 = glyph < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; v5 {
  11737. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  11738. xftg = v4
  11739. }
  11740. if v5 && v4 != 0 {
  11741. break
  11742. }
  11743. }
  11744. if n == 0 {
  11745. if xftg != 0 {
  11746. *(*TXGlyphInfo)(unsafe.Pointer(extents)) = (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics
  11747. } else {
  11748. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11749. }
  11750. } else {
  11751. x = 0
  11752. y = 0
  11753. overall_left = x - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  11754. overall_top = y - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  11755. overall_right = overall_left + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  11756. overall_bottom = overall_top + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  11757. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  11758. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  11759. for {
  11760. v6 = n
  11761. n--
  11762. if !(v6 != 0) {
  11763. break
  11764. }
  11765. v7 = g
  11766. g += 4
  11767. glyph = *(*TFT_UInt)(unsafe.Pointer(v7))
  11768. if v9 = glyph < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; v9 {
  11769. v8 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  11770. xftg = v8
  11771. }
  11772. if v9 && v8 != 0 {
  11773. left = x - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  11774. top = y - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  11775. right = left + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  11776. bottom = top + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  11777. if left < overall_left {
  11778. overall_left = left
  11779. }
  11780. if top < overall_top {
  11781. overall_top = top
  11782. }
  11783. if right > overall_right {
  11784. overall_right = right
  11785. }
  11786. if bottom > overall_bottom {
  11787. overall_bottom = bottom
  11788. }
  11789. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  11790. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  11791. }
  11792. }
  11793. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fx = int16(-overall_left)
  11794. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fy = int16(-overall_top)
  11795. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fwidth = libc.Uint16FromInt32(overall_right - overall_left)
  11796. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fheight = libc.Uint16FromInt32(overall_bottom - overall_top)
  11797. (*TXGlyphInfo)(unsafe.Pointer(extents)).FxOff = int16(x)
  11798. (*TXGlyphInfo)(unsafe.Pointer(extents)).FyOff = int16(y)
  11799. }
  11800. if glyphs_loaded != 0 {
  11801. X_XftFontManageMemory(tls, dpy, pub)
  11802. }
  11803. }
  11804. func XXftTextExtents8(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11805. bp := tls.Alloc(4096)
  11806. defer tls.Free(4096)
  11807. var glyphs, v1 uintptr
  11808. var i int32
  11809. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11810. _, _, _ = glyphs, i, v1
  11811. if len1 < 0 {
  11812. return
  11813. }
  11814. if len1 <= int32(m_NUM_LOCAL) {
  11815. v1 = bp
  11816. glyphs = v1
  11817. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  11818. } else {
  11819. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11820. if !(glyphs != 0) {
  11821. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11822. return
  11823. }
  11824. }
  11825. i = 0
  11826. for {
  11827. if !(i < len1) {
  11828. break
  11829. }
  11830. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  11831. goto _2
  11832. _2:
  11833. ;
  11834. i++
  11835. }
  11836. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11837. if glyphs != bp {
  11838. libc.Xfree(tls, glyphs)
  11839. }
  11840. }
  11841. func XXftTextExtents16(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11842. bp := tls.Alloc(4096)
  11843. defer tls.Free(4096)
  11844. var glyphs, v1 uintptr
  11845. var i int32
  11846. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11847. _, _, _ = glyphs, i, v1
  11848. if len1 < 0 {
  11849. return
  11850. }
  11851. if len1 <= int32(m_NUM_LOCAL) {
  11852. v1 = bp
  11853. glyphs = v1
  11854. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  11855. } else {
  11856. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11857. if !(glyphs != 0) {
  11858. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11859. return
  11860. }
  11861. }
  11862. i = 0
  11863. for {
  11864. if !(i < len1) {
  11865. break
  11866. }
  11867. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  11868. goto _2
  11869. _2:
  11870. ;
  11871. i++
  11872. }
  11873. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11874. if glyphs != bp {
  11875. libc.Xfree(tls, glyphs)
  11876. }
  11877. }
  11878. func XXftTextExtents32(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11879. bp := tls.Alloc(4096)
  11880. defer tls.Free(4096)
  11881. var glyphs, v1 uintptr
  11882. var i int32
  11883. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11884. _, _, _ = glyphs, i, v1
  11885. if len1 < 0 {
  11886. return
  11887. }
  11888. if len1 <= int32(m_NUM_LOCAL) {
  11889. v1 = bp
  11890. glyphs = v1
  11891. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  11892. } else {
  11893. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  11894. if !(glyphs != 0) {
  11895. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11896. return
  11897. }
  11898. }
  11899. i = 0
  11900. for {
  11901. if !(i < len1) {
  11902. break
  11903. }
  11904. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  11905. goto _2
  11906. _2:
  11907. ;
  11908. i++
  11909. }
  11910. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11911. if glyphs != bp {
  11912. libc.Xfree(tls, glyphs)
  11913. }
  11914. }
  11915. func XXftTextExtentsUtf8(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11916. bp := tls.Alloc(4112)
  11917. defer tls.Free(4112)
  11918. var glyphs, glyphs_new, v1 uintptr
  11919. var i, l, size, v2, v4 int32
  11920. var v3 bool
  11921. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11922. var _ /* ucs4 at bp+4096 */ TFcChar32
  11923. _, _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3, v4
  11924. if len1 < 0 {
  11925. return
  11926. }
  11927. i = 0
  11928. v1 = bp
  11929. glyphs = v1
  11930. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  11931. size = int32(m_NUM_LOCAL)
  11932. for {
  11933. if v3 = len1 != 0; v3 {
  11934. v2 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  11935. l = v2
  11936. }
  11937. if !(v3 && v2 > 0) {
  11938. break
  11939. }
  11940. if i == size {
  11941. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*libc.Int32FromInt32(2))*uint64(4))
  11942. if !(glyphs_new != 0) {
  11943. if glyphs != bp {
  11944. libc.Xfree(tls, glyphs)
  11945. }
  11946. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11947. return
  11948. }
  11949. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  11950. size *= int32(2)
  11951. if glyphs != bp {
  11952. libc.Xfree(tls, glyphs)
  11953. }
  11954. glyphs = glyphs_new
  11955. }
  11956. v4 = i
  11957. i++
  11958. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v4)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11959. string1 += uintptr(l)
  11960. len1 -= l
  11961. }
  11962. XXftGlyphExtents(tls, dpy, pub, glyphs, i, extents)
  11963. if glyphs != bp {
  11964. libc.Xfree(tls, glyphs)
  11965. }
  11966. }
  11967. func XXftTextExtentsUtf16(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, endian TFcEndian, len1 int32, extents uintptr) {
  11968. bp := tls.Alloc(4112)
  11969. defer tls.Free(4112)
  11970. var glyphs, glyphs_new, v1 uintptr
  11971. var i, l, size, v2, v4 int32
  11972. var v3 bool
  11973. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11974. var _ /* ucs4 at bp+4096 */ TFcChar32
  11975. _, _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3, v4
  11976. if len1 < 0 {
  11977. return
  11978. }
  11979. i = 0
  11980. v1 = bp
  11981. glyphs = v1
  11982. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  11983. size = int32(m_NUM_LOCAL)
  11984. for {
  11985. if v3 = len1 != 0; v3 {
  11986. v2 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  11987. l = v2
  11988. }
  11989. if !(v3 && v2 > 0) {
  11990. break
  11991. }
  11992. if i == size {
  11993. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*libc.Int32FromInt32(2))*uint64(4))
  11994. if !(glyphs_new != 0) {
  11995. if glyphs != bp {
  11996. libc.Xfree(tls, glyphs)
  11997. }
  11998. libc.Xmemset(tls, extents, int32('\000'), uint64(12))
  11999. return
  12000. }
  12001. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  12002. size *= int32(2)
  12003. if glyphs != bp {
  12004. libc.Xfree(tls, glyphs)
  12005. }
  12006. glyphs = glyphs_new
  12007. }
  12008. v4 = i
  12009. i++
  12010. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v4)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  12011. string1 += uintptr(l)
  12012. len1 -= l
  12013. }
  12014. XXftGlyphExtents(tls, dpy, pub, glyphs, i, extents)
  12015. if glyphs != bp {
  12016. libc.Xfree(tls, glyphs)
  12017. }
  12018. }
  12019. /* xftxlfd.c */
  12020. func XXftFontMatch(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr, result uintptr) (r uintptr) {
  12021. var match, new1 uintptr
  12022. _, _ = match, new1
  12023. if !(XXftInit(tls, libc.UintptrFromInt32(0)) != 0) {
  12024. return libc.UintptrFromInt32(0)
  12025. }
  12026. new1 = libfontconfig.XFcPatternDuplicate(tls, pattern)
  12027. if !(new1 != 0) {
  12028. return libc.UintptrFromInt32(0)
  12029. }
  12030. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  12031. libc.Xprintf(tls, __ccgo_ts+689, 0)
  12032. libfontconfig.XFcPatternPrint(tls, new1)
  12033. }
  12034. libfontconfig.XFcConfigSubstitute(tls, libc.UintptrFromInt32(0), new1, int32(_FcMatchPattern))
  12035. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  12036. libc.Xprintf(tls, __ccgo_ts+711, 0)
  12037. libfontconfig.XFcPatternPrint(tls, new1)
  12038. }
  12039. XXftDefaultSubstitute(tls, dpy, screen, new1)
  12040. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  12041. libc.Xprintf(tls, __ccgo_ts+754, 0)
  12042. libfontconfig.XFcPatternPrint(tls, new1)
  12043. }
  12044. match = libfontconfig.XFcFontMatch(tls, libc.UintptrFromInt32(0), new1, result)
  12045. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  12046. libc.Xprintf(tls, __ccgo_ts+799, 0)
  12047. libfontconfig.XFcPatternPrint(tls, match)
  12048. }
  12049. libfontconfig.XFcPatternDestroy(tls, new1)
  12050. return match
  12051. }
  12052. func XXftFontOpen(tls *libc.TLS, dpy uintptr, screen int32, va1 uintptr) (r uintptr) {
  12053. bp := tls.Alloc(16)
  12054. defer tls.Free(16)
  12055. var font, match, pat uintptr
  12056. var va Tva_list
  12057. var _ /* result at bp+0 */ TFcResult
  12058. _, _, _, _ = font, match, pat, va
  12059. va = va1
  12060. pat = libfontconfig.XFcPatternVaBuild(tls, libc.UintptrFromInt32(0), va)
  12061. _ = va
  12062. if !(pat != 0) {
  12063. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12064. libc.Xprintf(tls, __ccgo_ts+820, 0)
  12065. }
  12066. return libc.UintptrFromInt32(0)
  12067. }
  12068. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  12069. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12070. libc.Xprintf(tls, __ccgo_ts+859, 0)
  12071. libfontconfig.XFcPatternPrint(tls, pat)
  12072. if match != 0 {
  12073. libc.Xprintf(tls, __ccgo_ts+868, 0)
  12074. libfontconfig.XFcPatternPrint(tls, match)
  12075. } else {
  12076. libc.Xprintf(tls, __ccgo_ts+875, 0)
  12077. }
  12078. }
  12079. libfontconfig.XFcPatternDestroy(tls, pat)
  12080. if !(match != 0) {
  12081. return libc.UintptrFromInt32(0)
  12082. }
  12083. font = XXftFontOpenPattern(tls, dpy, match)
  12084. if !(font != 0) {
  12085. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12086. libc.Xprintf(tls, __ccgo_ts+885, 0)
  12087. }
  12088. libfontconfig.XFcPatternDestroy(tls, match)
  12089. }
  12090. return font
  12091. }
  12092. func XXftFontOpenName(tls *libc.TLS, dpy uintptr, screen int32, name uintptr) (r uintptr) {
  12093. bp := tls.Alloc(32)
  12094. defer tls.Free(32)
  12095. var font, match, pat uintptr
  12096. var _ /* result at bp+0 */ TFcResult
  12097. _, _, _ = font, match, pat
  12098. pat = libfontconfig.XFcNameParse(tls, name)
  12099. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12100. libc.Xprintf(tls, __ccgo_ts+894, libc.VaList(bp+16, name))
  12101. if pat != 0 {
  12102. libfontconfig.XFcPatternPrint(tls, pat)
  12103. } else {
  12104. libc.Xprintf(tls, __ccgo_ts+917, 0)
  12105. }
  12106. }
  12107. if !(pat != 0) {
  12108. return libc.UintptrFromInt32(0)
  12109. }
  12110. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  12111. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12112. if match != 0 {
  12113. libc.Xprintf(tls, __ccgo_ts+868, 0)
  12114. libfontconfig.XFcPatternPrint(tls, match)
  12115. } else {
  12116. libc.Xprintf(tls, __ccgo_ts+875, 0)
  12117. }
  12118. }
  12119. libfontconfig.XFcPatternDestroy(tls, pat)
  12120. if !(match != 0) {
  12121. return libc.UintptrFromInt32(0)
  12122. }
  12123. font = XXftFontOpenPattern(tls, dpy, match)
  12124. if !(font != 0) {
  12125. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12126. libc.Xprintf(tls, __ccgo_ts+885, 0)
  12127. }
  12128. libfontconfig.XFcPatternDestroy(tls, match)
  12129. }
  12130. return font
  12131. }
  12132. func XXftFontOpenXlfd(tls *libc.TLS, dpy uintptr, screen int32, xlfd uintptr) (r uintptr) {
  12133. bp := tls.Alloc(32)
  12134. defer tls.Free(32)
  12135. var font, match, pat uintptr
  12136. var _ /* result at bp+0 */ TFcResult
  12137. _, _, _ = font, match, pat
  12138. pat = XXftXlfdParse(tls, xlfd, m_FcFalse, m_FcFalse)
  12139. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12140. libc.Xprintf(tls, __ccgo_ts+931, libc.VaList(bp+16, xlfd))
  12141. if pat != 0 {
  12142. libc.Xprintf(tls, __ccgo_ts+954, 0)
  12143. } else {
  12144. libfontconfig.XFcPatternPrint(tls, pat)
  12145. }
  12146. }
  12147. if !(pat != 0) {
  12148. return libc.UintptrFromInt32(0)
  12149. }
  12150. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  12151. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12152. if match != 0 {
  12153. libc.Xprintf(tls, __ccgo_ts+868, 0)
  12154. libfontconfig.XFcPatternPrint(tls, match)
  12155. } else {
  12156. libc.Xprintf(tls, __ccgo_ts+875, 0)
  12157. }
  12158. }
  12159. libfontconfig.XFcPatternDestroy(tls, pat)
  12160. if !(match != 0) {
  12161. return libc.UintptrFromInt32(0)
  12162. }
  12163. font = XXftFontOpenPattern(tls, dpy, match)
  12164. if !(font != 0) {
  12165. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12166. libc.Xprintf(tls, __ccgo_ts+885, 0)
  12167. }
  12168. libfontconfig.XFcPatternDestroy(tls, match)
  12169. }
  12170. return font
  12171. }
  12172. const m_FT_LOAD_DEFAULT1 = 0
  12173. const m_UINT_MAX1 = 4294967295
  12174. const m_XFT_EMBEDDED_BITMAP = "embeddedbitmap"
  12175. /*
  12176. * List of all open files (each face in a file is managed separately)
  12177. */
  12178. var __XftFtFiles uintptr
  12179. var _XftMaxFreeTypeFiles = int32(5)
  12180. func __XftGetFile(tls *libc.TLS, file uintptr, id int32) (r uintptr) {
  12181. bp := tls.Alloc(32)
  12182. defer tls.Free(32)
  12183. var f uintptr
  12184. var v2, v3, v4 TFT_Fixed
  12185. _, _, _, _ = f, v2, v3, v4
  12186. if !(XXftInitFtLibrary(tls) != 0) {
  12187. return libc.UintptrFromInt32(0)
  12188. }
  12189. f = __XftFtFiles
  12190. for {
  12191. if !(f != 0) {
  12192. break
  12193. }
  12194. if !(libc.Xstrcmp(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, file) != 0) && (*TXftFtFile)(unsafe.Pointer(f)).Fid == id {
  12195. (*TXftFtFile)(unsafe.Pointer(f)).Fref++
  12196. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12197. libc.Xprintf(tls, __ccgo_ts+968, libc.VaList(bp+8, file, id, (*TXftFtFile)(unsafe.Pointer(f)).Fref))
  12198. }
  12199. return f
  12200. }
  12201. goto _1
  12202. _1:
  12203. ;
  12204. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12205. }
  12206. f = libc.Xmalloc(tls, uint64(96)+libc.Xstrlen(tls, file)+uint64(1))
  12207. if !(f != 0) {
  12208. return libc.UintptrFromInt32(0)
  12209. }
  12210. XXftMemAlloc(tls, int32(_XFT_MEM_FILE), uint64(96)+libc.Xstrlen(tls, file)+uint64(1))
  12211. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12212. libc.Xprintf(tls, __ccgo_ts+1006, libc.VaList(bp+8, file, id))
  12213. }
  12214. (*TXftFtFile)(unsafe.Pointer(f)).Fnext = __XftFtFiles
  12215. __XftFtFiles = f
  12216. (*TXftFtFile)(unsafe.Pointer(f)).Fref = int32(1)
  12217. (*TXftFtFile)(unsafe.Pointer(f)).Ffile = f + libc.UintptrFromInt32(1)*96
  12218. libc.Xstrcpy(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, file)
  12219. (*TXftFtFile)(unsafe.Pointer(f)).Fid = id
  12220. (*TXftFtFile)(unsafe.Pointer(f)).Flock = 0
  12221. (*TXftFtFile)(unsafe.Pointer(f)).Fface = libc.UintptrFromInt32(0)
  12222. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  12223. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  12224. v4 = libc.Int64FromInt32(0)
  12225. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v4
  12226. v3 = v4
  12227. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v3
  12228. v2 = v3
  12229. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v2
  12230. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v2
  12231. return f
  12232. }
  12233. func __XftGetFaceFile(tls *libc.TLS, face TFT_Face) (r uintptr) {
  12234. var f uintptr
  12235. var v1, v2, v3 TFT_Fixed
  12236. _, _, _, _ = f, v1, v2, v3
  12237. f = libc.Xmalloc(tls, uint64(96))
  12238. if !(f != 0) {
  12239. return libc.UintptrFromInt32(0)
  12240. }
  12241. XXftMemAlloc(tls, int32(_XFT_MEM_FILE), uint64(96))
  12242. (*TXftFtFile)(unsafe.Pointer(f)).Fnext = libc.UintptrFromInt32(0)
  12243. (*TXftFtFile)(unsafe.Pointer(f)).Fref = int32(1)
  12244. (*TXftFtFile)(unsafe.Pointer(f)).Ffile = libc.UintptrFromInt32(0)
  12245. (*TXftFtFile)(unsafe.Pointer(f)).Fid = 0
  12246. (*TXftFtFile)(unsafe.Pointer(f)).Flock = 0
  12247. (*TXftFtFile)(unsafe.Pointer(f)).Fface = face
  12248. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  12249. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  12250. v3 = libc.Int64FromInt32(0)
  12251. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v3
  12252. v2 = v3
  12253. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v2
  12254. v1 = v2
  12255. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v1
  12256. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v1
  12257. return f
  12258. }
  12259. func __XftNumFiles(tls *libc.TLS) (r int32) {
  12260. var count int32
  12261. var f uintptr
  12262. _, _ = count, f
  12263. count = 0
  12264. f = __XftFtFiles
  12265. for {
  12266. if !(f != 0) {
  12267. break
  12268. }
  12269. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 && !((*TXftFtFile)(unsafe.Pointer(f)).Flock != 0) {
  12270. count++
  12271. }
  12272. goto _1
  12273. _1:
  12274. ;
  12275. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12276. }
  12277. return count
  12278. }
  12279. func __XftNthFile(tls *libc.TLS, n int32) (r uintptr) {
  12280. var count, v2 int32
  12281. var f uintptr
  12282. _, _, _ = count, f, v2
  12283. count = 0
  12284. f = __XftFtFiles
  12285. for {
  12286. if !(f != 0) {
  12287. break
  12288. }
  12289. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 && !((*TXftFtFile)(unsafe.Pointer(f)).Flock != 0) {
  12290. v2 = count
  12291. count++
  12292. if v2 == n {
  12293. break
  12294. }
  12295. }
  12296. goto _1
  12297. _1:
  12298. ;
  12299. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12300. }
  12301. return f
  12302. }
  12303. func __XftUncacheFiles(tls *libc.TLS) {
  12304. bp := tls.Alloc(32)
  12305. defer tls.Free(32)
  12306. var f uintptr
  12307. var n, v1, v2 int32
  12308. _, _, _, _ = f, n, v1, v2
  12309. for {
  12310. v1 = __XftNumFiles(tls)
  12311. n = v1
  12312. if !(v1 > _XftMaxFreeTypeFiles) {
  12313. break
  12314. }
  12315. if n != 0 {
  12316. v2 = libc.Xrand(tls) % n
  12317. } else {
  12318. v2 = 0
  12319. }
  12320. f = __XftNthFile(tls, v2)
  12321. if f != 0 {
  12322. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12323. libc.Xprintf(tls, __ccgo_ts+1034, libc.VaList(bp+8, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, (*TXftFtFile)(unsafe.Pointer(f)).Fid))
  12324. }
  12325. libfreetype.XFT_Done_Face(tls, (*TXftFtFile)(unsafe.Pointer(f)).Fface)
  12326. (*TXftFtFile)(unsafe.Pointer(f)).Fface = libc.UintptrFromInt32(0)
  12327. }
  12328. }
  12329. }
  12330. func __XftLockFile(tls *libc.TLS, f uintptr) (r TFT_Face) {
  12331. bp := tls.Alloc(32)
  12332. defer tls.Free(32)
  12333. var v1, v2, v3 TFT_Fixed
  12334. _, _, _ = v1, v2, v3
  12335. (*TXftFtFile)(unsafe.Pointer(f)).Flock++
  12336. if !((*TXftFtFile)(unsafe.Pointer(f)).Fface != 0) {
  12337. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12338. libc.Xprintf(tls, __ccgo_ts+1065, libc.VaList(bp+8, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, (*TXftFtFile)(unsafe.Pointer(f)).Fid))
  12339. }
  12340. if libfreetype.XFT_New_Face(tls, X_XftFTlibrary, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, int64((*TXftFtFile)(unsafe.Pointer(f)).Fid), f+88) != 0 {
  12341. (*TXftFtFile)(unsafe.Pointer(f)).Flock--
  12342. }
  12343. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  12344. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  12345. v3 = libc.Int64FromInt32(0)
  12346. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v3
  12347. v2 = v3
  12348. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v2
  12349. v1 = v2
  12350. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v1
  12351. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v1
  12352. __XftUncacheFiles(tls)
  12353. }
  12354. return (*TXftFtFile)(unsafe.Pointer(f)).Fface
  12355. }
  12356. func __XftLockError(tls *libc.TLS, reason uintptr) {
  12357. bp := tls.Alloc(16)
  12358. defer tls.Free(16)
  12359. libc.Xfprintf(tls, libc.Xstderr, __ccgo_ts+1085, libc.VaList(bp+8, reason))
  12360. }
  12361. func __XftUnlockFile(tls *libc.TLS, f uintptr) {
  12362. var v1 int32
  12363. var v2 uintptr
  12364. _, _ = v1, v2
  12365. v2 = f + 80
  12366. *(*int32)(unsafe.Pointer(v2))--
  12367. v1 = *(*int32)(unsafe.Pointer(v2))
  12368. if v1 < 0 {
  12369. __XftLockError(tls, __ccgo_ts+1108)
  12370. }
  12371. }
  12372. func X_XftSetFace(tls *libc.TLS, f uintptr, xsize TFT_F26Dot6, ysize TFT_F26Dot6, matrix uintptr) (r TFcBool) {
  12373. bp := tls.Alloc(48)
  12374. defer tls.Free(48)
  12375. var best, i int32
  12376. var face TFT_Face
  12377. var v2, v3, v4, v5, v6, v7 int64
  12378. var v8, v9 bool
  12379. _, _, _, _, _, _, _, _, _, _, _ = best, face, i, v2, v3, v4, v5, v6, v7, v8, v9
  12380. face = (*TXftFtFile)(unsafe.Pointer(f)).Fface
  12381. if (*TXftFtFile)(unsafe.Pointer(f)).Fxsize != xsize || (*TXftFtFile)(unsafe.Pointer(f)).Fysize != ysize {
  12382. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  12383. libc.Xprintf(tls, __ccgo_ts+1130, libc.VaList(bp+8, int32(xsize>>libc.Int32FromInt32(6)), int32(ysize>>libc.Int32FromInt32(6)), int32(xsize), int32(ysize)))
  12384. }
  12385. /*
  12386. * Bitmap only faces must match exactly, so find the closest
  12387. * one (height dominant search)
  12388. */
  12389. if !((*TFT_FaceRec_)(unsafe.Pointer(face)).Fface_flags&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(0)) != 0) {
  12390. best = 0
  12391. i = int32(1)
  12392. for {
  12393. if !(i < (*TFT_FaceRec_)(unsafe.Pointer(face)).Fnum_fixed_sizes) {
  12394. break
  12395. }
  12396. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem < 0 {
  12397. v2 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem)
  12398. } else {
  12399. v2 = 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. v3 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem)
  12403. } else {
  12404. v3 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem
  12405. }
  12406. if v9 = v2 < v3; !v9 {
  12407. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem < 0 {
  12408. v4 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem)
  12409. } else {
  12410. v4 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fy_ppem
  12411. }
  12412. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem < 0 {
  12413. v5 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem)
  12414. } else {
  12415. v5 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fy_ppem
  12416. }
  12417. if v8 = v4 == v5; v8 {
  12418. if xsize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fx_ppem < 0 {
  12419. v6 = -(xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fx_ppem)
  12420. } else {
  12421. v6 = xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*32))).Fx_ppem
  12422. }
  12423. if xsize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fx_ppem < 0 {
  12424. v7 = -(xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fx_ppem)
  12425. } else {
  12426. v7 = xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*32))).Fx_ppem
  12427. }
  12428. }
  12429. }
  12430. if v9 || v8 && v6 < v7 {
  12431. best = i
  12432. }
  12433. goto _1
  12434. _1:
  12435. ;
  12436. i++
  12437. }
  12438. /*
  12439. * Freetype 2.1.7 and earlier used width/height
  12440. * for matching sizes in the BDF and PCF loaders.
  12441. * This has been fixed for 2.1.8. Because BDF and PCF
  12442. * files have but a single strike per file, we can
  12443. * simply try both sizes.
  12444. */
  12445. 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 {
  12446. return m_False
  12447. }
  12448. } else {
  12449. if libfreetype.XFT_Set_Char_Size(tls, face, xsize, ysize, uint32(0), uint32(0)) != 0 {
  12450. return m_False
  12451. }
  12452. }
  12453. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = xsize
  12454. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = ysize
  12455. }
  12456. 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) {
  12457. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  12458. 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)))
  12459. }
  12460. libfreetype.XFT_Set_Transform(tls, face, matrix, libc.UintptrFromInt32(0))
  12461. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix = *(*TFT_Matrix)(unsafe.Pointer(matrix))
  12462. }
  12463. return int32(m_True)
  12464. }
  12465. func __XftReleaseFile(tls *libc.TLS, f uintptr) {
  12466. var prev, v2 uintptr
  12467. var v1 int32
  12468. var v4 uint64
  12469. _, _, _, _ = prev, v1, v2, v4
  12470. v2 = f + 8
  12471. *(*int32)(unsafe.Pointer(v2))--
  12472. v1 = *(*int32)(unsafe.Pointer(v2))
  12473. if v1 != 0 {
  12474. return
  12475. }
  12476. if (*TXftFtFile)(unsafe.Pointer(f)).Flock != 0 {
  12477. __XftLockError(tls, __ccgo_ts+1196)
  12478. }
  12479. if (*TXftFtFile)(unsafe.Pointer(f)).Ffile != 0 {
  12480. prev = uintptr(unsafe.Pointer(&__XftFtFiles))
  12481. for {
  12482. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  12483. break
  12484. }
  12485. if *(*uintptr)(unsafe.Pointer(prev)) == f {
  12486. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12487. break
  12488. }
  12489. goto _3
  12490. _3:
  12491. ;
  12492. prev = *(*uintptr)(unsafe.Pointer(prev))
  12493. }
  12494. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 {
  12495. libfreetype.XFT_Done_Face(tls, (*TXftFtFile)(unsafe.Pointer(f)).Fface)
  12496. }
  12497. }
  12498. if (*TXftFtFile)(unsafe.Pointer(f)).Ffile != 0 {
  12499. v4 = libc.Xstrlen(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile) + uint64(1)
  12500. } else {
  12501. v4 = uint64(0)
  12502. }
  12503. XXftMemFree(tls, int32(_XFT_MEM_FILE), libc.Uint64FromInt64(96)+v4)
  12504. libc.Xfree(tls, f)
  12505. }
  12506. /*
  12507. * Find a prime larger than the minimum reasonable hash size
  12508. */
  12509. func __XftSqrt(tls *libc.TLS, a TFcChar32) (r TFcChar32) {
  12510. var h, l, m TFcChar32
  12511. _, _, _ = h, l, m
  12512. l = uint32(2)
  12513. h = a / uint32(2)
  12514. for h-l > uint32(1) {
  12515. m = (h + l) >> int32(1)
  12516. if m*m < a {
  12517. l = m
  12518. } else {
  12519. h = m
  12520. }
  12521. }
  12522. return h
  12523. }
  12524. func __XftIsPrime(tls *libc.TLS, i TFcChar32) (r TFcBool) {
  12525. var l, t TFcChar32
  12526. _, _ = l, t
  12527. if i < uint32(2) {
  12528. return m_FcFalse
  12529. }
  12530. if i&uint32(1) == uint32(0) {
  12531. if i == uint32(2) {
  12532. return int32(m_FcTrue)
  12533. }
  12534. return m_FcFalse
  12535. }
  12536. l = __XftSqrt(tls, i) + uint32(1)
  12537. t = uint32(3)
  12538. for {
  12539. if !(t <= l) {
  12540. break
  12541. }
  12542. if i%t == uint32(0) {
  12543. return m_FcFalse
  12544. }
  12545. goto _1
  12546. _1:
  12547. ;
  12548. t += uint32(2)
  12549. }
  12550. return int32(m_FcTrue)
  12551. }
  12552. func __XftHashSize(tls *libc.TLS, num_unicode TFcChar32) (r TFcChar32) {
  12553. var hash TFcChar32
  12554. _ = hash
  12555. /* at least 31.25 % extra space */
  12556. hash = num_unicode + num_unicode>>libc.Int32FromInt32(2) + num_unicode>>libc.Int32FromInt32(4)
  12557. if hash&uint32(1) == uint32(0) {
  12558. hash++
  12559. }
  12560. for !(__XftIsPrime(tls, hash) != 0) {
  12561. hash += uint32(2)
  12562. }
  12563. return hash
  12564. }
  12565. func XXftLockFace(tls *libc.TLS, public uintptr) (r TFT_Face) {
  12566. var face TFT_Face
  12567. var fi, font uintptr
  12568. _, _, _ = face, fi, font
  12569. font = public
  12570. fi = font + 48
  12571. face = __XftLockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12572. /*
  12573. * Make sure the face is usable at the requested size
  12574. */
  12575. if face != 0 && !(X_XftSetFace(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile, (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize, (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize, fi+56) != 0) {
  12576. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12577. face = libc.UintptrFromInt32(0)
  12578. }
  12579. return face
  12580. }
  12581. func XXftUnlockFace(tls *libc.TLS, public uintptr) {
  12582. var font uintptr
  12583. _ = font
  12584. font = public
  12585. __XftUnlockFile(tls, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ffile)
  12586. }
  12587. func _XftFontInfoFill(tls *libc.TLS, dpy uintptr, pattern uintptr, fi uintptr) (r TFcBool) {
  12588. bp := tls.Alloc(144)
  12589. defer tls.Free(144)
  12590. var hash TFcChar32
  12591. var hashp, info, v1, v12, p10, p6, p7, p8, p9 uintptr
  12592. var mid, nhash, v11 int32
  12593. var v2, v3 TFT_Fixed
  12594. var v4, v5 float64
  12595. var _ /* aspect at bp+24 */ float64
  12596. var _ /* autohint at bp+80 */ TFcBool
  12597. var _ /* bitmap at bp+104 */ TFcBool
  12598. var _ /* dsize at bp+16 */ float64
  12599. var _ /* face at bp+96 */ TFT_Face
  12600. var _ /* filename at bp+0 */ uintptr
  12601. var _ /* fm1 at bp+40 */ TFcMatrix
  12602. var _ /* font_matrix at bp+32 */ uintptr
  12603. var _ /* global_advance at bp+84 */ TFcBool
  12604. var _ /* hint_style at bp+88 */ int32
  12605. var _ /* hinting at bp+72 */ TFcBool
  12606. var _ /* id at bp+8 */ int32
  12607. var _ /* vertical_layout at bp+76 */ TFcBool
  12608. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = hash, hashp, info, mid, nhash, v1, v11, v12, v2, v3, v4, v5, p10, p6, p7, p8, p9
  12609. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  12610. if !(info != 0) {
  12611. return m_FcFalse
  12612. }
  12613. /*
  12614. * Initialize the whole XftFontInfo so that padding doesn't interfere with
  12615. * hash or XftFontInfoEqual().
  12616. */
  12617. libc.Xmemset(tls, fi, int32('\000'), uint64(112))
  12618. /*
  12619. * Find the associated file
  12620. */
  12621. switch libfontconfig.XFcPatternGetString(tls, pattern, __ccgo_ts+1225, 0, bp) {
  12622. case int32(_FcResultNoMatch):
  12623. *(*uintptr)(unsafe.Pointer(bp)) = libc.UintptrFromInt32(0)
  12624. case int32(_FcResultMatch):
  12625. default:
  12626. goto bail0
  12627. }
  12628. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1230, 0, bp+8) {
  12629. case int32(_FcResultNoMatch):
  12630. *(*int32)(unsafe.Pointer(bp + 8)) = 0
  12631. case int32(_FcResultMatch):
  12632. default:
  12633. goto bail0
  12634. }
  12635. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  12636. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = __XftGetFile(tls, *(*uintptr)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 8)))
  12637. } else {
  12638. if libfontconfig.XFcPatternGetFTFace(tls, pattern, __ccgo_ts+1236, 0, bp+96) == int32(_FcResultMatch) && *(*TFT_Face)(unsafe.Pointer(bp + 96)) != 0 {
  12639. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = __XftGetFaceFile(tls, *(*TFT_Face)(unsafe.Pointer(bp + 96)))
  12640. }
  12641. }
  12642. if !((*TXftFontInfo)(unsafe.Pointer(fi)).Ffile != 0) {
  12643. goto bail0
  12644. }
  12645. /*
  12646. * Compute pixel size
  12647. */
  12648. if libfontconfig.XFcPatternGetDouble(tls, pattern, __ccgo_ts+1243, 0, bp+16) != int32(_FcResultMatch) {
  12649. goto bail1
  12650. }
  12651. if libfontconfig.XFcPatternGetDouble(tls, pattern, __ccgo_ts+1253, 0, bp+24) != int32(_FcResultMatch) {
  12652. *(*float64)(unsafe.Pointer(bp + 24)) = float64(1)
  12653. }
  12654. (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize = int64(float64(*(*float64)(unsafe.Pointer(bp + 16)) * libc.Float64FromFloat64(64)))
  12655. (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize = int64(float64(float64(*(*float64)(unsafe.Pointer(bp + 16))**(*float64)(unsafe.Pointer(bp + 24))) * libc.Float64FromFloat64(64)))
  12656. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12657. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  12658. v1 = *(*uintptr)(unsafe.Pointer(bp))
  12659. } else {
  12660. v1 = __ccgo_ts + 1260
  12661. }
  12662. libc.Xprintf(tls, __ccgo_ts+1267, libc.VaList(bp+120, v1, *(*int32)(unsafe.Pointer(bp + 8)), *(*float64)(unsafe.Pointer(bp + 16))))
  12663. }
  12664. /*
  12665. * Get antialias value
  12666. */
  12667. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+614, 0, fi+32) {
  12668. case int32(_FcResultNoMatch):
  12669. (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias = int32(m_True)
  12670. case int32(_FcResultMatch):
  12671. default:
  12672. goto bail1
  12673. }
  12674. /*
  12675. * Get rgba value
  12676. */
  12677. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+599, 0, fi+44) {
  12678. case int32(_FcResultNoMatch):
  12679. (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba = m_FC_RGBA_UNKNOWN
  12680. case int32(_FcResultMatch):
  12681. default:
  12682. goto bail1
  12683. }
  12684. /*
  12685. * Get lcd_filter value
  12686. */
  12687. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+604, 0, fi+48) {
  12688. case int32(_FcResultNoMatch):
  12689. (*TXftFontInfo)(unsafe.Pointer(fi)).Flcd_filter = int32(m_FC_LCD_DEFAULT)
  12690. case int32(_FcResultMatch):
  12691. default:
  12692. goto bail1
  12693. }
  12694. /*
  12695. * Get matrix and transform values
  12696. */
  12697. switch libfontconfig.XFcPatternGetMatrix(tls, pattern, __ccgo_ts+1304, 0, bp+32) {
  12698. case int32(_FcResultNoMatch):
  12699. v2 = libc.Int64FromInt32(0x10000)
  12700. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy = v2
  12701. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx = v2
  12702. v3 = libc.Int64FromInt32(0)
  12703. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx = v3
  12704. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy = v3
  12705. case int32(_FcResultMatch):
  12706. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx = int64(float64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fxx))
  12707. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy = int64(float64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fyy))
  12708. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy = int64(float64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fxy))
  12709. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx = int64(float64(libc.Float64FromInt64(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 32)))).Fyx))
  12710. default:
  12711. goto bail1
  12712. }
  12713. mid = int32(1)
  12714. for libfontconfig.XFcPatternGetMatrix(tls, pattern, __ccgo_ts+1304, mid, bp+32) == int32(_FcResultMatch) {
  12715. v4 = libc.Float64FromInt32(1)
  12716. (*TFcMatrix)(unsafe.Pointer(bp + 40)).Fyy = v4
  12717. (*TFcMatrix)(unsafe.Pointer(bp + 40)).Fxx = v4
  12718. v5 = libc.Float64FromInt32(0)
  12719. (*TFcMatrix)(unsafe.Pointer(bp + 40)).Fyx = v5
  12720. (*TFcMatrix)(unsafe.Pointer(bp + 40)).Fxy = v5
  12721. (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fxx = float64((*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx) / libc.Float64FromInt64(0x10000)
  12722. (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fyy = float64((*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy) / libc.Float64FromInt64(0x10000)
  12723. (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fxy = float64((*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy) / libc.Float64FromInt64(0x10000)
  12724. (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fyx = float64((*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx) / libc.Float64FromInt64(0x10000)
  12725. libfontconfig.XFcMatrixMultiply(tls, bp+40, *(*uintptr)(unsafe.Pointer(bp + 32)), bp+40)
  12726. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx = int64(float64(libc.Float64FromInt64(0x10000) * (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fxx))
  12727. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy = int64(float64(libc.Float64FromInt64(0x10000) * (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fyy))
  12728. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy = int64(float64(libc.Float64FromInt64(0x10000) * (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fxy))
  12729. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx = int64(float64(libc.Float64FromInt64(0x10000) * (*(*TFcMatrix)(unsafe.Pointer(bp + 40))).Fyx))
  12730. mid++
  12731. }
  12732. (*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))
  12733. /*
  12734. * Get render value, set to false if no Render extension present
  12735. */
  12736. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  12737. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+592, 0, fi+96) {
  12738. case int32(_FcResultTypeMismatch):
  12739. /*
  12740. * Fontconfig no longer supports xft's custom values in
  12741. * text patterns, so any name specifying render:true or
  12742. * render:false will have an invalid type in the resulting
  12743. * pattern. Just ignore that case so that the app doesn't
  12744. * just fail
  12745. */
  12746. /* fall through ... */
  12747. fallthrough
  12748. case int32(_FcResultNoMatch):
  12749. (*TXftFontInfo)(unsafe.Pointer(fi)).Frender = (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender
  12750. case int32(_FcResultMatch):
  12751. default:
  12752. goto bail1
  12753. }
  12754. } else {
  12755. (*TXftFontInfo)(unsafe.Pointer(fi)).Frender = m_FcFalse
  12756. }
  12757. /*
  12758. * Compute glyph load flags
  12759. */
  12760. (*TXftFontInfo)(unsafe.Pointer(fi)).Fload_flags = int32(libc.Int64FromInt32(m_FT_LOAD_DEFAULT1) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(20))
  12761. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1311, 0, bp+104) {
  12762. case int32(_FcResultNoMatch):
  12763. *(*TFcBool)(unsafe.Pointer(bp + 104)) = m_FcFalse
  12764. case int32(_FcResultMatch):
  12765. default:
  12766. goto bail1
  12767. }
  12768. /* disable bitmaps when anti-aliasing or transforming glyphs */
  12769. if !(*(*TFcBool)(unsafe.Pointer(bp + 104)) != 0) && (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias != 0 || (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  12770. p6 = fi + 92
  12771. *(*TFT_Int)(unsafe.Pointer(p6)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p6))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(3))
  12772. }
  12773. /* disable hinting if requested */
  12774. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+652, 0, bp+72) {
  12775. case int32(_FcResultNoMatch):
  12776. *(*TFcBool)(unsafe.Pointer(bp + 72)) = int32(m_FcTrue)
  12777. case int32(_FcResultMatch):
  12778. default:
  12779. goto bail1
  12780. }
  12781. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+624, 0, fi+36) {
  12782. case int32(_FcResultNoMatch):
  12783. (*TXftFontInfo)(unsafe.Pointer(fi)).Fembolden = m_FcFalse
  12784. case int32(_FcResultMatch):
  12785. default:
  12786. goto bail1
  12787. }
  12788. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+642, 0, bp+88) {
  12789. case int32(_FcResultNoMatch):
  12790. *(*int32)(unsafe.Pointer(bp + 88)) = int32(m_FC_HINT_FULL)
  12791. case int32(_FcResultMatch):
  12792. default:
  12793. goto bail1
  12794. }
  12795. if !(*(*TFcBool)(unsafe.Pointer(bp + 72)) != 0) || *(*int32)(unsafe.Pointer(bp + 88)) == m_FC_HINT_NONE {
  12796. p7 = fi + 92
  12797. *(*TFT_Int)(unsafe.Pointer(p7)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p7))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(1))
  12798. }
  12799. /* Figure out the load target, which modifies the hinting
  12800. * behavior of FreeType based on the intended use of the glyphs.
  12801. */
  12802. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias != 0 {
  12803. if m_FC_HINT_NONE < *(*int32)(unsafe.Pointer(bp + 88)) && *(*int32)(unsafe.Pointer(bp + 88)) < int32(m_FC_HINT_FULL) {
  12804. *(*TFT_Int)(unsafe.Pointer(fi + 92)) |= int32(_FT_RENDER_MODE_LIGHT) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12805. } else {
  12806. /* autohinter will snap stems to integer widths, when
  12807. * the LCD targets are used.
  12808. */
  12809. switch (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba {
  12810. case int32(m_FC_RGBA_RGB):
  12811. fallthrough
  12812. case int32(m_FC_RGBA_BGR):
  12813. *(*TFT_Int)(unsafe.Pointer(fi + 92)) |= int32(_FT_RENDER_MODE_LCD) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12814. case int32(m_FC_RGBA_VRGB):
  12815. fallthrough
  12816. case int32(m_FC_RGBA_VBGR):
  12817. *(*TFT_Int)(unsafe.Pointer(fi + 92)) |= int32(_FT_RENDER_MODE_LCD_V) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12818. break
  12819. }
  12820. }
  12821. } else {
  12822. *(*TFT_Int)(unsafe.Pointer(fi + 92)) |= int32(_FT_RENDER_MODE_MONO) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12823. }
  12824. /* set vertical layout if requested */
  12825. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1326, 0, bp+76) {
  12826. case int32(_FcResultNoMatch):
  12827. *(*TFcBool)(unsafe.Pointer(bp + 76)) = m_FcFalse
  12828. case int32(_FcResultMatch):
  12829. default:
  12830. goto bail1
  12831. }
  12832. if *(*TFcBool)(unsafe.Pointer(bp + 76)) != 0 {
  12833. p8 = fi + 92
  12834. *(*TFT_Int)(unsafe.Pointer(p8)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p8))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(4))
  12835. }
  12836. /* force autohinting if requested */
  12837. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+633, 0, bp+80) {
  12838. case int32(_FcResultNoMatch):
  12839. *(*TFcBool)(unsafe.Pointer(bp + 80)) = m_FcFalse
  12840. case int32(_FcResultMatch):
  12841. default:
  12842. goto bail1
  12843. }
  12844. if *(*TFcBool)(unsafe.Pointer(bp + 80)) != 0 {
  12845. p9 = fi + 92
  12846. *(*TFT_Int)(unsafe.Pointer(p9)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p9))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(5))
  12847. }
  12848. /* disable global advance width (for broken DynaLab TT CJK fonts) */
  12849. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1341, 0, bp+84) {
  12850. case int32(_FcResultNoMatch):
  12851. *(*TFcBool)(unsafe.Pointer(bp + 84)) = int32(m_FcTrue)
  12852. case int32(_FcResultMatch):
  12853. default:
  12854. goto bail1
  12855. }
  12856. if !(*(*TFcBool)(unsafe.Pointer(bp + 84)) != 0) {
  12857. p10 = fi + 92
  12858. *(*TFT_Int)(unsafe.Pointer(p10)) = TFT_Int(int64(*(*TFT_Int)(unsafe.Pointer(p10))) | libc.Int64FromInt64(1)<<libc.Int32FromInt32(9))
  12859. }
  12860. /*
  12861. * Get requested spacing value
  12862. */
  12863. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1355, 0, fi+100) {
  12864. case int32(_FcResultNoMatch):
  12865. (*TXftFontInfo)(unsafe.Pointer(fi)).Fspacing = m_FC_PROPORTIONAL
  12866. case int32(_FcResultMatch):
  12867. default:
  12868. goto bail1
  12869. }
  12870. /*
  12871. * Check for minspace
  12872. */
  12873. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+660, 0, fi+104) {
  12874. case int32(_FcResultNoMatch):
  12875. (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace = m_FcFalse
  12876. case int32(_FcResultMatch):
  12877. default:
  12878. goto bail1
  12879. }
  12880. /*
  12881. * Check for fixed pixel spacing
  12882. */
  12883. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1363, 0, fi+108) {
  12884. case int32(_FcResultNoMatch):
  12885. (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width = 0
  12886. case int32(_FcResultMatch):
  12887. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width != 0 {
  12888. (*TXftFontInfo)(unsafe.Pointer(fi)).Fspacing = int32(m_FC_MONO)
  12889. }
  12890. default:
  12891. goto bail1
  12892. }
  12893. /*
  12894. * Step over hash value in the structure
  12895. */
  12896. hash = uint32(0)
  12897. hashp = fi + uintptr(1)*4
  12898. nhash = libc.Int32FromUint64(libc.Uint64FromInt64(112)/libc.Uint64FromInt64(4) - libc.Uint64FromInt32(1))
  12899. for {
  12900. v11 = nhash
  12901. nhash--
  12902. if !(v11 != 0) {
  12903. break
  12904. }
  12905. v12 = hashp
  12906. hashp += 4
  12907. hash += *(*TFcChar32)(unsafe.Pointer(v12))
  12908. }
  12909. (*TXftFontInfo)(unsafe.Pointer(fi)).Fhash = hash
  12910. /*
  12911. * All done
  12912. */
  12913. return int32(m_FcTrue)
  12914. goto bail1
  12915. bail1:
  12916. ;
  12917. __XftReleaseFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12918. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = libc.UintptrFromInt32(0)
  12919. goto bail0
  12920. bail0:
  12921. ;
  12922. return m_FcFalse
  12923. return r
  12924. }
  12925. func _XftFontInfoEmpty(tls *libc.TLS, dpy uintptr, fi uintptr) {
  12926. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile != 0 {
  12927. __XftReleaseFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12928. }
  12929. }
  12930. func XXftFontInfoCreate(tls *libc.TLS, dpy uintptr, pattern uintptr) (r uintptr) {
  12931. var fi uintptr
  12932. _ = fi
  12933. fi = libc.Xmalloc(tls, uint64(112))
  12934. if !(fi != 0) {
  12935. return libc.UintptrFromInt32(0)
  12936. }
  12937. if !(_XftFontInfoFill(tls, dpy, pattern, fi) != 0) {
  12938. libc.Xfree(tls, fi)
  12939. fi = libc.UintptrFromInt32(0)
  12940. }
  12941. XXftMemAlloc(tls, int32(_XFT_MEM_FONT), uint64(112))
  12942. return fi
  12943. }
  12944. func XXftFontInfoDestroy(tls *libc.TLS, dpy uintptr, fi uintptr) {
  12945. _XftFontInfoEmpty(tls, dpy, fi)
  12946. XXftMemFree(tls, int32(_XFT_MEM_FONT), uint64(112))
  12947. libc.Xfree(tls, fi)
  12948. }
  12949. func XXftFontInfoHash(tls *libc.TLS, fi uintptr) (r TFcChar32) {
  12950. return (*TXftFontInfo)(unsafe.Pointer(fi)).Fhash
  12951. }
  12952. func XXftFontInfoEqual(tls *libc.TLS, a uintptr, b uintptr) (r TFcBool) {
  12953. return libc.BoolInt32(libc.Xmemcmp(tls, a, b, uint64(112)) == 0)
  12954. }
  12955. func XXftFontOpenInfo(tls *libc.TLS, dpy uintptr, pattern uintptr, fi uintptr) (r uintptr) {
  12956. bp := tls.Alloc(96)
  12957. defer tls.Free(96)
  12958. var alloc_size Tsize_t
  12959. var antialias, color TFcBool
  12960. var ascent, descent, height, i, v2, v4 int32
  12961. var bucket, font, format, info, v3 uintptr
  12962. var face TFT_Face
  12963. var hash_value, num_unicode, rehash_value TFcChar32
  12964. var num_glyphs TFT_UInt
  12965. var v6 uint64
  12966. var _ /* charset at bp+0 */ uintptr
  12967. var _ /* max_glyph_memory at bp+8 */ int32
  12968. var _ /* vector at bp+16 */ TFT_Vector
  12969. var _ /* vector at bp+32 */ TFT_Vector
  12970. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  12971. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  12972. if !(info != 0) {
  12973. return libc.UintptrFromInt32(0)
  12974. }
  12975. /*
  12976. * Find a matching previously opened font
  12977. */
  12978. bucket = info + 472 + uintptr((*TXftFontInfo)(unsafe.Pointer(fi)).Fhash%uint32(m_XFT_NUM_FONT_HASH))*8
  12979. font = *(*uintptr)(unsafe.Pointer(bucket))
  12980. for {
  12981. if !(font != 0) {
  12982. break
  12983. }
  12984. if XXftFontInfoEqual(tls, font+48, fi) != 0 {
  12985. v3 = font + 160
  12986. v2 = *(*int32)(unsafe.Pointer(v3))
  12987. *(*int32)(unsafe.Pointer(v3))++
  12988. if !(v2 != 0) {
  12989. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts--
  12990. }
  12991. libfontconfig.XFcPatternDestroy(tls, pattern)
  12992. return font
  12993. }
  12994. goto _1
  12995. _1:
  12996. ;
  12997. font = (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next
  12998. }
  12999. /*
  13000. * No existing font, create another.
  13001. */
  13002. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  13003. 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)))
  13004. }
  13005. if libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+201, 0, bp+8) != int32(_FcResultMatch) {
  13006. *(*int32)(unsafe.Pointer(bp + 8)) = libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024)
  13007. }
  13008. face = __XftLockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  13009. if !(face != 0) {
  13010. goto bail0
  13011. }
  13012. if !(X_XftSetFace(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile, (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize, (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize, fi+56) != 0) {
  13013. goto bail1
  13014. }
  13015. /*
  13016. * Get the set of Unicode codepoints covered by the font.
  13017. * If the incoming pattern doesn't provide this data, go
  13018. * off and compute it. Yes, this is expensive, but it's
  13019. * required to map Unicode to glyph indices.
  13020. */
  13021. if libfontconfig.XFcPatternGetCharSet(tls, pattern, __ccgo_ts+1400, 0, bp) == int32(_FcResultMatch) {
  13022. *(*uintptr)(unsafe.Pointer(bp)) = libfontconfig.XFcCharSetCopy(tls, *(*uintptr)(unsafe.Pointer(bp)))
  13023. } else {
  13024. *(*uintptr)(unsafe.Pointer(bp)) = libfontconfig.XFcFreeTypeCharSet(tls, face, libfontconfig.XFcConfigGetBlanks(tls, libc.UintptrFromInt32(0)))
  13025. }
  13026. antialias = (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias
  13027. if !((*TFT_FaceRec_)(unsafe.Pointer(face)).Fface_flags&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(0)) != 0) {
  13028. antialias = m_FcFalse
  13029. }
  13030. if !!((*TFT_FaceRec_)(unsafe.Pointer(face)).Fface_flags&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(14)) != 0) {
  13031. v4 = int32(m_FcTrue)
  13032. } else {
  13033. v4 = m_FcFalse
  13034. }
  13035. color = v4
  13036. /*
  13037. * Find the appropriate picture format
  13038. */
  13039. if (*TXftFontInfo)(unsafe.Pointer(fi)).Frender != 0 {
  13040. if color != 0 {
  13041. format = libxrender.XXRenderFindStandardFormat(tls, dpy, m_PictStandardARGB32)
  13042. } else {
  13043. if antialias != 0 {
  13044. switch (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba {
  13045. case int32(m_FC_RGBA_RGB):
  13046. fallthrough
  13047. case int32(m_FC_RGBA_BGR):
  13048. fallthrough
  13049. case int32(m_FC_RGBA_VRGB):
  13050. fallthrough
  13051. case int32(m_FC_RGBA_VBGR):
  13052. format = libxrender.XXRenderFindStandardFormat(tls, dpy, m_PictStandardARGB32)
  13053. default:
  13054. format = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA8))
  13055. break
  13056. }
  13057. } else {
  13058. format = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA1))
  13059. }
  13060. }
  13061. if !(format != 0) {
  13062. goto bail2
  13063. }
  13064. } else {
  13065. format = libc.UintptrFromInt32(0)
  13066. }
  13067. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  13068. num_unicode = libfontconfig.XFcCharSetCount(tls, *(*uintptr)(unsafe.Pointer(bp)))
  13069. hash_value = __XftHashSize(tls, num_unicode)
  13070. rehash_value = hash_value - uint32(2)
  13071. } else {
  13072. hash_value = uint32(0)
  13073. rehash_value = uint32(0)
  13074. }
  13075. /*
  13076. * Sometimes the glyphs are numbered 1..n, other times 0..n-1,
  13077. * accept either numbering scheme by making room in the table
  13078. */
  13079. num_glyphs = libc.Uint32FromInt64((*TFT_FaceRec_)(unsafe.Pointer(face)).Fnum_glyphs) + uint32(1)
  13080. alloc_size = libc.Uint64FromInt64(256) + uint64(num_glyphs)*libc.Uint64FromInt64(8) + uint64(hash_value)*libc.Uint64FromInt64(8)
  13081. font = libc.Xmalloc(tls, alloc_size)
  13082. if !(font != 0) {
  13083. goto bail2
  13084. }
  13085. XXftMemAlloc(tls, int32(_XFT_MEM_FONT), alloc_size)
  13086. /*
  13087. * Public fields
  13088. */
  13089. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  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.Fdescender
  13092. libfreetype.XFT_Vector_Transform(tls, bp+16, fi+56)
  13093. descent = int32(-((*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy >> libc.Int32FromInt32(6)))
  13094. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx = 0
  13095. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fascender
  13096. libfreetype.XFT_Vector_Transform(tls, bp+16, fi+56)
  13097. ascent = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy >> libc.Int32FromInt32(6))
  13098. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace != 0 {
  13099. height = ascent + descent
  13100. } else {
  13101. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx = 0
  13102. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fheight
  13103. libfreetype.XFT_Vector_Transform(tls, bp+16, fi+56)
  13104. height = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy >> libc.Int32FromInt32(6))
  13105. }
  13106. } else {
  13107. descent = -int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fdescender >> libc.Int32FromInt32(6))
  13108. ascent = int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fascender >> libc.Int32FromInt32(6))
  13109. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace != 0 {
  13110. height = ascent + descent
  13111. } else {
  13112. height = int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fheight >> libc.Int32FromInt32(6))
  13113. }
  13114. }
  13115. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fascent = ascent
  13116. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fdescent = descent
  13117. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fheight = height
  13118. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width != 0 {
  13119. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width = (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width
  13120. } else {
  13121. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  13122. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  13123. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy = 0
  13124. libfreetype.XFT_Vector_Transform(tls, bp+32, fi+56)
  13125. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx >> libc.Int32FromInt32(6))
  13126. } else {
  13127. (*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))
  13128. }
  13129. }
  13130. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fcharset = *(*uintptr)(unsafe.Pointer(bp))
  13131. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fpattern = pattern
  13132. /*
  13133. * Management fields
  13134. */
  13135. (*TXftFontInt)(unsafe.Pointer(font)).Fref = int32(1)
  13136. (*TXftFontInt)(unsafe.Pointer(font)).Fnext = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  13137. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts = font
  13138. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next = *(*uintptr)(unsafe.Pointer(bucket))
  13139. *(*uintptr)(unsafe.Pointer(bucket)) = font
  13140. /*
  13141. * Copy the info over
  13142. */
  13143. (*TXftFontInt)(unsafe.Pointer(font)).Finfo = *(*TXftFontInfo)(unsafe.Pointer(fi))
  13144. /*
  13145. * reset the antialias field. It can't
  13146. * be set correctly until the font is opened,
  13147. * which doesn't happen in XftFontInfoFill
  13148. */
  13149. (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias = antialias
  13150. /*
  13151. * Set color value, which is only known once the
  13152. * font was loaded
  13153. */
  13154. (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fcolor = color
  13155. /*
  13156. * bump XftFile reference count
  13157. */
  13158. (*TXftFtFile)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ffile)).Fref++
  13159. /*
  13160. * Per glyph information
  13161. */
  13162. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs = font + libc.UintptrFromInt32(1)*256
  13163. libc.Xmemset(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs, int32('\000'), uint64(num_glyphs)*uint64(8))
  13164. (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs = num_glyphs
  13165. /*
  13166. * Memory-usage tracking
  13167. */
  13168. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = uint32(0xffffffff)
  13169. (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse = uint32(0)
  13170. /*
  13171. * Unicode hash table information
  13172. */
  13173. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_table = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs)*8
  13174. i = 0
  13175. for {
  13176. if !(libc.Uint32FromInt32(i) < hash_value) {
  13177. break
  13178. }
  13179. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(i)*8))).Fucs4 = libc.Uint32FromInt32(^libc.Int32FromInt32(0))
  13180. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(i)*8))).Fglyph = uint32(0)
  13181. goto _5
  13182. _5:
  13183. ;
  13184. i++
  13185. }
  13186. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_value = libc.Int32FromUint32(hash_value)
  13187. (*TXftFontInt)(unsafe.Pointer(font)).Frehash_value = libc.Int32FromUint32(rehash_value)
  13188. /*
  13189. * X specific fields
  13190. */
  13191. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = uint64(0)
  13192. (*TXftFontInt)(unsafe.Pointer(font)).Fformat = format
  13193. /*
  13194. * Glyph memory management fields
  13195. */
  13196. (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory = uint64(0)
  13197. (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory = libc.Uint64FromInt32(*(*int32)(unsafe.Pointer(bp + 8)))
  13198. (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage
  13199. (*TXftFontInt)(unsafe.Pointer(font)).Fuse_free_glyphs = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs
  13200. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  13201. v6 = uint64(48)
  13202. } else {
  13203. v6 = uint64(40)
  13204. }
  13205. (*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph = uint32(v6)
  13206. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  13207. return font
  13208. goto bail2
  13209. bail2:
  13210. ;
  13211. libfontconfig.XFcCharSetDestroy(tls, *(*uintptr)(unsafe.Pointer(bp)))
  13212. goto bail1
  13213. bail1:
  13214. ;
  13215. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  13216. goto bail0
  13217. bail0:
  13218. ;
  13219. return libc.UintptrFromInt32(0)
  13220. return r
  13221. }
  13222. func XXftFontOpenPattern(tls *libc.TLS, dpy uintptr, pattern uintptr) (r uintptr) {
  13223. bp := tls.Alloc(112)
  13224. defer tls.Free(112)
  13225. var font uintptr
  13226. var _ /* info at bp+0 */ TXftFontInfo
  13227. _ = font
  13228. if !(_XftFontInfoFill(tls, dpy, pattern, bp) != 0) {
  13229. return libc.UintptrFromInt32(0)
  13230. }
  13231. font = XXftFontOpenInfo(tls, dpy, pattern, bp)
  13232. _XftFontInfoEmpty(tls, dpy, bp)
  13233. return font
  13234. }
  13235. func XXftFontCopy(tls *libc.TLS, dpy uintptr, public uintptr) (r uintptr) {
  13236. var font uintptr
  13237. _ = font
  13238. font = public
  13239. (*TXftFontInt)(unsafe.Pointer(font)).Fref++
  13240. return public
  13241. }
  13242. func _XftFontDestroy(tls *libc.TLS, dpy uintptr, public uintptr) {
  13243. var font, info, xftg uintptr
  13244. var i TFT_UInt
  13245. _, _, _, _ = font, i, info, xftg
  13246. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  13247. font = public
  13248. /* note reduction in memory use */
  13249. if info != 0 {
  13250. *(*uint64)(unsafe.Pointer(info + 56)) -= (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  13251. }
  13252. /* Clean up the info */
  13253. _XftFontInfoEmpty(tls, dpy, font+48)
  13254. /* Free the glyphset */
  13255. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  13256. libxrender.XXRenderFreeGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset)
  13257. }
  13258. /* Free the glyphs */
  13259. i = uint32(0)
  13260. for {
  13261. if !(i < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  13262. break
  13263. }
  13264. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(i)*8))
  13265. if xftg != 0 {
  13266. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  13267. libc.Xfree(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap)
  13268. }
  13269. libc.Xfree(tls, xftg)
  13270. }
  13271. goto _1
  13272. _1:
  13273. ;
  13274. i++
  13275. }
  13276. /* Free the pattern and the charset */
  13277. libfontconfig.XFcPatternDestroy(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fpattern)
  13278. libfontconfig.XFcCharSetDestroy(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fcharset)
  13279. /* Finally, free the font structure */
  13280. 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))
  13281. libc.Xfree(tls, font)
  13282. }
  13283. func _XftFontFindNthUnref(tls *libc.TLS, info uintptr, n int32) (r uintptr) {
  13284. var font, public uintptr
  13285. var v2 int32
  13286. var v3 bool
  13287. _, _, _, _ = font, public, v2, v3
  13288. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  13289. for {
  13290. if !(public != 0) {
  13291. break
  13292. }
  13293. font = public
  13294. if v3 = !((*TXftFontInt)(unsafe.Pointer(font)).Fref != 0); v3 {
  13295. v2 = n
  13296. n--
  13297. }
  13298. if v3 && !(v2 != 0) {
  13299. break
  13300. }
  13301. goto _1
  13302. _1:
  13303. ;
  13304. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  13305. }
  13306. return public
  13307. }
  13308. func XXftFontManageMemory(tls *libc.TLS, dpy uintptr) {
  13309. bp := tls.Alloc(48)
  13310. defer tls.Free(48)
  13311. var font, info, prev, public uintptr
  13312. _, _, _, _ = font, info, prev, public
  13313. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  13314. if !(info != 0) {
  13315. return
  13316. }
  13317. for (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts {
  13318. public = _XftFontFindNthUnref(tls, info, libc.Xrand(tls)%(*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts)
  13319. font = public
  13320. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  13321. 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)))
  13322. }
  13323. /* Unhook from display list */
  13324. prev = info + 40
  13325. for {
  13326. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  13327. break
  13328. }
  13329. if *(*uintptr)(unsafe.Pointer(prev)) == public {
  13330. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  13331. break
  13332. }
  13333. goto _1
  13334. _1:
  13335. ;
  13336. prev = *(*uintptr)(unsafe.Pointer(prev)) + 32
  13337. }
  13338. /* Unhook from hash list */
  13339. prev = info + 472 + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fhash%uint32(m_XFT_NUM_FONT_HASH))*8
  13340. for {
  13341. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  13342. break
  13343. }
  13344. if *(*uintptr)(unsafe.Pointer(prev)) == public {
  13345. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next
  13346. break
  13347. }
  13348. goto _2
  13349. _2:
  13350. ;
  13351. prev = *(*uintptr)(unsafe.Pointer(prev)) + 40
  13352. }
  13353. /* Destroy the font */
  13354. _XftFontDestroy(tls, dpy, public)
  13355. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts--
  13356. }
  13357. }
  13358. func XXftFontClose(tls *libc.TLS, dpy uintptr, public uintptr) {
  13359. var font, info, v2 uintptr
  13360. var v1 int32
  13361. _, _, _, _ = font, info, v1, v2
  13362. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  13363. font = public
  13364. v2 = font + 160
  13365. *(*int32)(unsafe.Pointer(v2))--
  13366. v1 = *(*int32)(unsafe.Pointer(v2))
  13367. if v1 != 0 {
  13368. return
  13369. }
  13370. if info != 0 {
  13371. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts++
  13372. XXftFontManageMemory(tls, dpy)
  13373. } else {
  13374. _XftFontDestroy(tls, dpy, public)
  13375. }
  13376. }
  13377. func XXftInitFtLibrary(tls *libc.TLS) (r TFcBool) {
  13378. if X_XftFTlibrary != 0 {
  13379. return int32(m_FcTrue)
  13380. }
  13381. if libfreetype.XFT_Init_FreeType(tls, uintptr(unsafe.Pointer(&X_XftFTlibrary))) != 0 {
  13382. return m_FcFalse
  13383. }
  13384. return int32(m_FcTrue)
  13385. }
  13386. const m_FT_LCD_FILTER_FIVE_TAPS = 5
  13387. const m_FT_LOAD_DEFAULT2 = 0x0
  13388. const m_FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY = "FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY"
  13389. const m_FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY = "FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY"
  13390. const m_ft_glyph_bbox_gridfit = "FT_GLYPH_BBOX_GRIDFIT"
  13391. const m_ft_glyph_bbox_pixels = "FT_GLYPH_BBOX_PIXELS"
  13392. const m_ft_glyph_bbox_subpixels = "FT_GLYPH_BBOX_SUBPIXELS"
  13393. const m_ft_glyph_bbox_truncate = "FT_GLYPH_BBOX_TRUNCATE"
  13394. const m_ft_glyph_bbox_unscaled = "FT_GLYPH_BBOX_UNSCALED"
  13395. type TFT_Orientation = int32
  13396. type _FT_Orientation_ = int32
  13397. const _FT_ORIENTATION_TRUETYPE = 0
  13398. const _FT_ORIENTATION_POSTSCRIPT = 1
  13399. const _FT_ORIENTATION_FILL_RIGHT = 0
  13400. const _FT_ORIENTATION_FILL_LEFT = 1
  13401. const _FT_ORIENTATION_NONE = 2
  13402. type TFT_LcdFilter = int32
  13403. type _FT_LcdFilter_ = int32
  13404. const _FT_LCD_FILTER_NONE = 0
  13405. const _FT_LCD_FILTER_DEFAULT = 1
  13406. const _FT_LCD_FILTER_LIGHT = 2
  13407. const _FT_LCD_FILTER_LEGACY1 = 3
  13408. const _FT_LCD_FILTER_LEGACY = 16
  13409. const _FT_LCD_FILTER_MAX = 17
  13410. type TFT_LcdFiveTapFilter = [5]TFT_Byte
  13411. type TFT_Glyph = uintptr
  13412. type TFT_GlyphRec_ = struct {
  13413. Flibrary TFT_Library
  13414. Fclazz uintptr
  13415. Fformat TFT_Glyph_Format
  13416. Fadvance TFT_Vector
  13417. }
  13418. type TFT_GlyphRec = struct {
  13419. Flibrary TFT_Library
  13420. Fclazz uintptr
  13421. Fformat TFT_Glyph_Format
  13422. Fadvance TFT_Vector
  13423. }
  13424. type TFT_BitmapGlyph = uintptr
  13425. type TFT_BitmapGlyphRec_ = struct {
  13426. Froot TFT_GlyphRec
  13427. Fleft TFT_Int
  13428. Ftop TFT_Int
  13429. Fbitmap TFT_Bitmap
  13430. }
  13431. type TFT_BitmapGlyphRec = struct {
  13432. Froot TFT_GlyphRec
  13433. Fleft TFT_Int
  13434. Ftop TFT_Int
  13435. Fbitmap TFT_Bitmap
  13436. }
  13437. type TFT_OutlineGlyph = uintptr
  13438. type TFT_OutlineGlyphRec_ = struct {
  13439. Froot TFT_GlyphRec
  13440. Foutline TFT_Outline
  13441. }
  13442. type TFT_OutlineGlyphRec = struct {
  13443. Froot TFT_GlyphRec
  13444. Foutline TFT_Outline
  13445. }
  13446. type TFT_SvgGlyph = uintptr
  13447. type TFT_SvgGlyphRec_ = struct {
  13448. Froot TFT_GlyphRec
  13449. Fsvg_document uintptr
  13450. Fsvg_document_length TFT_ULong
  13451. Fglyph_index TFT_UInt
  13452. Fmetrics TFT_Size_Metrics
  13453. Funits_per_EM TFT_UShort
  13454. Fstart_glyph_id TFT_UShort
  13455. Fend_glyph_id TFT_UShort
  13456. Ftransform TFT_Matrix
  13457. Fdelta TFT_Vector
  13458. }
  13459. type TFT_SvgGlyphRec = struct {
  13460. Froot TFT_GlyphRec
  13461. Fsvg_document uintptr
  13462. Fsvg_document_length TFT_ULong
  13463. Fglyph_index TFT_UInt
  13464. Fmetrics TFT_Size_Metrics
  13465. Funits_per_EM TFT_UShort
  13466. Fstart_glyph_id TFT_UShort
  13467. Fend_glyph_id TFT_UShort
  13468. Ftransform TFT_Matrix
  13469. Fdelta TFT_Vector
  13470. }
  13471. type TFT_Glyph_BBox_Mode = int32
  13472. type _FT_Glyph_BBox_Mode_ = int32
  13473. const _FT_GLYPH_BBOX_UNSCALED = 0
  13474. const _FT_GLYPH_BBOX_SUBPIXELS = 0
  13475. const _FT_GLYPH_BBOX_GRIDFIT = 1
  13476. const _FT_GLYPH_BBOX_TRUNCATE = 2
  13477. const _FT_GLYPH_BBOX_PIXELS = 3
  13478. /* */
  13479. /* END */
  13480. /* Local Variables: */
  13481. /* coding: utf-8 */
  13482. /* End: */
  13483. type Tm3x3 = [3][3]float64
  13484. func _m3x3_uniform(tls *libc.TLS, m uintptr) {
  13485. var v1, v2, v3, v4, v5, v6, v7 float64
  13486. _, _, _, _, _, _, _ = v1, v2, v3, v4, v5, v6, v7
  13487. v2 = libc.Float64FromFloat64(1)
  13488. *(*float64)(unsafe.Pointer(m + 2*24 + 2*8)) = v2
  13489. v1 = v2
  13490. *(*float64)(unsafe.Pointer(m + 1*24 + 1*8)) = v1
  13491. *(*float64)(unsafe.Pointer(m)) = v1
  13492. v7 = libc.Float64FromInt32(0)
  13493. *(*float64)(unsafe.Pointer(m + 2*24 + 1*8)) = v7
  13494. v6 = v7
  13495. *(*float64)(unsafe.Pointer(m + 2*24)) = v6
  13496. v5 = v6
  13497. *(*float64)(unsafe.Pointer(m + 1*24 + 2*8)) = v5
  13498. v4 = v5
  13499. *(*float64)(unsafe.Pointer(m + 2*8)) = v4
  13500. v3 = v4
  13501. *(*float64)(unsafe.Pointer(m + 1*24)) = v3
  13502. *(*float64)(unsafe.Pointer(m + 1*8)) = v3
  13503. }
  13504. func _m3x3_transform(tls *libc.TLS, v uintptr, m uintptr) {
  13505. var x, y float64
  13506. _, _ = x, y
  13507. x = float64((*TFT_Vector)(unsafe.Pointer(v)).Fx)
  13508. y = float64((*TFT_Vector)(unsafe.Pointer(v)).Fy)
  13509. (*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))
  13510. (*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))
  13511. }
  13512. func _m3x3_invert(tls *libc.TLS, m uintptr, mi uintptr) {
  13513. var det float64
  13514. _ = det
  13515. 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)))))
  13516. 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)))))
  13517. 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)))))
  13518. det = float64(1) / det
  13519. *(*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)))))
  13520. *(*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)))))
  13521. *(*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)))))
  13522. *(*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)))))
  13523. *(*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)))))
  13524. *(*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)))))
  13525. *(*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)))))
  13526. *(*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)))))
  13527. *(*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)))))
  13528. }
  13529. /*
  13530. * Validate the memory info for a font
  13531. */
  13532. func __XftFontValidateMemory(tls *libc.TLS, dpy uintptr, public uintptr) {
  13533. bp := tls.Alloc(32)
  13534. defer tls.Free(32)
  13535. var font, xftg uintptr
  13536. var glyph_memory uint64
  13537. var glyphindex TFT_UInt
  13538. _, _, _, _ = font, glyph_memory, glyphindex, xftg
  13539. font = public
  13540. glyph_memory = uint64(0)
  13541. glyphindex = uint32(0)
  13542. for {
  13543. if !(glyphindex < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  13544. break
  13545. }
  13546. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8))
  13547. if xftg != 0 {
  13548. glyph_memory += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  13549. }
  13550. goto _1
  13551. _1:
  13552. ;
  13553. glyphindex++
  13554. }
  13555. if glyph_memory != (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory {
  13556. libc.Xprintf(tls, __ccgo_ts+1452, libc.VaList(bp+8, (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory, glyph_memory))
  13557. }
  13558. }
  13559. // C documentation
  13560. //
  13561. // /*
  13562. // * Validate the glyph usage-links for a font.
  13563. // */
  13564. func __XftValidateGlyphUsage(tls *libc.TLS, font uintptr) {
  13565. bp := tls.Alloc(32)
  13566. defer tls.Free(32)
  13567. var forward, next, reverse, v2, v4 TFT_UInt
  13568. var x1st, xuse uintptr
  13569. _, _, _, _, _, _, _ = forward, next, reverse, x1st, xuse, v2, v4
  13570. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest != uint32(0xffffffff) {
  13571. x1st = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnewest)*8))
  13572. xuse = x1st
  13573. forward = uint32(1)
  13574. next = (*TXftGlyphUsage)(unsafe.Pointer(x1st)).Fnewer
  13575. for {
  13576. if !(xuse != libc.UintptrFromInt32(0) && next != (*TXftFontInt)(unsafe.Pointer(font)).Fnewest) {
  13577. break
  13578. }
  13579. if next >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs {
  13580. libc.Xprintf(tls, __ccgo_ts+1511, libc.VaList(bp+8, next))
  13581. break
  13582. }
  13583. forward++
  13584. v2 = forward
  13585. if v2 > (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse {
  13586. libc.Xprintf(tls, __ccgo_ts+1534, libc.VaList(bp+8, forward, (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse))
  13587. if forward > (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse+uint32(10) {
  13588. break
  13589. }
  13590. }
  13591. xuse = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(next)*8))
  13592. goto _1
  13593. _1:
  13594. ;
  13595. next = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer
  13596. }
  13597. if forward < (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse {
  13598. libc.Xprintf(tls, __ccgo_ts+1574, libc.VaList(bp+8, forward, (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse))
  13599. }
  13600. reverse = uint32(1)
  13601. next = (*TXftGlyphUsage)(unsafe.Pointer(x1st)).Folder
  13602. for {
  13603. if !(xuse != libc.UintptrFromInt32(0) && next != (*TXftFontInt)(unsafe.Pointer(font)).Fnewest) {
  13604. break
  13605. }
  13606. if next >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs {
  13607. libc.Xprintf(tls, __ccgo_ts+1613, libc.VaList(bp+8, next))
  13608. break
  13609. }
  13610. reverse++
  13611. v4 = reverse
  13612. if v4 > (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse {
  13613. libc.Xprintf(tls, __ccgo_ts+1534, libc.VaList(bp+8, reverse, (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse))
  13614. if reverse > (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse+uint32(10) {
  13615. break
  13616. }
  13617. }
  13618. xuse = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(next)*8))
  13619. goto _3
  13620. _3:
  13621. ;
  13622. next = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder
  13623. }
  13624. if reverse < (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse {
  13625. libc.Xprintf(tls, __ccgo_ts+1574, libc.VaList(bp+8, reverse, (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse))
  13626. }
  13627. if forward != reverse {
  13628. libc.Xprintf(tls, __ccgo_ts+1635, libc.VaList(bp+8, forward, reverse))
  13629. libc.Xexit(tls, int32(1))
  13630. }
  13631. }
  13632. }
  13633. // C documentation
  13634. //
  13635. // /* we sometimes need to convert the glyph bitmap in a FT_GlyphSlot
  13636. // * into a different format. For example, we want to convert a
  13637. // * FT_PIXEL_MODE_LCD or FT_PIXEL_MODE_LCD_V bitmap into a 32-bit
  13638. // * ARGB or ABGR bitmap.
  13639. // *
  13640. // * this function prepares a target descriptor for this operation.
  13641. // *
  13642. // * input :: target bitmap descriptor. The function will set its
  13643. // * 'width', 'rows' and 'pitch' fields, and only these
  13644. // *
  13645. // * slot :: the glyph slot containing the source bitmap. this
  13646. // * function assumes that slot->format == FT_GLYPH_FORMAT_BITMAP
  13647. // *
  13648. // * mode :: the requested final rendering mode. supported values are
  13649. // * MONO, NORMAL (i.e. gray), LCD and LCD_V
  13650. // *
  13651. // * the function returns the size in bytes of the corresponding buffer,
  13652. // * it's up to the caller to allocate the corresponding memory block
  13653. // * before calling _fill_xrender_bitmap
  13654. // *
  13655. // * it also returns -1 in case of error (e.g. incompatible arguments,
  13656. // * like trying to convert a gray bitmap into a monochrome one)
  13657. // */
  13658. func __compute_xrender_bitmap_size(tls *libc.TLS, target uintptr, slot TFT_GlyphSlot, mode TFT_Render_Mode, matrix uintptr, m uintptr) (r int32) {
  13659. bp := tls.Alloc(80)
  13660. defer tls.Free(80)
  13661. var bottom, height, left, pitch, right, top, width, xc, yc, v1, v2, v3, v6, v7 int32
  13662. var ftbit uintptr
  13663. var v10 float64
  13664. var v8 TFT_Fixed
  13665. var v9 TFT_Pos
  13666. var _ /* inverse at bp+32 */ TFT_Matrix
  13667. var _ /* mirror at bp+0 */ TFT_Matrix
  13668. var _ /* vector at bp+64 */ TFT_Vector
  13669. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bottom, ftbit, height, left, pitch, right, top, width, xc, yc, v1, v10, v2, v3, v6, v7, v8, v9
  13670. if (*TFT_GlyphSlotRec_)(unsafe.Pointer(slot)).Fformat != int32(_FT_GLYPH_FORMAT_BITMAP) {
  13671. return -int32(1)
  13672. }
  13673. /* compute the size of the final bitmap */
  13674. ftbit = slot + 152
  13675. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fwidth)
  13676. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows)
  13677. if matrix != 0 && mode == int32(_FT_RENDER_MODE_NORMAL) {
  13678. v3 = libc.Int32FromInt32(0)
  13679. bottom = v3
  13680. v2 = v3
  13681. top = v2
  13682. v1 = v2
  13683. right = v1
  13684. left = v1
  13685. xc = 0
  13686. for {
  13687. if !(xc <= int32(1)) {
  13688. break
  13689. }
  13690. yc = 0
  13691. for {
  13692. if !(yc <= int32(1)) {
  13693. break
  13694. }
  13695. (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx = int64(xc * width)
  13696. (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy = int64(yc * height)
  13697. libfreetype.XFT_Vector_Transform(tls, bp+64, matrix)
  13698. if xc == 0 && yc == 0 {
  13699. v6 = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx)
  13700. right = v6
  13701. left = v6
  13702. v7 = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy)
  13703. bottom = v7
  13704. top = v7
  13705. } else {
  13706. if int64(left) > (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx {
  13707. left = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx)
  13708. }
  13709. if int64(right) < (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx {
  13710. right = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx)
  13711. }
  13712. if int64(bottom) > (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy {
  13713. bottom = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy)
  13714. }
  13715. if int64(top) < (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy {
  13716. top = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy)
  13717. }
  13718. }
  13719. goto _5
  13720. _5:
  13721. ;
  13722. yc++
  13723. }
  13724. goto _4
  13725. _4:
  13726. ;
  13727. xc++
  13728. }
  13729. width = right - left
  13730. height = top - bottom
  13731. (*(*TFT_Matrix)(unsafe.Pointer(bp))).Fxx = int64(+libc.Int32FromInt32(0x10000))
  13732. (*(*TFT_Matrix)(unsafe.Pointer(bp))).Fyy = int64(-int32(0x10000))
  13733. v8 = libc.Int64FromInt32(0)
  13734. (*(*TFT_Matrix)(unsafe.Pointer(bp))).Fyx = v8
  13735. (*(*TFT_Matrix)(unsafe.Pointer(bp))).Fxy = v8
  13736. *(*TFT_Matrix)(unsafe.Pointer(bp + 32)) = *(*TFT_Matrix)(unsafe.Pointer(matrix))
  13737. libfreetype.XFT_Matrix_Multiply(tls, bp, bp+32)
  13738. libfreetype.XFT_Matrix_Invert(tls, bp+32)
  13739. libfreetype.XFT_Matrix_Multiply(tls, bp, bp+32)
  13740. v9 = libc.Int64FromInt32(0)
  13741. (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy = v9
  13742. (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx = v9
  13743. libfreetype.XFT_Vector_Transform(tls, bp+64, bp+32)
  13744. left = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx)
  13745. bottom = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy)
  13746. (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx = int64(width)
  13747. (*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy = int64(height)
  13748. libfreetype.XFT_Vector_Transform(tls, bp+64, bp+32)
  13749. right = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fx)
  13750. top = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 64))).Fy)
  13751. left = right - left - libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fwidth)
  13752. bottom = top - bottom - libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows)
  13753. *(*float64)(unsafe.Pointer(m)) = float64((*(*TFT_Matrix)(unsafe.Pointer(bp + 32))).Fxx) / libc.Float64FromInt32(0x10000)
  13754. *(*float64)(unsafe.Pointer(m + 1*8)) = float64((*(*TFT_Matrix)(unsafe.Pointer(bp + 32))).Fxy) / libc.Float64FromInt32(0x10000)
  13755. *(*float64)(unsafe.Pointer(m + 1*24)) = float64((*(*TFT_Matrix)(unsafe.Pointer(bp + 32))).Fyx) / libc.Float64FromInt32(0x10000)
  13756. *(*float64)(unsafe.Pointer(m + 1*24 + 1*8)) = float64((*(*TFT_Matrix)(unsafe.Pointer(bp + 32))).Fyy) / libc.Float64FromInt32(0x10000)
  13757. *(*float64)(unsafe.Pointer(m + 2*8)) = float64(-left) / libc.Float64FromInt32(2)
  13758. *(*float64)(unsafe.Pointer(m + 1*24 + 2*8)) = float64(-bottom) / libc.Float64FromInt32(2)
  13759. v10 = libc.Float64FromFloat64(0)
  13760. *(*float64)(unsafe.Pointer(m + 2*24 + 1*8)) = v10
  13761. *(*float64)(unsafe.Pointer(m + 2*24)) = v10
  13762. *(*float64)(unsafe.Pointer(m + 2*24 + 2*8)) = float64(1)
  13763. }
  13764. pitch = (width + int32(3)) & ^libc.Int32FromInt32(3)
  13765. switch libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpixel_mode) {
  13766. case int32(_FT_PIXEL_MODE_MONO):
  13767. if mode == int32(_FT_RENDER_MODE_MONO) {
  13768. pitch = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  13769. break
  13770. }
  13771. /* fall-through */
  13772. fallthrough
  13773. case int32(_FT_PIXEL_MODE_GRAY):
  13774. if mode == int32(_FT_RENDER_MODE_LCD) || mode == int32(_FT_RENDER_MODE_LCD_V) {
  13775. /* each pixel is replicated into a 32-bit ARGB value */
  13776. pitch = width * int32(4)
  13777. }
  13778. case int32(_FT_PIXEL_MODE_BGRA):
  13779. pitch = width * int32(4)
  13780. case int32(_FT_PIXEL_MODE_LCD):
  13781. if mode != int32(_FT_RENDER_MODE_LCD) {
  13782. return -int32(1)
  13783. }
  13784. /* horz pixel triplets are packed into 32-bit ARGB values */
  13785. width /= int32(3)
  13786. pitch = width * int32(4)
  13787. case int32(_FT_PIXEL_MODE_LCD_V):
  13788. if mode != int32(_FT_RENDER_MODE_LCD_V) {
  13789. return -int32(1)
  13790. }
  13791. /* vert pixel triplets are packed into 32-bit ARGB values */
  13792. height /= int32(3)
  13793. pitch = width * int32(4)
  13794. default: /* unsupported source format */
  13795. return -int32(1)
  13796. }
  13797. (*TFT_Bitmap)(unsafe.Pointer(target)).Fwidth = libc.Uint32FromInt32(width)
  13798. (*TFT_Bitmap)(unsafe.Pointer(target)).Frows = libc.Uint32FromInt32(height)
  13799. (*TFT_Bitmap)(unsafe.Pointer(target)).Fpitch = pitch
  13800. (*TFT_Bitmap)(unsafe.Pointer(target)).Fbuffer = libc.UintptrFromInt32(0)
  13801. return pitch * height
  13802. }
  13803. // C documentation
  13804. //
  13805. // /* this functions converts the glyph bitmap found in a FT_GlyphSlot
  13806. // * into a different format while scaling by applying the given matrix
  13807. // * (see _compute_xrender_bitmap_size)
  13808. // *
  13809. // * you should call this function after _compute_xrender_bitmap_size
  13810. // *
  13811. // * target :: target bitmap descriptor. Note that its 'buffer' pointer
  13812. // * must point to memory allocated by the caller
  13813. // *
  13814. // * source :: the source bitmap descriptor
  13815. // *
  13816. // * matrix :: the scaling matrix to apply
  13817. // */
  13818. func __scaled_fill_xrender_bitmap(tls *libc.TLS, target uintptr, source uintptr, m uintptr) {
  13819. bp := tls.Alloc(48)
  13820. defer tls.Free(48)
  13821. var dst_line, src, src_buf uintptr
  13822. var height, i, pitch, sample_count, sample_x, sample_y, sampling_height, sampling_width, src_pitch, src_x, src_y, width, x, y int32
  13823. var _ /* bgra at bp+32 */ [4]int32
  13824. var _ /* vector at bp+0 */ TFT_Vector
  13825. var _ /* vector0 at bp+16 */ TFT_Vector
  13826. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  13827. src_buf = (*TFT_Bitmap)(unsafe.Pointer(source)).Fbuffer
  13828. dst_line = (*TFT_Bitmap)(unsafe.Pointer(target)).Fbuffer
  13829. src_pitch = (*TFT_Bitmap)(unsafe.Pointer(source)).Fpitch
  13830. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Fwidth)
  13831. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Frows)
  13832. pitch = (*TFT_Bitmap)(unsafe.Pointer(target)).Fpitch
  13833. if src_pitch < 0 {
  13834. src_buf -= uintptr(libc.Uint32FromInt32(src_pitch) * ((*TFT_Bitmap)(unsafe.Pointer(source)).Frows - libc.Uint32FromInt32(1)))
  13835. }
  13836. /* compute how many source pixels a target pixel spans */
  13837. (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx = int64(1)
  13838. (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy = int64(1)
  13839. _m3x3_transform(tls, bp, m)
  13840. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx = 0
  13841. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy = 0
  13842. _m3x3_transform(tls, bp+16, m)
  13843. sampling_width = int32(((*(*TFT_Vector)(unsafe.Pointer(bp))).Fx - (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx) / libc.Int64FromInt32(2))
  13844. sampling_height = int32(((*(*TFT_Vector)(unsafe.Pointer(bp))).Fy - (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy) / libc.Int64FromInt32(2))
  13845. if sampling_width < 0 {
  13846. sampling_width = -sampling_width
  13847. }
  13848. if sampling_height < 0 {
  13849. sampling_height = -sampling_height
  13850. }
  13851. sample_count = (int32(2)*sampling_width + int32(1)) * (int32(2)*sampling_height + int32(1))
  13852. y = height
  13853. for {
  13854. if !(y > 0) {
  13855. break
  13856. }
  13857. x = 0
  13858. for {
  13859. if !(x < width) {
  13860. break
  13861. }
  13862. /* compute target pixel location in source space */
  13863. (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx = int64(x)
  13864. (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy = int64(height - y)
  13865. _m3x3_transform(tls, bp, m)
  13866. if libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(source)).Fpixel_mode) == int32(_FT_PIXEL_MODE_BGRA) {
  13867. 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)) {
  13868. goto _2
  13869. }
  13870. 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)) {
  13871. goto _2
  13872. }
  13873. } else {
  13874. if (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx < 0 || (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx >= libc.Int64FromUint32((*TFT_Bitmap)(unsafe.Pointer(source)).Fwidth) {
  13875. goto _2
  13876. }
  13877. if (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy < 0 || (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy >= libc.Int64FromUint32((*TFT_Bitmap)(unsafe.Pointer(source)).Frows) {
  13878. goto _2
  13879. }
  13880. }
  13881. switch libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(source)).Fpixel_mode) {
  13882. case int32(_FT_PIXEL_MODE_MONO): /* convert mono to 8-bit gray, scale using nearest pixel */
  13883. src = src_buf + uintptr((*(*TFT_Vector)(unsafe.Pointer(bp))).Fy*int64(src_pitch))
  13884. 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 {
  13885. *(*uint8)(unsafe.Pointer(dst_line + uintptr(x))) = uint8(0xff)
  13886. }
  13887. case int32(_FT_PIXEL_MODE_GRAY): /* scale using nearest pixel */
  13888. src = src_buf + uintptr((*(*TFT_Vector)(unsafe.Pointer(bp))).Fy*int64(src_pitch))
  13889. *(*uint8)(unsafe.Pointer(dst_line + uintptr(x))) = *(*uint8)(unsafe.Pointer(src + uintptr((*(*TFT_Vector)(unsafe.Pointer(bp))).Fx)))
  13890. case int32(_FT_PIXEL_MODE_BGRA): /* scale by averaging all relevant source pixels, keep BGRA format */
  13891. *(*[4]int32)(unsafe.Pointer(bp + 32)) = [4]int32{}
  13892. sample_y = -sampling_height
  13893. for {
  13894. if !(sample_y < sampling_height+int32(1)) {
  13895. break
  13896. }
  13897. src_y = int32((*(*TFT_Vector)(unsafe.Pointer(bp))).Fy + int64(sample_y))
  13898. if src_y < 0 || int64(src_y) >= libc.Int64FromUint32((*TFT_Bitmap)(unsafe.Pointer(source)).Frows) {
  13899. goto _3
  13900. }
  13901. src = src_buf + uintptr(src_y*src_pitch)
  13902. sample_x = -sampling_width
  13903. for {
  13904. if !(sample_x < sampling_width+int32(1)) {
  13905. break
  13906. }
  13907. src_x = int32((*(*TFT_Vector)(unsafe.Pointer(bp))).Fx + int64(sample_x))
  13908. if src_x < 0 || int64(src_x) >= libc.Int64FromUint32((*TFT_Bitmap)(unsafe.Pointer(source)).Fwidth) {
  13909. goto _4
  13910. }
  13911. i = 0
  13912. for {
  13913. if !(i < int32(4)) {
  13914. break
  13915. }
  13916. *(*int32)(unsafe.Pointer(bp + 32 + uintptr(i)*4)) += libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(src + uintptr(src_x*int32(4)+i))))
  13917. goto _5
  13918. _5:
  13919. ;
  13920. i++
  13921. }
  13922. goto _4
  13923. _4:
  13924. ;
  13925. sample_x++
  13926. }
  13927. goto _3
  13928. _3:
  13929. ;
  13930. sample_y++
  13931. }
  13932. i = 0
  13933. for {
  13934. if !(i < int32(4)) {
  13935. break
  13936. }
  13937. *(*uint8)(unsafe.Pointer(dst_line + uintptr(int32(4)*x+i))) = libc.Uint8FromInt32((*(*[4]int32)(unsafe.Pointer(bp + 32)))[i] / sample_count)
  13938. goto _6
  13939. _6:
  13940. ;
  13941. i++
  13942. }
  13943. break
  13944. }
  13945. goto _2
  13946. _2:
  13947. ;
  13948. x++
  13949. }
  13950. goto _1
  13951. _1:
  13952. ;
  13953. y--
  13954. dst_line += uintptr(pitch)
  13955. }
  13956. }
  13957. // C documentation
  13958. //
  13959. // /* this functions converts the glyph bitmap found in a FT_GlyphSlot
  13960. // * into a different format (see _compute_xrender_bitmap_size)
  13961. // *
  13962. // * you should call this function after _compute_xrender_bitmap_size
  13963. // *
  13964. // * target :: target bitmap descriptor. Note that its 'buffer' pointer
  13965. // * must point to memory allocated by the caller
  13966. // *
  13967. // * slot :: the glyph slot containing the source bitmap
  13968. // *
  13969. // * mode :: the requested final rendering mode
  13970. // *
  13971. // * bgr :: boolean, set if BGR or VBGR pixel ordering is needed
  13972. // */
  13973. func __fill_xrender_bitmap(tls *libc.TLS, target uintptr, slot TFT_GlyphSlot, mode TFT_Render_Mode, bgr int32) {
  13974. var bytes, h, height, pitch, src_pitch, subpixel, width, x, x1, x2, x3, x4, x5, x6 int32
  13975. var dst, dst1, dst2, dst3, dst4, dstLine, ftbit, src, src1, src2, src3, srcLine uintptr
  13976. var pix, pix1, pix2, pix3, pix4 uint32
  13977. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  13978. ftbit = slot + 152
  13979. srcLine = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fbuffer
  13980. dstLine = (*TFT_Bitmap)(unsafe.Pointer(target)).Fbuffer
  13981. src_pitch = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch
  13982. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Fwidth)
  13983. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Frows)
  13984. pitch = (*TFT_Bitmap)(unsafe.Pointer(target)).Fpitch
  13985. subpixel = libc.BoolInt32(mode == int32(_FT_RENDER_MODE_LCD) || mode == int32(_FT_RENDER_MODE_LCD_V))
  13986. if src_pitch < 0 {
  13987. srcLine -= uintptr(libc.Uint32FromInt32(src_pitch) * ((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows - libc.Uint32FromInt32(1)))
  13988. }
  13989. switch libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpixel_mode) {
  13990. case int32(_FT_PIXEL_MODE_MONO):
  13991. goto _1
  13992. case int32(_FT_PIXEL_MODE_GRAY):
  13993. goto _2
  13994. case int32(_FT_PIXEL_MODE_BGRA):
  13995. goto _3
  13996. case int32(_FT_PIXEL_MODE_LCD):
  13997. goto _4
  13998. default:
  13999. goto _5
  14000. }
  14001. goto _6
  14002. _1:
  14003. ;
  14004. if subpixel != 0 { /* convert mono to ARGB32 values */
  14005. h = height
  14006. for {
  14007. if !(h > 0) {
  14008. break
  14009. }
  14010. x = 0
  14011. for {
  14012. if !(x < width) {
  14013. break
  14014. }
  14015. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x>>libc.Int32FromInt32(3)))))&(int32(0x80)>>(x&int32(7))) != 0 {
  14016. *(*uint32)(unsafe.Pointer(dstLine + uintptr(x)*4)) = uint32(0xffffffff)
  14017. }
  14018. goto _8
  14019. _8:
  14020. ;
  14021. x++
  14022. }
  14023. goto _7
  14024. _7:
  14025. ;
  14026. h--
  14027. srcLine += uintptr(src_pitch)
  14028. dstLine += uintptr(pitch)
  14029. }
  14030. } else {
  14031. if mode == int32(_FT_RENDER_MODE_NORMAL) { /* convert mono to 8-bit gray */
  14032. h = height
  14033. for {
  14034. if !(h > 0) {
  14035. break
  14036. }
  14037. x1 = 0
  14038. for {
  14039. if !(x1 < width) {
  14040. break
  14041. }
  14042. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x1>>libc.Int32FromInt32(3)))))&(int32(0x80)>>(x1&int32(7))) != 0 {
  14043. *(*uint8)(unsafe.Pointer(dstLine + uintptr(x1))) = uint8(0xff)
  14044. }
  14045. goto _10
  14046. _10:
  14047. ;
  14048. x1++
  14049. }
  14050. goto _9
  14051. _9:
  14052. ;
  14053. h--
  14054. srcLine += uintptr(src_pitch)
  14055. dstLine += uintptr(pitch)
  14056. }
  14057. } else { /* copy mono to mono */
  14058. bytes = (width + int32(7)) >> int32(3)
  14059. h = height
  14060. for {
  14061. if !(h > 0) {
  14062. break
  14063. }
  14064. libc.Xmemcpy(tls, dstLine, srcLine, libc.Uint64FromInt32(bytes))
  14065. goto _11
  14066. _11:
  14067. ;
  14068. h--
  14069. srcLine += uintptr(src_pitch)
  14070. dstLine += uintptr(pitch)
  14071. }
  14072. }
  14073. }
  14074. goto _6
  14075. _2:
  14076. ;
  14077. if subpixel != 0 { /* convert gray to ARGB32 values */
  14078. h = height
  14079. for {
  14080. if !(h > 0) {
  14081. break
  14082. }
  14083. dst = dstLine
  14084. x2 = 0
  14085. for {
  14086. if !(x2 < width) {
  14087. break
  14088. }
  14089. pix = uint32(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x2))))
  14090. pix |= pix << int32(8)
  14091. pix |= pix << int32(16)
  14092. *(*uint32)(unsafe.Pointer(dst + uintptr(x2)*4)) = pix
  14093. goto _13
  14094. _13:
  14095. ;
  14096. x2++
  14097. }
  14098. goto _12
  14099. _12:
  14100. ;
  14101. h--
  14102. srcLine += uintptr(src_pitch)
  14103. dstLine += uintptr(pitch)
  14104. }
  14105. } else { /* copy gray into gray */
  14106. h = height
  14107. for {
  14108. if !(h > 0) {
  14109. break
  14110. }
  14111. libc.Xmemcpy(tls, dstLine, srcLine, libc.Uint64FromInt32(width))
  14112. goto _14
  14113. _14:
  14114. ;
  14115. h--
  14116. srcLine += uintptr(src_pitch)
  14117. dstLine += uintptr(pitch)
  14118. }
  14119. }
  14120. goto _6
  14121. _3:
  14122. ; /* Preserve BGRA format */
  14123. h = height
  14124. _17:
  14125. ;
  14126. if !(h > 0) {
  14127. goto _15
  14128. }
  14129. libc.Xmemcpy(tls, dstLine, srcLine, libc.Uint64FromInt32(width)*uint64(4))
  14130. goto _16
  14131. _16:
  14132. ;
  14133. h--
  14134. srcLine += uintptr(src_pitch)
  14135. dstLine += uintptr(pitch)
  14136. goto _17
  14137. goto _15
  14138. _15:
  14139. ;
  14140. goto _6
  14141. _4:
  14142. ;
  14143. if !(bgr != 0) {
  14144. /* convert horizontal RGB into ARGB32 */
  14145. h = height
  14146. for {
  14147. if !(h > 0) {
  14148. break
  14149. }
  14150. src = srcLine
  14151. dst1 = dstLine
  14152. x3 = 0
  14153. for {
  14154. if !(x3 < width) {
  14155. break
  14156. }
  14157. 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)
  14158. *(*uint32)(unsafe.Pointer(dst1 + uintptr(x3)*4)) = pix1
  14159. goto _19
  14160. _19:
  14161. ;
  14162. x3++
  14163. src += uintptr(3)
  14164. }
  14165. goto _18
  14166. _18:
  14167. ;
  14168. h--
  14169. srcLine += uintptr(src_pitch)
  14170. dstLine += uintptr(pitch)
  14171. }
  14172. } else {
  14173. /* convert horizontal BGR into ARGB32 */
  14174. h = height
  14175. for {
  14176. if !(h > 0) {
  14177. break
  14178. }
  14179. src1 = srcLine
  14180. dst2 = dstLine
  14181. x4 = 0
  14182. for {
  14183. if !(x4 < width) {
  14184. break
  14185. }
  14186. 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)
  14187. *(*uint32)(unsafe.Pointer(dst2 + uintptr(x4)*4)) = pix2
  14188. goto _21
  14189. _21:
  14190. ;
  14191. x4++
  14192. src1 += uintptr(3)
  14193. }
  14194. goto _20
  14195. _20:
  14196. ;
  14197. h--
  14198. srcLine += uintptr(src_pitch)
  14199. dstLine += uintptr(pitch)
  14200. }
  14201. }
  14202. goto _6
  14203. _5:
  14204. ; /* FT_PIXEL_MODE_LCD_V */
  14205. /* convert vertical RGB into ARGB32 */
  14206. if !(bgr != 0) {
  14207. h = height
  14208. for {
  14209. if !(h > 0) {
  14210. break
  14211. }
  14212. src2 = srcLine
  14213. dst3 = dstLine
  14214. x5 = 0
  14215. for {
  14216. if !(x5 < width) {
  14217. break
  14218. }
  14219. 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)
  14220. *(*uint32)(unsafe.Pointer(dst3 + uintptr(x5)*4)) = pix3
  14221. goto _23
  14222. _23:
  14223. ;
  14224. x5++
  14225. src2 += uintptr(1)
  14226. }
  14227. goto _22
  14228. _22:
  14229. ;
  14230. h--
  14231. srcLine += uintptr(int32(3) * src_pitch)
  14232. dstLine += uintptr(pitch)
  14233. }
  14234. } else {
  14235. h = height
  14236. for {
  14237. if !(h > 0) {
  14238. break
  14239. }
  14240. src3 = srcLine
  14241. dst4 = dstLine
  14242. x6 = 0
  14243. for {
  14244. if !(x6 < width) {
  14245. break
  14246. }
  14247. 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)
  14248. *(*uint32)(unsafe.Pointer(dst4 + uintptr(x6)*4)) = pix4
  14249. goto _25
  14250. _25:
  14251. ;
  14252. x6++
  14253. src3 += uintptr(1)
  14254. }
  14255. goto _24
  14256. _24:
  14257. ;
  14258. h--
  14259. srcLine += uintptr(int32(3) * src_pitch)
  14260. dstLine += uintptr(pitch)
  14261. }
  14262. }
  14263. _6:
  14264. }
  14265. func XXftFontLoadGlyphs(tls *libc.TLS, dpy uintptr, pub uintptr, need_bitmaps TFcBool, glyphs uintptr, nglyph int32) {
  14266. bp := tls.Alloc(4544)
  14267. defer tls.Free(4544)
  14268. 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
  14269. var bufBitmap, font, ftbit, info, line, line1, xftg, xnew, xold, xuse, v14, v16, v2 uintptr
  14270. var error1 TFT_Error
  14271. var face TFT_Face
  14272. var gc TGC
  14273. var glyph_transform, transform TFcBool
  14274. var glyphindex TFT_UInt
  14275. var glyphslot TFT_GlyphSlot
  14276. var mode TFT_Render_Mode
  14277. var pixmap TPixmap
  14278. var _ /* bufLocal at bp+8 */ [4096]uint8
  14279. var _ /* glyph at bp+0 */ TGlyph
  14280. var _ /* image at bp+4304 */ TXImage
  14281. var _ /* local at bp+4104 */ TFT_Bitmap
  14282. var _ /* m at bp+4160 */ Tm3x3
  14283. var _ /* mi at bp+4232 */ Tm3x3
  14284. var _ /* vector at bp+4144 */ TFT_Vector
  14285. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  14286. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  14287. font = pub
  14288. bufBitmap = bp + 8
  14289. bufSize = int32(4096)
  14290. mode = int32(_FT_RENDER_MODE_MONO)
  14291. if !(info != 0) {
  14292. return
  14293. }
  14294. face = XXftLockFace(tls, font)
  14295. if !(face != 0) {
  14296. return
  14297. }
  14298. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fcolor != 0 {
  14299. mode = int32(_FT_RENDER_MODE_NORMAL)
  14300. }
  14301. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 {
  14302. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  14303. case int32(m_FC_RGBA_RGB):
  14304. fallthrough
  14305. case int32(m_FC_RGBA_BGR):
  14306. mode = int32(_FT_RENDER_MODE_LCD)
  14307. case int32(m_FC_RGBA_VRGB):
  14308. fallthrough
  14309. case int32(m_FC_RGBA_VBGR):
  14310. mode = int32(_FT_RENDER_MODE_LCD_V)
  14311. default:
  14312. mode = int32(_FT_RENDER_MODE_NORMAL)
  14313. }
  14314. }
  14315. transform = libc.BoolInt32((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ftransform != 0 && mode != int32(_FT_RENDER_MODE_MONO))
  14316. for {
  14317. v1 = nglyph
  14318. nglyph--
  14319. if !(v1 != 0) {
  14320. break
  14321. }
  14322. v2 = glyphs
  14323. glyphs += 4
  14324. glyphindex = *(*TFT_UInt)(unsafe.Pointer(v2))
  14325. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8))
  14326. if !(xftg != 0) {
  14327. continue
  14328. }
  14329. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  14330. __XftFontValidateMemory(tls, dpy, pub)
  14331. }
  14332. /*
  14333. * Check to see if this glyph has just been loaded,
  14334. * this happens when drawing the same glyph twice
  14335. * in a single string
  14336. */
  14337. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0 {
  14338. continue
  14339. }
  14340. libfreetype.XFT_Library_SetLcdFilter(tls, X_XftFTlibrary, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Flcd_filter)
  14341. error1 = libfreetype.XFT_Load_Glyph(tls, face, glyphindex, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)
  14342. if error1 != 0 {
  14343. /*
  14344. * If anti-aliasing or transforming glyphs and
  14345. * no outline version exists, fallback to the
  14346. * bitmap and let things look bad instead of
  14347. * missing the glyph
  14348. */
  14349. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(3)) != 0 {
  14350. error1 = libfreetype.XFT_Load_Glyph(tls, face, glyphindex, int32(int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags) & ^(libc.Int64FromInt64(1)<<libc.Int32FromInt32(3))))
  14351. }
  14352. if error1 != 0 {
  14353. continue
  14354. }
  14355. }
  14356. glyphslot = (*TFT_FaceRec_)(unsafe.Pointer(face)).Fglyph
  14357. /*
  14358. * Embolden if required
  14359. */
  14360. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fembolden != 0 {
  14361. libfreetype.XFT_GlyphSlot_Embolden(tls, glyphslot)
  14362. }
  14363. /*
  14364. * Compute glyph metrics from FreeType information
  14365. */
  14366. if transform != 0 {
  14367. v5 = libc.Int32FromInt32(0)
  14368. bottom = v5
  14369. v4 = v5
  14370. top = v4
  14371. v3 = v4
  14372. right = v3
  14373. left = v3
  14374. xc = 0
  14375. for {
  14376. if !(xc <= int32(1)) {
  14377. break
  14378. }
  14379. yc = 0
  14380. for {
  14381. if !(yc <= int32(1)) {
  14382. break
  14383. }
  14384. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx = (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX + int64(xc)*(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fwidth
  14385. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy = (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY - int64(yc)*(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fheight
  14386. libfreetype.XFT_Vector_Transform(tls, bp+4144, font+48+56)
  14387. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  14388. 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)))
  14389. }
  14390. if xc == 0 && yc == 0 {
  14391. v8 = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx)
  14392. right = v8
  14393. left = v8
  14394. v9 = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)
  14395. bottom = v9
  14396. top = v9
  14397. } else {
  14398. if int64(left) > (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx {
  14399. left = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx)
  14400. }
  14401. if int64(right) < (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx {
  14402. right = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx)
  14403. }
  14404. if int64(bottom) > (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy {
  14405. bottom = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)
  14406. }
  14407. if int64(top) < (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy {
  14408. top = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)
  14409. }
  14410. }
  14411. goto _7
  14412. _7:
  14413. ;
  14414. yc++
  14415. }
  14416. goto _6
  14417. _6:
  14418. ;
  14419. xc++
  14420. }
  14421. left = left & -libc.Int32FromInt32(64)
  14422. right = (right + libc.Int32FromInt32(63)) & -libc.Int32FromInt32(64)
  14423. bottom = bottom & -libc.Int32FromInt32(64)
  14424. top = (top + libc.Int32FromInt32(63)) & -libc.Int32FromInt32(64)
  14425. } else {
  14426. left = int32((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX & int64(-libc.Int32FromInt32(64)))
  14427. right = int32(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX + (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fwidth + libc.Int64FromInt32(63)) & int64(-libc.Int32FromInt32(64)))
  14428. top = int32(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY + libc.Int64FromInt32(63)) & int64(-libc.Int32FromInt32(64)))
  14429. bottom = int32(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY - (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fheight) & int64(-libc.Int32FromInt32(64)))
  14430. }
  14431. /*
  14432. * Clip charcell glyphs to the bounding box
  14433. * XXX transformed?
  14434. */
  14435. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fspacing >= int32(m_FC_CHARCELL) && !(transform != 0) {
  14436. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(4)) != 0 {
  14437. if bottom>>int32(6) > (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width {
  14438. adjust = bottom - (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width<<int32(6)
  14439. if adjust > top {
  14440. adjust = top
  14441. }
  14442. top -= adjust
  14443. bottom -= adjust
  14444. }
  14445. } else {
  14446. if right>>int32(6) > (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width {
  14447. adjust1 = right - (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width<<int32(6)
  14448. if adjust1 > left {
  14449. adjust1 = left
  14450. }
  14451. left -= adjust1
  14452. right -= adjust1
  14453. }
  14454. }
  14455. }
  14456. glyph_transform = transform
  14457. if (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fformat != int32(_FT_GLYPH_FORMAT_BITMAP) {
  14458. error1 = libfreetype.XFT_Render_Glyph(tls, (*TFT_FaceRec_)(unsafe.Pointer(face)).Fglyph, mode)
  14459. if error1 != 0 {
  14460. continue
  14461. }
  14462. glyph_transform = m_False
  14463. }
  14464. libfreetype.XFT_Library_SetLcdFilter(tls, X_XftFTlibrary, int32(_FT_LCD_FILTER_NONE))
  14465. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fspacing >= int32(m_FC_MONO) {
  14466. if transform != 0 {
  14467. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(4)) != 0 {
  14468. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx = 0
  14469. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy = -(*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  14470. } else {
  14471. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  14472. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy = 0
  14473. }
  14474. libfreetype.XFT_Vector_Transform(tls, bp+4144, font+48+56)
  14475. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16(((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx + libc.Int64FromInt32(32)) & int64(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6))
  14476. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy + libc.Int64FromInt32(32)) & int64(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6))
  14477. } else {
  14478. if int64((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)&(libc.Int64FromInt64(1)<<libc.Int32FromInt32(4)) != 0 {
  14479. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = 0
  14480. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(-(*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width)
  14481. } else {
  14482. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16((*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width)
  14483. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = 0
  14484. }
  14485. }
  14486. } else {
  14487. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fadvance.Fx + libc.Int64FromInt32(32)) & int64(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6))
  14488. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(-(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fadvance.Fy + libc.Int64FromInt32(32)) & int64(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6)))
  14489. }
  14490. /* compute the size of the final bitmap */
  14491. ftbit = glyphslot + 152
  14492. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fwidth)
  14493. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows)
  14494. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  14495. libc.Xprintf(tls, __ccgo_ts+1686, libc.VaList(bp+4448, libc.Int32FromUint32(glyphindex)))
  14496. 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))
  14497. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPHV) != 0 {
  14498. line = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fbuffer
  14499. if (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch < 0 {
  14500. line -= uintptr((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch * (height - int32(1)))
  14501. }
  14502. y = 0
  14503. for {
  14504. if !(y < height) {
  14505. break
  14506. }
  14507. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 {
  14508. x = 0
  14509. for {
  14510. if !(x < width) {
  14511. break
  14512. }
  14513. libc.Xprintf(tls, __ccgo_ts+1750, libc.VaList(bp+4448, int32(_den[libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(line + uintptr(x))))>>int32(5)])))
  14514. goto _11
  14515. _11:
  14516. ;
  14517. x++
  14518. }
  14519. } else {
  14520. x = 0
  14521. for {
  14522. if !(x < width*int32(8)) {
  14523. break
  14524. }
  14525. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(line + uintptr(x>>int32(3)))))&(int32(1)<<(x&int32(7))) != 0 {
  14526. v13 = int32('#')
  14527. } else {
  14528. v13 = int32(' ')
  14529. }
  14530. libc.Xprintf(tls, __ccgo_ts+1750, libc.VaList(bp+4448, v13))
  14531. goto _12
  14532. _12:
  14533. ;
  14534. x++
  14535. }
  14536. }
  14537. libc.Xprintf(tls, __ccgo_ts+1753, 0)
  14538. line += uintptr((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch)
  14539. goto _10
  14540. _10:
  14541. ;
  14542. y++
  14543. }
  14544. libc.Xprintf(tls, __ccgo_ts+1756, 0)
  14545. }
  14546. }
  14547. _m3x3_uniform(tls, bp+4160)
  14548. if glyph_transform != 0 {
  14549. v14 = font + 48 + 56
  14550. } else {
  14551. v14 = libc.UintptrFromInt32(0)
  14552. }
  14553. size = __compute_xrender_bitmap_size(tls, bp+4104, glyphslot, mode, v14, bp+4160)
  14554. if size < 0 {
  14555. continue
  14556. }
  14557. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth = uint16((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fwidth)
  14558. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight = uint16((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Frows)
  14559. if glyph_transform != 0 {
  14560. _m3x3_invert(tls, bp+4160, bp+4232)
  14561. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx = int64(-(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_left)
  14562. (*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy = int64((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_top)
  14563. _m3x3_transform(tls, bp+4144, bp+4232)
  14564. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx = int16((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fx)
  14565. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy = int16((*(*TFT_Vector)(unsafe.Pointer(bp + 4144))).Fy)
  14566. } else {
  14567. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx = int16(-(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_left)
  14568. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy = int16((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_top)
  14569. }
  14570. /*
  14571. * If the glyph is relatively large (> 1% of server memory),
  14572. * don't send it until necessary.
  14573. */
  14574. if !(need_bitmaps != 0) && libc.Uint64FromInt32(size) > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory/uint64(100) {
  14575. continue
  14576. }
  14577. /*
  14578. * Make sure there is enough buffer space for the glyph.
  14579. */
  14580. if size > bufSize {
  14581. if bufBitmap != bp+8 {
  14582. libc.Xfree(tls, bufBitmap)
  14583. }
  14584. bufBitmap = libc.Xmalloc(tls, libc.Uint64FromInt32(size))
  14585. if !(bufBitmap != 0) {
  14586. continue
  14587. }
  14588. bufSize = size
  14589. }
  14590. libc.Xmemset(tls, bufBitmap, 0, libc.Uint64FromInt32(size))
  14591. (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fbuffer = bufBitmap
  14592. if mode == int32(_FT_RENDER_MODE_NORMAL) && glyph_transform != 0 {
  14593. __scaled_fill_xrender_bitmap(tls, bp+4104, glyphslot+152, bp+4160)
  14594. } else {
  14595. __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)))
  14596. }
  14597. /*
  14598. * Copy or convert into local buffer.
  14599. */
  14600. /*
  14601. * Use the glyph index as the wire encoding; it
  14602. * might be more efficient for some locales to map
  14603. * these by first usage to smaller values, but that
  14604. * would require persistently storing the map when
  14605. * glyphs were freed.
  14606. */
  14607. *(*TGlyph)(unsafe.Pointer(bp)) = uint64(glyphindex)
  14608. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture != 0 {
  14609. libxrender.XXRenderFreePicture(tls, dpy, (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture)
  14610. (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture = uint64(0)
  14611. }
  14612. (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory = libc.Uint64FromInt32(size) + uint64((*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph)
  14613. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  14614. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  14615. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = libxrender.XXRenderCreateGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fformat)
  14616. }
  14617. if mode == int32(_FT_RENDER_MODE_MONO) {
  14618. /* swap bits in each byte */
  14619. if (*struct {
  14620. Fext_data uintptr
  14621. Fprivate1 uintptr
  14622. Ffd int32
  14623. Fprivate2 int32
  14624. Fproto_major_version int32
  14625. Fproto_minor_version int32
  14626. Fvendor uintptr
  14627. Fprivate3 TXID
  14628. Fprivate4 TXID
  14629. Fprivate5 TXID
  14630. Fprivate6 int32
  14631. Fresource_alloc uintptr
  14632. Fbyte_order int32
  14633. Fbitmap_unit int32
  14634. Fbitmap_pad int32
  14635. Fbitmap_bit_order int32
  14636. Fnformats int32
  14637. Fpixmap_format uintptr
  14638. Fprivate8 int32
  14639. Frelease int32
  14640. Fprivate9 uintptr
  14641. Fprivate10 uintptr
  14642. Fqlen int32
  14643. Flast_request_read uint64
  14644. Frequest uint64
  14645. Fprivate11 TXPointer
  14646. Fprivate12 TXPointer
  14647. Fprivate13 TXPointer
  14648. Fprivate14 TXPointer
  14649. Fmax_request_size uint32
  14650. Fdb uintptr
  14651. Fprivate15 uintptr
  14652. Fdisplay_name uintptr
  14653. Fdefault_screen int32
  14654. Fnscreens int32
  14655. Fscreens uintptr
  14656. Fmotion_buffer uint64
  14657. Fprivate16 uint64
  14658. Fmin_keycode int32
  14659. Fmax_keycode int32
  14660. Fprivate17 TXPointer
  14661. Fprivate18 TXPointer
  14662. Fprivate19 int32
  14663. Fxdefaults uintptr
  14664. })(unsafe.Pointer(dpy)).Fbitmap_bit_order != int32(m_MSBFirst) {
  14665. line1 = bufBitmap
  14666. i = size
  14667. for {
  14668. v15 = i
  14669. i--
  14670. if !(v15 != 0) {
  14671. break
  14672. }
  14673. c = libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(line1)))
  14674. c = c<<int32(1)&int32(0xaa) | c>>int32(1)&int32(0x55)
  14675. c = c<<int32(2)&int32(0xcc) | c>>int32(2)&int32(0x33)
  14676. c = c<<int32(4)&int32(0xf0) | c>>int32(4)&int32(0x0f)
  14677. v16 = line1
  14678. line1++
  14679. *(*uint8)(unsafe.Pointer(v16)) = libc.Uint8FromInt32(c)
  14680. }
  14681. }
  14682. } else {
  14683. if libc.Int32FromUint8((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap.Fpixel_mode) == int32(_FT_PIXEL_MODE_BGRA) || mode != int32(_FT_RENDER_MODE_NORMAL) {
  14684. /* invert ARGB <=> BGRA */
  14685. if (*struct {
  14686. Fext_data uintptr
  14687. Fprivate1 uintptr
  14688. Ffd int32
  14689. Fprivate2 int32
  14690. Fproto_major_version int32
  14691. Fproto_minor_version int32
  14692. Fvendor uintptr
  14693. Fprivate3 TXID
  14694. Fprivate4 TXID
  14695. Fprivate5 TXID
  14696. Fprivate6 int32
  14697. Fresource_alloc uintptr
  14698. Fbyte_order int32
  14699. Fbitmap_unit int32
  14700. Fbitmap_pad int32
  14701. Fbitmap_bit_order int32
  14702. Fnformats int32
  14703. Fpixmap_format uintptr
  14704. Fprivate8 int32
  14705. Frelease int32
  14706. Fprivate9 uintptr
  14707. Fprivate10 uintptr
  14708. Fqlen int32
  14709. Flast_request_read uint64
  14710. Frequest uint64
  14711. Fprivate11 TXPointer
  14712. Fprivate12 TXPointer
  14713. Fprivate13 TXPointer
  14714. Fprivate14 TXPointer
  14715. Fmax_request_size uint32
  14716. Fdb uintptr
  14717. Fprivate15 uintptr
  14718. Fdisplay_name uintptr
  14719. Fdefault_screen int32
  14720. Fnscreens int32
  14721. Fscreens uintptr
  14722. Fmotion_buffer uint64
  14723. Fprivate16 uint64
  14724. Fmin_keycode int32
  14725. Fmax_keycode int32
  14726. Fprivate17 TXPointer
  14727. Fprivate18 TXPointer
  14728. Fprivate19 int32
  14729. Fxdefaults uintptr
  14730. })(unsafe.Pointer(dpy)).Fbyte_order != XXftNativeByteOrder(tls) {
  14731. XXftSwapCARD32(tls, bufBitmap, size>>int32(2))
  14732. }
  14733. }
  14734. }
  14735. if libc.Int32FromUint8((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap.Fpixel_mode) == int32(_FT_PIXEL_MODE_BGRA) {
  14736. pixmap = libx11.XXCreatePixmap(tls, dpy, (*TScreen)(unsafe.Pointer((*struct {
  14737. Fext_data uintptr
  14738. Fprivate1 uintptr
  14739. Ffd int32
  14740. Fprivate2 int32
  14741. Fproto_major_version int32
  14742. Fproto_minor_version int32
  14743. Fvendor uintptr
  14744. Fprivate3 TXID
  14745. Fprivate4 TXID
  14746. Fprivate5 TXID
  14747. Fprivate6 int32
  14748. Fresource_alloc uintptr
  14749. Fbyte_order int32
  14750. Fbitmap_unit int32
  14751. Fbitmap_pad int32
  14752. Fbitmap_bit_order int32
  14753. Fnformats int32
  14754. Fpixmap_format uintptr
  14755. Fprivate8 int32
  14756. Frelease int32
  14757. Fprivate9 uintptr
  14758. Fprivate10 uintptr
  14759. Fqlen int32
  14760. Flast_request_read uint64
  14761. Frequest uint64
  14762. Fprivate11 TXPointer
  14763. Fprivate12 TXPointer
  14764. Fprivate13 TXPointer
  14765. Fprivate14 TXPointer
  14766. Fmax_request_size uint32
  14767. Fdb uintptr
  14768. Fprivate15 uintptr
  14769. Fdisplay_name uintptr
  14770. Fdefault_screen int32
  14771. Fnscreens int32
  14772. Fscreens uintptr
  14773. Fmotion_buffer uint64
  14774. Fprivate16 uint64
  14775. Fmin_keycode int32
  14776. Fmax_keycode int32
  14777. Fprivate17 TXPointer
  14778. Fprivate18 TXPointer
  14779. Fprivate19 int32
  14780. Fxdefaults uintptr
  14781. })(unsafe.Pointer(dpy)).Fscreens+uintptr((*struct {
  14782. Fext_data uintptr
  14783. Fprivate1 uintptr
  14784. Ffd int32
  14785. Fprivate2 int32
  14786. Fproto_major_version int32
  14787. Fproto_minor_version int32
  14788. Fvendor uintptr
  14789. Fprivate3 TXID
  14790. Fprivate4 TXID
  14791. Fprivate5 TXID
  14792. Fprivate6 int32
  14793. Fresource_alloc uintptr
  14794. Fbyte_order int32
  14795. Fbitmap_unit int32
  14796. Fbitmap_pad int32
  14797. Fbitmap_bit_order int32
  14798. Fnformats int32
  14799. Fpixmap_format uintptr
  14800. Fprivate8 int32
  14801. Frelease int32
  14802. Fprivate9 uintptr
  14803. Fprivate10 uintptr
  14804. Fqlen int32
  14805. Flast_request_read uint64
  14806. Frequest uint64
  14807. Fprivate11 TXPointer
  14808. Fprivate12 TXPointer
  14809. Fprivate13 TXPointer
  14810. Fprivate14 TXPointer
  14811. Fmax_request_size uint32
  14812. Fdb uintptr
  14813. Fprivate15 uintptr
  14814. Fdisplay_name uintptr
  14815. Fdefault_screen int32
  14816. Fnscreens int32
  14817. Fscreens uintptr
  14818. Fmotion_buffer uint64
  14819. Fprivate16 uint64
  14820. Fmin_keycode int32
  14821. Fmax_keycode int32
  14822. Fprivate17 TXPointer
  14823. Fprivate18 TXPointer
  14824. Fprivate19 int32
  14825. Fxdefaults uintptr
  14826. })(unsafe.Pointer(dpy)).Fdefault_screen)*128)).Froot, (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fwidth, (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Frows, uint32(32))
  14827. gc = libx11.XXCreateGC(tls, dpy, pixmap, uint64(0), libc.UintptrFromInt32(0))
  14828. *(*TXImage)(unsafe.Pointer(bp + 4304)) = TXImage{
  14829. Fwidth: libc.Int32FromUint32((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fwidth),
  14830. Fheight: libc.Int32FromUint32((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Frows),
  14831. Fformat: int32(m_ZPixmap),
  14832. Fdata: bufBitmap,
  14833. Fbyte_order: (*TDisplay)(unsafe.Pointer(dpy)).Fbyte_order,
  14834. Fbitmap_unit: (*TDisplay)(unsafe.Pointer(dpy)).Fbitmap_unit,
  14835. Fbitmap_bit_order: (*TDisplay)(unsafe.Pointer(dpy)).Fbitmap_bit_order,
  14836. Fbitmap_pad: int32(32),
  14837. Fdepth: int32(32),
  14838. Fbytes_per_line: libc.Int32FromUint32((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fwidth*libc.Uint32FromInt32(4) - libc.Uint32FromInt32((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4104))).Fpitch)),
  14839. Fbits_per_pixel: int32(32),
  14840. }
  14841. libx11.XXInitImage(tls, bp+4304)
  14842. 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)
  14843. (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture = libxrender.XXRenderCreatePicture(tls, dpy, pixmap, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, uint64(0), libc.UintptrFromInt32(0))
  14844. libx11.XXFreeGC(tls, dpy, gc)
  14845. libx11.XXFreePixmap(tls, dpy, pixmap)
  14846. /*
  14847. * Record 256 times higher memory pressure for unrotated
  14848. * pictures, and maximum for rotated pictures.
  14849. */
  14850. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fmatrix.Fxy != 0 || (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fmatrix.Fyx != 0 {
  14851. *(*uint64)(unsafe.Pointer(xftg + 24)) += (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory - libc.Uint64FromInt32(size)
  14852. } else {
  14853. *(*uint64)(unsafe.Pointer(xftg + 24)) += libc.Uint64FromInt32(size) * uint64(255)
  14854. }
  14855. } else {
  14856. libxrender.XXRenderAddGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, xftg, int32(1), bufBitmap, size)
  14857. }
  14858. } else {
  14859. if size != 0 {
  14860. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.Xmalloc(tls, libc.Uint64FromInt32(size))
  14861. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  14862. libc.Xmemcpy(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap, bufBitmap, libc.Uint64FromInt32(size))
  14863. }
  14864. } else {
  14865. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.UintptrFromInt32(0)
  14866. }
  14867. }
  14868. *(*uint64)(unsafe.Pointer(font + 216)) += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14869. *(*uint64)(unsafe.Pointer(info + 56)) += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14870. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  14871. __XftFontValidateMemory(tls, dpy, pub)
  14872. }
  14873. if XXftDebug(tls)&int32(m_XFT_DBG_CACHEV) != 0 {
  14874. libc.Xprintf(tls, __ccgo_ts+1758, libc.VaList(bp+4448, glyphindex, (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory))
  14875. }
  14876. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  14877. xuse = xftg
  14878. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest == uint32(0xffffffff) {
  14879. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder = glyphindex
  14880. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer = glyphindex
  14881. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  14882. libc.Xprintf(tls, __ccgo_ts+1787, libc.VaList(bp+4448, font, glyphindex, xuse, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer))
  14883. }
  14884. } else {
  14885. xnew = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnewest)*8))
  14886. xold = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xnew)).Fnewer)*8))
  14887. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder = (*TXftFontInt)(unsafe.Pointer(font)).Fnewest
  14888. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer = (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Fnewer
  14889. (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Fnewer = glyphindex
  14890. (*TXftGlyphUsage)(unsafe.Pointer(xold)).Folder = glyphindex
  14891. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  14892. 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))
  14893. }
  14894. }
  14895. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = glyphindex
  14896. (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse++
  14897. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  14898. __XftValidateGlyphUsage(tls, font)
  14899. }
  14900. }
  14901. }
  14902. if bufBitmap != bp+8 {
  14903. libc.Xfree(tls, bufBitmap)
  14904. }
  14905. XXftUnlockFace(tls, font)
  14906. }
  14907. var _den = [9]int8{' ', '.', ':', ';', '=', '+', '*', '#'}
  14908. func XXftFontUnloadGlyphs(tls *libc.TLS, dpy uintptr, pub uintptr, glyphs uintptr, nglyph int32) {
  14909. bp := tls.Alloc(8240)
  14910. defer tls.Free(8240)
  14911. var font, info, xftg, xtmp, xuse, v2 uintptr
  14912. var glyphindex TFT_UInt
  14913. var nused, v1, v3 int32
  14914. var _ /* glyphBuf at bp+0 */ [1024]TGlyph
  14915. _, _, _, _, _, _, _, _, _, _ = font, glyphindex, info, nused, xftg, xtmp, xuse, v1, v2, v3
  14916. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  14917. font = pub
  14918. nused = 0
  14919. for {
  14920. v1 = nglyph
  14921. nglyph--
  14922. if !(v1 != 0) {
  14923. break
  14924. }
  14925. v2 = glyphs
  14926. glyphs += 4
  14927. glyphindex = *(*TFT_UInt)(unsafe.Pointer(v2))
  14928. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8))
  14929. if !(xftg != 0) {
  14930. continue
  14931. }
  14932. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0 {
  14933. if XXftDebug(tls)&int32(m_XFT_DBG_CACHEV) != 0 {
  14934. libc.Xprintf(tls, __ccgo_ts+1874, libc.VaList(bp+8200, glyphindex, (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory))
  14935. }
  14936. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  14937. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture != 0 {
  14938. libxrender.XXRenderFreePicture(tls, dpy, (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture)
  14939. } else {
  14940. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  14941. v3 = nused
  14942. nused++
  14943. (*(*[1024]TGlyph)(unsafe.Pointer(bp)))[v3] = uint64(glyphindex)
  14944. if libc.Uint64FromInt32(nused) == libc.Uint64FromInt64(8192)/libc.Uint64FromInt64(8) {
  14945. libxrender.XXRenderFreeGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, nused)
  14946. nused = 0
  14947. }
  14948. }
  14949. }
  14950. } else {
  14951. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  14952. libc.Xfree(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap)
  14953. }
  14954. }
  14955. *(*uint64)(unsafe.Pointer(font + 216)) -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14956. if info != 0 {
  14957. *(*uint64)(unsafe.Pointer(info + 56)) -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14958. }
  14959. }
  14960. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  14961. xuse = xftg
  14962. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  14963. libc.Xprintf(tls, __ccgo_ts+1905, libc.VaList(bp+8200, font, xuse, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer))
  14964. }
  14965. if (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder != uint32(0xffffffff) {
  14966. xtmp = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder)*8))
  14967. if xtmp != libc.UintptrFromInt32(0) {
  14968. /* update link around to oldest glyph */
  14969. (*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Fnewer = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer
  14970. }
  14971. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest == glyphindex {
  14972. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest == (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder {
  14973. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = uint32(0xffffffff)
  14974. } else {
  14975. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder
  14976. }
  14977. }
  14978. }
  14979. if (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer != uint32(0xffffffff) {
  14980. xtmp = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer)*8))
  14981. if xtmp != libc.UintptrFromInt32(0) {
  14982. /* update link around to newest glyph */
  14983. (*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Folder = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder
  14984. }
  14985. }
  14986. if (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse != 0 {
  14987. (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse--
  14988. } else {
  14989. libc.Xfprintf(tls, libc.Xstderr, __ccgo_ts+1930, 0)
  14990. }
  14991. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  14992. __XftValidateGlyphUsage(tls, font)
  14993. }
  14994. }
  14995. libc.Xfree(tls, xftg)
  14996. XXftMemFree(tls, int32(_XFT_MEM_GLYPH), uint64((*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph))
  14997. *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*8)) = libc.UintptrFromInt32(0)
  14998. }
  14999. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 && nused != 0 {
  15000. libxrender.XXRenderFreeGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, nused)
  15001. }
  15002. }
  15003. func XXftFontCheckGlyph(tls *libc.TLS, dpy uintptr, pub uintptr, need_bitmaps TFcBool, glyph TFT_UInt, missing uintptr, nmissing uintptr) (r TFcBool) {
  15004. var font, xftg, xnew, xold, xtmp, xuse, xuse1 uintptr
  15005. var n, v1 int32
  15006. _, _, _, _, _, _, _, _, _ = font, n, xftg, xnew, xold, xtmp, xuse, xuse1, v1
  15007. font = pub
  15008. if glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs {
  15009. return m_FcFalse
  15010. }
  15011. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8))
  15012. if !(xftg != 0) || need_bitmaps != 0 && !((*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0) {
  15013. if !(xftg != 0) {
  15014. xftg = libc.Xmalloc(tls, uint64((*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph))
  15015. if !(xftg != 0) {
  15016. return m_FcFalse
  15017. }
  15018. XXftMemAlloc(tls, int32(_XFT_MEM_GLYPH), uint64((*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph))
  15019. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.UintptrFromInt32(0)
  15020. (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory = uint64(0)
  15021. (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture = uint64(0)
  15022. *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*8)) = xftg
  15023. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  15024. xuse = xftg
  15025. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder = uint32(0xffffffff)
  15026. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer = uint32(0xffffffff)
  15027. }
  15028. }
  15029. n = *(*int32)(unsafe.Pointer(nmissing))
  15030. v1 = n
  15031. n++
  15032. *(*TFT_UInt)(unsafe.Pointer(missing + uintptr(v1)*4)) = glyph
  15033. if n == int32(m_XFT_NMISSING) {
  15034. XXftFontLoadGlyphs(tls, dpy, pub, need_bitmaps, missing, n)
  15035. n = 0
  15036. }
  15037. *(*int32)(unsafe.Pointer(nmissing)) = n
  15038. return int32(m_FcTrue)
  15039. }
  15040. /*
  15041. * Make unloading faster by moving newly-referenced glyphs to the front
  15042. * of the list, leaving the less-used glyphs on the end.
  15043. */
  15044. 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 {
  15045. xuse1 = xftg
  15046. xtmp = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnewest)*8))
  15047. /* delink */
  15048. xold = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Folder)*8))
  15049. xnew = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Fnewer)*8))
  15050. (*TXftGlyphUsage)(unsafe.Pointer(xold)).Fnewer = (*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Fnewer
  15051. (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Folder = (*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Folder
  15052. /* relink */
  15053. xnew = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Fnewer)*8))
  15054. (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Folder = glyph
  15055. (*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Folder = (*TXftFontInt)(unsafe.Pointer(font)).Fnewest
  15056. (*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Fnewer = (*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Fnewer
  15057. (*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Fnewer = glyph
  15058. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = glyph
  15059. }
  15060. return m_FcFalse
  15061. }
  15062. func XXftCharExists(tls *libc.TLS, dpy uintptr, pub uintptr, ucs4 TFcChar32) (r TFcBool) {
  15063. if (*TXftFont)(unsafe.Pointer(pub)).Fcharset != 0 {
  15064. return libfontconfig.XFcCharSetHasChar(tls, (*TXftFont)(unsafe.Pointer(pub)).Fcharset, ucs4)
  15065. }
  15066. return m_FcFalse
  15067. }
  15068. func XXftCharIndex(tls *libc.TLS, dpy uintptr, pub uintptr, ucs4 TFcChar32) (r TFT_UInt) {
  15069. var ent, offset TFcChar32
  15070. var face TFT_Face
  15071. var font uintptr
  15072. _, _, _, _ = ent, face, font, offset
  15073. font = pub
  15074. if !((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value != 0) {
  15075. return uint32(0)
  15076. }
  15077. ent = ucs4 % libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value)
  15078. offset = uint32(0)
  15079. for (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 != ucs4 {
  15080. if (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 == libc.Uint32FromInt32(^libc.Int32FromInt32(0)) {
  15081. if !(XXftCharExists(tls, dpy, pub, ucs4) != 0) {
  15082. return uint32(0)
  15083. }
  15084. face = XXftLockFace(tls, pub)
  15085. if !(face != 0) {
  15086. return uint32(0)
  15087. }
  15088. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 = ucs4
  15089. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fglyph = libfontconfig.XFcFreeTypeCharIndex(tls, face, ucs4)
  15090. XXftUnlockFace(tls, pub)
  15091. break
  15092. }
  15093. if !(offset != 0) {
  15094. offset = ucs4 % libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Frehash_value)
  15095. if !(offset != 0) {
  15096. offset = uint32(1)
  15097. }
  15098. }
  15099. ent = ent + offset
  15100. if ent >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value) {
  15101. ent -= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value)
  15102. }
  15103. }
  15104. return (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fglyph
  15105. }
  15106. // C documentation
  15107. //
  15108. // /*
  15109. // * Remove glyph(s) from the font to reduce memory-usage.
  15110. // */
  15111. func X_XftFontUncacheGlyph(tls *libc.TLS, dpy uintptr, pub uintptr) {
  15112. bp := tls.Alloc(16)
  15113. defer tls.Free(16)
  15114. var font, xftg, xuse uintptr
  15115. var glyph_memory uint64
  15116. var v1 TFT_UInt
  15117. var _ /* glyphindex at bp+0 */ TFT_UInt
  15118. _, _, _, _, _ = font, glyph_memory, xftg, xuse, v1
  15119. font = pub
  15120. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory != 0) {
  15121. return
  15122. }
  15123. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  15124. __XftFontValidateMemory(tls, dpy, pub)
  15125. }
  15126. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  15127. /*
  15128. * Remove the oldest glyph from the font.
  15129. */
  15130. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest != uint32(0xffffffff) {
  15131. xuse = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnewest)*8))
  15132. v1 = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer
  15133. *(*TFT_UInt)(unsafe.Pointer(bp)) = v1
  15134. if v1 != uint32(0xffffffff) {
  15135. XXftFontUnloadGlyphs(tls, dpy, pub, bp, int32(1))
  15136. }
  15137. }
  15138. } else {
  15139. if (*TXftFontInt)(unsafe.Pointer(font)).Fuse_free_glyphs != 0 {
  15140. /*
  15141. * Pick a random glyph from the font and remove it from the cache
  15142. */
  15143. glyph_memory = libc.Uint64FromInt32(libc.Xrand(tls)) % (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  15144. *(*TFT_UInt)(unsafe.Pointer(bp)) = uint32(0)
  15145. for {
  15146. if !(*(*TFT_UInt)(unsafe.Pointer(bp)) < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  15147. break
  15148. }
  15149. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(*(*TFT_UInt)(unsafe.Pointer(bp)))*8))
  15150. if xftg != 0 {
  15151. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory > glyph_memory {
  15152. XXftFontUnloadGlyphs(tls, dpy, pub, bp, int32(1))
  15153. break
  15154. }
  15155. glyph_memory -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  15156. }
  15157. goto _2
  15158. _2:
  15159. ;
  15160. *(*TFT_UInt)(unsafe.Pointer(bp))++
  15161. }
  15162. } else {
  15163. /*
  15164. * Free all glyphs, since they are part of a set.
  15165. */
  15166. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  15167. libxrender.XXRenderFreeGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset)
  15168. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = uint64(0)
  15169. }
  15170. *(*TFT_UInt)(unsafe.Pointer(bp)) = uint32(0)
  15171. for {
  15172. if !(*(*TFT_UInt)(unsafe.Pointer(bp)) < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  15173. break
  15174. }
  15175. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(*(*TFT_UInt)(unsafe.Pointer(bp)))*8))
  15176. if xftg != 0 {
  15177. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory > uint64(0) {
  15178. XXftFontUnloadGlyphs(tls, dpy, pub, bp, int32(1))
  15179. }
  15180. }
  15181. goto _3
  15182. _3:
  15183. ;
  15184. *(*TFT_UInt)(unsafe.Pointer(bp))++
  15185. }
  15186. }
  15187. }
  15188. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  15189. __XftFontValidateMemory(tls, dpy, pub)
  15190. }
  15191. }
  15192. func X_XftFontManageMemory(tls *libc.TLS, dpy uintptr, pub uintptr) {
  15193. bp := tls.Alloc(32)
  15194. defer tls.Free(32)
  15195. var font uintptr
  15196. var v1 uint64
  15197. _, _ = font, v1
  15198. font = pub
  15199. if (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory != 0 {
  15200. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  15201. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory {
  15202. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  15203. v1 = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset
  15204. } else {
  15205. v1 = uint64(font)
  15206. }
  15207. libc.Xprintf(tls, __ccgo_ts+1954, libc.VaList(bp+8, v1, (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory, (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory))
  15208. }
  15209. }
  15210. for (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory {
  15211. X_XftFontUncacheGlyph(tls, dpy, pub)
  15212. }
  15213. }
  15214. X_XftDisplayManageMemory(tls, dpy)
  15215. }
  15216. const m_UINT_MAX2 = 0xffffffff
  15217. /* xftxlfd.c */
  15218. var __XftConfigInitialized int32
  15219. func XXftInit(tls *libc.TLS, config uintptr) (r int32) {
  15220. if __XftConfigInitialized != 0 {
  15221. return int32(m_True)
  15222. }
  15223. __XftConfigInitialized = int32(m_True)
  15224. if !(libfontconfig.XFcInit(tls) != 0) {
  15225. return m_False
  15226. }
  15227. return int32(m_True)
  15228. }
  15229. func XXftGetVersion(tls *libc.TLS) (r int32) {
  15230. return libc.Int32FromInt32(m_XFT_MAJOR)*libc.Int32FromInt32(10000) + libc.Int32FromInt32(m_XFT_MINOR)*libc.Int32FromInt32(100) + libc.Int32FromInt32(m_XFT_REVISION)
  15231. }
  15232. var _XftInUse = [4]struct {
  15233. Fname uintptr
  15234. Falloc_count int32
  15235. Falloc_mem Tsize_t
  15236. Ffree_count int32
  15237. Ffree_mem Tsize_t
  15238. }{
  15239. 0: {
  15240. Fname: __ccgo_ts + 2000,
  15241. },
  15242. 1: {
  15243. Fname: __ccgo_ts + 2008,
  15244. },
  15245. 2: {
  15246. Fname: __ccgo_ts + 2016,
  15247. },
  15248. 3: {
  15249. Fname: __ccgo_ts + 2026,
  15250. },
  15251. }
  15252. var _XftAllocCount int32
  15253. var _XftAllocMem Tsize_t
  15254. var _XftFreeCount int32
  15255. var _XftFreeMem Tsize_t
  15256. var _XftMemNotice = libc.Uint64FromInt32(libc.Int32FromInt32(1) * libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024))
  15257. var _XftAllocNotify Tsize_t
  15258. var _XftFreeNotify Tsize_t
  15259. func XXftMemReport(tls *libc.TLS) {
  15260. bp := tls.Alloc(48)
  15261. defer tls.Free(48)
  15262. var i int32
  15263. _ = i
  15264. libc.Xprintf(tls, __ccgo_ts+2035, 0)
  15265. libc.Xprintf(tls, __ccgo_ts+2054, 0)
  15266. libc.Xprintf(tls, __ccgo_ts+2093, 0)
  15267. i = 0
  15268. for {
  15269. if !(i < int32(_XFT_MEM_NUM)) {
  15270. break
  15271. }
  15272. 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))
  15273. goto _1
  15274. _1:
  15275. ;
  15276. i++
  15277. }
  15278. libc.Xprintf(tls, __ccgo_ts+2137, libc.VaList(bp+8, __ccgo_ts+2159, _XftAllocCount, _XftAllocMem, _XftFreeCount, _XftFreeMem))
  15279. _XftAllocNotify = uint64(0)
  15280. _XftFreeNotify = uint64(0)
  15281. }
  15282. func XXftMemAlloc(tls *libc.TLS, kind int32, size Tsize_t) {
  15283. if XXftDebug(tls)&int32(m_XFT_DBG_MEMORY) != 0 {
  15284. _XftInUse[kind].Falloc_count++
  15285. _XftInUse[kind].Falloc_mem += size
  15286. _XftAllocCount++
  15287. _XftAllocMem += size
  15288. _XftAllocNotify += size
  15289. if _XftAllocNotify > _XftMemNotice {
  15290. XXftMemReport(tls)
  15291. }
  15292. }
  15293. }
  15294. func XXftMemFree(tls *libc.TLS, kind int32, size Tsize_t) {
  15295. if XXftDebug(tls)&int32(m_XFT_DBG_MEMORY) != 0 {
  15296. _XftInUse[kind].Ffree_count++
  15297. _XftInUse[kind].Ffree_mem += size
  15298. _XftFreeCount++
  15299. _XftFreeMem += size
  15300. _XftFreeNotify += size
  15301. if _XftFreeNotify > _XftMemNotice {
  15302. XXftMemReport(tls)
  15303. }
  15304. }
  15305. }
  15306. /* xftxlfd.c */
  15307. func XXftListFontsPatternObjects(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr, os uintptr) (r uintptr) {
  15308. return libfontconfig.XFcFontList(tls, libc.UintptrFromInt32(0), pattern, os)
  15309. }
  15310. func XXftListFonts(tls *libc.TLS, dpy uintptr, screen int32, va1 uintptr) (r uintptr) {
  15311. bp := tls.Alloc(16)
  15312. defer tls.Free(16)
  15313. var __o__, __ob__, __os__, __p__, first, fs, os, pattern uintptr
  15314. var va Tva_list
  15315. var _ /* __v__ at bp+0 */ TFcValue
  15316. _, _, _, _, _, _, _, _, _ = __o__, __ob__, __os__, __p__, first, fs, os, pattern, va
  15317. va = va1
  15318. __p__ = libc.UintptrFromInt32(0)
  15319. if !(__p__ != 0) {
  15320. __p__ = libfontconfig.XFcPatternCreate(tls)
  15321. if !(__p__ != 0) {
  15322. goto _FcPatternVapBuild_bail0
  15323. }
  15324. }
  15325. for {
  15326. __o__ = libc.VaUintptr(&va)
  15327. if !(__o__ != 0) {
  15328. break
  15329. }
  15330. (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 = libc.VaInt32(&va)
  15331. switch (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 {
  15332. case int32(_FcTypeUnknown):
  15333. fallthrough
  15334. case int32(_FcTypeVoid):
  15335. goto _FcPatternVapBuild_bail1
  15336. case int32(_FcTypeInteger):
  15337. *(*int32)(unsafe.Pointer(bp + 8)) = libc.VaInt32(&va)
  15338. case int32(_FcTypeDouble):
  15339. *(*float64)(unsafe.Pointer(bp + 8)) = libc.VaFloat64(&va)
  15340. case int32(_FcTypeString):
  15341. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15342. case int32(_FcTypeBool):
  15343. *(*TFcBool)(unsafe.Pointer(bp + 8)) = libc.VaInt32(&va)
  15344. case int32(_FcTypeMatrix):
  15345. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15346. case int32(_FcTypeCharSet):
  15347. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15348. case int32(_FcTypeFTFace):
  15349. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15350. case int32(_FcTypeLangSet):
  15351. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15352. case int32(_FcTypeRange):
  15353. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15354. break
  15355. }
  15356. if !(libfontconfig.XFcPatternAdd(tls, __p__, __o__, *(*TFcValue)(unsafe.Pointer(bp)), int32(m_FcTrue)) != 0) {
  15357. goto _FcPatternVapBuild_bail1
  15358. }
  15359. goto _1
  15360. _1:
  15361. }
  15362. pattern = __p__
  15363. goto _FcPatternVapBuild_return
  15364. goto _FcPatternVapBuild_bail1
  15365. _FcPatternVapBuild_bail1:
  15366. ;
  15367. if !(libc.UintptrFromInt32(0) != 0) {
  15368. libfontconfig.XFcPatternDestroy(tls, __p__)
  15369. }
  15370. goto _FcPatternVapBuild_bail0
  15371. _FcPatternVapBuild_bail0:
  15372. ;
  15373. pattern = libc.UintptrFromInt32(0)
  15374. goto _FcPatternVapBuild_return
  15375. _FcPatternVapBuild_return:
  15376. ;
  15377. first = libc.VaUintptr(&va)
  15378. os = uintptr(0)
  15379. __os__ = libfontconfig.XFcObjectSetCreate(tls)
  15380. if !(__os__ != 0) {
  15381. goto _FcObjectSetVapBuild_bail0
  15382. }
  15383. __ob__ = first
  15384. for __ob__ != 0 {
  15385. if !(libfontconfig.XFcObjectSetAdd(tls, __os__, __ob__) != 0) {
  15386. goto _FcObjectSetVapBuild_bail1
  15387. }
  15388. __ob__ = libc.VaUintptr(&va)
  15389. }
  15390. os = __os__
  15391. goto _FcObjectSetVapBuild_bail1
  15392. _FcObjectSetVapBuild_bail1:
  15393. ;
  15394. if !(os != 0) && __os__ != 0 {
  15395. libfontconfig.XFcObjectSetDestroy(tls, __os__)
  15396. }
  15397. goto _FcObjectSetVapBuild_bail0
  15398. _FcObjectSetVapBuild_bail0:
  15399. ;
  15400. _ = va
  15401. fs = XXftListFontsPatternObjects(tls, dpy, screen, pattern, os)
  15402. libfontconfig.XFcPatternDestroy(tls, pattern)
  15403. libfontconfig.XFcObjectSetDestroy(tls, os)
  15404. return fs
  15405. }
  15406. /* xftxlfd.c */
  15407. func XXftNameParse(tls *libc.TLS, name uintptr) (r uintptr) {
  15408. return libfontconfig.XFcNameParse(tls, name)
  15409. }
  15410. func XXftNameUnparse(tls *libc.TLS, pat uintptr, dest uintptr, len1 int32) (r TFcBool) {
  15411. var name, new1 uintptr
  15412. _, _ = name, new1
  15413. name = libfontconfig.XFcNameUnparse(tls, pat)
  15414. if !(name != 0) {
  15415. return m_FcFalse
  15416. }
  15417. if libc.Xstrlen(tls, name)+uint64(1) > libc.Uint64FromInt32(len1) {
  15418. new1 = libfontconfig.XFcPatternDuplicate(tls, pat)
  15419. libc.Xfree(tls, name)
  15420. libfontconfig.XFcPatternDel(tls, new1, __ccgo_ts+2165)
  15421. libfontconfig.XFcPatternDel(tls, new1, __ccgo_ts+1400)
  15422. name = libfontconfig.XFcNameUnparse(tls, new1)
  15423. libfontconfig.XFcPatternDestroy(tls, new1)
  15424. if !(name != 0) {
  15425. return m_FcFalse
  15426. }
  15427. if libc.Xstrlen(tls, name)+uint64(1) > libc.Uint64FromInt32(len1) {
  15428. libc.Xstrncpy(tls, dest, name, libc.Uint64FromInt32(len1)-uint64(1))
  15429. *(*int8)(unsafe.Pointer(dest + uintptr(len1-int32(1)))) = int8('\000')
  15430. libc.Xfree(tls, name)
  15431. return m_FcFalse
  15432. }
  15433. }
  15434. libc.Xstrcpy(tls, dest, name)
  15435. libc.Xfree(tls, name)
  15436. return int32(m_FcTrue)
  15437. }
  15438. const m_NUM_ELT_LOCAL = 128
  15439. const m_UINT64_MAX1 = 18446744073709551615
  15440. /* xftxlfd.c */
  15441. // C documentation
  15442. //
  15443. // /*
  15444. // * Dispatch glyph drawing to the correct XRenderCompositeString function
  15445. // */
  15446. 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) {
  15447. if nchars == 0 {
  15448. return
  15449. }
  15450. switch charwidth {
  15451. case int32(1):
  15452. fallthrough
  15453. default:
  15454. libxrender.XXRenderCompositeString8(tls, dpy, op, src, dst, format, glyphset, srcx, srcy, dstx, dsty, chars, nchars)
  15455. case int32(2):
  15456. libxrender.XXRenderCompositeString16(tls, dpy, op, src, dst, format, glyphset, srcx, srcy, dstx, dsty, chars, nchars)
  15457. case int32(4):
  15458. libxrender.XXRenderCompositeString32(tls, dpy, op, src, dst, format, glyphset, srcx, srcy, dstx, dsty, chars, nchars)
  15459. break
  15460. }
  15461. }
  15462. /*
  15463. * Use the Render extension to draw the glyphs
  15464. */
  15465. 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) {
  15466. bp := tls.Alloc(5136)
  15467. defer tls.Free(5136)
  15468. var char16, char32, char8, chars, font, glyph uintptr
  15469. var dstx, dsty, i, j, width int32
  15470. var g, max TFT_UInt
  15471. var glyphs_loaded TFcBool
  15472. var needed, size Tsize_t
  15473. var wire TGlyph
  15474. var _ /* char_local at bp+1028 */ [1024]uint32
  15475. var _ /* missing at bp+0 */ [256]TFT_UInt
  15476. var _ /* nmissing at bp+1024 */ int32
  15477. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = char16, char32, char8, chars, dstx, dsty, font, g, glyph, glyphs_loaded, i, j, max, needed, size, width, wire
  15478. font = pub
  15479. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  15480. return
  15481. }
  15482. /*
  15483. * Load missing glyphs
  15484. */
  15485. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  15486. max = uint32(0)
  15487. glyphs_loaded = m_FcFalse
  15488. i = 0
  15489. for {
  15490. if !(i < nglyphs) {
  15491. break
  15492. }
  15493. g = *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4))
  15494. if g > max {
  15495. max = g
  15496. }
  15497. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  15498. glyphs_loaded = int32(m_FcTrue)
  15499. }
  15500. goto _1
  15501. _1:
  15502. ;
  15503. i++
  15504. }
  15505. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  15506. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  15507. }
  15508. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  15509. goto bail1
  15510. }
  15511. if max < uint32(0x100) {
  15512. width = int32(1)
  15513. size = uint64(1)
  15514. } else {
  15515. if max < uint32(0x10000) {
  15516. width = int32(2)
  15517. size = uint64(2)
  15518. } else {
  15519. width = int32(4)
  15520. size = uint64(4)
  15521. }
  15522. }
  15523. chars = bp + 1028
  15524. if libc.Uint64FromInt32(nglyphs) > uint64(0xffffffffffffffff)/size {
  15525. goto bail1
  15526. }
  15527. needed = libc.Uint64FromInt32(nglyphs) * size
  15528. if needed > uint64(4096) {
  15529. chars = libc.Xmalloc(tls, needed)
  15530. if !(chars != 0) {
  15531. goto bail1
  15532. }
  15533. }
  15534. dstx = x
  15535. dsty = y
  15536. char8 = chars
  15537. char16 = chars
  15538. char32 = chars
  15539. i = 0
  15540. j = libc.Int32FromInt32(0)
  15541. for {
  15542. if !(i < nglyphs) {
  15543. break
  15544. }
  15545. wire = uint64(*(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)))
  15546. if wire >= uint64((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(wire)*8)) != 0) {
  15547. wire = uint64(0)
  15548. }
  15549. glyph = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(wire)*8))
  15550. if glyph == libc.UintptrFromInt32(0) {
  15551. goto _2
  15552. }
  15553. if (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0 {
  15554. __XftCompositeString(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, srcx, srcy, x, y, width, chars, j)
  15555. 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))
  15556. dstx += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15557. dsty += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15558. x = dstx
  15559. y = dsty
  15560. j = 0
  15561. } else {
  15562. switch width {
  15563. case int32(1):
  15564. *(*int8)(unsafe.Pointer(char8 + uintptr(j))) = libc.Int8FromUint64(wire)
  15565. case int32(2):
  15566. *(*uint16)(unsafe.Pointer(char16 + uintptr(j)*2)) = uint16(wire)
  15567. case int32(4):
  15568. *(*uint32)(unsafe.Pointer(char32 + uintptr(j)*4)) = uint32(wire)
  15569. break
  15570. }
  15571. dstx += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15572. dsty += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15573. j++
  15574. }
  15575. goto _2
  15576. _2:
  15577. ;
  15578. i++
  15579. }
  15580. __XftCompositeString(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, srcx, srcy, x, y, width, chars, j)
  15581. if chars != bp+1028 {
  15582. libc.Xfree(tls, chars)
  15583. }
  15584. goto bail1
  15585. bail1:
  15586. ;
  15587. if glyphs_loaded != 0 {
  15588. X_XftFontManageMemory(tls, dpy, pub)
  15589. }
  15590. }
  15591. // C documentation
  15592. //
  15593. // /*
  15594. // * Dispatch glyph drawing to the correct XRenderCompositeText function
  15595. // */
  15596. 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) {
  15597. if nelt == 0 {
  15598. return
  15599. }
  15600. switch eltwidth {
  15601. case int32(1):
  15602. fallthrough
  15603. default:
  15604. libxrender.XXRenderCompositeText8(tls, dpy, op, src, dst, format, srcx, srcy, dstx, dsty, elts, nelt)
  15605. case int32(2):
  15606. libxrender.XXRenderCompositeText16(tls, dpy, op, src, dst, format, srcx, srcy, dstx, dsty, elts, nelt)
  15607. case int32(4):
  15608. libxrender.XXRenderCompositeText32(tls, dpy, op, src, dst, format, srcx, srcy, dstx, dsty, elts, nelt)
  15609. break
  15610. }
  15611. }
  15612. func XXftGlyphSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, glyphs uintptr, nglyphs int32) {
  15613. bp := tls.Alloc(9232)
  15614. defer tls.Free(9232)
  15615. var char16, char32, char8, chars, elts, font, glyph, v4, v7 uintptr
  15616. var g, max TFT_UInt
  15617. var glyphs_loaded TFcBool
  15618. var i, j, n, nelt, size, width, x, y, v3, v5 int32
  15619. var _ /* char_local at bp+1028 */ [1024]uint32
  15620. var _ /* elts_local at bp+5128 */ [128]TXGlyphElt8
  15621. var _ /* missing at bp+0 */ [256]TFT_UInt
  15622. var _ /* nmissing at bp+1024 */ int32
  15623. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = char16, char32, char8, chars, elts, font, g, glyph, glyphs_loaded, i, j, max, n, nelt, size, width, x, y, v3, v4, v5, v7
  15624. font = pub
  15625. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  15626. return
  15627. }
  15628. if !(nglyphs != 0) {
  15629. return
  15630. }
  15631. /*
  15632. * Load missing glyphs
  15633. */
  15634. max = uint32(0)
  15635. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  15636. glyphs_loaded = m_FcFalse
  15637. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs))).Fglyph
  15638. i = 0
  15639. for {
  15640. if !(i < nglyphs) {
  15641. break
  15642. }
  15643. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  15644. if g > max {
  15645. max = g
  15646. }
  15647. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  15648. glyphs_loaded = int32(m_FcTrue)
  15649. }
  15650. goto _1
  15651. _1:
  15652. ;
  15653. i++
  15654. }
  15655. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  15656. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  15657. }
  15658. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  15659. goto bail1
  15660. }
  15661. /*
  15662. * See what encoding size is needed
  15663. */
  15664. if max < uint32(0x100) {
  15665. size = int32(1)
  15666. width = int32(1)
  15667. } else {
  15668. if max < uint32(0x10000) {
  15669. size = int32(2)
  15670. width = int32(2)
  15671. } else {
  15672. size = int32(4)
  15673. width = int32(4)
  15674. }
  15675. }
  15676. chars = bp + 1028
  15677. if nglyphs*size > int32(m_NUM_LOCAL) {
  15678. chars = libc.Xmalloc(tls, libc.Uint64FromInt32(nglyphs*size))
  15679. if !(chars != 0) {
  15680. goto bail1
  15681. }
  15682. }
  15683. char8 = chars
  15684. char16 = chars
  15685. char32 = chars
  15686. /*
  15687. * Compute the number of glyph elts needed
  15688. */
  15689. nelt = int32(1)
  15690. i = 0
  15691. for {
  15692. if !(i < nglyphs) {
  15693. break
  15694. }
  15695. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  15696. /* Substitute default for non-existent glyphs */
  15697. if g >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0) {
  15698. g = uint32(0)
  15699. }
  15700. if *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0 {
  15701. break
  15702. }
  15703. goto _2
  15704. _2:
  15705. ;
  15706. i++
  15707. }
  15708. if i == nglyphs {
  15709. goto bail2
  15710. }
  15711. glyph = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8))
  15712. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15713. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15714. for {
  15715. i++
  15716. v3 = i
  15717. if !(v3 < nglyphs) {
  15718. break
  15719. }
  15720. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  15721. /* Substitute default for non-existent glyphs */
  15722. if g >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0) {
  15723. g = uint32(0)
  15724. }
  15725. /*
  15726. * check to see if the glyph is placed where it would
  15727. * fall using the normal spacing and if it would render
  15728. * as a XRender glyph
  15729. */
  15730. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8))
  15731. glyph = v4
  15732. if v4 != 0 && !((*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0) {
  15733. if x != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) || y != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) {
  15734. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx)
  15735. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy)
  15736. nelt++
  15737. }
  15738. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15739. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15740. }
  15741. }
  15742. elts = bp + 5128
  15743. if !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fcolor != 0) && nelt > int32(m_NUM_ELT_LOCAL) {
  15744. elts = libc.Xmalloc(tls, libc.Uint64FromInt32(nelt)*uint64(32))
  15745. if !(elts != 0) {
  15746. goto bail2
  15747. }
  15748. }
  15749. /*
  15750. * Generate the list of glyph elts or render color glyphs
  15751. */
  15752. nelt = 0
  15753. v5 = libc.Int32FromInt32(0)
  15754. y = v5
  15755. x = v5
  15756. n = 0
  15757. j = 0
  15758. i = 0
  15759. for {
  15760. if !(i < nglyphs) {
  15761. break
  15762. }
  15763. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  15764. /* Substitute default for non-existent glyphs */
  15765. if g >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8)) != 0) {
  15766. g = uint32(0)
  15767. }
  15768. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*8))
  15769. glyph = v7
  15770. if v7 != 0 {
  15771. if (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0 {
  15772. 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))
  15773. goto _6
  15774. }
  15775. if !(i != 0) || x != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) || y != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) {
  15776. if n != 0 {
  15777. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  15778. nelt++
  15779. }
  15780. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fglyphset = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset
  15781. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fchars = char8 + uintptr(size*j)
  15782. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FxOff = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) - x
  15783. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FyOff = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) - y
  15784. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx)
  15785. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy)
  15786. n = 0
  15787. }
  15788. switch width {
  15789. case int32(1):
  15790. *(*int8)(unsafe.Pointer(char8 + uintptr(j))) = libc.Int8FromUint32(g)
  15791. case int32(2):
  15792. *(*uint16)(unsafe.Pointer(char16 + uintptr(j)*2)) = uint16(g)
  15793. case int32(4):
  15794. *(*uint32)(unsafe.Pointer(char32 + uintptr(j)*4)) = g
  15795. break
  15796. }
  15797. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15798. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15799. j++
  15800. n++
  15801. }
  15802. goto _6
  15803. _6:
  15804. ;
  15805. i++
  15806. }
  15807. if n != 0 {
  15808. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  15809. nelt++
  15810. }
  15811. __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)
  15812. if elts != bp+5128 {
  15813. libc.Xfree(tls, elts)
  15814. }
  15815. goto bail2
  15816. bail2:
  15817. ;
  15818. if chars != bp+1028 {
  15819. libc.Xfree(tls, chars)
  15820. }
  15821. goto bail1
  15822. bail1:
  15823. ;
  15824. if glyphs_loaded != 0 {
  15825. X_XftFontManageMemory(tls, dpy, pub)
  15826. }
  15827. }
  15828. func XXftCharSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, chars uintptr, len1 int32) {
  15829. bp := tls.Alloc(8192)
  15830. defer tls.Free(8192)
  15831. var glyphs uintptr
  15832. var i int32
  15833. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphSpec
  15834. _, _ = glyphs, i
  15835. if len1 <= 0 {
  15836. return
  15837. }
  15838. if len1 <= int32(m_NUM_LOCAL) {
  15839. glyphs = bp
  15840. } else {
  15841. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(8))
  15842. if !(glyphs != 0) {
  15843. return
  15844. }
  15845. }
  15846. i = 0
  15847. for {
  15848. if !(i < len1) {
  15849. break
  15850. }
  15851. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph = XXftCharIndex(tls, dpy, pub, (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fucs4)
  15852. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fx
  15853. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fy
  15854. goto _1
  15855. _1:
  15856. ;
  15857. i++
  15858. }
  15859. XXftGlyphSpecRender(tls, dpy, op, src, pub, dst, srcx, srcy, glyphs, len1)
  15860. if glyphs != bp {
  15861. libc.Xfree(tls, glyphs)
  15862. }
  15863. }
  15864. /*
  15865. * Choose which format to draw text in when drawing with fonts
  15866. * of different formats. The trick is that ARGB formats aren't
  15867. * compatible with A formats as PictOpAdd does the wrong thing, so
  15868. * fall back to an A format when presented with an ARGB and A format
  15869. */
  15870. func _XftPreferFormat(tls *libc.TLS, dpy uintptr, a uintptr, b uintptr) (r uintptr) {
  15871. var prefer uintptr
  15872. _ = prefer
  15873. prefer = libc.UintptrFromInt32(0)
  15874. if a == b {
  15875. prefer = a
  15876. } else {
  15877. if libc.BoolInt32((*TXRenderPictFormat)(unsafe.Pointer(a)).Fdepth == int32(32)) != libc.BoolInt32((*TXRenderPictFormat)(unsafe.Pointer(b)).Fdepth == int32(32)) {
  15878. prefer = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA8))
  15879. } else {
  15880. if (*TXRenderPictFormat)(unsafe.Pointer(a)).Fdepth > (*TXRenderPictFormat)(unsafe.Pointer(b)).Fdepth {
  15881. prefer = a
  15882. } else {
  15883. prefer = b
  15884. }
  15885. }
  15886. }
  15887. return prefer
  15888. }
  15889. func XXftGlyphFontSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, dst TPicture, srcx int32, srcy int32, glyphs uintptr, nglyphs int32) {
  15890. bp := tls.Alloc(9232)
  15891. defer tls.Free(9232)
  15892. var char16, char32, char8, chars, elts, firstFont, font, font1, font2, font3, format, glyph, prevPublic, pub, pub1, pub2, pub3, v4, v7 uintptr
  15893. var g, max TFT_UInt
  15894. var glyphs_loaded TFcBool
  15895. var i, j, n, nelt, size, width, x, y, v3, v5 int32
  15896. var _ /* char_local at bp+1028 */ [1024]uint32
  15897. var _ /* elts_local at bp+5128 */ [128]TXGlyphElt8
  15898. var _ /* missing at bp+0 */ [256]TFT_UInt
  15899. var _ /* nmissing at bp+1024 */ int32
  15900. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  15901. if !(nglyphs != 0) {
  15902. return
  15903. }
  15904. /*
  15905. * Load missing glyphs. Have to load them
  15906. * one at a time in case the font changes
  15907. */
  15908. max = uint32(0)
  15909. glyphs_loaded = m_FcFalse
  15910. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fglyph
  15911. i = 0
  15912. for {
  15913. if !(i < nglyphs) {
  15914. break
  15915. }
  15916. pub = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  15917. font = pub
  15918. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  15919. if g > max {
  15920. max = g
  15921. }
  15922. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  15923. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  15924. glyphs_loaded = int32(m_FcTrue)
  15925. }
  15926. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  15927. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  15928. }
  15929. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  15930. goto bail1
  15931. }
  15932. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  15933. goto bail1
  15934. }
  15935. goto _1
  15936. _1:
  15937. ;
  15938. i++
  15939. }
  15940. /*
  15941. * See what encoding size is needed
  15942. */
  15943. if max < uint32(0x100) {
  15944. size = int32(1)
  15945. width = int32(1)
  15946. } else {
  15947. if max < uint32(0x10000) {
  15948. size = int32(2)
  15949. width = int32(2)
  15950. } else {
  15951. size = int32(4)
  15952. width = int32(4)
  15953. }
  15954. }
  15955. chars = bp + 1028
  15956. if nglyphs*size > int32(m_NUM_LOCAL) {
  15957. chars = libc.Xmalloc(tls, libc.Uint64FromInt32(nglyphs*size))
  15958. if !(chars != 0) {
  15959. goto bail1
  15960. }
  15961. }
  15962. char8 = chars
  15963. char16 = chars
  15964. char32 = chars
  15965. /*
  15966. * Compute the number of glyph elts needed
  15967. */
  15968. nelt = int32(1)
  15969. firstFont = libc.UintptrFromInt32(0)
  15970. i = 0
  15971. for {
  15972. if !(i < nglyphs) {
  15973. break
  15974. }
  15975. pub1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  15976. font1 = pub1
  15977. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  15978. /* Substitute default for non-existent glyphs */
  15979. if g >= (*TXftFontInt)(unsafe.Pointer(font1)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(g)*8)) != 0) {
  15980. g = uint32(0)
  15981. }
  15982. if *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(g)*8)) != 0 {
  15983. firstFont = font1
  15984. break
  15985. }
  15986. goto _2
  15987. _2:
  15988. ;
  15989. i++
  15990. }
  15991. if i == nglyphs || !(firstFont != 0) {
  15992. goto bail2
  15993. }
  15994. glyph = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(firstFont)).Fglyphs + uintptr(g)*8))
  15995. format = (*TXftFontInt)(unsafe.Pointer(firstFont)).Fformat
  15996. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15997. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15998. prevPublic = libc.UintptrFromInt32(0)
  15999. for {
  16000. i++
  16001. v3 = i
  16002. if !(v3 < nglyphs) {
  16003. break
  16004. }
  16005. pub2 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  16006. font2 = pub2
  16007. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  16008. /* Substitute default for non-existent glyphs */
  16009. if g >= (*TXftFontInt)(unsafe.Pointer(font2)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font2)).Fglyphs + uintptr(g)*8)) != 0) {
  16010. g = uint32(0)
  16011. }
  16012. /*
  16013. * check to see if the glyph is placed where it would
  16014. * fall using the normal spacing
  16015. */
  16016. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font2)).Fglyphs + uintptr(g)*8))
  16017. glyph = v4
  16018. if v4 != 0 && !((*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0) {
  16019. if pub2 != prevPublic || x != int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) || y != int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) {
  16020. prevPublic = pub2
  16021. if (*TXftFontInt)(unsafe.Pointer(font2)).Fformat != format {
  16022. format = _XftPreferFormat(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font2)).Fformat, format)
  16023. }
  16024. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx)
  16025. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy)
  16026. nelt++
  16027. }
  16028. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  16029. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  16030. }
  16031. }
  16032. elts = bp + 5128
  16033. if nelt > int32(m_NUM_ELT_LOCAL) {
  16034. elts = libc.Xmalloc(tls, libc.Uint64FromInt32(nelt)*uint64(32))
  16035. if !(elts != 0) {
  16036. goto bail2
  16037. }
  16038. }
  16039. /*
  16040. * Generate the list of glyph elts and render color glyphs
  16041. */
  16042. nelt = 0
  16043. v5 = libc.Int32FromInt32(0)
  16044. y = v5
  16045. x = v5
  16046. n = 0
  16047. j = 0
  16048. prevPublic = libc.UintptrFromInt32(0)
  16049. i = 0
  16050. for {
  16051. if !(i < nglyphs) {
  16052. break
  16053. }
  16054. pub3 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont
  16055. font3 = pub3
  16056. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fglyph
  16057. /* Substitute default for non-existent glyphs */
  16058. if g >= (*TXftFontInt)(unsafe.Pointer(font3)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font3)).Fglyphs + uintptr(g)*8)) != 0) {
  16059. g = uint32(0)
  16060. }
  16061. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font3)).Fglyphs + uintptr(g)*8))
  16062. glyph = v7
  16063. if v7 != 0 {
  16064. if (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0 {
  16065. 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))
  16066. goto _6
  16067. }
  16068. 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) {
  16069. if n != 0 {
  16070. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  16071. nelt++
  16072. }
  16073. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fglyphset = (*TXftFontInt)(unsafe.Pointer(font3)).Fglyphset
  16074. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fchars = char8 + uintptr(size*j)
  16075. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FxOff = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx) - x
  16076. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).FyOff = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy) - y
  16077. prevPublic = pub3
  16078. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx)
  16079. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy)
  16080. n = 0
  16081. }
  16082. switch width {
  16083. case int32(1):
  16084. *(*int8)(unsafe.Pointer(char8 + uintptr(j))) = libc.Int8FromUint32(g)
  16085. case int32(2):
  16086. *(*uint16)(unsafe.Pointer(char16 + uintptr(j)*2)) = uint16(g)
  16087. case int32(4):
  16088. *(*uint32)(unsafe.Pointer(char32 + uintptr(j)*4)) = g
  16089. break
  16090. }
  16091. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  16092. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  16093. j++
  16094. n++
  16095. }
  16096. goto _6
  16097. _6:
  16098. ;
  16099. i++
  16100. }
  16101. if n != 0 {
  16102. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*32))).Fnchars = n
  16103. nelt++
  16104. }
  16105. __XftCompositeText(tls, dpy, op, src, dst, format, srcx, srcy, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fx), int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fy), width, elts, nelt)
  16106. if elts != bp+5128 {
  16107. libc.Xfree(tls, elts)
  16108. }
  16109. goto bail2
  16110. bail2:
  16111. ;
  16112. if chars != bp+1028 {
  16113. libc.Xfree(tls, chars)
  16114. }
  16115. goto bail1
  16116. bail1:
  16117. ;
  16118. if glyphs_loaded != 0 {
  16119. i = 0
  16120. for {
  16121. if !(i < nglyphs) {
  16122. break
  16123. }
  16124. X_XftFontManageMemory(tls, dpy, (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont)
  16125. goto _8
  16126. _8:
  16127. ;
  16128. i++
  16129. }
  16130. }
  16131. }
  16132. func XXftCharFontSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, dst TPicture, srcx int32, srcy int32, chars uintptr, len1 int32) {
  16133. bp := tls.Alloc(16384)
  16134. defer tls.Free(16384)
  16135. var glyphs uintptr
  16136. var i int32
  16137. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphFontSpec
  16138. _, _ = glyphs, i
  16139. if len1 <= 0 {
  16140. return
  16141. }
  16142. if len1 <= int32(m_NUM_LOCAL) {
  16143. glyphs = bp
  16144. } else {
  16145. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(16))
  16146. if !(glyphs != 0) {
  16147. return
  16148. }
  16149. }
  16150. i = 0
  16151. for {
  16152. if !(i < len1) {
  16153. break
  16154. }
  16155. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Ffont = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Ffont
  16156. (*(*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)
  16157. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fx = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fx
  16158. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*16))).Fy = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*16))).Fy
  16159. goto _1
  16160. _1:
  16161. ;
  16162. i++
  16163. }
  16164. XXftGlyphFontSpecRender(tls, dpy, op, src, dst, srcx, srcy, glyphs, len1)
  16165. if glyphs != bp {
  16166. libc.Xfree(tls, glyphs)
  16167. }
  16168. }
  16169. 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) {
  16170. bp := tls.Alloc(4096)
  16171. defer tls.Free(4096)
  16172. var glyphs uintptr
  16173. var i int32
  16174. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16175. _, _ = glyphs, i
  16176. if len1 <= 0 {
  16177. return
  16178. }
  16179. if len1 <= int32(m_NUM_LOCAL) {
  16180. glyphs = bp
  16181. } else {
  16182. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  16183. if !(glyphs != 0) {
  16184. return
  16185. }
  16186. }
  16187. i = 0
  16188. for {
  16189. if !(i < len1) {
  16190. break
  16191. }
  16192. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  16193. goto _1
  16194. _1:
  16195. ;
  16196. i++
  16197. }
  16198. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16199. if glyphs != bp {
  16200. libc.Xfree(tls, glyphs)
  16201. }
  16202. }
  16203. 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) {
  16204. bp := tls.Alloc(4096)
  16205. defer tls.Free(4096)
  16206. var glyphs uintptr
  16207. var i int32
  16208. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16209. _, _ = glyphs, i
  16210. if len1 <= 0 {
  16211. return
  16212. }
  16213. if len1 <= int32(m_NUM_LOCAL) {
  16214. glyphs = bp
  16215. } else {
  16216. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  16217. if !(glyphs != 0) {
  16218. return
  16219. }
  16220. }
  16221. i = 0
  16222. for {
  16223. if !(i < len1) {
  16224. break
  16225. }
  16226. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  16227. goto _1
  16228. _1:
  16229. ;
  16230. i++
  16231. }
  16232. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16233. if glyphs != bp {
  16234. libc.Xfree(tls, glyphs)
  16235. }
  16236. }
  16237. 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) {
  16238. bp := tls.Alloc(4096)
  16239. defer tls.Free(4096)
  16240. var glyphs uintptr
  16241. var i int32
  16242. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16243. _, _ = glyphs, i
  16244. if len1 <= 0 {
  16245. return
  16246. }
  16247. if len1 <= int32(m_NUM_LOCAL) {
  16248. glyphs = bp
  16249. } else {
  16250. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  16251. if !(glyphs != 0) {
  16252. return
  16253. }
  16254. }
  16255. i = 0
  16256. for {
  16257. if !(i < len1) {
  16258. break
  16259. }
  16260. *(*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)))))))
  16261. goto _1
  16262. _1:
  16263. ;
  16264. i++
  16265. }
  16266. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16267. if glyphs != bp {
  16268. libc.Xfree(tls, glyphs)
  16269. }
  16270. }
  16271. 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) {
  16272. bp := tls.Alloc(4096)
  16273. defer tls.Free(4096)
  16274. var glyphs uintptr
  16275. var i int32
  16276. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16277. _, _ = glyphs, i
  16278. if len1 <= 0 {
  16279. return
  16280. }
  16281. if len1 <= int32(m_NUM_LOCAL) {
  16282. glyphs = bp
  16283. } else {
  16284. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  16285. if !(glyphs != 0) {
  16286. return
  16287. }
  16288. }
  16289. i = 0
  16290. for {
  16291. if !(i < len1) {
  16292. break
  16293. }
  16294. *(*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)))
  16295. goto _1
  16296. _1:
  16297. ;
  16298. i++
  16299. }
  16300. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16301. if glyphs != bp {
  16302. libc.Xfree(tls, glyphs)
  16303. }
  16304. }
  16305. 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) {
  16306. bp := tls.Alloc(4096)
  16307. defer tls.Free(4096)
  16308. var glyphs uintptr
  16309. var i int32
  16310. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16311. _, _ = glyphs, i
  16312. if len1 <= 0 {
  16313. return
  16314. }
  16315. if len1 <= int32(m_NUM_LOCAL) {
  16316. glyphs = bp
  16317. } else {
  16318. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  16319. if !(glyphs != 0) {
  16320. return
  16321. }
  16322. }
  16323. i = 0
  16324. for {
  16325. if !(i < len1) {
  16326. break
  16327. }
  16328. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  16329. goto _1
  16330. _1:
  16331. ;
  16332. i++
  16333. }
  16334. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16335. if glyphs != bp {
  16336. libc.Xfree(tls, glyphs)
  16337. }
  16338. }
  16339. 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) {
  16340. bp := tls.Alloc(4096)
  16341. defer tls.Free(4096)
  16342. var glyphs uintptr
  16343. var i int32
  16344. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16345. _, _ = glyphs, i
  16346. if len1 <= 0 {
  16347. return
  16348. }
  16349. if len1 <= int32(m_NUM_LOCAL) {
  16350. glyphs = bp
  16351. } else {
  16352. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  16353. if !(glyphs != 0) {
  16354. return
  16355. }
  16356. }
  16357. i = 0
  16358. for {
  16359. if !(i < len1) {
  16360. break
  16361. }
  16362. *(*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)))))))
  16363. goto _1
  16364. _1:
  16365. ;
  16366. i++
  16367. }
  16368. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16369. if glyphs != bp {
  16370. libc.Xfree(tls, glyphs)
  16371. }
  16372. }
  16373. 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) {
  16374. bp := tls.Alloc(4096)
  16375. defer tls.Free(4096)
  16376. var glyphs uintptr
  16377. var i int32
  16378. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16379. _, _ = glyphs, i
  16380. if len1 <= 0 {
  16381. return
  16382. }
  16383. if len1 <= int32(m_NUM_LOCAL) {
  16384. glyphs = bp
  16385. } else {
  16386. glyphs = libc.Xmalloc(tls, libc.Uint64FromInt32(len1)*uint64(4))
  16387. if !(glyphs != 0) {
  16388. return
  16389. }
  16390. }
  16391. i = 0
  16392. for {
  16393. if !(i < len1) {
  16394. break
  16395. }
  16396. *(*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)))
  16397. goto _1
  16398. _1:
  16399. ;
  16400. i++
  16401. }
  16402. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16403. if glyphs != bp {
  16404. libc.Xfree(tls, glyphs)
  16405. }
  16406. }
  16407. 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) {
  16408. bp := tls.Alloc(4112)
  16409. defer tls.Free(4112)
  16410. var glyphs, glyphs_new uintptr
  16411. var i, l, size, v1, v3 int32
  16412. var v2 bool
  16413. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16414. var _ /* ucs4 at bp+4096 */ TFcChar32
  16415. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  16416. if len1 <= 0 {
  16417. return
  16418. }
  16419. i = 0
  16420. glyphs = bp
  16421. size = int32(m_NUM_LOCAL)
  16422. for {
  16423. if v2 = len1 != 0; v2 {
  16424. v1 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  16425. l = v1
  16426. }
  16427. if !(v2 && v1 > 0) {
  16428. break
  16429. }
  16430. if i == size {
  16431. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*libc.Int32FromInt32(2))*uint64(4))
  16432. if !(glyphs_new != 0) {
  16433. if glyphs != bp {
  16434. libc.Xfree(tls, glyphs)
  16435. }
  16436. return
  16437. }
  16438. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  16439. size *= int32(2)
  16440. if glyphs != bp {
  16441. libc.Xfree(tls, glyphs)
  16442. }
  16443. glyphs = glyphs_new
  16444. }
  16445. v3 = i
  16446. i++
  16447. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  16448. string1 += uintptr(l)
  16449. len1 -= l
  16450. }
  16451. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, i)
  16452. if glyphs != bp {
  16453. libc.Xfree(tls, glyphs)
  16454. }
  16455. }
  16456. 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) {
  16457. bp := tls.Alloc(4112)
  16458. defer tls.Free(4112)
  16459. var glyphs, glyphs_new uintptr
  16460. var i, l, size, v1, v3 int32
  16461. var v2 bool
  16462. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16463. var _ /* ucs4 at bp+4096 */ TFcChar32
  16464. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  16465. if len1 <= 0 {
  16466. return
  16467. }
  16468. i = 0
  16469. glyphs = bp
  16470. size = int32(m_NUM_LOCAL)
  16471. for {
  16472. if v2 = len1 != 0; v2 {
  16473. v1 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  16474. l = v1
  16475. }
  16476. if !(v2 && v1 > 0) {
  16477. break
  16478. }
  16479. if i == size {
  16480. glyphs_new = libc.Xmalloc(tls, libc.Uint64FromInt32(size*libc.Int32FromInt32(2))*uint64(4))
  16481. if !(glyphs_new != 0) {
  16482. if glyphs != bp {
  16483. libc.Xfree(tls, glyphs)
  16484. }
  16485. return
  16486. }
  16487. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint64FromInt32(size)*uint64(4))
  16488. size *= int32(2)
  16489. if glyphs != bp {
  16490. libc.Xfree(tls, glyphs)
  16491. }
  16492. glyphs = glyphs_new
  16493. }
  16494. v3 = i
  16495. i++
  16496. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  16497. string1 += uintptr(l)
  16498. len1 -= l
  16499. }
  16500. XXftGlyphRender(tls, dpy, int32(m_PictOpOver), src, pub, dst, srcx, srcy, x, y, glyphs, i)
  16501. if glyphs != bp {
  16502. libc.Xfree(tls, glyphs)
  16503. }
  16504. }
  16505. const m_UINT64_MAX2 = "0xffffffffffffffffu"
  16506. /* xftxlfd.c */
  16507. func X_XftMatchSymbolic(tls *libc.TLS, s uintptr, n int32, name uintptr, def int32) (r int32) {
  16508. var v1 int32
  16509. _ = v1
  16510. for {
  16511. v1 = n
  16512. n--
  16513. if !(v1 != 0) {
  16514. break
  16515. }
  16516. if !(libfontconfig.XFcStrCmpIgnoreCase(tls, (*TXftSymbolic)(unsafe.Pointer(s)).Fname, name) != 0) {
  16517. return (*TXftSymbolic)(unsafe.Pointer(s)).Fvalue
  16518. }
  16519. s += 16
  16520. }
  16521. return def
  16522. }
  16523. /* xftxlfd.c */
  16524. func XXftNativeByteOrder(tls *libc.TLS) (r int32) {
  16525. bp := tls.Alloc(16)
  16526. defer tls.Free(16)
  16527. var _ /* whichbyte at bp+0 */ int32
  16528. *(*int32)(unsafe.Pointer(bp)) = int32(1)
  16529. if *(*int8)(unsafe.Pointer(bp)) != 0 {
  16530. return m_LSBFirst
  16531. }
  16532. return int32(m_MSBFirst)
  16533. }
  16534. /* byte swap a 32-bit value */
  16535. /* byte swap a short */
  16536. /* byte swap a three-byte unit */
  16537. func XXftSwapCARD32(tls *libc.TLS, data uintptr, u int32) {
  16538. var n int8
  16539. var v1 int32
  16540. _, _ = n, v1
  16541. for {
  16542. v1 = u
  16543. u--
  16544. if !(v1 != 0) {
  16545. break
  16546. }
  16547. n = *(*int8)(unsafe.Pointer(data))
  16548. *(*int8)(unsafe.Pointer(data)) = *(*int8)(unsafe.Pointer(data + 3))
  16549. *(*int8)(unsafe.Pointer(data + 3)) = n
  16550. n = *(*int8)(unsafe.Pointer(data + 1))
  16551. *(*int8)(unsafe.Pointer(data + 1)) = *(*int8)(unsafe.Pointer(data + 2))
  16552. *(*int8)(unsafe.Pointer(data + 2)) = n
  16553. data += 4
  16554. }
  16555. }
  16556. func XXftSwapCARD24(tls *libc.TLS, data uintptr, width int32, height int32) {
  16557. var d uintptr
  16558. var n int8
  16559. var u, units, v1, v2 int32
  16560. _, _, _, _, _, _ = d, n, u, units, v1, v2
  16561. units = width / int32(3)
  16562. for {
  16563. v1 = height
  16564. height--
  16565. if !(v1 != 0) {
  16566. break
  16567. }
  16568. d = data
  16569. data += uintptr(width)
  16570. u = units
  16571. for {
  16572. v2 = u
  16573. u--
  16574. if !(v2 != 0) {
  16575. break
  16576. }
  16577. n = *(*int8)(unsafe.Pointer(d))
  16578. *(*int8)(unsafe.Pointer(d)) = *(*int8)(unsafe.Pointer(d + 2))
  16579. *(*int8)(unsafe.Pointer(d + 2)) = n
  16580. d += uintptr(3)
  16581. }
  16582. }
  16583. }
  16584. func XXftSwapCARD16(tls *libc.TLS, data uintptr, u int32) {
  16585. var n int8
  16586. var v1 int32
  16587. _, _ = n, v1
  16588. for {
  16589. v1 = u
  16590. u--
  16591. if !(v1 != 0) {
  16592. break
  16593. }
  16594. n = *(*int8)(unsafe.Pointer(data))
  16595. *(*int8)(unsafe.Pointer(data)) = *(*int8)(unsafe.Pointer(data + 1))
  16596. *(*int8)(unsafe.Pointer(data + 1)) = n
  16597. data += 2
  16598. }
  16599. }
  16600. func XXftSwapImage(tls *libc.TLS, image uintptr) {
  16601. switch (*TXImage)(unsafe.Pointer(image)).Fbits_per_pixel {
  16602. case int32(32):
  16603. XXftSwapCARD32(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fheight*(*TXImage)(unsafe.Pointer(image)).Fbytes_per_line>>int32(2))
  16604. case int32(24):
  16605. XXftSwapCARD24(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line, (*TXImage)(unsafe.Pointer(image)).Fheight)
  16606. case int32(16):
  16607. XXftSwapCARD16(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fheight*(*TXImage)(unsafe.Pointer(image)).Fbytes_per_line>>int32(1))
  16608. default:
  16609. break
  16610. }
  16611. }
  16612. /* xftxlfd.c */
  16613. var _XftXlfdWeights = [6]TXftSymbolic{
  16614. 0: {
  16615. Fname: __ccgo_ts + 2170,
  16616. Fvalue: int32(m_FC_WEIGHT_LIGHT),
  16617. },
  16618. 1: {
  16619. Fname: __ccgo_ts + 2176,
  16620. Fvalue: int32(m_FC_WEIGHT_MEDIUM),
  16621. },
  16622. 2: {
  16623. Fname: __ccgo_ts + 2183,
  16624. Fvalue: int32(m_FC_WEIGHT_MEDIUM),
  16625. },
  16626. 3: {
  16627. Fname: __ccgo_ts + 2191,
  16628. Fvalue: int32(m_FC_WEIGHT_DEMIBOLD),
  16629. },
  16630. 4: {
  16631. Fname: __ccgo_ts + 2200,
  16632. Fvalue: int32(m_FC_WEIGHT_BOLD),
  16633. },
  16634. 5: {
  16635. Fname: __ccgo_ts + 2205,
  16636. Fvalue: int32(m_FC_WEIGHT_BLACK),
  16637. },
  16638. }
  16639. var _XftXlfdSlants = [3]TXftSymbolic{
  16640. 0: {
  16641. Fname: __ccgo_ts + 2211,
  16642. },
  16643. 1: {
  16644. Fname: __ccgo_ts + 2213,
  16645. Fvalue: int32(m_FC_SLANT_ITALIC),
  16646. },
  16647. 2: {
  16648. Fname: __ccgo_ts + 2215,
  16649. Fvalue: int32(m_FC_SLANT_OBLIQUE),
  16650. },
  16651. }
  16652. // C documentation
  16653. //
  16654. // /*
  16655. // * Cut out one XLFD field, placing it in 'save' and return
  16656. // * the start of 'save'
  16657. // */
  16658. func _XftSplitStr(tls *libc.TLS, field uintptr, save uintptr) (r uintptr) {
  16659. var c int8
  16660. var s, v1, v2 uintptr
  16661. _, _, _, _ = c, s, v1, v2
  16662. s = save
  16663. for *(*int8)(unsafe.Pointer(field)) != 0 {
  16664. if int32(*(*int8)(unsafe.Pointer(field))) == int32('-') {
  16665. break
  16666. }
  16667. v1 = field
  16668. field++
  16669. c = *(*int8)(unsafe.Pointer(v1))
  16670. v2 = save
  16671. save++
  16672. *(*int8)(unsafe.Pointer(v2)) = c
  16673. }
  16674. *(*int8)(unsafe.Pointer(save)) = 0
  16675. return s
  16676. }
  16677. /*
  16678. * convert one XLFD numeric field. Return -1 if the field is '*'
  16679. */
  16680. func _XftGetInt(tls *libc.TLS, ptr uintptr, val uintptr) (r uintptr) {
  16681. var v2 uintptr
  16682. _ = v2
  16683. if int32(*(*int8)(unsafe.Pointer(ptr))) == int32('*') {
  16684. *(*int32)(unsafe.Pointer(val)) = -int32(1)
  16685. ptr++
  16686. } else {
  16687. *(*int32)(unsafe.Pointer(val)) = 0
  16688. for {
  16689. if !(int32(*(*int8)(unsafe.Pointer(ptr))) >= int32('0') && int32(*(*int8)(unsafe.Pointer(ptr))) <= int32('9')) {
  16690. break
  16691. }
  16692. v2 = ptr
  16693. ptr++
  16694. *(*int32)(unsafe.Pointer(val)) = *(*int32)(unsafe.Pointer(val))*int32(10) + int32(*(*int8)(unsafe.Pointer(v2))) - int32('0')
  16695. goto _1
  16696. _1:
  16697. }
  16698. }
  16699. if int32(*(*int8)(unsafe.Pointer(ptr))) == int32('-') {
  16700. return ptr
  16701. }
  16702. return libc.UintptrFromInt32(0)
  16703. }
  16704. func XXftXlfdParse(tls *libc.TLS, xlfd_orig uintptr, ignore_scalable TFcBool, complete TFcBool) (r uintptr) {
  16705. bp := tls.Alloc(16)
  16706. defer tls.Free(16)
  16707. var dpixel float64
  16708. 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
  16709. var slant_value, weight_value int32
  16710. var _ /* pixel at bp+0 */ int32
  16711. var _ /* point at bp+4 */ int32
  16712. var _ /* resx at bp+8 */ int32
  16713. var _ /* resy at bp+12 */ int32
  16714. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  16715. xlfd = xlfd_orig
  16716. if int32(*(*int8)(unsafe.Pointer(xlfd))) != int32('-') {
  16717. return libc.UintptrFromInt32(0)
  16718. }
  16719. xlfd++
  16720. v3 = xlfd
  16721. v2 = v3
  16722. foundry = v2
  16723. v1 = libc.Xstrchr(tls, v2, int32('-'))
  16724. xlfd = v1
  16725. if !(v1 != 0) {
  16726. return libc.UintptrFromInt32(0)
  16727. }
  16728. xlfd++
  16729. v6 = xlfd
  16730. v5 = v6
  16731. family = v5
  16732. v4 = libc.Xstrchr(tls, v5, int32('-'))
  16733. xlfd = v4
  16734. if !(v4 != 0) {
  16735. return libc.UintptrFromInt32(0)
  16736. }
  16737. xlfd++
  16738. v9 = xlfd
  16739. v8 = v9
  16740. weight_name = v8
  16741. v7 = libc.Xstrchr(tls, v8, int32('-'))
  16742. xlfd = v7
  16743. if !(v7 != 0) {
  16744. return libc.UintptrFromInt32(0)
  16745. }
  16746. xlfd++
  16747. v12 = xlfd
  16748. v11 = v12
  16749. slant = v11
  16750. v10 = libc.Xstrchr(tls, v11, int32('-'))
  16751. xlfd = v10
  16752. if !(v10 != 0) {
  16753. return libc.UintptrFromInt32(0)
  16754. }
  16755. xlfd++
  16756. v14 = xlfd
  16757. v13 = libc.Xstrchr(tls, v14, int32('-'))
  16758. xlfd = v13
  16759. if !(v13 != 0) {
  16760. return libc.UintptrFromInt32(0)
  16761. }
  16762. xlfd++
  16763. v16 = xlfd
  16764. v15 = libc.Xstrchr(tls, v16, int32('-'))
  16765. xlfd = v15
  16766. if !(v15 != 0) {
  16767. return libc.UintptrFromInt32(0)
  16768. }
  16769. xlfd++
  16770. v18 = xlfd
  16771. v17 = _XftGetInt(tls, v18, bp)
  16772. xlfd = v17
  16773. if !(v17 != 0) {
  16774. return libc.UintptrFromInt32(0)
  16775. }
  16776. xlfd++
  16777. v20 = xlfd
  16778. v19 = _XftGetInt(tls, v20, bp+4)
  16779. xlfd = v19
  16780. if !(v19 != 0) {
  16781. return libc.UintptrFromInt32(0)
  16782. }
  16783. xlfd++
  16784. v22 = xlfd
  16785. v21 = _XftGetInt(tls, v22, bp+8)
  16786. xlfd = v21
  16787. if !(v21 != 0) {
  16788. return libc.UintptrFromInt32(0)
  16789. }
  16790. xlfd++
  16791. v24 = xlfd
  16792. v23 = _XftGetInt(tls, v24, bp+12)
  16793. xlfd = v23
  16794. if !(v23 != 0) {
  16795. return libc.UintptrFromInt32(0)
  16796. }
  16797. xlfd++
  16798. v26 = xlfd
  16799. v25 = libc.Xstrchr(tls, v26, int32('-'))
  16800. xlfd = v25
  16801. if !(v25 != 0) {
  16802. return libc.UintptrFromInt32(0)
  16803. }
  16804. xlfd++
  16805. v28 = xlfd
  16806. v27 = libc.Xstrchr(tls, v28, int32('-'))
  16807. xlfd = v27
  16808. if !(v27 != 0) {
  16809. return libc.UintptrFromInt32(0)
  16810. }
  16811. xlfd++
  16812. v30 = xlfd
  16813. v29 = libc.Xstrchr(tls, v30, int32('-'))
  16814. xlfd = v29
  16815. if !(v29 != 0) {
  16816. return libc.UintptrFromInt32(0)
  16817. }
  16818. /* make sure no fields follow this one */
  16819. xlfd++
  16820. v31 = xlfd
  16821. if libc.Xstrchr(tls, v31, int32('-')) != 0 {
  16822. return libc.UintptrFromInt32(0)
  16823. }
  16824. if !(*(*int32)(unsafe.Pointer(bp)) != 0) {
  16825. return libc.UintptrFromInt32(0)
  16826. }
  16827. pat = libfontconfig.XFcPatternCreate(tls)
  16828. if !(pat != 0) {
  16829. return libc.UintptrFromInt32(0)
  16830. }
  16831. save = libc.Xmalloc(tls, libc.Xstrlen(tls, foundry)+uint64(1))
  16832. if !(save != 0) {
  16833. libfontconfig.XFcPatternDestroy(tls, pat)
  16834. return libc.UintptrFromInt32(0)
  16835. }
  16836. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+2217, xlfd_orig) != 0) {
  16837. goto bail
  16838. }
  16839. _XftSplitStr(tls, foundry, save)
  16840. if *(*int8)(unsafe.Pointer(save)) != 0 && libc.Xstrcmp(tls, save, __ccgo_ts+2222) != 0 {
  16841. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+2224, save) != 0) {
  16842. goto bail
  16843. }
  16844. }
  16845. _XftSplitStr(tls, family, save)
  16846. if *(*int8)(unsafe.Pointer(save)) != 0 && libc.Xstrcmp(tls, save, __ccgo_ts+2222) != 0 {
  16847. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+2232, save) != 0) {
  16848. goto bail
  16849. }
  16850. }
  16851. 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))
  16852. if !(libfontconfig.XFcPatternAddInteger(tls, pat, __ccgo_ts+2239, weight_value) != 0) {
  16853. goto bail
  16854. }
  16855. 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)
  16856. if !(libfontconfig.XFcPatternAddInteger(tls, pat, __ccgo_ts+2246, slant_value) != 0) {
  16857. goto bail
  16858. }
  16859. dpixel = float64(*(*int32)(unsafe.Pointer(bp)))
  16860. if *(*int32)(unsafe.Pointer(bp + 4)) > 0 {
  16861. if !(libfontconfig.XFcPatternAddDouble(tls, pat, __ccgo_ts+2252, float64(*(*int32)(unsafe.Pointer(bp + 4)))/float64(10)) != 0) {
  16862. goto bail
  16863. }
  16864. if *(*int32)(unsafe.Pointer(bp)) <= 0 && *(*int32)(unsafe.Pointer(bp + 12)) > 0 {
  16865. dpixel = float64(float64(*(*int32)(unsafe.Pointer(bp + 4)))*float64(*(*int32)(unsafe.Pointer(bp + 12)))) / float64(720)
  16866. }
  16867. }
  16868. if dpixel > libc.Float64FromInt32(0) {
  16869. if !(libfontconfig.XFcPatternAddDouble(tls, pat, __ccgo_ts+1243, dpixel) != 0) {
  16870. goto bail
  16871. }
  16872. }
  16873. libc.Xfree(tls, save)
  16874. return pat
  16875. goto bail
  16876. bail:
  16877. ;
  16878. libc.Xfree(tls, save)
  16879. libfontconfig.XFcPatternDestroy(tls, pat)
  16880. return libc.UintptrFromInt32(0)
  16881. }
  16882. func __ccgo_fp(f interface{}) uintptr {
  16883. type iface [2]uintptr
  16884. return (*iface)(unsafe.Pointer(&f))[1]
  16885. }
  16886. /* xftxlfd.c */
  16887. var X_XftDisplayInfo uintptr
  16888. /* xftxlfd.c */
  16889. var X_XftFTlibrary TFT_Library
  16890. var __ccgo_ts = (*reflect.StringHeader)(unsafe.Pointer(&__ccgo_ts1)).Data
  16891. 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"