ccgo_linux_386.go 543 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901
  1. // Code generated for linux/386 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/386 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libfreetype/include/linux/386 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libX11/include/linux/386 -I /home/jnml/src/modernc.org/builder/.exclude/modernc.org/libXrender/include/linux/386 -lfontconfig -lfreetype -lX11 -lXrender -o libxft.go --package-name libxft src/.libs/libXft.a', DO NOT EDIT.
  2. //go:build linux && 386
  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_PAGESIZE = 4096
  717. const m_PAGE_SIZE = "PAGESIZE"
  718. const m_PATH_MAX = 4096
  719. const m_PDP_ENDIAN = "__PDP_ENDIAN"
  720. const m_PIPE_BUF = 4096
  721. const m_PTHREAD_CANCEL_ASYNCHRONOUS = 1
  722. const m_PTHREAD_CANCEL_DEFERRED = 0
  723. const m_PTHREAD_CANCEL_DISABLE = 1
  724. const m_PTHREAD_CANCEL_ENABLE = 0
  725. const m_PTHREAD_CANCEL_MASKED = 2
  726. const m_PTHREAD_CREATE_DETACHED = 1
  727. const m_PTHREAD_CREATE_JOINABLE = 0
  728. const m_PTHREAD_DESTRUCTOR_ITERATIONS = 4
  729. const m_PTHREAD_EXPLICIT_SCHED = 1
  730. const m_PTHREAD_INHERIT_SCHED = 0
  731. const m_PTHREAD_KEYS_MAX = 128
  732. const m_PTHREAD_MUTEX_DEFAULT = 0
  733. const m_PTHREAD_MUTEX_ERRORCHECK = 2
  734. const m_PTHREAD_MUTEX_NORMAL = 0
  735. const m_PTHREAD_MUTEX_RECURSIVE = 1
  736. const m_PTHREAD_MUTEX_ROBUST = 1
  737. const m_PTHREAD_MUTEX_STALLED = 0
  738. const m_PTHREAD_ONCE_INIT = 0
  739. const m_PTHREAD_PRIO_INHERIT = 1
  740. const m_PTHREAD_PRIO_NONE = 0
  741. const m_PTHREAD_PRIO_PROTECT = 2
  742. const m_PTHREAD_PROCESS_PRIVATE = 0
  743. const m_PTHREAD_PROCESS_SHARED = 1
  744. const m_PTHREAD_SCOPE_PROCESS = 1
  745. const m_PTHREAD_SCOPE_SYSTEM = 0
  746. const m_PTHREAD_STACK_MIN = 2048
  747. const m_PTRDIFF_MAX = "INT32_MAX"
  748. const m_PTRDIFF_MIN = "INT32_MIN"
  749. const m_PTSPERBATCH = 1024
  750. const m_P_tmpdir = "/tmp"
  751. const m_ParentRelative = 1
  752. const m_PictOpAdd = 12
  753. const m_PictOpAtop = 9
  754. const m_PictOpAtopReverse = 10
  755. const m_PictOpBlendMaximum = 0x3e
  756. const m_PictOpBlendMinimum = 0x30
  757. const m_PictOpClear = 0
  758. const m_PictOpColorBurn = 0x36
  759. const m_PictOpColorDodge = 0x35
  760. const m_PictOpConjointAtop = 0x29
  761. const m_PictOpConjointAtopReverse = 0x2a
  762. const m_PictOpConjointClear = 0x20
  763. const m_PictOpConjointDst = 0x22
  764. const m_PictOpConjointIn = 0x25
  765. const m_PictOpConjointInReverse = 0x26
  766. const m_PictOpConjointMaximum = 0x2b
  767. const m_PictOpConjointMinimum = 0x20
  768. const m_PictOpConjointOut = 0x27
  769. const m_PictOpConjointOutReverse = 0x28
  770. const m_PictOpConjointOver = 0x23
  771. const m_PictOpConjointOverReverse = 0x24
  772. const m_PictOpConjointSrc = 0x21
  773. const m_PictOpConjointXor = 0x2b
  774. const m_PictOpDarken = 0x33
  775. const m_PictOpDifference = 0x39
  776. const m_PictOpDisjointAtop = 0x19
  777. const m_PictOpDisjointAtopReverse = 0x1a
  778. const m_PictOpDisjointClear = 0x10
  779. const m_PictOpDisjointDst = 0x12
  780. const m_PictOpDisjointIn = 0x15
  781. const m_PictOpDisjointInReverse = 0x16
  782. const m_PictOpDisjointMaximum = 0x1b
  783. const m_PictOpDisjointMinimum = 0x10
  784. const m_PictOpDisjointOut = 0x17
  785. const m_PictOpDisjointOutReverse = 0x18
  786. const m_PictOpDisjointOver = 0x13
  787. const m_PictOpDisjointOverReverse = 0x14
  788. const m_PictOpDisjointSrc = 0x11
  789. const m_PictOpDisjointXor = 0x1b
  790. const m_PictOpDst = 2
  791. const m_PictOpExclusion = 0x3a
  792. const m_PictOpHSLColor = 0x3d
  793. const m_PictOpHSLHue = 0x3b
  794. const m_PictOpHSLLuminosity = 0x3e
  795. const m_PictOpHSLSaturation = 0x3c
  796. const m_PictOpHardLight = 0x37
  797. const m_PictOpIn = 5
  798. const m_PictOpInReverse = 6
  799. const m_PictOpLighten = 0x34
  800. const m_PictOpMaximum = 13
  801. const m_PictOpMinimum = 0
  802. const m_PictOpMultiply = 0x30
  803. const m_PictOpOut = 7
  804. const m_PictOpOutReverse = 8
  805. const m_PictOpOver = 3
  806. const m_PictOpOverReverse = 4
  807. const m_PictOpOverlay = 0x32
  808. const m_PictOpSaturate = 13
  809. const m_PictOpScreen = 0x31
  810. const m_PictOpSoftLight = 0x38
  811. const m_PictOpSrc = 1
  812. const m_PictOpXor = 11
  813. const m_PictStandardA1 = 4
  814. const m_PictStandardA4 = 3
  815. const m_PictStandardA8 = 2
  816. const m_PictStandardARGB32 = 0
  817. const m_PictStandardNUM = 5
  818. const m_PictStandardRGB24 = 1
  819. const m_PictTypeDirect = 1
  820. const m_PictTypeIndexed = 0
  821. const m_PlaceOnBottom = 1
  822. const m_PlaceOnTop = 0
  823. const m_PointerRoot = 1
  824. const m_PointerWindow = 0
  825. const m_PolyEdgeSharp = 0
  826. const m_PolyEdgeSmooth = 1
  827. const m_PolyModeImprecise = 1
  828. const m_PolyModePrecise = 0
  829. const m_PreferBlanking = 1
  830. const m_PropModeAppend = 2
  831. const m_PropModePrepend = 1
  832. const m_PropModeReplace = 0
  833. const m_PropertyDelete = 1
  834. const m_PropertyNewValue = 0
  835. const m_PropertyNotify = 28
  836. const m_PseudoColor = 3
  837. const m_QueuedAfterFlush = 2
  838. const m_QueuedAfterReading = 1
  839. const m_QueuedAlready = 0
  840. const m_RAND_MAX = 0x7fffffff
  841. const m_RENDER_MAJOR = 0
  842. const m_RENDER_MINOR = 11
  843. const m_RENDER_NAME = "RENDER"
  844. const m_RE_DUP_MAX = 255
  845. const m_RaiseLowest = 0
  846. const m_RectangleIn = 1
  847. const m_RectangleOut = 0
  848. const m_RectanglePart = 2
  849. const m_ReparentNotify = 21
  850. const m_RepeatNone = 0
  851. const m_RepeatNormal = 1
  852. const m_RepeatPad = 2
  853. const m_RepeatReflect = 3
  854. const m_ReplayKeyboard = 5
  855. const m_ReplayPointer = 2
  856. const m_ResizeRequest = 25
  857. const m_RetainPermanent = 1
  858. const m_RetainTemporary = 2
  859. const m_RevertToParent = 2
  860. const m_SCHAR_MAX = 127
  861. const m_SCHED_BATCH = 3
  862. const m_SCHED_DEADLINE = 6
  863. const m_SCHED_FIFO = 1
  864. const m_SCHED_IDLE = 5
  865. const m_SCHED_OTHER = 0
  866. const m_SCHED_RESET_ON_FORK = 0x40000000
  867. const m_SCHED_RR = 2
  868. const m_SEM_NSEMS_MAX = 256
  869. const m_SEM_VALUE_MAX = 0x7fffffff
  870. const m_SHRT_MAX = 0x7fff
  871. const m_SIG_ATOMIC_MAX = "INT32_MAX"
  872. const m_SIG_ATOMIC_MIN = "INT32_MIN"
  873. const m_SIZE_MAX = "UINT32_MAX"
  874. const m_SSIZE_MAX = "LONG_MAX"
  875. const m_STATX_ALL = 0xfff
  876. const m_STATX_ATIME = 0x20
  877. const m_STATX_BASIC_STATS = 0x7ff
  878. const m_STATX_BLOCKS = 0x400
  879. const m_STATX_BTIME = 0x800
  880. const m_STATX_CTIME = 0x80
  881. const m_STATX_GID = 0x10
  882. const m_STATX_INO = 0x100
  883. const m_STATX_MODE = 2
  884. const m_STATX_MTIME = 0x40
  885. const m_STATX_NLINK = 4
  886. const m_STATX_SIZE = 0x200
  887. const m_STATX_TYPE = 1
  888. const m_STATX_UID = 8
  889. const m_STDC_HEADERS = 1
  890. const m_SYMLOOP_MAX = 40
  891. const m_S_IEXEC = "S_IXUSR"
  892. const m_S_IFBLK = 0060000
  893. const m_S_IFCHR = 0020000
  894. const m_S_IFDIR = 0040000
  895. const m_S_IFIFO = 0010000
  896. const m_S_IFLNK = 0120000
  897. const m_S_IFMT = 0170000
  898. const m_S_IFREG = 0100000
  899. const m_S_IFSOCK = 0140000
  900. const m_S_IREAD = "S_IRUSR"
  901. const m_S_IRGRP = 0040
  902. const m_S_IROTH = 0004
  903. const m_S_IRUSR = 0400
  904. const m_S_IRWXG = 0070
  905. const m_S_IRWXO = 0007
  906. const m_S_IRWXU = 0700
  907. const m_S_ISGID = 02000
  908. const m_S_ISUID = 04000
  909. const m_S_ISVTX = 01000
  910. const m_S_IWGRP = 0020
  911. const m_S_IWOTH = 0002
  912. const m_S_IWRITE = "S_IWUSR"
  913. const m_S_IWUSR = 0200
  914. const m_S_IXGRP = 0010
  915. const m_S_IXOTH = 0001
  916. const m_S_IXUSR = 0100
  917. const m_ScreenSaverActive = 1
  918. const m_ScreenSaverReset = 0
  919. const m_SelectionClear = 29
  920. const m_SelectionNotify = 31
  921. const m_SelectionRequest = 30
  922. const m_SetModeDelete = 1
  923. const m_SetModeInsert = 0
  924. const m_ShiftMapIndex = 0
  925. const m_SouthEastGravity = 9
  926. const m_SouthGravity = 8
  927. const m_SouthWestGravity = 7
  928. const m_StaticColor = 2
  929. const m_StaticGravity = 10
  930. const m_StaticGray = 0
  931. const m_Status = "int"
  932. const m_StippleShape = 2
  933. const m_SubPixelHorizontalBGR = 2
  934. const m_SubPixelHorizontalRGB = 1
  935. const m_SubPixelNone = 5
  936. const m_SubPixelUnknown = 0
  937. const m_SubPixelVerticalBGR = 4
  938. const m_SubPixelVerticalRGB = 3
  939. const m_Success = 0
  940. const m_SyncBoth = 7
  941. const m_SyncKeyboard = 4
  942. const m_SyncPointer = 1
  943. const m_T1_MAX_CHARSTRINGS_OPERANDS = 256
  944. const m_T1_MAX_DICT_DEPTH = 5
  945. const m_T1_MAX_SUBRS_CALLS = 16
  946. const m_TIMER_ABSTIME = 1
  947. const m_TIME_UTC = 1
  948. const m_TMP_MAX = 10000
  949. const m_TTY_NAME_MAX = 32
  950. const m_TT_CONFIG_OPTION_MAX_RUNNABLE_OPCODES = 1000000
  951. const m_TT_CONFIG_OPTION_SUBPIXEL_HINTING = 2
  952. const m_TZNAME_MAX = 6
  953. const m_TileShape = 1
  954. const m_TopIf = 2
  955. const m_True = 1
  956. const m_TrueColor = 4
  957. const m_UCHAR_MAX = 255
  958. const m_UINT16_MAX = 0xffff
  959. const m_UINT32_MAX = "0xffffffffu"
  960. const m_UINT64_MAX = "0xffffffffffffffffu"
  961. const m_UINT8_MAX = 0xff
  962. const m_UINTMAX_MAX = "UINT64_MAX"
  963. const m_UINTPTR_MAX = "UINT32_MAX"
  964. const m_UINT_FAST16_MAX = "UINT32_MAX"
  965. const m_UINT_FAST32_MAX = "UINT32_MAX"
  966. const m_UINT_FAST64_MAX = "UINT64_MAX"
  967. const m_UINT_FAST8_MAX = "UINT8_MAX"
  968. const m_UINT_LEAST16_MAX = "UINT16_MAX"
  969. const m_UINT_LEAST32_MAX = "UINT32_MAX"
  970. const m_UINT_LEAST64_MAX = "UINT64_MAX"
  971. const m_UINT_LEAST8_MAX = "UINT8_MAX"
  972. const m_UINT_MAX = 0xffffffff
  973. const m_UNLOCKED = 0
  974. const m_USHRT_MAX = 0xffff
  975. const m_UTIME_NOW = 0x3fffffff
  976. const m_UTIME_OMIT = 0x3ffffffe
  977. const m_UnmapGravity = 0
  978. const m_UnmapNotify = 18
  979. const m_Unsorted = 0
  980. const m_VERSION = "2.3.6"
  981. const m_VisibilityFullyObscured = 2
  982. const m_VisibilityNotify = 15
  983. const m_VisibilityPartiallyObscured = 1
  984. const m_VisibilityUnobscured = 0
  985. const m_VisualAllMask = 0x1FF
  986. const m_VisualBitsPerRGBMask = 0x100
  987. const m_VisualBlueMaskMask = 0x40
  988. const m_VisualClassMask = 0x8
  989. const m_VisualColormapSizeMask = 0x80
  990. const m_VisualDepthMask = 0x4
  991. const m_VisualGreenMaskMask = 0x20
  992. const m_VisualIDMask = 0x1
  993. const m_VisualNoMask = 0x0
  994. const m_VisualRedMaskMask = 0x10
  995. const m_VisualScreenMask = 0x2
  996. const m_WINT_MAX = "UINT32_MAX"
  997. const m_WINT_MIN = 0
  998. const m_WLNSPERBATCH = 50
  999. const m_WNOHANG = 1
  1000. const m_WORD_BIT = 32
  1001. const m_WRCTSPERBATCH = 10
  1002. const m_WUNTRACED = 2
  1003. const m_WestGravity = 4
  1004. const m_WhenMapped = 1
  1005. const m_WidthValue = 0x0004
  1006. const m_WindingRule = 1
  1007. const m_WithdrawnState = 0
  1008. const m_XCNOENT = 2
  1009. const m_XCNOMEM = 1
  1010. const m_XCSUCCESS = 0
  1011. const m_XFT_ASSUME_PIXMAP = 20
  1012. const m_XFT_CORE = "core"
  1013. const m_XFT_DBG_CACHE = 128
  1014. const m_XFT_DBG_CACHEV = 256
  1015. const m_XFT_DBG_DRAW = 8
  1016. const m_XFT_DBG_GLYPH = 32
  1017. const m_XFT_DBG_GLYPHV = 64
  1018. const m_XFT_DBG_MEMORY = 512
  1019. const m_XFT_DBG_OPEN = 1
  1020. const m_XFT_DBG_OPENV = 2
  1021. const m_XFT_DBG_REF = 16
  1022. const m_XFT_DBG_RENDER = 4
  1023. const m_XFT_DBG_USAGE = 1024
  1024. const m_XFT_DPY_MAX_UNREF_FONTS = 16
  1025. const m_XFT_MAJOR = 2
  1026. const m_XFT_MAX_GLYPH_MEMORY = "maxglyphmemory"
  1027. const m_XFT_MAX_UNREF_FONTS = "maxunreffonts"
  1028. const m_XFT_MINOR = 3
  1029. const m_XFT_NMISSING = 256
  1030. const m_XFT_NUM_FONT_HASH = 127
  1031. const m_XFT_NUM_SOLID_COLOR = 16
  1032. const m_XFT_RENDER = "render"
  1033. const m_XFT_REVISION = 6
  1034. const m_XFT_TRACK_MEM_USAGE = "trackmemusage"
  1035. const m_XFT_XLFD = "xlfd"
  1036. const m_XIMHotKeyStateOFF = 0x0002
  1037. const m_XIMHotKeyStateON = 0x0001
  1038. const m_XIMInitialState = 1
  1039. const m_XIMPreeditArea = 0x0001
  1040. const m_XIMPreeditCallbacks = 0x0002
  1041. const m_XIMPreeditEnable = 1
  1042. const m_XIMPreeditNone = 0x0010
  1043. const m_XIMPreeditNothing = 0x0008
  1044. const m_XIMPreeditPosition = 0x0004
  1045. const m_XIMPreeditUnKnown = 0
  1046. const m_XIMReverse = 1
  1047. const m_XIMStatusArea = 0x0100
  1048. const m_XIMStatusCallbacks = 0x0200
  1049. const m_XIMStatusNone = 0x0800
  1050. const m_XIMStatusNothing = 0x0400
  1051. const m_XIMStringConversionBottomEdge = 0x00000008
  1052. const m_XIMStringConversionBuffer = 0x0001
  1053. const m_XIMStringConversionChar = 0x0004
  1054. const m_XIMStringConversionConcealed = 0x00000010
  1055. const m_XIMStringConversionLeftEdge = 0x00000001
  1056. const m_XIMStringConversionLine = 0x0002
  1057. const m_XIMStringConversionRetrieval = 0x0002
  1058. const m_XIMStringConversionRightEdge = 0x00000002
  1059. const m_XIMStringConversionSubstitution = 0x0001
  1060. const m_XIMStringConversionTopEdge = 0x00000004
  1061. const m_XIMStringConversionWord = 0x0003
  1062. const m_XIMStringConversionWrapped = 0x00000020
  1063. const m_XK_0 = 0x0030
  1064. const m_XK_1 = 0x0031
  1065. const m_XK_2 = 0x0032
  1066. const m_XK_3 = 0x0033
  1067. const m_XK_4 = 0x0034
  1068. const m_XK_5 = 0x0035
  1069. const m_XK_6 = 0x0036
  1070. const m_XK_7 = 0x0037
  1071. const m_XK_8 = 0x0038
  1072. const m_XK_9 = 0x0039
  1073. const m_XK_A = 0x0041
  1074. const m_XK_AE = 0x00c6
  1075. const m_XK_Aacute = 0x00c1
  1076. const m_XK_Abelowdot = 0x1001ea0
  1077. const m_XK_Abreve = 0x01c3
  1078. const m_XK_Abreveacute = 0x1001eae
  1079. const m_XK_Abrevebelowdot = 0x1001eb6
  1080. const m_XK_Abrevegrave = 0x1001eb0
  1081. const m_XK_Abrevehook = 0x1001eb2
  1082. const m_XK_Abrevetilde = 0x1001eb4
  1083. const m_XK_AccessX_Enable = 0xfe70
  1084. const m_XK_AccessX_Feedback_Enable = 0xfe71
  1085. const m_XK_Acircumflex = 0x00c2
  1086. const m_XK_Acircumflexacute = 0x1001ea4
  1087. const m_XK_Acircumflexbelowdot = 0x1001eac
  1088. const m_XK_Acircumflexgrave = 0x1001ea6
  1089. const m_XK_Acircumflexhook = 0x1001ea8
  1090. const m_XK_Acircumflextilde = 0x1001eaa
  1091. const m_XK_Adiaeresis = 0x00c4
  1092. const m_XK_Agrave = 0x00c0
  1093. const m_XK_Ahook = 0x1001ea2
  1094. const m_XK_Alt_L = 0xffe9
  1095. const m_XK_Alt_R = 0xffea
  1096. const m_XK_Amacron = 0x03c0
  1097. const m_XK_Aogonek = 0x01a1
  1098. const m_XK_Arabic_0 = 0x1000660
  1099. const m_XK_Arabic_1 = 0x1000661
  1100. const m_XK_Arabic_2 = 0x1000662
  1101. const m_XK_Arabic_3 = 0x1000663
  1102. const m_XK_Arabic_4 = 0x1000664
  1103. const m_XK_Arabic_5 = 0x1000665
  1104. const m_XK_Arabic_6 = 0x1000666
  1105. const m_XK_Arabic_7 = 0x1000667
  1106. const m_XK_Arabic_8 = 0x1000668
  1107. const m_XK_Arabic_9 = 0x1000669
  1108. const m_XK_Arabic_ain = 0x05d9
  1109. const m_XK_Arabic_alef = 0x05c7
  1110. const m_XK_Arabic_alefmaksura = 0x05e9
  1111. const m_XK_Arabic_beh = 0x05c8
  1112. const m_XK_Arabic_comma = 0x05ac
  1113. const m_XK_Arabic_dad = 0x05d6
  1114. const m_XK_Arabic_dal = 0x05cf
  1115. const m_XK_Arabic_damma = 0x05ef
  1116. const m_XK_Arabic_dammatan = 0x05ec
  1117. const m_XK_Arabic_ddal = 0x1000688
  1118. const m_XK_Arabic_farsi_yeh = 0x10006cc
  1119. const m_XK_Arabic_fatha = 0x05ee
  1120. const m_XK_Arabic_fathatan = 0x05eb
  1121. const m_XK_Arabic_feh = 0x05e1
  1122. const m_XK_Arabic_fullstop = 0x10006d4
  1123. const m_XK_Arabic_gaf = 0x10006af
  1124. const m_XK_Arabic_ghain = 0x05da
  1125. const m_XK_Arabic_ha = 0x05e7
  1126. const m_XK_Arabic_hah = 0x05cd
  1127. const m_XK_Arabic_hamza = 0x05c1
  1128. const m_XK_Arabic_hamza_above = 0x1000654
  1129. const m_XK_Arabic_hamza_below = 0x1000655
  1130. const m_XK_Arabic_hamzaonalef = 0x05c3
  1131. const m_XK_Arabic_hamzaonwaw = 0x05c4
  1132. const m_XK_Arabic_hamzaonyeh = 0x05c6
  1133. const m_XK_Arabic_hamzaunderalef = 0x05c5
  1134. const m_XK_Arabic_heh = 0x05e7
  1135. const m_XK_Arabic_heh_doachashmee = 0x10006be
  1136. const m_XK_Arabic_heh_goal = 0x10006c1
  1137. const m_XK_Arabic_jeem = 0x05cc
  1138. const m_XK_Arabic_jeh = 0x1000698
  1139. const m_XK_Arabic_kaf = 0x05e3
  1140. const m_XK_Arabic_kasra = 0x05f0
  1141. const m_XK_Arabic_kasratan = 0x05ed
  1142. const m_XK_Arabic_keheh = 0x10006a9
  1143. const m_XK_Arabic_khah = 0x05ce
  1144. const m_XK_Arabic_lam = 0x05e4
  1145. const m_XK_Arabic_madda_above = 0x1000653
  1146. const m_XK_Arabic_maddaonalef = 0x05c2
  1147. const m_XK_Arabic_meem = 0x05e5
  1148. const m_XK_Arabic_noon = 0x05e6
  1149. const m_XK_Arabic_noon_ghunna = 0x10006ba
  1150. const m_XK_Arabic_peh = 0x100067e
  1151. const m_XK_Arabic_percent = 0x100066a
  1152. const m_XK_Arabic_qaf = 0x05e2
  1153. const m_XK_Arabic_question_mark = 0x05bf
  1154. const m_XK_Arabic_ra = 0x05d1
  1155. const m_XK_Arabic_rreh = 0x1000691
  1156. const m_XK_Arabic_sad = 0x05d5
  1157. const m_XK_Arabic_seen = 0x05d3
  1158. const m_XK_Arabic_semicolon = 0x05bb
  1159. const m_XK_Arabic_shadda = 0x05f1
  1160. const m_XK_Arabic_sheen = 0x05d4
  1161. const m_XK_Arabic_sukun = 0x05f2
  1162. const m_XK_Arabic_superscript_alef = 0x1000670
  1163. const m_XK_Arabic_switch = 0xff7e
  1164. const m_XK_Arabic_tah = 0x05d7
  1165. const m_XK_Arabic_tatweel = 0x05e0
  1166. const m_XK_Arabic_tcheh = 0x1000686
  1167. const m_XK_Arabic_teh = 0x05ca
  1168. const m_XK_Arabic_tehmarbuta = 0x05c9
  1169. const m_XK_Arabic_thal = 0x05d0
  1170. const m_XK_Arabic_theh = 0x05cb
  1171. const m_XK_Arabic_tteh = 0x1000679
  1172. const m_XK_Arabic_veh = 0x10006a4
  1173. const m_XK_Arabic_waw = 0x05e8
  1174. const m_XK_Arabic_yeh = 0x05ea
  1175. const m_XK_Arabic_yeh_baree = 0x10006d2
  1176. const m_XK_Arabic_zah = 0x05d8
  1177. const m_XK_Arabic_zain = 0x05d2
  1178. const m_XK_Aring = 0x00c5
  1179. const m_XK_Armenian_AT = 0x1000538
  1180. const m_XK_Armenian_AYB = 0x1000531
  1181. const m_XK_Armenian_BEN = 0x1000532
  1182. const m_XK_Armenian_CHA = 0x1000549
  1183. const m_XK_Armenian_DA = 0x1000534
  1184. const m_XK_Armenian_DZA = 0x1000541
  1185. const m_XK_Armenian_E = 0x1000537
  1186. const m_XK_Armenian_FE = 0x1000556
  1187. const m_XK_Armenian_GHAT = 0x1000542
  1188. const m_XK_Armenian_GIM = 0x1000533
  1189. const m_XK_Armenian_HI = 0x1000545
  1190. const m_XK_Armenian_HO = 0x1000540
  1191. const m_XK_Armenian_INI = 0x100053b
  1192. const m_XK_Armenian_JE = 0x100054b
  1193. const m_XK_Armenian_KE = 0x1000554
  1194. const m_XK_Armenian_KEN = 0x100053f
  1195. const m_XK_Armenian_KHE = 0x100053d
  1196. const m_XK_Armenian_LYUN = 0x100053c
  1197. const m_XK_Armenian_MEN = 0x1000544
  1198. const m_XK_Armenian_NU = 0x1000546
  1199. const m_XK_Armenian_O = 0x1000555
  1200. const m_XK_Armenian_PE = 0x100054a
  1201. const m_XK_Armenian_PYUR = 0x1000553
  1202. const m_XK_Armenian_RA = 0x100054c
  1203. const m_XK_Armenian_RE = 0x1000550
  1204. const m_XK_Armenian_SE = 0x100054d
  1205. const m_XK_Armenian_SHA = 0x1000547
  1206. const m_XK_Armenian_TCHE = 0x1000543
  1207. const m_XK_Armenian_TO = 0x1000539
  1208. const m_XK_Armenian_TSA = 0x100053e
  1209. const m_XK_Armenian_TSO = 0x1000551
  1210. const m_XK_Armenian_TYUN = 0x100054f
  1211. const m_XK_Armenian_VEV = 0x100054e
  1212. const m_XK_Armenian_VO = 0x1000548
  1213. const m_XK_Armenian_VYUN = 0x1000552
  1214. const m_XK_Armenian_YECH = 0x1000535
  1215. const m_XK_Armenian_ZA = 0x1000536
  1216. const m_XK_Armenian_ZHE = 0x100053a
  1217. const m_XK_Armenian_accent = 0x100055b
  1218. const m_XK_Armenian_amanak = 0x100055c
  1219. const m_XK_Armenian_apostrophe = 0x100055a
  1220. const m_XK_Armenian_at = 0x1000568
  1221. const m_XK_Armenian_ayb = 0x1000561
  1222. const m_XK_Armenian_ben = 0x1000562
  1223. const m_XK_Armenian_but = 0x100055d
  1224. const m_XK_Armenian_cha = 0x1000579
  1225. const m_XK_Armenian_da = 0x1000564
  1226. const m_XK_Armenian_dza = 0x1000571
  1227. const m_XK_Armenian_e = 0x1000567
  1228. const m_XK_Armenian_exclam = 0x100055c
  1229. const m_XK_Armenian_fe = 0x1000586
  1230. const m_XK_Armenian_full_stop = 0x1000589
  1231. const m_XK_Armenian_ghat = 0x1000572
  1232. const m_XK_Armenian_gim = 0x1000563
  1233. const m_XK_Armenian_hi = 0x1000575
  1234. const m_XK_Armenian_ho = 0x1000570
  1235. const m_XK_Armenian_hyphen = 0x100058a
  1236. const m_XK_Armenian_ini = 0x100056b
  1237. const m_XK_Armenian_je = 0x100057b
  1238. const m_XK_Armenian_ke = 0x1000584
  1239. const m_XK_Armenian_ken = 0x100056f
  1240. const m_XK_Armenian_khe = 0x100056d
  1241. const m_XK_Armenian_ligature_ew = 0x1000587
  1242. const m_XK_Armenian_lyun = 0x100056c
  1243. const m_XK_Armenian_men = 0x1000574
  1244. const m_XK_Armenian_nu = 0x1000576
  1245. const m_XK_Armenian_o = 0x1000585
  1246. const m_XK_Armenian_paruyk = 0x100055e
  1247. const m_XK_Armenian_pe = 0x100057a
  1248. const m_XK_Armenian_pyur = 0x1000583
  1249. const m_XK_Armenian_question = 0x100055e
  1250. const m_XK_Armenian_ra = 0x100057c
  1251. const m_XK_Armenian_re = 0x1000580
  1252. const m_XK_Armenian_se = 0x100057d
  1253. const m_XK_Armenian_separation_mark = 0x100055d
  1254. const m_XK_Armenian_sha = 0x1000577
  1255. const m_XK_Armenian_shesht = 0x100055b
  1256. const m_XK_Armenian_tche = 0x1000573
  1257. const m_XK_Armenian_to = 0x1000569
  1258. const m_XK_Armenian_tsa = 0x100056e
  1259. const m_XK_Armenian_tso = 0x1000581
  1260. const m_XK_Armenian_tyun = 0x100057f
  1261. const m_XK_Armenian_verjaket = 0x1000589
  1262. const m_XK_Armenian_vev = 0x100057e
  1263. const m_XK_Armenian_vo = 0x1000578
  1264. const m_XK_Armenian_vyun = 0x1000582
  1265. const m_XK_Armenian_yech = 0x1000565
  1266. const m_XK_Armenian_yentamna = 0x100058a
  1267. const m_XK_Armenian_za = 0x1000566
  1268. const m_XK_Armenian_zhe = 0x100056a
  1269. const m_XK_Atilde = 0x00c3
  1270. const m_XK_AudibleBell_Enable = 0xfe7a
  1271. const m_XK_B = 0x0042
  1272. const m_XK_Babovedot = 0x1001e02
  1273. const m_XK_BackSpace = 0xff08
  1274. const m_XK_Begin = 0xff58
  1275. const m_XK_BounceKeys_Enable = 0xfe74
  1276. const m_XK_Break = 0xff6b
  1277. const m_XK_Byelorussian_SHORTU = 0x06be
  1278. const m_XK_Byelorussian_shortu = 0x06ae
  1279. const m_XK_C = 0x0043
  1280. const m_XK_CH = 0xfea2
  1281. const m_XK_C_H = 0xfea5
  1282. const m_XK_C_h = 0xfea4
  1283. const m_XK_Cabovedot = 0x02c5
  1284. const m_XK_Cacute = 0x01c6
  1285. const m_XK_Cancel = 0xff69
  1286. const m_XK_Caps_Lock = 0xffe5
  1287. const m_XK_Ccaron = 0x01c8
  1288. const m_XK_Ccedilla = 0x00c7
  1289. const m_XK_Ccircumflex = 0x02c6
  1290. const m_XK_Ch = 0xfea1
  1291. const m_XK_Clear = 0xff0b
  1292. const m_XK_Codeinput = 0xff37
  1293. const m_XK_ColonSign = 0x10020a1
  1294. const m_XK_Control_L = 0xffe3
  1295. const m_XK_Control_R = 0xffe4
  1296. const m_XK_CruzeiroSign = 0x10020a2
  1297. const m_XK_Cyrillic_A = 0x06e1
  1298. const m_XK_Cyrillic_BE = 0x06e2
  1299. const m_XK_Cyrillic_CHE = 0x06fe
  1300. const m_XK_Cyrillic_CHE_descender = 0x10004b6
  1301. const m_XK_Cyrillic_CHE_vertstroke = 0x10004b8
  1302. const m_XK_Cyrillic_DE = 0x06e4
  1303. const m_XK_Cyrillic_DZHE = 0x06bf
  1304. const m_XK_Cyrillic_E = 0x06fc
  1305. const m_XK_Cyrillic_EF = 0x06e6
  1306. const m_XK_Cyrillic_EL = 0x06ec
  1307. const m_XK_Cyrillic_EM = 0x06ed
  1308. const m_XK_Cyrillic_EN = 0x06ee
  1309. const m_XK_Cyrillic_EN_descender = 0x10004a2
  1310. const m_XK_Cyrillic_ER = 0x06f2
  1311. const m_XK_Cyrillic_ES = 0x06f3
  1312. const m_XK_Cyrillic_GHE = 0x06e7
  1313. const m_XK_Cyrillic_GHE_bar = 0x1000492
  1314. const m_XK_Cyrillic_HA = 0x06e8
  1315. const m_XK_Cyrillic_HARDSIGN = 0x06ff
  1316. const m_XK_Cyrillic_HA_descender = 0x10004b2
  1317. const m_XK_Cyrillic_I = 0x06e9
  1318. const m_XK_Cyrillic_IE = 0x06e5
  1319. const m_XK_Cyrillic_IO = 0x06b3
  1320. const m_XK_Cyrillic_I_macron = 0x10004e2
  1321. const m_XK_Cyrillic_JE = 0x06b8
  1322. const m_XK_Cyrillic_KA = 0x06eb
  1323. const m_XK_Cyrillic_KA_descender = 0x100049a
  1324. const m_XK_Cyrillic_KA_vertstroke = 0x100049c
  1325. const m_XK_Cyrillic_LJE = 0x06b9
  1326. const m_XK_Cyrillic_NJE = 0x06ba
  1327. const m_XK_Cyrillic_O = 0x06ef
  1328. const m_XK_Cyrillic_O_bar = 0x10004e8
  1329. const m_XK_Cyrillic_PE = 0x06f0
  1330. const m_XK_Cyrillic_SCHWA = 0x10004d8
  1331. const m_XK_Cyrillic_SHA = 0x06fb
  1332. const m_XK_Cyrillic_SHCHA = 0x06fd
  1333. const m_XK_Cyrillic_SHHA = 0x10004ba
  1334. const m_XK_Cyrillic_SHORTI = 0x06ea
  1335. const m_XK_Cyrillic_SOFTSIGN = 0x06f8
  1336. const m_XK_Cyrillic_TE = 0x06f4
  1337. const m_XK_Cyrillic_TSE = 0x06e3
  1338. const m_XK_Cyrillic_U = 0x06f5
  1339. const m_XK_Cyrillic_U_macron = 0x10004ee
  1340. const m_XK_Cyrillic_U_straight = 0x10004ae
  1341. const m_XK_Cyrillic_U_straight_bar = 0x10004b0
  1342. const m_XK_Cyrillic_VE = 0x06f7
  1343. const m_XK_Cyrillic_YA = 0x06f1
  1344. const m_XK_Cyrillic_YERU = 0x06f9
  1345. const m_XK_Cyrillic_YU = 0x06e0
  1346. const m_XK_Cyrillic_ZE = 0x06fa
  1347. const m_XK_Cyrillic_ZHE = 0x06f6
  1348. const m_XK_Cyrillic_ZHE_descender = 0x1000496
  1349. const m_XK_Cyrillic_a = 0x06c1
  1350. const m_XK_Cyrillic_be = 0x06c2
  1351. const m_XK_Cyrillic_che = 0x06de
  1352. const m_XK_Cyrillic_che_descender = 0x10004b7
  1353. const m_XK_Cyrillic_che_vertstroke = 0x10004b9
  1354. const m_XK_Cyrillic_de = 0x06c4
  1355. const m_XK_Cyrillic_dzhe = 0x06af
  1356. const m_XK_Cyrillic_e = 0x06dc
  1357. const m_XK_Cyrillic_ef = 0x06c6
  1358. const m_XK_Cyrillic_el = 0x06cc
  1359. const m_XK_Cyrillic_em = 0x06cd
  1360. const m_XK_Cyrillic_en = 0x06ce
  1361. const m_XK_Cyrillic_en_descender = 0x10004a3
  1362. const m_XK_Cyrillic_er = 0x06d2
  1363. const m_XK_Cyrillic_es = 0x06d3
  1364. const m_XK_Cyrillic_ghe = 0x06c7
  1365. const m_XK_Cyrillic_ghe_bar = 0x1000493
  1366. const m_XK_Cyrillic_ha = 0x06c8
  1367. const m_XK_Cyrillic_ha_descender = 0x10004b3
  1368. const m_XK_Cyrillic_hardsign = 0x06df
  1369. const m_XK_Cyrillic_i = 0x06c9
  1370. const m_XK_Cyrillic_i_macron = 0x10004e3
  1371. const m_XK_Cyrillic_ie = 0x06c5
  1372. const m_XK_Cyrillic_io = 0x06a3
  1373. const m_XK_Cyrillic_je = 0x06a8
  1374. const m_XK_Cyrillic_ka = 0x06cb
  1375. const m_XK_Cyrillic_ka_descender = 0x100049b
  1376. const m_XK_Cyrillic_ka_vertstroke = 0x100049d
  1377. const m_XK_Cyrillic_lje = 0x06a9
  1378. const m_XK_Cyrillic_nje = 0x06aa
  1379. const m_XK_Cyrillic_o = 0x06cf
  1380. const m_XK_Cyrillic_o_bar = 0x10004e9
  1381. const m_XK_Cyrillic_pe = 0x06d0
  1382. const m_XK_Cyrillic_schwa = 0x10004d9
  1383. const m_XK_Cyrillic_sha = 0x06db
  1384. const m_XK_Cyrillic_shcha = 0x06dd
  1385. const m_XK_Cyrillic_shha = 0x10004bb
  1386. const m_XK_Cyrillic_shorti = 0x06ca
  1387. const m_XK_Cyrillic_softsign = 0x06d8
  1388. const m_XK_Cyrillic_te = 0x06d4
  1389. const m_XK_Cyrillic_tse = 0x06c3
  1390. const m_XK_Cyrillic_u = 0x06d5
  1391. const m_XK_Cyrillic_u_macron = 0x10004ef
  1392. const m_XK_Cyrillic_u_straight = 0x10004af
  1393. const m_XK_Cyrillic_u_straight_bar = 0x10004b1
  1394. const m_XK_Cyrillic_ve = 0x06d7
  1395. const m_XK_Cyrillic_ya = 0x06d1
  1396. const m_XK_Cyrillic_yeru = 0x06d9
  1397. const m_XK_Cyrillic_yu = 0x06c0
  1398. const m_XK_Cyrillic_ze = 0x06da
  1399. const m_XK_Cyrillic_zhe = 0x06d6
  1400. const m_XK_Cyrillic_zhe_descender = 0x1000497
  1401. const m_XK_D = 0x0044
  1402. const m_XK_Dabovedot = 0x1001e0a
  1403. const m_XK_Dcaron = 0x01cf
  1404. const m_XK_Delete = 0xffff
  1405. const m_XK_DongSign = 0x10020ab
  1406. const m_XK_Down = 0xff54
  1407. const m_XK_Dstroke = 0x01d0
  1408. const m_XK_E = 0x0045
  1409. const m_XK_ENG = 0x03bd
  1410. const m_XK_ETH = 0x00d0
  1411. const m_XK_EZH = 0x10001b7
  1412. const m_XK_Eabovedot = 0x03cc
  1413. const m_XK_Eacute = 0x00c9
  1414. const m_XK_Ebelowdot = 0x1001eb8
  1415. const m_XK_Ecaron = 0x01cc
  1416. const m_XK_Ecircumflex = 0x00ca
  1417. const m_XK_Ecircumflexacute = 0x1001ebe
  1418. const m_XK_Ecircumflexbelowdot = 0x1001ec6
  1419. const m_XK_Ecircumflexgrave = 0x1001ec0
  1420. const m_XK_Ecircumflexhook = 0x1001ec2
  1421. const m_XK_Ecircumflextilde = 0x1001ec4
  1422. const m_XK_EcuSign = 0x10020a0
  1423. const m_XK_Ediaeresis = 0x00cb
  1424. const m_XK_Egrave = 0x00c8
  1425. const m_XK_Ehook = 0x1001eba
  1426. const m_XK_Eisu_Shift = 0xff2f
  1427. const m_XK_Eisu_toggle = 0xff30
  1428. const m_XK_Emacron = 0x03aa
  1429. const m_XK_End = 0xff57
  1430. const m_XK_Eogonek = 0x01ca
  1431. const m_XK_Escape = 0xff1b
  1432. const m_XK_Eth = 0x00d0
  1433. const m_XK_Etilde = 0x1001ebc
  1434. const m_XK_EuroSign = 0x20ac
  1435. const m_XK_Execute = 0xff62
  1436. const m_XK_F = 0x0046
  1437. const m_XK_F1 = 0xffbe
  1438. const m_XK_F10 = 0xffc7
  1439. const m_XK_F11 = 0xffc8
  1440. const m_XK_F12 = 0xffc9
  1441. const m_XK_F13 = 0xffca
  1442. const m_XK_F14 = 0xffcb
  1443. const m_XK_F15 = 0xffcc
  1444. const m_XK_F16 = 0xffcd
  1445. const m_XK_F17 = 0xffce
  1446. const m_XK_F18 = 0xffcf
  1447. const m_XK_F19 = 0xffd0
  1448. const m_XK_F2 = 0xffbf
  1449. const m_XK_F20 = 0xffd1
  1450. const m_XK_F21 = 0xffd2
  1451. const m_XK_F22 = 0xffd3
  1452. const m_XK_F23 = 0xffd4
  1453. const m_XK_F24 = 0xffd5
  1454. const m_XK_F25 = 0xffd6
  1455. const m_XK_F26 = 0xffd7
  1456. const m_XK_F27 = 0xffd8
  1457. const m_XK_F28 = 0xffd9
  1458. const m_XK_F29 = 0xffda
  1459. const m_XK_F3 = 0xffc0
  1460. const m_XK_F30 = 0xffdb
  1461. const m_XK_F31 = 0xffdc
  1462. const m_XK_F32 = 0xffdd
  1463. const m_XK_F33 = 0xffde
  1464. const m_XK_F34 = 0xffdf
  1465. const m_XK_F35 = 0xffe0
  1466. const m_XK_F4 = 0xffc1
  1467. const m_XK_F5 = 0xffc2
  1468. const m_XK_F6 = 0xffc3
  1469. const m_XK_F7 = 0xffc4
  1470. const m_XK_F8 = 0xffc5
  1471. const m_XK_F9 = 0xffc6
  1472. const m_XK_FFrancSign = 0x10020a3
  1473. const m_XK_Fabovedot = 0x1001e1e
  1474. const m_XK_Farsi_0 = 0x10006f0
  1475. const m_XK_Farsi_1 = 0x10006f1
  1476. const m_XK_Farsi_2 = 0x10006f2
  1477. const m_XK_Farsi_3 = 0x10006f3
  1478. const m_XK_Farsi_4 = 0x10006f4
  1479. const m_XK_Farsi_5 = 0x10006f5
  1480. const m_XK_Farsi_6 = 0x10006f6
  1481. const m_XK_Farsi_7 = 0x10006f7
  1482. const m_XK_Farsi_8 = 0x10006f8
  1483. const m_XK_Farsi_9 = 0x10006f9
  1484. const m_XK_Farsi_yeh = 0x10006cc
  1485. const m_XK_Find = 0xff68
  1486. const m_XK_First_Virtual_Screen = 0xfed0
  1487. const m_XK_G = 0x0047
  1488. const m_XK_Gabovedot = 0x02d5
  1489. const m_XK_Gbreve = 0x02ab
  1490. const m_XK_Gcaron = 0x10001e6
  1491. const m_XK_Gcedilla = 0x03ab
  1492. const m_XK_Gcircumflex = 0x02d8
  1493. const m_XK_Georgian_an = 0x10010d0
  1494. const m_XK_Georgian_ban = 0x10010d1
  1495. const m_XK_Georgian_can = 0x10010ea
  1496. const m_XK_Georgian_char = 0x10010ed
  1497. const m_XK_Georgian_chin = 0x10010e9
  1498. const m_XK_Georgian_cil = 0x10010ec
  1499. const m_XK_Georgian_don = 0x10010d3
  1500. const m_XK_Georgian_en = 0x10010d4
  1501. const m_XK_Georgian_fi = 0x10010f6
  1502. const m_XK_Georgian_gan = 0x10010d2
  1503. const m_XK_Georgian_ghan = 0x10010e6
  1504. const m_XK_Georgian_hae = 0x10010f0
  1505. const m_XK_Georgian_har = 0x10010f4
  1506. const m_XK_Georgian_he = 0x10010f1
  1507. const m_XK_Georgian_hie = 0x10010f2
  1508. const m_XK_Georgian_hoe = 0x10010f5
  1509. const m_XK_Georgian_in = 0x10010d8
  1510. const m_XK_Georgian_jhan = 0x10010ef
  1511. const m_XK_Georgian_jil = 0x10010eb
  1512. const m_XK_Georgian_kan = 0x10010d9
  1513. const m_XK_Georgian_khar = 0x10010e5
  1514. const m_XK_Georgian_las = 0x10010da
  1515. const m_XK_Georgian_man = 0x10010db
  1516. const m_XK_Georgian_nar = 0x10010dc
  1517. const m_XK_Georgian_on = 0x10010dd
  1518. const m_XK_Georgian_par = 0x10010de
  1519. const m_XK_Georgian_phar = 0x10010e4
  1520. const m_XK_Georgian_qar = 0x10010e7
  1521. const m_XK_Georgian_rae = 0x10010e0
  1522. const m_XK_Georgian_san = 0x10010e1
  1523. const m_XK_Georgian_shin = 0x10010e8
  1524. const m_XK_Georgian_tan = 0x10010d7
  1525. const m_XK_Georgian_tar = 0x10010e2
  1526. const m_XK_Georgian_un = 0x10010e3
  1527. const m_XK_Georgian_vin = 0x10010d5
  1528. const m_XK_Georgian_we = 0x10010f3
  1529. const m_XK_Georgian_xan = 0x10010ee
  1530. const m_XK_Georgian_zen = 0x10010d6
  1531. const m_XK_Georgian_zhar = 0x10010df
  1532. const m_XK_Greek_ALPHA = 0x07c1
  1533. const m_XK_Greek_ALPHAaccent = 0x07a1
  1534. const m_XK_Greek_BETA = 0x07c2
  1535. const m_XK_Greek_CHI = 0x07d7
  1536. const m_XK_Greek_DELTA = 0x07c4
  1537. const m_XK_Greek_EPSILON = 0x07c5
  1538. const m_XK_Greek_EPSILONaccent = 0x07a2
  1539. const m_XK_Greek_ETA = 0x07c7
  1540. const m_XK_Greek_ETAaccent = 0x07a3
  1541. const m_XK_Greek_GAMMA = 0x07c3
  1542. const m_XK_Greek_IOTA = 0x07c9
  1543. const m_XK_Greek_IOTAaccent = 0x07a4
  1544. const m_XK_Greek_IOTAdiaeresis = 0x07a5
  1545. const m_XK_Greek_IOTAdieresis = 0x07a5
  1546. const m_XK_Greek_KAPPA = 0x07ca
  1547. const m_XK_Greek_LAMBDA = 0x07cb
  1548. const m_XK_Greek_LAMDA = 0x07cb
  1549. const m_XK_Greek_MU = 0x07cc
  1550. const m_XK_Greek_NU = 0x07cd
  1551. const m_XK_Greek_OMEGA = 0x07d9
  1552. const m_XK_Greek_OMEGAaccent = 0x07ab
  1553. const m_XK_Greek_OMICRON = 0x07cf
  1554. const m_XK_Greek_OMICRONaccent = 0x07a7
  1555. const m_XK_Greek_PHI = 0x07d6
  1556. const m_XK_Greek_PI = 0x07d0
  1557. const m_XK_Greek_PSI = 0x07d8
  1558. const m_XK_Greek_RHO = 0x07d1
  1559. const m_XK_Greek_SIGMA = 0x07d2
  1560. const m_XK_Greek_TAU = 0x07d4
  1561. const m_XK_Greek_THETA = 0x07c8
  1562. const m_XK_Greek_UPSILON = 0x07d5
  1563. const m_XK_Greek_UPSILONaccent = 0x07a8
  1564. const m_XK_Greek_UPSILONdieresis = 0x07a9
  1565. const m_XK_Greek_XI = 0x07ce
  1566. const m_XK_Greek_ZETA = 0x07c6
  1567. const m_XK_Greek_accentdieresis = 0x07ae
  1568. const m_XK_Greek_alpha = 0x07e1
  1569. const m_XK_Greek_alphaaccent = 0x07b1
  1570. const m_XK_Greek_beta = 0x07e2
  1571. const m_XK_Greek_chi = 0x07f7
  1572. const m_XK_Greek_delta = 0x07e4
  1573. const m_XK_Greek_epsilon = 0x07e5
  1574. const m_XK_Greek_epsilonaccent = 0x07b2
  1575. const m_XK_Greek_eta = 0x07e7
  1576. const m_XK_Greek_etaaccent = 0x07b3
  1577. const m_XK_Greek_finalsmallsigma = 0x07f3
  1578. const m_XK_Greek_gamma = 0x07e3
  1579. const m_XK_Greek_horizbar = 0x07af
  1580. const m_XK_Greek_iota = 0x07e9
  1581. const m_XK_Greek_iotaaccent = 0x07b4
  1582. const m_XK_Greek_iotaaccentdieresis = 0x07b6
  1583. const m_XK_Greek_iotadieresis = 0x07b5
  1584. const m_XK_Greek_kappa = 0x07ea
  1585. const m_XK_Greek_lambda = 0x07eb
  1586. const m_XK_Greek_lamda = 0x07eb
  1587. const m_XK_Greek_mu = 0x07ec
  1588. const m_XK_Greek_nu = 0x07ed
  1589. const m_XK_Greek_omega = 0x07f9
  1590. const m_XK_Greek_omegaaccent = 0x07bb
  1591. const m_XK_Greek_omicron = 0x07ef
  1592. const m_XK_Greek_omicronaccent = 0x07b7
  1593. const m_XK_Greek_phi = 0x07f6
  1594. const m_XK_Greek_pi = 0x07f0
  1595. const m_XK_Greek_psi = 0x07f8
  1596. const m_XK_Greek_rho = 0x07f1
  1597. const m_XK_Greek_sigma = 0x07f2
  1598. const m_XK_Greek_switch = 0xff7e
  1599. const m_XK_Greek_tau = 0x07f4
  1600. const m_XK_Greek_theta = 0x07e8
  1601. const m_XK_Greek_upsilon = 0x07f5
  1602. const m_XK_Greek_upsilonaccent = 0x07b8
  1603. const m_XK_Greek_upsilonaccentdieresis = 0x07ba
  1604. const m_XK_Greek_upsilondieresis = 0x07b9
  1605. const m_XK_Greek_xi = 0x07ee
  1606. const m_XK_Greek_zeta = 0x07e6
  1607. const m_XK_H = 0x0048
  1608. const m_XK_Hangul = 0xff31
  1609. const m_XK_Hangul_A = 0x0ebf
  1610. const m_XK_Hangul_AE = 0x0ec0
  1611. const m_XK_Hangul_AraeA = 0x0ef6
  1612. const m_XK_Hangul_AraeAE = 0x0ef7
  1613. const m_XK_Hangul_Banja = 0xff39
  1614. const m_XK_Hangul_Cieuc = 0x0eba
  1615. const m_XK_Hangul_Codeinput = 0xff37
  1616. const m_XK_Hangul_Dikeud = 0x0ea7
  1617. const m_XK_Hangul_E = 0x0ec4
  1618. const m_XK_Hangul_EO = 0x0ec3
  1619. const m_XK_Hangul_EU = 0x0ed1
  1620. const m_XK_Hangul_End = 0xff33
  1621. const m_XK_Hangul_Hanja = 0xff34
  1622. const m_XK_Hangul_Hieuh = 0x0ebe
  1623. const m_XK_Hangul_I = 0x0ed3
  1624. const m_XK_Hangul_Ieung = 0x0eb7
  1625. const m_XK_Hangul_J_Cieuc = 0x0eea
  1626. const m_XK_Hangul_J_Dikeud = 0x0eda
  1627. const m_XK_Hangul_J_Hieuh = 0x0eee
  1628. const m_XK_Hangul_J_Ieung = 0x0ee8
  1629. const m_XK_Hangul_J_Jieuj = 0x0ee9
  1630. const m_XK_Hangul_J_Khieuq = 0x0eeb
  1631. const m_XK_Hangul_J_Kiyeog = 0x0ed4
  1632. const m_XK_Hangul_J_KiyeogSios = 0x0ed6
  1633. const m_XK_Hangul_J_KkogjiDalrinIeung = 0x0ef9
  1634. const m_XK_Hangul_J_Mieum = 0x0ee3
  1635. const m_XK_Hangul_J_Nieun = 0x0ed7
  1636. const m_XK_Hangul_J_NieunHieuh = 0x0ed9
  1637. const m_XK_Hangul_J_NieunJieuj = 0x0ed8
  1638. const m_XK_Hangul_J_PanSios = 0x0ef8
  1639. const m_XK_Hangul_J_Phieuf = 0x0eed
  1640. const m_XK_Hangul_J_Pieub = 0x0ee4
  1641. const m_XK_Hangul_J_PieubSios = 0x0ee5
  1642. const m_XK_Hangul_J_Rieul = 0x0edb
  1643. const m_XK_Hangul_J_RieulHieuh = 0x0ee2
  1644. const m_XK_Hangul_J_RieulKiyeog = 0x0edc
  1645. const m_XK_Hangul_J_RieulMieum = 0x0edd
  1646. const m_XK_Hangul_J_RieulPhieuf = 0x0ee1
  1647. const m_XK_Hangul_J_RieulPieub = 0x0ede
  1648. const m_XK_Hangul_J_RieulSios = 0x0edf
  1649. const m_XK_Hangul_J_RieulTieut = 0x0ee0
  1650. const m_XK_Hangul_J_Sios = 0x0ee6
  1651. const m_XK_Hangul_J_SsangKiyeog = 0x0ed5
  1652. const m_XK_Hangul_J_SsangSios = 0x0ee7
  1653. const m_XK_Hangul_J_Tieut = 0x0eec
  1654. const m_XK_Hangul_J_YeorinHieuh = 0x0efa
  1655. const m_XK_Hangul_Jamo = 0xff35
  1656. const m_XK_Hangul_Jeonja = 0xff38
  1657. const m_XK_Hangul_Jieuj = 0x0eb8
  1658. const m_XK_Hangul_Khieuq = 0x0ebb
  1659. const m_XK_Hangul_Kiyeog = 0x0ea1
  1660. const m_XK_Hangul_KiyeogSios = 0x0ea3
  1661. const m_XK_Hangul_KkogjiDalrinIeung = 0x0ef3
  1662. const m_XK_Hangul_Mieum = 0x0eb1
  1663. const m_XK_Hangul_MultipleCandidate = 0xff3d
  1664. const m_XK_Hangul_Nieun = 0x0ea4
  1665. const m_XK_Hangul_NieunHieuh = 0x0ea6
  1666. const m_XK_Hangul_NieunJieuj = 0x0ea5
  1667. const m_XK_Hangul_O = 0x0ec7
  1668. const m_XK_Hangul_OE = 0x0eca
  1669. const m_XK_Hangul_PanSios = 0x0ef2
  1670. const m_XK_Hangul_Phieuf = 0x0ebd
  1671. const m_XK_Hangul_Pieub = 0x0eb2
  1672. const m_XK_Hangul_PieubSios = 0x0eb4
  1673. const m_XK_Hangul_PostHanja = 0xff3b
  1674. const m_XK_Hangul_PreHanja = 0xff3a
  1675. const m_XK_Hangul_PreviousCandidate = 0xff3e
  1676. const m_XK_Hangul_Rieul = 0x0ea9
  1677. const m_XK_Hangul_RieulHieuh = 0x0eb0
  1678. const m_XK_Hangul_RieulKiyeog = 0x0eaa
  1679. const m_XK_Hangul_RieulMieum = 0x0eab
  1680. const m_XK_Hangul_RieulPhieuf = 0x0eaf
  1681. const m_XK_Hangul_RieulPieub = 0x0eac
  1682. const m_XK_Hangul_RieulSios = 0x0ead
  1683. const m_XK_Hangul_RieulTieut = 0x0eae
  1684. const m_XK_Hangul_RieulYeorinHieuh = 0x0eef
  1685. const m_XK_Hangul_Romaja = 0xff36
  1686. const m_XK_Hangul_SingleCandidate = 0xff3c
  1687. const m_XK_Hangul_Sios = 0x0eb5
  1688. const m_XK_Hangul_Special = 0xff3f
  1689. const m_XK_Hangul_SsangDikeud = 0x0ea8
  1690. const m_XK_Hangul_SsangJieuj = 0x0eb9
  1691. const m_XK_Hangul_SsangKiyeog = 0x0ea2
  1692. const m_XK_Hangul_SsangPieub = 0x0eb3
  1693. const m_XK_Hangul_SsangSios = 0x0eb6
  1694. const m_XK_Hangul_Start = 0xff32
  1695. const m_XK_Hangul_SunkyeongeumMieum = 0x0ef0
  1696. const m_XK_Hangul_SunkyeongeumPhieuf = 0x0ef4
  1697. const m_XK_Hangul_SunkyeongeumPieub = 0x0ef1
  1698. const m_XK_Hangul_Tieut = 0x0ebc
  1699. const m_XK_Hangul_U = 0x0ecc
  1700. const m_XK_Hangul_WA = 0x0ec8
  1701. const m_XK_Hangul_WAE = 0x0ec9
  1702. const m_XK_Hangul_WE = 0x0ece
  1703. const m_XK_Hangul_WEO = 0x0ecd
  1704. const m_XK_Hangul_WI = 0x0ecf
  1705. const m_XK_Hangul_YA = 0x0ec1
  1706. const m_XK_Hangul_YAE = 0x0ec2
  1707. const m_XK_Hangul_YE = 0x0ec6
  1708. const m_XK_Hangul_YEO = 0x0ec5
  1709. const m_XK_Hangul_YI = 0x0ed2
  1710. const m_XK_Hangul_YO = 0x0ecb
  1711. const m_XK_Hangul_YU = 0x0ed0
  1712. const m_XK_Hangul_YeorinHieuh = 0x0ef5
  1713. const m_XK_Hangul_switch = 0xff7e
  1714. const m_XK_Hankaku = 0xff29
  1715. const m_XK_Hcircumflex = 0x02a6
  1716. const m_XK_Hebrew_switch = 0xff7e
  1717. const m_XK_Help = 0xff6a
  1718. const m_XK_Henkan = 0xff23
  1719. const m_XK_Henkan_Mode = 0xff23
  1720. const m_XK_Hiragana = 0xff25
  1721. const m_XK_Hiragana_Katakana = 0xff27
  1722. const m_XK_Home = 0xff50
  1723. const m_XK_Hstroke = 0x02a1
  1724. const m_XK_Hyper_L = 0xffed
  1725. const m_XK_Hyper_R = 0xffee
  1726. const m_XK_I = 0x0049
  1727. const m_XK_ISO_Center_Object = 0xfe33
  1728. const m_XK_ISO_Continuous_Underline = 0xfe30
  1729. const m_XK_ISO_Discontinuous_Underline = 0xfe31
  1730. const m_XK_ISO_Emphasize = 0xfe32
  1731. const m_XK_ISO_Enter = 0xfe34
  1732. const m_XK_ISO_Fast_Cursor_Down = 0xfe2f
  1733. const m_XK_ISO_Fast_Cursor_Left = 0xfe2c
  1734. const m_XK_ISO_Fast_Cursor_Right = 0xfe2d
  1735. const m_XK_ISO_Fast_Cursor_Up = 0xfe2e
  1736. const m_XK_ISO_First_Group = 0xfe0c
  1737. const m_XK_ISO_First_Group_Lock = 0xfe0d
  1738. const m_XK_ISO_Group_Latch = 0xfe06
  1739. const m_XK_ISO_Group_Lock = 0xfe07
  1740. const m_XK_ISO_Group_Shift = 0xff7e
  1741. const m_XK_ISO_Last_Group = 0xfe0e
  1742. const m_XK_ISO_Last_Group_Lock = 0xfe0f
  1743. const m_XK_ISO_Left_Tab = 0xfe20
  1744. const m_XK_ISO_Level2_Latch = 0xfe02
  1745. const m_XK_ISO_Level3_Latch = 0xfe04
  1746. const m_XK_ISO_Level3_Lock = 0xfe05
  1747. const m_XK_ISO_Level3_Shift = 0xfe03
  1748. const m_XK_ISO_Level5_Latch = 0xfe12
  1749. const m_XK_ISO_Level5_Lock = 0xfe13
  1750. const m_XK_ISO_Level5_Shift = 0xfe11
  1751. const m_XK_ISO_Lock = 0xfe01
  1752. const m_XK_ISO_Move_Line_Down = 0xfe22
  1753. const m_XK_ISO_Move_Line_Up = 0xfe21
  1754. const m_XK_ISO_Next_Group = 0xfe08
  1755. const m_XK_ISO_Next_Group_Lock = 0xfe09
  1756. const m_XK_ISO_Partial_Line_Down = 0xfe24
  1757. const m_XK_ISO_Partial_Line_Up = 0xfe23
  1758. const m_XK_ISO_Partial_Space_Left = 0xfe25
  1759. const m_XK_ISO_Partial_Space_Right = 0xfe26
  1760. const m_XK_ISO_Prev_Group = 0xfe0a
  1761. const m_XK_ISO_Prev_Group_Lock = 0xfe0b
  1762. const m_XK_ISO_Release_Both_Margins = 0xfe2b
  1763. const m_XK_ISO_Release_Margin_Left = 0xfe29
  1764. const m_XK_ISO_Release_Margin_Right = 0xfe2a
  1765. const m_XK_ISO_Set_Margin_Left = 0xfe27
  1766. const m_XK_ISO_Set_Margin_Right = 0xfe28
  1767. const m_XK_Iabovedot = 0x02a9
  1768. const m_XK_Iacute = 0x00cd
  1769. const m_XK_Ibelowdot = 0x1001eca
  1770. const m_XK_Ibreve = 0x100012c
  1771. const m_XK_Icircumflex = 0x00ce
  1772. const m_XK_Idiaeresis = 0x00cf
  1773. const m_XK_Igrave = 0x00cc
  1774. const m_XK_Ihook = 0x1001ec8
  1775. const m_XK_Imacron = 0x03cf
  1776. const m_XK_Insert = 0xff63
  1777. const m_XK_Iogonek = 0x03c7
  1778. const m_XK_Itilde = 0x03a5
  1779. const m_XK_J = 0x004a
  1780. const m_XK_Jcircumflex = 0x02ac
  1781. const m_XK_K = 0x004b
  1782. const m_XK_KP_0 = 0xffb0
  1783. const m_XK_KP_1 = 0xffb1
  1784. const m_XK_KP_2 = 0xffb2
  1785. const m_XK_KP_3 = 0xffb3
  1786. const m_XK_KP_4 = 0xffb4
  1787. const m_XK_KP_5 = 0xffb5
  1788. const m_XK_KP_6 = 0xffb6
  1789. const m_XK_KP_7 = 0xffb7
  1790. const m_XK_KP_8 = 0xffb8
  1791. const m_XK_KP_9 = 0xffb9
  1792. const m_XK_KP_Add = 0xffab
  1793. const m_XK_KP_Begin = 0xff9d
  1794. const m_XK_KP_Decimal = 0xffae
  1795. const m_XK_KP_Delete = 0xff9f
  1796. const m_XK_KP_Divide = 0xffaf
  1797. const m_XK_KP_Down = 0xff99
  1798. const m_XK_KP_End = 0xff9c
  1799. const m_XK_KP_Enter = 0xff8d
  1800. const m_XK_KP_Equal = 0xffbd
  1801. const m_XK_KP_F1 = 0xff91
  1802. const m_XK_KP_F2 = 0xff92
  1803. const m_XK_KP_F3 = 0xff93
  1804. const m_XK_KP_F4 = 0xff94
  1805. const m_XK_KP_Home = 0xff95
  1806. const m_XK_KP_Insert = 0xff9e
  1807. const m_XK_KP_Left = 0xff96
  1808. const m_XK_KP_Multiply = 0xffaa
  1809. const m_XK_KP_Next = 0xff9b
  1810. const m_XK_KP_Page_Down = 0xff9b
  1811. const m_XK_KP_Page_Up = 0xff9a
  1812. const m_XK_KP_Prior = 0xff9a
  1813. const m_XK_KP_Right = 0xff98
  1814. const m_XK_KP_Separator = 0xffac
  1815. const m_XK_KP_Space = 0xff80
  1816. const m_XK_KP_Subtract = 0xffad
  1817. const m_XK_KP_Tab = 0xff89
  1818. const m_XK_KP_Up = 0xff97
  1819. const m_XK_Kana_Lock = 0xff2d
  1820. const m_XK_Kana_Shift = 0xff2e
  1821. const m_XK_Kanji = 0xff21
  1822. const m_XK_Kanji_Bangou = 0xff37
  1823. const m_XK_Katakana = 0xff26
  1824. const m_XK_Kcedilla = 0x03d3
  1825. const m_XK_Korean_Won = 0x0eff
  1826. const m_XK_L = 0x004c
  1827. const m_XK_L1 = 0xffc8
  1828. const m_XK_L10 = 0xffd1
  1829. const m_XK_L2 = 0xffc9
  1830. const m_XK_L3 = 0xffca
  1831. const m_XK_L4 = 0xffcb
  1832. const m_XK_L5 = 0xffcc
  1833. const m_XK_L6 = 0xffcd
  1834. const m_XK_L7 = 0xffce
  1835. const m_XK_L8 = 0xffcf
  1836. const m_XK_L9 = 0xffd0
  1837. const m_XK_Lacute = 0x01c5
  1838. const m_XK_Last_Virtual_Screen = 0xfed4
  1839. const m_XK_Lbelowdot = 0x1001e36
  1840. const m_XK_Lcaron = 0x01a5
  1841. const m_XK_Lcedilla = 0x03a6
  1842. const m_XK_Left = 0xff51
  1843. const m_XK_Linefeed = 0xff0a
  1844. const m_XK_LiraSign = 0x10020a4
  1845. const m_XK_Lstroke = 0x01a3
  1846. const m_XK_M = 0x004d
  1847. const m_XK_Mabovedot = 0x1001e40
  1848. const m_XK_Macedonia_DSE = 0x06b5
  1849. const m_XK_Macedonia_GJE = 0x06b2
  1850. const m_XK_Macedonia_KJE = 0x06bc
  1851. const m_XK_Macedonia_dse = 0x06a5
  1852. const m_XK_Macedonia_gje = 0x06a2
  1853. const m_XK_Macedonia_kje = 0x06ac
  1854. const m_XK_Mae_Koho = 0xff3e
  1855. const m_XK_Massyo = 0xff2c
  1856. const m_XK_Menu = 0xff67
  1857. const m_XK_Meta_L = 0xffe7
  1858. const m_XK_Meta_R = 0xffe8
  1859. const m_XK_MillSign = 0x10020a5
  1860. const m_XK_Mode_switch = 0xff7e
  1861. const m_XK_MouseKeys_Accel_Enable = 0xfe77
  1862. const m_XK_MouseKeys_Enable = 0xfe76
  1863. const m_XK_Muhenkan = 0xff22
  1864. const m_XK_Multi_key = 0xff20
  1865. const m_XK_MultipleCandidate = 0xff3d
  1866. const m_XK_N = 0x004e
  1867. const m_XK_Nacute = 0x01d1
  1868. const m_XK_NairaSign = 0x10020a6
  1869. const m_XK_Ncaron = 0x01d2
  1870. const m_XK_Ncedilla = 0x03d1
  1871. const m_XK_NewSheqelSign = 0x10020aa
  1872. const m_XK_Next = 0xff56
  1873. const m_XK_Next_Virtual_Screen = 0xfed2
  1874. const m_XK_Ntilde = 0x00d1
  1875. const m_XK_Num_Lock = 0xff7f
  1876. const m_XK_O = 0x004f
  1877. const m_XK_OE = 0x13bc
  1878. const m_XK_Oacute = 0x00d3
  1879. const m_XK_Obarred = 0x100019f
  1880. const m_XK_Obelowdot = 0x1001ecc
  1881. const m_XK_Ocaron = 0x10001d1
  1882. const m_XK_Ocircumflex = 0x00d4
  1883. const m_XK_Ocircumflexacute = 0x1001ed0
  1884. const m_XK_Ocircumflexbelowdot = 0x1001ed8
  1885. const m_XK_Ocircumflexgrave = 0x1001ed2
  1886. const m_XK_Ocircumflexhook = 0x1001ed4
  1887. const m_XK_Ocircumflextilde = 0x1001ed6
  1888. const m_XK_Odiaeresis = 0x00d6
  1889. const m_XK_Odoubleacute = 0x01d5
  1890. const m_XK_Ograve = 0x00d2
  1891. const m_XK_Ohook = 0x1001ece
  1892. const m_XK_Ohorn = 0x10001a0
  1893. const m_XK_Ohornacute = 0x1001eda
  1894. const m_XK_Ohornbelowdot = 0x1001ee2
  1895. const m_XK_Ohorngrave = 0x1001edc
  1896. const m_XK_Ohornhook = 0x1001ede
  1897. const m_XK_Ohorntilde = 0x1001ee0
  1898. const m_XK_Omacron = 0x03d2
  1899. const m_XK_Ooblique = 0x00d8
  1900. const m_XK_Oslash = 0x00d8
  1901. const m_XK_Otilde = 0x00d5
  1902. const m_XK_Overlay1_Enable = 0xfe78
  1903. const m_XK_Overlay2_Enable = 0xfe79
  1904. const m_XK_P = 0x0050
  1905. const m_XK_Pabovedot = 0x1001e56
  1906. const m_XK_Page_Down = 0xff56
  1907. const m_XK_Page_Up = 0xff55
  1908. const m_XK_Pause = 0xff13
  1909. const m_XK_PesetaSign = 0x10020a7
  1910. const m_XK_Pointer_Accelerate = 0xfefa
  1911. const m_XK_Pointer_Button1 = 0xfee9
  1912. const m_XK_Pointer_Button2 = 0xfeea
  1913. const m_XK_Pointer_Button3 = 0xfeeb
  1914. const m_XK_Pointer_Button4 = 0xfeec
  1915. const m_XK_Pointer_Button5 = 0xfeed
  1916. const m_XK_Pointer_Button_Dflt = 0xfee8
  1917. const m_XK_Pointer_DblClick1 = 0xfeef
  1918. const m_XK_Pointer_DblClick2 = 0xfef0
  1919. const m_XK_Pointer_DblClick3 = 0xfef1
  1920. const m_XK_Pointer_DblClick4 = 0xfef2
  1921. const m_XK_Pointer_DblClick5 = 0xfef3
  1922. const m_XK_Pointer_DblClick_Dflt = 0xfeee
  1923. const m_XK_Pointer_DfltBtnNext = 0xfefb
  1924. const m_XK_Pointer_DfltBtnPrev = 0xfefc
  1925. const m_XK_Pointer_Down = 0xfee3
  1926. const m_XK_Pointer_DownLeft = 0xfee6
  1927. const m_XK_Pointer_DownRight = 0xfee7
  1928. const m_XK_Pointer_Drag1 = 0xfef5
  1929. const m_XK_Pointer_Drag2 = 0xfef6
  1930. const m_XK_Pointer_Drag3 = 0xfef7
  1931. const m_XK_Pointer_Drag4 = 0xfef8
  1932. const m_XK_Pointer_Drag5 = 0xfefd
  1933. const m_XK_Pointer_Drag_Dflt = 0xfef4
  1934. const m_XK_Pointer_EnableKeys = 0xfef9
  1935. const m_XK_Pointer_Left = 0xfee0
  1936. const m_XK_Pointer_Right = 0xfee1
  1937. const m_XK_Pointer_Up = 0xfee2
  1938. const m_XK_Pointer_UpLeft = 0xfee4
  1939. const m_XK_Pointer_UpRight = 0xfee5
  1940. const m_XK_Prev_Virtual_Screen = 0xfed1
  1941. const m_XK_PreviousCandidate = 0xff3e
  1942. const m_XK_Print = 0xff61
  1943. const m_XK_Prior = 0xff55
  1944. const m_XK_Q = 0x0051
  1945. const m_XK_R = 0x0052
  1946. const m_XK_R1 = 0xffd2
  1947. const m_XK_R10 = 0xffdb
  1948. const m_XK_R11 = 0xffdc
  1949. const m_XK_R12 = 0xffdd
  1950. const m_XK_R13 = 0xffde
  1951. const m_XK_R14 = 0xffdf
  1952. const m_XK_R15 = 0xffe0
  1953. const m_XK_R2 = 0xffd3
  1954. const m_XK_R3 = 0xffd4
  1955. const m_XK_R4 = 0xffd5
  1956. const m_XK_R5 = 0xffd6
  1957. const m_XK_R6 = 0xffd7
  1958. const m_XK_R7 = 0xffd8
  1959. const m_XK_R8 = 0xffd9
  1960. const m_XK_R9 = 0xffda
  1961. const m_XK_Racute = 0x01c0
  1962. const m_XK_Rcaron = 0x01d8
  1963. const m_XK_Rcedilla = 0x03a3
  1964. const m_XK_Redo = 0xff66
  1965. const m_XK_RepeatKeys_Enable = 0xfe72
  1966. const m_XK_Return = 0xff0d
  1967. const m_XK_Right = 0xff53
  1968. const m_XK_Romaji = 0xff24
  1969. const m_XK_RupeeSign = 0x10020a8
  1970. const m_XK_S = 0x0053
  1971. const m_XK_SCHWA = 0x100018f
  1972. const m_XK_Sabovedot = 0x1001e60
  1973. const m_XK_Sacute = 0x01a6
  1974. const m_XK_Scaron = 0x01a9
  1975. const m_XK_Scedilla = 0x01aa
  1976. const m_XK_Scircumflex = 0x02de
  1977. const m_XK_Scroll_Lock = 0xff14
  1978. const m_XK_Select = 0xff60
  1979. const m_XK_Serbian_DJE = 0x06b1
  1980. const m_XK_Serbian_DZE = 0x06bf
  1981. const m_XK_Serbian_JE = 0x06b8
  1982. const m_XK_Serbian_LJE = 0x06b9
  1983. const m_XK_Serbian_NJE = 0x06ba
  1984. const m_XK_Serbian_TSHE = 0x06bb
  1985. const m_XK_Serbian_dje = 0x06a1
  1986. const m_XK_Serbian_dze = 0x06af
  1987. const m_XK_Serbian_je = 0x06a8
  1988. const m_XK_Serbian_lje = 0x06a9
  1989. const m_XK_Serbian_nje = 0x06aa
  1990. const m_XK_Serbian_tshe = 0x06ab
  1991. const m_XK_Shift_L = 0xffe1
  1992. const m_XK_Shift_Lock = 0xffe6
  1993. const m_XK_Shift_R = 0xffe2
  1994. const m_XK_SingleCandidate = 0xff3c
  1995. const m_XK_Sinh_a = 0x1000d85
  1996. const m_XK_Sinh_aa = 0x1000d86
  1997. const m_XK_Sinh_aa2 = 0x1000dcf
  1998. const m_XK_Sinh_ae = 0x1000d87
  1999. const m_XK_Sinh_ae2 = 0x1000dd0
  2000. const m_XK_Sinh_aee = 0x1000d88
  2001. const m_XK_Sinh_aee2 = 0x1000dd1
  2002. const m_XK_Sinh_ai = 0x1000d93
  2003. const m_XK_Sinh_ai2 = 0x1000ddb
  2004. const m_XK_Sinh_al = 0x1000dca
  2005. const m_XK_Sinh_au = 0x1000d96
  2006. const m_XK_Sinh_au2 = 0x1000dde
  2007. const m_XK_Sinh_ba = 0x1000db6
  2008. const m_XK_Sinh_bha = 0x1000db7
  2009. const m_XK_Sinh_ca = 0x1000da0
  2010. const m_XK_Sinh_cha = 0x1000da1
  2011. const m_XK_Sinh_dda = 0x1000da9
  2012. const m_XK_Sinh_ddha = 0x1000daa
  2013. const m_XK_Sinh_dha = 0x1000daf
  2014. const m_XK_Sinh_dhha = 0x1000db0
  2015. const m_XK_Sinh_e = 0x1000d91
  2016. const m_XK_Sinh_e2 = 0x1000dd9
  2017. const m_XK_Sinh_ee = 0x1000d92
  2018. const m_XK_Sinh_ee2 = 0x1000dda
  2019. const m_XK_Sinh_fa = 0x1000dc6
  2020. const m_XK_Sinh_ga = 0x1000d9c
  2021. const m_XK_Sinh_gha = 0x1000d9d
  2022. const m_XK_Sinh_h2 = 0x1000d83
  2023. const m_XK_Sinh_ha = 0x1000dc4
  2024. const m_XK_Sinh_i = 0x1000d89
  2025. const m_XK_Sinh_i2 = 0x1000dd2
  2026. const m_XK_Sinh_ii = 0x1000d8a
  2027. const m_XK_Sinh_ii2 = 0x1000dd3
  2028. const m_XK_Sinh_ja = 0x1000da2
  2029. const m_XK_Sinh_jha = 0x1000da3
  2030. const m_XK_Sinh_jnya = 0x1000da5
  2031. const m_XK_Sinh_ka = 0x1000d9a
  2032. const m_XK_Sinh_kha = 0x1000d9b
  2033. const m_XK_Sinh_kunddaliya = 0x1000df4
  2034. const m_XK_Sinh_la = 0x1000dbd
  2035. const m_XK_Sinh_lla = 0x1000dc5
  2036. const m_XK_Sinh_lu = 0x1000d8f
  2037. const m_XK_Sinh_lu2 = 0x1000ddf
  2038. const m_XK_Sinh_luu = 0x1000d90
  2039. const m_XK_Sinh_luu2 = 0x1000df3
  2040. const m_XK_Sinh_ma = 0x1000db8
  2041. const m_XK_Sinh_mba = 0x1000db9
  2042. const m_XK_Sinh_na = 0x1000db1
  2043. const m_XK_Sinh_ndda = 0x1000dac
  2044. const m_XK_Sinh_ndha = 0x1000db3
  2045. const m_XK_Sinh_ng = 0x1000d82
  2046. const m_XK_Sinh_ng2 = 0x1000d9e
  2047. const m_XK_Sinh_nga = 0x1000d9f
  2048. const m_XK_Sinh_nja = 0x1000da6
  2049. const m_XK_Sinh_nna = 0x1000dab
  2050. const m_XK_Sinh_nya = 0x1000da4
  2051. const m_XK_Sinh_o = 0x1000d94
  2052. const m_XK_Sinh_o2 = 0x1000ddc
  2053. const m_XK_Sinh_oo = 0x1000d95
  2054. const m_XK_Sinh_oo2 = 0x1000ddd
  2055. const m_XK_Sinh_pa = 0x1000db4
  2056. const m_XK_Sinh_pha = 0x1000db5
  2057. const m_XK_Sinh_ra = 0x1000dbb
  2058. const m_XK_Sinh_ri = 0x1000d8d
  2059. const m_XK_Sinh_rii = 0x1000d8e
  2060. const m_XK_Sinh_ru2 = 0x1000dd8
  2061. const m_XK_Sinh_ruu2 = 0x1000df2
  2062. const m_XK_Sinh_sa = 0x1000dc3
  2063. const m_XK_Sinh_sha = 0x1000dc1
  2064. const m_XK_Sinh_ssha = 0x1000dc2
  2065. const m_XK_Sinh_tha = 0x1000dad
  2066. const m_XK_Sinh_thha = 0x1000dae
  2067. const m_XK_Sinh_tta = 0x1000da7
  2068. const m_XK_Sinh_ttha = 0x1000da8
  2069. const m_XK_Sinh_u = 0x1000d8b
  2070. const m_XK_Sinh_u2 = 0x1000dd4
  2071. const m_XK_Sinh_uu = 0x1000d8c
  2072. const m_XK_Sinh_uu2 = 0x1000dd6
  2073. const m_XK_Sinh_va = 0x1000dc0
  2074. const m_XK_Sinh_ya = 0x1000dba
  2075. const m_XK_SlowKeys_Enable = 0xfe73
  2076. const m_XK_StickyKeys_Enable = 0xfe75
  2077. const m_XK_Super_L = 0xffeb
  2078. const m_XK_Super_R = 0xffec
  2079. const m_XK_Sys_Req = 0xff15
  2080. const m_XK_T = 0x0054
  2081. const m_XK_THORN = 0x00de
  2082. const m_XK_Tab = 0xff09
  2083. const m_XK_Tabovedot = 0x1001e6a
  2084. const m_XK_Tcaron = 0x01ab
  2085. const m_XK_Tcedilla = 0x01de
  2086. const m_XK_Terminate_Server = 0xfed5
  2087. const m_XK_Thai_baht = 0x0ddf
  2088. const m_XK_Thai_bobaimai = 0x0dba
  2089. const m_XK_Thai_chochan = 0x0da8
  2090. const m_XK_Thai_chochang = 0x0daa
  2091. const m_XK_Thai_choching = 0x0da9
  2092. const m_XK_Thai_chochoe = 0x0dac
  2093. const m_XK_Thai_dochada = 0x0dae
  2094. const m_XK_Thai_dodek = 0x0db4
  2095. const m_XK_Thai_fofa = 0x0dbd
  2096. const m_XK_Thai_fofan = 0x0dbf
  2097. const m_XK_Thai_hohip = 0x0dcb
  2098. const m_XK_Thai_honokhuk = 0x0dce
  2099. const m_XK_Thai_khokhai = 0x0da2
  2100. const m_XK_Thai_khokhon = 0x0da5
  2101. const m_XK_Thai_khokhuat = 0x0da3
  2102. const m_XK_Thai_khokhwai = 0x0da4
  2103. const m_XK_Thai_khorakhang = 0x0da6
  2104. const m_XK_Thai_kokai = 0x0da1
  2105. const m_XK_Thai_lakkhangyao = 0x0de5
  2106. const m_XK_Thai_lekchet = 0x0df7
  2107. const m_XK_Thai_lekha = 0x0df5
  2108. const m_XK_Thai_lekhok = 0x0df6
  2109. const m_XK_Thai_lekkao = 0x0df9
  2110. const m_XK_Thai_leknung = 0x0df1
  2111. const m_XK_Thai_lekpaet = 0x0df8
  2112. const m_XK_Thai_leksam = 0x0df3
  2113. const m_XK_Thai_leksi = 0x0df4
  2114. const m_XK_Thai_leksong = 0x0df2
  2115. const m_XK_Thai_leksun = 0x0df0
  2116. const m_XK_Thai_lochula = 0x0dcc
  2117. const m_XK_Thai_loling = 0x0dc5
  2118. const m_XK_Thai_lu = 0x0dc6
  2119. const m_XK_Thai_maichattawa = 0x0deb
  2120. const m_XK_Thai_maiek = 0x0de8
  2121. const m_XK_Thai_maihanakat = 0x0dd1
  2122. const m_XK_Thai_maihanakat_maitho = 0x0dde
  2123. const m_XK_Thai_maitaikhu = 0x0de7
  2124. const m_XK_Thai_maitho = 0x0de9
  2125. const m_XK_Thai_maitri = 0x0dea
  2126. const m_XK_Thai_maiyamok = 0x0de6
  2127. const m_XK_Thai_moma = 0x0dc1
  2128. const m_XK_Thai_ngongu = 0x0da7
  2129. const m_XK_Thai_nikhahit = 0x0ded
  2130. const m_XK_Thai_nonen = 0x0db3
  2131. const m_XK_Thai_nonu = 0x0db9
  2132. const m_XK_Thai_oang = 0x0dcd
  2133. const m_XK_Thai_paiyannoi = 0x0dcf
  2134. const m_XK_Thai_phinthu = 0x0dda
  2135. const m_XK_Thai_phophan = 0x0dbe
  2136. const m_XK_Thai_phophung = 0x0dbc
  2137. const m_XK_Thai_phosamphao = 0x0dc0
  2138. const m_XK_Thai_popla = 0x0dbb
  2139. const m_XK_Thai_rorua = 0x0dc3
  2140. const m_XK_Thai_ru = 0x0dc4
  2141. const m_XK_Thai_saraa = 0x0dd0
  2142. const m_XK_Thai_saraaa = 0x0dd2
  2143. const m_XK_Thai_saraae = 0x0de1
  2144. const m_XK_Thai_saraaimaimalai = 0x0de4
  2145. const m_XK_Thai_saraaimaimuan = 0x0de3
  2146. const m_XK_Thai_saraam = 0x0dd3
  2147. const m_XK_Thai_sarae = 0x0de0
  2148. const m_XK_Thai_sarai = 0x0dd4
  2149. const m_XK_Thai_saraii = 0x0dd5
  2150. const m_XK_Thai_sarao = 0x0de2
  2151. const m_XK_Thai_sarau = 0x0dd8
  2152. const m_XK_Thai_saraue = 0x0dd6
  2153. const m_XK_Thai_sarauee = 0x0dd7
  2154. const m_XK_Thai_sarauu = 0x0dd9
  2155. const m_XK_Thai_sorusi = 0x0dc9
  2156. const m_XK_Thai_sosala = 0x0dc8
  2157. const m_XK_Thai_soso = 0x0dab
  2158. const m_XK_Thai_sosua = 0x0dca
  2159. const m_XK_Thai_thanthakhat = 0x0dec
  2160. const m_XK_Thai_thonangmontho = 0x0db1
  2161. const m_XK_Thai_thophuthao = 0x0db2
  2162. const m_XK_Thai_thothahan = 0x0db7
  2163. const m_XK_Thai_thothan = 0x0db0
  2164. const m_XK_Thai_thothong = 0x0db8
  2165. const m_XK_Thai_thothung = 0x0db6
  2166. const m_XK_Thai_topatak = 0x0daf
  2167. const m_XK_Thai_totao = 0x0db5
  2168. const m_XK_Thai_wowaen = 0x0dc7
  2169. const m_XK_Thai_yoyak = 0x0dc2
  2170. const m_XK_Thai_yoying = 0x0dad
  2171. const m_XK_Thorn = 0x00de
  2172. const m_XK_Touroku = 0xff2b
  2173. const m_XK_Tslash = 0x03ac
  2174. const m_XK_U = 0x0055
  2175. const m_XK_Uacute = 0x00da
  2176. const m_XK_Ubelowdot = 0x1001ee4
  2177. const m_XK_Ubreve = 0x02dd
  2178. const m_XK_Ucircumflex = 0x00db
  2179. const m_XK_Udiaeresis = 0x00dc
  2180. const m_XK_Udoubleacute = 0x01db
  2181. const m_XK_Ugrave = 0x00d9
  2182. const m_XK_Uhook = 0x1001ee6
  2183. const m_XK_Uhorn = 0x10001af
  2184. const m_XK_Uhornacute = 0x1001ee8
  2185. const m_XK_Uhornbelowdot = 0x1001ef0
  2186. const m_XK_Uhorngrave = 0x1001eea
  2187. const m_XK_Uhornhook = 0x1001eec
  2188. const m_XK_Uhorntilde = 0x1001eee
  2189. const m_XK_Ukrainian_GHE_WITH_UPTURN = 0x06bd
  2190. const m_XK_Ukrainian_I = 0x06b6
  2191. const m_XK_Ukrainian_IE = 0x06b4
  2192. const m_XK_Ukrainian_YI = 0x06b7
  2193. const m_XK_Ukrainian_ghe_with_upturn = 0x06ad
  2194. const m_XK_Ukrainian_i = 0x06a6
  2195. const m_XK_Ukrainian_ie = 0x06a4
  2196. const m_XK_Ukrainian_yi = 0x06a7
  2197. const m_XK_Ukranian_I = 0x06b6
  2198. const m_XK_Ukranian_JE = 0x06b4
  2199. const m_XK_Ukranian_YI = 0x06b7
  2200. const m_XK_Ukranian_i = 0x06a6
  2201. const m_XK_Ukranian_je = 0x06a4
  2202. const m_XK_Ukranian_yi = 0x06a7
  2203. const m_XK_Umacron = 0x03de
  2204. const m_XK_Undo = 0xff65
  2205. const m_XK_Uogonek = 0x03d9
  2206. const m_XK_Up = 0xff52
  2207. const m_XK_Uring = 0x01d9
  2208. const m_XK_Utilde = 0x03dd
  2209. const m_XK_V = 0x0056
  2210. const m_XK_VoidSymbol = 0xffffff
  2211. const m_XK_W = 0x0057
  2212. const m_XK_Wacute = 0x1001e82
  2213. const m_XK_Wcircumflex = 0x1000174
  2214. const m_XK_Wdiaeresis = 0x1001e84
  2215. const m_XK_Wgrave = 0x1001e80
  2216. const m_XK_WonSign = 0x10020a9
  2217. const m_XK_X = 0x0058
  2218. const m_XK_Xabovedot = 0x1001e8a
  2219. const m_XK_Y = 0x0059
  2220. const m_XK_Yacute = 0x00dd
  2221. const m_XK_Ybelowdot = 0x1001ef4
  2222. const m_XK_Ycircumflex = 0x1000176
  2223. const m_XK_Ydiaeresis = 0x13be
  2224. const m_XK_Ygrave = 0x1001ef2
  2225. const m_XK_Yhook = 0x1001ef6
  2226. const m_XK_Ytilde = 0x1001ef8
  2227. const m_XK_Z = 0x005a
  2228. const m_XK_Zabovedot = 0x01af
  2229. const m_XK_Zacute = 0x01ac
  2230. const m_XK_Zcaron = 0x01ae
  2231. const m_XK_Zen_Koho = 0xff3d
  2232. const m_XK_Zenkaku = 0xff28
  2233. const m_XK_Zenkaku_Hankaku = 0xff2a
  2234. const m_XK_Zstroke = 0x10001b5
  2235. const m_XK_a = 0x0061
  2236. const m_XK_aacute = 0x00e1
  2237. const m_XK_abelowdot = 0x1001ea1
  2238. const m_XK_abovedot = 0x01ff
  2239. const m_XK_abreve = 0x01e3
  2240. const m_XK_abreveacute = 0x1001eaf
  2241. const m_XK_abrevebelowdot = 0x1001eb7
  2242. const m_XK_abrevegrave = 0x1001eb1
  2243. const m_XK_abrevehook = 0x1001eb3
  2244. const m_XK_abrevetilde = 0x1001eb5
  2245. const m_XK_acircumflex = 0x00e2
  2246. const m_XK_acircumflexacute = 0x1001ea5
  2247. const m_XK_acircumflexbelowdot = 0x1001ead
  2248. const m_XK_acircumflexgrave = 0x1001ea7
  2249. const m_XK_acircumflexhook = 0x1001ea9
  2250. const m_XK_acircumflextilde = 0x1001eab
  2251. const m_XK_acute = 0x00b4
  2252. const m_XK_adiaeresis = 0x00e4
  2253. const m_XK_ae = 0x00e6
  2254. const m_XK_agrave = 0x00e0
  2255. const m_XK_ahook = 0x1001ea3
  2256. const m_XK_amacron = 0x03e0
  2257. const m_XK_ampersand = 0x0026
  2258. const m_XK_aogonek = 0x01b1
  2259. const m_XK_apostrophe = 0x0027
  2260. const m_XK_approxeq = 0x1002248
  2261. const m_XK_aring = 0x00e5
  2262. const m_XK_asciicircum = 0x005e
  2263. const m_XK_asciitilde = 0x007e
  2264. const m_XK_asterisk = 0x002a
  2265. const m_XK_at = 0x0040
  2266. const m_XK_atilde = 0x00e3
  2267. const m_XK_b = 0x0062
  2268. const m_XK_babovedot = 0x1001e03
  2269. const m_XK_backslash = 0x005c
  2270. const m_XK_bar = 0x007c
  2271. const m_XK_because = 0x1002235
  2272. const m_XK_braceleft = 0x007b
  2273. const m_XK_braceright = 0x007d
  2274. const m_XK_bracketleft = 0x005b
  2275. const m_XK_bracketright = 0x005d
  2276. const m_XK_braille_blank = 0x1002800
  2277. const m_XK_braille_dot_1 = 0xfff1
  2278. const m_XK_braille_dot_10 = 0xfffa
  2279. const m_XK_braille_dot_2 = 0xfff2
  2280. const m_XK_braille_dot_3 = 0xfff3
  2281. const m_XK_braille_dot_4 = 0xfff4
  2282. const m_XK_braille_dot_5 = 0xfff5
  2283. const m_XK_braille_dot_6 = 0xfff6
  2284. const m_XK_braille_dot_7 = 0xfff7
  2285. const m_XK_braille_dot_8 = 0xfff8
  2286. const m_XK_braille_dot_9 = 0xfff9
  2287. const m_XK_braille_dots_1 = 0x1002801
  2288. const m_XK_braille_dots_12 = 0x1002803
  2289. const m_XK_braille_dots_123 = 0x1002807
  2290. const m_XK_braille_dots_1234 = 0x100280f
  2291. const m_XK_braille_dots_12345 = 0x100281f
  2292. const m_XK_braille_dots_123456 = 0x100283f
  2293. const m_XK_braille_dots_1234567 = 0x100287f
  2294. const m_XK_braille_dots_12345678 = 0x10028ff
  2295. const m_XK_braille_dots_1234568 = 0x10028bf
  2296. const m_XK_braille_dots_123457 = 0x100285f
  2297. const m_XK_braille_dots_1234578 = 0x10028df
  2298. const m_XK_braille_dots_123458 = 0x100289f
  2299. const m_XK_braille_dots_12346 = 0x100282f
  2300. const m_XK_braille_dots_123467 = 0x100286f
  2301. const m_XK_braille_dots_1234678 = 0x10028ef
  2302. const m_XK_braille_dots_123468 = 0x10028af
  2303. const m_XK_braille_dots_12347 = 0x100284f
  2304. const m_XK_braille_dots_123478 = 0x10028cf
  2305. const m_XK_braille_dots_12348 = 0x100288f
  2306. const m_XK_braille_dots_1235 = 0x1002817
  2307. const m_XK_braille_dots_12356 = 0x1002837
  2308. const m_XK_braille_dots_123567 = 0x1002877
  2309. const m_XK_braille_dots_1235678 = 0x10028f7
  2310. const m_XK_braille_dots_123568 = 0x10028b7
  2311. const m_XK_braille_dots_12357 = 0x1002857
  2312. const m_XK_braille_dots_123578 = 0x10028d7
  2313. const m_XK_braille_dots_12358 = 0x1002897
  2314. const m_XK_braille_dots_1236 = 0x1002827
  2315. const m_XK_braille_dots_12367 = 0x1002867
  2316. const m_XK_braille_dots_123678 = 0x10028e7
  2317. const m_XK_braille_dots_12368 = 0x10028a7
  2318. const m_XK_braille_dots_1237 = 0x1002847
  2319. const m_XK_braille_dots_12378 = 0x10028c7
  2320. const m_XK_braille_dots_1238 = 0x1002887
  2321. const m_XK_braille_dots_124 = 0x100280b
  2322. const m_XK_braille_dots_1245 = 0x100281b
  2323. const m_XK_braille_dots_12456 = 0x100283b
  2324. const m_XK_braille_dots_124567 = 0x100287b
  2325. const m_XK_braille_dots_1245678 = 0x10028fb
  2326. const m_XK_braille_dots_124568 = 0x10028bb
  2327. const m_XK_braille_dots_12457 = 0x100285b
  2328. const m_XK_braille_dots_124578 = 0x10028db
  2329. const m_XK_braille_dots_12458 = 0x100289b
  2330. const m_XK_braille_dots_1246 = 0x100282b
  2331. const m_XK_braille_dots_12467 = 0x100286b
  2332. const m_XK_braille_dots_124678 = 0x10028eb
  2333. const m_XK_braille_dots_12468 = 0x10028ab
  2334. const m_XK_braille_dots_1247 = 0x100284b
  2335. const m_XK_braille_dots_12478 = 0x10028cb
  2336. const m_XK_braille_dots_1248 = 0x100288b
  2337. const m_XK_braille_dots_125 = 0x1002813
  2338. const m_XK_braille_dots_1256 = 0x1002833
  2339. const m_XK_braille_dots_12567 = 0x1002873
  2340. const m_XK_braille_dots_125678 = 0x10028f3
  2341. const m_XK_braille_dots_12568 = 0x10028b3
  2342. const m_XK_braille_dots_1257 = 0x1002853
  2343. const m_XK_braille_dots_12578 = 0x10028d3
  2344. const m_XK_braille_dots_1258 = 0x1002893
  2345. const m_XK_braille_dots_126 = 0x1002823
  2346. const m_XK_braille_dots_1267 = 0x1002863
  2347. const m_XK_braille_dots_12678 = 0x10028e3
  2348. const m_XK_braille_dots_1268 = 0x10028a3
  2349. const m_XK_braille_dots_127 = 0x1002843
  2350. const m_XK_braille_dots_1278 = 0x10028c3
  2351. const m_XK_braille_dots_128 = 0x1002883
  2352. const m_XK_braille_dots_13 = 0x1002805
  2353. const m_XK_braille_dots_134 = 0x100280d
  2354. const m_XK_braille_dots_1345 = 0x100281d
  2355. const m_XK_braille_dots_13456 = 0x100283d
  2356. const m_XK_braille_dots_134567 = 0x100287d
  2357. const m_XK_braille_dots_1345678 = 0x10028fd
  2358. const m_XK_braille_dots_134568 = 0x10028bd
  2359. const m_XK_braille_dots_13457 = 0x100285d
  2360. const m_XK_braille_dots_134578 = 0x10028dd
  2361. const m_XK_braille_dots_13458 = 0x100289d
  2362. const m_XK_braille_dots_1346 = 0x100282d
  2363. const m_XK_braille_dots_13467 = 0x100286d
  2364. const m_XK_braille_dots_134678 = 0x10028ed
  2365. const m_XK_braille_dots_13468 = 0x10028ad
  2366. const m_XK_braille_dots_1347 = 0x100284d
  2367. const m_XK_braille_dots_13478 = 0x10028cd
  2368. const m_XK_braille_dots_1348 = 0x100288d
  2369. const m_XK_braille_dots_135 = 0x1002815
  2370. const m_XK_braille_dots_1356 = 0x1002835
  2371. const m_XK_braille_dots_13567 = 0x1002875
  2372. const m_XK_braille_dots_135678 = 0x10028f5
  2373. const m_XK_braille_dots_13568 = 0x10028b5
  2374. const m_XK_braille_dots_1357 = 0x1002855
  2375. const m_XK_braille_dots_13578 = 0x10028d5
  2376. const m_XK_braille_dots_1358 = 0x1002895
  2377. const m_XK_braille_dots_136 = 0x1002825
  2378. const m_XK_braille_dots_1367 = 0x1002865
  2379. const m_XK_braille_dots_13678 = 0x10028e5
  2380. const m_XK_braille_dots_1368 = 0x10028a5
  2381. const m_XK_braille_dots_137 = 0x1002845
  2382. const m_XK_braille_dots_1378 = 0x10028c5
  2383. const m_XK_braille_dots_138 = 0x1002885
  2384. const m_XK_braille_dots_14 = 0x1002809
  2385. const m_XK_braille_dots_145 = 0x1002819
  2386. const m_XK_braille_dots_1456 = 0x1002839
  2387. const m_XK_braille_dots_14567 = 0x1002879
  2388. const m_XK_braille_dots_145678 = 0x10028f9
  2389. const m_XK_braille_dots_14568 = 0x10028b9
  2390. const m_XK_braille_dots_1457 = 0x1002859
  2391. const m_XK_braille_dots_14578 = 0x10028d9
  2392. const m_XK_braille_dots_1458 = 0x1002899
  2393. const m_XK_braille_dots_146 = 0x1002829
  2394. const m_XK_braille_dots_1467 = 0x1002869
  2395. const m_XK_braille_dots_14678 = 0x10028e9
  2396. const m_XK_braille_dots_1468 = 0x10028a9
  2397. const m_XK_braille_dots_147 = 0x1002849
  2398. const m_XK_braille_dots_1478 = 0x10028c9
  2399. const m_XK_braille_dots_148 = 0x1002889
  2400. const m_XK_braille_dots_15 = 0x1002811
  2401. const m_XK_braille_dots_156 = 0x1002831
  2402. const m_XK_braille_dots_1567 = 0x1002871
  2403. const m_XK_braille_dots_15678 = 0x10028f1
  2404. const m_XK_braille_dots_1568 = 0x10028b1
  2405. const m_XK_braille_dots_157 = 0x1002851
  2406. const m_XK_braille_dots_1578 = 0x10028d1
  2407. const m_XK_braille_dots_158 = 0x1002891
  2408. const m_XK_braille_dots_16 = 0x1002821
  2409. const m_XK_braille_dots_167 = 0x1002861
  2410. const m_XK_braille_dots_1678 = 0x10028e1
  2411. const m_XK_braille_dots_168 = 0x10028a1
  2412. const m_XK_braille_dots_17 = 0x1002841
  2413. const m_XK_braille_dots_178 = 0x10028c1
  2414. const m_XK_braille_dots_18 = 0x1002881
  2415. const m_XK_braille_dots_2 = 0x1002802
  2416. const m_XK_braille_dots_23 = 0x1002806
  2417. const m_XK_braille_dots_234 = 0x100280e
  2418. const m_XK_braille_dots_2345 = 0x100281e
  2419. const m_XK_braille_dots_23456 = 0x100283e
  2420. const m_XK_braille_dots_234567 = 0x100287e
  2421. const m_XK_braille_dots_2345678 = 0x10028fe
  2422. const m_XK_braille_dots_234568 = 0x10028be
  2423. const m_XK_braille_dots_23457 = 0x100285e
  2424. const m_XK_braille_dots_234578 = 0x10028de
  2425. const m_XK_braille_dots_23458 = 0x100289e
  2426. const m_XK_braille_dots_2346 = 0x100282e
  2427. const m_XK_braille_dots_23467 = 0x100286e
  2428. const m_XK_braille_dots_234678 = 0x10028ee
  2429. const m_XK_braille_dots_23468 = 0x10028ae
  2430. const m_XK_braille_dots_2347 = 0x100284e
  2431. const m_XK_braille_dots_23478 = 0x10028ce
  2432. const m_XK_braille_dots_2348 = 0x100288e
  2433. const m_XK_braille_dots_235 = 0x1002816
  2434. const m_XK_braille_dots_2356 = 0x1002836
  2435. const m_XK_braille_dots_23567 = 0x1002876
  2436. const m_XK_braille_dots_235678 = 0x10028f6
  2437. const m_XK_braille_dots_23568 = 0x10028b6
  2438. const m_XK_braille_dots_2357 = 0x1002856
  2439. const m_XK_braille_dots_23578 = 0x10028d6
  2440. const m_XK_braille_dots_2358 = 0x1002896
  2441. const m_XK_braille_dots_236 = 0x1002826
  2442. const m_XK_braille_dots_2367 = 0x1002866
  2443. const m_XK_braille_dots_23678 = 0x10028e6
  2444. const m_XK_braille_dots_2368 = 0x10028a6
  2445. const m_XK_braille_dots_237 = 0x1002846
  2446. const m_XK_braille_dots_2378 = 0x10028c6
  2447. const m_XK_braille_dots_238 = 0x1002886
  2448. const m_XK_braille_dots_24 = 0x100280a
  2449. const m_XK_braille_dots_245 = 0x100281a
  2450. const m_XK_braille_dots_2456 = 0x100283a
  2451. const m_XK_braille_dots_24567 = 0x100287a
  2452. const m_XK_braille_dots_245678 = 0x10028fa
  2453. const m_XK_braille_dots_24568 = 0x10028ba
  2454. const m_XK_braille_dots_2457 = 0x100285a
  2455. const m_XK_braille_dots_24578 = 0x10028da
  2456. const m_XK_braille_dots_2458 = 0x100289a
  2457. const m_XK_braille_dots_246 = 0x100282a
  2458. const m_XK_braille_dots_2467 = 0x100286a
  2459. const m_XK_braille_dots_24678 = 0x10028ea
  2460. const m_XK_braille_dots_2468 = 0x10028aa
  2461. const m_XK_braille_dots_247 = 0x100284a
  2462. const m_XK_braille_dots_2478 = 0x10028ca
  2463. const m_XK_braille_dots_248 = 0x100288a
  2464. const m_XK_braille_dots_25 = 0x1002812
  2465. const m_XK_braille_dots_256 = 0x1002832
  2466. const m_XK_braille_dots_2567 = 0x1002872
  2467. const m_XK_braille_dots_25678 = 0x10028f2
  2468. const m_XK_braille_dots_2568 = 0x10028b2
  2469. const m_XK_braille_dots_257 = 0x1002852
  2470. const m_XK_braille_dots_2578 = 0x10028d2
  2471. const m_XK_braille_dots_258 = 0x1002892
  2472. const m_XK_braille_dots_26 = 0x1002822
  2473. const m_XK_braille_dots_267 = 0x1002862
  2474. const m_XK_braille_dots_2678 = 0x10028e2
  2475. const m_XK_braille_dots_268 = 0x10028a2
  2476. const m_XK_braille_dots_27 = 0x1002842
  2477. const m_XK_braille_dots_278 = 0x10028c2
  2478. const m_XK_braille_dots_28 = 0x1002882
  2479. const m_XK_braille_dots_3 = 0x1002804
  2480. const m_XK_braille_dots_34 = 0x100280c
  2481. const m_XK_braille_dots_345 = 0x100281c
  2482. const m_XK_braille_dots_3456 = 0x100283c
  2483. const m_XK_braille_dots_34567 = 0x100287c
  2484. const m_XK_braille_dots_345678 = 0x10028fc
  2485. const m_XK_braille_dots_34568 = 0x10028bc
  2486. const m_XK_braille_dots_3457 = 0x100285c
  2487. const m_XK_braille_dots_34578 = 0x10028dc
  2488. const m_XK_braille_dots_3458 = 0x100289c
  2489. const m_XK_braille_dots_346 = 0x100282c
  2490. const m_XK_braille_dots_3467 = 0x100286c
  2491. const m_XK_braille_dots_34678 = 0x10028ec
  2492. const m_XK_braille_dots_3468 = 0x10028ac
  2493. const m_XK_braille_dots_347 = 0x100284c
  2494. const m_XK_braille_dots_3478 = 0x10028cc
  2495. const m_XK_braille_dots_348 = 0x100288c
  2496. const m_XK_braille_dots_35 = 0x1002814
  2497. const m_XK_braille_dots_356 = 0x1002834
  2498. const m_XK_braille_dots_3567 = 0x1002874
  2499. const m_XK_braille_dots_35678 = 0x10028f4
  2500. const m_XK_braille_dots_3568 = 0x10028b4
  2501. const m_XK_braille_dots_357 = 0x1002854
  2502. const m_XK_braille_dots_3578 = 0x10028d4
  2503. const m_XK_braille_dots_358 = 0x1002894
  2504. const m_XK_braille_dots_36 = 0x1002824
  2505. const m_XK_braille_dots_367 = 0x1002864
  2506. const m_XK_braille_dots_3678 = 0x10028e4
  2507. const m_XK_braille_dots_368 = 0x10028a4
  2508. const m_XK_braille_dots_37 = 0x1002844
  2509. const m_XK_braille_dots_378 = 0x10028c4
  2510. const m_XK_braille_dots_38 = 0x1002884
  2511. const m_XK_braille_dots_4 = 0x1002808
  2512. const m_XK_braille_dots_45 = 0x1002818
  2513. const m_XK_braille_dots_456 = 0x1002838
  2514. const m_XK_braille_dots_4567 = 0x1002878
  2515. const m_XK_braille_dots_45678 = 0x10028f8
  2516. const m_XK_braille_dots_4568 = 0x10028b8
  2517. const m_XK_braille_dots_457 = 0x1002858
  2518. const m_XK_braille_dots_4578 = 0x10028d8
  2519. const m_XK_braille_dots_458 = 0x1002898
  2520. const m_XK_braille_dots_46 = 0x1002828
  2521. const m_XK_braille_dots_467 = 0x1002868
  2522. const m_XK_braille_dots_4678 = 0x10028e8
  2523. const m_XK_braille_dots_468 = 0x10028a8
  2524. const m_XK_braille_dots_47 = 0x1002848
  2525. const m_XK_braille_dots_478 = 0x10028c8
  2526. const m_XK_braille_dots_48 = 0x1002888
  2527. const m_XK_braille_dots_5 = 0x1002810
  2528. const m_XK_braille_dots_56 = 0x1002830
  2529. const m_XK_braille_dots_567 = 0x1002870
  2530. const m_XK_braille_dots_5678 = 0x10028f0
  2531. const m_XK_braille_dots_568 = 0x10028b0
  2532. const m_XK_braille_dots_57 = 0x1002850
  2533. const m_XK_braille_dots_578 = 0x10028d0
  2534. const m_XK_braille_dots_58 = 0x1002890
  2535. const m_XK_braille_dots_6 = 0x1002820
  2536. const m_XK_braille_dots_67 = 0x1002860
  2537. const m_XK_braille_dots_678 = 0x10028e0
  2538. const m_XK_braille_dots_68 = 0x10028a0
  2539. const m_XK_braille_dots_7 = 0x1002840
  2540. const m_XK_braille_dots_78 = 0x10028c0
  2541. const m_XK_braille_dots_8 = 0x1002880
  2542. const m_XK_breve = 0x01a2
  2543. const m_XK_brokenbar = 0x00a6
  2544. const m_XK_c = 0x0063
  2545. const m_XK_c_h = 0xfea3
  2546. const m_XK_cabovedot = 0x02e5
  2547. const m_XK_cacute = 0x01e6
  2548. const m_XK_caron = 0x01b7
  2549. const m_XK_ccaron = 0x01e8
  2550. const m_XK_ccedilla = 0x00e7
  2551. const m_XK_ccircumflex = 0x02e6
  2552. const m_XK_cedilla = 0x00b8
  2553. const m_XK_cent = 0x00a2
  2554. const m_XK_ch = 0xfea0
  2555. const m_XK_colon = 0x003a
  2556. const m_XK_combining_acute = 0x1000301
  2557. const m_XK_combining_belowdot = 0x1000323
  2558. const m_XK_combining_grave = 0x1000300
  2559. const m_XK_combining_hook = 0x1000309
  2560. const m_XK_combining_tilde = 0x1000303
  2561. const m_XK_comma = 0x002c
  2562. const m_XK_containsas = 0x100220B
  2563. const m_XK_copyright = 0x00a9
  2564. const m_XK_cuberoot = 0x100221B
  2565. const m_XK_currency = 0x00a4
  2566. const m_XK_d = 0x0064
  2567. const m_XK_dabovedot = 0x1001e0b
  2568. const m_XK_dcaron = 0x01ef
  2569. const m_XK_dead_A = 0xfe81
  2570. const m_XK_dead_E = 0xfe83
  2571. const m_XK_dead_I = 0xfe85
  2572. const m_XK_dead_O = 0xfe87
  2573. const m_XK_dead_U = 0xfe89
  2574. const m_XK_dead_a = 0xfe80
  2575. const m_XK_dead_abovecomma = 0xfe64
  2576. const m_XK_dead_abovedot = 0xfe56
  2577. const m_XK_dead_abovereversedcomma = 0xfe65
  2578. const m_XK_dead_abovering = 0xfe58
  2579. const m_XK_dead_aboveverticalline = 0xfe91
  2580. const m_XK_dead_acute = 0xfe51
  2581. const m_XK_dead_belowbreve = 0xfe6b
  2582. const m_XK_dead_belowcircumflex = 0xfe69
  2583. const m_XK_dead_belowcomma = 0xfe6e
  2584. const m_XK_dead_belowdiaeresis = 0xfe6c
  2585. const m_XK_dead_belowdot = 0xfe60
  2586. const m_XK_dead_belowmacron = 0xfe68
  2587. const m_XK_dead_belowring = 0xfe67
  2588. const m_XK_dead_belowtilde = 0xfe6a
  2589. const m_XK_dead_belowverticalline = 0xfe92
  2590. const m_XK_dead_breve = 0xfe55
  2591. const m_XK_dead_capital_schwa = 0xfe8b
  2592. const m_XK_dead_caron = 0xfe5a
  2593. const m_XK_dead_cedilla = 0xfe5b
  2594. const m_XK_dead_circumflex = 0xfe52
  2595. const m_XK_dead_currency = 0xfe6f
  2596. const m_XK_dead_dasia = 0xfe65
  2597. const m_XK_dead_diaeresis = 0xfe57
  2598. const m_XK_dead_doubleacute = 0xfe59
  2599. const m_XK_dead_doublegrave = 0xfe66
  2600. const m_XK_dead_e = 0xfe82
  2601. const m_XK_dead_grave = 0xfe50
  2602. const m_XK_dead_greek = 0xfe8c
  2603. const m_XK_dead_hook = 0xfe61
  2604. const m_XK_dead_horn = 0xfe62
  2605. const m_XK_dead_i = 0xfe84
  2606. const m_XK_dead_invertedbreve = 0xfe6d
  2607. const m_XK_dead_iota = 0xfe5d
  2608. const m_XK_dead_longsolidusoverlay = 0xfe93
  2609. const m_XK_dead_lowline = 0xfe90
  2610. const m_XK_dead_macron = 0xfe54
  2611. const m_XK_dead_o = 0xfe86
  2612. const m_XK_dead_ogonek = 0xfe5c
  2613. const m_XK_dead_perispomeni = 0xfe53
  2614. const m_XK_dead_psili = 0xfe64
  2615. const m_XK_dead_semivoiced_sound = 0xfe5f
  2616. const m_XK_dead_small_schwa = 0xfe8a
  2617. const m_XK_dead_stroke = 0xfe63
  2618. const m_XK_dead_tilde = 0xfe53
  2619. const m_XK_dead_u = 0xfe88
  2620. const m_XK_dead_voiced_sound = 0xfe5e
  2621. const m_XK_degree = 0x00b0
  2622. const m_XK_diaeresis = 0x00a8
  2623. const m_XK_dintegral = 0x100222C
  2624. const m_XK_division = 0x00f7
  2625. const m_XK_dollar = 0x0024
  2626. const m_XK_doubleacute = 0x01bd
  2627. const m_XK_dstroke = 0x01f0
  2628. const m_XK_e = 0x0065
  2629. const m_XK_eabovedot = 0x03ec
  2630. const m_XK_eacute = 0x00e9
  2631. const m_XK_ebelowdot = 0x1001eb9
  2632. const m_XK_ecaron = 0x01ec
  2633. const m_XK_ecircumflex = 0x00ea
  2634. const m_XK_ecircumflexacute = 0x1001ebf
  2635. const m_XK_ecircumflexbelowdot = 0x1001ec7
  2636. const m_XK_ecircumflexgrave = 0x1001ec1
  2637. const m_XK_ecircumflexhook = 0x1001ec3
  2638. const m_XK_ecircumflextilde = 0x1001ec5
  2639. const m_XK_ediaeresis = 0x00eb
  2640. const m_XK_egrave = 0x00e8
  2641. const m_XK_ehook = 0x1001ebb
  2642. const m_XK_eightsubscript = 0x1002088
  2643. const m_XK_eightsuperior = 0x1002078
  2644. const m_XK_elementof = 0x1002208
  2645. const m_XK_emacron = 0x03ba
  2646. const m_XK_emptyset = 0x1002205
  2647. const m_XK_eng = 0x03bf
  2648. const m_XK_eogonek = 0x01ea
  2649. const m_XK_equal = 0x003d
  2650. const m_XK_eth = 0x00f0
  2651. const m_XK_etilde = 0x1001ebd
  2652. const m_XK_exclam = 0x0021
  2653. const m_XK_exclamdown = 0x00a1
  2654. const m_XK_ezh = 0x1000292
  2655. const m_XK_f = 0x0066
  2656. const m_XK_fabovedot = 0x1001e1f
  2657. const m_XK_fivesubscript = 0x1002085
  2658. const m_XK_fivesuperior = 0x1002075
  2659. const m_XK_foursubscript = 0x1002084
  2660. const m_XK_foursuperior = 0x1002074
  2661. const m_XK_fourthroot = 0x100221C
  2662. const m_XK_g = 0x0067
  2663. const m_XK_gabovedot = 0x02f5
  2664. const m_XK_gbreve = 0x02bb
  2665. const m_XK_gcaron = 0x10001e7
  2666. const m_XK_gcedilla = 0x03bb
  2667. const m_XK_gcircumflex = 0x02f8
  2668. const m_XK_grave = 0x0060
  2669. const m_XK_greater = 0x003e
  2670. const m_XK_guillemotleft = 0x00ab
  2671. const m_XK_guillemotright = 0x00bb
  2672. const m_XK_h = 0x0068
  2673. const m_XK_hcircumflex = 0x02b6
  2674. const m_XK_hebrew_aleph = 0x0ce0
  2675. const m_XK_hebrew_ayin = 0x0cf2
  2676. const m_XK_hebrew_bet = 0x0ce1
  2677. const m_XK_hebrew_beth = 0x0ce1
  2678. const m_XK_hebrew_chet = 0x0ce7
  2679. const m_XK_hebrew_dalet = 0x0ce3
  2680. const m_XK_hebrew_daleth = 0x0ce3
  2681. const m_XK_hebrew_doublelowline = 0x0cdf
  2682. const m_XK_hebrew_finalkaph = 0x0cea
  2683. const m_XK_hebrew_finalmem = 0x0ced
  2684. const m_XK_hebrew_finalnun = 0x0cef
  2685. const m_XK_hebrew_finalpe = 0x0cf3
  2686. const m_XK_hebrew_finalzade = 0x0cf5
  2687. const m_XK_hebrew_finalzadi = 0x0cf5
  2688. const m_XK_hebrew_gimel = 0x0ce2
  2689. const m_XK_hebrew_gimmel = 0x0ce2
  2690. const m_XK_hebrew_he = 0x0ce4
  2691. const m_XK_hebrew_het = 0x0ce7
  2692. const m_XK_hebrew_kaph = 0x0ceb
  2693. const m_XK_hebrew_kuf = 0x0cf7
  2694. const m_XK_hebrew_lamed = 0x0cec
  2695. const m_XK_hebrew_mem = 0x0cee
  2696. const m_XK_hebrew_nun = 0x0cf0
  2697. const m_XK_hebrew_pe = 0x0cf4
  2698. const m_XK_hebrew_qoph = 0x0cf7
  2699. const m_XK_hebrew_resh = 0x0cf8
  2700. const m_XK_hebrew_samech = 0x0cf1
  2701. const m_XK_hebrew_samekh = 0x0cf1
  2702. const m_XK_hebrew_shin = 0x0cf9
  2703. const m_XK_hebrew_taf = 0x0cfa
  2704. const m_XK_hebrew_taw = 0x0cfa
  2705. const m_XK_hebrew_tet = 0x0ce8
  2706. const m_XK_hebrew_teth = 0x0ce8
  2707. const m_XK_hebrew_waw = 0x0ce5
  2708. const m_XK_hebrew_yod = 0x0ce9
  2709. const m_XK_hebrew_zade = 0x0cf6
  2710. const m_XK_hebrew_zadi = 0x0cf6
  2711. const m_XK_hebrew_zain = 0x0ce6
  2712. const m_XK_hebrew_zayin = 0x0ce6
  2713. const m_XK_hstroke = 0x02b1
  2714. const m_XK_hyphen = 0x00ad
  2715. const m_XK_i = 0x0069
  2716. const m_XK_iacute = 0x00ed
  2717. const m_XK_ibelowdot = 0x1001ecb
  2718. const m_XK_ibreve = 0x100012d
  2719. const m_XK_icircumflex = 0x00ee
  2720. const m_XK_idiaeresis = 0x00ef
  2721. const m_XK_idotless = 0x02b9
  2722. const m_XK_igrave = 0x00ec
  2723. const m_XK_ihook = 0x1001ec9
  2724. const m_XK_imacron = 0x03ef
  2725. const m_XK_iogonek = 0x03e7
  2726. const m_XK_itilde = 0x03b5
  2727. const m_XK_j = 0x006a
  2728. const m_XK_jcircumflex = 0x02bc
  2729. const m_XK_k = 0x006b
  2730. const m_XK_kana_A = 0x04b1
  2731. const m_XK_kana_CHI = 0x04c1
  2732. const m_XK_kana_E = 0x04b4
  2733. const m_XK_kana_FU = 0x04cc
  2734. const m_XK_kana_HA = 0x04ca
  2735. const m_XK_kana_HE = 0x04cd
  2736. const m_XK_kana_HI = 0x04cb
  2737. const m_XK_kana_HO = 0x04ce
  2738. const m_XK_kana_HU = 0x04cc
  2739. const m_XK_kana_I = 0x04b2
  2740. const m_XK_kana_KA = 0x04b6
  2741. const m_XK_kana_KE = 0x04b9
  2742. const m_XK_kana_KI = 0x04b7
  2743. const m_XK_kana_KO = 0x04ba
  2744. const m_XK_kana_KU = 0x04b8
  2745. const m_XK_kana_MA = 0x04cf
  2746. const m_XK_kana_ME = 0x04d2
  2747. const m_XK_kana_MI = 0x04d0
  2748. const m_XK_kana_MO = 0x04d3
  2749. const m_XK_kana_MU = 0x04d1
  2750. const m_XK_kana_N = 0x04dd
  2751. const m_XK_kana_NA = 0x04c5
  2752. const m_XK_kana_NE = 0x04c8
  2753. const m_XK_kana_NI = 0x04c6
  2754. const m_XK_kana_NO = 0x04c9
  2755. const m_XK_kana_NU = 0x04c7
  2756. const m_XK_kana_O = 0x04b5
  2757. const m_XK_kana_RA = 0x04d7
  2758. const m_XK_kana_RE = 0x04da
  2759. const m_XK_kana_RI = 0x04d8
  2760. const m_XK_kana_RO = 0x04db
  2761. const m_XK_kana_RU = 0x04d9
  2762. const m_XK_kana_SA = 0x04bb
  2763. const m_XK_kana_SE = 0x04be
  2764. const m_XK_kana_SHI = 0x04bc
  2765. const m_XK_kana_SO = 0x04bf
  2766. const m_XK_kana_SU = 0x04bd
  2767. const m_XK_kana_TA = 0x04c0
  2768. const m_XK_kana_TE = 0x04c3
  2769. const m_XK_kana_TI = 0x04c1
  2770. const m_XK_kana_TO = 0x04c4
  2771. const m_XK_kana_TSU = 0x04c2
  2772. const m_XK_kana_TU = 0x04c2
  2773. const m_XK_kana_U = 0x04b3
  2774. const m_XK_kana_WA = 0x04dc
  2775. const m_XK_kana_WO = 0x04a6
  2776. const m_XK_kana_YA = 0x04d4
  2777. const m_XK_kana_YO = 0x04d6
  2778. const m_XK_kana_YU = 0x04d5
  2779. const m_XK_kana_a = 0x04a7
  2780. const m_XK_kana_closingbracket = 0x04a3
  2781. const m_XK_kana_comma = 0x04a4
  2782. const m_XK_kana_conjunctive = 0x04a5
  2783. const m_XK_kana_e = 0x04aa
  2784. const m_XK_kana_fullstop = 0x04a1
  2785. const m_XK_kana_i = 0x04a8
  2786. const m_XK_kana_middledot = 0x04a5
  2787. const m_XK_kana_o = 0x04ab
  2788. const m_XK_kana_openingbracket = 0x04a2
  2789. const m_XK_kana_switch = 0xff7e
  2790. const m_XK_kana_tsu = 0x04af
  2791. const m_XK_kana_tu = 0x04af
  2792. const m_XK_kana_u = 0x04a9
  2793. const m_XK_kana_ya = 0x04ac
  2794. const m_XK_kana_yo = 0x04ae
  2795. const m_XK_kana_yu = 0x04ad
  2796. const m_XK_kappa = 0x03a2
  2797. const m_XK_kcedilla = 0x03f3
  2798. const m_XK_kra = 0x03a2
  2799. const m_XK_l = 0x006c
  2800. const m_XK_lacute = 0x01e5
  2801. const m_XK_lbelowdot = 0x1001e37
  2802. const m_XK_lcaron = 0x01b5
  2803. const m_XK_lcedilla = 0x03b6
  2804. const m_XK_less = 0x003c
  2805. const m_XK_lstroke = 0x01b3
  2806. const m_XK_m = 0x006d
  2807. const m_XK_mabovedot = 0x1001e41
  2808. const m_XK_macron = 0x00af
  2809. const m_XK_masculine = 0x00ba
  2810. const m_XK_minus = 0x002d
  2811. const m_XK_mu = 0x00b5
  2812. const m_XK_multiply = 0x00d7
  2813. const m_XK_n = 0x006e
  2814. const m_XK_nacute = 0x01f1
  2815. const m_XK_ncaron = 0x01f2
  2816. const m_XK_ncedilla = 0x03f1
  2817. const m_XK_ninesubscript = 0x1002089
  2818. const m_XK_ninesuperior = 0x1002079
  2819. const m_XK_nobreakspace = 0x00a0
  2820. const m_XK_notapproxeq = 0x1002247
  2821. const m_XK_notelementof = 0x1002209
  2822. const m_XK_notidentical = 0x1002262
  2823. const m_XK_notsign = 0x00ac
  2824. const m_XK_ntilde = 0x00f1
  2825. const m_XK_numbersign = 0x0023
  2826. const m_XK_numerosign = 0x06b0
  2827. const m_XK_o = 0x006f
  2828. const m_XK_oacute = 0x00f3
  2829. const m_XK_obarred = 0x1000275
  2830. const m_XK_obelowdot = 0x1001ecd
  2831. const m_XK_ocaron = 0x10001d2
  2832. const m_XK_ocircumflex = 0x00f4
  2833. const m_XK_ocircumflexacute = 0x1001ed1
  2834. const m_XK_ocircumflexbelowdot = 0x1001ed9
  2835. const m_XK_ocircumflexgrave = 0x1001ed3
  2836. const m_XK_ocircumflexhook = 0x1001ed5
  2837. const m_XK_ocircumflextilde = 0x1001ed7
  2838. const m_XK_odiaeresis = 0x00f6
  2839. const m_XK_odoubleacute = 0x01f5
  2840. const m_XK_oe = 0x13bd
  2841. const m_XK_ogonek = 0x01b2
  2842. const m_XK_ograve = 0x00f2
  2843. const m_XK_ohook = 0x1001ecf
  2844. const m_XK_ohorn = 0x10001a1
  2845. const m_XK_ohornacute = 0x1001edb
  2846. const m_XK_ohornbelowdot = 0x1001ee3
  2847. const m_XK_ohorngrave = 0x1001edd
  2848. const m_XK_ohornhook = 0x1001edf
  2849. const m_XK_ohorntilde = 0x1001ee1
  2850. const m_XK_omacron = 0x03f2
  2851. const m_XK_onehalf = 0x00bd
  2852. const m_XK_onequarter = 0x00bc
  2853. const m_XK_onesubscript = 0x1002081
  2854. const m_XK_onesuperior = 0x00b9
  2855. const m_XK_ooblique = 0x00f8
  2856. const m_XK_ordfeminine = 0x00aa
  2857. const m_XK_oslash = 0x00f8
  2858. const m_XK_otilde = 0x00f5
  2859. const m_XK_overline = 0x047e
  2860. const m_XK_p = 0x0070
  2861. const m_XK_pabovedot = 0x1001e57
  2862. const m_XK_paragraph = 0x00b6
  2863. const m_XK_parenleft = 0x0028
  2864. const m_XK_parenright = 0x0029
  2865. const m_XK_partdifferential = 0x1002202
  2866. const m_XK_percent = 0x0025
  2867. const m_XK_period = 0x002e
  2868. const m_XK_periodcentered = 0x00b7
  2869. const m_XK_plus = 0x002b
  2870. const m_XK_plusminus = 0x00b1
  2871. const m_XK_prolongedsound = 0x04b0
  2872. const m_XK_q = 0x0071
  2873. const m_XK_question = 0x003f
  2874. const m_XK_questiondown = 0x00bf
  2875. const m_XK_quotedbl = 0x0022
  2876. const m_XK_quoteleft = 0x0060
  2877. const m_XK_quoteright = 0x0027
  2878. const m_XK_r = 0x0072
  2879. const m_XK_racute = 0x01e0
  2880. const m_XK_rcaron = 0x01f8
  2881. const m_XK_rcedilla = 0x03b3
  2882. const m_XK_registered = 0x00ae
  2883. const m_XK_s = 0x0073
  2884. const m_XK_sabovedot = 0x1001e61
  2885. const m_XK_sacute = 0x01b6
  2886. const m_XK_scaron = 0x01b9
  2887. const m_XK_scedilla = 0x01ba
  2888. const m_XK_schwa = 0x1000259
  2889. const m_XK_scircumflex = 0x02fe
  2890. const m_XK_script_switch = 0xff7e
  2891. const m_XK_section = 0x00a7
  2892. const m_XK_semicolon = 0x003b
  2893. const m_XK_semivoicedsound = 0x04df
  2894. const m_XK_sevensubscript = 0x1002087
  2895. const m_XK_sevensuperior = 0x1002077
  2896. const m_XK_sixsubscript = 0x1002086
  2897. const m_XK_sixsuperior = 0x1002076
  2898. const m_XK_slash = 0x002f
  2899. const m_XK_space = 0x0020
  2900. const m_XK_squareroot = 0x100221A
  2901. const m_XK_ssharp = 0x00df
  2902. const m_XK_sterling = 0x00a3
  2903. const m_XK_stricteq = 0x1002263
  2904. const m_XK_t = 0x0074
  2905. const m_XK_tabovedot = 0x1001e6b
  2906. const m_XK_tcaron = 0x01bb
  2907. const m_XK_tcedilla = 0x01fe
  2908. const m_XK_thorn = 0x00fe
  2909. const m_XK_threequarters = 0x00be
  2910. const m_XK_threesubscript = 0x1002083
  2911. const m_XK_threesuperior = 0x00b3
  2912. const m_XK_tintegral = 0x100222D
  2913. const m_XK_tslash = 0x03bc
  2914. const m_XK_twosubscript = 0x1002082
  2915. const m_XK_twosuperior = 0x00b2
  2916. const m_XK_u = 0x0075
  2917. const m_XK_uacute = 0x00fa
  2918. const m_XK_ubelowdot = 0x1001ee5
  2919. const m_XK_ubreve = 0x02fd
  2920. const m_XK_ucircumflex = 0x00fb
  2921. const m_XK_udiaeresis = 0x00fc
  2922. const m_XK_udoubleacute = 0x01fb
  2923. const m_XK_ugrave = 0x00f9
  2924. const m_XK_uhook = 0x1001ee7
  2925. const m_XK_uhorn = 0x10001b0
  2926. const m_XK_uhornacute = 0x1001ee9
  2927. const m_XK_uhornbelowdot = 0x1001ef1
  2928. const m_XK_uhorngrave = 0x1001eeb
  2929. const m_XK_uhornhook = 0x1001eed
  2930. const m_XK_uhorntilde = 0x1001eef
  2931. const m_XK_umacron = 0x03fe
  2932. const m_XK_underscore = 0x005f
  2933. const m_XK_uogonek = 0x03f9
  2934. const m_XK_uring = 0x01f9
  2935. const m_XK_utilde = 0x03fd
  2936. const m_XK_v = 0x0076
  2937. const m_XK_voicedsound = 0x04de
  2938. const m_XK_w = 0x0077
  2939. const m_XK_wacute = 0x1001e83
  2940. const m_XK_wcircumflex = 0x1000175
  2941. const m_XK_wdiaeresis = 0x1001e85
  2942. const m_XK_wgrave = 0x1001e81
  2943. const m_XK_x = 0x0078
  2944. const m_XK_xabovedot = 0x1001e8b
  2945. const m_XK_y = 0x0079
  2946. const m_XK_yacute = 0x00fd
  2947. const m_XK_ybelowdot = 0x1001ef5
  2948. const m_XK_ycircumflex = 0x1000177
  2949. const m_XK_ydiaeresis = 0x00ff
  2950. const m_XK_yen = 0x00a5
  2951. const m_XK_ygrave = 0x1001ef3
  2952. const m_XK_yhook = 0x1001ef7
  2953. const m_XK_ytilde = 0x1001ef9
  2954. const m_XK_z = 0x007a
  2955. const m_XK_zabovedot = 0x01bf
  2956. const m_XK_zacute = 0x01bc
  2957. const m_XK_zcaron = 0x01be
  2958. const m_XK_zerosubscript = 0x1002080
  2959. const m_XK_zerosuperior = 0x1002070
  2960. const m_XK_zstroke = 0x10001b6
  2961. const m_XLookupBoth = 4
  2962. const m_XLookupChars = 2
  2963. const m_XLookupKeySym = 3
  2964. const m_XLookupNone = 1
  2965. const m_XMD_H = 1
  2966. const m_XMUTEX_INITIALIZER = "PTHREAD_MUTEX_INITIALIZER"
  2967. const m_XNArea = "area"
  2968. const m_XNAreaNeeded = "areaNeeded"
  2969. const m_XNBackground = "background"
  2970. const m_XNBackgroundPixmap = "backgroundPixmap"
  2971. const m_XNBaseFontName = "baseFontName"
  2972. const m_XNClientWindow = "clientWindow"
  2973. const m_XNColormap = "colorMap"
  2974. const m_XNContextualDrawing = "contextualDrawing"
  2975. const m_XNCursor = "cursor"
  2976. const m_XNDefaultString = "defaultString"
  2977. const m_XNDestroyCallback = "destroyCallback"
  2978. const m_XNDirectionalDependentDrawing = "directionalDependentDrawing"
  2979. const m_XNFilterEvents = "filterEvents"
  2980. const m_XNFocusWindow = "focusWindow"
  2981. const m_XNFontInfo = "fontInfo"
  2982. const m_XNFontSet = "fontSet"
  2983. const m_XNForeground = "foreground"
  2984. const m_XNGeometryCallback = "geometryCallback"
  2985. const m_XNHotKey = "hotKey"
  2986. const m_XNHotKeyState = "hotKeyState"
  2987. const m_XNInputStyle = "inputStyle"
  2988. const m_XNLineSpace = "lineSpace"
  2989. const m_XNMissingCharSet = "missingCharSet"
  2990. const m_XNOMAutomatic = "omAutomatic"
  2991. const m_XNOrientation = "orientation"
  2992. const m_XNPreeditAttributes = "preeditAttributes"
  2993. const m_XNPreeditCaretCallback = "preeditCaretCallback"
  2994. const m_XNPreeditDoneCallback = "preeditDoneCallback"
  2995. const m_XNPreeditDrawCallback = "preeditDrawCallback"
  2996. const m_XNPreeditStartCallback = "preeditStartCallback"
  2997. const m_XNPreeditState = "preeditState"
  2998. const m_XNPreeditStateNotifyCallback = "preeditStateNotifyCallback"
  2999. const m_XNQueryICValuesList = "queryICValuesList"
  3000. const m_XNQueryIMValuesList = "queryIMValuesList"
  3001. const m_XNQueryInputStyle = "queryInputStyle"
  3002. const m_XNQueryOrientation = "queryOrientation"
  3003. const m_XNR6PreeditCallback = "r6PreeditCallback"
  3004. const m_XNRequiredCharSet = "requiredCharSet"
  3005. const m_XNResetState = "resetState"
  3006. const m_XNResourceClass = "resourceClass"
  3007. const m_XNResourceName = "resourceName"
  3008. const m_XNSeparatorofNestedList = "separatorofNestedList"
  3009. const m_XNSpotLocation = "spotLocation"
  3010. const m_XNStatusAttributes = "statusAttributes"
  3011. const m_XNStatusDoneCallback = "statusDoneCallback"
  3012. const m_XNStatusDrawCallback = "statusDrawCallback"
  3013. const m_XNStatusStartCallback = "statusStartCallback"
  3014. const m_XNStdColormap = "stdColorMap"
  3015. const m_XNStringConversion = "stringConversion"
  3016. const m_XNStringConversionCallback = "stringConversionCallback"
  3017. const m_XNVaNestedList = "XNVaNestedList"
  3018. const m_XNVisiblePosition = "visiblePosition"
  3019. const m_XNegative = 0x0010
  3020. const m_XTHREADS = 1
  3021. const m_XUSE_MTSAFE_API = 1
  3022. const m_XValue = 0x0001
  3023. const m_XYBitmap = 0
  3024. const m_XYPixmap = 1
  3025. const m_X_AllocColor = 84
  3026. const m_X_AllocColorCells = 86
  3027. const m_X_AllocColorPlanes = 87
  3028. const m_X_AllocNamedColor = 85
  3029. const m_X_AllowEvents = 35
  3030. const m_X_Bell = 104
  3031. const m_X_ChangeActivePointerGrab = 30
  3032. const m_X_ChangeGC = 56
  3033. const m_X_ChangeHosts = 109
  3034. const m_X_ChangeKeyboardControl = 102
  3035. const m_X_ChangeKeyboardMapping = 100
  3036. const m_X_ChangePointerControl = 105
  3037. const m_X_ChangeProperty = 18
  3038. const m_X_ChangeSaveSet = 6
  3039. const m_X_ChangeWindowAttributes = 2
  3040. const m_X_CirculateWindow = 13
  3041. const m_X_ClearArea = 61
  3042. const m_X_CloseFont = 46
  3043. const m_X_ConfigureWindow = 12
  3044. const m_X_ConvertSelection = 24
  3045. const m_X_CopyArea = 62
  3046. const m_X_CopyColormapAndFree = 80
  3047. const m_X_CopyGC = 57
  3048. const m_X_CopyPlane = 63
  3049. const m_X_CreateColormap = 78
  3050. const m_X_CreateCursor = 93
  3051. const m_X_CreateGC = 55
  3052. const m_X_CreateGlyphCursor = 94
  3053. const m_X_CreatePixmap = 53
  3054. const m_X_CreateWindow = 1
  3055. const m_X_DeleteProperty = 19
  3056. const m_X_DestroySubwindows = 5
  3057. const m_X_DestroyWindow = 4
  3058. const m_X_Error = 0
  3059. const m_X_FillPoly = 69
  3060. const m_X_ForceScreenSaver = 115
  3061. const m_X_FreeColormap = 79
  3062. const m_X_FreeColors = 88
  3063. const m_X_FreeCursor = 95
  3064. const m_X_FreeGC = 60
  3065. const m_X_FreePixmap = 54
  3066. const m_X_GetAtomName = 17
  3067. const m_X_GetFontPath = 52
  3068. const m_X_GetGeometry = 14
  3069. const m_X_GetImage = 73
  3070. const m_X_GetInputFocus = 43
  3071. const m_X_GetKeyboardControl = 103
  3072. const m_X_GetKeyboardMapping = 101
  3073. const m_X_GetModifierMapping = 119
  3074. const m_X_GetMotionEvents = 39
  3075. const m_X_GetPointerControl = 106
  3076. const m_X_GetPointerMapping = 117
  3077. const m_X_GetProperty = 20
  3078. const m_X_GetScreenSaver = 108
  3079. const m_X_GetSelectionOwner = 23
  3080. const m_X_GetWindowAttributes = 3
  3081. const m_X_GrabButton = 28
  3082. const m_X_GrabKey = 33
  3083. const m_X_GrabKeyboard = 31
  3084. const m_X_GrabPointer = 26
  3085. const m_X_GrabServer = 36
  3086. const m_X_HAVE_UTF8_STRING = 1
  3087. const m_X_ImageText16 = 77
  3088. const m_X_ImageText8 = 76
  3089. const m_X_InstallColormap = 81
  3090. const m_X_InternAtom = 16
  3091. const m_X_KillClient = 113
  3092. const m_X_ListExtensions = 99
  3093. const m_X_ListFonts = 49
  3094. const m_X_ListFontsWithInfo = 50
  3095. const m_X_ListHosts = 110
  3096. const m_X_ListInstalledColormaps = 83
  3097. const m_X_ListProperties = 21
  3098. const m_X_LookupColor = 92
  3099. const m_X_MapSubwindows = 9
  3100. const m_X_MapWindow = 8
  3101. const m_X_NoOperation = 127
  3102. const m_X_OpenFont = 45
  3103. const m_X_PROTOCOL = 11
  3104. const m_X_PROTOCOL_REVISION = 0
  3105. const m_X_PolyArc = 68
  3106. const m_X_PolyFillArc = 71
  3107. const m_X_PolyFillRectangle = 70
  3108. const m_X_PolyLine = 65
  3109. const m_X_PolyPoint = 64
  3110. const m_X_PolyRectangle = 67
  3111. const m_X_PolySegment = 66
  3112. const m_X_PolyText16 = 75
  3113. const m_X_PolyText8 = 74
  3114. const m_X_PutImage = 72
  3115. const m_X_QueryBestSize = 97
  3116. const m_X_QueryColors = 91
  3117. const m_X_QueryExtension = 98
  3118. const m_X_QueryFont = 47
  3119. const m_X_QueryKeymap = 44
  3120. const m_X_QueryPointer = 38
  3121. const m_X_QueryTextExtents = 48
  3122. const m_X_QueryTree = 15
  3123. const m_X_RecolorCursor = 96
  3124. const m_X_RenderAddGlyphs = 20
  3125. const m_X_RenderAddGlyphsFromPicture = 21
  3126. const m_X_RenderAddTraps = 32
  3127. const m_X_RenderChangePicture = 5
  3128. const m_X_RenderColorTrapezoids = 14
  3129. const m_X_RenderColorTriangles = 15
  3130. const m_X_RenderComposite = 8
  3131. const m_X_RenderCompositeGlyphs16 = 24
  3132. const m_X_RenderCompositeGlyphs32 = 25
  3133. const m_X_RenderCompositeGlyphs8 = 23
  3134. const m_X_RenderCreateAnimCursor = 31
  3135. const m_X_RenderCreateConicalGradient = 36
  3136. const m_X_RenderCreateCursor = 27
  3137. const m_X_RenderCreateGlyphSet = 17
  3138. const m_X_RenderCreateLinearGradient = 34
  3139. const m_X_RenderCreatePicture = 4
  3140. const m_X_RenderCreateRadialGradient = 35
  3141. const m_X_RenderCreateSolidFill = 33
  3142. const m_X_RenderFillRectangles = 26
  3143. const m_X_RenderFreeGlyphSet = 19
  3144. const m_X_RenderFreeGlyphs = 22
  3145. const m_X_RenderFreePicture = 7
  3146. const m_X_RenderQueryDithers = 3
  3147. const m_X_RenderQueryFilters = 29
  3148. const m_X_RenderQueryPictFormats = 1
  3149. const m_X_RenderQueryPictIndexValues = 2
  3150. const m_X_RenderQueryVersion = 0
  3151. const m_X_RenderReferenceGlyphSet = 18
  3152. const m_X_RenderScale = 9
  3153. const m_X_RenderSetPictureClipRectangles = 6
  3154. const m_X_RenderSetPictureFilter = 30
  3155. const m_X_RenderSetPictureTransform = 28
  3156. const m_X_RenderTrapezoids = 10
  3157. const m_X_RenderTriFan = 13
  3158. const m_X_RenderTriStrip = 12
  3159. const m_X_RenderTriangles = 11
  3160. const m_X_ReparentWindow = 7
  3161. const m_X_Reply = 1
  3162. const m_X_RotateProperties = 114
  3163. const m_X_SendEvent = 25
  3164. const m_X_SetAccessControl = 111
  3165. const m_X_SetClipRectangles = 59
  3166. const m_X_SetCloseDownMode = 112
  3167. const m_X_SetDashes = 58
  3168. const m_X_SetFontPath = 51
  3169. const m_X_SetInputFocus = 42
  3170. const m_X_SetModifierMapping = 118
  3171. const m_X_SetPointerMapping = 116
  3172. const m_X_SetScreenSaver = 107
  3173. const m_X_SetSelectionOwner = 22
  3174. const m_X_StoreColors = 89
  3175. const m_X_StoreNamedColor = 90
  3176. const m_X_TCP_PORT = 6000
  3177. const m_X_TranslateCoords = 40
  3178. const m_X_UngrabButton = 29
  3179. const m_X_UngrabKey = 34
  3180. const m_X_UngrabKeyboard = 32
  3181. const m_X_UngrabPointer = 27
  3182. const m_X_UngrabServer = 37
  3183. const m_X_UninstallColormap = 82
  3184. const m_X_UnmapSubwindows = 11
  3185. const m_X_UnmapWindow = 10
  3186. const m_X_WarpPointer = 41
  3187. const m_XftVersion = "XFT_VERSION"
  3188. const m_XlibSpecificationRelease = 6
  3189. const m_YNegative = 0x0020
  3190. const m_YSorted = 1
  3191. const m_YValue = 0x0002
  3192. const m_YXBanded = 3
  3193. const m_YXSorted = 2
  3194. const m_ZLNSPERBATCH = 1024
  3195. const m_ZPixmap = 2
  3196. const m_ZRCTSPERBATCH = 256
  3197. const m_ZoomState = 2
  3198. const m__FILE_OFFSET_BITS = 64
  3199. const m__GNU_SOURCE = 1
  3200. const m__ILP32 = 1
  3201. const m__IOFBF = 0
  3202. const m__IOLBF = 1
  3203. const m__IONBF = 2
  3204. const m__POSIX2_BC_BASE_MAX = 99
  3205. const m__POSIX2_BC_DIM_MAX = 2048
  3206. const m__POSIX2_BC_SCALE_MAX = 99
  3207. const m__POSIX2_BC_STRING_MAX = 1000
  3208. const m__POSIX2_CHARCLASS_NAME_MAX = 14
  3209. const m__POSIX2_COLL_WEIGHTS_MAX = 2
  3210. const m__POSIX2_EXPR_NEST_MAX = 32
  3211. const m__POSIX2_LINE_MAX = 2048
  3212. const m__POSIX2_RE_DUP_MAX = 255
  3213. const m__POSIX_AIO_LISTIO_MAX = 2
  3214. const m__POSIX_AIO_MAX = 1
  3215. const m__POSIX_ARG_MAX = 4096
  3216. const m__POSIX_CHILD_MAX = 25
  3217. const m__POSIX_CLOCKRES_MIN = 20000000
  3218. const m__POSIX_DELAYTIMER_MAX = 32
  3219. const m__POSIX_HOST_NAME_MAX = 255
  3220. const m__POSIX_LINK_MAX = 8
  3221. const m__POSIX_LOGIN_NAME_MAX = 9
  3222. const m__POSIX_MAX_CANON = 255
  3223. const m__POSIX_MAX_INPUT = 255
  3224. const m__POSIX_MQ_OPEN_MAX = 8
  3225. const m__POSIX_MQ_PRIO_MAX = 32
  3226. const m__POSIX_NAME_MAX = 14
  3227. const m__POSIX_NGROUPS_MAX = 8
  3228. const m__POSIX_OPEN_MAX = 20
  3229. const m__POSIX_PATH_MAX = 256
  3230. const m__POSIX_PIPE_BUF = 512
  3231. const m__POSIX_RE_DUP_MAX = 255
  3232. const m__POSIX_RTSIG_MAX = 8
  3233. const m__POSIX_SEM_NSEMS_MAX = 256
  3234. const m__POSIX_SEM_VALUE_MAX = 32767
  3235. const m__POSIX_SIGQUEUE_MAX = 32
  3236. const m__POSIX_SSIZE_MAX = 32767
  3237. const m__POSIX_SS_REPL_MAX = 4
  3238. const m__POSIX_STREAM_MAX = 8
  3239. const m__POSIX_SYMLINK_MAX = 255
  3240. const m__POSIX_SYMLOOP_MAX = 8
  3241. const m__POSIX_THREAD_DESTRUCTOR_ITERATIONS = 4
  3242. const m__POSIX_THREAD_KEYS_MAX = 128
  3243. const m__POSIX_THREAD_THREADS_MAX = 64
  3244. const m__POSIX_TIMER_MAX = 32
  3245. const m__POSIX_TRACE_EVENT_NAME_MAX = 30
  3246. const m__POSIX_TRACE_NAME_MAX = 8
  3247. const m__POSIX_TRACE_SYS_MAX = 8
  3248. const m__POSIX_TRACE_USER_EVENT_MAX = 32
  3249. const m__POSIX_TTY_NAME_MAX = 9
  3250. const m__POSIX_TZNAME_MAX = 6
  3251. const m__REDIR_TIME64 = 1
  3252. const m__STDC_PREDEF_H = 1
  3253. const m__X11_XLIBINT_H_ = 1
  3254. const m__XBCOPYFUNC = "_Xbcopy"
  3255. const m__XOPEN_IOV_MAX = 16
  3256. const m__XOPEN_NAME_MAX = 255
  3257. const m__XOPEN_PATH_MAX = 1024
  3258. const m__X_INLINE = "inline"
  3259. const m__X_RESTRICT_KYWD = "restrict"
  3260. const m__Xconst = "const"
  3261. const m___ATOMIC_ACQUIRE = 2
  3262. const m___ATOMIC_ACQ_REL = 4
  3263. const m___ATOMIC_CONSUME = 1
  3264. const m___ATOMIC_HLE_ACQUIRE = 65536
  3265. const m___ATOMIC_HLE_RELEASE = 131072
  3266. const m___ATOMIC_RELAXED = 0
  3267. const m___ATOMIC_RELEASE = 3
  3268. const m___ATOMIC_SEQ_CST = 5
  3269. const m___BIGGEST_ALIGNMENT__ = 16
  3270. const m___BIG_ENDIAN = 4321
  3271. const m___BYTE_ORDER = 1234
  3272. const m___BYTE_ORDER__ = "__ORDER_LITTLE_ENDIAN__"
  3273. const m___CCGO__ = 1
  3274. const m___CHAR_BIT__ = 8
  3275. const m___DBL_DECIMAL_DIG__ = 17
  3276. const m___DBL_DIG__ = 15
  3277. const m___DBL_HAS_DENORM__ = 1
  3278. const m___DBL_HAS_INFINITY__ = 1
  3279. const m___DBL_HAS_QUIET_NAN__ = 1
  3280. const m___DBL_IS_IEC_60559__ = 2
  3281. const m___DBL_MANT_DIG__ = 53
  3282. const m___DBL_MAX_10_EXP__ = 308
  3283. const m___DBL_MAX_EXP__ = 1024
  3284. const m___DEC128_EPSILON__ = 1e-33
  3285. const m___DEC128_MANT_DIG__ = 34
  3286. const m___DEC128_MAX_EXP__ = 6145
  3287. const m___DEC128_MAX__ = "9.999999999999999999999999999999999E6144"
  3288. const m___DEC128_MIN__ = 1e-6143
  3289. const m___DEC128_SUBNORMAL_MIN__ = 0.000000000000000000000000000000001e-6143
  3290. const m___DEC32_EPSILON__ = 1e-6
  3291. const m___DEC32_MANT_DIG__ = 7
  3292. const m___DEC32_MAX_EXP__ = 97
  3293. const m___DEC32_MAX__ = 9.999999e96
  3294. const m___DEC32_MIN__ = 1e-95
  3295. const m___DEC32_SUBNORMAL_MIN__ = 0.000001e-95
  3296. const m___DEC64_EPSILON__ = 1e-15
  3297. const m___DEC64_MANT_DIG__ = 16
  3298. const m___DEC64_MAX_EXP__ = 385
  3299. const m___DEC64_MAX__ = "9.999999999999999E384"
  3300. const m___DEC64_MIN__ = 1e-383
  3301. const m___DEC64_SUBNORMAL_MIN__ = 0.000000000000001e-383
  3302. const m___DECIMAL_BID_FORMAT__ = 1
  3303. const m___DECIMAL_DIG__ = 17
  3304. const m___DEC_EVAL_METHOD__ = 2
  3305. const m___ELF__ = 1
  3306. const m___FINITE_MATH_ONLY__ = 0
  3307. const m___FLOAT_WORD_ORDER__ = "__ORDER_LITTLE_ENDIAN__"
  3308. const m___FLT128_DECIMAL_DIG__ = 36
  3309. const m___FLT128_DENORM_MIN__ = 6.47517511943802511092443895822764655e-4966
  3310. const m___FLT128_DIG__ = 33
  3311. const m___FLT128_EPSILON__ = 1.92592994438723585305597794258492732e-34
  3312. const m___FLT128_HAS_DENORM__ = 1
  3313. const m___FLT128_HAS_INFINITY__ = 1
  3314. const m___FLT128_HAS_QUIET_NAN__ = 1
  3315. const m___FLT128_IS_IEC_60559__ = 2
  3316. const m___FLT128_MANT_DIG__ = 113
  3317. const m___FLT128_MAX_10_EXP__ = 4932
  3318. const m___FLT128_MAX_EXP__ = 16384
  3319. const m___FLT128_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3320. const m___FLT128_MIN__ = 3.36210314311209350626267781732175260e-4932
  3321. const m___FLT128_NORM_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3322. const m___FLT32X_DECIMAL_DIG__ = 17
  3323. const m___FLT32X_DENORM_MIN__ = 4.94065645841246544176568792868221372e-324
  3324. const m___FLT32X_DIG__ = 15
  3325. const m___FLT32X_EPSILON__ = 2.22044604925031308084726333618164062e-16
  3326. const m___FLT32X_HAS_DENORM__ = 1
  3327. const m___FLT32X_HAS_INFINITY__ = 1
  3328. const m___FLT32X_HAS_QUIET_NAN__ = 1
  3329. const m___FLT32X_IS_IEC_60559__ = 2
  3330. const m___FLT32X_MANT_DIG__ = 53
  3331. const m___FLT32X_MAX_10_EXP__ = 308
  3332. const m___FLT32X_MAX_EXP__ = 1024
  3333. const m___FLT32X_MAX__ = 1.79769313486231570814527423731704357e+308
  3334. const m___FLT32X_MIN__ = 2.22507385850720138309023271733240406e-308
  3335. const m___FLT32X_NORM_MAX__ = 1.79769313486231570814527423731704357e+308
  3336. const m___FLT32_DECIMAL_DIG__ = 9
  3337. const m___FLT32_DENORM_MIN__ = 1.40129846432481707092372958328991613e-45
  3338. const m___FLT32_DIG__ = 6
  3339. const m___FLT32_EPSILON__ = 1.19209289550781250000000000000000000e-7
  3340. const m___FLT32_HAS_DENORM__ = 1
  3341. const m___FLT32_HAS_INFINITY__ = 1
  3342. const m___FLT32_HAS_QUIET_NAN__ = 1
  3343. const m___FLT32_IS_IEC_60559__ = 2
  3344. const m___FLT32_MANT_DIG__ = 24
  3345. const m___FLT32_MAX_10_EXP__ = 38
  3346. const m___FLT32_MAX_EXP__ = 128
  3347. const m___FLT32_MAX__ = 3.40282346638528859811704183484516925e+38
  3348. const m___FLT32_MIN__ = 1.17549435082228750796873653722224568e-38
  3349. const m___FLT32_NORM_MAX__ = 3.40282346638528859811704183484516925e+38
  3350. const m___FLT64X_DECIMAL_DIG__ = 36
  3351. const m___FLT64X_DENORM_MIN__ = 6.47517511943802511092443895822764655e-4966
  3352. const m___FLT64X_DIG__ = 33
  3353. const m___FLT64X_EPSILON__ = 1.92592994438723585305597794258492732e-34
  3354. const m___FLT64X_HAS_DENORM__ = 1
  3355. const m___FLT64X_HAS_INFINITY__ = 1
  3356. const m___FLT64X_HAS_QUIET_NAN__ = 1
  3357. const m___FLT64X_IS_IEC_60559__ = 2
  3358. const m___FLT64X_MANT_DIG__ = 113
  3359. const m___FLT64X_MAX_10_EXP__ = 4932
  3360. const m___FLT64X_MAX_EXP__ = 16384
  3361. const m___FLT64X_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3362. const m___FLT64X_MIN__ = 3.36210314311209350626267781732175260e-4932
  3363. const m___FLT64X_NORM_MAX__ = "1.18973149535723176508575932662800702e+4932"
  3364. const m___FLT64_DECIMAL_DIG__ = 17
  3365. const m___FLT64_DENORM_MIN__ = 4.94065645841246544176568792868221372e-324
  3366. const m___FLT64_DIG__ = 15
  3367. const m___FLT64_EPSILON__ = 2.22044604925031308084726333618164062e-16
  3368. const m___FLT64_HAS_DENORM__ = 1
  3369. const m___FLT64_HAS_INFINITY__ = 1
  3370. const m___FLT64_HAS_QUIET_NAN__ = 1
  3371. const m___FLT64_IS_IEC_60559__ = 2
  3372. const m___FLT64_MANT_DIG__ = 53
  3373. const m___FLT64_MAX_10_EXP__ = 308
  3374. const m___FLT64_MAX_EXP__ = 1024
  3375. const m___FLT64_MAX__ = 1.79769313486231570814527423731704357e+308
  3376. const m___FLT64_MIN__ = 2.22507385850720138309023271733240406e-308
  3377. const m___FLT64_NORM_MAX__ = 1.79769313486231570814527423731704357e+308
  3378. const m___FLT_DECIMAL_DIG__ = 9
  3379. const m___FLT_DENORM_MIN__ = 1.40129846432481707092372958328991613e-45
  3380. const m___FLT_DIG__ = 6
  3381. const m___FLT_EPSILON__ = 1.19209289550781250000000000000000000e-7
  3382. const m___FLT_EVAL_METHOD_TS_18661_3__ = 2
  3383. const m___FLT_EVAL_METHOD__ = 2
  3384. const m___FLT_HAS_DENORM__ = 1
  3385. const m___FLT_HAS_INFINITY__ = 1
  3386. const m___FLT_HAS_QUIET_NAN__ = 1
  3387. const m___FLT_IS_IEC_60559__ = 2
  3388. const m___FLT_MANT_DIG__ = 24
  3389. const m___FLT_MAX_10_EXP__ = 38
  3390. const m___FLT_MAX_EXP__ = 128
  3391. const m___FLT_MAX__ = 3.40282346638528859811704183484516925e+38
  3392. const m___FLT_MIN__ = 1.17549435082228750796873653722224568e-38
  3393. const m___FLT_NORM_MAX__ = 3.40282346638528859811704183484516925e+38
  3394. const m___FLT_RADIX__ = 2
  3395. const m___FUNCTION__ = "__func__"
  3396. const m___GCC_ASM_FLAG_OUTPUTS__ = 1
  3397. const m___GCC_ATOMIC_BOOL_LOCK_FREE = 2
  3398. const m___GCC_ATOMIC_CHAR16_T_LOCK_FREE = 2
  3399. const m___GCC_ATOMIC_CHAR32_T_LOCK_FREE = 2
  3400. const m___GCC_ATOMIC_CHAR_LOCK_FREE = 2
  3401. const m___GCC_ATOMIC_INT_LOCK_FREE = 2
  3402. const m___GCC_ATOMIC_LLONG_LOCK_FREE = 2
  3403. const m___GCC_ATOMIC_LONG_LOCK_FREE = 2
  3404. const m___GCC_ATOMIC_POINTER_LOCK_FREE = 2
  3405. const m___GCC_ATOMIC_SHORT_LOCK_FREE = 2
  3406. const m___GCC_ATOMIC_TEST_AND_SET_TRUEVAL = 1
  3407. const m___GCC_ATOMIC_WCHAR_T_LOCK_FREE = 2
  3408. const m___GCC_CONSTRUCTIVE_SIZE = 64
  3409. const m___GCC_DESTRUCTIVE_SIZE = 64
  3410. const m___GCC_HAVE_DWARF2_CFI_ASM = 1
  3411. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 = 1
  3412. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 = 1
  3413. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 = 1
  3414. const m___GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 = 1
  3415. const m___GCC_IEC_559 = 2
  3416. const m___GCC_IEC_559_COMPLEX = 2
  3417. const m___GNUC_EXECUTION_CHARSET_NAME = "UTF-8"
  3418. const m___GNUC_MINOR__ = 2
  3419. const m___GNUC_PATCHLEVEL__ = 0
  3420. const m___GNUC_STDC_INLINE__ = 1
  3421. const m___GNUC_WIDE_EXECUTION_CHARSET_NAME = "UTF-32LE"
  3422. const m___GNUC__ = 12
  3423. const m___GXX_ABI_VERSION = 1017
  3424. const m___HAVE_SPECULATION_SAFE_VALUE = 1
  3425. const m___ILP32__ = 1
  3426. const m___INT16_MAX__ = 0x7fff
  3427. const m___INT32_MAX__ = 0x7fffffff
  3428. const m___INT32_TYPE__ = "int"
  3429. const m___INT64_MAX__ = 0x7fffffffffffffff
  3430. const m___INT8_MAX__ = 0x7f
  3431. const m___INTMAX_MAX__ = 0x7fffffffffffffff
  3432. const m___INTMAX_WIDTH__ = 64
  3433. const m___INTPTR_MAX__ = 0x7fffffff
  3434. const m___INTPTR_TYPE__ = "int"
  3435. const m___INTPTR_WIDTH__ = 32
  3436. const m___INT_FAST16_MAX__ = 0x7fffffff
  3437. const m___INT_FAST16_TYPE__ = "int"
  3438. const m___INT_FAST16_WIDTH__ = 32
  3439. const m___INT_FAST32_MAX__ = 0x7fffffff
  3440. const m___INT_FAST32_TYPE__ = "int"
  3441. const m___INT_FAST32_WIDTH__ = 32
  3442. const m___INT_FAST64_MAX__ = 0x7fffffffffffffff
  3443. const m___INT_FAST64_WIDTH__ = 64
  3444. const m___INT_FAST8_MAX__ = 0x7f
  3445. const m___INT_FAST8_WIDTH__ = 8
  3446. const m___INT_LEAST16_MAX__ = 0x7fff
  3447. const m___INT_LEAST16_WIDTH__ = 16
  3448. const m___INT_LEAST32_MAX__ = 0x7fffffff
  3449. const m___INT_LEAST32_TYPE__ = "int"
  3450. const m___INT_LEAST32_WIDTH__ = 32
  3451. const m___INT_LEAST64_MAX__ = 0x7fffffffffffffff
  3452. const m___INT_LEAST64_WIDTH__ = 64
  3453. const m___INT_LEAST8_MAX__ = 0x7f
  3454. const m___INT_LEAST8_WIDTH__ = 8
  3455. const m___INT_MAX__ = 0x7fffffff
  3456. const m___INT_WIDTH__ = 32
  3457. const m___LAHF_SAHF__ = 1
  3458. const m___LDBL_DECIMAL_DIG__ = 17
  3459. const m___LDBL_DENORM_MIN__ = 4.94065645841246544176568792868221372e-324
  3460. const m___LDBL_DIG__ = 15
  3461. const m___LDBL_EPSILON__ = 2.22044604925031308084726333618164062e-16
  3462. const m___LDBL_HAS_DENORM__ = 1
  3463. const m___LDBL_HAS_INFINITY__ = 1
  3464. const m___LDBL_HAS_QUIET_NAN__ = 1
  3465. const m___LDBL_IS_IEC_60559__ = 2
  3466. const m___LDBL_MANT_DIG__ = 53
  3467. const m___LDBL_MAX_10_EXP__ = 308
  3468. const m___LDBL_MAX_EXP__ = 1024
  3469. const m___LDBL_MAX__ = 1.79769313486231570814527423731704357e+308
  3470. const m___LDBL_MIN__ = 2.22507385850720138309023271733240406e-308
  3471. const m___LDBL_NORM_MAX__ = 1.79769313486231570814527423731704357e+308
  3472. const m___LITTLE_ENDIAN = 1234
  3473. const m___LONG_DOUBLE_64__ = 1
  3474. const m___LONG_LONG_MAX__ = 0x7fffffffffffffff
  3475. const m___LONG_LONG_WIDTH__ = 64
  3476. const m___LONG_MAX = 0x7fffffff
  3477. const m___LONG_MAX__ = 0x7fffffff
  3478. const m___LONG_WIDTH__ = 32
  3479. const m___NO_INLINE__ = 1
  3480. const m___ORDER_BIG_ENDIAN__ = 4321
  3481. const m___ORDER_LITTLE_ENDIAN__ = 1234
  3482. const m___ORDER_PDP_ENDIAN__ = 3412
  3483. const m___PDP_ENDIAN = 3412
  3484. const m___PIC__ = 2
  3485. const m___PIE__ = 2
  3486. const m___PRAGMA_REDEFINE_EXTNAME = 1
  3487. const m___PRETTY_FUNCTION__ = "__func__"
  3488. const m___PTRDIFF_MAX__ = 0x7fffffff
  3489. const m___PTRDIFF_TYPE__ = "int"
  3490. const m___PTRDIFF_WIDTH__ = 32
  3491. const m___SCHAR_MAX__ = 0x7f
  3492. const m___SCHAR_WIDTH__ = 8
  3493. const m___SEG_FS = 1
  3494. const m___SEG_GS = 1
  3495. const m___SHRT_MAX__ = 0x7fff
  3496. const m___SHRT_WIDTH__ = 16
  3497. const m___SIG_ATOMIC_MAX__ = 0x7fffffff
  3498. const m___SIG_ATOMIC_TYPE__ = "int"
  3499. const m___SIG_ATOMIC_WIDTH__ = 32
  3500. const m___SIZEOF_DOUBLE__ = 8
  3501. const m___SIZEOF_FLOAT128__ = 16
  3502. const m___SIZEOF_FLOAT80__ = 12
  3503. const m___SIZEOF_FLOAT__ = 4
  3504. const m___SIZEOF_INT__ = 4
  3505. const m___SIZEOF_LONG_DOUBLE__ = 8
  3506. const m___SIZEOF_LONG_LONG__ = 8
  3507. const m___SIZEOF_LONG__ = 4
  3508. const m___SIZEOF_POINTER__ = 4
  3509. const m___SIZEOF_PTRDIFF_T__ = 4
  3510. const m___SIZEOF_SHORT__ = 2
  3511. const m___SIZEOF_SIZE_T__ = 4
  3512. const m___SIZEOF_WCHAR_T__ = 4
  3513. const m___SIZEOF_WINT_T__ = 4
  3514. const m___SIZE_MAX__ = 0xffffffff
  3515. const m___SIZE_WIDTH__ = 32
  3516. const m___STDC_HOSTED__ = 1
  3517. const m___STDC_IEC_559_COMPLEX__ = 1
  3518. const m___STDC_IEC_559__ = 1
  3519. const m___STDC_IEC_60559_BFP__ = 201404
  3520. const m___STDC_IEC_60559_COMPLEX__ = 201404
  3521. const m___STDC_ISO_10646__ = 201706
  3522. const m___STDC_UTF_16__ = 1
  3523. const m___STDC_UTF_32__ = 1
  3524. const m___STDC_VERSION__ = 201710
  3525. const m___STDC__ = 1
  3526. const m___UINT16_MAX__ = 0xffff
  3527. const m___UINT32_MAX__ = 0xffffffff
  3528. const m___UINT64_MAX__ = "0xffffffffffffffffU"
  3529. const m___UINT8_MAX__ = 0xff
  3530. const m___UINTMAX_MAX__ = "0xffffffffffffffffU"
  3531. const m___UINTPTR_MAX__ = 0xffffffff
  3532. const m___UINT_FAST16_MAX__ = 0xffffffff
  3533. const m___UINT_FAST32_MAX__ = 0xffffffff
  3534. const m___UINT_FAST64_MAX__ = "0xffffffffffffffffU"
  3535. const m___UINT_FAST8_MAX__ = 0xff
  3536. const m___UINT_LEAST16_MAX__ = 0xffff
  3537. const m___UINT_LEAST32_MAX__ = 0xffffffff
  3538. const m___UINT_LEAST64_MAX__ = "0xffffffffffffffffU"
  3539. const m___UINT_LEAST8_MAX__ = 0xff
  3540. const m___USE_TIME_BITS64 = 1
  3541. const m___VERSION__ = "12.2.0"
  3542. const m___WCHAR_MAX__ = 0x7fffffff
  3543. const m___WCHAR_WIDTH__ = 32
  3544. const m___WINT_MAX__ = 0xffffffff
  3545. const m___WINT_MIN__ = 0
  3546. const m___WINT_WIDTH__ = 32
  3547. const m___code_model_32__ = 1
  3548. const m___gnu_linux__ = 1
  3549. const m___i386 = 1
  3550. const m___i386__ = 1
  3551. const m___i686 = 1
  3552. const m___i686__ = 1
  3553. const m___inline = "inline"
  3554. const m___linux = 1
  3555. const m___linux__ = 1
  3556. const m___pentiumpro = 1
  3557. const m___pentiumpro__ = 1
  3558. const m___pic__ = 2
  3559. const m___pie__ = 2
  3560. const m___restrict = "restrict"
  3561. const m___restrict_arr = "restrict"
  3562. const m___tm_gmtoff = "tm_gmtoff"
  3563. const m___tm_zone = "tm_zone"
  3564. const m___unix = 1
  3565. const m___unix__ = 1
  3566. const m_alloca = "__builtin_alloca"
  3567. const m_ft_encoding_adobe_custom = "FT_ENCODING_ADOBE_CUSTOM"
  3568. const m_ft_encoding_adobe_expert = "FT_ENCODING_ADOBE_EXPERT"
  3569. const m_ft_encoding_adobe_standard = "FT_ENCODING_ADOBE_STANDARD"
  3570. const m_ft_encoding_apple_roman = "FT_ENCODING_APPLE_ROMAN"
  3571. const m_ft_encoding_big5 = "FT_ENCODING_BIG5"
  3572. const m_ft_encoding_gb2312 = "FT_ENCODING_PRC"
  3573. const m_ft_encoding_johab = "FT_ENCODING_JOHAB"
  3574. const m_ft_encoding_latin_1 = "FT_ENCODING_ADOBE_LATIN_1"
  3575. const m_ft_encoding_latin_2 = "FT_ENCODING_OLD_LATIN_2"
  3576. const m_ft_encoding_none = "FT_ENCODING_NONE"
  3577. const m_ft_encoding_sjis = "FT_ENCODING_SJIS"
  3578. const m_ft_encoding_symbol = "FT_ENCODING_MS_SYMBOL"
  3579. const m_ft_encoding_unicode = "FT_ENCODING_UNICODE"
  3580. const m_ft_encoding_wansung = "FT_ENCODING_WANSUNG"
  3581. const m_ft_fclose = "fclose"
  3582. const m_ft_fopen = "fopen"
  3583. const m_ft_fread = "fread"
  3584. const m_ft_fseek = "fseek"
  3585. const m_ft_ftell = "ftell"
  3586. const m_ft_getenv = "getenv"
  3587. const m_ft_glyph_format_bitmap = "FT_GLYPH_FORMAT_BITMAP"
  3588. const m_ft_glyph_format_composite = "FT_GLYPH_FORMAT_COMPOSITE"
  3589. const m_ft_glyph_format_none = "FT_GLYPH_FORMAT_NONE"
  3590. const m_ft_glyph_format_outline = "FT_GLYPH_FORMAT_OUTLINE"
  3591. const m_ft_glyph_format_plotter = "FT_GLYPH_FORMAT_PLOTTER"
  3592. const m_ft_jmp_buf = "jmp_buf"
  3593. const m_ft_kerning_default = "FT_KERNING_DEFAULT"
  3594. const m_ft_kerning_unfitted = "FT_KERNING_UNFITTED"
  3595. const m_ft_kerning_unscaled = "FT_KERNING_UNSCALED"
  3596. const m_ft_longjmp = "longjmp"
  3597. const m_ft_memchr = "memchr"
  3598. const m_ft_memcmp = "memcmp"
  3599. const m_ft_memcpy = "memcpy"
  3600. const m_ft_memmove = "memmove"
  3601. const m_ft_memset = "memset"
  3602. const m_ft_open_driver = "FT_OPEN_DRIVER"
  3603. const m_ft_open_memory = "FT_OPEN_MEMORY"
  3604. const m_ft_open_params = "FT_OPEN_PARAMS"
  3605. const m_ft_open_pathname = "FT_OPEN_PATHNAME"
  3606. const m_ft_open_stream = "FT_OPEN_STREAM"
  3607. const m_ft_outline_even_odd_fill = "FT_OUTLINE_EVEN_ODD_FILL"
  3608. const m_ft_outline_high_precision = "FT_OUTLINE_HIGH_PRECISION"
  3609. const m_ft_outline_ignore_dropouts = "FT_OUTLINE_IGNORE_DROPOUTS"
  3610. const m_ft_outline_none = "FT_OUTLINE_NONE"
  3611. const m_ft_outline_owner = "FT_OUTLINE_OWNER"
  3612. const m_ft_outline_reverse_fill = "FT_OUTLINE_REVERSE_FILL"
  3613. const m_ft_outline_single_pass = "FT_OUTLINE_SINGLE_PASS"
  3614. const m_ft_pixel_mode_grays = "FT_PIXEL_MODE_GRAY"
  3615. const m_ft_pixel_mode_mono = "FT_PIXEL_MODE_MONO"
  3616. const m_ft_pixel_mode_none = "FT_PIXEL_MODE_NONE"
  3617. const m_ft_pixel_mode_pal2 = "FT_PIXEL_MODE_GRAY2"
  3618. const m_ft_pixel_mode_pal4 = "FT_PIXEL_MODE_GRAY4"
  3619. const m_ft_ptrdiff_t = "ptrdiff_t"
  3620. const m_ft_qsort = "qsort"
  3621. const m_ft_raster_flag_aa = "FT_RASTER_FLAG_AA"
  3622. const m_ft_raster_flag_clip = "FT_RASTER_FLAG_CLIP"
  3623. const m_ft_raster_flag_default = "FT_RASTER_FLAG_DEFAULT"
  3624. const m_ft_raster_flag_direct = "FT_RASTER_FLAG_DIRECT"
  3625. const m_ft_render_mode_mono = "FT_RENDER_MODE_MONO"
  3626. const m_ft_render_mode_normal = "FT_RENDER_MODE_NORMAL"
  3627. const m_ft_scalloc = "calloc"
  3628. const m_ft_sfree = "free"
  3629. const m_ft_smalloc = "malloc"
  3630. const m_ft_sprintf = "sprintf"
  3631. const m_ft_srealloc = "realloc"
  3632. const m_ft_strcat = "strcat"
  3633. const m_ft_strcmp = "strcmp"
  3634. const m_ft_strcpy = "strcpy"
  3635. const m_ft_strlen = "strlen"
  3636. const m_ft_strncmp = "strncmp"
  3637. const m_ft_strncpy = "strncpy"
  3638. const m_ft_strrchr = "strrchr"
  3639. const m_ft_strstr = "strstr"
  3640. const m_ft_strtol = "strtol"
  3641. const m_i386 = 1
  3642. const m_linux = 1
  3643. const m_static_assert = "_Static_assert"
  3644. const m_sz_xAllocColorCellsReply = 32
  3645. const m_sz_xAllocColorCellsReq = 12
  3646. const m_sz_xAllocColorPlanesReply = 32
  3647. const m_sz_xAllocColorPlanesReq = 16
  3648. const m_sz_xAllocColorReply = 32
  3649. const m_sz_xAllocColorReq = 16
  3650. const m_sz_xAllocNamedColorReply = 32
  3651. const m_sz_xAllocNamedColorReq = 12
  3652. const m_sz_xAllowEventsReq = 8
  3653. const m_sz_xArc = 12
  3654. const m_sz_xBellReq = 4
  3655. const m_sz_xChangeActivePointerGrabReq = 16
  3656. const m_sz_xChangeGCReq = 12
  3657. const m_sz_xChangeHostsReq = 8
  3658. const m_sz_xChangeKeyboardControlReq = 8
  3659. const m_sz_xChangeKeyboardMappingReq = 8
  3660. const m_sz_xChangeModeReq = 4
  3661. const m_sz_xChangePointerControlReq = 12
  3662. const m_sz_xChangePropertyReq = 24
  3663. const m_sz_xChangeSaveSetReq = 8
  3664. const m_sz_xChangeWindowAttributesReq = 12
  3665. const m_sz_xCharInfo = 12
  3666. const m_sz_xCirculateWindowReq = 8
  3667. const m_sz_xClearAreaReq = 16
  3668. const m_sz_xColorItem = 12
  3669. const m_sz_xConfigureWindowReq = 12
  3670. const m_sz_xConnClientPrefix = 12
  3671. const m_sz_xConnSetup = 32
  3672. const m_sz_xConnSetupPrefix = 8
  3673. const m_sz_xConvertSelectionReq = 24
  3674. const m_sz_xCopyAreaReq = 28
  3675. const m_sz_xCopyColormapAndFreeReq = 12
  3676. const m_sz_xCopyGCReq = 16
  3677. const m_sz_xCopyPlaneReq = 32
  3678. const m_sz_xCreateColormapReq = 16
  3679. const m_sz_xCreateCursorReq = 32
  3680. const m_sz_xCreateGCReq = 16
  3681. const m_sz_xCreateGlyphCursorReq = 32
  3682. const m_sz_xCreatePixmapReq = 16
  3683. const m_sz_xCreateWindowReq = 32
  3684. const m_sz_xDeletePropertyReq = 12
  3685. const m_sz_xDepth = 8
  3686. const m_sz_xError = 32
  3687. const m_sz_xEvent = 32
  3688. const m_sz_xFillPolyReq = 16
  3689. const m_sz_xFontProp = 8
  3690. const m_sz_xForceScreenSaverReq = 4
  3691. const m_sz_xFreeColorsReq = 12
  3692. const m_sz_xGenericReply = 32
  3693. const m_sz_xGetAtomNameReply = 32
  3694. const m_sz_xGetFontPathReply = 32
  3695. const m_sz_xGetGeometryReply = 32
  3696. const m_sz_xGetImageReply = 32
  3697. const m_sz_xGetImageReq = 20
  3698. const m_sz_xGetInputFocusReply = 32
  3699. const m_sz_xGetKeyboardControlReply = 52
  3700. const m_sz_xGetKeyboardMappingReply = 32
  3701. const m_sz_xGetKeyboardMappingReq = 8
  3702. const m_sz_xGetModifierMappingReply = 32
  3703. const m_sz_xGetMotionEventsReply = 32
  3704. const m_sz_xGetMotionEventsReq = 16
  3705. const m_sz_xGetPointerControlReply = 32
  3706. const m_sz_xGetPointerMappingReply = 32
  3707. const m_sz_xGetPropertyReply = 32
  3708. const m_sz_xGetPropertyReq = 24
  3709. const m_sz_xGetScreenSaverReply = 32
  3710. const m_sz_xGetSelectionOwnerReply = 32
  3711. const m_sz_xGetWindowAttributesReply = 44
  3712. const m_sz_xGrabButtonReq = 24
  3713. const m_sz_xGrabKeyReq = 16
  3714. const m_sz_xGrabKeyboardReply = 32
  3715. const m_sz_xGrabKeyboardReq = 16
  3716. const m_sz_xGrabPointerReply = 32
  3717. const m_sz_xGrabPointerReq = 24
  3718. const m_sz_xHostEntry = 4
  3719. const m_sz_xImageText16Req = 16
  3720. const m_sz_xImageText8Req = 16
  3721. const m_sz_xImageTextReq = 16
  3722. const m_sz_xInternAtomReply = 32
  3723. const m_sz_xInternAtomReq = 8
  3724. const m_sz_xKeymapEvent = 32
  3725. const m_sz_xListExtensionsReply = 32
  3726. const m_sz_xListFontsReply = 32
  3727. const m_sz_xListFontsReq = 8
  3728. const m_sz_xListFontsWithInfoReply = 60
  3729. const m_sz_xListFontsWithInfoReq = 8
  3730. const m_sz_xListHostsReply = 32
  3731. const m_sz_xListHostsReq = 4
  3732. const m_sz_xListInstalledColormapsReply = 32
  3733. const m_sz_xListPropertiesReply = 32
  3734. const m_sz_xLookupColorReply = 32
  3735. const m_sz_xLookupColorReq = 12
  3736. const m_sz_xOpenFontReq = 12
  3737. const m_sz_xPixmapFormat = 8
  3738. const m_sz_xPoint = 4
  3739. const m_sz_xPolyArcReq = 12
  3740. const m_sz_xPolyFillArcReq = 12
  3741. const m_sz_xPolyFillRectangleReq = 12
  3742. const m_sz_xPolyLineReq = 12
  3743. const m_sz_xPolyPointReq = 12
  3744. const m_sz_xPolyRectangleReq = 12
  3745. const m_sz_xPolySegmentReq = 12
  3746. const m_sz_xPolyText16Req = 16
  3747. const m_sz_xPolyText8Req = 16
  3748. const m_sz_xPolyTextReq = 16
  3749. const m_sz_xPropIconSize = 24
  3750. const m_sz_xPutImageReq = 24
  3751. const m_sz_xQueryBestSizeReply = 32
  3752. const m_sz_xQueryBestSizeReq = 12
  3753. const m_sz_xQueryColorsReply = 32
  3754. const m_sz_xQueryColorsReq = 8
  3755. const m_sz_xQueryExtensionReply = 32
  3756. const m_sz_xQueryExtensionReq = 8
  3757. const m_sz_xQueryFontReply = 60
  3758. const m_sz_xQueryKeymapReply = 40
  3759. const m_sz_xQueryPointerReply = 32
  3760. const m_sz_xQueryTextExtentsReply = 32
  3761. const m_sz_xQueryTextExtentsReq = 8
  3762. const m_sz_xQueryTreeReply = 32
  3763. const m_sz_xRecolorCursorReq = 20
  3764. const m_sz_xRectangle = 8
  3765. const m_sz_xReparentWindowReq = 16
  3766. const m_sz_xReply = 32
  3767. const m_sz_xReq = 4
  3768. const m_sz_xResourceReq = 8
  3769. const m_sz_xRotatePropertiesReq = 12
  3770. const m_sz_xSegment = 8
  3771. const m_sz_xSendEventReq = 44
  3772. const m_sz_xSetAccessControlReq = 4
  3773. const m_sz_xSetClipRectanglesReq = 12
  3774. const m_sz_xSetCloseDownModeReq = 4
  3775. const m_sz_xSetDashesReq = 12
  3776. const m_sz_xSetFontPathReq = 8
  3777. const m_sz_xSetInputFocusReq = 12
  3778. const m_sz_xSetMappingReply = 32
  3779. const m_sz_xSetModifierMappingReply = 32
  3780. const m_sz_xSetModifierMappingReq = 4
  3781. const m_sz_xSetPointerMappingReply = 32
  3782. const m_sz_xSetPointerMappingReq = 4
  3783. const m_sz_xSetScreenSaverReq = 12
  3784. const m_sz_xSetSelectionOwnerReq = 16
  3785. const m_sz_xStoreColorsReq = 8
  3786. const m_sz_xStoreNamedColorReq = 16
  3787. const m_sz_xTextElt = 2
  3788. const m_sz_xTimecoord = 8
  3789. const m_sz_xTranslateCoordsReply = 32
  3790. const m_sz_xTranslateCoordsReq = 16
  3791. const m_sz_xUngrabButtonReq = 12
  3792. const m_sz_xUngrabKeyReq = 12
  3793. const m_sz_xVisualType = 24
  3794. const m_sz_xWarpPointerReq = 24
  3795. const m_sz_xWindowRoot = 40
  3796. const m_sz_xrgb = 8
  3797. const m_unix = 1
  3798. const m_xFalse = 0
  3799. const m_xTrue = 1
  3800. const m_xfree = "free"
  3801. const m_xmalloc = "malloc"
  3802. const m_xthread_self = "pthread_self"
  3803. type t__builtin_va_list = uintptr
  3804. type t__predefined_size_t = uint32
  3805. type t__predefined_wchar_t = int32
  3806. type t__predefined_ptrdiff_t = int32
  3807. type Tsize_t = uint32
  3808. type Tssize_t = int32
  3809. type Toff_t = int64
  3810. type Tva_list = uintptr
  3811. type t__isoc_va_list = uintptr
  3812. type Tfpos_t = struct {
  3813. F__lldata [0]int64
  3814. F__align [0]float64
  3815. F__opaque [16]int8
  3816. }
  3817. type T_G_fpos64_t = Tfpos_t
  3818. type Tcookie_io_functions_t = struct {
  3819. Fread uintptr
  3820. Fwrite uintptr
  3821. Fseek uintptr
  3822. Fclose1 uintptr
  3823. }
  3824. type T_IO_cookie_io_functions_t = Tcookie_io_functions_t
  3825. type Twchar_t = int32
  3826. type Tdiv_t = struct {
  3827. Fquot int32
  3828. Frem int32
  3829. }
  3830. type Tldiv_t = struct {
  3831. Fquot int32
  3832. Frem int32
  3833. }
  3834. type Tlldiv_t = struct {
  3835. Fquot int64
  3836. Frem int64
  3837. }
  3838. type Tlocale_t = uintptr
  3839. type Tregister_t = int32
  3840. type Ttime_t = int64
  3841. type Tsuseconds_t = int64
  3842. type Tint8_t = int8
  3843. type Tint16_t = int16
  3844. type Tint32_t = int32
  3845. type Tint64_t = int64
  3846. type Tu_int64_t = uint64
  3847. type Tmode_t = uint32
  3848. type Tnlink_t = uint32
  3849. type Tino_t = uint64
  3850. type Tdev_t = uint64
  3851. type Tblksize_t = int32
  3852. type Tblkcnt_t = int64
  3853. type Tfsblkcnt_t = uint64
  3854. type Tfsfilcnt_t = uint64
  3855. type Ttimer_t = uintptr
  3856. type Tclockid_t = int32
  3857. type Tclock_t = int32
  3858. type Tpid_t = int32
  3859. type Tid_t = uint32
  3860. type Tuid_t = uint32
  3861. type Tgid_t = uint32
  3862. type Tkey_t = int32
  3863. type Tuseconds_t = uint32
  3864. type Tpthread_t = uintptr
  3865. type Tpthread_once_t = int32
  3866. type Tpthread_key_t = uint32
  3867. type Tpthread_spinlock_t = int32
  3868. type Tpthread_mutexattr_t = struct {
  3869. F__attr uint32
  3870. }
  3871. type Tpthread_condattr_t = struct {
  3872. F__attr uint32
  3873. }
  3874. type Tpthread_barrierattr_t = struct {
  3875. F__attr uint32
  3876. }
  3877. type Tpthread_rwlockattr_t = struct {
  3878. F__attr [2]uint32
  3879. }
  3880. type Tpthread_attr_t = struct {
  3881. F__u struct {
  3882. F__vi [0][9]int32
  3883. F__s [0][9]uint32
  3884. F__i [9]int32
  3885. }
  3886. }
  3887. type Tpthread_mutex_t = struct {
  3888. F__u struct {
  3889. F__vi [0][6]int32
  3890. F__p [0][6]uintptr
  3891. F__i [6]int32
  3892. }
  3893. F__ccgo_room int32
  3894. }
  3895. type Tpthread_cond_t = struct {
  3896. F__u struct {
  3897. F__vi [0][12]int32
  3898. F__p [0][12]uintptr
  3899. F__i [12]int32
  3900. }
  3901. }
  3902. type Tpthread_rwlock_t = struct {
  3903. F__u struct {
  3904. F__vi [0][8]int32
  3905. F__p [0][8]uintptr
  3906. F__i [8]int32
  3907. }
  3908. }
  3909. type Tpthread_barrier_t = struct {
  3910. F__u struct {
  3911. F__vi [0][5]int32
  3912. F__p [0][5]uintptr
  3913. F__i [5]int32
  3914. }
  3915. }
  3916. type Tu_int8_t = uint8
  3917. type Tu_int16_t = uint16
  3918. type Tu_int32_t = uint32
  3919. type Tcaddr_t = uintptr
  3920. type Tu_char = uint8
  3921. type Tu_short = uint16
  3922. type Tushort = uint16
  3923. type Tu_int = uint32
  3924. type Tuint = uint32
  3925. type Tu_long = uint32
  3926. type Tulong = uint32
  3927. type Tquad_t = int64
  3928. type Tu_quad_t = uint64
  3929. type Tuint16_t = uint16
  3930. type Tuint32_t = uint32
  3931. type Tuint64_t = uint64
  3932. type Ttimeval = struct {
  3933. Ftv_sec Ttime_t
  3934. Ftv_usec Tsuseconds_t
  3935. }
  3936. type Ttimespec = struct {
  3937. Ftv_sec Ttime_t
  3938. Ftv_nsec int32
  3939. F__ccgo12 uint32
  3940. }
  3941. type Tsigset_t = struct {
  3942. F__bits [32]uint32
  3943. }
  3944. type t__sigset_t = Tsigset_t
  3945. type Tfd_mask = uint32
  3946. type Tfd_set = struct {
  3947. Ffds_bits [32]uint32
  3948. }
  3949. type TXID = uint32
  3950. type TMask = uint32
  3951. type TAtom = uint32
  3952. type TVisualID = uint32
  3953. type TTime = uint32
  3954. type TWindow = uint32
  3955. type TDrawable = uint32
  3956. type TFont = uint32
  3957. type TPixmap = uint32
  3958. type TCursor = uint32
  3959. type TColormap = uint32
  3960. type TGContext = uint32
  3961. type TKeySym = uint32
  3962. type TKeyCode = uint8
  3963. type Tmax_align_t = struct {
  3964. F__ll int64
  3965. F__ld float64
  3966. }
  3967. type Tptrdiff_t = int32
  3968. type TXPointer = uintptr
  3969. type TXExtData = struct {
  3970. Fnumber int32
  3971. Fnext uintptr
  3972. Ffree_private uintptr
  3973. Fprivate_data TXPointer
  3974. }
  3975. type T_XExtData = TXExtData
  3976. type TXExtCodes = struct {
  3977. Fextension int32
  3978. Fmajor_opcode int32
  3979. Ffirst_event int32
  3980. Ffirst_error int32
  3981. }
  3982. type TXPixmapFormatValues = struct {
  3983. Fdepth int32
  3984. Fbits_per_pixel int32
  3985. Fscanline_pad int32
  3986. }
  3987. type TXGCValues = struct {
  3988. Ffunction int32
  3989. Fplane_mask uint32
  3990. Fforeground uint32
  3991. Fbackground uint32
  3992. Fline_width int32
  3993. Fline_style int32
  3994. Fcap_style int32
  3995. Fjoin_style int32
  3996. Ffill_style int32
  3997. Ffill_rule int32
  3998. Farc_mode int32
  3999. Ftile TPixmap
  4000. Fstipple TPixmap
  4001. Fts_x_origin int32
  4002. Fts_y_origin int32
  4003. Ffont TFont
  4004. Fsubwindow_mode int32
  4005. Fgraphics_exposures int32
  4006. Fclip_x_origin int32
  4007. Fclip_y_origin int32
  4008. Fclip_mask TPixmap
  4009. Fdash_offset int32
  4010. Fdashes int8
  4011. }
  4012. type TGC = uintptr
  4013. type T_XGC = struct {
  4014. Fext_data uintptr
  4015. Fgid TGContext
  4016. Frects int32
  4017. Fdashes int32
  4018. Fdirty uint32
  4019. Fvalues TXGCValues
  4020. }
  4021. type TVisual = struct {
  4022. Fext_data uintptr
  4023. Fvisualid TVisualID
  4024. Fclass int32
  4025. Fred_mask uint32
  4026. Fgreen_mask uint32
  4027. Fblue_mask uint32
  4028. Fbits_per_rgb int32
  4029. Fmap_entries int32
  4030. }
  4031. type TDepth = struct {
  4032. Fdepth int32
  4033. Fnvisuals int32
  4034. Fvisuals uintptr
  4035. }
  4036. type T_XDisplay = struct {
  4037. Fext_data uintptr
  4038. Ffree_funcs uintptr
  4039. Ffd int32
  4040. Fconn_checker int32
  4041. Fproto_major_version int32
  4042. Fproto_minor_version int32
  4043. Fvendor uintptr
  4044. Fresource_base TXID
  4045. Fresource_mask TXID
  4046. Fresource_id TXID
  4047. Fresource_shift int32
  4048. Fresource_alloc uintptr
  4049. Fbyte_order int32
  4050. Fbitmap_unit int32
  4051. Fbitmap_pad int32
  4052. Fbitmap_bit_order int32
  4053. Fnformats int32
  4054. Fpixmap_format uintptr
  4055. Fvnumber int32
  4056. Frelease int32
  4057. Fhead uintptr
  4058. Ftail uintptr
  4059. Fqlen int32
  4060. Flast_request_read uint32
  4061. Frequest uint32
  4062. Flast_req uintptr
  4063. Fbuffer uintptr
  4064. Fbufptr uintptr
  4065. Fbufmax uintptr
  4066. Fmax_request_size uint32
  4067. Fdb uintptr
  4068. Fsynchandler uintptr
  4069. Fdisplay_name uintptr
  4070. Fdefault_screen int32
  4071. Fnscreens int32
  4072. Fscreens uintptr
  4073. Fmotion_buffer uint32
  4074. Fflags uint32
  4075. Fmin_keycode int32
  4076. Fmax_keycode int32
  4077. Fkeysyms uintptr
  4078. Fmodifiermap uintptr
  4079. Fkeysyms_per_keycode int32
  4080. Fxdefaults uintptr
  4081. Fscratch_buffer uintptr
  4082. Fscratch_length uint32
  4083. Fext_number int32
  4084. Fext_procs uintptr
  4085. Fevent_vec [128]uintptr
  4086. Fwire_vec [128]uintptr
  4087. Flock_meaning TKeySym
  4088. Flock uintptr
  4089. Fasync_handlers uintptr
  4090. Fbigreq_size uint32
  4091. Flock_fns uintptr
  4092. Fidlist_alloc uintptr
  4093. Fkey_bindings uintptr
  4094. Fcursor_font TFont
  4095. Fatoms uintptr
  4096. Fmode_switch uint32
  4097. Fnum_lock uint32
  4098. Fcontext_db uintptr
  4099. Ferror_vec uintptr
  4100. Fcms struct {
  4101. FdefaultCCCs TXPointer
  4102. FclientCmaps TXPointer
  4103. FperVisualIntensityMaps TXPointer
  4104. }
  4105. Fim_filters uintptr
  4106. Fqfree uintptr
  4107. Fnext_event_serial_num uint32
  4108. Fflushes uintptr
  4109. Fim_fd_info uintptr
  4110. Fim_fd_length int32
  4111. Fconn_watchers uintptr
  4112. Fwatcher_count int32
  4113. Ffiledes TXPointer
  4114. Fsavedsynchandler uintptr
  4115. Fresource_max TXID
  4116. Fxcmisc_opcode int32
  4117. Fxkb_info uintptr
  4118. Ftrans_conn uintptr
  4119. Fxcb uintptr
  4120. Fnext_cookie uint32
  4121. Fgeneric_event_vec [128]uintptr
  4122. Fgeneric_event_copy_vec [128]uintptr
  4123. Fcookiejar uintptr
  4124. Flast_request_read_upper32bit uint32
  4125. Frequest_upper32bit uint32
  4126. Ferror_threads uintptr
  4127. Fexit_handler TXIOErrorExitHandler
  4128. Fexit_handler_data uintptr
  4129. Fin_ifevent TCARD32
  4130. Fifevent_thread Txthread_t
  4131. }
  4132. type TScreen = struct {
  4133. Fext_data uintptr
  4134. Fdisplay uintptr
  4135. Froot TWindow
  4136. Fwidth int32
  4137. Fheight int32
  4138. Fmwidth int32
  4139. Fmheight int32
  4140. Fndepths int32
  4141. Fdepths uintptr
  4142. Froot_depth int32
  4143. Froot_visual uintptr
  4144. Fdefault_gc TGC
  4145. Fcmap TColormap
  4146. Fwhite_pixel uint32
  4147. Fblack_pixel uint32
  4148. Fmax_maps int32
  4149. Fmin_maps int32
  4150. Fbacking_store int32
  4151. Fsave_unders int32
  4152. Froot_input_mask int32
  4153. }
  4154. type TScreenFormat = struct {
  4155. Fext_data uintptr
  4156. Fdepth int32
  4157. Fbits_per_pixel int32
  4158. Fscanline_pad int32
  4159. }
  4160. type TXSetWindowAttributes = struct {
  4161. Fbackground_pixmap TPixmap
  4162. Fbackground_pixel uint32
  4163. Fborder_pixmap TPixmap
  4164. Fborder_pixel uint32
  4165. Fbit_gravity int32
  4166. Fwin_gravity int32
  4167. Fbacking_store int32
  4168. Fbacking_planes uint32
  4169. Fbacking_pixel uint32
  4170. Fsave_under int32
  4171. Fevent_mask int32
  4172. Fdo_not_propagate_mask int32
  4173. Foverride_redirect int32
  4174. Fcolormap TColormap
  4175. Fcursor TCursor
  4176. }
  4177. type TXWindowAttributes = struct {
  4178. Fx int32
  4179. Fy int32
  4180. Fwidth int32
  4181. Fheight int32
  4182. Fborder_width int32
  4183. Fdepth int32
  4184. Fvisual uintptr
  4185. Froot TWindow
  4186. Fclass int32
  4187. Fbit_gravity int32
  4188. Fwin_gravity int32
  4189. Fbacking_store int32
  4190. Fbacking_planes uint32
  4191. Fbacking_pixel uint32
  4192. Fsave_under int32
  4193. Fcolormap TColormap
  4194. Fmap_installed int32
  4195. Fmap_state int32
  4196. Fall_event_masks int32
  4197. Fyour_event_mask int32
  4198. Fdo_not_propagate_mask int32
  4199. Foverride_redirect int32
  4200. Fscreen uintptr
  4201. }
  4202. type TXHostAddress = struct {
  4203. Ffamily int32
  4204. Flength int32
  4205. Faddress uintptr
  4206. }
  4207. type TXServerInterpretedAddress = struct {
  4208. Ftypelength int32
  4209. Fvaluelength int32
  4210. Ftype1 uintptr
  4211. Fvalue uintptr
  4212. }
  4213. type TXImage = struct {
  4214. Fwidth int32
  4215. Fheight int32
  4216. Fxoffset int32
  4217. Fformat int32
  4218. Fdata uintptr
  4219. Fbyte_order int32
  4220. Fbitmap_unit int32
  4221. Fbitmap_bit_order int32
  4222. Fbitmap_pad int32
  4223. Fdepth int32
  4224. Fbytes_per_line int32
  4225. Fbits_per_pixel int32
  4226. Fred_mask uint32
  4227. Fgreen_mask uint32
  4228. Fblue_mask uint32
  4229. Fobdata TXPointer
  4230. Ff Tfuncs
  4231. }
  4232. type T_XImage = TXImage
  4233. type TXWindowChanges = struct {
  4234. Fx int32
  4235. Fy int32
  4236. Fwidth int32
  4237. Fheight int32
  4238. Fborder_width int32
  4239. Fsibling TWindow
  4240. Fstack_mode int32
  4241. }
  4242. type TXColor = struct {
  4243. Fpixel uint32
  4244. Fred uint16
  4245. Fgreen uint16
  4246. Fblue uint16
  4247. Fflags int8
  4248. Fpad int8
  4249. }
  4250. type TXSegment = struct {
  4251. Fx1 int16
  4252. Fy1 int16
  4253. Fx2 int16
  4254. Fy2 int16
  4255. }
  4256. type TXPoint = struct {
  4257. Fx int16
  4258. Fy int16
  4259. }
  4260. type TXRectangle = struct {
  4261. Fx int16
  4262. Fy int16
  4263. Fwidth uint16
  4264. Fheight uint16
  4265. }
  4266. type TXArc = struct {
  4267. Fx int16
  4268. Fy int16
  4269. Fwidth uint16
  4270. Fheight uint16
  4271. Fangle1 int16
  4272. Fangle2 int16
  4273. }
  4274. type TXKeyboardControl = struct {
  4275. Fkey_click_percent int32
  4276. Fbell_percent int32
  4277. Fbell_pitch int32
  4278. Fbell_duration int32
  4279. Fled int32
  4280. Fled_mode int32
  4281. Fkey int32
  4282. Fauto_repeat_mode int32
  4283. }
  4284. type TXKeyboardState = struct {
  4285. Fkey_click_percent int32
  4286. Fbell_percent int32
  4287. Fbell_pitch uint32
  4288. Fbell_duration uint32
  4289. Fled_mask uint32
  4290. Fglobal_auto_repeat int32
  4291. Fauto_repeats [32]int8
  4292. }
  4293. type TXTimeCoord = struct {
  4294. Ftime TTime
  4295. Fx int16
  4296. Fy int16
  4297. }
  4298. type TXModifierKeymap = struct {
  4299. Fmax_keypermod int32
  4300. Fmodifiermap uintptr
  4301. }
  4302. type TDisplay = struct {
  4303. Fext_data uintptr
  4304. Ffree_funcs uintptr
  4305. Ffd int32
  4306. Fconn_checker int32
  4307. Fproto_major_version int32
  4308. Fproto_minor_version int32
  4309. Fvendor uintptr
  4310. Fresource_base TXID
  4311. Fresource_mask TXID
  4312. Fresource_id TXID
  4313. Fresource_shift int32
  4314. Fresource_alloc uintptr
  4315. Fbyte_order int32
  4316. Fbitmap_unit int32
  4317. Fbitmap_pad int32
  4318. Fbitmap_bit_order int32
  4319. Fnformats int32
  4320. Fpixmap_format uintptr
  4321. Fvnumber int32
  4322. Frelease int32
  4323. Fhead uintptr
  4324. Ftail uintptr
  4325. Fqlen int32
  4326. Flast_request_read uint32
  4327. Frequest uint32
  4328. Flast_req uintptr
  4329. Fbuffer uintptr
  4330. Fbufptr uintptr
  4331. Fbufmax uintptr
  4332. Fmax_request_size uint32
  4333. Fdb uintptr
  4334. Fsynchandler uintptr
  4335. Fdisplay_name uintptr
  4336. Fdefault_screen int32
  4337. Fnscreens int32
  4338. Fscreens uintptr
  4339. Fmotion_buffer uint32
  4340. Fflags uint32
  4341. Fmin_keycode int32
  4342. Fmax_keycode int32
  4343. Fkeysyms uintptr
  4344. Fmodifiermap uintptr
  4345. Fkeysyms_per_keycode int32
  4346. Fxdefaults uintptr
  4347. Fscratch_buffer uintptr
  4348. Fscratch_length uint32
  4349. Fext_number int32
  4350. Fext_procs uintptr
  4351. Fevent_vec [128]uintptr
  4352. Fwire_vec [128]uintptr
  4353. Flock_meaning TKeySym
  4354. Flock uintptr
  4355. Fasync_handlers uintptr
  4356. Fbigreq_size uint32
  4357. Flock_fns uintptr
  4358. Fidlist_alloc uintptr
  4359. Fkey_bindings uintptr
  4360. Fcursor_font TFont
  4361. Fatoms uintptr
  4362. Fmode_switch uint32
  4363. Fnum_lock uint32
  4364. Fcontext_db uintptr
  4365. Ferror_vec uintptr
  4366. Fcms struct {
  4367. FdefaultCCCs TXPointer
  4368. FclientCmaps TXPointer
  4369. FperVisualIntensityMaps TXPointer
  4370. }
  4371. Fim_filters uintptr
  4372. Fqfree uintptr
  4373. Fnext_event_serial_num uint32
  4374. Fflushes uintptr
  4375. Fim_fd_info uintptr
  4376. Fim_fd_length int32
  4377. Fconn_watchers uintptr
  4378. Fwatcher_count int32
  4379. Ffiledes TXPointer
  4380. Fsavedsynchandler uintptr
  4381. Fresource_max TXID
  4382. Fxcmisc_opcode int32
  4383. Fxkb_info uintptr
  4384. Ftrans_conn uintptr
  4385. Fxcb uintptr
  4386. Fnext_cookie uint32
  4387. Fgeneric_event_vec [128]uintptr
  4388. Fgeneric_event_copy_vec [128]uintptr
  4389. Fcookiejar uintptr
  4390. Flast_request_read_upper32bit uint32
  4391. Frequest_upper32bit uint32
  4392. Ferror_threads uintptr
  4393. Fexit_handler TXIOErrorExitHandler
  4394. Fexit_handler_data uintptr
  4395. Fin_ifevent TCARD32
  4396. Fifevent_thread Txthread_t
  4397. }
  4398. type T_XPrivDisplay = uintptr
  4399. type TXKeyEvent = struct {
  4400. Ftype1 int32
  4401. Fserial uint32
  4402. Fsend_event int32
  4403. Fdisplay uintptr
  4404. Fwindow TWindow
  4405. Froot TWindow
  4406. Fsubwindow TWindow
  4407. Ftime TTime
  4408. Fx int32
  4409. Fy int32
  4410. Fx_root int32
  4411. Fy_root int32
  4412. Fstate uint32
  4413. Fkeycode uint32
  4414. Fsame_screen int32
  4415. }
  4416. type TXKeyPressedEvent = struct {
  4417. Ftype1 int32
  4418. Fserial uint32
  4419. Fsend_event int32
  4420. Fdisplay uintptr
  4421. Fwindow TWindow
  4422. Froot TWindow
  4423. Fsubwindow TWindow
  4424. Ftime TTime
  4425. Fx int32
  4426. Fy int32
  4427. Fx_root int32
  4428. Fy_root int32
  4429. Fstate uint32
  4430. Fkeycode uint32
  4431. Fsame_screen int32
  4432. }
  4433. type TXKeyReleasedEvent = struct {
  4434. Ftype1 int32
  4435. Fserial uint32
  4436. Fsend_event int32
  4437. Fdisplay uintptr
  4438. Fwindow TWindow
  4439. Froot TWindow
  4440. Fsubwindow TWindow
  4441. Ftime TTime
  4442. Fx int32
  4443. Fy int32
  4444. Fx_root int32
  4445. Fy_root int32
  4446. Fstate uint32
  4447. Fkeycode uint32
  4448. Fsame_screen int32
  4449. }
  4450. type TXButtonEvent = struct {
  4451. Ftype1 int32
  4452. Fserial uint32
  4453. Fsend_event int32
  4454. Fdisplay uintptr
  4455. Fwindow TWindow
  4456. Froot TWindow
  4457. Fsubwindow TWindow
  4458. Ftime TTime
  4459. Fx int32
  4460. Fy int32
  4461. Fx_root int32
  4462. Fy_root int32
  4463. Fstate uint32
  4464. Fbutton uint32
  4465. Fsame_screen int32
  4466. }
  4467. type TXButtonPressedEvent = struct {
  4468. Ftype1 int32
  4469. Fserial uint32
  4470. Fsend_event int32
  4471. Fdisplay uintptr
  4472. Fwindow TWindow
  4473. Froot TWindow
  4474. Fsubwindow TWindow
  4475. Ftime TTime
  4476. Fx int32
  4477. Fy int32
  4478. Fx_root int32
  4479. Fy_root int32
  4480. Fstate uint32
  4481. Fbutton uint32
  4482. Fsame_screen int32
  4483. }
  4484. type TXButtonReleasedEvent = struct {
  4485. Ftype1 int32
  4486. Fserial uint32
  4487. Fsend_event int32
  4488. Fdisplay uintptr
  4489. Fwindow TWindow
  4490. Froot TWindow
  4491. Fsubwindow TWindow
  4492. Ftime TTime
  4493. Fx int32
  4494. Fy int32
  4495. Fx_root int32
  4496. Fy_root int32
  4497. Fstate uint32
  4498. Fbutton uint32
  4499. Fsame_screen int32
  4500. }
  4501. type TXMotionEvent = struct {
  4502. Ftype1 int32
  4503. Fserial uint32
  4504. Fsend_event int32
  4505. Fdisplay uintptr
  4506. Fwindow TWindow
  4507. Froot TWindow
  4508. Fsubwindow TWindow
  4509. Ftime TTime
  4510. Fx int32
  4511. Fy int32
  4512. Fx_root int32
  4513. Fy_root int32
  4514. Fstate uint32
  4515. Fis_hint int8
  4516. Fsame_screen int32
  4517. }
  4518. type TXPointerMovedEvent = struct {
  4519. Ftype1 int32
  4520. Fserial uint32
  4521. Fsend_event int32
  4522. Fdisplay uintptr
  4523. Fwindow TWindow
  4524. Froot TWindow
  4525. Fsubwindow TWindow
  4526. Ftime TTime
  4527. Fx int32
  4528. Fy int32
  4529. Fx_root int32
  4530. Fy_root int32
  4531. Fstate uint32
  4532. Fis_hint int8
  4533. Fsame_screen int32
  4534. }
  4535. type TXCrossingEvent = struct {
  4536. Ftype1 int32
  4537. Fserial uint32
  4538. Fsend_event int32
  4539. Fdisplay uintptr
  4540. Fwindow TWindow
  4541. Froot TWindow
  4542. Fsubwindow TWindow
  4543. Ftime TTime
  4544. Fx int32
  4545. Fy int32
  4546. Fx_root int32
  4547. Fy_root int32
  4548. Fmode int32
  4549. Fdetail int32
  4550. Fsame_screen int32
  4551. Ffocus int32
  4552. Fstate uint32
  4553. }
  4554. type TXEnterWindowEvent = struct {
  4555. Ftype1 int32
  4556. Fserial uint32
  4557. Fsend_event int32
  4558. Fdisplay uintptr
  4559. Fwindow TWindow
  4560. Froot TWindow
  4561. Fsubwindow TWindow
  4562. Ftime TTime
  4563. Fx int32
  4564. Fy int32
  4565. Fx_root int32
  4566. Fy_root int32
  4567. Fmode int32
  4568. Fdetail int32
  4569. Fsame_screen int32
  4570. Ffocus int32
  4571. Fstate uint32
  4572. }
  4573. type TXLeaveWindowEvent = struct {
  4574. Ftype1 int32
  4575. Fserial uint32
  4576. Fsend_event int32
  4577. Fdisplay uintptr
  4578. Fwindow TWindow
  4579. Froot TWindow
  4580. Fsubwindow TWindow
  4581. Ftime TTime
  4582. Fx int32
  4583. Fy int32
  4584. Fx_root int32
  4585. Fy_root int32
  4586. Fmode int32
  4587. Fdetail int32
  4588. Fsame_screen int32
  4589. Ffocus int32
  4590. Fstate uint32
  4591. }
  4592. type TXFocusChangeEvent = struct {
  4593. Ftype1 int32
  4594. Fserial uint32
  4595. Fsend_event int32
  4596. Fdisplay uintptr
  4597. Fwindow TWindow
  4598. Fmode int32
  4599. Fdetail int32
  4600. }
  4601. type TXFocusInEvent = struct {
  4602. Ftype1 int32
  4603. Fserial uint32
  4604. Fsend_event int32
  4605. Fdisplay uintptr
  4606. Fwindow TWindow
  4607. Fmode int32
  4608. Fdetail int32
  4609. }
  4610. type TXFocusOutEvent = struct {
  4611. Ftype1 int32
  4612. Fserial uint32
  4613. Fsend_event int32
  4614. Fdisplay uintptr
  4615. Fwindow TWindow
  4616. Fmode int32
  4617. Fdetail int32
  4618. }
  4619. type TXKeymapEvent = struct {
  4620. Ftype1 int32
  4621. Fserial uint32
  4622. Fsend_event int32
  4623. Fdisplay uintptr
  4624. Fwindow TWindow
  4625. Fkey_vector [32]int8
  4626. }
  4627. type TXExposeEvent = struct {
  4628. Ftype1 int32
  4629. Fserial uint32
  4630. Fsend_event int32
  4631. Fdisplay uintptr
  4632. Fwindow TWindow
  4633. Fx int32
  4634. Fy int32
  4635. Fwidth int32
  4636. Fheight int32
  4637. Fcount int32
  4638. }
  4639. type TXGraphicsExposeEvent = struct {
  4640. Ftype1 int32
  4641. Fserial uint32
  4642. Fsend_event int32
  4643. Fdisplay uintptr
  4644. Fdrawable TDrawable
  4645. Fx int32
  4646. Fy int32
  4647. Fwidth int32
  4648. Fheight int32
  4649. Fcount int32
  4650. Fmajor_code int32
  4651. Fminor_code int32
  4652. }
  4653. type TXNoExposeEvent = struct {
  4654. Ftype1 int32
  4655. Fserial uint32
  4656. Fsend_event int32
  4657. Fdisplay uintptr
  4658. Fdrawable TDrawable
  4659. Fmajor_code int32
  4660. Fminor_code int32
  4661. }
  4662. type TXVisibilityEvent = struct {
  4663. Ftype1 int32
  4664. Fserial uint32
  4665. Fsend_event int32
  4666. Fdisplay uintptr
  4667. Fwindow TWindow
  4668. Fstate int32
  4669. }
  4670. type TXCreateWindowEvent = struct {
  4671. Ftype1 int32
  4672. Fserial uint32
  4673. Fsend_event int32
  4674. Fdisplay uintptr
  4675. Fparent TWindow
  4676. Fwindow TWindow
  4677. Fx int32
  4678. Fy int32
  4679. Fwidth int32
  4680. Fheight int32
  4681. Fborder_width int32
  4682. Foverride_redirect int32
  4683. }
  4684. type TXDestroyWindowEvent = struct {
  4685. Ftype1 int32
  4686. Fserial uint32
  4687. Fsend_event int32
  4688. Fdisplay uintptr
  4689. Fevent TWindow
  4690. Fwindow TWindow
  4691. }
  4692. type TXUnmapEvent = struct {
  4693. Ftype1 int32
  4694. Fserial uint32
  4695. Fsend_event int32
  4696. Fdisplay uintptr
  4697. Fevent TWindow
  4698. Fwindow TWindow
  4699. Ffrom_configure int32
  4700. }
  4701. type TXMapEvent = struct {
  4702. Ftype1 int32
  4703. Fserial uint32
  4704. Fsend_event int32
  4705. Fdisplay uintptr
  4706. Fevent TWindow
  4707. Fwindow TWindow
  4708. Foverride_redirect int32
  4709. }
  4710. type TXMapRequestEvent = struct {
  4711. Ftype1 int32
  4712. Fserial uint32
  4713. Fsend_event int32
  4714. Fdisplay uintptr
  4715. Fparent TWindow
  4716. Fwindow TWindow
  4717. }
  4718. type TXReparentEvent = struct {
  4719. Ftype1 int32
  4720. Fserial uint32
  4721. Fsend_event int32
  4722. Fdisplay uintptr
  4723. Fevent TWindow
  4724. Fwindow TWindow
  4725. Fparent TWindow
  4726. Fx int32
  4727. Fy int32
  4728. Foverride_redirect int32
  4729. }
  4730. type TXConfigureEvent = struct {
  4731. Ftype1 int32
  4732. Fserial uint32
  4733. Fsend_event int32
  4734. Fdisplay uintptr
  4735. Fevent TWindow
  4736. Fwindow TWindow
  4737. Fx int32
  4738. Fy int32
  4739. Fwidth int32
  4740. Fheight int32
  4741. Fborder_width int32
  4742. Fabove TWindow
  4743. Foverride_redirect int32
  4744. }
  4745. type TXGravityEvent = struct {
  4746. Ftype1 int32
  4747. Fserial uint32
  4748. Fsend_event int32
  4749. Fdisplay uintptr
  4750. Fevent TWindow
  4751. Fwindow TWindow
  4752. Fx int32
  4753. Fy int32
  4754. }
  4755. type TXResizeRequestEvent = struct {
  4756. Ftype1 int32
  4757. Fserial uint32
  4758. Fsend_event int32
  4759. Fdisplay uintptr
  4760. Fwindow TWindow
  4761. Fwidth int32
  4762. Fheight int32
  4763. }
  4764. type TXConfigureRequestEvent = struct {
  4765. Ftype1 int32
  4766. Fserial uint32
  4767. Fsend_event int32
  4768. Fdisplay uintptr
  4769. Fparent TWindow
  4770. Fwindow TWindow
  4771. Fx int32
  4772. Fy int32
  4773. Fwidth int32
  4774. Fheight int32
  4775. Fborder_width int32
  4776. Fabove TWindow
  4777. Fdetail int32
  4778. Fvalue_mask uint32
  4779. }
  4780. type TXCirculateEvent = struct {
  4781. Ftype1 int32
  4782. Fserial uint32
  4783. Fsend_event int32
  4784. Fdisplay uintptr
  4785. Fevent TWindow
  4786. Fwindow TWindow
  4787. Fplace int32
  4788. }
  4789. type TXCirculateRequestEvent = struct {
  4790. Ftype1 int32
  4791. Fserial uint32
  4792. Fsend_event int32
  4793. Fdisplay uintptr
  4794. Fparent TWindow
  4795. Fwindow TWindow
  4796. Fplace int32
  4797. }
  4798. type TXPropertyEvent = struct {
  4799. Ftype1 int32
  4800. Fserial uint32
  4801. Fsend_event int32
  4802. Fdisplay uintptr
  4803. Fwindow TWindow
  4804. Fatom TAtom
  4805. Ftime TTime
  4806. Fstate int32
  4807. }
  4808. type TXSelectionClearEvent = struct {
  4809. Ftype1 int32
  4810. Fserial uint32
  4811. Fsend_event int32
  4812. Fdisplay uintptr
  4813. Fwindow TWindow
  4814. Fselection TAtom
  4815. Ftime TTime
  4816. }
  4817. type TXSelectionRequestEvent = struct {
  4818. Ftype1 int32
  4819. Fserial uint32
  4820. Fsend_event int32
  4821. Fdisplay uintptr
  4822. Fowner TWindow
  4823. Frequestor TWindow
  4824. Fselection TAtom
  4825. Ftarget TAtom
  4826. Fproperty TAtom
  4827. Ftime TTime
  4828. }
  4829. type TXSelectionEvent = struct {
  4830. Ftype1 int32
  4831. Fserial uint32
  4832. Fsend_event int32
  4833. Fdisplay uintptr
  4834. Frequestor TWindow
  4835. Fselection TAtom
  4836. Ftarget TAtom
  4837. Fproperty TAtom
  4838. Ftime TTime
  4839. }
  4840. type TXColormapEvent = struct {
  4841. Ftype1 int32
  4842. Fserial uint32
  4843. Fsend_event int32
  4844. Fdisplay uintptr
  4845. Fwindow TWindow
  4846. Fcolormap TColormap
  4847. Fnew1 int32
  4848. Fstate int32
  4849. }
  4850. type TXClientMessageEvent = struct {
  4851. Ftype1 int32
  4852. Fserial uint32
  4853. Fsend_event int32
  4854. Fdisplay uintptr
  4855. Fwindow TWindow
  4856. Fmessage_type TAtom
  4857. Fformat int32
  4858. Fdata struct {
  4859. Fs [0][10]int16
  4860. Fl [0][5]int32
  4861. Fb [20]int8
  4862. }
  4863. }
  4864. type TXMappingEvent = struct {
  4865. Ftype1 int32
  4866. Fserial uint32
  4867. Fsend_event int32
  4868. Fdisplay uintptr
  4869. Fwindow TWindow
  4870. Frequest int32
  4871. Ffirst_keycode int32
  4872. Fcount int32
  4873. }
  4874. type TXErrorEvent = struct {
  4875. Ftype1 int32
  4876. Fdisplay uintptr
  4877. Fresourceid TXID
  4878. Fserial uint32
  4879. Ferror_code uint8
  4880. Frequest_code uint8
  4881. Fminor_code uint8
  4882. }
  4883. type TXAnyEvent = struct {
  4884. Ftype1 int32
  4885. Fserial uint32
  4886. Fsend_event int32
  4887. Fdisplay uintptr
  4888. Fwindow TWindow
  4889. }
  4890. type TXGenericEvent = struct {
  4891. Ftype1 int32
  4892. Fserial uint32
  4893. Fsend_event int32
  4894. Fdisplay uintptr
  4895. Fextension int32
  4896. Fevtype int32
  4897. }
  4898. type TXGenericEventCookie = struct {
  4899. Ftype1 int32
  4900. Fserial uint32
  4901. Fsend_event int32
  4902. Fdisplay uintptr
  4903. Fextension int32
  4904. Fevtype int32
  4905. Fcookie uint32
  4906. Fdata uintptr
  4907. }
  4908. type TXEvent = struct {
  4909. Fxany [0]TXAnyEvent
  4910. Fxkey [0]TXKeyEvent
  4911. Fxbutton [0]TXButtonEvent
  4912. Fxmotion [0]TXMotionEvent
  4913. Fxcrossing [0]TXCrossingEvent
  4914. Fxfocus [0]TXFocusChangeEvent
  4915. Fxexpose [0]TXExposeEvent
  4916. Fxgraphicsexpose [0]TXGraphicsExposeEvent
  4917. Fxnoexpose [0]TXNoExposeEvent
  4918. Fxvisibility [0]TXVisibilityEvent
  4919. Fxcreatewindow [0]TXCreateWindowEvent
  4920. Fxdestroywindow [0]TXDestroyWindowEvent
  4921. Fxunmap [0]TXUnmapEvent
  4922. Fxmap [0]TXMapEvent
  4923. Fxmaprequest [0]TXMapRequestEvent
  4924. Fxreparent [0]TXReparentEvent
  4925. Fxconfigure [0]TXConfigureEvent
  4926. Fxgravity [0]TXGravityEvent
  4927. Fxresizerequest [0]TXResizeRequestEvent
  4928. Fxconfigurerequest [0]TXConfigureRequestEvent
  4929. Fxcirculate [0]TXCirculateEvent
  4930. Fxcirculaterequest [0]TXCirculateRequestEvent
  4931. Fxproperty [0]TXPropertyEvent
  4932. Fxselectionclear [0]TXSelectionClearEvent
  4933. Fxselectionrequest [0]TXSelectionRequestEvent
  4934. Fxselection [0]TXSelectionEvent
  4935. Fxcolormap [0]TXColormapEvent
  4936. Fxclient [0]TXClientMessageEvent
  4937. Fxmapping [0]TXMappingEvent
  4938. Fxerror [0]TXErrorEvent
  4939. Fxkeymap [0]TXKeymapEvent
  4940. Fxgeneric [0]TXGenericEvent
  4941. Fxcookie [0]TXGenericEventCookie
  4942. Fpad [0][24]int32
  4943. Ftype1 int32
  4944. F__ccgo_pad35 [92]byte
  4945. }
  4946. type T_XEvent = TXEvent
  4947. type TXCharStruct = struct {
  4948. Flbearing int16
  4949. Frbearing int16
  4950. Fwidth int16
  4951. Fascent int16
  4952. Fdescent int16
  4953. Fattributes uint16
  4954. }
  4955. type TXFontProp = struct {
  4956. Fname TAtom
  4957. Fcard32 uint32
  4958. }
  4959. type TXFontStruct = struct {
  4960. Fext_data uintptr
  4961. Ffid TFont
  4962. Fdirection uint32
  4963. Fmin_char_or_byte2 uint32
  4964. Fmax_char_or_byte2 uint32
  4965. Fmin_byte1 uint32
  4966. Fmax_byte1 uint32
  4967. Fall_chars_exist int32
  4968. Fdefault_char uint32
  4969. Fn_properties int32
  4970. Fproperties uintptr
  4971. Fmin_bounds TXCharStruct
  4972. Fmax_bounds TXCharStruct
  4973. Fper_char uintptr
  4974. Fascent int32
  4975. Fdescent int32
  4976. }
  4977. type TXTextItem = struct {
  4978. Fchars uintptr
  4979. Fnchars int32
  4980. Fdelta int32
  4981. Ffont TFont
  4982. }
  4983. type TXChar2b = struct {
  4984. Fbyte1 uint8
  4985. Fbyte2 uint8
  4986. }
  4987. type TXTextItem16 = struct {
  4988. Fchars uintptr
  4989. Fnchars int32
  4990. Fdelta int32
  4991. Ffont TFont
  4992. }
  4993. type TXEDataObject = struct {
  4994. Fgc [0]TGC
  4995. Fvisual [0]uintptr
  4996. Fscreen [0]uintptr
  4997. Fpixmap_format [0]uintptr
  4998. Ffont [0]uintptr
  4999. Fdisplay uintptr
  5000. }
  5001. type TXFontSetExtents = struct {
  5002. Fmax_ink_extent TXRectangle
  5003. Fmax_logical_extent TXRectangle
  5004. }
  5005. type TXOM = uintptr
  5006. type TXOC = uintptr
  5007. type TXFontSet = uintptr
  5008. type TXmbTextItem = struct {
  5009. Fchars uintptr
  5010. Fnchars int32
  5011. Fdelta int32
  5012. Ffont_set TXFontSet
  5013. }
  5014. type TXwcTextItem = struct {
  5015. Fchars uintptr
  5016. Fnchars int32
  5017. Fdelta int32
  5018. Ffont_set TXFontSet
  5019. }
  5020. type TXOMCharSetList = struct {
  5021. Fcharset_count int32
  5022. Fcharset_list uintptr
  5023. }
  5024. type TXOrientation = int32
  5025. const _XOMOrientation_LTR_TTB = 0
  5026. const _XOMOrientation_RTL_TTB = 1
  5027. const _XOMOrientation_TTB_LTR = 2
  5028. const _XOMOrientation_TTB_RTL = 3
  5029. const _XOMOrientation_Context = 4
  5030. type TXOMOrientation = struct {
  5031. Fnum_orientation int32
  5032. Forientation uintptr
  5033. }
  5034. type TXOMFontInfo = struct {
  5035. Fnum_font int32
  5036. Ffont_struct_list uintptr
  5037. Ffont_name_list uintptr
  5038. }
  5039. type TXIM = uintptr
  5040. type TXIC = uintptr
  5041. type TXIMProc = uintptr
  5042. type TXICProc = uintptr
  5043. type TXIDProc = uintptr
  5044. type TXIMStyle = uint32
  5045. type TXIMStyles = struct {
  5046. Fcount_styles uint16
  5047. Fsupported_styles uintptr
  5048. }
  5049. type TXVaNestedList = uintptr
  5050. type TXIMCallback = struct {
  5051. Fclient_data TXPointer
  5052. Fcallback TXIMProc
  5053. }
  5054. type TXICCallback = struct {
  5055. Fclient_data TXPointer
  5056. Fcallback TXICProc
  5057. }
  5058. type TXIMFeedback = uint32
  5059. type TXIMText = struct {
  5060. Flength uint16
  5061. Ffeedback uintptr
  5062. Fencoding_is_wchar int32
  5063. Fstring1 struct {
  5064. Fwide_char [0]uintptr
  5065. Fmulti_byte uintptr
  5066. }
  5067. }
  5068. type T_XIMText = TXIMText
  5069. type TXIMPreeditState = uint32
  5070. type TXIMPreeditStateNotifyCallbackStruct = struct {
  5071. Fstate TXIMPreeditState
  5072. }
  5073. type T_XIMPreeditStateNotifyCallbackStruct = TXIMPreeditStateNotifyCallbackStruct
  5074. type TXIMResetState = uint32
  5075. type TXIMStringConversionFeedback = uint32
  5076. type TXIMStringConversionText = struct {
  5077. Flength uint16
  5078. Ffeedback uintptr
  5079. Fencoding_is_wchar int32
  5080. Fstring1 struct {
  5081. Fwcs [0]uintptr
  5082. Fmbs uintptr
  5083. }
  5084. }
  5085. type T_XIMStringConversionText = TXIMStringConversionText
  5086. type TXIMStringConversionPosition = uint16
  5087. type TXIMStringConversionType = uint16
  5088. type TXIMStringConversionOperation = uint16
  5089. type TXIMCaretDirection = int32
  5090. const _XIMForwardChar = 0
  5091. const _XIMBackwardChar = 1
  5092. const _XIMForwardWord = 2
  5093. const _XIMBackwardWord = 3
  5094. const _XIMCaretUp = 4
  5095. const _XIMCaretDown = 5
  5096. const _XIMNextLine = 6
  5097. const _XIMPreviousLine = 7
  5098. const _XIMLineStart = 8
  5099. const _XIMLineEnd = 9
  5100. const _XIMAbsolutePosition = 10
  5101. const _XIMDontChange = 11
  5102. type TXIMStringConversionCallbackStruct = struct {
  5103. Fposition TXIMStringConversionPosition
  5104. Fdirection TXIMCaretDirection
  5105. Foperation TXIMStringConversionOperation
  5106. Ffactor uint16
  5107. Ftext uintptr
  5108. }
  5109. type T_XIMStringConversionCallbackStruct = TXIMStringConversionCallbackStruct
  5110. type TXIMPreeditDrawCallbackStruct = struct {
  5111. Fcaret int32
  5112. Fchg_first int32
  5113. Fchg_length int32
  5114. Ftext uintptr
  5115. }
  5116. type T_XIMPreeditDrawCallbackStruct = TXIMPreeditDrawCallbackStruct
  5117. type TXIMCaretStyle = int32
  5118. const _XIMIsInvisible = 0
  5119. const _XIMIsPrimary = 1
  5120. const _XIMIsSecondary = 2
  5121. type TXIMPreeditCaretCallbackStruct = struct {
  5122. Fposition int32
  5123. Fdirection TXIMCaretDirection
  5124. Fstyle TXIMCaretStyle
  5125. }
  5126. type T_XIMPreeditCaretCallbackStruct = TXIMPreeditCaretCallbackStruct
  5127. type TXIMStatusDataType = int32
  5128. const _XIMTextType = 0
  5129. const _XIMBitmapType = 1
  5130. type TXIMStatusDrawCallbackStruct = struct {
  5131. Ftype1 TXIMStatusDataType
  5132. Fdata struct {
  5133. Fbitmap [0]TPixmap
  5134. Ftext uintptr
  5135. }
  5136. }
  5137. type T_XIMStatusDrawCallbackStruct = TXIMStatusDrawCallbackStruct
  5138. type TXIMHotKeyTrigger = struct {
  5139. Fkeysym TKeySym
  5140. Fmodifier int32
  5141. Fmodifier_mask int32
  5142. }
  5143. type T_XIMHotKeyTrigger = TXIMHotKeyTrigger
  5144. type TXIMHotKeyTriggers = struct {
  5145. Fnum_hot_key int32
  5146. Fkey uintptr
  5147. }
  5148. type T_XIMHotKeyTriggers = TXIMHotKeyTriggers
  5149. type TXIMHotKeyState = uint32
  5150. type TXIMValuesList = struct {
  5151. Fcount_values uint16
  5152. Fsupported_values uintptr
  5153. }
  5154. type TXErrorHandler = uintptr
  5155. type TXIOErrorHandler = uintptr
  5156. type TXIOErrorExitHandler = uintptr
  5157. type TXConnectionWatchProc = uintptr
  5158. type TXSizeHints = struct {
  5159. Fflags int32
  5160. Fx int32
  5161. Fy int32
  5162. Fwidth int32
  5163. Fheight int32
  5164. Fmin_width int32
  5165. Fmin_height int32
  5166. Fmax_width int32
  5167. Fmax_height int32
  5168. Fwidth_inc int32
  5169. Fheight_inc int32
  5170. Fmin_aspect struct {
  5171. Fx int32
  5172. Fy int32
  5173. }
  5174. Fmax_aspect struct {
  5175. Fx int32
  5176. Fy int32
  5177. }
  5178. Fbase_width int32
  5179. Fbase_height int32
  5180. Fwin_gravity int32
  5181. }
  5182. type TXWMHints = struct {
  5183. Fflags int32
  5184. Finput int32
  5185. Finitial_state int32
  5186. Ficon_pixmap TPixmap
  5187. Ficon_window TWindow
  5188. Ficon_x int32
  5189. Ficon_y int32
  5190. Ficon_mask TPixmap
  5191. Fwindow_group TXID
  5192. }
  5193. type TXTextProperty = struct {
  5194. Fvalue uintptr
  5195. Fencoding TAtom
  5196. Fformat int32
  5197. Fnitems uint32
  5198. }
  5199. type TXICCEncodingStyle = int32
  5200. const _XStringStyle = 0
  5201. const _XCompoundTextStyle = 1
  5202. const _XTextStyle = 2
  5203. const _XStdICCTextStyle = 3
  5204. const _XUTF8StringStyle = 4
  5205. type TXIconSize = struct {
  5206. Fmin_width int32
  5207. Fmin_height int32
  5208. Fmax_width int32
  5209. Fmax_height int32
  5210. Fwidth_inc int32
  5211. Fheight_inc int32
  5212. }
  5213. type TXClassHint = struct {
  5214. Fres_name uintptr
  5215. Fres_class uintptr
  5216. }
  5217. type TXComposeStatus = struct {
  5218. Fcompose_ptr TXPointer
  5219. Fchars_matched int32
  5220. }
  5221. type T_XComposeStatus = TXComposeStatus
  5222. type TRegion = uintptr
  5223. type TXVisualInfo = struct {
  5224. Fvisual uintptr
  5225. Fvisualid TVisualID
  5226. Fscreen int32
  5227. Fdepth int32
  5228. Fclass int32
  5229. Fred_mask uint32
  5230. Fgreen_mask uint32
  5231. Fblue_mask uint32
  5232. Fcolormap_size int32
  5233. Fbits_per_rgb int32
  5234. }
  5235. type TXStandardColormap = struct {
  5236. Fcolormap TColormap
  5237. Fred_max uint32
  5238. Fred_mult uint32
  5239. Fgreen_max uint32
  5240. Fgreen_mult uint32
  5241. Fblue_max uint32
  5242. Fblue_mult uint32
  5243. Fbase_pixel uint32
  5244. Fvisualid TVisualID
  5245. Fkillid TXID
  5246. }
  5247. type TXContext = int32
  5248. type TINT32 = int32
  5249. type TINT16 = int16
  5250. type TINT8 = int8
  5251. type TCARD64 = uint64
  5252. type TCARD32 = uint32
  5253. type TCARD16 = uint16
  5254. type TCARD8 = uint8
  5255. type TBITS32 = uint32
  5256. type TBITS16 = uint16
  5257. type TBYTE = uint8
  5258. type TBOOL = uint8
  5259. type Tuintptr_t = uint32
  5260. type Tintptr_t = int32
  5261. type Tintmax_t = int64
  5262. type Tuint8_t = uint8
  5263. type Tuintmax_t = uint64
  5264. type Tint_fast8_t = int8
  5265. type Tint_fast64_t = int64
  5266. type Tint_least8_t = int8
  5267. type Tint_least16_t = int16
  5268. type Tint_least32_t = int32
  5269. type Tint_least64_t = int64
  5270. type Tuint_fast8_t = uint8
  5271. type Tuint_fast64_t = uint64
  5272. type Tuint_least8_t = uint8
  5273. type Tuint_least16_t = uint16
  5274. type Tuint_least32_t = uint32
  5275. type Tuint_least64_t = uint64
  5276. type Tint_fast16_t = int32
  5277. type Tint_fast32_t = int32
  5278. type Tuint_fast16_t = uint32
  5279. type Tuint_fast32_t = uint32
  5280. type TxSegment = struct {
  5281. Fx1 TINT16
  5282. Fy1 TINT16
  5283. Fx2 TINT16
  5284. Fy2 TINT16
  5285. }
  5286. type T_xSegment = TxSegment
  5287. type TxPoint = struct {
  5288. Fx TINT16
  5289. Fy TINT16
  5290. }
  5291. type T_xPoint = TxPoint
  5292. type TxRectangle = struct {
  5293. Fx TINT16
  5294. Fy TINT16
  5295. Fwidth TCARD16
  5296. Fheight TCARD16
  5297. }
  5298. type T_xRectangle = TxRectangle
  5299. type TxArc = struct {
  5300. Fx TINT16
  5301. Fy TINT16
  5302. Fwidth TCARD16
  5303. Fheight TCARD16
  5304. Fangle1 TINT16
  5305. Fangle2 TINT16
  5306. }
  5307. type T_xArc = TxArc
  5308. type TKeyButMask = uint16
  5309. type TxConnClientPrefix = struct {
  5310. FbyteOrder TCARD8
  5311. Fpad TBYTE
  5312. FmajorVersion TCARD16
  5313. FminorVersion TCARD16
  5314. FnbytesAuthProto TCARD16
  5315. FnbytesAuthString TCARD16
  5316. Fpad2 TCARD16
  5317. }
  5318. type TxConnSetupPrefix = struct {
  5319. Fsuccess TCARD8
  5320. FlengthReason TBYTE
  5321. FmajorVersion TCARD16
  5322. FminorVersion TCARD16
  5323. Flength TCARD16
  5324. }
  5325. type TxConnSetup = struct {
  5326. Frelease TCARD32
  5327. FridBase TCARD32
  5328. FridMask TCARD32
  5329. FmotionBufferSize TCARD32
  5330. FnbytesVendor TCARD16
  5331. FmaxRequestSize TCARD16
  5332. FnumRoots TCARD8
  5333. FnumFormats TCARD8
  5334. FimageByteOrder TCARD8
  5335. FbitmapBitOrder TCARD8
  5336. FbitmapScanlineUnit TCARD8
  5337. FbitmapScanlinePad TCARD8
  5338. FminKeyCode TCARD8
  5339. FmaxKeyCode TCARD8
  5340. Fpad2 TCARD32
  5341. }
  5342. type TxPixmapFormat = struct {
  5343. Fdepth TCARD8
  5344. FbitsPerPixel TCARD8
  5345. FscanLinePad TCARD8
  5346. Fpad1 TCARD8
  5347. Fpad2 TCARD32
  5348. }
  5349. type TxDepth = struct {
  5350. Fdepth TCARD8
  5351. Fpad1 TCARD8
  5352. FnVisuals TCARD16
  5353. Fpad2 TCARD32
  5354. }
  5355. type TxVisualType = struct {
  5356. FvisualID TCARD32
  5357. Fclass TCARD8
  5358. FbitsPerRGB TCARD8
  5359. FcolormapEntries TCARD16
  5360. FredMask TCARD32
  5361. FgreenMask TCARD32
  5362. FblueMask TCARD32
  5363. Fpad TCARD32
  5364. }
  5365. type TxWindowRoot = struct {
  5366. FwindowId TCARD32
  5367. FdefaultColormap TCARD32
  5368. FwhitePixel TCARD32
  5369. FblackPixel TCARD32
  5370. FcurrentInputMask TCARD32
  5371. FpixWidth TCARD16
  5372. FpixHeight TCARD16
  5373. FmmWidth TCARD16
  5374. FmmHeight TCARD16
  5375. FminInstalledMaps TCARD16
  5376. FmaxInstalledMaps TCARD16
  5377. FrootVisualID TCARD32
  5378. FbackingStore TCARD8
  5379. FsaveUnders TBOOL
  5380. FrootDepth TCARD8
  5381. FnDepths TCARD8
  5382. }
  5383. type TxTimecoord = struct {
  5384. Ftime TCARD32
  5385. Fx TINT16
  5386. Fy TINT16
  5387. }
  5388. type TxHostEntry = struct {
  5389. Ffamily TCARD8
  5390. Fpad TBYTE
  5391. Flength TCARD16
  5392. }
  5393. type TxCharInfo = struct {
  5394. FleftSideBearing TINT16
  5395. FrightSideBearing TINT16
  5396. FcharacterWidth TINT16
  5397. Fascent TINT16
  5398. Fdescent TINT16
  5399. Fattributes TCARD16
  5400. }
  5401. type TxFontProp = struct {
  5402. Fname TCARD32
  5403. Fvalue TCARD32
  5404. }
  5405. type TxTextElt = struct {
  5406. Flen1 TCARD8
  5407. Fdelta TINT8
  5408. }
  5409. type TxColorItem = struct {
  5410. Fpixel TCARD32
  5411. Fred TCARD16
  5412. Fgreen TCARD16
  5413. Fblue TCARD16
  5414. Fflags TCARD8
  5415. Fpad TCARD8
  5416. }
  5417. type Txrgb = struct {
  5418. Fred TCARD16
  5419. Fgreen TCARD16
  5420. Fblue TCARD16
  5421. Fpad TCARD16
  5422. }
  5423. type TKEYCODE = uint8
  5424. type TxGenericReply = struct {
  5425. Ftype1 TBYTE
  5426. Fdata1 TBYTE
  5427. FsequenceNumber TCARD16
  5428. Flength TCARD32
  5429. Fdata00 TCARD32
  5430. Fdata01 TCARD32
  5431. Fdata02 TCARD32
  5432. Fdata03 TCARD32
  5433. Fdata04 TCARD32
  5434. Fdata05 TCARD32
  5435. }
  5436. type TxGetWindowAttributesReply = struct {
  5437. Ftype1 TBYTE
  5438. FbackingStore TCARD8
  5439. FsequenceNumber TCARD16
  5440. Flength TCARD32
  5441. FvisualID TCARD32
  5442. Fclass TCARD16
  5443. FbitGravity TCARD8
  5444. FwinGravity TCARD8
  5445. FbackingBitPlanes TCARD32
  5446. FbackingPixel TCARD32
  5447. FsaveUnder TBOOL
  5448. FmapInstalled TBOOL
  5449. FmapState TCARD8
  5450. Foverride TBOOL
  5451. Fcolormap TCARD32
  5452. FallEventMasks TCARD32
  5453. FyourEventMask TCARD32
  5454. FdoNotPropagateMask TCARD16
  5455. Fpad TCARD16
  5456. }
  5457. type TxGetGeometryReply = struct {
  5458. Ftype1 TBYTE
  5459. Fdepth TCARD8
  5460. FsequenceNumber TCARD16
  5461. Flength TCARD32
  5462. Froot TCARD32
  5463. Fx TINT16
  5464. Fy TINT16
  5465. Fwidth TCARD16
  5466. Fheight TCARD16
  5467. FborderWidth TCARD16
  5468. Fpad1 TCARD16
  5469. Fpad2 TCARD32
  5470. Fpad3 TCARD32
  5471. }
  5472. type TxQueryTreeReply = struct {
  5473. Ftype1 TBYTE
  5474. Fpad1 TBYTE
  5475. FsequenceNumber TCARD16
  5476. Flength TCARD32
  5477. Froot TCARD32
  5478. Fparent TCARD32
  5479. FnChildren TCARD16
  5480. Fpad2 TCARD16
  5481. Fpad3 TCARD32
  5482. Fpad4 TCARD32
  5483. Fpad5 TCARD32
  5484. }
  5485. type TxInternAtomReply = struct {
  5486. Ftype1 TBYTE
  5487. Fpad1 TBYTE
  5488. FsequenceNumber TCARD16
  5489. Flength TCARD32
  5490. Fatom TCARD32
  5491. Fpad2 TCARD32
  5492. Fpad3 TCARD32
  5493. Fpad4 TCARD32
  5494. Fpad5 TCARD32
  5495. Fpad6 TCARD32
  5496. }
  5497. type TxGetAtomNameReply = struct {
  5498. Ftype1 TBYTE
  5499. Fpad1 TBYTE
  5500. FsequenceNumber TCARD16
  5501. Flength TCARD32
  5502. FnameLength TCARD16
  5503. Fpad2 TCARD16
  5504. Fpad3 TCARD32
  5505. Fpad4 TCARD32
  5506. Fpad5 TCARD32
  5507. Fpad6 TCARD32
  5508. Fpad7 TCARD32
  5509. }
  5510. type TxGetPropertyReply = struct {
  5511. Ftype1 TBYTE
  5512. Fformat TCARD8
  5513. FsequenceNumber TCARD16
  5514. Flength TCARD32
  5515. FpropertyType TCARD32
  5516. FbytesAfter TCARD32
  5517. FnItems TCARD32
  5518. Fpad1 TCARD32
  5519. Fpad2 TCARD32
  5520. Fpad3 TCARD32
  5521. }
  5522. type TxListPropertiesReply = struct {
  5523. Ftype1 TBYTE
  5524. Fpad1 TBYTE
  5525. FsequenceNumber TCARD16
  5526. Flength TCARD32
  5527. FnProperties TCARD16
  5528. Fpad2 TCARD16
  5529. Fpad3 TCARD32
  5530. Fpad4 TCARD32
  5531. Fpad5 TCARD32
  5532. Fpad6 TCARD32
  5533. Fpad7 TCARD32
  5534. }
  5535. type TxGetSelectionOwnerReply = struct {
  5536. Ftype1 TBYTE
  5537. Fpad1 TBYTE
  5538. FsequenceNumber TCARD16
  5539. Flength TCARD32
  5540. Fowner TCARD32
  5541. Fpad2 TCARD32
  5542. Fpad3 TCARD32
  5543. Fpad4 TCARD32
  5544. Fpad5 TCARD32
  5545. Fpad6 TCARD32
  5546. }
  5547. type TxGrabPointerReply = struct {
  5548. Ftype1 TBYTE
  5549. Fstatus TBYTE
  5550. FsequenceNumber TCARD16
  5551. Flength TCARD32
  5552. Fpad1 TCARD32
  5553. Fpad2 TCARD32
  5554. Fpad3 TCARD32
  5555. Fpad4 TCARD32
  5556. Fpad5 TCARD32
  5557. Fpad6 TCARD32
  5558. }
  5559. type TxGrabKeyboardReply = struct {
  5560. Ftype1 TBYTE
  5561. Fstatus TBYTE
  5562. FsequenceNumber TCARD16
  5563. Flength TCARD32
  5564. Fpad1 TCARD32
  5565. Fpad2 TCARD32
  5566. Fpad3 TCARD32
  5567. Fpad4 TCARD32
  5568. Fpad5 TCARD32
  5569. Fpad6 TCARD32
  5570. }
  5571. type TxQueryPointerReply = struct {
  5572. Ftype1 TBYTE
  5573. FsameScreen TBOOL
  5574. FsequenceNumber TCARD16
  5575. Flength TCARD32
  5576. Froot TCARD32
  5577. Fchild TCARD32
  5578. FrootX TINT16
  5579. FrootY TINT16
  5580. FwinX TINT16
  5581. FwinY TINT16
  5582. Fmask TCARD16
  5583. Fpad1 TCARD16
  5584. Fpad TCARD32
  5585. }
  5586. type TxGetMotionEventsReply = struct {
  5587. Ftype1 TBYTE
  5588. Fpad1 TBYTE
  5589. FsequenceNumber TCARD16
  5590. Flength TCARD32
  5591. FnEvents TCARD32
  5592. Fpad2 TCARD32
  5593. Fpad3 TCARD32
  5594. Fpad4 TCARD32
  5595. Fpad5 TCARD32
  5596. Fpad6 TCARD32
  5597. }
  5598. type TxTranslateCoordsReply = struct {
  5599. Ftype1 TBYTE
  5600. FsameScreen TBOOL
  5601. FsequenceNumber TCARD16
  5602. Flength TCARD32
  5603. Fchild TCARD32
  5604. FdstX TINT16
  5605. FdstY TINT16
  5606. Fpad2 TCARD32
  5607. Fpad3 TCARD32
  5608. Fpad4 TCARD32
  5609. Fpad5 TCARD32
  5610. }
  5611. type TxGetInputFocusReply = struct {
  5612. Ftype1 TBYTE
  5613. FrevertTo TCARD8
  5614. FsequenceNumber TCARD16
  5615. Flength TCARD32
  5616. Ffocus TCARD32
  5617. Fpad1 TCARD32
  5618. Fpad2 TCARD32
  5619. Fpad3 TCARD32
  5620. Fpad4 TCARD32
  5621. Fpad5 TCARD32
  5622. }
  5623. type TxQueryKeymapReply = struct {
  5624. Ftype1 TBYTE
  5625. Fpad1 TBYTE
  5626. FsequenceNumber TCARD16
  5627. Flength TCARD32
  5628. Fmap1 [32]TBYTE
  5629. }
  5630. type TxQueryFontReply = struct {
  5631. Ftype1 TBYTE
  5632. Fpad1 TBYTE
  5633. FsequenceNumber TCARD16
  5634. Flength TCARD32
  5635. FminBounds TxCharInfo
  5636. Fwalign1 TCARD32
  5637. FmaxBounds TxCharInfo
  5638. Fwalign2 TCARD32
  5639. FminCharOrByte2 TCARD16
  5640. FmaxCharOrByte2 TCARD16
  5641. FdefaultChar TCARD16
  5642. FnFontProps TCARD16
  5643. FdrawDirection TCARD8
  5644. FminByte1 TCARD8
  5645. FmaxByte1 TCARD8
  5646. FallCharsExist TBOOL
  5647. FfontAscent TINT16
  5648. FfontDescent TINT16
  5649. FnCharInfos TCARD32
  5650. }
  5651. type T_xQueryFontReply = TxQueryFontReply
  5652. type TxQueryTextExtentsReply = struct {
  5653. Ftype1 TBYTE
  5654. FdrawDirection TCARD8
  5655. FsequenceNumber TCARD16
  5656. Flength TCARD32
  5657. FfontAscent TINT16
  5658. FfontDescent TINT16
  5659. FoverallAscent TINT16
  5660. FoverallDescent TINT16
  5661. FoverallWidth TINT32
  5662. FoverallLeft TINT32
  5663. FoverallRight TINT32
  5664. Fpad TCARD32
  5665. }
  5666. type TxListFontsReply = struct {
  5667. Ftype1 TBYTE
  5668. Fpad1 TBYTE
  5669. FsequenceNumber TCARD16
  5670. Flength TCARD32
  5671. FnFonts TCARD16
  5672. Fpad2 TCARD16
  5673. Fpad3 TCARD32
  5674. Fpad4 TCARD32
  5675. Fpad5 TCARD32
  5676. Fpad6 TCARD32
  5677. Fpad7 TCARD32
  5678. }
  5679. type TxListFontsWithInfoReply = struct {
  5680. Ftype1 TBYTE
  5681. FnameLength TCARD8
  5682. FsequenceNumber TCARD16
  5683. Flength TCARD32
  5684. FminBounds TxCharInfo
  5685. Fwalign1 TCARD32
  5686. FmaxBounds TxCharInfo
  5687. Fwalign2 TCARD32
  5688. FminCharOrByte2 TCARD16
  5689. FmaxCharOrByte2 TCARD16
  5690. FdefaultChar TCARD16
  5691. FnFontProps TCARD16
  5692. FdrawDirection TCARD8
  5693. FminByte1 TCARD8
  5694. FmaxByte1 TCARD8
  5695. FallCharsExist TBOOL
  5696. FfontAscent TINT16
  5697. FfontDescent TINT16
  5698. FnReplies TCARD32
  5699. }
  5700. type TxGetFontPathReply = struct {
  5701. Ftype1 TBYTE
  5702. Fpad1 TBYTE
  5703. FsequenceNumber TCARD16
  5704. Flength TCARD32
  5705. FnPaths TCARD16
  5706. Fpad2 TCARD16
  5707. Fpad3 TCARD32
  5708. Fpad4 TCARD32
  5709. Fpad5 TCARD32
  5710. Fpad6 TCARD32
  5711. Fpad7 TCARD32
  5712. }
  5713. type TxGetImageReply = struct {
  5714. Ftype1 TBYTE
  5715. Fdepth TCARD8
  5716. FsequenceNumber TCARD16
  5717. Flength TCARD32
  5718. Fvisual TCARD32
  5719. Fpad3 TCARD32
  5720. Fpad4 TCARD32
  5721. Fpad5 TCARD32
  5722. Fpad6 TCARD32
  5723. Fpad7 TCARD32
  5724. }
  5725. type TxListInstalledColormapsReply = struct {
  5726. Ftype1 TBYTE
  5727. Fpad1 TBYTE
  5728. FsequenceNumber TCARD16
  5729. Flength TCARD32
  5730. FnColormaps TCARD16
  5731. Fpad2 TCARD16
  5732. Fpad3 TCARD32
  5733. Fpad4 TCARD32
  5734. Fpad5 TCARD32
  5735. Fpad6 TCARD32
  5736. Fpad7 TCARD32
  5737. }
  5738. type TxAllocColorReply = struct {
  5739. Ftype1 TBYTE
  5740. Fpad1 TBYTE
  5741. FsequenceNumber TCARD16
  5742. Flength TCARD32
  5743. Fred TCARD16
  5744. Fgreen TCARD16
  5745. Fblue TCARD16
  5746. Fpad2 TCARD16
  5747. Fpixel TCARD32
  5748. Fpad3 TCARD32
  5749. Fpad4 TCARD32
  5750. Fpad5 TCARD32
  5751. }
  5752. type TxAllocNamedColorReply = struct {
  5753. Ftype1 TBYTE
  5754. Fpad1 TBYTE
  5755. FsequenceNumber TCARD16
  5756. Flength TCARD32
  5757. Fpixel TCARD32
  5758. FexactRed TCARD16
  5759. FexactGreen TCARD16
  5760. FexactBlue TCARD16
  5761. FscreenRed TCARD16
  5762. FscreenGreen TCARD16
  5763. FscreenBlue TCARD16
  5764. Fpad2 TCARD32
  5765. Fpad3 TCARD32
  5766. }
  5767. type TxAllocColorCellsReply = struct {
  5768. Ftype1 TBYTE
  5769. Fpad1 TBYTE
  5770. FsequenceNumber TCARD16
  5771. Flength TCARD32
  5772. FnPixels TCARD16
  5773. FnMasks TCARD16
  5774. Fpad3 TCARD32
  5775. Fpad4 TCARD32
  5776. Fpad5 TCARD32
  5777. Fpad6 TCARD32
  5778. Fpad7 TCARD32
  5779. }
  5780. type TxAllocColorPlanesReply = struct {
  5781. Ftype1 TBYTE
  5782. Fpad1 TBYTE
  5783. FsequenceNumber TCARD16
  5784. Flength TCARD32
  5785. FnPixels TCARD16
  5786. Fpad2 TCARD16
  5787. FredMask TCARD32
  5788. FgreenMask TCARD32
  5789. FblueMask TCARD32
  5790. Fpad3 TCARD32
  5791. Fpad4 TCARD32
  5792. }
  5793. type TxQueryColorsReply = struct {
  5794. Ftype1 TBYTE
  5795. Fpad1 TBYTE
  5796. FsequenceNumber TCARD16
  5797. Flength TCARD32
  5798. FnColors TCARD16
  5799. Fpad2 TCARD16
  5800. Fpad3 TCARD32
  5801. Fpad4 TCARD32
  5802. Fpad5 TCARD32
  5803. Fpad6 TCARD32
  5804. Fpad7 TCARD32
  5805. }
  5806. type TxLookupColorReply = struct {
  5807. Ftype1 TBYTE
  5808. Fpad1 TBYTE
  5809. FsequenceNumber TCARD16
  5810. Flength TCARD32
  5811. FexactRed TCARD16
  5812. FexactGreen TCARD16
  5813. FexactBlue TCARD16
  5814. FscreenRed TCARD16
  5815. FscreenGreen TCARD16
  5816. FscreenBlue TCARD16
  5817. Fpad3 TCARD32
  5818. Fpad4 TCARD32
  5819. Fpad5 TCARD32
  5820. }
  5821. type TxQueryBestSizeReply = struct {
  5822. Ftype1 TBYTE
  5823. Fpad1 TBYTE
  5824. FsequenceNumber TCARD16
  5825. Flength TCARD32
  5826. Fwidth TCARD16
  5827. Fheight TCARD16
  5828. Fpad3 TCARD32
  5829. Fpad4 TCARD32
  5830. Fpad5 TCARD32
  5831. Fpad6 TCARD32
  5832. Fpad7 TCARD32
  5833. }
  5834. type TxQueryExtensionReply = struct {
  5835. Ftype1 TBYTE
  5836. Fpad1 TBYTE
  5837. FsequenceNumber TCARD16
  5838. Flength TCARD32
  5839. Fpresent TBOOL
  5840. Fmajor_opcode TCARD8
  5841. Ffirst_event TCARD8
  5842. Ffirst_error TCARD8
  5843. Fpad3 TCARD32
  5844. Fpad4 TCARD32
  5845. Fpad5 TCARD32
  5846. Fpad6 TCARD32
  5847. Fpad7 TCARD32
  5848. }
  5849. type TxListExtensionsReply = struct {
  5850. Ftype1 TBYTE
  5851. FnExtensions TCARD8
  5852. FsequenceNumber TCARD16
  5853. Flength TCARD32
  5854. Fpad2 TCARD32
  5855. Fpad3 TCARD32
  5856. Fpad4 TCARD32
  5857. Fpad5 TCARD32
  5858. Fpad6 TCARD32
  5859. Fpad7 TCARD32
  5860. }
  5861. type TxSetMappingReply = struct {
  5862. Ftype1 TBYTE
  5863. Fsuccess TCARD8
  5864. FsequenceNumber TCARD16
  5865. Flength TCARD32
  5866. Fpad2 TCARD32
  5867. Fpad3 TCARD32
  5868. Fpad4 TCARD32
  5869. Fpad5 TCARD32
  5870. Fpad6 TCARD32
  5871. Fpad7 TCARD32
  5872. }
  5873. type TxSetPointerMappingReply = struct {
  5874. Ftype1 TBYTE
  5875. Fsuccess TCARD8
  5876. FsequenceNumber TCARD16
  5877. Flength TCARD32
  5878. Fpad2 TCARD32
  5879. Fpad3 TCARD32
  5880. Fpad4 TCARD32
  5881. Fpad5 TCARD32
  5882. Fpad6 TCARD32
  5883. Fpad7 TCARD32
  5884. }
  5885. type TxSetModifierMappingReply = struct {
  5886. Ftype1 TBYTE
  5887. Fsuccess TCARD8
  5888. FsequenceNumber TCARD16
  5889. Flength TCARD32
  5890. Fpad2 TCARD32
  5891. Fpad3 TCARD32
  5892. Fpad4 TCARD32
  5893. Fpad5 TCARD32
  5894. Fpad6 TCARD32
  5895. Fpad7 TCARD32
  5896. }
  5897. type TxGetPointerMappingReply = struct {
  5898. Ftype1 TBYTE
  5899. FnElts TCARD8
  5900. FsequenceNumber TCARD16
  5901. Flength TCARD32
  5902. Fpad2 TCARD32
  5903. Fpad3 TCARD32
  5904. Fpad4 TCARD32
  5905. Fpad5 TCARD32
  5906. Fpad6 TCARD32
  5907. Fpad7 TCARD32
  5908. }
  5909. type TxGetKeyboardMappingReply = struct {
  5910. Ftype1 TBYTE
  5911. FkeySymsPerKeyCode TCARD8
  5912. FsequenceNumber TCARD16
  5913. Flength TCARD32
  5914. Fpad2 TCARD32
  5915. Fpad3 TCARD32
  5916. Fpad4 TCARD32
  5917. Fpad5 TCARD32
  5918. Fpad6 TCARD32
  5919. Fpad7 TCARD32
  5920. }
  5921. type TxGetModifierMappingReply = struct {
  5922. Ftype1 TBYTE
  5923. FnumKeyPerModifier TCARD8
  5924. FsequenceNumber TCARD16
  5925. Flength TCARD32
  5926. Fpad1 TCARD32
  5927. Fpad2 TCARD32
  5928. Fpad3 TCARD32
  5929. Fpad4 TCARD32
  5930. Fpad5 TCARD32
  5931. Fpad6 TCARD32
  5932. }
  5933. type TxGetKeyboardControlReply = struct {
  5934. Ftype1 TBYTE
  5935. FglobalAutoRepeat TBOOL
  5936. FsequenceNumber TCARD16
  5937. Flength TCARD32
  5938. FledMask TCARD32
  5939. FkeyClickPercent TCARD8
  5940. FbellPercent TCARD8
  5941. FbellPitch TCARD16
  5942. FbellDuration TCARD16
  5943. Fpad TCARD16
  5944. Fmap1 [32]TBYTE
  5945. }
  5946. type TxGetPointerControlReply = struct {
  5947. Ftype1 TBYTE
  5948. Fpad1 TBYTE
  5949. FsequenceNumber TCARD16
  5950. Flength TCARD32
  5951. FaccelNumerator TCARD16
  5952. FaccelDenominator TCARD16
  5953. Fthreshold TCARD16
  5954. Fpad2 TCARD16
  5955. Fpad3 TCARD32
  5956. Fpad4 TCARD32
  5957. Fpad5 TCARD32
  5958. Fpad6 TCARD32
  5959. }
  5960. type TxGetScreenSaverReply = struct {
  5961. Ftype1 TBYTE
  5962. Fpad1 TBYTE
  5963. FsequenceNumber TCARD16
  5964. Flength TCARD32
  5965. Ftimeout TCARD16
  5966. Finterval TCARD16
  5967. FpreferBlanking TBOOL
  5968. FallowExposures TBOOL
  5969. Fpad2 TCARD16
  5970. Fpad3 TCARD32
  5971. Fpad4 TCARD32
  5972. Fpad5 TCARD32
  5973. Fpad6 TCARD32
  5974. }
  5975. type TxListHostsReply = struct {
  5976. Ftype1 TBYTE
  5977. Fenabled TBOOL
  5978. FsequenceNumber TCARD16
  5979. Flength TCARD32
  5980. FnHosts TCARD16
  5981. Fpad1 TCARD16
  5982. Fpad3 TCARD32
  5983. Fpad4 TCARD32
  5984. Fpad5 TCARD32
  5985. Fpad6 TCARD32
  5986. Fpad7 TCARD32
  5987. }
  5988. type TxError = struct {
  5989. Ftype1 TBYTE
  5990. FerrorCode TBYTE
  5991. FsequenceNumber TCARD16
  5992. FresourceID TCARD32
  5993. FminorCode TCARD16
  5994. FmajorCode TCARD8
  5995. Fpad1 TBYTE
  5996. Fpad3 TCARD32
  5997. Fpad4 TCARD32
  5998. Fpad5 TCARD32
  5999. Fpad6 TCARD32
  6000. Fpad7 TCARD32
  6001. }
  6002. type TxEvent = struct {
  6003. Fu struct {
  6004. FkeyButtonPointer [0]struct {
  6005. Fpad00 TCARD32
  6006. Ftime TCARD32
  6007. Froot TCARD32
  6008. Fevent TCARD32
  6009. Fchild TCARD32
  6010. FrootX TINT16
  6011. FrootY TINT16
  6012. FeventX TINT16
  6013. FeventY TINT16
  6014. Fstate TKeyButMask
  6015. FsameScreen TBOOL
  6016. Fpad1 TBYTE
  6017. }
  6018. FenterLeave [0]struct {
  6019. Fpad00 TCARD32
  6020. Ftime TCARD32
  6021. Froot TCARD32
  6022. Fevent TCARD32
  6023. Fchild TCARD32
  6024. FrootX TINT16
  6025. FrootY TINT16
  6026. FeventX TINT16
  6027. FeventY TINT16
  6028. Fstate TKeyButMask
  6029. Fmode TBYTE
  6030. Fflags TBYTE
  6031. }
  6032. Ffocus [0]struct {
  6033. Fpad00 TCARD32
  6034. Fwindow TCARD32
  6035. Fmode TBYTE
  6036. Fpad1 TBYTE
  6037. Fpad2 TBYTE
  6038. Fpad3 TBYTE
  6039. }
  6040. Fexpose [0]struct {
  6041. Fpad00 TCARD32
  6042. Fwindow TCARD32
  6043. Fx TCARD16
  6044. Fy TCARD16
  6045. Fwidth TCARD16
  6046. Fheight TCARD16
  6047. Fcount TCARD16
  6048. Fpad2 TCARD16
  6049. }
  6050. FgraphicsExposure [0]struct {
  6051. Fpad00 TCARD32
  6052. Fdrawable TCARD32
  6053. Fx TCARD16
  6054. Fy TCARD16
  6055. Fwidth TCARD16
  6056. Fheight TCARD16
  6057. FminorEvent TCARD16
  6058. Fcount TCARD16
  6059. FmajorEvent TBYTE
  6060. Fpad1 TBYTE
  6061. Fpad2 TBYTE
  6062. Fpad3 TBYTE
  6063. }
  6064. FnoExposure [0]struct {
  6065. Fpad00 TCARD32
  6066. Fdrawable TCARD32
  6067. FminorEvent TCARD16
  6068. FmajorEvent TBYTE
  6069. Fbpad TBYTE
  6070. }
  6071. Fvisibility [0]struct {
  6072. Fpad00 TCARD32
  6073. Fwindow TCARD32
  6074. Fstate TCARD8
  6075. Fpad1 TBYTE
  6076. Fpad2 TBYTE
  6077. Fpad3 TBYTE
  6078. }
  6079. FcreateNotify [0]struct {
  6080. Fpad00 TCARD32
  6081. Fparent TCARD32
  6082. Fwindow TCARD32
  6083. Fx TINT16
  6084. Fy TINT16
  6085. Fwidth TCARD16
  6086. Fheight TCARD16
  6087. FborderWidth TCARD16
  6088. Foverride TBOOL
  6089. Fbpad TBYTE
  6090. }
  6091. FdestroyNotify [0]struct {
  6092. Fpad00 TCARD32
  6093. Fevent TCARD32
  6094. Fwindow TCARD32
  6095. }
  6096. FunmapNotify [0]struct {
  6097. Fpad00 TCARD32
  6098. Fevent TCARD32
  6099. Fwindow TCARD32
  6100. FfromConfigure TBOOL
  6101. Fpad1 TBYTE
  6102. Fpad2 TBYTE
  6103. Fpad3 TBYTE
  6104. }
  6105. FmapNotify [0]struct {
  6106. Fpad00 TCARD32
  6107. Fevent TCARD32
  6108. Fwindow TCARD32
  6109. Foverride TBOOL
  6110. Fpad1 TBYTE
  6111. Fpad2 TBYTE
  6112. Fpad3 TBYTE
  6113. }
  6114. FmapRequest [0]struct {
  6115. Fpad00 TCARD32
  6116. Fparent TCARD32
  6117. Fwindow TCARD32
  6118. }
  6119. Freparent [0]struct {
  6120. Fpad00 TCARD32
  6121. Fevent TCARD32
  6122. Fwindow TCARD32
  6123. Fparent TCARD32
  6124. Fx TINT16
  6125. Fy TINT16
  6126. Foverride TBOOL
  6127. Fpad1 TBYTE
  6128. Fpad2 TBYTE
  6129. Fpad3 TBYTE
  6130. }
  6131. FconfigureNotify [0]struct {
  6132. Fpad00 TCARD32
  6133. Fevent TCARD32
  6134. Fwindow TCARD32
  6135. FaboveSibling TCARD32
  6136. Fx TINT16
  6137. Fy TINT16
  6138. Fwidth TCARD16
  6139. Fheight TCARD16
  6140. FborderWidth TCARD16
  6141. Foverride TBOOL
  6142. Fbpad TBYTE
  6143. }
  6144. FconfigureRequest [0]struct {
  6145. Fpad00 TCARD32
  6146. Fparent TCARD32
  6147. Fwindow TCARD32
  6148. Fsibling TCARD32
  6149. Fx TINT16
  6150. Fy TINT16
  6151. Fwidth TCARD16
  6152. Fheight TCARD16
  6153. FborderWidth TCARD16
  6154. FvalueMask TCARD16
  6155. Fpad1 TCARD32
  6156. }
  6157. Fgravity [0]struct {
  6158. Fpad00 TCARD32
  6159. Fevent TCARD32
  6160. Fwindow TCARD32
  6161. Fx TINT16
  6162. Fy TINT16
  6163. Fpad1 TCARD32
  6164. Fpad2 TCARD32
  6165. Fpad3 TCARD32
  6166. Fpad4 TCARD32
  6167. }
  6168. FresizeRequest [0]struct {
  6169. Fpad00 TCARD32
  6170. Fwindow TCARD32
  6171. Fwidth TCARD16
  6172. Fheight TCARD16
  6173. }
  6174. Fcirculate [0]struct {
  6175. Fpad00 TCARD32
  6176. Fevent TCARD32
  6177. Fwindow TCARD32
  6178. Fparent TCARD32
  6179. Fplace TBYTE
  6180. Fpad1 TBYTE
  6181. Fpad2 TBYTE
  6182. Fpad3 TBYTE
  6183. }
  6184. Fproperty [0]struct {
  6185. Fpad00 TCARD32
  6186. Fwindow TCARD32
  6187. Fatom TCARD32
  6188. Ftime TCARD32
  6189. Fstate TBYTE
  6190. Fpad1 TBYTE
  6191. Fpad2 TCARD16
  6192. }
  6193. FselectionClear [0]struct {
  6194. Fpad00 TCARD32
  6195. Ftime TCARD32
  6196. Fwindow TCARD32
  6197. Fatom TCARD32
  6198. }
  6199. FselectionRequest [0]struct {
  6200. Fpad00 TCARD32
  6201. Ftime TCARD32
  6202. Fowner TCARD32
  6203. Frequestor TCARD32
  6204. Fselection TCARD32
  6205. Ftarget TCARD32
  6206. Fproperty TCARD32
  6207. }
  6208. FselectionNotify [0]struct {
  6209. Fpad00 TCARD32
  6210. Ftime TCARD32
  6211. Frequestor TCARD32
  6212. Fselection TCARD32
  6213. Ftarget TCARD32
  6214. Fproperty TCARD32
  6215. }
  6216. Fcolormap [0]struct {
  6217. Fpad00 TCARD32
  6218. Fwindow TCARD32
  6219. Fcolormap TCARD32
  6220. Fnew1 TBOOL
  6221. Fstate TBYTE
  6222. Fpad1 TBYTE
  6223. Fpad2 TBYTE
  6224. }
  6225. FmappingNotify [0]struct {
  6226. Fpad00 TCARD32
  6227. Frequest TCARD8
  6228. FfirstKeyCode TCARD8
  6229. Fcount TCARD8
  6230. Fpad1 TBYTE
  6231. }
  6232. FclientMessage [0]struct {
  6233. Fpad00 TCARD32
  6234. Fwindow TCARD32
  6235. Fu struct {
  6236. Fs [0]struct {
  6237. Ftype1 TCARD32
  6238. Fshorts0 TINT16
  6239. Fshorts1 TINT16
  6240. Fshorts2 TINT16
  6241. Fshorts3 TINT16
  6242. Fshorts4 TINT16
  6243. Fshorts5 TINT16
  6244. Fshorts6 TINT16
  6245. Fshorts7 TINT16
  6246. Fshorts8 TINT16
  6247. Fshorts9 TINT16
  6248. }
  6249. Fb [0]struct {
  6250. Ftype1 TCARD32
  6251. Fbytes [20]TINT8
  6252. }
  6253. Fl struct {
  6254. Ftype1 TCARD32
  6255. Flongs0 TINT32
  6256. Flongs1 TINT32
  6257. Flongs2 TINT32
  6258. Flongs3 TINT32
  6259. Flongs4 TINT32
  6260. }
  6261. }
  6262. }
  6263. Fu struct {
  6264. Ftype1 TBYTE
  6265. Fdetail TBYTE
  6266. FsequenceNumber TCARD16
  6267. }
  6268. F__ccgo_pad26 [28]byte
  6269. }
  6270. }
  6271. type T_xEvent = TxEvent
  6272. type TxGenericEvent = struct {
  6273. Ftype1 TBYTE
  6274. Fextension TCARD8
  6275. FsequenceNumber TCARD16
  6276. Flength TCARD32
  6277. Fevtype TCARD16
  6278. Fpad2 TCARD16
  6279. Fpad3 TCARD32
  6280. Fpad4 TCARD32
  6281. Fpad5 TCARD32
  6282. Fpad6 TCARD32
  6283. Fpad7 TCARD32
  6284. }
  6285. type TxKeymapEvent = struct {
  6286. Ftype1 TBYTE
  6287. Fmap1 [31]TBYTE
  6288. }
  6289. type TxReply = struct {
  6290. Fgeom [0]TxGetGeometryReply
  6291. Ftree [0]TxQueryTreeReply
  6292. Fatom [0]TxInternAtomReply
  6293. FatomName [0]TxGetAtomNameReply
  6294. Fproperty [0]TxGetPropertyReply
  6295. FlistProperties [0]TxListPropertiesReply
  6296. Fselection [0]TxGetSelectionOwnerReply
  6297. FgrabPointer [0]TxGrabPointerReply
  6298. FgrabKeyboard [0]TxGrabKeyboardReply
  6299. Fpointer [0]TxQueryPointerReply
  6300. FmotionEvents [0]TxGetMotionEventsReply
  6301. Fcoords [0]TxTranslateCoordsReply
  6302. FinputFocus [0]TxGetInputFocusReply
  6303. FtextExtents [0]TxQueryTextExtentsReply
  6304. Ffonts [0]TxListFontsReply
  6305. FfontPath [0]TxGetFontPathReply
  6306. Fimage [0]TxGetImageReply
  6307. Fcolormaps [0]TxListInstalledColormapsReply
  6308. FallocColor [0]TxAllocColorReply
  6309. FallocNamedColor [0]TxAllocNamedColorReply
  6310. FcolorCells [0]TxAllocColorCellsReply
  6311. FcolorPlanes [0]TxAllocColorPlanesReply
  6312. Fcolors [0]TxQueryColorsReply
  6313. FlookupColor [0]TxLookupColorReply
  6314. FbestSize [0]TxQueryBestSizeReply
  6315. Fextension [0]TxQueryExtensionReply
  6316. Fextensions [0]TxListExtensionsReply
  6317. FsetModifierMapping [0]TxSetModifierMappingReply
  6318. FgetModifierMapping [0]TxGetModifierMappingReply
  6319. FsetPointerMapping [0]TxSetPointerMappingReply
  6320. FgetKeyboardMapping [0]TxGetKeyboardMappingReply
  6321. FgetPointerMapping [0]TxGetPointerMappingReply
  6322. FpointerControl [0]TxGetPointerControlReply
  6323. FscreenSaver [0]TxGetScreenSaverReply
  6324. Fhosts [0]TxListHostsReply
  6325. Ferror1 [0]TxError
  6326. Fevent [0]TxEvent
  6327. Fgeneric TxGenericReply
  6328. }
  6329. type TxReq = struct {
  6330. FreqType TCARD8
  6331. Fdata TCARD8
  6332. Flength TCARD16
  6333. }
  6334. type T_xReq = TxReq
  6335. type TxResourceReq = struct {
  6336. FreqType TCARD8
  6337. Fpad TBYTE
  6338. Flength TCARD16
  6339. Fid TCARD32
  6340. }
  6341. type TxCreateWindowReq = struct {
  6342. FreqType TCARD8
  6343. Fdepth TCARD8
  6344. Flength TCARD16
  6345. Fwid TCARD32
  6346. Fparent TCARD32
  6347. Fx TINT16
  6348. Fy TINT16
  6349. Fwidth TCARD16
  6350. Fheight TCARD16
  6351. FborderWidth TCARD16
  6352. Fclass TCARD16
  6353. Fvisual TCARD32
  6354. Fmask TCARD32
  6355. }
  6356. type TxChangeWindowAttributesReq = struct {
  6357. FreqType TCARD8
  6358. Fpad TBYTE
  6359. Flength TCARD16
  6360. Fwindow TCARD32
  6361. FvalueMask TCARD32
  6362. }
  6363. type TxChangeSaveSetReq = struct {
  6364. FreqType TCARD8
  6365. Fmode TBYTE
  6366. Flength TCARD16
  6367. Fwindow TCARD32
  6368. }
  6369. type TxReparentWindowReq = struct {
  6370. FreqType TCARD8
  6371. Fpad TBYTE
  6372. Flength TCARD16
  6373. Fwindow TCARD32
  6374. Fparent TCARD32
  6375. Fx TINT16
  6376. Fy TINT16
  6377. }
  6378. type TxConfigureWindowReq = struct {
  6379. FreqType TCARD8
  6380. Fpad TCARD8
  6381. Flength TCARD16
  6382. Fwindow TCARD32
  6383. Fmask TCARD16
  6384. Fpad2 TCARD16
  6385. }
  6386. type TxCirculateWindowReq = struct {
  6387. FreqType TCARD8
  6388. Fdirection TCARD8
  6389. Flength TCARD16
  6390. Fwindow TCARD32
  6391. }
  6392. type TxInternAtomReq = struct {
  6393. FreqType TCARD8
  6394. FonlyIfExists TBOOL
  6395. Flength TCARD16
  6396. Fnbytes TCARD16
  6397. Fpad TCARD16
  6398. }
  6399. type TxChangePropertyReq = struct {
  6400. FreqType TCARD8
  6401. Fmode TCARD8
  6402. Flength TCARD16
  6403. Fwindow TCARD32
  6404. Fproperty TCARD32
  6405. Ftype1 TCARD32
  6406. Fformat TCARD8
  6407. Fpad [3]TBYTE
  6408. FnUnits TCARD32
  6409. }
  6410. type TxDeletePropertyReq = struct {
  6411. FreqType TCARD8
  6412. Fpad TBYTE
  6413. Flength TCARD16
  6414. Fwindow TCARD32
  6415. Fproperty TCARD32
  6416. }
  6417. type TxGetPropertyReq = struct {
  6418. FreqType TCARD8
  6419. Fdelete1 TBOOL
  6420. Flength TCARD16
  6421. Fwindow TCARD32
  6422. Fproperty TCARD32
  6423. Ftype1 TCARD32
  6424. FlongOffset TCARD32
  6425. FlongLength TCARD32
  6426. }
  6427. type TxSetSelectionOwnerReq = struct {
  6428. FreqType TCARD8
  6429. Fpad TBYTE
  6430. Flength TCARD16
  6431. Fwindow TCARD32
  6432. Fselection TCARD32
  6433. Ftime TCARD32
  6434. }
  6435. type TxConvertSelectionReq = struct {
  6436. FreqType TCARD8
  6437. Fpad TBYTE
  6438. Flength TCARD16
  6439. Frequestor TCARD32
  6440. Fselection TCARD32
  6441. Ftarget TCARD32
  6442. Fproperty TCARD32
  6443. Ftime TCARD32
  6444. }
  6445. type TxSendEventReq = struct {
  6446. FreqType TCARD8
  6447. Fpropagate TBOOL
  6448. Flength TCARD16
  6449. Fdestination TCARD32
  6450. FeventMask TCARD32
  6451. Fevent TxEvent
  6452. }
  6453. type TxGrabPointerReq = struct {
  6454. FreqType TCARD8
  6455. FownerEvents TBOOL
  6456. Flength TCARD16
  6457. FgrabWindow TCARD32
  6458. FeventMask TCARD16
  6459. FpointerMode TBYTE
  6460. FkeyboardMode TBYTE
  6461. FconfineTo TCARD32
  6462. Fcursor TCARD32
  6463. Ftime TCARD32
  6464. }
  6465. type TxGrabButtonReq = struct {
  6466. FreqType TCARD8
  6467. FownerEvents TBOOL
  6468. Flength TCARD16
  6469. FgrabWindow TCARD32
  6470. FeventMask TCARD16
  6471. FpointerMode TBYTE
  6472. FkeyboardMode TBYTE
  6473. FconfineTo TCARD32
  6474. Fcursor TCARD32
  6475. Fbutton TCARD8
  6476. Fpad TBYTE
  6477. Fmodifiers TCARD16
  6478. }
  6479. type TxUngrabButtonReq = struct {
  6480. FreqType TCARD8
  6481. Fbutton TCARD8
  6482. Flength TCARD16
  6483. FgrabWindow TCARD32
  6484. Fmodifiers TCARD16
  6485. Fpad TCARD16
  6486. }
  6487. type TxChangeActivePointerGrabReq = struct {
  6488. FreqType TCARD8
  6489. Fpad TBYTE
  6490. Flength TCARD16
  6491. Fcursor TCARD32
  6492. Ftime TCARD32
  6493. FeventMask TCARD16
  6494. Fpad2 TCARD16
  6495. }
  6496. type TxGrabKeyboardReq = struct {
  6497. FreqType TCARD8
  6498. FownerEvents TBOOL
  6499. Flength TCARD16
  6500. FgrabWindow TCARD32
  6501. Ftime TCARD32
  6502. FpointerMode TBYTE
  6503. FkeyboardMode TBYTE
  6504. Fpad TCARD16
  6505. }
  6506. type TxGrabKeyReq = struct {
  6507. FreqType TCARD8
  6508. FownerEvents TBOOL
  6509. Flength TCARD16
  6510. FgrabWindow TCARD32
  6511. Fmodifiers TCARD16
  6512. Fkey TCARD8
  6513. FpointerMode TBYTE
  6514. FkeyboardMode TBYTE
  6515. Fpad1 TBYTE
  6516. Fpad2 TBYTE
  6517. Fpad3 TBYTE
  6518. }
  6519. type TxUngrabKeyReq = struct {
  6520. FreqType TCARD8
  6521. Fkey TCARD8
  6522. Flength TCARD16
  6523. FgrabWindow TCARD32
  6524. Fmodifiers TCARD16
  6525. Fpad TCARD16
  6526. }
  6527. type TxAllowEventsReq = struct {
  6528. FreqType TCARD8
  6529. Fmode TCARD8
  6530. Flength TCARD16
  6531. Ftime TCARD32
  6532. }
  6533. type TxGetMotionEventsReq = struct {
  6534. FreqType TCARD8
  6535. Fpad TBYTE
  6536. Flength TCARD16
  6537. Fwindow TCARD32
  6538. Fstart TCARD32
  6539. Fstop TCARD32
  6540. }
  6541. type TxTranslateCoordsReq = struct {
  6542. FreqType TCARD8
  6543. Fpad TBYTE
  6544. Flength TCARD16
  6545. FsrcWid TCARD32
  6546. FdstWid TCARD32
  6547. FsrcX TINT16
  6548. FsrcY TINT16
  6549. }
  6550. type TxWarpPointerReq = struct {
  6551. FreqType TCARD8
  6552. Fpad TBYTE
  6553. Flength TCARD16
  6554. FsrcWid TCARD32
  6555. FdstWid TCARD32
  6556. FsrcX TINT16
  6557. FsrcY TINT16
  6558. FsrcWidth TCARD16
  6559. FsrcHeight TCARD16
  6560. FdstX TINT16
  6561. FdstY TINT16
  6562. }
  6563. type TxSetInputFocusReq = struct {
  6564. FreqType TCARD8
  6565. FrevertTo TCARD8
  6566. Flength TCARD16
  6567. Ffocus TCARD32
  6568. Ftime TCARD32
  6569. }
  6570. type TxOpenFontReq = struct {
  6571. FreqType TCARD8
  6572. Fpad TBYTE
  6573. Flength TCARD16
  6574. Ffid TCARD32
  6575. Fnbytes TCARD16
  6576. Fpad1 TBYTE
  6577. Fpad2 TBYTE
  6578. }
  6579. type TxQueryTextExtentsReq = struct {
  6580. FreqType TCARD8
  6581. FoddLength TBOOL
  6582. Flength TCARD16
  6583. Ffid TCARD32
  6584. }
  6585. type TxListFontsReq = struct {
  6586. FreqType TCARD8
  6587. Fpad TBYTE
  6588. Flength TCARD16
  6589. FmaxNames TCARD16
  6590. Fnbytes TCARD16
  6591. }
  6592. type TxListFontsWithInfoReq = struct {
  6593. FreqType TCARD8
  6594. Fpad TBYTE
  6595. Flength TCARD16
  6596. FmaxNames TCARD16
  6597. Fnbytes TCARD16
  6598. }
  6599. type TxSetFontPathReq = struct {
  6600. FreqType TCARD8
  6601. Fpad TBYTE
  6602. Flength TCARD16
  6603. FnFonts TCARD16
  6604. Fpad1 TBYTE
  6605. Fpad2 TBYTE
  6606. }
  6607. type TxCreatePixmapReq = struct {
  6608. FreqType TCARD8
  6609. Fdepth TCARD8
  6610. Flength TCARD16
  6611. Fpid TCARD32
  6612. Fdrawable TCARD32
  6613. Fwidth TCARD16
  6614. Fheight TCARD16
  6615. }
  6616. type TxCreateGCReq = struct {
  6617. FreqType TCARD8
  6618. Fpad TBYTE
  6619. Flength TCARD16
  6620. Fgc TCARD32
  6621. Fdrawable TCARD32
  6622. Fmask TCARD32
  6623. }
  6624. type TxChangeGCReq = struct {
  6625. FreqType TCARD8
  6626. Fpad TBYTE
  6627. Flength TCARD16
  6628. Fgc TCARD32
  6629. Fmask TCARD32
  6630. }
  6631. type TxCopyGCReq = struct {
  6632. FreqType TCARD8
  6633. Fpad TBYTE
  6634. Flength TCARD16
  6635. FsrcGC TCARD32
  6636. FdstGC TCARD32
  6637. Fmask TCARD32
  6638. }
  6639. type TxSetDashesReq = struct {
  6640. FreqType TCARD8
  6641. Fpad TBYTE
  6642. Flength TCARD16
  6643. Fgc TCARD32
  6644. FdashOffset TCARD16
  6645. FnDashes TCARD16
  6646. }
  6647. type TxSetClipRectanglesReq = struct {
  6648. FreqType TCARD8
  6649. Fordering TBYTE
  6650. Flength TCARD16
  6651. Fgc TCARD32
  6652. FxOrigin TINT16
  6653. FyOrigin TINT16
  6654. }
  6655. type TxClearAreaReq = struct {
  6656. FreqType TCARD8
  6657. Fexposures TBOOL
  6658. Flength TCARD16
  6659. Fwindow TCARD32
  6660. Fx TINT16
  6661. Fy TINT16
  6662. Fwidth TCARD16
  6663. Fheight TCARD16
  6664. }
  6665. type TxCopyAreaReq = struct {
  6666. FreqType TCARD8
  6667. Fpad TBYTE
  6668. Flength TCARD16
  6669. FsrcDrawable TCARD32
  6670. FdstDrawable TCARD32
  6671. Fgc TCARD32
  6672. FsrcX TINT16
  6673. FsrcY TINT16
  6674. FdstX TINT16
  6675. FdstY TINT16
  6676. Fwidth TCARD16
  6677. Fheight TCARD16
  6678. }
  6679. type TxCopyPlaneReq = struct {
  6680. FreqType TCARD8
  6681. Fpad TBYTE
  6682. Flength TCARD16
  6683. FsrcDrawable TCARD32
  6684. FdstDrawable TCARD32
  6685. Fgc TCARD32
  6686. FsrcX TINT16
  6687. FsrcY TINT16
  6688. FdstX TINT16
  6689. FdstY TINT16
  6690. Fwidth TCARD16
  6691. Fheight TCARD16
  6692. FbitPlane TCARD32
  6693. }
  6694. type TxPolyPointReq = struct {
  6695. FreqType TCARD8
  6696. FcoordMode TBYTE
  6697. Flength TCARD16
  6698. Fdrawable TCARD32
  6699. Fgc TCARD32
  6700. }
  6701. type TxPolyLineReq = struct {
  6702. FreqType TCARD8
  6703. FcoordMode TBYTE
  6704. Flength TCARD16
  6705. Fdrawable TCARD32
  6706. Fgc TCARD32
  6707. }
  6708. type TxPolySegmentReq = struct {
  6709. FreqType TCARD8
  6710. Fpad TBYTE
  6711. Flength TCARD16
  6712. Fdrawable TCARD32
  6713. Fgc TCARD32
  6714. }
  6715. type TxPolyArcReq = struct {
  6716. FreqType TCARD8
  6717. Fpad TBYTE
  6718. Flength TCARD16
  6719. Fdrawable TCARD32
  6720. Fgc TCARD32
  6721. }
  6722. type TxPolyRectangleReq = struct {
  6723. FreqType TCARD8
  6724. Fpad TBYTE
  6725. Flength TCARD16
  6726. Fdrawable TCARD32
  6727. Fgc TCARD32
  6728. }
  6729. type TxPolyFillRectangleReq = struct {
  6730. FreqType TCARD8
  6731. Fpad TBYTE
  6732. Flength TCARD16
  6733. Fdrawable TCARD32
  6734. Fgc TCARD32
  6735. }
  6736. type TxPolyFillArcReq = struct {
  6737. FreqType TCARD8
  6738. Fpad TBYTE
  6739. Flength TCARD16
  6740. Fdrawable TCARD32
  6741. Fgc TCARD32
  6742. }
  6743. type TxFillPolyReq = struct {
  6744. FreqType TCARD8
  6745. Fpad TBYTE
  6746. Flength TCARD16
  6747. Fdrawable TCARD32
  6748. Fgc TCARD32
  6749. Fshape TBYTE
  6750. FcoordMode TBYTE
  6751. Fpad1 TCARD16
  6752. }
  6753. type T_FillPolyReq = TxFillPolyReq
  6754. type TxPutImageReq = struct {
  6755. FreqType TCARD8
  6756. Fformat TCARD8
  6757. Flength TCARD16
  6758. Fdrawable TCARD32
  6759. Fgc TCARD32
  6760. Fwidth TCARD16
  6761. Fheight TCARD16
  6762. FdstX TINT16
  6763. FdstY TINT16
  6764. FleftPad TCARD8
  6765. Fdepth TCARD8
  6766. Fpad TCARD16
  6767. }
  6768. type T_PutImageReq = TxPutImageReq
  6769. type TxGetImageReq = struct {
  6770. FreqType TCARD8
  6771. Fformat TCARD8
  6772. Flength TCARD16
  6773. Fdrawable TCARD32
  6774. Fx TINT16
  6775. Fy TINT16
  6776. Fwidth TCARD16
  6777. Fheight TCARD16
  6778. FplaneMask TCARD32
  6779. }
  6780. type TxPolyTextReq = struct {
  6781. FreqType TCARD8
  6782. Fpad TCARD8
  6783. Flength TCARD16
  6784. Fdrawable TCARD32
  6785. Fgc TCARD32
  6786. Fx TINT16
  6787. Fy TINT16
  6788. }
  6789. type TxPolyText8Req = struct {
  6790. FreqType TCARD8
  6791. Fpad TCARD8
  6792. Flength TCARD16
  6793. Fdrawable TCARD32
  6794. Fgc TCARD32
  6795. Fx TINT16
  6796. Fy TINT16
  6797. }
  6798. type TxPolyText16Req = struct {
  6799. FreqType TCARD8
  6800. Fpad TCARD8
  6801. Flength TCARD16
  6802. Fdrawable TCARD32
  6803. Fgc TCARD32
  6804. Fx TINT16
  6805. Fy TINT16
  6806. }
  6807. type TxImageTextReq = struct {
  6808. FreqType TCARD8
  6809. FnChars TBYTE
  6810. Flength TCARD16
  6811. Fdrawable TCARD32
  6812. Fgc TCARD32
  6813. Fx TINT16
  6814. Fy TINT16
  6815. }
  6816. type TxImageText8Req = struct {
  6817. FreqType TCARD8
  6818. FnChars TBYTE
  6819. Flength TCARD16
  6820. Fdrawable TCARD32
  6821. Fgc TCARD32
  6822. Fx TINT16
  6823. Fy TINT16
  6824. }
  6825. type TxImageText16Req = struct {
  6826. FreqType TCARD8
  6827. FnChars TBYTE
  6828. Flength TCARD16
  6829. Fdrawable TCARD32
  6830. Fgc TCARD32
  6831. Fx TINT16
  6832. Fy TINT16
  6833. }
  6834. type TxCreateColormapReq = struct {
  6835. FreqType TCARD8
  6836. Falloc TBYTE
  6837. Flength TCARD16
  6838. Fmid TCARD32
  6839. Fwindow TCARD32
  6840. Fvisual TCARD32
  6841. }
  6842. type TxCopyColormapAndFreeReq = struct {
  6843. FreqType TCARD8
  6844. Fpad TBYTE
  6845. Flength TCARD16
  6846. Fmid TCARD32
  6847. FsrcCmap TCARD32
  6848. }
  6849. type TxAllocColorReq = struct {
  6850. FreqType TCARD8
  6851. Fpad TBYTE
  6852. Flength TCARD16
  6853. Fcmap TCARD32
  6854. Fred TCARD16
  6855. Fgreen TCARD16
  6856. Fblue TCARD16
  6857. Fpad2 TCARD16
  6858. }
  6859. type TxAllocNamedColorReq = struct {
  6860. FreqType TCARD8
  6861. Fpad TBYTE
  6862. Flength TCARD16
  6863. Fcmap TCARD32
  6864. Fnbytes TCARD16
  6865. Fpad1 TBYTE
  6866. Fpad2 TBYTE
  6867. }
  6868. type TxAllocColorCellsReq = struct {
  6869. FreqType TCARD8
  6870. Fcontiguous TBOOL
  6871. Flength TCARD16
  6872. Fcmap TCARD32
  6873. Fcolors TCARD16
  6874. Fplanes TCARD16
  6875. }
  6876. type TxAllocColorPlanesReq = struct {
  6877. FreqType TCARD8
  6878. Fcontiguous TBOOL
  6879. Flength TCARD16
  6880. Fcmap TCARD32
  6881. Fcolors TCARD16
  6882. Fred TCARD16
  6883. Fgreen TCARD16
  6884. Fblue TCARD16
  6885. }
  6886. type TxFreeColorsReq = struct {
  6887. FreqType TCARD8
  6888. Fpad TBYTE
  6889. Flength TCARD16
  6890. Fcmap TCARD32
  6891. FplaneMask TCARD32
  6892. }
  6893. type TxStoreColorsReq = struct {
  6894. FreqType TCARD8
  6895. Fpad TBYTE
  6896. Flength TCARD16
  6897. Fcmap TCARD32
  6898. }
  6899. type TxStoreNamedColorReq = struct {
  6900. FreqType TCARD8
  6901. Fflags TCARD8
  6902. Flength TCARD16
  6903. Fcmap TCARD32
  6904. Fpixel TCARD32
  6905. Fnbytes TCARD16
  6906. Fpad1 TBYTE
  6907. Fpad2 TBYTE
  6908. }
  6909. type TxQueryColorsReq = struct {
  6910. FreqType TCARD8
  6911. Fpad TBYTE
  6912. Flength TCARD16
  6913. Fcmap TCARD32
  6914. }
  6915. type TxLookupColorReq = struct {
  6916. FreqType TCARD8
  6917. Fpad TBYTE
  6918. Flength TCARD16
  6919. Fcmap TCARD32
  6920. Fnbytes TCARD16
  6921. Fpad1 TBYTE
  6922. Fpad2 TBYTE
  6923. }
  6924. type TxCreateCursorReq = struct {
  6925. FreqType TCARD8
  6926. Fpad TBYTE
  6927. Flength TCARD16
  6928. Fcid TCARD32
  6929. Fsource TCARD32
  6930. Fmask TCARD32
  6931. FforeRed TCARD16
  6932. FforeGreen TCARD16
  6933. FforeBlue TCARD16
  6934. FbackRed TCARD16
  6935. FbackGreen TCARD16
  6936. FbackBlue TCARD16
  6937. Fx TCARD16
  6938. Fy TCARD16
  6939. }
  6940. type TxCreateGlyphCursorReq = struct {
  6941. FreqType TCARD8
  6942. Fpad TBYTE
  6943. Flength TCARD16
  6944. Fcid TCARD32
  6945. Fsource TCARD32
  6946. Fmask TCARD32
  6947. FsourceChar TCARD16
  6948. FmaskChar TCARD16
  6949. FforeRed TCARD16
  6950. FforeGreen TCARD16
  6951. FforeBlue TCARD16
  6952. FbackRed TCARD16
  6953. FbackGreen TCARD16
  6954. FbackBlue TCARD16
  6955. }
  6956. type TxRecolorCursorReq = struct {
  6957. FreqType TCARD8
  6958. Fpad TBYTE
  6959. Flength TCARD16
  6960. Fcursor TCARD32
  6961. FforeRed TCARD16
  6962. FforeGreen TCARD16
  6963. FforeBlue TCARD16
  6964. FbackRed TCARD16
  6965. FbackGreen TCARD16
  6966. FbackBlue TCARD16
  6967. }
  6968. type TxQueryBestSizeReq = struct {
  6969. FreqType TCARD8
  6970. Fclass TCARD8
  6971. Flength TCARD16
  6972. Fdrawable TCARD32
  6973. Fwidth TCARD16
  6974. Fheight TCARD16
  6975. }
  6976. type TxQueryExtensionReq = struct {
  6977. FreqType TCARD8
  6978. Fpad TBYTE
  6979. Flength TCARD16
  6980. Fnbytes TCARD16
  6981. Fpad1 TBYTE
  6982. Fpad2 TBYTE
  6983. }
  6984. type TxSetModifierMappingReq = struct {
  6985. FreqType TCARD8
  6986. FnumKeyPerModifier TCARD8
  6987. Flength TCARD16
  6988. }
  6989. type TxSetPointerMappingReq = struct {
  6990. FreqType TCARD8
  6991. FnElts TCARD8
  6992. Flength TCARD16
  6993. }
  6994. type TxGetKeyboardMappingReq = struct {
  6995. FreqType TCARD8
  6996. Fpad TBYTE
  6997. Flength TCARD16
  6998. FfirstKeyCode TCARD8
  6999. Fcount TCARD8
  7000. Fpad1 TCARD16
  7001. }
  7002. type TxChangeKeyboardMappingReq = struct {
  7003. FreqType TCARD8
  7004. FkeyCodes TCARD8
  7005. Flength TCARD16
  7006. FfirstKeyCode TCARD8
  7007. FkeySymsPerKeyCode TCARD8
  7008. Fpad1 TCARD16
  7009. }
  7010. type TxChangeKeyboardControlReq = struct {
  7011. FreqType TCARD8
  7012. Fpad TBYTE
  7013. Flength TCARD16
  7014. Fmask TCARD32
  7015. }
  7016. type TxBellReq = struct {
  7017. FreqType TCARD8
  7018. Fpercent TINT8
  7019. Flength TCARD16
  7020. }
  7021. type TxChangePointerControlReq = struct {
  7022. FreqType TCARD8
  7023. Fpad TBYTE
  7024. Flength TCARD16
  7025. FaccelNum TINT16
  7026. FaccelDenum TINT16
  7027. Fthreshold TINT16
  7028. FdoAccel TBOOL
  7029. FdoThresh TBOOL
  7030. }
  7031. type TxSetScreenSaverReq = struct {
  7032. FreqType TCARD8
  7033. Fpad TBYTE
  7034. Flength TCARD16
  7035. Ftimeout TINT16
  7036. Finterval TINT16
  7037. FpreferBlank TBYTE
  7038. FallowExpose TBYTE
  7039. Fpad2 TCARD16
  7040. }
  7041. type TxChangeHostsReq = struct {
  7042. FreqType TCARD8
  7043. Fmode TBYTE
  7044. Flength TCARD16
  7045. FhostFamily TCARD8
  7046. Fpad TBYTE
  7047. FhostLength TCARD16
  7048. }
  7049. type TxListHostsReq = struct {
  7050. FreqType TCARD8
  7051. Fpad TBYTE
  7052. Flength TCARD16
  7053. }
  7054. type TxChangeModeReq = struct {
  7055. FreqType TCARD8
  7056. Fmode TBYTE
  7057. Flength TCARD16
  7058. }
  7059. type TxSetAccessControlReq = struct {
  7060. FreqType TCARD8
  7061. Fmode TBYTE
  7062. Flength TCARD16
  7063. }
  7064. type TxSetCloseDownModeReq = struct {
  7065. FreqType TCARD8
  7066. Fmode TBYTE
  7067. Flength TCARD16
  7068. }
  7069. type TxForceScreenSaverReq = struct {
  7070. FreqType TCARD8
  7071. Fmode TBYTE
  7072. Flength TCARD16
  7073. }
  7074. type TxRotatePropertiesReq = struct {
  7075. FreqType TCARD8
  7076. Fpad TBYTE
  7077. Flength TCARD16
  7078. Fwindow TCARD32
  7079. FnAtoms TCARD16
  7080. FnPositions TINT16
  7081. }
  7082. type Tsched_param = struct {
  7083. Fsched_priority int32
  7084. F__reserved1 int32
  7085. F__reserved2 [4]int32
  7086. F__reserved3 int32
  7087. }
  7088. type Tcpu_set_t = struct {
  7089. F__bits [32]uint32
  7090. }
  7091. type Ttm = struct {
  7092. Ftm_sec int32
  7093. Ftm_min int32
  7094. Ftm_hour int32
  7095. Ftm_mday int32
  7096. Ftm_mon int32
  7097. Ftm_year int32
  7098. Ftm_wday int32
  7099. Ftm_yday int32
  7100. Ftm_isdst int32
  7101. Ftm_gmtoff int32
  7102. Ftm_zone uintptr
  7103. }
  7104. type Titimerspec = struct {
  7105. Fit_interval Ttimespec
  7106. Fit_value Ttimespec
  7107. }
  7108. type t__ptcb = struct {
  7109. F__f uintptr
  7110. F__x uintptr
  7111. F__next uintptr
  7112. }
  7113. type Tcpu_set_t1 = struct {
  7114. F__bits [32]uint32
  7115. }
  7116. type Txthread_t = uintptr
  7117. type Txthread_key_t = uint32
  7118. type Txcondition_rec = struct {
  7119. F__u struct {
  7120. F__vi [0][12]int32
  7121. F__p [0][12]uintptr
  7122. F__i [12]int32
  7123. }
  7124. }
  7125. type Txmutex_rec = struct {
  7126. F__u struct {
  7127. F__vi [0][6]int32
  7128. F__p [0][6]uintptr
  7129. F__i [6]int32
  7130. }
  7131. F__ccgo_room int32
  7132. }
  7133. type Txcondition_t = uintptr
  7134. type Txmutex_t = uintptr
  7135. type T_XQEvent = struct {
  7136. Fnext uintptr
  7137. Fevent TXEvent
  7138. Fqserial_num uint32
  7139. }
  7140. type T_XSQEvent = T_XQEvent
  7141. type TLockInfoPtr = uintptr
  7142. type T_XLockPtrs = struct {
  7143. Flock_display uintptr
  7144. Funlock_display uintptr
  7145. }
  7146. type T_XAsyncHandler = struct {
  7147. Fnext uintptr
  7148. Fhandler uintptr
  7149. Fdata TXPointer
  7150. }
  7151. type T_XInternalAsync = T_XAsyncHandler
  7152. type T_XAsyncErrorState = struct {
  7153. Fmin_sequence_number uint32
  7154. Fmax_sequence_number uint32
  7155. Ferror_code uint8
  7156. Fmajor_opcode uint8
  7157. Fminor_opcode uint16
  7158. Flast_error_received uint8
  7159. Ferror_count int32
  7160. }
  7161. type T_XAsyncEState = T_XAsyncErrorState
  7162. type TFreeFuncType = uintptr
  7163. type TFreeModmapType = uintptr
  7164. type T_XFreeFuncRec = struct {
  7165. Fatoms TFreeFuncType
  7166. Fmodifiermap TFreeModmapType
  7167. Fkey_bindings TFreeFuncType
  7168. Fcontext_db TFreeFuncType
  7169. FdefaultCCCs TFreeFuncType
  7170. FclientCmaps TFreeFuncType
  7171. FintensityMaps TFreeFuncType
  7172. Fim_filters TFreeFuncType
  7173. Fxkb TFreeFuncType
  7174. }
  7175. type T_XFreeFuncs = T_XFreeFuncRec
  7176. type TCreateGCType = uintptr
  7177. type TCopyGCType = uintptr
  7178. type TFlushGCType = uintptr
  7179. type TFreeGCType = uintptr
  7180. type TCreateFontType = uintptr
  7181. type TFreeFontType = uintptr
  7182. type TCloseDisplayType = uintptr
  7183. type TErrorType = uintptr
  7184. type TErrorStringType = uintptr
  7185. type TPrintErrorType = uintptr
  7186. type TBeforeFlushType = uintptr
  7187. type T_XExtension = struct {
  7188. Fnext uintptr
  7189. Fcodes TXExtCodes
  7190. Fcreate_GC TCreateGCType
  7191. Fcopy_GC TCopyGCType
  7192. Fflush_GC TFlushGCType
  7193. Ffree_GC TFreeGCType
  7194. Fcreate_Font TCreateFontType
  7195. Ffree_Font TFreeFontType
  7196. Fclose_display TCloseDisplayType
  7197. Ferror1 TErrorType
  7198. Ferror_string TErrorStringType
  7199. Fname uintptr
  7200. Ferror_values TPrintErrorType
  7201. Fbefore_flush TBeforeFlushType
  7202. Fnext_flush uintptr
  7203. }
  7204. type T_XExten = T_XExtension
  7205. type T_XInternalConnectionProc = uintptr
  7206. type T_XConnectionInfo = struct {
  7207. Ffd int32
  7208. Fread_callback T_XInternalConnectionProc
  7209. Fcall_data TXPointer
  7210. Fwatch_data uintptr
  7211. Fnext uintptr
  7212. }
  7213. type T_XConnWatchInfo = struct {
  7214. Ffn TXConnectionWatchProc
  7215. Fclient_data TXPointer
  7216. Fnext uintptr
  7217. }
  7218. type t__jmp_buf = [6]uint32
  7219. type Tjmp_buf = [1]t__jmp_buf_tag
  7220. type t__jmp_buf_tag = struct {
  7221. F__jb t__jmp_buf
  7222. F__fl uint32
  7223. F__ss [32]uint32
  7224. }
  7225. type Tsigjmp_buf = [1]t__jmp_buf_tag
  7226. type TFT_Int16 = int16
  7227. type TFT_UInt16 = uint16
  7228. type TFT_Int32 = int32
  7229. type TFT_UInt32 = uint32
  7230. type TFT_Fast = int32
  7231. type TFT_UFast = uint32
  7232. type TFT_Int64 = int64
  7233. type TFT_UInt64 = uint64
  7234. type TFT_Memory = uintptr
  7235. type TFT_MemoryRec_ = struct {
  7236. Fuser uintptr
  7237. Falloc TFT_Alloc_Func
  7238. Ffree TFT_Free_Func
  7239. Frealloc TFT_Realloc_Func
  7240. }
  7241. type TFT_Alloc_Func = uintptr
  7242. type TFT_Free_Func = uintptr
  7243. type TFT_Realloc_Func = uintptr
  7244. type TFT_Stream = uintptr
  7245. type TFT_StreamRec_ = struct {
  7246. Fbase uintptr
  7247. Fsize uint32
  7248. Fpos uint32
  7249. Fdescriptor TFT_StreamDesc
  7250. Fpathname TFT_StreamDesc
  7251. Fread TFT_Stream_IoFunc
  7252. Fclose1 TFT_Stream_CloseFunc
  7253. Fmemory TFT_Memory
  7254. Fcursor uintptr
  7255. Flimit uintptr
  7256. }
  7257. type TFT_StreamDesc = struct {
  7258. Fpointer [0]uintptr
  7259. Fvalue int32
  7260. }
  7261. type TFT_StreamDesc_ = TFT_StreamDesc
  7262. type TFT_Stream_IoFunc = uintptr
  7263. type TFT_Stream_CloseFunc = uintptr
  7264. type TFT_StreamRec = struct {
  7265. Fbase uintptr
  7266. Fsize uint32
  7267. Fpos uint32
  7268. Fdescriptor TFT_StreamDesc
  7269. Fpathname TFT_StreamDesc
  7270. Fread TFT_Stream_IoFunc
  7271. Fclose1 TFT_Stream_CloseFunc
  7272. Fmemory TFT_Memory
  7273. Fcursor uintptr
  7274. Flimit uintptr
  7275. }
  7276. type TFT_Pos = int32
  7277. type TFT_Vector = struct {
  7278. Fx TFT_Pos
  7279. Fy TFT_Pos
  7280. }
  7281. type TFT_Vector_ = TFT_Vector
  7282. type TFT_BBox = struct {
  7283. FxMin TFT_Pos
  7284. FyMin TFT_Pos
  7285. FxMax TFT_Pos
  7286. FyMax TFT_Pos
  7287. }
  7288. type TFT_BBox_ = TFT_BBox
  7289. type TFT_Pixel_Mode = int32
  7290. type _FT_Pixel_Mode_ = int32
  7291. const _FT_PIXEL_MODE_NONE = 0
  7292. const _FT_PIXEL_MODE_MONO = 1
  7293. const _FT_PIXEL_MODE_GRAY = 2
  7294. const _FT_PIXEL_MODE_GRAY2 = 3
  7295. const _FT_PIXEL_MODE_GRAY4 = 4
  7296. const _FT_PIXEL_MODE_LCD = 5
  7297. const _FT_PIXEL_MODE_LCD_V = 6
  7298. const _FT_PIXEL_MODE_BGRA = 7
  7299. const _FT_PIXEL_MODE_MAX = 8
  7300. type TFT_Bitmap = struct {
  7301. Frows uint32
  7302. Fwidth uint32
  7303. Fpitch int32
  7304. Fbuffer uintptr
  7305. Fnum_grays uint16
  7306. Fpixel_mode uint8
  7307. Fpalette_mode uint8
  7308. Fpalette uintptr
  7309. }
  7310. type TFT_Bitmap_ = TFT_Bitmap
  7311. type TFT_Outline = struct {
  7312. Fn_contours int16
  7313. Fn_points int16
  7314. Fpoints uintptr
  7315. Ftags uintptr
  7316. Fcontours uintptr
  7317. Fflags int32
  7318. }
  7319. type TFT_Outline_ = TFT_Outline
  7320. type TFT_Outline_MoveToFunc = uintptr
  7321. type TFT_Outline_LineToFunc = uintptr
  7322. type TFT_Outline_ConicToFunc = uintptr
  7323. type TFT_Outline_CubicToFunc = uintptr
  7324. type TFT_Outline_Funcs = struct {
  7325. Fmove_to TFT_Outline_MoveToFunc
  7326. Fline_to TFT_Outline_LineToFunc
  7327. Fconic_to TFT_Outline_ConicToFunc
  7328. Fcubic_to TFT_Outline_CubicToFunc
  7329. Fshift int32
  7330. Fdelta TFT_Pos
  7331. }
  7332. type TFT_Outline_Funcs_ = TFT_Outline_Funcs
  7333. type TFT_Glyph_Format = int32
  7334. type _FT_Glyph_Format_ = int32
  7335. const _FT_GLYPH_FORMAT_NONE = 0
  7336. const _FT_GLYPH_FORMAT_COMPOSITE = 1668246896
  7337. const _FT_GLYPH_FORMAT_BITMAP = 1651078259
  7338. const _FT_GLYPH_FORMAT_OUTLINE = 1869968492
  7339. const _FT_GLYPH_FORMAT_PLOTTER = 1886154612
  7340. const _FT_GLYPH_FORMAT_SVG = 1398163232
  7341. type TFT_Span = struct {
  7342. Fx int16
  7343. Flen1 uint16
  7344. Fcoverage uint8
  7345. }
  7346. type TFT_Span_ = TFT_Span
  7347. type TFT_SpanFunc = uintptr
  7348. type TFT_Raster_BitTest_Func = uintptr
  7349. type TFT_Raster_BitSet_Func = uintptr
  7350. type TFT_Raster_Params = struct {
  7351. Ftarget uintptr
  7352. Fsource uintptr
  7353. Fflags int32
  7354. Fgray_spans TFT_SpanFunc
  7355. Fblack_spans TFT_SpanFunc
  7356. Fbit_test TFT_Raster_BitTest_Func
  7357. Fbit_set TFT_Raster_BitSet_Func
  7358. Fuser uintptr
  7359. Fclip_box TFT_BBox
  7360. }
  7361. type TFT_Raster_Params_ = TFT_Raster_Params
  7362. type TFT_Raster = uintptr
  7363. type TFT_Raster_NewFunc = uintptr
  7364. type TFT_Raster_DoneFunc = uintptr
  7365. type TFT_Raster_ResetFunc = uintptr
  7366. type TFT_Raster_SetModeFunc = uintptr
  7367. type TFT_Raster_RenderFunc = uintptr
  7368. type TFT_Raster_Funcs = struct {
  7369. Fglyph_format TFT_Glyph_Format
  7370. Fraster_new TFT_Raster_NewFunc
  7371. Fraster_reset TFT_Raster_ResetFunc
  7372. Fraster_set_mode TFT_Raster_SetModeFunc
  7373. Fraster_render TFT_Raster_RenderFunc
  7374. Fraster_done TFT_Raster_DoneFunc
  7375. }
  7376. type TFT_Raster_Funcs_ = TFT_Raster_Funcs
  7377. type TFT_Bool = uint8
  7378. type TFT_FWord = int16
  7379. type TFT_UFWord = uint16
  7380. type TFT_Char = int8
  7381. type TFT_Byte = uint8
  7382. type TFT_Bytes = uintptr
  7383. type TFT_Tag = uint32
  7384. type TFT_String = int8
  7385. type TFT_Short = int16
  7386. type TFT_UShort = uint16
  7387. type TFT_Int = int32
  7388. type TFT_UInt = uint32
  7389. type TFT_Long = int32
  7390. type TFT_ULong = uint32
  7391. type TFT_F2Dot14 = int16
  7392. type TFT_F26Dot6 = int32
  7393. type TFT_Fixed = int32
  7394. type TFT_Error = int32
  7395. type TFT_Pointer = uintptr
  7396. type TFT_Offset = uint32
  7397. type TFT_PtrDist = int32
  7398. type TFT_UnitVector = struct {
  7399. Fx TFT_F2Dot14
  7400. Fy TFT_F2Dot14
  7401. }
  7402. type TFT_UnitVector_ = TFT_UnitVector
  7403. type TFT_Matrix = struct {
  7404. Fxx TFT_Fixed
  7405. Fxy TFT_Fixed
  7406. Fyx TFT_Fixed
  7407. Fyy TFT_Fixed
  7408. }
  7409. type TFT_Matrix_ = TFT_Matrix
  7410. type TFT_Data = struct {
  7411. Fpointer uintptr
  7412. Flength TFT_UInt
  7413. }
  7414. type TFT_Data_ = TFT_Data
  7415. type TFT_Generic_Finalizer = uintptr
  7416. type TFT_Generic = struct {
  7417. Fdata uintptr
  7418. Ffinalizer TFT_Generic_Finalizer
  7419. }
  7420. type TFT_Generic_ = TFT_Generic
  7421. type TFT_ListNode = uintptr
  7422. type TFT_ListNodeRec_ = struct {
  7423. Fprev TFT_ListNode
  7424. Fnext TFT_ListNode
  7425. Fdata uintptr
  7426. }
  7427. type TFT_List = uintptr
  7428. type TFT_ListRec_ = struct {
  7429. Fhead TFT_ListNode
  7430. Ftail TFT_ListNode
  7431. }
  7432. type TFT_ListNodeRec = struct {
  7433. Fprev TFT_ListNode
  7434. Fnext TFT_ListNode
  7435. Fdata uintptr
  7436. }
  7437. type TFT_ListRec = struct {
  7438. Fhead TFT_ListNode
  7439. Ftail TFT_ListNode
  7440. }
  7441. const _FT_Mod_Err_Base = 0
  7442. const _FT_Mod_Err_Autofit = 0
  7443. const _FT_Mod_Err_BDF = 0
  7444. const _FT_Mod_Err_Bzip2 = 0
  7445. const _FT_Mod_Err_Cache = 0
  7446. const _FT_Mod_Err_CFF = 0
  7447. const _FT_Mod_Err_CID = 0
  7448. const _FT_Mod_Err_Gzip = 0
  7449. const _FT_Mod_Err_LZW = 0
  7450. const _FT_Mod_Err_OTvalid = 0
  7451. const _FT_Mod_Err_PCF = 0
  7452. const _FT_Mod_Err_PFR = 0
  7453. const _FT_Mod_Err_PSaux = 0
  7454. const _FT_Mod_Err_PShinter = 0
  7455. const _FT_Mod_Err_PSnames = 0
  7456. const _FT_Mod_Err_Raster = 0
  7457. const _FT_Mod_Err_SFNT = 0
  7458. const _FT_Mod_Err_Smooth = 0
  7459. const _FT_Mod_Err_TrueType = 0
  7460. const _FT_Mod_Err_Type1 = 0
  7461. const _FT_Mod_Err_Type42 = 0
  7462. const _FT_Mod_Err_Winfonts = 0
  7463. const _FT_Mod_Err_GXvalid = 0
  7464. const _FT_Mod_Err_Sdf = 0
  7465. const _FT_Mod_Err_Max = 1
  7466. const _FT_Err_Ok = 0
  7467. const _FT_Err_Cannot_Open_Resource = 1
  7468. const _FT_Err_Unknown_File_Format = 2
  7469. const _FT_Err_Invalid_File_Format = 3
  7470. const _FT_Err_Invalid_Version = 4
  7471. const _FT_Err_Lower_Module_Version = 5
  7472. const _FT_Err_Invalid_Argument = 6
  7473. const _FT_Err_Unimplemented_Feature = 7
  7474. const _FT_Err_Invalid_Table = 8
  7475. const _FT_Err_Invalid_Offset = 9
  7476. const _FT_Err_Array_Too_Large = 10
  7477. const _FT_Err_Missing_Module = 11
  7478. const _FT_Err_Missing_Property = 12
  7479. const _FT_Err_Invalid_Glyph_Index = 16
  7480. const _FT_Err_Invalid_Character_Code = 17
  7481. const _FT_Err_Invalid_Glyph_Format = 18
  7482. const _FT_Err_Cannot_Render_Glyph = 19
  7483. const _FT_Err_Invalid_Outline = 20
  7484. const _FT_Err_Invalid_Composite = 21
  7485. const _FT_Err_Too_Many_Hints = 22
  7486. const _FT_Err_Invalid_Pixel_Size = 23
  7487. const _FT_Err_Invalid_SVG_Document = 24
  7488. const _FT_Err_Invalid_Handle = 32
  7489. const _FT_Err_Invalid_Library_Handle = 33
  7490. const _FT_Err_Invalid_Driver_Handle = 34
  7491. const _FT_Err_Invalid_Face_Handle = 35
  7492. const _FT_Err_Invalid_Size_Handle = 36
  7493. const _FT_Err_Invalid_Slot_Handle = 37
  7494. const _FT_Err_Invalid_CharMap_Handle = 38
  7495. const _FT_Err_Invalid_Cache_Handle = 39
  7496. const _FT_Err_Invalid_Stream_Handle = 40
  7497. const _FT_Err_Too_Many_Drivers = 48
  7498. const _FT_Err_Too_Many_Extensions = 49
  7499. const _FT_Err_Out_Of_Memory = 64
  7500. const _FT_Err_Unlisted_Object = 65
  7501. const _FT_Err_Cannot_Open_Stream = 81
  7502. const _FT_Err_Invalid_Stream_Seek = 82
  7503. const _FT_Err_Invalid_Stream_Skip = 83
  7504. const _FT_Err_Invalid_Stream_Read = 84
  7505. const _FT_Err_Invalid_Stream_Operation = 85
  7506. const _FT_Err_Invalid_Frame_Operation = 86
  7507. const _FT_Err_Nested_Frame_Access = 87
  7508. const _FT_Err_Invalid_Frame_Read = 88
  7509. const _FT_Err_Raster_Uninitialized = 96
  7510. const _FT_Err_Raster_Corrupted = 97
  7511. const _FT_Err_Raster_Overflow = 98
  7512. const _FT_Err_Raster_Negative_Height = 99
  7513. const _FT_Err_Too_Many_Caches = 112
  7514. const _FT_Err_Invalid_Opcode = 128
  7515. const _FT_Err_Too_Few_Arguments = 129
  7516. const _FT_Err_Stack_Overflow = 130
  7517. const _FT_Err_Code_Overflow = 131
  7518. const _FT_Err_Bad_Argument = 132
  7519. const _FT_Err_Divide_By_Zero = 133
  7520. const _FT_Err_Invalid_Reference = 134
  7521. const _FT_Err_Debug_OpCode = 135
  7522. const _FT_Err_ENDF_In_Exec_Stream = 136
  7523. const _FT_Err_Nested_DEFS = 137
  7524. const _FT_Err_Invalid_CodeRange = 138
  7525. const _FT_Err_Execution_Too_Long = 139
  7526. const _FT_Err_Too_Many_Function_Defs = 140
  7527. const _FT_Err_Too_Many_Instruction_Defs = 141
  7528. const _FT_Err_Table_Missing = 142
  7529. const _FT_Err_Horiz_Header_Missing = 143
  7530. const _FT_Err_Locations_Missing = 144
  7531. const _FT_Err_Name_Table_Missing = 145
  7532. const _FT_Err_CMap_Table_Missing = 146
  7533. const _FT_Err_Hmtx_Table_Missing = 147
  7534. const _FT_Err_Post_Table_Missing = 148
  7535. const _FT_Err_Invalid_Horiz_Metrics = 149
  7536. const _FT_Err_Invalid_CharMap_Format = 150
  7537. const _FT_Err_Invalid_PPem = 151
  7538. const _FT_Err_Invalid_Vert_Metrics = 152
  7539. const _FT_Err_Could_Not_Find_Context = 153
  7540. const _FT_Err_Invalid_Post_Table_Format = 154
  7541. const _FT_Err_Invalid_Post_Table = 155
  7542. const _FT_Err_DEF_In_Glyf_Bytecode = 156
  7543. const _FT_Err_Missing_Bitmap = 157
  7544. const _FT_Err_Missing_SVG_Hooks = 158
  7545. const _FT_Err_Syntax_Error = 160
  7546. const _FT_Err_Stack_Underflow = 161
  7547. const _FT_Err_Ignore = 162
  7548. const _FT_Err_No_Unicode_Glyph_Name = 163
  7549. const _FT_Err_Glyph_Too_Big = 164
  7550. const _FT_Err_Missing_Startfont_Field = 176
  7551. const _FT_Err_Missing_Font_Field = 177
  7552. const _FT_Err_Missing_Size_Field = 178
  7553. const _FT_Err_Missing_Fontboundingbox_Field = 179
  7554. const _FT_Err_Missing_Chars_Field = 180
  7555. const _FT_Err_Missing_Startchar_Field = 181
  7556. const _FT_Err_Missing_Encoding_Field = 182
  7557. const _FT_Err_Missing_Bbx_Field = 183
  7558. const _FT_Err_Bbx_Too_Big = 184
  7559. const _FT_Err_Corrupted_Font_Header = 185
  7560. const _FT_Err_Corrupted_Font_Glyphs = 186
  7561. const _FT_Err_Max = 187
  7562. type TFT_Glyph_Metrics = struct {
  7563. Fwidth TFT_Pos
  7564. Fheight TFT_Pos
  7565. FhoriBearingX TFT_Pos
  7566. FhoriBearingY TFT_Pos
  7567. FhoriAdvance TFT_Pos
  7568. FvertBearingX TFT_Pos
  7569. FvertBearingY TFT_Pos
  7570. FvertAdvance TFT_Pos
  7571. }
  7572. type TFT_Glyph_Metrics_ = TFT_Glyph_Metrics
  7573. type TFT_Bitmap_Size = struct {
  7574. Fheight TFT_Short
  7575. Fwidth TFT_Short
  7576. Fsize TFT_Pos
  7577. Fx_ppem TFT_Pos
  7578. Fy_ppem TFT_Pos
  7579. }
  7580. type TFT_Bitmap_Size_ = TFT_Bitmap_Size
  7581. type TFT_Library = uintptr
  7582. type TFT_Module = uintptr
  7583. type TFT_Driver = uintptr
  7584. type TFT_Renderer = uintptr
  7585. type TFT_Face = uintptr
  7586. type TFT_FaceRec_ = struct {
  7587. Fnum_faces TFT_Long
  7588. Fface_index TFT_Long
  7589. Fface_flags TFT_Long
  7590. Fstyle_flags TFT_Long
  7591. Fnum_glyphs TFT_Long
  7592. Ffamily_name uintptr
  7593. Fstyle_name uintptr
  7594. Fnum_fixed_sizes TFT_Int
  7595. Favailable_sizes uintptr
  7596. Fnum_charmaps TFT_Int
  7597. Fcharmaps uintptr
  7598. Fgeneric TFT_Generic
  7599. Fbbox TFT_BBox
  7600. Funits_per_EM TFT_UShort
  7601. Fascender TFT_Short
  7602. Fdescender TFT_Short
  7603. Fheight TFT_Short
  7604. Fmax_advance_width TFT_Short
  7605. Fmax_advance_height TFT_Short
  7606. Funderline_position TFT_Short
  7607. Funderline_thickness TFT_Short
  7608. Fglyph TFT_GlyphSlot
  7609. Fsize TFT_Size
  7610. Fcharmap TFT_CharMap
  7611. Fdriver TFT_Driver
  7612. Fmemory TFT_Memory
  7613. Fstream TFT_Stream
  7614. Fsizes_list TFT_ListRec
  7615. Fautohint TFT_Generic
  7616. Fextensions uintptr
  7617. Finternal TFT_Face_Internal
  7618. }
  7619. type TFT_Size = uintptr
  7620. type TFT_SizeRec_ = struct {
  7621. Fface TFT_Face
  7622. Fgeneric TFT_Generic
  7623. Fmetrics TFT_Size_Metrics
  7624. Finternal TFT_Size_Internal
  7625. }
  7626. type TFT_GlyphSlot = uintptr
  7627. type TFT_GlyphSlotRec_ = struct {
  7628. Flibrary TFT_Library
  7629. Fface TFT_Face
  7630. Fnext TFT_GlyphSlot
  7631. Fglyph_index TFT_UInt
  7632. Fgeneric TFT_Generic
  7633. Fmetrics TFT_Glyph_Metrics
  7634. FlinearHoriAdvance TFT_Fixed
  7635. FlinearVertAdvance TFT_Fixed
  7636. Fadvance TFT_Vector
  7637. Fformat TFT_Glyph_Format
  7638. Fbitmap TFT_Bitmap
  7639. Fbitmap_left TFT_Int
  7640. Fbitmap_top TFT_Int
  7641. Foutline TFT_Outline
  7642. Fnum_subglyphs TFT_UInt
  7643. Fsubglyphs TFT_SubGlyph
  7644. Fcontrol_data uintptr
  7645. Fcontrol_len int32
  7646. Flsb_delta TFT_Pos
  7647. Frsb_delta TFT_Pos
  7648. Fother uintptr
  7649. Finternal TFT_Slot_Internal
  7650. }
  7651. type TFT_CharMap = uintptr
  7652. type TFT_CharMapRec_ = struct {
  7653. Fface TFT_Face
  7654. Fencoding TFT_Encoding
  7655. Fplatform_id TFT_UShort
  7656. Fencoding_id TFT_UShort
  7657. }
  7658. type _FT_Encoding_ = int32
  7659. const _FT_ENCODING_NONE = 0
  7660. const _FT_ENCODING_MS_SYMBOL = 1937337698
  7661. const _FT_ENCODING_UNICODE = 1970170211
  7662. const _FT_ENCODING_SJIS = 1936353651
  7663. const _FT_ENCODING_PRC = 1734484000
  7664. const _FT_ENCODING_BIG5 = 1651074869
  7665. const _FT_ENCODING_WANSUNG = 2002873971
  7666. const _FT_ENCODING_JOHAB = 1785686113
  7667. const _FT_ENCODING_GB2312 = 1734484000
  7668. const _FT_ENCODING_MS_SJIS = 1936353651
  7669. const _FT_ENCODING_MS_GB2312 = 1734484000
  7670. const _FT_ENCODING_MS_BIG5 = 1651074869
  7671. const _FT_ENCODING_MS_WANSUNG = 2002873971
  7672. const _FT_ENCODING_MS_JOHAB = 1785686113
  7673. const _FT_ENCODING_ADOBE_STANDARD = 1094995778
  7674. const _FT_ENCODING_ADOBE_EXPERT = 1094992453
  7675. const _FT_ENCODING_ADOBE_CUSTOM = 1094992451
  7676. const _FT_ENCODING_ADOBE_LATIN_1 = 1818326065
  7677. const _FT_ENCODING_OLD_LATIN_2 = 1818326066
  7678. const _FT_ENCODING_APPLE_ROMAN = 1634889070
  7679. type TFT_Encoding = int32
  7680. type TFT_CharMapRec = struct {
  7681. Fface TFT_Face
  7682. Fencoding TFT_Encoding
  7683. Fplatform_id TFT_UShort
  7684. Fencoding_id TFT_UShort
  7685. }
  7686. type TFT_Face_Internal = uintptr
  7687. type TFT_FaceRec = struct {
  7688. Fnum_faces TFT_Long
  7689. Fface_index TFT_Long
  7690. Fface_flags TFT_Long
  7691. Fstyle_flags TFT_Long
  7692. Fnum_glyphs TFT_Long
  7693. Ffamily_name uintptr
  7694. Fstyle_name uintptr
  7695. Fnum_fixed_sizes TFT_Int
  7696. Favailable_sizes uintptr
  7697. Fnum_charmaps TFT_Int
  7698. Fcharmaps uintptr
  7699. Fgeneric TFT_Generic
  7700. Fbbox TFT_BBox
  7701. Funits_per_EM TFT_UShort
  7702. Fascender TFT_Short
  7703. Fdescender TFT_Short
  7704. Fheight TFT_Short
  7705. Fmax_advance_width TFT_Short
  7706. Fmax_advance_height TFT_Short
  7707. Funderline_position TFT_Short
  7708. Funderline_thickness TFT_Short
  7709. Fglyph TFT_GlyphSlot
  7710. Fsize TFT_Size
  7711. Fcharmap TFT_CharMap
  7712. Fdriver TFT_Driver
  7713. Fmemory TFT_Memory
  7714. Fstream TFT_Stream
  7715. Fsizes_list TFT_ListRec
  7716. Fautohint TFT_Generic
  7717. Fextensions uintptr
  7718. Finternal TFT_Face_Internal
  7719. }
  7720. type TFT_Size_Internal = uintptr
  7721. type TFT_Size_Metrics = struct {
  7722. Fx_ppem TFT_UShort
  7723. Fy_ppem TFT_UShort
  7724. Fx_scale TFT_Fixed
  7725. Fy_scale TFT_Fixed
  7726. Fascender TFT_Pos
  7727. Fdescender TFT_Pos
  7728. Fheight TFT_Pos
  7729. Fmax_advance TFT_Pos
  7730. }
  7731. type TFT_Size_Metrics_ = TFT_Size_Metrics
  7732. type TFT_SizeRec = struct {
  7733. Fface TFT_Face
  7734. Fgeneric TFT_Generic
  7735. Fmetrics TFT_Size_Metrics
  7736. Finternal TFT_Size_Internal
  7737. }
  7738. type TFT_SubGlyph = uintptr
  7739. type TFT_Slot_Internal = uintptr
  7740. type TFT_GlyphSlotRec = struct {
  7741. Flibrary TFT_Library
  7742. Fface TFT_Face
  7743. Fnext TFT_GlyphSlot
  7744. Fglyph_index TFT_UInt
  7745. Fgeneric TFT_Generic
  7746. Fmetrics TFT_Glyph_Metrics
  7747. FlinearHoriAdvance TFT_Fixed
  7748. FlinearVertAdvance TFT_Fixed
  7749. Fadvance TFT_Vector
  7750. Fformat TFT_Glyph_Format
  7751. Fbitmap TFT_Bitmap
  7752. Fbitmap_left TFT_Int
  7753. Fbitmap_top TFT_Int
  7754. Foutline TFT_Outline
  7755. Fnum_subglyphs TFT_UInt
  7756. Fsubglyphs TFT_SubGlyph
  7757. Fcontrol_data uintptr
  7758. Fcontrol_len int32
  7759. Flsb_delta TFT_Pos
  7760. Frsb_delta TFT_Pos
  7761. Fother uintptr
  7762. Finternal TFT_Slot_Internal
  7763. }
  7764. type TFT_Parameter = struct {
  7765. Ftag TFT_ULong
  7766. Fdata TFT_Pointer
  7767. }
  7768. type TFT_Parameter_ = TFT_Parameter
  7769. type TFT_Open_Args = struct {
  7770. Fflags TFT_UInt
  7771. Fmemory_base uintptr
  7772. Fmemory_size TFT_Long
  7773. Fpathname uintptr
  7774. Fstream TFT_Stream
  7775. Fdriver TFT_Module
  7776. Fnum_params TFT_Int
  7777. Fparams uintptr
  7778. }
  7779. type TFT_Open_Args_ = TFT_Open_Args
  7780. type TFT_Size_Request_Type = int32
  7781. type _FT_Size_Request_Type_ = int32
  7782. const _FT_SIZE_REQUEST_TYPE_NOMINAL = 0
  7783. const _FT_SIZE_REQUEST_TYPE_REAL_DIM = 1
  7784. const _FT_SIZE_REQUEST_TYPE_BBOX = 2
  7785. const _FT_SIZE_REQUEST_TYPE_CELL = 3
  7786. const _FT_SIZE_REQUEST_TYPE_SCALES = 4
  7787. const _FT_SIZE_REQUEST_TYPE_MAX = 5
  7788. type TFT_Size_RequestRec = struct {
  7789. Ftype1 TFT_Size_Request_Type
  7790. Fwidth TFT_Long
  7791. Fheight TFT_Long
  7792. FhoriResolution TFT_UInt
  7793. FvertResolution TFT_UInt
  7794. }
  7795. type TFT_Size_RequestRec_ = TFT_Size_RequestRec
  7796. type TFT_Size_Request = uintptr
  7797. type TFT_Render_Mode = int32
  7798. type _FT_Render_Mode_ = int32
  7799. const _FT_RENDER_MODE_NORMAL = 0
  7800. const _FT_RENDER_MODE_LIGHT = 1
  7801. const _FT_RENDER_MODE_MONO = 2
  7802. const _FT_RENDER_MODE_LCD = 3
  7803. const _FT_RENDER_MODE_LCD_V = 4
  7804. const _FT_RENDER_MODE_SDF = 5
  7805. const _FT_RENDER_MODE_MAX = 6
  7806. type TFT_Kerning_Mode = int32
  7807. type _FT_Kerning_Mode_ = int32
  7808. const _FT_KERNING_DEFAULT = 0
  7809. const _FT_KERNING_UNFITTED = 1
  7810. const _FT_KERNING_UNSCALED = 2
  7811. type Tstat = struct {
  7812. Fst_dev Tdev_t
  7813. F__st_dev_padding int32
  7814. F__st_ino_truncated int32
  7815. Fst_mode Tmode_t
  7816. Fst_nlink Tnlink_t
  7817. Fst_uid Tuid_t
  7818. Fst_gid Tgid_t
  7819. Fst_rdev Tdev_t
  7820. F__st_rdev_padding int32
  7821. Fst_size Toff_t
  7822. Fst_blksize Tblksize_t
  7823. Fst_blocks Tblkcnt_t
  7824. F__st_atim32 struct {
  7825. Ftv_sec int32
  7826. Ftv_nsec int32
  7827. }
  7828. F__st_mtim32 struct {
  7829. Ftv_sec int32
  7830. Ftv_nsec int32
  7831. }
  7832. F__st_ctim32 struct {
  7833. Ftv_sec int32
  7834. Ftv_nsec int32
  7835. }
  7836. Fst_ino Tino_t
  7837. Fst_atim Ttimespec
  7838. Fst_mtim Ttimespec
  7839. Fst_ctim Ttimespec
  7840. }
  7841. type Tstatx_timestamp = struct {
  7842. Ftv_sec Tint64_t
  7843. Ftv_nsec Tuint32_t
  7844. F__pad Tuint32_t
  7845. }
  7846. type Tstatx = struct {
  7847. Fstx_mask Tuint32_t
  7848. Fstx_blksize Tuint32_t
  7849. Fstx_attributes Tuint64_t
  7850. Fstx_nlink Tuint32_t
  7851. Fstx_uid Tuint32_t
  7852. Fstx_gid Tuint32_t
  7853. Fstx_mode Tuint16_t
  7854. F__pad0 [1]Tuint16_t
  7855. Fstx_ino Tuint64_t
  7856. Fstx_size Tuint64_t
  7857. Fstx_blocks Tuint64_t
  7858. Fstx_attributes_mask Tuint64_t
  7859. Fstx_atime Tstatx_timestamp
  7860. Fstx_btime Tstatx_timestamp
  7861. Fstx_ctime Tstatx_timestamp
  7862. Fstx_mtime Tstatx_timestamp
  7863. Fstx_rdev_major Tuint32_t
  7864. Fstx_rdev_minor Tuint32_t
  7865. Fstx_dev_major Tuint32_t
  7866. Fstx_dev_minor Tuint32_t
  7867. F__pad1 [14]Tuint64_t
  7868. }
  7869. type TFcChar8 = uint8
  7870. type TFcChar16 = uint16
  7871. type TFcChar32 = uint32
  7872. type TFcBool = int32
  7873. type TFcType = int32
  7874. type __FcType = int32
  7875. const _FcTypeUnknown = -1
  7876. const _FcTypeVoid = 0
  7877. const _FcTypeInteger = 1
  7878. const _FcTypeDouble = 2
  7879. const _FcTypeString = 3
  7880. const _FcTypeBool = 4
  7881. const _FcTypeMatrix = 5
  7882. const _FcTypeCharSet = 6
  7883. const _FcTypeFTFace = 7
  7884. const _FcTypeLangSet = 8
  7885. const _FcTypeRange = 9
  7886. type TFcMatrix = struct {
  7887. Fxx float64
  7888. Fxy float64
  7889. Fyx float64
  7890. Fyy float64
  7891. }
  7892. type T_FcMatrix = TFcMatrix
  7893. type TFcObjectType = struct {
  7894. Fobject uintptr
  7895. Ftype1 TFcType
  7896. }
  7897. type T_FcObjectType = TFcObjectType
  7898. type TFcConstant = struct {
  7899. Fname uintptr
  7900. Fobject uintptr
  7901. Fvalue int32
  7902. }
  7903. type T_FcConstant = TFcConstant
  7904. type TFcResult = int32
  7905. type __FcResult = int32
  7906. const _FcResultMatch = 0
  7907. const _FcResultNoMatch = 1
  7908. const _FcResultTypeMismatch = 2
  7909. const _FcResultNoId = 3
  7910. const _FcResultOutOfMemory = 4
  7911. type TFcValueBinding = int32
  7912. type __FcValueBinding = int32
  7913. const _FcValueBindingWeak = 0
  7914. const _FcValueBindingStrong = 1
  7915. const _FcValueBindingSame = 2
  7916. const _FcValueBindingEnd = 2147483647
  7917. type TFcPatternIter = struct {
  7918. Fdummy1 uintptr
  7919. Fdummy2 uintptr
  7920. }
  7921. type T_FcPatternIter = TFcPatternIter
  7922. type TFcValue = struct {
  7923. Ftype1 TFcType
  7924. Fu struct {
  7925. Fi [0]int32
  7926. Fb [0]TFcBool
  7927. Fd [0]float64
  7928. Fm [0]uintptr
  7929. Fc [0]uintptr
  7930. Ff [0]uintptr
  7931. Fl [0]uintptr
  7932. Fr [0]uintptr
  7933. Fs uintptr
  7934. F__ccgo_pad9 [4]byte
  7935. }
  7936. }
  7937. type T_FcValue = TFcValue
  7938. type TFcFontSet = struct {
  7939. Fnfont int32
  7940. Fsfont int32
  7941. Ffonts uintptr
  7942. }
  7943. type T_FcFontSet = TFcFontSet
  7944. type TFcObjectSet = struct {
  7945. Fnobject int32
  7946. Fsobject int32
  7947. Fobjects uintptr
  7948. }
  7949. type T_FcObjectSet = TFcObjectSet
  7950. type TFcMatchKind = int32
  7951. type __FcMatchKind = int32
  7952. const _FcMatchPattern = 0
  7953. const _FcMatchFont = 1
  7954. const _FcMatchScan = 2
  7955. const _FcMatchKindEnd = 3
  7956. const _FcMatchKindBegin = 0
  7957. type TFcLangResult = int32
  7958. type __FcLangResult = int32
  7959. const _FcLangEqual = 0
  7960. const _FcLangDifferentCountry = 1
  7961. const _FcLangDifferentTerritory = 1
  7962. const _FcLangDifferentLang = 2
  7963. type TFcSetName = int32
  7964. type __FcSetName = int32
  7965. const _FcSetSystem = 0
  7966. const _FcSetApplication = 1
  7967. type TFcConfigFileInfoIter = struct {
  7968. Fdummy1 uintptr
  7969. Fdummy2 uintptr
  7970. Fdummy3 uintptr
  7971. }
  7972. type T_FcConfigFileInfoIter = TFcConfigFileInfoIter
  7973. type TFcEndian = int32
  7974. const _FcEndianBig = 0
  7975. const _FcEndianLittle = 1
  7976. type Tpointer = uintptr
  7977. type TClientPtr = uintptr
  7978. type TFontPtr = uintptr
  7979. type TFSID = uint32
  7980. type TAccContext = uint32
  7981. type TOSTimePtr = uintptr
  7982. type TBlockHandlerProcPtr = uintptr
  7983. type TGlyph = uint32
  7984. type TGlyphSet = uint32
  7985. type TPicture = uint32
  7986. type TPictFormat = uint32
  7987. type TXRenderDirectFormat = struct {
  7988. Fred int16
  7989. FredMask int16
  7990. Fgreen int16
  7991. FgreenMask int16
  7992. Fblue int16
  7993. FblueMask int16
  7994. Falpha int16
  7995. FalphaMask int16
  7996. }
  7997. type TXRenderPictFormat = struct {
  7998. Fid TPictFormat
  7999. Ftype1 int32
  8000. Fdepth int32
  8001. Fdirect TXRenderDirectFormat
  8002. Fcolormap TColormap
  8003. }
  8004. type TXRenderPictureAttributes = struct {
  8005. Frepeat int32
  8006. Falpha_map TPicture
  8007. Falpha_x_origin int32
  8008. Falpha_y_origin int32
  8009. Fclip_x_origin int32
  8010. Fclip_y_origin int32
  8011. Fclip_mask TPixmap
  8012. Fgraphics_exposures int32
  8013. Fsubwindow_mode int32
  8014. Fpoly_edge int32
  8015. Fpoly_mode int32
  8016. Fdither TAtom
  8017. Fcomponent_alpha int32
  8018. }
  8019. type T_XRenderPictureAttributes = TXRenderPictureAttributes
  8020. type TXRenderColor = struct {
  8021. Fred uint16
  8022. Fgreen uint16
  8023. Fblue uint16
  8024. Falpha uint16
  8025. }
  8026. type TXGlyphInfo = struct {
  8027. Fwidth uint16
  8028. Fheight uint16
  8029. Fx int16
  8030. Fy int16
  8031. FxOff int16
  8032. FyOff int16
  8033. }
  8034. type T_XGlyphInfo = TXGlyphInfo
  8035. type TXGlyphElt8 = struct {
  8036. Fglyphset TGlyphSet
  8037. Fchars uintptr
  8038. Fnchars int32
  8039. FxOff int32
  8040. FyOff int32
  8041. }
  8042. type T_XGlyphElt8 = TXGlyphElt8
  8043. type TXGlyphElt16 = struct {
  8044. Fglyphset TGlyphSet
  8045. Fchars uintptr
  8046. Fnchars int32
  8047. FxOff int32
  8048. FyOff int32
  8049. }
  8050. type T_XGlyphElt16 = TXGlyphElt16
  8051. type TXGlyphElt32 = struct {
  8052. Fglyphset TGlyphSet
  8053. Fchars uintptr
  8054. Fnchars int32
  8055. FxOff int32
  8056. FyOff int32
  8057. }
  8058. type T_XGlyphElt32 = TXGlyphElt32
  8059. type TXDouble = float64
  8060. type TXPointDouble = struct {
  8061. Fx TXDouble
  8062. Fy TXDouble
  8063. }
  8064. type T_XPointDouble = TXPointDouble
  8065. type TXFixed = int32
  8066. type TXPointFixed = struct {
  8067. Fx TXFixed
  8068. Fy TXFixed
  8069. }
  8070. type T_XPointFixed = TXPointFixed
  8071. type TXLineFixed = struct {
  8072. Fp1 TXPointFixed
  8073. Fp2 TXPointFixed
  8074. }
  8075. type T_XLineFixed = TXLineFixed
  8076. type TXTriangle = struct {
  8077. Fp1 TXPointFixed
  8078. Fp2 TXPointFixed
  8079. Fp3 TXPointFixed
  8080. }
  8081. type T_XTriangle = TXTriangle
  8082. type TXCircle = struct {
  8083. Fx TXFixed
  8084. Fy TXFixed
  8085. Fradius TXFixed
  8086. }
  8087. type T_XCircle = TXCircle
  8088. type TXTrapezoid = struct {
  8089. Ftop TXFixed
  8090. Fbottom TXFixed
  8091. Fleft TXLineFixed
  8092. Fright TXLineFixed
  8093. }
  8094. type T_XTrapezoid = TXTrapezoid
  8095. type TXTransform = struct {
  8096. Fmatrix [3][3]TXFixed
  8097. }
  8098. type T_XTransform = TXTransform
  8099. type TXFilters = struct {
  8100. Fnfilter int32
  8101. Ffilter uintptr
  8102. Fnalias int32
  8103. Falias uintptr
  8104. }
  8105. type T_XFilters = TXFilters
  8106. type TXIndexValue = struct {
  8107. Fpixel uint32
  8108. Fred uint16
  8109. Fgreen uint16
  8110. Fblue uint16
  8111. Falpha uint16
  8112. }
  8113. type T_XIndexValue = TXIndexValue
  8114. type TXAnimCursor = struct {
  8115. Fcursor TCursor
  8116. Fdelay uint32
  8117. }
  8118. type T_XAnimCursor = TXAnimCursor
  8119. type TXSpanFix = struct {
  8120. Fleft TXFixed
  8121. Fright TXFixed
  8122. Fy TXFixed
  8123. }
  8124. type T_XSpanFix = TXSpanFix
  8125. type TXTrap = struct {
  8126. Ftop TXSpanFix
  8127. Fbottom TXSpanFix
  8128. }
  8129. type T_XTrap = TXTrap
  8130. type TXLinearGradient = struct {
  8131. Fp1 TXPointFixed
  8132. Fp2 TXPointFixed
  8133. }
  8134. type T_XLinearGradient = TXLinearGradient
  8135. type TXRadialGradient = struct {
  8136. Finner TXCircle
  8137. Fouter TXCircle
  8138. }
  8139. type T_XRadialGradient = TXRadialGradient
  8140. type TXConicalGradient = struct {
  8141. Fcenter TXPointFixed
  8142. Fangle TXFixed
  8143. }
  8144. type T_XConicalGradient = TXConicalGradient
  8145. type TXftFontInfo = struct {
  8146. Fhash TFcChar32
  8147. Ffile uintptr
  8148. Fxsize TFT_F26Dot6
  8149. Fysize TFT_F26Dot6
  8150. Fantialias TFcBool
  8151. Fembolden TFcBool
  8152. Fcolor TFcBool
  8153. Frgba int32
  8154. Flcd_filter int32
  8155. Fmatrix TFT_Matrix
  8156. Ftransform TFcBool
  8157. Fload_flags TFT_Int
  8158. Frender TFcBool
  8159. Fspacing int32
  8160. Fminspace TFcBool
  8161. Fchar_width int32
  8162. }
  8163. type T_XftFontInfo = TXftFontInfo
  8164. type TXftFont = struct {
  8165. Fascent int32
  8166. Fdescent int32
  8167. Fheight int32
  8168. Fmax_advance_width int32
  8169. Fcharset uintptr
  8170. Fpattern uintptr
  8171. }
  8172. type T_XftFont = TXftFont
  8173. type TXftDraw = struct {
  8174. Fdpy uintptr
  8175. Fscreen int32
  8176. Fbits_per_pixel uint32
  8177. Fdepth uint32
  8178. Fdrawable TDrawable
  8179. Fvisual uintptr
  8180. Fcolormap TColormap
  8181. Fclip_type TXftClipType
  8182. Fclip TXftClip
  8183. Fsubwindow_mode int32
  8184. Frender struct {
  8185. Fpict TPicture
  8186. }
  8187. Fcore struct {
  8188. Fgc TGC
  8189. Fuse_pixmap int32
  8190. }
  8191. }
  8192. type T_XftDraw = TXftDraw
  8193. type __XftClipType = int32
  8194. const _XftClipTypeNone = 0
  8195. const _XftClipTypeRegion = 1
  8196. const _XftClipTypeRectangles = 2
  8197. type TXftColor = struct {
  8198. Fpixel uint32
  8199. Fcolor TXRenderColor
  8200. }
  8201. type T_XftColor = TXftColor
  8202. type TXftCharSpec = struct {
  8203. Fucs4 TFcChar32
  8204. Fx int16
  8205. Fy int16
  8206. }
  8207. type T_XftCharSpec = TXftCharSpec
  8208. type TXftCharFontSpec = struct {
  8209. Ffont uintptr
  8210. Fucs4 TFcChar32
  8211. Fx int16
  8212. Fy int16
  8213. }
  8214. type T_XftCharFontSpec = TXftCharFontSpec
  8215. type TXftGlyphSpec = struct {
  8216. Fglyph TFT_UInt
  8217. Fx int16
  8218. Fy int16
  8219. }
  8220. type T_XftGlyphSpec = TXftGlyphSpec
  8221. type TXftGlyphFontSpec = struct {
  8222. Ffont uintptr
  8223. Fglyph TFT_UInt
  8224. Fx int16
  8225. Fy int16
  8226. }
  8227. type T_XftGlyphFontSpec = TXftGlyphFontSpec
  8228. type TXftMatcher = struct {
  8229. Fobject uintptr
  8230. Fcompare uintptr
  8231. }
  8232. type T_XftMatcher = TXftMatcher
  8233. type TXftSymbolic = struct {
  8234. Fname uintptr
  8235. Fvalue int32
  8236. }
  8237. type T_XftSymbolic = TXftSymbolic
  8238. type TXftGlyph = struct {
  8239. Fmetrics TXGlyphInfo
  8240. Fbitmap uintptr
  8241. Fglyph_memory uint32
  8242. Fpicture TPicture
  8243. }
  8244. type T_XftGlyph = TXftGlyph
  8245. type TXftGlyphUsage = struct {
  8246. Fcontents TXftGlyph
  8247. Fnewer TFT_UInt
  8248. Folder TFT_UInt
  8249. }
  8250. type T_XftGlyphUsage = TXftGlyphUsage
  8251. type TXftUcsHash = struct {
  8252. Fucs4 TFcChar32
  8253. Fglyph TFT_UInt
  8254. }
  8255. type T_XftUcsHash = TXftUcsHash
  8256. type TXftFtFile = struct {
  8257. Fnext uintptr
  8258. Fref int32
  8259. Ffile uintptr
  8260. Fid int32
  8261. Fxsize TFT_F26Dot6
  8262. Fysize TFT_F26Dot6
  8263. Fmatrix TFT_Matrix
  8264. Flock int32
  8265. Fface TFT_Face
  8266. }
  8267. type T_XftFtFile = TXftFtFile
  8268. type TXftFontInt = struct {
  8269. Fpublic TXftFont
  8270. Fnext uintptr
  8271. Fhash_next uintptr
  8272. Finfo TXftFontInfo
  8273. Fref int32
  8274. Fglyphs uintptr
  8275. Fnum_glyphs TFT_UInt
  8276. Fhash_table uintptr
  8277. Fhash_value int32
  8278. Frehash_value int32
  8279. Fglyphset TGlyphSet
  8280. Fformat uintptr
  8281. Fglyph_memory uint32
  8282. Fmax_glyph_memory uint32
  8283. Fsizeof_glyph uint32
  8284. Fnewest TFT_UInt
  8285. Ftotal_inuse TFT_UInt
  8286. Ftrack_mem_usage TFcBool
  8287. Fuse_free_glyphs TFcBool
  8288. }
  8289. type T_XftFontInt = TXftFontInt
  8290. type TXftClipType = int32
  8291. type TXftClipRect = struct {
  8292. FxOrigin int32
  8293. FyOrigin int32
  8294. Fn int32
  8295. }
  8296. type T_XftClipRect = TXftClipRect
  8297. type TXftClip = struct {
  8298. Fregion [0]TRegion
  8299. Frect uintptr
  8300. }
  8301. type T_XftClip = TXftClip
  8302. type TXftSolidColor = struct {
  8303. Fcolor TXRenderColor
  8304. Fscreen int32
  8305. Fpict TPicture
  8306. }
  8307. type T_XftSolidColor = TXftSolidColor
  8308. type TXftDisplayInfo = struct {
  8309. Fnext uintptr
  8310. Fdisplay uintptr
  8311. Fcodes uintptr
  8312. Fdefaults uintptr
  8313. FhasRender TFcBool
  8314. FhasSolid TFcBool
  8315. Ffonts uintptr
  8316. FsolidFormat uintptr
  8317. Fglyph_memory uint32
  8318. Fmax_glyph_memory uint32
  8319. Ftrack_mem_usage TFcBool
  8320. Fuse_free_glyphs TFcBool
  8321. Fnum_unref_fonts int32
  8322. Fmax_unref_fonts int32
  8323. Fcolors [16]TXftSolidColor
  8324. FfontHash [127]uintptr
  8325. }
  8326. type T_XftDisplayInfo = TXftDisplayInfo
  8327. type TXFT_MEM_KIND = int32
  8328. const _XFT_MEM_DRAW = 0
  8329. const _XFT_MEM_FONT = 1
  8330. const _XFT_MEM_FILE = 2
  8331. const _XFT_MEM_GLYPH = 3
  8332. const _XFT_MEM_NUM = 4
  8333. /* xftxlfd.c */
  8334. func XXftColorAllocName(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, name uintptr, result uintptr) (r int32) {
  8335. bp := tls.Alloc(32)
  8336. defer tls.Free(32)
  8337. var _ /* exact at bp+12 */ TXColor
  8338. var _ /* screen at bp+0 */ TXColor
  8339. if !(libx11.XXAllocNamedColor(tls, dpy, cmap, name, bp, bp+12) != 0) {
  8340. /* XXX stick standard colormap stuff here */
  8341. return m_False
  8342. }
  8343. (*TXftColor)(unsafe.Pointer(result)).Fpixel = (*(*TXColor)(unsafe.Pointer(bp))).Fpixel
  8344. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fred = (*(*TXColor)(unsafe.Pointer(bp + 12))).Fred
  8345. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fgreen = (*(*TXColor)(unsafe.Pointer(bp + 12))).Fgreen
  8346. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fblue = (*(*TXColor)(unsafe.Pointer(bp + 12))).Fblue
  8347. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Falpha = uint16(0xffff)
  8348. return int32(m_True)
  8349. }
  8350. func _maskbase(tls *libc.TLS, m uint32) (r int16) {
  8351. var i int16
  8352. _ = i
  8353. if !(m != 0) {
  8354. return 0
  8355. }
  8356. i = 0
  8357. for !(m&libc.Uint32FromInt32(1) != 0) {
  8358. m >>= uint32(1)
  8359. i++
  8360. }
  8361. return i
  8362. }
  8363. func _masklen(tls *libc.TLS, m uint32) (r int16) {
  8364. var y uint32
  8365. _ = y
  8366. y = m >> int32(1) & uint32(033333333333)
  8367. y = m - y - y>>int32(1)&uint32(033333333333)
  8368. return libc.Int16FromUint32((y + y>>libc.Int32FromInt32(3)) & libc.Uint32FromUint32(030707070707) % libc.Uint32FromInt32(077))
  8369. }
  8370. func XXftColorAllocValue(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, color uintptr, result uintptr) (r int32) {
  8371. bp := tls.Alloc(16)
  8372. defer tls.Free(16)
  8373. var blue_len, blue_shift, green_len, green_shift, red_len, red_shift int32
  8374. var _ /* xcolor at bp+0 */ TXColor
  8375. _, _, _, _, _, _ = blue_len, blue_shift, green_len, green_shift, red_len, red_shift
  8376. if (*TVisual)(unsafe.Pointer(visual)).Fclass == int32(m_TrueColor) {
  8377. red_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fred_mask))
  8378. red_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fred_mask))
  8379. green_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fgreen_mask))
  8380. green_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fgreen_mask))
  8381. blue_shift = int32(_maskbase(tls, (*TVisual)(unsafe.Pointer(visual)).Fblue_mask))
  8382. blue_len = int32(_masklen(tls, (*TVisual)(unsafe.Pointer(visual)).Fblue_mask))
  8383. (*TXftColor)(unsafe.Pointer(result)).Fpixel = libc.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)
  8384. } else {
  8385. (*(*TXColor)(unsafe.Pointer(bp))).Fred = (*TXRenderColor)(unsafe.Pointer(color)).Fred
  8386. (*(*TXColor)(unsafe.Pointer(bp))).Fgreen = (*TXRenderColor)(unsafe.Pointer(color)).Fgreen
  8387. (*(*TXColor)(unsafe.Pointer(bp))).Fblue = (*TXRenderColor)(unsafe.Pointer(color)).Fblue
  8388. if !(libx11.XXAllocColor(tls, dpy, cmap, bp) != 0) {
  8389. return m_False
  8390. }
  8391. (*TXftColor)(unsafe.Pointer(result)).Fpixel = (*(*TXColor)(unsafe.Pointer(bp))).Fpixel
  8392. }
  8393. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fred = (*TXRenderColor)(unsafe.Pointer(color)).Fred
  8394. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fgreen = (*TXRenderColor)(unsafe.Pointer(color)).Fgreen
  8395. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Fblue = (*TXRenderColor)(unsafe.Pointer(color)).Fblue
  8396. (*TXftColor)(unsafe.Pointer(result)).Fcolor.Falpha = (*TXRenderColor)(unsafe.Pointer(color)).Falpha
  8397. return int32(m_True)
  8398. }
  8399. func XXftColorFree(tls *libc.TLS, dpy uintptr, visual uintptr, cmap TColormap, color uintptr) {
  8400. if (*TVisual)(unsafe.Pointer(visual)).Fclass != int32(m_TrueColor) {
  8401. libx11.XXFreeColors(tls, dpy, cmap, color, int32(1), uint32(0))
  8402. }
  8403. }
  8404. type Tfuncs = struct {
  8405. Fcreate_image uintptr
  8406. Fdestroy_image uintptr
  8407. Fget_pixel uintptr
  8408. Fput_pixel uintptr
  8409. Fsub_image uintptr
  8410. Fadd_pixel uintptr
  8411. }
  8412. const m_NUM_LOCAL = 1024
  8413. /* xftxlfd.c */
  8414. func XXftRectCore(tls *libc.TLS, draw uintptr, color uintptr, x int32, y int32, width uint32, height uint32) {
  8415. if libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >= int32(0x8000) {
  8416. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  8417. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, x, y, width, height)
  8418. }
  8419. }
  8420. /*
  8421. * Use the core protocol to draw the glyphs
  8422. */
  8423. func __XftSharpGlyphMono(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8424. var bits, bitsMask uint8
  8425. var height, lenspan, stride, w, width, xspan, v1 int32
  8426. var src, srcLine, v2, v3, v4 uintptr
  8427. _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, bitsMask, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8428. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8429. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8430. stride = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  8431. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8432. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8433. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8434. for {
  8435. v1 = height
  8436. height--
  8437. if !(v1 != 0) {
  8438. break
  8439. }
  8440. src = srcLine
  8441. srcLine += uintptr(stride)
  8442. w = width
  8443. bitsMask = uint8(0x80) /* FreeType is always MSB first */
  8444. v2 = src
  8445. src++
  8446. bits = *(*uint8)(unsafe.Pointer(v2))
  8447. xspan = x
  8448. for w != 0 {
  8449. if libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0 {
  8450. lenspan = 0
  8451. for cond := true; cond; cond = libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0 {
  8452. lenspan++
  8453. if lenspan == w {
  8454. break
  8455. }
  8456. bitsMask = libc.Uint8FromInt32(libc.Int32FromUint8(bitsMask) >> int32(1))
  8457. if !(bitsMask != 0) {
  8458. v3 = src
  8459. src++
  8460. bits = *(*uint8)(unsafe.Pointer(v3))
  8461. bitsMask = uint8(0x80)
  8462. }
  8463. }
  8464. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, xspan, y, libc.Uint32FromInt32(lenspan), uint32(1))
  8465. xspan += lenspan
  8466. w -= lenspan
  8467. } else {
  8468. for cond := true; cond; cond = !(libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0) {
  8469. w--
  8470. xspan++
  8471. if !(w != 0) {
  8472. break
  8473. }
  8474. bitsMask = libc.Uint8FromInt32(libc.Int32FromUint8(bitsMask) >> int32(1))
  8475. if !(bitsMask != 0) {
  8476. v4 = src
  8477. src++
  8478. bits = *(*uint8)(unsafe.Pointer(v4))
  8479. bitsMask = uint8(0x80)
  8480. }
  8481. }
  8482. }
  8483. }
  8484. y++
  8485. }
  8486. }
  8487. // C documentation
  8488. //
  8489. // /*
  8490. // * Draw solid color text from an anti-aliased bitmap. This is a
  8491. // * fallback for cases where a particular drawable has no AA code
  8492. // */
  8493. func __XftSharpGlyphGray(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8494. var bits uint8
  8495. var height, lenspan, stride, w, width, xspan, v1 int32
  8496. var src, srcLine, v2, v3, v4 uintptr
  8497. _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8498. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8499. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8500. stride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8501. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8502. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8503. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8504. for {
  8505. v1 = height
  8506. height--
  8507. if !(v1 != 0) {
  8508. break
  8509. }
  8510. src = srcLine
  8511. srcLine += uintptr(stride)
  8512. w = width
  8513. v2 = src
  8514. src++
  8515. bits = *(*uint8)(unsafe.Pointer(v2))
  8516. xspan = x
  8517. for w != 0 {
  8518. if libc.Int32FromUint8(bits) >= int32(0x80) {
  8519. lenspan = 0
  8520. for cond := true; cond; cond = libc.Int32FromUint8(bits) >= int32(0x80) {
  8521. lenspan++
  8522. if lenspan == w {
  8523. break
  8524. }
  8525. v3 = src
  8526. src++
  8527. bits = *(*uint8)(unsafe.Pointer(v3))
  8528. }
  8529. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, xspan, y, libc.Uint32FromInt32(lenspan), uint32(1))
  8530. xspan += lenspan
  8531. w -= lenspan
  8532. } else {
  8533. for cond := true; cond; cond = libc.Int32FromUint8(bits) < int32(0x80) {
  8534. w--
  8535. xspan++
  8536. if !(w != 0) {
  8537. break
  8538. }
  8539. v4 = src
  8540. src++
  8541. bits = *(*uint8)(unsafe.Pointer(v4))
  8542. }
  8543. }
  8544. }
  8545. y++
  8546. }
  8547. }
  8548. func __XftSharpGlyphRgba(tls *libc.TLS, draw uintptr, glyph uintptr, x int32, y int32) {
  8549. var bits TCARD32
  8550. var height, lenspan, stride, w, width, xspan, v1 int32
  8551. var src, srcLine, v2, v3, v4 uintptr
  8552. _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, height, lenspan, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8553. srcLine = (*TXftGlyph)(unsafe.Pointer(glyph)).Fbitmap
  8554. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fwidth)
  8555. stride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8556. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fheight)
  8557. x -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fx)
  8558. y -= int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.Fy)
  8559. for {
  8560. v1 = height
  8561. height--
  8562. if !(v1 != 0) {
  8563. break
  8564. }
  8565. src = srcLine
  8566. srcLine += uintptr(stride) * 4
  8567. w = width
  8568. v2 = src
  8569. src += 4
  8570. bits = *(*TCARD32)(unsafe.Pointer(v2))
  8571. xspan = x
  8572. for w != 0 {
  8573. if bits >= uint32(0x80000000) {
  8574. lenspan = 0
  8575. for cond := true; cond; cond = bits >= uint32(0x80000000) {
  8576. lenspan++
  8577. if lenspan == w {
  8578. break
  8579. }
  8580. v3 = src
  8581. src += 4
  8582. bits = *(*TCARD32)(unsafe.Pointer(v3))
  8583. }
  8584. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, xspan, y, libc.Uint32FromInt32(lenspan), uint32(1))
  8585. xspan += lenspan
  8586. w -= lenspan
  8587. } else {
  8588. for cond := true; cond; cond = bits < uint32(0x80000000) {
  8589. w--
  8590. xspan++
  8591. if !(w != 0) {
  8592. break
  8593. }
  8594. v4 = src
  8595. src += 4
  8596. bits = *(*TCARD32)(unsafe.Pointer(v4))
  8597. }
  8598. }
  8599. }
  8600. y++
  8601. }
  8602. }
  8603. type TXftSharpGlyph = uintptr
  8604. func __XftSharpGlyphFind(tls *libc.TLS, draw uintptr, public uintptr) (r TXftSharpGlyph) {
  8605. var font uintptr
  8606. _ = font
  8607. font = public
  8608. if !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0) {
  8609. return __ccgo_fp(__XftSharpGlyphMono)
  8610. } else {
  8611. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  8612. case int32(m_FC_RGBA_RGB):
  8613. fallthrough
  8614. case int32(m_FC_RGBA_BGR):
  8615. fallthrough
  8616. case int32(m_FC_RGBA_VRGB):
  8617. fallthrough
  8618. case int32(m_FC_RGBA_VBGR):
  8619. return __ccgo_fp(__XftSharpGlyphRgba)
  8620. default:
  8621. return __ccgo_fp(__XftSharpGlyphGray)
  8622. }
  8623. }
  8624. return r
  8625. }
  8626. /*
  8627. * Draw glyphs to a target that supports anti-aliasing
  8628. */
  8629. /*
  8630. * Primitives for converting between RGB values and TrueColor pixels
  8631. */
  8632. func __XftExamineBitfield(tls *libc.TLS, mask uint32, shift uintptr, len1 uintptr) {
  8633. var l, s int32
  8634. _, _ = l, s
  8635. s = 0
  8636. for mask&uint32(1) == uint32(0) {
  8637. mask >>= uint32(1)
  8638. s++
  8639. }
  8640. l = 0
  8641. for mask&uint32(1) == uint32(1) {
  8642. mask >>= uint32(1)
  8643. l++
  8644. }
  8645. *(*int32)(unsafe.Pointer(shift)) = s
  8646. *(*int32)(unsafe.Pointer(len1)) = l
  8647. }
  8648. func __XftGetField(tls *libc.TLS, l_pixel uint32, shift int32, len1 int32) (r TCARD32) {
  8649. var pixel TCARD32
  8650. _ = pixel
  8651. pixel = l_pixel
  8652. pixel = pixel & libc.Uint32FromInt32((libc.Int32FromInt32(1)<<len1-libc.Int32FromInt32(1))<<shift)
  8653. pixel = pixel << (int32(32) - (shift + len1)) >> int32(24)
  8654. for len1 < int32(8) {
  8655. pixel |= pixel >> len1
  8656. len1 <<= int32(1)
  8657. }
  8658. return pixel
  8659. }
  8660. func __XftPutField(tls *libc.TLS, pixel TCARD32, shift int32, len1 int32) (r uint32) {
  8661. var l_pixel uint32
  8662. _ = l_pixel
  8663. l_pixel = pixel
  8664. shift = shift - (int32(8) - len1)
  8665. if len1 <= int32(8) {
  8666. l_pixel = l_pixel & libc.Uint32FromInt32((libc.Int32FromInt32(1)<<len1-libc.Int32FromInt32(1))<<(libc.Int32FromInt32(8)-len1))
  8667. }
  8668. if shift < 0 {
  8669. l_pixel >>= libc.Uint32FromInt32(-shift)
  8670. } else {
  8671. l_pixel <<= libc.Uint32FromInt32(shift)
  8672. }
  8673. return l_pixel
  8674. }
  8675. // C documentation
  8676. //
  8677. // /*
  8678. // * This is used when doing XftCharFontSpec/XftGlyphFontSpec where
  8679. // * some of the fonts are bitmaps and some are anti-aliased to handle
  8680. // * the bitmap portions
  8681. // */
  8682. func __XftSmoothGlyphMono(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8683. bp := tls.Alloc(32)
  8684. defer tls.Free(32)
  8685. var bits, bitsMask uint8
  8686. var height, stride, w, width, xspan, v1, v3 int32
  8687. var pixel uint32
  8688. var src, srcLine, v2, v4 uintptr
  8689. var _ /* b_len at bp+20 */ int32
  8690. var _ /* b_shift at bp+16 */ int32
  8691. var _ /* g_len at bp+12 */ int32
  8692. var _ /* g_shift at bp+8 */ int32
  8693. var _ /* r_len at bp+4 */ int32
  8694. var _ /* r_shift at bp+0 */ int32
  8695. _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bits, bitsMask, height, pixel, src, srcLine, stride, w, width, xspan, v1, v2, v3, v4
  8696. srcLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8697. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8698. stride = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  8699. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8700. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  8701. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  8702. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  8703. pixel = __XftPutField(tls, libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred)>>int32(8)), *(*int32)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4))) | __XftPutField(tls, libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen)>>int32(8)), *(*int32)(unsafe.Pointer(bp + 8)), *(*int32)(unsafe.Pointer(bp + 12))) | __XftPutField(tls, libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue)>>int32(8)), *(*int32)(unsafe.Pointer(bp + 16)), *(*int32)(unsafe.Pointer(bp + 20)))
  8704. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8705. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8706. for {
  8707. v1 = height
  8708. height--
  8709. if !(v1 != 0) {
  8710. break
  8711. }
  8712. src = srcLine
  8713. srcLine += uintptr(stride)
  8714. w = width
  8715. bitsMask = uint8(0x80) /* FreeType is always MSB first */
  8716. v2 = src
  8717. src++
  8718. bits = *(*uint8)(unsafe.Pointer(v2))
  8719. xspan = x
  8720. for {
  8721. v3 = w
  8722. w--
  8723. if !(v3 != 0) {
  8724. break
  8725. }
  8726. if libc.Int32FromUint8(bits)&libc.Int32FromUint8(bitsMask) != 0 {
  8727. (*(*func(*libc.TLS, uintptr, int32, int32, uint32) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, xspan, y, pixel)
  8728. }
  8729. bitsMask = libc.Uint8FromInt32(libc.Int32FromUint8(bitsMask) >> int32(1))
  8730. if !(bitsMask != 0) {
  8731. v4 = src
  8732. src++
  8733. bits = *(*uint8)(unsafe.Pointer(v4))
  8734. bitsMask = uint8(0x80)
  8735. }
  8736. xspan++
  8737. }
  8738. y++
  8739. }
  8740. }
  8741. /*
  8742. * As simple anti-aliasing is likely to be common, there are three
  8743. * optimized versions for the usual true color pixel formats (888, 565, 555).
  8744. * Other formats are handled by the general case
  8745. */
  8746. /*
  8747. * There are two ways of handling alpha -- either as a single unified value or
  8748. * a separate value for each component, hence each macro must have two
  8749. * versions. The unified alpha version has a 'U' at the end of the name,
  8750. * the component version has a 'C'. Similarly, functions which deal with
  8751. * this difference will have two versions using the same convention.
  8752. */
  8753. func _fbOver24(tls *libc.TLS, x TCARD32, y TCARD32) (r TCARD32) {
  8754. var a, t TCARD16
  8755. var m, n, o TCARD32
  8756. _, _, _, _, _ = a, m, n, o, t
  8757. a = uint16(^x >> libc.Int32FromInt32(24))
  8758. t = uint16(0)
  8759. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(y>>libc.Int32FromInt32(0))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8760. t = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8))) + libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(0)))))
  8761. m = uint32(libc.Uint8FromInt32(libc.Int32FromUint16(t)|(libc.Int32FromInt32(0)-libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(0)
  8762. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(y>>libc.Int32FromInt32(8))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8763. t = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8))) + libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(8)))))
  8764. n = uint32(libc.Uint8FromInt32(libc.Int32FromUint16(t)|(libc.Int32FromInt32(0)-libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(8)
  8765. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(y>>libc.Int32FromInt32(16))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8766. t = libc.Uint16FromInt32(libc.Int32FromUint16(libc.Uint16FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8))) + libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(16)))))
  8767. o = uint32(libc.Uint8FromInt32(libc.Int32FromUint16(t)|(libc.Int32FromInt32(0)-libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)))) << libc.Int32FromInt32(16)
  8768. return m | n | o
  8769. }
  8770. func _fbIn(tls *libc.TLS, x TCARD32, y TCARD8) (r TCARD32) {
  8771. var a, t TCARD16
  8772. var m, n, o, p TCARD32
  8773. _, _, _, _, _, _ = a, m, n, o, p, t
  8774. a = uint16(y)
  8775. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(0))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8776. m = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << 0
  8777. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(8))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8778. n = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << int32(8)
  8779. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(16))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8780. o = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << int32(16)
  8781. t = libc.Uint16FromInt32(libc.Int32FromUint16(uint16(uint8(x>>libc.Int32FromInt32(24))))*libc.Int32FromUint16(a) + libc.Int32FromInt32(0x80))
  8782. p = libc.Uint32FromInt32((libc.Int32FromUint16(t)>>libc.Int32FromInt32(8)+libc.Int32FromUint16(t))>>libc.Int32FromInt32(8)) << int32(24)
  8783. return m | n | o | p
  8784. }
  8785. func __XftSmoothGlyphGray8888(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8786. var b, d, g, r, src, srca TCARD32
  8787. var dst, dstLine, mask, maskLine, v3 uintptr
  8788. var dstStride, height, maskStride, w, width, v1, v2 int32
  8789. var m TCARD8
  8790. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8791. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8792. /* This handles only RGB and BGR */
  8793. g = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8794. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint32(0xff0000) {
  8795. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8796. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8797. } else {
  8798. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  8799. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  8800. }
  8801. src = srca<<libc.Int32FromInt32(24) | r | g | b
  8802. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8803. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8804. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8805. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8806. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(2))
  8807. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(2)
  8808. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8809. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8810. for {
  8811. v1 = height
  8812. height--
  8813. if !(v1 != 0) {
  8814. break
  8815. }
  8816. dst = dstLine
  8817. dstLine += uintptr(dstStride) * 4
  8818. mask = maskLine
  8819. maskLine += uintptr(maskStride)
  8820. w = width
  8821. for {
  8822. v2 = w
  8823. w--
  8824. if !(v2 != 0) {
  8825. break
  8826. }
  8827. v3 = mask
  8828. mask++
  8829. m = *(*TCARD8)(unsafe.Pointer(v3))
  8830. if libc.Int32FromUint8(m) == int32(0xff) {
  8831. if srca == uint32(0xff) {
  8832. *(*TCARD32)(unsafe.Pointer(dst)) = src
  8833. } else {
  8834. *(*TCARD32)(unsafe.Pointer(dst)) = _fbOver24(tls, src, *(*TCARD32)(unsafe.Pointer(dst)))
  8835. }
  8836. } else {
  8837. if m != 0 {
  8838. d = _fbIn(tls, src, m)
  8839. *(*TCARD32)(unsafe.Pointer(dst)) = _fbOver24(tls, d, *(*TCARD32)(unsafe.Pointer(dst)))
  8840. }
  8841. }
  8842. dst += 4
  8843. }
  8844. }
  8845. }
  8846. func __XftSmoothGlyphGray565(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8847. var b, d, g, r, src, srca TCARD32
  8848. var dst, dstLine, mask, maskLine, v3 uintptr
  8849. var dstStride, height, maskStride, w, width, v1, v2 int32
  8850. var m TCARD8
  8851. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8852. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8853. /* This handles only RGB and BGR */
  8854. g = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8855. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint32(0xf800) {
  8856. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8857. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8858. } else {
  8859. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  8860. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  8861. }
  8862. src = srca<<libc.Int32FromInt32(24) | r | g | b
  8863. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8864. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8865. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8866. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8867. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(1))
  8868. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(1)
  8869. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8870. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8871. for {
  8872. v1 = height
  8873. height--
  8874. if !(v1 != 0) {
  8875. break
  8876. }
  8877. dst = dstLine
  8878. dstLine += uintptr(dstStride) * 2
  8879. mask = maskLine
  8880. maskLine += uintptr(maskStride)
  8881. w = width
  8882. for {
  8883. v2 = w
  8884. w--
  8885. if !(v2 != 0) {
  8886. break
  8887. }
  8888. v3 = mask
  8889. mask++
  8890. m = *(*TCARD8)(unsafe.Pointer(v3))
  8891. if libc.Int32FromUint8(m) == int32(0xff) {
  8892. if srca == uint32(0xff) {
  8893. d = src
  8894. } else {
  8895. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8896. d = _fbOver24(tls, src, d<<libc.Int32FromInt32(3)&libc.Uint32FromInt32(0xf8)|d>>libc.Int32FromInt32(2)&libc.Uint32FromInt32(0x7)|(d<<libc.Int32FromInt32(5)&libc.Uint32FromInt32(0xfc00)|d>>libc.Int32FromInt32(1)&libc.Uint32FromInt32(0x300))|(d<<libc.Int32FromInt32(8)&libc.Uint32FromInt32(0xf80000)|d<<libc.Int32FromInt32(3)&libc.Uint32FromInt32(0x70000)))
  8897. }
  8898. *(*TCARD16)(unsafe.Pointer(dst)) = uint16(d>>libc.Int32FromInt32(3)&libc.Uint32FromInt32(0x001f) | d>>libc.Int32FromInt32(5)&libc.Uint32FromInt32(0x07e0) | d>>libc.Int32FromInt32(8)&libc.Uint32FromInt32(0xf800))
  8899. } else {
  8900. if m != 0 {
  8901. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8902. d = _fbOver24(tls, _fbIn(tls, src, m), d<<libc.Int32FromInt32(3)&libc.Uint32FromInt32(0xf8)|d>>libc.Int32FromInt32(2)&libc.Uint32FromInt32(0x7)|(d<<libc.Int32FromInt32(5)&libc.Uint32FromInt32(0xfc00)|d>>libc.Int32FromInt32(1)&libc.Uint32FromInt32(0x300))|(d<<libc.Int32FromInt32(8)&libc.Uint32FromInt32(0xf80000)|d<<libc.Int32FromInt32(3)&libc.Uint32FromInt32(0x70000)))
  8903. *(*TCARD16)(unsafe.Pointer(dst)) = uint16(d>>libc.Int32FromInt32(3)&libc.Uint32FromInt32(0x001f) | d>>libc.Int32FromInt32(5)&libc.Uint32FromInt32(0x07e0) | d>>libc.Int32FromInt32(8)&libc.Uint32FromInt32(0xf800))
  8904. }
  8905. }
  8906. dst += 2
  8907. }
  8908. }
  8909. }
  8910. func __XftSmoothGlyphGray555(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8911. var b, d, g, r, src, srca TCARD32
  8912. var dst, dstLine, mask, maskLine, v3 uintptr
  8913. var dstStride, height, maskStride, w, width, v1, v2 int32
  8914. var m TCARD8
  8915. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = b, d, dst, dstLine, dstStride, g, height, m, mask, maskLine, maskStride, r, src, srca, w, width, v1, v2, v3
  8916. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8917. /* This handles only RGB and BGR */
  8918. g = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen) & libc.Int32FromInt32(0xff00))
  8919. if (*TXImage)(unsafe.Pointer(image)).Fred_mask == uint32(0xf800) {
  8920. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) & int32(0xff00) << int32(8))
  8921. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) >> int32(8))
  8922. } else {
  8923. r = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred) >> int32(8))
  8924. b = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue) & int32(0xff00) << int32(8))
  8925. }
  8926. src = srca<<libc.Int32FromInt32(24) | r | g | b
  8927. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8928. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8929. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8930. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8931. dstLine = (*TXImage)(unsafe.Pointer(image)).Fdata + uintptr((*TXImage)(unsafe.Pointer(image)).Fbytes_per_line*y) + uintptr(x<<libc.Int32FromInt32(1))
  8932. dstStride = (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line >> int32(1)
  8933. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8934. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8935. for {
  8936. v1 = height
  8937. height--
  8938. if !(v1 != 0) {
  8939. break
  8940. }
  8941. dst = dstLine
  8942. dstLine += uintptr(dstStride) * 2
  8943. mask = maskLine
  8944. maskLine += uintptr(maskStride)
  8945. w = width
  8946. for {
  8947. v2 = w
  8948. w--
  8949. if !(v2 != 0) {
  8950. break
  8951. }
  8952. v3 = mask
  8953. mask++
  8954. m = *(*TCARD8)(unsafe.Pointer(v3))
  8955. if libc.Int32FromUint8(m) == int32(0xff) {
  8956. if srca == uint32(0xff) {
  8957. d = src
  8958. } else {
  8959. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8960. d = _fbOver24(tls, src, d<<libc.Int32FromInt32(3)&libc.Uint32FromInt32(0xf8)|d>>libc.Int32FromInt32(2)&libc.Uint32FromInt32(0x7)|(d<<libc.Int32FromInt32(6)&libc.Uint32FromInt32(0xf800)|d>>libc.Int32FromInt32(0)&libc.Uint32FromInt32(0x300))|(d<<libc.Int32FromInt32(9)&libc.Uint32FromInt32(0xf80000)|d<<libc.Int32FromInt32(4)&libc.Uint32FromInt32(0x70000)))
  8961. }
  8962. *(*TCARD16)(unsafe.Pointer(dst)) = uint16(d>>libc.Int32FromInt32(3)&libc.Uint32FromInt32(0x001f) | d>>libc.Int32FromInt32(6)&libc.Uint32FromInt32(0x03e0) | d>>libc.Int32FromInt32(7)&libc.Uint32FromInt32(0x7c00))
  8963. } else {
  8964. if m != 0 {
  8965. d = uint32(*(*TCARD16)(unsafe.Pointer(dst)))
  8966. d = _fbOver24(tls, _fbIn(tls, src, m), d<<libc.Int32FromInt32(3)&libc.Uint32FromInt32(0xf8)|d>>libc.Int32FromInt32(2)&libc.Uint32FromInt32(0x7)|(d<<libc.Int32FromInt32(6)&libc.Uint32FromInt32(0xf800)|d>>libc.Int32FromInt32(0)&libc.Uint32FromInt32(0x300))|(d<<libc.Int32FromInt32(9)&libc.Uint32FromInt32(0xf80000)|d<<libc.Int32FromInt32(4)&libc.Uint32FromInt32(0x70000)))
  8967. *(*TCARD16)(unsafe.Pointer(dst)) = uint16(d>>libc.Int32FromInt32(3)&libc.Uint32FromInt32(0x001f) | d>>libc.Int32FromInt32(6)&libc.Uint32FromInt32(0x03e0) | d>>libc.Int32FromInt32(7)&libc.Uint32FromInt32(0x7c00))
  8968. }
  8969. }
  8970. dst += 2
  8971. }
  8972. }
  8973. }
  8974. func __XftSmoothGlyphGray(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  8975. bp := tls.Alloc(32)
  8976. defer tls.Free(32)
  8977. var d, src, srca TCARD32
  8978. var height, maskStride, tx, w, width, v1, v2 int32
  8979. var m TCARD8
  8980. var mask, maskLine, v3 uintptr
  8981. var pixel uint32
  8982. var _ /* b_len at bp+20 */ int32
  8983. var _ /* b_shift at bp+16 */ int32
  8984. var _ /* g_len at bp+12 */ int32
  8985. var _ /* g_shift at bp+8 */ int32
  8986. var _ /* r_len at bp+4 */ int32
  8987. var _ /* r_shift at bp+0 */ int32
  8988. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = d, height, m, mask, maskLine, maskStride, pixel, src, srca, tx, w, width, v1, v2, v3
  8989. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  8990. src = srca<<libc.Int32FromInt32(24) | libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred)&libc.Int32FromInt32(0xff00)<<libc.Int32FromInt32(8)) | libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen)&libc.Int32FromInt32(0xff00)) | libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue)>>libc.Int32FromInt32(8))
  8991. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  8992. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  8993. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  8994. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  8995. maskLine = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  8996. maskStride = (width + int32(3)) & ^libc.Int32FromInt32(3)
  8997. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  8998. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  8999. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  9000. for {
  9001. v1 = height
  9002. height--
  9003. if !(v1 != 0) {
  9004. break
  9005. }
  9006. mask = maskLine
  9007. maskLine += uintptr(maskStride)
  9008. w = width
  9009. tx = x
  9010. for {
  9011. v2 = w
  9012. w--
  9013. if !(v2 != 0) {
  9014. break
  9015. }
  9016. v3 = mask
  9017. mask++
  9018. m = *(*TCARD8)(unsafe.Pointer(v3))
  9019. if libc.Int32FromUint8(m) == int32(0xff) {
  9020. if srca == uint32(0xff) {
  9021. d = src
  9022. } else {
  9023. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  9024. d = __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4)))<<libc.Int32FromInt32(16) | __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp + 8)), *(*int32)(unsafe.Pointer(bp + 12)))<<libc.Int32FromInt32(8) | __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp + 16)), *(*int32)(unsafe.Pointer(bp + 20)))
  9025. d = _fbOver24(tls, src, d)
  9026. }
  9027. pixel = __XftPutField(tls, d>>libc.Int32FromInt32(16)&uint32(0xff), *(*int32)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4))) | __XftPutField(tls, d>>libc.Int32FromInt32(8)&uint32(0xff), *(*int32)(unsafe.Pointer(bp + 8)), *(*int32)(unsafe.Pointer(bp + 12))) | __XftPutField(tls, d&uint32(0xff), *(*int32)(unsafe.Pointer(bp + 16)), *(*int32)(unsafe.Pointer(bp + 20)))
  9028. (*(*func(*libc.TLS, uintptr, int32, int32, uint32) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  9029. } else {
  9030. if m != 0 {
  9031. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  9032. d = __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4)))<<libc.Int32FromInt32(16) | __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp + 8)), *(*int32)(unsafe.Pointer(bp + 12)))<<libc.Int32FromInt32(8) | __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp + 16)), *(*int32)(unsafe.Pointer(bp + 20)))
  9033. d = _fbOver24(tls, _fbIn(tls, src, m), d)
  9034. pixel = __XftPutField(tls, d>>libc.Int32FromInt32(16)&uint32(0xff), *(*int32)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4))) | __XftPutField(tls, d>>libc.Int32FromInt32(8)&uint32(0xff), *(*int32)(unsafe.Pointer(bp + 8)), *(*int32)(unsafe.Pointer(bp + 12))) | __XftPutField(tls, d&uint32(0xff), *(*int32)(unsafe.Pointer(bp + 16)), *(*int32)(unsafe.Pointer(bp + 20)))
  9035. (*(*func(*libc.TLS, uintptr, int32, int32, uint32) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  9036. }
  9037. }
  9038. tx++
  9039. }
  9040. y++
  9041. }
  9042. }
  9043. func __XftSmoothGlyphRgba(tls *libc.TLS, image uintptr, xftg uintptr, x int32, y int32, color uintptr) {
  9044. bp := tls.Alloc(32)
  9045. defer tls.Free(32)
  9046. var __a, __a1, __a2 TCARD16
  9047. var __i, __i1, __i2, __t, __t1, __t2, __ta, __ta1, __ta2, d, m, ma, n, o, src, srca TCARD32
  9048. var height, tx, w, width, v1, v2 int32
  9049. var mask, v3 uintptr
  9050. var pixel uint32
  9051. var _ /* b_len at bp+20 */ int32
  9052. var _ /* b_shift at bp+16 */ int32
  9053. var _ /* g_len at bp+12 */ int32
  9054. var _ /* g_shift at bp+8 */ int32
  9055. var _ /* r_len at bp+4 */ int32
  9056. var _ /* r_shift at bp+0 */ int32
  9057. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = __a, __a1, __a2, __i, __i1, __i2, __t, __t1, __t2, __ta, __ta1, __ta2, d, height, m, ma, mask, n, o, pixel, src, srca, tx, w, width, v1, v2, v3
  9058. srca = libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >> int32(8))
  9059. src = srca<<libc.Int32FromInt32(24) | libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fred)&libc.Int32FromInt32(0xff00)<<libc.Int32FromInt32(8)) | libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fgreen)&libc.Int32FromInt32(0xff00)) | libc.Uint32FromInt32(libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Fblue)>>libc.Int32FromInt32(8))
  9060. x -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  9061. y -= int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  9062. width = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  9063. height = libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  9064. mask = (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap
  9065. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fred_mask, bp, bp+4)
  9066. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fgreen_mask, bp+8, bp+12)
  9067. __XftExamineBitfield(tls, (*TXImage)(unsafe.Pointer(image)).Fblue_mask, bp+16, bp+20)
  9068. for {
  9069. v1 = height
  9070. height--
  9071. if !(v1 != 0) {
  9072. break
  9073. }
  9074. w = width
  9075. tx = x
  9076. for {
  9077. v2 = w
  9078. w--
  9079. if !(v2 != 0) {
  9080. break
  9081. }
  9082. v3 = mask
  9083. mask += 4
  9084. ma = *(*TCARD32)(unsafe.Pointer(v3))
  9085. if ma == uint32(0xffffffff) {
  9086. if srca == uint32(0xff) {
  9087. d = src
  9088. } else {
  9089. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  9090. d = __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4)))<<libc.Int32FromInt32(16) | __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp + 8)), *(*int32)(unsafe.Pointer(bp + 12)))<<libc.Int32FromInt32(8) | __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp + 16)), *(*int32)(unsafe.Pointer(bp + 20)))
  9091. d = _fbOver24(tls, src, d)
  9092. }
  9093. pixel = __XftPutField(tls, d>>libc.Int32FromInt32(16)&uint32(0xff), *(*int32)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4))) | __XftPutField(tls, d>>libc.Int32FromInt32(8)&uint32(0xff), *(*int32)(unsafe.Pointer(bp + 8)), *(*int32)(unsafe.Pointer(bp + 12))) | __XftPutField(tls, d&uint32(0xff), *(*int32)(unsafe.Pointer(bp + 16)), *(*int32)(unsafe.Pointer(bp + 20)))
  9094. (*(*func(*libc.TLS, uintptr, int32, int32, uint32) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  9095. } else {
  9096. if ma != 0 {
  9097. pixel = (*(*func(*libc.TLS, uintptr, int32, int32) uint32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fget_pixel})))(tls, image, tx, y)
  9098. d = __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4)))<<libc.Int32FromInt32(16) | __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp + 8)), *(*int32)(unsafe.Pointer(bp + 12)))<<libc.Int32FromInt32(8) | __XftGetField(tls, pixel, *(*int32)(unsafe.Pointer(bp + 16)), *(*int32)(unsafe.Pointer(bp + 20)))
  9099. __a = uint16(uint8(ma >> libc.Int32FromInt32(0)))
  9100. __i = libc.Uint32FromInt32(libc.Int32FromUint16(uint16(uint8(src>>libc.Int32FromInt32(0))))*libc.Int32FromUint16(__a) + libc.Int32FromInt32(0x80))
  9101. __t = (__i>>libc.Int32FromInt32(8) + __i) >> libc.Int32FromInt32(8)
  9102. __i = srca*uint32(__a) + libc.Uint32FromInt32(0x80)
  9103. __ta = uint32(uint8(^((__i>>libc.Int32FromInt32(8) + __i) >> libc.Int32FromInt32(8))))
  9104. __i = uint32(uint16(uint8(d>>libc.Int32FromInt32(0))))*__ta + libc.Uint32FromInt32(0x80)
  9105. __t = __t + (__i>>libc.Int32FromInt32(8)+__i)>>libc.Int32FromInt32(8)
  9106. __t = uint32(uint8(__t | -(__t >> libc.Int32FromInt32(8))))
  9107. m = __t << 0
  9108. __a1 = uint16(uint8(ma >> libc.Int32FromInt32(8)))
  9109. __i1 = libc.Uint32FromInt32(libc.Int32FromUint16(uint16(uint8(src>>libc.Int32FromInt32(8))))*libc.Int32FromUint16(__a1) + libc.Int32FromInt32(0x80))
  9110. __t1 = (__i1>>libc.Int32FromInt32(8) + __i1) >> libc.Int32FromInt32(8)
  9111. __i1 = srca*uint32(__a1) + libc.Uint32FromInt32(0x80)
  9112. __ta1 = uint32(uint8(^((__i1>>libc.Int32FromInt32(8) + __i1) >> libc.Int32FromInt32(8))))
  9113. __i1 = uint32(uint16(uint8(d>>libc.Int32FromInt32(8))))*__ta1 + libc.Uint32FromInt32(0x80)
  9114. __t1 = __t1 + (__i1>>libc.Int32FromInt32(8)+__i1)>>libc.Int32FromInt32(8)
  9115. __t1 = uint32(uint8(__t1 | -(__t1 >> libc.Int32FromInt32(8))))
  9116. n = __t1 << int32(8)
  9117. __a2 = uint16(uint8(ma >> libc.Int32FromInt32(16)))
  9118. __i2 = libc.Uint32FromInt32(libc.Int32FromUint16(uint16(uint8(src>>libc.Int32FromInt32(16))))*libc.Int32FromUint16(__a2) + libc.Int32FromInt32(0x80))
  9119. __t2 = (__i2>>libc.Int32FromInt32(8) + __i2) >> libc.Int32FromInt32(8)
  9120. __i2 = srca*uint32(__a2) + libc.Uint32FromInt32(0x80)
  9121. __ta2 = uint32(uint8(^((__i2>>libc.Int32FromInt32(8) + __i2) >> libc.Int32FromInt32(8))))
  9122. __i2 = uint32(uint16(uint8(d>>libc.Int32FromInt32(16))))*__ta2 + libc.Uint32FromInt32(0x80)
  9123. __t2 = __t2 + (__i2>>libc.Int32FromInt32(8)+__i2)>>libc.Int32FromInt32(8)
  9124. __t2 = uint32(uint8(__t2 | -(__t2 >> libc.Int32FromInt32(8))))
  9125. o = __t2 << int32(16)
  9126. d = m | n | o
  9127. pixel = __XftPutField(tls, d>>libc.Int32FromInt32(16)&uint32(0xff), *(*int32)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4))) | __XftPutField(tls, d>>libc.Int32FromInt32(8)&uint32(0xff), *(*int32)(unsafe.Pointer(bp + 8)), *(*int32)(unsafe.Pointer(bp + 12))) | __XftPutField(tls, d&uint32(0xff), *(*int32)(unsafe.Pointer(bp + 16)), *(*int32)(unsafe.Pointer(bp + 20)))
  9128. (*(*func(*libc.TLS, uintptr, int32, int32, uint32) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fput_pixel})))(tls, image, tx, y, pixel)
  9129. }
  9130. }
  9131. tx++
  9132. }
  9133. y++
  9134. }
  9135. }
  9136. func __XftSmoothGlyphPossible(tls *libc.TLS, draw uintptr) (r TFcBool) {
  9137. if !((*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0) {
  9138. return m_FcFalse
  9139. }
  9140. if (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fclass != int32(m_TrueColor) {
  9141. return m_FcFalse
  9142. }
  9143. return int32(m_FcTrue)
  9144. }
  9145. type TXftSmoothGlyph = uintptr
  9146. func __XftSmoothGlyphFind(tls *libc.TLS, draw uintptr, public uintptr) (r TXftSmoothGlyph) {
  9147. var font uintptr
  9148. _ = font
  9149. font = public
  9150. if !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0) {
  9151. return __ccgo_fp(__XftSmoothGlyphMono)
  9152. } else {
  9153. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  9154. case int32(m_FC_RGBA_RGB):
  9155. fallthrough
  9156. case int32(m_FC_RGBA_BGR):
  9157. fallthrough
  9158. case int32(m_FC_RGBA_VRGB):
  9159. fallthrough
  9160. case int32(m_FC_RGBA_VBGR):
  9161. return __ccgo_fp(__XftSmoothGlyphRgba)
  9162. default:
  9163. switch XXftDrawBitsPerPixel(tls, draw) {
  9164. case uint32(32):
  9165. if (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask == 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) {
  9166. return __ccgo_fp(__XftSmoothGlyphGray8888)
  9167. }
  9168. case uint32(16):
  9169. 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) {
  9170. return __ccgo_fp(__XftSmoothGlyphGray565)
  9171. }
  9172. 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) {
  9173. return __ccgo_fp(__XftSmoothGlyphGray555)
  9174. }
  9175. default:
  9176. break
  9177. }
  9178. return __ccgo_fp(__XftSmoothGlyphGray)
  9179. }
  9180. }
  9181. return r
  9182. }
  9183. func __XftGlyphDefault(tls *libc.TLS, dpy uintptr, public uintptr) (r uintptr) {
  9184. bp := tls.Alloc(1040)
  9185. defer tls.Free(1040)
  9186. var font uintptr
  9187. var glyphs_loaded TFcBool
  9188. var _ /* missing at bp+0 */ [256]TFT_UInt
  9189. var _ /* nmissing at bp+1024 */ int32
  9190. _, _ = font, glyphs_loaded
  9191. font = public
  9192. glyphs_loaded = m_FcFalse
  9193. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), uint32(0), bp, bp+1024) != 0 {
  9194. glyphs_loaded = int32(m_FcTrue)
  9195. }
  9196. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9197. XXftFontLoadGlyphs(tls, dpy, public, glyphs_loaded, bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9198. }
  9199. return *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs))
  9200. }
  9201. func _XftGetImageErrorHandler(tls *libc.TLS, dpy uintptr, error_event uintptr) (r int32) {
  9202. return 0
  9203. }
  9204. func XXftGlyphCore(tls *libc.TLS, draw uintptr, color uintptr, public uintptr, x int32, y int32, glyphs uintptr, nglyphs int32) {
  9205. bp := tls.Alloc(1136)
  9206. defer tls.Free(1136)
  9207. var depth, v3 uint32
  9208. var dpy, font, g, image, xftg, v10, v11, v2, v6, v7 uintptr
  9209. var gc TGC
  9210. var glyph TFT_UInt
  9211. var glyphs_loaded TFcBool
  9212. var n, ox, oy, v1, v5, v9 int32
  9213. var pix TPixmap
  9214. var prev_error TXErrorHandler
  9215. var sharp TXftSharpGlyph
  9216. var smooth TXftSmoothGlyph
  9217. var v12, v4, v8 bool
  9218. var _ /* gcv at bp+1040 */ TXGCValues
  9219. var _ /* gi at bp+1028 */ TXGlyphInfo
  9220. var _ /* missing at bp+0 */ [256]TFT_UInt
  9221. var _ /* nmissing at bp+1024 */ int32
  9222. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = depth, dpy, font, g, gc, glyph, glyphs_loaded, image, n, ox, oy, pix, prev_error, sharp, smooth, xftg, v1, v10, v11, v12, v2, v3, v4, v5, v6, v7, v8, v9
  9223. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  9224. font = public
  9225. /*
  9226. * Load missing glyphs
  9227. */
  9228. g = glyphs
  9229. n = nglyphs
  9230. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  9231. glyphs_loaded = m_FcFalse
  9232. for {
  9233. v1 = n
  9234. n--
  9235. if !(v1 != 0) {
  9236. break
  9237. }
  9238. v2 = g
  9239. g += 4
  9240. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), *(*TFT_UInt)(unsafe.Pointer(v2)), bp, bp+1024) != 0 {
  9241. glyphs_loaded = int32(m_FcTrue)
  9242. }
  9243. }
  9244. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9245. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9246. }
  9247. g = glyphs
  9248. n = nglyphs
  9249. if ((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 || libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9250. smooth = __XftSmoothGlyphFind(tls, draw, public)
  9251. XXftGlyphExtents(tls, dpy, public, glyphs, nglyphs, bp+1028)
  9252. if !((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth != 0) || !((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight != 0) {
  9253. goto bail1
  9254. }
  9255. ox = x - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9256. oy = y - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9257. /*
  9258. * Try to get bits directly from the drawable; if that fails,
  9259. * use a temporary pixmap. When it does fail, assume it
  9260. * will probably fail for a while and keep using temporary
  9261. * pixmaps for a while to avoid double round trips.
  9262. */
  9263. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9264. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9265. image = libx11.XXGetImage(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, ox, oy, uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth), uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight), libc.Uint32FromInt32(^libc.Int32FromInt32(0)), int32(m_ZPixmap))
  9266. libx11.XXSetErrorHandler(tls, prev_error)
  9267. if !(image != 0) {
  9268. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9269. }
  9270. } else {
  9271. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9272. image = libc.UintptrFromInt32(0)
  9273. }
  9274. if v4 = !(image != 0); v4 {
  9275. v3 = XXftDrawDepth(tls, draw)
  9276. depth = v3
  9277. }
  9278. if v4 && v3 != 0 {
  9279. pix = libx11.XXCreatePixmap(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth), uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight), depth)
  9280. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9281. gc = libx11.XXCreateGC(tls, dpy, pix, libc.Uint32FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(16)), bp+1040)
  9282. libx11.XXCopyArea(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, pix, gc, ox, oy, uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth), uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight), 0, 0)
  9283. libx11.XXFreeGC(tls, dpy, gc)
  9284. image = libx11.XXGetImage(tls, dpy, pix, 0, 0, uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth), uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight), libc.Uint32FromInt32(^libc.Int32FromInt32(0)), int32(m_ZPixmap))
  9285. libx11.XXFreePixmap(tls, dpy, pix)
  9286. }
  9287. if !(image != 0) {
  9288. goto bail1
  9289. }
  9290. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9291. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9292. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9293. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9294. XXftSwapImage(tls, image)
  9295. }
  9296. for {
  9297. v5 = n
  9298. n--
  9299. if !(v5 != 0) {
  9300. break
  9301. }
  9302. v6 = g
  9303. g += 4
  9304. glyph = *(*TFT_UInt)(unsafe.Pointer(v6))
  9305. if v8 = glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v8 {
  9306. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*4))
  9307. xftg = v7
  9308. }
  9309. if v8 || !(v7 != 0) {
  9310. xftg = __XftGlyphDefault(tls, dpy, public)
  9311. }
  9312. if xftg != 0 {
  9313. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr))(unsafe.Pointer(&struct{ uintptr }{smooth})))(tls, image, xftg, x-ox, y-oy, color)
  9314. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  9315. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  9316. }
  9317. }
  9318. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9319. XXftSwapImage(tls, image)
  9320. }
  9321. libx11.XXPutImage(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, image, 0, 0, ox, oy, uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth), uint32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight))
  9322. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9323. } else {
  9324. sharp = __XftSharpGlyphFind(tls, draw, public)
  9325. for {
  9326. v9 = n
  9327. n--
  9328. if !(v9 != 0) {
  9329. break
  9330. }
  9331. v10 = g
  9332. g += 4
  9333. glyph = *(*TFT_UInt)(unsafe.Pointer(v10))
  9334. if v12 = glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v12 {
  9335. v11 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*4))
  9336. xftg = v11
  9337. }
  9338. if v12 || !(v11 != 0) {
  9339. xftg = __XftGlyphDefault(tls, dpy, public)
  9340. }
  9341. if xftg != 0 {
  9342. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32))(unsafe.Pointer(&struct{ uintptr }{sharp})))(tls, draw, xftg, x, y)
  9343. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  9344. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  9345. }
  9346. }
  9347. }
  9348. goto bail1
  9349. bail1:
  9350. ;
  9351. if glyphs_loaded != 0 {
  9352. X_XftFontManageMemory(tls, dpy, public)
  9353. }
  9354. }
  9355. func XXftGlyphSpecCore(tls *libc.TLS, draw uintptr, color uintptr, public uintptr, glyphs uintptr, nglyphs int32) {
  9356. bp := tls.Alloc(1136)
  9357. defer tls.Free(1136)
  9358. var depth, v5 uint32
  9359. var dpy, font, image, xftg, v11, v8 uintptr
  9360. var g_x1, g_x2, g_y1, g_y2, height, i, width, x1, x2, y1, y2, v1, v2, v3 int32
  9361. var gc TGC
  9362. var glyph, glyph1 TFT_UInt
  9363. var glyphs_loaded TFcBool
  9364. var pix TPixmap
  9365. var prev_error TXErrorHandler
  9366. var sharp TXftSharpGlyph
  9367. var smooth TXftSmoothGlyph
  9368. var v12, v6, v9 bool
  9369. var _ /* gcv at bp+1040 */ TXGCValues
  9370. var _ /* gi at bp+1028 */ TXGlyphInfo
  9371. var _ /* missing at bp+0 */ [256]TFT_UInt
  9372. var _ /* nmissing at bp+1024 */ int32
  9373. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = depth, dpy, font, g_x1, g_x2, g_y1, g_y2, gc, glyph, glyph1, glyphs_loaded, height, i, image, pix, prev_error, sharp, smooth, width, x1, x2, xftg, y1, y2, v1, v11, v12, v2, v3, v5, v6, v8, v9
  9374. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  9375. font = public
  9376. /*
  9377. * Load missing glyphs
  9378. */
  9379. glyphs_loaded = m_FcFalse
  9380. v3 = libc.Int32FromInt32(0)
  9381. y2 = v3
  9382. v2 = v3
  9383. x2 = v2
  9384. v1 = v2
  9385. y1 = v1
  9386. x1 = v1
  9387. i = 0
  9388. for {
  9389. if !(i < nglyphs) {
  9390. break
  9391. }
  9392. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  9393. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph, bp, bp+1024) != 0 {
  9394. glyphs_loaded = int32(m_FcTrue)
  9395. }
  9396. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9397. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9398. }
  9399. XXftGlyphExtents(tls, dpy, public, glyphs+uintptr(i)*8, int32(1), bp+1028)
  9400. g_x1 = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9401. g_y1 = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9402. g_x2 = g_x1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth)
  9403. g_y2 = g_y1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight)
  9404. if i != 0 {
  9405. if g_x1 < x1 {
  9406. x1 = g_x1
  9407. }
  9408. if g_y1 < y1 {
  9409. y1 = g_y1
  9410. }
  9411. if g_x2 > x2 {
  9412. x2 = g_x2
  9413. }
  9414. if g_y2 > y2 {
  9415. y2 = g_y2
  9416. }
  9417. } else {
  9418. x1 = g_x1
  9419. y1 = g_y1
  9420. x2 = g_x2
  9421. y2 = g_y2
  9422. }
  9423. goto _4
  9424. _4:
  9425. ;
  9426. i++
  9427. }
  9428. if x1 == x2 || y1 == y2 {
  9429. goto bail1
  9430. }
  9431. if ((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 || libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9432. width = x2 - x1
  9433. height = y2 - y1
  9434. smooth = __XftSmoothGlyphFind(tls, draw, public)
  9435. /*
  9436. * Try to get bits directly from the drawable; if that fails,
  9437. * use a temporary pixmap. When it does fail, assume it
  9438. * will probably fail for a while and keep using temporary
  9439. * pixmaps for a while to avoid double round trips.
  9440. */
  9441. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9442. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9443. image = libx11.XXGetImage(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), libc.Uint32FromInt32(^libc.Int32FromInt32(0)), int32(m_ZPixmap))
  9444. libx11.XXSetErrorHandler(tls, prev_error)
  9445. if !(image != 0) {
  9446. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9447. }
  9448. } else {
  9449. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9450. image = libc.UintptrFromInt32(0)
  9451. }
  9452. if v6 = !(image != 0); v6 {
  9453. v5 = XXftDrawDepth(tls, draw)
  9454. depth = v5
  9455. }
  9456. if v6 && v5 != 0 {
  9457. pix = libx11.XXCreatePixmap(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), depth)
  9458. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9459. gc = libx11.XXCreateGC(tls, dpy, pix, libc.Uint32FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(16)), bp+1040)
  9460. libx11.XXCopyArea(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, pix, gc, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), 0, 0)
  9461. libx11.XXFreeGC(tls, dpy, gc)
  9462. image = libx11.XXGetImage(tls, dpy, pix, 0, 0, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), libc.Uint32FromInt32(^libc.Int32FromInt32(0)), int32(m_ZPixmap))
  9463. libx11.XXFreePixmap(tls, dpy, pix)
  9464. }
  9465. if !(image != 0) {
  9466. goto bail1
  9467. }
  9468. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9469. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9470. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9471. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9472. XXftSwapImage(tls, image)
  9473. }
  9474. i = 0
  9475. for {
  9476. if !(i < nglyphs) {
  9477. break
  9478. }
  9479. glyph = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  9480. if v9 = glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v9 {
  9481. v8 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*4))
  9482. xftg = v8
  9483. }
  9484. if v9 || !(v8 != 0) {
  9485. xftg = __XftGlyphDefault(tls, dpy, public)
  9486. }
  9487. if xftg != 0 {
  9488. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr))(unsafe.Pointer(&struct{ uintptr }{smooth})))(tls, image, xftg, int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx)-x1, int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy)-y1, color)
  9489. }
  9490. goto _7
  9491. _7:
  9492. ;
  9493. i++
  9494. }
  9495. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9496. XXftSwapImage(tls, image)
  9497. }
  9498. libx11.XXPutImage(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, image, 0, 0, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height))
  9499. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9500. } else {
  9501. sharp = __XftSharpGlyphFind(tls, draw, public)
  9502. i = 0
  9503. for {
  9504. if !(i < nglyphs) {
  9505. break
  9506. }
  9507. glyph1 = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  9508. if v12 = glyph1 >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v12 {
  9509. v11 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph1)*4))
  9510. xftg = v11
  9511. }
  9512. if v12 || !(v11 != 0) {
  9513. xftg = __XftGlyphDefault(tls, dpy, public)
  9514. }
  9515. if xftg != 0 {
  9516. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32))(unsafe.Pointer(&struct{ uintptr }{sharp})))(tls, draw, xftg, int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx), int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy))
  9517. }
  9518. goto _10
  9519. _10:
  9520. ;
  9521. i++
  9522. }
  9523. }
  9524. goto bail1
  9525. bail1:
  9526. ;
  9527. if glyphs_loaded != 0 {
  9528. X_XftFontManageMemory(tls, dpy, public)
  9529. }
  9530. }
  9531. func XXftGlyphFontSpecCore(tls *libc.TLS, draw uintptr, color uintptr, glyphs uintptr, nglyphs int32) {
  9532. bp := tls.Alloc(1136)
  9533. defer tls.Free(1136)
  9534. var depth, v6 uint32
  9535. var dpy, font, font1, image, public, public1, public2, xftg, v12, v9 uintptr
  9536. var g_x1, g_x2, g_y1, g_y2, height, i, width, x1, x2, y1, y2, v1, v2, v3 int32
  9537. var gc TGC
  9538. var glyph, glyph1 TFT_UInt
  9539. var glyphs_loaded TFcBool
  9540. var pix TPixmap
  9541. var prev_error TXErrorHandler
  9542. var sharp TXftSharpGlyph
  9543. var smooth TXftSmoothGlyph
  9544. var t int16
  9545. var v10, v13, v7 bool
  9546. var _ /* gcv at bp+1040 */ TXGCValues
  9547. var _ /* gi at bp+1028 */ TXGlyphInfo
  9548. var _ /* missing at bp+0 */ [256]TFT_UInt
  9549. var _ /* nmissing at bp+1024 */ int32
  9550. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = depth, dpy, font, font1, g_x1, g_x2, g_y1, g_y2, gc, glyph, glyph1, glyphs_loaded, height, i, image, pix, prev_error, public, public1, public2, sharp, smooth, t, width, x1, x2, xftg, y1, y2, v1, v10, v12, v13, v2, v3, v6, v7, v9
  9551. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  9552. /*
  9553. * Load missing glyphs
  9554. */
  9555. glyphs_loaded = m_FcFalse
  9556. v3 = libc.Int32FromInt32(0)
  9557. y2 = v3
  9558. v2 = v3
  9559. x2 = v2
  9560. v1 = v2
  9561. y1 = v1
  9562. x1 = v1
  9563. i = 0
  9564. for {
  9565. if !(i < nglyphs) {
  9566. break
  9567. }
  9568. public = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont
  9569. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  9570. if XXftFontCheckGlyph(tls, dpy, public, int32(m_FcTrue), (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fglyph, bp, bp+1024) != 0 {
  9571. glyphs_loaded = int32(m_FcTrue)
  9572. }
  9573. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  9574. XXftFontLoadGlyphs(tls, dpy, public, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  9575. }
  9576. XXftGlyphExtents(tls, dpy, public, glyphs+uintptr(i)*12+4, int32(1), bp+1028)
  9577. g_x1 = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fx) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fx)
  9578. g_y1 = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fy) - int32((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fy)
  9579. g_x2 = g_x1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fwidth)
  9580. g_y2 = g_y1 + libc.Int32FromUint16((*(*TXGlyphInfo)(unsafe.Pointer(bp + 1028))).Fheight)
  9581. if i != 0 {
  9582. if g_x1 < x1 {
  9583. if g_x1 < 0 {
  9584. /* do nothing if the given glyphs are out of range */
  9585. t = int16((*TXftFont)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i-int32(1))*12))).Ffont)).Fmax_advance_width + int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i-int32(1))*12))).Fx))
  9586. if int32(t) < 0 && int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i-int32(1))*12))).Fx) > 0 {
  9587. goto bail1
  9588. }
  9589. }
  9590. x1 = g_x1
  9591. }
  9592. if g_y1 < y1 {
  9593. y1 = g_y1
  9594. }
  9595. if g_x2 > x2 {
  9596. x2 = g_x2
  9597. }
  9598. if g_y2 > y2 {
  9599. y2 = g_y2
  9600. }
  9601. } else {
  9602. x1 = g_x1
  9603. y1 = g_y1
  9604. x2 = g_x2
  9605. y2 = g_y2
  9606. }
  9607. goto _4
  9608. _4:
  9609. ;
  9610. i++
  9611. }
  9612. if x1 == x2 || y1 == y2 {
  9613. goto bail1
  9614. }
  9615. i = 0
  9616. for {
  9617. if !(i < nglyphs) {
  9618. break
  9619. }
  9620. if (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont)).Finfo.Fantialias != 0 {
  9621. break
  9622. }
  9623. goto _5
  9624. _5:
  9625. ;
  9626. i++
  9627. }
  9628. if (i != nglyphs || libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) != int32(0xffff)) && __XftSmoothGlyphPossible(tls, draw) != 0 {
  9629. width = x2 - x1
  9630. height = y2 - y1
  9631. /*
  9632. * Try to get bits directly from the drawable; if that fails,
  9633. * use a temporary pixmap. When it does fail, assume it
  9634. * will probably fail for a while and keep using temporary
  9635. * pixmaps for a while to avoid double round trips.
  9636. */
  9637. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap == 0 {
  9638. prev_error = libx11.XXSetErrorHandler(tls, __ccgo_fp(_XftGetImageErrorHandler))
  9639. image = libx11.XXGetImage(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), libc.Uint32FromInt32(^libc.Int32FromInt32(0)), int32(m_ZPixmap))
  9640. libx11.XXSetErrorHandler(tls, prev_error)
  9641. if !(image != 0) {
  9642. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = int32(m_XFT_ASSUME_PIXMAP)
  9643. }
  9644. } else {
  9645. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap--
  9646. image = libc.UintptrFromInt32(0)
  9647. }
  9648. if v7 = !(image != 0); v7 {
  9649. v6 = XXftDrawDepth(tls, draw)
  9650. depth = v6
  9651. }
  9652. if v7 && v6 != 0 {
  9653. pix = libx11.XXCreatePixmap(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), depth)
  9654. (*(*TXGCValues)(unsafe.Pointer(bp + 1040))).Fgraphics_exposures = m_False
  9655. gc = libx11.XXCreateGC(tls, dpy, pix, libc.Uint32FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(16)), bp+1040)
  9656. libx11.XXCopyArea(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, pix, gc, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), 0, 0)
  9657. libx11.XXFreeGC(tls, dpy, gc)
  9658. image = libx11.XXGetImage(tls, dpy, pix, 0, 0, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height), libc.Uint32FromInt32(^libc.Int32FromInt32(0)), int32(m_ZPixmap))
  9659. libx11.XXFreePixmap(tls, dpy, pix)
  9660. }
  9661. if !(image != 0) {
  9662. goto bail1
  9663. }
  9664. (*TXImage)(unsafe.Pointer(image)).Fred_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fred_mask
  9665. (*TXImage)(unsafe.Pointer(image)).Fgreen_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fgreen_mask
  9666. (*TXImage)(unsafe.Pointer(image)).Fblue_mask = (*TVisual)(unsafe.Pointer((*TXftDraw)(unsafe.Pointer(draw)).Fvisual)).Fblue_mask
  9667. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9668. XXftSwapImage(tls, image)
  9669. }
  9670. i = 0
  9671. for {
  9672. if !(i < nglyphs) {
  9673. break
  9674. }
  9675. public1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont
  9676. font = public1
  9677. smooth = __XftSmoothGlyphFind(tls, draw, public1)
  9678. glyph = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fglyph
  9679. if v10 = glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; !v10 {
  9680. v9 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*4))
  9681. xftg = v9
  9682. }
  9683. if v10 || !(v9 != 0) {
  9684. xftg = __XftGlyphDefault(tls, dpy, public1)
  9685. }
  9686. if xftg != 0 {
  9687. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32, uintptr))(unsafe.Pointer(&struct{ uintptr }{smooth})))(tls, image, xftg, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fx)-x1, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fy)-y1, color)
  9688. }
  9689. goto _8
  9690. _8:
  9691. ;
  9692. i++
  9693. }
  9694. if (*TXImage)(unsafe.Pointer(image)).Fbyte_order != XXftNativeByteOrder(tls) {
  9695. XXftSwapImage(tls, image)
  9696. }
  9697. libx11.XXPutImage(tls, dpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, image, 0, 0, x1, y1, libc.Uint32FromInt32(width), libc.Uint32FromInt32(height))
  9698. (*(*func(*libc.TLS, uintptr) int32)(unsafe.Pointer(&struct{ uintptr }{(*TXImage)(unsafe.Pointer(image)).Ff.Fdestroy_image})))(tls, image)
  9699. } else {
  9700. i = 0
  9701. for {
  9702. if !(i < nglyphs) {
  9703. break
  9704. }
  9705. public2 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont
  9706. font1 = public2
  9707. sharp = __XftSharpGlyphFind(tls, draw, public2)
  9708. glyph1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fglyph
  9709. if v13 = glyph1 >= (*TXftFontInt)(unsafe.Pointer(font1)).Fnum_glyphs; !v13 {
  9710. v12 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(glyph1)*4))
  9711. xftg = v12
  9712. }
  9713. if v13 || !(v12 != 0) {
  9714. xftg = __XftGlyphDefault(tls, dpy, public2)
  9715. }
  9716. if xftg != 0 {
  9717. (*(*func(*libc.TLS, uintptr, uintptr, int32, int32))(unsafe.Pointer(&struct{ uintptr }{sharp})))(tls, draw, xftg, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fx), int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fy))
  9718. }
  9719. goto _11
  9720. _11:
  9721. ;
  9722. i++
  9723. }
  9724. }
  9725. goto bail1
  9726. bail1:
  9727. ;
  9728. if glyphs_loaded != 0 {
  9729. i = 0
  9730. for {
  9731. if !(i < nglyphs) {
  9732. break
  9733. }
  9734. X_XftFontManageMemory(tls, dpy, (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont)
  9735. goto _14
  9736. _14:
  9737. ;
  9738. i++
  9739. }
  9740. }
  9741. }
  9742. /* xftxlfd.c */
  9743. func XXftDebug(tls *libc.TLS) (r int32) {
  9744. bp := tls.Alloc(16)
  9745. defer tls.Free(16)
  9746. var e uintptr
  9747. _ = e
  9748. if !(_initialized != 0) {
  9749. _initialized = int32(1)
  9750. e = libc.Xgetenv(tls, __ccgo_ts)
  9751. if e != 0 {
  9752. libc.Xprintf(tls, __ccgo_ts+10, libc.VaList(bp+8, e))
  9753. _debug = libc.Xatoi(tls, e)
  9754. if _debug <= 0 {
  9755. _debug = int32(1)
  9756. }
  9757. }
  9758. }
  9759. return _debug
  9760. }
  9761. var _initialized int32
  9762. var _debug int32
  9763. func __XftCloseDisplay(tls *libc.TLS, dpy uintptr, codes uintptr) (r int32) {
  9764. var info, prev, v2 uintptr
  9765. _, _, _ = info, prev, v2
  9766. info = X_XftDisplayInfoGet(tls, dpy, m_FcFalse)
  9767. if !(info != 0) {
  9768. return 0
  9769. }
  9770. /*
  9771. * Get rid of any dangling unreferenced fonts
  9772. */
  9773. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = 0
  9774. XXftFontManageMemory(tls, dpy)
  9775. /*
  9776. * Clean up the default values
  9777. */
  9778. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0 {
  9779. libfontconfig.XFcPatternDestroy(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults)
  9780. }
  9781. /*
  9782. * Unhook from the global list
  9783. */
  9784. prev = uintptr(unsafe.Pointer(&X_XftDisplayInfo))
  9785. for {
  9786. v2 = *(*uintptr)(unsafe.Pointer(prev))
  9787. info = v2
  9788. if !(v2 != 0) {
  9789. break
  9790. }
  9791. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay == dpy {
  9792. break
  9793. }
  9794. goto _1
  9795. _1:
  9796. ;
  9797. prev = *(*uintptr)(unsafe.Pointer(prev))
  9798. }
  9799. if info != libc.UintptrFromInt32(0) {
  9800. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext
  9801. }
  9802. libc.Xfree(tls, info)
  9803. return 0
  9804. }
  9805. func X_XftDisplayInfoGet(tls *libc.TLS, dpy uintptr, createIfNecessary TFcBool) (r uintptr) {
  9806. bp := tls.Alloc(96)
  9807. defer tls.Free(96)
  9808. var format, info, prev, visual, v2, v3, v5 uintptr
  9809. var i int32
  9810. var _ /* error_base at bp+36 */ int32
  9811. var _ /* event_base at bp+32 */ int32
  9812. var _ /* major at bp+40 */ int32
  9813. var _ /* minor at bp+44 */ int32
  9814. var _ /* pf at bp+0 */ TXRenderPictFormat
  9815. _, _, _, _, _, _, _, _ = format, i, info, prev, visual, v2, v3, v5
  9816. prev = uintptr(unsafe.Pointer(&X_XftDisplayInfo))
  9817. for {
  9818. v2 = *(*uintptr)(unsafe.Pointer(prev))
  9819. info = v2
  9820. if !(v2 != 0) {
  9821. break
  9822. }
  9823. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay == dpy {
  9824. /*
  9825. * MRU the list
  9826. */
  9827. if prev != uintptr(unsafe.Pointer(&X_XftDisplayInfo)) {
  9828. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext
  9829. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext = X_XftDisplayInfo
  9830. X_XftDisplayInfo = info
  9831. }
  9832. return info
  9833. }
  9834. goto _1
  9835. _1:
  9836. ;
  9837. prev = *(*uintptr)(unsafe.Pointer(prev))
  9838. }
  9839. if !(createIfNecessary != 0) {
  9840. return libc.UintptrFromInt32(0)
  9841. }
  9842. info = libc.Xmalloc(tls, uint32(820))
  9843. if !(info != 0) {
  9844. goto bail0
  9845. }
  9846. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes = libx11.XXAddExtension(tls, dpy)
  9847. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes != 0) {
  9848. goto bail1
  9849. }
  9850. libx11.XXESetCloseDisplay(tls, dpy, (*TXExtCodes)(unsafe.Pointer((*TXftDisplayInfo)(unsafe.Pointer(info)).Fcodes)).Fextension, __ccgo_fp(__XftCloseDisplay))
  9851. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdisplay = dpy
  9852. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = libc.UintptrFromInt32(0)
  9853. (*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat = libc.UintptrFromInt32(0)
  9854. (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender = libc.BoolInt32(libxrender.XXRenderQueryExtension(tls, dpy, bp+32, bp+36) != 0 && libxrender.XXRenderFindVisualFormat(tls, dpy, (*TScreen)(unsafe.Pointer((*struct {
  9855. Fext_data uintptr
  9856. Fprivate1 uintptr
  9857. Ffd int32
  9858. Fprivate2 int32
  9859. Fproto_major_version int32
  9860. Fproto_minor_version int32
  9861. Fvendor uintptr
  9862. Fprivate3 TXID
  9863. Fprivate4 TXID
  9864. Fprivate5 TXID
  9865. Fprivate6 int32
  9866. Fresource_alloc uintptr
  9867. Fbyte_order int32
  9868. Fbitmap_unit int32
  9869. Fbitmap_pad int32
  9870. Fbitmap_bit_order int32
  9871. Fnformats int32
  9872. Fpixmap_format uintptr
  9873. Fprivate8 int32
  9874. Frelease int32
  9875. Fprivate9 uintptr
  9876. Fprivate10 uintptr
  9877. Fqlen int32
  9878. Flast_request_read uint32
  9879. Frequest uint32
  9880. Fprivate11 TXPointer
  9881. Fprivate12 TXPointer
  9882. Fprivate13 TXPointer
  9883. Fprivate14 TXPointer
  9884. Fmax_request_size uint32
  9885. Fdb uintptr
  9886. Fprivate15 uintptr
  9887. Fdisplay_name uintptr
  9888. Fdefault_screen int32
  9889. Fnscreens int32
  9890. Fscreens uintptr
  9891. Fmotion_buffer uint32
  9892. Fprivate16 uint32
  9893. Fmin_keycode int32
  9894. Fmax_keycode int32
  9895. Fprivate17 TXPointer
  9896. Fprivate18 TXPointer
  9897. Fprivate19 int32
  9898. Fxdefaults uintptr
  9899. })(unsafe.Pointer(dpy)).Fscreens+uintptr((*struct {
  9900. Fext_data uintptr
  9901. Fprivate1 uintptr
  9902. Ffd int32
  9903. Fprivate2 int32
  9904. Fproto_major_version int32
  9905. Fproto_minor_version int32
  9906. Fvendor uintptr
  9907. Fprivate3 TXID
  9908. Fprivate4 TXID
  9909. Fprivate5 TXID
  9910. Fprivate6 int32
  9911. Fresource_alloc uintptr
  9912. Fbyte_order int32
  9913. Fbitmap_unit int32
  9914. Fbitmap_pad int32
  9915. Fbitmap_bit_order int32
  9916. Fnformats int32
  9917. Fpixmap_format uintptr
  9918. Fprivate8 int32
  9919. Frelease int32
  9920. Fprivate9 uintptr
  9921. Fprivate10 uintptr
  9922. Fqlen int32
  9923. Flast_request_read uint32
  9924. Frequest uint32
  9925. Fprivate11 TXPointer
  9926. Fprivate12 TXPointer
  9927. Fprivate13 TXPointer
  9928. Fprivate14 TXPointer
  9929. Fmax_request_size uint32
  9930. Fdb uintptr
  9931. Fprivate15 uintptr
  9932. Fdisplay_name uintptr
  9933. Fdefault_screen int32
  9934. Fnscreens int32
  9935. Fscreens uintptr
  9936. Fmotion_buffer uint32
  9937. Fprivate16 uint32
  9938. Fmin_keycode int32
  9939. Fmax_keycode int32
  9940. Fprivate17 TXPointer
  9941. Fprivate18 TXPointer
  9942. Fprivate19 int32
  9943. Fxdefaults uintptr
  9944. })(unsafe.Pointer(dpy)).Fdefault_screen)*80)).Froot_visual) != libc.UintptrFromInt32(0))
  9945. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs = int32(m_FcTrue)
  9946. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  9947. libxrender.XXRenderQueryVersion(tls, dpy, bp+40, bp+44)
  9948. if *(*int32)(unsafe.Pointer(bp + 40)) < 0 || *(*int32)(unsafe.Pointer(bp + 40)) == 0 && *(*int32)(unsafe.Pointer(bp + 44)) <= int32(2) {
  9949. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs = m_FcFalse
  9950. }
  9951. (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasSolid = m_FcFalse
  9952. if *(*int32)(unsafe.Pointer(bp + 40)) > 0 || *(*int32)(unsafe.Pointer(bp + 40)) == 0 && *(*int32)(unsafe.Pointer(bp + 44)) >= int32(10) {
  9953. (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasSolid = int32(m_FcTrue)
  9954. }
  9955. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Ftype1 = int32(m_PictTypeDirect)
  9956. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth = int32(32)
  9957. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FredMask = int16(0xff)
  9958. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FgreenMask = int16(0xff)
  9959. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FblueMask = int16(0xff)
  9960. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FalphaMask = int16(0xff)
  9961. (*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat = libxrender.XXRenderFindFormat(tls, dpy, libc.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)
  9962. }
  9963. if XXftDebug(tls)&int32(m_XFT_DBG_RENDER) != 0 {
  9964. visual = (*TScreen)(unsafe.Pointer((*struct {
  9965. Fext_data uintptr
  9966. Fprivate1 uintptr
  9967. Ffd int32
  9968. Fprivate2 int32
  9969. Fproto_major_version int32
  9970. Fproto_minor_version int32
  9971. Fvendor uintptr
  9972. Fprivate3 TXID
  9973. Fprivate4 TXID
  9974. Fprivate5 TXID
  9975. Fprivate6 int32
  9976. Fresource_alloc uintptr
  9977. Fbyte_order int32
  9978. Fbitmap_unit int32
  9979. Fbitmap_pad int32
  9980. Fbitmap_bit_order int32
  9981. Fnformats int32
  9982. Fpixmap_format uintptr
  9983. Fprivate8 int32
  9984. Frelease int32
  9985. Fprivate9 uintptr
  9986. Fprivate10 uintptr
  9987. Fqlen int32
  9988. Flast_request_read uint32
  9989. Frequest uint32
  9990. Fprivate11 TXPointer
  9991. Fprivate12 TXPointer
  9992. Fprivate13 TXPointer
  9993. Fprivate14 TXPointer
  9994. Fmax_request_size uint32
  9995. Fdb uintptr
  9996. Fprivate15 uintptr
  9997. Fdisplay_name uintptr
  9998. Fdefault_screen int32
  9999. Fnscreens int32
  10000. Fscreens uintptr
  10001. Fmotion_buffer uint32
  10002. Fprivate16 uint32
  10003. Fmin_keycode int32
  10004. Fmax_keycode int32
  10005. Fprivate17 TXPointer
  10006. Fprivate18 TXPointer
  10007. Fprivate19 int32
  10008. Fxdefaults uintptr
  10009. })(unsafe.Pointer(dpy)).Fscreens + uintptr((*struct {
  10010. Fext_data uintptr
  10011. Fprivate1 uintptr
  10012. Ffd int32
  10013. Fprivate2 int32
  10014. Fproto_major_version int32
  10015. Fproto_minor_version int32
  10016. Fvendor uintptr
  10017. Fprivate3 TXID
  10018. Fprivate4 TXID
  10019. Fprivate5 TXID
  10020. Fprivate6 int32
  10021. Fresource_alloc uintptr
  10022. Fbyte_order int32
  10023. Fbitmap_unit int32
  10024. Fbitmap_pad int32
  10025. Fbitmap_bit_order int32
  10026. Fnformats int32
  10027. Fpixmap_format uintptr
  10028. Fprivate8 int32
  10029. Frelease int32
  10030. Fprivate9 uintptr
  10031. Fprivate10 uintptr
  10032. Fqlen int32
  10033. Flast_request_read uint32
  10034. Frequest uint32
  10035. Fprivate11 TXPointer
  10036. Fprivate12 TXPointer
  10037. Fprivate13 TXPointer
  10038. Fprivate14 TXPointer
  10039. Fmax_request_size uint32
  10040. Fdb uintptr
  10041. Fprivate15 uintptr
  10042. Fdisplay_name uintptr
  10043. Fdefault_screen int32
  10044. Fnscreens int32
  10045. Fscreens uintptr
  10046. Fmotion_buffer uint32
  10047. Fprivate16 uint32
  10048. Fmin_keycode int32
  10049. Fmax_keycode int32
  10050. Fprivate17 TXPointer
  10051. Fprivate18 TXPointer
  10052. Fprivate19 int32
  10053. Fxdefaults uintptr
  10054. })(unsafe.Pointer(dpy)).Fdefault_screen)*80)).Froot_visual
  10055. format = libxrender.XXRenderFindVisualFormat(tls, dpy, visual)
  10056. libc.Xprintf(tls, __ccgo_ts+24, libc.VaList(bp+56, libc.Int32FromUint32((*TVisual)(unsafe.Pointer(visual)).Fvisualid)))
  10057. if format != 0 {
  10058. if (*TXRenderPictFormat)(unsafe.Pointer(format)).Ftype1 == int32(m_PictTypeDirect) {
  10059. libc.Xprintf(tls, __ccgo_ts+63, libc.VaList(bp+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)))
  10060. } else {
  10061. libc.Xprintf(tls, __ccgo_ts+83, 0)
  10062. }
  10063. } else {
  10064. libc.Xprintf(tls, __ccgo_ts+99, 0)
  10065. }
  10066. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  10067. v3 = __ccgo_ts + 136
  10068. } else {
  10069. v3 = __ccgo_ts + 141
  10070. }
  10071. libc.Xprintf(tls, __ccgo_ts+147, libc.VaList(bp+56, v3))
  10072. }
  10073. i = 0
  10074. for {
  10075. if !(i < int32(m_XFT_NUM_SOLID_COLOR)) {
  10076. break
  10077. }
  10078. (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fscreen = -int32(1)
  10079. (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fpict = uint32(0)
  10080. goto _4
  10081. _4:
  10082. ;
  10083. i++
  10084. }
  10085. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts = libc.UintptrFromInt32(0)
  10086. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnext = X_XftDisplayInfo
  10087. X_XftDisplayInfo = info
  10088. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory = uint32(0)
  10089. (*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)))
  10090. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10091. libc.Xprintf(tls, __ccgo_ts+216, libc.VaList(bp+56, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory))
  10092. }
  10093. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts = 0
  10094. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = XXftDefaultGetInteger(tls, dpy, __ccgo_ts+245, 0, int32(m_XFT_DPY_MAX_UNREF_FONTS))
  10095. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10096. libc.Xprintf(tls, __ccgo_ts+259, libc.VaList(bp+56, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts))
  10097. }
  10098. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage = m_FcFalse
  10099. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage = XXftDefaultGetBool(tls, dpy, __ccgo_ts+287, 0, m_FcFalse)
  10100. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10101. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage != 0 {
  10102. v5 = __ccgo_ts + 301
  10103. } else {
  10104. v5 = __ccgo_ts + 306
  10105. }
  10106. libc.Xprintf(tls, __ccgo_ts+312, libc.VaList(bp+56, v5))
  10107. }
  10108. libc.Xmemset(tls, info+312, int32('\000'), libc.Uint32FromInt64(4)*libc.Uint32FromInt32(m_XFT_NUM_FONT_HASH))
  10109. return info
  10110. goto bail1
  10111. bail1:
  10112. ;
  10113. libc.Xfree(tls, info)
  10114. goto bail0
  10115. bail0:
  10116. ;
  10117. if XXftDebug(tls)&int32(m_XFT_DBG_RENDER) != 0 {
  10118. libc.Xprintf(tls, __ccgo_ts+340, 0)
  10119. }
  10120. return libc.UintptrFromInt32(0)
  10121. }
  10122. /*
  10123. * Reduce memory usage in X server
  10124. */
  10125. func __XftDisplayValidateMemory(tls *libc.TLS, info uintptr) {
  10126. bp := tls.Alloc(32)
  10127. defer tls.Free(32)
  10128. var font, public uintptr
  10129. var glyph_memory uint32
  10130. _, _, _ = font, glyph_memory, public
  10131. glyph_memory = uint32(0)
  10132. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  10133. for {
  10134. if !(public != 0) {
  10135. break
  10136. }
  10137. font = public
  10138. glyph_memory += (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  10139. goto _1
  10140. _1:
  10141. ;
  10142. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  10143. }
  10144. if glyph_memory != (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory {
  10145. libc.Xprintf(tls, __ccgo_ts+393, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory, glyph_memory))
  10146. }
  10147. }
  10148. func X_XftDisplayManageMemory(tls *libc.TLS, dpy uintptr) {
  10149. bp := tls.Alloc(32)
  10150. defer tls.Free(32)
  10151. var font, info, public uintptr
  10152. var glyph_memory uint32
  10153. _, _, _, _ = font, glyph_memory, info, public
  10154. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  10155. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory != 0) {
  10156. return
  10157. }
  10158. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10159. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory {
  10160. libc.Xprintf(tls, __ccgo_ts+455, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory))
  10161. }
  10162. __XftDisplayValidateMemory(tls, info)
  10163. }
  10164. for (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory {
  10165. glyph_memory = libc.Uint32FromInt32(libc.Xrand(tls)) % (*TXftDisplayInfo)(unsafe.Pointer(info)).Fglyph_memory
  10166. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  10167. for public != 0 {
  10168. font = public
  10169. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > glyph_memory {
  10170. X_XftFontUncacheGlyph(tls, dpy, public)
  10171. break
  10172. }
  10173. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  10174. glyph_memory -= (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  10175. }
  10176. }
  10177. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10178. __XftDisplayValidateMemory(tls, info)
  10179. }
  10180. }
  10181. func XXftDefaultHasRender(tls *libc.TLS, dpy uintptr) (r int32) {
  10182. var info uintptr
  10183. _ = info
  10184. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10185. if !(info != 0) {
  10186. return m_False
  10187. }
  10188. return (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender
  10189. }
  10190. func XXftDefaultSet(tls *libc.TLS, dpy uintptr, defaults uintptr) (r int32) {
  10191. bp := tls.Alloc(16)
  10192. defer tls.Free(16)
  10193. var info, v1 uintptr
  10194. _, _ = info, v1
  10195. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10196. if !(info != 0) {
  10197. return m_False
  10198. }
  10199. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0 {
  10200. libfontconfig.XFcPatternDestroy(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults)
  10201. }
  10202. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = defaults
  10203. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory != 0) {
  10204. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory = libc.Uint32FromInt32(libc.Int32FromInt32(4) * libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024))
  10205. }
  10206. (*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)))
  10207. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10208. libc.Xprintf(tls, __ccgo_ts+493, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory))
  10209. }
  10210. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts != 0) {
  10211. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = int32(m_XFT_DPY_MAX_UNREF_FONTS)
  10212. }
  10213. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts = XXftDefaultGetInteger(tls, dpy, __ccgo_ts+245, 0, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts)
  10214. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10215. libc.Xprintf(tls, __ccgo_ts+522, libc.VaList(bp+8, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts))
  10216. }
  10217. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage = XXftDefaultGetBool(tls, dpy, __ccgo_ts+287, 0, (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage)
  10218. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  10219. if (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage != 0 {
  10220. v1 = __ccgo_ts + 301
  10221. } else {
  10222. v1 = __ccgo_ts + 306
  10223. }
  10224. libc.Xprintf(tls, __ccgo_ts+550, libc.VaList(bp+8, v1))
  10225. }
  10226. return int32(m_True)
  10227. }
  10228. func XXftDefaultParseBool(tls *libc.TLS, v uintptr) (r int32) {
  10229. var c0, c1 int8
  10230. _, _ = c0, c1
  10231. c0 = *(*int8)(unsafe.Pointer(v))
  10232. if libc.BoolInt32(libc.Uint32FromInt32(int32(c0))-uint32('A') < uint32(26)) != 0 {
  10233. c0 = int8(libc.Xtolower(tls, int32(c0)))
  10234. }
  10235. if int32(c0) == int32('t') || int32(c0) == int32('y') || int32(c0) == int32('1') {
  10236. return int32(1)
  10237. }
  10238. if int32(c0) == int32('f') || int32(c0) == int32('n') || int32(c0) == int32('0') {
  10239. return 0
  10240. }
  10241. if int32(c0) == int32('o') {
  10242. c1 = *(*int8)(unsafe.Pointer(v + 1))
  10243. if libc.BoolInt32(libc.Uint32FromInt32(int32(c1))-uint32('A') < uint32(26)) != 0 {
  10244. c1 = int8(libc.Xtolower(tls, int32(c1)))
  10245. }
  10246. if int32(c1) == int32('n') {
  10247. return int32(1)
  10248. }
  10249. if int32(c1) == int32('f') {
  10250. return 0
  10251. }
  10252. }
  10253. return -int32(1)
  10254. }
  10255. func __XftDefaultInitBool(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  10256. var i, v1 int32
  10257. var v uintptr
  10258. var v2 bool
  10259. _, _, _, _ = i, v, v1, v2
  10260. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+578, option)
  10261. if v2 = v != 0; v2 {
  10262. v1 = XXftDefaultParseBool(tls, v)
  10263. i = v1
  10264. }
  10265. if v2 && v1 >= 0 {
  10266. return libfontconfig.XFcPatternAddBool(tls, pat, option, libc.BoolInt32(i != 0))
  10267. }
  10268. return int32(m_True)
  10269. }
  10270. func __XftDefaultInitDouble(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  10271. bp := tls.Alloc(16)
  10272. defer tls.Free(16)
  10273. var d float64
  10274. var v uintptr
  10275. var _ /* e at bp+0 */ uintptr
  10276. _, _ = d, v
  10277. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+578, option)
  10278. if v != 0 {
  10279. d = libc.Xstrtod(tls, v, bp)
  10280. if *(*uintptr)(unsafe.Pointer(bp)) != v {
  10281. return libfontconfig.XFcPatternAddDouble(tls, pat, option, d)
  10282. }
  10283. }
  10284. return int32(m_True)
  10285. }
  10286. func __XftDefaultInitInteger(tls *libc.TLS, dpy uintptr, pat uintptr, option uintptr) (r int32) {
  10287. bp := tls.Alloc(16)
  10288. defer tls.Free(16)
  10289. var v uintptr
  10290. var _ /* e at bp+0 */ uintptr
  10291. var _ /* i at bp+4 */ int32
  10292. _ = v
  10293. v = libx11.XXGetDefault(tls, dpy, __ccgo_ts+578, option)
  10294. if v != 0 {
  10295. if libfontconfig.XFcNameConstant(tls, v, bp+4) != 0 {
  10296. return libfontconfig.XFcPatternAddInteger(tls, pat, option, *(*int32)(unsafe.Pointer(bp + 4)))
  10297. }
  10298. *(*int32)(unsafe.Pointer(bp + 4)) = int32(libc.Xstrtol(tls, v, bp, 0))
  10299. if *(*uintptr)(unsafe.Pointer(bp)) != v {
  10300. return libfontconfig.XFcPatternAddInteger(tls, pat, option, *(*int32)(unsafe.Pointer(bp + 4)))
  10301. }
  10302. }
  10303. return int32(m_True)
  10304. }
  10305. func __XftDefaultInit(tls *libc.TLS, dpy uintptr) (r uintptr) {
  10306. var pat uintptr
  10307. _ = pat
  10308. pat = libfontconfig.XFcPatternCreate(tls)
  10309. if !(pat != 0) {
  10310. goto bail0
  10311. }
  10312. if !(__XftDefaultInitDouble(tls, dpy, pat, __ccgo_ts+582) != 0) {
  10313. goto bail1
  10314. }
  10315. if !(__XftDefaultInitDouble(tls, dpy, pat, __ccgo_ts+588) != 0) {
  10316. goto bail1
  10317. }
  10318. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+592) != 0) {
  10319. goto bail1
  10320. }
  10321. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+599) != 0) {
  10322. goto bail1
  10323. }
  10324. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+604) != 0) {
  10325. goto bail1
  10326. }
  10327. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+614) != 0) {
  10328. goto bail1
  10329. }
  10330. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+624) != 0) {
  10331. goto bail1
  10332. }
  10333. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+633) != 0) {
  10334. goto bail1
  10335. }
  10336. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+642) != 0) {
  10337. goto bail1
  10338. }
  10339. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+652) != 0) {
  10340. goto bail1
  10341. }
  10342. if !(__XftDefaultInitBool(tls, dpy, pat, __ccgo_ts+660) != 0) {
  10343. goto bail1
  10344. }
  10345. if !(__XftDefaultInitInteger(tls, dpy, pat, __ccgo_ts+201) != 0) {
  10346. goto bail1
  10347. }
  10348. return pat
  10349. goto bail1
  10350. bail1:
  10351. ;
  10352. libfontconfig.XFcPatternDestroy(tls, pat)
  10353. goto bail0
  10354. bail0:
  10355. ;
  10356. return libc.UintptrFromInt32(0)
  10357. return r
  10358. }
  10359. func __XftDefaultGet(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, v uintptr) (r1 TFcResult) {
  10360. var info uintptr
  10361. var r TFcResult
  10362. _, _ = info, r
  10363. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  10364. if !(info != 0) {
  10365. return int32(_FcResultNoMatch)
  10366. }
  10367. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0) {
  10368. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults = __XftDefaultInit(tls, dpy)
  10369. if !((*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults != 0) {
  10370. return int32(_FcResultNoMatch)
  10371. }
  10372. }
  10373. r = libfontconfig.XFcPatternGet(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults, object, screen, v)
  10374. if r == int32(_FcResultNoId) && screen > 0 {
  10375. r = libfontconfig.XFcPatternGet(tls, (*TXftDisplayInfo)(unsafe.Pointer(info)).Fdefaults, object, 0, v)
  10376. }
  10377. return r
  10378. }
  10379. func XXftDefaultGetBool(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, def int32) (r1 int32) {
  10380. bp := tls.Alloc(16)
  10381. defer tls.Free(16)
  10382. var r TFcResult
  10383. var _ /* v at bp+0 */ TFcValue
  10384. _ = r
  10385. r = __XftDefaultGet(tls, dpy, object, screen, bp)
  10386. if r != int32(_FcResultMatch) || (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 != int32(_FcTypeBool) {
  10387. return def
  10388. }
  10389. return *(*TFcBool)(unsafe.Pointer(bp + 4))
  10390. }
  10391. func XXftDefaultGetInteger(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, def int32) (r1 int32) {
  10392. bp := tls.Alloc(16)
  10393. defer tls.Free(16)
  10394. var r TFcResult
  10395. var _ /* v at bp+0 */ TFcValue
  10396. _ = r
  10397. r = __XftDefaultGet(tls, dpy, object, screen, bp)
  10398. if r != int32(_FcResultMatch) || (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 != int32(_FcTypeInteger) {
  10399. return def
  10400. }
  10401. return *(*int32)(unsafe.Pointer(bp + 4))
  10402. }
  10403. func XXftDefaultGetDouble(tls *libc.TLS, dpy uintptr, object uintptr, screen int32, def float64) (r1 float64) {
  10404. bp := tls.Alloc(16)
  10405. defer tls.Free(16)
  10406. var r TFcResult
  10407. var _ /* v at bp+0 */ TFcValue
  10408. _ = r
  10409. r = __XftDefaultGet(tls, dpy, object, screen, bp)
  10410. if r != int32(_FcResultMatch) || (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 != int32(_FcTypeDouble) {
  10411. return def
  10412. }
  10413. return *(*float64)(unsafe.Pointer(bp + 4))
  10414. }
  10415. func XXftDefaultSubstitute(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr) {
  10416. bp := tls.Alloc(16)
  10417. defer tls.Free(16)
  10418. var dpi float64
  10419. var render_order, subpixel int32
  10420. var _ /* v at bp+0 */ TFcValue
  10421. _, _, _ = dpi, render_order, subpixel
  10422. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+592, 0, bp) == int32(_FcResultNoMatch) {
  10423. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+592, XXftDefaultGetBool(tls, dpy, __ccgo_ts+592, screen, XXftDefaultHasRender(tls, dpy)))
  10424. }
  10425. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+614, 0, bp) == int32(_FcResultNoMatch) {
  10426. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+614, XXftDefaultGetBool(tls, dpy, __ccgo_ts+614, screen, int32(m_True)))
  10427. }
  10428. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+624, 0, bp) == int32(_FcResultNoMatch) {
  10429. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+624, XXftDefaultGetBool(tls, dpy, __ccgo_ts+624, screen, m_False))
  10430. }
  10431. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+652, 0, bp) == int32(_FcResultNoMatch) {
  10432. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+652, XXftDefaultGetBool(tls, dpy, __ccgo_ts+652, screen, int32(m_True)))
  10433. }
  10434. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+642, 0, bp) == int32(_FcResultNoMatch) {
  10435. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+642, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+642, screen, int32(m_FC_HINT_FULL)))
  10436. }
  10437. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+633, 0, bp) == int32(_FcResultNoMatch) {
  10438. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+633, XXftDefaultGetBool(tls, dpy, __ccgo_ts+633, screen, m_False))
  10439. }
  10440. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+599, 0, bp) == int32(_FcResultNoMatch) {
  10441. subpixel = m_FC_RGBA_UNKNOWN
  10442. if XXftDefaultHasRender(tls, dpy) != 0 {
  10443. render_order = libxrender.XXRenderQuerySubpixelOrder(tls, dpy, screen)
  10444. switch render_order {
  10445. default:
  10446. fallthrough
  10447. case m_SubPixelUnknown:
  10448. subpixel = m_FC_RGBA_UNKNOWN
  10449. case int32(m_SubPixelHorizontalRGB):
  10450. subpixel = int32(m_FC_RGBA_RGB)
  10451. case int32(m_SubPixelHorizontalBGR):
  10452. subpixel = int32(m_FC_RGBA_BGR)
  10453. case int32(m_SubPixelVerticalRGB):
  10454. subpixel = int32(m_FC_RGBA_VRGB)
  10455. case int32(m_SubPixelVerticalBGR):
  10456. subpixel = int32(m_FC_RGBA_VBGR)
  10457. case int32(m_SubPixelNone):
  10458. subpixel = int32(m_FC_RGBA_NONE)
  10459. break
  10460. }
  10461. }
  10462. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+599, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+599, screen, subpixel))
  10463. }
  10464. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+604, 0, bp) == int32(_FcResultNoMatch) {
  10465. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+604, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+604, screen, int32(m_FC_LCD_DEFAULT)))
  10466. }
  10467. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+660, 0, bp) == int32(_FcResultNoMatch) {
  10468. libfontconfig.XFcPatternAddBool(tls, pattern, __ccgo_ts+660, XXftDefaultGetBool(tls, dpy, __ccgo_ts+660, screen, m_False))
  10469. }
  10470. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+588, 0, bp) == int32(_FcResultNoMatch) {
  10471. dpi = float64(float64((*TScreen)(unsafe.Pointer((*struct {
  10472. Fext_data uintptr
  10473. Fprivate1 uintptr
  10474. Ffd int32
  10475. Fprivate2 int32
  10476. Fproto_major_version int32
  10477. Fproto_minor_version int32
  10478. Fvendor uintptr
  10479. Fprivate3 TXID
  10480. Fprivate4 TXID
  10481. Fprivate5 TXID
  10482. Fprivate6 int32
  10483. Fresource_alloc uintptr
  10484. Fbyte_order int32
  10485. Fbitmap_unit int32
  10486. Fbitmap_pad int32
  10487. Fbitmap_bit_order int32
  10488. Fnformats int32
  10489. Fpixmap_format uintptr
  10490. Fprivate8 int32
  10491. Frelease int32
  10492. Fprivate9 uintptr
  10493. Fprivate10 uintptr
  10494. Fqlen int32
  10495. Flast_request_read uint32
  10496. Frequest uint32
  10497. Fprivate11 TXPointer
  10498. Fprivate12 TXPointer
  10499. Fprivate13 TXPointer
  10500. Fprivate14 TXPointer
  10501. Fmax_request_size uint32
  10502. Fdb uintptr
  10503. Fprivate15 uintptr
  10504. Fdisplay_name uintptr
  10505. Fdefault_screen int32
  10506. Fnscreens int32
  10507. Fscreens uintptr
  10508. Fmotion_buffer uint32
  10509. Fprivate16 uint32
  10510. Fmin_keycode int32
  10511. Fmax_keycode int32
  10512. Fprivate17 TXPointer
  10513. Fprivate18 TXPointer
  10514. Fprivate19 int32
  10515. Fxdefaults uintptr
  10516. })(unsafe.Pointer(dpy)).Fscreens+uintptr(screen)*80)).Fheight)*float64(25.4)) / float64((*TScreen)(unsafe.Pointer((*struct {
  10517. Fext_data uintptr
  10518. Fprivate1 uintptr
  10519. Ffd int32
  10520. Fprivate2 int32
  10521. Fproto_major_version int32
  10522. Fproto_minor_version int32
  10523. Fvendor uintptr
  10524. Fprivate3 TXID
  10525. Fprivate4 TXID
  10526. Fprivate5 TXID
  10527. Fprivate6 int32
  10528. Fresource_alloc uintptr
  10529. Fbyte_order int32
  10530. Fbitmap_unit int32
  10531. Fbitmap_pad int32
  10532. Fbitmap_bit_order int32
  10533. Fnformats int32
  10534. Fpixmap_format uintptr
  10535. Fprivate8 int32
  10536. Frelease int32
  10537. Fprivate9 uintptr
  10538. Fprivate10 uintptr
  10539. Fqlen int32
  10540. Flast_request_read uint32
  10541. Frequest uint32
  10542. Fprivate11 TXPointer
  10543. Fprivate12 TXPointer
  10544. Fprivate13 TXPointer
  10545. Fprivate14 TXPointer
  10546. Fmax_request_size uint32
  10547. Fdb uintptr
  10548. Fprivate15 uintptr
  10549. Fdisplay_name uintptr
  10550. Fdefault_screen int32
  10551. Fnscreens int32
  10552. Fscreens uintptr
  10553. Fmotion_buffer uint32
  10554. Fprivate16 uint32
  10555. Fmin_keycode int32
  10556. Fmax_keycode int32
  10557. Fprivate17 TXPointer
  10558. Fprivate18 TXPointer
  10559. Fprivate19 int32
  10560. Fxdefaults uintptr
  10561. })(unsafe.Pointer(dpy)).Fscreens+uintptr(screen)*80)).Fmheight)
  10562. libfontconfig.XFcPatternAddDouble(tls, pattern, __ccgo_ts+588, XXftDefaultGetDouble(tls, dpy, __ccgo_ts+588, screen, dpi))
  10563. }
  10564. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+582, 0, bp) == int32(_FcResultNoMatch) {
  10565. libfontconfig.XFcPatternAddDouble(tls, pattern, __ccgo_ts+582, XXftDefaultGetDouble(tls, dpy, __ccgo_ts+582, screen, float64(1)))
  10566. }
  10567. if libfontconfig.XFcPatternGet(tls, pattern, __ccgo_ts+201, 0, bp) == int32(_FcResultNoMatch) {
  10568. libfontconfig.XFcPatternAddInteger(tls, pattern, __ccgo_ts+201, XXftDefaultGetInteger(tls, dpy, __ccgo_ts+201, screen, libc.Int32FromInt32(1024)*libc.Int32FromInt32(1024)))
  10569. }
  10570. libfontconfig.XFcDefaultSubstitute(tls, pattern)
  10571. }
  10572. const m_VisualIDMask1 = 1
  10573. const m_VisualScreenMask1 = 2
  10574. /* xftxlfd.c */
  10575. /*
  10576. * Ok, this is a pain. To share source pictures across multiple destinations,
  10577. * the screen for each drawable must be discovered.
  10578. */
  10579. func __XftDrawScreen(tls *libc.TLS, dpy uintptr, drawable TDrawable, visual uintptr) (r int32) {
  10580. bp := tls.Alloc(80)
  10581. defer tls.Free(80)
  10582. var ret uintptr
  10583. var s int32
  10584. var _ /* borderWidth at bp+20 */ uint32
  10585. var _ /* depth at bp+24 */ uint32
  10586. var _ /* height at bp+16 */ uint32
  10587. var _ /* nret at bp+68 */ int32
  10588. var _ /* root at bp+0 */ TWindow
  10589. var _ /* template at bp+28 */ TXVisualInfo
  10590. var _ /* width at bp+12 */ uint32
  10591. var _ /* x at bp+4 */ int32
  10592. var _ /* y at bp+8 */ int32
  10593. _, _ = ret, s
  10594. /* Special case the most common environment */
  10595. if (*struct {
  10596. Fext_data uintptr
  10597. Fprivate1 uintptr
  10598. Ffd int32
  10599. Fprivate2 int32
  10600. Fproto_major_version int32
  10601. Fproto_minor_version int32
  10602. Fvendor uintptr
  10603. Fprivate3 TXID
  10604. Fprivate4 TXID
  10605. Fprivate5 TXID
  10606. Fprivate6 int32
  10607. Fresource_alloc uintptr
  10608. Fbyte_order int32
  10609. Fbitmap_unit int32
  10610. Fbitmap_pad int32
  10611. Fbitmap_bit_order int32
  10612. Fnformats int32
  10613. Fpixmap_format uintptr
  10614. Fprivate8 int32
  10615. Frelease int32
  10616. Fprivate9 uintptr
  10617. Fprivate10 uintptr
  10618. Fqlen int32
  10619. Flast_request_read uint32
  10620. Frequest uint32
  10621. Fprivate11 TXPointer
  10622. Fprivate12 TXPointer
  10623. Fprivate13 TXPointer
  10624. Fprivate14 TXPointer
  10625. Fmax_request_size uint32
  10626. Fdb uintptr
  10627. Fprivate15 uintptr
  10628. Fdisplay_name uintptr
  10629. Fdefault_screen int32
  10630. Fnscreens int32
  10631. Fscreens uintptr
  10632. Fmotion_buffer uint32
  10633. Fprivate16 uint32
  10634. Fmin_keycode int32
  10635. Fmax_keycode int32
  10636. Fprivate17 TXPointer
  10637. Fprivate18 TXPointer
  10638. Fprivate19 int32
  10639. Fxdefaults uintptr
  10640. })(unsafe.Pointer(dpy)).Fnscreens == int32(1) {
  10641. return 0
  10642. }
  10643. /*
  10644. * If we've got a visual, look for the screen that points at it.
  10645. * This requires no round trip.
  10646. */
  10647. if visual != 0 {
  10648. s = 0
  10649. for {
  10650. if !(s < (*struct {
  10651. Fext_data uintptr
  10652. Fprivate1 uintptr
  10653. Ffd int32
  10654. Fprivate2 int32
  10655. Fproto_major_version int32
  10656. Fproto_minor_version int32
  10657. Fvendor uintptr
  10658. Fprivate3 TXID
  10659. Fprivate4 TXID
  10660. Fprivate5 TXID
  10661. Fprivate6 int32
  10662. Fresource_alloc uintptr
  10663. Fbyte_order int32
  10664. Fbitmap_unit int32
  10665. Fbitmap_pad int32
  10666. Fbitmap_bit_order int32
  10667. Fnformats int32
  10668. Fpixmap_format uintptr
  10669. Fprivate8 int32
  10670. Frelease int32
  10671. Fprivate9 uintptr
  10672. Fprivate10 uintptr
  10673. Fqlen int32
  10674. Flast_request_read uint32
  10675. Frequest uint32
  10676. Fprivate11 TXPointer
  10677. Fprivate12 TXPointer
  10678. Fprivate13 TXPointer
  10679. Fprivate14 TXPointer
  10680. Fmax_request_size uint32
  10681. Fdb uintptr
  10682. Fprivate15 uintptr
  10683. Fdisplay_name uintptr
  10684. Fdefault_screen int32
  10685. Fnscreens int32
  10686. Fscreens uintptr
  10687. Fmotion_buffer uint32
  10688. Fprivate16 uint32
  10689. Fmin_keycode int32
  10690. Fmax_keycode int32
  10691. Fprivate17 TXPointer
  10692. Fprivate18 TXPointer
  10693. Fprivate19 int32
  10694. Fxdefaults uintptr
  10695. })(unsafe.Pointer(dpy)).Fnscreens) {
  10696. break
  10697. }
  10698. (*(*TXVisualInfo)(unsafe.Pointer(bp + 28))).Fvisualid = (*TVisual)(unsafe.Pointer(visual)).Fvisualid
  10699. (*(*TXVisualInfo)(unsafe.Pointer(bp + 28))).Fscreen = s
  10700. ret = libx11.XXGetVisualInfo(tls, dpy, int32(libc.Int32FromInt32(m_VisualIDMask1)|libc.Int32FromInt32(m_VisualScreenMask1)), bp+28, bp+68)
  10701. if ret != 0 {
  10702. libx11.XXFree(tls, ret)
  10703. return s
  10704. }
  10705. goto _1
  10706. _1:
  10707. ;
  10708. s++
  10709. }
  10710. }
  10711. /*
  10712. * Otherwise, as the server for the drawable geometry and find
  10713. * the screen from the root window.
  10714. * This takes a round trip.
  10715. */
  10716. if libx11.XXGetGeometry(tls, dpy, drawable, bp, bp+4, bp+8, bp+12, bp+16, bp+20, bp+24) != 0 {
  10717. s = 0
  10718. for {
  10719. if !(s < (*struct {
  10720. Fext_data uintptr
  10721. Fprivate1 uintptr
  10722. Ffd int32
  10723. Fprivate2 int32
  10724. Fproto_major_version int32
  10725. Fproto_minor_version int32
  10726. Fvendor uintptr
  10727. Fprivate3 TXID
  10728. Fprivate4 TXID
  10729. Fprivate5 TXID
  10730. Fprivate6 int32
  10731. Fresource_alloc uintptr
  10732. Fbyte_order int32
  10733. Fbitmap_unit int32
  10734. Fbitmap_pad int32
  10735. Fbitmap_bit_order int32
  10736. Fnformats int32
  10737. Fpixmap_format uintptr
  10738. Fprivate8 int32
  10739. Frelease int32
  10740. Fprivate9 uintptr
  10741. Fprivate10 uintptr
  10742. Fqlen int32
  10743. Flast_request_read uint32
  10744. Frequest uint32
  10745. Fprivate11 TXPointer
  10746. Fprivate12 TXPointer
  10747. Fprivate13 TXPointer
  10748. Fprivate14 TXPointer
  10749. Fmax_request_size uint32
  10750. Fdb uintptr
  10751. Fprivate15 uintptr
  10752. Fdisplay_name uintptr
  10753. Fdefault_screen int32
  10754. Fnscreens int32
  10755. Fscreens uintptr
  10756. Fmotion_buffer uint32
  10757. Fprivate16 uint32
  10758. Fmin_keycode int32
  10759. Fmax_keycode int32
  10760. Fprivate17 TXPointer
  10761. Fprivate18 TXPointer
  10762. Fprivate19 int32
  10763. Fxdefaults uintptr
  10764. })(unsafe.Pointer(dpy)).Fnscreens) {
  10765. break
  10766. }
  10767. if (*TScreen)(unsafe.Pointer((*struct {
  10768. Fext_data uintptr
  10769. Fprivate1 uintptr
  10770. Ffd int32
  10771. Fprivate2 int32
  10772. Fproto_major_version int32
  10773. Fproto_minor_version int32
  10774. Fvendor uintptr
  10775. Fprivate3 TXID
  10776. Fprivate4 TXID
  10777. Fprivate5 TXID
  10778. Fprivate6 int32
  10779. Fresource_alloc uintptr
  10780. Fbyte_order int32
  10781. Fbitmap_unit int32
  10782. Fbitmap_pad int32
  10783. Fbitmap_bit_order int32
  10784. Fnformats int32
  10785. Fpixmap_format uintptr
  10786. Fprivate8 int32
  10787. Frelease int32
  10788. Fprivate9 uintptr
  10789. Fprivate10 uintptr
  10790. Fqlen int32
  10791. Flast_request_read uint32
  10792. Frequest uint32
  10793. Fprivate11 TXPointer
  10794. Fprivate12 TXPointer
  10795. Fprivate13 TXPointer
  10796. Fprivate14 TXPointer
  10797. Fmax_request_size uint32
  10798. Fdb uintptr
  10799. Fprivate15 uintptr
  10800. Fdisplay_name uintptr
  10801. Fdefault_screen int32
  10802. Fnscreens int32
  10803. Fscreens uintptr
  10804. Fmotion_buffer uint32
  10805. Fprivate16 uint32
  10806. Fmin_keycode int32
  10807. Fmax_keycode int32
  10808. Fprivate17 TXPointer
  10809. Fprivate18 TXPointer
  10810. Fprivate19 int32
  10811. Fxdefaults uintptr
  10812. })(unsafe.Pointer(dpy)).Fscreens+uintptr(s)*80)).Froot == *(*TWindow)(unsafe.Pointer(bp)) {
  10813. return s
  10814. }
  10815. goto _2
  10816. _2:
  10817. ;
  10818. s++
  10819. }
  10820. }
  10821. /*
  10822. * Make a guess -- it's probably wrong, but then the app probably
  10823. * handed us a bogus drawable in this case
  10824. */
  10825. return 0
  10826. }
  10827. func XXftDrawDepth(tls *libc.TLS, draw uintptr) (r uint32) {
  10828. bp := tls.Alloc(32)
  10829. defer tls.Free(32)
  10830. var _ /* borderWidth at bp+20 */ uint32
  10831. var _ /* depth at bp+24 */ uint32
  10832. var _ /* height at bp+16 */ uint32
  10833. var _ /* root at bp+0 */ TWindow
  10834. var _ /* width at bp+12 */ uint32
  10835. var _ /* x at bp+4 */ int32
  10836. var _ /* y at bp+8 */ int32
  10837. if !((*TXftDraw)(unsafe.Pointer(draw)).Fdepth != 0) {
  10838. if libx11.XXGetGeometry(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, bp, bp+4, bp+8, bp+12, bp+16, bp+20, bp+24) != 0 {
  10839. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = *(*uint32)(unsafe.Pointer(bp + 24))
  10840. }
  10841. }
  10842. return (*TXftDraw)(unsafe.Pointer(draw)).Fdepth
  10843. }
  10844. func XXftDrawBitsPerPixel(tls *libc.TLS, draw uintptr) (r uint32) {
  10845. bp := tls.Alloc(16)
  10846. defer tls.Free(16)
  10847. var depth, v1 uint32
  10848. var formats, v2 uintptr
  10849. var i int32
  10850. var v3 bool
  10851. var _ /* nformats at bp+0 */ int32
  10852. _, _, _, _, _, _ = depth, formats, i, v1, v2, v3
  10853. if !((*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel != 0) {
  10854. v1 = XXftDrawDepth(tls, draw)
  10855. depth = v1
  10856. if v3 = v1 != 0; v3 {
  10857. v2 = libx11.XXListPixmapFormats(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, bp)
  10858. formats = v2
  10859. }
  10860. if v3 && v2 != 0 {
  10861. i = 0
  10862. for {
  10863. if !(i < *(*int32)(unsafe.Pointer(bp))) {
  10864. break
  10865. }
  10866. if libc.Uint32FromInt32((*(*TXPixmapFormatValues)(unsafe.Pointer(formats + uintptr(i)*12))).Fdepth) == depth {
  10867. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = libc.Uint32FromInt32((*(*TXPixmapFormatValues)(unsafe.Pointer(formats + uintptr(i)*12))).Fbits_per_pixel)
  10868. break
  10869. }
  10870. goto _4
  10871. _4:
  10872. ;
  10873. i++
  10874. }
  10875. libx11.XXFree(tls, formats)
  10876. }
  10877. }
  10878. return (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel
  10879. }
  10880. func XXftDrawCreate(tls *libc.TLS, dpy uintptr, drawable TDrawable, visual uintptr, colormap TColormap) (r uintptr) {
  10881. var draw uintptr
  10882. _ = draw
  10883. draw = libc.Xmalloc(tls, uint32(52))
  10884. if !(draw != 0) {
  10885. return libc.UintptrFromInt32(0)
  10886. }
  10887. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  10888. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = drawable
  10889. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, drawable, visual)
  10890. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = uint32(0) /* don't find out unless we need to know */
  10891. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(0) /* don't find out unless we need to know */
  10892. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = visual
  10893. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = colormap
  10894. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint32(0)
  10895. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10896. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  10897. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  10898. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  10899. XXftMemAlloc(tls, int32(_XFT_MEM_DRAW), uint32(52))
  10900. return draw
  10901. }
  10902. func XXftDrawCreateBitmap(tls *libc.TLS, dpy uintptr, bitmap TPixmap) (r uintptr) {
  10903. var draw uintptr
  10904. _ = draw
  10905. draw = libc.Xmalloc(tls, uint32(52))
  10906. if !(draw != 0) {
  10907. return libc.UintptrFromInt32(0)
  10908. }
  10909. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  10910. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = bitmap
  10911. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, bitmap, libc.UintptrFromInt32(0))
  10912. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = uint32(1)
  10913. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(1)
  10914. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = libc.UintptrFromInt32(0)
  10915. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = uint32(0)
  10916. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint32(0)
  10917. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10918. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  10919. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  10920. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  10921. XXftMemAlloc(tls, int32(_XFT_MEM_DRAW), uint32(52))
  10922. return draw
  10923. }
  10924. func XXftDrawCreateAlpha(tls *libc.TLS, dpy uintptr, pixmap TPixmap, depth int32) (r uintptr) {
  10925. var draw uintptr
  10926. _ = draw
  10927. draw = libc.Xmalloc(tls, uint32(52))
  10928. if !(draw != 0) {
  10929. return libc.UintptrFromInt32(0)
  10930. }
  10931. (*TXftDraw)(unsafe.Pointer(draw)).Fdpy = dpy
  10932. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = pixmap
  10933. (*TXftDraw)(unsafe.Pointer(draw)).Fscreen = __XftDrawScreen(tls, dpy, pixmap, libc.UintptrFromInt32(0))
  10934. (*TXftDraw)(unsafe.Pointer(draw)).Fdepth = libc.Uint32FromInt32(depth)
  10935. (*TXftDraw)(unsafe.Pointer(draw)).Fbits_per_pixel = uint32(0) /* don't find out until we need it */
  10936. (*TXftDraw)(unsafe.Pointer(draw)).Fvisual = libc.UintptrFromInt32(0)
  10937. (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap = uint32(0)
  10938. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint32(0)
  10939. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10940. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fuse_pixmap = 0
  10941. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  10942. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = m_ClipByChildren
  10943. XXftMemAlloc(tls, int32(_XFT_MEM_DRAW), uint32(52))
  10944. return draw
  10945. }
  10946. func __XftDrawFormat(tls *libc.TLS, draw uintptr) (r uintptr) {
  10947. bp := tls.Alloc(32)
  10948. defer tls.Free(32)
  10949. var info uintptr
  10950. var _ /* pf at bp+0 */ TXRenderPictFormat
  10951. _ = info
  10952. info = X_XftDisplayInfoGet(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, int32(m_True))
  10953. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0) {
  10954. return libc.UintptrFromInt32(0)
  10955. }
  10956. if (*TXftDraw)(unsafe.Pointer(draw)).Fvisual == libc.UintptrFromInt32(0) {
  10957. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Ftype1 = int32(m_PictTypeDirect)
  10958. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth = libc.Int32FromUint32(XXftDrawDepth(tls, draw))
  10959. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.Falpha = 0
  10960. (*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdirect.FalphaMask = int16(libc.Int32FromInt32(1)<<(*(*TXRenderPictFormat)(unsafe.Pointer(bp))).Fdepth - libc.Int32FromInt32(1))
  10961. return libxrender.XXRenderFindFormat(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, libc.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)
  10962. } else {
  10963. return libxrender.XXRenderFindVisualFormat(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fvisual)
  10964. }
  10965. return r
  10966. }
  10967. func XXftDrawChange(tls *libc.TLS, draw uintptr, drawable TDrawable) {
  10968. (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable = drawable
  10969. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  10970. libxrender.XXRenderFreePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict)
  10971. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = uint32(0)
  10972. }
  10973. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  10974. libx11.XXFreeGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc)
  10975. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libc.UintptrFromInt32(0)
  10976. }
  10977. }
  10978. func XXftDrawDisplay(tls *libc.TLS, draw uintptr) (r uintptr) {
  10979. return (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  10980. }
  10981. func XXftDrawDrawable(tls *libc.TLS, draw uintptr) (r TDrawable) {
  10982. return (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable
  10983. }
  10984. func XXftDrawColormap(tls *libc.TLS, draw uintptr) (r TColormap) {
  10985. return (*TXftDraw)(unsafe.Pointer(draw)).Fcolormap
  10986. }
  10987. func XXftDrawVisual(tls *libc.TLS, draw uintptr) (r uintptr) {
  10988. return (*TXftDraw)(unsafe.Pointer(draw)).Fvisual
  10989. }
  10990. func XXftDrawDestroy(tls *libc.TLS, draw uintptr) {
  10991. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  10992. libxrender.XXRenderFreePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict)
  10993. }
  10994. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  10995. libx11.XXFreeGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc)
  10996. }
  10997. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  10998. case int32(_XftClipTypeRegion):
  10999. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 32)))
  11000. case int32(_XftClipTypeRectangles):
  11001. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 32)))
  11002. case int32(_XftClipTypeNone):
  11003. break
  11004. }
  11005. XXftMemFree(tls, int32(_XFT_MEM_DRAW), uint32(52))
  11006. libc.Xfree(tls, draw)
  11007. }
  11008. func XXftDrawSrcPicture(tls *libc.TLS, draw uintptr, color uintptr) (r TPicture) {
  11009. bp := tls.Alloc(64)
  11010. defer tls.Free(64)
  11011. var dpy, info uintptr
  11012. var i int32
  11013. var pix TPixmap
  11014. var _ /* bitmapColor at bp+0 */ TXftColor
  11015. var _ /* pa at bp+12 */ TXRenderPictureAttributes
  11016. _, _, _, _ = dpy, i, info, pix
  11017. dpy = (*TXftDraw)(unsafe.Pointer(draw)).Fdpy
  11018. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  11019. if !(info != 0) || !((*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat != 0) {
  11020. return uint32(0)
  11021. }
  11022. /*
  11023. * Monochrome targets require special handling; the PictOp controls
  11024. * the color, and the color must be opaque
  11025. */
  11026. if !((*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0) && (*TXftDraw)(unsafe.Pointer(draw)).Fdepth == uint32(1) {
  11027. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Falpha = uint16(0xffff)
  11028. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fred = uint16(0xffff)
  11029. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fgreen = uint16(0xffff)
  11030. (*(*TXftColor)(unsafe.Pointer(bp))).Fcolor.Fblue = uint16(0xffff)
  11031. color = bp
  11032. }
  11033. /*
  11034. * See if there's one already available
  11035. */
  11036. i = 0
  11037. for {
  11038. if !(i < int32(m_XFT_NUM_SOLID_COLOR)) {
  11039. break
  11040. }
  11041. if (*(*TXftSolidColor)(unsafe.Pointer(info + 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) {
  11042. return (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fpict
  11043. }
  11044. goto _1
  11045. _1:
  11046. ;
  11047. i++
  11048. }
  11049. /*
  11050. * Pick one to replace at random
  11051. */
  11052. i = libc.Int32FromUint32(libc.Uint32FromInt32(libc.Xrand(tls)) % uint32(m_XFT_NUM_SOLID_COLOR))
  11053. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasSolid != 0 {
  11054. /*
  11055. * Free any existing entry
  11056. */
  11057. if (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fpict != 0 {
  11058. libxrender.XXRenderFreePicture(tls, dpy, (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fpict)
  11059. }
  11060. /*
  11061. * Create picture
  11062. */
  11063. (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fpict = libxrender.XXRenderCreateSolidFill(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, color+4)
  11064. } else {
  11065. 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 {
  11066. libxrender.XXRenderFreePicture(tls, dpy, (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fpict)
  11067. (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fpict = uint32(0)
  11068. }
  11069. /*
  11070. * Create picture if necessary
  11071. */
  11072. if !((*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fpict != 0) {
  11073. pix = libx11.XXCreatePixmap(tls, dpy, (*TScreen)(unsafe.Pointer((*struct {
  11074. Fext_data uintptr
  11075. Fprivate1 uintptr
  11076. Ffd int32
  11077. Fprivate2 int32
  11078. Fproto_major_version int32
  11079. Fproto_minor_version int32
  11080. Fvendor uintptr
  11081. Fprivate3 TXID
  11082. Fprivate4 TXID
  11083. Fprivate5 TXID
  11084. Fprivate6 int32
  11085. Fresource_alloc uintptr
  11086. Fbyte_order int32
  11087. Fbitmap_unit int32
  11088. Fbitmap_pad int32
  11089. Fbitmap_bit_order int32
  11090. Fnformats int32
  11091. Fpixmap_format uintptr
  11092. Fprivate8 int32
  11093. Frelease int32
  11094. Fprivate9 uintptr
  11095. Fprivate10 uintptr
  11096. Fqlen int32
  11097. Flast_request_read uint32
  11098. Frequest uint32
  11099. Fprivate11 TXPointer
  11100. Fprivate12 TXPointer
  11101. Fprivate13 TXPointer
  11102. Fprivate14 TXPointer
  11103. Fmax_request_size uint32
  11104. Fdb uintptr
  11105. Fprivate15 uintptr
  11106. Fdisplay_name uintptr
  11107. Fdefault_screen int32
  11108. Fnscreens int32
  11109. Fscreens uintptr
  11110. Fmotion_buffer uint32
  11111. Fprivate16 uint32
  11112. Fmin_keycode int32
  11113. Fmax_keycode int32
  11114. Fprivate17 TXPointer
  11115. Fprivate18 TXPointer
  11116. Fprivate19 int32
  11117. Fxdefaults uintptr
  11118. })(unsafe.Pointer(dpy)).Fscreens+uintptr((*TXftDraw)(unsafe.Pointer(draw)).Fscreen)*80)).Froot, uint32(1), uint32(1), libc.Uint32FromInt32((*TXRenderPictFormat)(unsafe.Pointer((*TXftDisplayInfo)(unsafe.Pointer(info)).FsolidFormat)).Fdepth))
  11119. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp + 12))).Frepeat = int32(m_True)
  11120. (*(*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)
  11121. libx11.XXFreePixmap(tls, dpy, pix)
  11122. }
  11123. /*
  11124. * Set to the new color
  11125. */
  11126. (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fcolor = (*TXftColor)(unsafe.Pointer(color)).Fcolor
  11127. (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fscreen = (*TXftDraw)(unsafe.Pointer(draw)).Fscreen
  11128. libxrender.XXRenderFillRectangle(tls, dpy, int32(m_PictOpSrc), (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fpict, color+4, 0, 0, uint32(1), uint32(1))
  11129. }
  11130. (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fcolor = (*TXftColor)(unsafe.Pointer(color)).Fcolor
  11131. (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fscreen = (*TXftDraw)(unsafe.Pointer(draw)).Fscreen
  11132. return (*(*TXftSolidColor)(unsafe.Pointer(info + 56 + uintptr(i)*16))).Fpict
  11133. }
  11134. func __XftDrawOp(tls *libc.TLS, draw uintptr, color uintptr) (r int32) {
  11135. if (*TXftDraw)(unsafe.Pointer(draw)).Fvisual != 0 || (*TXftDraw)(unsafe.Pointer(draw)).Fdepth != uint32(1) {
  11136. return int32(m_PictOpOver)
  11137. }
  11138. if libc.Int32FromUint16((*TXftColor)(unsafe.Pointer(color)).Fcolor.Falpha) >= int32(0x8000) {
  11139. return int32(m_PictOpOver)
  11140. }
  11141. return int32(m_PictOpOutReverse)
  11142. }
  11143. func __XftDrawRenderPrepare(tls *libc.TLS, draw uintptr) (r TFcBool) {
  11144. bp := tls.Alloc(64)
  11145. defer tls.Free(64)
  11146. var format uintptr
  11147. var mask uint32
  11148. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  11149. _, _ = format, mask
  11150. if !((*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0) {
  11151. mask = uint32(0)
  11152. format = __XftDrawFormat(tls, draw)
  11153. if !(format != 0) {
  11154. return m_FcFalse
  11155. }
  11156. if (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode == int32(m_IncludeInferiors) {
  11157. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fsubwindow_mode = int32(m_IncludeInferiors)
  11158. mask |= libc.Uint32FromInt32(libc.Int32FromInt32(1) << libc.Int32FromInt32(8))
  11159. }
  11160. (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict = libxrender.XXRenderCreatePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, format, mask, bp)
  11161. if !((*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0) {
  11162. return m_FcFalse
  11163. }
  11164. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11165. case int32(_XftClipTypeRegion):
  11166. libxrender.XXRenderSetPictureClipRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, *(*TRegion)(unsafe.Pointer(draw + 32)))
  11167. case int32(_XftClipTypeRectangles):
  11168. libxrender.XXRenderSetPictureClipRectangles(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 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)
  11169. case int32(_XftClipTypeNone):
  11170. break
  11171. }
  11172. }
  11173. return int32(m_FcTrue)
  11174. }
  11175. func __XftDrawCorePrepare(tls *libc.TLS, draw uintptr, color uintptr) (r TFcBool) {
  11176. bp := tls.Alloc(96)
  11177. defer tls.Free(96)
  11178. var mask uint32
  11179. var _ /* gcv at bp+0 */ TXGCValues
  11180. _ = mask
  11181. if !((*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0) {
  11182. mask = uint32(0)
  11183. if (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode == int32(m_IncludeInferiors) {
  11184. (*(*TXGCValues)(unsafe.Pointer(bp))).Fsubwindow_mode = int32(m_IncludeInferiors)
  11185. mask |= libc.Uint32FromInt32(libc.Int32FromInt32(1) << libc.Int32FromInt32(15))
  11186. }
  11187. (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc = libx11.XXCreateGC(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, mask, bp)
  11188. if !((*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0) {
  11189. return m_FcFalse
  11190. }
  11191. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11192. case int32(_XftClipTypeRegion):
  11193. libx11.XXSetRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, *(*TRegion)(unsafe.Pointer(draw + 32)))
  11194. case int32(_XftClipTypeRectangles):
  11195. libx11.XXSetClipRectangles(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 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)
  11196. case int32(_XftClipTypeNone):
  11197. break
  11198. }
  11199. }
  11200. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  11201. return int32(m_FcTrue)
  11202. }
  11203. func XXftDrawPicture(tls *libc.TLS, draw uintptr) (r TPicture) {
  11204. if !(__XftDrawRenderPrepare(tls, draw) != 0) {
  11205. return uint32(0)
  11206. }
  11207. return (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict
  11208. }
  11209. func XXftDrawGlyphs(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, glyphs uintptr, nglyphs int32) {
  11210. var font uintptr
  11211. var src, v1 TPicture
  11212. var v2 bool
  11213. _, _, _, _ = font, src, v1, v2
  11214. font = pub
  11215. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  11216. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  11217. v1 = XXftDrawSrcPicture(tls, draw, color)
  11218. src = v1
  11219. }
  11220. if v2 && v1 != 0 {
  11221. XXftGlyphRender(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, __XftDrawOp(tls, draw, color), src, pub, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, 0, 0, x, y, glyphs, nglyphs)
  11222. }
  11223. } else {
  11224. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11225. XXftGlyphCore(tls, draw, color, pub, x, y, glyphs, nglyphs)
  11226. }
  11227. }
  11228. }
  11229. func XXftDrawString8(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11230. bp := tls.Alloc(4128)
  11231. defer tls.Free(4128)
  11232. var glyphs uintptr
  11233. var i int32
  11234. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11235. _, _ = glyphs, i
  11236. if XXftDebug(tls)&int32(m_XFT_DBG_DRAW) != 0 {
  11237. libc.Xprintf(tls, __ccgo_ts+669, libc.VaList(bp+4104, len1, len1, string1))
  11238. }
  11239. if len1 <= int32(m_NUM_LOCAL) {
  11240. glyphs = bp
  11241. } else {
  11242. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  11243. if !(glyphs != 0) {
  11244. return
  11245. }
  11246. }
  11247. i = 0
  11248. for {
  11249. if !(i < len1) {
  11250. break
  11251. }
  11252. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  11253. goto _1
  11254. _1:
  11255. ;
  11256. i++
  11257. }
  11258. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  11259. if glyphs != bp {
  11260. libc.Xfree(tls, glyphs)
  11261. }
  11262. }
  11263. func XXftDrawString16(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11264. bp := tls.Alloc(4096)
  11265. defer tls.Free(4096)
  11266. var glyphs uintptr
  11267. var i int32
  11268. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11269. _, _ = glyphs, i
  11270. if len1 <= 0 {
  11271. return
  11272. }
  11273. if len1 <= int32(m_NUM_LOCAL) {
  11274. glyphs = bp
  11275. } else {
  11276. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  11277. if !(glyphs != 0) {
  11278. return
  11279. }
  11280. }
  11281. i = 0
  11282. for {
  11283. if !(i < len1) {
  11284. break
  11285. }
  11286. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  11287. goto _1
  11288. _1:
  11289. ;
  11290. i++
  11291. }
  11292. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  11293. if glyphs != bp {
  11294. libc.Xfree(tls, glyphs)
  11295. }
  11296. }
  11297. func XXftDrawString32(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11298. bp := tls.Alloc(4096)
  11299. defer tls.Free(4096)
  11300. var glyphs uintptr
  11301. var i int32
  11302. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11303. _, _ = glyphs, i
  11304. if len1 <= 0 {
  11305. return
  11306. }
  11307. if len1 <= int32(m_NUM_LOCAL) {
  11308. glyphs = bp
  11309. } else {
  11310. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  11311. if !(glyphs != 0) {
  11312. return
  11313. }
  11314. }
  11315. i = 0
  11316. for {
  11317. if !(i < len1) {
  11318. break
  11319. }
  11320. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  11321. goto _1
  11322. _1:
  11323. ;
  11324. i++
  11325. }
  11326. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, len1)
  11327. if glyphs != bp {
  11328. libc.Xfree(tls, glyphs)
  11329. }
  11330. }
  11331. func XXftDrawStringUtf8(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, len1 int32) {
  11332. bp := tls.Alloc(4112)
  11333. defer tls.Free(4112)
  11334. var glyphs, glyphs_new uintptr
  11335. var i, l, size, v1, v3 int32
  11336. var v2 bool
  11337. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11338. var _ /* ucs4 at bp+4096 */ TFcChar32
  11339. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  11340. if len1 <= 0 {
  11341. return
  11342. }
  11343. i = 0
  11344. glyphs = bp
  11345. size = int32(m_NUM_LOCAL)
  11346. for {
  11347. if v2 = len1 != 0; v2 {
  11348. v1 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  11349. l = v1
  11350. }
  11351. if !(v2 && v1 > 0) {
  11352. break
  11353. }
  11354. if i == size {
  11355. glyphs_new = libc.Xmalloc(tls, libc.Uint32FromInt32(size*libc.Int32FromInt32(2))*uint32(4))
  11356. if !(glyphs_new != 0) {
  11357. if glyphs != bp {
  11358. libc.Xfree(tls, glyphs)
  11359. }
  11360. return
  11361. }
  11362. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint32FromInt32(size)*uint32(4))
  11363. size *= int32(2)
  11364. if glyphs != bp {
  11365. libc.Xfree(tls, glyphs)
  11366. }
  11367. glyphs = glyphs_new
  11368. }
  11369. v3 = i
  11370. i++
  11371. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11372. string1 += uintptr(l)
  11373. len1 -= l
  11374. }
  11375. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, i)
  11376. if glyphs != bp {
  11377. libc.Xfree(tls, glyphs)
  11378. }
  11379. }
  11380. func XXftDrawStringUtf16(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, x int32, y int32, string1 uintptr, endian TFcEndian, len1 int32) {
  11381. bp := tls.Alloc(4112)
  11382. defer tls.Free(4112)
  11383. var glyphs, glyphs_new uintptr
  11384. var i, l, size, v1, v3 int32
  11385. var v2 bool
  11386. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11387. var _ /* ucs4 at bp+4096 */ TFcChar32
  11388. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  11389. if len1 <= 0 {
  11390. return
  11391. }
  11392. i = 0
  11393. glyphs = bp
  11394. size = int32(m_NUM_LOCAL)
  11395. for {
  11396. if v2 = len1 != 0; v2 {
  11397. v1 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  11398. l = v1
  11399. }
  11400. if !(v2 && v1 > 0) {
  11401. break
  11402. }
  11403. if i == size {
  11404. glyphs_new = libc.Xmalloc(tls, libc.Uint32FromInt32(size*libc.Int32FromInt32(2))*uint32(4))
  11405. if !(glyphs_new != 0) {
  11406. if glyphs != bp {
  11407. libc.Xfree(tls, glyphs)
  11408. }
  11409. return
  11410. }
  11411. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint32FromInt32(size)*uint32(4))
  11412. size *= int32(2)
  11413. if glyphs != bp {
  11414. libc.Xfree(tls, glyphs)
  11415. }
  11416. glyphs = glyphs_new
  11417. }
  11418. v3 = i
  11419. i++
  11420. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11421. string1 += uintptr(l)
  11422. len1 -= l
  11423. }
  11424. XXftDrawGlyphs(tls, draw, color, pub, x, y, glyphs, i)
  11425. if glyphs != bp {
  11426. libc.Xfree(tls, glyphs)
  11427. }
  11428. }
  11429. func XXftDrawGlyphSpec(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, glyphs uintptr, len1 int32) {
  11430. var font uintptr
  11431. var src, v1 TPicture
  11432. var v2 bool
  11433. _, _, _, _ = font, src, v1, v2
  11434. font = pub
  11435. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  11436. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  11437. v1 = XXftDrawSrcPicture(tls, draw, color)
  11438. src = v1
  11439. }
  11440. if v2 && v1 != 0 {
  11441. XXftGlyphSpecRender(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, __XftDrawOp(tls, draw, color), src, pub, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, 0, 0, glyphs, len1)
  11442. }
  11443. } else {
  11444. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11445. XXftGlyphSpecCore(tls, draw, color, pub, glyphs, len1)
  11446. }
  11447. }
  11448. }
  11449. func XXftDrawGlyphFontSpec(tls *libc.TLS, draw uintptr, color uintptr, glyphs uintptr, len1 int32) {
  11450. var i, start int32
  11451. var src, v1 TPicture
  11452. var v2 bool
  11453. _, _, _, _, _ = i, src, start, v1, v2
  11454. i = 0
  11455. for i < len1 {
  11456. start = i
  11457. if (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont)).Fformat != 0 {
  11458. for i < len1 && (*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont)).Fformat != 0 {
  11459. i++
  11460. }
  11461. if v2 = __XftDrawRenderPrepare(tls, draw) != 0; v2 {
  11462. v1 = XXftDrawSrcPicture(tls, draw, color)
  11463. src = v1
  11464. }
  11465. if v2 && v1 != 0 {
  11466. XXftGlyphFontSpecRender(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, __XftDrawOp(tls, draw, color), src, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, 0, 0, glyphs+uintptr(start)*12, i-start)
  11467. }
  11468. } else {
  11469. for i < len1 && !((*TXftFontInt)(unsafe.Pointer((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont)).Fformat != 0) {
  11470. i++
  11471. }
  11472. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11473. XXftGlyphFontSpecCore(tls, draw, color, glyphs+uintptr(start)*12, i-start)
  11474. }
  11475. }
  11476. }
  11477. }
  11478. func XXftDrawCharSpec(tls *libc.TLS, draw uintptr, color uintptr, pub uintptr, chars uintptr, len1 int32) {
  11479. bp := tls.Alloc(8192)
  11480. defer tls.Free(8192)
  11481. var glyphs uintptr
  11482. var i int32
  11483. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphSpec
  11484. _, _ = glyphs, i
  11485. if len1 <= 0 {
  11486. return
  11487. }
  11488. if len1 <= int32(m_NUM_LOCAL) {
  11489. glyphs = bp
  11490. } else {
  11491. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(8))
  11492. if !(glyphs != 0) {
  11493. return
  11494. }
  11495. }
  11496. i = 0
  11497. for {
  11498. if !(i < len1) {
  11499. break
  11500. }
  11501. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph = XXftCharIndex(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, pub, (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fucs4)
  11502. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fx
  11503. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fy
  11504. goto _1
  11505. _1:
  11506. ;
  11507. i++
  11508. }
  11509. XXftDrawGlyphSpec(tls, draw, color, pub, glyphs, len1)
  11510. if glyphs != bp {
  11511. libc.Xfree(tls, glyphs)
  11512. }
  11513. }
  11514. func XXftDrawCharFontSpec(tls *libc.TLS, draw uintptr, color uintptr, chars uintptr, len1 int32) {
  11515. bp := tls.Alloc(12288)
  11516. defer tls.Free(12288)
  11517. var glyphs uintptr
  11518. var i int32
  11519. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphFontSpec
  11520. _, _ = glyphs, i
  11521. if len1 <= 0 {
  11522. return
  11523. }
  11524. if len1 <= int32(m_NUM_LOCAL) {
  11525. glyphs = bp
  11526. } else {
  11527. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(12))
  11528. if !(glyphs != 0) {
  11529. return
  11530. }
  11531. }
  11532. i = 0
  11533. for {
  11534. if !(i < len1) {
  11535. break
  11536. }
  11537. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*12))).Ffont
  11538. (*(*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)
  11539. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fx = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*12))).Fx
  11540. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fy = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*12))).Fy
  11541. goto _1
  11542. _1:
  11543. ;
  11544. i++
  11545. }
  11546. XXftDrawGlyphFontSpec(tls, draw, color, glyphs, len1)
  11547. if glyphs != bp {
  11548. libc.Xfree(tls, glyphs)
  11549. }
  11550. }
  11551. func XXftDrawRect(tls *libc.TLS, draw uintptr, color uintptr, x int32, y int32, width uint32, height uint32) {
  11552. if __XftDrawRenderPrepare(tls, draw) != 0 {
  11553. libxrender.XXRenderFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, int32(m_PictOpSrc), (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, color+4, x, y, width, height)
  11554. } else {
  11555. if __XftDrawCorePrepare(tls, draw, color) != 0 {
  11556. /* note: not XftRectCore() */
  11557. libx11.XXSetForeground(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftColor)(unsafe.Pointer(color)).Fpixel)
  11558. libx11.XXFillRectangle(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fdrawable, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, x, y, width, height)
  11559. }
  11560. }
  11561. }
  11562. func XXftDrawSetClip(tls *libc.TLS, draw uintptr, r TRegion) (r1 int32) {
  11563. bp := tls.Alloc(64)
  11564. defer tls.Free(64)
  11565. var n TRegion
  11566. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  11567. _ = n
  11568. n = libc.UintptrFromInt32(0)
  11569. /*
  11570. * Check for quick exits
  11571. */
  11572. if !(r != 0) && (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type == int32(_XftClipTypeNone) {
  11573. return int32(m_True)
  11574. }
  11575. if r != 0 && (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type == int32(_XftClipTypeRegion) && libx11.XXEqualRegion(tls, r, *(*TRegion)(unsafe.Pointer(draw + 32))) != 0 {
  11576. return int32(m_True)
  11577. }
  11578. /*
  11579. * Duplicate the region so future changes can be short circuited
  11580. */
  11581. if r != 0 {
  11582. n = libx11.XXCreateRegion(tls)
  11583. if n != 0 {
  11584. if !(libx11.XXUnionRegion(tls, n, r, n) != 0) {
  11585. libx11.XXDestroyRegion(tls, n)
  11586. return m_False
  11587. }
  11588. }
  11589. }
  11590. /*
  11591. * Destroy existing clip
  11592. */
  11593. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11594. case int32(_XftClipTypeRegion):
  11595. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 32)))
  11596. case int32(_XftClipTypeRectangles):
  11597. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 32)))
  11598. case int32(_XftClipTypeNone):
  11599. break
  11600. }
  11601. /*
  11602. * Set the clip
  11603. */
  11604. if n != 0 {
  11605. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeRegion)
  11606. *(*TRegion)(unsafe.Pointer(draw + 32)) = n
  11607. } else {
  11608. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeNone)
  11609. }
  11610. /*
  11611. * Apply new clip to existing objects
  11612. */
  11613. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11614. if n != 0 {
  11615. libxrender.XXRenderSetPictureClipRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, n)
  11616. } else {
  11617. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fclip_mask = uint32(0)
  11618. libxrender.XXRenderChangePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, libc.Uint32FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(6)), bp)
  11619. }
  11620. }
  11621. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11622. if n != 0 {
  11623. libx11.XXSetRegion(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, *(*TRegion)(unsafe.Pointer(draw + 32)))
  11624. } else {
  11625. libx11.XXSetClipMask(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, uint32(0))
  11626. }
  11627. }
  11628. return int32(m_True)
  11629. }
  11630. func XXftDrawSetClipRectangles(tls *libc.TLS, draw uintptr, xOrigin int32, yOrigin int32, rects uintptr, n int32) (r int32) {
  11631. var new1 uintptr
  11632. _ = new1
  11633. new1 = libc.UintptrFromInt32(0)
  11634. /*
  11635. * Check for quick exit
  11636. */
  11637. if (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type == int32(_XftClipTypeRectangles) && (*TXftClipRect)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(draw + 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) {
  11638. return int32(m_True)
  11639. }
  11640. /*
  11641. * Duplicate the region so future changes can be short circuited
  11642. */
  11643. new1 = libc.Xmalloc(tls, uint32(12)+libc.Uint32FromInt32(n)*uint32(8))
  11644. if !(new1 != 0) {
  11645. return m_False
  11646. }
  11647. (*TXftClipRect)(unsafe.Pointer(new1)).Fn = n
  11648. (*TXftClipRect)(unsafe.Pointer(new1)).FxOrigin = xOrigin
  11649. (*TXftClipRect)(unsafe.Pointer(new1)).FyOrigin = yOrigin
  11650. libc.Xmemcpy(tls, new1+libc.UintptrFromInt32(1)*12, rects, libc.Uint32FromInt32(n)*uint32(8))
  11651. /*
  11652. * Destroy existing clip
  11653. */
  11654. switch (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type {
  11655. case int32(_XftClipTypeRegion):
  11656. libx11.XXDestroyRegion(tls, *(*TRegion)(unsafe.Pointer(draw + 32)))
  11657. case int32(_XftClipTypeRectangles):
  11658. libc.Xfree(tls, *(*uintptr)(unsafe.Pointer(draw + 32)))
  11659. case int32(_XftClipTypeNone):
  11660. break
  11661. }
  11662. /*
  11663. * Set the clip
  11664. */
  11665. (*TXftDraw)(unsafe.Pointer(draw)).Fclip_type = int32(_XftClipTypeRectangles)
  11666. *(*uintptr)(unsafe.Pointer(draw + 32)) = new1
  11667. /*
  11668. * Apply new clip to existing objects
  11669. */
  11670. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11671. libxrender.XXRenderSetPictureClipRectangles(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, (*TXftClipRect)(unsafe.Pointer(new1)).FxOrigin, (*TXftClipRect)(unsafe.Pointer(new1)).FyOrigin, new1+libc.UintptrFromInt32(1)*12, (*TXftClipRect)(unsafe.Pointer(new1)).Fn)
  11672. }
  11673. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11674. libx11.XXSetClipRectangles(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, (*TXftClipRect)(unsafe.Pointer(new1)).FxOrigin, (*TXftClipRect)(unsafe.Pointer(new1)).FyOrigin, new1+libc.UintptrFromInt32(1)*12, (*TXftClipRect)(unsafe.Pointer(new1)).Fn, m_Unsorted)
  11675. }
  11676. return int32(m_True)
  11677. }
  11678. func XXftDrawSetSubwindowMode(tls *libc.TLS, draw uintptr, mode int32) {
  11679. bp := tls.Alloc(64)
  11680. defer tls.Free(64)
  11681. var _ /* pa at bp+0 */ TXRenderPictureAttributes
  11682. if mode == (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode {
  11683. return
  11684. }
  11685. (*TXftDraw)(unsafe.Pointer(draw)).Fsubwindow_mode = mode
  11686. if (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict != 0 {
  11687. (*(*TXRenderPictureAttributes)(unsafe.Pointer(bp))).Fsubwindow_mode = mode
  11688. libxrender.XXRenderChangePicture(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Frender.Fpict, libc.Uint32FromInt32(libc.Int32FromInt32(1)<<libc.Int32FromInt32(8)), bp)
  11689. }
  11690. if (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc != 0 {
  11691. libx11.XXSetSubwindowMode(tls, (*TXftDraw)(unsafe.Pointer(draw)).Fdpy, (*TXftDraw)(unsafe.Pointer(draw)).Fcore.Fgc, mode)
  11692. }
  11693. }
  11694. const m_VisualIDMask2 = 0x1
  11695. const m_VisualScreenMask2 = 0x2
  11696. /* xftxlfd.c */
  11697. func XXftGlyphExtents(tls *libc.TLS, dpy uintptr, pub uintptr, glyphs uintptr, nglyphs int32, extents uintptr) {
  11698. bp := tls.Alloc(1040)
  11699. defer tls.Free(1040)
  11700. var bottom, left, n, overall_bottom, overall_left, overall_right, overall_top, right, top, x, y, v1, v6 int32
  11701. var font, g, xftg, v2, v3, v4, v7, v8 uintptr
  11702. var glyph TFT_UInt
  11703. var glyphs_loaded TFcBool
  11704. var v5, v9 bool
  11705. var _ /* missing at bp+0 */ [256]TFT_UInt
  11706. var _ /* nmissing at bp+1024 */ int32
  11707. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bottom, font, g, glyph, glyphs_loaded, left, n, overall_bottom, overall_left, overall_right, overall_top, right, top, x, xftg, y, v1, v2, v3, v4, v5, v6, v7, v8, v9
  11708. font = pub
  11709. g = glyphs
  11710. n = nglyphs
  11711. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  11712. glyphs_loaded = m_FcFalse
  11713. for {
  11714. v1 = n
  11715. n--
  11716. if !(v1 != 0) {
  11717. break
  11718. }
  11719. v2 = g
  11720. g += 4
  11721. if XXftFontCheckGlyph(tls, dpy, pub, m_FcFalse, *(*TFT_UInt)(unsafe.Pointer(v2)), bp, bp+1024) != 0 {
  11722. glyphs_loaded = int32(m_FcTrue)
  11723. }
  11724. }
  11725. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  11726. XXftFontLoadGlyphs(tls, dpy, pub, m_FcFalse, bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  11727. }
  11728. g = glyphs
  11729. n = nglyphs
  11730. xftg = libc.UintptrFromInt32(0)
  11731. for n != 0 {
  11732. v3 = g
  11733. g += 4
  11734. glyph = *(*TFT_UInt)(unsafe.Pointer(v3))
  11735. n--
  11736. if v5 = glyph < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; v5 {
  11737. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*4))
  11738. xftg = v4
  11739. }
  11740. if v5 && v4 != 0 {
  11741. break
  11742. }
  11743. }
  11744. if n == 0 {
  11745. if xftg != 0 {
  11746. *(*TXGlyphInfo)(unsafe.Pointer(extents)) = (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics
  11747. } else {
  11748. libc.Xmemset(tls, extents, int32('\000'), uint32(12))
  11749. }
  11750. } else {
  11751. x = 0
  11752. y = 0
  11753. overall_left = x - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  11754. overall_top = y - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  11755. overall_right = overall_left + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  11756. overall_bottom = overall_top + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  11757. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  11758. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  11759. for {
  11760. v6 = n
  11761. n--
  11762. if !(v6 != 0) {
  11763. break
  11764. }
  11765. v7 = g
  11766. g += 4
  11767. glyph = *(*TFT_UInt)(unsafe.Pointer(v7))
  11768. if v9 = glyph < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs; v9 {
  11769. v8 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*4))
  11770. xftg = v8
  11771. }
  11772. if v9 && v8 != 0 {
  11773. left = x - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx)
  11774. top = y - int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy)
  11775. right = left + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth)
  11776. bottom = top + libc.Int32FromUint16((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight)
  11777. if left < overall_left {
  11778. overall_left = left
  11779. }
  11780. if top < overall_top {
  11781. overall_top = top
  11782. }
  11783. if right > overall_right {
  11784. overall_right = right
  11785. }
  11786. if bottom > overall_bottom {
  11787. overall_bottom = bottom
  11788. }
  11789. x += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff)
  11790. y += int32((*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff)
  11791. }
  11792. }
  11793. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fx = int16(-overall_left)
  11794. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fy = int16(-overall_top)
  11795. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fwidth = libc.Uint16FromInt32(overall_right - overall_left)
  11796. (*TXGlyphInfo)(unsafe.Pointer(extents)).Fheight = libc.Uint16FromInt32(overall_bottom - overall_top)
  11797. (*TXGlyphInfo)(unsafe.Pointer(extents)).FxOff = int16(x)
  11798. (*TXGlyphInfo)(unsafe.Pointer(extents)).FyOff = int16(y)
  11799. }
  11800. if glyphs_loaded != 0 {
  11801. X_XftFontManageMemory(tls, dpy, pub)
  11802. }
  11803. }
  11804. func XXftTextExtents8(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11805. bp := tls.Alloc(4096)
  11806. defer tls.Free(4096)
  11807. var glyphs, v1 uintptr
  11808. var i int32
  11809. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11810. _, _, _ = glyphs, i, v1
  11811. if len1 < 0 {
  11812. return
  11813. }
  11814. if len1 <= int32(m_NUM_LOCAL) {
  11815. v1 = bp
  11816. glyphs = v1
  11817. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  11818. } else {
  11819. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  11820. if !(glyphs != 0) {
  11821. libc.Xmemset(tls, extents, int32('\000'), uint32(12))
  11822. return
  11823. }
  11824. }
  11825. i = 0
  11826. for {
  11827. if !(i < len1) {
  11828. break
  11829. }
  11830. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  11831. goto _2
  11832. _2:
  11833. ;
  11834. i++
  11835. }
  11836. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11837. if glyphs != bp {
  11838. libc.Xfree(tls, glyphs)
  11839. }
  11840. }
  11841. func XXftTextExtents16(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11842. bp := tls.Alloc(4096)
  11843. defer tls.Free(4096)
  11844. var glyphs, v1 uintptr
  11845. var i int32
  11846. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11847. _, _, _ = glyphs, i, v1
  11848. if len1 < 0 {
  11849. return
  11850. }
  11851. if len1 <= int32(m_NUM_LOCAL) {
  11852. v1 = bp
  11853. glyphs = v1
  11854. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  11855. } else {
  11856. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  11857. if !(glyphs != 0) {
  11858. libc.Xmemset(tls, extents, int32('\000'), uint32(12))
  11859. return
  11860. }
  11861. }
  11862. i = 0
  11863. for {
  11864. if !(i < len1) {
  11865. break
  11866. }
  11867. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  11868. goto _2
  11869. _2:
  11870. ;
  11871. i++
  11872. }
  11873. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11874. if glyphs != bp {
  11875. libc.Xfree(tls, glyphs)
  11876. }
  11877. }
  11878. func XXftTextExtents32(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11879. bp := tls.Alloc(4096)
  11880. defer tls.Free(4096)
  11881. var glyphs, v1 uintptr
  11882. var i int32
  11883. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11884. _, _, _ = glyphs, i, v1
  11885. if len1 < 0 {
  11886. return
  11887. }
  11888. if len1 <= int32(m_NUM_LOCAL) {
  11889. v1 = bp
  11890. glyphs = v1
  11891. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  11892. } else {
  11893. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  11894. if !(glyphs != 0) {
  11895. libc.Xmemset(tls, extents, int32('\000'), uint32(12))
  11896. return
  11897. }
  11898. }
  11899. i = 0
  11900. for {
  11901. if !(i < len1) {
  11902. break
  11903. }
  11904. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  11905. goto _2
  11906. _2:
  11907. ;
  11908. i++
  11909. }
  11910. XXftGlyphExtents(tls, dpy, pub, glyphs, len1, extents)
  11911. if glyphs != bp {
  11912. libc.Xfree(tls, glyphs)
  11913. }
  11914. }
  11915. func XXftTextExtentsUtf8(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, len1 int32, extents uintptr) {
  11916. bp := tls.Alloc(4112)
  11917. defer tls.Free(4112)
  11918. var glyphs, glyphs_new, v1 uintptr
  11919. var i, l, size, v2, v4 int32
  11920. var v3 bool
  11921. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11922. var _ /* ucs4 at bp+4096 */ TFcChar32
  11923. _, _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3, v4
  11924. if len1 < 0 {
  11925. return
  11926. }
  11927. i = 0
  11928. v1 = bp
  11929. glyphs = v1
  11930. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  11931. size = int32(m_NUM_LOCAL)
  11932. for {
  11933. if v3 = len1 != 0; v3 {
  11934. v2 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  11935. l = v2
  11936. }
  11937. if !(v3 && v2 > 0) {
  11938. break
  11939. }
  11940. if i == size {
  11941. glyphs_new = libc.Xmalloc(tls, libc.Uint32FromInt32(size*libc.Int32FromInt32(2))*uint32(4))
  11942. if !(glyphs_new != 0) {
  11943. if glyphs != bp {
  11944. libc.Xfree(tls, glyphs)
  11945. }
  11946. libc.Xmemset(tls, extents, int32('\000'), uint32(12))
  11947. return
  11948. }
  11949. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint32FromInt32(size)*uint32(4))
  11950. size *= int32(2)
  11951. if glyphs != bp {
  11952. libc.Xfree(tls, glyphs)
  11953. }
  11954. glyphs = glyphs_new
  11955. }
  11956. v4 = i
  11957. i++
  11958. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v4)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  11959. string1 += uintptr(l)
  11960. len1 -= l
  11961. }
  11962. XXftGlyphExtents(tls, dpy, pub, glyphs, i, extents)
  11963. if glyphs != bp {
  11964. libc.Xfree(tls, glyphs)
  11965. }
  11966. }
  11967. func XXftTextExtentsUtf16(tls *libc.TLS, dpy uintptr, pub uintptr, string1 uintptr, endian TFcEndian, len1 int32, extents uintptr) {
  11968. bp := tls.Alloc(4112)
  11969. defer tls.Free(4112)
  11970. var glyphs, glyphs_new, v1 uintptr
  11971. var i, l, size, v2, v4 int32
  11972. var v3 bool
  11973. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  11974. var _ /* ucs4 at bp+4096 */ TFcChar32
  11975. _, _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3, v4
  11976. if len1 < 0 {
  11977. return
  11978. }
  11979. i = 0
  11980. v1 = bp
  11981. glyphs = v1
  11982. *(*TFT_UInt)(unsafe.Pointer(v1)) = uint32(0)
  11983. size = int32(m_NUM_LOCAL)
  11984. for {
  11985. if v3 = len1 != 0; v3 {
  11986. v2 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  11987. l = v2
  11988. }
  11989. if !(v3 && v2 > 0) {
  11990. break
  11991. }
  11992. if i == size {
  11993. glyphs_new = libc.Xmalloc(tls, libc.Uint32FromInt32(size*libc.Int32FromInt32(2))*uint32(4))
  11994. if !(glyphs_new != 0) {
  11995. if glyphs != bp {
  11996. libc.Xfree(tls, glyphs)
  11997. }
  11998. libc.Xmemset(tls, extents, int32('\000'), uint32(12))
  11999. return
  12000. }
  12001. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint32FromInt32(size)*uint32(4))
  12002. size *= int32(2)
  12003. if glyphs != bp {
  12004. libc.Xfree(tls, glyphs)
  12005. }
  12006. glyphs = glyphs_new
  12007. }
  12008. v4 = i
  12009. i++
  12010. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v4)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  12011. string1 += uintptr(l)
  12012. len1 -= l
  12013. }
  12014. XXftGlyphExtents(tls, dpy, pub, glyphs, i, extents)
  12015. if glyphs != bp {
  12016. libc.Xfree(tls, glyphs)
  12017. }
  12018. }
  12019. /* xftxlfd.c */
  12020. func XXftFontMatch(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr, result uintptr) (r uintptr) {
  12021. var match, new1 uintptr
  12022. _, _ = match, new1
  12023. if !(XXftInit(tls, libc.UintptrFromInt32(0)) != 0) {
  12024. return libc.UintptrFromInt32(0)
  12025. }
  12026. new1 = libfontconfig.XFcPatternDuplicate(tls, pattern)
  12027. if !(new1 != 0) {
  12028. return libc.UintptrFromInt32(0)
  12029. }
  12030. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  12031. libc.Xprintf(tls, __ccgo_ts+689, 0)
  12032. libfontconfig.XFcPatternPrint(tls, new1)
  12033. }
  12034. libfontconfig.XFcConfigSubstitute(tls, libc.UintptrFromInt32(0), new1, int32(_FcMatchPattern))
  12035. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  12036. libc.Xprintf(tls, __ccgo_ts+711, 0)
  12037. libfontconfig.XFcPatternPrint(tls, new1)
  12038. }
  12039. XXftDefaultSubstitute(tls, dpy, screen, new1)
  12040. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  12041. libc.Xprintf(tls, __ccgo_ts+754, 0)
  12042. libfontconfig.XFcPatternPrint(tls, new1)
  12043. }
  12044. match = libfontconfig.XFcFontMatch(tls, libc.UintptrFromInt32(0), new1, result)
  12045. if XXftDebug(tls)&int32(m_XFT_DBG_OPENV) != 0 {
  12046. libc.Xprintf(tls, __ccgo_ts+799, 0)
  12047. libfontconfig.XFcPatternPrint(tls, match)
  12048. }
  12049. libfontconfig.XFcPatternDestroy(tls, new1)
  12050. return match
  12051. }
  12052. func XXftFontOpen(tls *libc.TLS, dpy uintptr, screen int32, va1 uintptr) (r uintptr) {
  12053. bp := tls.Alloc(16)
  12054. defer tls.Free(16)
  12055. var font, match, pat uintptr
  12056. var va Tva_list
  12057. var _ /* result at bp+0 */ TFcResult
  12058. _, _, _, _ = font, match, pat, va
  12059. va = va1
  12060. pat = libfontconfig.XFcPatternVaBuild(tls, libc.UintptrFromInt32(0), va)
  12061. _ = va
  12062. if !(pat != 0) {
  12063. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12064. libc.Xprintf(tls, __ccgo_ts+820, 0)
  12065. }
  12066. return libc.UintptrFromInt32(0)
  12067. }
  12068. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  12069. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12070. libc.Xprintf(tls, __ccgo_ts+859, 0)
  12071. libfontconfig.XFcPatternPrint(tls, pat)
  12072. if match != 0 {
  12073. libc.Xprintf(tls, __ccgo_ts+868, 0)
  12074. libfontconfig.XFcPatternPrint(tls, match)
  12075. } else {
  12076. libc.Xprintf(tls, __ccgo_ts+875, 0)
  12077. }
  12078. }
  12079. libfontconfig.XFcPatternDestroy(tls, pat)
  12080. if !(match != 0) {
  12081. return libc.UintptrFromInt32(0)
  12082. }
  12083. font = XXftFontOpenPattern(tls, dpy, match)
  12084. if !(font != 0) {
  12085. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12086. libc.Xprintf(tls, __ccgo_ts+885, 0)
  12087. }
  12088. libfontconfig.XFcPatternDestroy(tls, match)
  12089. }
  12090. return font
  12091. }
  12092. func XXftFontOpenName(tls *libc.TLS, dpy uintptr, screen int32, name uintptr) (r uintptr) {
  12093. bp := tls.Alloc(32)
  12094. defer tls.Free(32)
  12095. var font, match, pat uintptr
  12096. var _ /* result at bp+0 */ TFcResult
  12097. _, _, _ = font, match, pat
  12098. pat = libfontconfig.XFcNameParse(tls, name)
  12099. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12100. libc.Xprintf(tls, __ccgo_ts+894, libc.VaList(bp+16, name))
  12101. if pat != 0 {
  12102. libfontconfig.XFcPatternPrint(tls, pat)
  12103. } else {
  12104. libc.Xprintf(tls, __ccgo_ts+917, 0)
  12105. }
  12106. }
  12107. if !(pat != 0) {
  12108. return libc.UintptrFromInt32(0)
  12109. }
  12110. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  12111. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12112. if match != 0 {
  12113. libc.Xprintf(tls, __ccgo_ts+868, 0)
  12114. libfontconfig.XFcPatternPrint(tls, match)
  12115. } else {
  12116. libc.Xprintf(tls, __ccgo_ts+875, 0)
  12117. }
  12118. }
  12119. libfontconfig.XFcPatternDestroy(tls, pat)
  12120. if !(match != 0) {
  12121. return libc.UintptrFromInt32(0)
  12122. }
  12123. font = XXftFontOpenPattern(tls, dpy, match)
  12124. if !(font != 0) {
  12125. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12126. libc.Xprintf(tls, __ccgo_ts+885, 0)
  12127. }
  12128. libfontconfig.XFcPatternDestroy(tls, match)
  12129. }
  12130. return font
  12131. }
  12132. func XXftFontOpenXlfd(tls *libc.TLS, dpy uintptr, screen int32, xlfd uintptr) (r uintptr) {
  12133. bp := tls.Alloc(32)
  12134. defer tls.Free(32)
  12135. var font, match, pat uintptr
  12136. var _ /* result at bp+0 */ TFcResult
  12137. _, _, _ = font, match, pat
  12138. pat = XXftXlfdParse(tls, xlfd, m_FcFalse, m_FcFalse)
  12139. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12140. libc.Xprintf(tls, __ccgo_ts+931, libc.VaList(bp+16, xlfd))
  12141. if pat != 0 {
  12142. libc.Xprintf(tls, __ccgo_ts+954, 0)
  12143. } else {
  12144. libfontconfig.XFcPatternPrint(tls, pat)
  12145. }
  12146. }
  12147. if !(pat != 0) {
  12148. return libc.UintptrFromInt32(0)
  12149. }
  12150. match = XXftFontMatch(tls, dpy, screen, pat, bp)
  12151. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12152. if match != 0 {
  12153. libc.Xprintf(tls, __ccgo_ts+868, 0)
  12154. libfontconfig.XFcPatternPrint(tls, match)
  12155. } else {
  12156. libc.Xprintf(tls, __ccgo_ts+875, 0)
  12157. }
  12158. }
  12159. libfontconfig.XFcPatternDestroy(tls, pat)
  12160. if !(match != 0) {
  12161. return libc.UintptrFromInt32(0)
  12162. }
  12163. font = XXftFontOpenPattern(tls, dpy, match)
  12164. if !(font != 0) {
  12165. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12166. libc.Xprintf(tls, __ccgo_ts+885, 0)
  12167. }
  12168. libfontconfig.XFcPatternDestroy(tls, match)
  12169. }
  12170. return font
  12171. }
  12172. const m_FT_LOAD_DEFAULT1 = 0
  12173. const m_UINT_MAX1 = 4294967295
  12174. const m_XFT_EMBEDDED_BITMAP = "embeddedbitmap"
  12175. /*
  12176. * List of all open files (each face in a file is managed separately)
  12177. */
  12178. var __XftFtFiles uintptr
  12179. var _XftMaxFreeTypeFiles = int32(5)
  12180. func __XftGetFile(tls *libc.TLS, file uintptr, id int32) (r uintptr) {
  12181. bp := tls.Alloc(32)
  12182. defer tls.Free(32)
  12183. var f uintptr
  12184. var v2, v3, v4 TFT_Fixed
  12185. _, _, _, _ = f, v2, v3, v4
  12186. if !(XXftInitFtLibrary(tls) != 0) {
  12187. return libc.UintptrFromInt32(0)
  12188. }
  12189. f = __XftFtFiles
  12190. for {
  12191. if !(f != 0) {
  12192. break
  12193. }
  12194. if !(libc.Xstrcmp(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, file) != 0) && (*TXftFtFile)(unsafe.Pointer(f)).Fid == id {
  12195. (*TXftFtFile)(unsafe.Pointer(f)).Fref++
  12196. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12197. libc.Xprintf(tls, __ccgo_ts+968, libc.VaList(bp+8, file, id, (*TXftFtFile)(unsafe.Pointer(f)).Fref))
  12198. }
  12199. return f
  12200. }
  12201. goto _1
  12202. _1:
  12203. ;
  12204. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12205. }
  12206. f = libc.Xmalloc(tls, uint32(48)+libc.Xstrlen(tls, file)+uint32(1))
  12207. if !(f != 0) {
  12208. return libc.UintptrFromInt32(0)
  12209. }
  12210. XXftMemAlloc(tls, int32(_XFT_MEM_FILE), uint32(48)+libc.Xstrlen(tls, file)+uint32(1))
  12211. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12212. libc.Xprintf(tls, __ccgo_ts+1006, libc.VaList(bp+8, file, id))
  12213. }
  12214. (*TXftFtFile)(unsafe.Pointer(f)).Fnext = __XftFtFiles
  12215. __XftFtFiles = f
  12216. (*TXftFtFile)(unsafe.Pointer(f)).Fref = int32(1)
  12217. (*TXftFtFile)(unsafe.Pointer(f)).Ffile = f + libc.UintptrFromInt32(1)*48
  12218. libc.Xstrcpy(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, file)
  12219. (*TXftFtFile)(unsafe.Pointer(f)).Fid = id
  12220. (*TXftFtFile)(unsafe.Pointer(f)).Flock = 0
  12221. (*TXftFtFile)(unsafe.Pointer(f)).Fface = libc.UintptrFromInt32(0)
  12222. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  12223. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  12224. v4 = libc.Int32FromInt32(0)
  12225. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v4
  12226. v3 = v4
  12227. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v3
  12228. v2 = v3
  12229. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v2
  12230. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v2
  12231. return f
  12232. }
  12233. func __XftGetFaceFile(tls *libc.TLS, face TFT_Face) (r uintptr) {
  12234. var f uintptr
  12235. var v1, v2, v3 TFT_Fixed
  12236. _, _, _, _ = f, v1, v2, v3
  12237. f = libc.Xmalloc(tls, uint32(48))
  12238. if !(f != 0) {
  12239. return libc.UintptrFromInt32(0)
  12240. }
  12241. XXftMemAlloc(tls, int32(_XFT_MEM_FILE), uint32(48))
  12242. (*TXftFtFile)(unsafe.Pointer(f)).Fnext = libc.UintptrFromInt32(0)
  12243. (*TXftFtFile)(unsafe.Pointer(f)).Fref = int32(1)
  12244. (*TXftFtFile)(unsafe.Pointer(f)).Ffile = libc.UintptrFromInt32(0)
  12245. (*TXftFtFile)(unsafe.Pointer(f)).Fid = 0
  12246. (*TXftFtFile)(unsafe.Pointer(f)).Flock = 0
  12247. (*TXftFtFile)(unsafe.Pointer(f)).Fface = face
  12248. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  12249. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  12250. v3 = libc.Int32FromInt32(0)
  12251. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v3
  12252. v2 = v3
  12253. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v2
  12254. v1 = v2
  12255. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v1
  12256. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v1
  12257. return f
  12258. }
  12259. func __XftNumFiles(tls *libc.TLS) (r int32) {
  12260. var count int32
  12261. var f uintptr
  12262. _, _ = count, f
  12263. count = 0
  12264. f = __XftFtFiles
  12265. for {
  12266. if !(f != 0) {
  12267. break
  12268. }
  12269. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 && !((*TXftFtFile)(unsafe.Pointer(f)).Flock != 0) {
  12270. count++
  12271. }
  12272. goto _1
  12273. _1:
  12274. ;
  12275. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12276. }
  12277. return count
  12278. }
  12279. func __XftNthFile(tls *libc.TLS, n int32) (r uintptr) {
  12280. var count, v2 int32
  12281. var f uintptr
  12282. _, _, _ = count, f, v2
  12283. count = 0
  12284. f = __XftFtFiles
  12285. for {
  12286. if !(f != 0) {
  12287. break
  12288. }
  12289. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 && !((*TXftFtFile)(unsafe.Pointer(f)).Flock != 0) {
  12290. v2 = count
  12291. count++
  12292. if v2 == n {
  12293. break
  12294. }
  12295. }
  12296. goto _1
  12297. _1:
  12298. ;
  12299. f = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12300. }
  12301. return f
  12302. }
  12303. func __XftUncacheFiles(tls *libc.TLS) {
  12304. bp := tls.Alloc(32)
  12305. defer tls.Free(32)
  12306. var f uintptr
  12307. var n, v1, v2 int32
  12308. _, _, _, _ = f, n, v1, v2
  12309. for {
  12310. v1 = __XftNumFiles(tls)
  12311. n = v1
  12312. if !(v1 > _XftMaxFreeTypeFiles) {
  12313. break
  12314. }
  12315. if n != 0 {
  12316. v2 = libc.Xrand(tls) % n
  12317. } else {
  12318. v2 = 0
  12319. }
  12320. f = __XftNthFile(tls, v2)
  12321. if f != 0 {
  12322. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12323. libc.Xprintf(tls, __ccgo_ts+1034, libc.VaList(bp+8, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, (*TXftFtFile)(unsafe.Pointer(f)).Fid))
  12324. }
  12325. libfreetype.XFT_Done_Face(tls, (*TXftFtFile)(unsafe.Pointer(f)).Fface)
  12326. (*TXftFtFile)(unsafe.Pointer(f)).Fface = libc.UintptrFromInt32(0)
  12327. }
  12328. }
  12329. }
  12330. func __XftLockFile(tls *libc.TLS, f uintptr) (r TFT_Face) {
  12331. bp := tls.Alloc(32)
  12332. defer tls.Free(32)
  12333. var v1, v2, v3 TFT_Fixed
  12334. _, _, _ = v1, v2, v3
  12335. (*TXftFtFile)(unsafe.Pointer(f)).Flock++
  12336. if !((*TXftFtFile)(unsafe.Pointer(f)).Fface != 0) {
  12337. if XXftDebug(tls)&int32(m_XFT_DBG_REF) != 0 {
  12338. libc.Xprintf(tls, __ccgo_ts+1065, libc.VaList(bp+8, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, (*TXftFtFile)(unsafe.Pointer(f)).Fid))
  12339. }
  12340. if libfreetype.XFT_New_Face(tls, X_XftFTlibrary, (*TXftFtFile)(unsafe.Pointer(f)).Ffile, (*TXftFtFile)(unsafe.Pointer(f)).Fid, f+44) != 0 {
  12341. (*TXftFtFile)(unsafe.Pointer(f)).Flock--
  12342. }
  12343. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = 0
  12344. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = 0
  12345. v3 = libc.Int32FromInt32(0)
  12346. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyy = v3
  12347. v2 = v3
  12348. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fyx = v2
  12349. v1 = v2
  12350. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxy = v1
  12351. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix.Fxx = v1
  12352. __XftUncacheFiles(tls)
  12353. }
  12354. return (*TXftFtFile)(unsafe.Pointer(f)).Fface
  12355. }
  12356. func __XftLockError(tls *libc.TLS, reason uintptr) {
  12357. bp := tls.Alloc(16)
  12358. defer tls.Free(16)
  12359. libc.Xfprintf(tls, libc.Xstderr, __ccgo_ts+1085, libc.VaList(bp+8, reason))
  12360. }
  12361. func __XftUnlockFile(tls *libc.TLS, f uintptr) {
  12362. var v1 int32
  12363. var v2 uintptr
  12364. _, _ = v1, v2
  12365. v2 = f + 40
  12366. *(*int32)(unsafe.Pointer(v2))--
  12367. v1 = *(*int32)(unsafe.Pointer(v2))
  12368. if v1 < 0 {
  12369. __XftLockError(tls, __ccgo_ts+1108)
  12370. }
  12371. }
  12372. func X_XftSetFace(tls *libc.TLS, f uintptr, xsize TFT_F26Dot6, ysize TFT_F26Dot6, matrix uintptr) (r TFcBool) {
  12373. bp := tls.Alloc(48)
  12374. defer tls.Free(48)
  12375. var best, i, v2, v3, v4, v5, v6, v7 int32
  12376. var face TFT_Face
  12377. var v8, v9 bool
  12378. _, _, _, _, _, _, _, _, _, _, _ = best, face, i, v2, v3, v4, v5, v6, v7, v8, v9
  12379. face = (*TXftFtFile)(unsafe.Pointer(f)).Fface
  12380. if (*TXftFtFile)(unsafe.Pointer(f)).Fxsize != xsize || (*TXftFtFile)(unsafe.Pointer(f)).Fysize != ysize {
  12381. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  12382. libc.Xprintf(tls, __ccgo_ts+1130, libc.VaList(bp+8, int32(xsize>>libc.Int32FromInt32(6)), int32(ysize>>libc.Int32FromInt32(6)), xsize, ysize))
  12383. }
  12384. /*
  12385. * Bitmap only faces must match exactly, so find the closest
  12386. * one (height dominant search)
  12387. */
  12388. if !((*TFT_FaceRec_)(unsafe.Pointer(face)).Fface_flags&(libc.Int32FromInt32(1)<<libc.Int32FromInt32(0)) != 0) {
  12389. best = 0
  12390. i = int32(1)
  12391. for {
  12392. if !(i < (*TFT_FaceRec_)(unsafe.Pointer(face)).Fnum_fixed_sizes) {
  12393. break
  12394. }
  12395. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*16))).Fy_ppem < 0 {
  12396. v2 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*16))).Fy_ppem)
  12397. } else {
  12398. v2 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*16))).Fy_ppem
  12399. }
  12400. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*16))).Fy_ppem < 0 {
  12401. v3 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*16))).Fy_ppem)
  12402. } else {
  12403. v3 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*16))).Fy_ppem
  12404. }
  12405. if v9 = v2 < v3; !v9 {
  12406. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*16))).Fy_ppem < 0 {
  12407. v4 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*16))).Fy_ppem)
  12408. } else {
  12409. v4 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*16))).Fy_ppem
  12410. }
  12411. if ysize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*16))).Fy_ppem < 0 {
  12412. v5 = -(ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*16))).Fy_ppem)
  12413. } else {
  12414. v5 = ysize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*16))).Fy_ppem
  12415. }
  12416. if v8 = v4 == v5; v8 {
  12417. if xsize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*16))).Fx_ppem < 0 {
  12418. v6 = -(xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*16))).Fx_ppem)
  12419. } else {
  12420. v6 = xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(i)*16))).Fx_ppem
  12421. }
  12422. if xsize-(*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*16))).Fx_ppem < 0 {
  12423. v7 = -(xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*16))).Fx_ppem)
  12424. } else {
  12425. v7 = xsize - (*(*TFT_Bitmap_Size)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Favailable_sizes + uintptr(best)*16))).Fx_ppem
  12426. }
  12427. }
  12428. }
  12429. if v9 || v8 && v6 < v7 {
  12430. best = i
  12431. }
  12432. goto _1
  12433. _1:
  12434. ;
  12435. i++
  12436. }
  12437. /*
  12438. * Freetype 2.1.7 and earlier used width/height
  12439. * for matching sizes in the BDF and PCF loaders.
  12440. * This has been fixed for 2.1.8. Because BDF and PCF
  12441. * files have but a single strike per file, we can
  12442. * simply try both sizes.
  12443. */
  12444. 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 {
  12445. return m_False
  12446. }
  12447. } else {
  12448. if libfreetype.XFT_Set_Char_Size(tls, face, xsize, ysize, uint32(0), uint32(0)) != 0 {
  12449. return m_False
  12450. }
  12451. }
  12452. (*TXftFtFile)(unsafe.Pointer(f)).Fxsize = xsize
  12453. (*TXftFtFile)(unsafe.Pointer(f)).Fysize = ysize
  12454. }
  12455. 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) {
  12456. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  12457. 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)))
  12458. }
  12459. libfreetype.XFT_Set_Transform(tls, face, matrix, libc.UintptrFromInt32(0))
  12460. (*TXftFtFile)(unsafe.Pointer(f)).Fmatrix = *(*TFT_Matrix)(unsafe.Pointer(matrix))
  12461. }
  12462. return int32(m_True)
  12463. }
  12464. func __XftReleaseFile(tls *libc.TLS, f uintptr) {
  12465. var prev, v2 uintptr
  12466. var v1 int32
  12467. var v4 uint32
  12468. _, _, _, _ = prev, v1, v2, v4
  12469. v2 = f + 4
  12470. *(*int32)(unsafe.Pointer(v2))--
  12471. v1 = *(*int32)(unsafe.Pointer(v2))
  12472. if v1 != 0 {
  12473. return
  12474. }
  12475. if (*TXftFtFile)(unsafe.Pointer(f)).Flock != 0 {
  12476. __XftLockError(tls, __ccgo_ts+1196)
  12477. }
  12478. if (*TXftFtFile)(unsafe.Pointer(f)).Ffile != 0 {
  12479. prev = uintptr(unsafe.Pointer(&__XftFtFiles))
  12480. for {
  12481. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  12482. break
  12483. }
  12484. if *(*uintptr)(unsafe.Pointer(prev)) == f {
  12485. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFtFile)(unsafe.Pointer(f)).Fnext
  12486. break
  12487. }
  12488. goto _3
  12489. _3:
  12490. ;
  12491. prev = *(*uintptr)(unsafe.Pointer(prev))
  12492. }
  12493. if (*TXftFtFile)(unsafe.Pointer(f)).Fface != 0 {
  12494. libfreetype.XFT_Done_Face(tls, (*TXftFtFile)(unsafe.Pointer(f)).Fface)
  12495. }
  12496. }
  12497. if (*TXftFtFile)(unsafe.Pointer(f)).Ffile != 0 {
  12498. v4 = libc.Xstrlen(tls, (*TXftFtFile)(unsafe.Pointer(f)).Ffile) + uint32(1)
  12499. } else {
  12500. v4 = uint32(0)
  12501. }
  12502. XXftMemFree(tls, int32(_XFT_MEM_FILE), libc.Uint32FromInt64(48)+v4)
  12503. libc.Xfree(tls, f)
  12504. }
  12505. /*
  12506. * Find a prime larger than the minimum reasonable hash size
  12507. */
  12508. func __XftSqrt(tls *libc.TLS, a TFcChar32) (r TFcChar32) {
  12509. var h, l, m TFcChar32
  12510. _, _, _ = h, l, m
  12511. l = uint32(2)
  12512. h = a / uint32(2)
  12513. for h-l > uint32(1) {
  12514. m = (h + l) >> int32(1)
  12515. if m*m < a {
  12516. l = m
  12517. } else {
  12518. h = m
  12519. }
  12520. }
  12521. return h
  12522. }
  12523. func __XftIsPrime(tls *libc.TLS, i TFcChar32) (r TFcBool) {
  12524. var l, t TFcChar32
  12525. _, _ = l, t
  12526. if i < uint32(2) {
  12527. return m_FcFalse
  12528. }
  12529. if i&uint32(1) == uint32(0) {
  12530. if i == uint32(2) {
  12531. return int32(m_FcTrue)
  12532. }
  12533. return m_FcFalse
  12534. }
  12535. l = __XftSqrt(tls, i) + uint32(1)
  12536. t = uint32(3)
  12537. for {
  12538. if !(t <= l) {
  12539. break
  12540. }
  12541. if i%t == uint32(0) {
  12542. return m_FcFalse
  12543. }
  12544. goto _1
  12545. _1:
  12546. ;
  12547. t += uint32(2)
  12548. }
  12549. return int32(m_FcTrue)
  12550. }
  12551. func __XftHashSize(tls *libc.TLS, num_unicode TFcChar32) (r TFcChar32) {
  12552. var hash TFcChar32
  12553. _ = hash
  12554. /* at least 31.25 % extra space */
  12555. hash = num_unicode + num_unicode>>libc.Int32FromInt32(2) + num_unicode>>libc.Int32FromInt32(4)
  12556. if hash&uint32(1) == uint32(0) {
  12557. hash++
  12558. }
  12559. for !(__XftIsPrime(tls, hash) != 0) {
  12560. hash += uint32(2)
  12561. }
  12562. return hash
  12563. }
  12564. func XXftLockFace(tls *libc.TLS, public uintptr) (r TFT_Face) {
  12565. var face TFT_Face
  12566. var fi, font uintptr
  12567. _, _, _ = face, fi, font
  12568. font = public
  12569. fi = font + 32
  12570. face = __XftLockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12571. /*
  12572. * Make sure the face is usable at the requested size
  12573. */
  12574. if face != 0 && !(X_XftSetFace(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile, (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize, (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize, fi+36) != 0) {
  12575. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12576. face = libc.UintptrFromInt32(0)
  12577. }
  12578. return face
  12579. }
  12580. func XXftUnlockFace(tls *libc.TLS, public uintptr) {
  12581. var font uintptr
  12582. _ = font
  12583. font = public
  12584. __XftUnlockFile(tls, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ffile)
  12585. }
  12586. func _XftFontInfoFill(tls *libc.TLS, dpy uintptr, pattern uintptr, fi uintptr) (r TFcBool) {
  12587. bp := tls.Alloc(128)
  12588. defer tls.Free(128)
  12589. var hash TFcChar32
  12590. var hashp, info, v1, v12, p10, p6, p7, p8, p9 uintptr
  12591. var mid, nhash, v11 int32
  12592. var v2, v3 TFT_Fixed
  12593. var v4, v5 float64
  12594. var _ /* aspect at bp+16 */ float64
  12595. var _ /* autohint at bp+68 */ TFcBool
  12596. var _ /* bitmap at bp+84 */ TFcBool
  12597. var _ /* dsize at bp+8 */ float64
  12598. var _ /* face at bp+80 */ TFT_Face
  12599. var _ /* filename at bp+0 */ uintptr
  12600. var _ /* fm1 at bp+28 */ TFcMatrix
  12601. var _ /* font_matrix at bp+24 */ uintptr
  12602. var _ /* global_advance at bp+72 */ TFcBool
  12603. var _ /* hint_style at bp+76 */ int32
  12604. var _ /* hinting at bp+60 */ TFcBool
  12605. var _ /* id at bp+4 */ int32
  12606. var _ /* vertical_layout at bp+64 */ TFcBool
  12607. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = hash, hashp, info, mid, nhash, v1, v11, v12, v2, v3, v4, v5, p10, p6, p7, p8, p9
  12608. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  12609. if !(info != 0) {
  12610. return m_FcFalse
  12611. }
  12612. /*
  12613. * Initialize the whole XftFontInfo so that padding doesn't interfere with
  12614. * hash or XftFontInfoEqual().
  12615. */
  12616. libc.Xmemset(tls, fi, int32('\000'), uint32(76))
  12617. /*
  12618. * Find the associated file
  12619. */
  12620. switch libfontconfig.XFcPatternGetString(tls, pattern, __ccgo_ts+1225, 0, bp) {
  12621. case int32(_FcResultNoMatch):
  12622. *(*uintptr)(unsafe.Pointer(bp)) = libc.UintptrFromInt32(0)
  12623. case int32(_FcResultMatch):
  12624. default:
  12625. goto bail0
  12626. }
  12627. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1230, 0, bp+4) {
  12628. case int32(_FcResultNoMatch):
  12629. *(*int32)(unsafe.Pointer(bp + 4)) = 0
  12630. case int32(_FcResultMatch):
  12631. default:
  12632. goto bail0
  12633. }
  12634. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  12635. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = __XftGetFile(tls, *(*uintptr)(unsafe.Pointer(bp)), *(*int32)(unsafe.Pointer(bp + 4)))
  12636. } else {
  12637. if libfontconfig.XFcPatternGetFTFace(tls, pattern, __ccgo_ts+1236, 0, bp+80) == int32(_FcResultMatch) && *(*TFT_Face)(unsafe.Pointer(bp + 80)) != 0 {
  12638. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = __XftGetFaceFile(tls, *(*TFT_Face)(unsafe.Pointer(bp + 80)))
  12639. }
  12640. }
  12641. if !((*TXftFontInfo)(unsafe.Pointer(fi)).Ffile != 0) {
  12642. goto bail0
  12643. }
  12644. /*
  12645. * Compute pixel size
  12646. */
  12647. if libfontconfig.XFcPatternGetDouble(tls, pattern, __ccgo_ts+1243, 0, bp+8) != int32(_FcResultMatch) {
  12648. goto bail1
  12649. }
  12650. if libfontconfig.XFcPatternGetDouble(tls, pattern, __ccgo_ts+1253, 0, bp+16) != int32(_FcResultMatch) {
  12651. *(*float64)(unsafe.Pointer(bp + 16)) = float64(1)
  12652. }
  12653. (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize = int32(float64(*(*float64)(unsafe.Pointer(bp + 8)) * libc.Float64FromFloat64(64)))
  12654. (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize = int32(float64(float64(*(*float64)(unsafe.Pointer(bp + 8))**(*float64)(unsafe.Pointer(bp + 16))) * libc.Float64FromFloat64(64)))
  12655. if XXftDebug(tls)&int32(m_XFT_DBG_OPEN) != 0 {
  12656. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  12657. v1 = *(*uintptr)(unsafe.Pointer(bp))
  12658. } else {
  12659. v1 = __ccgo_ts + 1260
  12660. }
  12661. libc.Xprintf(tls, __ccgo_ts+1267, libc.VaList(bp+96, v1, *(*int32)(unsafe.Pointer(bp + 4)), *(*float64)(unsafe.Pointer(bp + 8))))
  12662. }
  12663. /*
  12664. * Get antialias value
  12665. */
  12666. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+614, 0, fi+16) {
  12667. case int32(_FcResultNoMatch):
  12668. (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias = int32(m_True)
  12669. case int32(_FcResultMatch):
  12670. default:
  12671. goto bail1
  12672. }
  12673. /*
  12674. * Get rgba value
  12675. */
  12676. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+599, 0, fi+28) {
  12677. case int32(_FcResultNoMatch):
  12678. (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba = m_FC_RGBA_UNKNOWN
  12679. case int32(_FcResultMatch):
  12680. default:
  12681. goto bail1
  12682. }
  12683. /*
  12684. * Get lcd_filter value
  12685. */
  12686. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+604, 0, fi+32) {
  12687. case int32(_FcResultNoMatch):
  12688. (*TXftFontInfo)(unsafe.Pointer(fi)).Flcd_filter = int32(m_FC_LCD_DEFAULT)
  12689. case int32(_FcResultMatch):
  12690. default:
  12691. goto bail1
  12692. }
  12693. /*
  12694. * Get matrix and transform values
  12695. */
  12696. switch libfontconfig.XFcPatternGetMatrix(tls, pattern, __ccgo_ts+1304, 0, bp+24) {
  12697. case int32(_FcResultNoMatch):
  12698. v2 = libc.Int32FromInt32(0x10000)
  12699. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy = v2
  12700. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx = v2
  12701. v3 = libc.Int32FromInt32(0)
  12702. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx = v3
  12703. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy = v3
  12704. case int32(_FcResultMatch):
  12705. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx = int32(float64(libc.Float64FromInt32(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).Fxx))
  12706. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy = int32(float64(libc.Float64FromInt32(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).Fyy))
  12707. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy = int32(float64(libc.Float64FromInt32(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).Fxy))
  12708. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx = int32(float64(libc.Float64FromInt32(0x10000) * (*TFcMatrix)(unsafe.Pointer(*(*uintptr)(unsafe.Pointer(bp + 24)))).Fyx))
  12709. default:
  12710. goto bail1
  12711. }
  12712. mid = int32(1)
  12713. for libfontconfig.XFcPatternGetMatrix(tls, pattern, __ccgo_ts+1304, mid, bp+24) == int32(_FcResultMatch) {
  12714. v4 = libc.Float64FromInt32(1)
  12715. (*TFcMatrix)(unsafe.Pointer(bp + 28)).Fyy = v4
  12716. (*TFcMatrix)(unsafe.Pointer(bp + 28)).Fxx = v4
  12717. v5 = libc.Float64FromInt32(0)
  12718. (*TFcMatrix)(unsafe.Pointer(bp + 28)).Fyx = v5
  12719. (*TFcMatrix)(unsafe.Pointer(bp + 28)).Fxy = v5
  12720. (*(*TFcMatrix)(unsafe.Pointer(bp + 28))).Fxx = float64((*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx) / libc.Float64FromInt32(0x10000)
  12721. (*(*TFcMatrix)(unsafe.Pointer(bp + 28))).Fyy = float64((*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy) / libc.Float64FromInt32(0x10000)
  12722. (*(*TFcMatrix)(unsafe.Pointer(bp + 28))).Fxy = float64((*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy) / libc.Float64FromInt32(0x10000)
  12723. (*(*TFcMatrix)(unsafe.Pointer(bp + 28))).Fyx = float64((*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx) / libc.Float64FromInt32(0x10000)
  12724. libfontconfig.XFcMatrixMultiply(tls, bp+28, *(*uintptr)(unsafe.Pointer(bp + 24)), bp+28)
  12725. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxx = int32(float64(libc.Float64FromInt32(0x10000) * (*(*TFcMatrix)(unsafe.Pointer(bp + 28))).Fxx))
  12726. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyy = int32(float64(libc.Float64FromInt32(0x10000) * (*(*TFcMatrix)(unsafe.Pointer(bp + 28))).Fyy))
  12727. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fxy = int32(float64(libc.Float64FromInt32(0x10000) * (*(*TFcMatrix)(unsafe.Pointer(bp + 28))).Fxy))
  12728. (*TXftFontInfo)(unsafe.Pointer(fi)).Fmatrix.Fyx = int32(float64(libc.Float64FromInt32(0x10000) * (*(*TFcMatrix)(unsafe.Pointer(bp + 28))).Fyx))
  12729. mid++
  12730. }
  12731. (*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))
  12732. /*
  12733. * Get render value, set to false if no Render extension present
  12734. */
  12735. if (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender != 0 {
  12736. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+592, 0, fi+60) {
  12737. case int32(_FcResultTypeMismatch):
  12738. /*
  12739. * Fontconfig no longer supports xft's custom values in
  12740. * text patterns, so any name specifying render:true or
  12741. * render:false will have an invalid type in the resulting
  12742. * pattern. Just ignore that case so that the app doesn't
  12743. * just fail
  12744. */
  12745. /* fall through ... */
  12746. fallthrough
  12747. case int32(_FcResultNoMatch):
  12748. (*TXftFontInfo)(unsafe.Pointer(fi)).Frender = (*TXftDisplayInfo)(unsafe.Pointer(info)).FhasRender
  12749. case int32(_FcResultMatch):
  12750. default:
  12751. goto bail1
  12752. }
  12753. } else {
  12754. (*TXftFontInfo)(unsafe.Pointer(fi)).Frender = m_FcFalse
  12755. }
  12756. /*
  12757. * Compute glyph load flags
  12758. */
  12759. (*TXftFontInfo)(unsafe.Pointer(fi)).Fload_flags = int32(libc.Int32FromInt32(m_FT_LOAD_DEFAULT1) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(20))
  12760. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1311, 0, bp+84) {
  12761. case int32(_FcResultNoMatch):
  12762. *(*TFcBool)(unsafe.Pointer(bp + 84)) = m_FcFalse
  12763. case int32(_FcResultMatch):
  12764. default:
  12765. goto bail1
  12766. }
  12767. /* disable bitmaps when anti-aliasing or transforming glyphs */
  12768. if !(*(*TFcBool)(unsafe.Pointer(bp + 84)) != 0) && (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias != 0 || (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  12769. p6 = fi + 56
  12770. *(*TFT_Int)(unsafe.Pointer(p6)) = TFT_Int(*(*TFT_Int)(unsafe.Pointer(p6)) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(3))
  12771. }
  12772. /* disable hinting if requested */
  12773. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+652, 0, bp+60) {
  12774. case int32(_FcResultNoMatch):
  12775. *(*TFcBool)(unsafe.Pointer(bp + 60)) = int32(m_FcTrue)
  12776. case int32(_FcResultMatch):
  12777. default:
  12778. goto bail1
  12779. }
  12780. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+624, 0, fi+20) {
  12781. case int32(_FcResultNoMatch):
  12782. (*TXftFontInfo)(unsafe.Pointer(fi)).Fembolden = m_FcFalse
  12783. case int32(_FcResultMatch):
  12784. default:
  12785. goto bail1
  12786. }
  12787. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+642, 0, bp+76) {
  12788. case int32(_FcResultNoMatch):
  12789. *(*int32)(unsafe.Pointer(bp + 76)) = int32(m_FC_HINT_FULL)
  12790. case int32(_FcResultMatch):
  12791. default:
  12792. goto bail1
  12793. }
  12794. if !(*(*TFcBool)(unsafe.Pointer(bp + 60)) != 0) || *(*int32)(unsafe.Pointer(bp + 76)) == m_FC_HINT_NONE {
  12795. p7 = fi + 56
  12796. *(*TFT_Int)(unsafe.Pointer(p7)) = TFT_Int(*(*TFT_Int)(unsafe.Pointer(p7)) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(1))
  12797. }
  12798. /* Figure out the load target, which modifies the hinting
  12799. * behavior of FreeType based on the intended use of the glyphs.
  12800. */
  12801. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias != 0 {
  12802. if m_FC_HINT_NONE < *(*int32)(unsafe.Pointer(bp + 76)) && *(*int32)(unsafe.Pointer(bp + 76)) < int32(m_FC_HINT_FULL) {
  12803. *(*TFT_Int)(unsafe.Pointer(fi + 56)) |= int32(_FT_RENDER_MODE_LIGHT) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12804. } else {
  12805. /* autohinter will snap stems to integer widths, when
  12806. * the LCD targets are used.
  12807. */
  12808. switch (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba {
  12809. case int32(m_FC_RGBA_RGB):
  12810. fallthrough
  12811. case int32(m_FC_RGBA_BGR):
  12812. *(*TFT_Int)(unsafe.Pointer(fi + 56)) |= int32(_FT_RENDER_MODE_LCD) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12813. case int32(m_FC_RGBA_VRGB):
  12814. fallthrough
  12815. case int32(m_FC_RGBA_VBGR):
  12816. *(*TFT_Int)(unsafe.Pointer(fi + 56)) |= int32(_FT_RENDER_MODE_LCD_V) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12817. break
  12818. }
  12819. }
  12820. } else {
  12821. *(*TFT_Int)(unsafe.Pointer(fi + 56)) |= int32(_FT_RENDER_MODE_MONO) & libc.Int32FromInt32(15) << libc.Int32FromInt32(16)
  12822. }
  12823. /* set vertical layout if requested */
  12824. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1326, 0, bp+64) {
  12825. case int32(_FcResultNoMatch):
  12826. *(*TFcBool)(unsafe.Pointer(bp + 64)) = m_FcFalse
  12827. case int32(_FcResultMatch):
  12828. default:
  12829. goto bail1
  12830. }
  12831. if *(*TFcBool)(unsafe.Pointer(bp + 64)) != 0 {
  12832. p8 = fi + 56
  12833. *(*TFT_Int)(unsafe.Pointer(p8)) = TFT_Int(*(*TFT_Int)(unsafe.Pointer(p8)) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(4))
  12834. }
  12835. /* force autohinting if requested */
  12836. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+633, 0, bp+68) {
  12837. case int32(_FcResultNoMatch):
  12838. *(*TFcBool)(unsafe.Pointer(bp + 68)) = m_FcFalse
  12839. case int32(_FcResultMatch):
  12840. default:
  12841. goto bail1
  12842. }
  12843. if *(*TFcBool)(unsafe.Pointer(bp + 68)) != 0 {
  12844. p9 = fi + 56
  12845. *(*TFT_Int)(unsafe.Pointer(p9)) = TFT_Int(*(*TFT_Int)(unsafe.Pointer(p9)) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(5))
  12846. }
  12847. /* disable global advance width (for broken DynaLab TT CJK fonts) */
  12848. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+1341, 0, bp+72) {
  12849. case int32(_FcResultNoMatch):
  12850. *(*TFcBool)(unsafe.Pointer(bp + 72)) = int32(m_FcTrue)
  12851. case int32(_FcResultMatch):
  12852. default:
  12853. goto bail1
  12854. }
  12855. if !(*(*TFcBool)(unsafe.Pointer(bp + 72)) != 0) {
  12856. p10 = fi + 56
  12857. *(*TFT_Int)(unsafe.Pointer(p10)) = TFT_Int(*(*TFT_Int)(unsafe.Pointer(p10)) | libc.Int32FromInt32(1)<<libc.Int32FromInt32(9))
  12858. }
  12859. /*
  12860. * Get requested spacing value
  12861. */
  12862. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1355, 0, fi+64) {
  12863. case int32(_FcResultNoMatch):
  12864. (*TXftFontInfo)(unsafe.Pointer(fi)).Fspacing = m_FC_PROPORTIONAL
  12865. case int32(_FcResultMatch):
  12866. default:
  12867. goto bail1
  12868. }
  12869. /*
  12870. * Check for minspace
  12871. */
  12872. switch libfontconfig.XFcPatternGetBool(tls, pattern, __ccgo_ts+660, 0, fi+68) {
  12873. case int32(_FcResultNoMatch):
  12874. (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace = m_FcFalse
  12875. case int32(_FcResultMatch):
  12876. default:
  12877. goto bail1
  12878. }
  12879. /*
  12880. * Check for fixed pixel spacing
  12881. */
  12882. switch libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+1363, 0, fi+72) {
  12883. case int32(_FcResultNoMatch):
  12884. (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width = 0
  12885. case int32(_FcResultMatch):
  12886. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width != 0 {
  12887. (*TXftFontInfo)(unsafe.Pointer(fi)).Fspacing = int32(m_FC_MONO)
  12888. }
  12889. default:
  12890. goto bail1
  12891. }
  12892. /*
  12893. * Step over hash value in the structure
  12894. */
  12895. hash = uint32(0)
  12896. hashp = fi + uintptr(1)*4
  12897. nhash = libc.Int32FromUint32(libc.Uint32FromInt64(76)/libc.Uint32FromInt64(4) - libc.Uint32FromInt32(1))
  12898. for {
  12899. v11 = nhash
  12900. nhash--
  12901. if !(v11 != 0) {
  12902. break
  12903. }
  12904. v12 = hashp
  12905. hashp += 4
  12906. hash += *(*TFcChar32)(unsafe.Pointer(v12))
  12907. }
  12908. (*TXftFontInfo)(unsafe.Pointer(fi)).Fhash = hash
  12909. /*
  12910. * All done
  12911. */
  12912. return int32(m_FcTrue)
  12913. goto bail1
  12914. bail1:
  12915. ;
  12916. __XftReleaseFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12917. (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile = libc.UintptrFromInt32(0)
  12918. goto bail0
  12919. bail0:
  12920. ;
  12921. return m_FcFalse
  12922. return r
  12923. }
  12924. func _XftFontInfoEmpty(tls *libc.TLS, dpy uintptr, fi uintptr) {
  12925. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile != 0 {
  12926. __XftReleaseFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  12927. }
  12928. }
  12929. func XXftFontInfoCreate(tls *libc.TLS, dpy uintptr, pattern uintptr) (r uintptr) {
  12930. var fi uintptr
  12931. _ = fi
  12932. fi = libc.Xmalloc(tls, uint32(76))
  12933. if !(fi != 0) {
  12934. return libc.UintptrFromInt32(0)
  12935. }
  12936. if !(_XftFontInfoFill(tls, dpy, pattern, fi) != 0) {
  12937. libc.Xfree(tls, fi)
  12938. fi = libc.UintptrFromInt32(0)
  12939. }
  12940. XXftMemAlloc(tls, int32(_XFT_MEM_FONT), uint32(76))
  12941. return fi
  12942. }
  12943. func XXftFontInfoDestroy(tls *libc.TLS, dpy uintptr, fi uintptr) {
  12944. _XftFontInfoEmpty(tls, dpy, fi)
  12945. XXftMemFree(tls, int32(_XFT_MEM_FONT), uint32(76))
  12946. libc.Xfree(tls, fi)
  12947. }
  12948. func XXftFontInfoHash(tls *libc.TLS, fi uintptr) (r TFcChar32) {
  12949. return (*TXftFontInfo)(unsafe.Pointer(fi)).Fhash
  12950. }
  12951. func XXftFontInfoEqual(tls *libc.TLS, a uintptr, b uintptr) (r TFcBool) {
  12952. return libc.BoolInt32(libc.Xmemcmp(tls, a, b, uint32(76)) == 0)
  12953. }
  12954. func XXftFontOpenInfo(tls *libc.TLS, dpy uintptr, pattern uintptr, fi uintptr) (r uintptr) {
  12955. bp := tls.Alloc(64)
  12956. defer tls.Free(64)
  12957. var alloc_size Tsize_t
  12958. var antialias, color TFcBool
  12959. var ascent, descent, height, i, v2, v4 int32
  12960. var bucket, font, format, info, v3 uintptr
  12961. var face TFT_Face
  12962. var hash_value, num_unicode, rehash_value TFcChar32
  12963. var num_glyphs TFT_UInt
  12964. var v6 uint32
  12965. var _ /* charset at bp+0 */ uintptr
  12966. var _ /* max_glyph_memory at bp+4 */ int32
  12967. var _ /* vector at bp+16 */ TFT_Vector
  12968. var _ /* vector at bp+8 */ TFT_Vector
  12969. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  12970. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  12971. if !(info != 0) {
  12972. return libc.UintptrFromInt32(0)
  12973. }
  12974. /*
  12975. * Find a matching previously opened font
  12976. */
  12977. bucket = info + 312 + uintptr((*TXftFontInfo)(unsafe.Pointer(fi)).Fhash%uint32(m_XFT_NUM_FONT_HASH))*4
  12978. font = *(*uintptr)(unsafe.Pointer(bucket))
  12979. for {
  12980. if !(font != 0) {
  12981. break
  12982. }
  12983. if XXftFontInfoEqual(tls, font+32, fi) != 0 {
  12984. v3 = font + 108
  12985. v2 = *(*int32)(unsafe.Pointer(v3))
  12986. *(*int32)(unsafe.Pointer(v3))++
  12987. if !(v2 != 0) {
  12988. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts--
  12989. }
  12990. libfontconfig.XFcPatternDestroy(tls, pattern)
  12991. return font
  12992. }
  12993. goto _1
  12994. _1:
  12995. ;
  12996. font = (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next
  12997. }
  12998. /*
  12999. * No existing font, create another.
  13000. */
  13001. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  13002. 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)))
  13003. }
  13004. if libfontconfig.XFcPatternGetInteger(tls, pattern, __ccgo_ts+201, 0, bp+4) != int32(_FcResultMatch) {
  13005. *(*int32)(unsafe.Pointer(bp + 4)) = libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024)
  13006. }
  13007. face = __XftLockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  13008. if !(face != 0) {
  13009. goto bail0
  13010. }
  13011. if !(X_XftSetFace(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile, (*TXftFontInfo)(unsafe.Pointer(fi)).Fxsize, (*TXftFontInfo)(unsafe.Pointer(fi)).Fysize, fi+36) != 0) {
  13012. goto bail1
  13013. }
  13014. /*
  13015. * Get the set of Unicode codepoints covered by the font.
  13016. * If the incoming pattern doesn't provide this data, go
  13017. * off and compute it. Yes, this is expensive, but it's
  13018. * required to map Unicode to glyph indices.
  13019. */
  13020. if libfontconfig.XFcPatternGetCharSet(tls, pattern, __ccgo_ts+1400, 0, bp) == int32(_FcResultMatch) {
  13021. *(*uintptr)(unsafe.Pointer(bp)) = libfontconfig.XFcCharSetCopy(tls, *(*uintptr)(unsafe.Pointer(bp)))
  13022. } else {
  13023. *(*uintptr)(unsafe.Pointer(bp)) = libfontconfig.XFcFreeTypeCharSet(tls, face, libfontconfig.XFcConfigGetBlanks(tls, libc.UintptrFromInt32(0)))
  13024. }
  13025. antialias = (*TXftFontInfo)(unsafe.Pointer(fi)).Fantialias
  13026. if !((*TFT_FaceRec_)(unsafe.Pointer(face)).Fface_flags&(libc.Int32FromInt32(1)<<libc.Int32FromInt32(0)) != 0) {
  13027. antialias = m_FcFalse
  13028. }
  13029. if !!((*TFT_FaceRec_)(unsafe.Pointer(face)).Fface_flags&(libc.Int32FromInt32(1)<<libc.Int32FromInt32(14)) != 0) {
  13030. v4 = int32(m_FcTrue)
  13031. } else {
  13032. v4 = m_FcFalse
  13033. }
  13034. color = v4
  13035. /*
  13036. * Find the appropriate picture format
  13037. */
  13038. if (*TXftFontInfo)(unsafe.Pointer(fi)).Frender != 0 {
  13039. if color != 0 {
  13040. format = libxrender.XXRenderFindStandardFormat(tls, dpy, m_PictStandardARGB32)
  13041. } else {
  13042. if antialias != 0 {
  13043. switch (*TXftFontInfo)(unsafe.Pointer(fi)).Frgba {
  13044. case int32(m_FC_RGBA_RGB):
  13045. fallthrough
  13046. case int32(m_FC_RGBA_BGR):
  13047. fallthrough
  13048. case int32(m_FC_RGBA_VRGB):
  13049. fallthrough
  13050. case int32(m_FC_RGBA_VBGR):
  13051. format = libxrender.XXRenderFindStandardFormat(tls, dpy, m_PictStandardARGB32)
  13052. default:
  13053. format = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA8))
  13054. break
  13055. }
  13056. } else {
  13057. format = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA1))
  13058. }
  13059. }
  13060. if !(format != 0) {
  13061. goto bail2
  13062. }
  13063. } else {
  13064. format = libc.UintptrFromInt32(0)
  13065. }
  13066. if *(*uintptr)(unsafe.Pointer(bp)) != 0 {
  13067. num_unicode = libfontconfig.XFcCharSetCount(tls, *(*uintptr)(unsafe.Pointer(bp)))
  13068. hash_value = __XftHashSize(tls, num_unicode)
  13069. rehash_value = hash_value - uint32(2)
  13070. } else {
  13071. hash_value = uint32(0)
  13072. rehash_value = uint32(0)
  13073. }
  13074. /*
  13075. * Sometimes the glyphs are numbered 1..n, other times 0..n-1,
  13076. * accept either numbering scheme by making room in the table
  13077. */
  13078. num_glyphs = libc.Uint32FromInt32((*TFT_FaceRec_)(unsafe.Pointer(face)).Fnum_glyphs) + uint32(1)
  13079. alloc_size = libc.Uint32FromInt64(168) + num_glyphs*libc.Uint32FromInt64(4) + hash_value*libc.Uint32FromInt64(8)
  13080. font = libc.Xmalloc(tls, alloc_size)
  13081. if !(font != 0) {
  13082. goto bail2
  13083. }
  13084. XXftMemAlloc(tls, int32(_XFT_MEM_FONT), alloc_size)
  13085. /*
  13086. * Public fields
  13087. */
  13088. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  13089. (*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fx = 0
  13090. (*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fy = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fdescender
  13091. libfreetype.XFT_Vector_Transform(tls, bp+8, fi+36)
  13092. descent = int32(-((*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fy >> libc.Int32FromInt32(6)))
  13093. (*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fx = 0
  13094. (*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fy = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fascender
  13095. libfreetype.XFT_Vector_Transform(tls, bp+8, fi+36)
  13096. ascent = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fy >> libc.Int32FromInt32(6))
  13097. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace != 0 {
  13098. height = ascent + descent
  13099. } else {
  13100. (*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fx = 0
  13101. (*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fy = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fheight
  13102. libfreetype.XFT_Vector_Transform(tls, bp+8, fi+36)
  13103. height = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fy >> libc.Int32FromInt32(6))
  13104. }
  13105. } else {
  13106. descent = -int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fdescender >> libc.Int32FromInt32(6))
  13107. ascent = int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fascender >> libc.Int32FromInt32(6))
  13108. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fminspace != 0 {
  13109. height = ascent + descent
  13110. } else {
  13111. height = int32((*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fheight >> libc.Int32FromInt32(6))
  13112. }
  13113. }
  13114. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fascent = ascent
  13115. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fdescent = descent
  13116. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fheight = height
  13117. if (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width != 0 {
  13118. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width = (*TXftFontInfo)(unsafe.Pointer(fi)).Fchar_width
  13119. } else {
  13120. if (*TXftFontInfo)(unsafe.Pointer(fi)).Ftransform != 0 {
  13121. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  13122. (*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fy = 0
  13123. libfreetype.XFT_Vector_Transform(tls, bp+16, fi+36)
  13124. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width = int32((*(*TFT_Vector)(unsafe.Pointer(bp + 16))).Fx >> libc.Int32FromInt32(6))
  13125. } else {
  13126. (*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))
  13127. }
  13128. }
  13129. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fcharset = *(*uintptr)(unsafe.Pointer(bp))
  13130. (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fpattern = pattern
  13131. /*
  13132. * Management fields
  13133. */
  13134. (*TXftFontInt)(unsafe.Pointer(font)).Fref = int32(1)
  13135. (*TXftFontInt)(unsafe.Pointer(font)).Fnext = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  13136. (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts = font
  13137. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next = *(*uintptr)(unsafe.Pointer(bucket))
  13138. *(*uintptr)(unsafe.Pointer(bucket)) = font
  13139. /*
  13140. * Copy the info over
  13141. */
  13142. (*TXftFontInt)(unsafe.Pointer(font)).Finfo = *(*TXftFontInfo)(unsafe.Pointer(fi))
  13143. /*
  13144. * reset the antialias field. It can't
  13145. * be set correctly until the font is opened,
  13146. * which doesn't happen in XftFontInfoFill
  13147. */
  13148. (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias = antialias
  13149. /*
  13150. * Set color value, which is only known once the
  13151. * font was loaded
  13152. */
  13153. (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fcolor = color
  13154. /*
  13155. * bump XftFile reference count
  13156. */
  13157. (*TXftFtFile)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ffile)).Fref++
  13158. /*
  13159. * Per glyph information
  13160. */
  13161. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs = font + libc.UintptrFromInt32(1)*168
  13162. libc.Xmemset(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs, int32('\000'), num_glyphs*uint32(4))
  13163. (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs = num_glyphs
  13164. /*
  13165. * Memory-usage tracking
  13166. */
  13167. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = uint32(0xffffffff)
  13168. (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse = uint32(0)
  13169. /*
  13170. * Unicode hash table information
  13171. */
  13172. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_table = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs)*4
  13173. i = 0
  13174. for {
  13175. if !(libc.Uint32FromInt32(i) < hash_value) {
  13176. break
  13177. }
  13178. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(i)*8))).Fucs4 = libc.Uint32FromInt32(^libc.Int32FromInt32(0))
  13179. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(i)*8))).Fglyph = uint32(0)
  13180. goto _5
  13181. _5:
  13182. ;
  13183. i++
  13184. }
  13185. (*TXftFontInt)(unsafe.Pointer(font)).Fhash_value = libc.Int32FromUint32(hash_value)
  13186. (*TXftFontInt)(unsafe.Pointer(font)).Frehash_value = libc.Int32FromUint32(rehash_value)
  13187. /*
  13188. * X specific fields
  13189. */
  13190. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = uint32(0)
  13191. (*TXftFontInt)(unsafe.Pointer(font)).Fformat = format
  13192. /*
  13193. * Glyph memory management fields
  13194. */
  13195. (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory = uint32(0)
  13196. (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory = libc.Uint32FromInt32(*(*int32)(unsafe.Pointer(bp + 4)))
  13197. (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ftrack_mem_usage
  13198. (*TXftFontInt)(unsafe.Pointer(font)).Fuse_free_glyphs = (*TXftDisplayInfo)(unsafe.Pointer(info)).Fuse_free_glyphs
  13199. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  13200. v6 = uint32(32)
  13201. } else {
  13202. v6 = uint32(24)
  13203. }
  13204. (*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph = v6
  13205. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  13206. return font
  13207. goto bail2
  13208. bail2:
  13209. ;
  13210. libfontconfig.XFcCharSetDestroy(tls, *(*uintptr)(unsafe.Pointer(bp)))
  13211. goto bail1
  13212. bail1:
  13213. ;
  13214. __XftUnlockFile(tls, (*TXftFontInfo)(unsafe.Pointer(fi)).Ffile)
  13215. goto bail0
  13216. bail0:
  13217. ;
  13218. return libc.UintptrFromInt32(0)
  13219. return r
  13220. }
  13221. func XXftFontOpenPattern(tls *libc.TLS, dpy uintptr, pattern uintptr) (r uintptr) {
  13222. bp := tls.Alloc(80)
  13223. defer tls.Free(80)
  13224. var font uintptr
  13225. var _ /* info at bp+0 */ TXftFontInfo
  13226. _ = font
  13227. if !(_XftFontInfoFill(tls, dpy, pattern, bp) != 0) {
  13228. return libc.UintptrFromInt32(0)
  13229. }
  13230. font = XXftFontOpenInfo(tls, dpy, pattern, bp)
  13231. _XftFontInfoEmpty(tls, dpy, bp)
  13232. return font
  13233. }
  13234. func XXftFontCopy(tls *libc.TLS, dpy uintptr, public uintptr) (r uintptr) {
  13235. var font uintptr
  13236. _ = font
  13237. font = public
  13238. (*TXftFontInt)(unsafe.Pointer(font)).Fref++
  13239. return public
  13240. }
  13241. func _XftFontDestroy(tls *libc.TLS, dpy uintptr, public uintptr) {
  13242. var font, info, xftg uintptr
  13243. var i TFT_UInt
  13244. _, _, _, _ = font, i, info, xftg
  13245. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  13246. font = public
  13247. /* note reduction in memory use */
  13248. if info != 0 {
  13249. *(*uint32)(unsafe.Pointer(info + 32)) -= (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  13250. }
  13251. /* Clean up the info */
  13252. _XftFontInfoEmpty(tls, dpy, font+32)
  13253. /* Free the glyphset */
  13254. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  13255. libxrender.XXRenderFreeGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset)
  13256. }
  13257. /* Free the glyphs */
  13258. i = uint32(0)
  13259. for {
  13260. if !(i < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  13261. break
  13262. }
  13263. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(i)*4))
  13264. if xftg != 0 {
  13265. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  13266. libc.Xfree(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap)
  13267. }
  13268. libc.Xfree(tls, xftg)
  13269. }
  13270. goto _1
  13271. _1:
  13272. ;
  13273. i++
  13274. }
  13275. /* Free the pattern and the charset */
  13276. libfontconfig.XFcPatternDestroy(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fpattern)
  13277. libfontconfig.XFcCharSetDestroy(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fcharset)
  13278. /* Finally, free the font structure */
  13279. 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))
  13280. libc.Xfree(tls, font)
  13281. }
  13282. func _XftFontFindNthUnref(tls *libc.TLS, info uintptr, n int32) (r uintptr) {
  13283. var font, public uintptr
  13284. var v2 int32
  13285. var v3 bool
  13286. _, _, _, _ = font, public, v2, v3
  13287. public = (*TXftDisplayInfo)(unsafe.Pointer(info)).Ffonts
  13288. for {
  13289. if !(public != 0) {
  13290. break
  13291. }
  13292. font = public
  13293. if v3 = !((*TXftFontInt)(unsafe.Pointer(font)).Fref != 0); v3 {
  13294. v2 = n
  13295. n--
  13296. }
  13297. if v3 && !(v2 != 0) {
  13298. break
  13299. }
  13300. goto _1
  13301. _1:
  13302. ;
  13303. public = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  13304. }
  13305. return public
  13306. }
  13307. func XXftFontManageMemory(tls *libc.TLS, dpy uintptr) {
  13308. bp := tls.Alloc(48)
  13309. defer tls.Free(48)
  13310. var font, info, prev, public uintptr
  13311. _, _, _, _ = font, info, prev, public
  13312. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  13313. if !(info != 0) {
  13314. return
  13315. }
  13316. for (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_unref_fonts {
  13317. public = _XftFontFindNthUnref(tls, info, libc.Xrand(tls)%(*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts)
  13318. font = public
  13319. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  13320. 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)))
  13321. }
  13322. /* Unhook from display list */
  13323. prev = info + 24
  13324. for {
  13325. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  13326. break
  13327. }
  13328. if *(*uintptr)(unsafe.Pointer(prev)) == public {
  13329. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFontInt)(unsafe.Pointer(font)).Fnext
  13330. break
  13331. }
  13332. goto _1
  13333. _1:
  13334. ;
  13335. prev = *(*uintptr)(unsafe.Pointer(prev)) + 24
  13336. }
  13337. /* Unhook from hash list */
  13338. prev = info + 312 + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fhash%uint32(m_XFT_NUM_FONT_HASH))*4
  13339. for {
  13340. if !(*(*uintptr)(unsafe.Pointer(prev)) != 0) {
  13341. break
  13342. }
  13343. if *(*uintptr)(unsafe.Pointer(prev)) == public {
  13344. *(*uintptr)(unsafe.Pointer(prev)) = (*TXftFontInt)(unsafe.Pointer(font)).Fhash_next
  13345. break
  13346. }
  13347. goto _2
  13348. _2:
  13349. ;
  13350. prev = *(*uintptr)(unsafe.Pointer(prev)) + 28
  13351. }
  13352. /* Destroy the font */
  13353. _XftFontDestroy(tls, dpy, public)
  13354. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts--
  13355. }
  13356. }
  13357. func XXftFontClose(tls *libc.TLS, dpy uintptr, public uintptr) {
  13358. var font, info, v2 uintptr
  13359. var v1 int32
  13360. _, _, _, _ = font, info, v1, v2
  13361. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  13362. font = public
  13363. v2 = font + 108
  13364. *(*int32)(unsafe.Pointer(v2))--
  13365. v1 = *(*int32)(unsafe.Pointer(v2))
  13366. if v1 != 0 {
  13367. return
  13368. }
  13369. if info != 0 {
  13370. (*TXftDisplayInfo)(unsafe.Pointer(info)).Fnum_unref_fonts++
  13371. XXftFontManageMemory(tls, dpy)
  13372. } else {
  13373. _XftFontDestroy(tls, dpy, public)
  13374. }
  13375. }
  13376. func XXftInitFtLibrary(tls *libc.TLS) (r TFcBool) {
  13377. if X_XftFTlibrary != 0 {
  13378. return int32(m_FcTrue)
  13379. }
  13380. if libfreetype.XFT_Init_FreeType(tls, uintptr(unsafe.Pointer(&X_XftFTlibrary))) != 0 {
  13381. return m_FcFalse
  13382. }
  13383. return int32(m_FcTrue)
  13384. }
  13385. const m_FT_LCD_FILTER_FIVE_TAPS = 5
  13386. const m_FT_LOAD_DEFAULT2 = 0x0
  13387. const m_FT_PARAM_TAG_IGNORE_PREFERRED_FAMILY = "FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_FAMILY"
  13388. const m_FT_PARAM_TAG_IGNORE_PREFERRED_SUBFAMILY = "FT_PARAM_TAG_IGNORE_TYPOGRAPHIC_SUBFAMILY"
  13389. const m_ft_glyph_bbox_gridfit = "FT_GLYPH_BBOX_GRIDFIT"
  13390. const m_ft_glyph_bbox_pixels = "FT_GLYPH_BBOX_PIXELS"
  13391. const m_ft_glyph_bbox_subpixels = "FT_GLYPH_BBOX_SUBPIXELS"
  13392. const m_ft_glyph_bbox_truncate = "FT_GLYPH_BBOX_TRUNCATE"
  13393. const m_ft_glyph_bbox_unscaled = "FT_GLYPH_BBOX_UNSCALED"
  13394. type TFT_Orientation = int32
  13395. type _FT_Orientation_ = int32
  13396. const _FT_ORIENTATION_TRUETYPE = 0
  13397. const _FT_ORIENTATION_POSTSCRIPT = 1
  13398. const _FT_ORIENTATION_FILL_RIGHT = 0
  13399. const _FT_ORIENTATION_FILL_LEFT = 1
  13400. const _FT_ORIENTATION_NONE = 2
  13401. type TFT_LcdFilter = int32
  13402. type _FT_LcdFilter_ = int32
  13403. const _FT_LCD_FILTER_NONE = 0
  13404. const _FT_LCD_FILTER_DEFAULT = 1
  13405. const _FT_LCD_FILTER_LIGHT = 2
  13406. const _FT_LCD_FILTER_LEGACY1 = 3
  13407. const _FT_LCD_FILTER_LEGACY = 16
  13408. const _FT_LCD_FILTER_MAX = 17
  13409. type TFT_LcdFiveTapFilter = [5]TFT_Byte
  13410. type TFT_Glyph = uintptr
  13411. type TFT_GlyphRec_ = struct {
  13412. Flibrary TFT_Library
  13413. Fclazz uintptr
  13414. Fformat TFT_Glyph_Format
  13415. Fadvance TFT_Vector
  13416. }
  13417. type TFT_GlyphRec = struct {
  13418. Flibrary TFT_Library
  13419. Fclazz uintptr
  13420. Fformat TFT_Glyph_Format
  13421. Fadvance TFT_Vector
  13422. }
  13423. type TFT_BitmapGlyph = uintptr
  13424. type TFT_BitmapGlyphRec_ = struct {
  13425. Froot TFT_GlyphRec
  13426. Fleft TFT_Int
  13427. Ftop TFT_Int
  13428. Fbitmap TFT_Bitmap
  13429. }
  13430. type TFT_BitmapGlyphRec = struct {
  13431. Froot TFT_GlyphRec
  13432. Fleft TFT_Int
  13433. Ftop TFT_Int
  13434. Fbitmap TFT_Bitmap
  13435. }
  13436. type TFT_OutlineGlyph = uintptr
  13437. type TFT_OutlineGlyphRec_ = struct {
  13438. Froot TFT_GlyphRec
  13439. Foutline TFT_Outline
  13440. }
  13441. type TFT_OutlineGlyphRec = struct {
  13442. Froot TFT_GlyphRec
  13443. Foutline TFT_Outline
  13444. }
  13445. type TFT_SvgGlyph = uintptr
  13446. type TFT_SvgGlyphRec_ = struct {
  13447. Froot TFT_GlyphRec
  13448. Fsvg_document uintptr
  13449. Fsvg_document_length TFT_ULong
  13450. Fglyph_index TFT_UInt
  13451. Fmetrics TFT_Size_Metrics
  13452. Funits_per_EM TFT_UShort
  13453. Fstart_glyph_id TFT_UShort
  13454. Fend_glyph_id TFT_UShort
  13455. Ftransform TFT_Matrix
  13456. Fdelta TFT_Vector
  13457. }
  13458. type TFT_SvgGlyphRec = struct {
  13459. Froot TFT_GlyphRec
  13460. Fsvg_document uintptr
  13461. Fsvg_document_length TFT_ULong
  13462. Fglyph_index TFT_UInt
  13463. Fmetrics TFT_Size_Metrics
  13464. Funits_per_EM TFT_UShort
  13465. Fstart_glyph_id TFT_UShort
  13466. Fend_glyph_id TFT_UShort
  13467. Ftransform TFT_Matrix
  13468. Fdelta TFT_Vector
  13469. }
  13470. type TFT_Glyph_BBox_Mode = int32
  13471. type _FT_Glyph_BBox_Mode_ = int32
  13472. const _FT_GLYPH_BBOX_UNSCALED = 0
  13473. const _FT_GLYPH_BBOX_SUBPIXELS = 0
  13474. const _FT_GLYPH_BBOX_GRIDFIT = 1
  13475. const _FT_GLYPH_BBOX_TRUNCATE = 2
  13476. const _FT_GLYPH_BBOX_PIXELS = 3
  13477. /* */
  13478. /* END */
  13479. /* Local Variables: */
  13480. /* coding: utf-8 */
  13481. /* End: */
  13482. type Tm3x3 = [3][3]float64
  13483. func _m3x3_uniform(tls *libc.TLS, m uintptr) {
  13484. var v1, v2, v3, v4, v5, v6, v7 float64
  13485. _, _, _, _, _, _, _ = v1, v2, v3, v4, v5, v6, v7
  13486. v2 = libc.Float64FromFloat64(1)
  13487. *(*float64)(unsafe.Pointer(m + 2*24 + 2*8)) = v2
  13488. v1 = v2
  13489. *(*float64)(unsafe.Pointer(m + 1*24 + 1*8)) = v1
  13490. *(*float64)(unsafe.Pointer(m)) = v1
  13491. v7 = libc.Float64FromInt32(0)
  13492. *(*float64)(unsafe.Pointer(m + 2*24 + 1*8)) = v7
  13493. v6 = v7
  13494. *(*float64)(unsafe.Pointer(m + 2*24)) = v6
  13495. v5 = v6
  13496. *(*float64)(unsafe.Pointer(m + 1*24 + 2*8)) = v5
  13497. v4 = v5
  13498. *(*float64)(unsafe.Pointer(m + 2*8)) = v4
  13499. v3 = v4
  13500. *(*float64)(unsafe.Pointer(m + 1*24)) = v3
  13501. *(*float64)(unsafe.Pointer(m + 1*8)) = v3
  13502. }
  13503. func _m3x3_transform(tls *libc.TLS, v uintptr, m uintptr) {
  13504. var x, y float64
  13505. _, _ = x, y
  13506. x = float64((*TFT_Vector)(unsafe.Pointer(v)).Fx)
  13507. y = float64((*TFT_Vector)(unsafe.Pointer(v)).Fy)
  13508. (*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))
  13509. (*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))
  13510. }
  13511. func _m3x3_invert(tls *libc.TLS, m uintptr, mi uintptr) {
  13512. var det float64
  13513. _ = det
  13514. 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)))))
  13515. 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)))))
  13516. 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)))))
  13517. det = float64(1) / det
  13518. *(*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)))))
  13519. *(*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)))))
  13520. *(*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)))))
  13521. *(*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)))))
  13522. *(*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)))))
  13523. *(*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)))))
  13524. *(*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)))))
  13525. *(*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)))))
  13526. *(*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)))))
  13527. }
  13528. /*
  13529. * Validate the memory info for a font
  13530. */
  13531. func __XftFontValidateMemory(tls *libc.TLS, dpy uintptr, public uintptr) {
  13532. bp := tls.Alloc(32)
  13533. defer tls.Free(32)
  13534. var font, xftg uintptr
  13535. var glyph_memory uint32
  13536. var glyphindex TFT_UInt
  13537. _, _, _, _ = font, glyph_memory, glyphindex, xftg
  13538. font = public
  13539. glyph_memory = uint32(0)
  13540. glyphindex = uint32(0)
  13541. for {
  13542. if !(glyphindex < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  13543. break
  13544. }
  13545. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*4))
  13546. if xftg != 0 {
  13547. glyph_memory += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  13548. }
  13549. goto _1
  13550. _1:
  13551. ;
  13552. glyphindex++
  13553. }
  13554. if glyph_memory != (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory {
  13555. libc.Xprintf(tls, __ccgo_ts+1452, libc.VaList(bp+8, (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory, glyph_memory))
  13556. }
  13557. }
  13558. // C documentation
  13559. //
  13560. // /*
  13561. // * Validate the glyph usage-links for a font.
  13562. // */
  13563. func __XftValidateGlyphUsage(tls *libc.TLS, font uintptr) {
  13564. bp := tls.Alloc(32)
  13565. defer tls.Free(32)
  13566. var forward, next, reverse, v2, v4 TFT_UInt
  13567. var x1st, xuse uintptr
  13568. _, _, _, _, _, _, _ = forward, next, reverse, x1st, xuse, v2, v4
  13569. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest != uint32(0xffffffff) {
  13570. x1st = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnewest)*4))
  13571. xuse = x1st
  13572. forward = uint32(1)
  13573. next = (*TXftGlyphUsage)(unsafe.Pointer(x1st)).Fnewer
  13574. for {
  13575. if !(xuse != libc.UintptrFromInt32(0) && next != (*TXftFontInt)(unsafe.Pointer(font)).Fnewest) {
  13576. break
  13577. }
  13578. if next >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs {
  13579. libc.Xprintf(tls, __ccgo_ts+1511, libc.VaList(bp+8, next))
  13580. break
  13581. }
  13582. forward++
  13583. v2 = forward
  13584. if v2 > (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse {
  13585. libc.Xprintf(tls, __ccgo_ts+1534, libc.VaList(bp+8, forward, (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse))
  13586. if forward > (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse+uint32(10) {
  13587. break
  13588. }
  13589. }
  13590. xuse = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(next)*4))
  13591. goto _1
  13592. _1:
  13593. ;
  13594. next = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer
  13595. }
  13596. if forward < (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse {
  13597. libc.Xprintf(tls, __ccgo_ts+1574, libc.VaList(bp+8, forward, (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse))
  13598. }
  13599. reverse = uint32(1)
  13600. next = (*TXftGlyphUsage)(unsafe.Pointer(x1st)).Folder
  13601. for {
  13602. if !(xuse != libc.UintptrFromInt32(0) && next != (*TXftFontInt)(unsafe.Pointer(font)).Fnewest) {
  13603. break
  13604. }
  13605. if next >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs {
  13606. libc.Xprintf(tls, __ccgo_ts+1613, libc.VaList(bp+8, next))
  13607. break
  13608. }
  13609. reverse++
  13610. v4 = reverse
  13611. if v4 > (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse {
  13612. libc.Xprintf(tls, __ccgo_ts+1534, libc.VaList(bp+8, reverse, (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse))
  13613. if reverse > (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse+uint32(10) {
  13614. break
  13615. }
  13616. }
  13617. xuse = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(next)*4))
  13618. goto _3
  13619. _3:
  13620. ;
  13621. next = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder
  13622. }
  13623. if reverse < (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse {
  13624. libc.Xprintf(tls, __ccgo_ts+1574, libc.VaList(bp+8, reverse, (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse))
  13625. }
  13626. if forward != reverse {
  13627. libc.Xprintf(tls, __ccgo_ts+1635, libc.VaList(bp+8, forward, reverse))
  13628. libc.Xexit(tls, int32(1))
  13629. }
  13630. }
  13631. }
  13632. // C documentation
  13633. //
  13634. // /* we sometimes need to convert the glyph bitmap in a FT_GlyphSlot
  13635. // * into a different format. For example, we want to convert a
  13636. // * FT_PIXEL_MODE_LCD or FT_PIXEL_MODE_LCD_V bitmap into a 32-bit
  13637. // * ARGB or ABGR bitmap.
  13638. // *
  13639. // * this function prepares a target descriptor for this operation.
  13640. // *
  13641. // * input :: target bitmap descriptor. The function will set its
  13642. // * 'width', 'rows' and 'pitch' fields, and only these
  13643. // *
  13644. // * slot :: the glyph slot containing the source bitmap. this
  13645. // * function assumes that slot->format == FT_GLYPH_FORMAT_BITMAP
  13646. // *
  13647. // * mode :: the requested final rendering mode. supported values are
  13648. // * MONO, NORMAL (i.e. gray), LCD and LCD_V
  13649. // *
  13650. // * the function returns the size in bytes of the corresponding buffer,
  13651. // * it's up to the caller to allocate the corresponding memory block
  13652. // * before calling _fill_xrender_bitmap
  13653. // *
  13654. // * it also returns -1 in case of error (e.g. incompatible arguments,
  13655. // * like trying to convert a gray bitmap into a monochrome one)
  13656. // */
  13657. func __compute_xrender_bitmap_size(tls *libc.TLS, target uintptr, slot TFT_GlyphSlot, mode TFT_Render_Mode, matrix uintptr, m uintptr) (r int32) {
  13658. bp := tls.Alloc(48)
  13659. defer tls.Free(48)
  13660. var bottom, height, left, pitch, right, top, width, xc, yc, v1, v2, v3, v6, v7 int32
  13661. var ftbit uintptr
  13662. var v10 float64
  13663. var v8 TFT_Fixed
  13664. var v9 TFT_Pos
  13665. var _ /* inverse at bp+16 */ TFT_Matrix
  13666. var _ /* mirror at bp+0 */ TFT_Matrix
  13667. var _ /* vector at bp+32 */ TFT_Vector
  13668. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = bottom, ftbit, height, left, pitch, right, top, width, xc, yc, v1, v10, v2, v3, v6, v7, v8, v9
  13669. if (*TFT_GlyphSlotRec_)(unsafe.Pointer(slot)).Fformat != int32(_FT_GLYPH_FORMAT_BITMAP) {
  13670. return -int32(1)
  13671. }
  13672. /* compute the size of the final bitmap */
  13673. ftbit = slot + 76
  13674. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fwidth)
  13675. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows)
  13676. if matrix != 0 && mode == int32(_FT_RENDER_MODE_NORMAL) {
  13677. v3 = libc.Int32FromInt32(0)
  13678. bottom = v3
  13679. v2 = v3
  13680. top = v2
  13681. v1 = v2
  13682. right = v1
  13683. left = v1
  13684. xc = 0
  13685. for {
  13686. if !(xc <= int32(1)) {
  13687. break
  13688. }
  13689. yc = 0
  13690. for {
  13691. if !(yc <= int32(1)) {
  13692. break
  13693. }
  13694. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx = xc * width
  13695. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy = yc * height
  13696. libfreetype.XFT_Vector_Transform(tls, bp+32, matrix)
  13697. if xc == 0 && yc == 0 {
  13698. v6 = (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx
  13699. right = v6
  13700. left = v6
  13701. v7 = (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy
  13702. bottom = v7
  13703. top = v7
  13704. } else {
  13705. if left > (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx {
  13706. left = (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx
  13707. }
  13708. if right < (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx {
  13709. right = (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx
  13710. }
  13711. if bottom > (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy {
  13712. bottom = (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy
  13713. }
  13714. if top < (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy {
  13715. top = (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy
  13716. }
  13717. }
  13718. goto _5
  13719. _5:
  13720. ;
  13721. yc++
  13722. }
  13723. goto _4
  13724. _4:
  13725. ;
  13726. xc++
  13727. }
  13728. width = right - left
  13729. height = top - bottom
  13730. (*(*TFT_Matrix)(unsafe.Pointer(bp))).Fxx = int32(+libc.Int32FromInt32(0x10000))
  13731. (*(*TFT_Matrix)(unsafe.Pointer(bp))).Fyy = -int32(0x10000)
  13732. v8 = libc.Int32FromInt32(0)
  13733. (*(*TFT_Matrix)(unsafe.Pointer(bp))).Fyx = v8
  13734. (*(*TFT_Matrix)(unsafe.Pointer(bp))).Fxy = v8
  13735. *(*TFT_Matrix)(unsafe.Pointer(bp + 16)) = *(*TFT_Matrix)(unsafe.Pointer(matrix))
  13736. libfreetype.XFT_Matrix_Multiply(tls, bp, bp+16)
  13737. libfreetype.XFT_Matrix_Invert(tls, bp+16)
  13738. libfreetype.XFT_Matrix_Multiply(tls, bp, bp+16)
  13739. v9 = libc.Int32FromInt32(0)
  13740. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy = v9
  13741. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx = v9
  13742. libfreetype.XFT_Vector_Transform(tls, bp+32, bp+16)
  13743. left = (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx
  13744. bottom = (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy
  13745. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx = width
  13746. (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy = height
  13747. libfreetype.XFT_Vector_Transform(tls, bp+32, bp+16)
  13748. right = (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fx
  13749. top = (*(*TFT_Vector)(unsafe.Pointer(bp + 32))).Fy
  13750. left = right - left - libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fwidth)
  13751. bottom = top - bottom - libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows)
  13752. *(*float64)(unsafe.Pointer(m)) = float64((*(*TFT_Matrix)(unsafe.Pointer(bp + 16))).Fxx) / libc.Float64FromInt32(0x10000)
  13753. *(*float64)(unsafe.Pointer(m + 1*8)) = float64((*(*TFT_Matrix)(unsafe.Pointer(bp + 16))).Fxy) / libc.Float64FromInt32(0x10000)
  13754. *(*float64)(unsafe.Pointer(m + 1*24)) = float64((*(*TFT_Matrix)(unsafe.Pointer(bp + 16))).Fyx) / libc.Float64FromInt32(0x10000)
  13755. *(*float64)(unsafe.Pointer(m + 1*24 + 1*8)) = float64((*(*TFT_Matrix)(unsafe.Pointer(bp + 16))).Fyy) / libc.Float64FromInt32(0x10000)
  13756. *(*float64)(unsafe.Pointer(m + 2*8)) = float64(-left) / libc.Float64FromInt32(2)
  13757. *(*float64)(unsafe.Pointer(m + 1*24 + 2*8)) = float64(-bottom) / libc.Float64FromInt32(2)
  13758. v10 = libc.Float64FromFloat64(0)
  13759. *(*float64)(unsafe.Pointer(m + 2*24 + 1*8)) = v10
  13760. *(*float64)(unsafe.Pointer(m + 2*24)) = v10
  13761. *(*float64)(unsafe.Pointer(m + 2*24 + 2*8)) = float64(1)
  13762. }
  13763. pitch = (width + int32(3)) & ^libc.Int32FromInt32(3)
  13764. switch libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpixel_mode) {
  13765. case int32(_FT_PIXEL_MODE_MONO):
  13766. if mode == int32(_FT_RENDER_MODE_MONO) {
  13767. pitch = (width + int32(31)) & ^libc.Int32FromInt32(31) >> int32(3)
  13768. break
  13769. }
  13770. /* fall-through */
  13771. fallthrough
  13772. case int32(_FT_PIXEL_MODE_GRAY):
  13773. if mode == int32(_FT_RENDER_MODE_LCD) || mode == int32(_FT_RENDER_MODE_LCD_V) {
  13774. /* each pixel is replicated into a 32-bit ARGB value */
  13775. pitch = width * int32(4)
  13776. }
  13777. case int32(_FT_PIXEL_MODE_BGRA):
  13778. pitch = width * int32(4)
  13779. case int32(_FT_PIXEL_MODE_LCD):
  13780. if mode != int32(_FT_RENDER_MODE_LCD) {
  13781. return -int32(1)
  13782. }
  13783. /* horz pixel triplets are packed into 32-bit ARGB values */
  13784. width /= int32(3)
  13785. pitch = width * int32(4)
  13786. case int32(_FT_PIXEL_MODE_LCD_V):
  13787. if mode != int32(_FT_RENDER_MODE_LCD_V) {
  13788. return -int32(1)
  13789. }
  13790. /* vert pixel triplets are packed into 32-bit ARGB values */
  13791. height /= int32(3)
  13792. pitch = width * int32(4)
  13793. default: /* unsupported source format */
  13794. return -int32(1)
  13795. }
  13796. (*TFT_Bitmap)(unsafe.Pointer(target)).Fwidth = libc.Uint32FromInt32(width)
  13797. (*TFT_Bitmap)(unsafe.Pointer(target)).Frows = libc.Uint32FromInt32(height)
  13798. (*TFT_Bitmap)(unsafe.Pointer(target)).Fpitch = pitch
  13799. (*TFT_Bitmap)(unsafe.Pointer(target)).Fbuffer = libc.UintptrFromInt32(0)
  13800. return pitch * height
  13801. }
  13802. // C documentation
  13803. //
  13804. // /* this functions converts the glyph bitmap found in a FT_GlyphSlot
  13805. // * into a different format while scaling by applying the given matrix
  13806. // * (see _compute_xrender_bitmap_size)
  13807. // *
  13808. // * you should call this function after _compute_xrender_bitmap_size
  13809. // *
  13810. // * target :: target bitmap descriptor. Note that its 'buffer' pointer
  13811. // * must point to memory allocated by the caller
  13812. // *
  13813. // * source :: the source bitmap descriptor
  13814. // *
  13815. // * matrix :: the scaling matrix to apply
  13816. // */
  13817. func __scaled_fill_xrender_bitmap(tls *libc.TLS, target uintptr, source uintptr, m uintptr) {
  13818. bp := tls.Alloc(32)
  13819. defer tls.Free(32)
  13820. var dst_line, src, src_buf uintptr
  13821. var height, i, pitch, sample_count, sample_x, sample_y, sampling_height, sampling_width, src_pitch, src_x, src_y, width, x, y int32
  13822. var _ /* bgra at bp+16 */ [4]int32
  13823. var _ /* vector at bp+0 */ TFT_Vector
  13824. var _ /* vector0 at bp+8 */ TFT_Vector
  13825. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  13826. src_buf = (*TFT_Bitmap)(unsafe.Pointer(source)).Fbuffer
  13827. dst_line = (*TFT_Bitmap)(unsafe.Pointer(target)).Fbuffer
  13828. src_pitch = (*TFT_Bitmap)(unsafe.Pointer(source)).Fpitch
  13829. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Fwidth)
  13830. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Frows)
  13831. pitch = (*TFT_Bitmap)(unsafe.Pointer(target)).Fpitch
  13832. if src_pitch < 0 {
  13833. src_buf -= uintptr(libc.Uint32FromInt32(src_pitch) * ((*TFT_Bitmap)(unsafe.Pointer(source)).Frows - libc.Uint32FromInt32(1)))
  13834. }
  13835. /* compute how many source pixels a target pixel spans */
  13836. (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx = int32(1)
  13837. (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy = int32(1)
  13838. _m3x3_transform(tls, bp, m)
  13839. (*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fx = 0
  13840. (*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fy = 0
  13841. _m3x3_transform(tls, bp+8, m)
  13842. sampling_width = int32(((*(*TFT_Vector)(unsafe.Pointer(bp))).Fx - (*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fx) / libc.Int32FromInt32(2))
  13843. sampling_height = int32(((*(*TFT_Vector)(unsafe.Pointer(bp))).Fy - (*(*TFT_Vector)(unsafe.Pointer(bp + 8))).Fy) / libc.Int32FromInt32(2))
  13844. if sampling_width < 0 {
  13845. sampling_width = -sampling_width
  13846. }
  13847. if sampling_height < 0 {
  13848. sampling_height = -sampling_height
  13849. }
  13850. sample_count = (int32(2)*sampling_width + int32(1)) * (int32(2)*sampling_height + int32(1))
  13851. y = height
  13852. for {
  13853. if !(y > 0) {
  13854. break
  13855. }
  13856. x = 0
  13857. for {
  13858. if !(x < width) {
  13859. break
  13860. }
  13861. /* compute target pixel location in source space */
  13862. (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx = x
  13863. (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy = height - y
  13864. _m3x3_transform(tls, bp, m)
  13865. if libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(source)).Fpixel_mode) == int32(_FT_PIXEL_MODE_BGRA) {
  13866. 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)) {
  13867. goto _2
  13868. }
  13869. 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)) {
  13870. goto _2
  13871. }
  13872. } else {
  13873. if (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx < 0 || libc.Uint32FromInt32((*(*TFT_Vector)(unsafe.Pointer(bp))).Fx) >= (*TFT_Bitmap)(unsafe.Pointer(source)).Fwidth {
  13874. goto _2
  13875. }
  13876. if (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy < 0 || libc.Uint32FromInt32((*(*TFT_Vector)(unsafe.Pointer(bp))).Fy) >= (*TFT_Bitmap)(unsafe.Pointer(source)).Frows {
  13877. goto _2
  13878. }
  13879. }
  13880. switch libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(source)).Fpixel_mode) {
  13881. case int32(_FT_PIXEL_MODE_MONO): /* convert mono to 8-bit gray, scale using nearest pixel */
  13882. src = src_buf + uintptr((*(*TFT_Vector)(unsafe.Pointer(bp))).Fy*src_pitch)
  13883. 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 {
  13884. *(*uint8)(unsafe.Pointer(dst_line + uintptr(x))) = uint8(0xff)
  13885. }
  13886. case int32(_FT_PIXEL_MODE_GRAY): /* scale using nearest pixel */
  13887. src = src_buf + uintptr((*(*TFT_Vector)(unsafe.Pointer(bp))).Fy*src_pitch)
  13888. *(*uint8)(unsafe.Pointer(dst_line + uintptr(x))) = *(*uint8)(unsafe.Pointer(src + uintptr((*(*TFT_Vector)(unsafe.Pointer(bp))).Fx)))
  13889. case int32(_FT_PIXEL_MODE_BGRA): /* scale by averaging all relevant source pixels, keep BGRA format */
  13890. *(*[4]int32)(unsafe.Pointer(bp + 16)) = [4]int32{}
  13891. sample_y = -sampling_height
  13892. for {
  13893. if !(sample_y < sampling_height+int32(1)) {
  13894. break
  13895. }
  13896. src_y = (*(*TFT_Vector)(unsafe.Pointer(bp))).Fy + sample_y
  13897. if src_y < 0 || libc.Uint32FromInt32(src_y) >= (*TFT_Bitmap)(unsafe.Pointer(source)).Frows {
  13898. goto _3
  13899. }
  13900. src = src_buf + uintptr(src_y*src_pitch)
  13901. sample_x = -sampling_width
  13902. for {
  13903. if !(sample_x < sampling_width+int32(1)) {
  13904. break
  13905. }
  13906. src_x = (*(*TFT_Vector)(unsafe.Pointer(bp))).Fx + sample_x
  13907. if src_x < 0 || libc.Uint32FromInt32(src_x) >= (*TFT_Bitmap)(unsafe.Pointer(source)).Fwidth {
  13908. goto _4
  13909. }
  13910. i = 0
  13911. for {
  13912. if !(i < int32(4)) {
  13913. break
  13914. }
  13915. *(*int32)(unsafe.Pointer(bp + 16 + uintptr(i)*4)) += libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(src + uintptr(src_x*int32(4)+i))))
  13916. goto _5
  13917. _5:
  13918. ;
  13919. i++
  13920. }
  13921. goto _4
  13922. _4:
  13923. ;
  13924. sample_x++
  13925. }
  13926. goto _3
  13927. _3:
  13928. ;
  13929. sample_y++
  13930. }
  13931. i = 0
  13932. for {
  13933. if !(i < int32(4)) {
  13934. break
  13935. }
  13936. *(*uint8)(unsafe.Pointer(dst_line + uintptr(int32(4)*x+i))) = libc.Uint8FromInt32((*(*[4]int32)(unsafe.Pointer(bp + 16)))[i] / sample_count)
  13937. goto _6
  13938. _6:
  13939. ;
  13940. i++
  13941. }
  13942. break
  13943. }
  13944. goto _2
  13945. _2:
  13946. ;
  13947. x++
  13948. }
  13949. goto _1
  13950. _1:
  13951. ;
  13952. y--
  13953. dst_line += uintptr(pitch)
  13954. }
  13955. }
  13956. // C documentation
  13957. //
  13958. // /* this functions converts the glyph bitmap found in a FT_GlyphSlot
  13959. // * into a different format (see _compute_xrender_bitmap_size)
  13960. // *
  13961. // * you should call this function after _compute_xrender_bitmap_size
  13962. // *
  13963. // * target :: target bitmap descriptor. Note that its 'buffer' pointer
  13964. // * must point to memory allocated by the caller
  13965. // *
  13966. // * slot :: the glyph slot containing the source bitmap
  13967. // *
  13968. // * mode :: the requested final rendering mode
  13969. // *
  13970. // * bgr :: boolean, set if BGR or VBGR pixel ordering is needed
  13971. // */
  13972. func __fill_xrender_bitmap(tls *libc.TLS, target uintptr, slot TFT_GlyphSlot, mode TFT_Render_Mode, bgr int32) {
  13973. var bytes, h, height, pitch, src_pitch, subpixel, width, x, x1, x2, x3, x4, x5, x6 int32
  13974. var dst, dst1, dst2, dst3, dst4, dstLine, ftbit, src, src1, src2, src3, srcLine uintptr
  13975. var pix, pix1, pix2, pix3, pix4 uint32
  13976. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  13977. ftbit = slot + 76
  13978. srcLine = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fbuffer
  13979. dstLine = (*TFT_Bitmap)(unsafe.Pointer(target)).Fbuffer
  13980. src_pitch = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch
  13981. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Fwidth)
  13982. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(target)).Frows)
  13983. pitch = (*TFT_Bitmap)(unsafe.Pointer(target)).Fpitch
  13984. subpixel = libc.BoolInt32(mode == int32(_FT_RENDER_MODE_LCD) || mode == int32(_FT_RENDER_MODE_LCD_V))
  13985. if src_pitch < 0 {
  13986. srcLine -= uintptr(libc.Uint32FromInt32(src_pitch) * ((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows - libc.Uint32FromInt32(1)))
  13987. }
  13988. switch libc.Int32FromUint8((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpixel_mode) {
  13989. case int32(_FT_PIXEL_MODE_MONO):
  13990. goto _1
  13991. case int32(_FT_PIXEL_MODE_GRAY):
  13992. goto _2
  13993. case int32(_FT_PIXEL_MODE_BGRA):
  13994. goto _3
  13995. case int32(_FT_PIXEL_MODE_LCD):
  13996. goto _4
  13997. default:
  13998. goto _5
  13999. }
  14000. goto _6
  14001. _1:
  14002. ;
  14003. if subpixel != 0 { /* convert mono to ARGB32 values */
  14004. h = height
  14005. for {
  14006. if !(h > 0) {
  14007. break
  14008. }
  14009. x = 0
  14010. for {
  14011. if !(x < width) {
  14012. break
  14013. }
  14014. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x>>libc.Int32FromInt32(3)))))&(int32(0x80)>>(x&int32(7))) != 0 {
  14015. *(*uint32)(unsafe.Pointer(dstLine + uintptr(x)*4)) = uint32(0xffffffff)
  14016. }
  14017. goto _8
  14018. _8:
  14019. ;
  14020. x++
  14021. }
  14022. goto _7
  14023. _7:
  14024. ;
  14025. h--
  14026. srcLine += uintptr(src_pitch)
  14027. dstLine += uintptr(pitch)
  14028. }
  14029. } else {
  14030. if mode == int32(_FT_RENDER_MODE_NORMAL) { /* convert mono to 8-bit gray */
  14031. h = height
  14032. for {
  14033. if !(h > 0) {
  14034. break
  14035. }
  14036. x1 = 0
  14037. for {
  14038. if !(x1 < width) {
  14039. break
  14040. }
  14041. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x1>>libc.Int32FromInt32(3)))))&(int32(0x80)>>(x1&int32(7))) != 0 {
  14042. *(*uint8)(unsafe.Pointer(dstLine + uintptr(x1))) = uint8(0xff)
  14043. }
  14044. goto _10
  14045. _10:
  14046. ;
  14047. x1++
  14048. }
  14049. goto _9
  14050. _9:
  14051. ;
  14052. h--
  14053. srcLine += uintptr(src_pitch)
  14054. dstLine += uintptr(pitch)
  14055. }
  14056. } else { /* copy mono to mono */
  14057. bytes = (width + int32(7)) >> int32(3)
  14058. h = height
  14059. for {
  14060. if !(h > 0) {
  14061. break
  14062. }
  14063. libc.Xmemcpy(tls, dstLine, srcLine, libc.Uint32FromInt32(bytes))
  14064. goto _11
  14065. _11:
  14066. ;
  14067. h--
  14068. srcLine += uintptr(src_pitch)
  14069. dstLine += uintptr(pitch)
  14070. }
  14071. }
  14072. }
  14073. goto _6
  14074. _2:
  14075. ;
  14076. if subpixel != 0 { /* convert gray to ARGB32 values */
  14077. h = height
  14078. for {
  14079. if !(h > 0) {
  14080. break
  14081. }
  14082. dst = dstLine
  14083. x2 = 0
  14084. for {
  14085. if !(x2 < width) {
  14086. break
  14087. }
  14088. pix = uint32(*(*uint8)(unsafe.Pointer(srcLine + uintptr(x2))))
  14089. pix |= pix << int32(8)
  14090. pix |= pix << int32(16)
  14091. *(*uint32)(unsafe.Pointer(dst + uintptr(x2)*4)) = pix
  14092. goto _13
  14093. _13:
  14094. ;
  14095. x2++
  14096. }
  14097. goto _12
  14098. _12:
  14099. ;
  14100. h--
  14101. srcLine += uintptr(src_pitch)
  14102. dstLine += uintptr(pitch)
  14103. }
  14104. } else { /* copy gray into gray */
  14105. h = height
  14106. for {
  14107. if !(h > 0) {
  14108. break
  14109. }
  14110. libc.Xmemcpy(tls, dstLine, srcLine, libc.Uint32FromInt32(width))
  14111. goto _14
  14112. _14:
  14113. ;
  14114. h--
  14115. srcLine += uintptr(src_pitch)
  14116. dstLine += uintptr(pitch)
  14117. }
  14118. }
  14119. goto _6
  14120. _3:
  14121. ; /* Preserve BGRA format */
  14122. h = height
  14123. _17:
  14124. ;
  14125. if !(h > 0) {
  14126. goto _15
  14127. }
  14128. libc.Xmemcpy(tls, dstLine, srcLine, libc.Uint32FromInt32(width)*uint32(4))
  14129. goto _16
  14130. _16:
  14131. ;
  14132. h--
  14133. srcLine += uintptr(src_pitch)
  14134. dstLine += uintptr(pitch)
  14135. goto _17
  14136. goto _15
  14137. _15:
  14138. ;
  14139. goto _6
  14140. _4:
  14141. ;
  14142. if !(bgr != 0) {
  14143. /* convert horizontal RGB into ARGB32 */
  14144. h = height
  14145. for {
  14146. if !(h > 0) {
  14147. break
  14148. }
  14149. src = srcLine
  14150. dst1 = dstLine
  14151. x3 = 0
  14152. for {
  14153. if !(x3 < width) {
  14154. break
  14155. }
  14156. 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)
  14157. *(*uint32)(unsafe.Pointer(dst1 + uintptr(x3)*4)) = pix1
  14158. goto _19
  14159. _19:
  14160. ;
  14161. x3++
  14162. src += uintptr(3)
  14163. }
  14164. goto _18
  14165. _18:
  14166. ;
  14167. h--
  14168. srcLine += uintptr(src_pitch)
  14169. dstLine += uintptr(pitch)
  14170. }
  14171. } else {
  14172. /* convert horizontal BGR into ARGB32 */
  14173. h = height
  14174. for {
  14175. if !(h > 0) {
  14176. break
  14177. }
  14178. src1 = srcLine
  14179. dst2 = dstLine
  14180. x4 = 0
  14181. for {
  14182. if !(x4 < width) {
  14183. break
  14184. }
  14185. 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)
  14186. *(*uint32)(unsafe.Pointer(dst2 + uintptr(x4)*4)) = pix2
  14187. goto _21
  14188. _21:
  14189. ;
  14190. x4++
  14191. src1 += uintptr(3)
  14192. }
  14193. goto _20
  14194. _20:
  14195. ;
  14196. h--
  14197. srcLine += uintptr(src_pitch)
  14198. dstLine += uintptr(pitch)
  14199. }
  14200. }
  14201. goto _6
  14202. _5:
  14203. ; /* FT_PIXEL_MODE_LCD_V */
  14204. /* convert vertical RGB into ARGB32 */
  14205. if !(bgr != 0) {
  14206. h = height
  14207. for {
  14208. if !(h > 0) {
  14209. break
  14210. }
  14211. src2 = srcLine
  14212. dst3 = dstLine
  14213. x5 = 0
  14214. for {
  14215. if !(x5 < width) {
  14216. break
  14217. }
  14218. 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)
  14219. *(*uint32)(unsafe.Pointer(dst3 + uintptr(x5)*4)) = pix3
  14220. goto _23
  14221. _23:
  14222. ;
  14223. x5++
  14224. src2 += uintptr(1)
  14225. }
  14226. goto _22
  14227. _22:
  14228. ;
  14229. h--
  14230. srcLine += uintptr(int32(3) * src_pitch)
  14231. dstLine += uintptr(pitch)
  14232. }
  14233. } else {
  14234. h = height
  14235. for {
  14236. if !(h > 0) {
  14237. break
  14238. }
  14239. src3 = srcLine
  14240. dst4 = dstLine
  14241. x6 = 0
  14242. for {
  14243. if !(x6 < width) {
  14244. break
  14245. }
  14246. 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)
  14247. *(*uint32)(unsafe.Pointer(dst4 + uintptr(x6)*4)) = pix4
  14248. goto _25
  14249. _25:
  14250. ;
  14251. x6++
  14252. src3 += uintptr(1)
  14253. }
  14254. goto _24
  14255. _24:
  14256. ;
  14257. h--
  14258. srcLine += uintptr(int32(3) * src_pitch)
  14259. dstLine += uintptr(pitch)
  14260. }
  14261. }
  14262. _6:
  14263. }
  14264. func XXftFontLoadGlyphs(tls *libc.TLS, dpy uintptr, pub uintptr, need_bitmaps TFcBool, glyphs uintptr, nglyph int32) {
  14265. bp := tls.Alloc(4464)
  14266. defer tls.Free(4464)
  14267. 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
  14268. var bufBitmap, font, ftbit, info, line, line1, xftg, xnew, xold, xuse, v14, v16, v2 uintptr
  14269. var error1 TFT_Error
  14270. var face TFT_Face
  14271. var gc TGC
  14272. var glyph_transform, transform TFcBool
  14273. var glyphindex TFT_UInt
  14274. var glyphslot TFT_GlyphSlot
  14275. var mode TFT_Render_Mode
  14276. var pixmap TPixmap
  14277. var _ /* bufLocal at bp+4 */ [4096]uint8
  14278. var _ /* glyph at bp+0 */ TGlyph
  14279. var _ /* image at bp+4280 */ TXImage
  14280. var _ /* local at bp+4100 */ TFT_Bitmap
  14281. var _ /* m at bp+4136 */ Tm3x3
  14282. var _ /* mi at bp+4208 */ Tm3x3
  14283. var _ /* vector at bp+4128 */ TFT_Vector
  14284. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  14285. info = X_XftDisplayInfoGet(tls, dpy, int32(m_True))
  14286. font = pub
  14287. bufBitmap = bp + 4
  14288. bufSize = int32(4096)
  14289. mode = int32(_FT_RENDER_MODE_MONO)
  14290. if !(info != 0) {
  14291. return
  14292. }
  14293. face = XXftLockFace(tls, font)
  14294. if !(face != 0) {
  14295. return
  14296. }
  14297. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fcolor != 0 {
  14298. mode = int32(_FT_RENDER_MODE_NORMAL)
  14299. }
  14300. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 {
  14301. switch (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Frgba {
  14302. case int32(m_FC_RGBA_RGB):
  14303. fallthrough
  14304. case int32(m_FC_RGBA_BGR):
  14305. mode = int32(_FT_RENDER_MODE_LCD)
  14306. case int32(m_FC_RGBA_VRGB):
  14307. fallthrough
  14308. case int32(m_FC_RGBA_VBGR):
  14309. mode = int32(_FT_RENDER_MODE_LCD_V)
  14310. default:
  14311. mode = int32(_FT_RENDER_MODE_NORMAL)
  14312. }
  14313. }
  14314. transform = libc.BoolInt32((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Ftransform != 0 && mode != int32(_FT_RENDER_MODE_MONO))
  14315. for {
  14316. v1 = nglyph
  14317. nglyph--
  14318. if !(v1 != 0) {
  14319. break
  14320. }
  14321. v2 = glyphs
  14322. glyphs += 4
  14323. glyphindex = *(*TFT_UInt)(unsafe.Pointer(v2))
  14324. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*4))
  14325. if !(xftg != 0) {
  14326. continue
  14327. }
  14328. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  14329. __XftFontValidateMemory(tls, dpy, pub)
  14330. }
  14331. /*
  14332. * Check to see if this glyph has just been loaded,
  14333. * this happens when drawing the same glyph twice
  14334. * in a single string
  14335. */
  14336. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0 {
  14337. continue
  14338. }
  14339. libfreetype.XFT_Library_SetLcdFilter(tls, X_XftFTlibrary, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Flcd_filter)
  14340. error1 = libfreetype.XFT_Load_Glyph(tls, face, glyphindex, (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags)
  14341. if error1 != 0 {
  14342. /*
  14343. * If anti-aliasing or transforming glyphs and
  14344. * no outline version exists, fallback to the
  14345. * bitmap and let things look bad instead of
  14346. * missing the glyph
  14347. */
  14348. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags&(libc.Int32FromInt32(1)<<libc.Int32FromInt32(3)) != 0 {
  14349. error1 = libfreetype.XFT_Load_Glyph(tls, face, glyphindex, int32((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags & ^(libc.Int32FromInt32(1)<<libc.Int32FromInt32(3))))
  14350. }
  14351. if error1 != 0 {
  14352. continue
  14353. }
  14354. }
  14355. glyphslot = (*TFT_FaceRec_)(unsafe.Pointer(face)).Fglyph
  14356. /*
  14357. * Embolden if required
  14358. */
  14359. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fembolden != 0 {
  14360. libfreetype.XFT_GlyphSlot_Embolden(tls, glyphslot)
  14361. }
  14362. /*
  14363. * Compute glyph metrics from FreeType information
  14364. */
  14365. if transform != 0 {
  14366. v5 = libc.Int32FromInt32(0)
  14367. bottom = v5
  14368. v4 = v5
  14369. top = v4
  14370. v3 = v4
  14371. right = v3
  14372. left = v3
  14373. xc = 0
  14374. for {
  14375. if !(xc <= int32(1)) {
  14376. break
  14377. }
  14378. yc = 0
  14379. for {
  14380. if !(yc <= int32(1)) {
  14381. break
  14382. }
  14383. (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fx = (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX + xc*(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fwidth
  14384. (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fy = (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY - yc*(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fheight
  14385. libfreetype.XFT_Vector_Transform(tls, bp+4128, font+32+36)
  14386. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  14387. 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))
  14388. }
  14389. if xc == 0 && yc == 0 {
  14390. v8 = (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fx
  14391. right = v8
  14392. left = v8
  14393. v9 = (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fy
  14394. bottom = v9
  14395. top = v9
  14396. } else {
  14397. if left > (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fx {
  14398. left = (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fx
  14399. }
  14400. if right < (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fx {
  14401. right = (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fx
  14402. }
  14403. if bottom > (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fy {
  14404. bottom = (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fy
  14405. }
  14406. if top < (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fy {
  14407. top = (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fy
  14408. }
  14409. }
  14410. goto _7
  14411. _7:
  14412. ;
  14413. yc++
  14414. }
  14415. goto _6
  14416. _6:
  14417. ;
  14418. xc++
  14419. }
  14420. left = left & -libc.Int32FromInt32(64)
  14421. right = (right + libc.Int32FromInt32(63)) & -libc.Int32FromInt32(64)
  14422. bottom = bottom & -libc.Int32FromInt32(64)
  14423. top = (top + libc.Int32FromInt32(63)) & -libc.Int32FromInt32(64)
  14424. } else {
  14425. left = (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX & int32(-libc.Int32FromInt32(64))
  14426. right = int32(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingX + (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fwidth + libc.Int32FromInt32(63)) & int32(-libc.Int32FromInt32(64)))
  14427. top = int32(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY + libc.Int32FromInt32(63)) & int32(-libc.Int32FromInt32(64)))
  14428. bottom = ((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.FhoriBearingY - (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fmetrics.Fheight) & int32(-libc.Int32FromInt32(64))
  14429. }
  14430. /*
  14431. * Clip charcell glyphs to the bounding box
  14432. * XXX transformed?
  14433. */
  14434. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fspacing >= int32(m_FC_CHARCELL) && !(transform != 0) {
  14435. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags&(libc.Int32FromInt32(1)<<libc.Int32FromInt32(4)) != 0 {
  14436. if bottom>>int32(6) > (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width {
  14437. adjust = bottom - (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width<<int32(6)
  14438. if adjust > top {
  14439. adjust = top
  14440. }
  14441. top -= adjust
  14442. bottom -= adjust
  14443. }
  14444. } else {
  14445. if right>>int32(6) > (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width {
  14446. adjust1 = right - (*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width<<int32(6)
  14447. if adjust1 > left {
  14448. adjust1 = left
  14449. }
  14450. left -= adjust1
  14451. right -= adjust1
  14452. }
  14453. }
  14454. }
  14455. glyph_transform = transform
  14456. if (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fformat != int32(_FT_GLYPH_FORMAT_BITMAP) {
  14457. error1 = libfreetype.XFT_Render_Glyph(tls, (*TFT_FaceRec_)(unsafe.Pointer(face)).Fglyph, mode)
  14458. if error1 != 0 {
  14459. continue
  14460. }
  14461. glyph_transform = m_False
  14462. }
  14463. libfreetype.XFT_Library_SetLcdFilter(tls, X_XftFTlibrary, int32(_FT_LCD_FILTER_NONE))
  14464. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fspacing >= int32(m_FC_MONO) {
  14465. if transform != 0 {
  14466. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags&(libc.Int32FromInt32(1)<<libc.Int32FromInt32(4)) != 0 {
  14467. (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fx = 0
  14468. (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fy = -(*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  14469. } else {
  14470. (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fx = (*TFT_SizeRec_)(unsafe.Pointer((*TFT_FaceRec_)(unsafe.Pointer(face)).Fsize)).Fmetrics.Fmax_advance
  14471. (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fy = 0
  14472. }
  14473. libfreetype.XFT_Vector_Transform(tls, bp+4128, font+32+36)
  14474. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16(((*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fx + libc.Int32FromInt32(32)) & int32(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6))
  14475. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(((*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fy + libc.Int32FromInt32(32)) & int32(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6))
  14476. } else {
  14477. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fload_flags&(libc.Int32FromInt32(1)<<libc.Int32FromInt32(4)) != 0 {
  14478. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = 0
  14479. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(-(*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width)
  14480. } else {
  14481. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16((*TXftFontInt)(unsafe.Pointer(font)).Fpublic.Fmax_advance_width)
  14482. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = 0
  14483. }
  14484. }
  14485. } else {
  14486. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FxOff = int16(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fadvance.Fx + libc.Int32FromInt32(32)) & int32(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6))
  14487. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.FyOff = int16(-(((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fadvance.Fy + libc.Int32FromInt32(32)) & int32(-libc.Int32FromInt32(64)) >> libc.Int32FromInt32(6)))
  14488. }
  14489. /* compute the size of the final bitmap */
  14490. ftbit = glyphslot + 76
  14491. width = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fwidth)
  14492. height = libc.Int32FromUint32((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Frows)
  14493. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPH) != 0 {
  14494. libc.Xprintf(tls, __ccgo_ts+1686, libc.VaList(bp+4376, libc.Int32FromUint32(glyphindex)))
  14495. 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))
  14496. if XXftDebug(tls)&int32(m_XFT_DBG_GLYPHV) != 0 {
  14497. line = (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fbuffer
  14498. if (*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch < 0 {
  14499. line -= uintptr((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch * (height - int32(1)))
  14500. }
  14501. y = 0
  14502. for {
  14503. if !(y < height) {
  14504. break
  14505. }
  14506. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fantialias != 0 {
  14507. x = 0
  14508. for {
  14509. if !(x < width) {
  14510. break
  14511. }
  14512. libc.Xprintf(tls, __ccgo_ts+1750, libc.VaList(bp+4376, int32(_den[libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(line + uintptr(x))))>>int32(5)])))
  14513. goto _11
  14514. _11:
  14515. ;
  14516. x++
  14517. }
  14518. } else {
  14519. x = 0
  14520. for {
  14521. if !(x < width*int32(8)) {
  14522. break
  14523. }
  14524. if libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(line + uintptr(x>>int32(3)))))&(int32(1)<<(x&int32(7))) != 0 {
  14525. v13 = int32('#')
  14526. } else {
  14527. v13 = int32(' ')
  14528. }
  14529. libc.Xprintf(tls, __ccgo_ts+1750, libc.VaList(bp+4376, v13))
  14530. goto _12
  14531. _12:
  14532. ;
  14533. x++
  14534. }
  14535. }
  14536. libc.Xprintf(tls, __ccgo_ts+1753, 0)
  14537. line += uintptr((*TFT_Bitmap)(unsafe.Pointer(ftbit)).Fpitch)
  14538. goto _10
  14539. _10:
  14540. ;
  14541. y++
  14542. }
  14543. libc.Xprintf(tls, __ccgo_ts+1756, 0)
  14544. }
  14545. }
  14546. _m3x3_uniform(tls, bp+4136)
  14547. if glyph_transform != 0 {
  14548. v14 = font + 32 + 36
  14549. } else {
  14550. v14 = libc.UintptrFromInt32(0)
  14551. }
  14552. size = __compute_xrender_bitmap_size(tls, bp+4100, glyphslot, mode, v14, bp+4136)
  14553. if size < 0 {
  14554. continue
  14555. }
  14556. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fwidth = uint16((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4100))).Fwidth)
  14557. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fheight = uint16((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4100))).Frows)
  14558. if glyph_transform != 0 {
  14559. _m3x3_invert(tls, bp+4136, bp+4208)
  14560. (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fx = -(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_left
  14561. (*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fy = (*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_top
  14562. _m3x3_transform(tls, bp+4128, bp+4208)
  14563. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx = int16((*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fx)
  14564. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy = int16((*(*TFT_Vector)(unsafe.Pointer(bp + 4128))).Fy)
  14565. } else {
  14566. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fx = int16(-(*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_left)
  14567. (*TXftGlyph)(unsafe.Pointer(xftg)).Fmetrics.Fy = int16((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap_top)
  14568. }
  14569. /*
  14570. * If the glyph is relatively large (> 1% of server memory),
  14571. * don't send it until necessary.
  14572. */
  14573. if !(need_bitmaps != 0) && libc.Uint32FromInt32(size) > (*TXftDisplayInfo)(unsafe.Pointer(info)).Fmax_glyph_memory/uint32(100) {
  14574. continue
  14575. }
  14576. /*
  14577. * Make sure there is enough buffer space for the glyph.
  14578. */
  14579. if size > bufSize {
  14580. if bufBitmap != bp+4 {
  14581. libc.Xfree(tls, bufBitmap)
  14582. }
  14583. bufBitmap = libc.Xmalloc(tls, libc.Uint32FromInt32(size))
  14584. if !(bufBitmap != 0) {
  14585. continue
  14586. }
  14587. bufSize = size
  14588. }
  14589. libc.Xmemset(tls, bufBitmap, 0, libc.Uint32FromInt32(size))
  14590. (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4100))).Fbuffer = bufBitmap
  14591. if mode == int32(_FT_RENDER_MODE_NORMAL) && glyph_transform != 0 {
  14592. __scaled_fill_xrender_bitmap(tls, bp+4100, glyphslot+76, bp+4136)
  14593. } else {
  14594. __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)))
  14595. }
  14596. /*
  14597. * Copy or convert into local buffer.
  14598. */
  14599. /*
  14600. * Use the glyph index as the wire encoding; it
  14601. * might be more efficient for some locales to map
  14602. * these by first usage to smaller values, but that
  14603. * would require persistently storing the map when
  14604. * glyphs were freed.
  14605. */
  14606. *(*TGlyph)(unsafe.Pointer(bp)) = glyphindex
  14607. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture != 0 {
  14608. libxrender.XXRenderFreePicture(tls, dpy, (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture)
  14609. (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture = uint32(0)
  14610. }
  14611. (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory = uint32(libc.Uint32FromInt32(size) + (*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph)
  14612. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  14613. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  14614. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = libxrender.XXRenderCreateGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fformat)
  14615. }
  14616. if mode == int32(_FT_RENDER_MODE_MONO) {
  14617. /* swap bits in each byte */
  14618. if (*struct {
  14619. Fext_data uintptr
  14620. Fprivate1 uintptr
  14621. Ffd int32
  14622. Fprivate2 int32
  14623. Fproto_major_version int32
  14624. Fproto_minor_version int32
  14625. Fvendor uintptr
  14626. Fprivate3 TXID
  14627. Fprivate4 TXID
  14628. Fprivate5 TXID
  14629. Fprivate6 int32
  14630. Fresource_alloc uintptr
  14631. Fbyte_order int32
  14632. Fbitmap_unit int32
  14633. Fbitmap_pad int32
  14634. Fbitmap_bit_order int32
  14635. Fnformats int32
  14636. Fpixmap_format uintptr
  14637. Fprivate8 int32
  14638. Frelease int32
  14639. Fprivate9 uintptr
  14640. Fprivate10 uintptr
  14641. Fqlen int32
  14642. Flast_request_read uint32
  14643. Frequest uint32
  14644. Fprivate11 TXPointer
  14645. Fprivate12 TXPointer
  14646. Fprivate13 TXPointer
  14647. Fprivate14 TXPointer
  14648. Fmax_request_size uint32
  14649. Fdb uintptr
  14650. Fprivate15 uintptr
  14651. Fdisplay_name uintptr
  14652. Fdefault_screen int32
  14653. Fnscreens int32
  14654. Fscreens uintptr
  14655. Fmotion_buffer uint32
  14656. Fprivate16 uint32
  14657. Fmin_keycode int32
  14658. Fmax_keycode int32
  14659. Fprivate17 TXPointer
  14660. Fprivate18 TXPointer
  14661. Fprivate19 int32
  14662. Fxdefaults uintptr
  14663. })(unsafe.Pointer(dpy)).Fbitmap_bit_order != int32(m_MSBFirst) {
  14664. line1 = bufBitmap
  14665. i = size
  14666. for {
  14667. v15 = i
  14668. i--
  14669. if !(v15 != 0) {
  14670. break
  14671. }
  14672. c = libc.Int32FromUint8(*(*uint8)(unsafe.Pointer(line1)))
  14673. c = c<<int32(1)&int32(0xaa) | c>>int32(1)&int32(0x55)
  14674. c = c<<int32(2)&int32(0xcc) | c>>int32(2)&int32(0x33)
  14675. c = c<<int32(4)&int32(0xf0) | c>>int32(4)&int32(0x0f)
  14676. v16 = line1
  14677. line1++
  14678. *(*uint8)(unsafe.Pointer(v16)) = libc.Uint8FromInt32(c)
  14679. }
  14680. }
  14681. } else {
  14682. if libc.Int32FromUint8((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap.Fpixel_mode) == int32(_FT_PIXEL_MODE_BGRA) || mode != int32(_FT_RENDER_MODE_NORMAL) {
  14683. /* invert ARGB <=> BGRA */
  14684. if (*struct {
  14685. Fext_data uintptr
  14686. Fprivate1 uintptr
  14687. Ffd int32
  14688. Fprivate2 int32
  14689. Fproto_major_version int32
  14690. Fproto_minor_version int32
  14691. Fvendor uintptr
  14692. Fprivate3 TXID
  14693. Fprivate4 TXID
  14694. Fprivate5 TXID
  14695. Fprivate6 int32
  14696. Fresource_alloc uintptr
  14697. Fbyte_order int32
  14698. Fbitmap_unit int32
  14699. Fbitmap_pad int32
  14700. Fbitmap_bit_order int32
  14701. Fnformats int32
  14702. Fpixmap_format uintptr
  14703. Fprivate8 int32
  14704. Frelease int32
  14705. Fprivate9 uintptr
  14706. Fprivate10 uintptr
  14707. Fqlen int32
  14708. Flast_request_read uint32
  14709. Frequest uint32
  14710. Fprivate11 TXPointer
  14711. Fprivate12 TXPointer
  14712. Fprivate13 TXPointer
  14713. Fprivate14 TXPointer
  14714. Fmax_request_size uint32
  14715. Fdb uintptr
  14716. Fprivate15 uintptr
  14717. Fdisplay_name uintptr
  14718. Fdefault_screen int32
  14719. Fnscreens int32
  14720. Fscreens uintptr
  14721. Fmotion_buffer uint32
  14722. Fprivate16 uint32
  14723. Fmin_keycode int32
  14724. Fmax_keycode int32
  14725. Fprivate17 TXPointer
  14726. Fprivate18 TXPointer
  14727. Fprivate19 int32
  14728. Fxdefaults uintptr
  14729. })(unsafe.Pointer(dpy)).Fbyte_order != XXftNativeByteOrder(tls) {
  14730. XXftSwapCARD32(tls, bufBitmap, size>>int32(2))
  14731. }
  14732. }
  14733. }
  14734. if libc.Int32FromUint8((*TFT_GlyphSlotRec_)(unsafe.Pointer(glyphslot)).Fbitmap.Fpixel_mode) == int32(_FT_PIXEL_MODE_BGRA) {
  14735. pixmap = libx11.XXCreatePixmap(tls, dpy, (*TScreen)(unsafe.Pointer((*struct {
  14736. Fext_data uintptr
  14737. Fprivate1 uintptr
  14738. Ffd int32
  14739. Fprivate2 int32
  14740. Fproto_major_version int32
  14741. Fproto_minor_version int32
  14742. Fvendor uintptr
  14743. Fprivate3 TXID
  14744. Fprivate4 TXID
  14745. Fprivate5 TXID
  14746. Fprivate6 int32
  14747. Fresource_alloc uintptr
  14748. Fbyte_order int32
  14749. Fbitmap_unit int32
  14750. Fbitmap_pad int32
  14751. Fbitmap_bit_order int32
  14752. Fnformats int32
  14753. Fpixmap_format uintptr
  14754. Fprivate8 int32
  14755. Frelease int32
  14756. Fprivate9 uintptr
  14757. Fprivate10 uintptr
  14758. Fqlen int32
  14759. Flast_request_read uint32
  14760. Frequest uint32
  14761. Fprivate11 TXPointer
  14762. Fprivate12 TXPointer
  14763. Fprivate13 TXPointer
  14764. Fprivate14 TXPointer
  14765. Fmax_request_size uint32
  14766. Fdb uintptr
  14767. Fprivate15 uintptr
  14768. Fdisplay_name uintptr
  14769. Fdefault_screen int32
  14770. Fnscreens int32
  14771. Fscreens uintptr
  14772. Fmotion_buffer uint32
  14773. Fprivate16 uint32
  14774. Fmin_keycode int32
  14775. Fmax_keycode int32
  14776. Fprivate17 TXPointer
  14777. Fprivate18 TXPointer
  14778. Fprivate19 int32
  14779. Fxdefaults uintptr
  14780. })(unsafe.Pointer(dpy)).Fscreens+uintptr((*struct {
  14781. Fext_data uintptr
  14782. Fprivate1 uintptr
  14783. Ffd int32
  14784. Fprivate2 int32
  14785. Fproto_major_version int32
  14786. Fproto_minor_version int32
  14787. Fvendor uintptr
  14788. Fprivate3 TXID
  14789. Fprivate4 TXID
  14790. Fprivate5 TXID
  14791. Fprivate6 int32
  14792. Fresource_alloc uintptr
  14793. Fbyte_order int32
  14794. Fbitmap_unit int32
  14795. Fbitmap_pad int32
  14796. Fbitmap_bit_order int32
  14797. Fnformats int32
  14798. Fpixmap_format uintptr
  14799. Fprivate8 int32
  14800. Frelease int32
  14801. Fprivate9 uintptr
  14802. Fprivate10 uintptr
  14803. Fqlen int32
  14804. Flast_request_read uint32
  14805. Frequest uint32
  14806. Fprivate11 TXPointer
  14807. Fprivate12 TXPointer
  14808. Fprivate13 TXPointer
  14809. Fprivate14 TXPointer
  14810. Fmax_request_size uint32
  14811. Fdb uintptr
  14812. Fprivate15 uintptr
  14813. Fdisplay_name uintptr
  14814. Fdefault_screen int32
  14815. Fnscreens int32
  14816. Fscreens uintptr
  14817. Fmotion_buffer uint32
  14818. Fprivate16 uint32
  14819. Fmin_keycode int32
  14820. Fmax_keycode int32
  14821. Fprivate17 TXPointer
  14822. Fprivate18 TXPointer
  14823. Fprivate19 int32
  14824. Fxdefaults uintptr
  14825. })(unsafe.Pointer(dpy)).Fdefault_screen)*80)).Froot, (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4100))).Fwidth, (*(*TFT_Bitmap)(unsafe.Pointer(bp + 4100))).Frows, uint32(32))
  14826. gc = libx11.XXCreateGC(tls, dpy, pixmap, uint32(0), libc.UintptrFromInt32(0))
  14827. *(*TXImage)(unsafe.Pointer(bp + 4280)) = TXImage{
  14828. Fwidth: libc.Int32FromUint32((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4100))).Fwidth),
  14829. Fheight: libc.Int32FromUint32((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4100))).Frows),
  14830. Fformat: int32(m_ZPixmap),
  14831. Fdata: bufBitmap,
  14832. Fbyte_order: (*TDisplay)(unsafe.Pointer(dpy)).Fbyte_order,
  14833. Fbitmap_unit: (*TDisplay)(unsafe.Pointer(dpy)).Fbitmap_unit,
  14834. Fbitmap_bit_order: (*TDisplay)(unsafe.Pointer(dpy)).Fbitmap_bit_order,
  14835. Fbitmap_pad: int32(32),
  14836. Fdepth: int32(32),
  14837. Fbytes_per_line: libc.Int32FromUint32((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4100))).Fwidth*libc.Uint32FromInt32(4) - libc.Uint32FromInt32((*(*TFT_Bitmap)(unsafe.Pointer(bp + 4100))).Fpitch)),
  14838. Fbits_per_pixel: int32(32),
  14839. }
  14840. libx11.XXInitImage(tls, bp+4280)
  14841. 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)
  14842. (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture = libxrender.XXRenderCreatePicture(tls, dpy, pixmap, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, uint32(0), libc.UintptrFromInt32(0))
  14843. libx11.XXFreeGC(tls, dpy, gc)
  14844. libx11.XXFreePixmap(tls, dpy, pixmap)
  14845. /*
  14846. * Record 256 times higher memory pressure for unrotated
  14847. * pictures, and maximum for rotated pictures.
  14848. */
  14849. if (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fmatrix.Fxy != 0 || (*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fmatrix.Fyx != 0 {
  14850. *(*uint32)(unsafe.Pointer(xftg + 16)) += (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory - libc.Uint32FromInt32(size)
  14851. } else {
  14852. *(*uint32)(unsafe.Pointer(xftg + 16)) += uint32(libc.Uint32FromInt32(size) * uint32(255))
  14853. }
  14854. } else {
  14855. libxrender.XXRenderAddGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, xftg, int32(1), bufBitmap, size)
  14856. }
  14857. } else {
  14858. if size != 0 {
  14859. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.Xmalloc(tls, libc.Uint32FromInt32(size))
  14860. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  14861. libc.Xmemcpy(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap, bufBitmap, libc.Uint32FromInt32(size))
  14862. }
  14863. } else {
  14864. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.UintptrFromInt32(0)
  14865. }
  14866. }
  14867. *(*uint32)(unsafe.Pointer(font + 140)) += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14868. *(*uint32)(unsafe.Pointer(info + 32)) += (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14869. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  14870. __XftFontValidateMemory(tls, dpy, pub)
  14871. }
  14872. if XXftDebug(tls)&int32(m_XFT_DBG_CACHEV) != 0 {
  14873. libc.Xprintf(tls, __ccgo_ts+1758, libc.VaList(bp+4376, glyphindex, (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory))
  14874. }
  14875. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  14876. xuse = xftg
  14877. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest == uint32(0xffffffff) {
  14878. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder = glyphindex
  14879. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer = glyphindex
  14880. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  14881. libc.Xprintf(tls, __ccgo_ts+1787, libc.VaList(bp+4376, font, glyphindex, xuse, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer))
  14882. }
  14883. } else {
  14884. xnew = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnewest)*4))
  14885. xold = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xnew)).Fnewer)*4))
  14886. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder = (*TXftFontInt)(unsafe.Pointer(font)).Fnewest
  14887. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer = (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Fnewer
  14888. (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Fnewer = glyphindex
  14889. (*TXftGlyphUsage)(unsafe.Pointer(xold)).Folder = glyphindex
  14890. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  14891. 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))
  14892. }
  14893. }
  14894. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = glyphindex
  14895. (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse++
  14896. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  14897. __XftValidateGlyphUsage(tls, font)
  14898. }
  14899. }
  14900. }
  14901. if bufBitmap != bp+4 {
  14902. libc.Xfree(tls, bufBitmap)
  14903. }
  14904. XXftUnlockFace(tls, font)
  14905. }
  14906. var _den = [9]int8{' ', '.', ':', ';', '=', '+', '*', '#'}
  14907. func XXftFontUnloadGlyphs(tls *libc.TLS, dpy uintptr, pub uintptr, glyphs uintptr, nglyph int32) {
  14908. bp := tls.Alloc(4144)
  14909. defer tls.Free(4144)
  14910. var font, info, xftg, xtmp, xuse, v2 uintptr
  14911. var glyphindex TFT_UInt
  14912. var nused, v1, v3 int32
  14913. var _ /* glyphBuf at bp+0 */ [1024]TGlyph
  14914. _, _, _, _, _, _, _, _, _, _ = font, glyphindex, info, nused, xftg, xtmp, xuse, v1, v2, v3
  14915. info = X_XftDisplayInfoGet(tls, dpy, m_False)
  14916. font = pub
  14917. nused = 0
  14918. for {
  14919. v1 = nglyph
  14920. nglyph--
  14921. if !(v1 != 0) {
  14922. break
  14923. }
  14924. v2 = glyphs
  14925. glyphs += 4
  14926. glyphindex = *(*TFT_UInt)(unsafe.Pointer(v2))
  14927. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*4))
  14928. if !(xftg != 0) {
  14929. continue
  14930. }
  14931. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0 {
  14932. if XXftDebug(tls)&int32(m_XFT_DBG_CACHEV) != 0 {
  14933. libc.Xprintf(tls, __ccgo_ts+1874, libc.VaList(bp+4104, glyphindex, (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory))
  14934. }
  14935. if (*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0 {
  14936. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture != 0 {
  14937. libxrender.XXRenderFreePicture(tls, dpy, (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture)
  14938. } else {
  14939. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  14940. v3 = nused
  14941. nused++
  14942. (*(*[1024]TGlyph)(unsafe.Pointer(bp)))[v3] = glyphindex
  14943. if libc.Uint32FromInt32(nused) == libc.Uint32FromInt64(4096)/libc.Uint32FromInt64(4) {
  14944. libxrender.XXRenderFreeGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, nused)
  14945. nused = 0
  14946. }
  14947. }
  14948. }
  14949. } else {
  14950. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap != 0 {
  14951. libc.Xfree(tls, (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap)
  14952. }
  14953. }
  14954. *(*uint32)(unsafe.Pointer(font + 140)) -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14955. if info != 0 {
  14956. *(*uint32)(unsafe.Pointer(info + 32)) -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  14957. }
  14958. }
  14959. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  14960. xuse = xftg
  14961. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  14962. libc.Xprintf(tls, __ccgo_ts+1905, libc.VaList(bp+4104, font, xuse, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder, (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer))
  14963. }
  14964. if (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder != uint32(0xffffffff) {
  14965. xtmp = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder)*4))
  14966. if xtmp != libc.UintptrFromInt32(0) {
  14967. /* update link around to oldest glyph */
  14968. (*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Fnewer = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer
  14969. }
  14970. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest == glyphindex {
  14971. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest == (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder {
  14972. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = uint32(0xffffffff)
  14973. } else {
  14974. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder
  14975. }
  14976. }
  14977. }
  14978. if (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer != uint32(0xffffffff) {
  14979. xtmp = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer)*4))
  14980. if xtmp != libc.UintptrFromInt32(0) {
  14981. /* update link around to newest glyph */
  14982. (*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Folder = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder
  14983. }
  14984. }
  14985. if (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse != 0 {
  14986. (*TXftFontInt)(unsafe.Pointer(font)).Ftotal_inuse--
  14987. } else {
  14988. libc.Xfprintf(tls, libc.Xstderr, __ccgo_ts+1930, 0)
  14989. }
  14990. if XXftDebug(tls)&int32(m_XFT_DBG_USAGE) != 0 {
  14991. __XftValidateGlyphUsage(tls, font)
  14992. }
  14993. }
  14994. libc.Xfree(tls, xftg)
  14995. XXftMemFree(tls, int32(_XFT_MEM_GLYPH), (*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph)
  14996. *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyphindex)*4)) = libc.UintptrFromInt32(0)
  14997. }
  14998. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 && nused != 0 {
  14999. libxrender.XXRenderFreeGlyphs(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, bp, nused)
  15000. }
  15001. }
  15002. func XXftFontCheckGlyph(tls *libc.TLS, dpy uintptr, pub uintptr, need_bitmaps TFcBool, glyph TFT_UInt, missing uintptr, nmissing uintptr) (r TFcBool) {
  15003. var font, xftg, xnew, xold, xtmp, xuse, xuse1 uintptr
  15004. var n, v1 int32
  15005. _, _, _, _, _, _, _, _, _ = font, n, xftg, xnew, xold, xtmp, xuse, xuse1, v1
  15006. font = pub
  15007. if glyph >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs {
  15008. return m_FcFalse
  15009. }
  15010. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*4))
  15011. if !(xftg != 0) || need_bitmaps != 0 && !((*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory != 0) {
  15012. if !(xftg != 0) {
  15013. xftg = libc.Xmalloc(tls, (*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph)
  15014. if !(xftg != 0) {
  15015. return m_FcFalse
  15016. }
  15017. XXftMemAlloc(tls, int32(_XFT_MEM_GLYPH), (*TXftFontInt)(unsafe.Pointer(font)).Fsizeof_glyph)
  15018. (*TXftGlyph)(unsafe.Pointer(xftg)).Fbitmap = libc.UintptrFromInt32(0)
  15019. (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory = uint32(0)
  15020. (*TXftGlyph)(unsafe.Pointer(xftg)).Fpicture = uint32(0)
  15021. *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(glyph)*4)) = xftg
  15022. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  15023. xuse = xftg
  15024. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Folder = uint32(0xffffffff)
  15025. (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer = uint32(0xffffffff)
  15026. }
  15027. }
  15028. n = *(*int32)(unsafe.Pointer(nmissing))
  15029. v1 = n
  15030. n++
  15031. *(*TFT_UInt)(unsafe.Pointer(missing + uintptr(v1)*4)) = glyph
  15032. if n == int32(m_XFT_NMISSING) {
  15033. XXftFontLoadGlyphs(tls, dpy, pub, need_bitmaps, missing, n)
  15034. n = 0
  15035. }
  15036. *(*int32)(unsafe.Pointer(nmissing)) = n
  15037. return int32(m_FcTrue)
  15038. }
  15039. /*
  15040. * Make unloading faster by moving newly-referenced glyphs to the front
  15041. * of the list, leaving the less-used glyphs on the end.
  15042. */
  15043. 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 {
  15044. xuse1 = xftg
  15045. xtmp = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnewest)*4))
  15046. /* delink */
  15047. xold = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Folder)*4))
  15048. xnew = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Fnewer)*4))
  15049. (*TXftGlyphUsage)(unsafe.Pointer(xold)).Fnewer = (*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Fnewer
  15050. (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Folder = (*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Folder
  15051. /* relink */
  15052. xnew = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Fnewer)*4))
  15053. (*TXftGlyphUsage)(unsafe.Pointer(xnew)).Folder = glyph
  15054. (*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Folder = (*TXftFontInt)(unsafe.Pointer(font)).Fnewest
  15055. (*TXftGlyphUsage)(unsafe.Pointer(xuse1)).Fnewer = (*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Fnewer
  15056. (*TXftGlyphUsage)(unsafe.Pointer(xtmp)).Fnewer = glyph
  15057. (*TXftFontInt)(unsafe.Pointer(font)).Fnewest = glyph
  15058. }
  15059. return m_FcFalse
  15060. }
  15061. func XXftCharExists(tls *libc.TLS, dpy uintptr, pub uintptr, ucs4 TFcChar32) (r TFcBool) {
  15062. if (*TXftFont)(unsafe.Pointer(pub)).Fcharset != 0 {
  15063. return libfontconfig.XFcCharSetHasChar(tls, (*TXftFont)(unsafe.Pointer(pub)).Fcharset, ucs4)
  15064. }
  15065. return m_FcFalse
  15066. }
  15067. func XXftCharIndex(tls *libc.TLS, dpy uintptr, pub uintptr, ucs4 TFcChar32) (r TFT_UInt) {
  15068. var ent, offset TFcChar32
  15069. var face TFT_Face
  15070. var font uintptr
  15071. _, _, _, _ = ent, face, font, offset
  15072. font = pub
  15073. if !((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value != 0) {
  15074. return uint32(0)
  15075. }
  15076. ent = ucs4 % libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value)
  15077. offset = uint32(0)
  15078. for (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 != ucs4 {
  15079. if (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 == libc.Uint32FromInt32(^libc.Int32FromInt32(0)) {
  15080. if !(XXftCharExists(tls, dpy, pub, ucs4) != 0) {
  15081. return uint32(0)
  15082. }
  15083. face = XXftLockFace(tls, pub)
  15084. if !(face != 0) {
  15085. return uint32(0)
  15086. }
  15087. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fucs4 = ucs4
  15088. (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fglyph = libfontconfig.XFcFreeTypeCharIndex(tls, face, ucs4)
  15089. XXftUnlockFace(tls, pub)
  15090. break
  15091. }
  15092. if !(offset != 0) {
  15093. offset = ucs4 % libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Frehash_value)
  15094. if !(offset != 0) {
  15095. offset = uint32(1)
  15096. }
  15097. }
  15098. ent = ent + offset
  15099. if ent >= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value) {
  15100. ent -= libc.Uint32FromInt32((*TXftFontInt)(unsafe.Pointer(font)).Fhash_value)
  15101. }
  15102. }
  15103. return (*(*TXftUcsHash)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fhash_table + uintptr(ent)*8))).Fglyph
  15104. }
  15105. // C documentation
  15106. //
  15107. // /*
  15108. // * Remove glyph(s) from the font to reduce memory-usage.
  15109. // */
  15110. func X_XftFontUncacheGlyph(tls *libc.TLS, dpy uintptr, pub uintptr) {
  15111. bp := tls.Alloc(16)
  15112. defer tls.Free(16)
  15113. var font, xftg, xuse uintptr
  15114. var glyph_memory uint32
  15115. var v1 TFT_UInt
  15116. var _ /* glyphindex at bp+0 */ TFT_UInt
  15117. _, _, _, _, _ = font, glyph_memory, xftg, xuse, v1
  15118. font = pub
  15119. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory != 0) {
  15120. return
  15121. }
  15122. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  15123. __XftFontValidateMemory(tls, dpy, pub)
  15124. }
  15125. if (*TXftFontInt)(unsafe.Pointer(font)).Ftrack_mem_usage != 0 {
  15126. /*
  15127. * Remove the oldest glyph from the font.
  15128. */
  15129. if (*TXftFontInt)(unsafe.Pointer(font)).Fnewest != uint32(0xffffffff) {
  15130. xuse = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr((*TXftFontInt)(unsafe.Pointer(font)).Fnewest)*4))
  15131. v1 = (*TXftGlyphUsage)(unsafe.Pointer(xuse)).Fnewer
  15132. *(*TFT_UInt)(unsafe.Pointer(bp)) = v1
  15133. if v1 != uint32(0xffffffff) {
  15134. XXftFontUnloadGlyphs(tls, dpy, pub, bp, int32(1))
  15135. }
  15136. }
  15137. } else {
  15138. if (*TXftFontInt)(unsafe.Pointer(font)).Fuse_free_glyphs != 0 {
  15139. /*
  15140. * Pick a random glyph from the font and remove it from the cache
  15141. */
  15142. glyph_memory = libc.Uint32FromInt32(libc.Xrand(tls)) % (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory
  15143. *(*TFT_UInt)(unsafe.Pointer(bp)) = uint32(0)
  15144. for {
  15145. if !(*(*TFT_UInt)(unsafe.Pointer(bp)) < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  15146. break
  15147. }
  15148. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(*(*TFT_UInt)(unsafe.Pointer(bp)))*4))
  15149. if xftg != 0 {
  15150. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory > glyph_memory {
  15151. XXftFontUnloadGlyphs(tls, dpy, pub, bp, int32(1))
  15152. break
  15153. }
  15154. glyph_memory -= (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory
  15155. }
  15156. goto _2
  15157. _2:
  15158. ;
  15159. *(*TFT_UInt)(unsafe.Pointer(bp))++
  15160. }
  15161. } else {
  15162. /*
  15163. * Free all glyphs, since they are part of a set.
  15164. */
  15165. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  15166. libxrender.XXRenderFreeGlyphSet(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset)
  15167. (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset = uint32(0)
  15168. }
  15169. *(*TFT_UInt)(unsafe.Pointer(bp)) = uint32(0)
  15170. for {
  15171. if !(*(*TFT_UInt)(unsafe.Pointer(bp)) < (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs) {
  15172. break
  15173. }
  15174. xftg = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(*(*TFT_UInt)(unsafe.Pointer(bp)))*4))
  15175. if xftg != 0 {
  15176. if (*TXftGlyph)(unsafe.Pointer(xftg)).Fglyph_memory > uint32(0) {
  15177. XXftFontUnloadGlyphs(tls, dpy, pub, bp, int32(1))
  15178. }
  15179. }
  15180. goto _3
  15181. _3:
  15182. ;
  15183. *(*TFT_UInt)(unsafe.Pointer(bp))++
  15184. }
  15185. }
  15186. }
  15187. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  15188. __XftFontValidateMemory(tls, dpy, pub)
  15189. }
  15190. }
  15191. func X_XftFontManageMemory(tls *libc.TLS, dpy uintptr, pub uintptr) {
  15192. bp := tls.Alloc(32)
  15193. defer tls.Free(32)
  15194. var font uintptr
  15195. var v1 uint32
  15196. _, _ = font, v1
  15197. font = pub
  15198. if (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory != 0 {
  15199. if XXftDebug(tls)&int32(m_XFT_DBG_CACHE) != 0 {
  15200. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory {
  15201. if (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0 {
  15202. v1 = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset
  15203. } else {
  15204. v1 = uint32(font)
  15205. }
  15206. libc.Xprintf(tls, __ccgo_ts+1954, libc.VaList(bp+8, v1, (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory, (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory))
  15207. }
  15208. }
  15209. for (*TXftFontInt)(unsafe.Pointer(font)).Fglyph_memory > (*TXftFontInt)(unsafe.Pointer(font)).Fmax_glyph_memory {
  15210. X_XftFontUncacheGlyph(tls, dpy, pub)
  15211. }
  15212. }
  15213. X_XftDisplayManageMemory(tls, dpy)
  15214. }
  15215. const m_UINT_MAX2 = 0xffffffff
  15216. /* xftxlfd.c */
  15217. var __XftConfigInitialized int32
  15218. func XXftInit(tls *libc.TLS, config uintptr) (r int32) {
  15219. if __XftConfigInitialized != 0 {
  15220. return int32(m_True)
  15221. }
  15222. __XftConfigInitialized = int32(m_True)
  15223. if !(libfontconfig.XFcInit(tls) != 0) {
  15224. return m_False
  15225. }
  15226. return int32(m_True)
  15227. }
  15228. func XXftGetVersion(tls *libc.TLS) (r int32) {
  15229. return libc.Int32FromInt32(m_XFT_MAJOR)*libc.Int32FromInt32(10000) + libc.Int32FromInt32(m_XFT_MINOR)*libc.Int32FromInt32(100) + libc.Int32FromInt32(m_XFT_REVISION)
  15230. }
  15231. var _XftInUse = [4]struct {
  15232. Fname uintptr
  15233. Falloc_count int32
  15234. Falloc_mem Tsize_t
  15235. Ffree_count int32
  15236. Ffree_mem Tsize_t
  15237. }{
  15238. 0: {
  15239. Fname: __ccgo_ts + 2000,
  15240. },
  15241. 1: {
  15242. Fname: __ccgo_ts + 2008,
  15243. },
  15244. 2: {
  15245. Fname: __ccgo_ts + 2016,
  15246. },
  15247. 3: {
  15248. Fname: __ccgo_ts + 2026,
  15249. },
  15250. }
  15251. var _XftAllocCount int32
  15252. var _XftAllocMem Tsize_t
  15253. var _XftFreeCount int32
  15254. var _XftFreeMem Tsize_t
  15255. var _XftMemNotice = libc.Uint32FromInt32(libc.Int32FromInt32(1) * libc.Int32FromInt32(1024) * libc.Int32FromInt32(1024))
  15256. var _XftAllocNotify Tsize_t
  15257. var _XftFreeNotify Tsize_t
  15258. func XXftMemReport(tls *libc.TLS) {
  15259. bp := tls.Alloc(48)
  15260. defer tls.Free(48)
  15261. var i int32
  15262. _ = i
  15263. libc.Xprintf(tls, __ccgo_ts+2035, 0)
  15264. libc.Xprintf(tls, __ccgo_ts+2054, 0)
  15265. libc.Xprintf(tls, __ccgo_ts+2093, 0)
  15266. i = 0
  15267. for {
  15268. if !(i < int32(_XFT_MEM_NUM)) {
  15269. break
  15270. }
  15271. 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))
  15272. goto _1
  15273. _1:
  15274. ;
  15275. i++
  15276. }
  15277. libc.Xprintf(tls, __ccgo_ts+2137, libc.VaList(bp+8, __ccgo_ts+2159, _XftAllocCount, _XftAllocMem, _XftFreeCount, _XftFreeMem))
  15278. _XftAllocNotify = uint32(0)
  15279. _XftFreeNotify = uint32(0)
  15280. }
  15281. func XXftMemAlloc(tls *libc.TLS, kind int32, size Tsize_t) {
  15282. if XXftDebug(tls)&int32(m_XFT_DBG_MEMORY) != 0 {
  15283. _XftInUse[kind].Falloc_count++
  15284. _XftInUse[kind].Falloc_mem += size
  15285. _XftAllocCount++
  15286. _XftAllocMem += size
  15287. _XftAllocNotify += size
  15288. if _XftAllocNotify > _XftMemNotice {
  15289. XXftMemReport(tls)
  15290. }
  15291. }
  15292. }
  15293. func XXftMemFree(tls *libc.TLS, kind int32, size Tsize_t) {
  15294. if XXftDebug(tls)&int32(m_XFT_DBG_MEMORY) != 0 {
  15295. _XftInUse[kind].Ffree_count++
  15296. _XftInUse[kind].Ffree_mem += size
  15297. _XftFreeCount++
  15298. _XftFreeMem += size
  15299. _XftFreeNotify += size
  15300. if _XftFreeNotify > _XftMemNotice {
  15301. XXftMemReport(tls)
  15302. }
  15303. }
  15304. }
  15305. /* xftxlfd.c */
  15306. func XXftListFontsPatternObjects(tls *libc.TLS, dpy uintptr, screen int32, pattern uintptr, os uintptr) (r uintptr) {
  15307. return libfontconfig.XFcFontList(tls, libc.UintptrFromInt32(0), pattern, os)
  15308. }
  15309. func XXftListFonts(tls *libc.TLS, dpy uintptr, screen int32, va1 uintptr) (r uintptr) {
  15310. bp := tls.Alloc(16)
  15311. defer tls.Free(16)
  15312. var __o__, __ob__, __os__, __p__, first, fs, os, pattern uintptr
  15313. var va Tva_list
  15314. var _ /* __v__ at bp+0 */ TFcValue
  15315. _, _, _, _, _, _, _, _, _ = __o__, __ob__, __os__, __p__, first, fs, os, pattern, va
  15316. va = va1
  15317. __p__ = libc.UintptrFromInt32(0)
  15318. if !(__p__ != 0) {
  15319. __p__ = libfontconfig.XFcPatternCreate(tls)
  15320. if !(__p__ != 0) {
  15321. goto _FcPatternVapBuild_bail0
  15322. }
  15323. }
  15324. for {
  15325. __o__ = libc.VaUintptr(&va)
  15326. if !(__o__ != 0) {
  15327. break
  15328. }
  15329. (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 = libc.VaInt32(&va)
  15330. switch (*(*TFcValue)(unsafe.Pointer(bp))).Ftype1 {
  15331. case int32(_FcTypeUnknown):
  15332. fallthrough
  15333. case int32(_FcTypeVoid):
  15334. goto _FcPatternVapBuild_bail1
  15335. case int32(_FcTypeInteger):
  15336. *(*int32)(unsafe.Pointer(bp + 4)) = libc.VaInt32(&va)
  15337. case int32(_FcTypeDouble):
  15338. *(*float64)(unsafe.Pointer(bp + 4)) = libc.VaFloat64(&va)
  15339. case int32(_FcTypeString):
  15340. *(*uintptr)(unsafe.Pointer(bp + 4)) = libc.VaUintptr(&va)
  15341. case int32(_FcTypeBool):
  15342. *(*TFcBool)(unsafe.Pointer(bp + 4)) = libc.VaInt32(&va)
  15343. case int32(_FcTypeMatrix):
  15344. *(*uintptr)(unsafe.Pointer(bp + 4)) = libc.VaUintptr(&va)
  15345. case int32(_FcTypeCharSet):
  15346. *(*uintptr)(unsafe.Pointer(bp + 4)) = libc.VaUintptr(&va)
  15347. case int32(_FcTypeFTFace):
  15348. *(*uintptr)(unsafe.Pointer(bp + 4)) = libc.VaUintptr(&va)
  15349. case int32(_FcTypeLangSet):
  15350. *(*uintptr)(unsafe.Pointer(bp + 4)) = libc.VaUintptr(&va)
  15351. case int32(_FcTypeRange):
  15352. *(*uintptr)(unsafe.Pointer(bp + 4)) = libc.VaUintptr(&va)
  15353. break
  15354. }
  15355. if !(libfontconfig.XFcPatternAdd(tls, __p__, __o__, *(*TFcValue)(unsafe.Pointer(bp)), int32(m_FcTrue)) != 0) {
  15356. goto _FcPatternVapBuild_bail1
  15357. }
  15358. goto _1
  15359. _1:
  15360. }
  15361. pattern = __p__
  15362. goto _FcPatternVapBuild_return
  15363. goto _FcPatternVapBuild_bail1
  15364. _FcPatternVapBuild_bail1:
  15365. ;
  15366. if !(libc.UintptrFromInt32(0) != 0) {
  15367. libfontconfig.XFcPatternDestroy(tls, __p__)
  15368. }
  15369. goto _FcPatternVapBuild_bail0
  15370. _FcPatternVapBuild_bail0:
  15371. ;
  15372. pattern = libc.UintptrFromInt32(0)
  15373. goto _FcPatternVapBuild_return
  15374. _FcPatternVapBuild_return:
  15375. ;
  15376. first = libc.VaUintptr(&va)
  15377. os = uintptr(0)
  15378. __os__ = libfontconfig.XFcObjectSetCreate(tls)
  15379. if !(__os__ != 0) {
  15380. goto _FcObjectSetVapBuild_bail0
  15381. }
  15382. __ob__ = first
  15383. for __ob__ != 0 {
  15384. if !(libfontconfig.XFcObjectSetAdd(tls, __os__, __ob__) != 0) {
  15385. goto _FcObjectSetVapBuild_bail1
  15386. }
  15387. __ob__ = libc.VaUintptr(&va)
  15388. }
  15389. os = __os__
  15390. goto _FcObjectSetVapBuild_bail1
  15391. _FcObjectSetVapBuild_bail1:
  15392. ;
  15393. if !(os != 0) && __os__ != 0 {
  15394. libfontconfig.XFcObjectSetDestroy(tls, __os__)
  15395. }
  15396. goto _FcObjectSetVapBuild_bail0
  15397. _FcObjectSetVapBuild_bail0:
  15398. ;
  15399. _ = va
  15400. fs = XXftListFontsPatternObjects(tls, dpy, screen, pattern, os)
  15401. libfontconfig.XFcPatternDestroy(tls, pattern)
  15402. libfontconfig.XFcObjectSetDestroy(tls, os)
  15403. return fs
  15404. }
  15405. /* xftxlfd.c */
  15406. func XXftNameParse(tls *libc.TLS, name uintptr) (r uintptr) {
  15407. return libfontconfig.XFcNameParse(tls, name)
  15408. }
  15409. func XXftNameUnparse(tls *libc.TLS, pat uintptr, dest uintptr, len1 int32) (r TFcBool) {
  15410. var name, new1 uintptr
  15411. _, _ = name, new1
  15412. name = libfontconfig.XFcNameUnparse(tls, pat)
  15413. if !(name != 0) {
  15414. return m_FcFalse
  15415. }
  15416. if libc.Xstrlen(tls, name)+uint32(1) > libc.Uint32FromInt32(len1) {
  15417. new1 = libfontconfig.XFcPatternDuplicate(tls, pat)
  15418. libc.Xfree(tls, name)
  15419. libfontconfig.XFcPatternDel(tls, new1, __ccgo_ts+2165)
  15420. libfontconfig.XFcPatternDel(tls, new1, __ccgo_ts+1400)
  15421. name = libfontconfig.XFcNameUnparse(tls, new1)
  15422. libfontconfig.XFcPatternDestroy(tls, new1)
  15423. if !(name != 0) {
  15424. return m_FcFalse
  15425. }
  15426. if libc.Xstrlen(tls, name)+uint32(1) > libc.Uint32FromInt32(len1) {
  15427. libc.Xstrncpy(tls, dest, name, libc.Uint32FromInt32(len1)-uint32(1))
  15428. *(*int8)(unsafe.Pointer(dest + uintptr(len1-int32(1)))) = int8('\000')
  15429. libc.Xfree(tls, name)
  15430. return m_FcFalse
  15431. }
  15432. }
  15433. libc.Xstrcpy(tls, dest, name)
  15434. libc.Xfree(tls, name)
  15435. return int32(m_FcTrue)
  15436. }
  15437. const m_NUM_ELT_LOCAL = 128
  15438. const m_UINT32_MAX1 = 4294967295
  15439. /* xftxlfd.c */
  15440. // C documentation
  15441. //
  15442. // /*
  15443. // * Dispatch glyph drawing to the correct XRenderCompositeString function
  15444. // */
  15445. 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) {
  15446. if nchars == 0 {
  15447. return
  15448. }
  15449. switch charwidth {
  15450. case int32(1):
  15451. fallthrough
  15452. default:
  15453. libxrender.XXRenderCompositeString8(tls, dpy, op, src, dst, format, glyphset, srcx, srcy, dstx, dsty, chars, nchars)
  15454. case int32(2):
  15455. libxrender.XXRenderCompositeString16(tls, dpy, op, src, dst, format, glyphset, srcx, srcy, dstx, dsty, chars, nchars)
  15456. case int32(4):
  15457. libxrender.XXRenderCompositeString32(tls, dpy, op, src, dst, format, glyphset, srcx, srcy, dstx, dsty, chars, nchars)
  15458. break
  15459. }
  15460. }
  15461. /*
  15462. * Use the Render extension to draw the glyphs
  15463. */
  15464. 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) {
  15465. bp := tls.Alloc(5136)
  15466. defer tls.Free(5136)
  15467. var char16, char32, char8, chars, font, glyph uintptr
  15468. var dstx, dsty, i, j, width int32
  15469. var g, max TFT_UInt
  15470. var glyphs_loaded TFcBool
  15471. var needed, size Tsize_t
  15472. var wire TGlyph
  15473. var _ /* char_local at bp+1028 */ [1024]uint32
  15474. var _ /* missing at bp+0 */ [256]TFT_UInt
  15475. var _ /* nmissing at bp+1024 */ int32
  15476. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = char16, char32, char8, chars, dstx, dsty, font, g, glyph, glyphs_loaded, i, j, max, needed, size, width, wire
  15477. font = pub
  15478. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  15479. return
  15480. }
  15481. /*
  15482. * Load missing glyphs
  15483. */
  15484. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  15485. max = uint32(0)
  15486. glyphs_loaded = m_FcFalse
  15487. i = 0
  15488. for {
  15489. if !(i < nglyphs) {
  15490. break
  15491. }
  15492. g = *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4))
  15493. if g > max {
  15494. max = g
  15495. }
  15496. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  15497. glyphs_loaded = int32(m_FcTrue)
  15498. }
  15499. goto _1
  15500. _1:
  15501. ;
  15502. i++
  15503. }
  15504. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  15505. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  15506. }
  15507. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  15508. goto bail1
  15509. }
  15510. if max < uint32(0x100) {
  15511. width = int32(1)
  15512. size = uint32(1)
  15513. } else {
  15514. if max < uint32(0x10000) {
  15515. width = int32(2)
  15516. size = uint32(2)
  15517. } else {
  15518. width = int32(4)
  15519. size = uint32(4)
  15520. }
  15521. }
  15522. chars = bp + 1028
  15523. if libc.Uint32FromInt32(nglyphs) > uint32(0xffffffff)/size {
  15524. goto bail1
  15525. }
  15526. needed = libc.Uint32FromInt32(nglyphs) * size
  15527. if needed > uint32(4096) {
  15528. chars = libc.Xmalloc(tls, needed)
  15529. if !(chars != 0) {
  15530. goto bail1
  15531. }
  15532. }
  15533. dstx = x
  15534. dsty = y
  15535. char8 = chars
  15536. char16 = chars
  15537. char32 = chars
  15538. i = 0
  15539. j = libc.Int32FromInt32(0)
  15540. for {
  15541. if !(i < nglyphs) {
  15542. break
  15543. }
  15544. wire = *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4))
  15545. if wire >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(wire)*4)) != 0) {
  15546. wire = uint32(0)
  15547. }
  15548. glyph = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(wire)*4))
  15549. if glyph == libc.UintptrFromInt32(0) {
  15550. goto _2
  15551. }
  15552. if (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0 {
  15553. __XftCompositeString(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, srcx, srcy, x, y, width, chars, j)
  15554. 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))
  15555. dstx += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15556. dsty += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15557. x = dstx
  15558. y = dsty
  15559. j = 0
  15560. } else {
  15561. switch width {
  15562. case int32(1):
  15563. *(*int8)(unsafe.Pointer(char8 + uintptr(j))) = libc.Int8FromUint32(wire)
  15564. case int32(2):
  15565. *(*uint16)(unsafe.Pointer(char16 + uintptr(j)*2)) = uint16(wire)
  15566. case int32(4):
  15567. *(*uint32)(unsafe.Pointer(char32 + uintptr(j)*4)) = wire
  15568. break
  15569. }
  15570. dstx += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15571. dsty += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15572. j++
  15573. }
  15574. goto _2
  15575. _2:
  15576. ;
  15577. i++
  15578. }
  15579. __XftCompositeString(tls, dpy, op, src, dst, (*TXftFontInt)(unsafe.Pointer(font)).Fformat, (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset, srcx, srcy, x, y, width, chars, j)
  15580. if chars != bp+1028 {
  15581. libc.Xfree(tls, chars)
  15582. }
  15583. goto bail1
  15584. bail1:
  15585. ;
  15586. if glyphs_loaded != 0 {
  15587. X_XftFontManageMemory(tls, dpy, pub)
  15588. }
  15589. }
  15590. // C documentation
  15591. //
  15592. // /*
  15593. // * Dispatch glyph drawing to the correct XRenderCompositeText function
  15594. // */
  15595. 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) {
  15596. if nelt == 0 {
  15597. return
  15598. }
  15599. switch eltwidth {
  15600. case int32(1):
  15601. fallthrough
  15602. default:
  15603. libxrender.XXRenderCompositeText8(tls, dpy, op, src, dst, format, srcx, srcy, dstx, dsty, elts, nelt)
  15604. case int32(2):
  15605. libxrender.XXRenderCompositeText16(tls, dpy, op, src, dst, format, srcx, srcy, dstx, dsty, elts, nelt)
  15606. case int32(4):
  15607. libxrender.XXRenderCompositeText32(tls, dpy, op, src, dst, format, srcx, srcy, dstx, dsty, elts, nelt)
  15608. break
  15609. }
  15610. }
  15611. func XXftGlyphSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, glyphs uintptr, nglyphs int32) {
  15612. bp := tls.Alloc(7696)
  15613. defer tls.Free(7696)
  15614. var char16, char32, char8, chars, elts, font, glyph, v4, v7 uintptr
  15615. var g, max TFT_UInt
  15616. var glyphs_loaded TFcBool
  15617. var i, j, n, nelt, size, width, x, y, v3, v5 int32
  15618. var _ /* char_local at bp+1028 */ [1024]uint32
  15619. var _ /* elts_local at bp+5124 */ [128]TXGlyphElt8
  15620. var _ /* missing at bp+0 */ [256]TFT_UInt
  15621. var _ /* nmissing at bp+1024 */ int32
  15622. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = char16, char32, char8, chars, elts, font, g, glyph, glyphs_loaded, i, j, max, n, nelt, size, width, x, y, v3, v4, v5, v7
  15623. font = pub
  15624. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  15625. return
  15626. }
  15627. if !(nglyphs != 0) {
  15628. return
  15629. }
  15630. /*
  15631. * Load missing glyphs
  15632. */
  15633. max = uint32(0)
  15634. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  15635. glyphs_loaded = m_FcFalse
  15636. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs))).Fglyph
  15637. i = 0
  15638. for {
  15639. if !(i < nglyphs) {
  15640. break
  15641. }
  15642. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  15643. if g > max {
  15644. max = g
  15645. }
  15646. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  15647. glyphs_loaded = int32(m_FcTrue)
  15648. }
  15649. goto _1
  15650. _1:
  15651. ;
  15652. i++
  15653. }
  15654. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  15655. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  15656. }
  15657. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  15658. goto bail1
  15659. }
  15660. /*
  15661. * See what encoding size is needed
  15662. */
  15663. if max < uint32(0x100) {
  15664. size = int32(1)
  15665. width = int32(1)
  15666. } else {
  15667. if max < uint32(0x10000) {
  15668. size = int32(2)
  15669. width = int32(2)
  15670. } else {
  15671. size = int32(4)
  15672. width = int32(4)
  15673. }
  15674. }
  15675. chars = bp + 1028
  15676. if nglyphs*size > int32(m_NUM_LOCAL) {
  15677. chars = libc.Xmalloc(tls, libc.Uint32FromInt32(nglyphs*size))
  15678. if !(chars != 0) {
  15679. goto bail1
  15680. }
  15681. }
  15682. char8 = chars
  15683. char16 = chars
  15684. char32 = chars
  15685. /*
  15686. * Compute the number of glyph elts needed
  15687. */
  15688. nelt = int32(1)
  15689. i = 0
  15690. for {
  15691. if !(i < nglyphs) {
  15692. break
  15693. }
  15694. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  15695. /* Substitute default for non-existent glyphs */
  15696. if g >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*4)) != 0) {
  15697. g = uint32(0)
  15698. }
  15699. if *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*4)) != 0 {
  15700. break
  15701. }
  15702. goto _2
  15703. _2:
  15704. ;
  15705. i++
  15706. }
  15707. if i == nglyphs {
  15708. goto bail2
  15709. }
  15710. glyph = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*4))
  15711. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15712. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15713. for {
  15714. i++
  15715. v3 = i
  15716. if !(v3 < nglyphs) {
  15717. break
  15718. }
  15719. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  15720. /* Substitute default for non-existent glyphs */
  15721. if g >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*4)) != 0) {
  15722. g = uint32(0)
  15723. }
  15724. /*
  15725. * check to see if the glyph is placed where it would
  15726. * fall using the normal spacing and if it would render
  15727. * as a XRender glyph
  15728. */
  15729. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*4))
  15730. glyph = v4
  15731. if v4 != 0 && !((*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0) {
  15732. if x != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) || y != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) {
  15733. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx)
  15734. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy)
  15735. nelt++
  15736. }
  15737. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15738. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15739. }
  15740. }
  15741. elts = bp + 5124
  15742. if !((*TXftFontInt)(unsafe.Pointer(font)).Finfo.Fcolor != 0) && nelt > int32(m_NUM_ELT_LOCAL) {
  15743. elts = libc.Xmalloc(tls, libc.Uint32FromInt32(nelt)*uint32(20))
  15744. if !(elts != 0) {
  15745. goto bail2
  15746. }
  15747. }
  15748. /*
  15749. * Generate the list of glyph elts or render color glyphs
  15750. */
  15751. nelt = 0
  15752. v5 = libc.Int32FromInt32(0)
  15753. y = v5
  15754. x = v5
  15755. n = 0
  15756. j = 0
  15757. i = 0
  15758. for {
  15759. if !(i < nglyphs) {
  15760. break
  15761. }
  15762. g = (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph
  15763. /* Substitute default for non-existent glyphs */
  15764. if g >= (*TXftFontInt)(unsafe.Pointer(font)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*4)) != 0) {
  15765. g = uint32(0)
  15766. }
  15767. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font)).Fglyphs + uintptr(g)*4))
  15768. glyph = v7
  15769. if v7 != 0 {
  15770. if (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0 {
  15771. 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))
  15772. goto _6
  15773. }
  15774. if !(i != 0) || x != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) || y != int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) {
  15775. if n != 0 {
  15776. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).Fnchars = n
  15777. nelt++
  15778. }
  15779. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).Fglyphset = (*TXftFontInt)(unsafe.Pointer(font)).Fglyphset
  15780. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).Fchars = char8 + uintptr(size*j)
  15781. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).FxOff = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx) - x
  15782. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).FyOff = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy) - y
  15783. x = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx)
  15784. y = int32((*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy)
  15785. n = 0
  15786. }
  15787. switch width {
  15788. case int32(1):
  15789. *(*int8)(unsafe.Pointer(char8 + uintptr(j))) = libc.Int8FromUint32(g)
  15790. case int32(2):
  15791. *(*uint16)(unsafe.Pointer(char16 + uintptr(j)*2)) = uint16(g)
  15792. case int32(4):
  15793. *(*uint32)(unsafe.Pointer(char32 + uintptr(j)*4)) = g
  15794. break
  15795. }
  15796. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15797. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15798. j++
  15799. n++
  15800. }
  15801. goto _6
  15802. _6:
  15803. ;
  15804. i++
  15805. }
  15806. if n != 0 {
  15807. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).Fnchars = n
  15808. nelt++
  15809. }
  15810. __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)
  15811. if elts != bp+5124 {
  15812. libc.Xfree(tls, elts)
  15813. }
  15814. goto bail2
  15815. bail2:
  15816. ;
  15817. if chars != bp+1028 {
  15818. libc.Xfree(tls, chars)
  15819. }
  15820. goto bail1
  15821. bail1:
  15822. ;
  15823. if glyphs_loaded != 0 {
  15824. X_XftFontManageMemory(tls, dpy, pub)
  15825. }
  15826. }
  15827. func XXftCharSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, pub uintptr, dst TPicture, srcx int32, srcy int32, chars uintptr, len1 int32) {
  15828. bp := tls.Alloc(8192)
  15829. defer tls.Free(8192)
  15830. var glyphs uintptr
  15831. var i int32
  15832. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphSpec
  15833. _, _ = glyphs, i
  15834. if len1 <= 0 {
  15835. return
  15836. }
  15837. if len1 <= int32(m_NUM_LOCAL) {
  15838. glyphs = bp
  15839. } else {
  15840. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(8))
  15841. if !(glyphs != 0) {
  15842. return
  15843. }
  15844. }
  15845. i = 0
  15846. for {
  15847. if !(i < len1) {
  15848. break
  15849. }
  15850. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fglyph = XXftCharIndex(tls, dpy, pub, (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fucs4)
  15851. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fx = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fx
  15852. (*(*TXftGlyphSpec)(unsafe.Pointer(glyphs + uintptr(i)*8))).Fy = (*(*TXftCharSpec)(unsafe.Pointer(chars + uintptr(i)*8))).Fy
  15853. goto _1
  15854. _1:
  15855. ;
  15856. i++
  15857. }
  15858. XXftGlyphSpecRender(tls, dpy, op, src, pub, dst, srcx, srcy, glyphs, len1)
  15859. if glyphs != bp {
  15860. libc.Xfree(tls, glyphs)
  15861. }
  15862. }
  15863. /*
  15864. * Choose which format to draw text in when drawing with fonts
  15865. * of different formats. The trick is that ARGB formats aren't
  15866. * compatible with A formats as PictOpAdd does the wrong thing, so
  15867. * fall back to an A format when presented with an ARGB and A format
  15868. */
  15869. func _XftPreferFormat(tls *libc.TLS, dpy uintptr, a uintptr, b uintptr) (r uintptr) {
  15870. var prefer uintptr
  15871. _ = prefer
  15872. prefer = libc.UintptrFromInt32(0)
  15873. if a == b {
  15874. prefer = a
  15875. } else {
  15876. if libc.BoolInt32((*TXRenderPictFormat)(unsafe.Pointer(a)).Fdepth == int32(32)) != libc.BoolInt32((*TXRenderPictFormat)(unsafe.Pointer(b)).Fdepth == int32(32)) {
  15877. prefer = libxrender.XXRenderFindStandardFormat(tls, dpy, int32(m_PictStandardA8))
  15878. } else {
  15879. if (*TXRenderPictFormat)(unsafe.Pointer(a)).Fdepth > (*TXRenderPictFormat)(unsafe.Pointer(b)).Fdepth {
  15880. prefer = a
  15881. } else {
  15882. prefer = b
  15883. }
  15884. }
  15885. }
  15886. return prefer
  15887. }
  15888. func XXftGlyphFontSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, dst TPicture, srcx int32, srcy int32, glyphs uintptr, nglyphs int32) {
  15889. bp := tls.Alloc(7696)
  15890. defer tls.Free(7696)
  15891. var char16, char32, char8, chars, elts, firstFont, font, font1, font2, font3, format, glyph, prevPublic, pub, pub1, pub2, pub3, v4, v7 uintptr
  15892. var g, max TFT_UInt
  15893. var glyphs_loaded TFcBool
  15894. var i, j, n, nelt, size, width, x, y, v3, v5 int32
  15895. var _ /* char_local at bp+1028 */ [1024]uint32
  15896. var _ /* elts_local at bp+5124 */ [128]TXGlyphElt8
  15897. var _ /* missing at bp+0 */ [256]TFT_UInt
  15898. var _ /* nmissing at bp+1024 */ int32
  15899. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  15900. if !(nglyphs != 0) {
  15901. return
  15902. }
  15903. /*
  15904. * Load missing glyphs. Have to load them
  15905. * one at a time in case the font changes
  15906. */
  15907. max = uint32(0)
  15908. glyphs_loaded = m_FcFalse
  15909. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fglyph
  15910. i = 0
  15911. for {
  15912. if !(i < nglyphs) {
  15913. break
  15914. }
  15915. pub = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont
  15916. font = pub
  15917. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fglyph
  15918. if g > max {
  15919. max = g
  15920. }
  15921. *(*int32)(unsafe.Pointer(bp + 1024)) = 0
  15922. if XXftFontCheckGlyph(tls, dpy, pub, int32(m_FcTrue), g, bp, bp+1024) != 0 {
  15923. glyphs_loaded = int32(m_FcTrue)
  15924. }
  15925. if *(*int32)(unsafe.Pointer(bp + 1024)) != 0 {
  15926. XXftFontLoadGlyphs(tls, dpy, pub, int32(m_FcTrue), bp, *(*int32)(unsafe.Pointer(bp + 1024)))
  15927. }
  15928. if !((*TXftFontInt)(unsafe.Pointer(font)).Fformat != 0) {
  15929. goto bail1
  15930. }
  15931. if !((*TXftFontInt)(unsafe.Pointer(font)).Fglyphset != 0) {
  15932. goto bail1
  15933. }
  15934. goto _1
  15935. _1:
  15936. ;
  15937. i++
  15938. }
  15939. /*
  15940. * See what encoding size is needed
  15941. */
  15942. if max < uint32(0x100) {
  15943. size = int32(1)
  15944. width = int32(1)
  15945. } else {
  15946. if max < uint32(0x10000) {
  15947. size = int32(2)
  15948. width = int32(2)
  15949. } else {
  15950. size = int32(4)
  15951. width = int32(4)
  15952. }
  15953. }
  15954. chars = bp + 1028
  15955. if nglyphs*size > int32(m_NUM_LOCAL) {
  15956. chars = libc.Xmalloc(tls, libc.Uint32FromInt32(nglyphs*size))
  15957. if !(chars != 0) {
  15958. goto bail1
  15959. }
  15960. }
  15961. char8 = chars
  15962. char16 = chars
  15963. char32 = chars
  15964. /*
  15965. * Compute the number of glyph elts needed
  15966. */
  15967. nelt = int32(1)
  15968. firstFont = libc.UintptrFromInt32(0)
  15969. i = 0
  15970. for {
  15971. if !(i < nglyphs) {
  15972. break
  15973. }
  15974. pub1 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont
  15975. font1 = pub1
  15976. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fglyph
  15977. /* Substitute default for non-existent glyphs */
  15978. if g >= (*TXftFontInt)(unsafe.Pointer(font1)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(g)*4)) != 0) {
  15979. g = uint32(0)
  15980. }
  15981. if *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font1)).Fglyphs + uintptr(g)*4)) != 0 {
  15982. firstFont = font1
  15983. break
  15984. }
  15985. goto _2
  15986. _2:
  15987. ;
  15988. i++
  15989. }
  15990. if i == nglyphs || !(firstFont != 0) {
  15991. goto bail2
  15992. }
  15993. glyph = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(firstFont)).Fglyphs + uintptr(g)*4))
  15994. format = (*TXftFontInt)(unsafe.Pointer(firstFont)).Fformat
  15995. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fx) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  15996. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fy) + int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  15997. prevPublic = libc.UintptrFromInt32(0)
  15998. for {
  15999. i++
  16000. v3 = i
  16001. if !(v3 < nglyphs) {
  16002. break
  16003. }
  16004. pub2 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont
  16005. font2 = pub2
  16006. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fglyph
  16007. /* Substitute default for non-existent glyphs */
  16008. if g >= (*TXftFontInt)(unsafe.Pointer(font2)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font2)).Fglyphs + uintptr(g)*4)) != 0) {
  16009. g = uint32(0)
  16010. }
  16011. /*
  16012. * check to see if the glyph is placed where it would
  16013. * fall using the normal spacing
  16014. */
  16015. v4 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font2)).Fglyphs + uintptr(g)*4))
  16016. glyph = v4
  16017. if v4 != 0 && !((*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0) {
  16018. if pub2 != prevPublic || x != int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fx) || y != int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fy) {
  16019. prevPublic = pub2
  16020. if (*TXftFontInt)(unsafe.Pointer(font2)).Fformat != format {
  16021. format = _XftPreferFormat(tls, dpy, (*TXftFontInt)(unsafe.Pointer(font2)).Fformat, format)
  16022. }
  16023. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fx)
  16024. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fy)
  16025. nelt++
  16026. }
  16027. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  16028. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  16029. }
  16030. }
  16031. elts = bp + 5124
  16032. if nelt > int32(m_NUM_ELT_LOCAL) {
  16033. elts = libc.Xmalloc(tls, libc.Uint32FromInt32(nelt)*uint32(20))
  16034. if !(elts != 0) {
  16035. goto bail2
  16036. }
  16037. }
  16038. /*
  16039. * Generate the list of glyph elts and render color glyphs
  16040. */
  16041. nelt = 0
  16042. v5 = libc.Int32FromInt32(0)
  16043. y = v5
  16044. x = v5
  16045. n = 0
  16046. j = 0
  16047. prevPublic = libc.UintptrFromInt32(0)
  16048. i = 0
  16049. for {
  16050. if !(i < nglyphs) {
  16051. break
  16052. }
  16053. pub3 = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont
  16054. font3 = pub3
  16055. g = (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fglyph
  16056. /* Substitute default for non-existent glyphs */
  16057. if g >= (*TXftFontInt)(unsafe.Pointer(font3)).Fnum_glyphs || !(*(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font3)).Fglyphs + uintptr(g)*4)) != 0) {
  16058. g = uint32(0)
  16059. }
  16060. v7 = *(*uintptr)(unsafe.Pointer((*TXftFontInt)(unsafe.Pointer(font3)).Fglyphs + uintptr(g)*4))
  16061. glyph = v7
  16062. if v7 != 0 {
  16063. if (*TXftGlyph)(unsafe.Pointer(glyph)).Fpicture != 0 {
  16064. 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))
  16065. goto _6
  16066. }
  16067. 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) {
  16068. if n != 0 {
  16069. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).Fnchars = n
  16070. nelt++
  16071. }
  16072. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).Fglyphset = (*TXftFontInt)(unsafe.Pointer(font3)).Fglyphset
  16073. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).Fchars = char8 + uintptr(size*j)
  16074. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).FxOff = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fx) - x
  16075. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).FyOff = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fy) - y
  16076. prevPublic = pub3
  16077. x = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fx)
  16078. y = int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fy)
  16079. n = 0
  16080. }
  16081. switch width {
  16082. case int32(1):
  16083. *(*int8)(unsafe.Pointer(char8 + uintptr(j))) = libc.Int8FromUint32(g)
  16084. case int32(2):
  16085. *(*uint16)(unsafe.Pointer(char16 + uintptr(j)*2)) = uint16(g)
  16086. case int32(4):
  16087. *(*uint32)(unsafe.Pointer(char32 + uintptr(j)*4)) = g
  16088. break
  16089. }
  16090. x += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FxOff)
  16091. y += int32((*TXftGlyph)(unsafe.Pointer(glyph)).Fmetrics.FyOff)
  16092. j++
  16093. n++
  16094. }
  16095. goto _6
  16096. _6:
  16097. ;
  16098. i++
  16099. }
  16100. if n != 0 {
  16101. (*(*TXGlyphElt8)(unsafe.Pointer(elts + uintptr(nelt)*20))).Fnchars = n
  16102. nelt++
  16103. }
  16104. __XftCompositeText(tls, dpy, op, src, dst, format, srcx, srcy, int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fx), int32((*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs))).Fy), width, elts, nelt)
  16105. if elts != bp+5124 {
  16106. libc.Xfree(tls, elts)
  16107. }
  16108. goto bail2
  16109. bail2:
  16110. ;
  16111. if chars != bp+1028 {
  16112. libc.Xfree(tls, chars)
  16113. }
  16114. goto bail1
  16115. bail1:
  16116. ;
  16117. if glyphs_loaded != 0 {
  16118. i = 0
  16119. for {
  16120. if !(i < nglyphs) {
  16121. break
  16122. }
  16123. X_XftFontManageMemory(tls, dpy, (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont)
  16124. goto _8
  16125. _8:
  16126. ;
  16127. i++
  16128. }
  16129. }
  16130. }
  16131. func XXftCharFontSpecRender(tls *libc.TLS, dpy uintptr, op int32, src TPicture, dst TPicture, srcx int32, srcy int32, chars uintptr, len1 int32) {
  16132. bp := tls.Alloc(12288)
  16133. defer tls.Free(12288)
  16134. var glyphs uintptr
  16135. var i int32
  16136. var _ /* glyphs_local at bp+0 */ [1024]TXftGlyphFontSpec
  16137. _, _ = glyphs, i
  16138. if len1 <= 0 {
  16139. return
  16140. }
  16141. if len1 <= int32(m_NUM_LOCAL) {
  16142. glyphs = bp
  16143. } else {
  16144. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(12))
  16145. if !(glyphs != 0) {
  16146. return
  16147. }
  16148. }
  16149. i = 0
  16150. for {
  16151. if !(i < len1) {
  16152. break
  16153. }
  16154. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Ffont = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*12))).Ffont
  16155. (*(*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)
  16156. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fx = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*12))).Fx
  16157. (*(*TXftGlyphFontSpec)(unsafe.Pointer(glyphs + uintptr(i)*12))).Fy = (*(*TXftCharFontSpec)(unsafe.Pointer(chars + uintptr(i)*12))).Fy
  16158. goto _1
  16159. _1:
  16160. ;
  16161. i++
  16162. }
  16163. XXftGlyphFontSpecRender(tls, dpy, op, src, dst, srcx, srcy, glyphs, len1)
  16164. if glyphs != bp {
  16165. libc.Xfree(tls, glyphs)
  16166. }
  16167. }
  16168. 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) {
  16169. bp := tls.Alloc(4096)
  16170. defer tls.Free(4096)
  16171. var glyphs uintptr
  16172. var i int32
  16173. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16174. _, _ = glyphs, i
  16175. if len1 <= 0 {
  16176. return
  16177. }
  16178. if len1 <= int32(m_NUM_LOCAL) {
  16179. glyphs = bp
  16180. } else {
  16181. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  16182. if !(glyphs != 0) {
  16183. return
  16184. }
  16185. }
  16186. i = 0
  16187. for {
  16188. if !(i < len1) {
  16189. break
  16190. }
  16191. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar8)(unsafe.Pointer(string1 + uintptr(i)))))
  16192. goto _1
  16193. _1:
  16194. ;
  16195. i++
  16196. }
  16197. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16198. if glyphs != bp {
  16199. libc.Xfree(tls, glyphs)
  16200. }
  16201. }
  16202. 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) {
  16203. bp := tls.Alloc(4096)
  16204. defer tls.Free(4096)
  16205. var glyphs uintptr
  16206. var i int32
  16207. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16208. _, _ = glyphs, i
  16209. if len1 <= 0 {
  16210. return
  16211. }
  16212. if len1 <= int32(m_NUM_LOCAL) {
  16213. glyphs = bp
  16214. } else {
  16215. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  16216. if !(glyphs != 0) {
  16217. return
  16218. }
  16219. }
  16220. i = 0
  16221. for {
  16222. if !(i < len1) {
  16223. break
  16224. }
  16225. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, uint32(*(*TFcChar16)(unsafe.Pointer(string1 + uintptr(i)*2))))
  16226. goto _1
  16227. _1:
  16228. ;
  16229. i++
  16230. }
  16231. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16232. if glyphs != bp {
  16233. libc.Xfree(tls, glyphs)
  16234. }
  16235. }
  16236. 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) {
  16237. bp := tls.Alloc(4096)
  16238. defer tls.Free(4096)
  16239. var glyphs uintptr
  16240. var i int32
  16241. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16242. _, _ = glyphs, i
  16243. if len1 <= 0 {
  16244. return
  16245. }
  16246. if len1 <= int32(m_NUM_LOCAL) {
  16247. glyphs = bp
  16248. } else {
  16249. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  16250. if !(glyphs != 0) {
  16251. return
  16252. }
  16253. }
  16254. i = 0
  16255. for {
  16256. if !(i < len1) {
  16257. break
  16258. }
  16259. *(*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)))))))
  16260. goto _1
  16261. _1:
  16262. ;
  16263. i++
  16264. }
  16265. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16266. if glyphs != bp {
  16267. libc.Xfree(tls, glyphs)
  16268. }
  16269. }
  16270. 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) {
  16271. bp := tls.Alloc(4096)
  16272. defer tls.Free(4096)
  16273. var glyphs uintptr
  16274. var i int32
  16275. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16276. _, _ = glyphs, i
  16277. if len1 <= 0 {
  16278. return
  16279. }
  16280. if len1 <= int32(m_NUM_LOCAL) {
  16281. glyphs = bp
  16282. } else {
  16283. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  16284. if !(glyphs != 0) {
  16285. return
  16286. }
  16287. }
  16288. i = 0
  16289. for {
  16290. if !(i < len1) {
  16291. break
  16292. }
  16293. *(*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)))
  16294. goto _1
  16295. _1:
  16296. ;
  16297. i++
  16298. }
  16299. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16300. if glyphs != bp {
  16301. libc.Xfree(tls, glyphs)
  16302. }
  16303. }
  16304. 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) {
  16305. bp := tls.Alloc(4096)
  16306. defer tls.Free(4096)
  16307. var glyphs uintptr
  16308. var i int32
  16309. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16310. _, _ = glyphs, i
  16311. if len1 <= 0 {
  16312. return
  16313. }
  16314. if len1 <= int32(m_NUM_LOCAL) {
  16315. glyphs = bp
  16316. } else {
  16317. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  16318. if !(glyphs != 0) {
  16319. return
  16320. }
  16321. }
  16322. i = 0
  16323. for {
  16324. if !(i < len1) {
  16325. break
  16326. }
  16327. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(i)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(string1 + uintptr(i)*4)))
  16328. goto _1
  16329. _1:
  16330. ;
  16331. i++
  16332. }
  16333. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16334. if glyphs != bp {
  16335. libc.Xfree(tls, glyphs)
  16336. }
  16337. }
  16338. 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) {
  16339. bp := tls.Alloc(4096)
  16340. defer tls.Free(4096)
  16341. var glyphs uintptr
  16342. var i int32
  16343. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16344. _, _ = glyphs, i
  16345. if len1 <= 0 {
  16346. return
  16347. }
  16348. if len1 <= int32(m_NUM_LOCAL) {
  16349. glyphs = bp
  16350. } else {
  16351. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  16352. if !(glyphs != 0) {
  16353. return
  16354. }
  16355. }
  16356. i = 0
  16357. for {
  16358. if !(i < len1) {
  16359. break
  16360. }
  16361. *(*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)))))))
  16362. goto _1
  16363. _1:
  16364. ;
  16365. i++
  16366. }
  16367. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16368. if glyphs != bp {
  16369. libc.Xfree(tls, glyphs)
  16370. }
  16371. }
  16372. 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) {
  16373. bp := tls.Alloc(4096)
  16374. defer tls.Free(4096)
  16375. var glyphs uintptr
  16376. var i int32
  16377. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16378. _, _ = glyphs, i
  16379. if len1 <= 0 {
  16380. return
  16381. }
  16382. if len1 <= int32(m_NUM_LOCAL) {
  16383. glyphs = bp
  16384. } else {
  16385. glyphs = libc.Xmalloc(tls, libc.Uint32FromInt32(len1)*uint32(4))
  16386. if !(glyphs != 0) {
  16387. return
  16388. }
  16389. }
  16390. i = 0
  16391. for {
  16392. if !(i < len1) {
  16393. break
  16394. }
  16395. *(*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)))
  16396. goto _1
  16397. _1:
  16398. ;
  16399. i++
  16400. }
  16401. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, len1)
  16402. if glyphs != bp {
  16403. libc.Xfree(tls, glyphs)
  16404. }
  16405. }
  16406. 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) {
  16407. bp := tls.Alloc(4112)
  16408. defer tls.Free(4112)
  16409. var glyphs, glyphs_new uintptr
  16410. var i, l, size, v1, v3 int32
  16411. var v2 bool
  16412. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16413. var _ /* ucs4 at bp+4096 */ TFcChar32
  16414. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  16415. if len1 <= 0 {
  16416. return
  16417. }
  16418. i = 0
  16419. glyphs = bp
  16420. size = int32(m_NUM_LOCAL)
  16421. for {
  16422. if v2 = len1 != 0; v2 {
  16423. v1 = libfontconfig.XFcUtf8ToUcs4(tls, string1, bp+4096, len1)
  16424. l = v1
  16425. }
  16426. if !(v2 && v1 > 0) {
  16427. break
  16428. }
  16429. if i == size {
  16430. glyphs_new = libc.Xmalloc(tls, libc.Uint32FromInt32(size*libc.Int32FromInt32(2))*uint32(4))
  16431. if !(glyphs_new != 0) {
  16432. if glyphs != bp {
  16433. libc.Xfree(tls, glyphs)
  16434. }
  16435. return
  16436. }
  16437. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint32FromInt32(size)*uint32(4))
  16438. size *= int32(2)
  16439. if glyphs != bp {
  16440. libc.Xfree(tls, glyphs)
  16441. }
  16442. glyphs = glyphs_new
  16443. }
  16444. v3 = i
  16445. i++
  16446. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  16447. string1 += uintptr(l)
  16448. len1 -= l
  16449. }
  16450. XXftGlyphRender(tls, dpy, op, src, pub, dst, srcx, srcy, x, y, glyphs, i)
  16451. if glyphs != bp {
  16452. libc.Xfree(tls, glyphs)
  16453. }
  16454. }
  16455. 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) {
  16456. bp := tls.Alloc(4112)
  16457. defer tls.Free(4112)
  16458. var glyphs, glyphs_new uintptr
  16459. var i, l, size, v1, v3 int32
  16460. var v2 bool
  16461. var _ /* glyphs_local at bp+0 */ [1024]TFT_UInt
  16462. var _ /* ucs4 at bp+4096 */ TFcChar32
  16463. _, _, _, _, _, _, _, _ = glyphs, glyphs_new, i, l, size, v1, v2, v3
  16464. if len1 <= 0 {
  16465. return
  16466. }
  16467. i = 0
  16468. glyphs = bp
  16469. size = int32(m_NUM_LOCAL)
  16470. for {
  16471. if v2 = len1 != 0; v2 {
  16472. v1 = libfontconfig.XFcUtf16ToUcs4(tls, string1, endian, bp+4096, len1)
  16473. l = v1
  16474. }
  16475. if !(v2 && v1 > 0) {
  16476. break
  16477. }
  16478. if i == size {
  16479. glyphs_new = libc.Xmalloc(tls, libc.Uint32FromInt32(size*libc.Int32FromInt32(2))*uint32(4))
  16480. if !(glyphs_new != 0) {
  16481. if glyphs != bp {
  16482. libc.Xfree(tls, glyphs)
  16483. }
  16484. return
  16485. }
  16486. libc.Xmemcpy(tls, glyphs_new, glyphs, libc.Uint32FromInt32(size)*uint32(4))
  16487. size *= int32(2)
  16488. if glyphs != bp {
  16489. libc.Xfree(tls, glyphs)
  16490. }
  16491. glyphs = glyphs_new
  16492. }
  16493. v3 = i
  16494. i++
  16495. *(*TFT_UInt)(unsafe.Pointer(glyphs + uintptr(v3)*4)) = XXftCharIndex(tls, dpy, pub, *(*TFcChar32)(unsafe.Pointer(bp + 4096)))
  16496. string1 += uintptr(l)
  16497. len1 -= l
  16498. }
  16499. XXftGlyphRender(tls, dpy, int32(m_PictOpOver), src, pub, dst, srcx, srcy, x, y, glyphs, i)
  16500. if glyphs != bp {
  16501. libc.Xfree(tls, glyphs)
  16502. }
  16503. }
  16504. const m_UINT32_MAX2 = "0xffffffffu"
  16505. /* xftxlfd.c */
  16506. func X_XftMatchSymbolic(tls *libc.TLS, s uintptr, n int32, name uintptr, def int32) (r int32) {
  16507. var v1 int32
  16508. _ = v1
  16509. for {
  16510. v1 = n
  16511. n--
  16512. if !(v1 != 0) {
  16513. break
  16514. }
  16515. if !(libfontconfig.XFcStrCmpIgnoreCase(tls, (*TXftSymbolic)(unsafe.Pointer(s)).Fname, name) != 0) {
  16516. return (*TXftSymbolic)(unsafe.Pointer(s)).Fvalue
  16517. }
  16518. s += 8
  16519. }
  16520. return def
  16521. }
  16522. /* xftxlfd.c */
  16523. func XXftNativeByteOrder(tls *libc.TLS) (r int32) {
  16524. bp := tls.Alloc(16)
  16525. defer tls.Free(16)
  16526. var _ /* whichbyte at bp+0 */ int32
  16527. *(*int32)(unsafe.Pointer(bp)) = int32(1)
  16528. if *(*int8)(unsafe.Pointer(bp)) != 0 {
  16529. return m_LSBFirst
  16530. }
  16531. return int32(m_MSBFirst)
  16532. }
  16533. /* byte swap a 32-bit value */
  16534. /* byte swap a short */
  16535. /* byte swap a three-byte unit */
  16536. func XXftSwapCARD32(tls *libc.TLS, data uintptr, u int32) {
  16537. var n int8
  16538. var v1 int32
  16539. _, _ = n, v1
  16540. for {
  16541. v1 = u
  16542. u--
  16543. if !(v1 != 0) {
  16544. break
  16545. }
  16546. n = *(*int8)(unsafe.Pointer(data))
  16547. *(*int8)(unsafe.Pointer(data)) = *(*int8)(unsafe.Pointer(data + 3))
  16548. *(*int8)(unsafe.Pointer(data + 3)) = n
  16549. n = *(*int8)(unsafe.Pointer(data + 1))
  16550. *(*int8)(unsafe.Pointer(data + 1)) = *(*int8)(unsafe.Pointer(data + 2))
  16551. *(*int8)(unsafe.Pointer(data + 2)) = n
  16552. data += 4
  16553. }
  16554. }
  16555. func XXftSwapCARD24(tls *libc.TLS, data uintptr, width int32, height int32) {
  16556. var d uintptr
  16557. var n int8
  16558. var u, units, v1, v2 int32
  16559. _, _, _, _, _, _ = d, n, u, units, v1, v2
  16560. units = width / int32(3)
  16561. for {
  16562. v1 = height
  16563. height--
  16564. if !(v1 != 0) {
  16565. break
  16566. }
  16567. d = data
  16568. data += uintptr(width)
  16569. u = units
  16570. for {
  16571. v2 = u
  16572. u--
  16573. if !(v2 != 0) {
  16574. break
  16575. }
  16576. n = *(*int8)(unsafe.Pointer(d))
  16577. *(*int8)(unsafe.Pointer(d)) = *(*int8)(unsafe.Pointer(d + 2))
  16578. *(*int8)(unsafe.Pointer(d + 2)) = n
  16579. d += uintptr(3)
  16580. }
  16581. }
  16582. }
  16583. func XXftSwapCARD16(tls *libc.TLS, data uintptr, u int32) {
  16584. var n int8
  16585. var v1 int32
  16586. _, _ = n, v1
  16587. for {
  16588. v1 = u
  16589. u--
  16590. if !(v1 != 0) {
  16591. break
  16592. }
  16593. n = *(*int8)(unsafe.Pointer(data))
  16594. *(*int8)(unsafe.Pointer(data)) = *(*int8)(unsafe.Pointer(data + 1))
  16595. *(*int8)(unsafe.Pointer(data + 1)) = n
  16596. data += 2
  16597. }
  16598. }
  16599. func XXftSwapImage(tls *libc.TLS, image uintptr) {
  16600. switch (*TXImage)(unsafe.Pointer(image)).Fbits_per_pixel {
  16601. case int32(32):
  16602. XXftSwapCARD32(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fheight*(*TXImage)(unsafe.Pointer(image)).Fbytes_per_line>>int32(2))
  16603. case int32(24):
  16604. XXftSwapCARD24(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fbytes_per_line, (*TXImage)(unsafe.Pointer(image)).Fheight)
  16605. case int32(16):
  16606. XXftSwapCARD16(tls, (*TXImage)(unsafe.Pointer(image)).Fdata, (*TXImage)(unsafe.Pointer(image)).Fheight*(*TXImage)(unsafe.Pointer(image)).Fbytes_per_line>>int32(1))
  16607. default:
  16608. break
  16609. }
  16610. }
  16611. /* xftxlfd.c */
  16612. var _XftXlfdWeights = [6]TXftSymbolic{
  16613. 0: {
  16614. Fname: __ccgo_ts + 2170,
  16615. Fvalue: int32(m_FC_WEIGHT_LIGHT),
  16616. },
  16617. 1: {
  16618. Fname: __ccgo_ts + 2176,
  16619. Fvalue: int32(m_FC_WEIGHT_MEDIUM),
  16620. },
  16621. 2: {
  16622. Fname: __ccgo_ts + 2183,
  16623. Fvalue: int32(m_FC_WEIGHT_MEDIUM),
  16624. },
  16625. 3: {
  16626. Fname: __ccgo_ts + 2191,
  16627. Fvalue: int32(m_FC_WEIGHT_DEMIBOLD),
  16628. },
  16629. 4: {
  16630. Fname: __ccgo_ts + 2200,
  16631. Fvalue: int32(m_FC_WEIGHT_BOLD),
  16632. },
  16633. 5: {
  16634. Fname: __ccgo_ts + 2205,
  16635. Fvalue: int32(m_FC_WEIGHT_BLACK),
  16636. },
  16637. }
  16638. var _XftXlfdSlants = [3]TXftSymbolic{
  16639. 0: {
  16640. Fname: __ccgo_ts + 2211,
  16641. },
  16642. 1: {
  16643. Fname: __ccgo_ts + 2213,
  16644. Fvalue: int32(m_FC_SLANT_ITALIC),
  16645. },
  16646. 2: {
  16647. Fname: __ccgo_ts + 2215,
  16648. Fvalue: int32(m_FC_SLANT_OBLIQUE),
  16649. },
  16650. }
  16651. // C documentation
  16652. //
  16653. // /*
  16654. // * Cut out one XLFD field, placing it in 'save' and return
  16655. // * the start of 'save'
  16656. // */
  16657. func _XftSplitStr(tls *libc.TLS, field uintptr, save uintptr) (r uintptr) {
  16658. var c int8
  16659. var s, v1, v2 uintptr
  16660. _, _, _, _ = c, s, v1, v2
  16661. s = save
  16662. for *(*int8)(unsafe.Pointer(field)) != 0 {
  16663. if int32(*(*int8)(unsafe.Pointer(field))) == int32('-') {
  16664. break
  16665. }
  16666. v1 = field
  16667. field++
  16668. c = *(*int8)(unsafe.Pointer(v1))
  16669. v2 = save
  16670. save++
  16671. *(*int8)(unsafe.Pointer(v2)) = c
  16672. }
  16673. *(*int8)(unsafe.Pointer(save)) = 0
  16674. return s
  16675. }
  16676. /*
  16677. * convert one XLFD numeric field. Return -1 if the field is '*'
  16678. */
  16679. func _XftGetInt(tls *libc.TLS, ptr uintptr, val uintptr) (r uintptr) {
  16680. var v2 uintptr
  16681. _ = v2
  16682. if int32(*(*int8)(unsafe.Pointer(ptr))) == int32('*') {
  16683. *(*int32)(unsafe.Pointer(val)) = -int32(1)
  16684. ptr++
  16685. } else {
  16686. *(*int32)(unsafe.Pointer(val)) = 0
  16687. for {
  16688. if !(int32(*(*int8)(unsafe.Pointer(ptr))) >= int32('0') && int32(*(*int8)(unsafe.Pointer(ptr))) <= int32('9')) {
  16689. break
  16690. }
  16691. v2 = ptr
  16692. ptr++
  16693. *(*int32)(unsafe.Pointer(val)) = *(*int32)(unsafe.Pointer(val))*int32(10) + int32(*(*int8)(unsafe.Pointer(v2))) - int32('0')
  16694. goto _1
  16695. _1:
  16696. }
  16697. }
  16698. if int32(*(*int8)(unsafe.Pointer(ptr))) == int32('-') {
  16699. return ptr
  16700. }
  16701. return libc.UintptrFromInt32(0)
  16702. }
  16703. func XXftXlfdParse(tls *libc.TLS, xlfd_orig uintptr, ignore_scalable TFcBool, complete TFcBool) (r uintptr) {
  16704. bp := tls.Alloc(16)
  16705. defer tls.Free(16)
  16706. var dpixel float64
  16707. 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
  16708. var slant_value, weight_value int32
  16709. var _ /* pixel at bp+0 */ int32
  16710. var _ /* point at bp+4 */ int32
  16711. var _ /* resx at bp+8 */ int32
  16712. var _ /* resy at bp+12 */ int32
  16713. _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _, _ = 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
  16714. xlfd = xlfd_orig
  16715. if int32(*(*int8)(unsafe.Pointer(xlfd))) != int32('-') {
  16716. return libc.UintptrFromInt32(0)
  16717. }
  16718. xlfd++
  16719. v3 = xlfd
  16720. v2 = v3
  16721. foundry = v2
  16722. v1 = libc.Xstrchr(tls, v2, int32('-'))
  16723. xlfd = v1
  16724. if !(v1 != 0) {
  16725. return libc.UintptrFromInt32(0)
  16726. }
  16727. xlfd++
  16728. v6 = xlfd
  16729. v5 = v6
  16730. family = v5
  16731. v4 = libc.Xstrchr(tls, v5, int32('-'))
  16732. xlfd = v4
  16733. if !(v4 != 0) {
  16734. return libc.UintptrFromInt32(0)
  16735. }
  16736. xlfd++
  16737. v9 = xlfd
  16738. v8 = v9
  16739. weight_name = v8
  16740. v7 = libc.Xstrchr(tls, v8, int32('-'))
  16741. xlfd = v7
  16742. if !(v7 != 0) {
  16743. return libc.UintptrFromInt32(0)
  16744. }
  16745. xlfd++
  16746. v12 = xlfd
  16747. v11 = v12
  16748. slant = v11
  16749. v10 = libc.Xstrchr(tls, v11, int32('-'))
  16750. xlfd = v10
  16751. if !(v10 != 0) {
  16752. return libc.UintptrFromInt32(0)
  16753. }
  16754. xlfd++
  16755. v14 = xlfd
  16756. v13 = libc.Xstrchr(tls, v14, int32('-'))
  16757. xlfd = v13
  16758. if !(v13 != 0) {
  16759. return libc.UintptrFromInt32(0)
  16760. }
  16761. xlfd++
  16762. v16 = xlfd
  16763. v15 = libc.Xstrchr(tls, v16, int32('-'))
  16764. xlfd = v15
  16765. if !(v15 != 0) {
  16766. return libc.UintptrFromInt32(0)
  16767. }
  16768. xlfd++
  16769. v18 = xlfd
  16770. v17 = _XftGetInt(tls, v18, bp)
  16771. xlfd = v17
  16772. if !(v17 != 0) {
  16773. return libc.UintptrFromInt32(0)
  16774. }
  16775. xlfd++
  16776. v20 = xlfd
  16777. v19 = _XftGetInt(tls, v20, bp+4)
  16778. xlfd = v19
  16779. if !(v19 != 0) {
  16780. return libc.UintptrFromInt32(0)
  16781. }
  16782. xlfd++
  16783. v22 = xlfd
  16784. v21 = _XftGetInt(tls, v22, bp+8)
  16785. xlfd = v21
  16786. if !(v21 != 0) {
  16787. return libc.UintptrFromInt32(0)
  16788. }
  16789. xlfd++
  16790. v24 = xlfd
  16791. v23 = _XftGetInt(tls, v24, bp+12)
  16792. xlfd = v23
  16793. if !(v23 != 0) {
  16794. return libc.UintptrFromInt32(0)
  16795. }
  16796. xlfd++
  16797. v26 = xlfd
  16798. v25 = libc.Xstrchr(tls, v26, int32('-'))
  16799. xlfd = v25
  16800. if !(v25 != 0) {
  16801. return libc.UintptrFromInt32(0)
  16802. }
  16803. xlfd++
  16804. v28 = xlfd
  16805. v27 = libc.Xstrchr(tls, v28, int32('-'))
  16806. xlfd = v27
  16807. if !(v27 != 0) {
  16808. return libc.UintptrFromInt32(0)
  16809. }
  16810. xlfd++
  16811. v30 = xlfd
  16812. v29 = libc.Xstrchr(tls, v30, int32('-'))
  16813. xlfd = v29
  16814. if !(v29 != 0) {
  16815. return libc.UintptrFromInt32(0)
  16816. }
  16817. /* make sure no fields follow this one */
  16818. xlfd++
  16819. v31 = xlfd
  16820. if libc.Xstrchr(tls, v31, int32('-')) != 0 {
  16821. return libc.UintptrFromInt32(0)
  16822. }
  16823. if !(*(*int32)(unsafe.Pointer(bp)) != 0) {
  16824. return libc.UintptrFromInt32(0)
  16825. }
  16826. pat = libfontconfig.XFcPatternCreate(tls)
  16827. if !(pat != 0) {
  16828. return libc.UintptrFromInt32(0)
  16829. }
  16830. save = libc.Xmalloc(tls, libc.Xstrlen(tls, foundry)+uint32(1))
  16831. if !(save != 0) {
  16832. libfontconfig.XFcPatternDestroy(tls, pat)
  16833. return libc.UintptrFromInt32(0)
  16834. }
  16835. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+2217, xlfd_orig) != 0) {
  16836. goto bail
  16837. }
  16838. _XftSplitStr(tls, foundry, save)
  16839. if *(*int8)(unsafe.Pointer(save)) != 0 && libc.Xstrcmp(tls, save, __ccgo_ts+2222) != 0 {
  16840. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+2224, save) != 0) {
  16841. goto bail
  16842. }
  16843. }
  16844. _XftSplitStr(tls, family, save)
  16845. if *(*int8)(unsafe.Pointer(save)) != 0 && libc.Xstrcmp(tls, save, __ccgo_ts+2222) != 0 {
  16846. if !(libfontconfig.XFcPatternAddString(tls, pat, __ccgo_ts+2232, save) != 0) {
  16847. goto bail
  16848. }
  16849. }
  16850. 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))
  16851. if !(libfontconfig.XFcPatternAddInteger(tls, pat, __ccgo_ts+2239, weight_value) != 0) {
  16852. goto bail
  16853. }
  16854. 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)
  16855. if !(libfontconfig.XFcPatternAddInteger(tls, pat, __ccgo_ts+2246, slant_value) != 0) {
  16856. goto bail
  16857. }
  16858. dpixel = float64(*(*int32)(unsafe.Pointer(bp)))
  16859. if *(*int32)(unsafe.Pointer(bp + 4)) > 0 {
  16860. if !(libfontconfig.XFcPatternAddDouble(tls, pat, __ccgo_ts+2252, float64(*(*int32)(unsafe.Pointer(bp + 4)))/float64(10)) != 0) {
  16861. goto bail
  16862. }
  16863. if *(*int32)(unsafe.Pointer(bp)) <= 0 && *(*int32)(unsafe.Pointer(bp + 12)) > 0 {
  16864. dpixel = float64(float64(*(*int32)(unsafe.Pointer(bp + 4)))*float64(*(*int32)(unsafe.Pointer(bp + 12)))) / float64(720)
  16865. }
  16866. }
  16867. if dpixel > libc.Float64FromInt32(0) {
  16868. if !(libfontconfig.XFcPatternAddDouble(tls, pat, __ccgo_ts+1243, dpixel) != 0) {
  16869. goto bail
  16870. }
  16871. }
  16872. libc.Xfree(tls, save)
  16873. return pat
  16874. goto bail
  16875. bail:
  16876. ;
  16877. libc.Xfree(tls, save)
  16878. libfontconfig.XFcPatternDestroy(tls, pat)
  16879. return libc.UintptrFromInt32(0)
  16880. }
  16881. func __ccgo_fp(f interface{}) uintptr {
  16882. type iface [2]uintptr
  16883. return (*iface)(unsafe.Pointer(&f))[1]
  16884. }
  16885. /* xftxlfd.c */
  16886. var X_XftDisplayInfo uintptr
  16887. /* xftxlfd.c */
  16888. var X_XftFTlibrary TFT_Library
  16889. var __ccgo_ts = (*reflect.StringHeader)(unsafe.Pointer(&__ccgo_ts1)).Data
  16890. 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"