ccgo_linux_arm.go 545 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978
  1. // Code generated for linux/arm 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/arm -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libfreetype/include/linux/arm -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libX11/include/linux/arm -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libXrender/include/linux/arm -lfontconfig -lfreetype -lX11 -lXrender -o libxft.go --package-name libxft src/.libs/libXft.a', DO NOT EDIT.
  2. //go:build linux && arm
  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_INT_MAX = "INT_MAX"
  461. const m_FT_INT_MIN = "INT_MIN"
  462. const m_FT_LLONG_MAX = "LLONG_MAX"
  463. const m_FT_LLONG_MIN = "LLONG_MIN"
  464. const m_FT_LOAD_DEFAULT = 0x0
  465. const m_FT_LONG_MAX = "LONG_MAX"
  466. const m_FT_LONG_MIN = "LONG_MIN"
  467. const m_FT_MAX_MODULES = 32
  468. const m_FT_OPEN_DRIVER = 0x8
  469. const m_FT_OPEN_MEMORY = 0x1
  470. const m_FT_OPEN_PARAMS = 0x10
  471. const m_FT_OPEN_PATHNAME = 0x4
  472. const m_FT_OPEN_STREAM = 0x2
  473. const m_FT_OUTLINE_CONTOURS_MAX = "SHRT_MAX"
  474. const m_FT_OUTLINE_EVEN_ODD_FILL = 0x2
  475. const m_FT_OUTLINE_HIGH_PRECISION = 0x100
  476. const m_FT_OUTLINE_IGNORE_DROPOUTS = 0x8
  477. const m_FT_OUTLINE_INCLUDE_STUBS = 0x20
  478. const m_FT_OUTLINE_NONE = 0x0
  479. const m_FT_OUTLINE_OVERLAP = 0x40
  480. const m_FT_OUTLINE_OWNER = 0x1
  481. const m_FT_OUTLINE_POINTS_MAX = "SHRT_MAX"
  482. const m_FT_OUTLINE_REVERSE_FILL = 0x4
  483. const m_FT_OUTLINE_SINGLE_PASS = 0x200
  484. const m_FT_OUTLINE_SMART_DROPOUTS = 0x10
  485. const m_FT_Outline_ConicTo_Func = "FT_Outline_ConicToFunc"
  486. const m_FT_Outline_CubicTo_Func = "FT_Outline_CubicToFunc"
  487. const m_FT_Outline_LineTo_Func = "FT_Outline_LineToFunc"
  488. const m_FT_Outline_MoveTo_Func = "FT_Outline_MoveToFunc"
  489. const m_FT_PCF_DRIVER_H = "FT_DRIVER_H"
  490. const m_FT_RASTER_FLAG_AA = 0x1
  491. const m_FT_RASTER_FLAG_CLIP = 0x4
  492. const m_FT_RASTER_FLAG_DEFAULT = 0x0
  493. const m_FT_RASTER_FLAG_DIRECT = 0x2
  494. const m_FT_RASTER_FLAG_SDF = 0x8
  495. const m_FT_RENDER_POOL_SIZE = 16384
  496. const m_FT_Raster_Done_Func = "FT_Raster_DoneFunc"
  497. const m_FT_Raster_New_Func = "FT_Raster_NewFunc"
  498. const m_FT_Raster_Render_Func = "FT_Raster_RenderFunc"
  499. const m_FT_Raster_Reset_Func = "FT_Raster_ResetFunc"
  500. const m_FT_Raster_Set_Mode_Func = "FT_Raster_SetModeFunc"
  501. const m_FT_Raster_Span_Func = "FT_SpanFunc"
  502. const m_FT_SUBGLYPH_FLAG_2X2 = 0x80
  503. const m_FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS = 1
  504. const m_FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES = 2
  505. const m_FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID = 4
  506. const m_FT_SUBGLYPH_FLAG_SCALE = 8
  507. const m_FT_SUBGLYPH_FLAG_USE_MY_METRICS = 0x200
  508. const m_FT_SUBGLYPH_FLAG_XY_SCALE = 0x40
  509. const m_FT_TRUETYPE_DRIVER_H = "FT_DRIVER_H"
  510. const m_FT_UINT_MAX = "UINT_MAX"
  511. const m_FT_ULLONG_MAX = "ULLONG_MAX"
  512. const m_FT_ULONG_MAX = "ULONG_MAX"
  513. const m_FT_USHORT_MAX = "USHRT_MAX"
  514. const m_FT_XFREE86_H = "FT_FONT_FORMATS_H"
  515. const m_FUNCPROTO = 15
  516. const m_False = 0
  517. const m_FamilyChaos = 2
  518. const m_FamilyDECnet = 1
  519. const m_FamilyInternet = 0
  520. const m_FamilyInternet6 = 6
  521. const m_FamilyServerInterpreted = 5
  522. const m_FcConfigGetRescanInverval = "FcConfigGetRescanInverval_REPLACE_BY_FcConfigGetRescanInterval"
  523. const m_FcConfigSetRescanInverval = "FcConfigSetRescanInverval_REPLACE_BY_FcConfigSetRescanInterval"
  524. const m_FcDontCare = 2
  525. const m_FcFalse = 0
  526. const m_FcTrue = 1
  527. const m_FillOpaqueStippled = 3
  528. const m_FillSolid = 0
  529. const m_FillStippled = 2
  530. const m_FillTiled = 1
  531. const m_FilterBest = "best"
  532. const m_FilterBilinear = "bilinear"
  533. const m_FilterConvolution = "convolution"
  534. const m_FilterFast = "fast"
  535. const m_FilterGood = "good"
  536. const m_FilterNearest = "nearest"
  537. const m_FirstExtensionError = 128
  538. const m_FocusIn = 9
  539. const m_FocusOut = 10
  540. const m_FontChange = 255
  541. const m_FontLeftToRight = 0
  542. const m_FontRightToLeft = 1
  543. const m_ForgetGravity = 0
  544. const m_GCLastBit = 22
  545. const m_GXand = 0x1
  546. const m_GXandInverted = 0x4
  547. const m_GXandReverse = 0x2
  548. const m_GXclear = 0x0
  549. const m_GXcopy = 0x3
  550. const m_GXcopyInverted = 0xc
  551. const m_GXequiv = 0x9
  552. const m_GXinvert = 0xa
  553. const m_GXnand = 0xe
  554. const m_GXnoop = 0x5
  555. const m_GXnor = 0x8
  556. const m_GXor = 0x7
  557. const m_GXorInverted = 0xd
  558. const m_GXorReverse = 0xb
  559. const m_GXset = 0xf
  560. const m_GXxor = 0x6
  561. const m_GenericEvent = 35
  562. const m_GrabFrozen = 4
  563. const m_GrabInvalidTime = 2
  564. const m_GrabModeAsync = 1
  565. const m_GrabModeSync = 0
  566. const m_GrabNotViewable = 3
  567. const m_GrabSuccess = 0
  568. const m_GraphicsExpose = 13
  569. const m_GravityNotify = 24
  570. const m_GrayScale = 1
  571. const m_HAVE_CONFIG_H = 1
  572. const m_HAVE_DLFCN_H = 1
  573. const m_HAVE_INTTYPES_H = 1
  574. const m_HAVE_MEMORY_H = 1
  575. const m_HAVE_STDINT_H = 1
  576. const m_HAVE_STDLIB_H = 1
  577. const m_HAVE_STRINGS_H = 1
  578. const m_HAVE_STRING_H = 1
  579. const m_HAVE_SYS_STAT_H = 1
  580. const m_HAVE_SYS_TYPES_H = 1
  581. const m_HAVE_UNISTD_H = 1
  582. const m_HOST_NAME_MAX = 255
  583. const m_HeightValue = 0x0008
  584. const m_HostDelete = 1
  585. const m_HostInsert = 0
  586. const m_INT16_MAX = 0x7fff
  587. const m_INT32_MAX = 0x7fffffff
  588. const m_INT64_MAX = 0x7fffffffffffffff
  589. const m_INT8_MAX = 0x7f
  590. const m_INTMAX_MAX = "INT64_MAX"
  591. const m_INTMAX_MIN = "INT64_MIN"
  592. const m_INTPTR_MAX = "INT32_MAX"
  593. const m_INTPTR_MIN = "INT32_MIN"
  594. const m_INT_FAST16_MAX = "INT32_MAX"
  595. const m_INT_FAST16_MIN = "INT32_MIN"
  596. const m_INT_FAST32_MAX = "INT32_MAX"
  597. const m_INT_FAST32_MIN = "INT32_MIN"
  598. const m_INT_FAST64_MAX = "INT64_MAX"
  599. const m_INT_FAST64_MIN = "INT64_MIN"
  600. const m_INT_FAST8_MAX = "INT8_MAX"
  601. const m_INT_FAST8_MIN = "INT8_MIN"
  602. const m_INT_LEAST16_MAX = "INT16_MAX"
  603. const m_INT_LEAST16_MIN = "INT16_MIN"
  604. const m_INT_LEAST32_MAX = "INT32_MAX"
  605. const m_INT_LEAST32_MIN = "INT32_MIN"
  606. const m_INT_LEAST64_MAX = "INT64_MAX"
  607. const m_INT_LEAST64_MIN = "INT64_MIN"
  608. const m_INT_LEAST8_MAX = "INT8_MAX"
  609. const m_INT_LEAST8_MIN = "INT8_MIN"
  610. const m_INT_MAX = 2147483647
  611. const m_IOV_MAX = 1024
  612. const m_IconicState = 3
  613. const m_InactiveState = 4
  614. const m_IncludeInferiors = 1
  615. const m_InputFocus = 1
  616. const m_InputOnly = 2
  617. const m_InputOutput = 1
  618. const m_IsUnmapped = 0
  619. const m_IsUnviewable = 1
  620. const m_IsViewable = 2
  621. const m_JoinBevel = 2
  622. const m_JoinMiter = 0
  623. const m_JoinRound = 1
  624. const m_KeyPress = 2
  625. const m_KeyRelease = 3
  626. const m_KeymapNotify = 11
  627. const m_LASTEvent = 36
  628. const m_LINE_MAX = 4096
  629. const m_LITTLE_ENDIAN = "__LITTLE_ENDIAN"
  630. const m_LLONG_MAX = 0x7fffffffffffffff
  631. const m_LOCKED = 1
  632. const m_LOGIN_NAME_MAX = 256
  633. const m_LONG_BIT = 32
  634. const m_LONG_MAX = "__LONG_MAX"
  635. const m_LSBFirst = 0
  636. const m_LT_OBJDIR = ".libs/"
  637. const m_L_ctermid = 20
  638. const m_L_cuserid = 20
  639. const m_L_tmpnam = 20
  640. const m_LastExtensionError = 255
  641. const m_LeaveNotify = 8
  642. const m_LedModeOff = 0
  643. const m_LedModeOn = 1
  644. const m_LineDoubleDash = 2
  645. const m_LineOnOffDash = 1
  646. const m_LineSolid = 0
  647. const m_LockMapIndex = 1
  648. const m_LowerHighest = 1
  649. const m_MB_LEN_MAX = 4
  650. const m_MQ_PRIO_MAX = 32768
  651. const m_MSBFirst = 1
  652. const m_MapNotify = 19
  653. const m_MapRequest = 20
  654. const m_MappingBusy = 1
  655. const m_MappingFailed = 2
  656. const m_MappingKeyboard = 1
  657. const m_MappingModifier = 0
  658. const m_MappingNotify = 34
  659. const m_MappingPointer = 2
  660. const m_MappingSuccess = 0
  661. const m_Mod1MapIndex = 3
  662. const m_Mod2MapIndex = 4
  663. const m_Mod3MapIndex = 5
  664. const m_Mod4MapIndex = 6
  665. const m_Mod5MapIndex = 7
  666. const m_MotionNotify = 6
  667. const m_NAME_MAX = 255
  668. const m_NDEBUG = 1
  669. const m_NGROUPS_MAX = 32
  670. const m_NL_ARGMAX = 9
  671. const m_NL_LANGMAX = 32
  672. const m_NL_MSGMAX = 32767
  673. const m_NL_NMAX = 16
  674. const m_NL_SETMAX = 255
  675. const m_NL_TEXTMAX = 2048
  676. const m_NZERO = 20
  677. const m_NeedFunctionPrototypes = 1
  678. const m_NeedNestedPrototypes = 1
  679. const m_NeedVarargsPrototypes = 1
  680. const m_NeedWidePrototypes = 0
  681. const m_NoEventMask = 0
  682. const m_NoExpose = 14
  683. const m_NoSymbol = 0
  684. const m_NoValue = 0x0000
  685. const m_Nonconvex = 1
  686. const m_None = 0
  687. const m_NormalState = 1
  688. const m_NorthEastGravity = 3
  689. const m_NorthGravity = 2
  690. const m_NorthWestGravity = 1
  691. const m_NotUseful = 0
  692. const m_NotifyAncestor = 0
  693. const m_NotifyDetailNone = 7
  694. const m_NotifyGrab = 1
  695. const m_NotifyHint = 1
  696. const m_NotifyInferior = 2
  697. const m_NotifyNonlinear = 3
  698. const m_NotifyNonlinearVirtual = 4
  699. const m_NotifyNormal = 0
  700. const m_NotifyPointer = 5
  701. const m_NotifyPointerRoot = 6
  702. const m_NotifyUngrab = 2
  703. const m_NotifyVirtual = 1
  704. const m_NotifyWhileGrabbed = 3
  705. const m_Opposite = 4
  706. const m_PACKAGE = "libXft"
  707. const m_PACKAGE_BUGREPORT = "https://gitlab.freedesktop.org/xorg/lib/libXft/issues"
  708. const m_PACKAGE_NAME = "libXft"
  709. const m_PACKAGE_STRING = "libXft 2.3.6"
  710. const m_PACKAGE_TARNAME = "libXft"
  711. const m_PACKAGE_URL = ""
  712. const m_PACKAGE_VERSION = "2.3.6"
  713. const m_PACKAGE_VERSION_MAJOR = 2
  714. const m_PACKAGE_VERSION_MINOR = 3
  715. const m_PACKAGE_VERSION_PATCHLEVEL = 6
  716. const m_PATH_MAX = 4096
  717. const m_PDP_ENDIAN = "__PDP_ENDIAN"
  718. const m_PIPE_BUF = 4096
  719. const m_PTHREAD_CANCEL_ASYNCHRONOUS = 1
  720. const m_PTHREAD_CANCEL_DEFERRED = 0
  721. const m_PTHREAD_CANCEL_DISABLE = 1
  722. const m_PTHREAD_CANCEL_ENABLE = 0
  723. const m_PTHREAD_CANCEL_MASKED = 2
  724. const m_PTHREAD_CREATE_DETACHED = 1
  725. const m_PTHREAD_CREATE_JOINABLE = 0
  726. const m_PTHREAD_DESTRUCTOR_ITERATIONS = 4
  727. const m_PTHREAD_EXPLICIT_SCHED = 1
  728. const m_PTHREAD_INHERIT_SCHED = 0
  729. const m_PTHREAD_KEYS_MAX = 128
  730. const m_PTHREAD_MUTEX_DEFAULT = 0
  731. const m_PTHREAD_MUTEX_ERRORCHECK = 2
  732. const m_PTHREAD_MUTEX_NORMAL = 0
  733. const m_PTHREAD_MUTEX_RECURSIVE = 1
  734. const m_PTHREAD_MUTEX_ROBUST = 1
  735. const m_PTHREAD_MUTEX_STALLED = 0
  736. const m_PTHREAD_ONCE_INIT = 0
  737. const m_PTHREAD_PRIO_INHERIT = 1
  738. const m_PTHREAD_PRIO_NONE = 0
  739. const m_PTHREAD_PRIO_PROTECT = 2
  740. const m_PTHREAD_PROCESS_PRIVATE = 0
  741. const m_PTHREAD_PROCESS_SHARED = 1
  742. const m_PTHREAD_SCOPE_PROCESS = 1
  743. const m_PTHREAD_SCOPE_SYSTEM = 0
  744. const m_PTHREAD_STACK_MIN = 2048
  745. const m_PTRDIFF_MAX = "INT32_MAX"
  746. const m_PTRDIFF_MIN = "INT32_MIN"
  747. const m_PTSPERBATCH = 1024
  748. const m_P_tmpdir = "/tmp"
  749. const m_ParentRelative = 1
  750. const m_PictOpAdd = 12
  751. const m_PictOpAtop = 9
  752. const m_PictOpAtopReverse = 10
  753. const m_PictOpBlendMaximum = 0x3e
  754. const m_PictOpBlendMinimum = 0x30
  755. const m_PictOpClear = 0
  756. const m_PictOpColorBurn = 0x36
  757. const m_PictOpColorDodge = 0x35
  758. const m_PictOpConjointAtop = 0x29
  759. const m_PictOpConjointAtopReverse = 0x2a
  760. const m_PictOpConjointClear = 0x20
  761. const m_PictOpConjointDst = 0x22
  762. const m_PictOpConjointIn = 0x25
  763. const m_PictOpConjointInReverse = 0x26
  764. const m_PictOpConjointMaximum = 0x2b
  765. const m_PictOpConjointMinimum = 0x20
  766. const m_PictOpConjointOut = 0x27
  767. const m_PictOpConjointOutReverse = 0x28
  768. const m_PictOpConjointOver = 0x23
  769. const m_PictOpConjointOverReverse = 0x24
  770. const m_PictOpConjointSrc = 0x21
  771. const m_PictOpConjointXor = 0x2b
  772. const m_PictOpDarken = 0x33
  773. const m_PictOpDifference = 0x39
  774. const m_PictOpDisjointAtop = 0x19
  775. const m_PictOpDisjointAtopReverse = 0x1a
  776. const m_PictOpDisjointClear = 0x10
  777. const m_PictOpDisjointDst = 0x12
  778. const m_PictOpDisjointIn = 0x15
  779. const m_PictOpDisjointInReverse = 0x16
  780. const m_PictOpDisjointMaximum = 0x1b
  781. const m_PictOpDisjointMinimum = 0x10
  782. const m_PictOpDisjointOut = 0x17
  783. const m_PictOpDisjointOutReverse = 0x18
  784. const m_PictOpDisjointOver = 0x13
  785. const m_PictOpDisjointOverReverse = 0x14
  786. const m_PictOpDisjointSrc = 0x11
  787. const m_PictOpDisjointXor = 0x1b
  788. const m_PictOpDst = 2
  789. const m_PictOpExclusion = 0x3a
  790. const m_PictOpHSLColor = 0x3d
  791. const m_PictOpHSLHue = 0x3b
  792. const m_PictOpHSLLuminosity = 0x3e
  793. const m_PictOpHSLSaturation = 0x3c
  794. const m_PictOpHardLight = 0x37
  795. const m_PictOpIn = 5
  796. const m_PictOpInReverse = 6
  797. const m_PictOpLighten = 0x34
  798. const m_PictOpMaximum = 13
  799. const m_PictOpMinimum = 0
  800. const m_PictOpMultiply = 0x30
  801. const m_PictOpOut = 7
  802. const m_PictOpOutReverse = 8
  803. const m_PictOpOver = 3
  804. const m_PictOpOverReverse = 4
  805. const m_PictOpOverlay = 0x32
  806. const m_PictOpSaturate = 13
  807. const m_PictOpScreen = 0x31
  808. const m_PictOpSoftLight = 0x38
  809. const m_PictOpSrc = 1
  810. const m_PictOpXor = 11
  811. const m_PictStandardA1 = 4
  812. const m_PictStandardA4 = 3
  813. const m_PictStandardA8 = 2
  814. const m_PictStandardARGB32 = 0
  815. const m_PictStandardNUM = 5
  816. const m_PictStandardRGB24 = 1
  817. const m_PictTypeDirect = 1
  818. const m_PictTypeIndexed = 0
  819. const m_PlaceOnBottom = 1
  820. const m_PlaceOnTop = 0
  821. const m_PointerRoot = 1
  822. const m_PointerWindow = 0
  823. const m_PolyEdgeSharp = 0
  824. const m_PolyEdgeSmooth = 1
  825. const m_PolyModeImprecise = 1
  826. const m_PolyModePrecise = 0
  827. const m_PreferBlanking = 1
  828. const m_PropModeAppend = 2
  829. const m_PropModePrepend = 1
  830. const m_PropModeReplace = 0
  831. const m_PropertyDelete = 1
  832. const m_PropertyNewValue = 0
  833. const m_PropertyNotify = 28
  834. const m_PseudoColor = 3
  835. const m_QueuedAfterFlush = 2
  836. const m_QueuedAfterReading = 1
  837. const m_QueuedAlready = 0
  838. const m_RAND_MAX = 0x7fffffff
  839. const m_RENDER_MAJOR = 0
  840. const m_RENDER_MINOR = 11
  841. const m_RENDER_NAME = "RENDER"
  842. const m_RE_DUP_MAX = 255
  843. const m_RaiseLowest = 0
  844. const m_RectangleIn = 1
  845. const m_RectangleOut = 0
  846. const m_RectanglePart = 2
  847. const m_ReparentNotify = 21
  848. const m_RepeatNone = 0
  849. const m_RepeatNormal = 1
  850. const m_RepeatPad = 2
  851. const m_RepeatReflect = 3
  852. const m_ReplayKeyboard = 5
  853. const m_ReplayPointer = 2
  854. const m_ResizeRequest = 25
  855. const m_RetainPermanent = 1
  856. const m_RetainTemporary = 2
  857. const m_RevertToParent = 2
  858. const m_SCHAR_MAX = 127
  859. const m_SCHED_BATCH = 3
  860. const m_SCHED_DEADLINE = 6
  861. const m_SCHED_FIFO = 1
  862. const m_SCHED_IDLE = 5
  863. const m_SCHED_OTHER = 0
  864. const m_SCHED_RESET_ON_FORK = 0x40000000
  865. const m_SCHED_RR = 2
  866. const m_SEM_NSEMS_MAX = 256
  867. const m_SEM_VALUE_MAX = 0x7fffffff
  868. const m_SHRT_MAX = 0x7fff
  869. const m_SIG_ATOMIC_MAX = "INT32_MAX"
  870. const m_SIG_ATOMIC_MIN = "INT32_MIN"
  871. const m_SIZE_MAX = "UINT32_MAX"
  872. const m_SSIZE_MAX = "LONG_MAX"
  873. const m_STATX_ALL = 0xfff
  874. const m_STATX_ATIME = 0x20
  875. const m_STATX_BASIC_STATS = 0x7ff
  876. const m_STATX_BLOCKS = 0x400
  877. const m_STATX_BTIME = 0x800
  878. const m_STATX_CTIME = 0x80
  879. const m_STATX_GID = 0x10
  880. const m_STATX_INO = 0x100
  881. const m_STATX_MODE = 2
  882. const m_STATX_MTIME = 0x40
  883. const m_STATX_NLINK = 4
  884. const m_STATX_SIZE = 0x200
  885. const m_STATX_TYPE = 1
  886. const m_STATX_UID = 8
  887. const m_STDC_HEADERS = 1
  888. const m_SYMLOOP_MAX = 40
  889. const m_S_IEXEC = "S_IXUSR"
  890. const m_S_IFBLK = 0060000
  891. const m_S_IFCHR = 0020000
  892. const m_S_IFDIR = 0040000
  893. const m_S_IFIFO = 0010000
  894. const m_S_IFLNK = 0120000
  895. const m_S_IFMT = 0170000
  896. const m_S_IFREG = 0100000
  897. const m_S_IFSOCK = 0140000
  898. const m_S_IREAD = "S_IRUSR"
  899. const m_S_IRGRP = 0040
  900. const m_S_IROTH = 0004
  901. const m_S_IRUSR = 0400
  902. const m_S_IRWXG = 0070
  903. const m_S_IRWXO = 0007
  904. const m_S_IRWXU = 0700
  905. const m_S_ISGID = 02000
  906. const m_S_ISUID = 04000
  907. const m_S_ISVTX = 01000
  908. const m_S_IWGRP = 0020
  909. const m_S_IWOTH = 0002
  910. const m_S_IWRITE = "S_IWUSR"
  911. const m_S_IWUSR = 0200
  912. const m_S_IXGRP = 0010
  913. const m_S_IXOTH = 0001
  914. const m_S_IXUSR = 0100
  915. const m_ScreenSaverActive = 1
  916. const m_ScreenSaverReset = 0
  917. const m_SelectionClear = 29
  918. const m_SelectionNotify = 31
  919. const m_SelectionRequest = 30
  920. const m_SetModeDelete = 1
  921. const m_SetModeInsert = 0
  922. const m_ShiftMapIndex = 0
  923. const m_SouthEastGravity = 9
  924. const m_SouthGravity = 8
  925. const m_SouthWestGravity = 7
  926. const m_StaticColor = 2
  927. const m_StaticGravity = 10
  928. const m_StaticGray = 0
  929. const m_Status = "int"
  930. const m_StippleShape = 2
  931. const m_SubPixelHorizontalBGR = 2
  932. const m_SubPixelHorizontalRGB = 1
  933. const m_SubPixelNone = 5
  934. const m_SubPixelUnknown = 0
  935. const m_SubPixelVerticalBGR = 4
  936. const m_SubPixelVerticalRGB = 3
  937. const m_Success = 0
  938. const m_SyncBoth = 7
  939. const m_SyncKeyboard = 4
  940. const m_SyncPointer = 1
  941. const m_T1_MAX_CHARSTRINGS_OPERANDS = 256
  942. const m_T1_MAX_DICT_DEPTH = 5
  943. const m_T1_MAX_SUBRS_CALLS = 16
  944. const m_TIMER_ABSTIME = 1
  945. const m_TIME_UTC = 1
  946. const m_TMP_MAX = 10000
  947. const m_TTY_NAME_MAX = 32
  948. const m_TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES = 1000000
  949. const m_TT_CONFIG_OPTION_SUBPIXEL_HINTING = 2
  950. const m_TZNAME_MAX = 6
  951. const m_TileShape = 1
  952. const m_TopIf = 2
  953. const m_True = 1
  954. const m_TrueColor = 4
  955. const m_UCHAR_MAX = 255
  956. const m_UINT16_MAX = 0xffff
  957. const m_UINT32_MAX = "0xffffffffu"
  958. const m_UINT64_MAX = "0xffffffffffffffffu"
  959. const m_UINT8_MAX = 0xff
  960. const m_UINTMAX_MAX = "UINT64_MAX"
  961. const m_UINTPTR_MAX = "UINT32_MAX"
  962. const m_UINT_FAST16_MAX = "UINT32_MAX"
  963. const m_UINT_FAST32_MAX = "UINT32_MAX"
  964. const m_UINT_FAST64_MAX = "UINT64_MAX"
  965. const m_UINT_FAST8_MAX = "UINT8_MAX"
  966. const m_UINT_LEAST16_MAX = "UINT16_MAX"
  967. const m_UINT_LEAST32_MAX = "UINT32_MAX"
  968. const m_UINT_LEAST64_MAX = "UINT64_MAX"
  969. const m_UINT_LEAST8_MAX = "UINT8_MAX"
  970. const m_UINT_MAX = 0xffffffff
  971. const m_UNLOCKED = 0
  972. const m_USHRT_MAX = 0xffff
  973. const m_UTIME_NOW = 0x3fffffff
  974. const m_UTIME_OMIT = 0x3ffffffe
  975. const m_UnmapGravity = 0
  976. const m_UnmapNotify = 18
  977. const m_Unsorted = 0
  978. const m_VERSION = "2.3.6"
  979. const m_VisibilityFullyObscured = 2
  980. const m_VisibilityNotify = 15
  981. const m_VisibilityPartiallyObscured = 1
  982. const m_VisibilityUnobscured = 0
  983. const m_VisualAllMask = 0x1FF
  984. const m_VisualBitsPerRGBMask = 0x100
  985. const m_VisualBlueMaskMask = 0x40
  986. const m_VisualClassMask = 0x8
  987. const m_VisualColormapSizeMask = 0x80
  988. const m_VisualDepthMask = 0x4
  989. const m_VisualGreenMaskMask = 0x20
  990. const m_VisualIDMask = 0x1
  991. const m_VisualNoMask = 0x0
  992. const m_VisualRedMaskMask = 0x10
  993. const m_VisualScreenMask = 0x2
  994. const m_WINT_MAX = "UINT32_MAX"
  995. const m_WINT_MIN = 0
  996. const m_WLNSPERBATCH = 50
  997. const m_WNOHANG = 1
  998. const m_WORD_BIT = 32
  999. const m_WRCTSPERBATCH = 10
  1000. const m_WUNTRACED = 2
  1001. const m_WestGravity = 4
  1002. const m_WhenMapped = 1
  1003. const m_WidthValue = 0x0004
  1004. const m_WindingRule = 1
  1005. const m_WithdrawnState = 0
  1006. const m_XCNOENT = 2
  1007. const m_XCNOMEM = 1
  1008. const m_XCSUCCESS = 0
  1009. const m_XFT_ASSUME_PIXMAP = 20
  1010. const m_XFT_CORE = "core"
  1011. const m_XFT_DBG_CACHE = 128
  1012. const m_XFT_DBG_CACHEV = 256
  1013. const m_XFT_DBG_DRAW = 8
  1014. const m_XFT_DBG_GLYPH = 32
  1015. const m_XFT_DBG_GLYPHV = 64
  1016. const m_XFT_DBG_MEMORY = 512
  1017. const m_XFT_DBG_OPEN = 1
  1018. const m_XFT_DBG_OPENV = 2
  1019. const m_XFT_DBG_REF = 16
  1020. const m_XFT_DBG_RENDER = 4
  1021. const m_XFT_DBG_USAGE = 1024
  1022. const m_XFT_DPY_MAX_UNREF_FONTS = 16
  1023. const m_XFT_MAJOR = 2
  1024. const m_XFT_MAX_GLYPH_MEMORY = "maxglyphmemory"
  1025. const m_XFT_MAX_UNREF_FONTS = "maxunreffonts"
  1026. const m_XFT_MINOR = 3
  1027. const m_XFT_NMISSING = 256
  1028. const m_XFT_NUM_FONT_HASH = 127
  1029. const m_XFT_NUM_SOLID_COLOR = 16
  1030. const m_XFT_RENDER = "render"
  1031. const m_XFT_REVISION = 6
  1032. const m_XFT_TRACK_MEM_USAGE = "trackmemusage"
  1033. const m_XFT_XLFD = "xlfd"
  1034. const m_XIMHotKeyStateOFF = 0x0002
  1035. const m_XIMHotKeyStateON = 0x0001
  1036. const m_XIMInitialState = 1
  1037. const m_XIMPreeditArea = 0x0001
  1038. const m_XIMPreeditCallbacks = 0x0002
  1039. const m_XIMPreeditEnable = 1
  1040. const m_XIMPreeditNone = 0x0010
  1041. const m_XIMPreeditNothing = 0x0008
  1042. const m_XIMPreeditPosition = 0x0004
  1043. const m_XIMPreeditUnKnown = 0
  1044. const m_XIMReverse = 1
  1045. const m_XIMStatusArea = 0x0100
  1046. const m_XIMStatusCallbacks = 0x0200
  1047. const m_XIMStatusNone = 0x0800
  1048. const m_XIMStatusNothing = 0x0400
  1049. const m_XIMStringConversionBottomEdge = 0x00000008
  1050. const m_XIMStringConversionBuffer = 0x0001
  1051. const m_XIMStringConversionChar = 0x0004
  1052. const m_XIMStringConversionConcealed = 0x00000010
  1053. const m_XIMStringConversionLeftEdge = 0x00000001
  1054. const m_XIMStringConversionLine = 0x0002
  1055. const m_XIMStringConversionRetrieval = 0x0002
  1056. const m_XIMStringConversionRightEdge = 0x00000002
  1057. const m_XIMStringConversionSubstitution = 0x0001
  1058. const m_XIMStringConversionTopEdge = 0x00000004
  1059. const m_XIMStringConversionWord = 0x0003
  1060. const m_XIMStringConversionWrapped = 0x00000020
  1061. const m_XK_0 = 0x0030
  1062. const m_XK_1 = 0x0031
  1063. const m_XK_2 = 0x0032
  1064. const m_XK_3 = 0x0033
  1065. const m_XK_4 = 0x0034
  1066. const m_XK_5 = 0x0035
  1067. const m_XK_6 = 0x0036
  1068. const m_XK_7 = 0x0037
  1069. const m_XK_8 = 0x0038
  1070. const m_XK_9 = 0x0039
  1071. const m_XK_A = 0x0041
  1072. const m_XK_AE = 0x00c6
  1073. const m_XK_Aacute = 0x00c1
  1074. const m_XK_Abelowdot = 0x1001ea0
  1075. const m_XK_Abreve = 0x01c3
  1076. const m_XK_Abreveacute = 0x1001eae
  1077. const m_XK_Abrevebelowdot = 0x1001eb6
  1078. const m_XK_Abrevegrave = 0x1001eb0
  1079. const m_XK_Abrevehook = 0x1001eb2
  1080. const m_XK_Abrevetilde = 0x1001eb4
  1081. const m_XK_AccessX_Enable = 0xfe70
  1082. const m_XK_AccessX_Feedback_Enable = 0xfe71
  1083. const m_XK_Acircumflex = 0x00c2
  1084. const m_XK_Acircumflexacute = 0x1001ea4
  1085. const m_XK_Acircumflexbelowdot = 0x1001eac
  1086. const m_XK_Acircumflexgrave = 0x1001ea6
  1087. const m_XK_Acircumflexhook = 0x1001ea8
  1088. const m_XK_Acircumflextilde = 0x1001eaa
  1089. const m_XK_Adiaeresis = 0x00c4
  1090. const m_XK_Agrave = 0x00c0
  1091. const m_XK_Ahook = 0x1001ea2
  1092. const m_XK_Alt_L = 0xffe9
  1093. const m_XK_Alt_R = 0xffea
  1094. const m_XK_Amacron = 0x03c0
  1095. const m_XK_Aogonek = 0x01a1
  1096. const m_XK_Arabic_0 = 0x1000660
  1097. const m_XK_Arabic_1 = 0x1000661
  1098. const m_XK_Arabic_2 = 0x1000662
  1099. const m_XK_Arabic_3 = 0x1000663
  1100. const m_XK_Arabic_4 = 0x1000664
  1101. const m_XK_Arabic_5 = 0x1000665
  1102. const m_XK_Arabic_6 = 0x1000666
  1103. const m_XK_Arabic_7 = 0x1000667
  1104. const m_XK_Arabic_8 = 0x1000668
  1105. const m_XK_Arabic_9 = 0x1000669
  1106. const m_XK_Arabic_ain = 0x05d9
  1107. const m_XK_Arabic_alef = 0x05c7
  1108. const m_XK_Arabic_alefmaksura = 0x05e9
  1109. const m_XK_Arabic_beh = 0x05c8
  1110. const m_XK_Arabic_comma = 0x05ac
  1111. const m_XK_Arabic_dad = 0x05d6
  1112. const m_XK_Arabic_dal = 0x05cf
  1113. const m_XK_Arabic_damma = 0x05ef
  1114. const m_XK_Arabic_dammatan = 0x05ec
  1115. const m_XK_Arabic_ddal = 0x1000688
  1116. const m_XK_Arabic_farsi_yeh = 0x10006cc
  1117. const m_XK_Arabic_fatha = 0x05ee
  1118. const m_XK_Arabic_fathatan = 0x05eb
  1119. const m_XK_Arabic_feh = 0x05e1
  1120. const m_XK_Arabic_fullstop = 0x10006d4
  1121. const m_XK_Arabic_gaf = 0x10006af
  1122. const m_XK_Arabic_ghain = 0x05da
  1123. const m_XK_Arabic_ha = 0x05e7
  1124. const m_XK_Arabic_hah = 0x05cd
  1125. const m_XK_Arabic_hamza = 0x05c1
  1126. const m_XK_Arabic_hamza_above = 0x1000654
  1127. const m_XK_Arabic_hamza_below = 0x1000655
  1128. const m_XK_Arabic_hamzaonalef = 0x05c3
  1129. const m_XK_Arabic_hamzaonwaw = 0x05c4
  1130. const m_XK_Arabic_hamzaonyeh = 0x05c6
  1131. const m_XK_Arabic_hamzaunderalef = 0x05c5
  1132. const m_XK_Arabic_heh = 0x05e7
  1133. const m_XK_Arabic_heh_doachashmee = 0x10006be
  1134. const m_XK_Arabic_heh_goal = 0x10006c1
  1135. const m_XK_Arabic_jeem = 0x05cc
  1136. const m_XK_Arabic_jeh = 0x1000698
  1137. const m_XK_Arabic_kaf = 0x05e3
  1138. const m_XK_Arabic_kasra = 0x05f0
  1139. const m_XK_Arabic_kasratan = 0x05ed
  1140. const m_XK_Arabic_keheh = 0x10006a9
  1141. const m_XK_Arabic_khah = 0x05ce
  1142. const m_XK_Arabic_lam = 0x05e4
  1143. const m_XK_Arabic_madda_above = 0x1000653
  1144. const m_XK_Arabic_maddaonalef = 0x05c2
  1145. const m_XK_Arabic_meem = 0x05e5
  1146. const m_XK_Arabic_noon = 0x05e6
  1147. const m_XK_Arabic_noon_ghunna = 0x10006ba
  1148. const m_XK_Arabic_peh = 0x100067e
  1149. const m_XK_Arabic_percent = 0x100066a
  1150. const m_XK_Arabic_qaf = 0x05e2
  1151. const m_XK_Arabic_question_mark = 0x05bf
  1152. const m_XK_Arabic_ra = 0x05d1
  1153. const m_XK_Arabic_rreh = 0x1000691
  1154. const m_XK_Arabic_sad = 0x05d5
  1155. const m_XK_Arabic_seen = 0x05d3
  1156. const m_XK_Arabic_semicolon = 0x05bb
  1157. const m_XK_Arabic_shadda = 0x05f1
  1158. const m_XK_Arabic_sheen = 0x05d4
  1159. const m_XK_Arabic_sukun = 0x05f2
  1160. const m_XK_Arabic_superscript_alef = 0x1000670
  1161. const m_XK_Arabic_switch = 0xff7e
  1162. const m_XK_Arabic_tah = 0x05d7
  1163. const m_XK_Arabic_tatweel = 0x05e0
  1164. const m_XK_Arabic_tcheh = 0x1000686
  1165. const m_XK_Arabic_teh = 0x05ca
  1166. const m_XK_Arabic_tehmarbuta = 0x05c9
  1167. const m_XK_Arabic_thal = 0x05d0
  1168. const m_XK_Arabic_theh = 0x05cb
  1169. const m_XK_Arabic_tteh = 0x1000679
  1170. const m_XK_Arabic_veh = 0x10006a4
  1171. const m_XK_Arabic_waw = 0x05e8
  1172. const m_XK_Arabic_yeh = 0x05ea
  1173. const m_XK_Arabic_yeh_baree = 0x10006d2
  1174. const m_XK_Arabic_zah = 0x05d8
  1175. const m_XK_Arabic_zain = 0x05d2
  1176. const m_XK_Aring = 0x00c5
  1177. const m_XK_Armenian_AT = 0x1000538
  1178. const m_XK_Armenian_AYB = 0x1000531
  1179. const m_XK_Armenian_BEN = 0x1000532
  1180. const m_XK_Armenian_CHA = 0x1000549
  1181. const m_XK_Armenian_DA = 0x1000534
  1182. const m_XK_Armenian_DZA = 0x1000541
  1183. const m_XK_Armenian_E = 0x1000537
  1184. const m_XK_Armenian_FE = 0x1000556
  1185. const m_XK_Armenian_GHAT = 0x1000542
  1186. const m_XK_Armenian_GIM = 0x1000533
  1187. const m_XK_Armenian_HI = 0x1000545
  1188. const m_XK_Armenian_HO = 0x1000540
  1189. const m_XK_Armenian_INI = 0x100053b
  1190. const m_XK_Armenian_JE = 0x100054b
  1191. const m_XK_Armenian_KE = 0x1000554
  1192. const m_XK_Armenian_KEN = 0x100053f
  1193. const m_XK_Armenian_KHE = 0x100053d
  1194. const m_XK_Armenian_LYUN = 0x100053c
  1195. const m_XK_Armenian_MEN = 0x1000544
  1196. const m_XK_Armenian_NU = 0x1000546
  1197. const m_XK_Armenian_O = 0x1000555
  1198. const m_XK_Armenian_PE = 0x100054a
  1199. const m_XK_Armenian_PYUR = 0x1000553
  1200. const m_XK_Armenian_RA = 0x100054c
  1201. const m_XK_Armenian_RE = 0x1000550
  1202. const m_XK_Armenian_SE = 0x100054d
  1203. const m_XK_Armenian_SHA = 0x1000547
  1204. const m_XK_Armenian_TCHE = 0x1000543
  1205. const m_XK_Armenian_TO = 0x1000539
  1206. const m_XK_Armenian_TSA = 0x100053e
  1207. const m_XK_Armenian_TSO = 0x1000551
  1208. const m_XK_Armenian_TYUN = 0x100054f
  1209. const m_XK_Armenian_VEV = 0x100054e
  1210. const m_XK_Armenian_VO = 0x1000548
  1211. const m_XK_Armenian_VYUN = 0x1000552
  1212. const m_XK_Armenian_YECH = 0x1000535
  1213. const m_XK_Armenian_ZA = 0x1000536
  1214. const m_XK_Armenian_ZHE = 0x100053a
  1215. const m_XK_Armenian_accent = 0x100055b
  1216. const m_XK_Armenian_amanak = 0x100055c
  1217. const m_XK_Armenian_apostrophe = 0x100055a
  1218. const m_XK_Armenian_at = 0x1000568
  1219. const m_XK_Armenian_ayb = 0x1000561
  1220. const m_XK_Armenian_ben = 0x1000562
  1221. const m_XK_Armenian_but = 0x100055d
  1222. const m_XK_Armenian_cha = 0x1000579
  1223. const m_XK_Armenian_da = 0x1000564
  1224. const m_XK_Armenian_dza = 0x1000571
  1225. const m_XK_Armenian_e = 0x1000567
  1226. const m_XK_Armenian_exclam = 0x100055c
  1227. const m_XK_Armenian_fe = 0x1000586
  1228. const m_XK_Armenian_full_stop = 0x1000589
  1229. const m_XK_Armenian_ghat = 0x1000572
  1230. const m_XK_Armenian_gim = 0x1000563
  1231. const m_XK_Armenian_hi = 0x1000575
  1232. const m_XK_Armenian_ho = 0x1000570
  1233. const m_XK_Armenian_hyphen = 0x100058a
  1234. const m_XK_Armenian_ini = 0x100056b
  1235. const m_XK_Armenian_je = 0x100057b
  1236. const m_XK_Armenian_ke = 0x1000584
  1237. const m_XK_Armenian_ken = 0x100056f
  1238. const m_XK_Armenian_khe = 0x100056d
  1239. const m_XK_Armenian_ligature_ew = 0x1000587
  1240. const m_XK_Armenian_lyun = 0x100056c
  1241. const m_XK_Armenian_men = 0x1000574
  1242. const m_XK_Armenian_nu = 0x1000576
  1243. const m_XK_Armenian_o = 0x1000585
  1244. const m_XK_Armenian_paruyk = 0x100055e
  1245. const m_XK_Armenian_pe = 0x100057a
  1246. const m_XK_Armenian_pyur = 0x1000583
  1247. const m_XK_Armenian_question = 0x100055e
  1248. const m_XK_Armenian_ra = 0x100057c
  1249. const m_XK_Armenian_re = 0x1000580
  1250. const m_XK_Armenian_se = 0x100057d
  1251. const m_XK_Armenian_separation_mark = 0x100055d
  1252. const m_XK_Armenian_sha = 0x1000577
  1253. const m_XK_Armenian_shesht = 0x100055b
  1254. const m_XK_Armenian_tche = 0x1000573
  1255. const m_XK_Armenian_to = 0x1000569
  1256. const m_XK_Armenian_tsa = 0x100056e
  1257. const m_XK_Armenian_tso = 0x1000581
  1258. const m_XK_Armenian_tyun = 0x100057f
  1259. const m_XK_Armenian_verjaket = 0x1000589
  1260. const m_XK_Armenian_vev = 0x100057e
  1261. const m_XK_Armenian_vo = 0x1000578
  1262. const m_XK_Armenian_vyun = 0x1000582
  1263. const m_XK_Armenian_yech = 0x1000565
  1264. const m_XK_Armenian_yentamna = 0x100058a
  1265. const m_XK_Armenian_za = 0x1000566
  1266. const m_XK_Armenian_zhe = 0x100056a
  1267. const m_XK_Atilde = 0x00c3
  1268. const m_XK_AudibleBell_Enable = 0xfe7a
  1269. const m_XK_B = 0x0042
  1270. const m_XK_Babovedot = 0x1001e02
  1271. const m_XK_BackSpace = 0xff08
  1272. const m_XK_Begin = 0xff58
  1273. const m_XK_BounceKeys_Enable = 0xfe74
  1274. const m_XK_Break = 0xff6b
  1275. const m_XK_Byelorussian_SHORTU = 0x06be
  1276. const m_XK_Byelorussian_shortu = 0x06ae
  1277. const m_XK_C = 0x0043
  1278. const m_XK_CH = 0xfea2
  1279. const m_XK_C_H = 0xfea5
  1280. const m_XK_C_h = 0xfea4
  1281. const m_XK_Cabovedot = 0x02c5
  1282. const m_XK_Cacute = 0x01c6
  1283. const m_XK_Cancel = 0xff69
  1284. const m_XK_Caps_Lock = 0xffe5
  1285. const m_XK_Ccaron = 0x01c8
  1286. const m_XK_Ccedilla = 0x00c7
  1287. const m_XK_Ccircumflex = 0x02c6
  1288. const m_XK_Ch = 0xfea1
  1289. const m_XK_Clear = 0xff0b
  1290. const m_XK_Codeinput = 0xff37
  1291. const m_XK_ColonSign = 0x10020a1
  1292. const m_XK_Control_L = 0xffe3
  1293. const m_XK_Control_R = 0xffe4
  1294. const m_XK_CruzeiroSign = 0x10020a2
  1295. const m_XK_Cyrillic_A = 0x06e1
  1296. const m_XK_Cyrillic_BE = 0x06e2
  1297. const m_XK_Cyrillic_CHE = 0x06fe
  1298. const m_XK_Cyrillic_CHE_descender = 0x10004b6
  1299. const m_XK_Cyrillic_CHE_vertstroke = 0x10004b8
  1300. const m_XK_Cyrillic_DE = 0x06e4
  1301. const m_XK_Cyrillic_DZHE = 0x06bf
  1302. const m_XK_Cyrillic_E = 0x06fc
  1303. const m_XK_Cyrillic_EF = 0x06e6
  1304. const m_XK_Cyrillic_EL = 0x06ec
  1305. const m_XK_Cyrillic_EM = 0x06ed
  1306. const m_XK_Cyrillic_EN = 0x06ee
  1307. const m_XK_Cyrillic_EN_descender = 0x10004a2
  1308. const m_XK_Cyrillic_ER = 0x06f2
  1309. const m_XK_Cyrillic_ES = 0x06f3
  1310. const m_XK_Cyrillic_GHE = 0x06e7
  1311. const m_XK_Cyrillic_GHE_bar = 0x1000492
  1312. const m_XK_Cyrillic_HA = 0x06e8
  1313. const m_XK_Cyrillic_HARDSIGN = 0x06ff
  1314. const m_XK_Cyrillic_HA_descender = 0x10004b2
  1315. const m_XK_Cyrillic_I = 0x06e9
  1316. const m_XK_Cyrillic_IE = 0x06e5
  1317. const m_XK_Cyrillic_IO = 0x06b3
  1318. const m_XK_Cyrillic_I_macron = 0x10004e2
  1319. const m_XK_Cyrillic_JE = 0x06b8
  1320. const m_XK_Cyrillic_KA = 0x06eb
  1321. const m_XK_Cyrillic_KA_descender = 0x100049a
  1322. const m_XK_Cyrillic_KA_vertstroke = 0x100049c
  1323. const m_XK_Cyrillic_LJE = 0x06b9
  1324. const m_XK_Cyrillic_NJE = 0x06ba
  1325. const m_XK_Cyrillic_O = 0x06ef
  1326. const m_XK_Cyrillic_O_bar = 0x10004e8
  1327. const m_XK_Cyrillic_PE = 0x06f0
  1328. const m_XK_Cyrillic_SCHWA = 0x10004d8
  1329. const m_XK_Cyrillic_SHA = 0x06fb
  1330. const m_XK_Cyrillic_SHCHA = 0x06fd
  1331. const m_XK_Cyrillic_SHHA = 0x10004ba
  1332. const m_XK_Cyrillic_SHORTI = 0x06ea
  1333. const m_XK_Cyrillic_SOFTSIGN = 0x06f8
  1334. const m_XK_Cyrillic_TE = 0x06f4
  1335. const m_XK_Cyrillic_TSE = 0x06e3
  1336. const m_XK_Cyrillic_U = 0x06f5
  1337. const m_XK_Cyrillic_U_macron = 0x10004ee
  1338. const m_XK_Cyrillic_U_straight = 0x10004ae
  1339. const m_XK_Cyrillic_U_straight_bar = 0x10004b0
  1340. const m_XK_Cyrillic_VE = 0x06f7
  1341. const m_XK_Cyrillic_YA = 0x06f1
  1342. const m_XK_Cyrillic_YERU = 0x06f9
  1343. const m_XK_Cyrillic_YU = 0x06e0
  1344. const m_XK_Cyrillic_ZE = 0x06fa
  1345. const m_XK_Cyrillic_ZHE = 0x06f6
  1346. const m_XK_Cyrillic_ZHE_descender = 0x1000496
  1347. const m_XK_Cyrillic_a = 0x06c1
  1348. const m_XK_Cyrillic_be = 0x06c2
  1349. const m_XK_Cyrillic_che = 0x06de
  1350. const m_XK_Cyrillic_che_descender = 0x10004b7
  1351. const m_XK_Cyrillic_che_vertstroke = 0x10004b9
  1352. const m_XK_Cyrillic_de = 0x06c4
  1353. const m_XK_Cyrillic_dzhe = 0x06af
  1354. const m_XK_Cyrillic_e = 0x06dc
  1355. const m_XK_Cyrillic_ef = 0x06c6
  1356. const m_XK_Cyrillic_el = 0x06cc
  1357. const m_XK_Cyrillic_em = 0x06cd
  1358. const m_XK_Cyrillic_en = 0x06ce
  1359. const m_XK_Cyrillic_en_descender = 0x10004a3
  1360. const m_XK_Cyrillic_er = 0x06d2
  1361. const m_XK_Cyrillic_es = 0x06d3
  1362. const m_XK_Cyrillic_ghe = 0x06c7
  1363. const m_XK_Cyrillic_ghe_bar = 0x1000493
  1364. const m_XK_Cyrillic_ha = 0x06c8
  1365. const m_XK_Cyrillic_ha_descender = 0x10004b3
  1366. const m_XK_Cyrillic_hardsign = 0x06df
  1367. const m_XK_Cyrillic_i = 0x06c9
  1368. const m_XK_Cyrillic_i_macron = 0x10004e3
  1369. const m_XK_Cyrillic_ie = 0x06c5
  1370. const m_XK_Cyrillic_io = 0x06a3
  1371. const m_XK_Cyrillic_je = 0x06a8
  1372. const m_XK_Cyrillic_ka = 0x06cb
  1373. const m_XK_Cyrillic_ka_descender = 0x100049b
  1374. const m_XK_Cyrillic_ka_vertstroke = 0x100049d
  1375. const m_XK_Cyrillic_lje = 0x06a9
  1376. const m_XK_Cyrillic_nje = 0x06aa
  1377. const m_XK_Cyrillic_o = 0x06cf
  1378. const m_XK_Cyrillic_o_bar = 0x10004e9
  1379. const m_XK_Cyrillic_pe = 0x06d0
  1380. const m_XK_Cyrillic_schwa = 0x10004d9
  1381. const m_XK_Cyrillic_sha = 0x06db
  1382. const m_XK_Cyrillic_shcha = 0x06dd
  1383. const m_XK_Cyrillic_shha = 0x10004bb
  1384. const m_XK_Cyrillic_shorti = 0x06ca
  1385. const m_XK_Cyrillic_softsign = 0x06d8
  1386. const m_XK_Cyrillic_te = 0x06d4
  1387. const m_XK_Cyrillic_tse = 0x06c3
  1388. const m_XK_Cyrillic_u = 0x06d5
  1389. const m_XK_Cyrillic_u_macron = 0x10004ef
  1390. const m_XK_Cyrillic_u_straight = 0x10004af
  1391. const m_XK_Cyrillic_u_straight_bar = 0x10004b1
  1392. const m_XK_Cyrillic_ve = 0x06d7
  1393. const m_XK_Cyrillic_ya = 0x06d1
  1394. const m_XK_Cyrillic_yeru = 0x06d9
  1395. const m_XK_Cyrillic_yu = 0x06c0
  1396. const m_XK_Cyrillic_ze = 0x06da
  1397. const m_XK_Cyrillic_zhe = 0x06d6
  1398. const m_XK_Cyrillic_zhe_descender = 0x1000497
  1399. const m_XK_D = 0x0044
  1400. const m_XK_Dabovedot = 0x1001e0a
  1401. const m_XK_Dcaron = 0x01cf
  1402. const m_XK_Delete = 0xffff
  1403. const m_XK_DongSign = 0x10020ab
  1404. const m_XK_Down = 0xff54
  1405. const m_XK_Dstroke = 0x01d0
  1406. const m_XK_E = 0x0045
  1407. const m_XK_ENG = 0x03bd
  1408. const m_XK_ETH = 0x00d0
  1409. const m_XK_EZH = 0x10001b7
  1410. const m_XK_Eabovedot = 0x03cc
  1411. const m_XK_Eacute = 0x00c9
  1412. const m_XK_Ebelowdot = 0x1001eb8
  1413. const m_XK_Ecaron = 0x01cc
  1414. const m_XK_Ecircumflex = 0x00ca
  1415. const m_XK_Ecircumflexacute = 0x1001ebe
  1416. const m_XK_Ecircumflexbelowdot = 0x1001ec6
  1417. const m_XK_Ecircumflexgrave = 0x1001ec0
  1418. const m_XK_Ecircumflexhook = 0x1001ec2
  1419. const m_XK_Ecircumflextilde = 0x1001ec4
  1420. const m_XK_EcuSign = 0x10020a0
  1421. const m_XK_Ediaeresis = 0x00cb
  1422. const m_XK_Egrave = 0x00c8
  1423. const m_XK_Ehook = 0x1001eba
  1424. const m_XK_Eisu_Shift = 0xff2f
  1425. const m_XK_Eisu_toggle = 0xff30
  1426. const m_XK_Emacron = 0x03aa
  1427. const m_XK_End = 0xff57
  1428. const m_XK_Eogonek = 0x01ca
  1429. const m_XK_Escape = 0xff1b
  1430. const m_XK_Eth = 0x00d0
  1431. const m_XK_Etilde = 0x1001ebc
  1432. const m_XK_EuroSign = 0x20ac
  1433. const m_XK_Execute = 0xff62
  1434. const m_XK_F = 0x0046
  1435. const m_XK_F1 = 0xffbe
  1436. const m_XK_F10 = 0xffc7
  1437. const m_XK_F11 = 0xffc8
  1438. const m_XK_F12 = 0xffc9
  1439. const m_XK_F13 = 0xffca
  1440. const m_XK_F14 = 0xffcb
  1441. const m_XK_F15 = 0xffcc
  1442. const m_XK_F16 = 0xffcd
  1443. const m_XK_F17 = 0xffce
  1444. const m_XK_F18 = 0xffcf
  1445. const m_XK_F19 = 0xffd0
  1446. const m_XK_F2 = 0xffbf
  1447. const m_XK_F20 = 0xffd1
  1448. const m_XK_F21 = 0xffd2
  1449. const m_XK_F22 = 0xffd3
  1450. const m_XK_F23 = 0xffd4
  1451. const m_XK_F24 = 0xffd5
  1452. const m_XK_F25 = 0xffd6
  1453. const m_XK_F26 = 0xffd7
  1454. const m_XK_F27 = 0xffd8
  1455. const m_XK_F28 = 0xffd9
  1456. const m_XK_F29 = 0xffda
  1457. const m_XK_F3 = 0xffc0
  1458. const m_XK_F30 = 0xffdb
  1459. const m_XK_F31 = 0xffdc
  1460. const m_XK_F32 = 0xffdd
  1461. const m_XK_F33 = 0xffde
  1462. const m_XK_F34 = 0xffdf
  1463. const m_XK_F35 = 0xffe0
  1464. const m_XK_F4 = 0xffc1
  1465. const m_XK_F5 = 0xffc2
  1466. const m_XK_F6 = 0xffc3
  1467. const m_XK_F7 = 0xffc4
  1468. const m_XK_F8 = 0xffc5
  1469. const m_XK_F9 = 0xffc6
  1470. const m_XK_FFrancSign = 0x10020a3
  1471. const m_XK_Fabovedot = 0x1001e1e
  1472. const m_XK_Farsi_0 = 0x10006f0
  1473. const m_XK_Farsi_1 = 0x10006f1
  1474. const m_XK_Farsi_2 = 0x10006f2
  1475. const m_XK_Farsi_3 = 0x10006f3
  1476. const m_XK_Farsi_4 = 0x10006f4
  1477. const m_XK_Farsi_5 = 0x10006f5
  1478. const m_XK_Farsi_6 = 0x10006f6
  1479. const m_XK_Farsi_7 = 0x10006f7
  1480. const m_XK_Farsi_8 = 0x10006f8
  1481. const m_XK_Farsi_9 = 0x10006f9
  1482. const m_XK_Farsi_yeh = 0x10006cc
  1483. const m_XK_Find = 0xff68
  1484. const m_XK_First_Virtual_Screen = 0xfed0
  1485. const m_XK_G = 0x0047
  1486. const m_XK_Gabovedot = 0x02d5
  1487. const m_XK_Gbreve = 0x02ab
  1488. const m_XK_Gcaron = 0x10001e6
  1489. const m_XK_Gcedilla = 0x03ab
  1490. const m_XK_Gcircumflex = 0x02d8
  1491. const m_XK_Georgian_an = 0x10010d0
  1492. const m_XK_Georgian_ban = 0x10010d1
  1493. const m_XK_Georgian_can = 0x10010ea
  1494. const m_XK_Georgian_char = 0x10010ed
  1495. const m_XK_Georgian_chin = 0x10010e9
  1496. const m_XK_Georgian_cil = 0x10010ec
  1497. const m_XK_Georgian_don = 0x10010d3
  1498. const m_XK_Georgian_en = 0x10010d4
  1499. const m_XK_Georgian_fi = 0x10010f6
  1500. const m_XK_Georgian_gan = 0x10010d2
  1501. const m_XK_Georgian_ghan = 0x10010e6
  1502. const m_XK_Georgian_hae = 0x10010f0
  1503. const m_XK_Georgian_har = 0x10010f4
  1504. const m_XK_Georgian_he = 0x10010f1
  1505. const m_XK_Georgian_hie = 0x10010f2
  1506. const m_XK_Georgian_hoe = 0x10010f5
  1507. const m_XK_Georgian_in = 0x10010d8
  1508. const m_XK_Georgian_jhan = 0x10010ef
  1509. const m_XK_Georgian_jil = 0x10010eb
  1510. const m_XK_Georgian_kan = 0x10010d9
  1511. const m_XK_Georgian_khar = 0x10010e5
  1512. const m_XK_Georgian_las = 0x10010da
  1513. const m_XK_Georgian_man = 0x10010db
  1514. const m_XK_Georgian_nar = 0x10010dc
  1515. const m_XK_Georgian_on = 0x10010dd
  1516. const m_XK_Georgian_par = 0x10010de
  1517. const m_XK_Georgian_phar = 0x10010e4
  1518. const m_XK_Georgian_qar = 0x10010e7
  1519. const m_XK_Georgian_rae = 0x10010e0
  1520. const m_XK_Georgian_san = 0x10010e1
  1521. const m_XK_Georgian_shin = 0x10010e8
  1522. const m_XK_Georgian_tan = 0x10010d7
  1523. const m_XK_Georgian_tar = 0x10010e2
  1524. const m_XK_Georgian_un = 0x10010e3
  1525. const m_XK_Georgian_vin = 0x10010d5
  1526. const m_XK_Georgian_we = 0x10010f3
  1527. const m_XK_Georgian_xan = 0x10010ee
  1528. const m_XK_Georgian_zen = 0x10010d6
  1529. const m_XK_Georgian_zhar = 0x10010df
  1530. const m_XK_Greek_ALPHA = 0x07c1
  1531. const m_XK_Greek_ALPHAaccent = 0x07a1
  1532. const m_XK_Greek_BETA = 0x07c2
  1533. const m_XK_Greek_CHI = 0x07d7
  1534. const m_XK_Greek_DELTA = 0x07c4
  1535. const m_XK_Greek_EPSILON = 0x07c5
  1536. const m_XK_Greek_EPSILONaccent = 0x07a2
  1537. const m_XK_Greek_ETA = 0x07c7
  1538. const m_XK_Greek_ETAaccent = 0x07a3
  1539. const m_XK_Greek_GAMMA = 0x07c3
  1540. const m_XK_Greek_IOTA = 0x07c9
  1541. const m_XK_Greek_IOTAaccent = 0x07a4
  1542. const m_XK_Greek_IOTAdiaeresis = 0x07a5
  1543. const m_XK_Greek_IOTAdieresis = 0x07a5
  1544. const m_XK_Greek_KAPPA = 0x07ca
  1545. const m_XK_Greek_LAMBDA = 0x07cb
  1546. const m_XK_Greek_LAMDA = 0x07cb
  1547. const m_XK_Greek_MU = 0x07cc
  1548. const m_XK_Greek_NU = 0x07cd
  1549. const m_XK_Greek_OMEGA = 0x07d9
  1550. const m_XK_Greek_OMEGAaccent = 0x07ab
  1551. const m_XK_Greek_OMICRON = 0x07cf
  1552. const m_XK_Greek_OMICRONaccent = 0x07a7
  1553. const m_XK_Greek_PHI = 0x07d6
  1554. const m_XK_Greek_PI = 0x07d0
  1555. const m_XK_Greek_PSI = 0x07d8
  1556. const m_XK_Greek_RHO = 0x07d1
  1557. const m_XK_Greek_SIGMA = 0x07d2
  1558. const m_XK_Greek_TAU = 0x07d4
  1559. const m_XK_Greek_THETA = 0x07c8
  1560. const m_XK_Greek_UPSILON = 0x07d5
  1561. const m_XK_Greek_UPSILONaccent = 0x07a8
  1562. const m_XK_Greek_UPSILONdieresis = 0x07a9
  1563. const m_XK_Greek_XI = 0x07ce
  1564. const m_XK_Greek_ZETA = 0x07c6
  1565. const m_XK_Greek_accentdieresis = 0x07ae
  1566. const m_XK_Greek_alpha = 0x07e1
  1567. const m_XK_Greek_alphaaccent = 0x07b1
  1568. const m_XK_Greek_beta = 0x07e2
  1569. const m_XK_Greek_chi = 0x07f7
  1570. const m_XK_Greek_delta = 0x07e4
  1571. const m_XK_Greek_epsilon = 0x07e5
  1572. const m_XK_Greek_epsilonaccent = 0x07b2
  1573. const m_XK_Greek_eta = 0x07e7
  1574. const m_XK_Greek_etaaccent = 0x07b3
  1575. const m_XK_Greek_finalsmallsigma = 0x07f3
  1576. const m_XK_Greek_gamma = 0x07e3
  1577. const m_XK_Greek_horizbar = 0x07af
  1578. const m_XK_Greek_iota = 0x07e9
  1579. const m_XK_Greek_iotaaccent = 0x07b4
  1580. const m_XK_Greek_iotaaccentdieresis = 0x07b6
  1581. const m_XK_Greek_iotadieresis = 0x07b5
  1582. const m_XK_Greek_kappa = 0x07ea
  1583. const m_XK_Greek_lambda = 0x07eb
  1584. const m_XK_Greek_lamda = 0x07eb
  1585. const m_XK_Greek_mu = 0x07ec
  1586. const m_XK_Greek_nu = 0x07ed
  1587. const m_XK_Greek_omega = 0x07f9
  1588. const m_XK_Greek_omegaaccent = 0x07bb
  1589. const m_XK_Greek_omicron = 0x07ef
  1590. const m_XK_Greek_omicronaccent = 0x07b7
  1591. const m_XK_Greek_phi = 0x07f6
  1592. const m_XK_Greek_pi = 0x07f0
  1593. const m_XK_Greek_psi = 0x07f8
  1594. const m_XK_Greek_rho = 0x07f1
  1595. const m_XK_Greek_sigma = 0x07f2
  1596. const m_XK_Greek_switch = 0xff7e
  1597. const m_XK_Greek_tau = 0x07f4
  1598. const m_XK_Greek_theta = 0x07e8
  1599. const m_XK_Greek_upsilon = 0x07f5
  1600. const m_XK_Greek_upsilonaccent = 0x07b8
  1601. const m_XK_Greek_upsilonaccentdieresis = 0x07ba
  1602. const m_XK_Greek_upsilondieresis = 0x07b9
  1603. const m_XK_Greek_xi = 0x07ee
  1604. const m_XK_Greek_zeta = 0x07e6
  1605. const m_XK_H = 0x0048
  1606. const m_XK_Hangul = 0xff31
  1607. const m_XK_Hangul_A = 0x0ebf
  1608. const m_XK_Hangul_AE = 0x0ec0
  1609. const m_XK_Hangul_AraeA = 0x0ef6
  1610. const m_XK_Hangul_AraeAE = 0x0ef7
  1611. const m_XK_Hangul_Banja = 0xff39
  1612. const m_XK_Hangul_Cieuc = 0x0eba
  1613. const m_XK_Hangul_Codeinput = 0xff37
  1614. const m_XK_Hangul_Dikeud = 0x0ea7
  1615. const m_XK_Hangul_E = 0x0ec4
  1616. const m_XK_Hangul_EO = 0x0ec3
  1617. const m_XK_Hangul_EU = 0x0ed1
  1618. const m_XK_Hangul_End = 0xff33
  1619. const m_XK_Hangul_Hanja = 0xff34
  1620. const m_XK_Hangul_Hieuh = 0x0ebe
  1621. const m_XK_Hangul_I = 0x0ed3
  1622. const m_XK_Hangul_Ieung = 0x0eb7
  1623. const m_XK_Hangul_J_Cieuc = 0x0eea
  1624. const m_XK_Hangul_J_Dikeud = 0x0eda
  1625. const m_XK_Hangul_J_Hieuh = 0x0eee
  1626. const m_XK_Hangul_J_Ieung = 0x0ee8
  1627. const m_XK_Hangul_J_Jieuj = 0x0ee9
  1628. const m_XK_Hangul_J_Khieuq = 0x0eeb
  1629. const m_XK_Hangul_J_Kiyeog = 0x0ed4
  1630. const m_XK_Hangul_J_KiyeogSios = 0x0ed6
  1631. const m_XK_Hangul_J_KkogjiDalrinIeung = 0x0ef9
  1632. const m_XK_Hangul_J_Mieum = 0x0ee3
  1633. const m_XK_Hangul_J_Nieun = 0x0ed7
  1634. const m_XK_Hangul_J_NieunHieuh = 0x0ed9
  1635. const m_XK_Hangul_J_NieunJieuj = 0x0ed8
  1636. const m_XK_Hangul_J_PanSios = 0x0ef8
  1637. const m_XK_Hangul_J_Phieuf = 0x0eed
  1638. const m_XK_Hangul_J_Pieub = 0x0ee4
  1639. const m_XK_Hangul_J_PieubSios = 0x0ee5
  1640. const m_XK_Hangul_J_Rieul = 0x0edb
  1641. const m_XK_Hangul_J_RieulHieuh = 0x0ee2
  1642. const m_XK_Hangul_J_RieulKiyeog = 0x0edc
  1643. const m_XK_Hangul_J_RieulMieum = 0x0edd
  1644. const m_XK_Hangul_J_RieulPhieuf = 0x0ee1
  1645. const m_XK_Hangul_J_RieulPieub = 0x0ede
  1646. const m_XK_Hangul_J_RieulSios = 0x0edf
  1647. const m_XK_Hangul_J_RieulTieut = 0x0ee0
  1648. const m_XK_Hangul_J_Sios = 0x0ee6
  1649. const m_XK_Hangul_J_SsangKiyeog = 0x0ed5
  1650. const m_XK_Hangul_J_SsangSios = 0x0ee7
  1651. const m_XK_Hangul_J_Tieut = 0x0eec
  1652. const m_XK_Hangul_J_YeorinHieuh = 0x0efa
  1653. const m_XK_Hangul_Jamo = 0xff35
  1654. const m_XK_Hangul_Jeonja = 0xff38
  1655. const m_XK_Hangul_Jieuj = 0x0eb8
  1656. const m_XK_Hangul_Khieuq = 0x0ebb
  1657. const m_XK_Hangul_Kiyeog = 0x0ea1
  1658. const m_XK_Hangul_KiyeogSios = 0x0ea3
  1659. const m_XK_Hangul_KkogjiDalrinIeung = 0x0ef3
  1660. const m_XK_Hangul_Mieum = 0x0eb1
  1661. const m_XK_Hangul_MultipleCandidate = 0xff3d
  1662. const m_XK_Hangul_Nieun = 0x0ea4
  1663. const m_XK_Hangul_NieunHieuh = 0x0ea6
  1664. const m_XK_Hangul_NieunJieuj = 0x0ea5
  1665. const m_XK_Hangul_O = 0x0ec7
  1666. const m_XK_Hangul_OE = 0x0eca
  1667. const m_XK_Hangul_PanSios = 0x0ef2
  1668. const m_XK_Hangul_Phieuf = 0x0ebd
  1669. const m_XK_Hangul_Pieub = 0x0eb2
  1670. const m_XK_Hangul_PieubSios = 0x0eb4
  1671. const m_XK_Hangul_PostHanja = 0xff3b
  1672. const m_XK_Hangul_PreHanja = 0xff3a
  1673. const m_XK_Hangul_PreviousCandidate = 0xff3e
  1674. const m_XK_Hangul_Rieul = 0x0ea9
  1675. const m_XK_Hangul_RieulHieuh = 0x0eb0
  1676. const m_XK_Hangul_RieulKiyeog = 0x0eaa
  1677. const m_XK_Hangul_RieulMieum = 0x0eab
  1678. const m_XK_Hangul_RieulPhieuf = 0x0eaf
  1679. const m_XK_Hangul_RieulPieub = 0x0eac
  1680. const m_XK_Hangul_RieulSios = 0x0ead
  1681. const m_XK_Hangul_RieulTieut = 0x0eae
  1682. const m_XK_Hangul_RieulYeorinHieuh = 0x0eef
  1683. const m_XK_Hangul_Romaja = 0xff36
  1684. const m_XK_Hangul_SingleCandidate = 0xff3c
  1685. const m_XK_Hangul_Sios = 0x0eb5
  1686. const m_XK_Hangul_Special = 0xff3f
  1687. const m_XK_Hangul_SsangDikeud = 0x0ea8
  1688. const m_XK_Hangul_SsangJieuj = 0x0eb9
  1689. const m_XK_Hangul_SsangKiyeog = 0x0ea2
  1690. const m_XK_Hangul_SsangPieub = 0x0eb3
  1691. const m_XK_Hangul_SsangSios = 0x0eb6
  1692. const m_XK_Hangul_Start = 0xff32
  1693. const m_XK_Hangul_SunkyeongeumMieum = 0x0ef0
  1694. const m_XK_Hangul_SunkyeongeumPhieuf = 0x0ef4
  1695. const m_XK_Hangul_SunkyeongeumPieub = 0x0ef1
  1696. const m_XK_Hangul_Tieut = 0x0ebc
  1697. const m_XK_Hangul_U = 0x0ecc
  1698. const m_XK_Hangul_WA = 0x0ec8
  1699. const m_XK_Hangul_WAE = 0x0ec9
  1700. const m_XK_Hangul_WE = 0x0ece
  1701. const m_XK_Hangul_WEO = 0x0ecd
  1702. const m_XK_Hangul_WI = 0x0ecf
  1703. const m_XK_Hangul_YA = 0x0ec1
  1704. const m_XK_Hangul_YAE = 0x0ec2
  1705. const m_XK_Hangul_YE = 0x0ec6
  1706. const m_XK_Hangul_YEO = 0x0ec5
  1707. const m_XK_Hangul_YI = 0x0ed2
  1708. const m_XK_Hangul_YO = 0x0ecb
  1709. const m_XK_Hangul_YU = 0x0ed0
  1710. const m_XK_Hangul_YeorinHieuh = 0x0ef5
  1711. const m_XK_Hangul_switch = 0xff7e
  1712. const m_XK_Hankaku = 0xff29
  1713. const m_XK_Hcircumflex = 0x02a6
  1714. const m_XK_Hebrew_switch = 0xff7e
  1715. const m_XK_Help = 0xff6a
  1716. const m_XK_Henkan = 0xff23
  1717. const m_XK_Henkan_Mode = 0xff23
  1718. const m_XK_Hiragana = 0xff25
  1719. const m_XK_Hiragana_Katakana = 0xff27
  1720. const m_XK_Home = 0xff50
  1721. const m_XK_Hstroke = 0x02a1
  1722. const m_XK_Hyper_L = 0xffed
  1723. const m_XK_Hyper_R = 0xffee
  1724. const m_XK_I = 0x0049
  1725. const m_XK_ISO_Center_Object = 0xfe33
  1726. const m_XK_ISO_Continuous_Underline = 0xfe30
  1727. const m_XK_ISO_Discontinuous_Underline = 0xfe31
  1728. const m_XK_ISO_Emphasize = 0xfe32
  1729. const m_XK_ISO_Enter = 0xfe34
  1730. const m_XK_ISO_Fast_Cursor_Down = 0xfe2f
  1731. const m_XK_ISO_Fast_Cursor_Left = 0xfe2c
  1732. const m_XK_ISO_Fast_Cursor_Right = 0xfe2d
  1733. const m_XK_ISO_Fast_Cursor_Up = 0xfe2e
  1734. const m_XK_ISO_First_Group = 0xfe0c
  1735. const m_XK_ISO_First_Group_Lock = 0xfe0d
  1736. const m_XK_ISO_Group_Latch = 0xfe06
  1737. const m_XK_ISO_Group_Lock = 0xfe07
  1738. const m_XK_ISO_Group_Shift = 0xff7e
  1739. const m_XK_ISO_Last_Group = 0xfe0e
  1740. const m_XK_ISO_Last_Group_Lock = 0xfe0f
  1741. const m_XK_ISO_Left_Tab = 0xfe20
  1742. const m_XK_ISO_Level2_Latch = 0xfe02
  1743. const m_XK_ISO_Level3_Latch = 0xfe04
  1744. const m_XK_ISO_Level3_Lock = 0xfe05
  1745. const m_XK_ISO_Level3_Shift = 0xfe03
  1746. const m_XK_ISO_Level5_Latch = 0xfe12
  1747. const m_XK_ISO_Level5_Lock = 0xfe13
  1748. const m_XK_ISO_Level5_Shift = 0xfe11
  1749. const m_XK_ISO_Lock = 0xfe01
  1750. const m_XK_ISO_Move_Line_Down = 0xfe22
  1751. const m_XK_ISO_Move_Line_Up = 0xfe21
  1752. const m_XK_ISO_Next_Group = 0xfe08
  1753. const m_XK_ISO_Next_Group_Lock = 0xfe09
  1754. const m_XK_ISO_Partial_Line_Down = 0xfe24
  1755. const m_XK_ISO_Partial_Line_Up = 0xfe23
  1756. const m_XK_ISO_Partial_Space_Left = 0xfe25
  1757. const m_XK_ISO_Partial_Space_Right = 0xfe26
  1758. const m_XK_ISO_Prev_Group = 0xfe0a
  1759. const m_XK_ISO_Prev_Group_Lock = 0xfe0b
  1760. const m_XK_ISO_Release_Both_Margins = 0xfe2b
  1761. const m_XK_ISO_Release_Margin_Left = 0xfe29
  1762. const m_XK_ISO_Release_Margin_Right = 0xfe2a
  1763. const m_XK_ISO_Set_Margin_Left = 0xfe27
  1764. const m_XK_ISO_Set_Margin_Right = 0xfe28
  1765. const m_XK_Iabovedot = 0x02a9
  1766. const m_XK_Iacute = 0x00cd
  1767. const m_XK_Ibelowdot = 0x1001eca
  1768. const m_XK_Ibreve = 0x100012c
  1769. const m_XK_Icircumflex = 0x00ce
  1770. const m_XK_Idiaeresis = 0x00cf
  1771. const m_XK_Igrave = 0x00cc
  1772. const m_XK_Ihook = 0x1001ec8
  1773. const m_XK_Imacron = 0x03cf
  1774. const m_XK_Insert = 0xff63
  1775. const m_XK_Iogonek = 0x03c7
  1776. const m_XK_Itilde = 0x03a5
  1777. const m_XK_J = 0x004a
  1778. const m_XK_Jcircumflex = 0x02ac
  1779. const m_XK_K = 0x004b
  1780. const m_XK_KP_0 = 0xffb0
  1781. const m_XK_KP_1 = 0xffb1
  1782. const m_XK_KP_2 = 0xffb2
  1783. const m_XK_KP_3 = 0xffb3
  1784. const m_XK_KP_4 = 0xffb4
  1785. const m_XK_KP_5 = 0xffb5
  1786. const m_XK_KP_6 = 0xffb6
  1787. const m_XK_KP_7 = 0xffb7
  1788. const m_XK_KP_8 = 0xffb8
  1789. const m_XK_KP_9 = 0xffb9
  1790. const m_XK_KP_Add = 0xffab
  1791. const m_XK_KP_Begin = 0xff9d
  1792. const m_XK_KP_Decimal = 0xffae
  1793. const m_XK_KP_Delete = 0xff9f
  1794. const m_XK_KP_Divide = 0xffaf
  1795. const m_XK_KP_Down = 0xff99
  1796. const m_XK_KP_End = 0xff9c
  1797. const m_XK_KP_Enter = 0xff8d
  1798. const m_XK_KP_Equal = 0xffbd
  1799. const m_XK_KP_F1 = 0xff91
  1800. const m_XK_KP_F2 = 0xff92
  1801. const m_XK_KP_F3 = 0xff93
  1802. const m_XK_KP_F4 = 0xff94
  1803. const m_XK_KP_Home = 0xff95
  1804. const m_XK_KP_Insert = 0xff9e
  1805. const m_XK_KP_Left = 0xff96
  1806. const m_XK_KP_Multiply = 0xffaa
  1807. const m_XK_KP_Next = 0xff9b
  1808. const m_XK_KP_Page_Down = 0xff9b
  1809. const m_XK_KP_Page_Up = 0xff9a
  1810. const m_XK_KP_Prior = 0xff9a
  1811. const m_XK_KP_Right = 0xff98
  1812. const m_XK_KP_Separator = 0xffac
  1813. const m_XK_KP_Space = 0xff80
  1814. const m_XK_KP_Subtract = 0xffad
  1815. const m_XK_KP_Tab = 0xff89
  1816. const m_XK_KP_Up = 0xff97
  1817. const m_XK_Kana_Lock = 0xff2d
  1818. const m_XK_Kana_Shift = 0xff2e
  1819. const m_XK_Kanji = 0xff21
  1820. const m_XK_Kanji_Bangou = 0xff37
  1821. const m_XK_Katakana = 0xff26
  1822. const m_XK_Kcedilla = 0x03d3
  1823. const m_XK_Korean_Won = 0x0eff
  1824. const m_XK_L = 0x004c
  1825. const m_XK_L1 = 0xffc8
  1826. const m_XK_L10 = 0xffd1
  1827. const m_XK_L2 = 0xffc9
  1828. const m_XK_L3 = 0xffca
  1829. const m_XK_L4 = 0xffcb
  1830. const m_XK_L5 = 0xffcc
  1831. const m_XK_L6 = 0xffcd
  1832. const m_XK_L7 = 0xffce
  1833. const m_XK_L8 = 0xffcf
  1834. const m_XK_L9 = 0xffd0
  1835. const m_XK_Lacute = 0x01c5
  1836. const m_XK_Last_Virtual_Screen = 0xfed4
  1837. const m_XK_Lbelowdot = 0x1001e36
  1838. const m_XK_Lcaron = 0x01a5
  1839. const m_XK_Lcedilla = 0x03a6
  1840. const m_XK_Left = 0xff51
  1841. const m_XK_Linefeed = 0xff0a
  1842. const m_XK_LiraSign = 0x10020a4
  1843. const m_XK_Lstroke = 0x01a3
  1844. const m_XK_M = 0x004d
  1845. const m_XK_Mabovedot = 0x1001e40
  1846. const m_XK_Macedonia_DSE = 0x06b5
  1847. const m_XK_Macedonia_GJE = 0x06b2
  1848. const m_XK_Macedonia_KJE = 0x06bc
  1849. const m_XK_Macedonia_dse = 0x06a5
  1850. const m_XK_Macedonia_gje = 0x06a2
  1851. const m_XK_Macedonia_kje = 0x06ac
  1852. const m_XK_Mae_Koho = 0xff3e
  1853. const m_XK_Massyo = 0xff2c
  1854. const m_XK_Menu = 0xff67
  1855. const m_XK_Meta_L = 0xffe7
  1856. const m_XK_Meta_R = 0xffe8
  1857. const m_XK_MillSign = 0x10020a5
  1858. const m_XK_Mode_switch = 0xff7e
  1859. const m_XK_MouseKeys_Accel_Enable = 0xfe77
  1860. const m_XK_MouseKeys_Enable = 0xfe76
  1861. const m_XK_Muhenkan = 0xff22
  1862. const m_XK_Multi_key = 0xff20
  1863. const m_XK_MultipleCandidate = 0xff3d
  1864. const m_XK_N = 0x004e
  1865. const m_XK_Nacute = 0x01d1
  1866. const m_XK_NairaSign = 0x10020a6
  1867. const m_XK_Ncaron = 0x01d2
  1868. const m_XK_Ncedilla = 0x03d1
  1869. const m_XK_NewSheqelSign = 0x10020aa
  1870. const m_XK_Next = 0xff56
  1871. const m_XK_Next_Virtual_Screen = 0xfed2
  1872. const m_XK_Ntilde = 0x00d1
  1873. const m_XK_Num_Lock = 0xff7f
  1874. const m_XK_O = 0x004f
  1875. const m_XK_OE = 0x13bc
  1876. const m_XK_Oacute = 0x00d3
  1877. const m_XK_Obarred = 0x100019f
  1878. const m_XK_Obelowdot = 0x1001ecc
  1879. const m_XK_Ocaron = 0x10001d1
  1880. const m_XK_Ocircumflex = 0x00d4
  1881. const m_XK_Ocircumflexacute = 0x1001ed0
  1882. const m_XK_Ocircumflexbelowdot = 0x1001ed8
  1883. const m_XK_Ocircumflexgrave = 0x1001ed2
  1884. const m_XK_Ocircumflexhook = 0x1001ed4
  1885. const m_XK_Ocircumflextilde = 0x1001ed6
  1886. const m_XK_Odiaeresis = 0x00d6
  1887. const m_XK_Odoubleacute = 0x01d5
  1888. const m_XK_Ograve = 0x00d2
  1889. const m_XK_Ohook = 0x1001ece
  1890. const m_XK_Ohorn = 0x10001a0
  1891. const m_XK_Ohornacute = 0x1001eda
  1892. const m_XK_Ohornbelowdot = 0x1001ee2
  1893. const m_XK_Ohorngrave = 0x1001edc
  1894. const m_XK_Ohornhook = 0x1001ede
  1895. const m_XK_Ohorntilde = 0x1001ee0
  1896. const m_XK_Omacron = 0x03d2
  1897. const m_XK_Ooblique = 0x00d8
  1898. const m_XK_Oslash = 0x00d8
  1899. const m_XK_Otilde = 0x00d5
  1900. const m_XK_Overlay1_Enable = 0xfe78
  1901. const m_XK_Overlay2_Enable = 0xfe79
  1902. const m_XK_P = 0x0050
  1903. const m_XK_Pabovedot = 0x1001e56
  1904. const m_XK_Page_Down = 0xff56
  1905. const m_XK_Page_Up = 0xff55
  1906. const m_XK_Pause = 0xff13
  1907. const m_XK_PesetaSign = 0x10020a7
  1908. const m_XK_Pointer_Accelerate = 0xfefa
  1909. const m_XK_Pointer_Button1 = 0xfee9
  1910. const m_XK_Pointer_Button2 = 0xfeea
  1911. const m_XK_Pointer_Button3 = 0xfeeb
  1912. const m_XK_Pointer_Button4 = 0xfeec
  1913. const m_XK_Pointer_Button5 = 0xfeed
  1914. const m_XK_Pointer_Button_Dflt = 0xfee8
  1915. const m_XK_Pointer_DblClick1 = 0xfeef
  1916. const m_XK_Pointer_DblClick2 = 0xfef0
  1917. const m_XK_Pointer_DblClick3 = 0xfef1
  1918. const m_XK_Pointer_DblClick4 = 0xfef2
  1919. const m_XK_Pointer_DblClick5 = 0xfef3
  1920. const m_XK_Pointer_DblClick_Dflt = 0xfeee
  1921. const m_XK_Pointer_DfltBtnNext = 0xfefb
  1922. const m_XK_Pointer_DfltBtnPrev = 0xfefc
  1923. const m_XK_Pointer_Down = 0xfee3
  1924. const m_XK_Pointer_DownLeft = 0xfee6
  1925. const m_XK_Pointer_DownRight = 0xfee7
  1926. const m_XK_Pointer_Drag1 = 0xfef5
  1927. const m_XK_Pointer_Drag2 = 0xfef6
  1928. const m_XK_Pointer_Drag3 = 0xfef7
  1929. const m_XK_Pointer_Drag4 = 0xfef8
  1930. const m_XK_Pointer_Drag5 = 0xfefd
  1931. const m_XK_Pointer_Drag_Dflt = 0xfef4
  1932. const m_XK_Pointer_EnableKeys = 0xfef9
  1933. const m_XK_Pointer_Left = 0xfee0
  1934. const m_XK_Pointer_Right = 0xfee1
  1935. const m_XK_Pointer_Up = 0xfee2
  1936. const m_XK_Pointer_UpLeft = 0xfee4
  1937. const m_XK_Pointer_UpRight = 0xfee5
  1938. const m_XK_Prev_Virtual_Screen = 0xfed1
  1939. const m_XK_PreviousCandidate = 0xff3e
  1940. const m_XK_Print = 0xff61
  1941. const m_XK_Prior = 0xff55
  1942. const m_XK_Q = 0x0051
  1943. const m_XK_R = 0x0052
  1944. const m_XK_R1 = 0xffd2
  1945. const m_XK_R10 = 0xffdb
  1946. const m_XK_R11 = 0xffdc
  1947. const m_XK_R12 = 0xffdd
  1948. const m_XK_R13 = 0xffde
  1949. const m_XK_R14 = 0xffdf
  1950. const m_XK_R15 = 0xffe0
  1951. const m_XK_R2 = 0xffd3
  1952. const m_XK_R3 = 0xffd4
  1953. const m_XK_R4 = 0xffd5
  1954. const m_XK_R5 = 0xffd6
  1955. const m_XK_R6 = 0xffd7
  1956. const m_XK_R7 = 0xffd8
  1957. const m_XK_R8 = 0xffd9
  1958. const m_XK_R9 = 0xffda
  1959. const m_XK_Racute = 0x01c0
  1960. const m_XK_Rcaron = 0x01d8
  1961. const m_XK_Rcedilla = 0x03a3
  1962. const m_XK_Redo = 0xff66
  1963. const m_XK_RepeatKeys_Enable = 0xfe72
  1964. const m_XK_Return = 0xff0d
  1965. const m_XK_Right = 0xff53
  1966. const m_XK_Romaji = 0xff24
  1967. const m_XK_RupeeSign = 0x10020a8
  1968. const m_XK_S = 0x0053
  1969. const m_XK_SCHWA = 0x100018f
  1970. const m_XK_Sabovedot = 0x1001e60
  1971. const m_XK_Sacute = 0x01a6
  1972. const m_XK_Scaron = 0x01a9
  1973. const m_XK_Scedilla = 0x01aa
  1974. const m_XK_Scircumflex = 0x02de
  1975. const m_XK_Scroll_Lock = 0xff14
  1976. const m_XK_Select = 0xff60
  1977. const m_XK_Serbian_DJE = 0x06b1
  1978. const m_XK_Serbian_DZE = 0x06bf
  1979. const m_XK_Serbian_JE = 0x06b8
  1980. const m_XK_Serbian_LJE = 0x06b9
  1981. const m_XK_Serbian_NJE = 0x06ba
  1982. const m_XK_Serbian_TSHE = 0x06bb
  1983. const m_XK_Serbian_dje = 0x06a1
  1984. const m_XK_Serbian_dze = 0x06af
  1985. const m_XK_Serbian_je = 0x06a8
  1986. const m_XK_Serbian_lje = 0x06a9
  1987. const m_XK_Serbian_nje = 0x06aa
  1988. const m_XK_Serbian_tshe = 0x06ab
  1989. const m_XK_Shift_L = 0xffe1
  1990. const m_XK_Shift_Lock = 0xffe6
  1991. const m_XK_Shift_R = 0xffe2
  1992. const m_XK_SingleCandidate = 0xff3c
  1993. const m_XK_Sinh_a = 0x1000d85
  1994. const m_XK_Sinh_aa = 0x1000d86
  1995. const m_XK_Sinh_aa2 = 0x1000dcf
  1996. const m_XK_Sinh_ae = 0x1000d87
  1997. const m_XK_Sinh_ae2 = 0x1000dd0
  1998. const m_XK_Sinh_aee = 0x1000d88
  1999. const m_XK_Sinh_aee2 = 0x1000dd1
  2000. const m_XK_Sinh_ai = 0x1000d93
  2001. const m_XK_Sinh_ai2 = 0x1000ddb
  2002. const m_XK_Sinh_al = 0x1000dca
  2003. const m_XK_Sinh_au = 0x1000d96
  2004. const m_XK_Sinh_au2 = 0x1000dde
  2005. const m_XK_Sinh_ba = 0x1000db6
  2006. const m_XK_Sinh_bha = 0x1000db7
  2007. const m_XK_Sinh_ca = 0x1000da0
  2008. const m_XK_Sinh_cha = 0x1000da1
  2009. const m_XK_Sinh_dda = 0x1000da9
  2010. const m_XK_Sinh_ddha = 0x1000daa
  2011. const m_XK_Sinh_dha = 0x1000daf
  2012. const m_XK_Sinh_dhha = 0x1000db0
  2013. const m_XK_Sinh_e = 0x1000d91
  2014. const m_XK_Sinh_e2 = 0x1000dd9
  2015. const m_XK_Sinh_ee = 0x1000d92
  2016. const m_XK_Sinh_ee2 = 0x1000dda
  2017. const m_XK_Sinh_fa = 0x1000dc6
  2018. const m_XK_Sinh_ga = 0x1000d9c
  2019. const m_XK_Sinh_gha = 0x1000d9d
  2020. const m_XK_Sinh_h2 = 0x1000d83
  2021. const m_XK_Sinh_ha = 0x1000dc4
  2022. const m_XK_Sinh_i = 0x1000d89
  2023. const m_XK_Sinh_i2 = 0x1000dd2
  2024. const m_XK_Sinh_ii = 0x1000d8a
  2025. const m_XK_Sinh_ii2 = 0x1000dd3
  2026. const m_XK_Sinh_ja = 0x1000da2
  2027. const m_XK_Sinh_jha = 0x1000da3
  2028. const m_XK_Sinh_jnya = 0x1000da5
  2029. const m_XK_Sinh_ka = 0x1000d9a
  2030. const m_XK_Sinh_kha = 0x1000d9b
  2031. const m_XK_Sinh_kunddaliya = 0x1000df4
  2032. const m_XK_Sinh_la = 0x1000dbd
  2033. const m_XK_Sinh_lla = 0x1000dc5
  2034. const m_XK_Sinh_lu = 0x1000d8f
  2035. const m_XK_Sinh_lu2 = 0x1000ddf
  2036. const m_XK_Sinh_luu = 0x1000d90
  2037. const m_XK_Sinh_luu2 = 0x1000df3
  2038. const m_XK_Sinh_ma = 0x1000db8
  2039. const m_XK_Sinh_mba = 0x1000db9
  2040. const m_XK_Sinh_na = 0x1000db1
  2041. const m_XK_Sinh_ndda = 0x1000dac
  2042. const m_XK_Sinh_ndha = 0x1000db3
  2043. const m_XK_Sinh_ng = 0x1000d82
  2044. const m_XK_Sinh_ng2 = 0x1000d9e
  2045. const m_XK_Sinh_nga = 0x1000d9f
  2046. const m_XK_Sinh_nja = 0x1000da6
  2047. const m_XK_Sinh_nna = 0x1000dab
  2048. const m_XK_Sinh_nya = 0x1000da4
  2049. const m_XK_Sinh_o = 0x1000d94
  2050. const m_XK_Sinh_o2 = 0x1000ddc
  2051. const m_XK_Sinh_oo = 0x1000d95
  2052. const m_XK_Sinh_oo2 = 0x1000ddd
  2053. const m_XK_Sinh_pa = 0x1000db4
  2054. const m_XK_Sinh_pha = 0x1000db5
  2055. const m_XK_Sinh_ra = 0x1000dbb
  2056. const m_XK_Sinh_ri = 0x1000d8d
  2057. const m_XK_Sinh_rii = 0x1000d8e
  2058. const m_XK_Sinh_ru2 = 0x1000dd8
  2059. const m_XK_Sinh_ruu2 = 0x1000df2
  2060. const m_XK_Sinh_sa = 0x1000dc3
  2061. const m_XK_Sinh_sha = 0x1000dc1
  2062. const m_XK_Sinh_ssha = 0x1000dc2
  2063. const m_XK_Sinh_tha = 0x1000dad
  2064. const m_XK_Sinh_thha = 0x1000dae
  2065. const m_XK_Sinh_tta = 0x1000da7
  2066. const m_XK_Sinh_ttha = 0x1000da8
  2067. const m_XK_Sinh_u = 0x1000d8b
  2068. const m_XK_Sinh_u2 = 0x1000dd4
  2069. const m_XK_Sinh_uu = 0x1000d8c
  2070. const m_XK_Sinh_uu2 = 0x1000dd6
  2071. const m_XK_Sinh_va = 0x1000dc0
  2072. const m_XK_Sinh_ya = 0x1000dba
  2073. const m_XK_SlowKeys_Enable = 0xfe73
  2074. const m_XK_StickyKeys_Enable = 0xfe75
  2075. const m_XK_Super_L = 0xffeb
  2076. const m_XK_Super_R = 0xffec
  2077. const m_XK_Sys_Req = 0xff15
  2078. const m_XK_T = 0x0054
  2079. const m_XK_THORN = 0x00de
  2080. const m_XK_Tab = 0xff09
  2081. const m_XK_Tabovedot = 0x1001e6a
  2082. const m_XK_Tcaron = 0x01ab
  2083. const m_XK_Tcedilla = 0x01de
  2084. const m_XK_Terminate_Server = 0xfed5
  2085. const m_XK_Thai_baht = 0x0ddf
  2086. const m_XK_Thai_bobaimai = 0x0dba
  2087. const m_XK_Thai_chochan = 0x0da8
  2088. const m_XK_Thai_chochang = 0x0daa
  2089. const m_XK_Thai_choching = 0x0da9
  2090. const m_XK_Thai_chochoe = 0x0dac
  2091. const m_XK_Thai_dochada = 0x0dae
  2092. const m_XK_Thai_dodek = 0x0db4
  2093. const m_XK_Thai_fofa = 0x0dbd
  2094. const m_XK_Thai_fofan = 0x0dbf
  2095. const m_XK_Thai_hohip = 0x0dcb
  2096. const m_XK_Thai_honokhuk = 0x0dce
  2097. const m_XK_Thai_khokhai = 0x0da2
  2098. const m_XK_Thai_khokhon = 0x0da5
  2099. const m_XK_Thai_khokhuat = 0x0da3
  2100. const m_XK_Thai_khokhwai = 0x0da4
  2101. const m_XK_Thai_khorakhang = 0x0da6
  2102. const m_XK_Thai_kokai = 0x0da1
  2103. const m_XK_Thai_lakkhangyao = 0x0de5
  2104. const m_XK_Thai_lekchet = 0x0df7
  2105. const m_XK_Thai_lekha = 0x0df5
  2106. const m_XK_Thai_lekhok = 0x0df6
  2107. const m_XK_Thai_lekkao = 0x0df9
  2108. const m_XK_Thai_leknung = 0x0df1
  2109. const m_XK_Thai_lekpaet = 0x0df8
  2110. const m_XK_Thai_leksam = 0x0df3
  2111. const m_XK_Thai_leksi = 0x0df4
  2112. const m_XK_Thai_leksong = 0x0df2
  2113. const m_XK_Thai_leksun = 0x0df0
  2114. const m_XK_Thai_lochula = 0x0dcc
  2115. const m_XK_Thai_loling = 0x0dc5
  2116. const m_XK_Thai_lu = 0x0dc6
  2117. const m_XK_Thai_maichattawa = 0x0deb
  2118. const m_XK_Thai_maiek = 0x0de8
  2119. const m_XK_Thai_maihanakat = 0x0dd1
  2120. const m_XK_Thai_maihanakat_maitho = 0x0dde
  2121. const m_XK_Thai_maitaikhu = 0x0de7
  2122. const m_XK_Thai_maitho = 0x0de9
  2123. const m_XK_Thai_maitri = 0x0dea
  2124. const m_XK_Thai_maiyamok = 0x0de6
  2125. const m_XK_Thai_moma = 0x0dc1
  2126. const m_XK_Thai_ngongu = 0x0da7
  2127. const m_XK_Thai_nikhahit = 0x0ded
  2128. const m_XK_Thai_nonen = 0x0db3
  2129. const m_XK_Thai_nonu = 0x0db9
  2130. const m_XK_Thai_oang = 0x0dcd
  2131. const m_XK_Thai_paiyannoi = 0x0dcf
  2132. const m_XK_Thai_phinthu = 0x0dda
  2133. const m_XK_Thai_phophan = 0x0dbe
  2134. const m_XK_Thai_phophung = 0x0dbc
  2135. const m_XK_Thai_phosamphao = 0x0dc0
  2136. const m_XK_Thai_popla = 0x0dbb
  2137. const m_XK_Thai_rorua = 0x0dc3
  2138. const m_XK_Thai_ru = 0x0dc4
  2139. const m_XK_Thai_saraa = 0x0dd0
  2140. const m_XK_Thai_saraaa = 0x0dd2
  2141. const m_XK_Thai_saraae = 0x0de1
  2142. const m_XK_Thai_saraaimaimalai = 0x0de4
  2143. const m_XK_Thai_saraaimaimuan = 0x0de3
  2144. const m_XK_Thai_saraam = 0x0dd3
  2145. const m_XK_Thai_sarae = 0x0de0
  2146. const m_XK_Thai_sarai = 0x0dd4
  2147. const m_XK_Thai_saraii = 0x0dd5
  2148. const m_XK_Thai_sarao = 0x0de2
  2149. const m_XK_Thai_sarau = 0x0dd8
  2150. const m_XK_Thai_saraue = 0x0dd6
  2151. const m_XK_Thai_sarauee = 0x0dd7
  2152. const m_XK_Thai_sarauu = 0x0dd9
  2153. const m_XK_Thai_sorusi = 0x0dc9
  2154. const m_XK_Thai_sosala = 0x0dc8
  2155. const m_XK_Thai_soso = 0x0dab
  2156. const m_XK_Thai_sosua = 0x0dca
  2157. const m_XK_Thai_thanthakhat = 0x0dec
  2158. const m_XK_Thai_thonangmontho = 0x0db1
  2159. const m_XK_Thai_thophuthao = 0x0db2
  2160. const m_XK_Thai_thothahan = 0x0db7
  2161. const m_XK_Thai_thothan = 0x0db0
  2162. const m_XK_Thai_thothong = 0x0db8
  2163. const m_XK_Thai_thothung = 0x0db6
  2164. const m_XK_Thai_topatak = 0x0daf
  2165. const m_XK_Thai_totao = 0x0db5
  2166. const m_XK_Thai_wowaen = 0x0dc7
  2167. const m_XK_Thai_yoyak = 0x0dc2
  2168. const m_XK_Thai_yoying = 0x0dad
  2169. const m_XK_Thorn = 0x00de
  2170. const m_XK_Touroku = 0xff2b
  2171. const m_XK_Tslash = 0x03ac
  2172. const m_XK_U = 0x0055
  2173. const m_XK_Uacute = 0x00da
  2174. const m_XK_Ubelowdot = 0x1001ee4
  2175. const m_XK_Ubreve = 0x02dd
  2176. const m_XK_Ucircumflex = 0x00db
  2177. const m_XK_Udiaeresis = 0x00dc
  2178. const m_XK_Udoubleacute = 0x01db
  2179. const m_XK_Ugrave = 0x00d9
  2180. const m_XK_Uhook = 0x1001ee6
  2181. const m_XK_Uhorn = 0x10001af
  2182. const m_XK_Uhornacute = 0x1001ee8
  2183. const m_XK_Uhornbelowdot = 0x1001ef0
  2184. const m_XK_Uhorngrave = 0x1001eea
  2185. const m_XK_Uhornhook = 0x1001eec
  2186. const m_XK_Uhorntilde = 0x1001eee
  2187. const m_XK_Ukrainian_GHE_WITH_UPTURN = 0x06bd
  2188. const m_XK_Ukrainian_I = 0x06b6
  2189. const m_XK_Ukrainian_IE = 0x06b4
  2190. const m_XK_Ukrainian_YI = 0x06b7
  2191. const m_XK_Ukrainian_ghe_with_upturn = 0x06ad
  2192. const m_XK_Ukrainian_i = 0x06a6
  2193. const m_XK_Ukrainian_ie = 0x06a4
  2194. const m_XK_Ukrainian_yi = 0x06a7
  2195. const m_XK_Ukranian_I = 0x06b6
  2196. const m_XK_Ukranian_JE = 0x06b4
  2197. const m_XK_Ukranian_YI = 0x06b7
  2198. const m_XK_Ukranian_i = 0x06a6
  2199. const m_XK_Ukranian_je = 0x06a4
  2200. const m_XK_Ukranian_yi = 0x06a7
  2201. const m_XK_Umacron = 0x03de
  2202. const m_XK_Undo = 0xff65
  2203. const m_XK_Uogonek = 0x03d9
  2204. const m_XK_Up = 0xff52
  2205. const m_XK_Uring = 0x01d9
  2206. const m_XK_Utilde = 0x03dd
  2207. const m_XK_V = 0x0056
  2208. const m_XK_VoidSymbol = 0xffffff
  2209. const m_XK_W = 0x0057
  2210. const m_XK_Wacute = 0x1001e82
  2211. const m_XK_Wcircumflex = 0x1000174
  2212. const m_XK_Wdiaeresis = 0x1001e84
  2213. const m_XK_Wgrave = 0x1001e80
  2214. const m_XK_WonSign = 0x10020a9
  2215. const m_XK_X = 0x0058
  2216. const m_XK_Xabovedot = 0x1001e8a
  2217. const m_XK_Y = 0x0059
  2218. const m_XK_Yacute = 0x00dd
  2219. const m_XK_Ybelowdot = 0x1001ef4
  2220. const m_XK_Ycircumflex = 0x1000176
  2221. const m_XK_Ydiaeresis = 0x13be
  2222. const m_XK_Ygrave = 0x1001ef2
  2223. const m_XK_Yhook = 0x1001ef6
  2224. const m_XK_Ytilde = 0x1001ef8
  2225. const m_XK_Z = 0x005a
  2226. const m_XK_Zabovedot = 0x01af
  2227. const m_XK_Zacute = 0x01ac
  2228. const m_XK_Zcaron = 0x01ae
  2229. const m_XK_Zen_Koho = 0xff3d
  2230. const m_XK_Zenkaku = 0xff28
  2231. const m_XK_Zenkaku_Hankaku = 0xff2a
  2232. const m_XK_Zstroke = 0x10001b5
  2233. const m_XK_a = 0x0061
  2234. const m_XK_aacute = 0x00e1
  2235. const m_XK_abelowdot = 0x1001ea1
  2236. const m_XK_abovedot = 0x01ff
  2237. const m_XK_abreve = 0x01e3
  2238. const m_XK_abreveacute = 0x1001eaf
  2239. const m_XK_abrevebelowdot = 0x1001eb7
  2240. const m_XK_abrevegrave = 0x1001eb1
  2241. const m_XK_abrevehook = 0x1001eb3
  2242. const m_XK_abrevetilde = 0x1001eb5
  2243. const m_XK_acircumflex = 0x00e2
  2244. const m_XK_acircumflexacute = 0x1001ea5
  2245. const m_XK_acircumflexbelowdot = 0x1001ead
  2246. const m_XK_acircumflexgrave = 0x1001ea7
  2247. const m_XK_acircumflexhook = 0x1001ea9
  2248. const m_XK_acircumflextilde = 0x1001eab
  2249. const m_XK_acute = 0x00b4
  2250. const m_XK_adiaeresis = 0x00e4
  2251. const m_XK_ae = 0x00e6
  2252. const m_XK_agrave = 0x00e0
  2253. const m_XK_ahook = 0x1001ea3
  2254. const m_XK_amacron = 0x03e0
  2255. const m_XK_ampersand = 0x0026
  2256. const m_XK_aogonek = 0x01b1
  2257. const m_XK_apostrophe = 0x0027
  2258. const m_XK_approxeq = 0x1002248
  2259. const m_XK_aring = 0x00e5
  2260. const m_XK_asciicircum = 0x005e
  2261. const m_XK_asciitilde = 0x007e
  2262. const m_XK_asterisk = 0x002a
  2263. const m_XK_at = 0x0040
  2264. const m_XK_atilde = 0x00e3
  2265. const m_XK_b = 0x0062
  2266. const m_XK_babovedot = 0x1001e03
  2267. const m_XK_backslash = 0x005c
  2268. const m_XK_bar = 0x007c
  2269. const m_XK_because = 0x1002235
  2270. const m_XK_braceleft = 0x007b
  2271. const m_XK_braceright = 0x007d
  2272. const m_XK_bracketleft = 0x005b
  2273. const m_XK_bracketright = 0x005d
  2274. const m_XK_braille_blank = 0x1002800
  2275. const m_XK_braille_dot_1 = 0xfff1
  2276. const m_XK_braille_dot_10 = 0xfffa
  2277. const m_XK_braille_dot_2 = 0xfff2
  2278. const m_XK_braille_dot_3 = 0xfff3
  2279. const m_XK_braille_dot_4 = 0xfff4
  2280. const m_XK_braille_dot_5 = 0xfff5
  2281. const m_XK_braille_dot_6 = 0xfff6
  2282. const m_XK_braille_dot_7 = 0xfff7
  2283. const m_XK_braille_dot_8 = 0xfff8
  2284. const m_XK_braille_dot_9 = 0xfff9
  2285. const m_XK_braille_dots_1 = 0x1002801
  2286. const m_XK_braille_dots_12 = 0x1002803
  2287. const m_XK_braille_dots_123 = 0x1002807
  2288. const m_XK_braille_dots_1234 = 0x100280f
  2289. const m_XK_braille_dots_12345 = 0x100281f
  2290. const m_XK_braille_dots_123456 = 0x100283f
  2291. const m_XK_braille_dots_1234567 = 0x100287f
  2292. const m_XK_braille_dots_12345678 = 0x10028ff
  2293. const m_XK_braille_dots_1234568 = 0x10028bf
  2294. const m_XK_braille_dots_123457 = 0x100285f
  2295. const m_XK_braille_dots_1234578 = 0x10028df
  2296. const m_XK_braille_dots_123458 = 0x100289f
  2297. const m_XK_braille_dots_12346 = 0x100282f
  2298. const m_XK_braille_dots_123467 = 0x100286f
  2299. const m_XK_braille_dots_1234678 = 0x10028ef
  2300. const m_XK_braille_dots_123468 = 0x10028af
  2301. const m_XK_braille_dots_12347 = 0x100284f
  2302. const m_XK_braille_dots_123478 = 0x10028cf
  2303. const m_XK_braille_dots_12348 = 0x100288f
  2304. const m_XK_braille_dots_1235 = 0x1002817
  2305. const m_XK_braille_dots_12356 = 0x1002837
  2306. const m_XK_braille_dots_123567 = 0x1002877
  2307. const m_XK_braille_dots_1235678 = 0x10028f7
  2308. const m_XK_braille_dots_123568 = 0x10028b7
  2309. const m_XK_braille_dots_12357 = 0x1002857
  2310. const m_XK_braille_dots_123578 = 0x10028d7
  2311. const m_XK_braille_dots_12358 = 0x1002897
  2312. const m_XK_braille_dots_1236 = 0x1002827
  2313. const m_XK_braille_dots_12367 = 0x1002867
  2314. const m_XK_braille_dots_123678 = 0x10028e7
  2315. const m_XK_braille_dots_12368 = 0x10028a7
  2316. const m_XK_braille_dots_1237 = 0x1002847
  2317. const m_XK_braille_dots_12378 = 0x10028c7
  2318. const m_XK_braille_dots_1238 = 0x1002887
  2319. const m_XK_braille_dots_124 = 0x100280b
  2320. const m_XK_braille_dots_1245 = 0x100281b
  2321. const m_XK_braille_dots_12456 = 0x100283b
  2322. const m_XK_braille_dots_124567 = 0x100287b
  2323. const m_XK_braille_dots_1245678 = 0x10028fb
  2324. const m_XK_braille_dots_124568 = 0x10028bb
  2325. const m_XK_braille_dots_12457 = 0x100285b
  2326. const m_XK_braille_dots_124578 = 0x10028db
  2327. const m_XK_braille_dots_12458 = 0x100289b
  2328. const m_XK_braille_dots_1246 = 0x100282b
  2329. const m_XK_braille_dots_12467 = 0x100286b
  2330. const m_XK_braille_dots_124678 = 0x10028eb
  2331. const m_XK_braille_dots_12468 = 0x10028ab
  2332. const m_XK_braille_dots_1247 = 0x100284b
  2333. const m_XK_braille_dots_12478 = 0x10028cb
  2334. const m_XK_braille_dots_1248 = 0x100288b
  2335. const m_XK_braille_dots_125 = 0x1002813
  2336. const m_XK_braille_dots_1256 = 0x1002833
  2337. const m_XK_braille_dots_12567 = 0x1002873
  2338. const m_XK_braille_dots_125678 = 0x10028f3
  2339. const m_XK_braille_dots_12568 = 0x10028b3
  2340. const m_XK_braille_dots_1257 = 0x1002853
  2341. const m_XK_braille_dots_12578 = 0x10028d3
  2342. const m_XK_braille_dots_1258 = 0x1002893
  2343. const m_XK_braille_dots_126 = 0x1002823
  2344. const m_XK_braille_dots_1267 = 0x1002863
  2345. const m_XK_braille_dots_12678 = 0x10028e3
  2346. const m_XK_braille_dots_1268 = 0x10028a3
  2347. const m_XK_braille_dots_127 = 0x1002843
  2348. const m_XK_braille_dots_1278 = 0x10028c3
  2349. const m_XK_braille_dots_128 = 0x1002883
  2350. const m_XK_braille_dots_13 = 0x1002805
  2351. const m_XK_braille_dots_134 = 0x100280d
  2352. const m_XK_braille_dots_1345 = 0x100281d
  2353. const m_XK_braille_dots_13456 = 0x100283d
  2354. const m_XK_braille_dots_134567 = 0x100287d
  2355. const m_XK_braille_dots_1345678 = 0x10028fd
  2356. const m_XK_braille_dots_134568 = 0x10028bd
  2357. const m_XK_braille_dots_13457 = 0x100285d
  2358. const m_XK_braille_dots_134578 = 0x10028dd
  2359. const m_XK_braille_dots_13458 = 0x100289d
  2360. const m_XK_braille_dots_1346 = 0x100282d
  2361. const m_XK_braille_dots_13467 = 0x100286d
  2362. const m_XK_braille_dots_134678 = 0x10028ed
  2363. const m_XK_braille_dots_13468 = 0x10028ad
  2364. const m_XK_braille_dots_1347 = 0x100284d
  2365. const m_XK_braille_dots_13478 = 0x10028cd
  2366. const m_XK_braille_dots_1348 = 0x100288d
  2367. const m_XK_braille_dots_135 = 0x1002815
  2368. const m_XK_braille_dots_1356 = 0x1002835
  2369. const m_XK_braille_dots_13567 = 0x1002875
  2370. const m_XK_braille_dots_135678 = 0x10028f5
  2371. const m_XK_braille_dots_13568 = 0x10028b5
  2372. const m_XK_braille_dots_1357 = 0x1002855
  2373. const m_XK_braille_dots_13578 = 0x10028d5
  2374. const m_XK_braille_dots_1358 = 0x1002895
  2375. const m_XK_braille_dots_136 = 0x1002825
  2376. const m_XK_braille_dots_1367 = 0x1002865
  2377. const m_XK_braille_dots_13678 = 0x10028e5
  2378. const m_XK_braille_dots_1368 = 0x10028a5
  2379. const m_XK_braille_dots_137 = 0x1002845
  2380. const m_XK_braille_dots_1378 = 0x10028c5
  2381. const m_XK_braille_dots_138 = 0x1002885
  2382. const m_XK_braille_dots_14 = 0x1002809
  2383. const m_XK_braille_dots_145 = 0x1002819
  2384. const m_XK_braille_dots_1456 = 0x1002839
  2385. const m_XK_braille_dots_14567 = 0x1002879
  2386. const m_XK_braille_dots_145678 = 0x10028f9
  2387. const m_XK_braille_dots_14568 = 0x10028b9
  2388. const m_XK_braille_dots_1457 = 0x1002859
  2389. const m_XK_braille_dots_14578 = 0x10028d9
  2390. const m_XK_braille_dots_1458 = 0x1002899
  2391. const m_XK_braille_dots_146 = 0x1002829
  2392. const m_XK_braille_dots_1467 = 0x1002869
  2393. const m_XK_braille_dots_14678 = 0x10028e9
  2394. const m_XK_braille_dots_1468 = 0x10028a9
  2395. const m_XK_braille_dots_147 = 0x1002849
  2396. const m_XK_braille_dots_1478 = 0x10028c9
  2397. const m_XK_braille_dots_148 = 0x1002889
  2398. const m_XK_braille_dots_15 = 0x1002811
  2399. const m_XK_braille_dots_156 = 0x1002831
  2400. const m_XK_braille_dots_1567 = 0x1002871
  2401. const m_XK_braille_dots_15678 = 0x10028f1
  2402. const m_XK_braille_dots_1568 = 0x10028b1
  2403. const m_XK_braille_dots_157 = 0x1002851
  2404. const m_XK_braille_dots_1578 = 0x10028d1
  2405. const m_XK_braille_dots_158 = 0x1002891
  2406. const m_XK_braille_dots_16 = 0x1002821
  2407. const m_XK_braille_dots_167 = 0x1002861
  2408. const m_XK_braille_dots_1678 = 0x10028e1
  2409. const m_XK_braille_dots_168 = 0x10028a1
  2410. const m_XK_braille_dots_17 = 0x1002841
  2411. const m_XK_braille_dots_178 = 0x10028c1
  2412. const m_XK_braille_dots_18 = 0x1002881
  2413. const m_XK_braille_dots_2 = 0x1002802
  2414. const m_XK_braille_dots_23 = 0x1002806
  2415. const m_XK_braille_dots_234 = 0x100280e
  2416. const m_XK_braille_dots_2345 = 0x100281e
  2417. const m_XK_braille_dots_23456 = 0x100283e
  2418. const m_XK_braille_dots_234567 = 0x100287e
  2419. const m_XK_braille_dots_2345678 = 0x10028fe
  2420. const m_XK_braille_dots_234568 = 0x10028be
  2421. const m_XK_braille_dots_23457 = 0x100285e
  2422. const m_XK_braille_dots_234578 = 0x10028de
  2423. const m_XK_braille_dots_23458 = 0x100289e
  2424. const m_XK_braille_dots_2346 = 0x100282e
  2425. const m_XK_braille_dots_23467 = 0x100286e
  2426. const m_XK_braille_dots_234678 = 0x10028ee
  2427. const m_XK_braille_dots_23468 = 0x10028ae
  2428. const m_XK_braille_dots_2347 = 0x100284e
  2429. const m_XK_braille_dots_23478 = 0x10028ce
  2430. const m_XK_braille_dots_2348 = 0x100288e
  2431. const m_XK_braille_dots_235 = 0x1002816
  2432. const m_XK_braille_dots_2356 = 0x1002836
  2433. const m_XK_braille_dots_23567 = 0x1002876
  2434. const m_XK_braille_dots_235678 = 0x10028f6
  2435. const m_XK_braille_dots_23568 = 0x10028b6
  2436. const m_XK_braille_dots_2357 = 0x1002856
  2437. const m_XK_braille_dots_23578 = 0x10028d6
  2438. const m_XK_braille_dots_2358 = 0x1002896
  2439. const m_XK_braille_dots_236 = 0x1002826
  2440. const m_XK_braille_dots_2367 = 0x1002866
  2441. const m_XK_braille_dots_23678 = 0x10028e6
  2442. const m_XK_braille_dots_2368 = 0x10028a6
  2443. const m_XK_braille_dots_237 = 0x1002846
  2444. const m_XK_braille_dots_2378 = 0x10028c6
  2445. const m_XK_braille_dots_238 = 0x1002886
  2446. const m_XK_braille_dots_24 = 0x100280a
  2447. const m_XK_braille_dots_245 = 0x100281a
  2448. const m_XK_braille_dots_2456 = 0x100283a
  2449. const m_XK_braille_dots_24567 = 0x100287a
  2450. const m_XK_braille_dots_245678 = 0x10028fa
  2451. const m_XK_braille_dots_24568 = 0x10028ba
  2452. const m_XK_braille_dots_2457 = 0x100285a
  2453. const m_XK_braille_dots_24578 = 0x10028da
  2454. const m_XK_braille_dots_2458 = 0x100289a
  2455. const m_XK_braille_dots_246 = 0x100282a
  2456. const m_XK_braille_dots_2467 = 0x100286a
  2457. const m_XK_braille_dots_24678 = 0x10028ea
  2458. const m_XK_braille_dots_2468 = 0x10028aa
  2459. const m_XK_braille_dots_247 = 0x100284a
  2460. const m_XK_braille_dots_2478 = 0x10028ca
  2461. const m_XK_braille_dots_248 = 0x100288a
  2462. const m_XK_braille_dots_25 = 0x1002812
  2463. const m_XK_braille_dots_256 = 0x1002832
  2464. const m_XK_braille_dots_2567 = 0x1002872
  2465. const m_XK_braille_dots_25678 = 0x10028f2
  2466. const m_XK_braille_dots_2568 = 0x10028b2
  2467. const m_XK_braille_dots_257 = 0x1002852
  2468. const m_XK_braille_dots_2578 = 0x10028d2
  2469. const m_XK_braille_dots_258 = 0x1002892
  2470. const m_XK_braille_dots_26 = 0x1002822
  2471. const m_XK_braille_dots_267 = 0x1002862
  2472. const m_XK_braille_dots_2678 = 0x10028e2
  2473. const m_XK_braille_dots_268 = 0x10028a2
  2474. const m_XK_braille_dots_27 = 0x1002842
  2475. const m_XK_braille_dots_278 = 0x10028c2
  2476. const m_XK_braille_dots_28 = 0x1002882
  2477. const m_XK_braille_dots_3 = 0x1002804
  2478. const m_XK_braille_dots_34 = 0x100280c
  2479. const m_XK_braille_dots_345 = 0x100281c
  2480. const m_XK_braille_dots_3456 = 0x100283c
  2481. const m_XK_braille_dots_34567 = 0x100287c
  2482. const m_XK_braille_dots_345678 = 0x10028fc
  2483. const m_XK_braille_dots_34568 = 0x10028bc
  2484. const m_XK_braille_dots_3457 = 0x100285c
  2485. const m_XK_braille_dots_34578 = 0x10028dc
  2486. const m_XK_braille_dots_3458 = 0x100289c
  2487. const m_XK_braille_dots_346 = 0x100282c
  2488. const m_XK_braille_dots_3467 = 0x100286c
  2489. const m_XK_braille_dots_34678 = 0x10028ec
  2490. const m_XK_braille_dots_3468 = 0x10028ac
  2491. const m_XK_braille_dots_347 = 0x100284c
  2492. const m_XK_braille_dots_3478 = 0x10028cc
  2493. const m_XK_braille_dots_348 = 0x100288c
  2494. const m_XK_braille_dots_35 = 0x1002814
  2495. const m_XK_braille_dots_356 = 0x1002834
  2496. const m_XK_braille_dots_3567 = 0x1002874
  2497. const m_XK_braille_dots_35678 = 0x10028f4
  2498. const m_XK_braille_dots_3568 = 0x10028b4
  2499. const m_XK_braille_dots_357 = 0x1002854
  2500. const m_XK_braille_dots_3578 = 0x10028d4
  2501. const m_XK_braille_dots_358 = 0x1002894
  2502. const m_XK_braille_dots_36 = 0x1002824
  2503. const m_XK_braille_dots_367 = 0x1002864
  2504. const m_XK_braille_dots_3678 = 0x10028e4
  2505. const m_XK_braille_dots_368 = 0x10028a4
  2506. const m_XK_braille_dots_37 = 0x1002844
  2507. const m_XK_braille_dots_378 = 0x10028c4
  2508. const m_XK_braille_dots_38 = 0x1002884
  2509. const m_XK_braille_dots_4 = 0x1002808
  2510. const m_XK_braille_dots_45 = 0x1002818
  2511. const m_XK_braille_dots_456 = 0x1002838
  2512. const m_XK_braille_dots_4567 = 0x1002878
  2513. const m_XK_braille_dots_45678 = 0x10028f8
  2514. const m_XK_braille_dots_4568 = 0x10028b8
  2515. const m_XK_braille_dots_457 = 0x1002858
  2516. const m_XK_braille_dots_4578 = 0x10028d8
  2517. const m_XK_braille_dots_458 = 0x1002898
  2518. const m_XK_braille_dots_46 = 0x1002828
  2519. const m_XK_braille_dots_467 = 0x1002868
  2520. const m_XK_braille_dots_4678 = 0x10028e8
  2521. const m_XK_braille_dots_468 = 0x10028a8
  2522. const m_XK_braille_dots_47 = 0x1002848
  2523. const m_XK_braille_dots_478 = 0x10028c8
  2524. const m_XK_braille_dots_48 = 0x1002888
  2525. const m_XK_braille_dots_5 = 0x1002810
  2526. const m_XK_braille_dots_56 = 0x1002830
  2527. const m_XK_braille_dots_567 = 0x1002870
  2528. const m_XK_braille_dots_5678 = 0x10028f0
  2529. const m_XK_braille_dots_568 = 0x10028b0
  2530. const m_XK_braille_dots_57 = 0x1002850
  2531. const m_XK_braille_dots_578 = 0x10028d0
  2532. const m_XK_braille_dots_58 = 0x1002890
  2533. const m_XK_braille_dots_6 = 0x1002820
  2534. const m_XK_braille_dots_67 = 0x1002860
  2535. const m_XK_braille_dots_678 = 0x10028e0
  2536. const m_XK_braille_dots_68 = 0x10028a0
  2537. const m_XK_braille_dots_7 = 0x1002840
  2538. const m_XK_braille_dots_78 = 0x10028c0
  2539. const m_XK_braille_dots_8 = 0x1002880
  2540. const m_XK_breve = 0x01a2
  2541. const m_XK_brokenbar = 0x00a6
  2542. const m_XK_c = 0x0063
  2543. const m_XK_c_h = 0xfea3
  2544. const m_XK_cabovedot = 0x02e5
  2545. const m_XK_cacute = 0x01e6
  2546. const m_XK_caron = 0x01b7
  2547. const m_XK_ccaron = 0x01e8
  2548. const m_XK_ccedilla = 0x00e7
  2549. const m_XK_ccircumflex = 0x02e6
  2550. const m_XK_cedilla = 0x00b8
  2551. const m_XK_cent = 0x00a2
  2552. const m_XK_ch = 0xfea0
  2553. const m_XK_colon = 0x003a
  2554. const m_XK_combining_acute = 0x1000301
  2555. const m_XK_combining_belowdot = 0x1000323
  2556. const m_XK_combining_grave = 0x1000300
  2557. const m_XK_combining_hook = 0x1000309
  2558. const m_XK_combining_tilde = 0x1000303
  2559. const m_XK_comma = 0x002c
  2560. const m_XK_containsas = 0x100220B
  2561. const m_XK_copyright = 0x00a9
  2562. const m_XK_cuberoot = 0x100221B
  2563. const m_XK_currency = 0x00a4
  2564. const m_XK_d = 0x0064
  2565. const m_XK_dabovedot = 0x1001e0b
  2566. const m_XK_dcaron = 0x01ef
  2567. const m_XK_dead_A = 0xfe81
  2568. const m_XK_dead_E = 0xfe83
  2569. const m_XK_dead_I = 0xfe85
  2570. const m_XK_dead_O = 0xfe87
  2571. const m_XK_dead_U = 0xfe89
  2572. const m_XK_dead_a = 0xfe80
  2573. const m_XK_dead_abovecomma = 0xfe64
  2574. const m_XK_dead_abovedot = 0xfe56
  2575. const m_XK_dead_abovereversedcomma = 0xfe65
  2576. const m_XK_dead_abovering = 0xfe58
  2577. const m_XK_dead_aboveverticalline = 0xfe91
  2578. const m_XK_dead_acute = 0xfe51
  2579. const m_XK_dead_belowbreve = 0xfe6b
  2580. const m_XK_dead_belowcircumflex = 0xfe69
  2581. const m_XK_dead_belowcomma = 0xfe6e
  2582. const m_XK_dead_belowdiaeresis = 0xfe6c
  2583. const m_XK_dead_belowdot = 0xfe60
  2584. const m_XK_dead_belowmacron = 0xfe68
  2585. const m_XK_dead_belowring = 0xfe67
  2586. const m_XK_dead_belowtilde = 0xfe6a
  2587. const m_XK_dead_belowverticalline = 0xfe92
  2588. const m_XK_dead_breve = 0xfe55
  2589. const m_XK_dead_capital_schwa = 0xfe8b
  2590. const m_XK_dead_caron = 0xfe5a
  2591. const m_XK_dead_cedilla = 0xfe5b
  2592. const m_XK_dead_circumflex = 0xfe52
  2593. const m_XK_dead_currency = 0xfe6f
  2594. const m_XK_dead_dasia = 0xfe65
  2595. const m_XK_dead_diaeresis = 0xfe57
  2596. const m_XK_dead_doubleacute = 0xfe59
  2597. const m_XK_dead_doublegrave = 0xfe66
  2598. const m_XK_dead_e = 0xfe82
  2599. const m_XK_dead_grave = 0xfe50
  2600. const m_XK_dead_greek = 0xfe8c
  2601. const m_XK_dead_hook = 0xfe61
  2602. const m_XK_dead_horn = 0xfe62
  2603. const m_XK_dead_i = 0xfe84
  2604. const m_XK_dead_invertedbreve = 0xfe6d
  2605. const m_XK_dead_iota = 0xfe5d
  2606. const m_XK_dead_longsolidusoverlay = 0xfe93
  2607. const m_XK_dead_lowline = 0xfe90
  2608. const m_XK_dead_macron = 0xfe54
  2609. const m_XK_dead_o = 0xfe86
  2610. const m_XK_dead_ogonek = 0xfe5c
  2611. const m_XK_dead_perispomeni = 0xfe53
  2612. const m_XK_dead_psili = 0xfe64
  2613. const m_XK_dead_semivoiced_sound = 0xfe5f
  2614. const m_XK_dead_small_schwa = 0xfe8a
  2615. const m_XK_dead_stroke = 0xfe63
  2616. const m_XK_dead_tilde = 0xfe53
  2617. const m_XK_dead_u = 0xfe88
  2618. const m_XK_dead_voiced_sound = 0xfe5e
  2619. const m_XK_degree = 0x00b0
  2620. const m_XK_diaeresis = 0x00a8
  2621. const m_XK_dintegral = 0x100222C
  2622. const m_XK_division = 0x00f7
  2623. const m_XK_dollar = 0x0024
  2624. const m_XK_doubleacute = 0x01bd
  2625. const m_XK_dstroke = 0x01f0
  2626. const m_XK_e = 0x0065
  2627. const m_XK_eabovedot = 0x03ec
  2628. const m_XK_eacute = 0x00e9
  2629. const m_XK_ebelowdot = 0x1001eb9
  2630. const m_XK_ecaron = 0x01ec
  2631. const m_XK_ecircumflex = 0x00ea
  2632. const m_XK_ecircumflexacute = 0x1001ebf
  2633. const m_XK_ecircumflexbelowdot = 0x1001ec7
  2634. const m_XK_ecircumflexgrave = 0x1001ec1
  2635. const m_XK_ecircumflexhook = 0x1001ec3
  2636. const m_XK_ecircumflextilde = 0x1001ec5
  2637. const m_XK_ediaeresis = 0x00eb
  2638. const m_XK_egrave = 0x00e8
  2639. const m_XK_ehook = 0x1001ebb
  2640. const m_XK_eightsubscript = 0x1002088
  2641. const m_XK_eightsuperior = 0x1002078
  2642. const m_XK_elementof = 0x1002208
  2643. const m_XK_emacron = 0x03ba
  2644. const m_XK_emptyset = 0x1002205
  2645. const m_XK_eng = 0x03bf
  2646. const m_XK_eogonek = 0x01ea
  2647. const m_XK_equal = 0x003d
  2648. const m_XK_eth = 0x00f0
  2649. const m_XK_etilde = 0x1001ebd
  2650. const m_XK_exclam = 0x0021
  2651. const m_XK_exclamdown = 0x00a1
  2652. const m_XK_ezh = 0x1000292
  2653. const m_XK_f = 0x0066
  2654. const m_XK_fabovedot = 0x1001e1f
  2655. const m_XK_fivesubscript = 0x1002085
  2656. const m_XK_fivesuperior = 0x1002075
  2657. const m_XK_foursubscript = 0x1002084
  2658. const m_XK_foursuperior = 0x1002074
  2659. const m_XK_fourthroot = 0x100221C
  2660. const m_XK_g = 0x0067
  2661. const m_XK_gabovedot = 0x02f5
  2662. const m_XK_gbreve = 0x02bb
  2663. const m_XK_gcaron = 0x10001e7
  2664. const m_XK_gcedilla = 0x03bb
  2665. const m_XK_gcircumflex = 0x02f8
  2666. const m_XK_grave = 0x0060
  2667. const m_XK_greater = 0x003e
  2668. const m_XK_guillemotleft = 0x00ab
  2669. const m_XK_guillemotright = 0x00bb
  2670. const m_XK_h = 0x0068
  2671. const m_XK_hcircumflex = 0x02b6
  2672. const m_XK_hebrew_aleph = 0x0ce0
  2673. const m_XK_hebrew_ayin = 0x0cf2
  2674. const m_XK_hebrew_bet = 0x0ce1
  2675. const m_XK_hebrew_beth = 0x0ce1
  2676. const m_XK_hebrew_chet = 0x0ce7
  2677. const m_XK_hebrew_dalet = 0x0ce3
  2678. const m_XK_hebrew_daleth = 0x0ce3
  2679. const m_XK_hebrew_doublelowline = 0x0cdf
  2680. const m_XK_hebrew_finalkaph = 0x0cea
  2681. const m_XK_hebrew_finalmem = 0x0ced
  2682. const m_XK_hebrew_finalnun = 0x0cef
  2683. const m_XK_hebrew_finalpe = 0x0cf3
  2684. const m_XK_hebrew_finalzade = 0x0cf5
  2685. const m_XK_hebrew_finalzadi = 0x0cf5
  2686. const m_XK_hebrew_gimel = 0x0ce2
  2687. const m_XK_hebrew_gimmel = 0x0ce2
  2688. const m_XK_hebrew_he = 0x0ce4
  2689. const m_XK_hebrew_het = 0x0ce7
  2690. const m_XK_hebrew_kaph = 0x0ceb
  2691. const m_XK_hebrew_kuf = 0x0cf7
  2692. const m_XK_hebrew_lamed = 0x0cec
  2693. const m_XK_hebrew_mem = 0x0cee
  2694. const m_XK_hebrew_nun = 0x0cf0
  2695. const m_XK_hebrew_pe = 0x0cf4
  2696. const m_XK_hebrew_qoph = 0x0cf7
  2697. const m_XK_hebrew_resh = 0x0cf8
  2698. const m_XK_hebrew_samech = 0x0cf1
  2699. const m_XK_hebrew_samekh = 0x0cf1
  2700. const m_XK_hebrew_shin = 0x0cf9
  2701. const m_XK_hebrew_taf = 0x0cfa
  2702. const m_XK_hebrew_taw = 0x0cfa
  2703. const m_XK_hebrew_tet = 0x0ce8
  2704. const m_XK_hebrew_teth = 0x0ce8
  2705. const m_XK_hebrew_waw = 0x0ce5
  2706. const m_XK_hebrew_yod = 0x0ce9
  2707. const m_XK_hebrew_zade = 0x0cf6
  2708. const m_XK_hebrew_zadi = 0x0cf6
  2709. const m_XK_hebrew_zain = 0x0ce6
  2710. const m_XK_hebrew_zayin = 0x0ce6
  2711. const m_XK_hstroke = 0x02b1
  2712. const m_XK_hyphen = 0x00ad
  2713. const m_XK_i = 0x0069
  2714. const m_XK_iacute = 0x00ed
  2715. const m_XK_ibelowdot = 0x1001ecb
  2716. const m_XK_ibreve = 0x100012d
  2717. const m_XK_icircumflex = 0x00ee
  2718. const m_XK_idiaeresis = 0x00ef
  2719. const m_XK_idotless = 0x02b9
  2720. const m_XK_igrave = 0x00ec
  2721. const m_XK_ihook = 0x1001ec9
  2722. const m_XK_imacron = 0x03ef
  2723. const m_XK_iogonek = 0x03e7
  2724. const m_XK_itilde = 0x03b5
  2725. const m_XK_j = 0x006a
  2726. const m_XK_jcircumflex = 0x02bc
  2727. const m_XK_k = 0x006b
  2728. const m_XK_kana_A = 0x04b1
  2729. const m_XK_kana_CHI = 0x04c1
  2730. const m_XK_kana_E = 0x04b4
  2731. const m_XK_kana_FU = 0x04cc
  2732. const m_XK_kana_HA = 0x04ca
  2733. const m_XK_kana_HE = 0x04cd
  2734. const m_XK_kana_HI = 0x04cb
  2735. const m_XK_kana_HO = 0x04ce
  2736. const m_XK_kana_HU = 0x04cc
  2737. const m_XK_kana_I = 0x04b2
  2738. const m_XK_kana_KA = 0x04b6
  2739. const m_XK_kana_KE = 0x04b9
  2740. const m_XK_kana_KI = 0x04b7
  2741. const m_XK_kana_KO = 0x04ba
  2742. const m_XK_kana_KU = 0x04b8
  2743. const m_XK_kana_MA = 0x04cf
  2744. const m_XK_kana_ME = 0x04d2
  2745. const m_XK_kana_MI = 0x04d0
  2746. const m_XK_kana_MO = 0x04d3
  2747. const m_XK_kana_MU = 0x04d1
  2748. const m_XK_kana_N = 0x04dd
  2749. const m_XK_kana_NA = 0x04c5
  2750. const m_XK_kana_NE = 0x04c8
  2751. const m_XK_kana_NI = 0x04c6
  2752. const m_XK_kana_NO = 0x04c9
  2753. const m_XK_kana_NU = 0x04c7
  2754. const m_XK_kana_O = 0x04b5
  2755. const m_XK_kana_RA = 0x04d7
  2756. const m_XK_kana_RE = 0x04da
  2757. const m_XK_kana_RI = 0x04d8
  2758. const m_XK_kana_RO = 0x04db
  2759. const m_XK_kana_RU = 0x04d9
  2760. const m_XK_kana_SA = 0x04bb
  2761. const m_XK_kana_SE = 0x04be
  2762. const m_XK_kana_SHI = 0x04bc
  2763. const m_XK_kana_SO = 0x04bf
  2764. const m_XK_kana_SU = 0x04bd
  2765. const m_XK_kana_TA = 0x04c0
  2766. const m_XK_kana_TE = 0x04c3
  2767. const m_XK_kana_TI = 0x04c1
  2768. const m_XK_kana_TO = 0x04c4
  2769. const m_XK_kana_TSU = 0x04c2
  2770. const m_XK_kana_TU = 0x04c2
  2771. const m_XK_kana_U = 0x04b3
  2772. const m_XK_kana_WA = 0x04dc
  2773. const m_XK_kana_WO = 0x04a6
  2774. const m_XK_kana_YA = 0x04d4
  2775. const m_XK_kana_YO = 0x04d6
  2776. const m_XK_kana_YU = 0x04d5
  2777. const m_XK_kana_a = 0x04a7
  2778. const m_XK_kana_closingbracket = 0x04a3
  2779. const m_XK_kana_comma = 0x04a4
  2780. const m_XK_kana_conjunctive = 0x04a5
  2781. const m_XK_kana_e = 0x04aa
  2782. const m_XK_kana_fullstop = 0x04a1
  2783. const m_XK_kana_i = 0x04a8
  2784. const m_XK_kana_middledot = 0x04a5
  2785. const m_XK_kana_o = 0x04ab
  2786. const m_XK_kana_openingbracket = 0x04a2
  2787. const m_XK_kana_switch = 0xff7e
  2788. const m_XK_kana_tsu = 0x04af
  2789. const m_XK_kana_tu = 0x04af
  2790. const m_XK_kana_u = 0x04a9
  2791. const m_XK_kana_ya = 0x04ac
  2792. const m_XK_kana_yo = 0x04ae
  2793. const m_XK_kana_yu = 0x04ad
  2794. const m_XK_kappa = 0x03a2
  2795. const m_XK_kcedilla = 0x03f3
  2796. const m_XK_kra = 0x03a2
  2797. const m_XK_l = 0x006c
  2798. const m_XK_lacute = 0x01e5
  2799. const m_XK_lbelowdot = 0x1001e37
  2800. const m_XK_lcaron = 0x01b5
  2801. const m_XK_lcedilla = 0x03b6
  2802. const m_XK_less = 0x003c
  2803. const m_XK_lstroke = 0x01b3
  2804. const m_XK_m = 0x006d
  2805. const m_XK_mabovedot = 0x1001e41
  2806. const m_XK_macron = 0x00af
  2807. const m_XK_masculine = 0x00ba
  2808. const m_XK_minus = 0x002d
  2809. const m_XK_mu = 0x00b5
  2810. const m_XK_multiply = 0x00d7
  2811. const m_XK_n = 0x006e
  2812. const m_XK_nacute = 0x01f1
  2813. const m_XK_ncaron = 0x01f2
  2814. const m_XK_ncedilla = 0x03f1
  2815. const m_XK_ninesubscript = 0x1002089
  2816. const m_XK_ninesuperior = 0x1002079
  2817. const m_XK_nobreakspace = 0x00a0
  2818. const m_XK_notapproxeq = 0x1002247
  2819. const m_XK_notelementof = 0x1002209
  2820. const m_XK_notidentical = 0x1002262
  2821. const m_XK_notsign = 0x00ac
  2822. const m_XK_ntilde = 0x00f1
  2823. const m_XK_numbersign = 0x0023
  2824. const m_XK_numerosign = 0x06b0
  2825. const m_XK_o = 0x006f
  2826. const m_XK_oacute = 0x00f3
  2827. const m_XK_obarred = 0x1000275
  2828. const m_XK_obelowdot = 0x1001ecd
  2829. const m_XK_ocaron = 0x10001d2
  2830. const m_XK_ocircumflex = 0x00f4
  2831. const m_XK_ocircumflexacute = 0x1001ed1
  2832. const m_XK_ocircumflexbelowdot = 0x1001ed9
  2833. const m_XK_ocircumflexgrave = 0x1001ed3
  2834. const m_XK_ocircumflexhook = 0x1001ed5
  2835. const m_XK_ocircumflextilde = 0x1001ed7
  2836. const m_XK_odiaeresis = 0x00f6
  2837. const m_XK_odoubleacute = 0x01f5
  2838. const m_XK_oe = 0x13bd
  2839. const m_XK_ogonek = 0x01b2
  2840. const m_XK_ograve = 0x00f2
  2841. const m_XK_ohook = 0x1001ecf
  2842. const m_XK_ohorn = 0x10001a1
  2843. const m_XK_ohornacute = 0x1001edb
  2844. const m_XK_ohornbelowdot = 0x1001ee3
  2845. const m_XK_ohorngrave = 0x1001edd
  2846. const m_XK_ohornhook = 0x1001edf
  2847. const m_XK_ohorntilde = 0x1001ee1
  2848. const m_XK_omacron = 0x03f2
  2849. const m_XK_onehalf = 0x00bd
  2850. const m_XK_onequarter = 0x00bc
  2851. const m_XK_onesubscript = 0x1002081
  2852. const m_XK_onesuperior = 0x00b9
  2853. const m_XK_ooblique = 0x00f8
  2854. const m_XK_ordfeminine = 0x00aa
  2855. const m_XK_oslash = 0x00f8
  2856. const m_XK_otilde = 0x00f5
  2857. const m_XK_overline = 0x047e
  2858. const m_XK_p = 0x0070
  2859. const m_XK_pabovedot = 0x1001e57
  2860. const m_XK_paragraph = 0x00b6
  2861. const m_XK_parenleft = 0x0028
  2862. const m_XK_parenright = 0x0029
  2863. const m_XK_partdifferential = 0x1002202
  2864. const m_XK_percent = 0x0025
  2865. const m_XK_period = 0x002e
  2866. const m_XK_periodcentered = 0x00b7
  2867. const m_XK_plus = 0x002b
  2868. const m_XK_plusminus = 0x00b1
  2869. const m_XK_prolongedsound = 0x04b0
  2870. const m_XK_q = 0x0071
  2871. const m_XK_question = 0x003f
  2872. const m_XK_questiondown = 0x00bf
  2873. const m_XK_quotedbl = 0x0022
  2874. const m_XK_quoteleft = 0x0060
  2875. const m_XK_quoteright = 0x0027
  2876. const m_XK_r = 0x0072
  2877. const m_XK_racute = 0x01e0
  2878. const m_XK_rcaron = 0x01f8
  2879. const m_XK_rcedilla = 0x03b3
  2880. const m_XK_registered = 0x00ae
  2881. const m_XK_s = 0x0073
  2882. const m_XK_sabovedot = 0x1001e61
  2883. const m_XK_sacute = 0x01b6
  2884. const m_XK_scaron = 0x01b9
  2885. const m_XK_scedilla = 0x01ba
  2886. const m_XK_schwa = 0x1000259
  2887. const m_XK_scircumflex = 0x02fe
  2888. const m_XK_script_switch = 0xff7e
  2889. const m_XK_section = 0x00a7
  2890. const m_XK_semicolon = 0x003b
  2891. const m_XK_semivoicedsound = 0x04df
  2892. const m_XK_sevensubscript = 0x1002087
  2893. const m_XK_sevensuperior = 0x1002077
  2894. const m_XK_sixsubscript = 0x1002086
  2895. const m_XK_sixsuperior = 0x1002076
  2896. const m_XK_slash = 0x002f
  2897. const m_XK_space = 0x0020
  2898. const m_XK_squareroot = 0x100221A
  2899. const m_XK_ssharp = 0x00df
  2900. const m_XK_sterling = 0x00a3
  2901. const m_XK_stricteq = 0x1002263
  2902. const m_XK_t = 0x0074
  2903. const m_XK_tabovedot = 0x1001e6b
  2904. const m_XK_tcaron = 0x01bb
  2905. const m_XK_tcedilla = 0x01fe
  2906. const m_XK_thorn = 0x00fe
  2907. const m_XK_threequarters = 0x00be
  2908. const m_XK_threesubscript = 0x1002083
  2909. const m_XK_threesuperior = 0x00b3
  2910. const m_XK_tintegral = 0x100222D
  2911. const m_XK_tslash = 0x03bc
  2912. const m_XK_twosubscript = 0x1002082
  2913. const m_XK_twosuperior = 0x00b2
  2914. const m_XK_u = 0x0075
  2915. const m_XK_uacute = 0x00fa
  2916. const m_XK_ubelowdot = 0x1001ee5
  2917. const m_XK_ubreve = 0x02fd
  2918. const m_XK_ucircumflex = 0x00fb
  2919. const m_XK_udiaeresis = 0x00fc
  2920. const m_XK_udoubleacute = 0x01fb
  2921. const m_XK_ugrave = 0x00f9
  2922. const m_XK_uhook = 0x1001ee7
  2923. const m_XK_uhorn = 0x10001b0
  2924. const m_XK_uhornacute = 0x1001ee9
  2925. const m_XK_uhornbelowdot = 0x1001ef1
  2926. const m_XK_uhorngrave = 0x1001eeb
  2927. const m_XK_uhornhook = 0x1001eed
  2928. const m_XK_uhorntilde = 0x1001eef
  2929. const m_XK_umacron = 0x03fe
  2930. const m_XK_underscore = 0x005f
  2931. const m_XK_uogonek = 0x03f9
  2932. const m_XK_uring = 0x01f9
  2933. const m_XK_utilde = 0x03fd
  2934. const m_XK_v = 0x0076
  2935. const m_XK_voicedsound = 0x04de
  2936. const m_XK_w = 0x0077
  2937. const m_XK_wacute = 0x1001e83
  2938. const m_XK_wcircumflex = 0x1000175
  2939. const m_XK_wdiaeresis = 0x1001e85
  2940. const m_XK_wgrave = 0x1001e81
  2941. const m_XK_x = 0x0078
  2942. const m_XK_xabovedot = 0x1001e8b
  2943. const m_XK_y = 0x0079
  2944. const m_XK_yacute = 0x00fd
  2945. const m_XK_ybelowdot = 0x1001ef5
  2946. const m_XK_ycircumflex = 0x1000177
  2947. const m_XK_ydiaeresis = 0x00ff
  2948. const m_XK_yen = 0x00a5
  2949. const m_XK_ygrave = 0x1001ef3
  2950. const m_XK_yhook = 0x1001ef7
  2951. const m_XK_ytilde = 0x1001ef9
  2952. const m_XK_z = 0x007a
  2953. const m_XK_zabovedot = 0x01bf
  2954. const m_XK_zacute = 0x01bc
  2955. const m_XK_zcaron = 0x01be
  2956. const m_XK_zerosubscript = 0x1002080
  2957. const m_XK_zerosuperior = 0x1002070
  2958. const m_XK_zstroke = 0x10001b6
  2959. const m_XLookupBoth = 4
  2960. const m_XLookupChars = 2
  2961. const m_XLookupKeySym = 3
  2962. const m_XLookupNone = 1
  2963. const m_XMD_H = 1
  2964. const m_XMUTEX_INITIALIZER = "PTHREAD_MUTEX_INITIALIZER"
  2965. const m_XNArea = "area"
  2966. const m_XNAreaNeeded = "areaNeeded"
  2967. const m_XNBackground = "background"
  2968. const m_XNBackgroundPixmap = "backgroundPixmap"
  2969. const m_XNBaseFontName = "baseFontName"
  2970. const m_XNClientWindow = "clientWindow"
  2971. const m_XNColormap = "colorMap"
  2972. const m_XNContextualDrawing = "contextualDrawing"
  2973. const m_XNCursor = "cursor"
  2974. const m_XNDefaultString = "defaultString"
  2975. const m_XNDestroyCallback = "destroyCallback"
  2976. const m_XNDirectionalDependentDrawing = "directionalDependentDrawing"
  2977. const m_XNFilterEvents = "filterEvents"
  2978. const m_XNFocusWindow = "focusWindow"
  2979. const m_XNFontInfo = "fontInfo"
  2980. const m_XNFontSet = "fontSet"
  2981. const m_XNForeground = "foreground"
  2982. const m_XNGeometryCallback = "geometryCallback"
  2983. const m_XNHotKey = "hotKey"
  2984. const m_XNHotKeyState = "hotKeyState"
  2985. const m_XNInputStyle = "inputStyle"
  2986. const m_XNLineSpace = "lineSpace"
  2987. const m_XNMissingCharSet = "missingCharSet"
  2988. const m_XNOMAutomatic = "omAutomatic"
  2989. const m_XNOrientation = "orientation"
  2990. const m_XNPreeditAttributes = "preeditAttributes"
  2991. const m_XNPreeditCaretCallback = "preeditCaretCallback"
  2992. const m_XNPreeditDoneCallback = "preeditDoneCallback"
  2993. const m_XNPreeditDrawCallback = "preeditDrawCallback"
  2994. const m_XNPreeditStartCallback = "preeditStartCallback"
  2995. const m_XNPreeditState = "preeditState"
  2996. const m_XNPreeditStateNotifyCallback = "preeditStateNotifyCallback"
  2997. const m_XNQueryICValuesList = "queryICValuesList"
  2998. const m_XNQueryIMValuesList = "queryIMValuesList"
  2999. const m_XNQueryInputStyle = "queryInputStyle"
  3000. const m_XNQueryOrientation = "queryOrientation"
  3001. const m_XNR6PreeditCallback = "r6PreeditCallback"
  3002. const m_XNRequiredCharSet = "requiredCharSet"
  3003. const m_XNResetState = "resetState"
  3004. const m_XNResourceClass = "resourceClass"
  3005. const m_XNResourceName = "resourceName"
  3006. const m_XNSeparatorofNestedList = "separatorofNestedList"
  3007. const m_XNSpotLocation = "spotLocation"
  3008. const m_XNStatusAttributes = "statusAttributes"
  3009. const m_XNStatusDoneCallback = "statusDoneCallback"
  3010. const m_XNStatusDrawCallback = "statusDrawCallback"
  3011. const m_XNStatusStartCallback = "statusStartCallback"
  3012. const m_XNStdColormap = "stdColorMap"
  3013. const m_XNStringConversion = "stringConversion"
  3014. const m_XNStringConversionCallback = "stringConversionCallback"
  3015. const m_XNVaNestedList = "XNVaNestedList"
  3016. const m_XNVisiblePosition = "visiblePosition"
  3017. const m_XNegative = 0x0010
  3018. const m_XTHREADS = 1
  3019. const m_XUSE_MTSAFE_API = 1
  3020. const m_XValue = 0x0001
  3021. const m_XYBitmap = 0
  3022. const m_XYPixmap = 1
  3023. const m_X_AllocColor = 84
  3024. const m_X_AllocColorCells = 86
  3025. const m_X_AllocColorPlanes = 87
  3026. const m_X_AllocNamedColor = 85
  3027. const m_X_AllowEvents = 35
  3028. const m_X_Bell = 104
  3029. const m_X_ChangeActivePointerGrab = 30
  3030. const m_X_ChangeGC = 56
  3031. const m_X_ChangeHosts = 109
  3032. const m_X_ChangeKeyboardControl = 102
  3033. const m_X_ChangeKeyboardMapping = 100
  3034. const m_X_ChangePointerControl = 105
  3035. const m_X_ChangeProperty = 18
  3036. const m_X_ChangeSaveSet = 6
  3037. const m_X_ChangeWindowAttributes = 2
  3038. const m_X_CirculateWindow = 13
  3039. const m_X_ClearArea = 61
  3040. const m_X_CloseFont = 46
  3041. const m_X_ConfigureWindow = 12
  3042. const m_X_ConvertSelection = 24
  3043. const m_X_CopyArea = 62
  3044. const m_X_CopyColormapAndFree = 80
  3045. const m_X_CopyGC = 57
  3046. const m_X_CopyPlane = 63
  3047. const m_X_CreateColormap = 78
  3048. const m_X_CreateCursor = 93
  3049. const m_X_CreateGC = 55
  3050. const m_X_CreateGlyphCursor = 94
  3051. const m_X_CreatePixmap = 53
  3052. const m_X_CreateWindow = 1
  3053. const m_X_DeleteProperty = 19
  3054. const m_X_DestroySubwindows = 5
  3055. const m_X_DestroyWindow = 4
  3056. const m_X_Error = 0
  3057. const m_X_FillPoly = 69
  3058. const m_X_ForceScreenSaver = 115
  3059. const m_X_FreeColormap = 79
  3060. const m_X_FreeColors = 88
  3061. const m_X_FreeCursor = 95
  3062. const m_X_FreeGC = 60
  3063. const m_X_FreePixmap = 54
  3064. const m_X_GetAtomName = 17
  3065. const m_X_GetFontPath = 52
  3066. const m_X_GetGeometry = 14
  3067. const m_X_GetImage = 73
  3068. const m_X_GetInputFocus = 43
  3069. const m_X_GetKeyboardControl = 103
  3070. const m_X_GetKeyboardMapping = 101
  3071. const m_X_GetModifierMapping = 119
  3072. const m_X_GetMotionEvents = 39
  3073. const m_X_GetPointerControl = 106
  3074. const m_X_GetPointerMapping = 117
  3075. const m_X_GetProperty = 20
  3076. const m_X_GetScreenSaver = 108
  3077. const m_X_GetSelectionOwner = 23
  3078. const m_X_GetWindowAttributes = 3
  3079. const m_X_GrabButton = 28
  3080. const m_X_GrabKey = 33
  3081. const m_X_GrabKeyboard = 31
  3082. const m_X_GrabPointer = 26
  3083. const m_X_GrabServer = 36
  3084. const m_X_HAVE_UTF8_STRING = 1
  3085. const m_X_ImageText16 = 77
  3086. const m_X_ImageText8 = 76
  3087. const m_X_InstallColormap = 81
  3088. const m_X_InternAtom = 16
  3089. const m_X_KillClient = 113
  3090. const m_X_ListExtensions = 99
  3091. const m_X_ListFonts = 49
  3092. const m_X_ListFontsWithInfo = 50
  3093. const m_X_ListHosts = 110
  3094. const m_X_ListInstalledColormaps = 83
  3095. const m_X_ListProperties = 21
  3096. const m_X_LookupColor = 92
  3097. const m_X_MapSubwindows = 9
  3098. const m_X_MapWindow = 8
  3099. const m_X_NoOperation = 127
  3100. const m_X_OpenFont = 45
  3101. const m_X_PROTOCOL = 11
  3102. const m_X_PROTOCOL_REVISION = 0
  3103. const m_X_PolyArc = 68
  3104. const m_X_PolyFillArc = 71
  3105. const m_X_PolyFillRectangle = 70
  3106. const m_X_PolyLine = 65
  3107. const m_X_PolyPoint = 64
  3108. const m_X_PolyRectangle = 67
  3109. const m_X_PolySegment = 66
  3110. const m_X_PolyText16 = 75
  3111. const m_X_PolyText8 = 74
  3112. const m_X_PutImage = 72
  3113. const m_X_QueryBestSize = 97
  3114. const m_X_QueryColors = 91
  3115. const m_X_QueryExtension = 98
  3116. const m_X_QueryFont = 47
  3117. const m_X_QueryKeymap = 44
  3118. const m_X_QueryPointer = 38
  3119. const m_X_QueryTextExtents = 48
  3120. const m_X_QueryTree = 15
  3121. const m_X_RecolorCursor = 96
  3122. const m_X_RenderAddGlyphs = 20
  3123. const m_X_RenderAddGlyphsFromPicture = 21
  3124. const m_X_RenderAddTraps = 32
  3125. const m_X_RenderChangePicture = 5
  3126. const m_X_RenderColorTrapezoids = 14
  3127. const m_X_RenderColorTriangles = 15
  3128. const m_X_RenderComposite = 8
  3129. const m_X_RenderCompositeGlyphs16 = 24
  3130. const m_X_RenderCompositeGlyphs32 = 25
  3131. const m_X_RenderCompositeGlyphs8 = 23
  3132. const m_X_RenderCreateAnimCursor = 31
  3133. const m_X_RenderCreateConicalGradient = 36
  3134. const m_X_RenderCreateCursor = 27
  3135. const m_X_RenderCreateGlyphSet = 17
  3136. const m_X_RenderCreateLinearGradient = 34
  3137. const m_X_RenderCreatePicture = 4
  3138. const m_X_RenderCreateRadialGradient = 35
  3139. const m_X_RenderCreateSolidFill = 33
  3140. const m_X_RenderFillRectangles = 26
  3141. const m_X_RenderFreeGlyphSet = 19
  3142. const m_X_RenderFreeGlyphs = 22
  3143. const m_X_RenderFreePicture = 7
  3144. const m_X_RenderQueryDithers = 3
  3145. const m_X_RenderQueryFilters = 29
  3146. const m_X_RenderQueryPictFormats = 1
  3147. const m_X_RenderQueryPictIndexValues = 2
  3148. const m_X_RenderQueryVersion = 0
  3149. const m_X_RenderReferenceGlyphSet = 18
  3150. const m_X_RenderScale = 9
  3151. const m_X_RenderSetPictureClipRectangles = 6
  3152. const m_X_RenderSetPictureFilter = 30
  3153. const m_X_RenderSetPictureTransform = 28
  3154. const m_X_RenderTrapezoids = 10
  3155. const m_X_RenderTriFan = 13
  3156. const m_X_RenderTriStrip = 12
  3157. const m_X_RenderTriangles = 11
  3158. const m_X_ReparentWindow = 7
  3159. const m_X_Reply = 1
  3160. const m_X_RotateProperties = 114
  3161. const m_X_SendEvent = 25
  3162. const m_X_SetAccessControl = 111
  3163. const m_X_SetClipRectangles = 59
  3164. const m_X_SetCloseDownMode = 112
  3165. const m_X_SetDashes = 58
  3166. const m_X_SetFontPath = 51
  3167. const m_X_SetInputFocus = 42
  3168. const m_X_SetModifierMapping = 118
  3169. const m_X_SetPointerMapping = 116
  3170. const m_X_SetScreenSaver = 107
  3171. const m_X_SetSelectionOwner = 22
  3172. const m_X_StoreColors = 89
  3173. const m_X_StoreNamedColor = 90
  3174. const m_X_TCP_PORT = 6000
  3175. const m_X_TranslateCoords = 40
  3176. const m_X_UngrabButton = 29
  3177. const m_X_UngrabKey = 34
  3178. const m_X_UngrabKeyboard = 32
  3179. const m_X_UngrabPointer = 27
  3180. const m_X_UngrabServer = 37
  3181. const m_X_UninstallColormap = 82
  3182. const m_X_UnmapSubwindows = 11
  3183. const m_X_UnmapWindow = 10
  3184. const m_X_WarpPointer = 41
  3185. const m_XftVersion = "XFT_VERSION"
  3186. const m_XlibSpecificationRelease = 6
  3187. const m_YNegative = 0x0020
  3188. const m_YSorted = 1
  3189. const m_YValue = 0x0002
  3190. const m_YXBanded = 3
  3191. const m_YXSorted = 2
  3192. const m_ZLNSPERBATCH = 1024
  3193. const m_ZPixmap = 2
  3194. const m_ZRCTSPERBATCH = 256
  3195. const m_ZoomState = 2
  3196. const m__FILE_OFFSET_BITS = 64
  3197. const m__GNU_SOURCE = 1
  3198. const m__IOFBF = 0
  3199. const m__IOLBF = 1
  3200. const m__IONBF = 2
  3201. const m__POSIX2_BC_BASE_MAX = 99
  3202. const m__POSIX2_BC_DIM_MAX = 2048
  3203. const m__POSIX2_BC_SCALE_MAX = 99
  3204. const m__POSIX2_BC_STRING_MAX = 1000
  3205. const m__POSIX2_CHARCLASS_NAME_MAX = 14
  3206. const m__POSIX2_COLL_WEIGHTS_MAX = 2
  3207. const m__POSIX2_EXPR_NEST_MAX = 32
  3208. const m__POSIX2_LINE_MAX = 2048
  3209. const m__POSIX2_RE_DUP_MAX = 255
  3210. const m__POSIX_AIO_LISTIO_MAX = 2
  3211. const m__POSIX_AIO_MAX = 1
  3212. const m__POSIX_ARG_MAX = 4096
  3213. const m__POSIX_CHILD_MAX = 25
  3214. const m__POSIX_CLOCKRES_MIN = 20000000
  3215. const m__POSIX_DELAYTIMER_MAX = 32
  3216. const m__POSIX_HOST_NAME_MAX = 255
  3217. const m__POSIX_LINK_MAX = 8
  3218. const m__POSIX_LOGIN_NAME_MAX = 9
  3219. const m__POSIX_MAX_CANON = 255
  3220. const m__POSIX_MAX_INPUT = 255
  3221. const m__POSIX_MQ_OPEN_MAX = 8
  3222. const m__POSIX_MQ_PRIO_MAX = 32
  3223. const m__POSIX_NAME_MAX = 14
  3224. const m__POSIX_NGROUPS_MAX = 8
  3225. const m__POSIX_OPEN_MAX = 20
  3226. const m__POSIX_PATH_MAX = 256
  3227. const m__POSIX_PIPE_BUF = 512
  3228. const m__POSIX_RE_DUP_MAX = 255
  3229. const m__POSIX_RTSIG_MAX = 8
  3230. const m__POSIX_SEM_NSEMS_MAX = 256
  3231. const m__POSIX_SEM_VALUE_MAX = 32767
  3232. const m__POSIX_SIGQUEUE_MAX = 32
  3233. const m__POSIX_SSIZE_MAX = 32767
  3234. const m__POSIX_SS_REPL_MAX = 4
  3235. const m__POSIX_STREAM_MAX = 8
  3236. const m__POSIX_SYMLINK_MAX = 255
  3237. const m__POSIX_SYMLOOP_MAX = 8
  3238. const m__POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4
  3239. const m__POSIX_THREAD_KEYS_MAX = 128
  3240. const m__POSIX_THREAD_THREADS_MAX = 64
  3241. const m__POSIX_TIMER_MAX = 32
  3242. const m__POSIX_TRACE_EVENT_NAME_MAX = 30
  3243. const m__POSIX_TRACE_NAME_MAX = 8
  3244. const m__POSIX_TRACE_SYS_MAX = 8
  3245. const m__POSIX_TRACE_USER_EVENT_MAX = 32
  3246. const m__POSIX_TTY_NAME_MAX = 9
  3247. const m__POSIX_TZNAME_MAX = 6
  3248. const m__REDIR_TIME64 = 1
  3249. const m__STDC_PREDEF_H = 1
  3250. const m__X11_XLIBINT_H_ = 1
  3251. const m__XBCOPYFUNC = "_Xbcopy"
  3252. const m__XOPEN_IOV_MAX = 16
  3253. const m__XOPEN_NAME_MAX = 255
  3254. const m__XOPEN_PATH_MAX = 1024
  3255. const m__X_INLINE = "inline"
  3256. const m__X_RESTRICT_KYWD = "restrict"
  3257. const m__Xconst = "const"
  3258. const m___ACCUM_EPSILON__ = "0x1P-15K"
  3259. const m___ACCUM_FBIT__ = 15
  3260. const m___ACCUM_IBIT__ = 16
  3261. const m___ACCUM_MAX__ = "0X7FFFFFFFP-15K"
  3262. const m___APCS_32__ = 1
  3263. const m___ARMEL__ = 1
  3264. const m___ARM_32BIT_STATE = 1
  3265. const m___ARM_ARCH = 6
  3266. const m___ARM_ARCH_6__ = 1
  3267. const m___ARM_ARCH_ISA_ARM = 1
  3268. const m___ARM_ARCH_ISA_THUMB = 1
  3269. const m___ARM_EABI__ = 1
  3270. const m___ARM_FEATURE_CLZ = 1
  3271. const m___ARM_FEATURE_COPROC = 15
  3272. const m___ARM_FEATURE_DSP = 1
  3273. const m___ARM_FEATURE_LDREX = 4
  3274. const m___ARM_FEATURE_QBIT = 1
  3275. const m___ARM_FEATURE_SAT = 1
  3276. const m___ARM_FEATURE_SIMD32 = 1
  3277. const m___ARM_FEATURE_UNALIGNED = 1
  3278. const m___ARM_FP = 12
  3279. const m___ARM_PCS_VFP = 1
  3280. const m___ARM_SIZEOF_MINIMAL_ENUM = 4
  3281. const m___ARM_SIZEOF_WCHAR_T = 4
  3282. const m___ATOMIC_ACQUIRE = 2
  3283. const m___ATOMIC_ACQ_REL = 4
  3284. const m___ATOMIC_CONSUME = 1
  3285. const m___ATOMIC_RELAXED = 0
  3286. const m___ATOMIC_RELEASE = 3
  3287. const m___ATOMIC_SEQ_CST = 5
  3288. const m___BIGGEST_ALIGNMENT__ = 8
  3289. const m___BIG_ENDIAN = 4321
  3290. const m___BYTE_ORDER = 1234
  3291. const m___BYTE_ORDER__ = "__ORDER_LITTLE_ENDIAN__"
  3292. const m___CCGO__ = 1
  3293. const m___CHAR_BIT__ = 8
  3294. const m___CHAR_UNSIGNED__ = 1
  3295. const m___DA_FBIT__ = 31
  3296. const m___DA_IBIT__ = 32
  3297. const m___DBL_DECIMAL_DIG__ = 17
  3298. const m___DBL_DIG__ = 15
  3299. const m___DBL_HAS_DENORM__ = 1
  3300. const m___DBL_HAS_INFINITY__ = 1
  3301. const m___DBL_HAS_QUIET_NAN__ = 1
  3302. const m___DBL_IS_IEC_60559__ = 2
  3303. const m___DBL_MANT_DIG__ = 53
  3304. const m___DBL_MAX_10_EXP__ = 308
  3305. const m___DBL_MAX_EXP__ = 1024
  3306. const m___DECIMAL_DIG__ = 17
  3307. const m___DEC_EVAL_METHOD__ = 2
  3308. const m___DQ_FBIT__ = 63
  3309. const m___DQ_IBIT__ = 0
  3310. const m___ELF__ = 1
  3311. const m___FINITE_MATH_ONLY__ = 0
  3312. const m___FLOAT_WORD_ORDER__ = "__ORDER_LITTLE_ENDIAN__"
  3313. const m___FLT32X_DECIMAL_DIG__ = 17
  3314. const m___FLT32X_DENORM_MIN__ = 4.9406564584124654e-324
  3315. const m___FLT32X_DIG__ = 15
  3316. const m___FLT32X_EPSILON__ = 2.2204460492503131e-16
  3317. const m___FLT32X_HAS_DENORM__ = 1
  3318. const m___FLT32X_HAS_INFINITY__ = 1
  3319. const m___FLT32X_HAS_QUIET_NAN__ = 1
  3320. const m___FLT32X_IS_IEC_60559__ = 2
  3321. const m___FLT32X_MANT_DIG__ = 53
  3322. const m___FLT32X_MAX_10_EXP__ = 308
  3323. const m___FLT32X_MAX_EXP__ = 1024
  3324. const m___FLT32X_MAX__ = 1.7976931348623157e+308
  3325. const m___FLT32X_MIN__ = 2.2250738585072014e-308
  3326. const m___FLT32X_NORM_MAX__ = 1.7976931348623157e+308
  3327. const m___FLT32_DECIMAL_DIG__ = 9
  3328. const m___FLT32_DENORM_MIN__ = 1.4012984643248171e-45
  3329. const m___FLT32_DIG__ = 6
  3330. const m___FLT32_EPSILON__ = 1.1920928955078125e-7
  3331. const m___FLT32_HAS_DENORM__ = 1
  3332. const m___FLT32_HAS_INFINITY__ = 1
  3333. const m___FLT32_HAS_QUIET_NAN__ = 1
  3334. const m___FLT32_IS_IEC_60559__ = 2
  3335. const m___FLT32_MANT_DIG__ = 24
  3336. const m___FLT32_MAX_10_EXP__ = 38
  3337. const m___FLT32_MAX_EXP__ = 128
  3338. const m___FLT32_MAX__ = 3.4028234663852886e+38
  3339. const m___FLT32_MIN__ = 1.1754943508222875e-38
  3340. const m___FLT32_NORM_MAX__ = 3.4028234663852886e+38
  3341. const m___FLT64_DECIMAL_DIG__ = 17
  3342. const m___FLT64_DENORM_MIN__ = 4.9406564584124654e-324
  3343. const m___FLT64_DIG__ = 15
  3344. const m___FLT64_EPSILON__ = 2.2204460492503131e-16
  3345. const m___FLT64_HAS_DENORM__ = 1
  3346. const m___FLT64_HAS_INFINITY__ = 1
  3347. const m___FLT64_HAS_QUIET_NAN__ = 1
  3348. const m___FLT64_IS_IEC_60559__ = 2
  3349. const m___FLT64_MANT_DIG__ = 53
  3350. const m___FLT64_MAX_10_EXP__ = 308
  3351. const m___FLT64_MAX_EXP__ = 1024
  3352. const m___FLT64_MAX__ = 1.7976931348623157e+308
  3353. const m___FLT64_MIN__ = 2.2250738585072014e-308
  3354. const m___FLT64_NORM_MAX__ = 1.7976931348623157e+308
  3355. const m___FLT_DECIMAL_DIG__ = 9
  3356. const m___FLT_DENORM_MIN__ = 1.4012984643248171e-45
  3357. const m___FLT_DIG__ = 6
  3358. const m___FLT_EPSILON__ = 1.1920928955078125e-7
  3359. const m___FLT_EVAL_METHOD_TS_18661_3__ = 0
  3360. const m___FLT_EVAL_METHOD__ = 0
  3361. const m___FLT_HAS_DENORM__ = 1
  3362. const m___FLT_HAS_INFINITY__ = 1
  3363. const m___FLT_HAS_QUIET_NAN__ = 1
  3364. const m___FLT_IS_IEC_60559__ = 2
  3365. const m___FLT_MANT_DIG__ = 24
  3366. const m___FLT_MAX_10_EXP__ = 38
  3367. const m___FLT_MAX_EXP__ = 128
  3368. const m___FLT_MAX__ = 3.4028234663852886e+38
  3369. const m___FLT_MIN__ = 1.1754943508222875e-38
  3370. const m___FLT_NORM_MAX__ = 3.4028234663852886e+38
  3371. const m___FLT_RADIX__ = 2
  3372. const m___FRACT_EPSILON__ = "0x1P-15R"
  3373. const m___FRACT_FBIT__ = 15
  3374. const m___FRACT_IBIT__ = 0
  3375. const m___FRACT_MAX__ = "0X7FFFP-15R"
  3376. const m___FUNCTION__ = "__func__"
  3377. const m___GCC_ASM_FLAG_OUTPUTS__ = 1
  3378. const m___GCC_ATOMIC_BOOL_LOCK_FREE = 1
  3379. const m___GCC_ATOMIC_CHAR16_T_LOCK_FREE = 1
  3380. const m___GCC_ATOMIC_CHAR32_T_LOCK_FREE = 2
  3381. const m___GCC_ATOMIC_CHAR_LOCK_FREE = 1
  3382. const m___GCC_ATOMIC_INT_LOCK_FREE = 2
  3383. const m___GCC_ATOMIC_LLONG_LOCK_FREE = 1
  3384. const m___GCC_ATOMIC_LONG_LOCK_FREE = 2
  3385. const m___GCC_ATOMIC_POINTER_LOCK_FREE = 2
  3386. const m___GCC_ATOMIC_SHORT_LOCK_FREE = 1
  3387. const m___GCC_ATOMIC_TEST_AND_SET_TRUEVAL = 1
  3388. const m___GCC_ATOMIC_WCHAR_T_LOCK_FREE = 2
  3389. const m___GCC_CONSTRUCTIVE_SIZE = 64
  3390. const m___GCC_DESTRUCTIVE_SIZE = 64
  3391. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 = 1
  3392. const m___GCC_IEC_559 = 2
  3393. const m___GCC_IEC_559_COMPLEX = 2
  3394. const m___GNUC_EXECUTION_CHARSET_NAME = "UTF-8"
  3395. const m___GNUC_MINOR__ = 2
  3396. const m___GNUC_PATCHLEVEL__ = 0
  3397. const m___GNUC_STDC_INLINE__ = 1
  3398. const m___GNUC_WIDE_EXECUTION_CHARSET_NAME = "UTF-32LE"
  3399. const m___GNUC__ = 12
  3400. const m___GXX_ABI_VERSION = 1017
  3401. const m___GXX_TYPEINFO_EQUALITY_INLINE = 0
  3402. const m___HAVE_SPECULATION_SAFE_VALUE = 1
  3403. const m___HA_FBIT__ = 7
  3404. const m___HA_IBIT__ = 8
  3405. const m___HQ_FBIT__ = 15
  3406. const m___HQ_IBIT__ = 0
  3407. const m___INT16_MAX__ = 0x7fff
  3408. const m___INT32_MAX__ = 0x7fffffff
  3409. const m___INT32_TYPE__ = "int"
  3410. const m___INT64_MAX__ = 0x7fffffffffffffff
  3411. const m___INT8_MAX__ = 0x7f
  3412. const m___INTMAX_MAX__ = 0x7fffffffffffffff
  3413. const m___INTMAX_WIDTH__ = 64
  3414. const m___INTPTR_MAX__ = 0x7fffffff
  3415. const m___INTPTR_TYPE__ = "int"
  3416. const m___INTPTR_WIDTH__ = 32
  3417. const m___INT_FAST16_MAX__ = 0x7fffffff
  3418. const m___INT_FAST16_TYPE__ = "int"
  3419. const m___INT_FAST16_WIDTH__ = 32
  3420. const m___INT_FAST32_MAX__ = 0x7fffffff
  3421. const m___INT_FAST32_TYPE__ = "int"
  3422. const m___INT_FAST32_WIDTH__ = 32
  3423. const m___INT_FAST64_MAX__ = 0x7fffffffffffffff
  3424. const m___INT_FAST64_WIDTH__ = 64
  3425. const m___INT_FAST8_MAX__ = 0x7f
  3426. const m___INT_FAST8_WIDTH__ = 8
  3427. const m___INT_LEAST16_MAX__ = 0x7fff
  3428. const m___INT_LEAST16_WIDTH__ = 16
  3429. const m___INT_LEAST32_MAX__ = 0x7fffffff
  3430. const m___INT_LEAST32_TYPE__ = "int"
  3431. const m___INT_LEAST32_WIDTH__ = 32
  3432. const m___INT_LEAST64_MAX__ = 0x7fffffffffffffff
  3433. const m___INT_LEAST64_WIDTH__ = 64
  3434. const m___INT_LEAST8_MAX__ = 0x7f
  3435. const m___INT_LEAST8_WIDTH__ = 8
  3436. const m___INT_MAX__ = 0x7fffffff
  3437. const m___INT_WIDTH__ = 32
  3438. const m___LACCUM_EPSILON__ = "0x1P-31LK"
  3439. const m___LACCUM_FBIT__ = 31
  3440. const m___LACCUM_IBIT__ = 32
  3441. const m___LACCUM_MAX__ = "0X7FFFFFFFFFFFFFFFP-31LK"
  3442. const m___LDBL_DECIMAL_DIG__ = 17
  3443. const m___LDBL_DENORM_MIN__ = 4.9406564584124654e-324
  3444. const m___LDBL_DIG__ = 15
  3445. const m___LDBL_EPSILON__ = 2.2204460492503131e-16
  3446. const m___LDBL_HAS_DENORM__ = 1
  3447. const m___LDBL_HAS_INFINITY__ = 1
  3448. const m___LDBL_HAS_QUIET_NAN__ = 1
  3449. const m___LDBL_IS_IEC_60559__ = 2
  3450. const m___LDBL_MANT_DIG__ = 53
  3451. const m___LDBL_MAX_10_EXP__ = 308
  3452. const m___LDBL_MAX_EXP__ = 1024
  3453. const m___LDBL_MAX__ = 1.7976931348623157e+308
  3454. const m___LDBL_MIN__ = 2.2250738585072014e-308
  3455. const m___LDBL_NORM_MAX__ = 1.7976931348623157e+308
  3456. const m___LFRACT_EPSILON__ = "0x1P-31LR"
  3457. const m___LFRACT_FBIT__ = 31
  3458. const m___LFRACT_IBIT__ = 0
  3459. const m___LFRACT_MAX__ = "0X7FFFFFFFP-31LR"
  3460. const m___LITTLE_ENDIAN = 1234
  3461. const m___LLACCUM_EPSILON__ = "0x1P-31LLK"
  3462. const m___LLACCUM_FBIT__ = 31
  3463. const m___LLACCUM_IBIT__ = 32
  3464. const m___LLACCUM_MAX__ = "0X7FFFFFFFFFFFFFFFP-31LLK"
  3465. const m___LLFRACT_EPSILON__ = "0x1P-63LLR"
  3466. const m___LLFRACT_FBIT__ = 63
  3467. const m___LLFRACT_IBIT__ = 0
  3468. const m___LLFRACT_MAX__ = "0X7FFFFFFFFFFFFFFFP-63LLR"
  3469. const m___LONG_LONG_MAX__ = 0x7fffffffffffffff
  3470. const m___LONG_LONG_WIDTH__ = 64
  3471. const m___LONG_MAX = 0x7fffffff
  3472. const m___LONG_MAX__ = 0x7fffffff
  3473. const m___LONG_WIDTH__ = 32
  3474. const m___NO_INLINE__ = 1
  3475. const m___ORDER_BIG_ENDIAN__ = 4321
  3476. const m___ORDER_LITTLE_ENDIAN__ = 1234
  3477. const m___ORDER_PDP_ENDIAN__ = 3412
  3478. const m___PDP_ENDIAN = 3412
  3479. const m___PRAGMA_REDEFINE_EXTNAME = 1
  3480. const m___PRETTY_FUNCTION__ = "__func__"
  3481. const m___PTRDIFF_MAX__ = 0x7fffffff
  3482. const m___PTRDIFF_TYPE__ = "int"
  3483. const m___PTRDIFF_WIDTH__ = 32
  3484. const m___QQ_FBIT__ = 7
  3485. const m___QQ_IBIT__ = 0
  3486. const m___SACCUM_EPSILON__ = "0x1P-7HK"
  3487. const m___SACCUM_FBIT__ = 7
  3488. const m___SACCUM_IBIT__ = 8
  3489. const m___SACCUM_MAX__ = "0X7FFFP-7HK"
  3490. const m___SA_FBIT__ = 15
  3491. const m___SA_IBIT__ = 16
  3492. const m___SCHAR_MAX__ = 0x7f
  3493. const m___SCHAR_WIDTH__ = 8
  3494. const m___SFRACT_EPSILON__ = "0x1P-7HR"
  3495. const m___SFRACT_FBIT__ = 7
  3496. const m___SFRACT_IBIT__ = 0
  3497. const m___SFRACT_MAX__ = "0X7FP-7HR"
  3498. const m___SHRT_MAX__ = 0x7fff
  3499. const m___SHRT_WIDTH__ = 16
  3500. const m___SIG_ATOMIC_MAX__ = 0x7fffffff
  3501. const m___SIG_ATOMIC_TYPE__ = "int"
  3502. const m___SIG_ATOMIC_WIDTH__ = 32
  3503. const m___SIZEOF_DOUBLE__ = 8
  3504. const m___SIZEOF_FLOAT__ = 4
  3505. const m___SIZEOF_INT__ = 4
  3506. const m___SIZEOF_LONG_DOUBLE__ = 8
  3507. const m___SIZEOF_LONG_LONG__ = 8
  3508. const m___SIZEOF_LONG__ = 4
  3509. const m___SIZEOF_POINTER__ = 4
  3510. const m___SIZEOF_PTRDIFF_T__ = 4
  3511. const m___SIZEOF_SHORT__ = 2
  3512. const m___SIZEOF_SIZE_T__ = 4
  3513. const m___SIZEOF_WCHAR_T__ = 4
  3514. const m___SIZEOF_WINT_T__ = 4
  3515. const m___SIZE_MAX__ = 0xffffffff
  3516. const m___SIZE_WIDTH__ = 32
  3517. const m___SQ_FBIT__ = 31
  3518. const m___SQ_IBIT__ = 0
  3519. const m___STDC_HOSTED__ = 1
  3520. const m___STDC_IEC_559_COMPLEX__ = 1
  3521. const m___STDC_IEC_559__ = 1
  3522. const m___STDC_IEC_60559_BFP__ = 201404
  3523. const m___STDC_IEC_60559_COMPLEX__ = 201404
  3524. const m___STDC_ISO_10646__ = 201706
  3525. const m___STDC_UTF_16__ = 1
  3526. const m___STDC_UTF_32__ = 1
  3527. const m___STDC_VERSION__ = 201710
  3528. const m___STDC__ = 1
  3529. const m___TA_FBIT__ = 63
  3530. const m___TA_IBIT__ = 64
  3531. const m___THUMB_INTERWORK__ = 1
  3532. const m___TQ_FBIT__ = 127
  3533. const m___TQ_IBIT__ = 0
  3534. const m___UACCUM_EPSILON__ = "0x1P-16UK"
  3535. const m___UACCUM_FBIT__ = 16
  3536. const m___UACCUM_IBIT__ = 16
  3537. const m___UACCUM_MAX__ = "0XFFFFFFFFP-16UK"
  3538. const m___UACCUM_MIN__ = "0.0UK"
  3539. const m___UDA_FBIT__ = 32
  3540. const m___UDA_IBIT__ = 32
  3541. const m___UDQ_FBIT__ = 64
  3542. const m___UDQ_IBIT__ = 0
  3543. const m___UFRACT_EPSILON__ = "0x1P-16UR"
  3544. const m___UFRACT_FBIT__ = 16
  3545. const m___UFRACT_IBIT__ = 0
  3546. const m___UFRACT_MAX__ = "0XFFFFP-16UR"
  3547. const m___UFRACT_MIN__ = "0.0UR"
  3548. const m___UHA_FBIT__ = 8
  3549. const m___UHA_IBIT__ = 8
  3550. const m___UHQ_FBIT__ = 16
  3551. const m___UHQ_IBIT__ = 0
  3552. const m___UINT16_MAX__ = 0xffff
  3553. const m___UINT32_MAX__ = 0xffffffff
  3554. const m___UINT64_MAX__ = "0xffffffffffffffffU"
  3555. const m___UINT8_MAX__ = 0xff
  3556. const m___UINTMAX_MAX__ = "0xffffffffffffffffU"
  3557. const m___UINTPTR_MAX__ = 0xffffffff
  3558. const m___UINT_FAST16_MAX__ = 0xffffffff
  3559. const m___UINT_FAST32_MAX__ = 0xffffffff
  3560. const m___UINT_FAST64_MAX__ = "0xffffffffffffffffU"
  3561. const m___UINT_FAST8_MAX__ = 0xff
  3562. const m___UINT_LEAST16_MAX__ = 0xffff
  3563. const m___UINT_LEAST32_MAX__ = 0xffffffff
  3564. const m___UINT_LEAST64_MAX__ = "0xffffffffffffffffU"
  3565. const m___UINT_LEAST8_MAX__ = 0xff
  3566. const m___ULACCUM_EPSILON__ = "0x1P-32ULK"
  3567. const m___ULACCUM_FBIT__ = 32
  3568. const m___ULACCUM_IBIT__ = 32
  3569. const m___ULACCUM_MAX__ = "0XFFFFFFFFFFFFFFFFP-32ULK"
  3570. const m___ULACCUM_MIN__ = "0.0ULK"
  3571. const m___ULFRACT_EPSILON__ = "0x1P-32ULR"
  3572. const m___ULFRACT_FBIT__ = 32
  3573. const m___ULFRACT_IBIT__ = 0
  3574. const m___ULFRACT_MAX__ = "0XFFFFFFFFP-32ULR"
  3575. const m___ULFRACT_MIN__ = "0.0ULR"
  3576. const m___ULLACCUM_EPSILON__ = "0x1P-32ULLK"
  3577. const m___ULLACCUM_FBIT__ = 32
  3578. const m___ULLACCUM_IBIT__ = 32
  3579. const m___ULLACCUM_MAX__ = "0XFFFFFFFFFFFFFFFFP-32ULLK"
  3580. const m___ULLACCUM_MIN__ = "0.0ULLK"
  3581. const m___ULLFRACT_EPSILON__ = "0x1P-64ULLR"
  3582. const m___ULLFRACT_FBIT__ = 64
  3583. const m___ULLFRACT_IBIT__ = 0
  3584. const m___ULLFRACT_MAX__ = "0XFFFFFFFFFFFFFFFFP-64ULLR"
  3585. const m___ULLFRACT_MIN__ = "0.0ULLR"
  3586. const m___UQQ_FBIT__ = 8
  3587. const m___UQQ_IBIT__ = 0
  3588. const m___USACCUM_EPSILON__ = "0x1P-8UHK"
  3589. const m___USACCUM_FBIT__ = 8
  3590. const m___USACCUM_IBIT__ = 8
  3591. const m___USACCUM_MAX__ = "0XFFFFP-8UHK"
  3592. const m___USACCUM_MIN__ = "0.0UHK"
  3593. const m___USA_FBIT__ = 16
  3594. const m___USA_IBIT__ = 16
  3595. const m___USE_TIME_BITS64 = 1
  3596. const m___USFRACT_EPSILON__ = "0x1P-8UHR"
  3597. const m___USFRACT_FBIT__ = 8
  3598. const m___USFRACT_IBIT__ = 0
  3599. const m___USFRACT_MAX__ = "0XFFP-8UHR"
  3600. const m___USFRACT_MIN__ = "0.0UHR"
  3601. const m___USQ_FBIT__ = 32
  3602. const m___USQ_IBIT__ = 0
  3603. const m___UTA_FBIT__ = 64
  3604. const m___UTA_IBIT__ = 64
  3605. const m___UTQ_FBIT__ = 128
  3606. const m___UTQ_IBIT__ = 0
  3607. const m___VERSION__ = "12.2.0"
  3608. const m___VFP_FP__ = 1
  3609. const m___WCHAR_MAX__ = 0xffffffff
  3610. const m___WCHAR_MIN__ = 0
  3611. const m___WCHAR_WIDTH__ = 32
  3612. const m___WINT_MAX__ = 0xffffffff
  3613. const m___WINT_MIN__ = 0
  3614. const m___WINT_WIDTH__ = 32
  3615. const m___arm__ = 1
  3616. const m___gnu_linux__ = 1
  3617. const m___inline = "inline"
  3618. const m___linux = 1
  3619. const m___linux__ = 1
  3620. const m___restrict = "restrict"
  3621. const m___restrict_arr = "restrict"
  3622. const m___tm_gmtoff = "tm_gmtoff"
  3623. const m___tm_zone = "tm_zone"
  3624. const m___unix = 1
  3625. const m___unix__ = 1
  3626. const m_alloca = "__builtin_alloca"
  3627. const m_ft_encoding_adobe_custom = "FT_ENCODING_ADOBE_CUSTOM"
  3628. const m_ft_encoding_adobe_expert = "FT_ENCODING_ADOBE_EXPERT"
  3629. const m_ft_encoding_adobe_standard = "FT_ENCODING_ADOBE_STANDARD"
  3630. const m_ft_encoding_apple_roman = "FT_ENCODING_APPLE_ROMAN"
  3631. const m_ft_encoding_big5 = "FT_ENCODING_BIG5"
  3632. const m_ft_encoding_gb2312 = "FT_ENCODING_PRC"
  3633. const m_ft_encoding_johab = "FT_ENCODING_JOHAB"
  3634. const m_ft_encoding_latin_1 = "FT_ENCODING_ADOBE_LATIN_1"
  3635. const m_ft_encoding_latin_2 = "FT_ENCODING_OLD_LATIN_2"
  3636. const m_ft_encoding_none = "FT_ENCODING_NONE"
  3637. const m_ft_encoding_sjis = "FT_ENCODING_SJIS"
  3638. const m_ft_encoding_symbol = "FT_ENCODING_MS_SYMBOL"
  3639. const m_ft_encoding_unicode = "FT_ENCODING_UNICODE"
  3640. const m_ft_encoding_wansung = "FT_ENCODING_WANSUNG"
  3641. const m_ft_fclose = "fclose"
  3642. const m_ft_fopen = "fopen"
  3643. const m_ft_fread = "fread"
  3644. const m_ft_fseek = "fseek"
  3645. const m_ft_ftell = "ftell"
  3646. const m_ft_getenv = "getenv"
  3647. const m_ft_glyph_format_bitmap = "FT_GLYPH_FORMAT_BITMAP"
  3648. const m_ft_glyph_format_composite = "FT_GLYPH_FORMAT_COMPOSITE"
  3649. const m_ft_glyph_format_none = "FT_GLYPH_FORMAT_NONE"
  3650. const m_ft_glyph_format_outline = "FT_GLYPH_FORMAT_OUTLINE"
  3651. const m_ft_glyph_format_plotter = "FT_GLYPH_FORMAT_PLOTTER"
  3652. const m_ft_jmp_buf = "jmp_buf"
  3653. const m_ft_kerning_default = "FT_KERNING_DEFAULT"
  3654. const m_ft_kerning_unfitted = "FT_KERNING_UNFITTED"
  3655. const m_ft_kerning_unscaled = "FT_KERNING_UNSCALED"
  3656. const m_ft_longjmp = "longjmp"
  3657. const m_ft_memchr = "memchr"
  3658. const m_ft_memcmp = "memcmp"
  3659. const m_ft_memcpy = "memcpy"
  3660. const m_ft_memmove = "memmove"
  3661. const m_ft_memset = "memset"
  3662. const m_ft_open_driver = "FT_OPEN_DRIVER"
  3663. const m_ft_open_memory = "FT_OPEN_MEMORY"
  3664. const m_ft_open_params = "FT_OPEN_PARAMS"
  3665. const m_ft_open_pathname = "FT_OPEN_PATHNAME"
  3666. const m_ft_open_stream = "FT_OPEN_STREAM"
  3667. const m_ft_outline_even_odd_fill = "FT_OUTLINE_EVEN_ODD_FILL"
  3668. const m_ft_outline_high_precision = "FT_OUTLINE_HIGH_PRECISION"
  3669. const m_ft_outline_ignore_dropouts = "FT_OUTLINE_IGNORE_DROPOUTS"
  3670. const m_ft_outline_none = "FT_OUTLINE_NONE"
  3671. const m_ft_outline_owner = "FT_OUTLINE_OWNER"
  3672. const m_ft_outline_reverse_fill = "FT_OUTLINE_REVERSE_FILL"
  3673. const m_ft_outline_single_pass = "FT_OUTLINE_SINGLE_PASS"
  3674. const m_ft_pixel_mode_grays = "FT_PIXEL_MODE_GRAY"
  3675. const m_ft_pixel_mode_mono = "FT_PIXEL_MODE_MONO"
  3676. const m_ft_pixel_mode_none = "FT_PIXEL_MODE_NONE"
  3677. const m_ft_pixel_mode_pal2 = "FT_PIXEL_MODE_GRAY2"
  3678. const m_ft_pixel_mode_pal4 = "FT_PIXEL_MODE_GRAY4"
  3679. const m_ft_ptrdiff_t = "ptrdiff_t"
  3680. const m_ft_qsort = "qsort"
  3681. const m_ft_raster_flag_aa = "FT_RASTER_FLAG_AA"
  3682. const m_ft_raster_flag_clip = "FT_RASTER_FLAG_CLIP"
  3683. const m_ft_raster_flag_default = "FT_RASTER_FLAG_DEFAULT"
  3684. const m_ft_raster_flag_direct = "FT_RASTER_FLAG_DIRECT"
  3685. const m_ft_render_mode_mono = "FT_RENDER_MODE_MONO"
  3686. const m_ft_render_mode_normal = "FT_RENDER_MODE_NORMAL"
  3687. const m_ft_scalloc = "calloc"
  3688. const m_ft_sfree = "free"
  3689. const m_ft_smalloc = "malloc"
  3690. const m_ft_sprintf = "sprintf"
  3691. const m_ft_srealloc = "realloc"
  3692. const m_ft_strcat = "strcat"
  3693. const m_ft_strcmp = "strcmp"
  3694. const m_ft_strcpy = "strcpy"
  3695. const m_ft_strlen = "strlen"
  3696. const m_ft_strncmp = "strncmp"
  3697. const m_ft_strncpy = "strncpy"
  3698. const m_ft_strrchr = "strrchr"
  3699. const m_ft_strstr = "strstr"
  3700. const m_ft_strtol = "strtol"
  3701. const m_linux = 1
  3702. const m_static_assert = "_Static_assert"
  3703. const m_sz_xAllocColorCellsReply = 32
  3704. const m_sz_xAllocColorCellsReq = 12
  3705. const m_sz_xAllocColorPlanesReply = 32
  3706. const m_sz_xAllocColorPlanesReq = 16
  3707. const m_sz_xAllocColorReply = 32
  3708. const m_sz_xAllocColorReq = 16
  3709. const m_sz_xAllocNamedColorReply = 32
  3710. const m_sz_xAllocNamedColorReq = 12
  3711. const m_sz_xAllowEventsReq = 8
  3712. const m_sz_xArc = 12
  3713. const m_sz_xBellReq = 4
  3714. const m_sz_xChangeActivePointerGrabReq = 16
  3715. const m_sz_xChangeGCReq = 12
  3716. const m_sz_xChangeHostsReq = 8
  3717. const m_sz_xChangeKeyboardControlReq = 8
  3718. const m_sz_xChangeKeyboardMappingReq = 8
  3719. const m_sz_xChangeModeReq = 4
  3720. const m_sz_xChangePointerControlReq = 12
  3721. const m_sz_xChangePropertyReq = 24
  3722. const m_sz_xChangeSaveSetReq = 8
  3723. const m_sz_xChangeWindowAttributesReq = 12
  3724. const m_sz_xCharInfo = 12
  3725. const m_sz_xCirculateWindowReq = 8
  3726. const m_sz_xClearAreaReq = 16
  3727. const m_sz_xColorItem = 12
  3728. const m_sz_xConfigureWindowReq = 12
  3729. const m_sz_xConnClientPrefix = 12
  3730. const m_sz_xConnSetup = 32
  3731. const m_sz_xConnSetupPrefix = 8
  3732. const m_sz_xConvertSelectionReq = 24
  3733. const m_sz_xCopyAreaReq = 28
  3734. const m_sz_xCopyColormapAndFreeReq = 12
  3735. const m_sz_xCopyGCReq = 16
  3736. const m_sz_xCopyPlaneReq = 32
  3737. const m_sz_xCreateColormapReq = 16
  3738. const m_sz_xCreateCursorReq = 32
  3739. const m_sz_xCreateGCReq = 16
  3740. const m_sz_xCreateGlyphCursorReq = 32
  3741. const m_sz_xCreatePixmapReq = 16
  3742. const m_sz_xCreateWindowReq = 32
  3743. const m_sz_xDeletePropertyReq = 12
  3744. const m_sz_xDepth = 8
  3745. const m_sz_xError = 32
  3746. const m_sz_xEvent = 32
  3747. const m_sz_xFillPolyReq = 16
  3748. const m_sz_xFontProp = 8
  3749. const m_sz_xForceScreenSaverReq = 4
  3750. const m_sz_xFreeColorsReq = 12
  3751. const m_sz_xGenericReply = 32
  3752. const m_sz_xGetAtomNameReply = 32
  3753. const m_sz_xGetFontPathReply = 32
  3754. const m_sz_xGetGeometryReply = 32
  3755. const m_sz_xGetImageReply = 32
  3756. const m_sz_xGetImageReq = 20
  3757. const m_sz_xGetInputFocusReply = 32
  3758. const m_sz_xGetKeyboardControlReply = 52
  3759. const m_sz_xGetKeyboardMappingReply = 32
  3760. const m_sz_xGetKeyboardMappingReq = 8
  3761. const m_sz_xGetModifierMappingReply = 32
  3762. const m_sz_xGetMotionEventsReply = 32
  3763. const m_sz_xGetMotionEventsReq = 16
  3764. const m_sz_xGetPointerControlReply = 32
  3765. const m_sz_xGetPointerMappingReply = 32
  3766. const m_sz_xGetPropertyReply = 32
  3767. const m_sz_xGetPropertyReq = 24
  3768. const m_sz_xGetScreenSaverReply = 32
  3769. const m_sz_xGetSelectionOwnerReply = 32
  3770. const m_sz_xGetWindowAttributesReply = 44
  3771. const m_sz_xGrabButtonReq = 24
  3772. const m_sz_xGrabKeyReq = 16
  3773. const m_sz_xGrabKeyboardReply = 32
  3774. const m_sz_xGrabKeyboardReq = 16
  3775. const m_sz_xGrabPointerReply = 32
  3776. const m_sz_xGrabPointerReq = 24
  3777. const m_sz_xHostEntry = 4
  3778. const m_sz_xImageText16Req = 16
  3779. const m_sz_xImageText8Req = 16
  3780. const m_sz_xImageTextReq = 16
  3781. const m_sz_xInternAtomReply = 32
  3782. const m_sz_xInternAtomReq = 8
  3783. const m_sz_xKeymapEvent = 32
  3784. const m_sz_xListExtensionsReply = 32
  3785. const m_sz_xListFontsReply = 32
  3786. const m_sz_xListFontsReq = 8
  3787. const m_sz_xListFontsWithInfoReply = 60
  3788. const m_sz_xListFontsWithInfoReq = 8
  3789. const m_sz_xListHostsReply = 32
  3790. const m_sz_xListHostsReq = 4
  3791. const m_sz_xListInstalledColormapsReply = 32
  3792. const m_sz_xListPropertiesReply = 32
  3793. const m_sz_xLookupColorReply = 32
  3794. const m_sz_xLookupColorReq = 12
  3795. const m_sz_xOpenFontReq = 12
  3796. const m_sz_xPixmapFormat = 8
  3797. const m_sz_xPoint = 4
  3798. const m_sz_xPolyArcReq = 12
  3799. const m_sz_xPolyFillArcReq = 12
  3800. const m_sz_xPolyFillRectangleReq = 12
  3801. const m_sz_xPolyLineReq = 12
  3802. const m_sz_xPolyPointReq = 12
  3803. const m_sz_xPolyRectangleReq = 12
  3804. const m_sz_xPolySegmentReq = 12
  3805. const m_sz_xPolyText16Req = 16
  3806. const m_sz_xPolyText8Req = 16
  3807. const m_sz_xPolyTextReq = 16
  3808. const m_sz_xPropIconSize = 24
  3809. const m_sz_xPutImageReq = 24
  3810. const m_sz_xQueryBestSizeReply = 32
  3811. const m_sz_xQueryBestSizeReq = 12
  3812. const m_sz_xQueryColorsReply = 32
  3813. const m_sz_xQueryColorsReq = 8
  3814. const m_sz_xQueryExtensionReply = 32
  3815. const m_sz_xQueryExtensionReq = 8
  3816. const m_sz_xQueryFontReply = 60
  3817. const m_sz_xQueryKeymapReply = 40
  3818. const m_sz_xQueryPointerReply = 32
  3819. const m_sz_xQueryTextExtentsReply = 32
  3820. const m_sz_xQueryTextExtentsReq = 8
  3821. const m_sz_xQueryTreeReply = 32
  3822. const m_sz_xRecolorCursorReq = 20
  3823. const m_sz_xRectangle = 8
  3824. const m_sz_xReparentWindowReq = 16
  3825. const m_sz_xReply = 32
  3826. const m_sz_xReq = 4
  3827. const m_sz_xResourceReq = 8
  3828. const m_sz_xRotatePropertiesReq = 12
  3829. const m_sz_xSegment = 8
  3830. const m_sz_xSendEventReq = 44
  3831. const m_sz_xSetAccessControlReq = 4
  3832. const m_sz_xSetClipRectanglesReq = 12
  3833. const m_sz_xSetCloseDownModeReq = 4
  3834. const m_sz_xSetDashesReq = 12
  3835. const m_sz_xSetFontPathReq = 8
  3836. const m_sz_xSetInputFocusReq = 12
  3837. const m_sz_xSetMappingReply = 32
  3838. const m_sz_xSetModifierMappingReply = 32
  3839. const m_sz_xSetModifierMappingReq = 4
  3840. const m_sz_xSetPointerMappingReply = 32
  3841. const m_sz_xSetPointerMappingReq = 4
  3842. const m_sz_xSetScreenSaverReq = 12
  3843. const m_sz_xSetSelectionOwnerReq = 16
  3844. const m_sz_xStoreColorsReq = 8
  3845. const m_sz_xStoreNamedColorReq = 16
  3846. const m_sz_xTextElt = 2
  3847. const m_sz_xTimecoord = 8
  3848. const m_sz_xTranslateCoordsReply = 32
  3849. const m_sz_xTranslateCoordsReq = 16
  3850. const m_sz_xUngrabButtonReq = 12
  3851. const m_sz_xUngrabKeyReq = 12
  3852. const m_sz_xVisualType = 24
  3853. const m_sz_xWarpPointerReq = 24
  3854. const m_sz_xWindowRoot = 40
  3855. const m_sz_xrgb = 8
  3856. const m_unix = 1
  3857. const m_xFalse = 0
  3858. const m_xTrue = 1
  3859. const m_xfree = "free"
  3860. const m_xmalloc = "malloc"
  3861. const m_xthread_self = "pthread_self"
  3862. type t__builtin_va_list = uintptr
  3863. type t__predefined_size_t = uint32
  3864. type t__predefined_wchar_t = uint32
  3865. type t__predefined_ptrdiff_t = int32
  3866. type Tsize_t = uint32
  3867. type Tssize_t = int32
  3868. type Toff_t = int64
  3869. type Tva_list = uintptr
  3870. type t__isoc_va_list = uintptr
  3871. type Tfpos_t = struct {
  3872. F__ccgo_align [0]uint32
  3873. F__lldata [0]int64
  3874. F__align [0]float64
  3875. F__opaque [16]uint8
  3876. }
  3877. type T_G_fpos64_t = Tfpos_t
  3878. type Tcookie_io_functions_t = struct {
  3879. Fread uintptr
  3880. Fwrite uintptr
  3881. Fseek uintptr
  3882. Fclose1 uintptr
  3883. }
  3884. type T_IO_cookie_io_functions_t = Tcookie_io_functions_t
  3885. type Twchar_t = uint32
  3886. type Tdiv_t = struct {
  3887. Fquot int32
  3888. Frem int32
  3889. }
  3890. type Tldiv_t = struct {
  3891. Fquot int32
  3892. Frem int32
  3893. }
  3894. type Tlldiv_t = struct {
  3895. F__ccgo_align [0]uint32
  3896. Fquot int64
  3897. Frem int64
  3898. }
  3899. type Tlocale_t = uintptr
  3900. type Tregister_t = int32
  3901. type Ttime_t = int64
  3902. type Tsuseconds_t = int64
  3903. type Tint8_t = int8
  3904. type Tint16_t = int16
  3905. type Tint32_t = int32
  3906. type Tint64_t = int64
  3907. type Tu_int64_t = uint64
  3908. type Tmode_t = uint32
  3909. type Tnlink_t = uint32
  3910. type Tino_t = uint64
  3911. type Tdev_t = uint64
  3912. type Tblksize_t = int32
  3913. type Tblkcnt_t = int64
  3914. type Tfsblkcnt_t = uint64
  3915. type Tfsfilcnt_t = uint64
  3916. type Ttimer_t = uintptr
  3917. type Tclockid_t = int32
  3918. type Tclock_t = int32
  3919. type Tpid_t = int32
  3920. type Tid_t = uint32
  3921. type Tuid_t = uint32
  3922. type Tgid_t = uint32
  3923. type Tkey_t = int32
  3924. type Tuseconds_t = uint32
  3925. type Tpthread_t = uintptr
  3926. type Tpthread_once_t = int32
  3927. type Tpthread_key_t = uint32
  3928. type Tpthread_spinlock_t = int32
  3929. type Tpthread_mutexattr_t = struct {
  3930. F__attr uint32
  3931. }
  3932. type Tpthread_condattr_t = struct {
  3933. F__attr uint32
  3934. }
  3935. type Tpthread_barrierattr_t = struct {
  3936. F__attr uint32
  3937. }
  3938. type Tpthread_rwlockattr_t = struct {
  3939. F__attr [2]uint32
  3940. }
  3941. type Tpthread_attr_t = struct {
  3942. F__u struct {
  3943. F__vi [0][9]int32
  3944. F__s [0][9]uint32
  3945. F__i [9]int32
  3946. }
  3947. }
  3948. type Tpthread_mutex_t = struct {
  3949. F__u struct {
  3950. F__vi [0][6]int32
  3951. F__p [0][6]uintptr
  3952. F__i [6]int32
  3953. }
  3954. F__ccgo_room int32
  3955. }
  3956. type Tpthread_cond_t = struct {
  3957. F__u struct {
  3958. F__vi [0][12]int32
  3959. F__p [0][12]uintptr
  3960. F__i [12]int32
  3961. }
  3962. }
  3963. type Tpthread_rwlock_t = struct {
  3964. F__u struct {
  3965. F__vi [0][8]int32
  3966. F__p [0][8]uintptr
  3967. F__i [8]int32
  3968. }
  3969. }
  3970. type Tpthread_barrier_t = struct {
  3971. F__u struct {
  3972. F__vi [0][5]int32
  3973. F__p [0][5]uintptr
  3974. F__i [5]int32
  3975. }
  3976. }
  3977. type Tu_int8_t = uint8
  3978. type Tu_int16_t = uint16
  3979. type Tu_int32_t = uint32
  3980. type Tcaddr_t = uintptr
  3981. type Tu_char = uint8
  3982. type Tu_short = uint16
  3983. type Tushort = uint16
  3984. type Tu_int = uint32
  3985. type Tuint = uint32
  3986. type Tu_long = uint32
  3987. type Tulong = uint32
  3988. type Tquad_t = int64
  3989. type Tu_quad_t = uint64
  3990. type Tuint16_t = uint16
  3991. type Tuint32_t = uint32
  3992. type Tuint64_t = uint64
  3993. type Ttimeval = struct {
  3994. F__ccgo_align [0]uint32
  3995. Ftv_sec Ttime_t
  3996. Ftv_usec Tsuseconds_t
  3997. }
  3998. type Ttimespec = struct {
  3999. F__ccgo_align [0]uint32
  4000. Ftv_sec Ttime_t
  4001. Ftv_nsec int32
  4002. F__ccgo12 uint32
  4003. }
  4004. type Tsigset_t = struct {
  4005. F__bits [32]uint32
  4006. }
  4007. type t__sigset_t = Tsigset_t
  4008. type Tfd_mask = uint32
  4009. type Tfd_set = struct {
  4010. Ffds_bits [32]uint32
  4011. }
  4012. type TXID = uint32
  4013. type TMask = uint32
  4014. type TAtom = uint32
  4015. type TVisualID = uint32
  4016. type TTime = uint32
  4017. type TWindow = uint32
  4018. type TDrawable = uint32
  4019. type TFont = uint32
  4020. type TPixmap = uint32
  4021. type TCursor = uint32
  4022. type TColormap = uint32
  4023. type TGContext = uint32
  4024. type TKeySym = uint32
  4025. type TKeyCode = uint8
  4026. type Tmax_align_t = struct {
  4027. F__ccgo_align [0]uint32
  4028. F__ll int64
  4029. F__ld float64
  4030. }
  4031. type Tptrdiff_t = int32
  4032. type TXPointer = uintptr
  4033. type TXExtData = struct {
  4034. Fnumber int32
  4035. Fnext uintptr
  4036. Ffree_private uintptr
  4037. Fprivate_data TXPointer
  4038. }
  4039. type T_XExtData = TXExtData
  4040. type TXExtCodes = struct {
  4041. Fextension int32
  4042. Fmajor_opcode int32
  4043. Ffirst_event int32
  4044. Ffirst_error int32
  4045. }
  4046. type TXPixmapFormatValues = struct {
  4047. Fdepth int32
  4048. Fbits_per_pixel int32
  4049. Fscanline_pad int32
  4050. }
  4051. type TXGCValues = struct {
  4052. Ffunction int32
  4053. Fplane_mask uint32
  4054. Fforeground uint32
  4055. Fbackground uint32
  4056. Fline_width int32
  4057. Fline_style int32
  4058. Fcap_style int32
  4059. Fjoin_style int32
  4060. Ffill_style int32
  4061. Ffill_rule int32
  4062. Farc_mode int32
  4063. Ftile TPixmap
  4064. Fstipple TPixmap
  4065. Fts_x_origin int32
  4066. Fts_y_origin int32
  4067. Ffont TFont
  4068. Fsubwindow_mode int32
  4069. Fgraphics_exposures int32
  4070. Fclip_x_origin int32
  4071. Fclip_y_origin int32
  4072. Fclip_mask TPixmap
  4073. Fdash_offset int32
  4074. Fdashes uint8
  4075. }
  4076. type TGC = uintptr
  4077. type T_XGC = struct {
  4078. Fext_data uintptr
  4079. Fgid TGContext
  4080. Frects int32
  4081. Fdashes int32
  4082. Fdirty uint32
  4083. Fvalues TXGCValues
  4084. }
  4085. type TVisual = struct {
  4086. Fext_data uintptr
  4087. Fvisualid TVisualID
  4088. Fclass int32
  4089. Fred_mask uint32
  4090. Fgreen_mask uint32
  4091. Fblue_mask uint32
  4092. Fbits_per_rgb int32
  4093. Fmap_entries int32
  4094. }
  4095. type TDepth = struct {
  4096. Fdepth int32
  4097. Fnvisuals int32
  4098. Fvisuals uintptr
  4099. }
  4100. type T_XDisplay = struct {
  4101. Fext_data uintptr
  4102. Ffree_funcs uintptr
  4103. Ffd int32
  4104. Fconn_checker int32
  4105. Fproto_major_version int32
  4106. Fproto_minor_version int32
  4107. Fvendor uintptr
  4108. Fresource_base TXID
  4109. Fresource_mask TXID
  4110. Fresource_id TXID
  4111. Fresource_shift int32
  4112. Fresource_alloc uintptr
  4113. Fbyte_order int32
  4114. Fbitmap_unit int32
  4115. Fbitmap_pad int32
  4116. Fbitmap_bit_order int32
  4117. Fnformats int32
  4118. Fpixmap_format uintptr
  4119. Fvnumber int32
  4120. Frelease int32
  4121. Fhead uintptr
  4122. Ftail uintptr
  4123. Fqlen int32
  4124. Flast_request_read uint32
  4125. Frequest uint32
  4126. Flast_req uintptr
  4127. Fbuffer uintptr
  4128. Fbufptr uintptr
  4129. Fbufmax uintptr
  4130. Fmax_request_size uint32
  4131. Fdb uintptr
  4132. Fsynchandler uintptr
  4133. Fdisplay_name uintptr
  4134. Fdefault_screen int32
  4135. Fnscreens int32
  4136. Fscreens uintptr
  4137. Fmotion_buffer uint32
  4138. Fflags uint32
  4139. Fmin_keycode int32
  4140. Fmax_keycode int32
  4141. Fkeysyms uintptr
  4142. Fmodifiermap uintptr
  4143. Fkeysyms_per_keycode int32
  4144. Fxdefaults uintptr
  4145. Fscratch_buffer uintptr
  4146. Fscratch_length uint32
  4147. Fext_number int32
  4148. Fext_procs uintptr
  4149. Fevent_vec [128]uintptr
  4150. Fwire_vec [128]uintptr
  4151. Flock_meaning TKeySym
  4152. Flock uintptr
  4153. Fasync_handlers uintptr
  4154. Fbigreq_size uint32
  4155. Flock_fns uintptr
  4156. Fidlist_alloc uintptr
  4157. Fkey_bindings uintptr
  4158. Fcursor_font TFont
  4159. Fatoms uintptr
  4160. Fmode_switch uint32
  4161. Fnum_lock uint32
  4162. Fcontext_db uintptr
  4163. Ferror_vec uintptr
  4164. Fcms struct {
  4165. FdefaultCCCs TXPointer
  4166. FclientCmaps TXPointer
  4167. FperVisualIntensityMaps TXPointer
  4168. }
  4169. Fim_filters uintptr
  4170. Fqfree uintptr
  4171. Fnext_event_serial_num uint32
  4172. Fflushes uintptr
  4173. Fim_fd_info uintptr
  4174. Fim_fd_length int32
  4175. Fconn_watchers uintptr
  4176. Fwatcher_count int32
  4177. Ffiledes TXPointer
  4178. Fsavedsynchandler uintptr
  4179. Fresource_max TXID
  4180. Fxcmisc_opcode int32
  4181. Fxkb_info uintptr
  4182. Ftrans_conn uintptr
  4183. Fxcb uintptr
  4184. Fnext_cookie uint32
  4185. Fgeneric_event_vec [128]uintptr
  4186. Fgeneric_event_copy_vec [128]uintptr
  4187. Fcookiejar uintptr
  4188. Flast_request_read_upper32bit uint32
  4189. Frequest_upper32bit uint32
  4190. Ferror_threads uintptr
  4191. Fexit_handler TXIOErrorExitHandler
  4192. Fexit_handler_data uintptr
  4193. Fin_ifevent TCARD32
  4194. Fifevent_thread Txthread_t
  4195. }
  4196. type TScreen = struct {
  4197. Fext_data uintptr
  4198. Fdisplay uintptr
  4199. Froot TWindow
  4200. Fwidth int32
  4201. Fheight int32
  4202. Fmwidth int32
  4203. Fmheight int32
  4204. Fndepths int32
  4205. Fdepths uintptr
  4206. Froot_depth int32
  4207. Froot_visual uintptr
  4208. Fdefault_gc TGC
  4209. Fcmap TColormap
  4210. Fwhite_pixel uint32
  4211. Fblack_pixel uint32
  4212. Fmax_maps int32
  4213. Fmin_maps int32
  4214. Fbacking_store int32
  4215. Fsave_unders int32
  4216. Froot_input_mask int32
  4217. }
  4218. type TScreenFormat = struct {
  4219. Fext_data uintptr
  4220. Fdepth int32
  4221. Fbits_per_pixel int32
  4222. Fscanline_pad int32
  4223. }
  4224. type TXSetWindowAttributes = struct {
  4225. Fbackground_pixmap TPixmap
  4226. Fbackground_pixel uint32
  4227. Fborder_pixmap TPixmap
  4228. Fborder_pixel uint32
  4229. Fbit_gravity int32
  4230. Fwin_gravity int32
  4231. Fbacking_store int32
  4232. Fbacking_planes uint32
  4233. Fbacking_pixel uint32
  4234. Fsave_under int32
  4235. Fevent_mask int32
  4236. Fdo_not_propagate_mask int32
  4237. Foverride_redirect int32
  4238. Fcolormap TColormap
  4239. Fcursor TCursor
  4240. }
  4241. type TXWindowAttributes = struct {
  4242. Fx int32
  4243. Fy int32
  4244. Fwidth int32
  4245. Fheight int32
  4246. Fborder_width int32
  4247. Fdepth int32
  4248. Fvisual uintptr
  4249. Froot TWindow
  4250. Fclass int32
  4251. Fbit_gravity int32
  4252. Fwin_gravity int32
  4253. Fbacking_store int32
  4254. Fbacking_planes uint32
  4255. Fbacking_pixel uint32
  4256. Fsave_under int32
  4257. Fcolormap TColormap
  4258. Fmap_installed int32
  4259. Fmap_state int32
  4260. Fall_event_masks int32
  4261. Fyour_event_mask int32
  4262. Fdo_not_propagate_mask int32
  4263. Foverride_redirect int32
  4264. Fscreen uintptr
  4265. }
  4266. type TXHostAddress = struct {
  4267. Ffamily int32
  4268. Flength int32
  4269. Faddress uintptr
  4270. }
  4271. type TXServerInterpretedAddress = struct {
  4272. Ftypelength int32
  4273. Fvaluelength int32
  4274. Ftype1 uintptr
  4275. Fvalue uintptr
  4276. }
  4277. type TXImage = struct {
  4278. Fwidth int32
  4279. Fheight int32
  4280. Fxoffset int32
  4281. Fformat int32
  4282. Fdata uintptr
  4283. Fbyte_order int32
  4284. Fbitmap_unit int32
  4285. Fbitmap_bit_order int32
  4286. Fbitmap_pad int32
  4287. Fdepth int32
  4288. Fbytes_per_line int32
  4289. Fbits_per_pixel int32
  4290. Fred_mask uint32
  4291. Fgreen_mask uint32
  4292. Fblue_mask uint32
  4293. Fobdata TXPointer
  4294. Ff Tfuncs
  4295. }
  4296. type T_XImage = TXImage
  4297. type TXWindowChanges = struct {
  4298. Fx int32
  4299. Fy int32
  4300. Fwidth int32
  4301. Fheight int32
  4302. Fborder_width int32
  4303. Fsibling TWindow
  4304. Fstack_mode int32
  4305. }
  4306. type TXColor = struct {
  4307. Fpixel uint32
  4308. Fred uint16
  4309. Fgreen uint16
  4310. Fblue uint16
  4311. Fflags uint8
  4312. Fpad uint8
  4313. }
  4314. type TXSegment = struct {
  4315. Fx1 int16
  4316. Fy1 int16
  4317. Fx2 int16
  4318. Fy2 int16
  4319. }
  4320. type TXPoint = struct {
  4321. Fx int16
  4322. Fy int16
  4323. }
  4324. type TXRectangle = struct {
  4325. Fx int16
  4326. Fy int16
  4327. Fwidth uint16
  4328. Fheight uint16
  4329. }
  4330. type TXArc = struct {
  4331. Fx int16
  4332. Fy int16
  4333. Fwidth uint16
  4334. Fheight uint16
  4335. Fangle1 int16
  4336. Fangle2 int16
  4337. }
  4338. type TXKeyboardControl = struct {
  4339. Fkey_click_percent int32
  4340. Fbell_percent int32
  4341. Fbell_pitch int32
  4342. Fbell_duration int32
  4343. Fled int32
  4344. Fled_mode int32
  4345. Fkey int32
  4346. Fauto_repeat_mode int32
  4347. }
  4348. type TXKeyboardState = struct {
  4349. Fkey_click_percent int32
  4350. Fbell_percent int32
  4351. Fbell_pitch uint32
  4352. Fbell_duration uint32
  4353. Fled_mask uint32
  4354. Fglobal_auto_repeat int32
  4355. Fauto_repeats [32]uint8
  4356. }
  4357. type TXTimeCoord = struct {
  4358. Ftime TTime
  4359. Fx int16
  4360. Fy int16
  4361. }
  4362. type TXModifierKeymap = struct {
  4363. Fmax_keypermod int32
  4364. Fmodifiermap uintptr
  4365. }
  4366. type TDisplay = struct {
  4367. Fext_data uintptr
  4368. Ffree_funcs uintptr
  4369. Ffd int32
  4370. Fconn_checker int32
  4371. Fproto_major_version int32
  4372. Fproto_minor_version int32
  4373. Fvendor uintptr
  4374. Fresource_base TXID
  4375. Fresource_mask TXID
  4376. Fresource_id TXID
  4377. Fresource_shift int32
  4378. Fresource_alloc uintptr
  4379. Fbyte_order int32
  4380. Fbitmap_unit int32
  4381. Fbitmap_pad int32
  4382. Fbitmap_bit_order int32
  4383. Fnformats int32
  4384. Fpixmap_format uintptr
  4385. Fvnumber int32
  4386. Frelease int32
  4387. Fhead uintptr
  4388. Ftail uintptr
  4389. Fqlen int32
  4390. Flast_request_read uint32
  4391. Frequest uint32
  4392. Flast_req uintptr
  4393. Fbuffer uintptr
  4394. Fbufptr uintptr
  4395. Fbufmax uintptr
  4396. Fmax_request_size uint32
  4397. Fdb uintptr
  4398. Fsynchandler uintptr
  4399. Fdisplay_name uintptr
  4400. Fdefault_screen int32
  4401. Fnscreens int32
  4402. Fscreens uintptr
  4403. Fmotion_buffer uint32
  4404. Fflags uint32
  4405. Fmin_keycode int32
  4406. Fmax_keycode int32
  4407. Fkeysyms uintptr
  4408. Fmodifiermap uintptr
  4409. Fkeysyms_per_keycode int32
  4410. Fxdefaults uintptr
  4411. Fscratch_buffer uintptr
  4412. Fscratch_length uint32
  4413. Fext_number int32
  4414. Fext_procs uintptr
  4415. Fevent_vec [128]uintptr
  4416. Fwire_vec [128]uintptr
  4417. Flock_meaning TKeySym
  4418. Flock uintptr
  4419. Fasync_handlers uintptr
  4420. Fbigreq_size uint32
  4421. Flock_fns uintptr
  4422. Fidlist_alloc uintptr
  4423. Fkey_bindings uintptr
  4424. Fcursor_font TFont
  4425. Fatoms uintptr
  4426. Fmode_switch uint32
  4427. Fnum_lock uint32
  4428. Fcontext_db uintptr
  4429. Ferror_vec uintptr
  4430. Fcms struct {
  4431. FdefaultCCCs TXPointer
  4432. FclientCmaps TXPointer
  4433. FperVisualIntensityMaps TXPointer
  4434. }
  4435. Fim_filters uintptr
  4436. Fqfree uintptr
  4437. Fnext_event_serial_num uint32
  4438. Fflushes uintptr
  4439. Fim_fd_info uintptr
  4440. Fim_fd_length int32
  4441. Fconn_watchers uintptr
  4442. Fwatcher_count int32
  4443. Ffiledes TXPointer
  4444. Fsavedsynchandler uintptr
  4445. Fresource_max TXID
  4446. Fxcmisc_opcode int32
  4447. Fxkb_info uintptr
  4448. Ftrans_conn uintptr
  4449. Fxcb uintptr
  4450. Fnext_cookie uint32
  4451. Fgeneric_event_vec [128]uintptr
  4452. Fgeneric_event_copy_vec [128]uintptr
  4453. Fcookiejar uintptr
  4454. Flast_request_read_upper32bit uint32
  4455. Frequest_upper32bit uint32
  4456. Ferror_threads uintptr
  4457. Fexit_handler TXIOErrorExitHandler
  4458. Fexit_handler_data uintptr
  4459. Fin_ifevent TCARD32
  4460. Fifevent_thread Txthread_t
  4461. }
  4462. type T_XPrivDisplay = uintptr
  4463. type TXKeyEvent = struct {
  4464. Ftype1 int32
  4465. Fserial uint32
  4466. Fsend_event int32
  4467. Fdisplay uintptr
  4468. Fwindow TWindow
  4469. Froot TWindow
  4470. Fsubwindow TWindow
  4471. Ftime TTime
  4472. Fx int32
  4473. Fy int32
  4474. Fx_root int32
  4475. Fy_root int32
  4476. Fstate uint32
  4477. Fkeycode uint32
  4478. Fsame_screen int32
  4479. }
  4480. type TXKeyPressedEvent = struct {
  4481. Ftype1 int32
  4482. Fserial uint32
  4483. Fsend_event int32
  4484. Fdisplay uintptr
  4485. Fwindow TWindow
  4486. Froot TWindow
  4487. Fsubwindow TWindow
  4488. Ftime TTime
  4489. Fx int32
  4490. Fy int32
  4491. Fx_root int32
  4492. Fy_root int32
  4493. Fstate uint32
  4494. Fkeycode uint32
  4495. Fsame_screen int32
  4496. }
  4497. type TXKeyReleasedEvent = struct {
  4498. Ftype1 int32
  4499. Fserial uint32
  4500. Fsend_event int32
  4501. Fdisplay uintptr
  4502. Fwindow TWindow
  4503. Froot TWindow
  4504. Fsubwindow TWindow
  4505. Ftime TTime
  4506. Fx int32
  4507. Fy int32
  4508. Fx_root int32
  4509. Fy_root int32
  4510. Fstate uint32
  4511. Fkeycode uint32
  4512. Fsame_screen int32
  4513. }
  4514. type TXButtonEvent = struct {
  4515. Ftype1 int32
  4516. Fserial uint32
  4517. Fsend_event int32
  4518. Fdisplay uintptr
  4519. Fwindow TWindow
  4520. Froot TWindow
  4521. Fsubwindow TWindow
  4522. Ftime TTime
  4523. Fx int32
  4524. Fy int32
  4525. Fx_root int32
  4526. Fy_root int32
  4527. Fstate uint32
  4528. Fbutton uint32
  4529. Fsame_screen int32
  4530. }
  4531. type TXButtonPressedEvent = struct {
  4532. Ftype1 int32
  4533. Fserial uint32
  4534. Fsend_event int32
  4535. Fdisplay uintptr
  4536. Fwindow TWindow
  4537. Froot TWindow
  4538. Fsubwindow TWindow
  4539. Ftime TTime
  4540. Fx int32
  4541. Fy int32
  4542. Fx_root int32
  4543. Fy_root int32
  4544. Fstate uint32
  4545. Fbutton uint32
  4546. Fsame_screen int32
  4547. }
  4548. type TXButtonReleasedEvent = struct {
  4549. Ftype1 int32
  4550. Fserial uint32
  4551. Fsend_event int32
  4552. Fdisplay uintptr
  4553. Fwindow TWindow
  4554. Froot TWindow
  4555. Fsubwindow TWindow
  4556. Ftime TTime
  4557. Fx int32
  4558. Fy int32
  4559. Fx_root int32
  4560. Fy_root int32
  4561. Fstate uint32
  4562. Fbutton uint32
  4563. Fsame_screen int32
  4564. }
  4565. type TXMotionEvent = struct {
  4566. Ftype1 int32
  4567. Fserial uint32
  4568. Fsend_event int32
  4569. Fdisplay uintptr
  4570. Fwindow TWindow
  4571. Froot TWindow
  4572. Fsubwindow TWindow
  4573. Ftime TTime
  4574. Fx int32
  4575. Fy int32
  4576. Fx_root int32
  4577. Fy_root int32
  4578. Fstate uint32
  4579. Fis_hint uint8
  4580. Fsame_screen int32
  4581. }
  4582. type TXPointerMovedEvent = struct {
  4583. Ftype1 int32
  4584. Fserial uint32
  4585. Fsend_event int32
  4586. Fdisplay uintptr
  4587. Fwindow TWindow
  4588. Froot TWindow
  4589. Fsubwindow TWindow
  4590. Ftime TTime
  4591. Fx int32
  4592. Fy int32
  4593. Fx_root int32
  4594. Fy_root int32
  4595. Fstate uint32
  4596. Fis_hint uint8
  4597. Fsame_screen int32
  4598. }
  4599. type TXCrossingEvent = struct {
  4600. Ftype1 int32
  4601. Fserial uint32
  4602. Fsend_event int32
  4603. Fdisplay uintptr
  4604. Fwindow TWindow
  4605. Froot TWindow
  4606. Fsubwindow TWindow
  4607. Ftime TTime
  4608. Fx int32
  4609. Fy int32
  4610. Fx_root int32
  4611. Fy_root int32
  4612. Fmode int32
  4613. Fdetail int32
  4614. Fsame_screen int32
  4615. Ffocus int32
  4616. Fstate uint32
  4617. }
  4618. type TXEnterWindowEvent = struct {
  4619. Ftype1 int32
  4620. Fserial uint32
  4621. Fsend_event int32
  4622. Fdisplay uintptr
  4623. Fwindow TWindow
  4624. Froot TWindow
  4625. Fsubwindow TWindow
  4626. Ftime TTime
  4627. Fx int32
  4628. Fy int32
  4629. Fx_root int32
  4630. Fy_root int32
  4631. Fmode int32
  4632. Fdetail int32
  4633. Fsame_screen int32
  4634. Ffocus int32
  4635. Fstate uint32
  4636. }
  4637. type TXLeaveWindowEvent = struct {
  4638. Ftype1 int32
  4639. Fserial uint32
  4640. Fsend_event int32
  4641. Fdisplay uintptr
  4642. Fwindow TWindow
  4643. Froot TWindow
  4644. Fsubwindow TWindow
  4645. Ftime TTime
  4646. Fx int32
  4647. Fy int32
  4648. Fx_root int32
  4649. Fy_root int32
  4650. Fmode int32
  4651. Fdetail int32
  4652. Fsame_screen int32
  4653. Ffocus int32
  4654. Fstate uint32
  4655. }
  4656. type TXFocusChangeEvent = struct {
  4657. Ftype1 int32
  4658. Fserial uint32
  4659. Fsend_event int32
  4660. Fdisplay uintptr
  4661. Fwindow TWindow
  4662. Fmode int32
  4663. Fdetail int32
  4664. }
  4665. type TXFocusInEvent = struct {
  4666. Ftype1 int32
  4667. Fserial uint32
  4668. Fsend_event int32
  4669. Fdisplay uintptr
  4670. Fwindow TWindow
  4671. Fmode int32
  4672. Fdetail int32
  4673. }
  4674. type TXFocusOutEvent = struct {
  4675. Ftype1 int32
  4676. Fserial uint32
  4677. Fsend_event int32
  4678. Fdisplay uintptr
  4679. Fwindow TWindow
  4680. Fmode int32
  4681. Fdetail int32
  4682. }
  4683. type TXKeymapEvent = struct {
  4684. Ftype1 int32
  4685. Fserial uint32
  4686. Fsend_event int32
  4687. Fdisplay uintptr
  4688. Fwindow TWindow
  4689. Fkey_vector [32]uint8
  4690. }
  4691. type TXExposeEvent = struct {
  4692. Ftype1 int32
  4693. Fserial uint32
  4694. Fsend_event int32
  4695. Fdisplay uintptr
  4696. Fwindow TWindow
  4697. Fx int32
  4698. Fy int32
  4699. Fwidth int32
  4700. Fheight int32
  4701. Fcount int32
  4702. }
  4703. type TXGraphicsExposeEvent = struct {
  4704. Ftype1 int32
  4705. Fserial uint32
  4706. Fsend_event int32
  4707. Fdisplay uintptr
  4708. Fdrawable TDrawable
  4709. Fx int32
  4710. Fy int32
  4711. Fwidth int32
  4712. Fheight int32
  4713. Fcount int32
  4714. Fmajor_code int32
  4715. Fminor_code int32
  4716. }
  4717. type TXNoExposeEvent = struct {
  4718. Ftype1 int32
  4719. Fserial uint32
  4720. Fsend_event int32
  4721. Fdisplay uintptr
  4722. Fdrawable TDrawable
  4723. Fmajor_code int32
  4724. Fminor_code int32
  4725. }
  4726. type TXVisibilityEvent = struct {
  4727. Ftype1 int32
  4728. Fserial uint32
  4729. Fsend_event int32
  4730. Fdisplay uintptr
  4731. Fwindow TWindow
  4732. Fstate int32
  4733. }
  4734. type TXCreateWindowEvent = struct {
  4735. Ftype1 int32
  4736. Fserial uint32
  4737. Fsend_event int32
  4738. Fdisplay uintptr
  4739. Fparent TWindow
  4740. Fwindow TWindow
  4741. Fx int32
  4742. Fy int32
  4743. Fwidth int32
  4744. Fheight int32
  4745. Fborder_width int32
  4746. Foverride_redirect int32
  4747. }
  4748. type TXDestroyWindowEvent = struct {
  4749. Ftype1 int32
  4750. Fserial uint32
  4751. Fsend_event int32
  4752. Fdisplay uintptr
  4753. Fevent TWindow
  4754. Fwindow TWindow
  4755. }
  4756. type TXUnmapEvent = struct {
  4757. Ftype1 int32
  4758. Fserial uint32
  4759. Fsend_event int32
  4760. Fdisplay uintptr
  4761. Fevent TWindow
  4762. Fwindow TWindow
  4763. Ffrom_configure int32
  4764. }
  4765. type TXMapEvent = struct {
  4766. Ftype1 int32
  4767. Fserial uint32
  4768. Fsend_event int32
  4769. Fdisplay uintptr
  4770. Fevent TWindow
  4771. Fwindow TWindow
  4772. Foverride_redirect int32
  4773. }
  4774. type TXMapRequestEvent = struct {
  4775. Ftype1 int32
  4776. Fserial uint32
  4777. Fsend_event int32
  4778. Fdisplay uintptr
  4779. Fparent TWindow
  4780. Fwindow TWindow
  4781. }
  4782. type TXReparentEvent = struct {
  4783. Ftype1 int32
  4784. Fserial uint32
  4785. Fsend_event int32
  4786. Fdisplay uintptr
  4787. Fevent TWindow
  4788. Fwindow TWindow
  4789. Fparent TWindow
  4790. Fx int32
  4791. Fy int32
  4792. Foverride_redirect int32
  4793. }
  4794. type TXConfigureEvent = struct {
  4795. Ftype1 int32
  4796. Fserial uint32
  4797. Fsend_event int32
  4798. Fdisplay uintptr
  4799. Fevent TWindow
  4800. Fwindow TWindow
  4801. Fx int32
  4802. Fy int32
  4803. Fwidth int32
  4804. Fheight int32
  4805. Fborder_width int32
  4806. Fabove TWindow
  4807. Foverride_redirect int32
  4808. }
  4809. type TXGravityEvent = struct {
  4810. Ftype1 int32
  4811. Fserial uint32
  4812. Fsend_event int32
  4813. Fdisplay uintptr
  4814. Fevent TWindow
  4815. Fwindow TWindow
  4816. Fx int32
  4817. Fy int32
  4818. }
  4819. type TXResizeRequestEvent = struct {
  4820. Ftype1 int32
  4821. Fserial uint32
  4822. Fsend_event int32
  4823. Fdisplay uintptr
  4824. Fwindow TWindow
  4825. Fwidth int32
  4826. Fheight int32
  4827. }
  4828. type TXConfigureRequestEvent = struct {
  4829. Ftype1 int32
  4830. Fserial uint32
  4831. Fsend_event int32
  4832. Fdisplay uintptr
  4833. Fparent TWindow
  4834. Fwindow TWindow
  4835. Fx int32
  4836. Fy int32
  4837. Fwidth int32
  4838. Fheight int32
  4839. Fborder_width int32
  4840. Fabove TWindow
  4841. Fdetail int32
  4842. Fvalue_mask uint32
  4843. }
  4844. type TXCirculateEvent = struct {
  4845. Ftype1 int32
  4846. Fserial uint32
  4847. Fsend_event int32
  4848. Fdisplay uintptr
  4849. Fevent TWindow
  4850. Fwindow TWindow
  4851. Fplace int32
  4852. }
  4853. type TXCirculateRequestEvent = struct {
  4854. Ftype1 int32
  4855. Fserial uint32
  4856. Fsend_event int32
  4857. Fdisplay uintptr
  4858. Fparent TWindow
  4859. Fwindow TWindow
  4860. Fplace int32
  4861. }
  4862. type TXPropertyEvent = struct {
  4863. Ftype1 int32
  4864. Fserial uint32
  4865. Fsend_event int32
  4866. Fdisplay uintptr
  4867. Fwindow TWindow
  4868. Fatom TAtom
  4869. Ftime TTime
  4870. Fstate int32
  4871. }
  4872. type TXSelectionClearEvent = struct {
  4873. Ftype1 int32
  4874. Fserial uint32
  4875. Fsend_event int32
  4876. Fdisplay uintptr
  4877. Fwindow TWindow
  4878. Fselection TAtom
  4879. Ftime TTime
  4880. }
  4881. type TXSelectionRequestEvent = struct {
  4882. Ftype1 int32
  4883. Fserial uint32
  4884. Fsend_event int32
  4885. Fdisplay uintptr
  4886. Fowner TWindow
  4887. Frequestor TWindow
  4888. Fselection TAtom
  4889. Ftarget TAtom
  4890. Fproperty TAtom
  4891. Ftime TTime
  4892. }
  4893. type TXSelectionEvent = struct {
  4894. Ftype1 int32
  4895. Fserial uint32
  4896. Fsend_event int32
  4897. Fdisplay uintptr
  4898. Frequestor TWindow
  4899. Fselection TAtom
  4900. Ftarget TAtom
  4901. Fproperty TAtom
  4902. Ftime TTime
  4903. }
  4904. type TXColormapEvent = struct {
  4905. Ftype1 int32
  4906. Fserial uint32
  4907. Fsend_event int32
  4908. Fdisplay uintptr
  4909. Fwindow TWindow
  4910. Fcolormap TColormap
  4911. Fnew1 int32
  4912. Fstate int32
  4913. }
  4914. type TXClientMessageEvent = struct {
  4915. Ftype1 int32
  4916. Fserial uint32
  4917. Fsend_event int32
  4918. Fdisplay uintptr
  4919. Fwindow TWindow
  4920. Fmessage_type TAtom
  4921. Fformat int32
  4922. Fdata struct {
  4923. Fs [0][10]int16
  4924. Fl [0][5]int32
  4925. Fb [20]uint8
  4926. }
  4927. }
  4928. type TXMappingEvent = struct {
  4929. Ftype1 int32
  4930. Fserial uint32
  4931. Fsend_event int32
  4932. Fdisplay uintptr
  4933. Fwindow TWindow
  4934. Frequest int32
  4935. Ffirst_keycode int32
  4936. Fcount int32
  4937. }
  4938. type TXErrorEvent = struct {
  4939. Ftype1 int32
  4940. Fdisplay uintptr
  4941. Fresourceid TXID
  4942. Fserial uint32
  4943. Ferror_code uint8
  4944. Frequest_code uint8
  4945. Fminor_code uint8
  4946. }
  4947. type TXAnyEvent = struct {
  4948. Ftype1 int32
  4949. Fserial uint32
  4950. Fsend_event int32
  4951. Fdisplay uintptr
  4952. Fwindow TWindow
  4953. }
  4954. type TXGenericEvent = struct {
  4955. Ftype1 int32
  4956. Fserial uint32
  4957. Fsend_event int32
  4958. Fdisplay uintptr
  4959. Fextension int32
  4960. Fevtype int32
  4961. }
  4962. type TXGenericEventCookie = struct {
  4963. Ftype1 int32
  4964. Fserial uint32
  4965. Fsend_event int32
  4966. Fdisplay uintptr
  4967. Fextension int32
  4968. Fevtype int32
  4969. Fcookie uint32
  4970. Fdata uintptr
  4971. }
  4972. type TXEvent = struct {
  4973. Fxany [0]TXAnyEvent
  4974. Fxkey [0]TXKeyEvent
  4975. Fxbutton [0]TXButtonEvent
  4976. Fxmotion [0]TXMotionEvent
  4977. Fxcrossing [0]TXCrossingEvent
  4978. Fxfocus [0]TXFocusChangeEvent
  4979. Fxexpose [0]TXExposeEvent
  4980. Fxgraphicsexpose [0]TXGraphicsExposeEvent
  4981. Fxnoexpose [0]TXNoExposeEvent
  4982. Fxvisibility [0]TXVisibilityEvent
  4983. Fxcreatewindow [0]TXCreateWindowEvent
  4984. Fxdestroywindow [0]TXDestroyWindowEvent
  4985. Fxunmap [0]TXUnmapEvent
  4986. Fxmap [0]TXMapEvent
  4987. Fxmaprequest [0]TXMapRequestEvent
  4988. Fxreparent [0]TXReparentEvent
  4989. Fxconfigure [0]TXConfigureEvent
  4990. Fxgravity [0]TXGravityEvent
  4991. Fxresizerequest [0]TXResizeRequestEvent
  4992. Fxconfigurerequest [0]TXConfigureRequestEvent
  4993. Fxcirculate [0]TXCirculateEvent
  4994. Fxcirculaterequest [0]TXCirculateRequestEvent
  4995. Fxproperty [0]TXPropertyEvent
  4996. Fxselectionclear [0]TXSelectionClearEvent
  4997. Fxselectionrequest [0]TXSelectionRequestEvent
  4998. Fxselection [0]TXSelectionEvent
  4999. Fxcolormap [0]TXColormapEvent
  5000. Fxclient [0]TXClientMessageEvent
  5001. Fxmapping [0]TXMappingEvent
  5002. Fxerror [0]TXErrorEvent
  5003. Fxkeymap [0]TXKeymapEvent
  5004. Fxgeneric [0]TXGenericEvent
  5005. Fxcookie [0]TXGenericEventCookie
  5006. Fpad [0][24]int32
  5007. Ftype1 int32
  5008. F__ccgo_pad35 [92]byte
  5009. }
  5010. type T_XEvent = TXEvent
  5011. type TXCharStruct = struct {
  5012. Flbearing int16
  5013. Frbearing int16
  5014. Fwidth int16
  5015. Fascent int16
  5016. Fdescent int16
  5017. Fattributes uint16
  5018. }
  5019. type TXFontProp = struct {
  5020. Fname TAtom
  5021. Fcard32 uint32
  5022. }
  5023. type TXFontStruct = struct {
  5024. Fext_data uintptr
  5025. Ffid TFont
  5026. Fdirection uint32
  5027. Fmin_char_or_byte2 uint32
  5028. Fmax_char_or_byte2 uint32
  5029. Fmin_byte1 uint32
  5030. Fmax_byte1 uint32
  5031. Fall_chars_exist int32
  5032. Fdefault_char uint32
  5033. Fn_properties int32
  5034. Fproperties uintptr
  5035. Fmin_bounds TXCharStruct
  5036. Fmax_bounds TXCharStruct
  5037. Fper_char uintptr
  5038. Fascent int32
  5039. Fdescent int32
  5040. }
  5041. type TXTextItem = struct {
  5042. Fchars uintptr
  5043. Fnchars int32
  5044. Fdelta int32
  5045. Ffont TFont
  5046. }
  5047. type TXChar2b = struct {
  5048. Fbyte1 uint8
  5049. Fbyte2 uint8
  5050. }
  5051. type TXTextItem16 = struct {
  5052. Fchars uintptr
  5053. Fnchars int32
  5054. Fdelta int32
  5055. Ffont TFont
  5056. }
  5057. type TXEDataObject = struct {
  5058. Fgc [0]TGC
  5059. Fvisual [0]uintptr
  5060. Fscreen [0]uintptr
  5061. Fpixmap_format [0]uintptr
  5062. Ffont [0]uintptr
  5063. Fdisplay uintptr
  5064. }
  5065. type TXFontSetExtents = struct {
  5066. Fmax_ink_extent TXRectangle
  5067. Fmax_logical_extent TXRectangle
  5068. }
  5069. type TXOM = uintptr
  5070. type TXOC = uintptr
  5071. type TXFontSet = uintptr
  5072. type TXmbTextItem = struct {
  5073. Fchars uintptr
  5074. Fnchars int32
  5075. Fdelta int32
  5076. Ffont_set TXFontSet
  5077. }
  5078. type TXwcTextItem = struct {
  5079. Fchars uintptr
  5080. Fnchars int32
  5081. Fdelta int32
  5082. Ffont_set TXFontSet
  5083. }
  5084. type TXOMCharSetList = struct {
  5085. Fcharset_count int32
  5086. Fcharset_list uintptr
  5087. }
  5088. type TXOrientation = int32
  5089. const _XOMOrientation_LTR_TTB = 0
  5090. const _XOMOrientation_RTL_TTB = 1
  5091. const _XOMOrientation_TTB_LTR = 2
  5092. const _XOMOrientation_TTB_RTL = 3
  5093. const _XOMOrientation_Context = 4
  5094. type TXOMOrientation = struct {
  5095. Fnum_orientation int32
  5096. Forientation uintptr
  5097. }
  5098. type TXOMFontInfo = struct {
  5099. Fnum_font int32
  5100. Ffont_struct_list uintptr
  5101. Ffont_name_list uintptr
  5102. }
  5103. type TXIM = uintptr
  5104. type TXIC = uintptr
  5105. type TXIMProc = uintptr
  5106. type TXICProc = uintptr
  5107. type TXIDProc = uintptr
  5108. type TXIMStyle = uint32
  5109. type TXIMStyles = struct {
  5110. Fcount_styles uint16
  5111. Fsupported_styles uintptr
  5112. }
  5113. type TXVaNestedList = uintptr
  5114. type TXIMCallback = struct {
  5115. Fclient_data TXPointer
  5116. Fcallback TXIMProc
  5117. }
  5118. type TXICCallback = struct {
  5119. Fclient_data TXPointer
  5120. Fcallback TXICProc
  5121. }
  5122. type TXIMFeedback = uint32
  5123. type TXIMText = struct {
  5124. Flength uint16
  5125. Ffeedback uintptr
  5126. Fencoding_is_wchar int32
  5127. Fstring1 struct {
  5128. Fwide_char [0]uintptr
  5129. Fmulti_byte uintptr
  5130. }
  5131. }
  5132. type T_XIMText = TXIMText
  5133. type TXIMPreeditState = uint32
  5134. type TXIMPreeditStateNotifyCallbackStruct = struct {
  5135. Fstate TXIMPreeditState
  5136. }
  5137. type T_XIMPreeditStateNotifyCallbackStruct = TXIMPreeditStateNotifyCallbackStruct
  5138. type TXIMResetState = uint32
  5139. type TXIMStringConversionFeedback = uint32
  5140. type TXIMStringConversionText = struct {
  5141. Flength uint16
  5142. Ffeedback uintptr
  5143. Fencoding_is_wchar int32
  5144. Fstring1 struct {
  5145. Fwcs [0]uintptr
  5146. Fmbs uintptr
  5147. }
  5148. }
  5149. type T_XIMStringConversionText = TXIMStringConversionText
  5150. type TXIMStringConversionPosition = uint16
  5151. type TXIMStringConversionType = uint16
  5152. type TXIMStringConversionOperation = uint16
  5153. type TXIMCaretDirection = int32
  5154. const _XIMForwardChar = 0
  5155. const _XIMBackwardChar = 1
  5156. const _XIMForwardWord = 2
  5157. const _XIMBackwardWord = 3
  5158. const _XIMCaretUp = 4
  5159. const _XIMCaretDown = 5
  5160. const _XIMNextLine = 6
  5161. const _XIMPreviousLine = 7
  5162. const _XIMLineStart = 8
  5163. const _XIMLineEnd = 9
  5164. const _XIMAbsolutePosition = 10
  5165. const _XIMDontChange = 11
  5166. type TXIMStringConversionCallbackStruct = struct {
  5167. Fposition TXIMStringConversionPosition
  5168. Fdirection TXIMCaretDirection
  5169. Foperation TXIMStringConversionOperation
  5170. Ffactor uint16
  5171. Ftext uintptr
  5172. }
  5173. type T_XIMStringConversionCallbackStruct = TXIMStringConversionCallbackStruct
  5174. type TXIMPreeditDrawCallbackStruct = struct {
  5175. Fcaret int32
  5176. Fchg_first int32
  5177. Fchg_length int32
  5178. Ftext uintptr
  5179. }
  5180. type T_XIMPreeditDrawCallbackStruct = TXIMPreeditDrawCallbackStruct
  5181. type TXIMCaretStyle = int32
  5182. const _XIMIsInvisible = 0
  5183. const _XIMIsPrimary = 1
  5184. const _XIMIsSecondary = 2
  5185. type TXIMPreeditCaretCallbackStruct = struct {
  5186. Fposition int32
  5187. Fdirection TXIMCaretDirection
  5188. Fstyle TXIMCaretStyle
  5189. }
  5190. type T_XIMPreeditCaretCallbackStruct = TXIMPreeditCaretCallbackStruct
  5191. type TXIMStatusDataType = int32
  5192. const _XIMTextType = 0
  5193. const _XIMBitmapType = 1
  5194. type TXIMStatusDrawCallbackStruct = struct {
  5195. Ftype1 TXIMStatusDataType
  5196. Fdata struct {
  5197. Fbitmap [0]TPixmap
  5198. Ftext uintptr
  5199. }
  5200. }
  5201. type T_XIMStatusDrawCallbackStruct = TXIMStatusDrawCallbackStruct
  5202. type TXIMHotKeyTrigger = struct {
  5203. Fkeysym TKeySym
  5204. Fmodifier int32
  5205. Fmodifier_mask int32
  5206. }
  5207. type T_XIMHotKeyTrigger = TXIMHotKeyTrigger
  5208. type TXIMHotKeyTriggers = struct {
  5209. Fnum_hot_key int32
  5210. Fkey uintptr
  5211. }
  5212. type T_XIMHotKeyTriggers = TXIMHotKeyTriggers
  5213. type TXIMHotKeyState = uint32
  5214. type TXIMValuesList = struct {
  5215. Fcount_values uint16
  5216. Fsupported_values uintptr
  5217. }
  5218. type TXErrorHandler = uintptr
  5219. type TXIOErrorHandler = uintptr
  5220. type TXIOErrorExitHandler = uintptr
  5221. type TXConnectionWatchProc = uintptr
  5222. type TXSizeHints = struct {
  5223. Fflags int32
  5224. Fx int32
  5225. Fy int32
  5226. Fwidth int32
  5227. Fheight int32
  5228. Fmin_width int32
  5229. Fmin_height int32
  5230. Fmax_width int32
  5231. Fmax_height int32
  5232. Fwidth_inc int32
  5233. Fheight_inc int32
  5234. Fmin_aspect struct {
  5235. Fx int32
  5236. Fy int32
  5237. }
  5238. Fmax_aspect struct {
  5239. Fx int32
  5240. Fy int32
  5241. }
  5242. Fbase_width int32
  5243. Fbase_height int32
  5244. Fwin_gravity int32
  5245. }
  5246. type TXWMHints = struct {
  5247. Fflags int32
  5248. Finput int32
  5249. Finitial_state int32
  5250. Ficon_pixmap TPixmap
  5251. Ficon_window TWindow
  5252. Ficon_x int32
  5253. Ficon_y int32
  5254. Ficon_mask TPixmap
  5255. Fwindow_group TXID
  5256. }
  5257. type TXTextProperty = struct {
  5258. Fvalue uintptr
  5259. Fencoding TAtom
  5260. Fformat int32
  5261. Fnitems uint32
  5262. }
  5263. type TXICCEncodingStyle = int32
  5264. const _XStringStyle = 0
  5265. const _XCompoundTextStyle = 1
  5266. const _XTextStyle = 2
  5267. const _XStdICCTextStyle = 3
  5268. const _XUTF8StringStyle = 4
  5269. type TXIconSize = struct {
  5270. Fmin_width int32
  5271. Fmin_height int32
  5272. Fmax_width int32
  5273. Fmax_height int32
  5274. Fwidth_inc int32
  5275. Fheight_inc int32
  5276. }
  5277. type TXClassHint = struct {
  5278. Fres_name uintptr
  5279. Fres_class uintptr
  5280. }
  5281. type TXComposeStatus = struct {
  5282. Fcompose_ptr TXPointer
  5283. Fchars_matched int32
  5284. }
  5285. type T_XComposeStatus = TXComposeStatus
  5286. type TRegion = uintptr
  5287. type TXVisualInfo = struct {
  5288. Fvisual uintptr
  5289. Fvisualid TVisualID
  5290. Fscreen int32
  5291. Fdepth int32
  5292. Fclass int32
  5293. Fred_mask uint32
  5294. Fgreen_mask uint32
  5295. Fblue_mask uint32
  5296. Fcolormap_size int32
  5297. Fbits_per_rgb int32
  5298. }
  5299. type TXStandardColormap = struct {
  5300. Fcolormap TColormap
  5301. Fred_max uint32
  5302. Fred_mult uint32
  5303. Fgreen_max uint32
  5304. Fgreen_mult uint32
  5305. Fblue_max uint32
  5306. Fblue_mult uint32
  5307. Fbase_pixel uint32
  5308. Fvisualid TVisualID
  5309. Fkillid TXID
  5310. }
  5311. type TXContext = int32
  5312. type TINT32 = int32
  5313. type TINT16 = int16
  5314. type TINT8 = int8
  5315. type TCARD64 = uint64
  5316. type TCARD32 = uint32
  5317. type TCARD16 = uint16
  5318. type TCARD8 = uint8
  5319. type TBITS32 = uint32
  5320. type TBITS16 = uint16
  5321. type TBYTE = uint8
  5322. type TBOOL = uint8
  5323. type Tuintptr_t = uint32
  5324. type Tintptr_t = int32
  5325. type Tintmax_t = int64
  5326. type Tuint8_t = uint8
  5327. type Tuintmax_t = uint64
  5328. type Tint_fast8_t = int8
  5329. type Tint_fast64_t = int64
  5330. type Tint_least8_t = int8
  5331. type Tint_least16_t = int16
  5332. type Tint_least32_t = int32
  5333. type Tint_least64_t = int64
  5334. type Tuint_fast8_t = uint8
  5335. type Tuint_fast64_t = uint64
  5336. type Tuint_least8_t = uint8
  5337. type Tuint_least16_t = uint16
  5338. type Tuint_least32_t = uint32
  5339. type Tuint_least64_t = uint64
  5340. type Tint_fast16_t = int32
  5341. type Tint_fast32_t = int32
  5342. type Tuint_fast16_t = uint32
  5343. type Tuint_fast32_t = uint32
  5344. type TxSegment = struct {
  5345. Fx1 TINT16
  5346. Fy1 TINT16
  5347. Fx2 TINT16
  5348. Fy2 TINT16
  5349. }
  5350. type T_xSegment = TxSegment
  5351. type TxPoint = struct {
  5352. Fx TINT16
  5353. Fy TINT16
  5354. }
  5355. type T_xPoint = TxPoint
  5356. type TxRectangle = struct {
  5357. Fx TINT16
  5358. Fy TINT16
  5359. Fwidth TCARD16
  5360. Fheight TCARD16
  5361. }
  5362. type T_xRectangle = TxRectangle
  5363. type TxArc = struct {
  5364. Fx TINT16
  5365. Fy TINT16
  5366. Fwidth TCARD16
  5367. Fheight TCARD16
  5368. Fangle1 TINT16
  5369. Fangle2 TINT16
  5370. }
  5371. type T_xArc = TxArc
  5372. type TKeyButMask = uint16
  5373. type TxConnClientPrefix = struct {
  5374. FbyteOrder TCARD8
  5375. Fpad TBYTE
  5376. FmajorVersion TCARD16
  5377. FminorVersion TCARD16
  5378. FnbytesAuthProto TCARD16
  5379. FnbytesAuthString TCARD16
  5380. Fpad2 TCARD16
  5381. }
  5382. type TxConnSetupPrefix = struct {
  5383. Fsuccess TCARD8
  5384. FlengthReason TBYTE
  5385. FmajorVersion TCARD16
  5386. FminorVersion TCARD16
  5387. Flength TCARD16
  5388. }
  5389. type TxConnSetup = struct {
  5390. Frelease TCARD32
  5391. FridBase TCARD32
  5392. FridMask TCARD32
  5393. FmotionBufferSize TCARD32
  5394. FnbytesVendor TCARD16
  5395. FmaxRequestSize TCARD16
  5396. FnumRoots TCARD8
  5397. FnumFormats TCARD8
  5398. FimageByteOrder TCARD8
  5399. FbitmapBitOrder TCARD8
  5400. FbitmapScanlineUnit TCARD8
  5401. FbitmapScanlinePad TCARD8
  5402. FminKeyCode TCARD8
  5403. FmaxKeyCode TCARD8
  5404. Fpad2 TCARD32
  5405. }
  5406. type TxPixmapFormat = struct {
  5407. Fdepth TCARD8
  5408. FbitsPerPixel TCARD8
  5409. FscanLinePad TCARD8
  5410. Fpad1 TCARD8
  5411. Fpad2 TCARD32
  5412. }
  5413. type TxDepth = struct {
  5414. Fdepth TCARD8
  5415. Fpad1 TCARD8
  5416. FnVisuals TCARD16
  5417. Fpad2 TCARD32
  5418. }
  5419. type TxVisualType = struct {
  5420. FvisualID TCARD32
  5421. Fclass TCARD8
  5422. FbitsPerRGB TCARD8
  5423. FcolormapEntries TCARD16
  5424. FredMask TCARD32
  5425. FgreenMask TCARD32
  5426. FblueMask TCARD32
  5427. Fpad TCARD32
  5428. }
  5429. type TxWindowRoot = struct {
  5430. FwindowId TCARD32
  5431. FdefaultColormap TCARD32
  5432. FwhitePixel TCARD32
  5433. FblackPixel TCARD32
  5434. FcurrentInputMask TCARD32
  5435. FpixWidth TCARD16
  5436. FpixHeight TCARD16
  5437. FmmWidth TCARD16
  5438. FmmHeight TCARD16
  5439. FminInstalledMaps TCARD16
  5440. FmaxInstalledMaps TCARD16
  5441. FrootVisualID TCARD32
  5442. FbackingStore TCARD8
  5443. FsaveUnders TBOOL
  5444. FrootDepth TCARD8
  5445. FnDepths TCARD8
  5446. }
  5447. type TxTimecoord = struct {
  5448. Ftime TCARD32
  5449. Fx TINT16
  5450. Fy TINT16
  5451. }
  5452. type TxHostEntry = struct {
  5453. Ffamily TCARD8
  5454. Fpad TBYTE
  5455. Flength TCARD16
  5456. }
  5457. type TxCharInfo = struct {
  5458. FleftSideBearing TINT16
  5459. FrightSideBearing TINT16
  5460. FcharacterWidth TINT16
  5461. Fascent TINT16
  5462. Fdescent TINT16
  5463. Fattributes TCARD16
  5464. }
  5465. type TxFontProp = struct {
  5466. Fname TCARD32
  5467. Fvalue TCARD32
  5468. }
  5469. type TxTextElt = struct {
  5470. Flen1 TCARD8
  5471. Fdelta TINT8
  5472. }
  5473. type TxColorItem = struct {
  5474. Fpixel TCARD32
  5475. Fred TCARD16
  5476. Fgreen TCARD16
  5477. Fblue TCARD16
  5478. Fflags TCARD8
  5479. Fpad TCARD8
  5480. }
  5481. type Txrgb = struct {
  5482. Fred TCARD16
  5483. Fgreen TCARD16
  5484. Fblue TCARD16
  5485. Fpad TCARD16
  5486. }
  5487. type TKEYCODE = uint8
  5488. type TxGenericReply = struct {
  5489. Ftype1 TBYTE
  5490. Fdata1 TBYTE
  5491. FsequenceNumber TCARD16
  5492. Flength TCARD32
  5493. Fdata00 TCARD32
  5494. Fdata01 TCARD32
  5495. Fdata02 TCARD32
  5496. Fdata03 TCARD32
  5497. Fdata04 TCARD32
  5498. Fdata05 TCARD32
  5499. }
  5500. type TxGetWindowAttributesReply = struct {
  5501. Ftype1 TBYTE
  5502. FbackingStore TCARD8
  5503. FsequenceNumber TCARD16
  5504. Flength TCARD32
  5505. FvisualID TCARD32
  5506. Fclass TCARD16
  5507. FbitGravity TCARD8
  5508. FwinGravity TCARD8
  5509. FbackingBitPlanes TCARD32
  5510. FbackingPixel TCARD32
  5511. FsaveUnder TBOOL
  5512. FmapInstalled TBOOL
  5513. FmapState TCARD8
  5514. Foverride TBOOL
  5515. Fcolormap TCARD32
  5516. FallEventMasks TCARD32
  5517. FyourEventMask TCARD32
  5518. FdoNotPropagateMask TCARD16
  5519. Fpad TCARD16
  5520. }
  5521. type TxGetGeometryReply = struct {
  5522. Ftype1 TBYTE
  5523. Fdepth TCARD8
  5524. FsequenceNumber TCARD16
  5525. Flength TCARD32
  5526. Froot TCARD32
  5527. Fx TINT16
  5528. Fy TINT16
  5529. Fwidth TCARD16
  5530. Fheight TCARD16
  5531. FborderWidth TCARD16
  5532. Fpad1 TCARD16
  5533. Fpad2 TCARD32
  5534. Fpad3 TCARD32
  5535. }
  5536. type TxQueryTreeReply = struct {
  5537. Ftype1 TBYTE
  5538. Fpad1 TBYTE
  5539. FsequenceNumber TCARD16
  5540. Flength TCARD32
  5541. Froot TCARD32
  5542. Fparent TCARD32
  5543. FnChildren TCARD16
  5544. Fpad2 TCARD16
  5545. Fpad3 TCARD32
  5546. Fpad4 TCARD32
  5547. Fpad5 TCARD32
  5548. }
  5549. type TxInternAtomReply = struct {
  5550. Ftype1 TBYTE
  5551. Fpad1 TBYTE
  5552. FsequenceNumber TCARD16
  5553. Flength TCARD32
  5554. Fatom TCARD32
  5555. Fpad2 TCARD32
  5556. Fpad3 TCARD32
  5557. Fpad4 TCARD32
  5558. Fpad5 TCARD32
  5559. Fpad6 TCARD32
  5560. }
  5561. type TxGetAtomNameReply = struct {
  5562. Ftype1 TBYTE
  5563. Fpad1 TBYTE
  5564. FsequenceNumber TCARD16
  5565. Flength TCARD32
  5566. FnameLength TCARD16
  5567. Fpad2 TCARD16
  5568. Fpad3 TCARD32
  5569. Fpad4 TCARD32
  5570. Fpad5 TCARD32
  5571. Fpad6 TCARD32
  5572. Fpad7 TCARD32
  5573. }
  5574. type TxGetPropertyReply = struct {
  5575. Ftype1 TBYTE
  5576. Fformat TCARD8
  5577. FsequenceNumber TCARD16
  5578. Flength TCARD32
  5579. FpropertyType TCARD32
  5580. FbytesAfter TCARD32
  5581. FnItems TCARD32
  5582. Fpad1 TCARD32
  5583. Fpad2 TCARD32
  5584. Fpad3 TCARD32
  5585. }
  5586. type TxListPropertiesReply = struct {
  5587. Ftype1 TBYTE
  5588. Fpad1 TBYTE
  5589. FsequenceNumber TCARD16
  5590. Flength TCARD32
  5591. FnProperties TCARD16
  5592. Fpad2 TCARD16
  5593. Fpad3 TCARD32
  5594. Fpad4 TCARD32
  5595. Fpad5 TCARD32
  5596. Fpad6 TCARD32
  5597. Fpad7 TCARD32
  5598. }
  5599. type TxGetSelectionOwnerReply = struct {
  5600. Ftype1 TBYTE
  5601. Fpad1 TBYTE
  5602. FsequenceNumber TCARD16
  5603. Flength TCARD32
  5604. Fowner TCARD32
  5605. Fpad2 TCARD32
  5606. Fpad3 TCARD32
  5607. Fpad4 TCARD32
  5608. Fpad5 TCARD32
  5609. Fpad6 TCARD32
  5610. }
  5611. type TxGrabPointerReply = struct {
  5612. Ftype1 TBYTE
  5613. Fstatus TBYTE
  5614. FsequenceNumber TCARD16
  5615. Flength TCARD32
  5616. Fpad1 TCARD32
  5617. Fpad2 TCARD32
  5618. Fpad3 TCARD32
  5619. Fpad4 TCARD32
  5620. Fpad5 TCARD32
  5621. Fpad6 TCARD32
  5622. }
  5623. type TxGrabKeyboardReply = struct {
  5624. Ftype1 TBYTE
  5625. Fstatus TBYTE
  5626. FsequenceNumber TCARD16
  5627. Flength TCARD32
  5628. Fpad1 TCARD32
  5629. Fpad2 TCARD32
  5630. Fpad3 TCARD32
  5631. Fpad4 TCARD32
  5632. Fpad5 TCARD32
  5633. Fpad6 TCARD32
  5634. }
  5635. type TxQueryPointerReply = struct {
  5636. Ftype1 TBYTE
  5637. FsameScreen TBOOL
  5638. FsequenceNumber TCARD16
  5639. Flength TCARD32
  5640. Froot TCARD32
  5641. Fchild TCARD32
  5642. FrootX TINT16
  5643. FrootY TINT16
  5644. FwinX TINT16
  5645. FwinY TINT16
  5646. Fmask TCARD16
  5647. Fpad1 TCARD16
  5648. Fpad TCARD32
  5649. }
  5650. type TxGetMotionEventsReply = struct {
  5651. Ftype1 TBYTE
  5652. Fpad1 TBYTE
  5653. FsequenceNumber TCARD16
  5654. Flength TCARD32
  5655. FnEvents TCARD32
  5656. Fpad2 TCARD32
  5657. Fpad3 TCARD32
  5658. Fpad4 TCARD32
  5659. Fpad5 TCARD32
  5660. Fpad6 TCARD32
  5661. }
  5662. type TxTranslateCoordsReply = struct {
  5663. Ftype1 TBYTE
  5664. FsameScreen TBOOL
  5665. FsequenceNumber TCARD16
  5666. Flength TCARD32
  5667. Fchild TCARD32
  5668. FdstX TINT16
  5669. FdstY TINT16
  5670. Fpad2 TCARD32
  5671. Fpad3 TCARD32
  5672. Fpad4 TCARD32
  5673. Fpad5 TCARD32
  5674. }
  5675. type TxGetInputFocusReply = struct {
  5676. Ftype1 TBYTE
  5677. FrevertTo TCARD8
  5678. FsequenceNumber TCARD16
  5679. Flength TCARD32
  5680. Ffocus TCARD32
  5681. Fpad1 TCARD32
  5682. Fpad2 TCARD32
  5683. Fpad3 TCARD32
  5684. Fpad4 TCARD32
  5685. Fpad5 TCARD32
  5686. }
  5687. type TxQueryKeymapReply = struct {
  5688. Ftype1 TBYTE
  5689. Fpad1 TBYTE
  5690. FsequenceNumber TCARD16
  5691. Flength TCARD32
  5692. Fmap1 [32]TBYTE
  5693. }
  5694. type TxQueryFontReply = struct {
  5695. Ftype1 TBYTE
  5696. Fpad1 TBYTE
  5697. FsequenceNumber TCARD16
  5698. Flength TCARD32
  5699. FminBounds TxCharInfo
  5700. Fwalign1 TCARD32
  5701. FmaxBounds TxCharInfo
  5702. Fwalign2 TCARD32
  5703. FminCharOrByte2 TCARD16
  5704. FmaxCharOrByte2 TCARD16
  5705. FdefaultChar TCARD16
  5706. FnFontProps TCARD16
  5707. FdrawDirection TCARD8
  5708. FminByte1 TCARD8
  5709. FmaxByte1 TCARD8
  5710. FallCharsExist TBOOL
  5711. FfontAscent TINT16
  5712. FfontDescent TINT16
  5713. FnCharInfos TCARD32
  5714. }
  5715. type T_xQueryFontReply = TxQueryFontReply
  5716. type TxQueryTextExtentsReply = struct {
  5717. Ftype1 TBYTE
  5718. FdrawDirection TCARD8
  5719. FsequenceNumber TCARD16
  5720. Flength TCARD32
  5721. FfontAscent TINT16
  5722. FfontDescent TINT16
  5723. FoverallAscent TINT16
  5724. FoverallDescent TINT16
  5725. FoverallWidth TINT32
  5726. FoverallLeft TINT32
  5727. FoverallRight TINT32
  5728. Fpad TCARD32
  5729. }
  5730. type TxListFontsReply = struct {
  5731. Ftype1 TBYTE
  5732. Fpad1 TBYTE
  5733. FsequenceNumber TCARD16
  5734. Flength TCARD32
  5735. FnFonts TCARD16
  5736. Fpad2 TCARD16
  5737. Fpad3 TCARD32
  5738. Fpad4 TCARD32
  5739. Fpad5 TCARD32
  5740. Fpad6 TCARD32
  5741. Fpad7 TCARD32
  5742. }
  5743. type TxListFontsWithInfoReply = struct {
  5744. Ftype1 TBYTE
  5745. FnameLength TCARD8
  5746. FsequenceNumber TCARD16
  5747. Flength TCARD32
  5748. FminBounds TxCharInfo
  5749. Fwalign1 TCARD32
  5750. FmaxBounds TxCharInfo
  5751. Fwalign2 TCARD32
  5752. FminCharOrByte2 TCARD16
  5753. FmaxCharOrByte2 TCARD16
  5754. FdefaultChar TCARD16
  5755. FnFontProps TCARD16
  5756. FdrawDirection TCARD8
  5757. FminByte1 TCARD8
  5758. FmaxByte1 TCARD8
  5759. FallCharsExist TBOOL
  5760. FfontAscent TINT16
  5761. FfontDescent TINT16
  5762. FnReplies TCARD32
  5763. }
  5764. type TxGetFontPathReply = struct {
  5765. Ftype1 TBYTE
  5766. Fpad1 TBYTE
  5767. FsequenceNumber TCARD16
  5768. Flength TCARD32
  5769. FnPaths TCARD16
  5770. Fpad2 TCARD16
  5771. Fpad3 TCARD32
  5772. Fpad4 TCARD32
  5773. Fpad5 TCARD32
  5774. Fpad6 TCARD32
  5775. Fpad7 TCARD32
  5776. }
  5777. type TxGetImageReply = struct {
  5778. Ftype1 TBYTE
  5779. Fdepth TCARD8
  5780. FsequenceNumber TCARD16
  5781. Flength TCARD32
  5782. Fvisual TCARD32
  5783. Fpad3 TCARD32
  5784. Fpad4 TCARD32
  5785. Fpad5 TCARD32
  5786. Fpad6 TCARD32
  5787. Fpad7 TCARD32
  5788. }
  5789. type TxListInstalledColormapsReply = struct {
  5790. Ftype1 TBYTE
  5791. Fpad1 TBYTE
  5792. FsequenceNumber TCARD16
  5793. Flength TCARD32
  5794. FnColormaps TCARD16
  5795. Fpad2 TCARD16
  5796. Fpad3 TCARD32
  5797. Fpad4 TCARD32
  5798. Fpad5 TCARD32
  5799. Fpad6 TCARD32
  5800. Fpad7 TCARD32
  5801. }
  5802. type TxAllocColorReply = struct {
  5803. Ftype1 TBYTE
  5804. Fpad1 TBYTE
  5805. FsequenceNumber TCARD16
  5806. Flength TCARD32
  5807. Fred TCARD16
  5808. Fgreen TCARD16
  5809. Fblue TCARD16
  5810. Fpad2 TCARD16
  5811. Fpixel TCARD32
  5812. Fpad3 TCARD32
  5813. Fpad4 TCARD32
  5814. Fpad5 TCARD32
  5815. }
  5816. type TxAllocNamedColorReply = struct {
  5817. Ftype1 TBYTE
  5818. Fpad1 TBYTE
  5819. FsequenceNumber TCARD16
  5820. Flength TCARD32
  5821. Fpixel TCARD32
  5822. FexactRed TCARD16
  5823. FexactGreen TCARD16
  5824. FexactBlue TCARD16
  5825. FscreenRed TCARD16
  5826. FscreenGreen TCARD16
  5827. FscreenBlue TCARD16
  5828. Fpad2 TCARD32
  5829. Fpad3 TCARD32
  5830. }
  5831. type TxAllocColorCellsReply = struct {
  5832. Ftype1 TBYTE
  5833. Fpad1 TBYTE
  5834. FsequenceNumber TCARD16
  5835. Flength TCARD32
  5836. FnPixels TCARD16
  5837. FnMasks TCARD16
  5838. Fpad3 TCARD32
  5839. Fpad4 TCARD32
  5840. Fpad5 TCARD32
  5841. Fpad6 TCARD32
  5842. Fpad7 TCARD32
  5843. }
  5844. type TxAllocColorPlanesReply = struct {
  5845. Ftype1 TBYTE
  5846. Fpad1 TBYTE
  5847. FsequenceNumber TCARD16
  5848. Flength TCARD32
  5849. FnPixels TCARD16
  5850. Fpad2 TCARD16
  5851. FredMask TCARD32
  5852. FgreenMask TCARD32
  5853. FblueMask TCARD32
  5854. Fpad3 TCARD32
  5855. Fpad4 TCARD32
  5856. }
  5857. type TxQueryColorsReply = struct {
  5858. Ftype1 TBYTE
  5859. Fpad1 TBYTE
  5860. FsequenceNumber TCARD16
  5861. Flength TCARD32
  5862. FnColors TCARD16
  5863. Fpad2 TCARD16
  5864. Fpad3 TCARD32
  5865. Fpad4 TCARD32
  5866. Fpad5 TCARD32
  5867. Fpad6 TCARD32
  5868. Fpad7 TCARD32
  5869. }
  5870. type TxLookupColorReply = struct {
  5871. Ftype1 TBYTE
  5872. Fpad1 TBYTE
  5873. FsequenceNumber TCARD16
  5874. Flength TCARD32
  5875. FexactRed TCARD16
  5876. FexactGreen TCARD16
  5877. FexactBlue TCARD16
  5878. FscreenRed TCARD16
  5879. FscreenGreen TCARD16
  5880. FscreenBlue TCARD16
  5881. Fpad3 TCARD32
  5882. Fpad4 TCARD32
  5883. Fpad5 TCARD32
  5884. }
  5885. type TxQueryBestSizeReply = struct {
  5886. Ftype1 TBYTE
  5887. Fpad1 TBYTE
  5888. FsequenceNumber TCARD16
  5889. Flength TCARD32
  5890. Fwidth TCARD16
  5891. Fheight TCARD16
  5892. Fpad3 TCARD32
  5893. Fpad4 TCARD32
  5894. Fpad5 TCARD32
  5895. Fpad6 TCARD32
  5896. Fpad7 TCARD32
  5897. }
  5898. type TxQueryExtensionReply = struct {
  5899. Ftype1 TBYTE
  5900. Fpad1 TBYTE
  5901. FsequenceNumber TCARD16
  5902. Flength TCARD32
  5903. Fpresent TBOOL
  5904. Fmajor_opcode TCARD8
  5905. Ffirst_event TCARD8
  5906. Ffirst_error TCARD8
  5907. Fpad3 TCARD32
  5908. Fpad4 TCARD32
  5909. Fpad5 TCARD32
  5910. Fpad6 TCARD32
  5911. Fpad7 TCARD32
  5912. }
  5913. type TxListExtensionsReply = struct {
  5914. Ftype1 TBYTE
  5915. FnExtensions TCARD8
  5916. FsequenceNumber TCARD16
  5917. Flength TCARD32
  5918. Fpad2 TCARD32
  5919. Fpad3 TCARD32
  5920. Fpad4 TCARD32
  5921. Fpad5 TCARD32
  5922. Fpad6 TCARD32
  5923. Fpad7 TCARD32
  5924. }
  5925. type TxSetMappingReply = struct {
  5926. Ftype1 TBYTE
  5927. Fsuccess TCARD8
  5928. FsequenceNumber TCARD16
  5929. Flength TCARD32
  5930. Fpad2 TCARD32
  5931. Fpad3 TCARD32
  5932. Fpad4 TCARD32
  5933. Fpad5 TCARD32
  5934. Fpad6 TCARD32
  5935. Fpad7 TCARD32
  5936. }
  5937. type TxSetPointerMappingReply = struct {
  5938. Ftype1 TBYTE
  5939. Fsuccess TCARD8
  5940. FsequenceNumber TCARD16
  5941. Flength TCARD32
  5942. Fpad2 TCARD32
  5943. Fpad3 TCARD32
  5944. Fpad4 TCARD32
  5945. Fpad5 TCARD32
  5946. Fpad6 TCARD32
  5947. Fpad7 TCARD32
  5948. }
  5949. type TxSetModifierMappingReply = struct {
  5950. Ftype1 TBYTE
  5951. Fsuccess TCARD8
  5952. FsequenceNumber TCARD16
  5953. Flength TCARD32
  5954. Fpad2 TCARD32
  5955. Fpad3 TCARD32
  5956. Fpad4 TCARD32
  5957. Fpad5 TCARD32
  5958. Fpad6 TCARD32
  5959. Fpad7 TCARD32
  5960. }
  5961. type TxGetPointerMappingReply = struct {
  5962. Ftype1 TBYTE
  5963. FnElts TCARD8
  5964. FsequenceNumber TCARD16
  5965. Flength TCARD32
  5966. Fpad2 TCARD32
  5967. Fpad3 TCARD32
  5968. Fpad4 TCARD32
  5969. Fpad5 TCARD32
  5970. Fpad6 TCARD32
  5971. Fpad7 TCARD32
  5972. }
  5973. type TxGetKeyboardMappingReply = struct {
  5974. Ftype1 TBYTE
  5975. FkeySymsPerKeyCode TCARD8
  5976. FsequenceNumber TCARD16
  5977. Flength TCARD32
  5978. Fpad2 TCARD32
  5979. Fpad3 TCARD32
  5980. Fpad4 TCARD32
  5981. Fpad5 TCARD32
  5982. Fpad6 TCARD32
  5983. Fpad7 TCARD32
  5984. }
  5985. type TxGetModifierMappingReply = struct {
  5986. Ftype1 TBYTE
  5987. FnumKeyPerModifier TCARD8
  5988. FsequenceNumber TCARD16
  5989. Flength TCARD32
  5990. Fpad1 TCARD32
  5991. Fpad2 TCARD32
  5992. Fpad3 TCARD32
  5993. Fpad4 TCARD32
  5994. Fpad5 TCARD32
  5995. Fpad6 TCARD32
  5996. }
  5997. type TxGetKeyboardControlReply = struct {
  5998. Ftype1 TBYTE
  5999. FglobalAutoRepeat TBOOL
  6000. FsequenceNumber TCARD16
  6001. Flength TCARD32
  6002. FledMask TCARD32
  6003. FkeyClickPercent TCARD8
  6004. FbellPercent TCARD8
  6005. FbellPitch TCARD16
  6006. FbellDuration TCARD16
  6007. Fpad TCARD16
  6008. Fmap1 [32]TBYTE
  6009. }
  6010. type TxGetPointerControlReply = struct {
  6011. Ftype1 TBYTE
  6012. Fpad1 TBYTE
  6013. FsequenceNumber TCARD16
  6014. Flength TCARD32
  6015. FaccelNumerator TCARD16
  6016. FaccelDenominator TCARD16
  6017. Fthreshold TCARD16
  6018. Fpad2 TCARD16
  6019. Fpad3 TCARD32
  6020. Fpad4 TCARD32
  6021. Fpad5 TCARD32
  6022. Fpad6 TCARD32
  6023. }
  6024. type TxGetScreenSaverReply = struct {
  6025. Ftype1 TBYTE
  6026. Fpad1 TBYTE
  6027. FsequenceNumber TCARD16
  6028. Flength TCARD32
  6029. Ftimeout TCARD16
  6030. Finterval TCARD16
  6031. FpreferBlanking TBOOL
  6032. FallowExposures TBOOL
  6033. Fpad2 TCARD16
  6034. Fpad3 TCARD32
  6035. Fpad4 TCARD32
  6036. Fpad5 TCARD32
  6037. Fpad6 TCARD32
  6038. }
  6039. type TxListHostsReply = struct {
  6040. Ftype1 TBYTE
  6041. Fenabled TBOOL
  6042. FsequenceNumber TCARD16
  6043. Flength TCARD32
  6044. FnHosts TCARD16
  6045. Fpad1 TCARD16
  6046. Fpad3 TCARD32
  6047. Fpad4 TCARD32
  6048. Fpad5 TCARD32
  6049. Fpad6 TCARD32
  6050. Fpad7 TCARD32
  6051. }
  6052. type TxError = struct {
  6053. Ftype1 TBYTE
  6054. FerrorCode TBYTE
  6055. FsequenceNumber TCARD16
  6056. FresourceID TCARD32
  6057. FminorCode TCARD16
  6058. FmajorCode TCARD8
  6059. Fpad1 TBYTE
  6060. Fpad3 TCARD32
  6061. Fpad4 TCARD32
  6062. Fpad5 TCARD32
  6063. Fpad6 TCARD32
  6064. Fpad7 TCARD32
  6065. }
  6066. type TxEvent = struct {
  6067. Fu struct {
  6068. FkeyButtonPointer [0]struct {
  6069. Fpad00 TCARD32
  6070. Ftime TCARD32
  6071. Froot TCARD32
  6072. Fevent TCARD32
  6073. Fchild TCARD32
  6074. FrootX TINT16
  6075. FrootY TINT16
  6076. FeventX TINT16
  6077. FeventY TINT16
  6078. Fstate TKeyButMask
  6079. FsameScreen TBOOL
  6080. Fpad1 TBYTE
  6081. }
  6082. FenterLeave [0]struct {
  6083. Fpad00 TCARD32
  6084. Ftime TCARD32
  6085. Froot TCARD32
  6086. Fevent TCARD32
  6087. Fchild TCARD32
  6088. FrootX TINT16
  6089. FrootY TINT16
  6090. FeventX TINT16
  6091. FeventY TINT16
  6092. Fstate TKeyButMask
  6093. Fmode TBYTE
  6094. Fflags TBYTE
  6095. }
  6096. Ffocus [0]struct {
  6097. Fpad00 TCARD32
  6098. Fwindow TCARD32
  6099. Fmode TBYTE
  6100. Fpad1 TBYTE
  6101. Fpad2 TBYTE
  6102. Fpad3 TBYTE
  6103. }
  6104. Fexpose [0]struct {
  6105. Fpad00 TCARD32
  6106. Fwindow TCARD32
  6107. Fx TCARD16
  6108. Fy TCARD16
  6109. Fwidth TCARD16
  6110. Fheight TCARD16
  6111. Fcount TCARD16
  6112. Fpad2 TCARD16
  6113. }
  6114. FgraphicsExposure [0]struct {
  6115. Fpad00 TCARD32
  6116. Fdrawable TCARD32
  6117. Fx TCARD16
  6118. Fy TCARD16
  6119. Fwidth TCARD16
  6120. Fheight TCARD16
  6121. FminorEvent TCARD16
  6122. Fcount TCARD16
  6123. FmajorEvent TBYTE
  6124. Fpad1 TBYTE
  6125. Fpad2 TBYTE
  6126. Fpad3 TBYTE
  6127. }
  6128. FnoExposure [0]struct {
  6129. Fpad00 TCARD32
  6130. Fdrawable TCARD32
  6131. FminorEvent TCARD16
  6132. FmajorEvent TBYTE
  6133. Fbpad TBYTE
  6134. }
  6135. Fvisibility [0]struct {
  6136. Fpad00 TCARD32
  6137. Fwindow TCARD32
  6138. Fstate TCARD8
  6139. Fpad1 TBYTE
  6140. Fpad2 TBYTE
  6141. Fpad3 TBYTE
  6142. }
  6143. FcreateNotify [0]struct {
  6144. Fpad00 TCARD32
  6145. Fparent TCARD32
  6146. Fwindow TCARD32
  6147. Fx TINT16
  6148. Fy TINT16
  6149. Fwidth TCARD16
  6150. Fheight TCARD16
  6151. FborderWidth TCARD16
  6152. Foverride TBOOL
  6153. Fbpad TBYTE
  6154. }
  6155. FdestroyNotify [0]struct {
  6156. Fpad00 TCARD32
  6157. Fevent TCARD32
  6158. Fwindow TCARD32
  6159. }
  6160. FunmapNotify [0]struct {
  6161. Fpad00 TCARD32
  6162. Fevent TCARD32
  6163. Fwindow TCARD32
  6164. FfromConfigure TBOOL
  6165. Fpad1 TBYTE
  6166. Fpad2 TBYTE
  6167. Fpad3 TBYTE
  6168. }
  6169. FmapNotify [0]struct {
  6170. Fpad00 TCARD32
  6171. Fevent TCARD32
  6172. Fwindow TCARD32
  6173. Foverride TBOOL
  6174. Fpad1 TBYTE
  6175. Fpad2 TBYTE
  6176. Fpad3 TBYTE
  6177. }
  6178. FmapRequest [0]struct {
  6179. Fpad00 TCARD32
  6180. Fparent TCARD32
  6181. Fwindow TCARD32
  6182. }
  6183. Freparent [0]struct {
  6184. Fpad00 TCARD32
  6185. Fevent TCARD32
  6186. Fwindow TCARD32
  6187. Fparent TCARD32
  6188. Fx TINT16
  6189. Fy TINT16
  6190. Foverride TBOOL
  6191. Fpad1 TBYTE
  6192. Fpad2 TBYTE
  6193. Fpad3 TBYTE
  6194. }
  6195. FconfigureNotify [0]struct {
  6196. Fpad00 TCARD32
  6197. Fevent TCARD32
  6198. Fwindow TCARD32
  6199. FaboveSibling TCARD32
  6200. Fx TINT16
  6201. Fy TINT16
  6202. Fwidth TCARD16
  6203. Fheight TCARD16
  6204. FborderWidth TCARD16
  6205. Foverride TBOOL
  6206. Fbpad TBYTE
  6207. }
  6208. FconfigureRequest [0]struct {
  6209. Fpad00 TCARD32
  6210. Fparent TCARD32
  6211. Fwindow TCARD32
  6212. Fsibling TCARD32
  6213. Fx TINT16
  6214. Fy TINT16
  6215. Fwidth TCARD16
  6216. Fheight TCARD16
  6217. FborderWidth TCARD16
  6218. FvalueMask TCARD16
  6219. Fpad1 TCARD32
  6220. }
  6221. Fgravity [0]struct {
  6222. Fpad00 TCARD32
  6223. Fevent TCARD32
  6224. Fwindow TCARD32
  6225. Fx TINT16
  6226. Fy TINT16
  6227. Fpad1 TCARD32
  6228. Fpad2 TCARD32
  6229. Fpad3 TCARD32
  6230. Fpad4 TCARD32
  6231. }
  6232. FresizeRequest [0]struct {
  6233. Fpad00 TCARD32
  6234. Fwindow TCARD32
  6235. Fwidth TCARD16
  6236. Fheight TCARD16
  6237. }
  6238. Fcirculate [0]struct {
  6239. Fpad00 TCARD32
  6240. Fevent TCARD32
  6241. Fwindow TCARD32
  6242. Fparent TCARD32
  6243. Fplace TBYTE
  6244. Fpad1 TBYTE
  6245. Fpad2 TBYTE
  6246. Fpad3 TBYTE
  6247. }
  6248. Fproperty [0]struct {
  6249. Fpad00 TCARD32
  6250. Fwindow TCARD32
  6251. Fatom TCARD32
  6252. Ftime TCARD32
  6253. Fstate TBYTE
  6254. Fpad1 TBYTE
  6255. Fpad2 TCARD16
  6256. }
  6257. FselectionClear [0]struct {
  6258. Fpad00 TCARD32
  6259. Ftime TCARD32
  6260. Fwindow TCARD32
  6261. Fatom TCARD32
  6262. }
  6263. FselectionRequest [0]struct {
  6264. Fpad00 TCARD32
  6265. Ftime TCARD32
  6266. Fowner TCARD32
  6267. Frequestor TCARD32
  6268. Fselection TCARD32
  6269. Ftarget TCARD32
  6270. Fproperty TCARD32
  6271. }
  6272. FselectionNotify [0]struct {
  6273. Fpad00 TCARD32
  6274. Ftime TCARD32
  6275. Frequestor TCARD32
  6276. Fselection TCARD32
  6277. Ftarget TCARD32
  6278. Fproperty TCARD32
  6279. }
  6280. Fcolormap [0]struct {
  6281. Fpad00 TCARD32
  6282. Fwindow TCARD32
  6283. Fcolormap TCARD32
  6284. Fnew1 TBOOL
  6285. Fstate TBYTE
  6286. Fpad1 TBYTE
  6287. Fpad2 TBYTE
  6288. }
  6289. FmappingNotify [0]struct {
  6290. Fpad00 TCARD32
  6291. Frequest TCARD8
  6292. FfirstKeyCode TCARD8
  6293. Fcount TCARD8
  6294. Fpad1 TBYTE
  6295. }
  6296. FclientMessage [0]struct {
  6297. Fpad00 TCARD32
  6298. Fwindow TCARD32
  6299. Fu struct {
  6300. Fs [0]struct {
  6301. Ftype1 TCARD32
  6302. Fshorts0 TINT16
  6303. Fshorts1 TINT16
  6304. Fshorts2 TINT16
  6305. Fshorts3 TINT16
  6306. Fshorts4 TINT16
  6307. Fshorts5 TINT16
  6308. Fshorts6 TINT16
  6309. Fshorts7 TINT16
  6310. Fshorts8 TINT16
  6311. Fshorts9 TINT16
  6312. }
  6313. Fb [0]struct {
  6314. Ftype1 TCARD32
  6315. Fbytes [20]TINT8
  6316. }
  6317. Fl struct {
  6318. Ftype1 TCARD32
  6319. Flongs0 TINT32
  6320. Flongs1 TINT32
  6321. Flongs2 TINT32
  6322. Flongs3 TINT32
  6323. Flongs4 TINT32
  6324. }
  6325. }
  6326. }
  6327. Fu struct {
  6328. Ftype1 TBYTE
  6329. Fdetail TBYTE
  6330. FsequenceNumber TCARD16
  6331. }
  6332. F__ccgo_pad26 [28]byte
  6333. }
  6334. }
  6335. type T_xEvent = TxEvent
  6336. type TxGenericEvent = struct {
  6337. Ftype1 TBYTE
  6338. Fextension TCARD8
  6339. FsequenceNumber TCARD16
  6340. Flength TCARD32
  6341. Fevtype TCARD16
  6342. Fpad2 TCARD16
  6343. Fpad3 TCARD32
  6344. Fpad4 TCARD32
  6345. Fpad5 TCARD32
  6346. Fpad6 TCARD32
  6347. Fpad7 TCARD32
  6348. }
  6349. type TxKeymapEvent = struct {
  6350. Ftype1 TBYTE
  6351. Fmap1 [31]TBYTE
  6352. }
  6353. type TxReply = struct {
  6354. Fgeom [0]TxGetGeometryReply
  6355. Ftree [0]TxQueryTreeReply
  6356. Fatom [0]TxInternAtomReply
  6357. FatomName [0]TxGetAtomNameReply
  6358. Fproperty [0]TxGetPropertyReply
  6359. FlistProperties [0]TxListPropertiesReply
  6360. Fselection [0]TxGetSelectionOwnerReply
  6361. FgrabPointer [0]TxGrabPointerReply
  6362. FgrabKeyboard [0]TxGrabKeyboardReply
  6363. Fpointer [0]TxQueryPointerReply
  6364. FmotionEvents [0]TxGetMotionEventsReply
  6365. Fcoords [0]TxTranslateCoordsReply
  6366. FinputFocus [0]TxGetInputFocusReply
  6367. FtextExtents [0]TxQueryTextExtentsReply
  6368. Ffonts [0]TxListFontsReply
  6369. FfontPath [0]TxGetFontPathReply
  6370. Fimage [0]TxGetImageReply
  6371. Fcolormaps [0]TxListInstalledColormapsReply
  6372. FallocColor [0]TxAllocColorReply
  6373. FallocNamedColor [0]TxAllocNamedColorReply
  6374. FcolorCells [0]TxAllocColorCellsReply
  6375. FcolorPlanes [0]TxAllocColorPlanesReply
  6376. Fcolors [0]TxQueryColorsReply
  6377. FlookupColor [0]TxLookupColorReply
  6378. FbestSize [0]TxQueryBestSizeReply
  6379. Fextension [0]TxQueryExtensionReply
  6380. Fextensions [0]TxListExtensionsReply
  6381. FsetModifierMapping [0]TxSetModifierMappingReply
  6382. FgetModifierMapping [0]TxGetModifierMappingReply
  6383. FsetPointerMapping [0]TxSetPointerMappingReply
  6384. FgetKeyboardMapping [0]TxGetKeyboardMappingReply
  6385. FgetPointerMapping [0]TxGetPointerMappingReply
  6386. FpointerControl [0]TxGetPointerControlReply
  6387. FscreenSaver [0]TxGetScreenSaverReply
  6388. Fhosts [0]TxListHostsReply
  6389. Ferror1 [0]TxError
  6390. Fevent [0]TxEvent
  6391. Fgeneric TxGenericReply
  6392. }
  6393. type TxReq = struct {
  6394. FreqType TCARD8
  6395. Fdata TCARD8
  6396. Flength TCARD16
  6397. }
  6398. type T_xReq = TxReq
  6399. type TxResourceReq = struct {
  6400. FreqType TCARD8
  6401. Fpad TBYTE
  6402. Flength TCARD16
  6403. Fid TCARD32
  6404. }
  6405. type TxCreateWindowReq = struct {
  6406. FreqType TCARD8
  6407. Fdepth TCARD8
  6408. Flength TCARD16
  6409. Fwid TCARD32
  6410. Fparent TCARD32
  6411. Fx TINT16
  6412. Fy TINT16
  6413. Fwidth TCARD16
  6414. Fheight TCARD16
  6415. FborderWidth TCARD16
  6416. Fclass TCARD16
  6417. Fvisual TCARD32
  6418. Fmask TCARD32
  6419. }
  6420. type TxChangeWindowAttributesReq = struct {
  6421. FreqType TCARD8
  6422. Fpad TBYTE
  6423. Flength TCARD16
  6424. Fwindow TCARD32
  6425. FvalueMask TCARD32
  6426. }
  6427. type TxChangeSaveSetReq = struct {
  6428. FreqType TCARD8
  6429. Fmode TBYTE
  6430. Flength TCARD16
  6431. Fwindow TCARD32
  6432. }
  6433. type TxReparentWindowReq = struct {
  6434. FreqType TCARD8
  6435. Fpad TBYTE
  6436. Flength TCARD16
  6437. Fwindow TCARD32
  6438. Fparent TCARD32
  6439. Fx TINT16
  6440. Fy TINT16
  6441. }
  6442. type TxConfigureWindowReq = struct {
  6443. FreqType TCARD8
  6444. Fpad TCARD8
  6445. Flength TCARD16
  6446. Fwindow TCARD32
  6447. Fmask TCARD16
  6448. Fpad2 TCARD16
  6449. }
  6450. type TxCirculateWindowReq = struct {
  6451. FreqType TCARD8
  6452. Fdirection TCARD8
  6453. Flength TCARD16
  6454. Fwindow TCARD32
  6455. }
  6456. type TxInternAtomReq = struct {
  6457. FreqType TCARD8
  6458. FonlyIfExists TBOOL
  6459. Flength TCARD16
  6460. Fnbytes TCARD16
  6461. Fpad TCARD16
  6462. }
  6463. type TxChangePropertyReq = struct {
  6464. FreqType TCARD8
  6465. Fmode TCARD8
  6466. Flength TCARD16
  6467. Fwindow TCARD32
  6468. Fproperty TCARD32
  6469. Ftype1 TCARD32
  6470. Fformat TCARD8
  6471. Fpad [3]TBYTE
  6472. FnUnits TCARD32
  6473. }
  6474. type TxDeletePropertyReq = struct {
  6475. FreqType TCARD8
  6476. Fpad TBYTE
  6477. Flength TCARD16
  6478. Fwindow TCARD32
  6479. Fproperty TCARD32
  6480. }
  6481. type TxGetPropertyReq = struct {
  6482. FreqType TCARD8
  6483. Fdelete1 TBOOL
  6484. Flength TCARD16
  6485. Fwindow TCARD32
  6486. Fproperty TCARD32
  6487. Ftype1 TCARD32
  6488. FlongOffset TCARD32
  6489. FlongLength TCARD32
  6490. }
  6491. type TxSetSelectionOwnerReq = struct {
  6492. FreqType TCARD8
  6493. Fpad TBYTE
  6494. Flength TCARD16
  6495. Fwindow TCARD32
  6496. Fselection TCARD32
  6497. Ftime TCARD32
  6498. }
  6499. type TxConvertSelectionReq = struct {
  6500. FreqType TCARD8
  6501. Fpad TBYTE
  6502. Flength TCARD16
  6503. Frequestor TCARD32
  6504. Fselection TCARD32
  6505. Ftarget TCARD32
  6506. Fproperty TCARD32
  6507. Ftime TCARD32
  6508. }
  6509. type TxSendEventReq = struct {
  6510. FreqType TCARD8
  6511. Fpropagate TBOOL
  6512. Flength TCARD16
  6513. Fdestination TCARD32
  6514. FeventMask TCARD32
  6515. Fevent TxEvent
  6516. }
  6517. type TxGrabPointerReq = struct {
  6518. FreqType TCARD8
  6519. FownerEvents TBOOL
  6520. Flength TCARD16
  6521. FgrabWindow TCARD32
  6522. FeventMask TCARD16
  6523. FpointerMode TBYTE
  6524. FkeyboardMode TBYTE
  6525. FconfineTo TCARD32
  6526. Fcursor TCARD32
  6527. Ftime TCARD32
  6528. }
  6529. type TxGrabButtonReq = struct {
  6530. FreqType TCARD8
  6531. FownerEvents TBOOL
  6532. Flength TCARD16
  6533. FgrabWindow TCARD32
  6534. FeventMask TCARD16
  6535. FpointerMode TBYTE
  6536. FkeyboardMode TBYTE
  6537. FconfineTo TCARD32
  6538. Fcursor TCARD32
  6539. Fbutton TCARD8
  6540. Fpad TBYTE
  6541. Fmodifiers TCARD16
  6542. }
  6543. type TxUngrabButtonReq = struct {
  6544. FreqType TCARD8
  6545. Fbutton TCARD8
  6546. Flength TCARD16
  6547. FgrabWindow TCARD32
  6548. Fmodifiers TCARD16
  6549. Fpad TCARD16
  6550. }
  6551. type TxChangeActivePointerGrabReq = struct {
  6552. FreqType TCARD8
  6553. Fpad TBYTE
  6554. Flength TCARD16
  6555. Fcursor TCARD32
  6556. Ftime TCARD32
  6557. FeventMask TCARD16
  6558. Fpad2 TCARD16
  6559. }
  6560. type TxGrabKeyboardReq = struct {
  6561. FreqType TCARD8
  6562. FownerEvents TBOOL
  6563. Flength TCARD16
  6564. FgrabWindow TCARD32
  6565. Ftime TCARD32
  6566. FpointerMode TBYTE
  6567. FkeyboardMode TBYTE
  6568. Fpad TCARD16
  6569. }
  6570. type TxGrabKeyReq = struct {
  6571. FreqType TCARD8
  6572. FownerEvents TBOOL
  6573. Flength TCARD16
  6574. FgrabWindow TCARD32
  6575. Fmodifiers TCARD16
  6576. Fkey TCARD8
  6577. FpointerMode TBYTE
  6578. FkeyboardMode TBYTE
  6579. Fpad1 TBYTE
  6580. Fpad2 TBYTE
  6581. Fpad3 TBYTE
  6582. }
  6583. type TxUngrabKeyReq = struct {
  6584. FreqType TCARD8
  6585. Fkey TCARD8
  6586. Flength TCARD16
  6587. FgrabWindow TCARD32
  6588. Fmodifiers TCARD16
  6589. Fpad TCARD16
  6590. }
  6591. type TxAllowEventsReq = struct {
  6592. FreqType TCARD8
  6593. Fmode TCARD8
  6594. Flength TCARD16
  6595. Ftime TCARD32
  6596. }
  6597. type TxGetMotionEventsReq = struct {
  6598. FreqType TCARD8
  6599. Fpad TBYTE
  6600. Flength TCARD16
  6601. Fwindow TCARD32
  6602. Fstart TCARD32
  6603. Fstop TCARD32
  6604. }
  6605. type TxTranslateCoordsReq = struct {
  6606. FreqType TCARD8
  6607. Fpad TBYTE
  6608. Flength TCARD16
  6609. FsrcWid TCARD32
  6610. FdstWid TCARD32
  6611. FsrcX TINT16
  6612. FsrcY TINT16
  6613. }
  6614. type TxWarpPointerReq = struct {
  6615. FreqType TCARD8
  6616. Fpad TBYTE
  6617. Flength TCARD16
  6618. FsrcWid TCARD32
  6619. FdstWid TCARD32
  6620. FsrcX TINT16
  6621. FsrcY TINT16
  6622. FsrcWidth TCARD16
  6623. FsrcHeight TCARD16
  6624. FdstX TINT16
  6625. FdstY TINT16
  6626. }
  6627. type TxSetInputFocusReq = struct {
  6628. FreqType TCARD8
  6629. FrevertTo TCARD8
  6630. Flength TCARD16
  6631. Ffocus TCARD32
  6632. Ftime TCARD32
  6633. }
  6634. type TxOpenFontReq = struct {
  6635. FreqType TCARD8
  6636. Fpad TBYTE
  6637. Flength TCARD16
  6638. Ffid TCARD32
  6639. Fnbytes TCARD16
  6640. Fpad1 TBYTE
  6641. Fpad2 TBYTE
  6642. }
  6643. type TxQueryTextExtentsReq = struct {
  6644. FreqType TCARD8
  6645. FoddLength TBOOL
  6646. Flength TCARD16
  6647. Ffid TCARD32
  6648. }
  6649. type TxListFontsReq = struct {
  6650. FreqType TCARD8
  6651. Fpad TBYTE
  6652. Flength TCARD16
  6653. FmaxNames TCARD16
  6654. Fnbytes TCARD16
  6655. }
  6656. type TxListFontsWithInfoReq = struct {
  6657. FreqType TCARD8
  6658. Fpad TBYTE
  6659. Flength TCARD16
  6660. FmaxNames TCARD16
  6661. Fnbytes TCARD16
  6662. }
  6663. type TxSetFontPathReq = struct {
  6664. FreqType TCARD8
  6665. Fpad TBYTE
  6666. Flength TCARD16
  6667. FnFonts TCARD16
  6668. Fpad1 TBYTE
  6669. Fpad2 TBYTE
  6670. }
  6671. type TxCreatePixmapReq = struct {
  6672. FreqType TCARD8
  6673. Fdepth TCARD8
  6674. Flength TCARD16
  6675. Fpid TCARD32
  6676. Fdrawable TCARD32
  6677. Fwidth TCARD16
  6678. Fheight TCARD16
  6679. }
  6680. type TxCreateGCReq = struct {
  6681. FreqType TCARD8
  6682. Fpad TBYTE
  6683. Flength TCARD16
  6684. Fgc TCARD32
  6685. Fdrawable TCARD32
  6686. Fmask TCARD32
  6687. }
  6688. type TxChangeGCReq = struct {
  6689. FreqType TCARD8
  6690. Fpad TBYTE
  6691. Flength TCARD16
  6692. Fgc TCARD32
  6693. Fmask TCARD32
  6694. }
  6695. type TxCopyGCReq = struct {
  6696. FreqType TCARD8
  6697. Fpad TBYTE
  6698. Flength TCARD16
  6699. FsrcGC TCARD32
  6700. FdstGC TCARD32
  6701. Fmask TCARD32
  6702. }
  6703. type TxSetDashesReq = struct {
  6704. FreqType TCARD8
  6705. Fpad TBYTE
  6706. Flength TCARD16
  6707. Fgc TCARD32
  6708. FdashOffset TCARD16
  6709. FnDashes TCARD16
  6710. }
  6711. type TxSetClipRectanglesReq = struct {
  6712. FreqType TCARD8
  6713. Fordering TBYTE
  6714. Flength TCARD16
  6715. Fgc TCARD32
  6716. FxOrigin TINT16
  6717. FyOrigin TINT16
  6718. }
  6719. type TxClearAreaReq = struct {
  6720. FreqType TCARD8
  6721. Fexposures TBOOL
  6722. Flength TCARD16
  6723. Fwindow TCARD32
  6724. Fx TINT16
  6725. Fy TINT16
  6726. Fwidth TCARD16
  6727. Fheight TCARD16
  6728. }
  6729. type TxCopyAreaReq = struct {
  6730. FreqType TCARD8
  6731. Fpad TBYTE
  6732. Flength TCARD16
  6733. FsrcDrawable TCARD32
  6734. FdstDrawable TCARD32
  6735. Fgc TCARD32
  6736. FsrcX TINT16
  6737. FsrcY TINT16
  6738. FdstX TINT16
  6739. FdstY TINT16
  6740. Fwidth TCARD16
  6741. Fheight TCARD16
  6742. }
  6743. type TxCopyPlaneReq = struct {
  6744. FreqType TCARD8
  6745. Fpad TBYTE
  6746. Flength TCARD16
  6747. FsrcDrawable TCARD32
  6748. FdstDrawable TCARD32
  6749. Fgc TCARD32
  6750. FsrcX TINT16
  6751. FsrcY TINT16
  6752. FdstX TINT16
  6753. FdstY TINT16
  6754. Fwidth TCARD16
  6755. Fheight TCARD16
  6756. FbitPlane TCARD32
  6757. }
  6758. type TxPolyPointReq = struct {
  6759. FreqType TCARD8
  6760. FcoordMode TBYTE
  6761. Flength TCARD16
  6762. Fdrawable TCARD32
  6763. Fgc TCARD32
  6764. }
  6765. type TxPolyLineReq = struct {
  6766. FreqType TCARD8
  6767. FcoordMode TBYTE
  6768. Flength TCARD16
  6769. Fdrawable TCARD32
  6770. Fgc TCARD32
  6771. }
  6772. type TxPolySegmentReq = struct {
  6773. FreqType TCARD8
  6774. Fpad TBYTE
  6775. Flength TCARD16
  6776. Fdrawable TCARD32
  6777. Fgc TCARD32
  6778. }
  6779. type TxPolyArcReq = struct {
  6780. FreqType TCARD8
  6781. Fpad TBYTE
  6782. Flength TCARD16
  6783. Fdrawable TCARD32
  6784. Fgc TCARD32
  6785. }
  6786. type TxPolyRectangleReq = struct {
  6787. FreqType TCARD8
  6788. Fpad TBYTE
  6789. Flength TCARD16
  6790. Fdrawable TCARD32
  6791. Fgc TCARD32
  6792. }
  6793. type TxPolyFillRectangleReq = struct {
  6794. FreqType TCARD8
  6795. Fpad TBYTE
  6796. Flength TCARD16
  6797. Fdrawable TCARD32
  6798. Fgc TCARD32
  6799. }
  6800. type TxPolyFillArcReq = struct {
  6801. FreqType TCARD8
  6802. Fpad TBYTE
  6803. Flength TCARD16
  6804. Fdrawable TCARD32
  6805. Fgc TCARD32
  6806. }
  6807. type TxFillPolyReq = struct {
  6808. FreqType TCARD8
  6809. Fpad TBYTE
  6810. Flength TCARD16
  6811. Fdrawable TCARD32
  6812. Fgc TCARD32
  6813. Fshape TBYTE
  6814. FcoordMode TBYTE
  6815. Fpad1 TCARD16
  6816. }
  6817. type T_FillPolyReq = TxFillPolyReq
  6818. type TxPutImageReq = struct {
  6819. FreqType TCARD8
  6820. Fformat TCARD8
  6821. Flength TCARD16
  6822. Fdrawable TCARD32
  6823. Fgc TCARD32
  6824. Fwidth TCARD16
  6825. Fheight TCARD16
  6826. FdstX TINT16
  6827. FdstY TINT16
  6828. FleftPad TCARD8
  6829. Fdepth TCARD8
  6830. Fpad TCARD16
  6831. }
  6832. type T_PutImageReq = TxPutImageReq
  6833. type TxGetImageReq = struct {
  6834. FreqType TCARD8
  6835. Fformat TCARD8
  6836. Flength TCARD16
  6837. Fdrawable TCARD32
  6838. Fx TINT16
  6839. Fy TINT16
  6840. Fwidth TCARD16
  6841. Fheight TCARD16
  6842. FplaneMask TCARD32
  6843. }
  6844. type TxPolyTextReq = struct {
  6845. FreqType TCARD8
  6846. Fpad TCARD8
  6847. Flength TCARD16
  6848. Fdrawable TCARD32
  6849. Fgc TCARD32
  6850. Fx TINT16
  6851. Fy TINT16
  6852. }
  6853. type TxPolyText8Req = struct {
  6854. FreqType TCARD8
  6855. Fpad TCARD8
  6856. Flength TCARD16
  6857. Fdrawable TCARD32
  6858. Fgc TCARD32
  6859. Fx TINT16
  6860. Fy TINT16
  6861. }
  6862. type TxPolyText16Req = struct {
  6863. FreqType TCARD8
  6864. Fpad TCARD8
  6865. Flength TCARD16
  6866. Fdrawable TCARD32
  6867. Fgc TCARD32
  6868. Fx TINT16
  6869. Fy TINT16
  6870. }
  6871. type TxImageTextReq = struct {
  6872. FreqType TCARD8
  6873. FnChars TBYTE
  6874. Flength TCARD16
  6875. Fdrawable TCARD32
  6876. Fgc TCARD32
  6877. Fx TINT16
  6878. Fy TINT16
  6879. }
  6880. type TxImageText8Req = struct {
  6881. FreqType TCARD8
  6882. FnChars TBYTE
  6883. Flength TCARD16
  6884. Fdrawable TCARD32
  6885. Fgc TCARD32
  6886. Fx TINT16
  6887. Fy TINT16
  6888. }
  6889. type TxImageText16Req = struct {
  6890. FreqType TCARD8
  6891. FnChars TBYTE
  6892. Flength TCARD16
  6893. Fdrawable TCARD32
  6894. Fgc TCARD32
  6895. Fx TINT16
  6896. Fy TINT16
  6897. }
  6898. type TxCreateColormapReq = struct {
  6899. FreqType TCARD8
  6900. Falloc TBYTE
  6901. Flength TCARD16
  6902. Fmid TCARD32
  6903. Fwindow TCARD32
  6904. Fvisual TCARD32
  6905. }
  6906. type TxCopyColormapAndFreeReq = struct {
  6907. FreqType TCARD8
  6908. Fpad TBYTE
  6909. Flength TCARD16
  6910. Fmid TCARD32
  6911. FsrcCmap TCARD32
  6912. }
  6913. type TxAllocColorReq = struct {
  6914. FreqType TCARD8
  6915. Fpad TBYTE
  6916. Flength TCARD16
  6917. Fcmap TCARD32
  6918. Fred TCARD16
  6919. Fgreen TCARD16
  6920. Fblue TCARD16
  6921. Fpad2 TCARD16
  6922. }
  6923. type TxAllocNamedColorReq = struct {
  6924. FreqType TCARD8
  6925. Fpad TBYTE
  6926. Flength TCARD16
  6927. Fcmap TCARD32
  6928. Fnbytes TCARD16
  6929. Fpad1 TBYTE
  6930. Fpad2 TBYTE
  6931. }
  6932. type TxAllocColorCellsReq = struct {
  6933. FreqType TCARD8
  6934. Fcontiguous TBOOL
  6935. Flength TCARD16
  6936. Fcmap TCARD32
  6937. Fcolors TCARD16
  6938. Fplanes TCARD16
  6939. }
  6940. type TxAllocColorPlanesReq = struct {
  6941. FreqType TCARD8
  6942. Fcontiguous TBOOL
  6943. Flength TCARD16
  6944. Fcmap TCARD32
  6945. Fcolors TCARD16
  6946. Fred TCARD16
  6947. Fgreen TCARD16
  6948. Fblue TCARD16
  6949. }
  6950. type TxFreeColorsReq = struct {
  6951. FreqType TCARD8
  6952. Fpad TBYTE
  6953. Flength TCARD16
  6954. Fcmap TCARD32
  6955. FplaneMask TCARD32
  6956. }
  6957. type TxStoreColorsReq = struct {
  6958. FreqType TCARD8
  6959. Fpad TBYTE
  6960. Flength TCARD16
  6961. Fcmap TCARD32
  6962. }
  6963. type TxStoreNamedColorReq = struct {
  6964. FreqType TCARD8
  6965. Fflags TCARD8
  6966. Flength TCARD16
  6967. Fcmap TCARD32
  6968. Fpixel TCARD32
  6969. Fnbytes TCARD16
  6970. Fpad1 TBYTE
  6971. Fpad2 TBYTE
  6972. }
  6973. type TxQueryColorsReq = struct {
  6974. FreqType TCARD8
  6975. Fpad TBYTE
  6976. Flength TCARD16
  6977. Fcmap TCARD32
  6978. }
  6979. type TxLookupColorReq = struct {
  6980. FreqType TCARD8
  6981. Fpad TBYTE
  6982. Flength TCARD16
  6983. Fcmap TCARD32
  6984. Fnbytes TCARD16
  6985. Fpad1 TBYTE
  6986. Fpad2 TBYTE
  6987. }
  6988. type TxCreateCursorReq = struct {
  6989. FreqType TCARD8
  6990. Fpad TBYTE
  6991. Flength TCARD16
  6992. Fcid TCARD32
  6993. Fsource TCARD32
  6994. Fmask TCARD32
  6995. FforeRed TCARD16
  6996. FforeGreen TCARD16
  6997. FforeBlue TCARD16
  6998. FbackRed TCARD16
  6999. FbackGreen TCARD16
  7000. FbackBlue TCARD16
  7001. Fx TCARD16
  7002. Fy TCARD16
  7003. }
  7004. type TxCreateGlyphCursorReq = struct {
  7005. FreqType TCARD8
  7006. Fpad TBYTE
  7007. Flength TCARD16
  7008. Fcid TCARD32
  7009. Fsource TCARD32
  7010. Fmask TCARD32
  7011. FsourceChar TCARD16
  7012. FmaskChar TCARD16
  7013. FforeRed TCARD16
  7014. FforeGreen TCARD16
  7015. FforeBlue TCARD16
  7016. FbackRed TCARD16
  7017. FbackGreen TCARD16
  7018. FbackBlue TCARD16
  7019. }
  7020. type TxRecolorCursorReq = struct {
  7021. FreqType TCARD8
  7022. Fpad TBYTE
  7023. Flength TCARD16
  7024. Fcursor TCARD32
  7025. FforeRed TCARD16
  7026. FforeGreen TCARD16
  7027. FforeBlue TCARD16
  7028. FbackRed TCARD16
  7029. FbackGreen TCARD16
  7030. FbackBlue TCARD16
  7031. }
  7032. type TxQueryBestSizeReq = struct {
  7033. FreqType TCARD8
  7034. Fclass TCARD8
  7035. Flength TCARD16
  7036. Fdrawable TCARD32
  7037. Fwidth TCARD16
  7038. Fheight TCARD16
  7039. }
  7040. type TxQueryExtensionReq = struct {
  7041. FreqType TCARD8
  7042. Fpad TBYTE
  7043. Flength TCARD16
  7044. Fnbytes TCARD16
  7045. Fpad1 TBYTE
  7046. Fpad2 TBYTE
  7047. }
  7048. type TxSetModifierMappingReq = struct {
  7049. FreqType TCARD8
  7050. FnumKeyPerModifier TCARD8
  7051. Flength TCARD16
  7052. }
  7053. type TxSetPointerMappingReq = struct {
  7054. FreqType TCARD8
  7055. FnElts TCARD8
  7056. Flength TCARD16
  7057. }
  7058. type TxGetKeyboardMappingReq = struct {
  7059. FreqType TCARD8
  7060. Fpad TBYTE
  7061. Flength TCARD16
  7062. FfirstKeyCode TCARD8
  7063. Fcount TCARD8
  7064. Fpad1 TCARD16
  7065. }
  7066. type TxChangeKeyboardMappingReq = struct {
  7067. FreqType TCARD8
  7068. FkeyCodes TCARD8
  7069. Flength TCARD16
  7070. FfirstKeyCode TCARD8
  7071. FkeySymsPerKeyCode TCARD8
  7072. Fpad1 TCARD16
  7073. }
  7074. type TxChangeKeyboardControlReq = struct {
  7075. FreqType TCARD8
  7076. Fpad TBYTE
  7077. Flength TCARD16
  7078. Fmask TCARD32
  7079. }
  7080. type TxBellReq = struct {
  7081. FreqType TCARD8
  7082. Fpercent TINT8
  7083. Flength TCARD16
  7084. }
  7085. type TxChangePointerControlReq = struct {
  7086. FreqType TCARD8
  7087. Fpad TBYTE
  7088. Flength TCARD16
  7089. FaccelNum TINT16
  7090. FaccelDenum TINT16
  7091. Fthreshold TINT16
  7092. FdoAccel TBOOL
  7093. FdoThresh TBOOL
  7094. }
  7095. type TxSetScreenSaverReq = struct {
  7096. FreqType TCARD8
  7097. Fpad TBYTE
  7098. Flength TCARD16
  7099. Ftimeout TINT16
  7100. Finterval TINT16
  7101. FpreferBlank TBYTE
  7102. FallowExpose TBYTE
  7103. Fpad2 TCARD16
  7104. }
  7105. type TxChangeHostsReq = struct {
  7106. FreqType TCARD8
  7107. Fmode TBYTE
  7108. Flength TCARD16
  7109. FhostFamily TCARD8
  7110. Fpad TBYTE
  7111. FhostLength TCARD16
  7112. }
  7113. type TxListHostsReq = struct {
  7114. FreqType TCARD8
  7115. Fpad TBYTE
  7116. Flength TCARD16
  7117. }
  7118. type TxChangeModeReq = struct {
  7119. FreqType TCARD8
  7120. Fmode TBYTE
  7121. Flength TCARD16
  7122. }
  7123. type TxSetAccessControlReq = struct {
  7124. FreqType TCARD8
  7125. Fmode TBYTE
  7126. Flength TCARD16
  7127. }
  7128. type TxSetCloseDownModeReq = struct {
  7129. FreqType TCARD8
  7130. Fmode TBYTE
  7131. Flength TCARD16
  7132. }
  7133. type TxForceScreenSaverReq = struct {
  7134. FreqType TCARD8
  7135. Fmode TBYTE
  7136. Flength TCARD16
  7137. }
  7138. type TxRotatePropertiesReq = struct {
  7139. FreqType TCARD8
  7140. Fpad TBYTE
  7141. Flength TCARD16
  7142. Fwindow TCARD32
  7143. FnAtoms TCARD16
  7144. FnPositions TINT16
  7145. }
  7146. type Tsched_param = struct {
  7147. Fsched_priority int32
  7148. F__reserved1 int32
  7149. F__reserved2 [4]int32
  7150. F__reserved3 int32
  7151. }
  7152. type Tcpu_set_t = struct {
  7153. F__bits [32]uint32
  7154. }
  7155. type Ttm = struct {
  7156. Ftm_sec int32
  7157. Ftm_min int32
  7158. Ftm_hour int32
  7159. Ftm_mday int32
  7160. Ftm_mon int32
  7161. Ftm_year int32
  7162. Ftm_wday int32
  7163. Ftm_yday int32
  7164. Ftm_isdst int32
  7165. Ftm_gmtoff int32
  7166. Ftm_zone uintptr
  7167. }
  7168. type Titimerspec = struct {
  7169. F__ccgo_align [0]uint32
  7170. Fit_interval Ttimespec
  7171. Fit_value Ttimespec
  7172. }
  7173. type t__ptcb = struct {
  7174. F__f uintptr
  7175. F__x uintptr
  7176. F__next uintptr
  7177. }
  7178. type Tcpu_set_t1 = struct {
  7179. F__bits [32]uint32
  7180. }
  7181. type Txthread_t = uintptr
  7182. type Txthread_key_t = uint32
  7183. type Txcondition_rec = struct {
  7184. F__u struct {
  7185. F__vi [0][12]int32
  7186. F__p [0][12]uintptr
  7187. F__i [12]int32
  7188. }
  7189. }
  7190. type Txmutex_rec = struct {
  7191. F__u struct {
  7192. F__vi [0][6]int32
  7193. F__p [0][6]uintptr
  7194. F__i [6]int32
  7195. }
  7196. F__ccgo_room int32
  7197. }
  7198. type Txcondition_t = uintptr
  7199. type Txmutex_t = uintptr
  7200. type T_XQEvent = struct {
  7201. Fnext uintptr
  7202. Fevent TXEvent
  7203. Fqserial_num uint32
  7204. }
  7205. type T_XSQEvent = T_XQEvent
  7206. type TLockInfoPtr = uintptr
  7207. type T_XLockPtrs = struct {
  7208. Flock_display uintptr
  7209. Funlock_display uintptr
  7210. }
  7211. type T_XAsyncHandler = struct {
  7212. Fnext uintptr
  7213. Fhandler uintptr
  7214. Fdata TXPointer
  7215. }
  7216. type T_XInternalAsync = T_XAsyncHandler
  7217. type T_XAsyncErrorState = struct {
  7218. Fmin_sequence_number uint32
  7219. Fmax_sequence_number uint32
  7220. Ferror_code uint8
  7221. Fmajor_opcode uint8
  7222. Fminor_opcode uint16
  7223. Flast_error_received uint8
  7224. Ferror_count int32
  7225. }
  7226. type T_XAsyncEState = T_XAsyncErrorState
  7227. type TFreeFuncType = uintptr
  7228. type TFreeModmapType = uintptr
  7229. type T_XFreeFuncRec = struct {
  7230. Fatoms TFreeFuncType
  7231. Fmodifiermap TFreeModmapType
  7232. Fkey_bindings TFreeFuncType
  7233. Fcontext_db TFreeFuncType
  7234. FdefaultCCCs TFreeFuncType
  7235. FclientCmaps TFreeFuncType
  7236. FintensityMaps TFreeFuncType
  7237. Fim_filters TFreeFuncType
  7238. Fxkb TFreeFuncType
  7239. }
  7240. type T_XFreeFuncs = T_XFreeFuncRec
  7241. type TCreateGCType = uintptr
  7242. type TCopyGCType = uintptr
  7243. type TFlushGCType = uintptr
  7244. type TFreeGCType = uintptr
  7245. type TCreateFontType = uintptr
  7246. type TFreeFontType = uintptr
  7247. type TCloseDisplayType = uintptr
  7248. type TErrorType = uintptr
  7249. type TErrorStringType = uintptr
  7250. type TPrintErrorType = uintptr
  7251. type TBeforeFlushType = uintptr
  7252. type T_XExtension = struct {
  7253. Fnext uintptr
  7254. Fcodes TXExtCodes
  7255. Fcreate_GC TCreateGCType
  7256. Fcopy_GC TCopyGCType
  7257. Fflush_GC TFlushGCType
  7258. Ffree_GC TFreeGCType
  7259. Fcreate_Font TCreateFontType
  7260. Ffree_Font TFreeFontType
  7261. Fclose_display TCloseDisplayType
  7262. Ferror1 TErrorType
  7263. Ferror_string TErrorStringType
  7264. Fname uintptr
  7265. Ferror_values TPrintErrorType
  7266. Fbefore_flush TBeforeFlushType
  7267. Fnext_flush uintptr
  7268. }
  7269. type T_XExten = T_XExtension
  7270. type T_XInternalConnectionProc = uintptr
  7271. type T_XConnectionInfo = struct {
  7272. Ffd int32
  7273. Fread_callback T_XInternalConnectionProc
  7274. Fcall_data TXPointer
  7275. Fwatch_data uintptr
  7276. Fnext uintptr
  7277. }
  7278. type T_XConnWatchInfo = struct {
  7279. Ffn TXConnectionWatchProc
  7280. Fclient_data TXPointer
  7281. Fnext uintptr
  7282. }
  7283. type t__jmp_buf = [32]uint64
  7284. type Tjmp_buf = [1]t__jmp_buf_tag
  7285. type t__jmp_buf_tag = struct {
  7286. F__ccgo_align [0]uint32
  7287. F__jb t__jmp_buf
  7288. F__fl uint32
  7289. F__ss [32]uint32
  7290. F__ccgo_pad3 [4]byte
  7291. }
  7292. type Tsigjmp_buf = [1]t__jmp_buf_tag
  7293. type TFT_Int16 = int16
  7294. type TFT_UInt16 = uint16
  7295. type TFT_Int32 = int32
  7296. type TFT_UInt32 = uint32
  7297. type TFT_Fast = int32
  7298. type TFT_UFast = uint32
  7299. type TFT_Int64 = int64
  7300. type TFT_UInt64 = uint64
  7301. type TFT_Memory = uintptr
  7302. type TFT_MemoryRec_ = struct {
  7303. Fuser uintptr
  7304. Falloc TFT_Alloc_Func
  7305. Ffree TFT_Free_Func
  7306. Frealloc TFT_Realloc_Func
  7307. }
  7308. type TFT_Alloc_Func = uintptr
  7309. type TFT_Free_Func = uintptr
  7310. type TFT_Realloc_Func = uintptr
  7311. type TFT_Stream = uintptr
  7312. type TFT_StreamRec_ = struct {
  7313. Fbase uintptr
  7314. Fsize uint32
  7315. Fpos uint32
  7316. Fdescriptor TFT_StreamDesc
  7317. Fpathname TFT_StreamDesc
  7318. Fread TFT_Stream_IoFunc
  7319. Fclose1 TFT_Stream_CloseFunc
  7320. Fmemory TFT_Memory
  7321. Fcursor uintptr
  7322. Flimit uintptr
  7323. }
  7324. type TFT_StreamDesc = struct {
  7325. Fpointer [0]uintptr
  7326. Fvalue int32
  7327. }
  7328. type TFT_StreamDesc_ = TFT_StreamDesc
  7329. type TFT_Stream_IoFunc = uintptr
  7330. type TFT_Stream_CloseFunc = uintptr
  7331. type TFT_StreamRec = struct {
  7332. Fbase uintptr
  7333. Fsize uint32
  7334. Fpos uint32
  7335. Fdescriptor TFT_StreamDesc
  7336. Fpathname TFT_StreamDesc
  7337. Fread TFT_Stream_IoFunc
  7338. Fclose1 TFT_Stream_CloseFunc
  7339. Fmemory TFT_Memory
  7340. Fcursor uintptr
  7341. Flimit uintptr
  7342. }
  7343. type TFT_Pos = int32
  7344. type TFT_Vector = struct {
  7345. Fx TFT_Pos
  7346. Fy TFT_Pos
  7347. }
  7348. type TFT_Vector_ = TFT_Vector
  7349. type TFT_BBox = struct {
  7350. FxMin TFT_Pos
  7351. FyMin TFT_Pos
  7352. FxMax TFT_Pos
  7353. FyMax TFT_Pos
  7354. }
  7355. type TFT_BBox_ = TFT_BBox
  7356. type TFT_Pixel_Mode = int32
  7357. type _FT_Pixel_Mode_ = int32
  7358. const _FT_PIXEL_MODE_NONE = 0
  7359. const _FT_PIXEL_MODE_MONO = 1
  7360. const _FT_PIXEL_MODE_GRAY = 2
  7361. const _FT_PIXEL_MODE_GRAY2 = 3
  7362. const _FT_PIXEL_MODE_GRAY4 = 4
  7363. const _FT_PIXEL_MODE_LCD = 5
  7364. const _FT_PIXEL_MODE_LCD_V = 6
  7365. const _FT_PIXEL_MODE_BGRA = 7
  7366. const _FT_PIXEL_MODE_MAX = 8
  7367. type TFT_Bitmap = struct {
  7368. Frows uint32
  7369. Fwidth uint32
  7370. Fpitch int32
  7371. Fbuffer uintptr
  7372. Fnum_grays uint16
  7373. Fpixel_mode uint8
  7374. Fpalette_mode uint8
  7375. Fpalette uintptr
  7376. }
  7377. type TFT_Bitmap_ = TFT_Bitmap
  7378. type TFT_Outline = struct {
  7379. Fn_contours int16
  7380. Fn_points int16
  7381. Fpoints uintptr
  7382. Ftags uintptr
  7383. Fcontours uintptr
  7384. Fflags int32
  7385. }
  7386. type TFT_Outline_ = TFT_Outline
  7387. type TFT_Outline_MoveToFunc = uintptr
  7388. type TFT_Outline_LineToFunc = uintptr
  7389. type TFT_Outline_ConicToFunc = uintptr
  7390. type TFT_Outline_CubicToFunc = uintptr
  7391. type TFT_Outline_Funcs = struct {
  7392. Fmove_to TFT_Outline_MoveToFunc
  7393. Fline_to TFT_Outline_LineToFunc
  7394. Fconic_to TFT_Outline_ConicToFunc
  7395. Fcubic_to TFT_Outline_CubicToFunc
  7396. Fshift int32
  7397. Fdelta TFT_Pos
  7398. }
  7399. type TFT_Outline_Funcs_ = TFT_Outline_Funcs
  7400. type TFT_Glyph_Format = int32
  7401. type _FT_Glyph_Format_ = int32
  7402. const _FT_GLYPH_FORMAT_NONE = 0
  7403. const _FT_GLYPH_FORMAT_COMPOSITE = 1668246896
  7404. const _FT_GLYPH_FORMAT_BITMAP = 1651078259
  7405. const _FT_GLYPH_FORMAT_OUTLINE = 1869968492
  7406. const _FT_GLYPH_FORMAT_PLOTTER = 1886154612
  7407. const _FT_GLYPH_FORMAT_SVG = 1398163232
  7408. type TFT_Span = struct {
  7409. Fx int16
  7410. Flen1 uint16
  7411. Fcoverage uint8
  7412. }
  7413. type TFT_Span_ = TFT_Span
  7414. type TFT_SpanFunc = uintptr
  7415. type TFT_Raster_BitTest_Func = uintptr
  7416. type TFT_Raster_BitSet_Func = uintptr
  7417. type TFT_Raster_Params = struct {
  7418. Ftarget uintptr
  7419. Fsource uintptr
  7420. Fflags int32
  7421. Fgray_spans TFT_SpanFunc
  7422. Fblack_spans TFT_SpanFunc
  7423. Fbit_test TFT_Raster_BitTest_Func
  7424. Fbit_set TFT_Raster_BitSet_Func
  7425. Fuser uintptr
  7426. Fclip_box TFT_BBox
  7427. }
  7428. type TFT_Raster_Params_ = TFT_Raster_Params
  7429. type TFT_Raster = uintptr
  7430. type TFT_Raster_NewFunc = uintptr
  7431. type TFT_Raster_DoneFunc = uintptr
  7432. type TFT_Raster_ResetFunc = uintptr
  7433. type TFT_Raster_SetModeFunc = uintptr
  7434. type TFT_Raster_RenderFunc = uintptr
  7435. type TFT_Raster_Funcs = struct {
  7436. Fglyph_format TFT_Glyph_Format
  7437. Fraster_new TFT_Raster_NewFunc
  7438. Fraster_reset TFT_Raster_ResetFunc
  7439. Fraster_set_mode TFT_Raster_SetModeFunc
  7440. Fraster_render TFT_Raster_RenderFunc
  7441. Fraster_done TFT_Raster_DoneFunc
  7442. }
  7443. type TFT_Raster_Funcs_ = TFT_Raster_Funcs
  7444. type TFT_Bool = uint8
  7445. type TFT_FWord = int16
  7446. type TFT_UFWord = uint16
  7447. type TFT_Char = int8
  7448. type TFT_Byte = uint8
  7449. type TFT_Bytes = uintptr
  7450. type TFT_Tag = uint32
  7451. type TFT_String = uint8
  7452. type TFT_Short = int16
  7453. type TFT_UShort = uint16
  7454. type TFT_Int = int32
  7455. type TFT_UInt = uint32
  7456. type TFT_Long = int32
  7457. type TFT_ULong = uint32
  7458. type TFT_F2Dot14 = int16
  7459. type TFT_F26Dot6 = int32
  7460. type TFT_Fixed = int32
  7461. type TFT_Error = int32
  7462. type TFT_Pointer = uintptr
  7463. type TFT_Offset = uint32
  7464. type TFT_PtrDist = int32
  7465. type TFT_UnitVector = struct {
  7466. Fx TFT_F2Dot14
  7467. Fy TFT_F2Dot14
  7468. }
  7469. type TFT_UnitVector_ = TFT_UnitVector
  7470. type TFT_Matrix = struct {
  7471. Fxx TFT_Fixed
  7472. Fxy TFT_Fixed
  7473. Fyx TFT_Fixed
  7474. Fyy TFT_Fixed
  7475. }
  7476. type TFT_Matrix_ = TFT_Matrix
  7477. type TFT_Data = struct {
  7478. Fpointer uintptr
  7479. Flength TFT_UInt
  7480. }
  7481. type TFT_Data_ = TFT_Data
  7482. type TFT_Generic_Finalizer = uintptr
  7483. type TFT_Generic = struct {
  7484. Fdata uintptr
  7485. Ffinalizer TFT_Generic_Finalizer
  7486. }
  7487. type TFT_Generic_ = TFT_Generic
  7488. type TFT_ListNode = uintptr
  7489. type TFT_ListNodeRec_ = struct {
  7490. Fprev TFT_ListNode
  7491. Fnext TFT_ListNode
  7492. Fdata uintptr
  7493. }
  7494. type TFT_List = uintptr
  7495. type TFT_ListRec_ = struct {
  7496. Fhead TFT_ListNode
  7497. Ftail TFT_ListNode
  7498. }
  7499. type TFT_ListNodeRec = struct {
  7500. Fprev TFT_ListNode
  7501. Fnext TFT_ListNode
  7502. Fdata uintptr
  7503. }
  7504. type TFT_ListRec = struct {
  7505. Fhead TFT_ListNode
  7506. Ftail TFT_ListNode
  7507. }
  7508. const _FT_Mod_Err_Base = 0
  7509. const _FT_Mod_Err_Autofit = 0
  7510. const _FT_Mod_Err_BDF = 0
  7511. const _FT_Mod_Err_Bzip2 = 0
  7512. const _FT_Mod_Err_Cache = 0
  7513. const _FT_Mod_Err_CFF = 0
  7514. const _FT_Mod_Err_CID = 0
  7515. const _FT_Mod_Err_Gzip = 0
  7516. const _FT_Mod_Err_LZW = 0
  7517. const _FT_Mod_Err_OTvalid = 0
  7518. const _FT_Mod_Err_PCF = 0
  7519. const _FT_Mod_Err_PFR = 0
  7520. const _FT_Mod_Err_PSaux = 0
  7521. const _FT_Mod_Err_PShinter = 0
  7522. const _FT_Mod_Err_PSnames = 0
  7523. const _FT_Mod_Err_Raster = 0
  7524. const _FT_Mod_Err_SFNT = 0
  7525. const _FT_Mod_Err_Smooth = 0
  7526. const _FT_Mod_Err_TrueType = 0
  7527. const _FT_Mod_Err_Type1 = 0
  7528. const _FT_Mod_Err_Type42 = 0
  7529. const _FT_Mod_Err_Winfonts = 0
  7530. const _FT_Mod_Err_GXvalid = 0
  7531. const _FT_Mod_Err_Sdf = 0
  7532. const _FT_Mod_Err_Max = 1
  7533. const _FT_Err_Ok = 0
  7534. const _FT_Err_Cannot_Open_Resource = 1
  7535. const _FT_Err_Unknown_File_Format = 2
  7536. const _FT_Err_Invalid_File_Format = 3
  7537. const _FT_Err_Invalid_Version = 4
  7538. const _FT_Err_Lower_Module_Version = 5
  7539. const _FT_Err_Invalid_Argument = 6
  7540. const _FT_Err_Unimplemented_Feature = 7
  7541. const _FT_Err_Invalid_Table = 8
  7542. const _FT_Err_Invalid_Offset = 9
  7543. const _FT_Err_Array_Too_Large = 10
  7544. const _FT_Err_Missing_Module = 11
  7545. const _FT_Err_Missing_Property = 12
  7546. const _FT_Err_Invalid_Glyph_Index = 16
  7547. const _FT_Err_Invalid_Character_Code = 17
  7548. const _FT_Err_Invalid_Glyph_Format = 18
  7549. const _FT_Err_Cannot_Render_Glyph = 19
  7550. const _FT_Err_Invalid_Outline = 20
  7551. const _FT_Err_Invalid_Composite = 21
  7552. const _FT_Err_Too_Many_Hints = 22
  7553. const _FT_Err_Invalid_Pixel_Size = 23
  7554. const _FT_Err_Invalid_SVG_Document = 24
  7555. const _FT_Err_Invalid_Handle = 32
  7556. const _FT_Err_Invalid_Library_Handle = 33
  7557. const _FT_Err_Invalid_Driver_Handle = 34
  7558. const _FT_Err_Invalid_Face_Handle = 35
  7559. const _FT_Err_Invalid_Size_Handle = 36
  7560. const _FT_Err_Invalid_Slot_Handle = 37
  7561. const _FT_Err_Invalid_CharMap_Handle = 38
  7562. const _FT_Err_Invalid_Cache_Handle = 39
  7563. const _FT_Err_Invalid_Stream_Handle = 40
  7564. const _FT_Err_Too_Many_Drivers = 48
  7565. const _FT_Err_Too_Many_Extensions = 49
  7566. const _FT_Err_Out_Of_Memory = 64
  7567. const _FT_Err_Unlisted_Object = 65
  7568. const _FT_Err_Cannot_Open_Stream = 81
  7569. const _FT_Err_Invalid_Stream_Seek = 82
  7570. const _FT_Err_Invalid_Stream_Skip = 83
  7571. const _FT_Err_Invalid_Stream_Read = 84
  7572. const _FT_Err_Invalid_Stream_Operation = 85
  7573. const _FT_Err_Invalid_Frame_Operation = 86
  7574. const _FT_Err_Nested_Frame_Access = 87
  7575. const _FT_Err_Invalid_Frame_Read = 88
  7576. const _FT_Err_Raster_Uninitialized = 96
  7577. const _FT_Err_Raster_Corrupted = 97
  7578. const _FT_Err_Raster_Overflow = 98
  7579. const _FT_Err_Raster_Negative_Height = 99
  7580. const _FT_Err_Too_Many_Caches = 112
  7581. const _FT_Err_Invalid_Opcode = 128
  7582. const _FT_Err_Too_Few_Arguments = 129
  7583. const _FT_Err_Stack_Overflow = 130
  7584. const _FT_Err_Code_Overflow = 131
  7585. const _FT_Err_Bad_Argument = 132
  7586. const _FT_Err_Divide_By_Zero = 133
  7587. const _FT_Err_Invalid_Reference = 134
  7588. const _FT_Err_Debug_OpCode = 135
  7589. const _FT_Err_ENDF_In_Exec_Stream = 136
  7590. const _FT_Err_Nested_DEFS = 137
  7591. const _FT_Err_Invalid_CodeRange = 138
  7592. const _FT_Err_Execution_Too_Long = 139
  7593. const _FT_Err_Too_Many_Function_Defs = 140
  7594. const _FT_Err_Too_Many_Instruction_Defs = 141
  7595. const _FT_Err_Table_Missing = 142
  7596. const _FT_Err_Horiz_Header_Missing = 143
  7597. const _FT_Err_Locations_Missing = 144
  7598. const _FT_Err_Name_Table_Missing = 145
  7599. const _FT_Err_CMap_Table_Missing = 146
  7600. const _FT_Err_Hmtx_Table_Missing = 147
  7601. const _FT_Err_Post_Table_Missing = 148
  7602. const _FT_Err_Invalid_Horiz_Metrics = 149
  7603. const _FT_Err_Invalid_CharMap_Format = 150
  7604. const _FT_Err_Invalid_PPem = 151
  7605. const _FT_Err_Invalid_Vert_Metrics = 152
  7606. const _FT_Err_Could_Not_Find_Context = 153
  7607. const _FT_Err_Invalid_Post_Table_Format = 154
  7608. const _FT_Err_Invalid_Post_Table = 155
  7609. const _FT_Err_DEF_In_Glyf_Bytecode = 156
  7610. const _FT_Err_Missing_Bitmap = 157
  7611. const _FT_Err_Missing_SVG_Hooks = 158
  7612. const _FT_Err_Syntax_Error = 160
  7613. const _FT_Err_Stack_Underflow = 161
  7614. const _FT_Err_Ignore = 162
  7615. const _FT_Err_No_Unicode_Glyph_Name = 163
  7616. const _FT_Err_Glyph_Too_Big = 164
  7617. const _FT_Err_Missing_Startfont_Field = 176
  7618. const _FT_Err_Missing_Font_Field = 177
  7619. const _FT_Err_Missing_Size_Field = 178
  7620. const _FT_Err_Missing_Fontboundingbox_Field = 179
  7621. const _FT_Err_Missing_Chars_Field = 180
  7622. const _FT_Err_Missing_Startchar_Field = 181
  7623. const _FT_Err_Missing_Encoding_Field = 182
  7624. const _FT_Err_Missing_Bbx_Field = 183
  7625. const _FT_Err_Bbx_Too_Big = 184
  7626. const _FT_Err_Corrupted_Font_Header = 185
  7627. const _FT_Err_Corrupted_Font_Glyphs = 186
  7628. const _FT_Err_Max = 187
  7629. type TFT_Glyph_Metrics = struct {
  7630. Fwidth TFT_Pos
  7631. Fheight TFT_Pos
  7632. FhoriBearingX TFT_Pos
  7633. FhoriBearingY TFT_Pos
  7634. FhoriAdvance TFT_Pos
  7635. FvertBearingX TFT_Pos
  7636. FvertBearingY TFT_Pos
  7637. FvertAdvance TFT_Pos
  7638. }
  7639. type TFT_Glyph_Metrics_ = TFT_Glyph_Metrics
  7640. type TFT_Bitmap_Size = struct {
  7641. Fheight TFT_Short
  7642. Fwidth TFT_Short
  7643. Fsize TFT_Pos
  7644. Fx_ppem TFT_Pos
  7645. Fy_ppem TFT_Pos
  7646. }
  7647. type TFT_Bitmap_Size_ = TFT_Bitmap_Size
  7648. type TFT_Library = uintptr
  7649. type TFT_Module = uintptr
  7650. type TFT_Driver = uintptr
  7651. type TFT_Renderer = uintptr
  7652. type TFT_Face = uintptr
  7653. type TFT_FaceRec_ = struct {
  7654. Fnum_faces TFT_Long
  7655. Fface_index TFT_Long
  7656. Fface_flags TFT_Long
  7657. Fstyle_flags TFT_Long
  7658. Fnum_glyphs TFT_Long
  7659. Ffamily_name uintptr
  7660. Fstyle_name uintptr
  7661. Fnum_fixed_sizes TFT_Int
  7662. Favailable_sizes uintptr
  7663. Fnum_charmaps TFT_Int
  7664. Fcharmaps uintptr
  7665. Fgeneric TFT_Generic
  7666. Fbbox TFT_BBox
  7667. Funits_per_EM TFT_UShort
  7668. Fascender TFT_Short
  7669. Fdescender TFT_Short
  7670. Fheight TFT_Short
  7671. Fmax_advance_width TFT_Short
  7672. Fmax_advance_height TFT_Short
  7673. Funderline_position TFT_Short
  7674. Funderline_thickness TFT_Short
  7675. Fglyph TFT_GlyphSlot
  7676. Fsize TFT_Size
  7677. Fcharmap TFT_CharMap
  7678. Fdriver TFT_Driver
  7679. Fmemory TFT_Memory
  7680. Fstream TFT_Stream
  7681. Fsizes_list TFT_ListRec
  7682. Fautohint TFT_Generic
  7683. Fextensions uintptr
  7684. Finternal TFT_Face_Internal
  7685. }
  7686. type TFT_Size = uintptr
  7687. type TFT_SizeRec_ = struct {
  7688. Fface TFT_Face
  7689. Fgeneric TFT_Generic
  7690. Fmetrics TFT_Size_Metrics
  7691. Finternal TFT_Size_Internal
  7692. }
  7693. type TFT_GlyphSlot = uintptr
  7694. type TFT_GlyphSlotRec_ = struct {
  7695. Flibrary TFT_Library
  7696. Fface TFT_Face
  7697. Fnext TFT_GlyphSlot
  7698. Fglyph_index TFT_UInt
  7699. Fgeneric TFT_Generic
  7700. Fmetrics TFT_Glyph_Metrics
  7701. FlinearHoriAdvance TFT_Fixed
  7702. FlinearVertAdvance TFT_Fixed
  7703. Fadvance TFT_Vector
  7704. Fformat TFT_Glyph_Format
  7705. Fbitmap TFT_Bitmap
  7706. Fbitmap_left TFT_Int
  7707. Fbitmap_top TFT_Int
  7708. Foutline TFT_Outline
  7709. Fnum_subglyphs TFT_UInt
  7710. Fsubglyphs TFT_SubGlyph
  7711. Fcontrol_data uintptr
  7712. Fcontrol_len int32
  7713. Flsb_delta TFT_Pos
  7714. Frsb_delta TFT_Pos
  7715. Fother uintptr
  7716. Finternal TFT_Slot_Internal
  7717. }
  7718. type TFT_CharMap = uintptr
  7719. type TFT_CharMapRec_ = struct {
  7720. Fface TFT_Face
  7721. Fencoding TFT_Encoding
  7722. Fplatform_id TFT_UShort
  7723. Fencoding_id TFT_UShort
  7724. }
  7725. type _FT_Encoding_ = int32
  7726. const _FT_ENCODING_NONE = 0
  7727. const _FT_ENCODING_MS_SYMBOL = 1937337698
  7728. const _FT_ENCODING_UNICODE = 1970170211
  7729. const _FT_ENCODING_SJIS = 1936353651
  7730. const _FT_ENCODING_PRC = 1734484000
  7731. const _FT_ENCODING_BIG5 = 1651074869
  7732. const _FT_ENCODING_WANSUNG = 2002873971
  7733. const _FT_ENCODING_JOHAB = 1785686113
  7734. const _FT_ENCODING_GB2312 = 1734484000
  7735. const _FT_ENCODING_MS_SJIS = 1936353651
  7736. const _FT_ENCODING_MS_GB2312 = 1734484000
  7737. const _FT_ENCODING_MS_BIG5 = 1651074869
  7738. const _FT_ENCODING_MS_WANSUNG = 2002873971
  7739. const _FT_ENCODING_MS_JOHAB = 1785686113
  7740. const _FT_ENCODING_ADOBE_STANDARD = 1094995778
  7741. const _FT_ENCODING_ADOBE_EXPERT = 1094992453
  7742. const _FT_ENCODING_ADOBE_CUSTOM = 1094992451
  7743. const _FT_ENCODING_ADOBE_LATIN_1 = 1818326065
  7744. const _FT_ENCODING_OLD_LATIN_2 = 1818326066
  7745. const _FT_ENCODING_APPLE_ROMAN = 1634889070
  7746. type TFT_Encoding = int32
  7747. type TFT_CharMapRec = struct {
  7748. Fface TFT_Face
  7749. Fencoding TFT_Encoding
  7750. Fplatform_id TFT_UShort
  7751. Fencoding_id TFT_UShort
  7752. }
  7753. type TFT_Face_Internal = uintptr
  7754. type TFT_FaceRec = struct {
  7755. Fnum_faces TFT_Long
  7756. Fface_index TFT_Long
  7757. Fface_flags TFT_Long
  7758. Fstyle_flags TFT_Long
  7759. Fnum_glyphs TFT_Long
  7760. Ffamily_name uintptr
  7761. Fstyle_name uintptr
  7762. Fnum_fixed_sizes TFT_Int
  7763. Favailable_sizes uintptr
  7764. Fnum_charmaps TFT_Int
  7765. Fcharmaps uintptr
  7766. Fgeneric TFT_Generic
  7767. Fbbox TFT_BBox
  7768. Funits_per_EM TFT_UShort
  7769. Fascender TFT_Short
  7770. Fdescender TFT_Short
  7771. Fheight TFT_Short
  7772. Fmax_advance_width TFT_Short
  7773. Fmax_advance_height TFT_Short
  7774. Funderline_position TFT_Short
  7775. Funderline_thickness TFT_Short
  7776. Fglyph TFT_GlyphSlot
  7777. Fsize TFT_Size
  7778. Fcharmap TFT_CharMap
  7779. Fdriver TFT_Driver
  7780. Fmemory TFT_Memory
  7781. Fstream TFT_Stream
  7782. Fsizes_list TFT_ListRec
  7783. Fautohint TFT_Generic
  7784. Fextensions uintptr
  7785. Finternal TFT_Face_Internal
  7786. }
  7787. type TFT_Size_Internal = uintptr
  7788. type TFT_Size_Metrics = struct {
  7789. Fx_ppem TFT_UShort
  7790. Fy_ppem TFT_UShort
  7791. Fx_scale TFT_Fixed
  7792. Fy_scale TFT_Fixed
  7793. Fascender TFT_Pos
  7794. Fdescender TFT_Pos
  7795. Fheight TFT_Pos
  7796. Fmax_advance TFT_Pos
  7797. }
  7798. type TFT_Size_Metrics_ = TFT_Size_Metrics
  7799. type TFT_SizeRec = struct {
  7800. Fface TFT_Face
  7801. Fgeneric TFT_Generic
  7802. Fmetrics TFT_Size_Metrics
  7803. Finternal TFT_Size_Internal
  7804. }
  7805. type TFT_SubGlyph = uintptr
  7806. type TFT_Slot_Internal = uintptr
  7807. type TFT_GlyphSlotRec = struct {
  7808. Flibrary TFT_Library
  7809. Fface TFT_Face
  7810. Fnext TFT_GlyphSlot
  7811. Fglyph_index TFT_UInt
  7812. Fgeneric TFT_Generic
  7813. Fmetrics TFT_Glyph_Metrics
  7814. FlinearHoriAdvance TFT_Fixed
  7815. FlinearVertAdvance TFT_Fixed
  7816. Fadvance TFT_Vector
  7817. Fformat TFT_Glyph_Format
  7818. Fbitmap TFT_Bitmap
  7819. Fbitmap_left TFT_Int
  7820. Fbitmap_top TFT_Int
  7821. Foutline TFT_Outline
  7822. Fnum_subglyphs TFT_UInt
  7823. Fsubglyphs TFT_SubGlyph
  7824. Fcontrol_data uintptr
  7825. Fcontrol_len int32
  7826. Flsb_delta TFT_Pos
  7827. Frsb_delta TFT_Pos
  7828. Fother uintptr
  7829. Finternal TFT_Slot_Internal
  7830. }
  7831. type TFT_Parameter = struct {
  7832. Ftag TFT_ULong
  7833. Fdata TFT_Pointer
  7834. }
  7835. type TFT_Parameter_ = TFT_Parameter
  7836. type TFT_Open_Args = struct {
  7837. Fflags TFT_UInt
  7838. Fmemory_base uintptr
  7839. Fmemory_size TFT_Long
  7840. Fpathname uintptr
  7841. Fstream TFT_Stream
  7842. Fdriver TFT_Module
  7843. Fnum_params TFT_Int
  7844. Fparams uintptr
  7845. }
  7846. type TFT_Open_Args_ = TFT_Open_Args
  7847. type TFT_Size_Request_Type = int32
  7848. type _FT_Size_Request_Type_ = int32
  7849. const _FT_SIZE_REQUEST_TYPE_NOMINAL = 0
  7850. const _FT_SIZE_REQUEST_TYPE_REAL_DIM = 1
  7851. const _FT_SIZE_REQUEST_TYPE_BBOX = 2
  7852. const _FT_SIZE_REQUEST_TYPE_CELL = 3
  7853. const _FT_SIZE_REQUEST_TYPE_SCALES = 4
  7854. const _FT_SIZE_REQUEST_TYPE_MAX = 5
  7855. type TFT_Size_RequestRec = struct {
  7856. Ftype1 TFT_Size_Request_Type
  7857. Fwidth TFT_Long
  7858. Fheight TFT_Long
  7859. FhoriResolution TFT_UInt
  7860. FvertResolution TFT_UInt
  7861. }
  7862. type TFT_Size_RequestRec_ = TFT_Size_RequestRec
  7863. type TFT_Size_Request = uintptr
  7864. type TFT_Render_Mode = int32
  7865. type _FT_Render_Mode_ = int32
  7866. const _FT_RENDER_MODE_NORMAL = 0
  7867. const _FT_RENDER_MODE_LIGHT = 1
  7868. const _FT_RENDER_MODE_MONO = 2
  7869. const _FT_RENDER_MODE_LCD = 3
  7870. const _FT_RENDER_MODE_LCD_V = 4
  7871. const _FT_RENDER_MODE_SDF = 5
  7872. const _FT_RENDER_MODE_MAX = 6
  7873. type TFT_Kerning_Mode = int32
  7874. type _FT_Kerning_Mode_ = int32
  7875. const _FT_KERNING_DEFAULT = 0
  7876. const _FT_KERNING_UNFITTED = 1
  7877. const _FT_KERNING_UNSCALED = 2
  7878. type Tstat = struct {
  7879. F__ccgo_align [0]uint32
  7880. Fst_dev Tdev_t
  7881. F__st_dev_padding int32
  7882. F__st_ino_truncated int32
  7883. Fst_mode Tmode_t
  7884. Fst_nlink Tnlink_t
  7885. Fst_uid Tuid_t
  7886. Fst_gid Tgid_t
  7887. Fst_rdev Tdev_t
  7888. F__st_rdev_padding int32
  7889. F__ccgo_align9 [4]byte
  7890. Fst_size Toff_t
  7891. Fst_blksize Tblksize_t
  7892. F__ccgo_align11 [4]byte
  7893. Fst_blocks Tblkcnt_t
  7894. F__st_atim32 struct {
  7895. Ftv_sec int32
  7896. Ftv_nsec int32
  7897. }
  7898. F__st_mtim32 struct {
  7899. Ftv_sec int32
  7900. Ftv_nsec int32
  7901. }
  7902. F__st_ctim32 struct {
  7903. Ftv_sec int32
  7904. Ftv_nsec int32
  7905. }
  7906. Fst_ino Tino_t
  7907. Fst_atim Ttimespec
  7908. Fst_mtim Ttimespec
  7909. Fst_ctim Ttimespec
  7910. }
  7911. type Tstatx_timestamp = struct {
  7912. F__ccgo_align [0]uint32
  7913. Ftv_sec Tint64_t
  7914. Ftv_nsec Tuint32_t
  7915. F__pad Tuint32_t
  7916. }
  7917. type Tstatx = struct {
  7918. F__ccgo_align [0]uint32
  7919. Fstx_mask Tuint32_t
  7920. Fstx_blksize Tuint32_t
  7921. Fstx_attributes Tuint64_t
  7922. Fstx_nlink Tuint32_t
  7923. Fstx_uid Tuint32_t
  7924. Fstx_gid Tuint32_t
  7925. Fstx_mode Tuint16_t
  7926. F__pad0 [1]Tuint16_t
  7927. Fstx_ino Tuint64_t
  7928. Fstx_size Tuint64_t
  7929. Fstx_blocks Tuint64_t
  7930. Fstx_attributes_mask Tuint64_t
  7931. Fstx_atime Tstatx_timestamp
  7932. Fstx_btime Tstatx_timestamp
  7933. Fstx_ctime Tstatx_timestamp
  7934. Fstx_mtime Tstatx_timestamp
  7935. Fstx_rdev_major Tuint32_t
  7936. Fstx_rdev_minor Tuint32_t
  7937. Fstx_dev_major Tuint32_t
  7938. Fstx_dev_minor Tuint32_t
  7939. F__pad1 [14]Tuint64_t
  7940. }
  7941. type TFcChar8 = uint8
  7942. type TFcChar16 = uint16
  7943. type TFcChar32 = uint32
  7944. type TFcBool = int32
  7945. type TFcType = int32
  7946. type __FcType = int32
  7947. const _FcTypeUnknown = -1
  7948. const _FcTypeVoid = 0
  7949. const _FcTypeInteger = 1
  7950. const _FcTypeDouble = 2
  7951. const _FcTypeString = 3
  7952. const _FcTypeBool = 4
  7953. const _FcTypeMatrix = 5
  7954. const _FcTypeCharSet = 6
  7955. const _FcTypeFTFace = 7
  7956. const _FcTypeLangSet = 8
  7957. const _FcTypeRange = 9
  7958. type TFcMatrix = struct {
  7959. F__ccgo_align [0]uint32
  7960. Fxx float64
  7961. Fxy float64
  7962. Fyx float64
  7963. Fyy float64
  7964. }
  7965. type T_FcMatrix = TFcMatrix
  7966. type TFcObjectType = struct {
  7967. Fobject uintptr
  7968. Ftype1 TFcType
  7969. }
  7970. type T_FcObjectType = TFcObjectType
  7971. type TFcConstant = struct {
  7972. Fname uintptr
  7973. Fobject uintptr
  7974. Fvalue int32
  7975. }
  7976. type T_FcConstant = TFcConstant
  7977. type TFcResult = int32
  7978. type __FcResult = int32
  7979. const _FcResultMatch = 0
  7980. const _FcResultNoMatch = 1
  7981. const _FcResultTypeMismatch = 2
  7982. const _FcResultNoId = 3
  7983. const _FcResultOutOfMemory = 4
  7984. type TFcValueBinding = int32
  7985. type __FcValueBinding = int32
  7986. const _FcValueBindingWeak = 0
  7987. const _FcValueBindingStrong = 1
  7988. const _FcValueBindingSame = 2
  7989. const _FcValueBindingEnd = 2147483647
  7990. type TFcPatternIter = struct {
  7991. Fdummy1 uintptr
  7992. Fdummy2 uintptr
  7993. }
  7994. type T_FcPatternIter = TFcPatternIter
  7995. type TFcValue = struct {
  7996. F__ccgo_align [0]uint32
  7997. Ftype1 TFcType
  7998. F__ccgo_align1 [4]byte
  7999. Fu struct {
  8000. F__ccgo_align [0]uint32
  8001. Fi [0]int32
  8002. Fb [0]TFcBool
  8003. Fd [0]float64
  8004. Fm [0]uintptr
  8005. Fc [0]uintptr
  8006. Ff [0]uintptr
  8007. Fl [0]uintptr
  8008. Fr [0]uintptr
  8009. Fs uintptr
  8010. F__ccgo_pad9 [4]byte
  8011. }
  8012. }
  8013. type T_FcValue = TFcValue
  8014. type TFcFontSet = struct {
  8015. Fnfont int32
  8016. Fsfont int32
  8017. Ffonts uintptr
  8018. }
  8019. type T_FcFontSet = TFcFontSet
  8020. type TFcObjectSet = struct {
  8021. Fnobject int32
  8022. Fsobject int32
  8023. Fobjects uintptr
  8024. }
  8025. type T_FcObjectSet = TFcObjectSet
  8026. type TFcMatchKind = int32
  8027. type __FcMatchKind = int32
  8028. const _FcMatchPattern = 0
  8029. const _FcMatchFont = 1
  8030. const _FcMatchScan = 2
  8031. const _FcMatchKindEnd = 3
  8032. const _FcMatchKindBegin = 0
  8033. type TFcLangResult = int32
  8034. type __FcLangResult = int32
  8035. const _FcLangEqual = 0
  8036. const _FcLangDifferentCountry = 1
  8037. const _FcLangDifferentTerritory = 1
  8038. const _FcLangDifferentLang = 2
  8039. type TFcSetName = int32
  8040. type __FcSetName = int32
  8041. const _FcSetSystem = 0
  8042. const _FcSetApplication = 1
  8043. type TFcConfigFileInfoIter = struct {
  8044. Fdummy1 uintptr
  8045. Fdummy2 uintptr
  8046. Fdummy3 uintptr
  8047. }
  8048. type T_FcConfigFileInfoIter = TFcConfigFileInfoIter
  8049. type TFcEndian = int32
  8050. const _FcEndianBig = 0
  8051. const _FcEndianLittle = 1
  8052. type Tpointer = uintptr
  8053. type TClientPtr = uintptr
  8054. type TFontPtr = uintptr
  8055. type TFSID = uint32
  8056. type TAccContext = uint32
  8057. type TOSTimePtr = uintptr
  8058. type TBlockHandlerProcPtr = uintptr
  8059. type TGlyph = uint32
  8060. type TGlyphSet = uint32
  8061. type TPicture = uint32
  8062. type TPictFormat = uint32
  8063. type TXRenderDirectFormat = struct {
  8064. Fred int16
  8065. FredMask int16
  8066. Fgreen int16
  8067. FgreenMask int16
  8068. Fblue int16
  8069. FblueMask int16
  8070. Falpha int16
  8071. FalphaMask int16
  8072. }
  8073. type TXRenderPictFormat = struct {
  8074. Fid TPictFormat
  8075. Ftype1 int32
  8076. Fdepth int32
  8077. Fdirect TXRenderDirectFormat
  8078. Fcolormap TColormap
  8079. }
  8080. type TXRenderPictureAttributes = struct {
  8081. Frepeat int32
  8082. Falpha_map TPicture
  8083. Falpha_x_origin int32
  8084. Falpha_y_origin int32
  8085. Fclip_x_origin int32
  8086. Fclip_y_origin int32
  8087. Fclip_mask TPixmap
  8088. Fgraphics_exposures int32
  8089. Fsubwindow_mode int32
  8090. Fpoly_edge int32
  8091. Fpoly_mode int32
  8092. Fdither TAtom
  8093. Fcomponent_alpha int32
  8094. }
  8095. type T_XRenderPictureAttributes = TXRenderPictureAttributes
  8096. type TXRenderColor = struct {
  8097. Fred uint16
  8098. Fgreen uint16
  8099. Fblue uint16
  8100. Falpha uint16
  8101. }
  8102. type TXGlyphInfo = struct {
  8103. Fwidth uint16
  8104. Fheight uint16
  8105. Fx int16
  8106. Fy int16
  8107. FxOff int16
  8108. FyOff int16
  8109. }
  8110. type T_XGlyphInfo = TXGlyphInfo
  8111. type TXGlyphElt8 = struct {
  8112. Fglyphset TGlyphSet
  8113. Fchars uintptr
  8114. Fnchars int32
  8115. FxOff int32
  8116. FyOff int32
  8117. }
  8118. type T_XGlyphElt8 = TXGlyphElt8
  8119. type TXGlyphElt16 = struct {
  8120. Fglyphset TGlyphSet
  8121. Fchars uintptr
  8122. Fnchars int32
  8123. FxOff int32
  8124. FyOff int32
  8125. }
  8126. type T_XGlyphElt16 = TXGlyphElt16
  8127. type TXGlyphElt32 = struct {
  8128. Fglyphset TGlyphSet
  8129. Fchars uintptr
  8130. Fnchars int32
  8131. FxOff int32
  8132. FyOff int32
  8133. }
  8134. type T_XGlyphElt32 = TXGlyphElt32
  8135. type TXDouble = float64
  8136. type TXPointDouble = struct {
  8137. F__ccgo_align [0]uint32
  8138. Fx TXDouble
  8139. Fy TXDouble
  8140. }
  8141. type T_XPointDouble = TXPointDouble
  8142. type TXFixed = int32
  8143. type TXPointFixed = struct {
  8144. Fx TXFixed
  8145. Fy TXFixed
  8146. }
  8147. type T_XPointFixed = TXPointFixed
  8148. type TXLineFixed = struct {
  8149. Fp1 TXPointFixed
  8150. Fp2 TXPointFixed
  8151. }
  8152. type T_XLineFixed = TXLineFixed
  8153. type TXTriangle = struct {
  8154. Fp1 TXPointFixed
  8155. Fp2 TXPointFixed
  8156. Fp3 TXPointFixed
  8157. }
  8158. type T_XTriangle = TXTriangle
  8159. type TXCircle = struct {
  8160. Fx TXFixed
  8161. Fy TXFixed
  8162. Fradius TXFixed
  8163. }
  8164. type T_XCircle = TXCircle
  8165. type TXTrapezoid = struct {
  8166. Ftop TXFixed
  8167. Fbottom TXFixed
  8168. Fleft TXLineFixed
  8169. Fright TXLineFixed
  8170. }
  8171. type T_XTrapezoid = TXTrapezoid
  8172. type TXTransform = struct {
  8173. Fmatrix [3][3]TXFixed
  8174. }
  8175. type T_XTransform = TXTransform
  8176. type TXFilters = struct {
  8177. Fnfilter int32
  8178. Ffilter uintptr
  8179. Fnalias int32
  8180. Falias uintptr
  8181. }
  8182. type T_XFilters = TXFilters
  8183. type TXIndexValue = struct {
  8184. Fpixel uint32
  8185. Fred uint16
  8186. Fgreen uint16
  8187. Fblue uint16
  8188. Falpha uint16
  8189. }
  8190. type T_XIndexValue = TXIndexValue
  8191. type TXAnimCursor = struct {
  8192. Fcursor TCursor
  8193. Fdelay uint32
  8194. }
  8195. type T_XAnimCursor = TXAnimCursor
  8196. type TXSpanFix = struct {
  8197. Fleft TXFixed
  8198. Fright TXFixed
  8199. Fy TXFixed
  8200. }
  8201. type T_XSpanFix = TXSpanFix
  8202. type TXTrap = struct {
  8203. Ftop TXSpanFix
  8204. Fbottom TXSpanFix
  8205. }
  8206. type T_XTrap = TXTrap
  8207. type TXLinearGradient = struct {
  8208. Fp1 TXPointFixed
  8209. Fp2 TXPointFixed
  8210. }
  8211. type T_XLinearGradient = TXLinearGradient
  8212. type TXRadialGradient = struct {
  8213. Finner TXCircle
  8214. Fouter TXCircle
  8215. }
  8216. type T_XRadialGradient = TXRadialGradient
  8217. type TXConicalGradient = struct {
  8218. Fcenter TXPointFixed
  8219. Fangle TXFixed
  8220. }
  8221. type T_XConicalGradient = TXConicalGradient
  8222. type TXftFontInfo = struct {
  8223. Fhash TFcChar32
  8224. Ffile uintptr
  8225. Fxsize TFT_F26Dot6
  8226. Fysize TFT_F26Dot6
  8227. Fantialias TFcBool
  8228. Fembolden TFcBool
  8229. Fcolor TFcBool
  8230. Frgba int32
  8231. Flcd_filter int32
  8232. Fmatrix TFT_Matrix
  8233. Ftransform TFcBool
  8234. Fload_flags TFT_Int
  8235. Frender TFcBool
  8236. Fspacing int32
  8237. Fminspace TFcBool
  8238. Fchar_width int32
  8239. }
  8240. type T_XftFontInfo = TXftFontInfo
  8241. type TXftFont = struct {
  8242. Fascent int32
  8243. Fdescent int32
  8244. Fheight int32
  8245. Fmax_advance_width int32
  8246. Fcharset uintptr
  8247. Fpattern uintptr
  8248. }
  8249. type T_XftFont = TXftFont
  8250. type TXftDraw = struct {
  8251. Fdpy uintptr
  8252. Fscreen int32
  8253. Fbits_per_pixel uint32
  8254. Fdepth uint32
  8255. Fdrawable TDrawable
  8256. Fvisual uintptr
  8257. Fcolormap TColormap
  8258. Fclip_type TXftClipType
  8259. Fclip TXftClip
  8260. Fsubwindow_mode int32
  8261. Frender struct {
  8262. Fpict TPicture
  8263. }
  8264. Fcore struct {
  8265. Fgc TGC
  8266. Fuse_pixmap int32
  8267. }
  8268. }
  8269. type T_XftDraw = TXftDraw
  8270. type __XftClipType = int32
  8271. const _XftClipTypeNone = 0
  8272. const _XftClipTypeRegion = 1
  8273. const _XftClipTypeRectangles = 2
  8274. type TXftColor = struct {
  8275. Fpixel uint32
  8276. Fcolor TXRenderColor
  8277. }
  8278. type T_XftColor = TXftColor
  8279. type TXftCharSpec = struct {
  8280. Fucs4 TFcChar32
  8281. Fx int16
  8282. Fy int16
  8283. }
  8284. type T_XftCharSpec = TXftCharSpec
  8285. type TXftCharFontSpec = struct {
  8286. Ffont uintptr
  8287. Fucs4 TFcChar32
  8288. Fx int16
  8289. Fy int16
  8290. }
  8291. type T_XftCharFontSpec = TXftCharFontSpec
  8292. type TXftGlyphSpec = struct {
  8293. Fglyph TFT_UInt
  8294. Fx int16
  8295. Fy int16
  8296. }
  8297. type T_XftGlyphSpec = TXftGlyphSpec
  8298. type TXftGlyphFontSpec = struct {
  8299. Ffont uintptr
  8300. Fglyph TFT_UInt
  8301. Fx int16
  8302. Fy int16
  8303. }
  8304. type T_XftGlyphFontSpec = TXftGlyphFontSpec
  8305. type TXftMatcher = struct {
  8306. Fobject uintptr
  8307. Fcompare uintptr
  8308. }
  8309. type T_XftMatcher = TXftMatcher
  8310. type TXftSymbolic = struct {
  8311. Fname uintptr
  8312. Fvalue int32
  8313. }
  8314. type T_XftSymbolic = TXftSymbolic
  8315. type TXftGlyph = struct {
  8316. Fmetrics TXGlyphInfo
  8317. Fbitmap uintptr
  8318. Fglyph_memory uint32
  8319. Fpicture TPicture
  8320. }
  8321. type T_XftGlyph = TXftGlyph
  8322. type TXftGlyphUsage = struct {
  8323. Fcontents TXftGlyph
  8324. Fnewer TFT_UInt
  8325. Folder TFT_UInt
  8326. }
  8327. type T_XftGlyphUsage = TXftGlyphUsage
  8328. type TXftUcsHash = struct {
  8329. Fucs4 TFcChar32
  8330. Fglyph TFT_UInt
  8331. }
  8332. type T_XftUcsHash = TXftUcsHash
  8333. type TXftFtFile = struct {
  8334. Fnext uintptr
  8335. Fref int32
  8336. Ffile uintptr
  8337. Fid int32
  8338. Fxsize TFT_F26Dot6
  8339. Fysize TFT_F26Dot6
  8340. Fmatrix TFT_Matrix
  8341. Flock int32
  8342. Fface TFT_Face
  8343. }
  8344. type T_XftFtFile = TXftFtFile
  8345. type TXftFontInt = struct {
  8346. Fpublic TXftFont
  8347. Fnext uintptr
  8348. Fhash_next uintptr
  8349. Finfo TXftFontInfo
  8350. Fref int32
  8351. Fglyphs uintptr
  8352. Fnum_glyphs TFT_UInt
  8353. Fhash_table uintptr
  8354. Fhash_value int32
  8355. Frehash_value int32
  8356. Fglyphset TGlyphSet
  8357. Fformat uintptr
  8358. Fglyph_memory uint32
  8359. Fmax_glyph_memory uint32
  8360. Fsizeof_glyph uint32
  8361. Fnewest TFT_UInt
  8362. Ftotal_inuse TFT_UInt
  8363. Ftrack_mem_usage TFcBool
  8364. Fuse_free_glyphs TFcBool
  8365. }
  8366. type T_XftFontInt = TXftFontInt
  8367. type TXftClipType = int32
  8368. type TXftClipRect = struct {
  8369. FxOrigin int32
  8370. FyOrigin int32
  8371. Fn int32
  8372. }
  8373. type T_XftClipRect = TXftClipRect
  8374. type TXftClip = struct {
  8375. Fregion [0]TRegion
  8376. Frect uintptr
  8377. }
  8378. type T_XftClip = TXftClip
  8379. type TXftSolidColor = struct {
  8380. Fcolor TXRenderColor
  8381. Fscreen int32
  8382. Fpict TPicture
  8383. }
  8384. type T_XftSolidColor = TXftSolidColor
  8385. type TXftDisplayInfo = struct {
  8386. Fnext uintptr
  8387. Fdisplay uintptr
  8388. Fcodes uintptr
  8389. Fdefaults uintptr
  8390. FhasRender TFcBool
  8391. FhasSolid TFcBool
  8392. Ffonts uintptr
  8393. FsolidFormat uintptr
  8394. Fglyph_memory uint32
  8395. Fmax_glyph_memory uint32
  8396. Ftrack_mem_usage TFcBool
  8397. Fuse_free_glyphs TFcBool
  8398. Fnum_unref_fonts int32
  8399. Fmax_unref_fonts int32
  8400. Fcolors [16]TXftSolidColor
  8401. FfontHash [127]uintptr
  8402. }
  8403. type T_XftDisplayInfo = TXftDisplayInfo
  8404. type TXFT_MEM_KIND = int32
  8405. const _XFT_MEM_DRAW = 0
  8406. const _XFT_MEM_FONT = 1
  8407. const _XFT_MEM_FILE = 2
  8408. const _XFT_MEM_GLYPH = 3
  8409. const _XFT_MEM_NUM = 4
  8410. /* xftxlfd.c */
  8411. func XXftColorAllocName(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, name uintptr, result uintptr) (r int32) {
  8412. bp := tls.Alloc(32)
  8413. defer tls.Free(32)
  8414. var _ /* exact at bp+12 */ TXColor
  8415. var _ /* screen at bp+0 */ TXColor
  8416. if !(libx11.XXAllocNamedColor(tls, dpy, cmap, name, bp, bp+12) != 0) {
  8417. /* XXX stick standard colormap stuff here */
  8418. return m_False
  8419. }
  8420. (*TXftColor)(unsafe.Pointer(result)).Fpixel = (*(*TXColor)(unsafe.Pointer(bp))).Fpixel
  8421. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fred = (*(*TXColor)(unsafe.Pointer(bp + 12))).Fred
  8422. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fgreen = (*(*TXColor)(unsafe.Pointer(bp + 12))).Fgreen
  8423. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fblue = (*(*TXColor)(unsafe.Pointer(bp + 12))).Fblue
  8424. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Falpha = uint16(0xffff)
  8425. return int32(m_True)
  8426. }
  8427. func _maskbase(tls *libc.TLS, m uint32) (r int16) {
  8428. var i int16
  8429. _ = i
  8430. if !(m != 0) {
  8431. return 0
  8432. }
  8433. i = 0
  8434. for !(m&libc.Uint32FromInt32(1) != 0) {
  8435. m >>= uint32(1)
  8436. i++
  8437. }
  8438. return i
  8439. }
  8440. func _masklen(tls *libc.TLS, m uint32) (r int16) {
  8441. var y uint32
  8442. _ = y
  8443. y = m >> int32(1) & uint32(033333333333)
  8444. y = m - y - y>>int32(1)&uint32(033333333333)
  8445. return libc.Int16FromUint32((y + y>>libc.Int32FromInt32(3)) & libc.Uint32FromUint32(030707070707) % libc.Uint32FromInt32(077))
  8446. }
  8447. func XXftColorAllocValue(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, color uintptr, result uintptr) (r int32) {
  8448. bp := tls.Alloc(16)
  8449. defer tls.Free(16)
  8450. var blue_len, blue_shift, green_len, green_shift, red_len, red_shift int32
  8451. var _ /* xcolor at bp+0 */ TXColor
  8452. _, _, _, _, _, _ = blue_len, blue_shift, green_len, green_shift, red_len, red_shift
  8453. if (*TVisual)(unsafe.Pointer(visual)).Fclass == int32(m_TrueColor) {
  8454. red_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fred_mask))
  8455. red_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fred_mask))
  8456. green_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fgreen_mask))
  8457. green_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fgreen_mask))
  8458. blue_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fblue_mask))
  8459. blue_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fblue_mask))
  8460. (*TXftColor)(unsafe.Pointer(result)).Fpixel = libc.Uint32FromInt32(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)
  8461. } else {
  8462. (*(*TXColor)(unsafe.Pointer(bp))).Fred = (*TXRenderColor)(unsafe.Pointer(color)).Fred
  8463. (*(*TXColor)(unsafe.Pointer(bp))).Fgreen = (*TXRenderColor)(unsafe.Pointer(color)).Fgreen
  8464. (*(*TXColor)(unsafe.Pointer(bp))).Fblue = (*TXRenderColor)(unsafe.Pointer(color)).Fblue
  8465. if !(libx11.XXAllocColor(tls, dpy, cmap, bp) != 0) {
  8466. return m_False
  8467. }
  8468. (*TXftColor)(unsafe.Pointer(result)).Fpixel = (*(*TXColor)(unsafe.Pointer(bp))).Fpixel
  8469. }
  8470. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fred = (*TXRenderColor)(unsafe.Pointer(color)).Fred
  8471. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fgreen = (*TXRenderColor)(unsafe.Pointer(color)).Fgreen
  8472. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fblue = (*TXRenderColor)(unsafe.Pointer(color)).Fblue
  8473. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Falpha = (*TXRenderColor)(unsafe.Pointer(color)).Falpha
  8474. return int32(m_True)
  8475. }
  8476. func XXftColorFree(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, color uintptr) {
  8477. if (*TVisual)(unsafe.Pointer(visual)).Fclass != int32(m_TrueColor) {
  8478. libx11.XXFreeColors(tls, dpy, cmap, color, int32(1), uint32(0))
  8479. }
  8480. }
  8481. type Tfuncs = struct {
  8482. Fcreate_image uintptr
  8483. Fdestroy_image uintptr
  8484. Fget_pixel uintptr
  8485. Fput_pixel uintptr
  8486. Fsub_image uintptr
  8487. Fadd_pixel uintptr
  8488. }
  8489. const m_NUM_LOCAL = 1024
  8490. /* xftxlfd.c */
  8491. func XXftRectCore(tls *libc.TLS, draw uintptr, color uintptr, x int32, y int32, width uint32, height uint32) {
  8492. if libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >= int32(0x8000) {
  8493. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  8494. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, x, y, width, height)
  8495. }
  8496. }
  8497. /*
  8498. * Use the core protocol to draw the glyphs
  8499. */
  8500. func __XftSharpGlyphMono(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8501. var bits, bitsMask uint8
  8502. var height, lenspan, stride, w, width, xspan, v1 int32
  8503. var src, srcLine, v2, v3, v4 uintptr
  8504. _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, bitsMask, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8505. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8506. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8507. stride = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  8508. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8509. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8510. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8511. for {
  8512. v1 = height
  8513. height--
  8514. if !(v1 != 0) {
  8515. break
  8516. }
  8517. src = srcLine
  8518. srcLine += uintptr(stride)
  8519. w = width
  8520. bitsMask = uint8(0x80) /* FreeType is always MSB first */
  8521. v2 = src
  8522. src++
  8523. bits = *(*uint8)(unsafe.Pointer(v2))
  8524. xspan = x
  8525. for w != 0 {
  8526. if libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0 {
  8527. lenspan = 0
  8528. for cond := true; cond; cond = libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0 {
  8529. lenspan++
  8530. if lenspan == w {
  8531. break
  8532. }
  8533. bitsMask = libc.Uint8FromInt32(libc.Int32FromUint8(bitsMask) >> int32(1))
  8534. if !(bitsMask != 0) {
  8535. v3 = src
  8536. src++
  8537. bits = *(*uint8)(unsafe.Pointer(v3))
  8538. bitsMask = uint8(0x80)
  8539. }
  8540. }
  8541. 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))
  8542. xspan += lenspan
  8543. w -= lenspan
  8544. } else {
  8545. for cond := true; cond; cond = !(libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0) {
  8546. w--
  8547. xspan++
  8548. if !(w != 0) {
  8549. break
  8550. }
  8551. bitsMask = libc.Uint8FromInt32(libc.Int32FromUint8(bitsMask) >> int32(1))
  8552. if !(bitsMask != 0) {
  8553. v4 = src
  8554. src++
  8555. bits = *(*uint8)(unsafe.Pointer(v4))
  8556. bitsMask = uint8(0x80)
  8557. }
  8558. }
  8559. }
  8560. }
  8561. y++
  8562. }
  8563. }
  8564. // C documentation
  8565. //
  8566. // /*
  8567. // * Draw solid color text from an anti-aliased bitmap. This is a
  8568. // * fallback for cases where a particular drawable has no AA code
  8569. // */
  8570. func __XftSharpGlyphGray(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8571. var bits uint8
  8572. var height, lenspan, stride, w, width, xspan, v1 int32
  8573. var src, srcLine, v2, v3, v4 uintptr
  8574. _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8575. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8576. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8577. stride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8578. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8579. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8580. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8581. for {
  8582. v1 = height
  8583. height--
  8584. if !(v1 != 0) {
  8585. break
  8586. }
  8587. src = srcLine
  8588. srcLine += uintptr(stride)
  8589. w = width
  8590. v2 = src
  8591. src++
  8592. bits = *(*uint8)(unsafe.Pointer(v2))
  8593. xspan = x
  8594. for w != 0 {
  8595. if libc.Int32FromUint8(bits) >= int32(0x80) {
  8596. lenspan = 0
  8597. for cond := true; cond; cond = libc.Int32FromUint8(bits) >= int32(0x80) {
  8598. lenspan++
  8599. if lenspan == w {
  8600. break
  8601. }
  8602. v3 = src
  8603. src++
  8604. bits = *(*uint8)(unsafe.Pointer(v3))
  8605. }
  8606. 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))
  8607. xspan += lenspan
  8608. w -= lenspan
  8609. } else {
  8610. for cond := true; cond; cond = libc.Int32FromUint8(bits) < int32(0x80) {
  8611. w--
  8612. xspan++
  8613. if !(w != 0) {
  8614. break
  8615. }
  8616. v4 = src
  8617. src++
  8618. bits = *(*uint8)(unsafe.Pointer(v4))
  8619. }
  8620. }
  8621. }
  8622. y++
  8623. }
  8624. }
  8625. func __XftSharpGlyphRgba(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8626. var bits TCARD32
  8627. var height, lenspan, stride, w, width, xspan, v1 int32
  8628. var src, srcLine, v2, v3, v4 uintptr
  8629. _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8630. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8631. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8632. stride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8633. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8634. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8635. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8636. for {
  8637. v1 = height
  8638. height--
  8639. if !(v1 != 0) {
  8640. break
  8641. }
  8642. src = srcLine
  8643. srcLine += uintptr(stride) * 4
  8644. w = width
  8645. v2 = src
  8646. src += 4
  8647. bits = *(*TCARD32)(unsafe.Pointer(v2))
  8648. xspan = x
  8649. for w != 0 {
  8650. if bits >= uint32(0x80000000) {
  8651. lenspan = 0
  8652. for cond := true; cond; cond = bits >= uint32(0x80000000) {
  8653. lenspan++
  8654. if lenspan == w {
  8655. break
  8656. }
  8657. v3 = src
  8658. src += 4
  8659. bits = *(*TCARD32)(unsafe.Pointer(v3))
  8660. }
  8661. 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))
  8662. xspan += lenspan
  8663. w -= lenspan
  8664. } else {
  8665. for cond := true; cond; cond = bits < uint32(0x80000000) {
  8666. w--
  8667. xspan++
  8668. if !(w != 0) {
  8669. break
  8670. }
  8671. v4 = src
  8672. src += 4
  8673. bits = *(*TCARD32)(unsafe.Pointer(v4))
  8674. }
  8675. }
  8676. }
  8677. y++
  8678. }
  8679. }
  8680. type TXftSharpGlyph = uintptr
  8681. func __XftSharpGlyphFind(tls *libc.TLS, draw uintptr, public uintptr) (r TXftSharpGlyph) {
  8682. var font uintptr
  8683. _ = font
  8684. font = public
  8685. if !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0) {
  8686. return __ccgo_fp(__XftSharpGlyphMono)
  8687. } else {
  8688. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  8689. case int32(m_FC_RGBA_RGB):
  8690. fallthrough
  8691. case int32(m_FC_RGBA_BGR):
  8692. fallthrough
  8693. case int32(m_FC_RGBA_VRGB):
  8694. fallthrough
  8695. case int32(m_FC_RGBA_VBGR):
  8696. return __ccgo_fp(__XftSharpGlyphRgba)
  8697. default:
  8698. return __ccgo_fp(__XftSharpGlyphGray)
  8699. }
  8700. }
  8701. return r
  8702. }
  8703. /*
  8704. * Draw glyphs to a target that supports anti-aliasing
  8705. */
  8706. /*
  8707. * Primitives for converting between RGB values and TrueColor pixels
  8708. */
  8709. func __XftExamineBitfield(tls *libc.TLS, mask uint32, shift uintptr, len1 uintptr) {
  8710. var l, s int32
  8711. _, _ = l, s
  8712. s = 0
  8713. for mask&uint32(1) == uint32(0) {
  8714. mask >>= uint32(1)
  8715. s++
  8716. }
  8717. l = 0
  8718. for mask&uint32(1) == uint32(1) {
  8719. mask >>= uint32(1)
  8720. l++
  8721. }
  8722. *(*int32)(unsafe.Pointer(shift)) = s
  8723. *(*int32)(unsafe.Pointer(len1)) = l
  8724. }
  8725. func __XftGetField(tls *libc.TLS, l_pixel uint32, shift int32, len1 int32) (r TCARD32) {
  8726. var pixel TCARD32
  8727. _ = pixel
  8728. pixel = l_pixel
  8729. pixel = pixel & libc.Uint32FromInt32((libc.Int32FromInt32(1)<<len1-libc.Int32FromInt32(1))<<shift)
  8730. pixel = pixel << (int32(32) - (shift + len1)) >> int32(24)
  8731. for len1 < int32(8) {
  8732. pixel |= pixel >> len1
  8733. len1 <<= int32(1)
  8734. }
  8735. return pixel
  8736. }
  8737. func __XftPutField(tls *libc.TLS, pixel TCARD32, shift int32, len1 int32) (r uint32) {
  8738. var l_pixel uint32
  8739. _ = l_pixel
  8740. l_pixel = pixel
  8741. shift = shift - (int32(8) - len1)
  8742. if len1 <= int32(8) {
  8743. l_pixel = l_pixel & libc.Uint32FromInt32((libc.Int32FromInt32(1)<<len1-libc.Int32FromInt32(1))<<(libc.Int32FromInt32(8)-len1))
  8744. }
  8745. if shift < 0 {
  8746. l_pixel >>= libc.Uint32FromInt32(-shift)
  8747. } else {
  8748. l_pixel <<= libc.Uint32FromInt32(shift)
  8749. }
  8750. return l_pixel
  8751. }
  8752. // C documentation
  8753. //
  8754. // /*
  8755. // * This is used when doing XftCharFontSpec/XftGlyphFontSpec where
  8756. // * some of the fonts are bitmaps and some are anti-aliased to handle
  8757. // * the bitmap portions
  8758. // */
  8759. func __XftSmoothGlyphMono(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8760. bp := tls.Alloc(32)
  8761. defer tls.Free(32)
  8762. var bits, bitsMask uint8
  8763. var height, stride, w, width, xspan, v1, v3 int32
  8764. var pixel uint32
  8765. var src, srcLine, v2, v4 uintptr
  8766. var _ /* b_len at bp+20 */ int32
  8767. var _ /* b_shift at bp+16 */ int32
  8768. var _ /* g_len at bp+12 */ int32
  8769. var _ /* g_shift at bp+8 */ int32
  8770. var _ /* r_len at bp+4 */ int32
  8771. var _ /* r_shift at bp+0 */ int32
  8772. _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, bitsMask, height, pixel, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8773. srcLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8774. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8775. stride = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  8776. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8777. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  8778. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  8779. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  8780. 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)))
  8781. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8782. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8783. for {
  8784. v1 = height
  8785. height--
  8786. if !(v1 != 0) {
  8787. break
  8788. }
  8789. src = srcLine
  8790. srcLine += uintptr(stride)
  8791. w = width
  8792. bitsMask = uint8(0x80) /* FreeType is always MSB first */
  8793. v2 = src
  8794. src++
  8795. bits = *(*uint8)(unsafe.Pointer(v2))
  8796. xspan = x
  8797. for {
  8798. v3 = w
  8799. w--
  8800. if !(v3 != 0) {
  8801. break
  8802. }
  8803. if libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0 {
  8804. (*(*func(*libc.TLS, uintptr, int32, int32, uint32) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, xspan, y, pixel)
  8805. }
  8806. bitsMask = libc.Uint8FromInt32(libc.Int32FromUint8(bitsMask) >> int32(1))
  8807. if !(bitsMask != 0) {
  8808. v4 = src
  8809. src++
  8810. bits = *(*uint8)(unsafe.Pointer(v4))
  8811. bitsMask = uint8(0x80)
  8812. }
  8813. xspan++
  8814. }
  8815. y++
  8816. }
  8817. }
  8818. /*
  8819. * As simple anti-aliasing is likely to be common, there are three
  8820. * optimized versions for the usual true color pixel formats (888, 565, 555).
  8821. * Other formats are handled by the general case
  8822. */
  8823. /*
  8824. * There are two ways of handling alpha -- either as a single unified value or
  8825. * a separate value for each component, hence each macro must have two
  8826. * versions. The unified alpha version has a 'U' at the end of the name,
  8827. * the component version has a 'C'. Similarly, functions which deal with
  8828. * this difference will have two versions using the same convention.
  8829. */
  8830. func _fbOver24(tls *libc.TLS, x TCARD32, y TCARD32) (r TCARD32) {
  8831. var a, t TCARD16
  8832. var m, n, o TCARD32
  8833. _, _, _, _, _ = a, m, n, o, t
  8834. a = uint16(^x >> libc.Int32FromInt32(24))
  8835. t = uint16(0)
  8836. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(y>>libc.Int32FromInt32(0))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8837. 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)))))
  8838. m = uint32(libc.Uint8FromInt32(libc.Int32FromUint16(t)|(libc.Int32FromInt32(0)-libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(0)
  8839. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(y>>libc.Int32FromInt32(8))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8840. 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)))))
  8841. n = uint32(libc.Uint8FromInt32(libc.Int32FromUint16(t)|(libc.Int32FromInt32(0)-libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(8)
  8842. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(y>>libc.Int32FromInt32(16))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8843. 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)))))
  8844. o = uint32(libc.Uint8FromInt32(libc.Int32FromUint16(t)|(libc.Int32FromInt32(0)-libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(16)
  8845. return m | n | o
  8846. }
  8847. func _fbIn(tls *libc.TLS, x TCARD32, y TCARD8) (r TCARD32) {
  8848. var a, t TCARD16
  8849. var m, n, o, p TCARD32
  8850. _, _, _, _, _, _ = a, m, n, o, p, t
  8851. a = uint16(y)
  8852. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(0))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8853. m = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << 0
  8854. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(8))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8855. n = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << int32(8)
  8856. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(16))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8857. o = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << int32(16)
  8858. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(24))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8859. p = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << int32(24)
  8860. return m | n | o | p
  8861. }
  8862. func __XftSmoothGlyphGray8888(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8863. var b, d, g, r, src, srca TCARD32
  8864. var dst, dstLine, mask, maskLine, v3 uintptr
  8865. var dstStride, height, maskStride, w, width, v1, v2 int32
  8866. var m TCARD8
  8867. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8868. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8869. /* This handles only RGB and BGR */
  8870. g = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8871. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint32(0xff0000) {
  8872. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8873. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8874. } else {
  8875. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  8876. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  8877. }
  8878. src = srca<<libc.Int32FromInt32(24) | r | g | b
  8879. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8880. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8881. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8882. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8883. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(2))
  8884. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(2)
  8885. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8886. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8887. for {
  8888. v1 = height
  8889. height--
  8890. if !(v1 != 0) {
  8891. break
  8892. }
  8893. dst = dstLine
  8894. dstLine += uintptr(dstStride) * 4
  8895. mask = maskLine
  8896. maskLine += uintptr(maskStride)
  8897. w = width
  8898. for {
  8899. v2 = w
  8900. w--
  8901. if !(v2 != 0) {
  8902. break
  8903. }
  8904. v3 = mask
  8905. mask++
  8906. m = *(*TCARD8)(unsafe.Pointer(v3))
  8907. if libc.Int32FromUint8(m) == int32(0xff) {
  8908. if srca == uint32(0xff) {
  8909. *(*TCARD32)(unsafe.Pointer(dst)) = src
  8910. } else {
  8911. *(*TCARD32)(unsafe.Pointer(dst)) = _fbOver24(tls, src, *(*TCARD32)(unsafe.Pointer(dst)))
  8912. }
  8913. } else {
  8914. if m != 0 {
  8915. d = _fbIn(tls, src, m)
  8916. *(*TCARD32)(unsafe.Pointer(dst)) = _fbOver24(tls, d, *(*TCARD32)(unsafe.Pointer(dst)))
  8917. }
  8918. }
  8919. dst += 4
  8920. }
  8921. }
  8922. }
  8923. func __XftSmoothGlyphGray565(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8924. var b, d, g, r, src, srca TCARD32
  8925. var dst, dstLine, mask, maskLine, v3 uintptr
  8926. var dstStride, height, maskStride, w, width, v1, v2 int32
  8927. var m TCARD8
  8928. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8929. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8930. /* This handles only RGB and BGR */
  8931. g = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8932. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint32(0xf800) {
  8933. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8934. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8935. } else {
  8936. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  8937. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  8938. }
  8939. src = srca<<libc.Int32FromInt32(24) | r | g | b
  8940. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8941. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8942. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8943. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8944. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(1))
  8945. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(1)
  8946. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8947. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8948. for {
  8949. v1 = height
  8950. height--
  8951. if !(v1 != 0) {
  8952. break
  8953. }
  8954. dst = dstLine
  8955. dstLine += uintptr(dstStride) * 2
  8956. mask = maskLine
  8957. maskLine += uintptr(maskStride)
  8958. w = width
  8959. for {
  8960. v2 = w
  8961. w--
  8962. if !(v2 != 0) {
  8963. break
  8964. }
  8965. v3 = mask
  8966. mask++
  8967. m = *(*TCARD8)(unsafe.Pointer(v3))
  8968. if libc.Int32FromUint8(m) == int32(0xff) {
  8969. if srca == uint32(0xff) {
  8970. d = src
  8971. } else {
  8972. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8973. 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)))
  8974. }
  8975. *(*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))
  8976. } else {
  8977. if m != 0 {
  8978. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8979. 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)))
  8980. *(*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))
  8981. }
  8982. }
  8983. dst += 2
  8984. }
  8985. }
  8986. }
  8987. func __XftSmoothGlyphGray555(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8988. var b, d, g, r, src, srca TCARD32
  8989. var dst, dstLine, mask, maskLine, v3 uintptr
  8990. var dstStride, height, maskStride, w, width, v1, v2 int32
  8991. var m TCARD8
  8992. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8993. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8994. /* This handles only RGB and BGR */
  8995. g = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8996. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint32(0xf800) {
  8997. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8998. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8999. } else {
  9000. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  9001. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  9002. }
  9003. src = srca<<libc.Int32FromInt32(24) | r | g | b
  9004. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  9005. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  9006. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  9007. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  9008. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(1))
  9009. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(1)
  9010. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  9011. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  9012. for {
  9013. v1 = height
  9014. height--
  9015. if !(v1 != 0) {
  9016. break
  9017. }
  9018. dst = dstLine
  9019. dstLine += uintptr(dstStride) * 2
  9020. mask = maskLine
  9021. maskLine += uintptr(maskStride)
  9022. w = width
  9023. for {
  9024. v2 = w
  9025. w--
  9026. if !(v2 != 0) {
  9027. break
  9028. }
  9029. v3 = mask
  9030. mask++
  9031. m = *(*TCARD8)(unsafe.Pointer(v3))
  9032. if libc.Int32FromUint8(m) == int32(0xff) {
  9033. if srca == uint32(0xff) {
  9034. d = src
  9035. } else {
  9036. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  9037. 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)))
  9038. }
  9039. *(*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))
  9040. } else {
  9041. if m != 0 {
  9042. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  9043. 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)))
  9044. *(*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))
  9045. }
  9046. }
  9047. dst += 2
  9048. }
  9049. }
  9050. }
  9051. func __XftSmoothGlyphGray(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  9052. bp := tls.Alloc(32)
  9053. defer tls.Free(32)
  9054. var d, src, srca TCARD32
  9055. var height, maskStride, tx, w, width, v1, v2 int32
  9056. var m TCARD8
  9057. var mask, maskLine, v3 uintptr
  9058. var pixel uint32
  9059. var _ /* b_len at bp+20 */ int32
  9060. var _ /* b_shift at bp+16 */ int32
  9061. var _ /* g_len at bp+12 */ int32
  9062. var _ /* g_shift at bp+8 */ int32
  9063. var _ /* r_len at bp+4 */ int32
  9064. var _ /* r_shift at bp+0 */ int32
  9065. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, height, m, mask, maskLine, maskStride, pixel, src, srca, tx, w, width, v1, v2, v3
  9066. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  9067. 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))
  9068. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  9069. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  9070. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  9071. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  9072. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  9073. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  9074. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  9075. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  9076. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  9077. for {
  9078. v1 = height
  9079. height--
  9080. if !(v1 != 0) {
  9081. break
  9082. }
  9083. mask = maskLine
  9084. maskLine += uintptr(maskStride)
  9085. w = width
  9086. tx = x
  9087. for {
  9088. v2 = w
  9089. w--
  9090. if !(v2 != 0) {
  9091. break
  9092. }
  9093. v3 = mask
  9094. mask++
  9095. m = *(*TCARD8)(unsafe.Pointer(v3))
  9096. if libc.Int32FromUint8(m) == int32(0xff) {
  9097. if srca == uint32(0xff) {
  9098. d = src
  9099. } else {
  9100. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  9101. 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)))
  9102. d = _fbOver24(tls, src, d)
  9103. }
  9104. 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)))
  9105. (*(*func(*libc.TLS, uintptr, int32, int32, uint32) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  9106. } else {
  9107. if m != 0 {
  9108. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  9109. 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)))
  9110. d = _fbOver24(tls, _fbIn(tls, src, m), d)
  9111. 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)))
  9112. (*(*func(*libc.TLS, uintptr, int32, int32, uint32) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  9113. }
  9114. }
  9115. tx++
  9116. }
  9117. y++
  9118. }
  9119. }
  9120. func __XftSmoothGlyphRgba(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  9121. bp := tls.Alloc(32)
  9122. defer tls.Free(32)
  9123. var __a, __a1, __a2 TCARD16
  9124. var __i, __i1, __i2, __t, __t1, __t2, __ta, __ta1, __ta2, d, m, ma, n, o, src, srca TCARD32
  9125. var height, tx, w, width, v1, v2 int32
  9126. var mask, v3 uintptr
  9127. var pixel uint32
  9128. var _ /* b_len at bp+20 */ int32
  9129. var _ /* b_shift at bp+16 */ int32
  9130. var _ /* g_len at bp+12 */ int32
  9131. var _ /* g_shift at bp+8 */ int32
  9132. var _ /* r_len at bp+4 */ int32
  9133. var _ /* r_shift at bp+0 */ int32
  9134. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = __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
  9135. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  9136. 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))
  9137. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  9138. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  9139. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  9140. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  9141. mask = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  9142. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  9143. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  9144. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  9145. for {
  9146. v1 = height
  9147. height--
  9148. if !(v1 != 0) {
  9149. break
  9150. }
  9151. w = width
  9152. tx = x
  9153. for {
  9154. v2 = w
  9155. w--
  9156. if !(v2 != 0) {
  9157. break
  9158. }
  9159. v3 = mask
  9160. mask += 4
  9161. ma = *(*TCARD32)(unsafe.Pointer(v3))
  9162. if ma == uint32(0xffffffff) {
  9163. if srca == uint32(0xff) {
  9164. d = src
  9165. } else {
  9166. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  9167. 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)))
  9168. d = _fbOver24(tls, src, d)
  9169. }
  9170. 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)))
  9171. (*(*func(*libc.TLS, uintptr, int32, int32, uint32) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  9172. } else {
  9173. if ma != 0 {
  9174. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  9175. 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)))
  9176. __a = uint16(uint8(ma >> libc.Int32FromInt32(0)))
  9177. __i = libc.Uint32FromInt32(libc.Int32FromUint16(uint16(uint8(src>>libc.Int32FromInt32(0))))*libc.Int32FromUint16(__a) + libc.Int32FromInt32(0x80))
  9178. __t = (__i>>libc.Int32FromInt32(8) + __i) >> libc.Int32FromInt32(8)
  9179. __i = srca*uint32(__a) + libc.Uint32FromInt32(0x80)
  9180. __ta = uint32(uint8(^((__i>>libc.Int32FromInt32(8) + __i) >> libc.Int32FromInt32(8))))
  9181. __i = uint32(uint16(uint8(d>>libc.Int32FromInt32(0))))*__ta + libc.Uint32FromInt32(0x80)
  9182. __t = __t + (__i>>libc.Int32FromInt32(8)+__i)>>libc.Int32FromInt32(8)
  9183. __t = uint32(uint8(__t | -(__t >> libc.Int32FromInt32(8))))
  9184. m = __t << 0
  9185. __a1 = uint16(uint8(ma >> libc.Int32FromInt32(8)))
  9186. __i1 = libc.Uint32FromInt32(libc.Int32FromUint16(uint16(uint8(src>>libc.Int32FromInt32(8))))*libc.Int32FromUint16(__a1) + libc.Int32FromInt32(0x80))
  9187. __t1 = (__i1>>libc.Int32FromInt32(8) + __i1) >> libc.Int32FromInt32(8)
  9188. __i1 = srca*uint32(__a1) + libc.Uint32FromInt32(0x80)
  9189. __ta1 = uint32(uint8(^((__i1>>libc.Int32FromInt32(8) + __i1) >> libc.Int32FromInt32(8))))
  9190. __i1 = uint32(uint16(uint8(d>>libc.Int32FromInt32(8))))*__ta1 + libc.Uint32FromInt32(0x80)
  9191. __t1 = __t1 + (__i1>>libc.Int32FromInt32(8)+__i1)>>libc.Int32FromInt32(8)
  9192. __t1 = uint32(uint8(__t1 | -(__t1 >> libc.Int32FromInt32(8))))
  9193. n = __t1 << int32(8)
  9194. __a2 = uint16(uint8(ma >> libc.Int32FromInt32(16)))
  9195. __i2 = libc.Uint32FromInt32(libc.Int32FromUint16(uint16(uint8(src>>libc.Int32FromInt32(16))))*libc.Int32FromUint16(__a2) + libc.Int32FromInt32(0x80))
  9196. __t2 = (__i2>>libc.Int32FromInt32(8) + __i2) >> libc.Int32FromInt32(8)
  9197. __i2 = srca*uint32(__a2) + libc.Uint32FromInt32(0x80)
  9198. __ta2 = uint32(uint8(^((__i2>>libc.Int32FromInt32(8) + __i2) >> libc.Int32FromInt32(8))))
  9199. __i2 = uint32(uint16(uint8(d>>libc.Int32FromInt32(16))))*__ta2 + libc.Uint32FromInt32(0x80)
  9200. __t2 = __t2 + (__i2>>libc.Int32FromInt32(8)+__i2)>>libc.Int32FromInt32(8)
  9201. __t2 = uint32(uint8(__t2 | -(__t2 >> libc.Int32FromInt32(8))))
  9202. o = __t2 << int32(16)
  9203. d = m | n | o
  9204. 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)))
  9205. (*(*func(*libc.TLS, uintptr, int32, int32, uint32) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  9206. }
  9207. }
  9208. tx++
  9209. }
  9210. y++
  9211. }
  9212. }
  9213. func __XftSmoothGlyphPossible(tls *libc.TLS, draw uintptr) (r TFcBool) {
  9214. if !((*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0) {
  9215. return m_FcFalse
  9216. }
  9217. if (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fclass != int32(m_TrueColor) {
  9218. return m_FcFalse
  9219. }
  9220. return int32(m_FcTrue)
  9221. }
  9222. type TXftSmoothGlyph = uintptr
  9223. func __XftSmoothGlyphFind(tls *libc.TLS, draw uintptr, public uintptr) (r TXftSmoothGlyph) {
  9224. var font uintptr
  9225. _ = font
  9226. font = public
  9227. if !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0) {
  9228. return __ccgo_fp(__XftSmoothGlyphMono)
  9229. } else {
  9230. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  9231. case int32(m_FC_RGBA_RGB):
  9232. fallthrough
  9233. case int32(m_FC_RGBA_BGR):
  9234. fallthrough
  9235. case int32(m_FC_RGBA_VRGB):
  9236. fallthrough
  9237. case int32(m_FC_RGBA_VBGR):
  9238. return __ccgo_fp(__XftSmoothGlyphRgba)
  9239. default:
  9240. switch XXftDrawBitsPerPixel(tls, draw) {
  9241. case uint32(32):
  9242. if (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask == uint32(0xff0000) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask == uint32(0x00ff00) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask == uint32(0x0000ff) || (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask == uint32(0x0000ff) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask == uint32(0x00ff00) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask == uint32(0xff0000) {
  9243. return __ccgo_fp(__XftSmoothGlyphGray8888)
  9244. }
  9245. case uint32(16):
  9246. if (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask == uint32(0xf800) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask == uint32(0x07e0) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask == uint32(0x001f) || (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask == uint32(0x001f) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask == uint32(0x07e0) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask == uint32(0xf800) {
  9247. return __ccgo_fp(__XftSmoothGlyphGray565)
  9248. }
  9249. if (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask == uint32(0x7c00) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask == uint32(0x03e0) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask == uint32(0x001f) || (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask == uint32(0x001f) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask == uint32(0x03e0) && (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask == uint32(0x7c00) {
  9250. return __ccgo_fp(__XftSmoothGlyphGray555)
  9251. }
  9252. default:
  9253. break
  9254. }
  9255. return __ccgo_fp(__XftSmoothGlyphGray)
  9256. }
  9257. }
  9258. return r
  9259. }
  9260. func __XftGlyphDefault(tls *libc.TLS, dpy uintptr, public uintptr) (r uintptr) {
  9261. bp := tls.Alloc(1040)
  9262. defer tls.Free(1040)
  9263. var font uintptr
  9264. var glyphs_loaded TFcBool
  9265. var _ /* missing at bp+0 */ [256]TFT_UInt
  9266. var _ /* nmissing at bp+1024 */ int32
  9267. _, _ = font, glyphs_loaded
  9268. font = public
  9269. glyphs_loaded = m_FcFalse
  9270. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), uint32(0), bp, bp+1024) != 0 {
  9271. glyphs_loaded = int32(m_FcTrue)
  9272. }
  9273. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9274. XXftFontLoadGlyphs(tls, dpy, public, glyphs_loaded, bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9275. }
  9276. return *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs))
  9277. }
  9278. func _XftGetImageErrorHandler(tls *libc.TLS, dpy uintptr, error_event uintptr) (r int32) {
  9279. return 0
  9280. }
  9281. func XXftGlyphCore(tls *libc.TLS, draw uintptr, color uintptr, public uintptr, x int32, y int32, glyphs uintptr, nglyphs int32) {
  9282. bp := tls.Alloc(1136)
  9283. defer tls.Free(1136)
  9284. var depth, v3 uint32
  9285. var dpy, font, g, image, xftg, v10, v11, v2, v6, v7 uintptr
  9286. var gc TGC
  9287. var glyph TFT_UInt
  9288. var glyphs_loaded TFcBool
  9289. var n, ox, oy, v1, v5, v9 int32
  9290. var pix TPixmap
  9291. var prev_error TXErrorHandler
  9292. var sharp TXftSharpGlyph
  9293. var smooth TXftSmoothGlyph
  9294. var v12, v4, v8 bool
  9295. var _ /* gcv at bp+1040 */ TXGCValues
  9296. var _ /* gi at bp+1028 */ TXGlyphInfo
  9297. var _ /* missing at bp+0 */ [256]TFT_UInt
  9298. var _ /* nmissing at bp+1024 */ int32
  9299. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  9300. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  9301. font = public
  9302. /*
  9303. * Load missing glyphs
  9304. */
  9305. g = glyphs
  9306. n = nglyphs
  9307. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  9308. glyphs_loaded = m_FcFalse
  9309. for {
  9310. v1 = n
  9311. n--
  9312. if !(v1 != 0) {
  9313. break
  9314. }
  9315. v2 = g
  9316. g += 4
  9317. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), *(*TFT_UInt)(unsafe.Pointer(v2)), bp, bp+1024) != 0 {
  9318. glyphs_loaded = int32(m_FcTrue)
  9319. }
  9320. }
  9321. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9322. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9323. }
  9324. g = glyphs
  9325. n = nglyphs
  9326. if ((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 || libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9327. smooth = __XftSmoothGlyphFind(tls, draw, public)
  9328. XXftGlyphExtents(tls, dpy, public, glyphs, nglyphs, bp+1028)
  9329. if !((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth != 0) || !((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight != 0) {
  9330. goto bail1
  9331. }
  9332. ox = x - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9333. oy = y - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9334. /*
  9335. * Try to get bits directly from the drawable; if that fails,
  9336. * use a temporary pixmap. When it does fail, assume it
  9337. * will probably fail for a while and keep using temporary
  9338. * pixmaps for a while to avoid double round trips.
  9339. */
  9340. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9341. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9342. 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.Uint32FromInt32(^libc.Int32FromInt32(0)), int32(m_ZPixmap))
  9343. libx11.XXSetErrorHandler(tls, prev_error)
  9344. if !(image != 0) {
  9345. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9346. }
  9347. } else {
  9348. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9349. image = libc.UintptrFromInt32(0)
  9350. }
  9351. if v4 = !(image != 0); v4 {
  9352. v3 = XXftDrawDepth(tls, draw)
  9353. depth = v3
  9354. }
  9355. if v4 && v3 != 0 {
  9356. 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)
  9357. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9358. gc = libx11.XXCreateGC(tls, dpy, pix, libc.Uint32FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(16)), bp+1040)
  9359. 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)
  9360. libx11.XXFreeGC(tls, dpy, gc)
  9361. image = libx11.XXGetImage(tls, dpy, pix, 0, 0, uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth), uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight), libc.Uint32FromInt32(^libc.Int32FromInt32(0)), int32(m_ZPixmap))
  9362. libx11.XXFreePixmap(tls, dpy, pix)
  9363. }
  9364. if !(image != 0) {
  9365. goto bail1
  9366. }
  9367. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9368. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9369. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9370. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9371. XXftSwapImage(tls, image)
  9372. }
  9373. for {
  9374. v5 = n
  9375. n--
  9376. if !(v5 != 0) {
  9377. break
  9378. }
  9379. v6 = g
  9380. g += 4
  9381. glyph = *(*TFT_UInt)(unsafe.Pointer(v6))
  9382. if v8 = glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v8 {
  9383. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*4))
  9384. xftg = v7
  9385. }
  9386. if v8 || !(v7 != 0) {
  9387. xftg = __XftGlyphDefault(tls, dpy, public)
  9388. }
  9389. if xftg != 0 {
  9390. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr))(unsafe.Pointer(&struct{ uintptr }{smooth})))(tls, image, xftg, x-ox, y-oy, color)
  9391. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  9392. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  9393. }
  9394. }
  9395. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9396. XXftSwapImage(tls, image)
  9397. }
  9398. 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))
  9399. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9400. } else {
  9401. sharp = __XftSharpGlyphFind(tls, draw, public)
  9402. for {
  9403. v9 = n
  9404. n--
  9405. if !(v9 != 0) {
  9406. break
  9407. }
  9408. v10 = g
  9409. g += 4
  9410. glyph = *(*TFT_UInt)(unsafe.Pointer(v10))
  9411. if v12 = glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v12 {
  9412. v11 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*4))
  9413. xftg = v11
  9414. }
  9415. if v12 || !(v11 != 0) {
  9416. xftg = __XftGlyphDefault(tls, dpy, public)
  9417. }
  9418. if xftg != 0 {
  9419. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32))(unsafe.Pointer(&struct{ uintptr }{sharp})))(tls, draw, xftg, x, y)
  9420. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  9421. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  9422. }
  9423. }
  9424. }
  9425. goto bail1
  9426. bail1:
  9427. ;
  9428. if glyphs_loaded != 0 {
  9429. X_XftFontManageMemory(tls, dpy, public)
  9430. }
  9431. }
  9432. func XXftGlyphSpecCore(tls *libc.TLS, draw uintptr, color uintptr, public uintptr, glyphs uintptr, nglyphs int32) {
  9433. bp := tls.Alloc(1136)
  9434. defer tls.Free(1136)
  9435. var depth, v5 uint32
  9436. var dpy, font, image, xftg, v11, v8 uintptr
  9437. var g_x1, g_x2, g_y1, g_y2, height, i, width, x1, x2, y1, y2, v1, v2, v3 int32
  9438. var gc TGC
  9439. var glyph, glyph1 TFT_UInt
  9440. var glyphs_loaded TFcBool
  9441. var pix TPixmap
  9442. var prev_error TXErrorHandler
  9443. var sharp TXftSharpGlyph
  9444. var smooth TXftSmoothGlyph
  9445. var v12, v6, v9 bool
  9446. var _ /* gcv at bp+1040 */ TXGCValues
  9447. var _ /* gi at bp+1028 */ TXGlyphInfo
  9448. var _ /* missing at bp+0 */ [256]TFT_UInt
  9449. var _ /* nmissing at bp+1024 */ int32
  9450. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  9451. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  9452. font = public
  9453. /*
  9454. * Load missing glyphs
  9455. */
  9456. glyphs_loaded = m_FcFalse
  9457. v3 = libc.Int32FromInt32(0)
  9458. y2 = v3
  9459. v2 = v3
  9460. x2 = v2
  9461. v1 = v2
  9462. y1 = v1
  9463. x1 = v1
  9464. i = 0
  9465. for {
  9466. if !(i < nglyphs) {
  9467. break
  9468. }
  9469. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  9470. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph, bp, bp+1024) != 0 {
  9471. glyphs_loaded = int32(m_FcTrue)
  9472. }
  9473. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9474. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9475. }
  9476. XXftGlyphExtents(tls, dpy, public, glyphs+uintptr(i)*8, int32(1), bp+1028)
  9477. g_x1 = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9478. g_y1 = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9479. g_x2 = g_x1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth)
  9480. g_y2 = g_y1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight)
  9481. if i != 0 {
  9482. if g_x1 < x1 {
  9483. x1 = g_x1
  9484. }
  9485. if g_y1 < y1 {
  9486. y1 = g_y1
  9487. }
  9488. if g_x2 > x2 {
  9489. x2 = g_x2
  9490. }
  9491. if g_y2 > y2 {
  9492. y2 = g_y2
  9493. }
  9494. } else {
  9495. x1 = g_x1
  9496. y1 = g_y1
  9497. x2 = g_x2
  9498. y2 = g_y2
  9499. }
  9500. goto _4
  9501. _4:
  9502. ;
  9503. i++
  9504. }
  9505. if x1 == x2 || y1 == y2 {
  9506. goto bail1
  9507. }
  9508. if ((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 || libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9509. width = x2 - x1
  9510. height = y2 - y1
  9511. smooth = __XftSmoothGlyphFind(tls, draw, public)
  9512. /*
  9513. * Try to get bits directly from the drawable; if that fails,
  9514. * use a temporary pixmap. When it does fail, assume it
  9515. * will probably fail for a while and keep using temporary
  9516. * pixmaps for a while to avoid double round trips.
  9517. */
  9518. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9519. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9520. image = libx11.XXGetImage(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), libc.Uint32FromInt32(^libc.Int32FromInt32(0)), int32(m_ZPixmap))
  9521. libx11.XXSetErrorHandler(tls, prev_error)
  9522. if !(image != 0) {
  9523. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9524. }
  9525. } else {
  9526. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9527. image = libc.UintptrFromInt32(0)
  9528. }
  9529. if v6 = !(image != 0); v6 {
  9530. v5 = XXftDrawDepth(tls, draw)
  9531. depth = v5
  9532. }
  9533. if v6 && v5 != 0 {
  9534. pix = libx11.XXCreatePixmap(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), depth)
  9535. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9536. gc = libx11.XXCreateGC(tls, dpy, pix, libc.Uint32FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(16)), bp+1040)
  9537. libx11.XXCopyArea(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, pix, gc, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), 0, 0)
  9538. libx11.XXFreeGC(tls, dpy, gc)
  9539. image = libx11.XXGetImage(tls, dpy, pix, 0, 0, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), libc.Uint32FromInt32(^libc.Int32FromInt32(0)), int32(m_ZPixmap))
  9540. libx11.XXFreePixmap(tls, dpy, pix)
  9541. }
  9542. if !(image != 0) {
  9543. goto bail1
  9544. }
  9545. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9546. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9547. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9548. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9549. XXftSwapImage(tls, image)
  9550. }
  9551. i = 0
  9552. for {
  9553. if !(i < nglyphs) {
  9554. break
  9555. }
  9556. glyph = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  9557. if v9 = glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v9 {
  9558. v8 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*4))
  9559. xftg = v8
  9560. }
  9561. if v9 || !(v8 != 0) {
  9562. xftg = __XftGlyphDefault(tls, dpy, public)
  9563. }
  9564. if xftg != 0 {
  9565. (*(*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)
  9566. }
  9567. goto _7
  9568. _7:
  9569. ;
  9570. i++
  9571. }
  9572. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9573. XXftSwapImage(tls, image)
  9574. }
  9575. 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))
  9576. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9577. } else {
  9578. sharp = __XftSharpGlyphFind(tls, draw, public)
  9579. i = 0
  9580. for {
  9581. if !(i < nglyphs) {
  9582. break
  9583. }
  9584. glyph1 = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  9585. if v12 = glyph1 >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v12 {
  9586. v11 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph1)*4))
  9587. xftg = v11
  9588. }
  9589. if v12 || !(v11 != 0) {
  9590. xftg = __XftGlyphDefault(tls, dpy, public)
  9591. }
  9592. if xftg != 0 {
  9593. (*(*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))
  9594. }
  9595. goto _10
  9596. _10:
  9597. ;
  9598. i++
  9599. }
  9600. }
  9601. goto bail1
  9602. bail1:
  9603. ;
  9604. if glyphs_loaded != 0 {
  9605. X_XftFontManageMemory(tls, dpy, public)
  9606. }
  9607. }
  9608. func XXftGlyphFontSpecCore(tls *libc.TLS, draw uintptr, color uintptr, glyphs uintptr, nglyphs int32) {
  9609. bp := tls.Alloc(1136)
  9610. defer tls.Free(1136)
  9611. var depth, v6 uint32
  9612. var dpy, font, font1, image, public, public1, public2, xftg, v12, v9 uintptr
  9613. var g_x1, g_x2, g_y1, g_y2, height, i, width, x1, x2, y1, y2, v1, v2, v3 int32
  9614. var gc TGC
  9615. var glyph, glyph1 TFT_UInt
  9616. var glyphs_loaded TFcBool
  9617. var pix TPixmap
  9618. var prev_error TXErrorHandler
  9619. var sharp TXftSharpGlyph
  9620. var smooth TXftSmoothGlyph
  9621. var t int16
  9622. var v10, v13, v7 bool
  9623. var _ /* gcv at bp+1040 */ TXGCValues
  9624. var _ /* gi at bp+1028 */ TXGlyphInfo
  9625. var _ /* missing at bp+0 */ [256]TFT_UInt
  9626. var _ /* nmissing at bp+1024 */ int32
  9627. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  9628. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  9629. /*
  9630. * Load missing glyphs
  9631. */
  9632. glyphs_loaded = m_FcFalse
  9633. v3 = libc.Int32FromInt32(0)
  9634. y2 = v3
  9635. v2 = v3
  9636. x2 = v2
  9637. v1 = v2
  9638. y1 = v1
  9639. x1 = v1
  9640. i = 0
  9641. for {
  9642. if !(i < nglyphs) {
  9643. break
  9644. }
  9645. public = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont
  9646. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  9647. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fglyph, bp, bp+1024) != 0 {
  9648. glyphs_loaded = int32(m_FcTrue)
  9649. }
  9650. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9651. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9652. }
  9653. XXftGlyphExtents(tls, dpy, public, glyphs+uintptr(i)*12+4, int32(1), bp+1028)
  9654. g_x1 = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fx) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9655. g_y1 = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fy) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9656. g_x2 = g_x1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth)
  9657. g_y2 = g_y1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight)
  9658. if i != 0 {
  9659. if g_x1 < x1 {
  9660. if g_x1 < 0 {
  9661. /* do nothing if the given glyphs are out of range */
  9662. t = int16((*TXftFont)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i-int32(1))*12))).Ffont)).Fmax_advance_width + int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i-int32(1))*12))).Fx))
  9663. if int32(t) < 0 && int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i-int32(1))*12))).Fx) > 0 {
  9664. goto bail1
  9665. }
  9666. }
  9667. x1 = g_x1
  9668. }
  9669. if g_y1 < y1 {
  9670. y1 = g_y1
  9671. }
  9672. if g_x2 > x2 {
  9673. x2 = g_x2
  9674. }
  9675. if g_y2 > y2 {
  9676. y2 = g_y2
  9677. }
  9678. } else {
  9679. x1 = g_x1
  9680. y1 = g_y1
  9681. x2 = g_x2
  9682. y2 = g_y2
  9683. }
  9684. goto _4
  9685. _4:
  9686. ;
  9687. i++
  9688. }
  9689. if x1 == x2 || y1 == y2 {
  9690. goto bail1
  9691. }
  9692. i = 0
  9693. for {
  9694. if !(i < nglyphs) {
  9695. break
  9696. }
  9697. if (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont)).Finfo.Fantialias != 0 {
  9698. break
  9699. }
  9700. goto _5
  9701. _5:
  9702. ;
  9703. i++
  9704. }
  9705. if (i != nglyphs || libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9706. width = x2 - x1
  9707. height = y2 - y1
  9708. /*
  9709. * Try to get bits directly from the drawable; if that fails,
  9710. * use a temporary pixmap. When it does fail, assume it
  9711. * will probably fail for a while and keep using temporary
  9712. * pixmaps for a while to avoid double round trips.
  9713. */
  9714. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9715. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9716. image = libx11.XXGetImage(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), libc.Uint32FromInt32(^libc.Int32FromInt32(0)), int32(m_ZPixmap))
  9717. libx11.XXSetErrorHandler(tls, prev_error)
  9718. if !(image != 0) {
  9719. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9720. }
  9721. } else {
  9722. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9723. image = libc.UintptrFromInt32(0)
  9724. }
  9725. if v7 = !(image != 0); v7 {
  9726. v6 = XXftDrawDepth(tls, draw)
  9727. depth = v6
  9728. }
  9729. if v7 && v6 != 0 {
  9730. pix = libx11.XXCreatePixmap(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), depth)
  9731. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9732. gc = libx11.XXCreateGC(tls, dpy, pix, libc.Uint32FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(16)), bp+1040)
  9733. libx11.XXCopyArea(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, pix, gc, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), 0, 0)
  9734. libx11.XXFreeGC(tls, dpy, gc)
  9735. image = libx11.XXGetImage(tls, dpy, pix, 0, 0, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), libc.Uint32FromInt32(^libc.Int32FromInt32(0)), int32(m_ZPixmap))
  9736. libx11.XXFreePixmap(tls, dpy, pix)
  9737. }
  9738. if !(image != 0) {
  9739. goto bail1
  9740. }
  9741. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9742. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9743. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9744. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9745. XXftSwapImage(tls, image)
  9746. }
  9747. i = 0
  9748. for {
  9749. if !(i < nglyphs) {
  9750. break
  9751. }
  9752. public1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont
  9753. font = public1
  9754. smooth = __XftSmoothGlyphFind(tls, draw, public1)
  9755. glyph = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fglyph
  9756. if v10 = glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v10 {
  9757. v9 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*4))
  9758. xftg = v9
  9759. }
  9760. if v10 || !(v9 != 0) {
  9761. xftg = __XftGlyphDefault(tls, dpy, public1)
  9762. }
  9763. if xftg != 0 {
  9764. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr))(unsafe.Pointer(&struct{ uintptr }{smooth})))(tls, image, xftg, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fx)-x1, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fy)-y1, color)
  9765. }
  9766. goto _8
  9767. _8:
  9768. ;
  9769. i++
  9770. }
  9771. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9772. XXftSwapImage(tls, image)
  9773. }
  9774. 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))
  9775. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9776. } else {
  9777. i = 0
  9778. for {
  9779. if !(i < nglyphs) {
  9780. break
  9781. }
  9782. public2 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont
  9783. font1 = public2
  9784. sharp = __XftSharpGlyphFind(tls, draw, public2)
  9785. glyph1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fglyph
  9786. if v13 = glyph1 >= (*TXftFontInt)(unsafe.Pointer(font1)).Fnum_glyphs; !v13 {
  9787. v12 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(glyph1)*4))
  9788. xftg = v12
  9789. }
  9790. if v13 || !(v12 != 0) {
  9791. xftg = __XftGlyphDefault(tls, dpy, public2)
  9792. }
  9793. if xftg != 0 {
  9794. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32))(unsafe.Pointer(&struct{ uintptr }{sharp})))(tls, draw, xftg, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fx), int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fy))
  9795. }
  9796. goto _11
  9797. _11:
  9798. ;
  9799. i++
  9800. }
  9801. }
  9802. goto bail1
  9803. bail1:
  9804. ;
  9805. if glyphs_loaded != 0 {
  9806. i = 0
  9807. for {
  9808. if !(i < nglyphs) {
  9809. break
  9810. }
  9811. X_XftFontManageMemory(tls, dpy, (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont)
  9812. goto _14
  9813. _14:
  9814. ;
  9815. i++
  9816. }
  9817. }
  9818. }
  9819. /* xftxlfd.c */
  9820. func XXftDebug(tls *libc.TLS) (r int32) {
  9821. bp := tls.Alloc(16)
  9822. defer tls.Free(16)
  9823. var e uintptr
  9824. _ = e
  9825. if !(_initialized != 0) {
  9826. _initialized = int32(1)
  9827. e = libc.Xgetenv(tls, __ccgo_ts)
  9828. if e != 0 {
  9829. libc.Xprintf(tls, __ccgo_ts+10, libc.VaList(bp+8, e))
  9830. _debug = libc.Xatoi(tls, e)
  9831. if _debug <= 0 {
  9832. _debug = int32(1)
  9833. }
  9834. }
  9835. }
  9836. return _debug
  9837. }
  9838. var _initialized int32
  9839. var _debug int32
  9840. func __XftCloseDisplay(tls *libc.TLS, dpy uintptr, codes uintptr) (r int32) {
  9841. var info, prev, v2 uintptr
  9842. _, _, _ = info, prev, v2
  9843. info = X_XftDisplayInfoGet(tls, dpy, m_FcFalse)
  9844. if !(info != 0) {
  9845. return 0
  9846. }
  9847. /*
  9848. * Get rid of any dangling unreferenced fonts
  9849. */
  9850. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = 0
  9851. XXftFontManageMemory(tls, dpy)
  9852. /*
  9853. * Clean up the default values
  9854. */
  9855. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0 {
  9856. libfontconfig.XFcPatternDestroy(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults)
  9857. }
  9858. /*
  9859. * Unhook from the global list
  9860. */
  9861. prev = uintptr(unsafe.Pointer(&X_XftDisplayInfo))
  9862. for {
  9863. v2 = *(*uintptr)(unsafe.Pointer(prev))
  9864. info = v2
  9865. if !(v2 != 0) {
  9866. break
  9867. }
  9868. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay == dpy {
  9869. break
  9870. }
  9871. goto _1
  9872. _1:
  9873. ;
  9874. prev = *(*uintptr)(unsafe.Pointer(prev))
  9875. }
  9876. if info != libc.UintptrFromInt32(0) {
  9877. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext
  9878. }
  9879. libc.Xfree(tls, info)
  9880. return 0
  9881. }
  9882. func X_XftDisplayInfoGet(tls *libc.TLS, dpy uintptr, createIfNecessary TFcBool) (r uintptr) {
  9883. bp := tls.Alloc(96)
  9884. defer tls.Free(96)
  9885. var format, info, prev, visual, v2, v3, v5 uintptr
  9886. var i int32
  9887. var _ /* error_base at bp+36 */ int32
  9888. var _ /* event_base at bp+32 */ int32
  9889. var _ /* major at bp+40 */ int32
  9890. var _ /* minor at bp+44 */ int32
  9891. var _ /* pf at bp+0 */ TXRenderPictFormat
  9892. _, _, _, _, _, _, _, _ = format, i, info, prev, visual, v2, v3, v5
  9893. prev = uintptr(unsafe.Pointer(&X_XftDisplayInfo))
  9894. for {
  9895. v2 = *(*uintptr)(unsafe.Pointer(prev))
  9896. info = v2
  9897. if !(v2 != 0) {
  9898. break
  9899. }
  9900. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay == dpy {
  9901. /*
  9902. * MRU the list
  9903. */
  9904. if prev != uintptr(unsafe.Pointer(&X_XftDisplayInfo)) {
  9905. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext
  9906. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext = X_XftDisplayInfo
  9907. X_XftDisplayInfo = info
  9908. }
  9909. return info
  9910. }
  9911. goto _1
  9912. _1:
  9913. ;
  9914. prev = *(*uintptr)(unsafe.Pointer(prev))
  9915. }
  9916. if !(createIfNecessary != 0) {
  9917. return libc.UintptrFromInt32(0)
  9918. }
  9919. info = libc.Xmalloc(tls, uint32(820))
  9920. if !(info != 0) {
  9921. goto bail0
  9922. }
  9923. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes = libx11.XXAddExtension(tls, dpy)
  9924. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes != 0) {
  9925. goto bail1
  9926. }
  9927. libx11.XXESetCloseDisplay(tls, dpy, (*TXExtCodes)(unsafe.Pointer((*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes)).Fextension, __ccgo_fp(__XftCloseDisplay))
  9928. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay = dpy
  9929. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = libc.UintptrFromInt32(0)
  9930. (*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat = libc.UintptrFromInt32(0)
  9931. (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender = libc.BoolInt32(libxrender.XXRenderQueryExtension(tls, dpy, bp+32, bp+36) != 0 && libxrender.XXRenderFindVisualFormat(tls, dpy, (*TScreen)(unsafe.Pointer((*struct {
  9932. Fext_data uintptr
  9933. Fprivate1 uintptr
  9934. Ffd int32
  9935. Fprivate2 int32
  9936. Fproto_major_version int32
  9937. Fproto_minor_version int32
  9938. Fvendor uintptr
  9939. Fprivate3 TXID
  9940. Fprivate4 TXID
  9941. Fprivate5 TXID
  9942. Fprivate6 int32
  9943. Fresource_alloc uintptr
  9944. Fbyte_order int32
  9945. Fbitmap_unit int32
  9946. Fbitmap_pad int32
  9947. Fbitmap_bit_order int32
  9948. Fnformats int32
  9949. Fpixmap_format uintptr
  9950. Fprivate8 int32
  9951. Frelease int32
  9952. Fprivate9 uintptr
  9953. Fprivate10 uintptr
  9954. Fqlen int32
  9955. Flast_request_read uint32
  9956. Frequest uint32
  9957. Fprivate11 TXPointer
  9958. Fprivate12 TXPointer
  9959. Fprivate13 TXPointer
  9960. Fprivate14 TXPointer
  9961. Fmax_request_size uint32
  9962. Fdb uintptr
  9963. Fprivate15 uintptr
  9964. Fdisplay_name uintptr
  9965. Fdefault_screen int32
  9966. Fnscreens int32
  9967. Fscreens uintptr
  9968. Fmotion_buffer uint32
  9969. Fprivate16 uint32
  9970. Fmin_keycode int32
  9971. Fmax_keycode int32
  9972. Fprivate17 TXPointer
  9973. Fprivate18 TXPointer
  9974. Fprivate19 int32
  9975. Fxdefaults uintptr
  9976. })(unsafe.Pointer(dpy)).Fscreens+uintptr((*struct {
  9977. Fext_data uintptr
  9978. Fprivate1 uintptr
  9979. Ffd int32
  9980. Fprivate2 int32
  9981. Fproto_major_version int32
  9982. Fproto_minor_version int32
  9983. Fvendor uintptr
  9984. Fprivate3 TXID
  9985. Fprivate4 TXID
  9986. Fprivate5 TXID
  9987. Fprivate6 int32
  9988. Fresource_alloc uintptr
  9989. Fbyte_order int32
  9990. Fbitmap_unit int32
  9991. Fbitmap_pad int32
  9992. Fbitmap_bit_order int32
  9993. Fnformats int32
  9994. Fpixmap_format uintptr
  9995. Fprivate8 int32
  9996. Frelease int32
  9997. Fprivate9 uintptr
  9998. Fprivate10 uintptr
  9999. Fqlen int32
  10000. Flast_request_read uint32
  10001. Frequest uint32
  10002. Fprivate11 TXPointer
  10003. Fprivate12 TXPointer
  10004. Fprivate13 TXPointer
  10005. Fprivate14 TXPointer
  10006. Fmax_request_size uint32
  10007. Fdb uintptr
  10008. Fprivate15 uintptr
  10009. Fdisplay_name uintptr
  10010. Fdefault_screen int32
  10011. Fnscreens int32
  10012. Fscreens uintptr
  10013. Fmotion_buffer uint32
  10014. Fprivate16 uint32
  10015. Fmin_keycode int32
  10016. Fmax_keycode int32
  10017. Fprivate17 TXPointer
  10018. Fprivate18 TXPointer
  10019. Fprivate19 int32
  10020. Fxdefaults uintptr
  10021. })(unsafe.Pointer(dpy)).Fdefault_screen)*80)).Froot_visual) != libc.UintptrFromInt32(0))
  10022. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs = int32(m_FcTrue)
  10023. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  10024. libxrender.XXRenderQueryVersion(tls, dpy, bp+40, bp+44)
  10025. if *(*int32)(unsafe.Pointer(bp + 40)) < 0 || *(*int32)(unsafe.Pointer(bp + 40)) == 0 && *(*int32)(unsafe.Pointer(bp + 44)) <= int32(2) {
  10026. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs = m_FcFalse
  10027. }
  10028. (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasSolid = m_FcFalse
  10029. if *(*int32)(unsafe.Pointer(bp + 40)) > 0 || *(*int32)(unsafe.Pointer(bp + 40)) == 0 && *(*int32)(unsafe.Pointer(bp + 44)) >= int32(10) {
  10030. (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasSolid = int32(m_FcTrue)
  10031. }
  10032. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Ftype1 = int32(m_PictTypeDirect)
  10033. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth = int32(32)
  10034. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FredMask = int16(0xff)
  10035. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FgreenMask = int16(0xff)
  10036. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FblueMask = int16(0xff)
  10037. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FalphaMask = int16(0xff)
  10038. (*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat = libxrender.XXRenderFindFormat(tls, dpy, libc.Uint32FromInt32(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)
  10039. }
  10040. if XXftDebug(tls)&int32(m_XFT_DBG_RENDER) != 0 {
  10041. visual = (*TScreen)(unsafe.Pointer((*struct {
  10042. Fext_data uintptr
  10043. Fprivate1 uintptr
  10044. Ffd int32
  10045. Fprivate2 int32
  10046. Fproto_major_version int32
  10047. Fproto_minor_version int32
  10048. Fvendor uintptr
  10049. Fprivate3 TXID
  10050. Fprivate4 TXID
  10051. Fprivate5 TXID
  10052. Fprivate6 int32
  10053. Fresource_alloc uintptr
  10054. Fbyte_order int32
  10055. Fbitmap_unit int32
  10056. Fbitmap_pad int32
  10057. Fbitmap_bit_order int32
  10058. Fnformats int32
  10059. Fpixmap_format uintptr
  10060. Fprivate8 int32
  10061. Frelease int32
  10062. Fprivate9 uintptr
  10063. Fprivate10 uintptr
  10064. Fqlen int32
  10065. Flast_request_read uint32
  10066. Frequest uint32
  10067. Fprivate11 TXPointer
  10068. Fprivate12 TXPointer
  10069. Fprivate13 TXPointer
  10070. Fprivate14 TXPointer
  10071. Fmax_request_size uint32
  10072. Fdb uintptr
  10073. Fprivate15 uintptr
  10074. Fdisplay_name uintptr
  10075. Fdefault_screen int32
  10076. Fnscreens int32
  10077. Fscreens uintptr
  10078. Fmotion_buffer uint32
  10079. Fprivate16 uint32
  10080. Fmin_keycode int32
  10081. Fmax_keycode int32
  10082. Fprivate17 TXPointer
  10083. Fprivate18 TXPointer
  10084. Fprivate19 int32
  10085. Fxdefaults uintptr
  10086. })(unsafe.Pointer(dpy)).Fscreens + uintptr((*struct {
  10087. Fext_data uintptr
  10088. Fprivate1 uintptr
  10089. Ffd int32
  10090. Fprivate2 int32
  10091. Fproto_major_version int32
  10092. Fproto_minor_version int32
  10093. Fvendor uintptr
  10094. Fprivate3 TXID
  10095. Fprivate4 TXID
  10096. Fprivate5 TXID
  10097. Fprivate6 int32
  10098. Fresource_alloc uintptr
  10099. Fbyte_order int32
  10100. Fbitmap_unit int32
  10101. Fbitmap_pad int32
  10102. Fbitmap_bit_order int32
  10103. Fnformats int32
  10104. Fpixmap_format uintptr
  10105. Fprivate8 int32
  10106. Frelease int32
  10107. Fprivate9 uintptr
  10108. Fprivate10 uintptr
  10109. Fqlen int32
  10110. Flast_request_read uint32
  10111. Frequest uint32
  10112. Fprivate11 TXPointer
  10113. Fprivate12 TXPointer
  10114. Fprivate13 TXPointer
  10115. Fprivate14 TXPointer
  10116. Fmax_request_size uint32
  10117. Fdb uintptr
  10118. Fprivate15 uintptr
  10119. Fdisplay_name uintptr
  10120. Fdefault_screen int32
  10121. Fnscreens int32
  10122. Fscreens uintptr
  10123. Fmotion_buffer uint32
  10124. Fprivate16 uint32
  10125. Fmin_keycode int32
  10126. Fmax_keycode int32
  10127. Fprivate17 TXPointer
  10128. Fprivate18 TXPointer
  10129. Fprivate19 int32
  10130. Fxdefaults uintptr
  10131. })(unsafe.Pointer(dpy)).Fdefault_screen)*80)).Froot_visual
  10132. format = libxrender.XXRenderFindVisualFormat(tls, dpy, visual)
  10133. libc.Xprintf(tls, __ccgo_ts+24, libc.VaList(bp+56, libc.Int32FromUint32((*TVisual)(unsafe.Pointer(visual)).Fvisualid)))
  10134. if format != 0 {
  10135. if (*TXRenderPictFormat)(unsafe.Pointer(format)).Ftype1 == int32(m_PictTypeDirect) {
  10136. libc.Xprintf(tls, __ccgo_ts+63, libc.VaList(bp+56, 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)))
  10137. } else {
  10138. libc.Xprintf(tls, __ccgo_ts+83, 0)
  10139. }
  10140. } else {
  10141. libc.Xprintf(tls, __ccgo_ts+99, 0)
  10142. }
  10143. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  10144. v3 = __ccgo_ts + 136
  10145. } else {
  10146. v3 = __ccgo_ts + 141
  10147. }
  10148. libc.Xprintf(tls, __ccgo_ts+147, libc.VaList(bp+56, v3))
  10149. }
  10150. i = 0
  10151. for {
  10152. if !(i < int32(m_XFT_NUM_SOLID_COLOR)) {
  10153. break
  10154. }
  10155. (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fscreen = -int32(1)
  10156. (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fpict = uint32(0)
  10157. goto _4
  10158. _4:
  10159. ;
  10160. i++
  10161. }
  10162. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts = libc.UintptrFromInt32(0)
  10163. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext = X_XftDisplayInfo
  10164. X_XftDisplayInfo = info
  10165. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory = uint32(0)
  10166. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory = libc.Uint32FromInt32(XXftDefaultGetInteger(tls, dpy, __ccgo_ts+201, 0, libc.Int32FromInt32(4)*libc.Int32FromInt32(1024)*libc.Int32FromInt32(1024)))
  10167. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10168. libc.Xprintf(tls, __ccgo_ts+216, libc.VaList(bp+56, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory))
  10169. }
  10170. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts = 0
  10171. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = XXftDefaultGetInteger(tls, dpy, __ccgo_ts+245, 0, int32(m_XFT_DPY_MAX_UNREF_FONTS))
  10172. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10173. libc.Xprintf(tls, __ccgo_ts+259, libc.VaList(bp+56, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts))
  10174. }
  10175. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage = m_FcFalse
  10176. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage = XXftDefaultGetBool(tls, dpy, __ccgo_ts+287, 0, m_FcFalse)
  10177. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10178. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage != 0 {
  10179. v5 = __ccgo_ts + 301
  10180. } else {
  10181. v5 = __ccgo_ts + 306
  10182. }
  10183. libc.Xprintf(tls, __ccgo_ts+312, libc.VaList(bp+56, v5))
  10184. }
  10185. libc.Xmemset(tls, info+312, int32('\000'), libc.Uint32FromInt64(4)*libc.Uint32FromInt32(m_XFT_NUM_FONT_HASH))
  10186. return info
  10187. goto bail1
  10188. bail1:
  10189. ;
  10190. libc.Xfree(tls, info)
  10191. goto bail0
  10192. bail0:
  10193. ;
  10194. if XXftDebug(tls)&int32(m_XFT_DBG_RENDER) != 0 {
  10195. libc.Xprintf(tls, __ccgo_ts+340, 0)
  10196. }
  10197. return libc.UintptrFromInt32(0)
  10198. }
  10199. /*
  10200. * Reduce memory usage in X server
  10201. */
  10202. func __XftDisplayValidateMemory(tls *libc.TLS, info uintptr) {
  10203. bp := tls.Alloc(32)
  10204. defer tls.Free(32)
  10205. var font, public uintptr
  10206. var glyph_memory uint32
  10207. _, _, _ = font, glyph_memory, public
  10208. glyph_memory = uint32(0)
  10209. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  10210. for {
  10211. if !(public != 0) {
  10212. break
  10213. }
  10214. font = public
  10215. glyph_memory += (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  10216. goto _1
  10217. _1:
  10218. ;
  10219. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  10220. }
  10221. if glyph_memory != (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory {
  10222. libc.Xprintf(tls, __ccgo_ts+393, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory, glyph_memory))
  10223. }
  10224. }
  10225. func X_XftDisplayManageMemory(tls *libc.TLS, dpy uintptr) {
  10226. bp := tls.Alloc(32)
  10227. defer tls.Free(32)
  10228. var font, info, public uintptr
  10229. var glyph_memory uint32
  10230. _, _, _, _ = font, glyph_memory, info, public
  10231. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  10232. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory != 0) {
  10233. return
  10234. }
  10235. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10236. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory {
  10237. libc.Xprintf(tls, __ccgo_ts+455, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory))
  10238. }
  10239. __XftDisplayValidateMemory(tls, info)
  10240. }
  10241. for (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory {
  10242. glyph_memory = libc.Uint32FromInt32(libc.Xrand(tls)) % (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory
  10243. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  10244. for public != 0 {
  10245. font = public
  10246. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > glyph_memory {
  10247. X_XftFontUncacheGlyph(tls, dpy, public)
  10248. break
  10249. }
  10250. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  10251. glyph_memory -= (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  10252. }
  10253. }
  10254. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10255. __XftDisplayValidateMemory(tls, info)
  10256. }
  10257. }
  10258. func XXftDefaultHasRender(tls *libc.TLS, dpy uintptr) (r int32) {
  10259. var info uintptr
  10260. _ = info
  10261. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10262. if !(info != 0) {
  10263. return m_False
  10264. }
  10265. return (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender
  10266. }
  10267. func XXftDefaultSet(tls *libc.TLS, dpy uintptr, defaults uintptr) (r int32) {
  10268. bp := tls.Alloc(16)
  10269. defer tls.Free(16)
  10270. var info, v1 uintptr
  10271. _, _ = info, v1
  10272. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10273. if !(info != 0) {
  10274. return m_False
  10275. }
  10276. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0 {
  10277. libfontconfig.XFcPatternDestroy(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults)
  10278. }
  10279. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = defaults
  10280. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory != 0) {
  10281. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory = libc.Uint32FromInt32(libc.Int32FromInt32(4) * libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024))
  10282. }
  10283. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory = libc.Uint32FromInt32(XXftDefaultGetInteger(tls, dpy, __ccgo_ts+201, 0, libc.Int32FromUint32((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory)))
  10284. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10285. libc.Xprintf(tls, __ccgo_ts+493, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory))
  10286. }
  10287. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts != 0) {
  10288. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = int32(m_XFT_DPY_MAX_UNREF_FONTS)
  10289. }
  10290. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = XXftDefaultGetInteger(tls, dpy, __ccgo_ts+245, 0, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts)
  10291. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10292. libc.Xprintf(tls, __ccgo_ts+522, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts))
  10293. }
  10294. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage = XXftDefaultGetBool(tls, dpy, __ccgo_ts+287, 0, (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage)
  10295. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10296. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage != 0 {
  10297. v1 = __ccgo_ts + 301
  10298. } else {
  10299. v1 = __ccgo_ts + 306
  10300. }
  10301. libc.Xprintf(tls, __ccgo_ts+550, libc.VaList(bp+8, v1))
  10302. }
  10303. return int32(m_True)
  10304. }
  10305. func XXftDefaultParseBool(tls *libc.TLS, v uintptr) (r int32) {
  10306. var c0, c1 uint8
  10307. _, _ = c0, c1
  10308. c0 = *(*uint8)(unsafe.Pointer(v))
  10309. if libc.BoolInt32(libc.Uint32FromInt32(libc.Int32FromUint8(c0))-uint32('A') < uint32(26)) != 0 {
  10310. c0 = libc.Uint8FromInt32(libc.Xtolower(tls, libc.Int32FromUint8(c0)))
  10311. }
  10312. if libc.Int32FromUint8(c0) == int32('t') || libc.Int32FromUint8(c0) == int32('y') || libc.Int32FromUint8(c0) == int32('1') {
  10313. return int32(1)
  10314. }
  10315. if libc.Int32FromUint8(c0) == int32('f') || libc.Int32FromUint8(c0) == int32('n') || libc.Int32FromUint8(c0) == int32('0') {
  10316. return 0
  10317. }
  10318. if libc.Int32FromUint8(c0) == int32('o') {
  10319. c1 = *(*uint8)(unsafe.Pointer(v + 1))
  10320. if libc.BoolInt32(libc.Uint32FromInt32(libc.Int32FromUint8(c1))-uint32('A') < uint32(26)) != 0 {
  10321. c1 = libc.Uint8FromInt32(libc.Xtolower(tls, libc.Int32FromUint8(c1)))
  10322. }
  10323. if libc.Int32FromUint8(c1) == int32('n') {
  10324. return int32(1)
  10325. }
  10326. if libc.Int32FromUint8(c1) == int32('f') {
  10327. return 0
  10328. }
  10329. }
  10330. return -int32(1)
  10331. }
  10332. func __XftDefaultInitBool(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  10333. var i, v1 int32
  10334. var v uintptr
  10335. var v2 bool
  10336. _, _, _, _ = i, v, v1, v2
  10337. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+578, option)
  10338. if v2 = v != 0; v2 {
  10339. v1 = XXftDefaultParseBool(tls, v)
  10340. i = v1
  10341. }
  10342. if v2 && v1 >= 0 {
  10343. return libfontconfig.XFcPatternAddBool(tls, pat, option, libc.BoolInt32(i != 0))
  10344. }
  10345. return int32(m_True)
  10346. }
  10347. func __XftDefaultInitDouble(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  10348. bp := tls.Alloc(16)
  10349. defer tls.Free(16)
  10350. var d float64
  10351. var v uintptr
  10352. var _ /* e at bp+0 */ uintptr
  10353. _, _ = d, v
  10354. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+578, option)
  10355. if v != 0 {
  10356. d = libc.Xstrtod(tls, v, bp)
  10357. if *(*uintptr)(unsafe.Pointer(bp)) != v {
  10358. return libfontconfig.XFcPatternAddDouble(tls, pat, option, d)
  10359. }
  10360. }
  10361. return int32(m_True)
  10362. }
  10363. func __XftDefaultInitInteger(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  10364. bp := tls.Alloc(16)
  10365. defer tls.Free(16)
  10366. var v uintptr
  10367. var _ /* e at bp+0 */ uintptr
  10368. var _ /* i at bp+4 */ int32
  10369. _ = v
  10370. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+578, option)
  10371. if v != 0 {
  10372. if libfontconfig.XFcNameConstant(tls, v, bp+4) != 0 {
  10373. return libfontconfig.XFcPatternAddInteger(tls, pat, option, *(*int32)(unsafe.Pointer(bp + 4)))
  10374. }
  10375. *(*int32)(unsafe.Pointer(bp + 4)) = int32(libc.Xstrtol(tls, v, bp, 0))
  10376. if *(*uintptr)(unsafe.Pointer(bp)) != v {
  10377. return libfontconfig.XFcPatternAddInteger(tls, pat, option, *(*int32)(unsafe.Pointer(bp + 4)))
  10378. }
  10379. }
  10380. return int32(m_True)
  10381. }
  10382. func __XftDefaultInit(tls *libc.TLS, dpy uintptr) (r uintptr) {
  10383. var pat uintptr
  10384. _ = pat
  10385. pat = libfontconfig.XFcPatternCreate(tls)
  10386. if !(pat != 0) {
  10387. goto bail0
  10388. }
  10389. if !(__XftDefaultInitDouble(tls, dpy, pat, __ccgo_ts+582) != 0) {
  10390. goto bail1
  10391. }
  10392. if !(__XftDefaultInitDouble(tls, dpy, pat, __ccgo_ts+588) != 0) {
  10393. goto bail1
  10394. }
  10395. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+592) != 0) {
  10396. goto bail1
  10397. }
  10398. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+599) != 0) {
  10399. goto bail1
  10400. }
  10401. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+604) != 0) {
  10402. goto bail1
  10403. }
  10404. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+614) != 0) {
  10405. goto bail1
  10406. }
  10407. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+624) != 0) {
  10408. goto bail1
  10409. }
  10410. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+633) != 0) {
  10411. goto bail1
  10412. }
  10413. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+642) != 0) {
  10414. goto bail1
  10415. }
  10416. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+652) != 0) {
  10417. goto bail1
  10418. }
  10419. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+660) != 0) {
  10420. goto bail1
  10421. }
  10422. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+201) != 0) {
  10423. goto bail1
  10424. }
  10425. return pat
  10426. goto bail1
  10427. bail1:
  10428. ;
  10429. libfontconfig.XFcPatternDestroy(tls, pat)
  10430. goto bail0
  10431. bail0:
  10432. ;
  10433. return libc.UintptrFromInt32(0)
  10434. return r
  10435. }
  10436. func __XftDefaultGet(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, v uintptr) (r1 TFcResult) {
  10437. var info uintptr
  10438. var r TFcResult
  10439. _, _ = info, r
  10440. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10441. if !(info != 0) {
  10442. return int32(_FcResultNoMatch)
  10443. }
  10444. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0) {
  10445. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = __XftDefaultInit(tls, dpy)
  10446. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0) {
  10447. return int32(_FcResultNoMatch)
  10448. }
  10449. }
  10450. r = libfontconfig.XFcPatternGet(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults, object, screen, v)
  10451. if r == int32(_FcResultNoId) && screen > 0 {
  10452. r = libfontconfig.XFcPatternGet(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults, object, 0, v)
  10453. }
  10454. return r
  10455. }
  10456. func XXftDefaultGetBool(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, def int32) (r1 int32) {
  10457. bp := tls.Alloc(16)
  10458. defer tls.Free(16)
  10459. var r TFcResult
  10460. var _ /* v at bp+0 */ TFcValue
  10461. _ = r
  10462. r = __XftDefaultGet(tls, dpy, object, screen, bp)
  10463. if r != int32(_FcResultMatch) || (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 != int32(_FcTypeBool) {
  10464. return def
  10465. }
  10466. return *(*TFcBool)(unsafe.Pointer(bp + 8))
  10467. }
  10468. func XXftDefaultGetInteger(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, def int32) (r1 int32) {
  10469. bp := tls.Alloc(16)
  10470. defer tls.Free(16)
  10471. var r TFcResult
  10472. var _ /* v at bp+0 */ TFcValue
  10473. _ = r
  10474. r = __XftDefaultGet(tls, dpy, object, screen, bp)
  10475. if r != int32(_FcResultMatch) || (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 != int32(_FcTypeInteger) {
  10476. return def
  10477. }
  10478. return *(*int32)(unsafe.Pointer(bp + 8))
  10479. }
  10480. func XXftDefaultGetDouble(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, def float64) (r1 float64) {
  10481. bp := tls.Alloc(16)
  10482. defer tls.Free(16)
  10483. var r TFcResult
  10484. var _ /* v at bp+0 */ TFcValue
  10485. _ = r
  10486. r = __XftDefaultGet(tls, dpy, object, screen, bp)
  10487. if r != int32(_FcResultMatch) || (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 != int32(_FcTypeDouble) {
  10488. return def
  10489. }
  10490. return *(*float64)(unsafe.Pointer(bp + 8))
  10491. }
  10492. func XXftDefaultSubstitute(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr) {
  10493. bp := tls.Alloc(16)
  10494. defer tls.Free(16)
  10495. var dpi float64
  10496. var render_order, subpixel int32
  10497. var _ /* v at bp+0 */ TFcValue
  10498. _, _, _ = dpi, render_order, subpixel
  10499. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+592, 0, bp) == int32(_FcResultNoMatch) {
  10500. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+592, XXftDefaultGetBool(tls, dpy, __ccgo_ts+592, screen, XXftDefaultHasRender(tls, dpy)))
  10501. }
  10502. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+614, 0, bp) == int32(_FcResultNoMatch) {
  10503. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+614, XXftDefaultGetBool(tls, dpy, __ccgo_ts+614, screen, int32(m_True)))
  10504. }
  10505. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+624, 0, bp) == int32(_FcResultNoMatch) {
  10506. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+624, XXftDefaultGetBool(tls, dpy, __ccgo_ts+624, screen, m_False))
  10507. }
  10508. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+652, 0, bp) == int32(_FcResultNoMatch) {
  10509. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+652, XXftDefaultGetBool(tls, dpy, __ccgo_ts+652, screen, int32(m_True)))
  10510. }
  10511. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+642, 0, bp) == int32(_FcResultNoMatch) {
  10512. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+642, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+642, screen, int32(m_FC_HINT_FULL)))
  10513. }
  10514. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+633, 0, bp) == int32(_FcResultNoMatch) {
  10515. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+633, XXftDefaultGetBool(tls, dpy, __ccgo_ts+633, screen, m_False))
  10516. }
  10517. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+599, 0, bp) == int32(_FcResultNoMatch) {
  10518. subpixel = m_FC_RGBA_UNKNOWN
  10519. if XXftDefaultHasRender(tls, dpy) != 0 {
  10520. render_order = libxrender.XXRenderQuerySubpixelOrder(tls, dpy, screen)
  10521. switch render_order {
  10522. default:
  10523. fallthrough
  10524. case m_SubPixelUnknown:
  10525. subpixel = m_FC_RGBA_UNKNOWN
  10526. case int32(m_SubPixelHorizontalRGB):
  10527. subpixel = int32(m_FC_RGBA_RGB)
  10528. case int32(m_SubPixelHorizontalBGR):
  10529. subpixel = int32(m_FC_RGBA_BGR)
  10530. case int32(m_SubPixelVerticalRGB):
  10531. subpixel = int32(m_FC_RGBA_VRGB)
  10532. case int32(m_SubPixelVerticalBGR):
  10533. subpixel = int32(m_FC_RGBA_VBGR)
  10534. case int32(m_SubPixelNone):
  10535. subpixel = int32(m_FC_RGBA_NONE)
  10536. break
  10537. }
  10538. }
  10539. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+599, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+599, screen, subpixel))
  10540. }
  10541. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+604, 0, bp) == int32(_FcResultNoMatch) {
  10542. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+604, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+604, screen, int32(m_FC_LCD_DEFAULT)))
  10543. }
  10544. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+660, 0, bp) == int32(_FcResultNoMatch) {
  10545. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+660, XXftDefaultGetBool(tls, dpy, __ccgo_ts+660, screen, m_False))
  10546. }
  10547. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+588, 0, bp) == int32(_FcResultNoMatch) {
  10548. dpi = float64(float64((*TScreen)(unsafe.Pointer((*struct {
  10549. Fext_data uintptr
  10550. Fprivate1 uintptr
  10551. Ffd int32
  10552. Fprivate2 int32
  10553. Fproto_major_version int32
  10554. Fproto_minor_version int32
  10555. Fvendor uintptr
  10556. Fprivate3 TXID
  10557. Fprivate4 TXID
  10558. Fprivate5 TXID
  10559. Fprivate6 int32
  10560. Fresource_alloc uintptr
  10561. Fbyte_order int32
  10562. Fbitmap_unit int32
  10563. Fbitmap_pad int32
  10564. Fbitmap_bit_order int32
  10565. Fnformats int32
  10566. Fpixmap_format uintptr
  10567. Fprivate8 int32
  10568. Frelease int32
  10569. Fprivate9 uintptr
  10570. Fprivate10 uintptr
  10571. Fqlen int32
  10572. Flast_request_read uint32
  10573. Frequest uint32
  10574. Fprivate11 TXPointer
  10575. Fprivate12 TXPointer
  10576. Fprivate13 TXPointer
  10577. Fprivate14 TXPointer
  10578. Fmax_request_size uint32
  10579. Fdb uintptr
  10580. Fprivate15 uintptr
  10581. Fdisplay_name uintptr
  10582. Fdefault_screen int32
  10583. Fnscreens int32
  10584. Fscreens uintptr
  10585. Fmotion_buffer uint32
  10586. Fprivate16 uint32
  10587. Fmin_keycode int32
  10588. Fmax_keycode int32
  10589. Fprivate17 TXPointer
  10590. Fprivate18 TXPointer
  10591. Fprivate19 int32
  10592. Fxdefaults uintptr
  10593. })(unsafe.Pointer(dpy)).Fscreens+uintptr(screen)*80)).Fheight)*float64(25.4)) / float64((*TScreen)(unsafe.Pointer((*struct {
  10594. Fext_data uintptr
  10595. Fprivate1 uintptr
  10596. Ffd int32
  10597. Fprivate2 int32
  10598. Fproto_major_version int32
  10599. Fproto_minor_version int32
  10600. Fvendor uintptr
  10601. Fprivate3 TXID
  10602. Fprivate4 TXID
  10603. Fprivate5 TXID
  10604. Fprivate6 int32
  10605. Fresource_alloc uintptr
  10606. Fbyte_order int32
  10607. Fbitmap_unit int32
  10608. Fbitmap_pad int32
  10609. Fbitmap_bit_order int32
  10610. Fnformats int32
  10611. Fpixmap_format uintptr
  10612. Fprivate8 int32
  10613. Frelease int32
  10614. Fprivate9 uintptr
  10615. Fprivate10 uintptr
  10616. Fqlen int32
  10617. Flast_request_read uint32
  10618. Frequest uint32
  10619. Fprivate11 TXPointer
  10620. Fprivate12 TXPointer
  10621. Fprivate13 TXPointer
  10622. Fprivate14 TXPointer
  10623. Fmax_request_size uint32
  10624. Fdb uintptr
  10625. Fprivate15 uintptr
  10626. Fdisplay_name uintptr
  10627. Fdefault_screen int32
  10628. Fnscreens int32
  10629. Fscreens uintptr
  10630. Fmotion_buffer uint32
  10631. Fprivate16 uint32
  10632. Fmin_keycode int32
  10633. Fmax_keycode int32
  10634. Fprivate17 TXPointer
  10635. Fprivate18 TXPointer
  10636. Fprivate19 int32
  10637. Fxdefaults uintptr
  10638. })(unsafe.Pointer(dpy)).Fscreens+uintptr(screen)*80)).Fmheight)
  10639. libfontconfig.XFcPatternAddDouble(tls, pattern, __ccgo_ts+588, XXftDefaultGetDouble(tls, dpy, __ccgo_ts+588, screen, dpi))
  10640. }
  10641. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+582, 0, bp) == int32(_FcResultNoMatch) {
  10642. libfontconfig.XFcPatternAddDouble(tls, pattern, __ccgo_ts+582, XXftDefaultGetDouble(tls, dpy, __ccgo_ts+582, screen, float64(1)))
  10643. }
  10644. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+201, 0, bp) == int32(_FcResultNoMatch) {
  10645. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+201, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+201, screen, libc.Int32FromInt32(1024)*libc.Int32FromInt32(1024)))
  10646. }
  10647. libfontconfig.XFcDefaultSubstitute(tls, pattern)
  10648. }
  10649. const m_VisualIDMask1 = 1
  10650. const m_VisualScreenMask1 = 2
  10651. /* xftxlfd.c */
  10652. /*
  10653. * Ok, this is a pain. To share source pictures across multiple destinations,
  10654. * the screen for each drawable must be discovered.
  10655. */
  10656. func __XftDrawScreen(tls *libc.TLS, dpy uintptr, drawable TDrawable, visual uintptr) (r int32) {
  10657. bp := tls.Alloc(80)
  10658. defer tls.Free(80)
  10659. var ret uintptr
  10660. var s int32
  10661. var _ /* borderWidth at bp+20 */ uint32
  10662. var _ /* depth at bp+24 */ uint32
  10663. var _ /* height at bp+16 */ uint32
  10664. var _ /* nret at bp+68 */ int32
  10665. var _ /* root at bp+0 */ TWindow
  10666. var _ /* template at bp+28 */ TXVisualInfo
  10667. var _ /* width at bp+12 */ uint32
  10668. var _ /* x at bp+4 */ int32
  10669. var _ /* y at bp+8 */ int32
  10670. _, _ = ret, s
  10671. /* Special case the most common environment */
  10672. if (*struct {
  10673. Fext_data uintptr
  10674. Fprivate1 uintptr
  10675. Ffd int32
  10676. Fprivate2 int32
  10677. Fproto_major_version int32
  10678. Fproto_minor_version int32
  10679. Fvendor uintptr
  10680. Fprivate3 TXID
  10681. Fprivate4 TXID
  10682. Fprivate5 TXID
  10683. Fprivate6 int32
  10684. Fresource_alloc uintptr
  10685. Fbyte_order int32
  10686. Fbitmap_unit int32
  10687. Fbitmap_pad int32
  10688. Fbitmap_bit_order int32
  10689. Fnformats int32
  10690. Fpixmap_format uintptr
  10691. Fprivate8 int32
  10692. Frelease int32
  10693. Fprivate9 uintptr
  10694. Fprivate10 uintptr
  10695. Fqlen int32
  10696. Flast_request_read uint32
  10697. Frequest uint32
  10698. Fprivate11 TXPointer
  10699. Fprivate12 TXPointer
  10700. Fprivate13 TXPointer
  10701. Fprivate14 TXPointer
  10702. Fmax_request_size uint32
  10703. Fdb uintptr
  10704. Fprivate15 uintptr
  10705. Fdisplay_name uintptr
  10706. Fdefault_screen int32
  10707. Fnscreens int32
  10708. Fscreens uintptr
  10709. Fmotion_buffer uint32
  10710. Fprivate16 uint32
  10711. Fmin_keycode int32
  10712. Fmax_keycode int32
  10713. Fprivate17 TXPointer
  10714. Fprivate18 TXPointer
  10715. Fprivate19 int32
  10716. Fxdefaults uintptr
  10717. })(unsafe.Pointer(dpy)).Fnscreens == int32(1) {
  10718. return 0
  10719. }
  10720. /*
  10721. * If we've got a visual, look for the screen that points at it.
  10722. * This requires no round trip.
  10723. */
  10724. if visual != 0 {
  10725. s = 0
  10726. for {
  10727. if !(s < (*struct {
  10728. Fext_data uintptr
  10729. Fprivate1 uintptr
  10730. Ffd int32
  10731. Fprivate2 int32
  10732. Fproto_major_version int32
  10733. Fproto_minor_version int32
  10734. Fvendor uintptr
  10735. Fprivate3 TXID
  10736. Fprivate4 TXID
  10737. Fprivate5 TXID
  10738. Fprivate6 int32
  10739. Fresource_alloc uintptr
  10740. Fbyte_order int32
  10741. Fbitmap_unit int32
  10742. Fbitmap_pad int32
  10743. Fbitmap_bit_order int32
  10744. Fnformats int32
  10745. Fpixmap_format uintptr
  10746. Fprivate8 int32
  10747. Frelease int32
  10748. Fprivate9 uintptr
  10749. Fprivate10 uintptr
  10750. Fqlen int32
  10751. Flast_request_read uint32
  10752. Frequest uint32
  10753. Fprivate11 TXPointer
  10754. Fprivate12 TXPointer
  10755. Fprivate13 TXPointer
  10756. Fprivate14 TXPointer
  10757. Fmax_request_size uint32
  10758. Fdb uintptr
  10759. Fprivate15 uintptr
  10760. Fdisplay_name uintptr
  10761. Fdefault_screen int32
  10762. Fnscreens int32
  10763. Fscreens uintptr
  10764. Fmotion_buffer uint32
  10765. Fprivate16 uint32
  10766. Fmin_keycode int32
  10767. Fmax_keycode int32
  10768. Fprivate17 TXPointer
  10769. Fprivate18 TXPointer
  10770. Fprivate19 int32
  10771. Fxdefaults uintptr
  10772. })(unsafe.Pointer(dpy)).Fnscreens) {
  10773. break
  10774. }
  10775. (*(*TXVisualInfo)(unsafe.Pointer(bp + 28))).Fvisualid = (*TVisual)(unsafe.Pointer(visual)).Fvisualid
  10776. (*(*TXVisualInfo)(unsafe.Pointer(bp + 28))).Fscreen = s
  10777. ret = libx11.XXGetVisualInfo(tls, dpy, int32(libc.Int32FromInt32(m_VisualIDMask1)|libc.Int32FromInt32(m_VisualScreenMask1)), bp+28, bp+68)
  10778. if ret != 0 {
  10779. libx11.XXFree(tls, ret)
  10780. return s
  10781. }
  10782. goto _1
  10783. _1:
  10784. ;
  10785. s++
  10786. }
  10787. }
  10788. /*
  10789. * Otherwise, as the server for the drawable geometry and find
  10790. * the screen from the root window.
  10791. * This takes a round trip.
  10792. */
  10793. if libx11.XXGetGeometry(tls, dpy, drawable, bp, bp+4, bp+8, bp+12, bp+16, bp+20, bp+24) != 0 {
  10794. s = 0
  10795. for {
  10796. if !(s < (*struct {
  10797. Fext_data uintptr
  10798. Fprivate1 uintptr
  10799. Ffd int32
  10800. Fprivate2 int32
  10801. Fproto_major_version int32
  10802. Fproto_minor_version int32
  10803. Fvendor uintptr
  10804. Fprivate3 TXID
  10805. Fprivate4 TXID
  10806. Fprivate5 TXID
  10807. Fprivate6 int32
  10808. Fresource_alloc uintptr
  10809. Fbyte_order int32
  10810. Fbitmap_unit int32
  10811. Fbitmap_pad int32
  10812. Fbitmap_bit_order int32
  10813. Fnformats int32
  10814. Fpixmap_format uintptr
  10815. Fprivate8 int32
  10816. Frelease int32
  10817. Fprivate9 uintptr
  10818. Fprivate10 uintptr
  10819. Fqlen int32
  10820. Flast_request_read uint32
  10821. Frequest uint32
  10822. Fprivate11 TXPointer
  10823. Fprivate12 TXPointer
  10824. Fprivate13 TXPointer
  10825. Fprivate14 TXPointer
  10826. Fmax_request_size uint32
  10827. Fdb uintptr
  10828. Fprivate15 uintptr
  10829. Fdisplay_name uintptr
  10830. Fdefault_screen int32
  10831. Fnscreens int32
  10832. Fscreens uintptr
  10833. Fmotion_buffer uint32
  10834. Fprivate16 uint32
  10835. Fmin_keycode int32
  10836. Fmax_keycode int32
  10837. Fprivate17 TXPointer
  10838. Fprivate18 TXPointer
  10839. Fprivate19 int32
  10840. Fxdefaults uintptr
  10841. })(unsafe.Pointer(dpy)).Fnscreens) {
  10842. break
  10843. }
  10844. if (*TScreen)(unsafe.Pointer((*struct {
  10845. Fext_data uintptr
  10846. Fprivate1 uintptr
  10847. Ffd int32
  10848. Fprivate2 int32
  10849. Fproto_major_version int32
  10850. Fproto_minor_version int32
  10851. Fvendor uintptr
  10852. Fprivate3 TXID
  10853. Fprivate4 TXID
  10854. Fprivate5 TXID
  10855. Fprivate6 int32
  10856. Fresource_alloc uintptr
  10857. Fbyte_order int32
  10858. Fbitmap_unit int32
  10859. Fbitmap_pad int32
  10860. Fbitmap_bit_order int32
  10861. Fnformats int32
  10862. Fpixmap_format uintptr
  10863. Fprivate8 int32
  10864. Frelease int32
  10865. Fprivate9 uintptr
  10866. Fprivate10 uintptr
  10867. Fqlen int32
  10868. Flast_request_read uint32
  10869. Frequest uint32
  10870. Fprivate11 TXPointer
  10871. Fprivate12 TXPointer
  10872. Fprivate13 TXPointer
  10873. Fprivate14 TXPointer
  10874. Fmax_request_size uint32
  10875. Fdb uintptr
  10876. Fprivate15 uintptr
  10877. Fdisplay_name uintptr
  10878. Fdefault_screen int32
  10879. Fnscreens int32
  10880. Fscreens uintptr
  10881. Fmotion_buffer uint32
  10882. Fprivate16 uint32
  10883. Fmin_keycode int32
  10884. Fmax_keycode int32
  10885. Fprivate17 TXPointer
  10886. Fprivate18 TXPointer
  10887. Fprivate19 int32
  10888. Fxdefaults uintptr
  10889. })(unsafe.Pointer(dpy)).Fscreens+uintptr(s)*80)).Froot == *(*TWindow)(unsafe.Pointer(bp)) {
  10890. return s
  10891. }
  10892. goto _2
  10893. _2:
  10894. ;
  10895. s++
  10896. }
  10897. }
  10898. /*
  10899. * Make a guess -- it's probably wrong, but then the app probably
  10900. * handed us a bogus drawable in this case
  10901. */
  10902. return 0
  10903. }
  10904. func XXftDrawDepth(tls *libc.TLS, draw uintptr) (r uint32) {
  10905. bp := tls.Alloc(32)
  10906. defer tls.Free(32)
  10907. var _ /* borderWidth at bp+20 */ uint32
  10908. var _ /* depth at bp+24 */ uint32
  10909. var _ /* height at bp+16 */ uint32
  10910. var _ /* root at bp+0 */ TWindow
  10911. var _ /* width at bp+12 */ uint32
  10912. var _ /* x at bp+4 */ int32
  10913. var _ /* y at bp+8 */ int32
  10914. if !((*TXftDraw)(unsafe.Pointer(draw)).Fdepth != 0) {
  10915. if libx11.XXGetGeometry(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, bp, bp+4, bp+8, bp+12, bp+16, bp+20, bp+24) != 0 {
  10916. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = *(*uint32)(unsafe.Pointer(bp + 24))
  10917. }
  10918. }
  10919. return (*TXftDraw)(unsafe.Pointer(draw)).Fdepth
  10920. }
  10921. func XXftDrawBitsPerPixel(tls *libc.TLS, draw uintptr) (r uint32) {
  10922. bp := tls.Alloc(16)
  10923. defer tls.Free(16)
  10924. var depth, v1 uint32
  10925. var formats, v2 uintptr
  10926. var i int32
  10927. var v3 bool
  10928. var _ /* nformats at bp+0 */ int32
  10929. _, _, _, _, _, _ = depth, formats, i, v1, v2, v3
  10930. if !((*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel != 0) {
  10931. v1 = XXftDrawDepth(tls, draw)
  10932. depth = v1
  10933. if v3 = v1 != 0; v3 {
  10934. v2 = libx11.XXListPixmapFormats(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, bp)
  10935. formats = v2
  10936. }
  10937. if v3 && v2 != 0 {
  10938. i = 0
  10939. for {
  10940. if !(i < *(*int32)(unsafe.Pointer(bp))) {
  10941. break
  10942. }
  10943. if libc.Uint32FromInt32((*(*TXPixmapFormatValues)(unsafe.Pointer(formats + uintptr(i)*12))).Fdepth) == depth {
  10944. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = libc.Uint32FromInt32((*(*TXPixmapFormatValues)(unsafe.Pointer(formats + uintptr(i)*12))).Fbits_per_pixel)
  10945. break
  10946. }
  10947. goto _4
  10948. _4:
  10949. ;
  10950. i++
  10951. }
  10952. libx11.XXFree(tls, formats)
  10953. }
  10954. }
  10955. return (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel
  10956. }
  10957. func XXftDrawCreate(tls *libc.TLS, dpy uintptr, drawable TDrawable, visual uintptr, colormap TColormap) (r uintptr) {
  10958. var draw uintptr
  10959. _ = draw
  10960. draw = libc.Xmalloc(tls, uint32(52))
  10961. if !(draw != 0) {
  10962. return libc.UintptrFromInt32(0)
  10963. }
  10964. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  10965. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = drawable
  10966. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, drawable, visual)
  10967. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = uint32(0) /* don't find out unless we need to know */
  10968. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(0) /* don't find out unless we need to know */
  10969. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = visual
  10970. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = colormap
  10971. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint32(0)
  10972. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10973. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  10974. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  10975. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  10976. XXftMemAlloc(tls, int32(_XFT_MEM_DRAW), uint32(52))
  10977. return draw
  10978. }
  10979. func XXftDrawCreateBitmap(tls *libc.TLS, dpy uintptr, bitmap TPixmap) (r uintptr) {
  10980. var draw uintptr
  10981. _ = draw
  10982. draw = libc.Xmalloc(tls, uint32(52))
  10983. if !(draw != 0) {
  10984. return libc.UintptrFromInt32(0)
  10985. }
  10986. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  10987. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = bitmap
  10988. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, bitmap, libc.UintptrFromInt32(0))
  10989. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = uint32(1)
  10990. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(1)
  10991. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = libc.UintptrFromInt32(0)
  10992. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = uint32(0)
  10993. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint32(0)
  10994. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10995. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  10996. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  10997. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  10998. XXftMemAlloc(tls, int32(_XFT_MEM_DRAW), uint32(52))
  10999. return draw
  11000. }
  11001. func XXftDrawCreateAlpha(tls *libc.TLS, dpy uintptr, pixmap TPixmap, depth int32) (r uintptr) {
  11002. var draw uintptr
  11003. _ = draw
  11004. draw = libc.Xmalloc(tls, uint32(52))
  11005. if !(draw != 0) {
  11006. return libc.UintptrFromInt32(0)
  11007. }
  11008. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  11009. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = pixmap
  11010. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, pixmap, libc.UintptrFromInt32(0))
  11011. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = libc.Uint32FromInt32(depth)
  11012. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(0) /* don't find out until we need it */
  11013. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = libc.UintptrFromInt32(0)
  11014. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = uint32(0)
  11015. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint32(0)
  11016. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  11017. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  11018. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  11019. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  11020. XXftMemAlloc(tls, int32(_XFT_MEM_DRAW), uint32(52))
  11021. return draw
  11022. }
  11023. func __XftDrawFormat(tls *libc.TLS, draw uintptr) (r uintptr) {
  11024. bp := tls.Alloc(32)
  11025. defer tls.Free(32)
  11026. var info uintptr
  11027. var _ /* pf at bp+0 */ TXRenderPictFormat
  11028. _ = info
  11029. info = X_XftDisplayInfoGet(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, int32(m_True))
  11030. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0) {
  11031. return libc.UintptrFromInt32(0)
  11032. }
  11033. if (*TXftDraw)(unsafe.Pointer(draw)).Fvisual == libc.UintptrFromInt32(0) {
  11034. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Ftype1 = int32(m_PictTypeDirect)
  11035. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth = libc.Int32FromUint32(XXftDrawDepth(tls, draw))
  11036. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.Falpha = 0
  11037. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FalphaMask = int16(libc.Int32FromInt32(1)<<(*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth - libc.Int32FromInt32(1))
  11038. return libxrender.XXRenderFindFormat(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, libc.Uint32FromInt32(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)
  11039. } else {
  11040. return libxrender.XXRenderFindVisualFormat(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fvisual)
  11041. }
  11042. return r
  11043. }
  11044. func XXftDrawChange(tls *libc.TLS, draw uintptr, drawable TDrawable) {
  11045. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = drawable
  11046. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11047. libxrender.XXRenderFreePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict)
  11048. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint32(0)
  11049. }
  11050. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11051. libx11.XXFreeGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc)
  11052. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  11053. }
  11054. }
  11055. func XXftDrawDisplay(tls *libc.TLS, draw uintptr) (r uintptr) {
  11056. return (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  11057. }
  11058. func XXftDrawDrawable(tls *libc.TLS, draw uintptr) (r TDrawable) {
  11059. return (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable
  11060. }
  11061. func XXftDrawColormap(tls *libc.TLS, draw uintptr) (r TColormap) {
  11062. return (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap
  11063. }
  11064. func XXftDrawVisual(tls *libc.TLS, draw uintptr) (r uintptr) {
  11065. return (*TXftDraw)(unsafe.Pointer(draw)).Fvisual
  11066. }
  11067. func XXftDrawDestroy(tls *libc.TLS, draw uintptr) {
  11068. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11069. libxrender.XXRenderFreePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict)
  11070. }
  11071. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11072. libx11.XXFreeGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc)
  11073. }
  11074. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11075. case int32(_XftClipTypeRegion):
  11076. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 32)))
  11077. case int32(_XftClipTypeRectangles):
  11078. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 32)))
  11079. case int32(_XftClipTypeNone):
  11080. break
  11081. }
  11082. XXftMemFree(tls, int32(_XFT_MEM_DRAW), uint32(52))
  11083. libc.Xfree(tls, draw)
  11084. }
  11085. func XXftDrawSrcPicture(tls *libc.TLS, draw uintptr, color uintptr) (r TPicture) {
  11086. bp := tls.Alloc(64)
  11087. defer tls.Free(64)
  11088. var dpy, info uintptr
  11089. var i int32
  11090. var pix TPixmap
  11091. var _ /* bitmapColor at bp+0 */ TXftColor
  11092. var _ /* pa at bp+12 */ TXRenderPictureAttributes
  11093. _, _, _, _ = dpy, i, info, pix
  11094. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  11095. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  11096. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat != 0) {
  11097. return uint32(0)
  11098. }
  11099. /*
  11100. * Monochrome targets require special handling; the PictOp controls
  11101. * the color, and the color must be opaque
  11102. */
  11103. if !((*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0) && (*TXftDraw)(unsafe.Pointer(draw)).Fdepth == uint32(1) {
  11104. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Falpha = uint16(0xffff)
  11105. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fred = uint16(0xffff)
  11106. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fgreen = uint16(0xffff)
  11107. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fblue = uint16(0xffff)
  11108. color = bp
  11109. }
  11110. /*
  11111. * See if there's one already available
  11112. */
  11113. i = 0
  11114. for {
  11115. if !(i < int32(m_XFT_NUM_SOLID_COLOR)) {
  11116. break
  11117. }
  11118. if (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fpict != 0 && (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fscreen == (*TXftDraw)(unsafe.Pointer(draw)).Fscreen && !(libc.Xmemcmp(tls, color+4, info+56+uintptr(i)*16, uint32(8)) != 0) {
  11119. return (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fpict
  11120. }
  11121. goto _1
  11122. _1:
  11123. ;
  11124. i++
  11125. }
  11126. /*
  11127. * Pick one to replace at random
  11128. */
  11129. i = libc.Int32FromUint32(libc.Uint32FromInt32(libc.Xrand(tls)) % uint32(m_XFT_NUM_SOLID_COLOR))
  11130. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasSolid != 0 {
  11131. /*
  11132. * Free any existing entry
  11133. */
  11134. if (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fpict != 0 {
  11135. libxrender.XXRenderFreePicture(tls, dpy, (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fpict)
  11136. }
  11137. /*
  11138. * Create picture
  11139. */
  11140. (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fpict = libxrender.XXRenderCreateSolidFill(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, color+4)
  11141. } else {
  11142. if (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fscreen != (*TXftDraw)(unsafe.Pointer(draw)).Fscreen && (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fpict != 0 {
  11143. libxrender.XXRenderFreePicture(tls, dpy, (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fpict)
  11144. (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fpict = uint32(0)
  11145. }
  11146. /*
  11147. * Create picture if necessary
  11148. */
  11149. if !((*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fpict != 0) {
  11150. pix = libx11.XXCreatePixmap(tls, dpy, (*TScreen)(unsafe.Pointer((*struct {
  11151. Fext_data uintptr
  11152. Fprivate1 uintptr
  11153. Ffd int32
  11154. Fprivate2 int32
  11155. Fproto_major_version int32
  11156. Fproto_minor_version int32
  11157. Fvendor uintptr
  11158. Fprivate3 TXID
  11159. Fprivate4 TXID
  11160. Fprivate5 TXID
  11161. Fprivate6 int32
  11162. Fresource_alloc uintptr
  11163. Fbyte_order int32
  11164. Fbitmap_unit int32
  11165. Fbitmap_pad int32
  11166. Fbitmap_bit_order int32
  11167. Fnformats int32
  11168. Fpixmap_format uintptr
  11169. Fprivate8 int32
  11170. Frelease int32
  11171. Fprivate9 uintptr
  11172. Fprivate10 uintptr
  11173. Fqlen int32
  11174. Flast_request_read uint32
  11175. Frequest uint32
  11176. Fprivate11 TXPointer
  11177. Fprivate12 TXPointer
  11178. Fprivate13 TXPointer
  11179. Fprivate14 TXPointer
  11180. Fmax_request_size uint32
  11181. Fdb uintptr
  11182. Fprivate15 uintptr
  11183. Fdisplay_name uintptr
  11184. Fdefault_screen int32
  11185. Fnscreens int32
  11186. Fscreens uintptr
  11187. Fmotion_buffer uint32
  11188. Fprivate16 uint32
  11189. Fmin_keycode int32
  11190. Fmax_keycode int32
  11191. Fprivate17 TXPointer
  11192. Fprivate18 TXPointer
  11193. Fprivate19 int32
  11194. Fxdefaults uintptr
  11195. })(unsafe.Pointer(dpy)).Fscreens+uintptr((*TXftDraw)(unsafe.Pointer(draw)).Fscreen)*80)).Froot, uint32(1), uint32(1), libc.Uint32FromInt32((*TXRenderPictFormat)(unsafe.Pointer((*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat)).Fdepth))
  11196. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp + 12))).Frepeat = int32(m_True)
  11197. (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fpict = libxrender.XXRenderCreatePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pix, (*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat, libc.Uint32FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(0)), bp+12)
  11198. libx11.XXFreePixmap(tls, dpy, pix)
  11199. }
  11200. /*
  11201. * Set to the new color
  11202. */
  11203. (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fcolor = (*TXftColor)(unsafe.Pointer(color)).Fcolor
  11204. (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fscreen = (*TXftDraw)(unsafe.Pointer(draw)).Fscreen
  11205. libxrender.XXRenderFillRectangle(tls, dpy, int32(m_PictOpSrc), (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fpict, color+4, 0, 0, uint32(1), uint32(1))
  11206. }
  11207. (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fcolor = (*TXftColor)(unsafe.Pointer(color)).Fcolor
  11208. (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fscreen = (*TXftDraw)(unsafe.Pointer(draw)).Fscreen
  11209. return (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fpict
  11210. }
  11211. func __XftDrawOp(tls *libc.TLS, draw uintptr, color uintptr) (r int32) {
  11212. if (*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0 || (*TXftDraw)(unsafe.Pointer(draw)).Fdepth != uint32(1) {
  11213. return int32(m_PictOpOver)
  11214. }
  11215. if libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >= int32(0x8000) {
  11216. return int32(m_PictOpOver)
  11217. }
  11218. return int32(m_PictOpOutReverse)
  11219. }
  11220. func __XftDrawRenderPrepare(tls *libc.TLS, draw uintptr) (r TFcBool) {
  11221. bp := tls.Alloc(64)
  11222. defer tls.Free(64)
  11223. var format uintptr
  11224. var mask uint32
  11225. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  11226. _, _ = format, mask
  11227. if !((*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0) {
  11228. mask = uint32(0)
  11229. format = __XftDrawFormat(tls, draw)
  11230. if !(format != 0) {
  11231. return m_FcFalse
  11232. }
  11233. if (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode == int32(m_IncludeInferiors) {
  11234. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fsubwindow_mode = int32(m_IncludeInferiors)
  11235. mask |= libc.Uint32FromInt32(libc.Int32FromInt32(1) << libc.Int32FromInt32(8))
  11236. }
  11237. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = libxrender.XXRenderCreatePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, format, mask, bp)
  11238. if !((*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0) {
  11239. return m_FcFalse
  11240. }
  11241. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11242. case int32(_XftClipTypeRegion):
  11243. libxrender.XXRenderSetPictureClipRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, *(*TRegion)(unsafe.Pointer(draw + 32)))
  11244. case int32(_XftClipTypeRectangles):
  11245. libxrender.XXRenderSetPictureClipRectangles(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 32)))).FxOrigin, (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 32)))).FyOrigin, *(*uintptr)(unsafe.Pointer(draw + 32))+libc.UintptrFromInt32(1)*12, (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 32)))).Fn)
  11246. case int32(_XftClipTypeNone):
  11247. break
  11248. }
  11249. }
  11250. return int32(m_FcTrue)
  11251. }
  11252. func __XftDrawCorePrepare(tls *libc.TLS, draw uintptr, color uintptr) (r TFcBool) {
  11253. bp := tls.Alloc(96)
  11254. defer tls.Free(96)
  11255. var mask uint32
  11256. var _ /* gcv at bp+0 */ TXGCValues
  11257. _ = mask
  11258. if !((*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0) {
  11259. mask = uint32(0)
  11260. if (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode == int32(m_IncludeInferiors) {
  11261. (*(*TXGCValues)(unsafe.Pointer(bp))).Fsubwindow_mode = int32(m_IncludeInferiors)
  11262. mask |= libc.Uint32FromInt32(libc.Int32FromInt32(1) << libc.Int32FromInt32(15))
  11263. }
  11264. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libx11.XXCreateGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, mask, bp)
  11265. if !((*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0) {
  11266. return m_FcFalse
  11267. }
  11268. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11269. case int32(_XftClipTypeRegion):
  11270. libx11.XXSetRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, *(*TRegion)(unsafe.Pointer(draw + 32)))
  11271. case int32(_XftClipTypeRectangles):
  11272. libx11.XXSetClipRectangles(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 32)))).FxOrigin, (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 32)))).FyOrigin, *(*uintptr)(unsafe.Pointer(draw + 32))+libc.UintptrFromInt32(1)*12, (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 32)))).Fn, m_Unsorted)
  11273. case int32(_XftClipTypeNone):
  11274. break
  11275. }
  11276. }
  11277. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  11278. return int32(m_FcTrue)
  11279. }
  11280. func XXftDrawPicture(tls *libc.TLS, draw uintptr) (r TPicture) {
  11281. if !(__XftDrawRenderPrepare(tls, draw) != 0) {
  11282. return uint32(0)
  11283. }
  11284. return (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict
  11285. }
  11286. func XXftDrawGlyphs(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, glyphs uintptr, nglyphs int32) {
  11287. var font uintptr
  11288. var src, v1 TPicture
  11289. var v2 bool
  11290. _, _, _, _ = font, src, v1, v2
  11291. font = pub
  11292. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  11293. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  11294. v1 = XXftDrawSrcPicture(tls, draw, color)
  11295. src = v1
  11296. }
  11297. if v2 && v1 != 0 {
  11298. 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)
  11299. }
  11300. } else {
  11301. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11302. XXftGlyphCore(tls, draw, color, pub, x, y, glyphs, nglyphs)
  11303. }
  11304. }
  11305. }
  11306. func XXftDrawString8(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11307. bp := tls.Alloc(4128)
  11308. defer tls.Free(4128)
  11309. var glyphs uintptr
  11310. var i int32
  11311. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11312. _, _ = glyphs, i
  11313. if XXftDebug(tls)&int32(m_XFT_DBG_DRAW) != 0 {
  11314. libc.Xprintf(tls, __ccgo_ts+669, libc.VaList(bp+4104, len1, len1, string1))
  11315. }
  11316. if len1 <= int32(m_NUM_LOCAL) {
  11317. glyphs = bp
  11318. } else {
  11319. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  11320. if !(glyphs != 0) {
  11321. return
  11322. }
  11323. }
  11324. i = 0
  11325. for {
  11326. if !(i < len1) {
  11327. break
  11328. }
  11329. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  11330. goto _1
  11331. _1:
  11332. ;
  11333. i++
  11334. }
  11335. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  11336. if glyphs != bp {
  11337. libc.Xfree(tls, glyphs)
  11338. }
  11339. }
  11340. func XXftDrawString16(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11341. bp := tls.Alloc(4096)
  11342. defer tls.Free(4096)
  11343. var glyphs uintptr
  11344. var i int32
  11345. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11346. _, _ = glyphs, i
  11347. if len1 <= 0 {
  11348. return
  11349. }
  11350. if len1 <= int32(m_NUM_LOCAL) {
  11351. glyphs = bp
  11352. } else {
  11353. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  11354. if !(glyphs != 0) {
  11355. return
  11356. }
  11357. }
  11358. i = 0
  11359. for {
  11360. if !(i < len1) {
  11361. break
  11362. }
  11363. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  11364. goto _1
  11365. _1:
  11366. ;
  11367. i++
  11368. }
  11369. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  11370. if glyphs != bp {
  11371. libc.Xfree(tls, glyphs)
  11372. }
  11373. }
  11374. func XXftDrawString32(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11375. bp := tls.Alloc(4096)
  11376. defer tls.Free(4096)
  11377. var glyphs uintptr
  11378. var i int32
  11379. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11380. _, _ = glyphs, i
  11381. if len1 <= 0 {
  11382. return
  11383. }
  11384. if len1 <= int32(m_NUM_LOCAL) {
  11385. glyphs = bp
  11386. } else {
  11387. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  11388. if !(glyphs != 0) {
  11389. return
  11390. }
  11391. }
  11392. i = 0
  11393. for {
  11394. if !(i < len1) {
  11395. break
  11396. }
  11397. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  11398. goto _1
  11399. _1:
  11400. ;
  11401. i++
  11402. }
  11403. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  11404. if glyphs != bp {
  11405. libc.Xfree(tls, glyphs)
  11406. }
  11407. }
  11408. func XXftDrawStringUtf8(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11409. bp := tls.Alloc(4112)
  11410. defer tls.Free(4112)
  11411. var glyphs, glyphs_new uintptr
  11412. var i, l, size, v1, v3 int32
  11413. var v2 bool
  11414. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11415. var _ /* ucs4 at bp+4096 */ TFcChar32
  11416. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  11417. if len1 <= 0 {
  11418. return
  11419. }
  11420. i = 0
  11421. glyphs = bp
  11422. size = int32(m_NUM_LOCAL)
  11423. for {
  11424. if v2 = len1 != 0; v2 {
  11425. v1 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  11426. l = v1
  11427. }
  11428. if !(v2 && v1 > 0) {
  11429. break
  11430. }
  11431. if i == size {
  11432. glyphs_new = libc.Xmalloc(tls, libc.Uint32FromInt32(size*libc.Int32FromInt32(2))*uint32(4))
  11433. if !(glyphs_new != 0) {
  11434. if glyphs != bp {
  11435. libc.Xfree(tls, glyphs)
  11436. }
  11437. return
  11438. }
  11439. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint32FromInt32(size)*uint32(4))
  11440. size *= int32(2)
  11441. if glyphs != bp {
  11442. libc.Xfree(tls, glyphs)
  11443. }
  11444. glyphs = glyphs_new
  11445. }
  11446. v3 = i
  11447. i++
  11448. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11449. string1 += uintptr(l)
  11450. len1 -= l
  11451. }
  11452. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, i)
  11453. if glyphs != bp {
  11454. libc.Xfree(tls, glyphs)
  11455. }
  11456. }
  11457. func XXftDrawStringUtf16(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, endian TFcEndian, len1 int32) {
  11458. bp := tls.Alloc(4112)
  11459. defer tls.Free(4112)
  11460. var glyphs, glyphs_new uintptr
  11461. var i, l, size, v1, v3 int32
  11462. var v2 bool
  11463. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11464. var _ /* ucs4 at bp+4096 */ TFcChar32
  11465. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  11466. if len1 <= 0 {
  11467. return
  11468. }
  11469. i = 0
  11470. glyphs = bp
  11471. size = int32(m_NUM_LOCAL)
  11472. for {
  11473. if v2 = len1 != 0; v2 {
  11474. v1 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  11475. l = v1
  11476. }
  11477. if !(v2 && v1 > 0) {
  11478. break
  11479. }
  11480. if i == size {
  11481. glyphs_new = libc.Xmalloc(tls, libc.Uint32FromInt32(size*libc.Int32FromInt32(2))*uint32(4))
  11482. if !(glyphs_new != 0) {
  11483. if glyphs != bp {
  11484. libc.Xfree(tls, glyphs)
  11485. }
  11486. return
  11487. }
  11488. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint32FromInt32(size)*uint32(4))
  11489. size *= int32(2)
  11490. if glyphs != bp {
  11491. libc.Xfree(tls, glyphs)
  11492. }
  11493. glyphs = glyphs_new
  11494. }
  11495. v3 = i
  11496. i++
  11497. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11498. string1 += uintptr(l)
  11499. len1 -= l
  11500. }
  11501. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, i)
  11502. if glyphs != bp {
  11503. libc.Xfree(tls, glyphs)
  11504. }
  11505. }
  11506. func XXftDrawGlyphSpec(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, glyphs uintptr, len1 int32) {
  11507. var font uintptr
  11508. var src, v1 TPicture
  11509. var v2 bool
  11510. _, _, _, _ = font, src, v1, v2
  11511. font = pub
  11512. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  11513. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  11514. v1 = XXftDrawSrcPicture(tls, draw, color)
  11515. src = v1
  11516. }
  11517. if v2 && v1 != 0 {
  11518. XXftGlyphSpecRender(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, __XftDrawOp(tls, draw, color), src, pub, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, 0, 0, glyphs, len1)
  11519. }
  11520. } else {
  11521. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11522. XXftGlyphSpecCore(tls, draw, color, pub, glyphs, len1)
  11523. }
  11524. }
  11525. }
  11526. func XXftDrawGlyphFontSpec(tls *libc.TLS, draw uintptr, color uintptr, glyphs uintptr, len1 int32) {
  11527. var i, start int32
  11528. var src, v1 TPicture
  11529. var v2 bool
  11530. _, _, _, _, _ = i, src, start, v1, v2
  11531. i = 0
  11532. for i < len1 {
  11533. start = i
  11534. if (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont)).Fformat != 0 {
  11535. for i < len1 && (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont)).Fformat != 0 {
  11536. i++
  11537. }
  11538. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  11539. v1 = XXftDrawSrcPicture(tls, draw, color)
  11540. src = v1
  11541. }
  11542. if v2 && v1 != 0 {
  11543. XXftGlyphFontSpecRender(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, __XftDrawOp(tls, draw, color), src, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, 0, 0, glyphs+uintptr(start)*12, i-start)
  11544. }
  11545. } else {
  11546. for i < len1 && !((*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont)).Fformat != 0) {
  11547. i++
  11548. }
  11549. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11550. XXftGlyphFontSpecCore(tls, draw, color, glyphs+uintptr(start)*12, i-start)
  11551. }
  11552. }
  11553. }
  11554. }
  11555. func XXftDrawCharSpec(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, chars uintptr, len1 int32) {
  11556. bp := tls.Alloc(8192)
  11557. defer tls.Free(8192)
  11558. var glyphs uintptr
  11559. var i int32
  11560. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphSpec
  11561. _, _ = glyphs, i
  11562. if len1 <= 0 {
  11563. return
  11564. }
  11565. if len1 <= int32(m_NUM_LOCAL) {
  11566. glyphs = bp
  11567. } else {
  11568. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(8))
  11569. if !(glyphs != 0) {
  11570. return
  11571. }
  11572. }
  11573. i = 0
  11574. for {
  11575. if !(i < len1) {
  11576. break
  11577. }
  11578. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fucs4)
  11579. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fx
  11580. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fy
  11581. goto _1
  11582. _1:
  11583. ;
  11584. i++
  11585. }
  11586. XXftDrawGlyphSpec(tls, draw, color, pub, glyphs, len1)
  11587. if glyphs != bp {
  11588. libc.Xfree(tls, glyphs)
  11589. }
  11590. }
  11591. func XXftDrawCharFontSpec(tls *libc.TLS, draw uintptr, color uintptr, chars uintptr, len1 int32) {
  11592. bp := tls.Alloc(12288)
  11593. defer tls.Free(12288)
  11594. var glyphs uintptr
  11595. var i int32
  11596. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphFontSpec
  11597. _, _ = glyphs, i
  11598. if len1 <= 0 {
  11599. return
  11600. }
  11601. if len1 <= int32(m_NUM_LOCAL) {
  11602. glyphs = bp
  11603. } else {
  11604. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(12))
  11605. if !(glyphs != 0) {
  11606. return
  11607. }
  11608. }
  11609. i = 0
  11610. for {
  11611. if !(i < len1) {
  11612. break
  11613. }
  11614. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*12))).Ffont
  11615. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fglyph = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont, (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*12))).Fucs4)
  11616. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fx = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*12))).Fx
  11617. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fy = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*12))).Fy
  11618. goto _1
  11619. _1:
  11620. ;
  11621. i++
  11622. }
  11623. XXftDrawGlyphFontSpec(tls, draw, color, glyphs, len1)
  11624. if glyphs != bp {
  11625. libc.Xfree(tls, glyphs)
  11626. }
  11627. }
  11628. func XXftDrawRect(tls *libc.TLS, draw uintptr, color uintptr, x int32, y int32, width uint32, height uint32) {
  11629. if __XftDrawRenderPrepare(tls, draw) != 0 {
  11630. libxrender.XXRenderFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, int32(m_PictOpSrc), (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, color+4, x, y, width, height)
  11631. } else {
  11632. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11633. /* note: not XftRectCore() */
  11634. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  11635. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, x, y, width, height)
  11636. }
  11637. }
  11638. }
  11639. func XXftDrawSetClip(tls *libc.TLS, draw uintptr, r TRegion) (r1 int32) {
  11640. bp := tls.Alloc(64)
  11641. defer tls.Free(64)
  11642. var n TRegion
  11643. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  11644. _ = n
  11645. n = libc.UintptrFromInt32(0)
  11646. /*
  11647. * Check for quick exits
  11648. */
  11649. if !(r != 0) && (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type == int32(_XftClipTypeNone) {
  11650. return int32(m_True)
  11651. }
  11652. if r != 0 && (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type == int32(_XftClipTypeRegion) && libx11.XXEqualRegion(tls, r, *(*TRegion)(unsafe.Pointer(draw + 32))) != 0 {
  11653. return int32(m_True)
  11654. }
  11655. /*
  11656. * Duplicate the region so future changes can be short circuited
  11657. */
  11658. if r != 0 {
  11659. n = libx11.XXCreateRegion(tls)
  11660. if n != 0 {
  11661. if !(libx11.XXUnionRegion(tls, n, r, n) != 0) {
  11662. libx11.XXDestroyRegion(tls, n)
  11663. return m_False
  11664. }
  11665. }
  11666. }
  11667. /*
  11668. * Destroy existing clip
  11669. */
  11670. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11671. case int32(_XftClipTypeRegion):
  11672. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 32)))
  11673. case int32(_XftClipTypeRectangles):
  11674. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 32)))
  11675. case int32(_XftClipTypeNone):
  11676. break
  11677. }
  11678. /*
  11679. * Set the clip
  11680. */
  11681. if n != 0 {
  11682. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeRegion)
  11683. *(*TRegion)(unsafe.Pointer(draw + 32)) = n
  11684. } else {
  11685. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  11686. }
  11687. /*
  11688. * Apply new clip to existing objects
  11689. */
  11690. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11691. if n != 0 {
  11692. libxrender.XXRenderSetPictureClipRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, n)
  11693. } else {
  11694. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fclip_mask = uint32(0)
  11695. libxrender.XXRenderChangePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, libc.Uint32FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(6)), bp)
  11696. }
  11697. }
  11698. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11699. if n != 0 {
  11700. libx11.XXSetRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, *(*TRegion)(unsafe.Pointer(draw + 32)))
  11701. } else {
  11702. libx11.XXSetClipMask(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, uint32(0))
  11703. }
  11704. }
  11705. return int32(m_True)
  11706. }
  11707. func XXftDrawSetClipRectangles(tls *libc.TLS, draw uintptr, xOrigin int32, yOrigin int32, rects uintptr, n int32) (r int32) {
  11708. var new1 uintptr
  11709. _ = new1
  11710. new1 = libc.UintptrFromInt32(0)
  11711. /*
  11712. * Check for quick exit
  11713. */
  11714. if (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type == int32(_XftClipTypeRectangles) && (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 32)))).Fn == n && (n == 0 || (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 32)))).FxOrigin == xOrigin && (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 32)))).FyOrigin == yOrigin) && !(libc.Xmemcmp(tls, *(*uintptr)(unsafe.Pointer(draw + 32))+libc.UintptrFromInt32(1)*12, rects, libc.Uint32FromInt32(n)*uint32(8)) != 0) {
  11715. return int32(m_True)
  11716. }
  11717. /*
  11718. * Duplicate the region so future changes can be short circuited
  11719. */
  11720. new1 = libc.Xmalloc(tls, uint32(12)+libc.Uint32FromInt32(n)*uint32(8))
  11721. if !(new1 != 0) {
  11722. return m_False
  11723. }
  11724. (*TXftClipRect)(unsafe.Pointer(new1)).Fn = n
  11725. (*TXftClipRect)(unsafe.Pointer(new1)).FxOrigin = xOrigin
  11726. (*TXftClipRect)(unsafe.Pointer(new1)).FyOrigin = yOrigin
  11727. libc.Xmemcpy(tls, new1+libc.UintptrFromInt32(1)*12, rects, libc.Uint32FromInt32(n)*uint32(8))
  11728. /*
  11729. * Destroy existing clip
  11730. */
  11731. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11732. case int32(_XftClipTypeRegion):
  11733. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 32)))
  11734. case int32(_XftClipTypeRectangles):
  11735. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 32)))
  11736. case int32(_XftClipTypeNone):
  11737. break
  11738. }
  11739. /*
  11740. * Set the clip
  11741. */
  11742. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeRectangles)
  11743. *(*uintptr)(unsafe.Pointer(draw + 32)) = new1
  11744. /*
  11745. * Apply new clip to existing objects
  11746. */
  11747. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11748. 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)
  11749. }
  11750. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11751. 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)
  11752. }
  11753. return int32(m_True)
  11754. }
  11755. func XXftDrawSetSubwindowMode(tls *libc.TLS, draw uintptr, mode int32) {
  11756. bp := tls.Alloc(64)
  11757. defer tls.Free(64)
  11758. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  11759. if mode == (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode {
  11760. return
  11761. }
  11762. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = mode
  11763. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11764. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fsubwindow_mode = mode
  11765. libxrender.XXRenderChangePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, libc.Uint32FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(8)), bp)
  11766. }
  11767. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11768. libx11.XXSetSubwindowMode(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, mode)
  11769. }
  11770. }
  11771. const m_VisualIDMask2 = 0x1
  11772. const m_VisualScreenMask2 = 0x2
  11773. /* xftxlfd.c */
  11774. func XXftGlyphExtents(tls *libc.TLS, dpy uintptr, pub uintptr, glyphs uintptr, nglyphs int32, extents uintptr) {
  11775. bp := tls.Alloc(1040)
  11776. defer tls.Free(1040)
  11777. var bottom, left, n, overall_bottom, overall_left, overall_right, overall_top, right, top, x, y, v1, v6 int32
  11778. var font, g, xftg, v2, v3, v4, v7, v8 uintptr
  11779. var glyph TFT_UInt
  11780. var glyphs_loaded TFcBool
  11781. var v5, v9 bool
  11782. var _ /* missing at bp+0 */ [256]TFT_UInt
  11783. var _ /* nmissing at bp+1024 */ int32
  11784. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  11785. font = pub
  11786. g = glyphs
  11787. n = nglyphs
  11788. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  11789. glyphs_loaded = m_FcFalse
  11790. for {
  11791. v1 = n
  11792. n--
  11793. if !(v1 != 0) {
  11794. break
  11795. }
  11796. v2 = g
  11797. g += 4
  11798. if XXftFontCheckGlyph(tls, dpy, pub, m_FcFalse, *(*TFT_UInt)(unsafe.Pointer(v2)), bp, bp+1024) != 0 {
  11799. glyphs_loaded = int32(m_FcTrue)
  11800. }
  11801. }
  11802. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  11803. XXftFontLoadGlyphs(tls, dpy, pub, m_FcFalse, bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  11804. }
  11805. g = glyphs
  11806. n = nglyphs
  11807. xftg = libc.UintptrFromInt32(0)
  11808. for n != 0 {
  11809. v3 = g
  11810. g += 4
  11811. glyph = *(*TFT_UInt)(unsafe.Pointer(v3))
  11812. n--
  11813. if v5 = glyph < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; v5 {
  11814. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*4))
  11815. xftg = v4
  11816. }
  11817. if v5 && v4 != 0 {
  11818. break
  11819. }
  11820. }
  11821. if n == 0 {
  11822. if xftg != 0 {
  11823. *(*TXGlyphInfo)(unsafe.Pointer(extents)) = (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics
  11824. } else {
  11825. libc.Xmemset(tls, extents, int32('\000'), uint32(12))
  11826. }
  11827. } else {
  11828. x = 0
  11829. y = 0
  11830. overall_left = x - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  11831. overall_top = y - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  11832. overall_right = overall_left + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  11833. overall_bottom = overall_top + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  11834. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  11835. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  11836. for {
  11837. v6 = n
  11838. n--
  11839. if !(v6 != 0) {
  11840. break
  11841. }
  11842. v7 = g
  11843. g += 4
  11844. glyph = *(*TFT_UInt)(unsafe.Pointer(v7))
  11845. if v9 = glyph < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; v9 {
  11846. v8 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*4))
  11847. xftg = v8
  11848. }
  11849. if v9 && v8 != 0 {
  11850. left = x - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  11851. top = y - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  11852. right = left + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  11853. bottom = top + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  11854. if left < overall_left {
  11855. overall_left = left
  11856. }
  11857. if top < overall_top {
  11858. overall_top = top
  11859. }
  11860. if right > overall_right {
  11861. overall_right = right
  11862. }
  11863. if bottom > overall_bottom {
  11864. overall_bottom = bottom
  11865. }
  11866. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  11867. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  11868. }
  11869. }
  11870. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fx = int16(-overall_left)
  11871. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fy = int16(-overall_top)
  11872. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fwidth = libc.Uint16FromInt32(overall_right - overall_left)
  11873. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fheight = libc.Uint16FromInt32(overall_bottom - overall_top)
  11874. (*TXGlyphInfo)(unsafe.Pointer(extents)).FxOff = int16(x)
  11875. (*TXGlyphInfo)(unsafe.Pointer(extents)).FyOff = int16(y)
  11876. }
  11877. if glyphs_loaded != 0 {
  11878. X_XftFontManageMemory(tls, dpy, pub)
  11879. }
  11880. }
  11881. func XXftTextExtents8(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11882. bp := tls.Alloc(4096)
  11883. defer tls.Free(4096)
  11884. var glyphs, v1 uintptr
  11885. var i int32
  11886. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11887. _, _, _ = glyphs, i, v1
  11888. if len1 < 0 {
  11889. return
  11890. }
  11891. if len1 <= int32(m_NUM_LOCAL) {
  11892. v1 = bp
  11893. glyphs = v1
  11894. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  11895. } else {
  11896. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  11897. if !(glyphs != 0) {
  11898. libc.Xmemset(tls, extents, int32('\000'), uint32(12))
  11899. return
  11900. }
  11901. }
  11902. i = 0
  11903. for {
  11904. if !(i < len1) {
  11905. break
  11906. }
  11907. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  11908. goto _2
  11909. _2:
  11910. ;
  11911. i++
  11912. }
  11913. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11914. if glyphs != bp {
  11915. libc.Xfree(tls, glyphs)
  11916. }
  11917. }
  11918. func XXftTextExtents16(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11919. bp := tls.Alloc(4096)
  11920. defer tls.Free(4096)
  11921. var glyphs, v1 uintptr
  11922. var i int32
  11923. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11924. _, _, _ = glyphs, i, v1
  11925. if len1 < 0 {
  11926. return
  11927. }
  11928. if len1 <= int32(m_NUM_LOCAL) {
  11929. v1 = bp
  11930. glyphs = v1
  11931. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  11932. } else {
  11933. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  11934. if !(glyphs != 0) {
  11935. libc.Xmemset(tls, extents, int32('\000'), uint32(12))
  11936. return
  11937. }
  11938. }
  11939. i = 0
  11940. for {
  11941. if !(i < len1) {
  11942. break
  11943. }
  11944. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  11945. goto _2
  11946. _2:
  11947. ;
  11948. i++
  11949. }
  11950. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11951. if glyphs != bp {
  11952. libc.Xfree(tls, glyphs)
  11953. }
  11954. }
  11955. func XXftTextExtents32(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11956. bp := tls.Alloc(4096)
  11957. defer tls.Free(4096)
  11958. var glyphs, v1 uintptr
  11959. var i int32
  11960. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11961. _, _, _ = glyphs, i, v1
  11962. if len1 < 0 {
  11963. return
  11964. }
  11965. if len1 <= int32(m_NUM_LOCAL) {
  11966. v1 = bp
  11967. glyphs = v1
  11968. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  11969. } else {
  11970. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  11971. if !(glyphs != 0) {
  11972. libc.Xmemset(tls, extents, int32('\000'), uint32(12))
  11973. return
  11974. }
  11975. }
  11976. i = 0
  11977. for {
  11978. if !(i < len1) {
  11979. break
  11980. }
  11981. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  11982. goto _2
  11983. _2:
  11984. ;
  11985. i++
  11986. }
  11987. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11988. if glyphs != bp {
  11989. libc.Xfree(tls, glyphs)
  11990. }
  11991. }
  11992. func XXftTextExtentsUtf8(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11993. bp := tls.Alloc(4112)
  11994. defer tls.Free(4112)
  11995. var glyphs, glyphs_new, v1 uintptr
  11996. var i, l, size, v2, v4 int32
  11997. var v3 bool
  11998. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11999. var _ /* ucs4 at bp+4096 */ TFcChar32
  12000. _, _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3, v4
  12001. if len1 < 0 {
  12002. return
  12003. }
  12004. i = 0
  12005. v1 = bp
  12006. glyphs = v1
  12007. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  12008. size = int32(m_NUM_LOCAL)
  12009. for {
  12010. if v3 = len1 != 0; v3 {
  12011. v2 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  12012. l = v2
  12013. }
  12014. if !(v3 && v2 > 0) {
  12015. break
  12016. }
  12017. if i == size {
  12018. glyphs_new = libc.Xmalloc(tls, libc.Uint32FromInt32(size*libc.Int32FromInt32(2))*uint32(4))
  12019. if !(glyphs_new != 0) {
  12020. if glyphs != bp {
  12021. libc.Xfree(tls, glyphs)
  12022. }
  12023. libc.Xmemset(tls, extents, int32('\000'), uint32(12))
  12024. return
  12025. }
  12026. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint32FromInt32(size)*uint32(4))
  12027. size *= int32(2)
  12028. if glyphs != bp {
  12029. libc.Xfree(tls, glyphs)
  12030. }
  12031. glyphs = glyphs_new
  12032. }
  12033. v4 = i
  12034. i++
  12035. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v4)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  12036. string1 += uintptr(l)
  12037. len1 -= l
  12038. }
  12039. XXftGlyphExtents(tls, dpy, pub, glyphs, i, extents)
  12040. if glyphs != bp {
  12041. libc.Xfree(tls, glyphs)
  12042. }
  12043. }
  12044. func XXftTextExtentsUtf16(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, endian TFcEndian, len1 int32, extents uintptr) {
  12045. bp := tls.Alloc(4112)
  12046. defer tls.Free(4112)
  12047. var glyphs, glyphs_new, v1 uintptr
  12048. var i, l, size, v2, v4 int32
  12049. var v3 bool
  12050. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  12051. var _ /* ucs4 at bp+4096 */ TFcChar32
  12052. _, _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3, v4
  12053. if len1 < 0 {
  12054. return
  12055. }
  12056. i = 0
  12057. v1 = bp
  12058. glyphs = v1
  12059. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  12060. size = int32(m_NUM_LOCAL)
  12061. for {
  12062. if v3 = len1 != 0; v3 {
  12063. v2 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  12064. l = v2
  12065. }
  12066. if !(v3 && v2 > 0) {
  12067. break
  12068. }
  12069. if i == size {
  12070. glyphs_new = libc.Xmalloc(tls, libc.Uint32FromInt32(size*libc.Int32FromInt32(2))*uint32(4))
  12071. if !(glyphs_new != 0) {
  12072. if glyphs != bp {
  12073. libc.Xfree(tls, glyphs)
  12074. }
  12075. libc.Xmemset(tls, extents, int32('\000'), uint32(12))
  12076. return
  12077. }
  12078. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint32FromInt32(size)*uint32(4))
  12079. size *= int32(2)
  12080. if glyphs != bp {
  12081. libc.Xfree(tls, glyphs)
  12082. }
  12083. glyphs = glyphs_new
  12084. }
  12085. v4 = i
  12086. i++
  12087. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v4)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  12088. string1 += uintptr(l)
  12089. len1 -= l
  12090. }
  12091. XXftGlyphExtents(tls, dpy, pub, glyphs, i, extents)
  12092. if glyphs != bp {
  12093. libc.Xfree(tls, glyphs)
  12094. }
  12095. }
  12096. /* xftxlfd.c */
  12097. func XXftFontMatch(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr, result uintptr) (r uintptr) {
  12098. var match, new1 uintptr
  12099. _, _ = match, new1
  12100. if !(XXftInit(tls, libc.UintptrFromInt32(0)) != 0) {
  12101. return libc.UintptrFromInt32(0)
  12102. }
  12103. new1 = libfontconfig.XFcPatternDuplicate(tls, pattern)
  12104. if !(new1 != 0) {
  12105. return libc.UintptrFromInt32(0)
  12106. }
  12107. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  12108. libc.Xprintf(tls, __ccgo_ts+689, 0)
  12109. libfontconfig.XFcPatternPrint(tls, new1)
  12110. }
  12111. libfontconfig.XFcConfigSubstitute(tls, libc.UintptrFromInt32(0), new1, int32(_FcMatchPattern))
  12112. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  12113. libc.Xprintf(tls, __ccgo_ts+711, 0)
  12114. libfontconfig.XFcPatternPrint(tls, new1)
  12115. }
  12116. XXftDefaultSubstitute(tls, dpy, screen, new1)
  12117. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  12118. libc.Xprintf(tls, __ccgo_ts+754, 0)
  12119. libfontconfig.XFcPatternPrint(tls, new1)
  12120. }
  12121. match = libfontconfig.XFcFontMatch(tls, libc.UintptrFromInt32(0), new1, result)
  12122. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  12123. libc.Xprintf(tls, __ccgo_ts+799, 0)
  12124. libfontconfig.XFcPatternPrint(tls, match)
  12125. }
  12126. libfontconfig.XFcPatternDestroy(tls, new1)
  12127. return match
  12128. }
  12129. func XXftFontOpen(tls *libc.TLS, dpy uintptr, screen int32, va1 uintptr) (r uintptr) {
  12130. bp := tls.Alloc(16)
  12131. defer tls.Free(16)
  12132. var font, match, pat uintptr
  12133. var va Tva_list
  12134. var _ /* result at bp+0 */ TFcResult
  12135. _, _, _, _ = font, match, pat, va
  12136. va = va1
  12137. pat = libfontconfig.XFcPatternVaBuild(tls, libc.UintptrFromInt32(0), va)
  12138. _ = va
  12139. if !(pat != 0) {
  12140. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12141. libc.Xprintf(tls, __ccgo_ts+820, 0)
  12142. }
  12143. return libc.UintptrFromInt32(0)
  12144. }
  12145. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  12146. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12147. libc.Xprintf(tls, __ccgo_ts+859, 0)
  12148. libfontconfig.XFcPatternPrint(tls, pat)
  12149. if match != 0 {
  12150. libc.Xprintf(tls, __ccgo_ts+868, 0)
  12151. libfontconfig.XFcPatternPrint(tls, match)
  12152. } else {
  12153. libc.Xprintf(tls, __ccgo_ts+875, 0)
  12154. }
  12155. }
  12156. libfontconfig.XFcPatternDestroy(tls, pat)
  12157. if !(match != 0) {
  12158. return libc.UintptrFromInt32(0)
  12159. }
  12160. font = XXftFontOpenPattern(tls, dpy, match)
  12161. if !(font != 0) {
  12162. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12163. libc.Xprintf(tls, __ccgo_ts+885, 0)
  12164. }
  12165. libfontconfig.XFcPatternDestroy(tls, match)
  12166. }
  12167. return font
  12168. }
  12169. func XXftFontOpenName(tls *libc.TLS, dpy uintptr, screen int32, name uintptr) (r uintptr) {
  12170. bp := tls.Alloc(32)
  12171. defer tls.Free(32)
  12172. var font, match, pat uintptr
  12173. var _ /* result at bp+0 */ TFcResult
  12174. _, _, _ = font, match, pat
  12175. pat = libfontconfig.XFcNameParse(tls, name)
  12176. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12177. libc.Xprintf(tls, __ccgo_ts+894, libc.VaList(bp+16, name))
  12178. if pat != 0 {
  12179. libfontconfig.XFcPatternPrint(tls, pat)
  12180. } else {
  12181. libc.Xprintf(tls, __ccgo_ts+917, 0)
  12182. }
  12183. }
  12184. if !(pat != 0) {
  12185. return libc.UintptrFromInt32(0)
  12186. }
  12187. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  12188. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12189. if match != 0 {
  12190. libc.Xprintf(tls, __ccgo_ts+868, 0)
  12191. libfontconfig.XFcPatternPrint(tls, match)
  12192. } else {
  12193. libc.Xprintf(tls, __ccgo_ts+875, 0)
  12194. }
  12195. }
  12196. libfontconfig.XFcPatternDestroy(tls, pat)
  12197. if !(match != 0) {
  12198. return libc.UintptrFromInt32(0)
  12199. }
  12200. font = XXftFontOpenPattern(tls, dpy, match)
  12201. if !(font != 0) {
  12202. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12203. libc.Xprintf(tls, __ccgo_ts+885, 0)
  12204. }
  12205. libfontconfig.XFcPatternDestroy(tls, match)
  12206. }
  12207. return font
  12208. }
  12209. func XXftFontOpenXlfd(tls *libc.TLS, dpy uintptr, screen int32, xlfd uintptr) (r uintptr) {
  12210. bp := tls.Alloc(32)
  12211. defer tls.Free(32)
  12212. var font, match, pat uintptr
  12213. var _ /* result at bp+0 */ TFcResult
  12214. _, _, _ = font, match, pat
  12215. pat = XXftXlfdParse(tls, xlfd, m_FcFalse, m_FcFalse)
  12216. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12217. libc.Xprintf(tls, __ccgo_ts+931, libc.VaList(bp+16, xlfd))
  12218. if pat != 0 {
  12219. libc.Xprintf(tls, __ccgo_ts+954, 0)
  12220. } else {
  12221. libfontconfig.XFcPatternPrint(tls, pat)
  12222. }
  12223. }
  12224. if !(pat != 0) {
  12225. return libc.UintptrFromInt32(0)
  12226. }
  12227. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  12228. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12229. if match != 0 {
  12230. libc.Xprintf(tls, __ccgo_ts+868, 0)
  12231. libfontconfig.XFcPatternPrint(tls, match)
  12232. } else {
  12233. libc.Xprintf(tls, __ccgo_ts+875, 0)
  12234. }
  12235. }
  12236. libfontconfig.XFcPatternDestroy(tls, pat)
  12237. if !(match != 0) {
  12238. return libc.UintptrFromInt32(0)
  12239. }
  12240. font = XXftFontOpenPattern(tls, dpy, match)
  12241. if !(font != 0) {
  12242. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12243. libc.Xprintf(tls, __ccgo_ts+885, 0)
  12244. }
  12245. libfontconfig.XFcPatternDestroy(tls, match)
  12246. }
  12247. return font
  12248. }
  12249. const m_FT_LOAD_DEFAULT1 = 0
  12250. const m_UINT_MAX1 = 4294967295
  12251. const m_XFT_EMBEDDED_BITMAP = "embeddedbitmap"
  12252. /*
  12253. * List of all open files (each face in a file is managed separately)
  12254. */
  12255. var __XftFtFiles uintptr
  12256. var _XftMaxFreeTypeFiles = int32(5)
  12257. func __XftGetFile(tls *libc.TLS, file uintptr, id int32) (r uintptr) {
  12258. bp := tls.Alloc(32)
  12259. defer tls.Free(32)
  12260. var f uintptr
  12261. var v2, v3, v4 TFT_Fixed
  12262. _, _, _, _ = f, v2, v3, v4
  12263. if !(XXftInitFtLibrary(tls) != 0) {
  12264. return libc.UintptrFromInt32(0)
  12265. }
  12266. f = __XftFtFiles
  12267. for {
  12268. if !(f != 0) {
  12269. break
  12270. }
  12271. if !(libc.Xstrcmp(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, file) != 0) && (*TXftFtFile)(unsafe.Pointer(f)).Fid == id {
  12272. (*TXftFtFile)(unsafe.Pointer(f)).Fref++
  12273. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12274. libc.Xprintf(tls, __ccgo_ts+968, libc.VaList(bp+8, file, id, (*TXftFtFile)(unsafe.Pointer(f)).Fref))
  12275. }
  12276. return f
  12277. }
  12278. goto _1
  12279. _1:
  12280. ;
  12281. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12282. }
  12283. f = libc.Xmalloc(tls, uint32(48)+libc.Xstrlen(tls, file)+uint32(1))
  12284. if !(f != 0) {
  12285. return libc.UintptrFromInt32(0)
  12286. }
  12287. XXftMemAlloc(tls, int32(_XFT_MEM_FILE), uint32(48)+libc.Xstrlen(tls, file)+uint32(1))
  12288. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12289. libc.Xprintf(tls, __ccgo_ts+1006, libc.VaList(bp+8, file, id))
  12290. }
  12291. (*TXftFtFile)(unsafe.Pointer(f)).Fnext = __XftFtFiles
  12292. __XftFtFiles = f
  12293. (*TXftFtFile)(unsafe.Pointer(f)).Fref = int32(1)
  12294. (*TXftFtFile)(unsafe.Pointer(f)).Ffile = f + libc.UintptrFromInt32(1)*48
  12295. libc.Xstrcpy(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, file)
  12296. (*TXftFtFile)(unsafe.Pointer(f)).Fid = id
  12297. (*TXftFtFile)(unsafe.Pointer(f)).Flock = 0
  12298. (*TXftFtFile)(unsafe.Pointer(f)).Fface = libc.UintptrFromInt32(0)
  12299. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  12300. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  12301. v4 = libc.Int32FromInt32(0)
  12302. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v4
  12303. v3 = v4
  12304. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v3
  12305. v2 = v3
  12306. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v2
  12307. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v2
  12308. return f
  12309. }
  12310. func __XftGetFaceFile(tls *libc.TLS, face TFT_Face) (r uintptr) {
  12311. var f uintptr
  12312. var v1, v2, v3 TFT_Fixed
  12313. _, _, _, _ = f, v1, v2, v3
  12314. f = libc.Xmalloc(tls, uint32(48))
  12315. if !(f != 0) {
  12316. return libc.UintptrFromInt32(0)
  12317. }
  12318. XXftMemAlloc(tls, int32(_XFT_MEM_FILE), uint32(48))
  12319. (*TXftFtFile)(unsafe.Pointer(f)).Fnext = libc.UintptrFromInt32(0)
  12320. (*TXftFtFile)(unsafe.Pointer(f)).Fref = int32(1)
  12321. (*TXftFtFile)(unsafe.Pointer(f)).Ffile = libc.UintptrFromInt32(0)
  12322. (*TXftFtFile)(unsafe.Pointer(f)).Fid = 0
  12323. (*TXftFtFile)(unsafe.Pointer(f)).Flock = 0
  12324. (*TXftFtFile)(unsafe.Pointer(f)).Fface = face
  12325. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  12326. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  12327. v3 = libc.Int32FromInt32(0)
  12328. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v3
  12329. v2 = v3
  12330. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v2
  12331. v1 = v2
  12332. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v1
  12333. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v1
  12334. return f
  12335. }
  12336. func __XftNumFiles(tls *libc.TLS) (r int32) {
  12337. var count int32
  12338. var f uintptr
  12339. _, _ = count, f
  12340. count = 0
  12341. f = __XftFtFiles
  12342. for {
  12343. if !(f != 0) {
  12344. break
  12345. }
  12346. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 && !((*TXftFtFile)(unsafe.Pointer(f)).Flock != 0) {
  12347. count++
  12348. }
  12349. goto _1
  12350. _1:
  12351. ;
  12352. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12353. }
  12354. return count
  12355. }
  12356. func __XftNthFile(tls *libc.TLS, n int32) (r uintptr) {
  12357. var count, v2 int32
  12358. var f uintptr
  12359. _, _, _ = count, f, v2
  12360. count = 0
  12361. f = __XftFtFiles
  12362. for {
  12363. if !(f != 0) {
  12364. break
  12365. }
  12366. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 && !((*TXftFtFile)(unsafe.Pointer(f)).Flock != 0) {
  12367. v2 = count
  12368. count++
  12369. if v2 == n {
  12370. break
  12371. }
  12372. }
  12373. goto _1
  12374. _1:
  12375. ;
  12376. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12377. }
  12378. return f
  12379. }
  12380. func __XftUncacheFiles(tls *libc.TLS) {
  12381. bp := tls.Alloc(32)
  12382. defer tls.Free(32)
  12383. var f uintptr
  12384. var n, v1, v2 int32
  12385. _, _, _, _ = f, n, v1, v2
  12386. for {
  12387. v1 = __XftNumFiles(tls)
  12388. n = v1
  12389. if !(v1 > _XftMaxFreeTypeFiles) {
  12390. break
  12391. }
  12392. if n != 0 {
  12393. v2 = libc.Xrand(tls) % n
  12394. } else {
  12395. v2 = 0
  12396. }
  12397. f = __XftNthFile(tls, v2)
  12398. if f != 0 {
  12399. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12400. libc.Xprintf(tls, __ccgo_ts+1034, libc.VaList(bp+8, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, (*TXftFtFile)(unsafe.Pointer(f)).Fid))
  12401. }
  12402. libfreetype.XFT_Done_Face(tls, (*TXftFtFile)(unsafe.Pointer(f)).Fface)
  12403. (*TXftFtFile)(unsafe.Pointer(f)).Fface = libc.UintptrFromInt32(0)
  12404. }
  12405. }
  12406. }
  12407. func __XftLockFile(tls *libc.TLS, f uintptr) (r TFT_Face) {
  12408. bp := tls.Alloc(32)
  12409. defer tls.Free(32)
  12410. var v1, v2, v3 TFT_Fixed
  12411. _, _, _ = v1, v2, v3
  12412. (*TXftFtFile)(unsafe.Pointer(f)).Flock++
  12413. if !((*TXftFtFile)(unsafe.Pointer(f)).Fface != 0) {
  12414. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12415. libc.Xprintf(tls, __ccgo_ts+1065, libc.VaList(bp+8, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, (*TXftFtFile)(unsafe.Pointer(f)).Fid))
  12416. }
  12417. if libfreetype.XFT_New_Face(tls, X_XftFTlibrary, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, (*TXftFtFile)(unsafe.Pointer(f)).Fid, f+44) != 0 {
  12418. (*TXftFtFile)(unsafe.Pointer(f)).Flock--
  12419. }
  12420. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  12421. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  12422. v3 = libc.Int32FromInt32(0)
  12423. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v3
  12424. v2 = v3
  12425. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v2
  12426. v1 = v2
  12427. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v1
  12428. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v1
  12429. __XftUncacheFiles(tls)
  12430. }
  12431. return (*TXftFtFile)(unsafe.Pointer(f)).Fface
  12432. }
  12433. func __XftLockError(tls *libc.TLS, reason uintptr) {
  12434. bp := tls.Alloc(16)
  12435. defer tls.Free(16)
  12436. libc.Xfprintf(tls, libc.Xstderr, __ccgo_ts+1085, libc.VaList(bp+8, reason))
  12437. }
  12438. func __XftUnlockFile(tls *libc.TLS, f uintptr) {
  12439. var v1 int32
  12440. var v2 uintptr
  12441. _, _ = v1, v2
  12442. v2 = f + 40
  12443. *(*int32)(unsafe.Pointer(v2))--
  12444. v1 = *(*int32)(unsafe.Pointer(v2))
  12445. if v1 < 0 {
  12446. __XftLockError(tls, __ccgo_ts+1108)
  12447. }
  12448. }
  12449. func X_XftSetFace(tls *libc.TLS, f uintptr, xsize TFT_F26Dot6, ysize TFT_F26Dot6, matrix uintptr) (r TFcBool) {
  12450. bp := tls.Alloc(48)
  12451. defer tls.Free(48)
  12452. var best, i, v2, v3, v4, v5, v6, v7 int32
  12453. var face TFT_Face
  12454. var v8, v9 bool
  12455. _, _, _, _, _, _, _, _, _, _, _ = best, face, i, v2, v3, v4, v5, v6, v7, v8, v9
  12456. face = (*TXftFtFile)(unsafe.Pointer(f)).Fface
  12457. if (*TXftFtFile)(unsafe.Pointer(f)).Fxsize != xsize || (*TXftFtFile)(unsafe.Pointer(f)).Fysize != ysize {
  12458. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  12459. libc.Xprintf(tls, __ccgo_ts+1130, libc.VaList(bp+8, int32(xsize>>libc.Int32FromInt32(6)), int32(ysize>>libc.Int32FromInt32(6)), xsize, ysize))
  12460. }
  12461. /*
  12462. * Bitmap only faces must match exactly, so find the closest
  12463. * one (height dominant search)
  12464. */
  12465. if !((*TFT_FaceRec_)(unsafe.Pointer(face)).Fface_flags&(libc.Int32FromInt32(1)<<libc.Int32FromInt32(0)) != 0) {
  12466. best = 0
  12467. i = int32(1)
  12468. for {
  12469. if !(i < (*TFT_FaceRec_)(unsafe.Pointer(face)).Fnum_fixed_sizes) {
  12470. break
  12471. }
  12472. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*16))).Fy_ppem < 0 {
  12473. v2 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*16))).Fy_ppem)
  12474. } else {
  12475. v2 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*16))).Fy_ppem
  12476. }
  12477. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*16))).Fy_ppem < 0 {
  12478. v3 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*16))).Fy_ppem)
  12479. } else {
  12480. v3 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*16))).Fy_ppem
  12481. }
  12482. if v9 = v2 < v3; !v9 {
  12483. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*16))).Fy_ppem < 0 {
  12484. v4 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*16))).Fy_ppem)
  12485. } else {
  12486. v4 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*16))).Fy_ppem
  12487. }
  12488. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*16))).Fy_ppem < 0 {
  12489. v5 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*16))).Fy_ppem)
  12490. } else {
  12491. v5 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*16))).Fy_ppem
  12492. }
  12493. if v8 = v4 == v5; v8 {
  12494. if xsize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*16))).Fx_ppem < 0 {
  12495. v6 = -(xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*16))).Fx_ppem)
  12496. } else {
  12497. v6 = xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*16))).Fx_ppem
  12498. }
  12499. if xsize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*16))).Fx_ppem < 0 {
  12500. v7 = -(xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*16))).Fx_ppem)
  12501. } else {
  12502. v7 = xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*16))).Fx_ppem
  12503. }
  12504. }
  12505. }
  12506. if v9 || v8 && v6 < v7 {
  12507. best = i
  12508. }
  12509. goto _1
  12510. _1:
  12511. ;
  12512. i++
  12513. }
  12514. /*
  12515. * Freetype 2.1.7 and earlier used width/height
  12516. * for matching sizes in the BDF and PCF loaders.
  12517. * This has been fixed for 2.1.8. Because BDF and PCF
  12518. * files have but a single strike per file, we can
  12519. * simply try both sizes.
  12520. */
  12521. if libfreetype.XFT_Set_Char_Size(tls, face, (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*16))).Fx_ppem, (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*16))).Fy_ppem, uint32(0), uint32(0)) != 0 && libfreetype.XFT_Set_Char_Size(tls, face, int32((*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*16))).Fwidth)<<int32(6), int32((*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*16))).Fheight)<<int32(6), uint32(0), uint32(0)) != 0 {
  12522. return m_False
  12523. }
  12524. } else {
  12525. if libfreetype.XFT_Set_Char_Size(tls, face, xsize, ysize, uint32(0), uint32(0)) != 0 {
  12526. return m_False
  12527. }
  12528. }
  12529. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = xsize
  12530. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = ysize
  12531. }
  12532. if !((*TFT_Matrix)(unsafe.Pointer(f+24)).Fxx == (*TFT_Matrix)(unsafe.Pointer(matrix)).Fxx && (*TFT_Matrix)(unsafe.Pointer(f+24)).Fyy == (*TFT_Matrix)(unsafe.Pointer(matrix)).Fyy && (*TFT_Matrix)(unsafe.Pointer(f+24)).Fxy == (*TFT_Matrix)(unsafe.Pointer(matrix)).Fxy && (*TFT_Matrix)(unsafe.Pointer(f+24)).Fyx == (*TFT_Matrix)(unsafe.Pointer(matrix)).Fyx) {
  12533. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  12534. 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)))
  12535. }
  12536. libfreetype.XFT_Set_Transform(tls, face, matrix, libc.UintptrFromInt32(0))
  12537. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix = *(*TFT_Matrix)(unsafe.Pointer(matrix))
  12538. }
  12539. return int32(m_True)
  12540. }
  12541. func __XftReleaseFile(tls *libc.TLS, f uintptr) {
  12542. var prev, v2 uintptr
  12543. var v1 int32
  12544. var v4 uint32
  12545. _, _, _, _ = prev, v1, v2, v4
  12546. v2 = f + 4
  12547. *(*int32)(unsafe.Pointer(v2))--
  12548. v1 = *(*int32)(unsafe.Pointer(v2))
  12549. if v1 != 0 {
  12550. return
  12551. }
  12552. if (*TXftFtFile)(unsafe.Pointer(f)).Flock != 0 {
  12553. __XftLockError(tls, __ccgo_ts+1196)
  12554. }
  12555. if (*TXftFtFile)(unsafe.Pointer(f)).Ffile != 0 {
  12556. prev = uintptr(unsafe.Pointer(&__XftFtFiles))
  12557. for {
  12558. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  12559. break
  12560. }
  12561. if *(*uintptr)(unsafe.Pointer(prev)) == f {
  12562. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12563. break
  12564. }
  12565. goto _3
  12566. _3:
  12567. ;
  12568. prev = *(*uintptr)(unsafe.Pointer(prev))
  12569. }
  12570. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 {
  12571. libfreetype.XFT_Done_Face(tls, (*TXftFtFile)(unsafe.Pointer(f)).Fface)
  12572. }
  12573. }
  12574. if (*TXftFtFile)(unsafe.Pointer(f)).Ffile != 0 {
  12575. v4 = libc.Xstrlen(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile) + uint32(1)
  12576. } else {
  12577. v4 = uint32(0)
  12578. }
  12579. XXftMemFree(tls, int32(_XFT_MEM_FILE), libc.Uint32FromInt64(48)+v4)
  12580. libc.Xfree(tls, f)
  12581. }
  12582. /*
  12583. * Find a prime larger than the minimum reasonable hash size
  12584. */
  12585. func __XftSqrt(tls *libc.TLS, a TFcChar32) (r TFcChar32) {
  12586. var h, l, m TFcChar32
  12587. _, _, _ = h, l, m
  12588. l = uint32(2)
  12589. h = a / uint32(2)
  12590. for h-l > uint32(1) {
  12591. m = (h + l) >> int32(1)
  12592. if m*m < a {
  12593. l = m
  12594. } else {
  12595. h = m
  12596. }
  12597. }
  12598. return h
  12599. }
  12600. func __XftIsPrime(tls *libc.TLS, i TFcChar32) (r TFcBool) {
  12601. var l, t TFcChar32
  12602. _, _ = l, t
  12603. if i < uint32(2) {
  12604. return m_FcFalse
  12605. }
  12606. if i&uint32(1) == uint32(0) {
  12607. if i == uint32(2) {
  12608. return int32(m_FcTrue)
  12609. }
  12610. return m_FcFalse
  12611. }
  12612. l = __XftSqrt(tls, i) + uint32(1)
  12613. t = uint32(3)
  12614. for {
  12615. if !(t <= l) {
  12616. break
  12617. }
  12618. if i%t == uint32(0) {
  12619. return m_FcFalse
  12620. }
  12621. goto _1
  12622. _1:
  12623. ;
  12624. t += uint32(2)
  12625. }
  12626. return int32(m_FcTrue)
  12627. }
  12628. func __XftHashSize(tls *libc.TLS, num_unicode TFcChar32) (r TFcChar32) {
  12629. var hash TFcChar32
  12630. _ = hash
  12631. /* at least 31.25 % extra space */
  12632. hash = num_unicode + num_unicode>>libc.Int32FromInt32(2) + num_unicode>>libc.Int32FromInt32(4)
  12633. if hash&uint32(1) == uint32(0) {
  12634. hash++
  12635. }
  12636. for !(__XftIsPrime(tls, hash) != 0) {
  12637. hash += uint32(2)
  12638. }
  12639. return hash
  12640. }
  12641. func XXftLockFace(tls *libc.TLS, public uintptr) (r TFT_Face) {
  12642. var face TFT_Face
  12643. var fi, font uintptr
  12644. _, _, _ = face, fi, font
  12645. font = public
  12646. fi = font + 32
  12647. face = __XftLockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12648. /*
  12649. * Make sure the face is usable at the requested size
  12650. */
  12651. if face != 0 && !(X_XftSetFace(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile, (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize, (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize, fi+36) != 0) {
  12652. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12653. face = libc.UintptrFromInt32(0)
  12654. }
  12655. return face
  12656. }
  12657. func XXftUnlockFace(tls *libc.TLS, public uintptr) {
  12658. var font uintptr
  12659. _ = font
  12660. font = public
  12661. __XftUnlockFile(tls, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ffile)
  12662. }
  12663. func _XftFontInfoFill(tls *libc.TLS, dpy uintptr, pattern uintptr, fi uintptr) (r TFcBool) {
  12664. bp := tls.Alloc(128)
  12665. defer tls.Free(128)
  12666. var hash TFcChar32
  12667. var hashp, info, v1, v12, p10, p6, p7, p8, p9 uintptr
  12668. var mid, nhash, v11 int32
  12669. var v2, v3 TFT_Fixed
  12670. var v4, v5 float64
  12671. var _ /* aspect at bp+16 */ float64
  12672. var _ /* autohint at bp+72 */ TFcBool
  12673. var _ /* bitmap at bp+88 */ TFcBool
  12674. var _ /* dsize at bp+8 */ float64
  12675. var _ /* face at bp+84 */ TFT_Face
  12676. var _ /* filename at bp+0 */ uintptr
  12677. var _ /* fm1 at bp+32 */ TFcMatrix
  12678. var _ /* font_matrix at bp+24 */ uintptr
  12679. var _ /* global_advance at bp+76 */ TFcBool
  12680. var _ /* hint_style at bp+80 */ int32
  12681. var _ /* hinting at bp+64 */ TFcBool
  12682. var _ /* id at bp+4 */ int32
  12683. var _ /* vertical_layout at bp+68 */ TFcBool
  12684. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = hash, hashp, info, mid, nhash, v1, v11, v12, v2, v3, v4, v5, p10, p6, p7, p8, p9
  12685. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  12686. if !(info != 0) {
  12687. return m_FcFalse
  12688. }
  12689. /*
  12690. * Initialize the whole XftFontInfo so that padding doesn't interfere with
  12691. * hash or XftFontInfoEqual().
  12692. */
  12693. libc.Xmemset(tls, fi, int32('\000'), uint32(76))
  12694. /*
  12695. * Find the associated file
  12696. */
  12697. switch libfontconfig.XFcPatternGetString(tls, pattern, __ccgo_ts+1225, 0, bp) {
  12698. case int32(_FcResultNoMatch):
  12699. *(*uintptr)(unsafe.Pointer(bp)) = libc.UintptrFromInt32(0)
  12700. case int32(_FcResultMatch):
  12701. default:
  12702. goto bail0
  12703. }
  12704. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1230, 0, bp+4) {
  12705. case int32(_FcResultNoMatch):
  12706. *(*int32)(unsafe.Pointer(bp + 4)) = 0
  12707. case int32(_FcResultMatch):
  12708. default:
  12709. goto bail0
  12710. }
  12711. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  12712. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = __XftGetFile(tls, *(*uintptr)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4)))
  12713. } else {
  12714. if libfontconfig.XFcPatternGetFTFace(tls, pattern, __ccgo_ts+1236, 0, bp+84) == int32(_FcResultMatch) && *(*TFT_Face)(unsafe.Pointer(bp + 84)) != 0 {
  12715. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = __XftGetFaceFile(tls, *(*TFT_Face)(unsafe.Pointer(bp + 84)))
  12716. }
  12717. }
  12718. if !((*TXftFontInfo)(unsafe.Pointer(fi)).Ffile != 0) {
  12719. goto bail0
  12720. }
  12721. /*
  12722. * Compute pixel size
  12723. */
  12724. if libfontconfig.XFcPatternGetDouble(tls, pattern, __ccgo_ts+1243, 0, bp+8) != int32(_FcResultMatch) {
  12725. goto bail1
  12726. }
  12727. if libfontconfig.XFcPatternGetDouble(tls, pattern, __ccgo_ts+1253, 0, bp+16) != int32(_FcResultMatch) {
  12728. *(*float64)(unsafe.Pointer(bp + 16)) = float64(1)
  12729. }
  12730. (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize = int32(float64(*(*float64)(unsafe.Pointer(bp + 8)) * libc.Float64FromFloat64(64)))
  12731. (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize = int32(float64(float64(*(*float64)(unsafe.Pointer(bp + 8))**(*float64)(unsafe.Pointer(bp + 16))) * libc.Float64FromFloat64(64)))
  12732. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12733. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  12734. v1 = *(*uintptr)(unsafe.Pointer(bp))
  12735. } else {
  12736. v1 = __ccgo_ts + 1260
  12737. }
  12738. libc.Xprintf(tls, __ccgo_ts+1267, libc.VaList(bp+104, v1, *(*int32)(unsafe.Pointer(bp + 4)), *(*float64)(unsafe.Pointer(bp + 8))))
  12739. }
  12740. /*
  12741. * Get antialias value
  12742. */
  12743. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+614, 0, fi+16) {
  12744. case int32(_FcResultNoMatch):
  12745. (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias = int32(m_True)
  12746. case int32(_FcResultMatch):
  12747. default:
  12748. goto bail1
  12749. }
  12750. /*
  12751. * Get rgba value
  12752. */
  12753. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+599, 0, fi+28) {
  12754. case int32(_FcResultNoMatch):
  12755. (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba = m_FC_RGBA_UNKNOWN
  12756. case int32(_FcResultMatch):
  12757. default:
  12758. goto bail1
  12759. }
  12760. /*
  12761. * Get lcd_filter value
  12762. */
  12763. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+604, 0, fi+32) {
  12764. case int32(_FcResultNoMatch):
  12765. (*TXftFontInfo)(unsafe.Pointer(fi)).Flcd_filter = int32(m_FC_LCD_DEFAULT)
  12766. case int32(_FcResultMatch):
  12767. default:
  12768. goto bail1
  12769. }
  12770. /*
  12771. * Get matrix and transform values
  12772. */
  12773. switch libfontconfig.XFcPatternGetMatrix(tls, pattern, __ccgo_ts+1304, 0, bp+24) {
  12774. case int32(_FcResultNoMatch):
  12775. v2 = libc.Int32FromInt32(0x10000)
  12776. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy = v2
  12777. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx = v2
  12778. v3 = libc.Int32FromInt32(0)
  12779. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx = v3
  12780. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy = v3
  12781. case int32(_FcResultMatch):
  12782. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx = int32(float64(libc.Float64FromInt32(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).Fxx))
  12783. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy = int32(float64(libc.Float64FromInt32(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).Fyy))
  12784. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy = int32(float64(libc.Float64FromInt32(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).Fxy))
  12785. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx = int32(float64(libc.Float64FromInt32(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).Fyx))
  12786. default:
  12787. goto bail1
  12788. }
  12789. mid = int32(1)
  12790. for libfontconfig.XFcPatternGetMatrix(tls, pattern, __ccgo_ts+1304, mid, bp+24) == int32(_FcResultMatch) {
  12791. v4 = libc.Float64FromInt32(1)
  12792. (*TFcMatrix)(unsafe.Pointer(bp + 32)).Fyy = v4
  12793. (*TFcMatrix)(unsafe.Pointer(bp + 32)).Fxx = v4
  12794. v5 = libc.Float64FromInt32(0)
  12795. (*TFcMatrix)(unsafe.Pointer(bp + 32)).Fyx = v5
  12796. (*TFcMatrix)(unsafe.Pointer(bp + 32)).Fxy = v5
  12797. (*(*TFcMatrix)(unsafe.Pointer(bp + 32))).Fxx = float64((*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx) / libc.Float64FromInt32(0x10000)
  12798. (*(*TFcMatrix)(unsafe.Pointer(bp + 32))).Fyy = float64((*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy) / libc.Float64FromInt32(0x10000)
  12799. (*(*TFcMatrix)(unsafe.Pointer(bp + 32))).Fxy = float64((*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy) / libc.Float64FromInt32(0x10000)
  12800. (*(*TFcMatrix)(unsafe.Pointer(bp + 32))).Fyx = float64((*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx) / libc.Float64FromInt32(0x10000)
  12801. libfontconfig.XFcMatrixMultiply(tls, bp+32, *(*uintptr)(unsafe.Pointer(bp + 24)), bp+32)
  12802. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx = int32(float64(libc.Float64FromInt32(0x10000) * (*(*TFcMatrix)(unsafe.Pointer(bp + 32))).Fxx))
  12803. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy = int32(float64(libc.Float64FromInt32(0x10000) * (*(*TFcMatrix)(unsafe.Pointer(bp + 32))).Fyy))
  12804. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy = int32(float64(libc.Float64FromInt32(0x10000) * (*(*TFcMatrix)(unsafe.Pointer(bp + 32))).Fxy))
  12805. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx = int32(float64(libc.Float64FromInt32(0x10000) * (*(*TFcMatrix)(unsafe.Pointer(bp + 32))).Fyx))
  12806. mid++
  12807. }
  12808. (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform = libc.BoolInt32((*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx != int32(0x10000) || (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy != 0 || (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx != 0 || (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy != int32(0x10000))
  12809. /*
  12810. * Get render value, set to false if no Render extension present
  12811. */
  12812. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  12813. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+592, 0, fi+60) {
  12814. case int32(_FcResultTypeMismatch):
  12815. /*
  12816. * Fontconfig no longer supports xft's custom values in
  12817. * text patterns, so any name specifying render:true or
  12818. * render:false will have an invalid type in the resulting
  12819. * pattern. Just ignore that case so that the app doesn't
  12820. * just fail
  12821. */
  12822. /* fall through ... */
  12823. fallthrough
  12824. case int32(_FcResultNoMatch):
  12825. (*TXftFontInfo)(unsafe.Pointer(fi)).Frender = (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender
  12826. case int32(_FcResultMatch):
  12827. default:
  12828. goto bail1
  12829. }
  12830. } else {
  12831. (*TXftFontInfo)(unsafe.Pointer(fi)).Frender = m_FcFalse
  12832. }
  12833. /*
  12834. * Compute glyph load flags
  12835. */
  12836. (*TXftFontInfo)(unsafe.Pointer(fi)).Fload_flags = int32(libc.Int32FromInt32(m_FT_LOAD_DEFAULT1) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(20))
  12837. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1311, 0, bp+88) {
  12838. case int32(_FcResultNoMatch):
  12839. *(*TFcBool)(unsafe.Pointer(bp + 88)) = m_FcFalse
  12840. case int32(_FcResultMatch):
  12841. default:
  12842. goto bail1
  12843. }
  12844. /* disable bitmaps when anti-aliasing or transforming glyphs */
  12845. if !(*(*TFcBool)(unsafe.Pointer(bp + 88)) != 0) && (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias != 0 || (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  12846. p6 = fi + 56
  12847. *(*TFT_Int)(unsafe.Pointer(p6)) = TFT_Int(*(*TFT_Int)(unsafe.Pointer(p6)) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(3))
  12848. }
  12849. /* disable hinting if requested */
  12850. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+652, 0, bp+64) {
  12851. case int32(_FcResultNoMatch):
  12852. *(*TFcBool)(unsafe.Pointer(bp + 64)) = int32(m_FcTrue)
  12853. case int32(_FcResultMatch):
  12854. default:
  12855. goto bail1
  12856. }
  12857. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+624, 0, fi+20) {
  12858. case int32(_FcResultNoMatch):
  12859. (*TXftFontInfo)(unsafe.Pointer(fi)).Fembolden = m_FcFalse
  12860. case int32(_FcResultMatch):
  12861. default:
  12862. goto bail1
  12863. }
  12864. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+642, 0, bp+80) {
  12865. case int32(_FcResultNoMatch):
  12866. *(*int32)(unsafe.Pointer(bp + 80)) = int32(m_FC_HINT_FULL)
  12867. case int32(_FcResultMatch):
  12868. default:
  12869. goto bail1
  12870. }
  12871. if !(*(*TFcBool)(unsafe.Pointer(bp + 64)) != 0) || *(*int32)(unsafe.Pointer(bp + 80)) == m_FC_HINT_NONE {
  12872. p7 = fi + 56
  12873. *(*TFT_Int)(unsafe.Pointer(p7)) = TFT_Int(*(*TFT_Int)(unsafe.Pointer(p7)) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(1))
  12874. }
  12875. /* Figure out the load target, which modifies the hinting
  12876. * behavior of FreeType based on the intended use of the glyphs.
  12877. */
  12878. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias != 0 {
  12879. if m_FC_HINT_NONE < *(*int32)(unsafe.Pointer(bp + 80)) && *(*int32)(unsafe.Pointer(bp + 80)) < int32(m_FC_HINT_FULL) {
  12880. *(*TFT_Int)(unsafe.Pointer(fi + 56)) |= int32(_FT_RENDER_MODE_LIGHT) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12881. } else {
  12882. /* autohinter will snap stems to integer widths, when
  12883. * the LCD targets are used.
  12884. */
  12885. switch (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba {
  12886. case int32(m_FC_RGBA_RGB):
  12887. fallthrough
  12888. case int32(m_FC_RGBA_BGR):
  12889. *(*TFT_Int)(unsafe.Pointer(fi + 56)) |= int32(_FT_RENDER_MODE_LCD) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12890. case int32(m_FC_RGBA_VRGB):
  12891. fallthrough
  12892. case int32(m_FC_RGBA_VBGR):
  12893. *(*TFT_Int)(unsafe.Pointer(fi + 56)) |= int32(_FT_RENDER_MODE_LCD_V) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12894. break
  12895. }
  12896. }
  12897. } else {
  12898. *(*TFT_Int)(unsafe.Pointer(fi + 56)) |= int32(_FT_RENDER_MODE_MONO) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12899. }
  12900. /* set vertical layout if requested */
  12901. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1326, 0, bp+68) {
  12902. case int32(_FcResultNoMatch):
  12903. *(*TFcBool)(unsafe.Pointer(bp + 68)) = m_FcFalse
  12904. case int32(_FcResultMatch):
  12905. default:
  12906. goto bail1
  12907. }
  12908. if *(*TFcBool)(unsafe.Pointer(bp + 68)) != 0 {
  12909. p8 = fi + 56
  12910. *(*TFT_Int)(unsafe.Pointer(p8)) = TFT_Int(*(*TFT_Int)(unsafe.Pointer(p8)) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(4))
  12911. }
  12912. /* force autohinting if requested */
  12913. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+633, 0, bp+72) {
  12914. case int32(_FcResultNoMatch):
  12915. *(*TFcBool)(unsafe.Pointer(bp + 72)) = m_FcFalse
  12916. case int32(_FcResultMatch):
  12917. default:
  12918. goto bail1
  12919. }
  12920. if *(*TFcBool)(unsafe.Pointer(bp + 72)) != 0 {
  12921. p9 = fi + 56
  12922. *(*TFT_Int)(unsafe.Pointer(p9)) = TFT_Int(*(*TFT_Int)(unsafe.Pointer(p9)) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(5))
  12923. }
  12924. /* disable global advance width (for broken DynaLab TT CJK fonts) */
  12925. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1341, 0, bp+76) {
  12926. case int32(_FcResultNoMatch):
  12927. *(*TFcBool)(unsafe.Pointer(bp + 76)) = int32(m_FcTrue)
  12928. case int32(_FcResultMatch):
  12929. default:
  12930. goto bail1
  12931. }
  12932. if !(*(*TFcBool)(unsafe.Pointer(bp + 76)) != 0) {
  12933. p10 = fi + 56
  12934. *(*TFT_Int)(unsafe.Pointer(p10)) = TFT_Int(*(*TFT_Int)(unsafe.Pointer(p10)) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(9))
  12935. }
  12936. /*
  12937. * Get requested spacing value
  12938. */
  12939. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1355, 0, fi+64) {
  12940. case int32(_FcResultNoMatch):
  12941. (*TXftFontInfo)(unsafe.Pointer(fi)).Fspacing = m_FC_PROPORTIONAL
  12942. case int32(_FcResultMatch):
  12943. default:
  12944. goto bail1
  12945. }
  12946. /*
  12947. * Check for minspace
  12948. */
  12949. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+660, 0, fi+68) {
  12950. case int32(_FcResultNoMatch):
  12951. (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace = m_FcFalse
  12952. case int32(_FcResultMatch):
  12953. default:
  12954. goto bail1
  12955. }
  12956. /*
  12957. * Check for fixed pixel spacing
  12958. */
  12959. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1363, 0, fi+72) {
  12960. case int32(_FcResultNoMatch):
  12961. (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width = 0
  12962. case int32(_FcResultMatch):
  12963. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width != 0 {
  12964. (*TXftFontInfo)(unsafe.Pointer(fi)).Fspacing = int32(m_FC_MONO)
  12965. }
  12966. default:
  12967. goto bail1
  12968. }
  12969. /*
  12970. * Step over hash value in the structure
  12971. */
  12972. hash = uint32(0)
  12973. hashp = fi + uintptr(1)*4
  12974. nhash = libc.Int32FromUint32(libc.Uint32FromInt64(76)/libc.Uint32FromInt64(4) - libc.Uint32FromInt32(1))
  12975. for {
  12976. v11 = nhash
  12977. nhash--
  12978. if !(v11 != 0) {
  12979. break
  12980. }
  12981. v12 = hashp
  12982. hashp += 4
  12983. hash += *(*TFcChar32)(unsafe.Pointer(v12))
  12984. }
  12985. (*TXftFontInfo)(unsafe.Pointer(fi)).Fhash = hash
  12986. /*
  12987. * All done
  12988. */
  12989. return int32(m_FcTrue)
  12990. goto bail1
  12991. bail1:
  12992. ;
  12993. __XftReleaseFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12994. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = libc.UintptrFromInt32(0)
  12995. goto bail0
  12996. bail0:
  12997. ;
  12998. return m_FcFalse
  12999. return r
  13000. }
  13001. func _XftFontInfoEmpty(tls *libc.TLS, dpy uintptr, fi uintptr) {
  13002. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile != 0 {
  13003. __XftReleaseFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  13004. }
  13005. }
  13006. func XXftFontInfoCreate(tls *libc.TLS, dpy uintptr, pattern uintptr) (r uintptr) {
  13007. var fi uintptr
  13008. _ = fi
  13009. fi = libc.Xmalloc(tls, uint32(76))
  13010. if !(fi != 0) {
  13011. return libc.UintptrFromInt32(0)
  13012. }
  13013. if !(_XftFontInfoFill(tls, dpy, pattern, fi) != 0) {
  13014. libc.Xfree(tls, fi)
  13015. fi = libc.UintptrFromInt32(0)
  13016. }
  13017. XXftMemAlloc(tls, int32(_XFT_MEM_FONT), uint32(76))
  13018. return fi
  13019. }
  13020. func XXftFontInfoDestroy(tls *libc.TLS, dpy uintptr, fi uintptr) {
  13021. _XftFontInfoEmpty(tls, dpy, fi)
  13022. XXftMemFree(tls, int32(_XFT_MEM_FONT), uint32(76))
  13023. libc.Xfree(tls, fi)
  13024. }
  13025. func XXftFontInfoHash(tls *libc.TLS, fi uintptr) (r TFcChar32) {
  13026. return (*TXftFontInfo)(unsafe.Pointer(fi)).Fhash
  13027. }
  13028. func XXftFontInfoEqual(tls *libc.TLS, a uintptr, b uintptr) (r TFcBool) {
  13029. return libc.BoolInt32(libc.Xmemcmp(tls, a, b, uint32(76)) == 0)
  13030. }
  13031. func XXftFontOpenInfo(tls *libc.TLS, dpy uintptr, pattern uintptr, fi uintptr) (r uintptr) {
  13032. bp := tls.Alloc(64)
  13033. defer tls.Free(64)
  13034. var alloc_size Tsize_t
  13035. var antialias, color TFcBool
  13036. var ascent, descent, height, i, v2, v4 int32
  13037. var bucket, font, format, info, v3 uintptr
  13038. var face TFT_Face
  13039. var hash_value, num_unicode, rehash_value TFcChar32
  13040. var num_glyphs TFT_UInt
  13041. var v6 uint32
  13042. var _ /* charset at bp+0 */ uintptr
  13043. var _ /* max_glyph_memory at bp+4 */ int32
  13044. var _ /* vector at bp+16 */ TFT_Vector
  13045. var _ /* vector at bp+8 */ TFT_Vector
  13046. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  13047. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  13048. if !(info != 0) {
  13049. return libc.UintptrFromInt32(0)
  13050. }
  13051. /*
  13052. * Find a matching previously opened font
  13053. */
  13054. bucket = info + 312 + uintptr((*TXftFontInfo)(unsafe.Pointer(fi)).Fhash%uint32(m_XFT_NUM_FONT_HASH))*4
  13055. font = *(*uintptr)(unsafe.Pointer(bucket))
  13056. for {
  13057. if !(font != 0) {
  13058. break
  13059. }
  13060. if XXftFontInfoEqual(tls, font+32, fi) != 0 {
  13061. v3 = font + 108
  13062. v2 = *(*int32)(unsafe.Pointer(v3))
  13063. *(*int32)(unsafe.Pointer(v3))++
  13064. if !(v2 != 0) {
  13065. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts--
  13066. }
  13067. libfontconfig.XFcPatternDestroy(tls, pattern)
  13068. return font
  13069. }
  13070. goto _1
  13071. _1:
  13072. ;
  13073. font = (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next
  13074. }
  13075. /*
  13076. * No existing font, create another.
  13077. */
  13078. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  13079. libc.Xprintf(tls, __ccgo_ts+1373, libc.VaList(bp+32, (*TXftFtFile)(unsafe.Pointer((*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)).Ffile, (*TXftFtFile)(unsafe.Pointer((*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)).Fid, (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize>>int32(6), (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize>>int32(6)))
  13080. }
  13081. if libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+201, 0, bp+4) != int32(_FcResultMatch) {
  13082. *(*int32)(unsafe.Pointer(bp + 4)) = libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024)
  13083. }
  13084. face = __XftLockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  13085. if !(face != 0) {
  13086. goto bail0
  13087. }
  13088. if !(X_XftSetFace(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile, (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize, (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize, fi+36) != 0) {
  13089. goto bail1
  13090. }
  13091. /*
  13092. * Get the set of Unicode codepoints covered by the font.
  13093. * If the incoming pattern doesn't provide this data, go
  13094. * off and compute it. Yes, this is expensive, but it's
  13095. * required to map Unicode to glyph indices.
  13096. */
  13097. if libfontconfig.XFcPatternGetCharSet(tls, pattern, __ccgo_ts+1400, 0, bp) == int32(_FcResultMatch) {
  13098. *(*uintptr)(unsafe.Pointer(bp)) = libfontconfig.XFcCharSetCopy(tls, *(*uintptr)(unsafe.Pointer(bp)))
  13099. } else {
  13100. *(*uintptr)(unsafe.Pointer(bp)) = libfontconfig.XFcFreeTypeCharSet(tls, face, libfontconfig.XFcConfigGetBlanks(tls, libc.UintptrFromInt32(0)))
  13101. }
  13102. antialias = (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias
  13103. if !((*TFT_FaceRec_)(unsafe.Pointer(face)).Fface_flags&(libc.Int32FromInt32(1)<<libc.Int32FromInt32(0)) != 0) {
  13104. antialias = m_FcFalse
  13105. }
  13106. if !!((*TFT_FaceRec_)(unsafe.Pointer(face)).Fface_flags&(libc.Int32FromInt32(1)<<libc.Int32FromInt32(14)) != 0) {
  13107. v4 = int32(m_FcTrue)
  13108. } else {
  13109. v4 = m_FcFalse
  13110. }
  13111. color = v4
  13112. /*
  13113. * Find the appropriate picture format
  13114. */
  13115. if (*TXftFontInfo)(unsafe.Pointer(fi)).Frender != 0 {
  13116. if color != 0 {
  13117. format = libxrender.XXRenderFindStandardFormat(tls, dpy, m_PictStandardARGB32)
  13118. } else {
  13119. if antialias != 0 {
  13120. switch (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba {
  13121. case int32(m_FC_RGBA_RGB):
  13122. fallthrough
  13123. case int32(m_FC_RGBA_BGR):
  13124. fallthrough
  13125. case int32(m_FC_RGBA_VRGB):
  13126. fallthrough
  13127. case int32(m_FC_RGBA_VBGR):
  13128. format = libxrender.XXRenderFindStandardFormat(tls, dpy, m_PictStandardARGB32)
  13129. default:
  13130. format = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA8))
  13131. break
  13132. }
  13133. } else {
  13134. format = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA1))
  13135. }
  13136. }
  13137. if !(format != 0) {
  13138. goto bail2
  13139. }
  13140. } else {
  13141. format = libc.UintptrFromInt32(0)
  13142. }
  13143. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  13144. num_unicode = libfontconfig.XFcCharSetCount(tls, *(*uintptr)(unsafe.Pointer(bp)))
  13145. hash_value = __XftHashSize(tls, num_unicode)
  13146. rehash_value = hash_value - uint32(2)
  13147. } else {
  13148. hash_value = uint32(0)
  13149. rehash_value = uint32(0)
  13150. }
  13151. /*
  13152. * Sometimes the glyphs are numbered 1..n, other times 0..n-1,
  13153. * accept either numbering scheme by making room in the table
  13154. */
  13155. num_glyphs = libc.Uint32FromInt32((*TFT_FaceRec_)(unsafe.Pointer(face)).Fnum_glyphs) + uint32(1)
  13156. alloc_size = libc.Uint32FromInt64(168) + num_glyphs*libc.Uint32FromInt64(4) + hash_value*libc.Uint32FromInt64(8)
  13157. font = libc.Xmalloc(tls, alloc_size)
  13158. if !(font != 0) {
  13159. goto bail2
  13160. }
  13161. XXftMemAlloc(tls, int32(_XFT_MEM_FONT), alloc_size)
  13162. /*
  13163. * Public fields
  13164. */
  13165. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  13166. (*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fx = 0
  13167. (*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fy = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fdescender
  13168. libfreetype.XFT_Vector_Transform(tls, bp+8, fi+36)
  13169. descent = int32(-((*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fy >> libc.Int32FromInt32(6)))
  13170. (*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fx = 0
  13171. (*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fy = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fascender
  13172. libfreetype.XFT_Vector_Transform(tls, bp+8, fi+36)
  13173. ascent = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fy >> libc.Int32FromInt32(6))
  13174. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace != 0 {
  13175. height = ascent + descent
  13176. } else {
  13177. (*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fx = 0
  13178. (*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fy = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fheight
  13179. libfreetype.XFT_Vector_Transform(tls, bp+8, fi+36)
  13180. height = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fy >> libc.Int32FromInt32(6))
  13181. }
  13182. } else {
  13183. descent = -int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fdescender >> libc.Int32FromInt32(6))
  13184. ascent = int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fascender >> libc.Int32FromInt32(6))
  13185. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace != 0 {
  13186. height = ascent + descent
  13187. } else {
  13188. height = int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fheight >> libc.Int32FromInt32(6))
  13189. }
  13190. }
  13191. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fascent = ascent
  13192. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fdescent = descent
  13193. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fheight = height
  13194. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width != 0 {
  13195. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width = (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width
  13196. } else {
  13197. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  13198. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  13199. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy = 0
  13200. libfreetype.XFT_Vector_Transform(tls, bp+16, fi+36)
  13201. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx >> libc.Int32FromInt32(6))
  13202. } else {
  13203. (*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))
  13204. }
  13205. }
  13206. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fcharset = *(*uintptr)(unsafe.Pointer(bp))
  13207. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fpattern = pattern
  13208. /*
  13209. * Management fields
  13210. */
  13211. (*TXftFontInt)(unsafe.Pointer(font)).Fref = int32(1)
  13212. (*TXftFontInt)(unsafe.Pointer(font)).Fnext = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  13213. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts = font
  13214. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next = *(*uintptr)(unsafe.Pointer(bucket))
  13215. *(*uintptr)(unsafe.Pointer(bucket)) = font
  13216. /*
  13217. * Copy the info over
  13218. */
  13219. (*TXftFontInt)(unsafe.Pointer(font)).Finfo = *(*TXftFontInfo)(unsafe.Pointer(fi))
  13220. /*
  13221. * reset the antialias field. It can't
  13222. * be set correctly until the font is opened,
  13223. * which doesn't happen in XftFontInfoFill
  13224. */
  13225. (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias = antialias
  13226. /*
  13227. * Set color value, which is only known once the
  13228. * font was loaded
  13229. */
  13230. (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fcolor = color
  13231. /*
  13232. * bump XftFile reference count
  13233. */
  13234. (*TXftFtFile)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ffile)).Fref++
  13235. /*
  13236. * Per glyph information
  13237. */
  13238. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs = font + libc.UintptrFromInt32(1)*168
  13239. libc.Xmemset(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs, int32('\000'), num_glyphs*uint32(4))
  13240. (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs = num_glyphs
  13241. /*
  13242. * Memory-usage tracking
  13243. */
  13244. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = uint32(0xffffffff)
  13245. (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse = uint32(0)
  13246. /*
  13247. * Unicode hash table information
  13248. */
  13249. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_table = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs)*4
  13250. i = 0
  13251. for {
  13252. if !(libc.Uint32FromInt32(i) < hash_value) {
  13253. break
  13254. }
  13255. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(i)*8))).Fucs4 = libc.Uint32FromInt32(^libc.Int32FromInt32(0))
  13256. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(i)*8))).Fglyph = uint32(0)
  13257. goto _5
  13258. _5:
  13259. ;
  13260. i++
  13261. }
  13262. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_value = libc.Int32FromUint32(hash_value)
  13263. (*TXftFontInt)(unsafe.Pointer(font)).Frehash_value = libc.Int32FromUint32(rehash_value)
  13264. /*
  13265. * X specific fields
  13266. */
  13267. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = uint32(0)
  13268. (*TXftFontInt)(unsafe.Pointer(font)).Fformat = format
  13269. /*
  13270. * Glyph memory management fields
  13271. */
  13272. (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory = uint32(0)
  13273. (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory = libc.Uint32FromInt32(*(*int32)(unsafe.Pointer(bp + 4)))
  13274. (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage
  13275. (*TXftFontInt)(unsafe.Pointer(font)).Fuse_free_glyphs = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs
  13276. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  13277. v6 = uint32(32)
  13278. } else {
  13279. v6 = uint32(24)
  13280. }
  13281. (*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph = v6
  13282. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  13283. return font
  13284. goto bail2
  13285. bail2:
  13286. ;
  13287. libfontconfig.XFcCharSetDestroy(tls, *(*uintptr)(unsafe.Pointer(bp)))
  13288. goto bail1
  13289. bail1:
  13290. ;
  13291. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  13292. goto bail0
  13293. bail0:
  13294. ;
  13295. return libc.UintptrFromInt32(0)
  13296. return r
  13297. }
  13298. func XXftFontOpenPattern(tls *libc.TLS, dpy uintptr, pattern uintptr) (r uintptr) {
  13299. bp := tls.Alloc(80)
  13300. defer tls.Free(80)
  13301. var font uintptr
  13302. var _ /* info at bp+0 */ TXftFontInfo
  13303. _ = font
  13304. if !(_XftFontInfoFill(tls, dpy, pattern, bp) != 0) {
  13305. return libc.UintptrFromInt32(0)
  13306. }
  13307. font = XXftFontOpenInfo(tls, dpy, pattern, bp)
  13308. _XftFontInfoEmpty(tls, dpy, bp)
  13309. return font
  13310. }
  13311. func XXftFontCopy(tls *libc.TLS, dpy uintptr, public uintptr) (r uintptr) {
  13312. var font uintptr
  13313. _ = font
  13314. font = public
  13315. (*TXftFontInt)(unsafe.Pointer(font)).Fref++
  13316. return public
  13317. }
  13318. func _XftFontDestroy(tls *libc.TLS, dpy uintptr, public uintptr) {
  13319. var font, info, xftg uintptr
  13320. var i TFT_UInt
  13321. _, _, _, _ = font, i, info, xftg
  13322. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  13323. font = public
  13324. /* note reduction in memory use */
  13325. if info != 0 {
  13326. *(*uint32)(unsafe.Pointer(info + 32)) -= (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  13327. }
  13328. /* Clean up the info */
  13329. _XftFontInfoEmpty(tls, dpy, font+32)
  13330. /* Free the glyphset */
  13331. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  13332. libxrender.XXRenderFreeGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset)
  13333. }
  13334. /* Free the glyphs */
  13335. i = uint32(0)
  13336. for {
  13337. if !(i < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  13338. break
  13339. }
  13340. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(i)*4))
  13341. if xftg != 0 {
  13342. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  13343. libc.Xfree(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap)
  13344. }
  13345. libc.Xfree(tls, xftg)
  13346. }
  13347. goto _1
  13348. _1:
  13349. ;
  13350. i++
  13351. }
  13352. /* Free the pattern and the charset */
  13353. libfontconfig.XFcPatternDestroy(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fpattern)
  13354. libfontconfig.XFcCharSetDestroy(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fcharset)
  13355. /* Finally, free the font structure */
  13356. XXftMemFree(tls, int32(_XFT_MEM_FONT), libc.Uint32FromInt64(168)+(*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs*libc.Uint32FromInt64(4)+libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value)*libc.Uint32FromInt64(8))
  13357. libc.Xfree(tls, font)
  13358. }
  13359. func _XftFontFindNthUnref(tls *libc.TLS, info uintptr, n int32) (r uintptr) {
  13360. var font, public uintptr
  13361. var v2 int32
  13362. var v3 bool
  13363. _, _, _, _ = font, public, v2, v3
  13364. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  13365. for {
  13366. if !(public != 0) {
  13367. break
  13368. }
  13369. font = public
  13370. if v3 = !((*TXftFontInt)(unsafe.Pointer(font)).Fref != 0); v3 {
  13371. v2 = n
  13372. n--
  13373. }
  13374. if v3 && !(v2 != 0) {
  13375. break
  13376. }
  13377. goto _1
  13378. _1:
  13379. ;
  13380. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  13381. }
  13382. return public
  13383. }
  13384. func XXftFontManageMemory(tls *libc.TLS, dpy uintptr) {
  13385. bp := tls.Alloc(48)
  13386. defer tls.Free(48)
  13387. var font, info, prev, public uintptr
  13388. _, _, _, _ = font, info, prev, public
  13389. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  13390. if !(info != 0) {
  13391. return
  13392. }
  13393. for (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts {
  13394. public = _XftFontFindNthUnref(tls, info, libc.Xrand(tls)%(*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts)
  13395. font = public
  13396. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  13397. 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, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fxsize>>int32(6), (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fysize>>int32(6)))
  13398. }
  13399. /* Unhook from display list */
  13400. prev = info + 24
  13401. for {
  13402. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  13403. break
  13404. }
  13405. if *(*uintptr)(unsafe.Pointer(prev)) == public {
  13406. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  13407. break
  13408. }
  13409. goto _1
  13410. _1:
  13411. ;
  13412. prev = *(*uintptr)(unsafe.Pointer(prev)) + 24
  13413. }
  13414. /* Unhook from hash list */
  13415. prev = info + 312 + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fhash%uint32(m_XFT_NUM_FONT_HASH))*4
  13416. for {
  13417. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  13418. break
  13419. }
  13420. if *(*uintptr)(unsafe.Pointer(prev)) == public {
  13421. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next
  13422. break
  13423. }
  13424. goto _2
  13425. _2:
  13426. ;
  13427. prev = *(*uintptr)(unsafe.Pointer(prev)) + 28
  13428. }
  13429. /* Destroy the font */
  13430. _XftFontDestroy(tls, dpy, public)
  13431. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts--
  13432. }
  13433. }
  13434. func XXftFontClose(tls *libc.TLS, dpy uintptr, public uintptr) {
  13435. var font, info, v2 uintptr
  13436. var v1 int32
  13437. _, _, _, _ = font, info, v1, v2
  13438. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  13439. font = public
  13440. v2 = font + 108
  13441. *(*int32)(unsafe.Pointer(v2))--
  13442. v1 = *(*int32)(unsafe.Pointer(v2))
  13443. if v1 != 0 {
  13444. return
  13445. }
  13446. if info != 0 {
  13447. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts++
  13448. XXftFontManageMemory(tls, dpy)
  13449. } else {
  13450. _XftFontDestroy(tls, dpy, public)
  13451. }
  13452. }
  13453. func XXftInitFtLibrary(tls *libc.TLS) (r TFcBool) {
  13454. if X_XftFTlibrary != 0 {
  13455. return int32(m_FcTrue)
  13456. }
  13457. if libfreetype.XFT_Init_FreeType(tls, uintptr(unsafe.Pointer(&X_XftFTlibrary))) != 0 {
  13458. return m_FcFalse
  13459. }
  13460. return int32(m_FcTrue)
  13461. }
  13462. const m_FT_LCD_FILTER_FIVE_TAPS = 5
  13463. const m_FT_LOAD_DEFAULT2 = 0x0
  13464. const m_FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY = "FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY"
  13465. const m_FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY = "FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY"
  13466. const m_ft_glyph_bbox_gridfit = "FT_GLYPH_BBOX_GRIDFIT"
  13467. const m_ft_glyph_bbox_pixels = "FT_GLYPH_BBOX_PIXELS"
  13468. const m_ft_glyph_bbox_subpixels = "FT_GLYPH_BBOX_SUBPIXELS"
  13469. const m_ft_glyph_bbox_truncate = "FT_GLYPH_BBOX_TRUNCATE"
  13470. const m_ft_glyph_bbox_unscaled = "FT_GLYPH_BBOX_UNSCALED"
  13471. type TFT_Orientation = int32
  13472. type _FT_Orientation_ = int32
  13473. const _FT_ORIENTATION_TRUETYPE = 0
  13474. const _FT_ORIENTATION_POSTSCRIPT = 1
  13475. const _FT_ORIENTATION_FILL_RIGHT = 0
  13476. const _FT_ORIENTATION_FILL_LEFT = 1
  13477. const _FT_ORIENTATION_NONE = 2
  13478. type TFT_LcdFilter = int32
  13479. type _FT_LcdFilter_ = int32
  13480. const _FT_LCD_FILTER_NONE = 0
  13481. const _FT_LCD_FILTER_DEFAULT = 1
  13482. const _FT_LCD_FILTER_LIGHT = 2
  13483. const _FT_LCD_FILTER_LEGACY1 = 3
  13484. const _FT_LCD_FILTER_LEGACY = 16
  13485. const _FT_LCD_FILTER_MAX = 17
  13486. type TFT_LcdFiveTapFilter = [5]TFT_Byte
  13487. type TFT_Glyph = uintptr
  13488. type TFT_GlyphRec_ = struct {
  13489. Flibrary TFT_Library
  13490. Fclazz uintptr
  13491. Fformat TFT_Glyph_Format
  13492. Fadvance TFT_Vector
  13493. }
  13494. type TFT_GlyphRec = struct {
  13495. Flibrary TFT_Library
  13496. Fclazz uintptr
  13497. Fformat TFT_Glyph_Format
  13498. Fadvance TFT_Vector
  13499. }
  13500. type TFT_BitmapGlyph = uintptr
  13501. type TFT_BitmapGlyphRec_ = struct {
  13502. Froot TFT_GlyphRec
  13503. Fleft TFT_Int
  13504. Ftop TFT_Int
  13505. Fbitmap TFT_Bitmap
  13506. }
  13507. type TFT_BitmapGlyphRec = struct {
  13508. Froot TFT_GlyphRec
  13509. Fleft TFT_Int
  13510. Ftop TFT_Int
  13511. Fbitmap TFT_Bitmap
  13512. }
  13513. type TFT_OutlineGlyph = uintptr
  13514. type TFT_OutlineGlyphRec_ = struct {
  13515. Froot TFT_GlyphRec
  13516. Foutline TFT_Outline
  13517. }
  13518. type TFT_OutlineGlyphRec = struct {
  13519. Froot TFT_GlyphRec
  13520. Foutline TFT_Outline
  13521. }
  13522. type TFT_SvgGlyph = uintptr
  13523. type TFT_SvgGlyphRec_ = struct {
  13524. Froot TFT_GlyphRec
  13525. Fsvg_document uintptr
  13526. Fsvg_document_length TFT_ULong
  13527. Fglyph_index TFT_UInt
  13528. Fmetrics TFT_Size_Metrics
  13529. Funits_per_EM TFT_UShort
  13530. Fstart_glyph_id TFT_UShort
  13531. Fend_glyph_id TFT_UShort
  13532. Ftransform TFT_Matrix
  13533. Fdelta TFT_Vector
  13534. }
  13535. type TFT_SvgGlyphRec = struct {
  13536. Froot TFT_GlyphRec
  13537. Fsvg_document uintptr
  13538. Fsvg_document_length TFT_ULong
  13539. Fglyph_index TFT_UInt
  13540. Fmetrics TFT_Size_Metrics
  13541. Funits_per_EM TFT_UShort
  13542. Fstart_glyph_id TFT_UShort
  13543. Fend_glyph_id TFT_UShort
  13544. Ftransform TFT_Matrix
  13545. Fdelta TFT_Vector
  13546. }
  13547. type TFT_Glyph_BBox_Mode = int32
  13548. type _FT_Glyph_BBox_Mode_ = int32
  13549. const _FT_GLYPH_BBOX_UNSCALED = 0
  13550. const _FT_GLYPH_BBOX_SUBPIXELS = 0
  13551. const _FT_GLYPH_BBOX_GRIDFIT = 1
  13552. const _FT_GLYPH_BBOX_TRUNCATE = 2
  13553. const _FT_GLYPH_BBOX_PIXELS = 3
  13554. /* */
  13555. /* END */
  13556. /* Local Variables: */
  13557. /* coding: utf-8 */
  13558. /* End: */
  13559. type Tm3x3 = [3][3]float64
  13560. func _m3x3_uniform(tls *libc.TLS, m uintptr) {
  13561. var v1, v2, v3, v4, v5, v6, v7 float64
  13562. _, _, _, _, _, _, _ = v1, v2, v3, v4, v5, v6, v7
  13563. v2 = libc.Float64FromFloat64(1)
  13564. *(*float64)(unsafe.Pointer(m + 2*24 + 2*8)) = v2
  13565. v1 = v2
  13566. *(*float64)(unsafe.Pointer(m + 1*24 + 1*8)) = v1
  13567. *(*float64)(unsafe.Pointer(m)) = v1
  13568. v7 = libc.Float64FromInt32(0)
  13569. *(*float64)(unsafe.Pointer(m + 2*24 + 1*8)) = v7
  13570. v6 = v7
  13571. *(*float64)(unsafe.Pointer(m + 2*24)) = v6
  13572. v5 = v6
  13573. *(*float64)(unsafe.Pointer(m + 1*24 + 2*8)) = v5
  13574. v4 = v5
  13575. *(*float64)(unsafe.Pointer(m + 2*8)) = v4
  13576. v3 = v4
  13577. *(*float64)(unsafe.Pointer(m + 1*24)) = v3
  13578. *(*float64)(unsafe.Pointer(m + 1*8)) = v3
  13579. }
  13580. func _m3x3_transform(tls *libc.TLS, v uintptr, m uintptr) {
  13581. var x, y float64
  13582. _, _ = x, y
  13583. x = float64((*TFT_Vector)(unsafe.Pointer(v)).Fx)
  13584. y = float64((*TFT_Vector)(unsafe.Pointer(v)).Fy)
  13585. (*TFT_Vector)(unsafe.Pointer(v)).Fx = int32(float64(x**(*float64)(unsafe.Pointer(m))) + float64(y**(*float64)(unsafe.Pointer(m + 1*8))) + *(*float64)(unsafe.Pointer(m + 2*8)) + libc.Float64FromFloat64(0.5))
  13586. (*TFT_Vector)(unsafe.Pointer(v)).Fy = int32(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))
  13587. }
  13588. func _m3x3_invert(tls *libc.TLS, m uintptr, mi uintptr) {
  13589. var det float64
  13590. _ = det
  13591. 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)))))
  13592. 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)))))
  13593. 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)))))
  13594. det = float64(1) / det
  13595. *(*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)))))
  13596. *(*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)))))
  13597. *(*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)))))
  13598. *(*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)))))
  13599. *(*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)))))
  13600. *(*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)))))
  13601. *(*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)))))
  13602. *(*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)))))
  13603. *(*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)))))
  13604. }
  13605. /*
  13606. * Validate the memory info for a font
  13607. */
  13608. func __XftFontValidateMemory(tls *libc.TLS, dpy uintptr, public uintptr) {
  13609. bp := tls.Alloc(32)
  13610. defer tls.Free(32)
  13611. var font, xftg uintptr
  13612. var glyph_memory uint32
  13613. var glyphindex TFT_UInt
  13614. _, _, _, _ = font, glyph_memory, glyphindex, xftg
  13615. font = public
  13616. glyph_memory = uint32(0)
  13617. glyphindex = uint32(0)
  13618. for {
  13619. if !(glyphindex < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  13620. break
  13621. }
  13622. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*4))
  13623. if xftg != 0 {
  13624. glyph_memory += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  13625. }
  13626. goto _1
  13627. _1:
  13628. ;
  13629. glyphindex++
  13630. }
  13631. if glyph_memory != (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory {
  13632. libc.Xprintf(tls, __ccgo_ts+1452, libc.VaList(bp+8, (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory, glyph_memory))
  13633. }
  13634. }
  13635. // C documentation
  13636. //
  13637. // /*
  13638. // * Validate the glyph usage-links for a font.
  13639. // */
  13640. func __XftValidateGlyphUsage(tls *libc.TLS, font uintptr) {
  13641. bp := tls.Alloc(32)
  13642. defer tls.Free(32)
  13643. var forward, next, reverse, v2, v4 TFT_UInt
  13644. var x1st, xuse uintptr
  13645. _, _, _, _, _, _, _ = forward, next, reverse, x1st, xuse, v2, v4
  13646. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest != uint32(0xffffffff) {
  13647. x1st = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnewest)*4))
  13648. xuse = x1st
  13649. forward = uint32(1)
  13650. next = (*TXftGlyphUsage)(unsafe.Pointer(x1st)).Fnewer
  13651. for {
  13652. if !(xuse != libc.UintptrFromInt32(0) && next != (*TXftFontInt)(unsafe.Pointer(font)).Fnewest) {
  13653. break
  13654. }
  13655. if next >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs {
  13656. libc.Xprintf(tls, __ccgo_ts+1511, libc.VaList(bp+8, next))
  13657. break
  13658. }
  13659. forward++
  13660. v2 = forward
  13661. if v2 > (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse {
  13662. libc.Xprintf(tls, __ccgo_ts+1534, libc.VaList(bp+8, forward, (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse))
  13663. if forward > (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse+uint32(10) {
  13664. break
  13665. }
  13666. }
  13667. xuse = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(next)*4))
  13668. goto _1
  13669. _1:
  13670. ;
  13671. next = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer
  13672. }
  13673. if forward < (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse {
  13674. libc.Xprintf(tls, __ccgo_ts+1574, libc.VaList(bp+8, forward, (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse))
  13675. }
  13676. reverse = uint32(1)
  13677. next = (*TXftGlyphUsage)(unsafe.Pointer(x1st)).Folder
  13678. for {
  13679. if !(xuse != libc.UintptrFromInt32(0) && next != (*TXftFontInt)(unsafe.Pointer(font)).Fnewest) {
  13680. break
  13681. }
  13682. if next >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs {
  13683. libc.Xprintf(tls, __ccgo_ts+1613, libc.VaList(bp+8, next))
  13684. break
  13685. }
  13686. reverse++
  13687. v4 = reverse
  13688. if v4 > (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse {
  13689. libc.Xprintf(tls, __ccgo_ts+1534, libc.VaList(bp+8, reverse, (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse))
  13690. if reverse > (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse+uint32(10) {
  13691. break
  13692. }
  13693. }
  13694. xuse = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(next)*4))
  13695. goto _3
  13696. _3:
  13697. ;
  13698. next = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder
  13699. }
  13700. if reverse < (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse {
  13701. libc.Xprintf(tls, __ccgo_ts+1574, libc.VaList(bp+8, reverse, (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse))
  13702. }
  13703. if forward != reverse {
  13704. libc.Xprintf(tls, __ccgo_ts+1635, libc.VaList(bp+8, forward, reverse))
  13705. libc.Xexit(tls, int32(1))
  13706. }
  13707. }
  13708. }
  13709. // C documentation
  13710. //
  13711. // /* we sometimes need to convert the glyph bitmap in a FT_GlyphSlot
  13712. // * into a different format. For example, we want to convert a
  13713. // * FT_PIXEL_MODE_LCD or FT_PIXEL_MODE_LCD_V bitmap into a 32-bit
  13714. // * ARGB or ABGR bitmap.
  13715. // *
  13716. // * this function prepares a target descriptor for this operation.
  13717. // *
  13718. // * input :: target bitmap descriptor. The function will set its
  13719. // * 'width', 'rows' and 'pitch' fields, and only these
  13720. // *
  13721. // * slot :: the glyph slot containing the source bitmap. this
  13722. // * function assumes that slot->format == FT_GLYPH_FORMAT_BITMAP
  13723. // *
  13724. // * mode :: the requested final rendering mode. supported values are
  13725. // * MONO, NORMAL (i.e. gray), LCD and LCD_V
  13726. // *
  13727. // * the function returns the size in bytes of the corresponding buffer,
  13728. // * it's up to the caller to allocate the corresponding memory block
  13729. // * before calling _fill_xrender_bitmap
  13730. // *
  13731. // * it also returns -1 in case of error (e.g. incompatible arguments,
  13732. // * like trying to convert a gray bitmap into a monochrome one)
  13733. // */
  13734. func __compute_xrender_bitmap_size(tls *libc.TLS, target uintptr, slot TFT_GlyphSlot, mode TFT_Render_Mode, matrix uintptr, m uintptr) (r int32) {
  13735. bp := tls.Alloc(48)
  13736. defer tls.Free(48)
  13737. var bottom, height, left, pitch, right, top, width, xc, yc, v1, v2, v3, v6, v7 int32
  13738. var ftbit uintptr
  13739. var v10 float64
  13740. var v8 TFT_Fixed
  13741. var v9 TFT_Pos
  13742. var _ /* inverse at bp+16 */ TFT_Matrix
  13743. var _ /* mirror at bp+0 */ TFT_Matrix
  13744. var _ /* vector at bp+32 */ TFT_Vector
  13745. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bottom, ftbit, height, left, pitch, right, top, width, xc, yc, v1, v10, v2, v3, v6, v7, v8, v9
  13746. if (*TFT_GlyphSlotRec_)(unsafe.Pointer(slot)).Fformat != int32(_FT_GLYPH_FORMAT_BITMAP) {
  13747. return -int32(1)
  13748. }
  13749. /* compute the size of the final bitmap */
  13750. ftbit = slot + 76
  13751. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fwidth)
  13752. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows)
  13753. if matrix != 0 && mode == int32(_FT_RENDER_MODE_NORMAL) {
  13754. v3 = libc.Int32FromInt32(0)
  13755. bottom = v3
  13756. v2 = v3
  13757. top = v2
  13758. v1 = v2
  13759. right = v1
  13760. left = v1
  13761. xc = 0
  13762. for {
  13763. if !(xc <= int32(1)) {
  13764. break
  13765. }
  13766. yc = 0
  13767. for {
  13768. if !(yc <= int32(1)) {
  13769. break
  13770. }
  13771. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx = xc * width
  13772. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy = yc * height
  13773. libfreetype.XFT_Vector_Transform(tls, bp+32, matrix)
  13774. if xc == 0 && yc == 0 {
  13775. v6 = (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx
  13776. right = v6
  13777. left = v6
  13778. v7 = (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy
  13779. bottom = v7
  13780. top = v7
  13781. } else {
  13782. if left > (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx {
  13783. left = (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx
  13784. }
  13785. if right < (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx {
  13786. right = (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx
  13787. }
  13788. if bottom > (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy {
  13789. bottom = (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy
  13790. }
  13791. if top < (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy {
  13792. top = (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy
  13793. }
  13794. }
  13795. goto _5
  13796. _5:
  13797. ;
  13798. yc++
  13799. }
  13800. goto _4
  13801. _4:
  13802. ;
  13803. xc++
  13804. }
  13805. width = right - left
  13806. height = top - bottom
  13807. (*(*TFT_Matrix)(unsafe.Pointer(bp))).Fxx = int32(+libc.Int32FromInt32(0x10000))
  13808. (*(*TFT_Matrix)(unsafe.Pointer(bp))).Fyy = -int32(0x10000)
  13809. v8 = libc.Int32FromInt32(0)
  13810. (*(*TFT_Matrix)(unsafe.Pointer(bp))).Fyx = v8
  13811. (*(*TFT_Matrix)(unsafe.Pointer(bp))).Fxy = v8
  13812. *(*TFT_Matrix)(unsafe.Pointer(bp + 16)) = *(*TFT_Matrix)(unsafe.Pointer(matrix))
  13813. libfreetype.XFT_Matrix_Multiply(tls, bp, bp+16)
  13814. libfreetype.XFT_Matrix_Invert(tls, bp+16)
  13815. libfreetype.XFT_Matrix_Multiply(tls, bp, bp+16)
  13816. v9 = libc.Int32FromInt32(0)
  13817. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy = v9
  13818. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx = v9
  13819. libfreetype.XFT_Vector_Transform(tls, bp+32, bp+16)
  13820. left = (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx
  13821. bottom = (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy
  13822. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx = width
  13823. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy = height
  13824. libfreetype.XFT_Vector_Transform(tls, bp+32, bp+16)
  13825. right = (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx
  13826. top = (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy
  13827. left = right - left - libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fwidth)
  13828. bottom = top - bottom - libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows)
  13829. *(*float64)(unsafe.Pointer(m)) = float64((*(*TFT_Matrix)(unsafe.Pointer(bp + 16))).Fxx) / libc.Float64FromInt32(0x10000)
  13830. *(*float64)(unsafe.Pointer(m + 1*8)) = float64((*(*TFT_Matrix)(unsafe.Pointer(bp + 16))).Fxy) / libc.Float64FromInt32(0x10000)
  13831. *(*float64)(unsafe.Pointer(m + 1*24)) = float64((*(*TFT_Matrix)(unsafe.Pointer(bp + 16))).Fyx) / libc.Float64FromInt32(0x10000)
  13832. *(*float64)(unsafe.Pointer(m + 1*24 + 1*8)) = float64((*(*TFT_Matrix)(unsafe.Pointer(bp + 16))).Fyy) / libc.Float64FromInt32(0x10000)
  13833. *(*float64)(unsafe.Pointer(m + 2*8)) = float64(-left) / libc.Float64FromInt32(2)
  13834. *(*float64)(unsafe.Pointer(m + 1*24 + 2*8)) = float64(-bottom) / libc.Float64FromInt32(2)
  13835. v10 = libc.Float64FromFloat64(0)
  13836. *(*float64)(unsafe.Pointer(m + 2*24 + 1*8)) = v10
  13837. *(*float64)(unsafe.Pointer(m + 2*24)) = v10
  13838. *(*float64)(unsafe.Pointer(m + 2*24 + 2*8)) = float64(1)
  13839. }
  13840. pitch = (width + int32(3)) & ^libc.Int32FromInt32(3)
  13841. switch libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpixel_mode) {
  13842. case int32(_FT_PIXEL_MODE_MONO):
  13843. if mode == int32(_FT_RENDER_MODE_MONO) {
  13844. pitch = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  13845. break
  13846. }
  13847. /* fall-through */
  13848. fallthrough
  13849. case int32(_FT_PIXEL_MODE_GRAY):
  13850. if mode == int32(_FT_RENDER_MODE_LCD) || mode == int32(_FT_RENDER_MODE_LCD_V) {
  13851. /* each pixel is replicated into a 32-bit ARGB value */
  13852. pitch = width * int32(4)
  13853. }
  13854. case int32(_FT_PIXEL_MODE_BGRA):
  13855. pitch = width * int32(4)
  13856. case int32(_FT_PIXEL_MODE_LCD):
  13857. if mode != int32(_FT_RENDER_MODE_LCD) {
  13858. return -int32(1)
  13859. }
  13860. /* horz pixel triplets are packed into 32-bit ARGB values */
  13861. width /= int32(3)
  13862. pitch = width * int32(4)
  13863. case int32(_FT_PIXEL_MODE_LCD_V):
  13864. if mode != int32(_FT_RENDER_MODE_LCD_V) {
  13865. return -int32(1)
  13866. }
  13867. /* vert pixel triplets are packed into 32-bit ARGB values */
  13868. height /= int32(3)
  13869. pitch = width * int32(4)
  13870. default: /* unsupported source format */
  13871. return -int32(1)
  13872. }
  13873. (*TFT_Bitmap)(unsafe.Pointer(target)).Fwidth = libc.Uint32FromInt32(width)
  13874. (*TFT_Bitmap)(unsafe.Pointer(target)).Frows = libc.Uint32FromInt32(height)
  13875. (*TFT_Bitmap)(unsafe.Pointer(target)).Fpitch = pitch
  13876. (*TFT_Bitmap)(unsafe.Pointer(target)).Fbuffer = libc.UintptrFromInt32(0)
  13877. return pitch * height
  13878. }
  13879. // C documentation
  13880. //
  13881. // /* this functions converts the glyph bitmap found in a FT_GlyphSlot
  13882. // * into a different format while scaling by applying the given matrix
  13883. // * (see _compute_xrender_bitmap_size)
  13884. // *
  13885. // * you should call this function after _compute_xrender_bitmap_size
  13886. // *
  13887. // * target :: target bitmap descriptor. Note that its 'buffer' pointer
  13888. // * must point to memory allocated by the caller
  13889. // *
  13890. // * source :: the source bitmap descriptor
  13891. // *
  13892. // * matrix :: the scaling matrix to apply
  13893. // */
  13894. func __scaled_fill_xrender_bitmap(tls *libc.TLS, target uintptr, source uintptr, m uintptr) {
  13895. bp := tls.Alloc(32)
  13896. defer tls.Free(32)
  13897. var dst_line, src, src_buf uintptr
  13898. var height, i, pitch, sample_count, sample_x, sample_y, sampling_height, sampling_width, src_pitch, src_x, src_y, width, x, y int32
  13899. var _ /* bgra at bp+16 */ [4]int32
  13900. var _ /* vector at bp+0 */ TFT_Vector
  13901. var _ /* vector0 at bp+8 */ TFT_Vector
  13902. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  13903. src_buf = (*TFT_Bitmap)(unsafe.Pointer(source)).Fbuffer
  13904. dst_line = (*TFT_Bitmap)(unsafe.Pointer(target)).Fbuffer
  13905. src_pitch = (*TFT_Bitmap)(unsafe.Pointer(source)).Fpitch
  13906. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Fwidth)
  13907. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Frows)
  13908. pitch = (*TFT_Bitmap)(unsafe.Pointer(target)).Fpitch
  13909. if src_pitch < 0 {
  13910. src_buf -= uintptr(libc.Uint32FromInt32(src_pitch) * ((*TFT_Bitmap)(unsafe.Pointer(source)).Frows - libc.Uint32FromInt32(1)))
  13911. }
  13912. /* compute how many source pixels a target pixel spans */
  13913. (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx = int32(1)
  13914. (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy = int32(1)
  13915. _m3x3_transform(tls, bp, m)
  13916. (*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fx = 0
  13917. (*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fy = 0
  13918. _m3x3_transform(tls, bp+8, m)
  13919. sampling_width = int32(((*(*TFT_Vector)(unsafe.Pointer(bp))).Fx - (*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fx) / libc.Int32FromInt32(2))
  13920. sampling_height = int32(((*(*TFT_Vector)(unsafe.Pointer(bp))).Fy - (*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fy) / libc.Int32FromInt32(2))
  13921. if sampling_width < 0 {
  13922. sampling_width = -sampling_width
  13923. }
  13924. if sampling_height < 0 {
  13925. sampling_height = -sampling_height
  13926. }
  13927. sample_count = (int32(2)*sampling_width + int32(1)) * (int32(2)*sampling_height + int32(1))
  13928. y = height
  13929. for {
  13930. if !(y > 0) {
  13931. break
  13932. }
  13933. x = 0
  13934. for {
  13935. if !(x < width) {
  13936. break
  13937. }
  13938. /* compute target pixel location in source space */
  13939. (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx = x
  13940. (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy = height - y
  13941. _m3x3_transform(tls, bp, m)
  13942. if libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(source)).Fpixel_mode) == int32(_FT_PIXEL_MODE_BGRA) {
  13943. if (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx < -sampling_width || libc.Uint32FromInt32((*(*TFT_Vector)(unsafe.Pointer(bp))).Fx) > uint32((*TFT_Bitmap)(unsafe.Pointer(source)).Fwidth+libc.Uint32FromInt32(sampling_width)) {
  13944. goto _2
  13945. }
  13946. if (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy < -sampling_height || libc.Uint32FromInt32((*(*TFT_Vector)(unsafe.Pointer(bp))).Fy) > uint32((*TFT_Bitmap)(unsafe.Pointer(source)).Frows+libc.Uint32FromInt32(sampling_height)) {
  13947. goto _2
  13948. }
  13949. } else {
  13950. if (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx < 0 || libc.Uint32FromInt32((*(*TFT_Vector)(unsafe.Pointer(bp))).Fx) >= (*TFT_Bitmap)(unsafe.Pointer(source)).Fwidth {
  13951. goto _2
  13952. }
  13953. if (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy < 0 || libc.Uint32FromInt32((*(*TFT_Vector)(unsafe.Pointer(bp))).Fy) >= (*TFT_Bitmap)(unsafe.Pointer(source)).Frows {
  13954. goto _2
  13955. }
  13956. }
  13957. switch libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(source)).Fpixel_mode) {
  13958. case int32(_FT_PIXEL_MODE_MONO): /* convert mono to 8-bit gray, scale using nearest pixel */
  13959. src = src_buf + uintptr((*(*TFT_Vector)(unsafe.Pointer(bp))).Fy*src_pitch)
  13960. 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&int32(7))) != 0 {
  13961. *(*uint8)(unsafe.Pointer(dst_line + uintptr(x))) = uint8(0xff)
  13962. }
  13963. case int32(_FT_PIXEL_MODE_GRAY): /* scale using nearest pixel */
  13964. src = src_buf + uintptr((*(*TFT_Vector)(unsafe.Pointer(bp))).Fy*src_pitch)
  13965. *(*uint8)(unsafe.Pointer(dst_line + uintptr(x))) = *(*uint8)(unsafe.Pointer(src + uintptr((*(*TFT_Vector)(unsafe.Pointer(bp))).Fx)))
  13966. case int32(_FT_PIXEL_MODE_BGRA): /* scale by averaging all relevant source pixels, keep BGRA format */
  13967. *(*[4]int32)(unsafe.Pointer(bp + 16)) = [4]int32{}
  13968. sample_y = -sampling_height
  13969. for {
  13970. if !(sample_y < sampling_height+int32(1)) {
  13971. break
  13972. }
  13973. src_y = (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy + sample_y
  13974. if src_y < 0 || libc.Uint32FromInt32(src_y) >= (*TFT_Bitmap)(unsafe.Pointer(source)).Frows {
  13975. goto _3
  13976. }
  13977. src = src_buf + uintptr(src_y*src_pitch)
  13978. sample_x = -sampling_width
  13979. for {
  13980. if !(sample_x < sampling_width+int32(1)) {
  13981. break
  13982. }
  13983. src_x = (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx + sample_x
  13984. if src_x < 0 || libc.Uint32FromInt32(src_x) >= (*TFT_Bitmap)(unsafe.Pointer(source)).Fwidth {
  13985. goto _4
  13986. }
  13987. i = 0
  13988. for {
  13989. if !(i < int32(4)) {
  13990. break
  13991. }
  13992. *(*int32)(unsafe.Pointer(bp + 16 + uintptr(i)*4)) += libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(src + uintptr(src_x*int32(4)+i))))
  13993. goto _5
  13994. _5:
  13995. ;
  13996. i++
  13997. }
  13998. goto _4
  13999. _4:
  14000. ;
  14001. sample_x++
  14002. }
  14003. goto _3
  14004. _3:
  14005. ;
  14006. sample_y++
  14007. }
  14008. i = 0
  14009. for {
  14010. if !(i < int32(4)) {
  14011. break
  14012. }
  14013. *(*uint8)(unsafe.Pointer(dst_line + uintptr(int32(4)*x+i))) = libc.Uint8FromInt32((*(*[4]int32)(unsafe.Pointer(bp + 16)))[i] / sample_count)
  14014. goto _6
  14015. _6:
  14016. ;
  14017. i++
  14018. }
  14019. break
  14020. }
  14021. goto _2
  14022. _2:
  14023. ;
  14024. x++
  14025. }
  14026. goto _1
  14027. _1:
  14028. ;
  14029. y--
  14030. dst_line += uintptr(pitch)
  14031. }
  14032. }
  14033. // C documentation
  14034. //
  14035. // /* this functions converts the glyph bitmap found in a FT_GlyphSlot
  14036. // * into a different format (see _compute_xrender_bitmap_size)
  14037. // *
  14038. // * you should call this function after _compute_xrender_bitmap_size
  14039. // *
  14040. // * target :: target bitmap descriptor. Note that its 'buffer' pointer
  14041. // * must point to memory allocated by the caller
  14042. // *
  14043. // * slot :: the glyph slot containing the source bitmap
  14044. // *
  14045. // * mode :: the requested final rendering mode
  14046. // *
  14047. // * bgr :: boolean, set if BGR or VBGR pixel ordering is needed
  14048. // */
  14049. func __fill_xrender_bitmap(tls *libc.TLS, target uintptr, slot TFT_GlyphSlot, mode TFT_Render_Mode, bgr int32) {
  14050. var bytes, h, height, pitch, src_pitch, subpixel, width, x, x1, x2, x3, x4, x5, x6 int32
  14051. var dst, dst1, dst2, dst3, dst4, dstLine, ftbit, src, src1, src2, src3, srcLine uintptr
  14052. var pix, pix1, pix2, pix3, pix4 uint32
  14053. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  14054. ftbit = slot + 76
  14055. srcLine = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fbuffer
  14056. dstLine = (*TFT_Bitmap)(unsafe.Pointer(target)).Fbuffer
  14057. src_pitch = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch
  14058. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Fwidth)
  14059. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Frows)
  14060. pitch = (*TFT_Bitmap)(unsafe.Pointer(target)).Fpitch
  14061. subpixel = libc.BoolInt32(mode == int32(_FT_RENDER_MODE_LCD) || mode == int32(_FT_RENDER_MODE_LCD_V))
  14062. if src_pitch < 0 {
  14063. srcLine -= uintptr(libc.Uint32FromInt32(src_pitch) * ((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows - libc.Uint32FromInt32(1)))
  14064. }
  14065. switch libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpixel_mode) {
  14066. case int32(_FT_PIXEL_MODE_MONO):
  14067. goto _1
  14068. case int32(_FT_PIXEL_MODE_GRAY):
  14069. goto _2
  14070. case int32(_FT_PIXEL_MODE_BGRA):
  14071. goto _3
  14072. case int32(_FT_PIXEL_MODE_LCD):
  14073. goto _4
  14074. default:
  14075. goto _5
  14076. }
  14077. goto _6
  14078. _1:
  14079. ;
  14080. if subpixel != 0 { /* convert mono to ARGB32 values */
  14081. h = height
  14082. for {
  14083. if !(h > 0) {
  14084. break
  14085. }
  14086. x = 0
  14087. for {
  14088. if !(x < width) {
  14089. break
  14090. }
  14091. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x>>libc.Int32FromInt32(3)))))&(int32(0x80)>>(x&int32(7))) != 0 {
  14092. *(*uint32)(unsafe.Pointer(dstLine + uintptr(x)*4)) = uint32(0xffffffff)
  14093. }
  14094. goto _8
  14095. _8:
  14096. ;
  14097. x++
  14098. }
  14099. goto _7
  14100. _7:
  14101. ;
  14102. h--
  14103. srcLine += uintptr(src_pitch)
  14104. dstLine += uintptr(pitch)
  14105. }
  14106. } else {
  14107. if mode == int32(_FT_RENDER_MODE_NORMAL) { /* convert mono to 8-bit gray */
  14108. h = height
  14109. for {
  14110. if !(h > 0) {
  14111. break
  14112. }
  14113. x1 = 0
  14114. for {
  14115. if !(x1 < width) {
  14116. break
  14117. }
  14118. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x1>>libc.Int32FromInt32(3)))))&(int32(0x80)>>(x1&int32(7))) != 0 {
  14119. *(*uint8)(unsafe.Pointer(dstLine + uintptr(x1))) = uint8(0xff)
  14120. }
  14121. goto _10
  14122. _10:
  14123. ;
  14124. x1++
  14125. }
  14126. goto _9
  14127. _9:
  14128. ;
  14129. h--
  14130. srcLine += uintptr(src_pitch)
  14131. dstLine += uintptr(pitch)
  14132. }
  14133. } else { /* copy mono to mono */
  14134. bytes = (width + int32(7)) >> int32(3)
  14135. h = height
  14136. for {
  14137. if !(h > 0) {
  14138. break
  14139. }
  14140. libc.Xmemcpy(tls, dstLine, srcLine, libc.Uint32FromInt32(bytes))
  14141. goto _11
  14142. _11:
  14143. ;
  14144. h--
  14145. srcLine += uintptr(src_pitch)
  14146. dstLine += uintptr(pitch)
  14147. }
  14148. }
  14149. }
  14150. goto _6
  14151. _2:
  14152. ;
  14153. if subpixel != 0 { /* convert gray to ARGB32 values */
  14154. h = height
  14155. for {
  14156. if !(h > 0) {
  14157. break
  14158. }
  14159. dst = dstLine
  14160. x2 = 0
  14161. for {
  14162. if !(x2 < width) {
  14163. break
  14164. }
  14165. pix = uint32(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x2))))
  14166. pix |= pix << int32(8)
  14167. pix |= pix << int32(16)
  14168. *(*uint32)(unsafe.Pointer(dst + uintptr(x2)*4)) = pix
  14169. goto _13
  14170. _13:
  14171. ;
  14172. x2++
  14173. }
  14174. goto _12
  14175. _12:
  14176. ;
  14177. h--
  14178. srcLine += uintptr(src_pitch)
  14179. dstLine += uintptr(pitch)
  14180. }
  14181. } else { /* copy gray into gray */
  14182. h = height
  14183. for {
  14184. if !(h > 0) {
  14185. break
  14186. }
  14187. libc.Xmemcpy(tls, dstLine, srcLine, libc.Uint32FromInt32(width))
  14188. goto _14
  14189. _14:
  14190. ;
  14191. h--
  14192. srcLine += uintptr(src_pitch)
  14193. dstLine += uintptr(pitch)
  14194. }
  14195. }
  14196. goto _6
  14197. _3:
  14198. ; /* Preserve BGRA format */
  14199. h = height
  14200. _17:
  14201. ;
  14202. if !(h > 0) {
  14203. goto _15
  14204. }
  14205. libc.Xmemcpy(tls, dstLine, srcLine, libc.Uint32FromInt32(width)*uint32(4))
  14206. goto _16
  14207. _16:
  14208. ;
  14209. h--
  14210. srcLine += uintptr(src_pitch)
  14211. dstLine += uintptr(pitch)
  14212. goto _17
  14213. goto _15
  14214. _15:
  14215. ;
  14216. goto _6
  14217. _4:
  14218. ;
  14219. if !(bgr != 0) {
  14220. /* convert horizontal RGB into ARGB32 */
  14221. h = height
  14222. for {
  14223. if !(h > 0) {
  14224. break
  14225. }
  14226. src = srcLine
  14227. dst1 = dstLine
  14228. x3 = 0
  14229. for {
  14230. if !(x3 < width) {
  14231. break
  14232. }
  14233. 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)
  14234. *(*uint32)(unsafe.Pointer(dst1 + uintptr(x3)*4)) = pix1
  14235. goto _19
  14236. _19:
  14237. ;
  14238. x3++
  14239. src += uintptr(3)
  14240. }
  14241. goto _18
  14242. _18:
  14243. ;
  14244. h--
  14245. srcLine += uintptr(src_pitch)
  14246. dstLine += uintptr(pitch)
  14247. }
  14248. } else {
  14249. /* convert horizontal BGR into ARGB32 */
  14250. h = height
  14251. for {
  14252. if !(h > 0) {
  14253. break
  14254. }
  14255. src1 = srcLine
  14256. dst2 = dstLine
  14257. x4 = 0
  14258. for {
  14259. if !(x4 < width) {
  14260. break
  14261. }
  14262. 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)
  14263. *(*uint32)(unsafe.Pointer(dst2 + uintptr(x4)*4)) = pix2
  14264. goto _21
  14265. _21:
  14266. ;
  14267. x4++
  14268. src1 += uintptr(3)
  14269. }
  14270. goto _20
  14271. _20:
  14272. ;
  14273. h--
  14274. srcLine += uintptr(src_pitch)
  14275. dstLine += uintptr(pitch)
  14276. }
  14277. }
  14278. goto _6
  14279. _5:
  14280. ; /* FT_PIXEL_MODE_LCD_V */
  14281. /* convert vertical RGB into ARGB32 */
  14282. if !(bgr != 0) {
  14283. h = height
  14284. for {
  14285. if !(h > 0) {
  14286. break
  14287. }
  14288. src2 = srcLine
  14289. dst3 = dstLine
  14290. x5 = 0
  14291. for {
  14292. if !(x5 < width) {
  14293. break
  14294. }
  14295. 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)
  14296. *(*uint32)(unsafe.Pointer(dst3 + uintptr(x5)*4)) = pix3
  14297. goto _23
  14298. _23:
  14299. ;
  14300. x5++
  14301. src2 += uintptr(1)
  14302. }
  14303. goto _22
  14304. _22:
  14305. ;
  14306. h--
  14307. srcLine += uintptr(int32(3) * src_pitch)
  14308. dstLine += uintptr(pitch)
  14309. }
  14310. } else {
  14311. h = height
  14312. for {
  14313. if !(h > 0) {
  14314. break
  14315. }
  14316. src3 = srcLine
  14317. dst4 = dstLine
  14318. x6 = 0
  14319. for {
  14320. if !(x6 < width) {
  14321. break
  14322. }
  14323. 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)
  14324. *(*uint32)(unsafe.Pointer(dst4 + uintptr(x6)*4)) = pix4
  14325. goto _25
  14326. _25:
  14327. ;
  14328. x6++
  14329. src3 += uintptr(1)
  14330. }
  14331. goto _24
  14332. _24:
  14333. ;
  14334. h--
  14335. srcLine += uintptr(int32(3) * src_pitch)
  14336. dstLine += uintptr(pitch)
  14337. }
  14338. }
  14339. _6:
  14340. }
  14341. func XXftFontLoadGlyphs(tls *libc.TLS, dpy uintptr, pub uintptr, need_bitmaps TFcBool, glyphs uintptr, nglyph int32) {
  14342. bp := tls.Alloc(4464)
  14343. defer tls.Free(4464)
  14344. 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
  14345. var bufBitmap, font, ftbit, info, line, line1, xftg, xnew, xold, xuse, v14, v16, v2 uintptr
  14346. var error1 TFT_Error
  14347. var face TFT_Face
  14348. var gc TGC
  14349. var glyph_transform, transform TFcBool
  14350. var glyphindex TFT_UInt
  14351. var glyphslot TFT_GlyphSlot
  14352. var mode TFT_Render_Mode
  14353. var pixmap TPixmap
  14354. var _ /* bufLocal at bp+4 */ [4096]uint8
  14355. var _ /* glyph at bp+0 */ TGlyph
  14356. var _ /* image at bp+4280 */ TXImage
  14357. var _ /* local at bp+4100 */ TFT_Bitmap
  14358. var _ /* m at bp+4136 */ Tm3x3
  14359. var _ /* mi at bp+4208 */ Tm3x3
  14360. var _ /* vector at bp+4128 */ TFT_Vector
  14361. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  14362. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  14363. font = pub
  14364. bufBitmap = bp + 4
  14365. bufSize = int32(4096)
  14366. mode = int32(_FT_RENDER_MODE_MONO)
  14367. if !(info != 0) {
  14368. return
  14369. }
  14370. face = XXftLockFace(tls, font)
  14371. if !(face != 0) {
  14372. return
  14373. }
  14374. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fcolor != 0 {
  14375. mode = int32(_FT_RENDER_MODE_NORMAL)
  14376. }
  14377. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 {
  14378. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  14379. case int32(m_FC_RGBA_RGB):
  14380. fallthrough
  14381. case int32(m_FC_RGBA_BGR):
  14382. mode = int32(_FT_RENDER_MODE_LCD)
  14383. case int32(m_FC_RGBA_VRGB):
  14384. fallthrough
  14385. case int32(m_FC_RGBA_VBGR):
  14386. mode = int32(_FT_RENDER_MODE_LCD_V)
  14387. default:
  14388. mode = int32(_FT_RENDER_MODE_NORMAL)
  14389. }
  14390. }
  14391. transform = libc.BoolInt32((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ftransform != 0 && mode != int32(_FT_RENDER_MODE_MONO))
  14392. for {
  14393. v1 = nglyph
  14394. nglyph--
  14395. if !(v1 != 0) {
  14396. break
  14397. }
  14398. v2 = glyphs
  14399. glyphs += 4
  14400. glyphindex = *(*TFT_UInt)(unsafe.Pointer(v2))
  14401. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*4))
  14402. if !(xftg != 0) {
  14403. continue
  14404. }
  14405. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  14406. __XftFontValidateMemory(tls, dpy, pub)
  14407. }
  14408. /*
  14409. * Check to see if this glyph has just been loaded,
  14410. * this happens when drawing the same glyph twice
  14411. * in a single string
  14412. */
  14413. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0 {
  14414. continue
  14415. }
  14416. libfreetype.XFT_Library_SetLcdFilter(tls, X_XftFTlibrary, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Flcd_filter)
  14417. error1 = libfreetype.XFT_Load_Glyph(tls, face, glyphindex, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)
  14418. if error1 != 0 {
  14419. /*
  14420. * If anti-aliasing or transforming glyphs and
  14421. * no outline version exists, fallback to the
  14422. * bitmap and let things look bad instead of
  14423. * missing the glyph
  14424. */
  14425. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags&(libc.Int32FromInt32(1)<<libc.Int32FromInt32(3)) != 0 {
  14426. error1 = libfreetype.XFT_Load_Glyph(tls, face, glyphindex, int32((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags & ^(libc.Int32FromInt32(1)<<libc.Int32FromInt32(3))))
  14427. }
  14428. if error1 != 0 {
  14429. continue
  14430. }
  14431. }
  14432. glyphslot = (*TFT_FaceRec_)(unsafe.Pointer(face)).Fglyph
  14433. /*
  14434. * Embolden if required
  14435. */
  14436. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fembolden != 0 {
  14437. libfreetype.XFT_GlyphSlot_Embolden(tls, glyphslot)
  14438. }
  14439. /*
  14440. * Compute glyph metrics from FreeType information
  14441. */
  14442. if transform != 0 {
  14443. v5 = libc.Int32FromInt32(0)
  14444. bottom = v5
  14445. v4 = v5
  14446. top = v4
  14447. v3 = v4
  14448. right = v3
  14449. left = v3
  14450. xc = 0
  14451. for {
  14452. if !(xc <= int32(1)) {
  14453. break
  14454. }
  14455. yc = 0
  14456. for {
  14457. if !(yc <= int32(1)) {
  14458. break
  14459. }
  14460. (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fx = (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX + xc*(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fwidth
  14461. (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fy = (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY - yc*(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fheight
  14462. libfreetype.XFT_Vector_Transform(tls, bp+4128, font+32+36)
  14463. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  14464. libc.Xprintf(tls, __ccgo_ts+1666, libc.VaList(bp+4376, xc, yc, (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fx, (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fy))
  14465. }
  14466. if xc == 0 && yc == 0 {
  14467. v8 = (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fx
  14468. right = v8
  14469. left = v8
  14470. v9 = (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fy
  14471. bottom = v9
  14472. top = v9
  14473. } else {
  14474. if left > (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fx {
  14475. left = (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fx
  14476. }
  14477. if right < (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fx {
  14478. right = (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fx
  14479. }
  14480. if bottom > (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fy {
  14481. bottom = (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fy
  14482. }
  14483. if top < (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fy {
  14484. top = (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fy
  14485. }
  14486. }
  14487. goto _7
  14488. _7:
  14489. ;
  14490. yc++
  14491. }
  14492. goto _6
  14493. _6:
  14494. ;
  14495. xc++
  14496. }
  14497. left = left & -libc.Int32FromInt32(64)
  14498. right = (right + libc.Int32FromInt32(63)) & -libc.Int32FromInt32(64)
  14499. bottom = bottom & -libc.Int32FromInt32(64)
  14500. top = (top + libc.Int32FromInt32(63)) & -libc.Int32FromInt32(64)
  14501. } else {
  14502. left = (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX & int32(-libc.Int32FromInt32(64))
  14503. right = int32(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX + (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fwidth + libc.Int32FromInt32(63)) & int32(-libc.Int32FromInt32(64)))
  14504. top = int32(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY + libc.Int32FromInt32(63)) & int32(-libc.Int32FromInt32(64)))
  14505. bottom = ((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY - (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fheight) & int32(-libc.Int32FromInt32(64))
  14506. }
  14507. /*
  14508. * Clip charcell glyphs to the bounding box
  14509. * XXX transformed?
  14510. */
  14511. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fspacing >= int32(m_FC_CHARCELL) && !(transform != 0) {
  14512. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags&(libc.Int32FromInt32(1)<<libc.Int32FromInt32(4)) != 0 {
  14513. if bottom>>int32(6) > (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width {
  14514. adjust = bottom - (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width<<int32(6)
  14515. if adjust > top {
  14516. adjust = top
  14517. }
  14518. top -= adjust
  14519. bottom -= adjust
  14520. }
  14521. } else {
  14522. if right>>int32(6) > (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width {
  14523. adjust1 = right - (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width<<int32(6)
  14524. if adjust1 > left {
  14525. adjust1 = left
  14526. }
  14527. left -= adjust1
  14528. right -= adjust1
  14529. }
  14530. }
  14531. }
  14532. glyph_transform = transform
  14533. if (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fformat != int32(_FT_GLYPH_FORMAT_BITMAP) {
  14534. error1 = libfreetype.XFT_Render_Glyph(tls, (*TFT_FaceRec_)(unsafe.Pointer(face)).Fglyph, mode)
  14535. if error1 != 0 {
  14536. continue
  14537. }
  14538. glyph_transform = m_False
  14539. }
  14540. libfreetype.XFT_Library_SetLcdFilter(tls, X_XftFTlibrary, int32(_FT_LCD_FILTER_NONE))
  14541. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fspacing >= int32(m_FC_MONO) {
  14542. if transform != 0 {
  14543. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags&(libc.Int32FromInt32(1)<<libc.Int32FromInt32(4)) != 0 {
  14544. (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fx = 0
  14545. (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fy = -(*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  14546. } else {
  14547. (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fx = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  14548. (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fy = 0
  14549. }
  14550. libfreetype.XFT_Vector_Transform(tls, bp+4128, font+32+36)
  14551. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16(((*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fx + libc.Int32FromInt32(32)) & int32(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6))
  14552. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(((*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fy + libc.Int32FromInt32(32)) & int32(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6))
  14553. } else {
  14554. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags&(libc.Int32FromInt32(1)<<libc.Int32FromInt32(4)) != 0 {
  14555. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = 0
  14556. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(-(*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width)
  14557. } else {
  14558. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16((*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width)
  14559. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = 0
  14560. }
  14561. }
  14562. } else {
  14563. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fadvance.Fx + libc.Int32FromInt32(32)) & int32(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6))
  14564. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(-(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fadvance.Fy + libc.Int32FromInt32(32)) & int32(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6)))
  14565. }
  14566. /* compute the size of the final bitmap */
  14567. ftbit = glyphslot + 76
  14568. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fwidth)
  14569. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows)
  14570. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  14571. libc.Xprintf(tls, __ccgo_ts+1686, libc.VaList(bp+4376, libc.Int32FromUint32(glyphindex)))
  14572. libc.Xprintf(tls, __ccgo_ts+1697, libc.VaList(bp+4376, (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX, (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY, (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fwidth, (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fheight, left, right, top, bottom, width, height))
  14573. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPHV) != 0 {
  14574. line = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fbuffer
  14575. if (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch < 0 {
  14576. line -= uintptr((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch * (height - int32(1)))
  14577. }
  14578. y = 0
  14579. for {
  14580. if !(y < height) {
  14581. break
  14582. }
  14583. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 {
  14584. x = 0
  14585. for {
  14586. if !(x < width) {
  14587. break
  14588. }
  14589. libc.Xprintf(tls, __ccgo_ts+1750, libc.VaList(bp+4376, libc.Int32FromUint8(_den[libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(line + uintptr(x))))>>int32(5)])))
  14590. goto _11
  14591. _11:
  14592. ;
  14593. x++
  14594. }
  14595. } else {
  14596. x = 0
  14597. for {
  14598. if !(x < width*int32(8)) {
  14599. break
  14600. }
  14601. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(line + uintptr(x>>int32(3)))))&(int32(1)<<(x&int32(7))) != 0 {
  14602. v13 = int32('#')
  14603. } else {
  14604. v13 = int32(' ')
  14605. }
  14606. libc.Xprintf(tls, __ccgo_ts+1750, libc.VaList(bp+4376, v13))
  14607. goto _12
  14608. _12:
  14609. ;
  14610. x++
  14611. }
  14612. }
  14613. libc.Xprintf(tls, __ccgo_ts+1753, 0)
  14614. line += uintptr((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch)
  14615. goto _10
  14616. _10:
  14617. ;
  14618. y++
  14619. }
  14620. libc.Xprintf(tls, __ccgo_ts+1756, 0)
  14621. }
  14622. }
  14623. _m3x3_uniform(tls, bp+4136)
  14624. if glyph_transform != 0 {
  14625. v14 = font + 32 + 36
  14626. } else {
  14627. v14 = libc.UintptrFromInt32(0)
  14628. }
  14629. size = __compute_xrender_bitmap_size(tls, bp+4100, glyphslot, mode, v14, bp+4136)
  14630. if size < 0 {
  14631. continue
  14632. }
  14633. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth = uint16((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4100))).Fwidth)
  14634. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight = uint16((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4100))).Frows)
  14635. if glyph_transform != 0 {
  14636. _m3x3_invert(tls, bp+4136, bp+4208)
  14637. (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fx = -(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_left
  14638. (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fy = (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_top
  14639. _m3x3_transform(tls, bp+4128, bp+4208)
  14640. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx = int16((*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fx)
  14641. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy = int16((*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fy)
  14642. } else {
  14643. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx = int16(-(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_left)
  14644. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy = int16((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_top)
  14645. }
  14646. /*
  14647. * If the glyph is relatively large (> 1% of server memory),
  14648. * don't send it until necessary.
  14649. */
  14650. if !(need_bitmaps != 0) && libc.Uint32FromInt32(size) > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory/uint32(100) {
  14651. continue
  14652. }
  14653. /*
  14654. * Make sure there is enough buffer space for the glyph.
  14655. */
  14656. if size > bufSize {
  14657. if bufBitmap != bp+4 {
  14658. libc.Xfree(tls, bufBitmap)
  14659. }
  14660. bufBitmap = libc.Xmalloc(tls, libc.Uint32FromInt32(size))
  14661. if !(bufBitmap != 0) {
  14662. continue
  14663. }
  14664. bufSize = size
  14665. }
  14666. libc.Xmemset(tls, bufBitmap, 0, libc.Uint32FromInt32(size))
  14667. (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4100))).Fbuffer = bufBitmap
  14668. if mode == int32(_FT_RENDER_MODE_NORMAL) && glyph_transform != 0 {
  14669. __scaled_fill_xrender_bitmap(tls, bp+4100, glyphslot+76, bp+4136)
  14670. } else {
  14671. __fill_xrender_bitmap(tls, bp+4100, 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)))
  14672. }
  14673. /*
  14674. * Copy or convert into local buffer.
  14675. */
  14676. /*
  14677. * Use the glyph index as the wire encoding; it
  14678. * might be more efficient for some locales to map
  14679. * these by first usage to smaller values, but that
  14680. * would require persistently storing the map when
  14681. * glyphs were freed.
  14682. */
  14683. *(*TGlyph)(unsafe.Pointer(bp)) = glyphindex
  14684. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture != 0 {
  14685. libxrender.XXRenderFreePicture(tls, dpy, (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture)
  14686. (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture = uint32(0)
  14687. }
  14688. (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory = uint32(libc.Uint32FromInt32(size) + (*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph)
  14689. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  14690. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  14691. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = libxrender.XXRenderCreateGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fformat)
  14692. }
  14693. if mode == int32(_FT_RENDER_MODE_MONO) {
  14694. /* swap bits in each byte */
  14695. if (*struct {
  14696. Fext_data uintptr
  14697. Fprivate1 uintptr
  14698. Ffd int32
  14699. Fprivate2 int32
  14700. Fproto_major_version int32
  14701. Fproto_minor_version int32
  14702. Fvendor uintptr
  14703. Fprivate3 TXID
  14704. Fprivate4 TXID
  14705. Fprivate5 TXID
  14706. Fprivate6 int32
  14707. Fresource_alloc uintptr
  14708. Fbyte_order int32
  14709. Fbitmap_unit int32
  14710. Fbitmap_pad int32
  14711. Fbitmap_bit_order int32
  14712. Fnformats int32
  14713. Fpixmap_format uintptr
  14714. Fprivate8 int32
  14715. Frelease int32
  14716. Fprivate9 uintptr
  14717. Fprivate10 uintptr
  14718. Fqlen int32
  14719. Flast_request_read uint32
  14720. Frequest uint32
  14721. Fprivate11 TXPointer
  14722. Fprivate12 TXPointer
  14723. Fprivate13 TXPointer
  14724. Fprivate14 TXPointer
  14725. Fmax_request_size uint32
  14726. Fdb uintptr
  14727. Fprivate15 uintptr
  14728. Fdisplay_name uintptr
  14729. Fdefault_screen int32
  14730. Fnscreens int32
  14731. Fscreens uintptr
  14732. Fmotion_buffer uint32
  14733. Fprivate16 uint32
  14734. Fmin_keycode int32
  14735. Fmax_keycode int32
  14736. Fprivate17 TXPointer
  14737. Fprivate18 TXPointer
  14738. Fprivate19 int32
  14739. Fxdefaults uintptr
  14740. })(unsafe.Pointer(dpy)).Fbitmap_bit_order != int32(m_MSBFirst) {
  14741. line1 = bufBitmap
  14742. i = size
  14743. for {
  14744. v15 = i
  14745. i--
  14746. if !(v15 != 0) {
  14747. break
  14748. }
  14749. c = libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(line1)))
  14750. c = c<<int32(1)&int32(0xaa) | c>>int32(1)&int32(0x55)
  14751. c = c<<int32(2)&int32(0xcc) | c>>int32(2)&int32(0x33)
  14752. c = c<<int32(4)&int32(0xf0) | c>>int32(4)&int32(0x0f)
  14753. v16 = line1
  14754. line1++
  14755. *(*uint8)(unsafe.Pointer(v16)) = libc.Uint8FromInt32(c)
  14756. }
  14757. }
  14758. } else {
  14759. if libc.Int32FromUint8((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap.Fpixel_mode) == int32(_FT_PIXEL_MODE_BGRA) || mode != int32(_FT_RENDER_MODE_NORMAL) {
  14760. /* invert ARGB <=> BGRA */
  14761. if (*struct {
  14762. Fext_data uintptr
  14763. Fprivate1 uintptr
  14764. Ffd int32
  14765. Fprivate2 int32
  14766. Fproto_major_version int32
  14767. Fproto_minor_version int32
  14768. Fvendor uintptr
  14769. Fprivate3 TXID
  14770. Fprivate4 TXID
  14771. Fprivate5 TXID
  14772. Fprivate6 int32
  14773. Fresource_alloc uintptr
  14774. Fbyte_order int32
  14775. Fbitmap_unit int32
  14776. Fbitmap_pad int32
  14777. Fbitmap_bit_order int32
  14778. Fnformats int32
  14779. Fpixmap_format uintptr
  14780. Fprivate8 int32
  14781. Frelease int32
  14782. Fprivate9 uintptr
  14783. Fprivate10 uintptr
  14784. Fqlen int32
  14785. Flast_request_read uint32
  14786. Frequest uint32
  14787. Fprivate11 TXPointer
  14788. Fprivate12 TXPointer
  14789. Fprivate13 TXPointer
  14790. Fprivate14 TXPointer
  14791. Fmax_request_size uint32
  14792. Fdb uintptr
  14793. Fprivate15 uintptr
  14794. Fdisplay_name uintptr
  14795. Fdefault_screen int32
  14796. Fnscreens int32
  14797. Fscreens uintptr
  14798. Fmotion_buffer uint32
  14799. Fprivate16 uint32
  14800. Fmin_keycode int32
  14801. Fmax_keycode int32
  14802. Fprivate17 TXPointer
  14803. Fprivate18 TXPointer
  14804. Fprivate19 int32
  14805. Fxdefaults uintptr
  14806. })(unsafe.Pointer(dpy)).Fbyte_order != XXftNativeByteOrder(tls) {
  14807. XXftSwapCARD32(tls, bufBitmap, size>>int32(2))
  14808. }
  14809. }
  14810. }
  14811. if libc.Int32FromUint8((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap.Fpixel_mode) == int32(_FT_PIXEL_MODE_BGRA) {
  14812. pixmap = libx11.XXCreatePixmap(tls, dpy, (*TScreen)(unsafe.Pointer((*struct {
  14813. Fext_data uintptr
  14814. Fprivate1 uintptr
  14815. Ffd int32
  14816. Fprivate2 int32
  14817. Fproto_major_version int32
  14818. Fproto_minor_version int32
  14819. Fvendor uintptr
  14820. Fprivate3 TXID
  14821. Fprivate4 TXID
  14822. Fprivate5 TXID
  14823. Fprivate6 int32
  14824. Fresource_alloc uintptr
  14825. Fbyte_order int32
  14826. Fbitmap_unit int32
  14827. Fbitmap_pad int32
  14828. Fbitmap_bit_order int32
  14829. Fnformats int32
  14830. Fpixmap_format uintptr
  14831. Fprivate8 int32
  14832. Frelease int32
  14833. Fprivate9 uintptr
  14834. Fprivate10 uintptr
  14835. Fqlen int32
  14836. Flast_request_read uint32
  14837. Frequest uint32
  14838. Fprivate11 TXPointer
  14839. Fprivate12 TXPointer
  14840. Fprivate13 TXPointer
  14841. Fprivate14 TXPointer
  14842. Fmax_request_size uint32
  14843. Fdb uintptr
  14844. Fprivate15 uintptr
  14845. Fdisplay_name uintptr
  14846. Fdefault_screen int32
  14847. Fnscreens int32
  14848. Fscreens uintptr
  14849. Fmotion_buffer uint32
  14850. Fprivate16 uint32
  14851. Fmin_keycode int32
  14852. Fmax_keycode int32
  14853. Fprivate17 TXPointer
  14854. Fprivate18 TXPointer
  14855. Fprivate19 int32
  14856. Fxdefaults uintptr
  14857. })(unsafe.Pointer(dpy)).Fscreens+uintptr((*struct {
  14858. Fext_data uintptr
  14859. Fprivate1 uintptr
  14860. Ffd int32
  14861. Fprivate2 int32
  14862. Fproto_major_version int32
  14863. Fproto_minor_version int32
  14864. Fvendor uintptr
  14865. Fprivate3 TXID
  14866. Fprivate4 TXID
  14867. Fprivate5 TXID
  14868. Fprivate6 int32
  14869. Fresource_alloc uintptr
  14870. Fbyte_order int32
  14871. Fbitmap_unit int32
  14872. Fbitmap_pad int32
  14873. Fbitmap_bit_order int32
  14874. Fnformats int32
  14875. Fpixmap_format uintptr
  14876. Fprivate8 int32
  14877. Frelease int32
  14878. Fprivate9 uintptr
  14879. Fprivate10 uintptr
  14880. Fqlen int32
  14881. Flast_request_read uint32
  14882. Frequest uint32
  14883. Fprivate11 TXPointer
  14884. Fprivate12 TXPointer
  14885. Fprivate13 TXPointer
  14886. Fprivate14 TXPointer
  14887. Fmax_request_size uint32
  14888. Fdb uintptr
  14889. Fprivate15 uintptr
  14890. Fdisplay_name uintptr
  14891. Fdefault_screen int32
  14892. Fnscreens int32
  14893. Fscreens uintptr
  14894. Fmotion_buffer uint32
  14895. Fprivate16 uint32
  14896. Fmin_keycode int32
  14897. Fmax_keycode int32
  14898. Fprivate17 TXPointer
  14899. Fprivate18 TXPointer
  14900. Fprivate19 int32
  14901. Fxdefaults uintptr
  14902. })(unsafe.Pointer(dpy)).Fdefault_screen)*80)).Froot, (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4100))).Fwidth, (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4100))).Frows, uint32(32))
  14903. gc = libx11.XXCreateGC(tls, dpy, pixmap, uint32(0), libc.UintptrFromInt32(0))
  14904. *(*TXImage)(unsafe.Pointer(bp + 4280)) = TXImage{
  14905. Fwidth: libc.Int32FromUint32((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4100))).Fwidth),
  14906. Fheight: libc.Int32FromUint32((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4100))).Frows),
  14907. Fformat: int32(m_ZPixmap),
  14908. Fdata: bufBitmap,
  14909. Fbyte_order: (*TDisplay)(unsafe.Pointer(dpy)).Fbyte_order,
  14910. Fbitmap_unit: (*TDisplay)(unsafe.Pointer(dpy)).Fbitmap_unit,
  14911. Fbitmap_bit_order: (*TDisplay)(unsafe.Pointer(dpy)).Fbitmap_bit_order,
  14912. Fbitmap_pad: int32(32),
  14913. Fdepth: int32(32),
  14914. Fbytes_per_line: libc.Int32FromUint32((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4100))).Fwidth*libc.Uint32FromInt32(4) - libc.Uint32FromInt32((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4100))).Fpitch)),
  14915. Fbits_per_pixel: int32(32),
  14916. }
  14917. libx11.XXInitImage(tls, bp+4280)
  14918. libx11.XXPutImage(tls, dpy, pixmap, gc, bp+4280, 0, 0, 0, 0, (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4100))).Fwidth, (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4100))).Frows)
  14919. (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture = libxrender.XXRenderCreatePicture(tls, dpy, pixmap, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, uint32(0), libc.UintptrFromInt32(0))
  14920. libx11.XXFreeGC(tls, dpy, gc)
  14921. libx11.XXFreePixmap(tls, dpy, pixmap)
  14922. /*
  14923. * Record 256 times higher memory pressure for unrotated
  14924. * pictures, and maximum for rotated pictures.
  14925. */
  14926. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fmatrix.Fxy != 0 || (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fmatrix.Fyx != 0 {
  14927. *(*uint32)(unsafe.Pointer(xftg + 16)) += (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory - libc.Uint32FromInt32(size)
  14928. } else {
  14929. *(*uint32)(unsafe.Pointer(xftg + 16)) += uint32(libc.Uint32FromInt32(size) * uint32(255))
  14930. }
  14931. } else {
  14932. libxrender.XXRenderAddGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, xftg, int32(1), bufBitmap, size)
  14933. }
  14934. } else {
  14935. if size != 0 {
  14936. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.Xmalloc(tls, libc.Uint32FromInt32(size))
  14937. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  14938. libc.Xmemcpy(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap, bufBitmap, libc.Uint32FromInt32(size))
  14939. }
  14940. } else {
  14941. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.UintptrFromInt32(0)
  14942. }
  14943. }
  14944. *(*uint32)(unsafe.Pointer(font + 140)) += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14945. *(*uint32)(unsafe.Pointer(info + 32)) += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14946. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  14947. __XftFontValidateMemory(tls, dpy, pub)
  14948. }
  14949. if XXftDebug(tls)&int32(m_XFT_DBG_CACHEV) != 0 {
  14950. libc.Xprintf(tls, __ccgo_ts+1758, libc.VaList(bp+4376, glyphindex, (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory))
  14951. }
  14952. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  14953. xuse = xftg
  14954. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest == uint32(0xffffffff) {
  14955. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder = glyphindex
  14956. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer = glyphindex
  14957. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  14958. libc.Xprintf(tls, __ccgo_ts+1787, libc.VaList(bp+4376, font, glyphindex, xuse, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer))
  14959. }
  14960. } else {
  14961. xnew = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnewest)*4))
  14962. xold = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xnew)).Fnewer)*4))
  14963. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder = (*TXftFontInt)(unsafe.Pointer(font)).Fnewest
  14964. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer = (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Fnewer
  14965. (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Fnewer = glyphindex
  14966. (*TXftGlyphUsage)(unsafe.Pointer(xold)).Folder = glyphindex
  14967. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  14968. libc.Xprintf(tls, __ccgo_ts+1817, libc.VaList(bp+4376, 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))
  14969. }
  14970. }
  14971. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = glyphindex
  14972. (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse++
  14973. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  14974. __XftValidateGlyphUsage(tls, font)
  14975. }
  14976. }
  14977. }
  14978. if bufBitmap != bp+4 {
  14979. libc.Xfree(tls, bufBitmap)
  14980. }
  14981. XXftUnlockFace(tls, font)
  14982. }
  14983. var _den = [9]uint8{' ', '.', ':', ';', '=', '+', '*', '#'}
  14984. func XXftFontUnloadGlyphs(tls *libc.TLS, dpy uintptr, pub uintptr, glyphs uintptr, nglyph int32) {
  14985. bp := tls.Alloc(4144)
  14986. defer tls.Free(4144)
  14987. var font, info, xftg, xtmp, xuse, v2 uintptr
  14988. var glyphindex TFT_UInt
  14989. var nused, v1, v3 int32
  14990. var _ /* glyphBuf at bp+0 */ [1024]TGlyph
  14991. _, _, _, _, _, _, _, _, _, _ = font, glyphindex, info, nused, xftg, xtmp, xuse, v1, v2, v3
  14992. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  14993. font = pub
  14994. nused = 0
  14995. for {
  14996. v1 = nglyph
  14997. nglyph--
  14998. if !(v1 != 0) {
  14999. break
  15000. }
  15001. v2 = glyphs
  15002. glyphs += 4
  15003. glyphindex = *(*TFT_UInt)(unsafe.Pointer(v2))
  15004. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*4))
  15005. if !(xftg != 0) {
  15006. continue
  15007. }
  15008. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0 {
  15009. if XXftDebug(tls)&int32(m_XFT_DBG_CACHEV) != 0 {
  15010. libc.Xprintf(tls, __ccgo_ts+1874, libc.VaList(bp+4104, glyphindex, (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory))
  15011. }
  15012. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  15013. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture != 0 {
  15014. libxrender.XXRenderFreePicture(tls, dpy, (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture)
  15015. } else {
  15016. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  15017. v3 = nused
  15018. nused++
  15019. (*(*[1024]TGlyph)(unsafe.Pointer(bp)))[v3] = glyphindex
  15020. if libc.Uint32FromInt32(nused) == libc.Uint32FromInt64(4096)/libc.Uint32FromInt64(4) {
  15021. libxrender.XXRenderFreeGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, nused)
  15022. nused = 0
  15023. }
  15024. }
  15025. }
  15026. } else {
  15027. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  15028. libc.Xfree(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap)
  15029. }
  15030. }
  15031. *(*uint32)(unsafe.Pointer(font + 140)) -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  15032. if info != 0 {
  15033. *(*uint32)(unsafe.Pointer(info + 32)) -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  15034. }
  15035. }
  15036. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  15037. xuse = xftg
  15038. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  15039. libc.Xprintf(tls, __ccgo_ts+1905, libc.VaList(bp+4104, font, xuse, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer))
  15040. }
  15041. if (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder != uint32(0xffffffff) {
  15042. xtmp = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder)*4))
  15043. if xtmp != libc.UintptrFromInt32(0) {
  15044. /* update link around to oldest glyph */
  15045. (*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Fnewer = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer
  15046. }
  15047. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest == glyphindex {
  15048. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest == (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder {
  15049. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = uint32(0xffffffff)
  15050. } else {
  15051. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder
  15052. }
  15053. }
  15054. }
  15055. if (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer != uint32(0xffffffff) {
  15056. xtmp = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer)*4))
  15057. if xtmp != libc.UintptrFromInt32(0) {
  15058. /* update link around to newest glyph */
  15059. (*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Folder = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder
  15060. }
  15061. }
  15062. if (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse != 0 {
  15063. (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse--
  15064. } else {
  15065. libc.Xfprintf(tls, libc.Xstderr, __ccgo_ts+1930, 0)
  15066. }
  15067. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  15068. __XftValidateGlyphUsage(tls, font)
  15069. }
  15070. }
  15071. libc.Xfree(tls, xftg)
  15072. XXftMemFree(tls, int32(_XFT_MEM_GLYPH), (*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph)
  15073. *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*4)) = libc.UintptrFromInt32(0)
  15074. }
  15075. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 && nused != 0 {
  15076. libxrender.XXRenderFreeGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, nused)
  15077. }
  15078. }
  15079. func XXftFontCheckGlyph(tls *libc.TLS, dpy uintptr, pub uintptr, need_bitmaps TFcBool, glyph TFT_UInt, missing uintptr, nmissing uintptr) (r TFcBool) {
  15080. var font, xftg, xnew, xold, xtmp, xuse, xuse1 uintptr
  15081. var n, v1 int32
  15082. _, _, _, _, _, _, _, _, _ = font, n, xftg, xnew, xold, xtmp, xuse, xuse1, v1
  15083. font = pub
  15084. if glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs {
  15085. return m_FcFalse
  15086. }
  15087. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*4))
  15088. if !(xftg != 0) || need_bitmaps != 0 && !((*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0) {
  15089. if !(xftg != 0) {
  15090. xftg = libc.Xmalloc(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph)
  15091. if !(xftg != 0) {
  15092. return m_FcFalse
  15093. }
  15094. XXftMemAlloc(tls, int32(_XFT_MEM_GLYPH), (*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph)
  15095. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.UintptrFromInt32(0)
  15096. (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory = uint32(0)
  15097. (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture = uint32(0)
  15098. *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*4)) = xftg
  15099. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  15100. xuse = xftg
  15101. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder = uint32(0xffffffff)
  15102. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer = uint32(0xffffffff)
  15103. }
  15104. }
  15105. n = *(*int32)(unsafe.Pointer(nmissing))
  15106. v1 = n
  15107. n++
  15108. *(*TFT_UInt)(unsafe.Pointer(missing + uintptr(v1)*4)) = glyph
  15109. if n == int32(m_XFT_NMISSING) {
  15110. XXftFontLoadGlyphs(tls, dpy, pub, need_bitmaps, missing, n)
  15111. n = 0
  15112. }
  15113. *(*int32)(unsafe.Pointer(nmissing)) = n
  15114. return int32(m_FcTrue)
  15115. }
  15116. /*
  15117. * Make unloading faster by moving newly-referenced glyphs to the front
  15118. * of the list, leaving the less-used glyphs on the end.
  15119. */
  15120. 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 {
  15121. xuse1 = xftg
  15122. xtmp = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnewest)*4))
  15123. /* delink */
  15124. xold = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Folder)*4))
  15125. xnew = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Fnewer)*4))
  15126. (*TXftGlyphUsage)(unsafe.Pointer(xold)).Fnewer = (*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Fnewer
  15127. (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Folder = (*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Folder
  15128. /* relink */
  15129. xnew = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Fnewer)*4))
  15130. (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Folder = glyph
  15131. (*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Folder = (*TXftFontInt)(unsafe.Pointer(font)).Fnewest
  15132. (*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Fnewer = (*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Fnewer
  15133. (*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Fnewer = glyph
  15134. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = glyph
  15135. }
  15136. return m_FcFalse
  15137. }
  15138. func XXftCharExists(tls *libc.TLS, dpy uintptr, pub uintptr, ucs4 TFcChar32) (r TFcBool) {
  15139. if (*TXftFont)(unsafe.Pointer(pub)).Fcharset != 0 {
  15140. return libfontconfig.XFcCharSetHasChar(tls, (*TXftFont)(unsafe.Pointer(pub)).Fcharset, ucs4)
  15141. }
  15142. return m_FcFalse
  15143. }
  15144. func XXftCharIndex(tls *libc.TLS, dpy uintptr, pub uintptr, ucs4 TFcChar32) (r TFT_UInt) {
  15145. var ent, offset TFcChar32
  15146. var face TFT_Face
  15147. var font uintptr
  15148. _, _, _, _ = ent, face, font, offset
  15149. font = pub
  15150. if !((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value != 0) {
  15151. return uint32(0)
  15152. }
  15153. ent = ucs4 % libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value)
  15154. offset = uint32(0)
  15155. for (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 != ucs4 {
  15156. if (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 == libc.Uint32FromInt32(^libc.Int32FromInt32(0)) {
  15157. if !(XXftCharExists(tls, dpy, pub, ucs4) != 0) {
  15158. return uint32(0)
  15159. }
  15160. face = XXftLockFace(tls, pub)
  15161. if !(face != 0) {
  15162. return uint32(0)
  15163. }
  15164. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 = ucs4
  15165. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fglyph = libfontconfig.XFcFreeTypeCharIndex(tls, face, ucs4)
  15166. XXftUnlockFace(tls, pub)
  15167. break
  15168. }
  15169. if !(offset != 0) {
  15170. offset = ucs4 % libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Frehash_value)
  15171. if !(offset != 0) {
  15172. offset = uint32(1)
  15173. }
  15174. }
  15175. ent = ent + offset
  15176. if ent >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value) {
  15177. ent -= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value)
  15178. }
  15179. }
  15180. return (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fglyph
  15181. }
  15182. // C documentation
  15183. //
  15184. // /*
  15185. // * Remove glyph(s) from the font to reduce memory-usage.
  15186. // */
  15187. func X_XftFontUncacheGlyph(tls *libc.TLS, dpy uintptr, pub uintptr) {
  15188. bp := tls.Alloc(16)
  15189. defer tls.Free(16)
  15190. var font, xftg, xuse uintptr
  15191. var glyph_memory uint32
  15192. var v1 TFT_UInt
  15193. var _ /* glyphindex at bp+0 */ TFT_UInt
  15194. _, _, _, _, _ = font, glyph_memory, xftg, xuse, v1
  15195. font = pub
  15196. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory != 0) {
  15197. return
  15198. }
  15199. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  15200. __XftFontValidateMemory(tls, dpy, pub)
  15201. }
  15202. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  15203. /*
  15204. * Remove the oldest glyph from the font.
  15205. */
  15206. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest != uint32(0xffffffff) {
  15207. xuse = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnewest)*4))
  15208. v1 = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer
  15209. *(*TFT_UInt)(unsafe.Pointer(bp)) = v1
  15210. if v1 != uint32(0xffffffff) {
  15211. XXftFontUnloadGlyphs(tls, dpy, pub, bp, int32(1))
  15212. }
  15213. }
  15214. } else {
  15215. if (*TXftFontInt)(unsafe.Pointer(font)).Fuse_free_glyphs != 0 {
  15216. /*
  15217. * Pick a random glyph from the font and remove it from the cache
  15218. */
  15219. glyph_memory = libc.Uint32FromInt32(libc.Xrand(tls)) % (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  15220. *(*TFT_UInt)(unsafe.Pointer(bp)) = uint32(0)
  15221. for {
  15222. if !(*(*TFT_UInt)(unsafe.Pointer(bp)) < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  15223. break
  15224. }
  15225. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(*(*TFT_UInt)(unsafe.Pointer(bp)))*4))
  15226. if xftg != 0 {
  15227. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory > glyph_memory {
  15228. XXftFontUnloadGlyphs(tls, dpy, pub, bp, int32(1))
  15229. break
  15230. }
  15231. glyph_memory -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  15232. }
  15233. goto _2
  15234. _2:
  15235. ;
  15236. *(*TFT_UInt)(unsafe.Pointer(bp))++
  15237. }
  15238. } else {
  15239. /*
  15240. * Free all glyphs, since they are part of a set.
  15241. */
  15242. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  15243. libxrender.XXRenderFreeGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset)
  15244. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = uint32(0)
  15245. }
  15246. *(*TFT_UInt)(unsafe.Pointer(bp)) = uint32(0)
  15247. for {
  15248. if !(*(*TFT_UInt)(unsafe.Pointer(bp)) < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  15249. break
  15250. }
  15251. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(*(*TFT_UInt)(unsafe.Pointer(bp)))*4))
  15252. if xftg != 0 {
  15253. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory > uint32(0) {
  15254. XXftFontUnloadGlyphs(tls, dpy, pub, bp, int32(1))
  15255. }
  15256. }
  15257. goto _3
  15258. _3:
  15259. ;
  15260. *(*TFT_UInt)(unsafe.Pointer(bp))++
  15261. }
  15262. }
  15263. }
  15264. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  15265. __XftFontValidateMemory(tls, dpy, pub)
  15266. }
  15267. }
  15268. func X_XftFontManageMemory(tls *libc.TLS, dpy uintptr, pub uintptr) {
  15269. bp := tls.Alloc(32)
  15270. defer tls.Free(32)
  15271. var font uintptr
  15272. var v1 uint32
  15273. _, _ = font, v1
  15274. font = pub
  15275. if (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory != 0 {
  15276. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  15277. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory {
  15278. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  15279. v1 = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset
  15280. } else {
  15281. v1 = uint32(font)
  15282. }
  15283. libc.Xprintf(tls, __ccgo_ts+1954, libc.VaList(bp+8, v1, (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory, (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory))
  15284. }
  15285. }
  15286. for (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory {
  15287. X_XftFontUncacheGlyph(tls, dpy, pub)
  15288. }
  15289. }
  15290. X_XftDisplayManageMemory(tls, dpy)
  15291. }
  15292. const m_UINT_MAX2 = 0xffffffff
  15293. /* xftxlfd.c */
  15294. var __XftConfigInitialized int32
  15295. func XXftInit(tls *libc.TLS, config uintptr) (r int32) {
  15296. if __XftConfigInitialized != 0 {
  15297. return int32(m_True)
  15298. }
  15299. __XftConfigInitialized = int32(m_True)
  15300. if !(libfontconfig.XFcInit(tls) != 0) {
  15301. return m_False
  15302. }
  15303. return int32(m_True)
  15304. }
  15305. func XXftGetVersion(tls *libc.TLS) (r int32) {
  15306. return libc.Int32FromInt32(m_XFT_MAJOR)*libc.Int32FromInt32(10000) + libc.Int32FromInt32(m_XFT_MINOR)*libc.Int32FromInt32(100) + libc.Int32FromInt32(m_XFT_REVISION)
  15307. }
  15308. var _XftInUse = [4]struct {
  15309. Fname uintptr
  15310. Falloc_count int32
  15311. Falloc_mem Tsize_t
  15312. Ffree_count int32
  15313. Ffree_mem Tsize_t
  15314. }{
  15315. 0: {
  15316. Fname: __ccgo_ts + 2000,
  15317. },
  15318. 1: {
  15319. Fname: __ccgo_ts + 2008,
  15320. },
  15321. 2: {
  15322. Fname: __ccgo_ts + 2016,
  15323. },
  15324. 3: {
  15325. Fname: __ccgo_ts + 2026,
  15326. },
  15327. }
  15328. var _XftAllocCount int32
  15329. var _XftAllocMem Tsize_t
  15330. var _XftFreeCount int32
  15331. var _XftFreeMem Tsize_t
  15332. var _XftMemNotice = libc.Uint32FromInt32(libc.Int32FromInt32(1) * libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024))
  15333. var _XftAllocNotify Tsize_t
  15334. var _XftFreeNotify Tsize_t
  15335. func XXftMemReport(tls *libc.TLS) {
  15336. bp := tls.Alloc(48)
  15337. defer tls.Free(48)
  15338. var i int32
  15339. _ = i
  15340. libc.Xprintf(tls, __ccgo_ts+2035, 0)
  15341. libc.Xprintf(tls, __ccgo_ts+2054, 0)
  15342. libc.Xprintf(tls, __ccgo_ts+2093, 0)
  15343. i = 0
  15344. for {
  15345. if !(i < int32(_XFT_MEM_NUM)) {
  15346. break
  15347. }
  15348. 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))
  15349. goto _1
  15350. _1:
  15351. ;
  15352. i++
  15353. }
  15354. libc.Xprintf(tls, __ccgo_ts+2137, libc.VaList(bp+8, __ccgo_ts+2159, _XftAllocCount, _XftAllocMem, _XftFreeCount, _XftFreeMem))
  15355. _XftAllocNotify = uint32(0)
  15356. _XftFreeNotify = uint32(0)
  15357. }
  15358. func XXftMemAlloc(tls *libc.TLS, kind int32, size Tsize_t) {
  15359. if XXftDebug(tls)&int32(m_XFT_DBG_MEMORY) != 0 {
  15360. _XftInUse[kind].Falloc_count++
  15361. _XftInUse[kind].Falloc_mem += size
  15362. _XftAllocCount++
  15363. _XftAllocMem += size
  15364. _XftAllocNotify += size
  15365. if _XftAllocNotify > _XftMemNotice {
  15366. XXftMemReport(tls)
  15367. }
  15368. }
  15369. }
  15370. func XXftMemFree(tls *libc.TLS, kind int32, size Tsize_t) {
  15371. if XXftDebug(tls)&int32(m_XFT_DBG_MEMORY) != 0 {
  15372. _XftInUse[kind].Ffree_count++
  15373. _XftInUse[kind].Ffree_mem += size
  15374. _XftFreeCount++
  15375. _XftFreeMem += size
  15376. _XftFreeNotify += size
  15377. if _XftFreeNotify > _XftMemNotice {
  15378. XXftMemReport(tls)
  15379. }
  15380. }
  15381. }
  15382. /* xftxlfd.c */
  15383. func XXftListFontsPatternObjects(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr, os uintptr) (r uintptr) {
  15384. return libfontconfig.XFcFontList(tls, libc.UintptrFromInt32(0), pattern, os)
  15385. }
  15386. func XXftListFonts(tls *libc.TLS, dpy uintptr, screen int32, va1 uintptr) (r uintptr) {
  15387. bp := tls.Alloc(16)
  15388. defer tls.Free(16)
  15389. var __o__, __ob__, __os__, __p__, first, fs, os, pattern uintptr
  15390. var va Tva_list
  15391. var _ /* __v__ at bp+0 */ TFcValue
  15392. _, _, _, _, _, _, _, _, _ = __o__, __ob__, __os__, __p__, first, fs, os, pattern, va
  15393. va = va1
  15394. __p__ = libc.UintptrFromInt32(0)
  15395. if !(__p__ != 0) {
  15396. __p__ = libfontconfig.XFcPatternCreate(tls)
  15397. if !(__p__ != 0) {
  15398. goto _FcPatternVapBuild_bail0
  15399. }
  15400. }
  15401. for {
  15402. __o__ = libc.VaUintptr(&va)
  15403. if !(__o__ != 0) {
  15404. break
  15405. }
  15406. (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 = libc.VaInt32(&va)
  15407. switch (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 {
  15408. case int32(_FcTypeUnknown):
  15409. fallthrough
  15410. case int32(_FcTypeVoid):
  15411. goto _FcPatternVapBuild_bail1
  15412. case int32(_FcTypeInteger):
  15413. *(*int32)(unsafe.Pointer(bp + 8)) = libc.VaInt32(&va)
  15414. case int32(_FcTypeDouble):
  15415. *(*float64)(unsafe.Pointer(bp + 8)) = libc.VaFloat64(&va)
  15416. case int32(_FcTypeString):
  15417. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15418. case int32(_FcTypeBool):
  15419. *(*TFcBool)(unsafe.Pointer(bp + 8)) = libc.VaInt32(&va)
  15420. case int32(_FcTypeMatrix):
  15421. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15422. case int32(_FcTypeCharSet):
  15423. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15424. case int32(_FcTypeFTFace):
  15425. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15426. case int32(_FcTypeLangSet):
  15427. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15428. case int32(_FcTypeRange):
  15429. *(*uintptr)(unsafe.Pointer(bp + 8)) = libc.VaUintptr(&va)
  15430. break
  15431. }
  15432. if !(libfontconfig.XFcPatternAdd(tls, __p__, __o__, *(*TFcValue)(unsafe.Pointer(bp)), int32(m_FcTrue)) != 0) {
  15433. goto _FcPatternVapBuild_bail1
  15434. }
  15435. goto _1
  15436. _1:
  15437. }
  15438. pattern = __p__
  15439. goto _FcPatternVapBuild_return
  15440. goto _FcPatternVapBuild_bail1
  15441. _FcPatternVapBuild_bail1:
  15442. ;
  15443. if !(libc.UintptrFromInt32(0) != 0) {
  15444. libfontconfig.XFcPatternDestroy(tls, __p__)
  15445. }
  15446. goto _FcPatternVapBuild_bail0
  15447. _FcPatternVapBuild_bail0:
  15448. ;
  15449. pattern = libc.UintptrFromInt32(0)
  15450. goto _FcPatternVapBuild_return
  15451. _FcPatternVapBuild_return:
  15452. ;
  15453. first = libc.VaUintptr(&va)
  15454. os = uintptr(0)
  15455. __os__ = libfontconfig.XFcObjectSetCreate(tls)
  15456. if !(__os__ != 0) {
  15457. goto _FcObjectSetVapBuild_bail0
  15458. }
  15459. __ob__ = first
  15460. for __ob__ != 0 {
  15461. if !(libfontconfig.XFcObjectSetAdd(tls, __os__, __ob__) != 0) {
  15462. goto _FcObjectSetVapBuild_bail1
  15463. }
  15464. __ob__ = libc.VaUintptr(&va)
  15465. }
  15466. os = __os__
  15467. goto _FcObjectSetVapBuild_bail1
  15468. _FcObjectSetVapBuild_bail1:
  15469. ;
  15470. if !(os != 0) && __os__ != 0 {
  15471. libfontconfig.XFcObjectSetDestroy(tls, __os__)
  15472. }
  15473. goto _FcObjectSetVapBuild_bail0
  15474. _FcObjectSetVapBuild_bail0:
  15475. ;
  15476. _ = va
  15477. fs = XXftListFontsPatternObjects(tls, dpy, screen, pattern, os)
  15478. libfontconfig.XFcPatternDestroy(tls, pattern)
  15479. libfontconfig.XFcObjectSetDestroy(tls, os)
  15480. return fs
  15481. }
  15482. /* xftxlfd.c */
  15483. func XXftNameParse(tls *libc.TLS, name uintptr) (r uintptr) {
  15484. return libfontconfig.XFcNameParse(tls, name)
  15485. }
  15486. func XXftNameUnparse(tls *libc.TLS, pat uintptr, dest uintptr, len1 int32) (r TFcBool) {
  15487. var name, new1 uintptr
  15488. _, _ = name, new1
  15489. name = libfontconfig.XFcNameUnparse(tls, pat)
  15490. if !(name != 0) {
  15491. return m_FcFalse
  15492. }
  15493. if libc.Xstrlen(tls, name)+uint32(1) > libc.Uint32FromInt32(len1) {
  15494. new1 = libfontconfig.XFcPatternDuplicate(tls, pat)
  15495. libc.Xfree(tls, name)
  15496. libfontconfig.XFcPatternDel(tls, new1, __ccgo_ts+2165)
  15497. libfontconfig.XFcPatternDel(tls, new1, __ccgo_ts+1400)
  15498. name = libfontconfig.XFcNameUnparse(tls, new1)
  15499. libfontconfig.XFcPatternDestroy(tls, new1)
  15500. if !(name != 0) {
  15501. return m_FcFalse
  15502. }
  15503. if libc.Xstrlen(tls, name)+uint32(1) > libc.Uint32FromInt32(len1) {
  15504. libc.Xstrncpy(tls, dest, name, libc.Uint32FromInt32(len1)-uint32(1))
  15505. *(*uint8)(unsafe.Pointer(dest + uintptr(len1-int32(1)))) = uint8('\000')
  15506. libc.Xfree(tls, name)
  15507. return m_FcFalse
  15508. }
  15509. }
  15510. libc.Xstrcpy(tls, dest, name)
  15511. libc.Xfree(tls, name)
  15512. return int32(m_FcTrue)
  15513. }
  15514. const m_NUM_ELT_LOCAL = 128
  15515. const m_UINT32_MAX1 = 4294967295
  15516. /* xftxlfd.c */
  15517. // C documentation
  15518. //
  15519. // /*
  15520. // * Dispatch glyph drawing to the correct XRenderCompositeString function
  15521. // */
  15522. 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) {
  15523. if nchars == 0 {
  15524. return
  15525. }
  15526. switch charwidth {
  15527. case int32(1):
  15528. fallthrough
  15529. default:
  15530. libxrender.XXRenderCompositeString8(tls, dpy, op, src, dst, format, glyphset, srcx, srcy, dstx, dsty, chars, nchars)
  15531. case int32(2):
  15532. libxrender.XXRenderCompositeString16(tls, dpy, op, src, dst, format, glyphset, srcx, srcy, dstx, dsty, chars, nchars)
  15533. case int32(4):
  15534. libxrender.XXRenderCompositeString32(tls, dpy, op, src, dst, format, glyphset, srcx, srcy, dstx, dsty, chars, nchars)
  15535. break
  15536. }
  15537. }
  15538. /*
  15539. * Use the Render extension to draw the glyphs
  15540. */
  15541. 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) {
  15542. bp := tls.Alloc(5136)
  15543. defer tls.Free(5136)
  15544. var char16, char32, char8, chars, font, glyph uintptr
  15545. var dstx, dsty, i, j, width int32
  15546. var g, max TFT_UInt
  15547. var glyphs_loaded TFcBool
  15548. var needed, size Tsize_t
  15549. var wire TGlyph
  15550. var _ /* char_local at bp+1028 */ [1024]uint32
  15551. var _ /* missing at bp+0 */ [256]TFT_UInt
  15552. var _ /* nmissing at bp+1024 */ int32
  15553. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = char16, char32, char8, chars, dstx, dsty, font, g, glyph, glyphs_loaded, i, j, max, needed, size, width, wire
  15554. font = pub
  15555. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  15556. return
  15557. }
  15558. /*
  15559. * Load missing glyphs
  15560. */
  15561. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  15562. max = uint32(0)
  15563. glyphs_loaded = m_FcFalse
  15564. i = 0
  15565. for {
  15566. if !(i < nglyphs) {
  15567. break
  15568. }
  15569. g = *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4))
  15570. if g > max {
  15571. max = g
  15572. }
  15573. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  15574. glyphs_loaded = int32(m_FcTrue)
  15575. }
  15576. goto _1
  15577. _1:
  15578. ;
  15579. i++
  15580. }
  15581. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  15582. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  15583. }
  15584. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  15585. goto bail1
  15586. }
  15587. if max < uint32(0x100) {
  15588. width = int32(1)
  15589. size = uint32(1)
  15590. } else {
  15591. if max < uint32(0x10000) {
  15592. width = int32(2)
  15593. size = uint32(2)
  15594. } else {
  15595. width = int32(4)
  15596. size = uint32(4)
  15597. }
  15598. }
  15599. chars = bp + 1028
  15600. if libc.Uint32FromInt32(nglyphs) > uint32(0xffffffff)/size {
  15601. goto bail1
  15602. }
  15603. needed = libc.Uint32FromInt32(nglyphs) * size
  15604. if needed > uint32(4096) {
  15605. chars = libc.Xmalloc(tls, needed)
  15606. if !(chars != 0) {
  15607. goto bail1
  15608. }
  15609. }
  15610. dstx = x
  15611. dsty = y
  15612. char8 = chars
  15613. char16 = chars
  15614. char32 = chars
  15615. i = 0
  15616. j = libc.Int32FromInt32(0)
  15617. for {
  15618. if !(i < nglyphs) {
  15619. break
  15620. }
  15621. wire = *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4))
  15622. if wire >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(wire)*4)) != 0) {
  15623. wire = uint32(0)
  15624. }
  15625. glyph = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(wire)*4))
  15626. if glyph == libc.UintptrFromInt32(0) {
  15627. goto _2
  15628. }
  15629. if (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0 {
  15630. __XftCompositeString(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, srcx, srcy, x, y, width, chars, j)
  15631. libxrender.XXRenderComposite(tls, dpy, int32(m_PictOpOver), (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture, uint32(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))
  15632. dstx += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15633. dsty += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15634. x = dstx
  15635. y = dsty
  15636. j = 0
  15637. } else {
  15638. switch width {
  15639. case int32(1):
  15640. *(*uint8)(unsafe.Pointer(char8 + uintptr(j))) = uint8(wire)
  15641. case int32(2):
  15642. *(*uint16)(unsafe.Pointer(char16 + uintptr(j)*2)) = uint16(wire)
  15643. case int32(4):
  15644. *(*uint32)(unsafe.Pointer(char32 + uintptr(j)*4)) = wire
  15645. break
  15646. }
  15647. dstx += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15648. dsty += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15649. j++
  15650. }
  15651. goto _2
  15652. _2:
  15653. ;
  15654. i++
  15655. }
  15656. __XftCompositeString(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, srcx, srcy, x, y, width, chars, j)
  15657. if chars != bp+1028 {
  15658. libc.Xfree(tls, chars)
  15659. }
  15660. goto bail1
  15661. bail1:
  15662. ;
  15663. if glyphs_loaded != 0 {
  15664. X_XftFontManageMemory(tls, dpy, pub)
  15665. }
  15666. }
  15667. // C documentation
  15668. //
  15669. // /*
  15670. // * Dispatch glyph drawing to the correct XRenderCompositeText function
  15671. // */
  15672. 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) {
  15673. if nelt == 0 {
  15674. return
  15675. }
  15676. switch eltwidth {
  15677. case int32(1):
  15678. fallthrough
  15679. default:
  15680. libxrender.XXRenderCompositeText8(tls, dpy, op, src, dst, format, srcx, srcy, dstx, dsty, elts, nelt)
  15681. case int32(2):
  15682. libxrender.XXRenderCompositeText16(tls, dpy, op, src, dst, format, srcx, srcy, dstx, dsty, elts, nelt)
  15683. case int32(4):
  15684. libxrender.XXRenderCompositeText32(tls, dpy, op, src, dst, format, srcx, srcy, dstx, dsty, elts, nelt)
  15685. break
  15686. }
  15687. }
  15688. func XXftGlyphSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, glyphs uintptr, nglyphs int32) {
  15689. bp := tls.Alloc(7696)
  15690. defer tls.Free(7696)
  15691. var char16, char32, char8, chars, elts, font, glyph, v4, v7 uintptr
  15692. var g, max TFT_UInt
  15693. var glyphs_loaded TFcBool
  15694. var i, j, n, nelt, size, width, x, y, v3, v5 int32
  15695. var _ /* char_local at bp+1028 */ [1024]uint32
  15696. var _ /* elts_local at bp+5124 */ [128]TXGlyphElt8
  15697. var _ /* missing at bp+0 */ [256]TFT_UInt
  15698. var _ /* nmissing at bp+1024 */ int32
  15699. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = char16, char32, char8, chars, elts, font, g, glyph, glyphs_loaded, i, j, max, n, nelt, size, width, x, y, v3, v4, v5, v7
  15700. font = pub
  15701. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  15702. return
  15703. }
  15704. if !(nglyphs != 0) {
  15705. return
  15706. }
  15707. /*
  15708. * Load missing glyphs
  15709. */
  15710. max = uint32(0)
  15711. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  15712. glyphs_loaded = m_FcFalse
  15713. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs))).Fglyph
  15714. i = 0
  15715. for {
  15716. if !(i < nglyphs) {
  15717. break
  15718. }
  15719. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  15720. if g > max {
  15721. max = g
  15722. }
  15723. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  15724. glyphs_loaded = int32(m_FcTrue)
  15725. }
  15726. goto _1
  15727. _1:
  15728. ;
  15729. i++
  15730. }
  15731. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  15732. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  15733. }
  15734. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  15735. goto bail1
  15736. }
  15737. /*
  15738. * See what encoding size is needed
  15739. */
  15740. if max < uint32(0x100) {
  15741. size = int32(1)
  15742. width = int32(1)
  15743. } else {
  15744. if max < uint32(0x10000) {
  15745. size = int32(2)
  15746. width = int32(2)
  15747. } else {
  15748. size = int32(4)
  15749. width = int32(4)
  15750. }
  15751. }
  15752. chars = bp + 1028
  15753. if nglyphs*size > int32(m_NUM_LOCAL) {
  15754. chars = libc.Xmalloc(tls, libc.Uint32FromInt32(nglyphs*size))
  15755. if !(chars != 0) {
  15756. goto bail1
  15757. }
  15758. }
  15759. char8 = chars
  15760. char16 = chars
  15761. char32 = chars
  15762. /*
  15763. * Compute the number of glyph elts needed
  15764. */
  15765. nelt = int32(1)
  15766. i = 0
  15767. for {
  15768. if !(i < nglyphs) {
  15769. break
  15770. }
  15771. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  15772. /* Substitute default for non-existent glyphs */
  15773. if g >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*4)) != 0) {
  15774. g = uint32(0)
  15775. }
  15776. if *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*4)) != 0 {
  15777. break
  15778. }
  15779. goto _2
  15780. _2:
  15781. ;
  15782. i++
  15783. }
  15784. if i == nglyphs {
  15785. goto bail2
  15786. }
  15787. glyph = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*4))
  15788. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15789. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15790. for {
  15791. i++
  15792. v3 = i
  15793. if !(v3 < nglyphs) {
  15794. break
  15795. }
  15796. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  15797. /* Substitute default for non-existent glyphs */
  15798. if g >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*4)) != 0) {
  15799. g = uint32(0)
  15800. }
  15801. /*
  15802. * check to see if the glyph is placed where it would
  15803. * fall using the normal spacing and if it would render
  15804. * as a XRender glyph
  15805. */
  15806. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*4))
  15807. glyph = v4
  15808. if v4 != 0 && !((*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0) {
  15809. if x != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) || y != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) {
  15810. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx)
  15811. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy)
  15812. nelt++
  15813. }
  15814. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15815. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15816. }
  15817. }
  15818. elts = bp + 5124
  15819. if !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fcolor != 0) && nelt > int32(m_NUM_ELT_LOCAL) {
  15820. elts = libc.Xmalloc(tls, libc.Uint32FromInt32(nelt)*uint32(20))
  15821. if !(elts != 0) {
  15822. goto bail2
  15823. }
  15824. }
  15825. /*
  15826. * Generate the list of glyph elts or render color glyphs
  15827. */
  15828. nelt = 0
  15829. v5 = libc.Int32FromInt32(0)
  15830. y = v5
  15831. x = v5
  15832. n = 0
  15833. j = 0
  15834. i = 0
  15835. for {
  15836. if !(i < nglyphs) {
  15837. break
  15838. }
  15839. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  15840. /* Substitute default for non-existent glyphs */
  15841. if g >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*4)) != 0) {
  15842. g = uint32(0)
  15843. }
  15844. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*4))
  15845. glyph = v7
  15846. if v7 != 0 {
  15847. if (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0 {
  15848. libxrender.XXRenderComposite(tls, dpy, int32(m_PictOpOver), (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture, uint32(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))
  15849. goto _6
  15850. }
  15851. if !(i != 0) || x != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) || y != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) {
  15852. if n != 0 {
  15853. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).Fnchars = n
  15854. nelt++
  15855. }
  15856. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).Fglyphset = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset
  15857. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).Fchars = char8 + uintptr(size*j)
  15858. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).FxOff = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) - x
  15859. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).FyOff = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) - y
  15860. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx)
  15861. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy)
  15862. n = 0
  15863. }
  15864. switch width {
  15865. case int32(1):
  15866. *(*uint8)(unsafe.Pointer(char8 + uintptr(j))) = uint8(g)
  15867. case int32(2):
  15868. *(*uint16)(unsafe.Pointer(char16 + uintptr(j)*2)) = uint16(g)
  15869. case int32(4):
  15870. *(*uint32)(unsafe.Pointer(char32 + uintptr(j)*4)) = g
  15871. break
  15872. }
  15873. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15874. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15875. j++
  15876. n++
  15877. }
  15878. goto _6
  15879. _6:
  15880. ;
  15881. i++
  15882. }
  15883. if n != 0 {
  15884. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).Fnchars = n
  15885. nelt++
  15886. }
  15887. __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)
  15888. if elts != bp+5124 {
  15889. libc.Xfree(tls, elts)
  15890. }
  15891. goto bail2
  15892. bail2:
  15893. ;
  15894. if chars != bp+1028 {
  15895. libc.Xfree(tls, chars)
  15896. }
  15897. goto bail1
  15898. bail1:
  15899. ;
  15900. if glyphs_loaded != 0 {
  15901. X_XftFontManageMemory(tls, dpy, pub)
  15902. }
  15903. }
  15904. func XXftCharSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, chars uintptr, len1 int32) {
  15905. bp := tls.Alloc(8192)
  15906. defer tls.Free(8192)
  15907. var glyphs uintptr
  15908. var i int32
  15909. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphSpec
  15910. _, _ = glyphs, i
  15911. if len1 <= 0 {
  15912. return
  15913. }
  15914. if len1 <= int32(m_NUM_LOCAL) {
  15915. glyphs = bp
  15916. } else {
  15917. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(8))
  15918. if !(glyphs != 0) {
  15919. return
  15920. }
  15921. }
  15922. i = 0
  15923. for {
  15924. if !(i < len1) {
  15925. break
  15926. }
  15927. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph = XXftCharIndex(tls, dpy, pub, (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fucs4)
  15928. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fx
  15929. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fy
  15930. goto _1
  15931. _1:
  15932. ;
  15933. i++
  15934. }
  15935. XXftGlyphSpecRender(tls, dpy, op, src, pub, dst, srcx, srcy, glyphs, len1)
  15936. if glyphs != bp {
  15937. libc.Xfree(tls, glyphs)
  15938. }
  15939. }
  15940. /*
  15941. * Choose which format to draw text in when drawing with fonts
  15942. * of different formats. The trick is that ARGB formats aren't
  15943. * compatible with A formats as PictOpAdd does the wrong thing, so
  15944. * fall back to an A format when presented with an ARGB and A format
  15945. */
  15946. func _XftPreferFormat(tls *libc.TLS, dpy uintptr, a uintptr, b uintptr) (r uintptr) {
  15947. var prefer uintptr
  15948. _ = prefer
  15949. prefer = libc.UintptrFromInt32(0)
  15950. if a == b {
  15951. prefer = a
  15952. } else {
  15953. if libc.BoolInt32((*TXRenderPictFormat)(unsafe.Pointer(a)).Fdepth == int32(32)) != libc.BoolInt32((*TXRenderPictFormat)(unsafe.Pointer(b)).Fdepth == int32(32)) {
  15954. prefer = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA8))
  15955. } else {
  15956. if (*TXRenderPictFormat)(unsafe.Pointer(a)).Fdepth > (*TXRenderPictFormat)(unsafe.Pointer(b)).Fdepth {
  15957. prefer = a
  15958. } else {
  15959. prefer = b
  15960. }
  15961. }
  15962. }
  15963. return prefer
  15964. }
  15965. func XXftGlyphFontSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, dst TPicture, srcx int32, srcy int32, glyphs uintptr, nglyphs int32) {
  15966. bp := tls.Alloc(7696)
  15967. defer tls.Free(7696)
  15968. var char16, char32, char8, chars, elts, firstFont, font, font1, font2, font3, format, glyph, prevPublic, pub, pub1, pub2, pub3, v4, v7 uintptr
  15969. var g, max TFT_UInt
  15970. var glyphs_loaded TFcBool
  15971. var i, j, n, nelt, size, width, x, y, v3, v5 int32
  15972. var _ /* char_local at bp+1028 */ [1024]uint32
  15973. var _ /* elts_local at bp+5124 */ [128]TXGlyphElt8
  15974. var _ /* missing at bp+0 */ [256]TFT_UInt
  15975. var _ /* nmissing at bp+1024 */ int32
  15976. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  15977. if !(nglyphs != 0) {
  15978. return
  15979. }
  15980. /*
  15981. * Load missing glyphs. Have to load them
  15982. * one at a time in case the font changes
  15983. */
  15984. max = uint32(0)
  15985. glyphs_loaded = m_FcFalse
  15986. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fglyph
  15987. i = 0
  15988. for {
  15989. if !(i < nglyphs) {
  15990. break
  15991. }
  15992. pub = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont
  15993. font = pub
  15994. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fglyph
  15995. if g > max {
  15996. max = g
  15997. }
  15998. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  15999. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  16000. glyphs_loaded = int32(m_FcTrue)
  16001. }
  16002. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  16003. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  16004. }
  16005. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  16006. goto bail1
  16007. }
  16008. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  16009. goto bail1
  16010. }
  16011. goto _1
  16012. _1:
  16013. ;
  16014. i++
  16015. }
  16016. /*
  16017. * See what encoding size is needed
  16018. */
  16019. if max < uint32(0x100) {
  16020. size = int32(1)
  16021. width = int32(1)
  16022. } else {
  16023. if max < uint32(0x10000) {
  16024. size = int32(2)
  16025. width = int32(2)
  16026. } else {
  16027. size = int32(4)
  16028. width = int32(4)
  16029. }
  16030. }
  16031. chars = bp + 1028
  16032. if nglyphs*size > int32(m_NUM_LOCAL) {
  16033. chars = libc.Xmalloc(tls, libc.Uint32FromInt32(nglyphs*size))
  16034. if !(chars != 0) {
  16035. goto bail1
  16036. }
  16037. }
  16038. char8 = chars
  16039. char16 = chars
  16040. char32 = chars
  16041. /*
  16042. * Compute the number of glyph elts needed
  16043. */
  16044. nelt = int32(1)
  16045. firstFont = libc.UintptrFromInt32(0)
  16046. i = 0
  16047. for {
  16048. if !(i < nglyphs) {
  16049. break
  16050. }
  16051. pub1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont
  16052. font1 = pub1
  16053. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fglyph
  16054. /* Substitute default for non-existent glyphs */
  16055. if g >= (*TXftFontInt)(unsafe.Pointer(font1)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(g)*4)) != 0) {
  16056. g = uint32(0)
  16057. }
  16058. if *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(g)*4)) != 0 {
  16059. firstFont = font1
  16060. break
  16061. }
  16062. goto _2
  16063. _2:
  16064. ;
  16065. i++
  16066. }
  16067. if i == nglyphs || !(firstFont != 0) {
  16068. goto bail2
  16069. }
  16070. glyph = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(firstFont)).Fglyphs + uintptr(g)*4))
  16071. format = (*TXftFontInt)(unsafe.Pointer(firstFont)).Fformat
  16072. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fx) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  16073. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fy) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  16074. prevPublic = libc.UintptrFromInt32(0)
  16075. for {
  16076. i++
  16077. v3 = i
  16078. if !(v3 < nglyphs) {
  16079. break
  16080. }
  16081. pub2 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont
  16082. font2 = pub2
  16083. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fglyph
  16084. /* Substitute default for non-existent glyphs */
  16085. if g >= (*TXftFontInt)(unsafe.Pointer(font2)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font2)).Fglyphs + uintptr(g)*4)) != 0) {
  16086. g = uint32(0)
  16087. }
  16088. /*
  16089. * check to see if the glyph is placed where it would
  16090. * fall using the normal spacing
  16091. */
  16092. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font2)).Fglyphs + uintptr(g)*4))
  16093. glyph = v4
  16094. if v4 != 0 && !((*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0) {
  16095. if pub2 != prevPublic || x != int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fx) || y != int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fy) {
  16096. prevPublic = pub2
  16097. if (*TXftFontInt)(unsafe.Pointer(font2)).Fformat != format {
  16098. format = _XftPreferFormat(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font2)).Fformat, format)
  16099. }
  16100. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fx)
  16101. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fy)
  16102. nelt++
  16103. }
  16104. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  16105. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  16106. }
  16107. }
  16108. elts = bp + 5124
  16109. if nelt > int32(m_NUM_ELT_LOCAL) {
  16110. elts = libc.Xmalloc(tls, libc.Uint32FromInt32(nelt)*uint32(20))
  16111. if !(elts != 0) {
  16112. goto bail2
  16113. }
  16114. }
  16115. /*
  16116. * Generate the list of glyph elts and render color glyphs
  16117. */
  16118. nelt = 0
  16119. v5 = libc.Int32FromInt32(0)
  16120. y = v5
  16121. x = v5
  16122. n = 0
  16123. j = 0
  16124. prevPublic = libc.UintptrFromInt32(0)
  16125. i = 0
  16126. for {
  16127. if !(i < nglyphs) {
  16128. break
  16129. }
  16130. pub3 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont
  16131. font3 = pub3
  16132. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fglyph
  16133. /* Substitute default for non-existent glyphs */
  16134. if g >= (*TXftFontInt)(unsafe.Pointer(font3)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font3)).Fglyphs + uintptr(g)*4)) != 0) {
  16135. g = uint32(0)
  16136. }
  16137. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font3)).Fglyphs + uintptr(g)*4))
  16138. glyph = v7
  16139. if v7 != 0 {
  16140. if (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0 {
  16141. libxrender.XXRenderComposite(tls, dpy, int32(m_PictOpOver), (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture, uint32(0), dst, 0, 0, 0, 0, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fx)-int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx), int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fy)-int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy), uint32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth), uint32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight))
  16142. goto _6
  16143. }
  16144. if !(i != 0) || pub3 != prevPublic || x != int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fx) || y != int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fy) {
  16145. if n != 0 {
  16146. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).Fnchars = n
  16147. nelt++
  16148. }
  16149. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).Fglyphset = (*TXftFontInt)(unsafe.Pointer(font3)).Fglyphset
  16150. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).Fchars = char8 + uintptr(size*j)
  16151. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).FxOff = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fx) - x
  16152. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).FyOff = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fy) - y
  16153. prevPublic = pub3
  16154. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fx)
  16155. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fy)
  16156. n = 0
  16157. }
  16158. switch width {
  16159. case int32(1):
  16160. *(*uint8)(unsafe.Pointer(char8 + uintptr(j))) = uint8(g)
  16161. case int32(2):
  16162. *(*uint16)(unsafe.Pointer(char16 + uintptr(j)*2)) = uint16(g)
  16163. case int32(4):
  16164. *(*uint32)(unsafe.Pointer(char32 + uintptr(j)*4)) = g
  16165. break
  16166. }
  16167. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  16168. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  16169. j++
  16170. n++
  16171. }
  16172. goto _6
  16173. _6:
  16174. ;
  16175. i++
  16176. }
  16177. if n != 0 {
  16178. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).Fnchars = n
  16179. nelt++
  16180. }
  16181. __XftCompositeText(tls, dpy, op, src, dst, format, srcx, srcy, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fx), int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fy), width, elts, nelt)
  16182. if elts != bp+5124 {
  16183. libc.Xfree(tls, elts)
  16184. }
  16185. goto bail2
  16186. bail2:
  16187. ;
  16188. if chars != bp+1028 {
  16189. libc.Xfree(tls, chars)
  16190. }
  16191. goto bail1
  16192. bail1:
  16193. ;
  16194. if glyphs_loaded != 0 {
  16195. i = 0
  16196. for {
  16197. if !(i < nglyphs) {
  16198. break
  16199. }
  16200. X_XftFontManageMemory(tls, dpy, (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont)
  16201. goto _8
  16202. _8:
  16203. ;
  16204. i++
  16205. }
  16206. }
  16207. }
  16208. func XXftCharFontSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, dst TPicture, srcx int32, srcy int32, chars uintptr, len1 int32) {
  16209. bp := tls.Alloc(12288)
  16210. defer tls.Free(12288)
  16211. var glyphs uintptr
  16212. var i int32
  16213. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphFontSpec
  16214. _, _ = glyphs, i
  16215. if len1 <= 0 {
  16216. return
  16217. }
  16218. if len1 <= int32(m_NUM_LOCAL) {
  16219. glyphs = bp
  16220. } else {
  16221. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(12))
  16222. if !(glyphs != 0) {
  16223. return
  16224. }
  16225. }
  16226. i = 0
  16227. for {
  16228. if !(i < len1) {
  16229. break
  16230. }
  16231. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*12))).Ffont
  16232. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fglyph = XXftCharIndex(tls, dpy, (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont, (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*12))).Fucs4)
  16233. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fx = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*12))).Fx
  16234. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fy = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*12))).Fy
  16235. goto _1
  16236. _1:
  16237. ;
  16238. i++
  16239. }
  16240. XXftGlyphFontSpecRender(tls, dpy, op, src, dst, srcx, srcy, glyphs, len1)
  16241. if glyphs != bp {
  16242. libc.Xfree(tls, glyphs)
  16243. }
  16244. }
  16245. 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) {
  16246. bp := tls.Alloc(4096)
  16247. defer tls.Free(4096)
  16248. var glyphs uintptr
  16249. var i int32
  16250. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16251. _, _ = glyphs, i
  16252. if len1 <= 0 {
  16253. return
  16254. }
  16255. if len1 <= int32(m_NUM_LOCAL) {
  16256. glyphs = bp
  16257. } else {
  16258. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  16259. if !(glyphs != 0) {
  16260. return
  16261. }
  16262. }
  16263. i = 0
  16264. for {
  16265. if !(i < len1) {
  16266. break
  16267. }
  16268. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  16269. goto _1
  16270. _1:
  16271. ;
  16272. i++
  16273. }
  16274. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16275. if glyphs != bp {
  16276. libc.Xfree(tls, glyphs)
  16277. }
  16278. }
  16279. 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) {
  16280. bp := tls.Alloc(4096)
  16281. defer tls.Free(4096)
  16282. var glyphs uintptr
  16283. var i int32
  16284. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16285. _, _ = glyphs, i
  16286. if len1 <= 0 {
  16287. return
  16288. }
  16289. if len1 <= int32(m_NUM_LOCAL) {
  16290. glyphs = bp
  16291. } else {
  16292. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  16293. if !(glyphs != 0) {
  16294. return
  16295. }
  16296. }
  16297. i = 0
  16298. for {
  16299. if !(i < len1) {
  16300. break
  16301. }
  16302. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  16303. goto _1
  16304. _1:
  16305. ;
  16306. i++
  16307. }
  16308. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16309. if glyphs != bp {
  16310. libc.Xfree(tls, glyphs)
  16311. }
  16312. }
  16313. 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) {
  16314. bp := tls.Alloc(4096)
  16315. defer tls.Free(4096)
  16316. var glyphs uintptr
  16317. var i int32
  16318. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16319. _, _ = glyphs, i
  16320. if len1 <= 0 {
  16321. return
  16322. }
  16323. if len1 <= int32(m_NUM_LOCAL) {
  16324. glyphs = bp
  16325. } else {
  16326. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  16327. if !(glyphs != 0) {
  16328. return
  16329. }
  16330. }
  16331. i = 0
  16332. for {
  16333. if !(i < len1) {
  16334. break
  16335. }
  16336. *(*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)))))))
  16337. goto _1
  16338. _1:
  16339. ;
  16340. i++
  16341. }
  16342. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16343. if glyphs != bp {
  16344. libc.Xfree(tls, glyphs)
  16345. }
  16346. }
  16347. 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) {
  16348. bp := tls.Alloc(4096)
  16349. defer tls.Free(4096)
  16350. var glyphs uintptr
  16351. var i int32
  16352. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16353. _, _ = glyphs, i
  16354. if len1 <= 0 {
  16355. return
  16356. }
  16357. if len1 <= int32(m_NUM_LOCAL) {
  16358. glyphs = bp
  16359. } else {
  16360. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  16361. if !(glyphs != 0) {
  16362. return
  16363. }
  16364. }
  16365. i = 0
  16366. for {
  16367. if !(i < len1) {
  16368. break
  16369. }
  16370. *(*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)))
  16371. goto _1
  16372. _1:
  16373. ;
  16374. i++
  16375. }
  16376. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16377. if glyphs != bp {
  16378. libc.Xfree(tls, glyphs)
  16379. }
  16380. }
  16381. 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) {
  16382. bp := tls.Alloc(4096)
  16383. defer tls.Free(4096)
  16384. var glyphs uintptr
  16385. var i int32
  16386. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16387. _, _ = glyphs, i
  16388. if len1 <= 0 {
  16389. return
  16390. }
  16391. if len1 <= int32(m_NUM_LOCAL) {
  16392. glyphs = bp
  16393. } else {
  16394. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  16395. if !(glyphs != 0) {
  16396. return
  16397. }
  16398. }
  16399. i = 0
  16400. for {
  16401. if !(i < len1) {
  16402. break
  16403. }
  16404. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  16405. goto _1
  16406. _1:
  16407. ;
  16408. i++
  16409. }
  16410. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16411. if glyphs != bp {
  16412. libc.Xfree(tls, glyphs)
  16413. }
  16414. }
  16415. 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) {
  16416. bp := tls.Alloc(4096)
  16417. defer tls.Free(4096)
  16418. var glyphs uintptr
  16419. var i int32
  16420. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16421. _, _ = glyphs, i
  16422. if len1 <= 0 {
  16423. return
  16424. }
  16425. if len1 <= int32(m_NUM_LOCAL) {
  16426. glyphs = bp
  16427. } else {
  16428. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  16429. if !(glyphs != 0) {
  16430. return
  16431. }
  16432. }
  16433. i = 0
  16434. for {
  16435. if !(i < len1) {
  16436. break
  16437. }
  16438. *(*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)))))))
  16439. goto _1
  16440. _1:
  16441. ;
  16442. i++
  16443. }
  16444. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16445. if glyphs != bp {
  16446. libc.Xfree(tls, glyphs)
  16447. }
  16448. }
  16449. 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) {
  16450. bp := tls.Alloc(4096)
  16451. defer tls.Free(4096)
  16452. var glyphs uintptr
  16453. var i int32
  16454. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16455. _, _ = glyphs, i
  16456. if len1 <= 0 {
  16457. return
  16458. }
  16459. if len1 <= int32(m_NUM_LOCAL) {
  16460. glyphs = bp
  16461. } else {
  16462. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  16463. if !(glyphs != 0) {
  16464. return
  16465. }
  16466. }
  16467. i = 0
  16468. for {
  16469. if !(i < len1) {
  16470. break
  16471. }
  16472. *(*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)))
  16473. goto _1
  16474. _1:
  16475. ;
  16476. i++
  16477. }
  16478. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16479. if glyphs != bp {
  16480. libc.Xfree(tls, glyphs)
  16481. }
  16482. }
  16483. 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) {
  16484. bp := tls.Alloc(4112)
  16485. defer tls.Free(4112)
  16486. var glyphs, glyphs_new uintptr
  16487. var i, l, size, v1, v3 int32
  16488. var v2 bool
  16489. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16490. var _ /* ucs4 at bp+4096 */ TFcChar32
  16491. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  16492. if len1 <= 0 {
  16493. return
  16494. }
  16495. i = 0
  16496. glyphs = bp
  16497. size = int32(m_NUM_LOCAL)
  16498. for {
  16499. if v2 = len1 != 0; v2 {
  16500. v1 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  16501. l = v1
  16502. }
  16503. if !(v2 && v1 > 0) {
  16504. break
  16505. }
  16506. if i == size {
  16507. glyphs_new = libc.Xmalloc(tls, libc.Uint32FromInt32(size*libc.Int32FromInt32(2))*uint32(4))
  16508. if !(glyphs_new != 0) {
  16509. if glyphs != bp {
  16510. libc.Xfree(tls, glyphs)
  16511. }
  16512. return
  16513. }
  16514. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint32FromInt32(size)*uint32(4))
  16515. size *= int32(2)
  16516. if glyphs != bp {
  16517. libc.Xfree(tls, glyphs)
  16518. }
  16519. glyphs = glyphs_new
  16520. }
  16521. v3 = i
  16522. i++
  16523. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  16524. string1 += uintptr(l)
  16525. len1 -= l
  16526. }
  16527. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, i)
  16528. if glyphs != bp {
  16529. libc.Xfree(tls, glyphs)
  16530. }
  16531. }
  16532. 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) {
  16533. bp := tls.Alloc(4112)
  16534. defer tls.Free(4112)
  16535. var glyphs, glyphs_new uintptr
  16536. var i, l, size, v1, v3 int32
  16537. var v2 bool
  16538. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16539. var _ /* ucs4 at bp+4096 */ TFcChar32
  16540. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  16541. if len1 <= 0 {
  16542. return
  16543. }
  16544. i = 0
  16545. glyphs = bp
  16546. size = int32(m_NUM_LOCAL)
  16547. for {
  16548. if v2 = len1 != 0; v2 {
  16549. v1 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  16550. l = v1
  16551. }
  16552. if !(v2 && v1 > 0) {
  16553. break
  16554. }
  16555. if i == size {
  16556. glyphs_new = libc.Xmalloc(tls, libc.Uint32FromInt32(size*libc.Int32FromInt32(2))*uint32(4))
  16557. if !(glyphs_new != 0) {
  16558. if glyphs != bp {
  16559. libc.Xfree(tls, glyphs)
  16560. }
  16561. return
  16562. }
  16563. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint32FromInt32(size)*uint32(4))
  16564. size *= int32(2)
  16565. if glyphs != bp {
  16566. libc.Xfree(tls, glyphs)
  16567. }
  16568. glyphs = glyphs_new
  16569. }
  16570. v3 = i
  16571. i++
  16572. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  16573. string1 += uintptr(l)
  16574. len1 -= l
  16575. }
  16576. XXftGlyphRender(tls, dpy, int32(m_PictOpOver), src, pub, dst, srcx, srcy, x, y, glyphs, i)
  16577. if glyphs != bp {
  16578. libc.Xfree(tls, glyphs)
  16579. }
  16580. }
  16581. const m_UINT32_MAX2 = "0xffffffffu"
  16582. /* xftxlfd.c */
  16583. func X_XftMatchSymbolic(tls *libc.TLS, s uintptr, n int32, name uintptr, def int32) (r int32) {
  16584. var v1 int32
  16585. _ = v1
  16586. for {
  16587. v1 = n
  16588. n--
  16589. if !(v1 != 0) {
  16590. break
  16591. }
  16592. if !(libfontconfig.XFcStrCmpIgnoreCase(tls, (*TXftSymbolic)(unsafe.Pointer(s)).Fname, name) != 0) {
  16593. return (*TXftSymbolic)(unsafe.Pointer(s)).Fvalue
  16594. }
  16595. s += 8
  16596. }
  16597. return def
  16598. }
  16599. /* xftxlfd.c */
  16600. func XXftNativeByteOrder(tls *libc.TLS) (r int32) {
  16601. bp := tls.Alloc(16)
  16602. defer tls.Free(16)
  16603. var _ /* whichbyte at bp+0 */ int32
  16604. *(*int32)(unsafe.Pointer(bp)) = int32(1)
  16605. if *(*uint8)(unsafe.Pointer(bp)) != 0 {
  16606. return m_LSBFirst
  16607. }
  16608. return int32(m_MSBFirst)
  16609. }
  16610. /* byte swap a 32-bit value */
  16611. /* byte swap a short */
  16612. /* byte swap a three-byte unit */
  16613. func XXftSwapCARD32(tls *libc.TLS, data uintptr, u int32) {
  16614. var n uint8
  16615. var v1 int32
  16616. _, _ = n, v1
  16617. for {
  16618. v1 = u
  16619. u--
  16620. if !(v1 != 0) {
  16621. break
  16622. }
  16623. n = *(*uint8)(unsafe.Pointer(data))
  16624. *(*uint8)(unsafe.Pointer(data)) = *(*uint8)(unsafe.Pointer(data + 3))
  16625. *(*uint8)(unsafe.Pointer(data + 3)) = n
  16626. n = *(*uint8)(unsafe.Pointer(data + 1))
  16627. *(*uint8)(unsafe.Pointer(data + 1)) = *(*uint8)(unsafe.Pointer(data + 2))
  16628. *(*uint8)(unsafe.Pointer(data + 2)) = n
  16629. data += 4
  16630. }
  16631. }
  16632. func XXftSwapCARD24(tls *libc.TLS, data uintptr, width int32, height int32) {
  16633. var d uintptr
  16634. var n uint8
  16635. var u, units, v1, v2 int32
  16636. _, _, _, _, _, _ = d, n, u, units, v1, v2
  16637. units = width / int32(3)
  16638. for {
  16639. v1 = height
  16640. height--
  16641. if !(v1 != 0) {
  16642. break
  16643. }
  16644. d = data
  16645. data += uintptr(width)
  16646. u = units
  16647. for {
  16648. v2 = u
  16649. u--
  16650. if !(v2 != 0) {
  16651. break
  16652. }
  16653. n = *(*uint8)(unsafe.Pointer(d))
  16654. *(*uint8)(unsafe.Pointer(d)) = *(*uint8)(unsafe.Pointer(d + 2))
  16655. *(*uint8)(unsafe.Pointer(d + 2)) = n
  16656. d += uintptr(3)
  16657. }
  16658. }
  16659. }
  16660. func XXftSwapCARD16(tls *libc.TLS, data uintptr, u int32) {
  16661. var n uint8
  16662. var v1 int32
  16663. _, _ = n, v1
  16664. for {
  16665. v1 = u
  16666. u--
  16667. if !(v1 != 0) {
  16668. break
  16669. }
  16670. n = *(*uint8)(unsafe.Pointer(data))
  16671. *(*uint8)(unsafe.Pointer(data)) = *(*uint8)(unsafe.Pointer(data + 1))
  16672. *(*uint8)(unsafe.Pointer(data + 1)) = n
  16673. data += 2
  16674. }
  16675. }
  16676. func XXftSwapImage(tls *libc.TLS, image uintptr) {
  16677. switch (*TXImage)(unsafe.Pointer(image)).Fbits_per_pixel {
  16678. case int32(32):
  16679. XXftSwapCARD32(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fheight*(*TXImage)(unsafe.Pointer(image)).Fbytes_per_line>>int32(2))
  16680. case int32(24):
  16681. XXftSwapCARD24(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line, (*TXImage)(unsafe.Pointer(image)).Fheight)
  16682. case int32(16):
  16683. XXftSwapCARD16(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fheight*(*TXImage)(unsafe.Pointer(image)).Fbytes_per_line>>int32(1))
  16684. default:
  16685. break
  16686. }
  16687. }
  16688. /* xftxlfd.c */
  16689. var _XftXlfdWeights = [6]TXftSymbolic{
  16690. 0: {
  16691. Fname: __ccgo_ts + 2170,
  16692. Fvalue: int32(m_FC_WEIGHT_LIGHT),
  16693. },
  16694. 1: {
  16695. Fname: __ccgo_ts + 2176,
  16696. Fvalue: int32(m_FC_WEIGHT_MEDIUM),
  16697. },
  16698. 2: {
  16699. Fname: __ccgo_ts + 2183,
  16700. Fvalue: int32(m_FC_WEIGHT_MEDIUM),
  16701. },
  16702. 3: {
  16703. Fname: __ccgo_ts + 2191,
  16704. Fvalue: int32(m_FC_WEIGHT_DEMIBOLD),
  16705. },
  16706. 4: {
  16707. Fname: __ccgo_ts + 2200,
  16708. Fvalue: int32(m_FC_WEIGHT_BOLD),
  16709. },
  16710. 5: {
  16711. Fname: __ccgo_ts + 2205,
  16712. Fvalue: int32(m_FC_WEIGHT_BLACK),
  16713. },
  16714. }
  16715. var _XftXlfdSlants = [3]TXftSymbolic{
  16716. 0: {
  16717. Fname: __ccgo_ts + 2211,
  16718. },
  16719. 1: {
  16720. Fname: __ccgo_ts + 2213,
  16721. Fvalue: int32(m_FC_SLANT_ITALIC),
  16722. },
  16723. 2: {
  16724. Fname: __ccgo_ts + 2215,
  16725. Fvalue: int32(m_FC_SLANT_OBLIQUE),
  16726. },
  16727. }
  16728. // C documentation
  16729. //
  16730. // /*
  16731. // * Cut out one XLFD field, placing it in 'save' and return
  16732. // * the start of 'save'
  16733. // */
  16734. func _XftSplitStr(tls *libc.TLS, field uintptr, save uintptr) (r uintptr) {
  16735. var c uint8
  16736. var s, v1, v2 uintptr
  16737. _, _, _, _ = c, s, v1, v2
  16738. s = save
  16739. for *(*uint8)(unsafe.Pointer(field)) != 0 {
  16740. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(field))) == int32('-') {
  16741. break
  16742. }
  16743. v1 = field
  16744. field++
  16745. c = *(*uint8)(unsafe.Pointer(v1))
  16746. v2 = save
  16747. save++
  16748. *(*uint8)(unsafe.Pointer(v2)) = c
  16749. }
  16750. *(*uint8)(unsafe.Pointer(save)) = uint8(0)
  16751. return s
  16752. }
  16753. /*
  16754. * convert one XLFD numeric field. Return -1 if the field is '*'
  16755. */
  16756. func _XftGetInt(tls *libc.TLS, ptr uintptr, val uintptr) (r uintptr) {
  16757. var v2 uintptr
  16758. _ = v2
  16759. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(ptr))) == int32('*') {
  16760. *(*int32)(unsafe.Pointer(val)) = -int32(1)
  16761. ptr++
  16762. } else {
  16763. *(*int32)(unsafe.Pointer(val)) = 0
  16764. for {
  16765. if !(libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(ptr))) >= int32('0') && libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(ptr))) <= int32('9')) {
  16766. break
  16767. }
  16768. v2 = ptr
  16769. ptr++
  16770. *(*int32)(unsafe.Pointer(val)) = *(*int32)(unsafe.Pointer(val))*int32(10) + libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(v2))) - int32('0')
  16771. goto _1
  16772. _1:
  16773. }
  16774. }
  16775. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(ptr))) == int32('-') {
  16776. return ptr
  16777. }
  16778. return libc.UintptrFromInt32(0)
  16779. }
  16780. func XXftXlfdParse(tls *libc.TLS, xlfd_orig uintptr, ignore_scalable TFcBool, complete TFcBool) (r uintptr) {
  16781. bp := tls.Alloc(16)
  16782. defer tls.Free(16)
  16783. var dpixel float64
  16784. 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
  16785. var slant_value, weight_value int32
  16786. var _ /* pixel at bp+0 */ int32
  16787. var _ /* point at bp+4 */ int32
  16788. var _ /* resx at bp+8 */ int32
  16789. var _ /* resy at bp+12 */ int32
  16790. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  16791. xlfd = xlfd_orig
  16792. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(xlfd))) != int32('-') {
  16793. return libc.UintptrFromInt32(0)
  16794. }
  16795. xlfd++
  16796. v3 = xlfd
  16797. v2 = v3
  16798. foundry = v2
  16799. v1 = libc.Xstrchr(tls, v2, int32('-'))
  16800. xlfd = v1
  16801. if !(v1 != 0) {
  16802. return libc.UintptrFromInt32(0)
  16803. }
  16804. xlfd++
  16805. v6 = xlfd
  16806. v5 = v6
  16807. family = v5
  16808. v4 = libc.Xstrchr(tls, v5, int32('-'))
  16809. xlfd = v4
  16810. if !(v4 != 0) {
  16811. return libc.UintptrFromInt32(0)
  16812. }
  16813. xlfd++
  16814. v9 = xlfd
  16815. v8 = v9
  16816. weight_name = v8
  16817. v7 = libc.Xstrchr(tls, v8, int32('-'))
  16818. xlfd = v7
  16819. if !(v7 != 0) {
  16820. return libc.UintptrFromInt32(0)
  16821. }
  16822. xlfd++
  16823. v12 = xlfd
  16824. v11 = v12
  16825. slant = v11
  16826. v10 = libc.Xstrchr(tls, v11, int32('-'))
  16827. xlfd = v10
  16828. if !(v10 != 0) {
  16829. return libc.UintptrFromInt32(0)
  16830. }
  16831. xlfd++
  16832. v14 = xlfd
  16833. v13 = libc.Xstrchr(tls, v14, int32('-'))
  16834. xlfd = v13
  16835. if !(v13 != 0) {
  16836. return libc.UintptrFromInt32(0)
  16837. }
  16838. xlfd++
  16839. v16 = xlfd
  16840. v15 = libc.Xstrchr(tls, v16, int32('-'))
  16841. xlfd = v15
  16842. if !(v15 != 0) {
  16843. return libc.UintptrFromInt32(0)
  16844. }
  16845. xlfd++
  16846. v18 = xlfd
  16847. v17 = _XftGetInt(tls, v18, bp)
  16848. xlfd = v17
  16849. if !(v17 != 0) {
  16850. return libc.UintptrFromInt32(0)
  16851. }
  16852. xlfd++
  16853. v20 = xlfd
  16854. v19 = _XftGetInt(tls, v20, bp+4)
  16855. xlfd = v19
  16856. if !(v19 != 0) {
  16857. return libc.UintptrFromInt32(0)
  16858. }
  16859. xlfd++
  16860. v22 = xlfd
  16861. v21 = _XftGetInt(tls, v22, bp+8)
  16862. xlfd = v21
  16863. if !(v21 != 0) {
  16864. return libc.UintptrFromInt32(0)
  16865. }
  16866. xlfd++
  16867. v24 = xlfd
  16868. v23 = _XftGetInt(tls, v24, bp+12)
  16869. xlfd = v23
  16870. if !(v23 != 0) {
  16871. return libc.UintptrFromInt32(0)
  16872. }
  16873. xlfd++
  16874. v26 = xlfd
  16875. v25 = libc.Xstrchr(tls, v26, int32('-'))
  16876. xlfd = v25
  16877. if !(v25 != 0) {
  16878. return libc.UintptrFromInt32(0)
  16879. }
  16880. xlfd++
  16881. v28 = xlfd
  16882. v27 = libc.Xstrchr(tls, v28, int32('-'))
  16883. xlfd = v27
  16884. if !(v27 != 0) {
  16885. return libc.UintptrFromInt32(0)
  16886. }
  16887. xlfd++
  16888. v30 = xlfd
  16889. v29 = libc.Xstrchr(tls, v30, int32('-'))
  16890. xlfd = v29
  16891. if !(v29 != 0) {
  16892. return libc.UintptrFromInt32(0)
  16893. }
  16894. /* make sure no fields follow this one */
  16895. xlfd++
  16896. v31 = xlfd
  16897. if libc.Xstrchr(tls, v31, int32('-')) != 0 {
  16898. return libc.UintptrFromInt32(0)
  16899. }
  16900. if !(*(*int32)(unsafe.Pointer(bp)) != 0) {
  16901. return libc.UintptrFromInt32(0)
  16902. }
  16903. pat = libfontconfig.XFcPatternCreate(tls)
  16904. if !(pat != 0) {
  16905. return libc.UintptrFromInt32(0)
  16906. }
  16907. save = libc.Xmalloc(tls, libc.Xstrlen(tls, foundry)+uint32(1))
  16908. if !(save != 0) {
  16909. libfontconfig.XFcPatternDestroy(tls, pat)
  16910. return libc.UintptrFromInt32(0)
  16911. }
  16912. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+2217, xlfd_orig) != 0) {
  16913. goto bail
  16914. }
  16915. _XftSplitStr(tls, foundry, save)
  16916. if *(*uint8)(unsafe.Pointer(save)) != 0 && libc.Xstrcmp(tls, save, __ccgo_ts+2222) != 0 {
  16917. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+2224, save) != 0) {
  16918. goto bail
  16919. }
  16920. }
  16921. _XftSplitStr(tls, family, save)
  16922. if *(*uint8)(unsafe.Pointer(save)) != 0 && libc.Xstrcmp(tls, save, __ccgo_ts+2222) != 0 {
  16923. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+2232, save) != 0) {
  16924. goto bail
  16925. }
  16926. }
  16927. weight_value = X_XftMatchSymbolic(tls, uintptr(unsafe.Pointer(&_XftXlfdWeights)), libc.Int32FromUint32(libc.Uint32FromInt64(48)/libc.Uint32FromInt64(8)), _XftSplitStr(tls, weight_name, save), int32(m_FC_WEIGHT_MEDIUM))
  16928. if !(libfontconfig.XFcPatternAddInteger(tls, pat, __ccgo_ts+2239, weight_value) != 0) {
  16929. goto bail
  16930. }
  16931. slant_value = X_XftMatchSymbolic(tls, uintptr(unsafe.Pointer(&_XftXlfdSlants)), libc.Int32FromUint32(libc.Uint32FromInt64(24)/libc.Uint32FromInt64(8)), _XftSplitStr(tls, slant, save), m_FC_SLANT_ROMAN)
  16932. if !(libfontconfig.XFcPatternAddInteger(tls, pat, __ccgo_ts+2246, slant_value) != 0) {
  16933. goto bail
  16934. }
  16935. dpixel = float64(*(*int32)(unsafe.Pointer(bp)))
  16936. if *(*int32)(unsafe.Pointer(bp + 4)) > 0 {
  16937. if !(libfontconfig.XFcPatternAddDouble(tls, pat, __ccgo_ts+2252, float64(*(*int32)(unsafe.Pointer(bp + 4)))/float64(10)) != 0) {
  16938. goto bail
  16939. }
  16940. if *(*int32)(unsafe.Pointer(bp)) <= 0 && *(*int32)(unsafe.Pointer(bp + 12)) > 0 {
  16941. dpixel = float64(float64(*(*int32)(unsafe.Pointer(bp + 4)))*float64(*(*int32)(unsafe.Pointer(bp + 12)))) / float64(720)
  16942. }
  16943. }
  16944. if dpixel > libc.Float64FromInt32(0) {
  16945. if !(libfontconfig.XFcPatternAddDouble(tls, pat, __ccgo_ts+1243, dpixel) != 0) {
  16946. goto bail
  16947. }
  16948. }
  16949. libc.Xfree(tls, save)
  16950. return pat
  16951. goto bail
  16952. bail:
  16953. ;
  16954. libc.Xfree(tls, save)
  16955. libfontconfig.XFcPatternDestroy(tls, pat)
  16956. return libc.UintptrFromInt32(0)
  16957. }
  16958. func __ccgo_fp(f interface{}) uintptr {
  16959. type iface [2]uintptr
  16960. return (*iface)(unsafe.Pointer(&f))[1]
  16961. }
  16962. /* xftxlfd.c */
  16963. var X_XftDisplayInfo uintptr
  16964. /* xftxlfd.c */
  16965. var X_XftFTlibrary TFT_Library
  16966. var __ccgo_ts = (*reflect.StringHeader)(unsafe.Pointer(&__ccgo_ts1)).Data
  16967. 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"